:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;

  /* Brady-blue wall, cream frames, warm "big me up" orange */
  --bg: oklch(0.27 0.075 262);
  --bg-deep: oklch(0.21 0.06 262);
  --surface: oklch(0.33 0.08 262);
  --cream: oklch(0.95 0.03 85);
  --cream-dim: oklch(0.82 0.03 85);
  --muted: oklch(0.72 0.04 255);
  --accent: oklch(0.72 0.17 50);
  --accent-ink: oklch(0.25 0.06 50);
  --boston: oklch(0.8 0.13 85);
  --radius: 14px;
  --font-display: 'Gambetta', 'Georgia', serif;
  --font-body: 'General Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 50% -10%, oklch(0.36 0.09 262) 0%, transparent 70%);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Header */
.top { max-width: 980px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-3); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.brand { display: flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 7px); gap: 2px; flex-shrink: 0; }
.brand-mark i { width: 7px; height: 7px; background: var(--cream); border-radius: 1.5px; }
.brand-mark i:nth-child(5) { background: var(--accent); }
.brand-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.brand-name em { font-style: italic; color: var(--accent); }

.domain-switch { display: flex; background: var(--bg-deep); border-radius: 999px; padding: 3px; }
.domain-switch button { font-size: var(--text-xs); font-weight: 600; padding: var(--space-1) var(--space-3); border-radius: 999px; color: var(--muted); transition: background .2s, color .2s; }
.domain-switch button[aria-selected="true"] { background: var(--cream); color: var(--bg); }

.search-wrap { margin-top: var(--space-4); }
.search { display: flex; align-items: center; gap: var(--space-3); background: var(--cream); color: var(--bg); border-radius: 999px; padding: var(--space-3) var(--space-5); box-shadow: 0 6px 24px oklch(0.1 0.05 262 / .45); }
.search svg { color: var(--bg); opacity: .6; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: var(--text-base); font-weight: 500; color: var(--bg); outline: none; }
.search input::placeholder { color: oklch(0.45 0.05 262); font-weight: 400; }
.search:focus-within { box-shadow: 0 0 0 3px var(--accent), 0 6px 24px oklch(0.1 0.05 262 / .45); }
.chips { display: flex; gap: var(--space-2); margin-top: var(--space-3); overflow-x: auto; scrollbar-width: none; }
.chip { flex-shrink: 0; font-size: var(--text-xs); font-weight: 500; padding: var(--space-1) var(--space-3); border-radius: 999px; border: 1px solid oklch(0.95 0.03 85 / .25); color: var(--cream-dim); transition: all .15s; }
.chip[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* Wall */
main { max-width: 980px; margin: 0 auto; padding: 0 var(--space-4) calc(var(--space-12) + var(--space-12)); }
.wall-head { display: flex; justify-content: space-between; align-items: baseline; padding: var(--space-3) var(--space-1) var(--space-3); gap: var(--space-3); }
.wall-label { font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); font-weight: 500; }
.wall-label b { font-style: normal; color: var(--boston); font-weight: 600; }
.wall-count { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(4px, 1vw, 10px);
  background: var(--cream);
  padding: clamp(4px, 1vw, 10px);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 20px 60px oklch(0.1 0.05 262 / .55);
}
.tile {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); cursor: pointer; isolation: isolate;
  animation: pop .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: breathe 9s ease-in-out infinite alternate; }
.tile:nth-child(3n+2) img { animation-duration: 11s; animation-delay: -3s; }
.tile:nth-child(3n) img { animation-duration: 10s; animation-delay: -6s; }
@keyframes breathe { from { transform: scale(1.02) translate(0,0); } to { transform: scale(1.12) translate(-2%, -2%); } }
@media (prefers-reduced-motion: reduce) { .tile img { animation: none; } .tile { animation: none; } }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.15 0.05 262 / .88) 0%, transparent 48%); z-index: 1; }
.tile:hover img { filter: brightness(1.06); }
.tile-open { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); }
.tile-info { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-3); z-index: 3; pointer-events: none; }
.tile-to { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-to span { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; color: var(--cream-dim); margin-right: 2px; }
.tile-from { font-size: var(--text-xs); color: var(--cream-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-top { position: absolute; top: var(--space-2); left: var(--space-2); right: var(--space-2); display: flex; justify-content: space-between; align-items: flex-start; z-index: 3; gap: var(--space-1); pointer-events: none; }
.pill { font-size: var(--text-xs); font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; background: oklch(0.15 0.05 262 / .6); backdrop-filter: blur(6px); white-space: nowrap; }
.pill.bos { background: var(--boston); color: oklch(0.25 0.06 85); }
.tile .heart { pointer-events: auto; }

.heart { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 600; padding: 5px 9px 5px 7px; border-radius: 999px; background: oklch(0.15 0.05 262 / .6); backdrop-filter: blur(6px); transition: transform .15s, background .2s; }
.heart svg { width: 16px; height: 16px; }
.heart[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.heart[aria-pressed="true"] svg { fill: currentColor; }
.heart:active { transform: scale(.9); }
.heart.bump { animation: bump .4s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }

/* CTA tile for empty slots */
.tile.cta { background: var(--bg-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); text-align: center; padding: var(--space-3); color: var(--cream-dim); border: 2px dashed oklch(0.95 0.03 85 / .2); }
.tile.cta::after { display: none; }
.tile.cta svg { width: 28px; height: 28px; color: var(--accent); }
.tile.cta p { font-size: var(--text-xs); font-weight: 500; }

/* Phone: 3x3 stays, info trims down */
@media (max-width: 560px) {
  .tile { border-radius: 9px; }
  .grid { border-radius: 13px; }
  .tile-info { padding: var(--space-2); }
  .tile-to { font-size: var(--text-sm); }
  .tile-to span { display: none; }
  .tile-from { display: none; }
  .tile-top .pill:not(.bos) { display: none; }
  .tile .heart { padding: 3px 6px 3px 5px; }
  .tile .heart svg { width: 13px; height: 13px; }
  .tile .heart .n { display: none; }
  .tile-top { top: 6px; left: 6px; right: 6px; }
  .brand-name { font-size: var(--text-base); }
  .tile.cta p { display: none; }
}

.empty { grid-column: 1 / -1; background: var(--bg-deep); border-radius: var(--radius); padding: var(--space-12) var(--space-6); text-align: center; color: var(--cream-dim); }
.empty h2 { font-family: var(--font-display); font-size: var(--text-lg); color: var(--cream); margin-bottom: var(--space-2); font-weight: 600; }
.empty button { margin-top: var(--space-4); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--text-sm); padding: var(--space-2) var(--space-5); border-radius: 999px; }

.pager { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); }
.pager > button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); transition: opacity .2s, background .2s; }
.pager > button:hover:not(:disabled) { background: oklch(0.4 0.09 262); }
.pager > button:disabled { opacity: .3; cursor: default; }
.dots { display: flex; gap: var(--space-2); }
.dots button { width: 9px; height: 9px; border-radius: 50%; background: oklch(0.95 0.03 85 / .3); transition: all .2s; }
.dots button[aria-current="true"] { background: var(--cream); width: 24px; border-radius: 6px; }
.proto-note { text-align: center; font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-6); }

.fab { position: fixed; left: 50%; bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: var(--space-2); background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--text-sm); padding: var(--space-3) var(--space-6); border-radius: 999px; box-shadow: 0 10px 30px oklch(0.1 0.05 262 / .6); z-index: 20; white-space: nowrap; transition: transform .15s; }
.fab:hover { transform: translateX(-50%) translateY(-2px); }

/* Viewer */
.viewer { position: fixed; inset: 0; z-index: 50; background: oklch(0.12 0.04 262 / .88); backdrop-filter: blur(10px); display: grid; place-items: center; padding: var(--space-4); animation: fade .2s ease; }
.viewer[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.viewer-card { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; background: var(--bg-deep); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px oklch(0.05 0.03 262 / .7); animation: rise .3s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.v-media { position: relative; aspect-ratio: 3 / 4; max-height: 62dvh; overflow: hidden; background: #000; flex-shrink: 1; }
.v-media img { width: 100%; height: 100%; object-fit: cover; animation: breathe 12s ease-in-out infinite alternate; }
.v-progress { position: absolute; top: var(--space-3); left: var(--space-3); right: var(--space-3); height: 3px; background: oklch(1 0 0 / .3); border-radius: 2px; overflow: hidden; }
.v-progress span { display: block; height: 100%; width: 0; background: var(--cream); }
.v-sound { position: absolute; left: 50%; bottom: var(--space-3); transform: translateX(-50%); display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-xs); font-weight: 500; background: oklch(0.15 0.05 262 / .65); backdrop-filter: blur(6px); padding: var(--space-1) var(--space-3); border-radius: 999px; white-space: nowrap; }
.v-sound svg { width: 16px; height: 16px; }
.v-close { position: absolute; top: var(--space-5); right: var(--space-3); z-index: 5; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: oklch(0.15 0.05 262 / .6); backdrop-filter: blur(6px); }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: oklch(0.15 0.05 262 / .5); backdrop-filter: blur(6px); }
.v-prev { left: var(--space-2); } .v-next { right: var(--space-2); }
.v-info { padding: var(--space-4) var(--space-5) var(--space-5); }
.v-to { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.1; }
.v-to span { font-family: var(--font-body); font-size: var(--text-sm); color: var(--cream-dim); font-weight: 500; }
.v-from { font-size: var(--text-sm); color: var(--cream-dim); margin-top: var(--space-1); }
.v-caption { margin-top: var(--space-3); font-size: var(--text-base); }
.v-caption:empty { display: none; }
.v-meta { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }
.tag { font-size: var(--text-xs); font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface); }
.tag.bos { background: var(--boston); color: oklch(0.25 0.06 85); }
.ttl { font-size: var(--text-xs); color: var(--muted); }
.heart.big { margin-left: auto; font-size: var(--text-sm); padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3); background: var(--surface); }
.heart.big svg { width: 18px; height: 18px; }
.heart.big[aria-pressed="true"] { background: var(--accent); }

.toast { position: fixed; left: 50%; bottom: calc(var(--space-12) + var(--space-10)); transform: translateX(-50%); background: var(--cream); color: var(--bg); font-size: var(--text-sm); font-weight: 500; padding: var(--space-3) var(--space-5); border-radius: 12px; z-index: 60; box-shadow: 0 10px 30px oklch(0.1 0.05 262 / .5); width: max-content; max-width: calc(100vw - 2rem); text-align: center; animation: rise .25s ease; }

/* Keep all 9 faces in one screen view */
.grid, .wall-head { max-width: max(340px, calc((100dvh - 290px) * 0.75)); margin-inline: auto; }
@media (min-width: 761px) {
  .fab { left: auto; right: var(--space-8); transform: none; }
  .fab:hover { transform: translateY(-2px); }
}
@media (min-width: 761px) {
  .tile:not(.cta), .tile.cta { aspect-ratio: 1 / 1; }
  .grid, .wall-head { max-width: max(560px, calc(100dvh - 270px)); }
  .tile-to { font-size: var(--text-base); }
}

/* ===================== v2 additions ===================== */
[hidden] { display: none !important; }
.search-clear { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--bg); opacity: .6; }
.search-clear svg { width: 16px; height: 16px; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.soon { display: inline-block; font-size: var(--text-xs); font-weight: 600; color: var(--accent); margin-bottom: 2px; }
@media (max-width: 560px) { .soon { display: none; } }
.foot { text-align: center; margin-top: var(--space-8); color: var(--muted); font-size: var(--text-xs); display: grid; gap: var(--space-2); }
.foot p:first-child { color: var(--cream-dim); font-size: var(--text-sm); }
.foot a { color: var(--cream-dim); }

/* shared buttons / fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-weight: 600; font-size: var(--text-sm); padding: var(--space-3) var(--space-5); border-radius: 999px; transition: transform .12s, background .2s, opacity .2s; min-height: 44px; }
.btn:active { transform: scale(.97); }
.btn.sm { min-height: 36px; padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn.wide { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface); color: var(--cream); }
.btn.ghost:hover { background: oklch(0.4 0.09 262); }
.btn.danger { background: oklch(0.58 0.19 25); color: #fff; }
.btn.approve { background: oklch(0.74 0.16 150); color: oklch(0.22 0.06 150); }
.btn kbd { font: inherit; font-size: 11px; opacity: .65; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.field { display: grid; gap: var(--space-1); position: relative; }
.field > span { font-size: var(--text-xs); font-weight: 600; color: var(--cream-dim); }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--cream); background: var(--surface); border: 1px solid oklch(0.95 0.03 85 / .12); border-radius: 12px; padding: var(--space-3) var(--space-4); width: 100%; outline: none; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.72 0.17 50 / .25); }
.field select option, .field select optgroup { background: var(--bg-deep); color: var(--cream); }
.field ::placeholder { color: var(--muted); opacity: .8; }
.chars { position: absolute; right: var(--space-3); bottom: var(--space-2); font-size: 11px; color: var(--muted); }
.muted { color: var(--muted); }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 50; background: oklch(0.12 0.04 262 / .88); backdrop-filter: blur(10px); display: grid; place-items: center; padding: var(--space-4); animation: fade .2s ease; overflow-y: auto; }
#confirm { z-index: 70; }
.viewer-card { position: relative; width: min(420px, 100%); max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; background: var(--bg-deep); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px oklch(0.05 0.03 262 / .7); animation: rise .3s cubic-bezier(.2,.8,.2,1); }
.v-media img, .v-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-media video { background: #000; }
.kb { animation: breathe 12s ease-in-out infinite alternate; }
.v-progress { z-index: 2; } .v-sound { z-index: 2; pointer-events: none; } .v-nav { z-index: 3; }

/* recorder */
.rec-card { position: relative; width: min(460px, 100%); background: var(--bg-deep); border-radius: 22px; padding: var(--space-8) var(--space-6) var(--space-6); box-shadow: 0 30px 80px oklch(0.05 0.03 262 / .7); animation: rise .3s cubic-bezier(.2,.8,.2,1); margin: auto; }
.rec-card .v-close { top: var(--space-3); right: var(--space-3); }
.rec-steps { display: flex; gap: 6px; margin-bottom: var(--space-5); width: 84px; }
.rec-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface); transition: background .3s; }
.rec-steps span.on { background: var(--accent); }
.rec-step h2 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.1; }
.rec-sub { color: var(--cream-dim); margin-top: var(--space-2); font-size: var(--text-sm); }
.rec-sub.center { text-align: center; }
.rec-choices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin-top: var(--space-6); }
.choice { display: grid; justify-items: start; gap: 2px; text-align: left; background: var(--surface); border-radius: 16px; padding: var(--space-5) var(--space-4); cursor: pointer; border: 1px solid transparent; transition: border-color .2s, transform .15s; }
.choice:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice svg { width: 28px; height: 28px; color: var(--accent); margin-bottom: var(--space-3); }
.choice b { font-size: var(--text-base); }
.choice span { font-size: var(--text-xs); color: var(--muted); }
.rec-err { margin-top: var(--space-4); font-size: var(--text-sm); color: oklch(0.8 0.12 40); background: oklch(0.58 0.19 25 / .15); border-radius: 10px; padding: var(--space-3) var(--space-4); }
.rec-fine { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--muted); }
.cam { position: relative; aspect-ratio: 3 / 4; max-height: 58dvh; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam video.mirror { transform: scaleX(-1); }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 120px; font-weight: 600; color: var(--cream); text-shadow: 0 4px 30px #0008; }
.cam-count.pulse { animation: pulse .8s ease-out; }
@keyframes pulse { from { transform: scale(1.4); opacity: 0; } 30% { opacity: 1; } }
.cam-timer { position: absolute; top: var(--space-3); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: var(--space-2); background: oklch(0.15 0.05 262 / .7); padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.cam-timer i { width: 9px; height: 9px; border-radius: 50%; background: oklch(0.62 0.22 25); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.cam-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: oklch(1 0 0 / .2); }
.cam-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.cam-controls { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-4); }
.cam-controls .btn { min-width: 84px; }
.rec-btn { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--cream); display: grid; place-items: center; }
.rec-btn span { width: 52px; height: 52px; border-radius: 50%; background: oklch(0.62 0.22 25); transition: all .2s; }
.rec-btn.on span { width: 26px; height: 26px; border-radius: 6px; }
.rec-btn:disabled { opacity: .5; }
.review { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 34dvh; margin: 0 auto var(--space-4); width: fit-content; min-width: 50%; }
.review video { height: 100%; width: 100%; object-fit: cover; display: block; }
.review .btn { position: absolute; top: var(--space-2); right: var(--space-2); }
.fields { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.done { text-align: center; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto var(--space-4); }
.done-mark svg { width: 30px; height: 30px; stroke-width: 2.5; }
.done .btn { margin-top: var(--space-6); }

/* confirm */
.cf-card { width: min(380px, 100%); background: var(--bg-deep); border-radius: 18px; padding: var(--space-6); box-shadow: 0 30px 80px #0008; animation: rise .2s ease; }
.cf-card h2 { font-size: var(--text-lg); font-weight: 600; }
.cf-card p { color: var(--cream-dim); margin-top: var(--space-2); font-size: var(--text-sm); }
.cf-actions { display: flex; gap: var(--space-3); justify-content: flex-end; margin-top: var(--space-6); }

/* admin gate */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-4); }
.gate-card { width: min(380px, 100%); background: var(--bg-deep); border-radius: 22px; padding: var(--space-8) var(--space-6); display: grid; gap: var(--space-4); box-shadow: 0 30px 80px #0006; }
.brand-mark.lg { grid-template-columns: repeat(3, 12px); gap: 3px; }
.brand-mark.lg i { width: 12px; height: 12px; border-radius: 3px; }
.gate-card h1 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1; }
.gate-card > p { color: var(--cream-dim); font-size: var(--text-sm); }
.gate-err { color: oklch(0.8 0.12 40) !important; }
.gate-hint { font-size: var(--text-xs) !important; color: var(--muted) !important; }
.gate-hint b { color: var(--cream); }
.gate-back { font-size: var(--text-xs); color: var(--cream-dim); text-align: center; }

/* admin */
.admin { max-width: 1120px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-12); }
.a-top { display: flex; align-items: center; gap: var(--space-3); }
.brand-name.sm { font-size: var(--text-base); }
.a-badge { font-size: var(--text-xs); font-weight: 600; background: var(--cream); color: var(--bg); padding: 2px 10px; border-radius: 999px; }
.a-link { margin-left: auto; font-size: var(--text-sm); color: var(--cream-dim); }
.a-tabs { display: flex; gap: var(--space-1); margin-top: var(--space-5); border-bottom: 1px solid oklch(0.95 0.03 85 / .12); overflow-x: auto; scrollbar-width: none; }
.a-tabs button { padding: var(--space-3) var(--space-4); font-size: var(--text-sm); font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: var(--space-2); }
.a-tabs button[aria-selected="true"] { color: var(--cream); border-color: var(--accent); }
.count { font-size: 11px; font-weight: 600; background: var(--surface); padding: 1px 7px; border-radius: 999px; }
.a-tabs button[aria-selected="true"] .count { background: var(--accent); color: var(--accent-ink); }
.a-body { margin-top: var(--space-5); }
.a-label { font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.a-empty { text-align: center; background: var(--bg-deep); border-radius: 18px; padding: var(--space-12) var(--space-6); }
.a-empty h2 { font-size: var(--text-lg); font-weight: 600; }
.a-empty p { color: var(--muted); margin-top: var(--space-2); font-size: var(--text-sm); }
.a-hint { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-3); }

.review-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-5); align-items: start; }
.queue { display: grid; gap: var(--space-2); background: var(--bg-deep); border-radius: 18px; padding: var(--space-4); }
.q-item { display: flex; align-items: center; gap: var(--space-3); text-align: left; padding: var(--space-2); border-radius: 12px; border: 1px solid transparent; transition: background .15s; }
.q-item:hover { background: var(--surface); }
.q-item.on { background: var(--surface); border-color: var(--accent); }
.q-item img, .q-ph, .row img { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--surface); }
.q-item span { display: grid; min-width: 0; }
.q-item b { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item small { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.judge { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: var(--space-6); background: var(--bg-deep); border-radius: 18px; padding: var(--space-5); }
.judge-media { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #000; }
.judge-media img, .judge-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.judge-info { display: flex; flex-direction: column; }
.judge-info .v-to { margin-top: var(--space-2); }
.judge-info .v-caption.muted { color: var(--muted); }
.judge-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-3); margin-top: auto; padding-top: var(--space-6); }
.judge-actions .btn { min-height: 52px; font-size: var(--text-base); }
.rows { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.row { display: flex; align-items: center; gap: var(--space-4); background: var(--bg-deep); border-radius: 14px; padding: var(--space-3) var(--space-4); }
.row-main { flex: 1; min-width: 0; font-size: var(--text-sm); }
.row-meta { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-1); flex-wrap: wrap; }
.settings { display: grid; gap: var(--space-4); max-width: 680px; }
.set-card { background: var(--bg-deep); border-radius: 18px; padding: var(--space-5) var(--space-6); display: grid; gap: var(--space-3); }
.set-card h2 { font-size: var(--text-base); font-weight: 600; }
.set-card p { font-size: var(--text-sm); }
.set-card.test { border: 1px dashed oklch(0.95 0.03 85 / .2); }
.seg { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.seg button { padding: var(--space-2) var(--space-4); border-radius: 999px; background: var(--surface); font-size: var(--text-sm); font-weight: 500; min-height: 40px; }
.seg button[aria-checked="true"] { background: var(--cream); color: var(--bg); font-weight: 600; }
.check { display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-sm); color: var(--cream-dim); }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }
.row-btns { display: flex; gap: var(--space-2); flex-wrap: wrap; }

@media (max-width: 860px) {
  .review-grid { grid-template-columns: 1fr; }
  .queue { grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; }
  .queue .a-label { display: none; }
}
@media (max-width: 640px) {
  .judge { grid-template-columns: 1fr; padding: var(--space-3); gap: var(--space-4); }
  .judge-media { max-height: 56dvh; margin: 0 auto; width: 100%; }
  .judge-info { padding: 0 var(--space-2) var(--space-2); }
  .judge-actions { position: sticky; bottom: var(--space-3); padding-top: var(--space-4); }
  .rec-card { padding: var(--space-6) var(--space-4) var(--space-4); }
  .overlay { padding: var(--space-2); }
  .a-link { display: none; }
}
@media (max-width: 640px) {
  .judge-media { max-height: 46dvh; width: auto; aspect-ratio: 3 / 4; }
  .judge-actions { background: linear-gradient(to top, var(--bg-deep) 70%, transparent); margin: 0 calc(-1 * var(--space-2)); padding: var(--space-6) var(--space-2) var(--space-2); }
  .btn kbd { display: none; }
  .a-tabs button { padding: var(--space-3) var(--space-3); }
  .a-tabs { gap: 0; }
}
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
