/* Bowlby web app. Colors and type from the "Bowlby screen GUI" mockups. */
:root {
  --bg: #F7F6F2; --card: #FFFFFF; --ink: #141414; --muted: #5C5A55; --soft: #3D3B37;
  --line: #E4E2DC; --chip: #E9E7E1; --chip-line: #CFCDC7; --accent: #C2410C; --accent-dark: #9A3412; --danger: #B42318;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select { font-family: inherit; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; padding: 28px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
main.sub { padding-top: 12px; gap: 18px; }
h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.15; }
main.sub h1 { font-size: 28px; }
h2.label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.step { font-size: 13px; font-weight: 700; color: var(--muted); }
.lede { font-size: 15px; line-height: 1.45; color: var(--soft); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.card h2.label { margin-bottom: 6px; }
.list { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
.list > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; color: var(--ink); text-decoration: none; }
.card .row { min-height: 44px; }
.card .row + .row { border-top: 1px solid var(--line); }
a.row:hover { color: var(--ink); }
.row .name { font-size: 16px; font-weight: 600; }
.card .row .name { font-size: 17px; }
.row .stack { display: flex; flex-direction: column; gap: 2px; }
.row .value { font-size: 15px; color: var(--muted); text-align: right; }
.row label { flex: 1; }
.check { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 600; }
.pill { font-size: 14px; font-weight: 700; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.pill.late { background: var(--accent); color: #FFFFFF; }
.pill.quiet { color: var(--muted); border-color: var(--chip-line); }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--ink); flex-shrink: 0; }

.quote { margin: 0; background: var(--ink); color: #FFFFFF; border-radius: 16px; padding: 16px; }
.quote blockquote { margin: 0; font-size: 17px; font-weight: 500; font-style: italic; line-height: 1.35; }
.quote figcaption { margin-top: 6px; font-size: 13px; color: #CFCDC7; }

.btn { height: 48px; border-radius: 12px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-size: 16px; font-weight: 600; cursor: pointer; padding: 0 16px; }
.btn.primary { height: 52px; border-radius: 14px; border: none; background: var(--ink); color: #FFFFFF; font-size: 17px; font-weight: 700; }
.btn.link { height: 44px; border: none; background: transparent; color: var(--accent); font-size: 15px; font-weight: 600; padding: 0; }
.btn.link.left { align-self: flex-start; font-weight: 700; }
.btn.danger { height: 44px; border: none; background: transparent; color: var(--danger); font-size: 15px; font-weight: 600; }
.btn:disabled { opacity: 0.5; cursor: default; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.bottom { margin-top: auto; }
.back { align-self: flex-start; min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 700; text-decoration: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, legend { font-size: 14px; font-weight: 700; padding: 0; }
.field input[type=text], .field input[type=time], .field input[type=date], .field input[type=number], .field select {
  height: 48px; border: 1.5px solid var(--ink); border-radius: 12px; padding: 0 14px; font-size: 17px; font-weight: 500; background: var(--card); color: var(--ink); width: 100%;
}
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
fieldset { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--chip); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { height: 44px; border-radius: 9px; border: none; background: transparent; color: var(--soft); font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); font-weight: 700; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips.days { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chips button { height: 44px; border-radius: 10px; border: 1.5px solid var(--chip-line); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; }
.chips.days button { font-size: 13px; padding: 0; }
.chips button[aria-pressed=true] { border: 2px solid var(--ink); background: var(--ink); color: #FFFFFF; font-weight: 700; }
.tag { background: var(--card); border: 2px solid var(--ink); padding: 2px 10px; font-size: 15px; font-weight: 900; letter-spacing: 2px; }

nav.tabs { position: sticky; bottom: 0; display: flex; border-top: 1px solid var(--line); background: var(--card); height: 72px; padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; }
nav.tabs a[aria-current=page] { font-weight: 800; color: var(--ink); }

ol.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
ol.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; }
ol.steps .num { flex-shrink: 0; width: 32px; height: 32px; border-radius: 999px; background: var(--ink); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
ol.steps .txt { flex: 1; font-size: 16px; font-weight: 600; line-height: 1.35; }

dialog { border: none; border-radius: 20px 20px 0 0; padding: 20px; width: 100%; max-width: 480px; margin: auto auto 0; background: var(--bg); color: var(--ink); }
dialog::backdrop { background: rgba(20, 20, 20, 0.45); }
dialog form { display: flex; flex-direction: column; gap: 16px; }
dialog h2 { margin: 0; font-size: 22px; font-weight: 800; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); background: var(--ink); color: #FFFFFF; padding: 12px 18px; border-radius: 12px; font-size: 15px; font-weight: 600; max-width: calc(100% - 40px); z-index: 10; }
.error { color: var(--danger); font-size: 14px; font-weight: 600; }
.center { text-align: center; }
.code-input { text-transform: uppercase; letter-spacing: 4px; text-align: center; font-weight: 700 !important; }
.history-day + .history-day { margin-top: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.temp { display: flex; flex-direction: column; gap: 2px; }
.temp .label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.temp .deg { font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.pet-head { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.fed-btn { height: 60px; font-size: 20px; letter-spacing: 0.01em; }
.pet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.small-btn { height: 36px; padding: 0 18px; font-size: 15px; border-radius: 10px; }

/* Setup screens: bigger text, since this is where people are least sure what to do. */
.setup .lede { font-size: 17px; line-height: 1.5; }
.setup .small { font-size: 15px; line-height: 1.45; }
.setup .step { font-size: 15px; }
.setup ol.steps .txt { font-size: 17px; }
.setup .error { font-size: 16px; line-height: 1.45; }
.nag .muted { font-size: 15px; }
