/* Veritas. Colours are per region and mode in themes.css (generated by tools/themes.py). Fonts are bundled (SIL OFL). */

@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; size-adjust: 92%; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; size-adjust: 92%; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; size-adjust: 105%; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; size-adjust: 88%; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; size-adjust: 86%; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --serif: "Newsreader", Georgia, serif;  /* people's own words in italics: notes, quotes, months */
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --nowp: .1667;
}
/* Colours and the font for names and headings (--disp) come from themes.css, per region, light and dark. */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior-y: none; }  /* no stretch or rubber band at the ends: it dragged the top and tab bars off screen (Rob, 7 Oct 2026) */
body { overflow-wrap: anywhere; background: var(--bg); color: var(--tx); font: 15px/1.4 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--acfg); text-decoration: none; }
a:hover { color: var(--ach); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: var(--tx); }
h1, h2, h3, p { margin: 0; }
.serif { font-family: var(--disp); font-weight: 400; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.i { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); font-weight: 500; }
.muted { color: var(--mu); }
.faint { color: var(--fa); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { min-height: 100%; display: flex; }
.side { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.page { flex: 1; padding-bottom: 96px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(70px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--ln); background: var(--bg2); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); z-index: 20; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--mu); }
.tab:hover { color: var(--tx); }
.tab.on { color: var(--acfg); font-weight: 600; }
.tab::before { content: ""; width: 22px; height: 3px; border-radius: 2px; margin-bottom: 2px; }
.tab.on::before { background: var(--ac); }

@media (min-width: 1000px) {
  .tabbar { display: none; }
  .page { padding-bottom: 40px; }
  .side { display: flex; flex-direction: column; gap: 26px; width: 250px; flex: none; padding: 26px 14px; border-right: 1px solid var(--ln);
    background: var(--bg2); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .side .brand { font: 36px/1 var(--disp); padding: 0 12px; }
  .nv { min-height: 44px; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--tx2); width: 100%; }
  .nv:hover { background: var(--sf); color: var(--tx); }
  .nv.on { background: var(--sf2); color: var(--acfg); }
  .nv .n { margin-left: auto; font-size: 13px; color: var(--mu); }
}

/* ---------- common bits ---------- */
.topbar { height: 56px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.back { min-height: 44px; display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; color: var(--acfg); font-size: 16px; }
.btn { min-height: 52px; border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 16px; padding: 0 20px; }
.btn.pri { background: var(--ac); color: var(--acink); }
.btn.pri:hover { background: var(--acbh); color: var(--acink); }
.btn.sec { border: 1px solid var(--ln3); color: var(--tx); }
.btn.sec:hover { border-color: var(--ac); color: var(--tx); }
.btn.ghost { color: var(--mu); font-weight: 500; min-height: 44px; }
.btn.small { min-height: 44px; font-size: 15px; font-weight: 500; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.chip { min-height: 44px; padding: 0 15px; border-radius: 22px; border: 1px solid var(--ln2); font-size: 14px; color: var(--tx2); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex: none; }
.chip.on { background: var(--ac); color: var(--acink); border-color: var(--ac); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.cd { width: 8px; height: 8px; border-radius: 4px; flex: none; }
.seg { display: grid; gap: 4px; padding: 4px; border-radius: 16px; background: var(--sf); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.segb { min-height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px; font-size: 15px; color: var(--mu); }
.segb.c { justify-content: center; }
.segb.on { background: var(--sf3); color: var(--tx); box-shadow: var(--sh); }
.seg.three .segb { font-size: 14px; padding: 0 10px; }
.pips { display: inline-flex; gap: 3px; flex: none; }
.pip { width: 7px; height: 7px; border-radius: 4px; background: var(--pipoff); }
.pip.on { background: var(--pip); }
.dot { width: 10px; height: 10px; border-radius: 5px; flex: none; outline: 1px solid var(--ring); outline-offset: 1.5px; }  /* the thin ring (Rob, 7 Oct 2026) */
.tag { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 13px; background: var(--sf2); color: var(--tx2); font-size: 13px; font-weight: 500; }
.tag.gold { background: var(--acsbg); color: var(--acstx); }
.badge { min-width: 24px; height: 24px; border-radius: 12px; background: var(--ac); color: var(--acink); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; padding: 0 6px; }
.pill { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--ln2); color: var(--tx); font-size: 14px; }
.pill:hover { color: var(--tx); border-color: var(--ac); }
.ib { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ln2); color: var(--tx); flex: none; }
.ib:hover { border-color: var(--ac); }
.card { border-radius: 16px; background: var(--sf); padding: 16px; }
.empty { padding: 48px 20px; text-align: center; color: var(--mu); }
.wrap { padding: 0 20px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 18px; padding: 4px 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row2 { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
.row2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.inp { height: 48px; border-radius: 12px; border: 1px solid var(--ln2); background: var(--inp); padding: 0 14px; font-size: 16px; width: 100%; }
textarea.inp { height: 96px; padding: 12px 14px; resize: vertical; }
select.inp { appearance: none; }
.inp::placeholder { color: var(--fa); }
.stepper { display: flex; align-items: center; gap: 4px; border: 1px solid var(--ln2); border-radius: 26px; padding: 3px; }
.step { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.step:hover { background: var(--sf2); }
.tog { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 0; border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln); }
.sw { width: 52px; height: 32px; border-radius: 16px; background: var(--ln2); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: var(--mu); transition: left .15s; }
.sw.on { background: var(--ac); }
.sw.on::after { left: 23px; background: var(--acink); }
.raritypick { display: flex; gap: 6px; }
.raritypick button { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--ln2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.raritypick button.on { background: var(--ac); color: var(--acink); border-color: var(--ac); }

/* ---------- cellar list ---------- */
.head { padding: 16px 20px 10px; display: flex; flex-direction: column; gap: 12px; }
.headrow { display: flex; align-items: center; gap: 8px; }
.headrow h1 { flex: 1; font: 40px/1 var(--disp); }
.search { height: 46px; border-radius: 12px; background: var(--sf); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--fa); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 16px; }
.tiercap { font-size: 13px; color: var(--mu); padding-left: 4px; }
.list { position: relative; }
.rsec { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px 20px 8px; }
.rsec .t { font: 23px/1.1 var(--disp); }
.rsec .n { font-size: 13px; color: var(--fa); flex: none; }
.row { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 12px; padding: 12px 20px; color: var(--tx); border-top: 1px solid var(--ln); width: 100%; }
.row:hover { background: var(--hov); color: var(--tx); }
.row.sel { background: var(--sf2); }
.row .dot { margin-top: 8px; }
.mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nm { font: 20px/1.15 var(--disp); }
.sub { font-size: 14px; color: var(--mu); }
.tl { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.bar { position: relative; height: 4px; border-radius: 2px; background: var(--trk); flex: 1; }
.bar .w { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.bar .now { position: absolute; top: -5px; width: 2px; height: 14px; background: var(--now); border-radius: 1px; left: calc(var(--nowp) * 100%); }
.win { width: 84px; flex: none; text-align: right; font-size: 12px; font-weight: 500; }
.rt { width: 52px; flex: none; display: flex; justify-content: flex-end; padding-top: 2px; font: 17px var(--mono); }

@media (min-width: 1000px) {
  .split { display: flex; align-items: flex-start; }
  .split > .listpane { flex: 1 1 0; min-width: 0; min-height: 100vh; max-width: 760px; }  /* a readable column, as on the other pages */
  .split.has-detail > .listpane { max-width: 640px; border-right: 1px solid var(--ln); }
  .split > .detailpane { flex: 1 1 0; min-width: 380px; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
}
.detailpane:empty { display: none; }

/* ---------- bottle ---------- */
.wine { padding: 4px 20px 24px; display: flex; flex-direction: column; gap: 22px; }
.wine h1 { font: 36px/1.04 var(--disp); }
.wine .vin { font: 26px var(--mono); color: var(--acfg); }
.winbox { display: flex; flex-direction: column; gap: 10px; }
.winbar { position: relative; height: 42px; }
.winbar .track { position: absolute; left: 0; right: 0; top: 10px; height: 6px; border-radius: 3px; background: var(--trk); }
.winbar .span { position: absolute; top: 10px; height: 6px; border-radius: 3px; }
.winbar .tick { position: absolute; top: 3px; width: 2px; height: 20px; border-radius: 1px; background: var(--now); }
.winbar .yr { position: absolute; top: 25px; font: 12px var(--mono); color: var(--mu); }
dl.facts { margin: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); row-gap: 12px; column-gap: 12px; }
dl.facts dt { color: var(--mu); }
dl.facts dd { margin: 0; }
.about { font-size: 15px; color: var(--tx2); line-height: 1.5; }
.notes h2 { font: 24px var(--disp); margin-bottom: 4px; }
.note { padding: 14px 0; border-top: 1px solid var(--ln); display: flex; flex-direction: column; gap: 6px; }
.note .q { font: italic 20px/1.3 var(--serif); }
.actions { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ln); background: var(--bg); z-index: 5; }
.page.has-actions { padding-bottom: 0; }
@media (max-width: 999px) { .page.has-actions .actions { bottom: calc(70px + env(safe-area-inset-bottom)); } .page.has-actions { padding-bottom: 70px; } }

/* ---------- sheet (modal) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--sf); border-radius: 24px 24px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 700px) { .scrim { align-items: center; } .sheet { border-radius: 24px; } }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--ln3); margin: 0 auto; }
.sheet h2 { font: 32px/1.05 var(--disp); }
.verdicts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.vb { min-height: 76px; border-radius: 14px; border: 1px solid var(--ln2); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 10px 12px; color: var(--tx2); }
.vb b { font-size: 15px; }
.vb span { font-size: 13px; }
.vb.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }

/* ---------- journal ---------- */
.month { font: italic 20px/1.2 var(--serif); color: var(--mu); padding: 14px 20px 4px; }
.ent { display: flex; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--ln); }
.ent .d { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 3px; color: var(--mu); font-family: var(--mono); }
.ent .d small { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ent .d b { font-size: 20px; color: var(--tx); line-height: 1.1; font-weight: 400; }
.ent .q { font: italic 19px/1.3 var(--serif); color: var(--tx2); }
.ent .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.linkbtn { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 10px; border-radius: 16px; color: var(--acfg); font-size: 13px; font-weight: 500; border: 1px solid var(--ln2); }

/* ---------- import ---------- */
.drop { border: 2px dashed var(--ln3); border-radius: 18px; padding: 28px 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.drop.over { border-color: var(--ac); background: var(--acsbg); }
.report { border-radius: 16px; background: var(--sf); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.report table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report th, .report td { text-align: left; padding: 8px 10px 4px 0; border-top: 1px solid var(--ln); vertical-align: top; }
.report td:first-child { width: 46%; }
.report tr.cont td { border-top: 0; padding-top: 0; }
.report td:nth-child(2) { white-space: nowrap; }
.report th { color: var(--mu); font-weight: 500; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: var(--tx); color: var(--bg);
  padding: 12px 18px; border-radius: 14px; font-size: 15px; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); display: flex; gap: 12px; align-items: center; }
.toast.err { background: var(--err); color: #fff; }
.toast button { color: inherit; font-weight: 600; text-decoration: underline; min-height: 32px; }
@media (min-width: 1000px) { .toast { bottom: 28px; } }

.sheet .card { background: var(--sf2); }

/* ---------- Veritas (build step 3) ---------- */
.navgroup { display: flex; flex-direction: column; gap: 4px; }
.grow { flex: 1; min-width: 0; }
.chipwrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chipwrap .inp.grow { flex: 1 1 160px; height: 44px; }
.cnum { font-size: 12px; opacity: .7; }
.pill.on { border-color: var(--ac); color: var(--acfg); }
.listtools { display: flex; gap: 8px; padding: 0 20px 10px; }
.listtools .pill { min-height: 36px; padding: 0 12px; font-size: 13px; gap: 6px; }  /* smaller than the cellar chips (Rob, 7 Oct 2026) */
.stickhead { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--ln); }
.chiptools { display: contents; }
@media (min-width: 1000px) {  /* a laptop: cellar chips and small sort and filter share one row (Rob, 7 Oct 2026) */
  .chiptools { display: flex; align-items: center; gap: 8px; padding: 2px 20px 10px; }
  .chiptools > .chips { padding: 0; flex: 1; min-width: 0; }
  .chiptools > .listtools { padding: 0; margin-left: auto; flex: none; }
}
html.locked, html.locked body { overflow: hidden; overscroll-behavior: none; }
.sheet { overscroll-behavior: contain; scrollbar-width: none; }  /* no scroll bars on sheets (Rob, 7 Oct 2026) */
.sheet::-webkit-scrollbar { display: none; }
.psheet .psticky { position: sticky; top: -10px; z-index: 2; background: var(--sf); margin: 0 -20px; padding: 12px 20px 14px; border-bottom: 1px solid var(--ln); }
.also { display: flex; flex-direction: column; gap: 4px; margin: 12px 20px; padding: 14px 16px; border: 1px dashed var(--acsln); border-radius: 14px; text-align: left; width: calc(100% - 40px); }
.also b { font-weight: 500; color: var(--acfg); }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--sf3); color: var(--tx); display: inline-grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.av.me { background: var(--ac); color: var(--acink); }
.av.big { width: 64px; height: 64px; font-size: 26px; }
.av-btn { padding: 0; }
.ib.small { width: 34px; height: 34px; border: 0; color: var(--mu); }
.sdots { display: inline-flex; gap: 3px; flex: none; }
.sdots b { width: 11px; height: 11px; border-radius: 50%; background: var(--pipoff); }
.sdots b.on { background: var(--pip); }
.sdots b.half { background: linear-gradient(90deg, var(--pip) 50%, var(--pipoff) 50%); }
.spick { display: flex; align-items: center; gap: 14px; }
.spick-dots { display: flex; gap: 0; touch-action: pan-y; cursor: pointer; border-radius: 22px; }
.spick-dots .sd { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }  /* the whole 46px is the target; the dot sits inside */
.spick-dots .sd::before { content: ""; width: 36px; height: 36px; border-radius: 50%; background: var(--pipoff); }
.spick-dots .sd.on::before { background: var(--pip); }
.spick-dots .sd.half::before { background: linear-gradient(90deg, var(--pip) 50%, var(--pipoff) 50%); }
.spick-dots:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.spick-n { font-size: 18px; min-width: 28px; }
.hint { font-size: 14px; color: var(--tx2); min-height: 20px; }
.block { display: flex; flex-direction: column; gap: 8px; }
.block h2 { font: 24px var(--disp); }
.blockhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--ln); color: var(--tx); width: 100%; text-align: left; min-height: 48px; }
.lrow .sub { display: block; }
.nm.small { font-size: 18px; display: block; }
.nm.big { font-size: 28px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--ln); }
.cmt p { font-size: 15px; color: var(--tx2); margin-top: 2px; }
.cmt .q { font: italic 18px/1.3 var(--serif); }
.cmtform { display: flex; gap: 8px; align-items: flex-end; }
.cmtform textarea { height: 52px; flex: 1; min-width: 0; padding: 14px; resize: none; }
.cmtform .btn { flex: none; white-space: nowrap; }
.srow { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.menu { display: flex; flex-direction: column; }
.menuitem { min-height: 54px; padding: 0 6px; text-align: left; font-size: 17px; border-top: 1px solid var(--ln2); }
.menuitem:first-child { border-top: 0; }
.menuitem.danger { color: var(--err); }
.sheettop { display: flex; justify-content: space-between; align-items: center; }
.opth { font: 24px var(--disp); color: var(--mu); padding-top: 10px; border-top: 1px solid var(--ln); }
.picker { display: flex; flex-direction: column; gap: 8px; }
.results { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sf); text-align: left; width: 100%; color: var(--tx); }
.pick .dot { margin-top: 8px; }
.pick:hover { background: var(--sf2); }
.pick.add { background: none; border: 1px dashed var(--acsln); color: var(--acfg); align-items: center; }
.pick .plus { font-size: 22px; width: 10px; }
.picked { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: var(--acsbg); border: 1px solid var(--acsln); }
.picked .dot { margin-top: 10px; }
.newwine { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 14px; background: var(--sf); }
.prof { display: flex; gap: 16px; align-items: center; }
.prof h1 { font: 36px/1.05 var(--disp); }
.setcard { display: flex; flex-direction: column; gap: 10px; }
.inrow { display: flex; gap: 8px; align-items: center; }
.inrow .inp { flex: 1; min-width: 0; }
.actions.one { grid-template-columns: 1fr; }
a.ent { color: inherit; }
a.ent:hover { background: var(--hov); color: inherit; }
.ent .sub { display: block; }

.yin { display: none; color: var(--tx2); }
@media (min-width: 1000px) { .row .tl { max-width: 520px; } .row .yin { display: inline; } .row .rt { display: none; } }  /* on a laptop the year follows the name, as on a wine list */
.chipwrap .chip { white-space: normal; max-width: 100%; text-align: left; height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }

/* ---------- step 4, and Rob's notes ---------- */
.moretog { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 52px; padding: 0 2px; border-top: 1px solid var(--ln); border-bottom: 1px solid var(--ln); color: var(--acfg); font-size: 15px; font-weight: 500; }
.moretog .chev { color: var(--mu); }
.inp.big { height: 56px; font-size: 18px; }
.chip.small { min-height: 34px; font-size: 13px; padding: 4px 12px; }
.frow { display: flex; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--ln); }
.frow > a .av { margin-top: 2px; }
.frow .sub b { color: var(--tx); font-weight: 600; }
.fcard { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: var(--sf); color: var(--tx); }
a.fcard:hover { background: var(--sf2); color: var(--tx); }
.fcard .t { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.fcard .q { font: italic 17px/1.3 var(--serif); color: var(--tx2); }
.cmtq { font-size: 15px; color: var(--tx2); }
.have { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--acstx); background: var(--acsbg); border: 1px solid var(--acsln); border-radius: 999px; padding: 3px 10px; }
.have.done { color: var(--keep); background: none; border-color: var(--ln2); }
.gift-from { display: flex; gap: 5px; align-items: center; font-size: 13px; color: var(--acstx); margin-top: 2px; }
.gift-note { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--acsbg); border: 1px solid var(--acsln); }
b.mine { font-weight: 500; color: var(--acfg); }
.ssec { display: flex; flex-direction: column; gap: 8px; }
.yrow { display: flex; flex-direction: column; gap: 6px; padding: 14px 0; border-top: 1px solid var(--ln); color: var(--tx); }
.yrow:hover { color: var(--tx); }
.yrow .yr { font-size: 22px; color: var(--acfg); font-weight: 500; }
.yrow .q { font: italic 16px/1.3 var(--serif); color: var(--tx2); }
.tog + .moretog { border-top: 0; }
.fcard .t .mono, .ent .mono { flex: none; }
@media (min-width: 1000px) { .page > .form, .page > .wine, .page > .head, .page > .stickhead > .head, .page > .topbar, .page > .actions { max-width: 760px; } .page > .form, .page > .wine { margin-right: auto; } }
.block .month, .block .frow { padding-left: 0; padding-right: 0; }
/* the feed stays a readable column on a laptop, on the Friends tab and on profiles */
@media (min-width: 1000px) { .page > .frow, .page > .month, .block > .frow, .block > .month { max-width: 760px; } }

/* ---------- onboarding (build step 6) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.welcome { max-width: 520px; margin: 0 auto; padding: 40px 20px 48px; display: flex; flex-direction: column; gap: 14px; }
.welcome .brand { font: 22px/1 var(--disp); color: var(--mu); }
.welcome h1 { font: 40px/1.05 var(--disp); }
.welcome .lede { color: var(--tx2); margin-bottom: 10px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--sf); text-align: left; color: var(--tx); min-height: 64px; width: 100%; }
.choice:hover { background: var(--sf2); }
.choice .cic { width: 40px; height: 40px; border-radius: 20px; background: var(--acsbg); color: var(--acstx); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.choice .ct { display: block; font-weight: 600; }
.choice .sub { display: block; }
.colrow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--ln); }
.colh { font-family: var(--mono); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.warn { color: var(--soon); }
.lrow .tag { flex: none; max-width: 48%; white-space: normal; text-align: right; }

/* Vinopedia (docs/features/vinopedia.md) */
.pmark { display: inline-flex; align-items: center; gap: 4px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  text-decoration: underline dotted var(--ln3); text-underline-offset: 4px; padding: 0; min-height: 0; text-align: left; }
.pmark .i { color: var(--acfg); flex: none; }
.pmark:hover { text-decoration-color: var(--acfg); }
:is(.pedia, .helppg) .psec { display: block; }
:is(.pedia, .helppg) .psec { padding: 0 20px; border-bottom: 1px solid var(--ln); }
:is(.pedia, .helppg) .psec[open] { padding-bottom: 14px; }
:is(.pedia, .helppg) .psec summary { list-style: none; display: flex; align-items: baseline; gap: 12px; min-height: 60px; padding: 14px 0 10px; cursor: pointer; }
:is(.pedia, .helppg) .psec summary::-webkit-details-marker { display: none; }
:is(.pedia, .helppg) .psec summary h2 { font: 30px/1.1 var(--disp); flex: 1; }
:is(.pedia, .helppg) .psec summary .chev { color: var(--mu); transition: transform .15s; }
:is(.pedia, .helppg) .psec[open] summary .chev { transform: rotate(180deg); }
.prow { display: flex; flex-direction: column; gap: 3px; padding: 11px 0; border-top: 1px solid var(--ln); text-align: left; width: 100%; color: var(--tx); min-height: 48px; }
.prow .nm { font-size: 18px; }
.prow .sub { font-size: 14px; color: var(--mu); line-height: 1.35; }
.prow:hover .nm { color: var(--acfg); }
.pempty { padding: 11px 0; border-top: 1px solid var(--ln); font-size: 15px; }
@media (min-width: 1000px) { :is(.pedia, .helppg) .psec, .pedia > .head, .helppg > .intro { max-width: 760px; } }
.psheet { gap: 18px; transition: transform .15s ease-out; }
.psheet .phead { display: flex; flex-direction: column; gap: 6px; }
.psheet .ptext { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.55; color: var(--tx); }
.psheet .facts { margin: 0; }
.psheet .pcell { border-top: 1px solid var(--ln2); padding-top: 14px; }
.psheet .pcell h2 { font: 22px var(--disp); }
.pver { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--ln); align-items: flex-start; }

/* ---------- wine lists (docs/features/wine-lists.md) ---------- */
.vlist { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.vsec { display: flex; flex-direction: column; }
.vsec h3 { font: 600 13px var(--sans, inherit); text-transform: uppercase; letter-spacing: .06em; color: var(--mu); padding: 6px 0; }
.vline { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--ln); color: var(--tx); width: 100%; text-align: left; font-size: 15px; line-height: 1.35; min-height: 44px; }
.vline .grow { min-width: 0; overflow-wrap: anywhere; }
.vline .mono { flex: none; }
.vline.linked .grow { text-decoration: underline; text-decoration-color: var(--ln3); text-underline-offset: 3px; }
.psheet .search { margin: 4px 0; }
.onlists { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; align-items: flex-start; }
.onlist { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--acfg); min-height: 32px; text-align: left; }
.onlist span { overflow-wrap: anywhere; }
button.fcard, button.ent { width: 100%; text-align: left; }
.lrow.vlink .mono { flex: none; }

/* ---------- the Theme page (Settings › Theme) ---------- */
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.rg { display: grid; justify-items: center; gap: 8px; padding: 4px 0; font-size: 14px; color: var(--tx); min-height: 44px; }
.rg .circ { width: 56px; height: 56px; border-radius: 50%; border: 9px solid; }
.rg.on .circ { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--tx); }
.rg.on span { font-weight: 600; }
.ftiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ft { display: grid; justify-items: center; gap: 2px; padding: 10px 0 8px; border-radius: 14px; background: var(--sf); border: 1.5px solid transparent; color: var(--tx); font-size: 12px; min-height: 44px; }
.ft .aa { font-size: 30px; line-height: 1.15; }
.ft.on { border-color: var(--ac); background: var(--acsbg); }
.tsample { border-radius: 16px; overflow: hidden; border: 1px solid var(--ln); }
.tsample .row:first-child { border-top: 0; }
.setlink { display: flex; align-items: center; gap: 12px; min-height: 56px; color: var(--tx); }
.setlink .grow { display: flex; flex-direction: column; }
.setlink .chev { color: var(--mu); }
.setlink .circ { width: 32px; height: 32px; border-radius: 50%; border: 6px solid; flex: none; }

/* ---------- spreadsheet import (docs/features/onboarding.md -> The import) ---------- */
.imp-title { font-weight: 600; font-size: 16px; white-space: nowrap; }
.imp-top { flex-wrap: wrap; height: auto; min-height: 56px; padding: 8px 12px; }
.imp-file { font-size: 12px; color: var(--mu); background: var(--sf); border: 1px solid var(--ln); border-radius: 6px; padding: 3px 8px; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-sel { font: 500 14px var(--sans, inherit); color: var(--tx); background: var(--inp); border: 1px solid var(--ln2); border-radius: 8px; padding: 4px 6px; max-width: 100%; }
.imp-sel.off { color: var(--fa); }
.imp-q { font-size: 13px; background: var(--sf2); padding: 0 5px; border-radius: 4px; margin-right: 4px; white-space: nowrap; }
.imp-pips { letter-spacing: 0; color: var(--acfg); font-size: 10px; }
.imp-pips i { font-style: normal; color: var(--ln3); }
.imp-st { display: inline-block; border: 0; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; white-space: nowrap; background: var(--sf2); color: var(--fa); }
.imp-st.ok { color: var(--keep); background: color-mix(in srgb, var(--keep) 14%, transparent); }
.imp-st.look { color: var(--soon); background: color-mix(in srgb, var(--soon) 14%, transparent); }
.imp-st.match { color: var(--ready); background: color-mix(in srgb, var(--ready) 14%, transparent); cursor: pointer; }
button.imp-st.out { cursor: pointer; }
.imp-none { padding: 24px 16px; color: var(--mu); font-style: italic; }

/* summary */
.imp-calm { padding: 24px 16px; display: grid; gap: 24px; align-content: start; }
.imp-lead { display: grid; gap: 8px; }
.imp-big { font: 400 38px/1.05 var(--disp); margin: 0; text-wrap: balance; }
.imp-sub { margin: 0; font-size: 16px; color: var(--mu); }
.imp-ask { background: var(--sf); border: 1px solid var(--ln); border-radius: 14px; padding: 18px; display: grid; gap: 12px; margin-top: 12px; }
.imp-ask.done { border-color: var(--keep); }
.imp-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fa); }
.imp-prog i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ln3); margin-right: 3px; }
.imp-prog i.d { background: var(--keep); }
.imp-prog i.c { background: var(--acfg); }
.imp-qq { font-size: 17px; line-height: 1.45; margin: 0; }
.imp-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.imp-preview { display: grid; gap: 10px; align-content: start; }
.imp-bcard { background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: baseline; }
.imp-bcard .dot { grid-row: span 3; align-self: center; width: 12px; height: 12px; }
.imp-pr { font-size: 13px; color: var(--mu); }
.imp-wn { font: 400 21px/1.15 var(--disp); }
.imp-yr { color: var(--mu); }
.imp-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--mu); align-items: center; }
.imp-win { color: var(--keep); background: color-mix(in srgb, var(--keep) 14%, transparent); border-radius: 999px; padding: 0 8px; font-weight: 500; }
.imp-quiet { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--ln); display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 28px; font-size: 14px; color: var(--mu); }
.imp-quiet li { display: grid; gap: 3px; align-content: start; justify-items: start; }
.imp-quiet b { color: var(--tx); font-weight: 600; }
.imp-auto { display: grid; gap: 6px; font-size: 13px; color: var(--mu); }
.imp-auto div::before { content: "✓ "; color: var(--keep); }

/* the column match */
.imp-cols { display: grid; gap: 8px; }
.imp-colpair { display: flex; gap: 12px 40px; flex-wrap: wrap; }
.imp-colgrid { display: grid; grid-template-columns: minmax(0, max-content) 14px minmax(0, max-content); align-items: center; column-gap: 8px; row-gap: 3px; }
.imp-colh { font-size: 12px; color: var(--mu); text-align: right; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-colh.off { text-decoration: line-through; color: var(--fa); }
.imp-colgrid .imp-sel { font-size: 13px; padding: 2px 4px; }
.imp-ar { color: var(--fa); font-size: 12px; text-align: center; }

/* every row */
.imp-sum { display: grid; gap: 20px; padding: 18px 16px; border-bottom: 1px solid var(--ln); }
.imp-sumleft { display: grid; gap: 4px; align-content: center; }
.imp-headline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 16px; }
.imp-big2 { font: 400 34px/1 var(--disp); }
.imp-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 12px 0 8px; max-width: 440px; background: var(--sf2); }
.imp-bar span { display: block; height: 100%; }
.imp-legend { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; color: var(--mu); }
.imp-legend b { color: var(--tx); font-weight: 600; font-variant-numeric: tabular-nums; }
.imp-sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.imp-tools { display: flex; align-items: center; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--ln); flex-wrap: wrap; }
.imp-tab { font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 8px; color: var(--mu); min-height: 32px; }
.imp-tab b { font-variant-numeric: tabular-nums; margin-left: 5px; color: var(--fa); font-weight: 500; }
.imp-tab.on { background: var(--acsbg); color: var(--acstx); }
.imp-search { font-size: 14px; background: var(--inp); color: var(--tx); border: 1px solid var(--ln2); border-radius: 8px; padding: 5px 9px; width: 210px; }
.imp-bulk { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--acsbg); color: var(--acstx); font-size: 13px; border-bottom: 1px solid var(--ln); flex-wrap: wrap; }
.imp-bulk .btn { min-height: 32px; font-size: 13px; padding: 0 12px; }
.imp-table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 13px; }
.imp-table col.c-st { width: 14%; } .imp-table col.c-producer { width: 13%; } .imp-table col.c-wine { width: 16%; }
.imp-table col.c-year { width: 6.5%; } .imp-table col.c-style { width: 8.5%; } .imp-table col.c-btl { width: 7%; }
.imp-table col.c-window { width: 9%; } .imp-table col.c-rarity { width: 8%; } .imp-table col.c-occasion { width: 9%; } .imp-table col.c-spot { width: 9%; }
.imp-table th { position: sticky; top: 0; background: var(--bg); text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--fa); padding: 8px 5px; border-bottom: 1px solid var(--ln2); white-space: nowrap; z-index: 1; overflow: hidden; text-overflow: ellipsis; }
.imp-table td { padding: 0 5px; height: 32px; border-bottom: 1px solid var(--ln); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-table th:first-child, .imp-table td:first-child { padding-left: 12px; }
.imp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.imp-table tr:hover td { background: var(--hov); }
.imp-table tr.out td { color: var(--fa); }
.imp-table tr.out td:not(:first-child) { text-decoration: line-through; }
.imp-table td.ed { cursor: text; }
.imp-table td.ed:hover { box-shadow: inset 0 -1px 0 var(--ln3); }
.imp-table td.changed { box-shadow: inset 0 -2px 0 var(--ac); }
.imp-table td.bad { color: var(--soon); font-weight: 600; }
.imp-table td.read { text-decoration: underline dotted var(--fa); text-underline-offset: 3px; }
.imp-table td:focus-visible { outline: 2px solid var(--acfg); outline-offset: -2px; }
.imp-table .dot { display: inline-block; width: 9px; height: 9px; flex: none; margin-right: 6px; vertical-align: 0; }
.imp-lead2 { display: flex; align-items: center; gap: 8px; }
.imp-lead2 input { margin: 0; flex: none; }
.imp-nocb { display: inline-block; width: 13px; flex: none; }
.imp-panel { background: var(--sf); display: flex; flex-direction: column; gap: 22px; padding: 16px; }
.imp-needs { display: grid; gap: 10px; }
.imp-panel h3 { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fa); margin: 0; }
.imp-fix { border: 1px solid var(--ln); border-radius: 10px; padding: 12px; display: grid; gap: 10px; background: var(--bg); }
.imp-fix .imp-t { font-size: 14px; }
.imp-fix .btn { min-height: 34px; font-size: 13px; padding: 0 12px; }

/* the editor under a cell */
.imp-editor { position: absolute; z-index: 30; background: var(--sf); border: 1px solid var(--ac); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.2); padding: 12px; display: grid; gap: 8px; width: 360px; max-width: calc(100vw - 16px); font-size: 14px; color: var(--tx); }
.imp-elab { font-weight: 600; }
.imp-row2 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.imp-editor .inp, .imp-esheet .inp { height: 40px; font-size: 15px; }
.imp-editor .imp-yr, .imp-esheet .imp-yr { width: 70px; padding: 0 8px; }
.imp-editor .chip { min-height: 36px; }
.imp-err { color: var(--err); font-size: 13px; font-weight: 500; }
.imp-err:empty { display: none; }
.imp-was { color: var(--fa); font-size: 13px; }
.imp-was code { font-size: 12px; background: var(--sf2); padding: 0 4px; border-radius: 3px; }
.imp-pipsel button { font-size: 22px; padding: 0 2px; color: var(--ln3); min-height: 36px; }
.imp-pipsel button.on { color: var(--acfg); }
.imp-eacts { display: flex; gap: 6px; justify-content: flex-end; }
.imp-editor .btn, .imp-eacts .btn { min-height: 36px; font-size: 14px; padding: 0 14px; }
.imp-esheet { display: grid; gap: 10px; }

/* the footer: the status on the left, Add on the right */
.imp-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--ln2); background: var(--sf); flex-wrap: wrap;
  position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 5; }
.imp-hint { font-size: 13px; color: var(--mu); }
.imp-hint.blocked { color: var(--soon); font-weight: 500; }
.imp-go { min-height: 46px; }

/* on a phone: cards */
.imp-phone { display: grid; gap: 10px; padding: 12px 16px; }
.imp-card { text-align: left; background: var(--sf); border: 1px solid var(--ln); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; width: 100%; }
.imp-card.out { opacity: .6; }
.imp-card-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.imp-why { color: var(--soon); font-size: 13px; }

@media (min-width: 1000px) {
  .imp-page { padding-bottom: 0; flex: none; min-height: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
  .imp { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .imp.imp-on > .imp-calm, .imp.imp-on > .imp-full { flex: 1; min-height: 0; overflow-y: auto; }
  .imp-calm { padding: 32px 36px 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 48px; }
  .imp-quiet, .imp-wide { grid-column: 1 / -1; }
  .imp-big { font-size: 46px; }
  .imp-full { display: flex; flex-direction: column; overflow: hidden !important; }
  .imp-sum { grid-template-columns: minmax(0, 1fr) auto; gap: 20px 60px; align-items: center; padding: 20px 24px; }
  .imp-work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: minmax(0, 1fr); }
  .imp-work.solo { grid-template-columns: minmax(0, 1fr); }
  .imp-tablewrap { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
  .imp-scroll { overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
  .imp-panel { border-left: 1px solid var(--ln); overflow-y: auto; min-height: 0; }
  .imp-foot { position: static; padding: 12px 24px; }
}
@media (max-width: 999px) {
  .imp-file { display: none; }
  .imp-top { gap: 4px; }
  .imp-top .btn { min-height: 36px; font-size: 14px; padding: 0 12px; }
  .imp-top .imp-title { flex-basis: calc(100% - 90px); text-align: right; }
}

/* ---------- tasting night ---------- */
:root { --glass: color-mix(in srgb, #2B3328 86%, var(--tx)); }
.nv.host { border: 1px solid var(--acsln); color: var(--acfg); font-weight: 500; }
.nv.host.on { border-color: var(--ac); }
@media (max-width: 399px) { .tn-hostpill span { display: none; } }
.tn-head { display: flex; flex-direction: column; gap: 4px; padding: 6px 20px 8px; }
.tn-head h1 { font: 34px/1.05 var(--disp); text-wrap: balance; }
.tn-pins { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 4px; }
.tn-pin { border-radius: 16px; background: var(--acsbg); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: var(--tx); }
.tn .tn-pin { margin: 4px 16px 8px; }
.tn-pin .eye { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--acstx); font-weight: 600; }
.tn-pin .t { font: 24px/1.15 var(--disp); }
.tn-pin .row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.tn-pin .join { margin-left: auto; background: var(--ac); color: var(--acink); border-radius: 18px; padding: 7px 16px; font-weight: 600; font-size: 14px; }
.tn-pin .btn { align-self: flex-start; min-height: 44px; }
.av.off { background: transparent; color: var(--mu); border: 1.5px dashed var(--ln3); }
.tn-here { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 4px 20px 8px; }
.tn-here small { font-size: 13px; color: var(--mu); margin-left: 4px; }
.tn-here .linkbtn { margin-left: auto; }
.tn-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--ln); color: var(--tx); }
.tn-row .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tn-row.hidden .nm { color: var(--mu); font-style: italic; }
.tn-row .punt-svg { width: 38px; height: 38px; flex: none; }
.tn-row.pour .punt-svg { width: 48px; height: 48px; }
.tn-avg { font-size: 18px; }
.punt-svg { display: block; }
.punt-svg svg { display: block; width: 100%; height: 100%; }
.punt-n { font: 600 19px var(--sans, system-ui), sans-serif; fill: #F4ECDB; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 2px; }
.tn-foot { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 8px; border-top: 1px solid var(--ln); }
.tn-note { margin: 0 20px 10px; font-size: 15px; color: var(--mu); background: var(--sf); border-radius: 12px; padding: 12px 14px; }
.tn-punts { display: flex; gap: 12px; padding: 8px 20px 16px; overflow-x: auto; }
.punt { flex: none; width: 58px; height: 58px; border-radius: 50%; position: relative; }
.punt .punt-svg { width: 100%; height: 100%; }
.punt[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ac); }
.punt:focus-visible { outline: 2px solid var(--acfg); outline-offset: 4px; }
.punt .tick { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ac); color: var(--acink); font: 600 12px/18px var(--sans, system-ui); text-align: center; border: 2px solid var(--bg); }
.tn-stage { perspective: 1200px; padding: 0 16px 12px; }
.tn-card { position: relative; display: grid; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .7, .2, 1); }
.tn-card > .face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tn-card > .tn-back { transform: rotateY(180deg); }
.tn-card.still > .tn-back { transform: none; }
.tn-card.flipped { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .tn-card { transition: none; } }
.face { background: var(--sf); border: 1px solid var(--ln); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.fhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fhead b { font: 28px/1 var(--disp); font-weight: 400; }
.fhead span { font-size: 13px; color: var(--mu); }
.tn-label { display: flex; flex-direction: column; gap: 2px; }
.tn-label .nm { font-size: 20px; color: var(--tx); }
.tn-secret { font-size: 13px; color: var(--mu); }
.tn-big { display: flex; align-items: baseline; gap: 10px; }
.tn-big b { font-size: 38px; line-height: 1; font-weight: 500; }
.tn-big span { font-size: 13px; color: var(--mu); }
.tn-sr { display: flex; gap: 10px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--ln); }
.tn-sr .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tn-srh { display: flex; align-items: center; gap: 8px; }
.tn-srh em { font-style: normal; font-size: 12px; color: var(--mu); }
.tn-sr .q { font: italic 17px/1.3 var(--serif); color: var(--tx2); }
.tn-hostbar { margin: 0 16px 12px; border-radius: 14px; background: var(--acsbg); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; align-self: start; }
.tn-hostbar small { font-size: 14px; color: var(--tx2); }
.tn-grid { margin: 4px 16px 12px; border: 1px solid var(--ln); border-radius: 14px; overflow-x: auto; background: var(--sf); }
.fcard .tn-grid { margin: 6px 0 0; }
.tn-grid table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.tn-grid th, .tn-grid td { padding: 8px 6px; text-align: center; border-top: 1px solid var(--ln); }
.tn-grid thead th { border-top: 0; font-weight: 500; color: var(--mu); font-size: 12px; }
.tn-grid td:first-child, .tn-grid th:first-child { text-align: left; padding-left: 12px; }
.tn-grid td.w { font: 16px/1.2 var(--disp); min-width: 120px; }
.tn-grid.compact td.w { font-size: 15px; }
.tn-grid td.avg { font-weight: 600; }
.tn-grid tr.top td { background: var(--acsbg); }
.tn-grid .k { font-size: 12px; color: var(--mu); }
.tn-blist { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
@media (min-width: 1000px) {
  .tn-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 16px; padding-right: 16px; align-items: start; }
  .tn-cols .tn-hostbar { margin: 0; }
  .tn-head h1 { font-size: 44px; }
}
.face .spick { gap: 10px; }
.face .spick-dots .sd { width: 42px; height: 44px; }
.face .spick-dots .sd::before { width: 32px; height: 32px; }
.spick-n, .spick .linkbtn { white-space: nowrap; }
.tn-grid th, .tn-grid td:not(.w) { white-space: nowrap; }
.punt-n.dark { fill: #1A1C1A; stroke: rgba(255, 255, 255, .3); }

/* the tour and Help (docs/features/tour-and-help.md) */
.tour { gap: 18px; }
.tour .top { display: flex; justify-content: space-between; align-items: center; }
.tour .skip { color: var(--mu); font-size: 15px; min-height: 36px; padding: 0 4px; }
.tour .dots { display: flex; gap: 6px; }
.tour .dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--ln3); transition: width .15s; }
.tour .dots i.on { background: var(--ac); width: 20px; }
.tour .feats { display: flex; flex-direction: column; gap: 14px; }
.tour .feat { display: flex; gap: 14px; align-items: flex-start; }
.tour .feat b { display: block; font-weight: 600; }
.tour .feat span:not(.cic) { color: var(--tx2); font-size: 15px; line-height: 1.4; }
.tour .cic { width: 40px; height: 40px; border-radius: 20px; background: var(--acsbg); color: var(--acstx); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.tour .tacts { display: flex; gap: 10px; }
.tour .tacts .btn { flex: 1; }
.tour .tourhelp .sub { font-size: 14px; color: var(--mu); }
@media (min-width: 700px) { .tour .grab { display: none; } }
.tmap { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ln); border-radius: 16px; overflow: hidden; background: var(--bg2); }
.tmap div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px; text-align: center; color: var(--tx); }
.tmap div + div { border-left: 1px solid var(--ln); }
.tmap b { font-size: 13px; font-weight: 600; }
.tmap span { font-size: 12px; color: var(--tx2); line-height: 1.3; }
.tips { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tips li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--tx); line-height: 1.4; }
.tips .k { width: 32px; height: 32px; border-radius: 10px; background: var(--sf2); display: inline-flex; align-items: center; justify-content: center; flex: none; color: var(--tx2); font: 600 12px var(--sans); }
.setlink .hic { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--acfg); flex: none; }
button.setlink { width: 100%; text-align: left; }
.helppg .intro { padding: 4px 20px 12px; display: flex; flex-direction: column; gap: 10px; }
.helppg .intro .sub { font-size: 14px; color: var(--mu); }
.helppg .q { display: flex; flex-direction: column; gap: 4px; padding: 0 0 14px; }
.helppg .q b { font-weight: 600; }
.helppg .q p { color: var(--tx2); line-height: 1.5; }

/* the public door: Sign in, an invite, Signing in, People (docs/features/public-door.md) */
.welcome.door { min-height: 100vh; min-height: 100dvh; justify-content: center; padding-bottom: 20vh; }
.welcome.door .btn.wide { margin-top: 6px; }
.pkrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--ln); }
.pkrow:first-of-type { border-top: 0; }
.pkrow .grow { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; }
.invlink { display: flex; flex-direction: column; gap: 8px; }
.pkrow .acts { display: flex; gap: 4px; flex: none; }

/* Connect Claude and Your Claude (public door, part 2) */
.conn-ic { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--acsbg); color: var(--acfg); }
.conn-ic.round { border-radius: 50%; }
.welcome .conn-h { font-size: 32px; }
.conn-host { align-self: flex-start; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--acsbg); color: var(--acfg); }
.conn-warn { color: var(--err); font-size: 14px; }
.conn-can { display: flex; flex-direction: column; gap: 8px; }
.conn-can p { display: flex; gap: 10px; align-items: flex-start; }
.conn-can svg { flex: none; margin-top: 3px; color: var(--acfg); }
.conn-row-ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--acsbg); color: var(--acfg); flex: none; margin-right: 8px; }
.codeline { font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.pkrow.conn { flex-wrap: nowrap; }
.pkrow.conn .grow { flex: 1 1 auto; }
.pkrow.conn .btn { flex: none; white-space: nowrap; }
/* a quiet action at the foot of a sheet: Remove from cellar instead */
.quietbtn { display: block; margin: 6px auto 0; padding: 8px 12px; min-height: 36px; background: none; border: 0; color: var(--tx2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
/* Keep Veritas handy, and Add another device */
.handy .addr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 12px 0 4px; }
.handy .addr .mono { font-size: 14px; overflow-wrap: anywhere; }
.handy .handy-phone { margin: 16px 0; padding: 14px; display: grid; gap: 8px; text-align: left; }
.qr { display: block; margin: 8px auto 14px; width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 12px; }
/* a page title never breaks mid-word; on narrow phones the title and pills give a little instead (Rob, 8 Oct: "Journa / l") */
.headrow h1 { white-space: nowrap; min-width: 0; }
@media (max-width: 440px) {
  .headrow h1 { font-size: 34px; }
  .headrow .pill { padding: 0 11px; gap: 6px; }
}

/* a cellar you look after (Vaucluse): apart from yours, after a thin line (docs/features/kept-cellars.md) */
.chipdiv { flex: none; width: 1px; align-self: stretch; margin: 8px 2px; background: var(--ln2); }
.navdiv { display: block; height: 1px; margin: 6px 12px; background: var(--ln); }
.chip.kept:not(.on) { border-style: dashed; }
.kepthint { font-size: 14px; margin: -4px 0 8px; }
