/* PotteryDave — warm, earthy, calm. Light + dark. */
:root {
  --bg: #f6f1ea;
  --surface: #fffdf9;
  --surface-2: #efe7dc;
  --line: #e0d5c7;
  --text: #2b2420;
  --muted: #736558;
  --accent: #a9502b;        /* terracotta */
  --accent-ink: #ffffff;
  --accent-soft: #f4e0d5;
  --ok: #4f7a52;
  --warn: #a8761a;
  --danger: #a33b32;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 4px 16px rgba(60, 40, 20, .06);
  --tabbar-h: 64px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1916;
    --surface: #26211d;
    --surface-2: #312a25;
    --line: #3d352f;
    --text: #efe6dc;
    --muted: #a8998c;
    --accent: #e0835a;
    --accent-ink: #1d1916;
    --accent-soft: #3d2a20;
    --ok: #8fbf8f;
    --warn: #e0b35a;
    --danger: #ef7d73;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
body.public { padding-bottom: 24px; }
body.public .tabbar { display: none; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--text); font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.brand img { border-radius: 7px; }
.topbar-actions { display: flex; gap: 8px; }

main { max-width: 760px; margin: 0 auto; padding: 16px; outline: none; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 500;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.active { color: var(--accent); }
.tabbar .tab-new svg { background: var(--accent); color: var(--accent-ink); border-radius: 50%; padding: 4px; width: 32px; height: 32px; }

/* Cards & lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; color: inherit; text-decoration: none; }
.list-item .title { font-weight: 600; }
.chev { color: var(--muted); margin-left: auto; }

.piece-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.piece {
  display: block; text-decoration: none; color: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.piece .thumb { aspect-ratio: 4 / 5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.piece .thumb img { width: 100%; height: 100%; object-fit: cover; }
.piece .thumb svg { width: 44%; opacity: .35; }
.piece .meta { padding: 10px 12px 12px; }
.piece .meta .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters button { flex: none; }

/* Buttons */
button, .btn {
  font: inherit; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none;
}
button:disabled { opacity: .5; cursor: default; }
.btn-primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost, button.ghost { background: transparent; border-color: transparent; }
button.danger { color: var(--danger); }
button.small, .btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
button.pill { border-radius: 999px; min-height: 36px; font-size: .85rem; }
button.pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-block { width: 100%; }
.icon-btn { min-width: 44px; padding: 0; }

/* Forms */
form .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
label, .label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 16px; /* prevents iOS zoom */
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
}
textarea { min-height: 88px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input[type=color] { padding: 4px; width: 56px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.hint { font-size: .8rem; color: var(--muted); }
.form-error { color: var(--danger); font-size: .9rem; margin: 8px 0; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 38px; border-radius: 9px; font-size: .9rem; color: var(--text); cursor: pointer; text-align: center; padding: 0 6px; }
.segmented input:checked + span { background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* Project detail */
.hero { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; margin-bottom: 12px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fact { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.fact .k { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.fact .v { font-weight: 600; }

/* Stage stepper */
.stepper { list-style: none; margin: 0; padding: 0; position: relative; }
.stepper li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; position: relative; }
.stepper li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -8px; width: 2px; background: var(--line); }
.stepper li:last-child::before { display: none; }
.stepper .node { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: .75rem; z-index: 1; }
.stepper li.done .node { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper li.done::before { background: var(--accent); }
.stepper li.current .node { box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper li.skipped .node { border-style: dashed; }
.stepper .name { font-weight: 600; }
.stepper li:not(.done) .name { color: var(--muted); font-weight: 500; }
.stepper .when { font-size: .85rem; color: var(--muted); }

.treat { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.treat:first-child { border-top: 0; }
.swatch { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(0,0,0,.12); background: var(--surface-2); }
.layers { display: inline-flex; align-items: center; gap: 4px; }
.layers button { min-height: 30px; min-width: 30px; padding: 0; border-radius: 8px; }

.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo-strip button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); min-height: 0; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
/* Request #5: cover photo */
.photo-strip button { position: relative; }
.photo-strip .is-cover { outline: 3px solid var(--accent); outline-offset: -3px; }
.cover-badge { position: absolute; left: 6px; bottom: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.cover-pick button[aria-checked="true"] { outline: 4px solid var(--accent); outline-offset: -4px; }
.cover-pick button[aria-checked="true"]::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.cover-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; }
.upsell { background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 14px; }

/* Catalog */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs a { padding: 10px 12px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--accent); }

/* Modal (native dialog) */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(20, 12, 6, .45); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
dialog .dlg-body { padding: 16px; }
dialog .dlg-foot { padding: 12px 16px 16px; display: flex; gap: 8px; justify-content: flex-end; }
dialog.viewer { width: auto; max-width: 96vw; background: #000; }
dialog.viewer img { max-height: 80dvh; width: auto; margin: 0 auto; }

/* Share preview */
.share-preview { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.share-preview canvas, .share-preview img { flex: none; width: 180px; height: 225px; border-radius: 8px; box-shadow: var(--shadow); scroll-snap-align: start; object-fit: cover; }
.caption-box { font-size: .9rem; white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 12px; }

/* Toast & misc */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 50; font-weight: 600; max-width: calc(100vw - 32px); box-shadow: var(--shadow); }
.toast.error { background: var(--danger); color: #fff; }
.offline-pill { position: fixed; top: calc(60px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); background: var(--warn); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; z-index: 20; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 72px; height: 72px; opacity: .4; margin: 0 auto 8px; display: block; }
.auth-wrap { max-width: 400px; margin: 5vh auto 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.plan-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kbd-note { font-size: .8rem; color: var(--muted); margin-top: 6px; }

@media (min-width: 720px) {
  main { padding: 24px; }
  .piece-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Help assistant ---------- */
.help-fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); z-index: 15;
  width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(60, 40, 20, .18); color: var(--accent);
}
.help-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
dialog.chat { display: flex; flex-direction: column; width: min(520px, calc(100vw - 16px)); height: min(680px, calc(100dvh - 32px)); max-height: none; }
dialog.chat:not([open]) { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.msg.bot .bubble { background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg.user .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.bubble code, pre.code { font: .85em ui-monospace, SFMono-Regular, Menlo, monospace; }
.msg-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chat-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 8px; max-height: 38%; overflow-y: auto; }
.chat-chips button { min-height: 36px; text-align: left; }
.chat-input { display: flex; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.chat-input input { flex: 1; min-width: 0; }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Requests & admin ---------- */
.req-list { padding-top: 4px; padding-bottom: 4px; }
.req { padding: 12px 0; }
.reply { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: .92rem; }
.chip.warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
pre.code { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 12px; font-size: .8rem; overflow-x: auto; max-height: 420px; }
.transcript { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
details summary { cursor: pointer; padding: 6px 0; }
.list.card { padding-left: 16px; padding-right: 16px; }

/* ---------- Review Claude's work ---------- */
:root { --add-bg: #e3f3e1; --add-ink: #1f5b25; --del-bg: #fbe3df; --del-ink: #8c2a1f; }
@media (prefers-color-scheme: dark) { :root { --add-bg: #1f3a22; --add-ink: #a9dfa9; --del-bg: #43211c; --del-ink: #f2aba2; } }
.review.deciding { border: 2px solid var(--accent); }
.banner { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; font-size: .92rem; }
.summary { background: var(--surface-2); border-radius: 10px; padding: 4px 14px; margin: 4px 0 12px; }
.summary p, .summary ul { margin: 10px 0; }
.summary h3 { margin: 12px 0 4px; font-size: 1rem; }
.test-badge { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-weight: 700; border-radius: 10px; padding: 10px 12px; }
.test-badge.pass { background: var(--add-bg); color: var(--add-ink); }
.test-badge.fail { background: var(--del-bg); color: var(--del-ink); }
.test-badge .small { font-weight: 500; }
.warn-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; }
.warn-list li { padding: 6px 0; }
.changed-files { list-style: none; padding: 0; margin: 6px 0 8px; }
.changed-files li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); }
.changed-files li:first-child { border-top: 0; }
.diffstat { margin-left: auto; font: 600 .8rem ui-monospace, Menlo, monospace; white-space: nowrap; }
.diffstat .plus { color: var(--add-ink); } .diffstat .minus { color: var(--del-ink); }
details.exact > summary { font-weight: 600; color: var(--accent); }
.diff-file { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; overflow: hidden; }
.diff-file > summary { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 8px 10px; background: var(--surface-2); }
.diff { font: .78rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; max-height: 520px; overflow-y: auto; }
.dl { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0 10px 0 1.8em; text-indent: -1.4em; }
.dl .sign { display: inline-block; width: 1.4em; text-align: center; opacity: .7; user-select: none; }
.dl.add { background: var(--add-bg); color: var(--add-ink); }
.dl.del { background: var(--del-bg); color: var(--del-ink); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--del-ink) 40%, transparent); }
.dl.ctx { color: var(--muted); }
.dl.hunk { color: var(--muted); background: var(--surface-2); font-style: italic; padding: 4px 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.decide { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.decide button { flex: 1 1 auto; }

/* Pounds + ounces weight entry (request #2) */
fieldset.lboz { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.lboz legend { padding: 0; margin-bottom: 4px; }
.unit-input { position: relative; display: block; margin: 0; }
.unit-input input { padding-right: 38px; }
.unit-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: .9rem; pointer-events: none; }
/* Shared clay list (request #1) */
.suggest { display: block; background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
a.suggest:hover { filter: brightness(0.98); }
.chip.small { font-size: .7rem; padding: 2px 8px; vertical-align: middle; }

/* Request #7: colour theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.theme-swatch { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; width: 100%; padding: 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); min-height: 0; text-align: left; }
.theme-swatch[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.sw-preview { position: relative; display: block; height: 58px; border-radius: 8px; background: var(--sw-bg); padding: 7px; overflow: hidden; }
.sw-card { display: flex; flex-direction: column; gap: 4px; height: 100%; width: 72%; background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 6px; padding: 5px; }
.sw-line { display: block; height: 4px; width: 80%; border-radius: 2px; background: var(--sw-text); opacity: .75; }
.sw-line.short { width: 50%; opacity: .4; }
.sw-btn { display: block; margin-top: auto; height: 8px; width: 55%; border-radius: 4px; background: var(--sw-accent); }
.sw-chip { position: absolute; right: 7px; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--sw-soft); border: 3px solid var(--sw-accent); }
.sw-name { font-size: .85rem; font-weight: 600; padding: 0 2px; }

/* Admin sections (Users, Requests, Shared clays, Shared glazes) */
.admin-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.admin-nav a { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: .85rem; font-weight: 600; }
.admin-nav a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.admin-tile { display: block; text-decoration: none; color: inherit; }
.admin-tile h2 { margin: 0 0 4px; font-size: 1.1rem; }
.admin-tile .todo { margin-top: 8px; font-weight: 600; color: var(--accent); font-size: .9rem; }
.admin-tile:hover, .admin-tile:focus-visible { border-color: var(--accent); }
.disabled-banner { background: color-mix(in srgb, var(--danger, #b3261e) 14%, var(--surface)); border: 1px solid var(--danger, #b3261e);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }

/* Front-page gallery for visitors */
.welcome { text-align: center; padding: 18px 8px 8px; }
.welcome h1 { margin-bottom: 6px; }
.welcome .row { justify-content: center; margin-top: 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery-grid a { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gallery-grid a:hover img, .gallery-grid a:focus-visible img { transform: scale(1.03); }
.gallery-grid .cap { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; color: #fff; font-size: .8rem; line-height: 1.25;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.gallery-grid .cap strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .gallery-grid img { transition: none; } }

/* Continue with Google */
.google-btn { background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; text-decoration: none; justify-content: center; }
.google-btn:hover, .google-btn:focus-visible { border-color: var(--accent); }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Privacy policy and terms (web/privacy.html, web/terms.html) */
.legal-page { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; line-height: 1.6; }
.legal-page h2 { margin-top: 28px; }
.legal-page h3 { margin: 18px 0 4px; font-size: 1rem; }
.legal-page ul { padding-left: 20px; }
.legal-page li { margin: 4px 0; }
