:root {
  color-scheme: light dark;
  --bg: #f4efe3;
  --surface: #fdfbf6;
  --surface-2: #ece5d4;
  --ink: #16140f;
  --ink-2: #534c3f;
  --ink-3: #877e6c;
  --line: #e0d8c5;
  --accent: #d9a21b;
  --accent-ink: #16140f;
  --accent-text: #8a5f00;
  --ok: #2b7a4b;
  --ok-bg: #e3f0e6;
  --pick: #b0501a;
  --pick-bg: #f8e4d6;
  --none: #877e6c;
  --none-bg: #ece5d4;
  --danger: #b3261e;
  --danger-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40,30,10,.07), 0 2px 8px rgba(40,30,10,.05);
}
/* BevGrade colors: black, beige and gold. Follows the phone unless the person picks Light or Dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --bg: #0d0c0a;
  --surface: #191714;
  --surface-2: #24211c;
  --ink: #efe6cf;
  --ink-2: #bdb39b;
  --ink-3: #847b68;
  --line: #2e2a23;
  --accent: #e8b02a;
  --accent-ink: #14110a;
  --accent-text: #e8b02a;
  --ok: #6cc28b;
  --ok-bg: #15251a;
  --pick: #f0965a;
  --pick-bg: #2d1e13;
  --none: #847b68;
  --none-bg: #23201b;
  --danger: #f0857a;
  --danger-ink: #1a0b0a;
  --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0c0a;
  --surface: #191714;
  --surface-2: #24211c;
  --ink: #efe6cf;
  --ink-2: #bdb39b;
  --ink-3: #847b68;
  --line: #2e2a23;
  --accent: #e8b02a;
  --accent-ink: #14110a;
  --accent-text: #e8b02a;
  --ok: #6cc28b;
  --ok-bg: #15251a;
  --pick: #f0965a;
  --pick-bg: #2d1e13;
  --none: #847b68;
  --none-bg: #23201b;
  --danger: #f0857a;
  --danger-ink: #1a0b0a;
  --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, textarea, select { font: inherit; color: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.bar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.where { font-size: 12px; color: var(--ink-2); background: var(--surface-2);
  padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.where:empty { display: none; }
[hidden] { display: none !important; }
.icon-btn { border: 0; background: none; padding: 6px; margin-left: -6px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }

main { max-width: 640px; margin: 0 auto; padding: 14px 16px 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2);
  margin: 0 0 10px; font-weight: 650; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-3); }

.search { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-size: 17px; outline: none; }
.search:focus { border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 12px 14px; font-weight: 600; cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.acct { display: flex; gap: 12px; align-items: center; padding: 12px 2px; cursor: pointer; width: 100%;
  background: none; border: 0; text-align: left; }
.acct .nm { font-weight: 600; }
.acct .sub { font-size: 13px; color: var(--ink-2); }
.acct .right { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* the wholesaler summary */
.sum-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sum-head .n { font-size: 13px; color: var(--ink-2); }
.house { padding: 6px 0; }
.house-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none;
  padding: 4px 0; cursor: pointer; text-align: left; }
.house-row .hn { flex: 1; }
.house .chev { color: var(--ink-3); transition: transform .15s; flex: none; }
.house.open .chev { transform: rotate(90deg); }
.house .hn { font-weight: 600; }
.house .ct { font-variant-numeric: tabular-nums; font-weight: 650; }
.house .meter { display: block; margin: 3px 0 0 24px; height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.house .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.house .brands { display: none; list-style: none; margin: 8px 0 4px 24px; padding: 0; }
.house.open .brands { display: block; }
.house .brands li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.house .brands li:first-child { border-top: 0; }
.house .brands .bb { display: block; font-size: 12px; color: var(--ink-3); }
.search-btn { display: inline-flex; gap: 6px; align-items: center; margin: 0; padding: 7px 12px;
  background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.pline { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; }
.csel { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 10px; font-weight: 600; }
.best { border-color: var(--accent); }
.best .big { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 2px 0; }
.mrow { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 0; }
.mb { font-weight: 600; font-size: 15px; }
.flagline { margin-top: 8px; font-size: 13px; color: var(--pick); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; }
.pill.pick { background: var(--pick-bg); color: var(--pick); }
.pill.none { background: var(--none-bg); color: var(--none); }

/* menu lines */
.line { padding: 11px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line .top { display: flex; gap: 10px; align-items: baseline; }
.line .raw { font-weight: 600; flex: 1; }
.badge { font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.pick { background: var(--pick-bg); color: var(--pick); }
.badge.none { background: var(--none-bg); color: var(--none); }
.line .as { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.line .flag { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.choices { display: grid; gap: 6px; margin-top: 8px; }
.choice { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px;
  padding: 9px 11px; cursor: pointer; }
.choice b { display: block; font-size: 14px; }
.choice span { font-size: 12px; color: var(--ink-2); }
.choice.nope { background: none; color: var(--ink-2); font-size: 13px; }

.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photos img { height: 88px; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.viewer { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 20; display: grid; place-items: center; }
.viewer img { max-width: 100vw; max-height: 100vh; }

textarea { width: 100%; min-height: 130px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 12px; font-size: 16px; resize: vertical; }

.hist { display: flex; align-items: center; gap: 12px; padding: 11px 2px; cursor: pointer; width: 100%;
  background: none; border: 0; text-align: left; }
.hist .d { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 96px; white-space: nowrap; }
.hist .k { white-space: nowrap; }
.hist .k { font-size: 12px; padding: 2px 7px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); }
.hist .k.visit { background: var(--ok-bg); color: var(--ok); }
.hist .x { margin-left: auto; font-size: 12px; color: var(--ink-3); text-align: right; }

.county-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.county-pick .btn { min-height: 40px; padding: 8px 12px; }
.notice { background: var(--pick-bg); color: var(--pick); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.empty { text-align: center; color: var(--ink-3); padding: 18px 0; font-size: 14px; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 30;
  max-width: calc(100vw - 32px); }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.linkish { border: 0; background: none; color: var(--ink-2); font-size: 14px; text-decoration: underline;
  text-underline-offset: 3px; padding: 6px; cursor: pointer; }

.notes-btn { margin-right: 2px; color: var(--accent-text); }
.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; background: var(--bg); border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow: auto; box-shadow: 0 -4px 24px rgba(0,0,0,.2); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 17px; }
.sheet textarea { min-height: 96px; }
.note-reply { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.note-reply p { margin: 8px 0; font-size: 15px; }
.toast-act { margin-left: 8px; border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 6px 10px; font-weight: 650; cursor: pointer; }

.cat { margin-top: 6px; }
.cat + .cat { margin-top: 14px; }
.cat-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 2px; }
.badge.guess { background: var(--pick-bg); color: var(--pick); }
.flag.guess-note { color: var(--pick); }

.sq { display: block; padding: 8px 0; }
.sq > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.sq .search { padding: 11px 12px; font-size: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
a.btn { text-decoration: none; color: inherit; text-align: center; }

.follow { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--accent); }
.follow > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }

details.fold { padding: 0; }
details.fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold .fl { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
details.fold .fm { margin-left: auto; font-size: 13px; color: var(--ink-3); }
details.fold > summary .chev { color: var(--ink-3); transition: transform .15s; flex: none; }
details.fold[open] > summary .chev { transform: rotate(90deg); }
details.fold .fold-body { padding: 0 14px 14px; }
.list.compact .mrow { padding: 7px 0; }
.list.compact .mb { font-size: 15px; }

.welcome { text-align: center; padding: 26px 0 18px; }
.welcome img { border-radius: 50%; }
.welcome h2 { margin: 10px 0 4px; font-size: 22px; }
.who { margin-top: 18px; }
.person, .feed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0;
  text-decoration: none; color: inherit; }
.person.off { opacity: .55; }
.person .chev { color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; text-align: center; }
.stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 4px; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 11px; color: var(--ink-2); }
.addp { display: grid; gap: 10px; margin: 10px 0 14px; padding: 12px; background: var(--surface-2); border-radius: 12px; }
.codecard { margin: 10px 0 14px; padding: 14px; border: 2px solid var(--accent); border-radius: 12px; text-align: center; display: grid; gap: 8px; }
.codecard .code { font-size: 26px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }

.k { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 7px;
  background: var(--surface-2); color: var(--ink-2); vertical-align: middle; margin-left: 4px; }

/* landing: two halves */
.hello { font-size: 22px; font-weight: 700; margin: 4px 2px 12px; }
.halves { display: grid; gap: 12px; }
.half { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: calc((100vh - 260px) / 2); border-radius: 20px; text-decoration: none; padding: 20px;
  box-shadow: var(--shadow); border: 1px solid var(--line); }
.half b { font-size: 22px; letter-spacing: .06em; }
.half span { font-size: 14px; opacity: .85; }
.half.survey { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.half.uploads { background: var(--surface); color: var(--ink); }
.half:active { transform: scale(.99); }
/* activity uploads */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { position: relative; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in; }
.tile .noimg { aspect-ratio: 1; display: grid; place-items: center; font-size: 12px; color: var(--ink-3); }
.tile .count { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.tile .cap { padding: 7px 9px 9px; display: grid; gap: 1px; }
.tile .cap b { font-size: 13px; line-height: 1.25; }
.tile .cap span { font-size: 11px; color: var(--ink-2); }
.tile .cap .note { color: var(--ink-3); font-style: italic; }
.tile .del { font-size: 12px; padding: 3px 0; justify-self: start; color: var(--danger); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.th { position: relative; }
.th img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.th button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); font-size: 11px; cursor: pointer; }
.chosen { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ok-bg); border-radius: 12px; }
.chosen .nm { font-weight: 650; }
.chosen .sub { font-size: 13px; color: var(--ink-2); }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filters label { display: grid; gap: 4px; }
.filters .csel { width: 100%; }
.exports { display: flex; gap: 8px; }
.exports .btn { min-height: 38px; padding: 7px 12px; font-size: 14px; }
/* desktop: admin screens get room to breathe */
@media (min-width: 900px) {
  body.wide main { max-width: 1180px; }
  body.wide .tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  body.wide .filters { grid-template-columns: repeat(4, 1fr); }
  .halves { grid-template-columns: 1fr 1fr; }
  .half { min-height: 340px; }
}

.subcount { display: grid; justify-items: center; min-width: 54px; padding: 6px 8px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); line-height: 1.1; flex: none; }
.subcount b { font-size: 20px; font-variant-numeric: tabular-nums; }
.subcount span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }

/* delete: press-and-hold, the action sheet, and "are you sure?" */
.holdable { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.holdable img { -webkit-user-drag: none; }
.btn.danger { background: var(--danger); color: var(--danger-ink); border-color: var(--danger); font-weight: 650; }
.linkish.danger { color: var(--danger); }
.endlink { text-align: center; margin: 18px 0 6px; }
.hint { text-align: center; padding-top: 8px; color: var(--ink-3); }
.sheet.actions { display: grid; gap: 8px; }
.sheet-wrap.center { align-items: center; padding: 20px; background: rgba(0,0,0,.5); }
.dialog { width: 100%; max-width: 360px; background: var(--surface); color: var(--ink); border-radius: 16px; padding: 18px 16px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dialog b { font-size: 17px; }
.dialog p { margin: 8px 0 16px; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.notice.reading { display: flex; gap: 12px; align-items: flex-start; }
.notice.reading .spinner { flex: none; margin-top: 2px; }
.notice .btn { min-height: 38px; padding: 7px 14px; }

/* menu results: everything together, then a drop-down per category */
.catdrops { margin-top: 12px; border-top: 1px solid var(--line); }
.catdrop { border-bottom: 1px solid var(--line); }
.catdrop:last-child { border-bottom: 0; }
.catdrop > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 2px; cursor: pointer;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.catdrop > summary::-webkit-details-marker { display: none; }
.catdrop > summary .fm { margin-left: auto; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-3); font-size: 12px; }
.catdrop > summary .chev { color: var(--ink-3); transition: transform .15s; }
.catdrop[open] > summary .chev { transform: rotate(90deg); }
.catdrop[open] { padding-bottom: 8px; }
.sub-h { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 2px 0 6px; }
.topick { color: var(--pick); font-weight: 650; }
/* settle a line yourself: direct search, or select the wholesaler */
.more { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 6px; margin-top: 8px; }
.more .btn { min-height: 44px; padding: 6px 6px; font-size: 13px; line-height: 1.2; }
.line.skipped .raw { color: var(--ink-3); text-decoration: line-through; }
.redo { margin-top: 8px; }
.redo .choices { margin-top: 6px; }
.sheet.houses { max-height: 82vh; display: flex; flex-direction: column; }
.sheet.houses ul { overflow-y: auto; flex: 1; margin-top: 8px; }
@media (prefers-reduced-motion: reduce) { .catdrop > summary .chev { transition: none; } }

/* the Unknown row in a summary: counted, but visibly not a wholesaler */
.house.unknown .hn { color: var(--ink-2); font-style: italic; }
.house.unknown .meter i { background: var(--ink-3); opacity: .55; }

/* reference photos (back bars and the like) on the account page */
.photos.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos.refs .ref { display: grid; gap: 3px; text-decoration: none; color: var(--ink-2); font-size: 11px; }
.photos.refs img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }

/* the way to the account survey from a menu */
.survey-link { margin-bottom: 12px; flex-direction: column; gap: 1px; padding: 9px 14px; }
.survey-link span { font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* visits: the account page list, and the two tiles inside a visit */
.start-visit { min-height: 54px; font-size: 17px; margin-bottom: 12px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 12px 2px; width: 100%; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vrow .d { font-weight: 650; white-space: nowrap; display: grid; gap: 3px; justify-items: start; }
.vrow .d .k { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 7px; background: var(--surface-2); color: var(--ink-2); }
.vrow .chev { color: var(--ink-3); flex: none; }
.chipz { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.chipz i { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-3); white-space: nowrap; }
.chipz i.on { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.vopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.vopt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 12px; display: grid; gap: 3px; justify-items: start; align-content: start; cursor: pointer;
  text-decoration: none; color: inherit; min-height: 104px; }
.vopt.off { cursor: default; }
.vopt b { font-size: 17px; }
.vopt span { font-size: 12px; color: var(--ink-3); }
.vopt .st { font-size: 13px; font-weight: 650; color: var(--ok); margin-top: 4px; }
.vopt .st.todo { color: var(--pick); }
.vopt .go { font-size: 12px; color: var(--accent-text); }
.typebox { margin: 0 0 12px; text-align: center; }
.typebox > summary { list-style: none; display: inline-block; cursor: pointer; }
.typebox > summary::-webkit-details-marker { display: none; }
.typebox .card { text-align: left; }

/* Learned (master) */
.lchips { margin: 10px 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.lchips .chip { white-space: nowrap; padding: 7px 12px; font-size: 13px; flex: none; }
.mrow.learned { align-items: flex-start; gap: 10px; }
.lres { font-size: 14px; margin: 1px 0 2px; color: var(--ink); }
.lres .badge { margin-left: 4px; }
.who .row2 { margin: 0; }

.toast-act { white-space: nowrap; margin-top: 4px; }
.toast-act.alt { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .85; }

/* wholesaler scores */
.sc-r { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.sc-hd { border-top: 0; padding: 0 0 6px; font-size: 12px; color: var(--ink-3); }
.sc-n { flex: 1.2; font-size: 15px; min-width: 0; }
.sc-hd .sc-n { font-size: 12px; }
.sc-c { flex: 1; }
.sc-c b { display: block; font-size: 19px; line-height: 1.1; }
.sc-c i { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); margin-top: 4px; }
.sc-c u { display: block; height: 100%; border-radius: 3px; background: var(--accent); max-width: 100%; }
.sc-c.none { color: var(--ink-3); }
.sc-d { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sc-p { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); margin-top: 3px; }
.sc-h { white-space: nowrap; color: var(--ink); }
.sc-h.unk { color: var(--ink-3); }

/* the bottle list, kept apart from by-the-glass */
.card.btb { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.btb .btn { flex: none; }

/* since last visit, and the version bar on the home screen */
.cmp-r { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cmp-n { color: var(--ink-2); white-space: nowrap; }
.cmp-r b { width: 44px; text-align: right; }
.cmp-r b.up { color: var(--ok); } .cmp-r b.down { color: var(--danger); }
.verbar { text-align: center; margin: 26px 0 8px; }
.verbar .newv { display: block; margin-bottom: 8px; }

/* look picker on the home screen */
.looks { display: inline-flex; gap: 2px; margin: 10px 0 6px; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.looks button { border: 0; background: none; padding: 5px 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.looks button.on { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }
/* ===== 3D look (trial) ===== */
:root {
  --hi: rgba(255,255,255,.85); --lo: rgba(90,65,20,.16); --deep: rgba(60,40,10,.22);
  --gold-top: #f0c04a; --gold-bot: #c58f10; --gold-edge: #8f6608;
  --card-top: #fffdf8; --card-bot: #f6f0e2;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --hi: rgba(255,240,210,.07); --lo: rgba(0,0,0,.55); --deep: rgba(0,0,0,.7);
  --gold-top: #f3c34b; --gold-bot: #cf9416; --gold-edge: #7a5606;
  --card-top: #211e1a; --card-bot: #161411; } }
:root[data-theme="dark"] { --hi: rgba(255,240,210,.07); --lo: rgba(0,0,0,.55); --deep: rgba(0,0,0,.7);
  --gold-top: #f3c34b; --gold-bot: #cf9416; --gold-edge: #7a5606; --card-top: #211e1a; --card-bot: #161411; }

/* header floats above the page */
.bar { background: linear-gradient(180deg, var(--card-top), var(--bg)); border-bottom: 0;
  box-shadow: 0 1px 0 var(--line), 0 6px 14px -8px var(--deep); }
.bar h1 { text-shadow: 0 1px 0 var(--hi); }

/* raised cards: lit from above, soft shadow below */
.card, .vopt, .half.uploads, .chip:not(.on) {
  background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi), 0 1px 1px var(--lo), 0 6px 16px -6px var(--deep), 0 14px 28px -18px var(--deep);
}

/* gold pieces look like pressed metal buttons */
.btn.primary, .half.survey, .chip.on, .toast-act, .search-btn {
  background: linear-gradient(180deg, var(--gold-top), var(--gold-bot)) !important;
  border: 1px solid var(--gold-edge) !important; color: #16120a !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.12), 0 3px 0 var(--gold-edge), 0 8px 18px -6px var(--deep);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.btn.primary:active, .half.survey:active, .chip.on:active { transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 var(--gold-edge), 0 3px 8px -4px var(--deep); }
.half.survey svg, .half.uploads svg { filter: drop-shadow(0 1px 0 var(--hi)) drop-shadow(0 2px 2px var(--lo)); }

/* plain buttons get a slight lift too */
.btn:not(.primary):not(.danger) { background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  box-shadow: inset 0 1px 0 var(--hi), 0 2px 0 var(--line), 0 4px 10px -6px var(--deep); }

/* text boxes look carved in */
.search { background: var(--surface-2); box-shadow: inset 0 2px 4px var(--lo), inset 0 1px 1px var(--lo), 0 1px 0 var(--hi); }

/* score and wholesaler bars: a sunken track with a glossy gold bar */
.sc-c i, .house .meter { background: var(--surface-2); box-shadow: inset 0 1px 2px var(--lo); height: 7px; }
.sc-c u, .house .meter i { background: linear-gradient(180deg, var(--gold-top), var(--gold-bot));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px var(--lo); }
.sc-c b { text-shadow: 0 1px 0 var(--hi); }

/* little tags look like raised chips */
.badge, .pill { box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px var(--lo); }

/* switches sit in a groove */
.seg, .looks { box-shadow: inset 0 2px 4px var(--lo), 0 1px 0 var(--hi); }
.seg button.on, .looks button.on { background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  box-shadow: inset 0 1px 0 var(--hi), 0 2px 5px var(--lo); }

/* logo sits on the page with a shadow */
.welcome img { box-shadow: 0 10px 24px -8px var(--deep), 0 2px 4px var(--lo); }
.hello { text-shadow: 0 1px 0 var(--hi); }
