/* Walsh House — one stylesheet for the whole app. */
:root {
  --bg: #ECEAE5; --surface: #F7F6F2; --sunk: #E2DFD8; --ink: #1C1916; --muted: #6A635B;
  --line: #D5D0C7; --hair: #E2DFD8; --ring: #A79F94;
  --amber: #A4521B; --amber-soft: #F0DCCB; --wine: #7A1F3B; --wine-soft: #EED6DD;
  --ok: #2F6A45; --ok-soft: #D7E9DC; --warn: #7A5108; --warn-soft: #F3E4C4; --star: #C98A2E;
  --dark: #1C1916; --on-dark: #F7F6F2; --on-dark-muted: #D9CFC2; --accent-on-dark: #E8A26A;
  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13110F; --surface: #1D1A17; --sunk: #26221E; --ink: #EEE7DD; --muted: #A1978A;
    --line: #342E28; --hair: #2A2521; --ring: #6E655B;
    --amber: #DE9050; --amber-soft: #3A2618; --wine: #D06A8A; --wine-soft: #3A1C26;
    --ok: #7CC394; --ok-soft: #1C3125; --warn: #E0B054; --warn-soft: #382A12;
    --dark: #2A2521; --on-dark: #EEE7DD; --on-dark-muted: #B8AEA1;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.4 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Layout ─────────────────────────────────────────────── */
.screen { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-top) + 20px) 16px calc(var(--safe-bottom) + 104px); display: flex; flex-direction: column; gap: 14px; }
.mast { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mast h1, .h1 { margin: 0; font: 800 44px/0.9 var(--f-display); text-transform: uppercase; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font: 800 22px/1.1 var(--f-display); text-transform: uppercase; }
.label { margin: 6px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sec-head a, .linkbtn { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--amber); background: none; border: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; align-self: flex-start; margin: -8px 0 -6px; text-decoration: none; font-weight: 600; }
.back svg { width: 20px; height: 20px; }

/* ── Cards ──────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card.tight { padding: 6px 16px; }
.card.dark { background: var(--dark); border-color: var(--dark); color: var(--on-dark); }
.card.dark .muted, .card.dark .eyebrow { color: var(--on-dark-muted); }
.card.link { display: block; text-decoration: none; color: inherit; }
.card.dark.link { color: var(--on-dark); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.big { font: 800 40px/1 var(--f-display); text-transform: uppercase; }
.accent { color: var(--accent-on-dark); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stats > div { background: var(--surface); padding: 12px; }
.stats b { display: block; font: 600 26px/1 var(--f-mono); }
.stats span { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ── Rows and checks ────────────────────────────────────── */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.rows > .row:last-child { border-bottom: 0; }
.row .body { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
.row .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.row.done .title { color: var(--muted); text-decoration: line-through; }
.check { width: 26px; height: 26px; flex: none; margin: -2px 0; padding: 0; border-radius: 50%; border: 1.5px solid var(--ring); background: transparent; display: grid; place-items: center; color: var(--surface); }
.check[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.check.waiting { border-style: dashed; }
.tile { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px 9px 9px; color: inherit; }
.tiles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.glyph { position: relative; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font: 800 16px var(--f-display); overflow: hidden; background: var(--amber-soft); color: var(--amber); }
.glyph.wine { background: var(--wine-soft); color: var(--wine); }
.glyph.golf { background: var(--ok-soft); color: var(--ok); }
.glyph img { width: 100%; height: 100%; object-fit: cover; }
.rare-dot { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--star); box-shadow: 0 0 0 2px var(--surface); }

/* ── Chips and pills ────────────────────────────────────── */
.chip { flex: none; align-self: flex-start; font-size: 12px; font-weight: 700; background: var(--sunk); color: var(--ink); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.chip.wine { background: var(--wine-soft); color: var(--wine); }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: var(--sunk); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.wine { background: var(--wine-soft); color: var(--wine); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.overdue { color: var(--wine); font-weight: 700; }

/* ── Controls ───────────────────────────────────────────── */
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 9px 0; border-radius: 9px; font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(40,30,20,.08); }
.fab { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.fab svg { width: 20px; height: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 14px; border-radius: 12px; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.danger { color: var(--wine); border-color: var(--wine); }
.btn.small { min-height: 36px; padding: 0 12px; }
.btn.pillshape { border-radius: 999px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.search input { border: 0; background: transparent; padding: 11px 0; width: 100%; outline: none; font-size: 16px; }
.addline { display: flex; align-items: center; gap: 12px; padding: 10px 0 4px; color: var(--muted); }
.addline span { width: 26px; text-align: center; font-size: 20px; line-height: 1; flex: none; }
.addline input { border: 0; background: transparent; width: 100%; outline: none; font-size: 16px; padding: 4px 0; color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; }
.empty .h2 { color: var(--ink); margin-bottom: 4px; }
.scroller { list-style: none; margin: 0 -16px; padding: 0 16px 4px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > li { flex: none; width: 150px; }
.listchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.listchips::-webkit-scrollbar { display: none; }
.listchips button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; }
.listchips button svg { width: 14px; height: 14px; }
.listchips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.menu { padding: 0; overflow: hidden; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--hair); text-align: left; font-size: 15px; }
.menu > :last-child { border-bottom: 0; }
.menu .ico { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--sunk); display: grid; place-items: center; }
.menu .ico svg { width: 20px; height: 20px; }
.menu .grow { flex: 1; min-width: 0; }
.menu .chev { color: var(--muted); width: 18px; height: 18px; }

/* ── Tab bar ────────────────────────────────────────────── */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(var(--safe-bottom) + 6px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
@media (min-width: 900px) { .tabbar { left: 50%; right: auto; width: 640px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; } }

/* ── Sheets ─────────────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 8px) 12px 8px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sheet-top h2 { flex: 1; margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; }
.iconbtn svg { width: 22px; height: 22px; }
.sheet-body { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(var(--safe-bottom) + 40px); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields > .full, .fields > h3, .fields > .note { grid-column: 1 / -1; }
.fields > h3 { margin: 10px 0 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.input { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--ink); font-size: 16px; }
textarea.input { min-height: 88px; resize: vertical; }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 44px; }
.checkline input { width: 20px; height: 20px; accent-color: var(--ink); }
.note { font-size: 13px; color: var(--muted); background: var(--sunk); border-radius: 12px; padding: 10px 12px; }
.sheet-delete { margin-top: 28px; text-align: center; }
.photo-row { display: flex; align-items: center; gap: 12px; }

/* ── Sign-in and status screens ─────────────────────────── */
.gate { min-height: 100vh; min-height: 100dvh; background: var(--dark); color: var(--on-dark); display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--safe-top) + 96px) 24px calc(var(--safe-bottom) + 48px); }
.gate h1 { margin: 0; font: 800 76px/0.88 var(--f-display); text-transform: uppercase; }
.gate p { color: var(--on-dark-muted); font-size: 16px; max-width: 30ch; }
.gate .google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; width: 100%; max-width: 420px; margin: 0 auto; background: var(--on-dark); color: #1C1916; border: 0; border-radius: 14px; font-weight: 600; font-size: 16px; }
.gate .google svg { width: 20px; height: 20px; }
.gate .secondary { background: transparent; color: var(--on-dark); border: 1px solid var(--on-dark-muted); margin-top: 12px; }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 84px); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; }
.toast { display: flex; align-items: center; gap: 12px; }
.toast:has(.toast-act) { border-radius: 16px; width: max-content; }
.toast-act { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; padding: 4px 0; min-height: 32px; }
.busy { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--bg) 85%, transparent); }
.busy > div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; text-align: center; max-width: 320px; }

/* ── Bottle page (matches Cellar Book) ──────────────────── */
.sheet-top.dark { background: var(--dark); color: var(--on-dark); border-bottom-color: var(--dark); }
.sheet-top.dark .iconbtn { color: inherit; }
.bottle-page .sheet-body { padding-top: 0; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 0 14px; }
.hero-glyph { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 800 40px var(--f-display); background: var(--amber-soft); color: var(--amber); }
.hero-glyph.wine { background: var(--wine-soft); color: var(--wine); }
.hero-glyph img { width: 100%; height: 100%; object-fit: cover; }
.hero-name { margin: 10px 0 0; font: 800 34px/1 var(--f-display); text-transform: uppercase; text-wrap: balance; max-width: 20ch; }
.hero-cat { font-weight: 700; font-size: 16px; color: var(--amber); }
.hero-cat.wine { color: var(--wine); }
.hero-rating { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.hero-rating .mono { font-weight: 600; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 20px; height: 20px; }
.entry .stars svg { width: 14px; height: 14px; }
.hero-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-bottom: 16px; }
.bsec { border-top: 1px solid var(--line); padding: 20px 0; }
.bsec h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 10px; font: 800 22px/1.1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.bsec h3 small { font: 500 13px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.profile-head { font-size: 17px; margin: -4px 0 6px; }
.curve { width: 100%; height: auto; display: block; }
.tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--sunk); padding: 4px 10px; border-radius: 8px; font-size: 13px; }
.dl { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.dl div { display: flex; align-items: baseline; gap: 8px; }
.dl dt { flex: none; }
.dl .lead { flex: 1; min-width: 16px; border-bottom: 1px dotted var(--muted); opacity: .5; transform: translateY(-4px); }
.dl dd { margin: 0; text-align: right; color: var(--muted); max-width: 60%; overflow-wrap: anywhere; }
.prose { margin: 0; white-space: pre-wrap; max-width: 65ch; }
.log { display: flex; flex-direction: column; gap: 8px; }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.entry .eh { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.entry p { margin: 6px 0 0; white-space: pre-wrap; }
.logform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.logform textarea, .logform .btn { grid-column: 1 / -1; }
.slider { display: grid; grid-template-columns: 100px 1fr 28px; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.slider input { width: 100%; accent-color: var(--amber); }
.slider output { text-align: right; }

/* ── Watches (Watch Scout) ──────────────────────────────── */
.wcard-owned { width: 100%; height: 100%; text-align: left; padding: 12px; color: inherit; }
.wthumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 8px; display: block; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.wcard { display: grid; gap: 10px; padding: 16px; min-width: 0; }
.wcard.shortlist { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); box-shadow: inset 0 3px 0 var(--amber); }
.wcard.pass { opacity: .75; }
.wphoto { margin: -16px -16px 0; border: 0; padding: 0; background: var(--sunk); border-radius: 18px 18px 0 0; overflow: hidden; aspect-ratio: 4 / 3; position: relative; display: block; width: calc(100% + 32px); }
.wphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wphoto .count { position: absolute; left: 8px; bottom: 8px; font: 11px var(--f-mono); padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; }
.whead { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.wtitle { display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 0; color: inherit; min-width: 0; }
.wname { font: 800 24px/1.02 var(--f-display); text-transform: uppercase; text-wrap: balance; }
.wprice { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wprice .mono { font-size: 18px; font-weight: 600; }
.wspecs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.wspecs > div { background: var(--surface); padding: 6px 8px; display: grid; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.label-sm { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wfit { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.wfit .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.wfit.ok .dot { background: var(--ok); }
.wfit.big .dot { background: var(--warn); }
.wrate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg5 { display: grid; grid-template-columns: repeat(5, 44px); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg5 button { border: 0; background: var(--surface); min-height: 40px; font: 600 14px var(--f-mono); color: var(--ink); }
.seg5 button + button { border-left: 1px solid var(--line); }
.seg5 button[aria-pressed="true"][data-score="1"], .seg5 button[aria-pressed="true"][data-score="2"] { background: var(--ink); color: var(--bg); }
.seg5 button[aria-pressed="true"][data-score="3"] { background: var(--wine); color: #fff; }
.seg5 button[aria-pressed="true"][data-score="4"], .seg5 button[aria-pressed="true"][data-score="5"] { background: var(--amber); color: #fff; }
.wnote { min-height: 40px; font-size: 14px; }
.wlinks { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.wlinks a, .wlinks .linkbtn { color: var(--amber); text-decoration: none; font-weight: 600; font-size: 13px; }
.tastehead { display: flex; justify-content: space-between; align-items: baseline; width: 100%; background: none; border: 0; padding: 0; color: inherit; text-align: left; }
.chip.like { background: var(--ok-soft); color: var(--ok); }
.chip.dislike { background: var(--warn-soft); color: var(--warn); }
.chip button { border: 0; background: none; padding: 0 0 0 4px; color: inherit; font-size: 14px; }
.tagrow .chip { white-space: normal; font-weight: 500; }
.addtaste { display: flex; gap: 8px; margin-top: 8px; }
.wthumb-edit { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; }
.wthumb-edit img { width: 100%; height: 100%; object-fit: cover; }
.wthumb-edit button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; line-height: 1; padding: 0; }
.photo-row { flex-wrap: wrap; }
.tagrow .chip { flex: 0 1 auto; max-width: 100%; }
.wcard-owned { overflow-wrap: anywhere; }
.giftbox { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.giftrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--hair); }
.giftrow:first-child { border-top: 0; }
.giftimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.giftrow.claimed .btn.primary { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ── Grocery lists ──────────────────────────────────────── */
.glist .storechips { margin-top: 10px; }
.glist .storechips button { min-height: 36px; font-size: 13px; padding: 0 12px; }
.addline .photobtn { flex: none; width: 40px; height: 40px; color: var(--muted); cursor: pointer; }
.addline .photobtn svg { width: 22px; height: 22px; }
.addline span.small { width: auto; font-size: 14px; }
.usuals { padding: 4px 0 8px; }
.chip.addchip { border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; padding: 6px 10px; min-height: 32px; }
.aisle { padding-top: 10px; }
.aisle + .aisle { border-top: 1px solid var(--hair); }
.aisle .eyebrow { margin: 0; font-size: 11px; }
.aisle .rows .row:last-child { border-bottom: 0; }
.row .qty { font-size: 13px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.glist.shopping .row { padding: 15px 0; }
.glist.shopping .row .title { font-size: 19px; }
.glist.shopping .check { width: 32px; height: 32px; }
.wphoto.hunting { display: grid; place-items: center; }
.wphoto img.web { object-fit: contain; background: #fff; }

/* ── Schedule ───────────────────────────────────────────── */
.dayblock { padding-top: 12px; }
.dayhead { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dayhead.today { color: var(--accent, var(--wine)); }
.evrow { align-items: baseline; }
.evrow .evtime { flex: none; width: 62px; font-size: 13px; color: var(--muted); }
.evrow a.body { color: inherit; text-decoration: none; }
.whopick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.whopick legend { padding: 0; margin-bottom: 6px; }
.chipcheck { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; }
.chipcheck:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chipcheck input { margin: 0; }

/* Schedule: week strip */
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.weekcard { padding-top: 8px; padding-bottom: 12px; }
.weeknav { display: flex; align-items: center; justify-content: space-between; }
.weeknav .iconbtn { font-size: 26px; line-height: 1; width: 40px; height: 40px; }
.weektitle { font-weight: 700; }
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.wday { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; min-height: 64px; }
.wday .wd { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wday .wn { font-size: 18px; font-weight: 700; }
.wday .wdots { display: flex; gap: 3px; min-height: 6px; }
.wday .wdots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.wday.past .wn { color: var(--muted); }
.wday.today .wn { color: var(--wine); }
.wday.sel { background: var(--ink); color: var(--bg); }
.wday.sel .wd, .wday.sel.today .wn, .wday.sel.past .wn { color: inherit; }
.wday.sel .wdots i { box-shadow: 0 0 0 1.5px var(--ink); }
.routines { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); display: grid; gap: 4px; font-size: 14px; }
.evrow { position: relative; padding-left: 12px; }
.evrow .evbar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 2px; }
.evrow .evtime { width: 92px; white-space: nowrap; font-size: 12.5px; }
.rows.faint .row { opacity: .55; }
.rows.faint .row .title { font-weight: 500; }
.sub.ride { color: var(--ink); }
.sub.ride.open { color: var(--wine); font-weight: 600; }
.scopepick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scopepick legend { padding: 0; margin-bottom: 6px; }
.repeatbox { display: grid; gap: 10px; }
.repeatbox[hidden], .daypick[hidden], .untilf[hidden], .field[hidden] { display: none; }
.daypick .chipcheck { padding: 0 10px; }
/* Planner inbox */
.inboxcard { border-color: var(--wine); }
.inboxitem { padding: 10px 0; border-top: 1px solid var(--hair); display: grid; gap: 6px; }
.inboxitem:first-of-type { border-top: 0; }
.evlist { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.inboxbtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Trips: lodging */
.stay { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.stay .nights { text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 6px 0; height: max-content; }
.stay .nights b { display: block; font: 800 22px/1 var(--f-display); }
.stay .nights span { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.staytitle { display: block; border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 700; font-size: 17px; text-align: left; cursor: pointer; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 2px 10px; font-size: 14px; margin: 6px 0 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.staylinks { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.staylinks a { font-size: 13px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
button.marker { border: 0; background: none; padding: 0; text-align: left; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wine); cursor: pointer; }
.travelers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tchip { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--on-dark); }
.tile .pdot { width: 7px; height: 7px; margin-right: 4px; vertical-align: 0; }

/* Trip travel legs */
.leg { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.legicon { text-align: center; border: 1px solid var(--line); border-radius: 12px; height: 46px; display: grid; place-items: center; font-size: 22px; }
.legwho { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pchip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.pchip .pdot { width: 8px; height: 8px; margin-right: 5px; vertical-align: 0; }
button.marker.legmark { color: var(--amber); }
.markwho { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.field[hidden] { display: none; }

/* Trips list: one dark card per trip, tap to open */
a.tripcard { display: block; position: relative; text-decoration: none; padding-right: 48px; }
.tripgo { position: absolute; right: 18px; bottom: 22px; width: 22px; height: 22px; color: var(--on-dark-muted); }
.tripgo svg { width: 100%; height: 100%; }
a.tile { text-decoration: none; }
.backlink { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
.backlink svg { width: 20px; height: 20px; transform: rotate(180deg); }

/* Itinerary: day heading, then time | plan rows */
.iday { padding: 12px 0 6px; border-bottom: 1px solid var(--hair); }
.idate { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.idate b { color: var(--ink); }
.irow { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 6px 0; align-items: start; }
.irow .itime { line-height: 22px; }
.irow .marker { line-height: 22px; }
.itime { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ibody { min-width: 0; }

/* iOS date/time inputs ignore width and spill out of their column. */
input.input[type="date"], input.input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-height: 44px; text-align: left; }
input.input[type="date"]::-webkit-date-and-time-value, input.input[type="time"]::-webkit-date-and-time-value { text-align: left; }
textarea.input.grow1 { min-height: 0; resize: none; overflow: hidden; line-height: 1.35; }
.maplink { display: inline-block; margin-top: 4px; font-weight: 600; }

/* Golf */
.gGoals { display: grid; gap: 18px; }
.gbig { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.gbig .mono { font-size: 34px; font-weight: 600; color: var(--accent-on-dark); }
.gtrack { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); margin: 12px 0 10px; }
.gfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent-on-dark); }
.gmark { position: absolute; top: -3px; transform: translateX(-50%); }
.gmark i { display: block; width: 2px; height: 12px; background: var(--on-dark); margin: 0 auto; }
.gmark em { display: block; white-space: nowrap; transform: translateX(-40%); font-style: normal; font-size: 11px; color: var(--on-dark-muted); margin-top: 2px; font-family: var(--f-mono, ui-monospace, monospace); }
.gtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gtile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gtl { min-height: 2.6em; line-height: 1.3; }
.gval { display: flex; align-items: baseline; gap: 4px; }
.gval .mono { font-size: 24px; font-weight: 600; }
.gdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--line); vertical-align: 0; }
.gtile.met .gdot { background: var(--ok); }
.gtile.miss .gdot { background: var(--amber); }
.gtile.met { color: inherit; }
.gspark { width: 100%; height: 24px; margin-top: 4px; color: var(--muted); }
.gtile.met .gspark { color: var(--ok); }
.gtile.miss .gspark { color: var(--amber); }
.gaps { list-style: none; margin: 8px 0 0; padding: 0; }
.gaps li { display: grid; grid-template-columns: 78px 1fr 34px 58px; gap: 8px; align-items: center; padding: 6px 0; }
.gclub { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbar { position: relative; height: 14px; border-radius: 7px; background: var(--hair); }
.gband { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: color-mix(in srgb, var(--ok) 35%, transparent); }
.gdotc { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--ink); }
.gdotc.on { background: var(--ok); } .gdotc.short, .gdotc.long { background: var(--amber); }
.gnum { text-align: right; font-weight: 600; }
.gtgt { text-align: right; }
.gstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.gstats div { display: flex; flex-direction: column; }
.gstats b { font-size: 20px; }
.gstats span { font-size: 11px; color: var(--muted); }
.gstack .gspark { height: 44px; }

/* Wide screens (iPhone Duo unfolded, iPad, landscape): two columns. */
.cols, .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tripcards { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 600px) {
  .screen { max-width: 1100px; padding-left: 20px; padding-right: 20px; }
  .cols:not(.lg) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .tripcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .tripcards .card { margin: 0; }
  .gtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabbar { padding-left: max(6px, calc((100% - 700px) / 2)); padding-right: max(6px, calc((100% - 700px) / 2)); }
  .sheet-body { max-width: 720px; }
}
@media (min-width: 900px) { .tabbar { padding-left: 6px; padding-right: 6px; } }
@media (min-width: 820px) { .cols.lg { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; } }



/* Trip cards: a color per trip with a faint one-line drawing along the bottom. */
.tripscene { position: relative; overflow: hidden; isolation: isolate; border-color: transparent; }
.tripscene > :not(.tripart) { position: relative; z-index: 1; }
.tripscene .tripart { position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; width: 100%; height: auto; max-height: 75%; opacity: .44; pointer-events: none; }
.tripscene .tripart * { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tripscene .tripgo { position: absolute; z-index: 1; }
.tripscene .tchip { background: rgba(255,255,255,.13); }
.tripscene .muted, .tripscene .eyebrow { color: rgba(246,243,236,.75); }
