/* Rejo Abraham Mathew — sheet music store.
   Black and white only. The engraved-score title page is the visual reference:
   centred title, left/right credit line, five-line staff as the one ornament. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --muted: #555555;
  --rule: #d4d4d4;
  --wash: #f3f3f3;
  --invert-paper: #000000;
  --invert-ink: #ffffff;
  --display: "Old Standard TT", "Century Schoolbook", "TeX Gyre Schola", "New Century Schoolbook", Georgia, "Times New Roman", serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --measure: 42rem;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --ink: #ffffff;
    --muted: #a6a6a6;
    --rule: #333333;
    --wash: #151515;
    --invert-paper: #ffffff;
    --invert-ink: #000000;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: -0.005em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wide { max-width: calc(64rem + var(--gutter) * 2); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- Top bar ---------- */

.topbar { border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-family: var(--display); font-size: 1.2rem; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 0.95rem; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a[aria-current="page"] { text-decoration: underline; }
@media (max-width: 520px) {
  .topbar .wrap { gap: 10px; }
  .brand { font-size: 1rem; }
  .nav { gap: 14px; font-size: 0.9rem; }
  .nav .hide-sm { display: none; }
}

.announcement { background: var(--ink); color: var(--paper); text-align: center; font-size: 0.9rem; padding: 8px var(--gutter); }

/* ---------- Title page (home hero) ---------- */

.title-page { padding-top: clamp(40px, 8vw, 88px); text-align: center; }
.title-page h1 {
  font-size: clamp(2.4rem, 1.4rem + 5vw, 4.4rem);
  line-height: 1.05;
  margin: 0 auto;
  max-width: 14ch;
}
.title-page .key { font-family: var(--display); font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); margin-top: 10px; }
.credits {
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  font-family: var(--display);
  font-size: 1rem;
  margin-top: clamp(24px, 5vw, 40px);
  text-align: left;
}
.credits span:last-child { text-align: right; margin-left: auto; }

/* The one ornament: a five-line staff. */
.staff {
  height: 33px;
  margin: 14px 0 0;
  background-image: repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px 8px);
  background-size: 100% 33px;
  background-repeat: no-repeat;
  position: relative;
}
.staff::before, .staff::after { content: ""; position: absolute; top: 0; width: 1px; height: 33px; background: var(--ink); }
.staff::before { left: 0; }
.staff::after { right: 0; box-shadow: -4px 0 0 var(--ink); width: 3px; }

/* ---------- Contents (catalogue) ---------- */

.contents { padding-top: clamp(32px, 6vw, 56px); padding-bottom: 24px; }
.contents h2 { margin-bottom: 8px; }
.contents .lede { color: var(--muted); margin-bottom: 20px; }

.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 44px 1fr; gap: 0 10px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.entry:first-child { border-top: 1px solid var(--rule); }

.line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.line .title { font-family: var(--display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); text-decoration: none; line-height: 1.25; }
.line .title:hover { text-decoration: underline; }
.leader { flex: 1; min-width: 24px; border-bottom: 2px dotted var(--ink); opacity: 0.45; transform: translateY(-5px); }
.price { font-family: var(--display); font-size: 1.2rem; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.price s { color: var(--muted); font-size: 0.95rem; margin-right: 6px; }
.meta { grid-column: 2; color: var(--muted); font-size: 0.9rem; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.meta a { color: var(--muted); }

/* Notehead toggle: an open whole note that fills when chosen. */
.note {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  margin-top: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  place-items: center;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.note svg { width: 30px; height: 22px; overflow: visible; }
.note .head { fill: none; stroke: currentColor; stroke-width: 2.2; transition: fill 0.15s ease; }
.note[aria-pressed="true"] .head { fill: currentColor; }
.note:hover .head { stroke-width: 3; }
@media (prefers-reduced-motion: reduce) { .note .head { transition: none; } }

/* ---------- Buttons & forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 600 1rem/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--ink); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn.block { width: 100%; }
.btn.link { background: none; border: 0; color: var(--ink); padding: 0; min-height: 0; text-decoration: underline; font-weight: 400; }

label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; font-weight: 400; }
.field { margin-bottom: 20px; }

input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="url"], input[type="tel"], textarea, select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.4 var(--text); /* 16px stops iOS Safari zooming on focus */
  -webkit-appearance: none;
  appearance: none;
}
textarea { min-height: 140px; resize: vertical; }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="file"] { font: inherit; font-size: 0.95rem; max-width: 100%; }
input[type="file"]::file-selector-button {
  font: 600 0.9rem var(--text);
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  margin-right: 12px;
  cursor: pointer;
}
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); vertical-align: middle; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 2px; flex: none; }

.notice { border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
.notice.solid { background: var(--ink); color: var(--paper); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Selection bar ---------- */

.selbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--invert-paper);
  color: var(--invert-ink);
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%);
  visibility: hidden;
  transition: transform 0.2s ease, visibility 0.2s;
}
.selbar.show { transform: none; visibility: visible; }
.selbar .inner { max-width: var(--measure); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.selbar .summary { font-size: 0.95rem; line-height: 1.3; }
.selbar .summary strong { font-family: var(--display); font-size: 1.25rem; font-weight: 400; display: block; }
.selbar .btn { background: var(--invert-ink); color: var(--invert-paper); border-color: var(--invert-ink); }
@media (prefers-reduced-motion: reduce) { .selbar { transition: none; } }
body.has-selbar { padding-bottom: 88px; }
@media (max-width: 360px) { .nav { gap: 10px; font-size: 0.85rem; } .brand { font-size: 0.95rem; } }

/* ---------- Sections ---------- */

.section { padding-top: clamp(36px, 7vw, 64px); padding-bottom: clamp(36px, 7vw, 64px); border-top: 1px solid var(--rule); }
.contents + .section { border-top: 0; }
.section h2 { margin-bottom: 18px; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 4px 14px; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.05rem;
}
.steps strong { font-weight: 600; }
.steps p { margin: 0; color: var(--muted); }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem/1 var(--display); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 0 16px; color: var(--muted); }
.faq .answer p:last-child { margin: 0; }

.pull { font-family: var(--display); font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem); line-height: 1.4; }

/* ---------- Product page ---------- */

.sheet-head { text-align: center; padding-top: clamp(32px, 6vw, 64px); }
.sheet-head h1 { font-size: clamp(2.2rem, 1.4rem + 4vw, 3.6rem); }
.sheet-head .sub { font-family: var(--display); font-size: 1.15rem; margin-top: 8px; }
.sheet-head .credits { font-size: 0.98rem; }

.buybox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.buybox .price { font-size: 2rem; }
.buybox .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .buybox .actions { width: 100%; } .buybox .actions .btn { flex: 1; } }

.facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.facts li { font-size: 0.9rem; color: var(--muted); }
.facts strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }

.page-sample { margin: 28px 0 0; }
.page-sample img { width: 100%; background: #fff; border: 1px solid var(--rule); border-radius: 4px; }
.page-sample figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; text-align: center; }

.yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 0; padding: 0; cursor: pointer; color: #fff; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.yt .play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt .play span { width: 72px; height: 72px; border-radius: 50%; background: rgba(0, 0, 0, 0.75); border: 2px solid #fff; display: grid; place-items: center; }
.yt .play svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Checkout & order ---------- */

.page-head { padding-top: clamp(32px, 6vw, 56px); padding-bottom: 20px; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
.page-head p { color: var(--muted); margin: 10px 0 0; }

.lines { list-style: none; margin: 0 0 8px; padding: 0; border-top: 1px solid var(--ink); }
.lines li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.lines .t { font-family: var(--display); font-size: 1.15rem; }
.lines .t small { display: block; font-family: var(--text); font-size: 0.85rem; color: var(--muted); }
.lines .total { border-bottom: 1px solid var(--ink); font-weight: 600; }
.lines .total .price { font-size: 1.4rem; }

.tracker { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tracker li { font-size: 0.78rem; color: var(--muted); line-height: 1.3; padding-top: 12px; border-top: 3px solid var(--rule); }
.tracker li.done { color: var(--ink); border-top-color: var(--ink); }
.tracker li.now { color: var(--ink); font-weight: 700; border-top-color: var(--ink); }

.pay { display: grid; gap: 24px; grid-template-columns: 1fr; margin: 8px 0 32px; }
@media (min-width: 720px) { .pay { grid-template-columns: 240px 1fr; align-items: start; } }
.qr { background: #fff; padding: 10px; border-radius: var(--radius); border: 1px solid var(--rule); width: 100%; max-width: 260px; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
.amount { font-family: var(--display); font-size: clamp(2.4rem, 2rem + 2vw, 3rem); line-height: 1; margin-bottom: 14px; }
.copyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.copyrow:first-of-type { border-top: 1px solid var(--rule); }
.copyrow .k { font-size: 0.8rem; color: var(--muted); display: block; }
.copyrow .v { font-weight: 600; word-break: break-all; }
.upi-app { display: none; }
.is-mobile .upi-app { display: inline-flex; }

.downloads { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--ink); }
.downloads li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.downloads .t { font-family: var(--display); font-size: 1.15rem; }
.downloads .t small { display: block; font-family: var(--text); font-size: 0.82rem; color: var(--muted); }

.prose h2 { margin: 36px 0 12px; font-size: 1.6rem; }
.prose h3 { margin: 24px 0 8px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--rule); padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 0.9rem; color: var(--muted); margin-top: 48px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--muted); }

/* =====================================================================
   Admin panel
   ===================================================================== */

.admin body, body.admin { font-size: 0.97rem; }
.admin-bar { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.admin-bar .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.admin-bar .brand { font-size: 1.05rem; }
.admin-bar .who { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 14px; white-space: nowrap; }
@media (max-width: 520px) { .admin-bar .brand .muted, .admin-bar .who .view-site { display: none; } }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { flex: none; text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; font-size: 0.92rem; white-space: nowrap; }
.admin-nav a[aria-current="page"] { border-color: var(--ink); font-weight: 600; }
.admin-nav .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 700; margin-left: 6px; }

.admin main { padding: 24px 0 64px; }
.admin h1 { font-size: clamp(1.7rem, 1.4rem + 1.5vw, 2.3rem); margin-bottom: 6px; }
.admin h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.admin .head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 8px; }
.stat { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.stat .l { font-size: 0.85rem; color: var(--muted); }
.stat.attention { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat.attention .l { color: var(--paper); opacity: 0.8; }

.list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.list > li { border-bottom: 1px solid var(--rule); }
.list .item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 4px; text-decoration: none; }
.list .item:hover { background: var(--wash); }
.list .main { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .side { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.list .sub { color: var(--muted); font-size: 0.86rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .item.unread .main::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); margin-right: 8px; vertical-align: middle; }

.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--ink); white-space: nowrap; }
.badge.solid { background: var(--ink); color: var(--paper); }
.badge.quiet { border-color: var(--rule); color: var(--muted); }

.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { flex: none; text-decoration: none; font-size: 0.88rem; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; }
.filters a[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { min-height: 42px; padding: 8px 12px; }
.search .btn { min-height: 42px; }

.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.kv { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; word-break: break-word; }
.utr { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.actions-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
@media (max-width: 520px) { .actions-bar .btn { flex: 1 1 100%; } }

.timeline { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.timeline li { padding: 8px 0 8px 18px; border-left: 1px solid var(--rule); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline .when { color: var(--muted); font-size: 0.8rem; display: block; }

.shot { max-width: 320px; border: 1px solid var(--rule); border-radius: 6px; }

.messages { display: grid; gap: 12px; margin: 0 0 20px; }
.msg { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; max-width: 92%; }
.msg.in { justify-self: start; }
.msg.out { justify-self: end; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.msg.out .from, .msg.out .when { color: var(--paper); opacity: 0.75; }
.msg.system { justify-self: center; max-width: 100%; border-style: dashed; font-size: 0.85rem; color: var(--muted); padding: 6px 12px; }
.msg .from { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.msg .when { font-size: 0.75rem; color: var(--muted); margin-top: 6px; }
.msg .body { white-space: pre-wrap; word-break: break-word; }
.msg .quoted { display: none; }
.msg details summary { font-size: 0.8rem; cursor: pointer; color: inherit; opacity: 0.7; margin-top: 6px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.data th { font-weight: 600; background: var(--wash); position: sticky; top: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; }

.grid-2 { display: grid; gap: 0 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.thumbs figure { margin: 0; border: 1px solid var(--rule); border-radius: 6px; padding: 6px; }
.thumbs img { background: #fff; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; width: 100%; border-radius: 3px; }
.thumbs figcaption { font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; z-index: 50; max-width: calc(100% - 32px); }

.progress { font-size: 0.9rem; margin-top: 10px; }

.login { max-width: 400px; margin: 0 auto; padding: clamp(40px, 10vw, 96px) var(--gutter); }
.login h1 { font-size: 2rem; margin-bottom: 8px; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums; }

.empty { padding: 28px 0; color: var(--muted); }

@media print {
  .topbar, .footer, .selbar, .admin-bar { display: none; }
}
