:root {
 color-scheme: light dark;
 --ink: #1b1b1b;
 --fg-inv: #fff;
 --mut: #595959;
 --line: #e3e3e3;
 --line2: #efefef;
 --bg: #fafafa;
 --card: #fff;
 --bad: #b42318;
 --ok: #067647;
 --chip: #ececec;
 --chip-fg: #444;
 --okbg: #e4f3ea;
 --badbg: #fdeceb;
 --scroll-shadow: rgba(0, 0, 0, 0.16);
 --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05);
 --wm: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
}
@media (prefers-color-scheme: dark) {
 :root {
  --ink: #e8e8e8;
  --fg-inv: #141414;
  --mut: #a3a3a3;
  --line: #333;
  --line2: #2a2a2a;
  --bg: #121212;
  --card: #1d1d1d;
  --bad: #f2988f;
  --ok: #85cb9c;
  --chip: #2c2c2c;
  --chip-fg: #c4c4c4;
  --okbg: #17301f;
  --badbg: #3b201c;
  --scroll-shadow: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
 }
}
body {
 margin: 0;
 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
 color: var(--ink);
 background: var(--bg);
 line-height: 1.5;
}
a { color: inherit; }
/* Components set their own display, which beats the user agent's [hidden] rule.
   Without this a box the script hides stays on screen. */
[hidden] { display: none !important; }
td a, .card a, .empty a { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; }
h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; margin: 36px 0 12px; }
h3 { font-size: 1rem; font-weight: 600; }
.card h2 { margin: 0 0 12px; }
.card h3 { margin: 0 0 10px; }
.bar {
 display: flex;
 align-items: center;
 gap: 16px;
 padding: 12px 24px;
 background: var(--card);
 border-bottom: 1px solid var(--line);
 flex-wrap: wrap;
}
.bar .brand { font-weight: 600; margin-right: 8px; white-space: nowrap; }
.wm { font-family: var(--wm); font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.bar .wm { font-size: 1.0625rem; }
.login .wm { display: block; font-size: 1.375rem; margin-bottom: 8px; }
.bar nav { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; align-items: center; }
.bar nav a {
 text-decoration: none;
 color: var(--mut);
 padding: 7px 14px;
 border-radius: 999px;
 font-size: 0.875rem;
 white-space: nowrap;
}
.bar nav a:hover { color: var(--ink); background: var(--bg); }
.bar nav a.active { color: var(--fg-inv); background: var(--ink); }
.bar form { margin: 0; }
.bar nav.crumb { gap: 8px; color: var(--mut); font-size: 0.875rem; }
.bar nav.crumb a { padding: 0; border-radius: 0; }
.bar nav.crumb a:hover { color: var(--ink); background: none; }
.imp {
 background: var(--ink);
 color: var(--fg-inv);
 text-align: center;
 padding: 6px;
 font-size: 0.875rem;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 28px; }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile span { color: var(--mut); font-size: 0.8125rem; }
.tile .d { display: block; margin-top: auto; padding-top: 6px; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.card {
 background: var(--card);
 border: 1px solid var(--line);
 border-radius: 12px;
 padding: 20px 24px;
 margin-bottom: 16px;
 box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card > .row { padding: 12px 0; border-top: 1px solid var(--line2); }
.card > .row:first-child { border-top: 0; padding-top: 0; }
.card > .row:last-child { padding-bottom: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Basis 0, not auto: a flex row wraps before it shrinks, so a long first child
   pushed the action onto its own line while a short one did not. */
.row > :first-child { flex: 1 1 0; min-width: 0; }
.card.row { padding: 20px 24px; }
.rowend { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.small { font-size: 0.8125rem; word-break: break-all; }
.flash {
 background: var(--okbg);
 color: var(--ok);
 border-radius: 8px;
 padding: 10px 14px;
 margin: 12px 0 20px;
 font-size: 0.9375rem;
}
.flash.bad { background: var(--badbg); color: var(--bad); }
.empty {
 border: 1px dashed var(--line);
 border-radius: 12px;
 padding: 28px 24px;
 text-align: center;
 color: var(--mut);
 margin-bottom: 16px;
}
.empty p { margin: 0 0 4px; }
.empty .btn { margin-top: 12px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.charts .card { margin: 0; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; color: var(--ink); }
.chart .pt { opacity: 0; }
.chart .pt.on { opacity: 1; }
.tip { position: absolute; display: none; pointer-events: none; background: var(--ink); color: var(--fg-inv); font-size: 0.75rem; border-radius: 6px; padding: 4px 8px; white-space: nowrap; transform: translate(-50%, -130%); }
.tablewrap {
 overflow-x: auto;
 background-color: var(--card);
 background-image:
  linear-gradient(to right, var(--card) 40%, transparent),
  linear-gradient(to left, var(--card) 40%, transparent),
  radial-gradient(farthest-side at 0 50%, var(--scroll-shadow), transparent),
  radial-gradient(farthest-side at 100% 50%, var(--scroll-shadow), transparent);
 background-position: 0 0, 100% 0, 0 0, 100% 0;
 background-size: 48px 100%, 48px 100%, 12px 100%, 12px 100%;
 background-repeat: no-repeat;
 background-attachment: local, local, scroll, scroll;
 border: 1px solid var(--line);
 border-radius: 12px;
 margin-bottom: 16px;
}
.card .tablewrap { border: 0; border-radius: 0; background-color: transparent; margin-bottom: 0; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; }
table.list th, table.list td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
table.list th { color: var(--mut); font-weight: 500; font-size: 0.8125rem; }
table.list tr:last-child td { border-bottom: 0; }
table.list td.num { text-align: right; font-weight: 600; white-space: nowrap; }
/* The method belongs in the row it explains. As its own full-width row it read
   as another figure, and the page looked like a spreadsheet of footnotes. */
.why { display: block; color: var(--mut); font-size: 0.8125rem; font-weight: 400; margin-top: 2px; max-width: 62ch; }
/* Two columns and a sentence do not fit on a phone: the label column squeezed
   the method into a ribbon four words wide. The row becomes one block. */
@media (max-width: 560px) {
 table.stackrows tr, table.stackrows td { display: block; }
 table.stackrows tr { border-bottom: 1px solid var(--line2); padding: 4px 0; }
 table.stackrows tr:last-child { border-bottom: 0; }
 table.stackrows td { border-bottom: 0; padding: 2px 0; }
 table.stackrows td.num { text-align: left; font-size: 1.125rem; padding-bottom: 8px; }
 table.stackrows td.num .why { font-size: 0.8125rem; }
}
td.num .why { max-width: none; }
.lede { font-size: 1.0625rem; margin: 0 0 4px; }
/* Google hands the opening hours back as seven lines. Collapsing them into one
   makes the row unreadable, and splitting them in Go would put formatting in
   the wrong place. */
.prewrap { white-space: pre-line; }
table.list form { display: inline; }
table.list button { padding: 6px 10px; font-size: 0.875rem; }
button, .btn {
 font: inherit;
 background: var(--ink);
 color: var(--fg-inv);
 border: 0;
 border-radius: 8px;
 padding: 10px 16px;
 cursor: pointer;
 text-decoration: none;
 display: inline-block;
}
button.sec, .btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
button.sec:hover:enabled, .btn.sec:hover { border-color: var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.linkbtn { background: none; color: var(--mut); border: 0; padding: 6px 10px; font-size: 0.875rem; }
button.linkbtn:hover { color: var(--ink); }
input, textarea, select {
 box-sizing: border-box;
 font: inherit;
 width: 100%;
 padding: 9px 12px;
 border: 1px solid var(--line);
 border-radius: 8px;
 background: var(--card);
 color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 0.8125rem; color: var(--mut); margin: 12px 0 4px; }
form.stack { max-width: 480px; }
/* A card holding one narrow form is a mostly empty box on a wide screen. The
   form keeps its readable width and the card stops pretending to need more. */
.card.narrow { max-width: 560px; }
.rename { display: flex; gap: 8px; align-items: center; flex: 1 1 320px; }
/* Wide enough for the longest label anybody types on a stand, not the width of
   the screen. */
.rename input { max-width: 420px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 16px; }
.actions form { margin: 0; }
.actions input, .actions select { width: auto; }
/* A search field that cannot show its own placeholder is a search field nobody
   uses. It takes the room the row has. */
.actions input[type="search"], .actions input[name="q"] { flex: 1 1 260px; min-width: 0; }
/* A phone has room for one button per line. Wrapping a flex row instead leaves
   ragged half-rows of different widths, which is what "buttons next to each
   other that should be under each other" looks like on a counter. */
@media (max-width: 560px) {
 .actions { flex-direction: column; align-items: stretch; }
 .actions > *, .actions form, .actions button, .actions .btn { width: 100%; }
 .actions .btn { text-align: center; }
 .row > form, .row > .btn, .row > button { width: 100%; }
}
.row.alert { display: block; }
.alert .head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.alert .head ~ p { margin: 2px 0 0; }
.muted { color: var(--mut); font-size: 0.875rem; }
.sub { margin: 4px 0 0; }
.inline { display: inline-block; }
.center { text-align: center; }
.badge { font-size: 0.75rem; background: var(--chip); border-radius: 999px; padding: 4px 10px; color: var(--chip-fg); font-weight: 500; display: inline-flex; align-items: center; line-height: 1.2; vertical-align: middle; white-space: nowrap; }
.badge.bad { background: var(--badbg); color: var(--bad); }
.badge.ok { background: var(--okbg); color: var(--ok); }
.stars { color: var(--ink); letter-spacing: 2px; }
.review-item { border-bottom: 1px solid var(--line2); padding: 16px 0; }
.review-item:last-child { border-bottom: 0; padding-bottom: 0; }
.review-item:first-child { padding-top: 0; }
.review-item p { margin: 0; }
.review-item p + p { margin-top: 8px; }
.complaint p { margin: 0 0 8px; }
/* The suggested reply reads as a field with its own copy control, because that
   is what it is: text to lift out of the app and paste into Google. */
.copybox {
 display: flex;
 align-items: flex-start;
 gap: 10px;
 background: var(--bg);
 border: 1px solid var(--line);
 border-radius: 8px;
 padding: 10px 12px;
 margin: 10px 0 0;
 font-size: 0.9375rem;
}
.copybox .copytext { flex: 1; min-width: 0; }
.copybox button { padding: 6px 12px; font-size: 0.875rem; white-space: nowrap; }
.replies .actions { margin: 8px 0 0; }
@media (max-width: 560px) {
 .copybox { flex-direction: column; }
 .copybox button { width: 100%; }
}
.login { max-width: 360px; margin: 10vh auto; padding: 0 16px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
/* QR cards stay white in dark mode: scanners and print need dark-on-light. */
.qr-card { background: #fff; color: #1b1b1b; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.qr-card img { width: 100%; max-width: 200px; height: auto; }
.qr-card .url { font-size: 0.75rem; color: #595959; word-break: break-all; }
@media (max-width: 720px) {
 /* Sellers work one-thumbed at the counter; small buttons miss. */
 table.list button, button.linkbtn { padding: 11px 14px; }
 /* Two rows on a phone: who you are and the way out on the first, the whole
    navigation on the second. It used to scroll sideways, which hid half the
    app behind a gesture nobody makes on a page that also scrolls down. */
 .bar { padding: 10px 12px; gap: 8px; }
 .bar .brand { flex: 1; margin-right: 0; }
 .bar nav { order: 3; flex: 1 1 100%; flex-wrap: wrap; row-gap: 4px; }
 .bar nav a { padding: 7px 12px; }
 .bar form { order: 2; margin-left: auto; }
 .tiles { grid-template-columns: 1fr 1fr; }
 .wrap { padding: 24px 16px 64px; }
 .card { padding: 16px 18px; }
}
@media (max-width: 880px) {
 .charts { grid-template-columns: 1fr; }
}
.doc { max-width: 720px; margin: 0 auto; }
.doc h2 { margin: 44px 0 12px; }
.doc > p { margin: 12px 0 0; }
.doc > .card + h2, .doc > .inv + h2 { margin-top: 44px; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.split p:first-child { margin-top: 0; }
@media (max-width: 700px) {
 .split { grid-template-columns: 1fr; gap: 20px; }
 .device { margin: 0 auto; }
}
.inv { background: var(--ink); color: var(--fg-inv); border-radius: 12px; padding: 24px; }
.inv .inv-lede { color: var(--fg-inv); opacity: 0.7; font-size: 0.875rem; margin: 0 0 20px; }
.inv ul { list-style: none; margin: 0; padding: 0; }
.inv li + li { margin-top: 16px; }
.inv li b { display: block; font-size: 0.9375rem; }
.inv li span { opacity: 0.7; font-size: 0.875rem; }
/* mirrors the real /r/{tag} screen (templates/review.html + pubcss) */
.device { box-sizing: border-box; width: 100%; max-width: 320px; border: 1px solid var(--line); border-radius: 20px; padding: 22px 18px; background: var(--bg); }
.device * { box-sizing: border-box; }
.device .dev-h1 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 4px; }
.device .dev-sub { color: var(--mut); margin: 0 0 28px; }
.device .g { display: block; text-align: center; background: var(--ink); color: var(--fg-inv); font-size: 1.125rem; font-weight: 600; padding: 18px 16px; border-radius: 8px; }
.device .or { text-align: center; color: var(--mut); font-size: 0.875rem; margin: 24px 0; }
.device .dev-form { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.device .dev-h2 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 4px; }
.device .hint { color: var(--mut); font-size: 0.875rem; margin: 0 0 12px; }
.device .dev-in { display: block; color: var(--mut); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; background: var(--bg); }
.device .dev-in:first-of-type { padding-bottom: 48px; }
.device .dev-btn { display: block; text-align: center; font-weight: 600; background: var(--card); border: 1px solid var(--ink); border-radius: 8px; padding: 13px; }
@media print {
 .bar, .noprint, .imp { display: none !important; }
 body { background: #fff; color: #1b1b1b; }
 .wrap { max-width: none; padding: 0; }
 .qr-card, .card, .tablewrap { border: 1px solid #000; break-inside: avoid; box-shadow: none; }
 .card .tablewrap { border: 0; }
}
