/* The phone app's styles (DEC-0266, DEC-0271; the CJK block below, DEC-0316). Mobile-first, system font, >=44px tap targets,
   safe-area insets, light/dark by the OS setting. The colour tokens below are SHARED with the
   onboarding page (src/onboarding-mobile.css repeats them; test/tokens.test.js pins the two
   blocks equal) - change one, change both. */
:root {
  color-scheme: light dark;
  --bg: #fbf7f2;
  --fg: #231a14;
  --muted: #6b5d52;
  --card: #ffffff;
  --line: #e4d9cd;
  --accent: #1d6b2f;
  --error-bg: #fde8e6;
  --error-fg: #7a1410;
  --warn-bg: #fff3d6;
  --caution: #a04000;
  --tile: #efe8df;
  --badge-bg: #231a14;
  --badge-fg: #fbf7f2;
  --on-accent: #ffffff;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110d;
    --fg: #f1e8df;
    --muted: #b3a498;
    --card: #231a14;
    --line: #3a2d24;
    --accent: #6fd486;
    --error-bg: #4a1714;
    --error-fg: #ffd9d5;
    --warn-bg: #4a3a12;
    --caution: #f0a868;
    --tile: #2c221b;
    --badge-bg: #f1e8df;
    --badge-fg: #17110d;
    --on-accent: #17110d;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
/* DEC-0316 CJK typography - packages/i18n/src/typography.js CJK_CSS, copied verbatim; tests/cjk-typography.test.js pins every copy. */
:root:lang(ja) body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
:root:lang(ko) body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif; word-break: keep-all; }
:root:lang(zh) body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
:root:lang(zh-Hant) body, :root:lang(zh-TW) body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif; }
:root:lang(zh-HK) body, :root:lang(zh-MO) body, :root:lang(zh-Hant-HK) body, :root:lang(zh-Hant-MO) body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", "Noto Sans HK", "Noto Sans CJK HK", system-ui, sans-serif; }
:root:lang(ja) body, :root:lang(zh) body { line-break: strict; }
:root:lang(ja) body, :root:lang(ko) body, :root:lang(zh) body { line-height: 1.5; font-synthesis: weight; }
main { max-width: 60rem; margin: 0 auto; padding: 12px 16px 32px; }
h1 { font-size: 1.5rem; margin: 8px 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 8px; }
.meta { color: var(--muted); margin: 2px 0; font-size: 0.9rem; }
/* The header's feed facts (review UX2, S357): one disclosure, closed at phone widths, open on wide ones (app.js). */
.feed-meta { margin: 2px 0; }
.feed-meta > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; list-style: none; }
.feed-meta > summary::-webkit-details-marker { display: none; }
.feed-meta > summary::before { content: "\25B8"; flex: none; margin-right: 6px; }
.feed-meta[open] > summary::before { content: "\25BE"; }
.feed-meta > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.status, .empty { color: var(--muted); }
.warn { background: var(--warn-bg); padding: 10px 12px; border-radius: 8px; }
.error { background: var(--error-bg); color: var(--error-fg); padding: 14px 16px; border-radius: 10px; margin-top: 16px; }
/* S355 (UX4): the feed-error screen's Retry button and its small raw-message line. */
.error .feed-retry { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.error .feed-retry:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.error .feed-error-detail { color: inherit; font-size: 0.8rem; margin-top: 10px; overflow-wrap: anywhere; }
/* The shelf: a two-column grid of cards (DEC-0271 item 9); wider screens add columns. */
.ranked { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .ranked { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); } }
.coffee { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.card { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 44px; color: inherit; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
a.card:active { border-color: var(--accent); }
a.card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* The tile: square and fixed-aspect so the list never shifts while pictures load. */
.tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--tile); }
/* Absolute, so a tall picture cannot size the tile: an in-flow image gives an auto-height box its own height (S359, B4). */
.tile .bag { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.tile .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; font-weight: 600; color: var(--muted); opacity: 0.55; }
.badge { position: absolute; top: 8px; left: 8px; min-width: 2rem; padding: 2px 8px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-fg); font-size: 0.85rem; font-weight: 700; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.body { flex: 1 1 auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.name { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.roaster { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.new { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 1px; }
.gl { font-weight: 700; background: color-mix(in srgb, gold 28%, transparent); border-radius: 3px; padding: 0 2px; }
.notes { font-size: 0.85rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
/* The price row is always last and pinned to the card's foot (.body grows to fill the card), so a
   long name or notes can never push it off and prices line up across a grid row (owner ask, S309). */
.price, .price-none { margin-top: auto; padding-top: 4px; font-size: 0.85rem; flex: none; }
.price { font-weight: 600; }
.checked { flex: none; color: var(--muted); font-size: 0.75rem; }
/* A look older than 36 h (DEC-0278 item 8, owner call S317): the radar stopped or the feed is old. */
.checked.stale { align-self: flex-start; color: var(--fg); background: var(--warn-bg); padding: 1px 6px; border-radius: 6px; }
.price-none { color: var(--muted); font-style: italic; }
.diagnostics { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.diagnostics summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.diagnostics .network { margin: 4px 0 8px; font-size: 0.85rem; }
.diagnostics dl { margin: 0; font-size: 0.8rem; }
.diagnostics dt { color: var(--muted); margin-top: 8px; }
.diagnostics dd { margin: 0; word-break: break-all; font-family: ui-monospace, Menlo, monospace; }
.palate .edit-profile { display: inline-block; min-height: 44px; line-height: 44px; margin-left: 4px; color: var(--accent); }
a.button, button.button {
  display: block; width: 100%; min-height: 44px; margin: 10px 0 0; padding: 10px 14px;
  font: inherit; text-align: center; text-decoration: none; cursor: pointer;
  color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
/* Filtering (DEC-0266): the sticky search + Filters bar, the applied-filter chips, the full-screen
   facet sheet, and the three shelf sections. Tokens only - no new colour. */
[hidden] { display: none !important; }
.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.filterbar { display: flex; gap: 8px; align-items: stretch; }
.search, .narrow-input {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 8px 12px;
  font: inherit; font-size: 16px; /* 16px: iOS Safari zooms the page on focus below it */
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  -webkit-appearance: none; appearance: none;
}
.filters-btn {
  flex: 0 0 auto; min-height: 44px; padding: 8px 14px; font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.filters-btn:focus-visible, .chip:focus-visible, .linkbtn:focus-visible, .search:focus-visible, .narrow-input:focus-visible,
button.button:focus-visible, .opt input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 12px; max-width: 100%;
  font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; overflow-wrap: anywhere;
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.chip.clear { color: var(--accent); font-weight: 600; }
.chip .x { color: var(--muted); }
/* DEC-0297: how the typed search was read - one pill per term, two tap targets (the label flips include/exclude, the x
   removes). An excluded term is struck through with a dashed edge. Tokens only. */
.termchip { display: inline-flex; align-items: stretch; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.termchip button { min-height: 44px; padding: 6px 12px; font: inherit; font-size: 0.9rem; text-align: left; cursor: pointer; color: var(--fg); background: none; border: 0; overflow-wrap: anywhere; }
.termchip button.x { min-width: 44px; padding-left: 4px; text-align: center; color: var(--muted); }
.termchip button:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.termchip.excluded { border-style: dashed; }
.termchip.excluded .term { text-decoration: line-through; color: var(--muted); }
.termchip.excluded .term .minus { text-decoration: none; display: inline-block; margin-right: 2px; }
.termnote { margin: 6px 0 0; }
.shelf-status { margin: 10px 0 0; }
.linkbtn { display: inline; min-height: 44px; padding: 0 4px; font: inherit; color: var(--accent); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.shelf-section { margin: 20px 0 0; }
.sec-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.sec-count { color: var(--muted); font-size: 0.9rem; font-weight: 400; margin-left: 4px; }
details.shelf-section > summary { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; cursor: pointer; }
.shelf-section .ranked { margin: 8px 0 12px; }
.blocked-reason { font-size: 0.85rem; color: var(--error-fg); background: var(--error-bg); border-radius: 6px; padding: 4px 8px; overflow-wrap: anywhere; }
button.more { margin: 4px 0 12px; }
/* The facet sheet: a full-screen modal <dialog> (iOS Safari 15.4+; the page behind is inert). */
dialog.sheet {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  height: 100dvh; color: var(--fg); background: var(--bg);
}
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: var(--bg); }
.sheet-head {
  flex: 0 0 auto; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; }
.sheet-actions { display: flex; gap: 8px; margin-top: 8px; }
.sheet-actions .button { margin: 0; flex: 1 1 0; width: auto; }
.sheet-actions .button.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.facet { border-bottom: 1px solid var(--line); }
.facet > summary { min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; cursor: pointer; font-weight: 600; }
.fmeta { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.facet .note { color: var(--muted); font-size: 0.85rem; margin: 4px 0; }
.narrow { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 0.9rem; color: var(--muted); }
.opts { display: flex; flex-direction: column; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; cursor: pointer; }
.opt input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--accent); }
.opt .olabel { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.opt .count { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
/* The taste facets (DEC-0282 §8). A flavor row is the checkbox's own <label> plus a SIBLING Hide toggle, so a
   tap on Hide can never also tick the box; a subfamily is indented under its family; a hidden flavor reads as
   hidden (struck through, the toggle filled). Tokens only - no new colour. */
.optrow { padding: 0; cursor: default; }
.optrow .optmain { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; min-height: 44px; cursor: pointer; }
.optrow.depth1 { padding-left: 34px; }
.opt.depth1 { padding-left: 34px; }
.opt.depth2 { padding-left: 52px; }
.opt.depth1 .olabel, .opt.depth2 .olabel { font-size: 0.95rem; }
.optrow.depth1 .olabel { font-size: 0.95rem; }
.optrow .hide {
  flex: 0 0 auto; min-width: 4.5rem; min-height: 44px; padding: 0 10px; font: inherit; font-size: 0.85rem; cursor: pointer; text-align: center;
  color: var(--muted); background: none; border: 0; border-radius: 8px; text-decoration: underline;
}
.optrow .hide[aria-pressed="true"] { color: var(--error-fg); background: var(--error-bg); text-decoration: none; font-weight: 600; }
.optrow .hide:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.optrow.excluded .olabel { text-decoration: line-through; color: var(--muted); }
/* A card's recognized descriptors, and - for a parsed search - the note words that matched it. */
.descs, .matched, .elev { font-size: 0.8rem; overflow-wrap: anywhere; }
.descs, .elev { color: var(--muted); }
.matched { color: var(--accent); font-weight: 600; }
/* The scorer's cautions (shared flags-line leaf): the desktop's amber, above the price it often warns about. */
.flags { font-size: 0.8rem; color: var(--caution); overflow-wrap: anywhere; }
.flags-info { font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }   /* S390: an informational note (ⓘ) is not a caution */
.showall { margin: 4px 0 8px; }

/* The view switch: Shelf | My coffees (n). Segmented, 44px tall. */
.viewswitch { display: flex; gap: 0; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.viewswitch .tab {
  flex: 1 1 0; min-height: 44px; padding: 8px 10px; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--fg); background: var(--card); border: 0;
}
.viewswitch .tab + .tab { border-left: 1px solid var(--line); }
.viewswitch .tab[aria-current="page"] { color: var(--on-accent); background: var(--accent); }
.viewswitch .tab:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

/* The purchase gestures (DEC-0154, DEC-0240): the control row UNDER a card, outside its link. */
.marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; }
.mark-btn, summary.mark-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 6px 12px;
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; list-style: none;
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px;
}
.mark-btn.buy { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.mark-btn:disabled { opacity: 0.5; cursor: default; }
.mark-btn:focus-visible, summary.mark-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
summary.mark-btn::-webkit-details-marker { display: none; }
.marks .bought { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.passed-tag { color: var(--muted); font-size: 0.9rem; }
.marks details.pass { flex: 1 1 100%; min-width: 0; }
.pass-panel { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 6px 0 0; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.pass-panel .mark-btn { flex: 1 1 100%; }
.say-why { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.say-why .note, .verdict .note {
  flex: 1 1 100%; width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px;
  color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  -webkit-appearance: none; appearance: none;
}
.marks-unavailable { color: var(--muted); font-size: 0.85rem; }

/* The status line: what was just recorded, with an Undo. Pinned to the bottom of the screen. */
.toast {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--badge-bg); color: var(--badge-fg);
  border-top: 1px solid var(--line);
}
.toast[role="alert"] { background: var(--error-bg); color: var(--error-fg); }
.toast-msg { flex: 1 1 12rem; margin: 0; overflow-wrap: anywhere; }
.toast-btn {
  min-height: 44px; min-width: 44px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer;
  color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 8px;
}
.toast-btn:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.view-shelf, .coffees { padding-bottom: 80px; }   /* room for the pinned status line */

/* My coffees. */
.coffees .view-title { margin: 16px 0 8px; font-size: 1.3rem; }
.coffees-section { margin: 20px 0 0; }
.coffees .sub { margin: 0 0 8px; }
.purchases, .passes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.purchase, .pass-item { padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-wrap: anywhere; }
.p-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.p-score { min-width: 2rem; padding: 0 8px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-fg); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.p-score.unrated { background: var(--tile); color: var(--muted); }
.purchase a.name, .pass-item a.name { color: inherit; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.purchase .name, .pass-item .name { font-weight: 600; }
.purchase .notes, .purchase .why, .purchase .when, .verdict-line, .pass-item .when { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); }
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.verdict-rating select, select.rating {
  min-height: 44px; padding: 6px 10px; font: inherit; font-size: 16px; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px;
}
.p-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.passed-list { margin: 20px 0 0; }
.passed-list > summary { width: 100%; justify-content: flex-start; }
.passes { margin: 8px 0 0; }
.empty-state { margin: 16px 0; }
/* Your data (export / import, DEC-0182 on the phone): the section above Diagnostics, and the restore page. */
.data { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 8px; }
.data-status { min-height: 1.4em; overflow-wrap: anywhere; }
.pref { display: flex; align-items: center; gap: 0.6rem; min-height: 44px; }
/* The language switch (DEC-0305 Layer B, slice 4): EN / ES beside the title, a panel of choices under it, the same group in Settings. Tokens only. */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switches { display: flex; gap: 8px; flex: none; }   /* DEC-0319: the currency and language buttons, side by side at the top */
.currency-choice select { min-height: 44px; max-width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.currency-choice .pref { flex-wrap: wrap; }
.lang-btn {
  flex: none; min-width: 44px; min-height: 44px; padding: 6px 10px; font: inherit; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 8px;
}
.lang-panel { margin: 4px 0 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.lang-heading { margin: 0 0 4px; font-weight: 600; }
.lang-group { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-opt { min-height: 44px; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.lang-opt[aria-pressed="true"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.lang-opt:disabled { opacity: 0.55; cursor: default; }
.lang-btn:focus-visible, .lang-opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang-status { min-height: 1.4em; overflow-wrap: anywhere; }
.pref input { width: 1.4rem; height: 1.4rem; }
.data-problem h3 { margin: 0 0 4px; font-size: 1rem; }
.data-problem p { margin: 4px 0; overflow-wrap: anywhere; }
.confirm { margin-top: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.confirm h3 { margin: 0 0 6px; font-size: 1.05rem; }
.confirm-lines { margin: 0 0 4px; padding-left: 1.2rem; }
.confirm .sheet-actions .button.primary, .data-retry .button.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.data .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.data .button:disabled { opacity: 0.55; cursor: default; }
/* The About / Privacy links (static footer in index.html, and the links on the built pages): plain
   links, no script (DEC-0278 Phase 2). */
/* The non-persistent-storage note (src/persist-note.js shows it): one muted line above the footer. `hidden` is
   never overridden - no display is set on the paragraph. */
.persist-note { max-width: 60rem; margin: 0 auto; padding: 8px 16px 0; font-size: 0.85rem; color: var(--muted); }
.persist-note a { color: var(--accent); padding: 12px 2px; }   /* inline, so the link stays on the sentence's line; the padding is the tap target */
.site-links { max-width: 60rem; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.85rem; }
.site-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.page { max-width: 40rem; }
.page .back { margin: 0; }
.page .back a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); }
.page .copy { margin: 12px 0; overflow-wrap: anywhere; }
.page .copy a { color: var(--accent); }
.page .cmd { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font: 0.85rem ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.page .site-links { padding: 8px 0 0; }

/* DEC-0295 - the Roaster-location facet: a place box, found rows, and the tree (continent > country > region > state > metro). */
.loc .narrow { flex-direction: column; align-items: stretch; gap: 4px; }
.loc .loc-input { width: 100%; min-width: 0; }
.loc-found { margin: 4px 0 8px; }
.loc-found .note { margin: 4px 0; }
.loc-tree { margin: 4px 0; }
.loc-row { display: flex; align-items: center; gap: 4px; }
.loc-row .opt { flex: 1 1 auto; min-width: 0; }
.loc-kids { border-left: 1px solid var(--line); margin-left: 14px; padding-left: 6px; }
.disclose { flex: 0 0 auto; width: 44px; min-height: 44px; padding: 0; font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer; }
.disclose.spacer { cursor: default; }
.disclose:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.loc-unknown { margin-top: 8px; border-top: 1px solid var(--line); }
.ranked .highlight { box-shadow: inset 3px 0 0 var(--accent); }
.highlight-note { margin: 4px 0 0; }

/* DEC-0299 item 5: the one-line backup nudge under the shelf's header */
.backup-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.backup-nudge[hidden] { display: none; }
.backup-dismiss { min-height: 44px; padding: 6px 12px; font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
