/* 🎭 Acuity Traitors — red & black theatre theme */
:root {
  --bg: #070405;
  --bg-card: #150a0d;
  --bg-raised: #200d12;
  --ink: #f6edee;
  --ink-dim: #c7a6ab;
  --ink-faint: #8a6068;
  --accent: #d4162e;        /* traitor red */
  --accent-hover: #f02540;
  --blood: #7a0f1d;         /* deep velvet red */
  --gold: #d9a441;
  --line: #401a21;
  --radius: 14px;

  --paper-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.45 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 520px at 50% -180px, #3a0810 0%, transparent 60%),
    radial-gradient(900px 500px at 50% 115%, #26050b 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

/* ═══════════ Curtain reveal (Unmasked wall only) ═══════════
   The curtains part, pull into a tieback waist, and STAY framing the stage. */
.curtain {
  position: fixed; inset: 0; z-index: 60; display: flex; pointer-events: none;
  overflow: hidden;
}
.curtain-rod {
  position: absolute; top: 14px; left: 6px; right: 6px; height: 9px; z-index: 3;
  background: linear-gradient(180deg, #f0cf85 0%, var(--gold) 40%, #8a6420 100%);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}
.curtain-rod::before, .curtain-rod::after {
  content: '';
  position: absolute; top: -7px;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #f0cf85 0%, var(--gold) 45%, #8a6420 100%);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.55);
}
.curtain-rod::before { left: -6px; }
.curtain-rod::after { right: -6px; }

.curtain-half {
  position: relative;
  width: 51%; height: 100%;
  margin-top: 18px;
  /* velvet: fabric grain → depth shading → sheen → organic, uneven folds */
  background:
    var(--paper-grain),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 14%, transparent 68%, rgba(0,0,0,.5) 96%, rgba(0,0,0,.65) 100%),
    linear-gradient(74deg, transparent 30%, rgba(255,255,255,.05) 46%, rgba(255,255,255,.09) 50%, rgba(255,255,255,.05) 54%, transparent 70%),
    linear-gradient(90deg,
      #4a0810 0%, #7a0f1d 2.5%, #a2172a 4.5%, #6e0d19 7%, #4f0912 10%,
      #8c1322 13%, #b31d31 16%, #7a0f1d 19.5%, #560a13 23%,
      #6e0d19 26%, #9d1526 30%, #7f1120 34%, #4a0810 38%,
      #8c1322 42%, #a2172a 45%, #6e0d19 49%, #530912 53%,
      #7a0f1d 57%, #ad1a2d 61%, #8c1322 65%, #560a13 69%,
      #6e0d19 73%, #97162a 77%, #7a0f1d 81%, #4f0912 85%,
      #8c1322 89%, #a2172a 92%, #6e0d19 95%, #4a0810 100%);
  background-blend-mode: overlay, normal, normal, normal;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.85);
}
/* rod-pocket gather: tight little pleats where the fabric meets the rod */
.curtain-half::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 42px;
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,.5) 0 5px, transparent 5px 9px,
      rgba(255,255,255,.09) 9px 12px, transparent 12px 19px),
    linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 100%);
}
/* gold tieback rope — fades in once the curtain is gathered */
.curtain-half::after {
  content: '';
  position: absolute; left: -4%; right: -4%; top: 53%; height: 16px;
  background: linear-gradient(180deg, #f0cf85 0%, var(--gold) 45%, #8a6420 100%);
  border-radius: 999px;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.55);
  opacity: 0;
  animation: ropeIn .4s ease 1.9s forwards;
}
@keyframes ropeIn { to { opacity: 1; } }

.curtain-half.left {
  transform-origin: left center;
  clip-path: polygon(0% 0%, 100% 0%, 100% 15%, 100% 28%, 100% 42%, 100% 55%, 100% 68%, 100% 80%, 100% 90%, 100% 100%, 0% 100%);
  animation: curtainL 1.7s cubic-bezier(.6,.05,.3,1) .5s forwards;
}
.curtain-half.right {
  margin-left: -2%;
  transform-origin: right center;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 90%, 0% 80%, 0% 68%, 0% 55%, 0% 42%, 0% 28%, 0% 15%);
  animation: curtainR 1.7s cubic-bezier(.6,.05,.3,1) .5s forwards;
}
/* gather to the sides and cinch into a smooth tieback waist, hem pooling out */
@keyframes curtainL {
  0%   { transform: scaleX(1); }
  60%  { filter: brightness(.95); }
  100% {
    transform: scaleX(0.26) skewY(.6deg);
    filter: brightness(.9);
    clip-path: polygon(0% 0%, 100% 0%, 97% 15%, 88% 28%, 72% 42%, 58% 55%, 70% 68%, 84% 80%, 94% 90%, 100% 100%, 0% 100%);
  }
}
@keyframes curtainR {
  0%   { transform: scaleX(1); }
  60%  { filter: brightness(.95); }
  100% {
    transform: scaleX(0.26) skewY(-.6deg);
    filter: brightness(.9);
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 6% 90%, 16% 80%, 30% 68%, 42% 55%, 28% 42%, 12% 28%, 3% 15%);
  }
}
/* phones: not enough room for a tied-back frame — the curtains exit fully */
@media (max-width: 720px) {
  @keyframes curtainL { 100% { transform: translateX(-103%); } }
  @keyframes curtainR { 100% { transform: translateX(103%); } }
  .curtain-half::after { display: none; }
}

.theatre-open .wrap { animation: houseLights 0.9s ease 0.8s both; }
.stage-lit .wrap { animation: houseLights 0.8s ease 0.05s both; }
@keyframes houseLights {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════ Floating embers ═══════════ */
.embers { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.embers span {
  position: absolute; bottom: -12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle, #ffb3a0 0%, var(--accent) 55%, transparent 75%);
  opacity: 0;
  animation: rise 9s linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(.7); opacity: 0; }
  8%   { opacity: .75; }
  55%  { opacity: .45; }
  100% { transform: translateY(-105vh) translateX(26px) scale(1.15); opacity: 0; }
}

.wrap, header.site { position: relative; z-index: 1; }

/* ═══════════ Header ═══════════ */
header.site { text-align: center; padding: 18px 0 26px; }
header.site .mask {
  font-size: 46px; display: inline-block;
  animation: maskSway 5.5s ease-in-out infinite;
  transform-origin: top center;
  filter: drop-shadow(0 6px 18px rgba(212, 22, 46, 0.45));
}
@keyframes maskSway {
  0%, 100% { transform: rotate(-5deg); }
  50%      { transform: rotate(5deg); }
}
header.site h1 {
  font-size: 30px;
  letter-spacing: 0.5px;
  margin-top: 6px;
  background: linear-gradient(100deg, var(--ink) 25%, var(--accent-hover) 60%, var(--gold) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: emberGlow 3.6s ease-in-out infinite;
}
@keyframes emberGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(212, 22, 46, 0.25)); }
  50%      { filter: drop-shadow(0 0 16px rgba(212, 22, 46, 0.55)); }
}
header.site p.tag { color: var(--ink-dim); font-size: 15px; margin-top: 6px; }
header.site p.just-game {
  color: var(--gold); font-size: 13px; font-style: italic;
  letter-spacing: 0.14em; margin-top: 2px;
}
header.site.compact { padding-bottom: 14px; }

nav.tabs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap;
}
nav.tabs a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
nav.tabs a.active {
  color: var(--ink); border-color: var(--accent);
  background: rgba(212, 22, 46, 0.14);
  box-shadow: 0 0 14px rgba(212, 22, 46, 0.25);
}
nav.tabs a:hover { color: var(--ink); border-color: var(--accent); }

/* ═══════════ Cards ═══════════ */
.card {
  background: linear-gradient(180deg, var(--bg-card) 0%, #100608 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

/* ═══════════ Report form (simple) ═══════════ */
/* the report page centres its content vertically, so tall screens spread the
   space around the form instead of pooling it all at the bottom */
.page-vote .wrap {
  display: flex; flex-direction: column;
  min-height: 100vh;
  padding-bottom: 26px;
}
/* header + tabs + form move together: spare space splits above and below */
.page-vote header.site { margin-top: auto; }
.page-vote footer.site { margin-top: auto; padding-top: 26px; }

.report {
  padding: 26px 24px;
  position: relative;
  border-color: rgba(217, 164, 65, 0.5);
  /* golden interior: warm wash over the dark card */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(217, 164, 65, 0.16) 0%, rgba(217, 164, 65, 0.07) 45%, rgba(217, 164, 65, 0.03) 100%),
    linear-gradient(180deg, #1c1208 0%, #14090a 55%, #100608 100%);
  box-shadow: inset 0 0 34px rgba(217, 164, 65, 0.1);
  animation: goldGlow 4.5s ease-in-out infinite;
}
@keyframes goldGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(217, 164, 65, 0.14), 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 0 30px rgba(217, 164, 65, 0.08); }
  50%      { box-shadow: 0 0 32px rgba(217, 164, 65, 0.3), 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 0 44px rgba(217, 164, 65, 0.16); }
}
.report::after {
  /* sparkles along the edges of the card */
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle 2.2px at 4% 10%, #ffe9b3 40%, transparent 60%),
    radial-gradient(circle 1.6px at 96% 8%, #f0cf85 40%, transparent 60%),
    radial-gradient(circle 2px at 50% 3%, #fff3d1 40%, transparent 60%),
    radial-gradient(circle 1.5px at 3% 55%, #f0cf85 40%, transparent 60%),
    radial-gradient(circle 2px at 97% 48%, #ffe9b3 40%, transparent 60%),
    radial-gradient(circle 1.7px at 8% 93%, #fff3d1 40%, transparent 60%),
    radial-gradient(circle 2.2px at 92% 94%, #ffe9b3 40%, transparent 60%),
    radial-gradient(circle 1.5px at 45% 97%, #f0cf85 40%, transparent 60%);
  animation: twinkle 2.1s ease-in-out infinite alternate;
  pointer-events: none;
}
.stage-lit .report { animation: cardIn .7s cubic-bezier(.2,.9,.3,1) .3s both, goldGlow 4.5s ease-in-out 1s infinite; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
}

label.field {
  display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faint); margin: 22px 0 8px;
}
label.field:first-child { margin-top: 0; }
label.field .opt { text-transform: none; font-weight: 400; }

.report input[type='text'], .report textarea {
  width: 100%;
  background: rgba(38, 24, 12, 0.55);
  border: 1px solid rgba(217, 164, 65, 0.28);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.report input[type='text']:focus, .report textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 22, 46, 0.18);
}
.report textarea { resize: vertical; min-height: 84px; }
.report ::placeholder { color: var(--ink-faint); }

/* Player picker */
.picker { position: relative; }
.picker .results {
  position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px;
  max-height: 260px; overflow-y: auto; display: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.picker .results.open { display: block; animation: dropIn .18s ease both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.picker .results button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--ink); font: inherit; padding: 11px 14px; cursor: pointer;
}
.picker .results button:hover, .picker .results button.hl { background: rgba(212, 22, 46, 0.14); }
.picker .results .none { padding: 11px 14px; color: var(--ink-faint); }

.picked {
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(100deg, rgba(217, 164, 65, 0.16) 0%, rgba(217, 164, 65, 0.05) 60%, rgba(217, 164, 65, 0.12) 100%);
  border: 1px solid var(--gold);
  border-radius: 10px; padding: 11px 14px; font-weight: 600;
  color: #f6e7c6;
  box-shadow: 0 0 16px rgba(217, 164, 65, 0.28), inset 0 0 12px rgba(217, 164, 65, 0.08);
  position: relative; overflow: hidden;
}
.picked::before {
  /* golden sheen sweeping across */
  content: '';
  position: absolute; top: 0; bottom: 0; width: 70px; left: -90px;
  background: linear-gradient(100deg, transparent, rgba(240, 217, 160, 0.22), transparent);
  animation: goldSweep 2.8s ease-in-out infinite;
}
@keyframes goldSweep {
  0%, 55% { left: -90px; }
  85%, 100% { left: 110%; }
}
.picked::after {
  /* twinkling sparkles */
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle 2px at 12% 30%, #ffe9b3 40%, transparent 60%),
    radial-gradient(circle 1.6px at 30% 75%, #f0cf85 40%, transparent 60%),
    radial-gradient(circle 2.2px at 55% 22%, #fff3d1 40%, transparent 60%),
    radial-gradient(circle 1.4px at 72% 68%, #ffe9b3 40%, transparent 60%),
    radial-gradient(circle 1.8px at 88% 35%, #f0cf85 40%, transparent 60%);
  animation: twinkle 1.9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes twinkle {
  0%   { opacity: .25; }
  50%  { opacity: .9; }
  100% { opacity: .45; }
}
.picked.show { display: flex; animation: markTarget .3s cubic-bezier(.3,1.6,.6,1) both; }
@keyframes markTarget { from { opacity: 0; transform: scale(.92); } }
.picked button {
  background: none; border: 0; color: var(--gold); font-size: 18px; cursor: pointer;
  position: relative; z-index: 1;
}
.picked #picked-name { position: relative; z-index: 1; }

/* Location chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  background: rgba(38, 24, 12, 0.55); border: 1px solid rgba(217, 164, 65, 0.28); border-radius: 999px;
  color: var(--ink-dim); font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 16px; cursor: pointer;
  transition: border-color .15s, color .15s, transform .1s;
}
.chips button:hover { border-color: var(--gold); }
.chips button:active { transform: scale(.95); }
.chips button.sel {
  border-color: var(--accent); color: var(--accent-hover);
  background: rgba(212, 22, 46, 0.12);
  box-shadow: 0 0 12px rgba(212, 22, 46, 0.2);
}

/* Submit */
.submit {
  width: 100%; margin-top: 26px;
  background: linear-gradient(180deg, var(--accent) 0%, #a90f24 100%);
  border: 0; border-radius: 12px;
  color: #fff; font: inherit; font-size: 17px; font-weight: 800; letter-spacing: 0.03em;
  padding: 15px; cursor: pointer;
  box-shadow: 0 8px 26px rgba(212, 22, 46, 0.35);
  transition: transform .12s, filter .15s;
}
.submit:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.submit:active:not(:disabled) { transform: scale(.98); }
.submit:disabled {
  background: var(--bg-raised); color: var(--ink-faint);
  box-shadow: none; cursor: not-allowed;
}

.error-note { color: #ff8896; font-size: 14px; margin-top: 12px; text-align: center; display: none; }
.error-note.show { display: block; animation: tremor .4s ease; }
@keyframes tremor {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, 2px); }
  80% { transform: translate(3px, -1px); }
}

.fineprint { text-align: center; color: var(--ink-faint); font-size: 13px; margin-top: 16px; }

/* ═══════════ Wax seal + confirmation ═══════════ */
.wax {
  position: relative;
  width: 92px; height: 88px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 32% 26%, #e8404e 0%, #c01527 32%, #8c0f1e 62%, #5c0a12 92%);
  border-radius: 46% 54% 52% 48% / 56% 46% 54% 44%;
  box-shadow:
    inset 0 4px 7px rgba(255, 255, 255, 0.28),
    inset 0 -8px 14px rgba(0, 0, 0, 0.55),
    0 10px 26px rgba(0, 0, 0, 0.6);
}
.wax::before {
  content: '';
  position: absolute; inset: 13px;
  border-radius: 50%;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    inset 0 -2px 4px rgba(255, 255, 255, 0.16);
}
.wax::after {
  content: '';
  position: absolute;
  width: 22px; height: 18px;
  left: -7px; bottom: 9px;
  background: radial-gradient(circle at 40% 30%, #b3121f 0%, #7a0f1d 70%, #5c0a12 100%);
  border-radius: 55% 45% 60% 40% / 55% 60% 40% 45%;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.18), inset 0 -3px 5px rgba(0, 0, 0, 0.4);
}
.wax-emblem {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 38px; font-weight: 700;
  color: #4d070f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3), 0 -1px 2px rgba(0, 0, 0, 0.55);
  transform: rotate(-8deg);
}
.wax.big { width: 126px; height: 120px; margin: 0 auto; }
.wax.big .wax-emblem { font-size: 52px; }
.wax.big::before { inset: 18px; }

.done { text-align: center; padding: 30px 10px; display: none; }
.done.show { display: block; }
.done.show .wax { animation: stamp .5s cubic-bezier(.2,1.4,.45,1) .1s both; }
@keyframes stamp {
  0%   { opacity: 0; transform: scale(2.6) rotate(-14deg); }
  55%  { opacity: 1; transform: scale(.94) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.done h2 { margin: 20px 0 8px; font-size: 22px; }
.done.show h2, .done.show p { animation: houseLights .5s ease .45s both; }
.done p { color: var(--ink-dim); }
.done .again {
  margin-top: 22px; background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font: inherit; font-weight: 600; padding: 9px 20px; cursor: pointer;
  transition: border-color .15s;
}
.done .again:hover { border-color: var(--accent); }

/* ═══════════ Rules page (fits one screen on desktop) ═══════════ */
.rules { padding: 22px 26px; display: grid; gap: 18px 38px; }
.rules h3 { margin: 0 0 10px; font-size: 16px; }
.rules ol, .rules ul { padding-left: 20px; display: grid; gap: 8px; }
.rules li { color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.rules li strong { color: var(--ink); }
@media (min-width: 880px) {
  .rules { grid-template-columns: 1fr 1fr; }
  .rules li { font-size: 13.5px; }
}

/* ═══════════ Unmasked wall ═══════════ */
.wall-empty { text-align: center; padding: 44px 16px; color: var(--ink-dim); }
.wall-empty .big { font-size: 52px; display: block; margin-bottom: 12px; }
.wall-list { display: grid; gap: 12px; }
.wall-item {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--bg-card) 0%, #100608 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
  position: relative; overflow: hidden;
  opacity: 0;
  animation: unmaskFlip .65s cubic-bezier(.2,1.2,.4,1) both;
  animation-delay: var(--delay, 1.2s);
}
@keyframes unmaskFlip {
  0%   { opacity: 0; transform: perspective(700px) rotateX(-88deg); }
  60%  { opacity: 1; transform: perspective(700px) rotateX(14deg); }
  100% { opacity: 1; transform: perspective(700px) rotateX(0deg); }
}
.wall-item::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 60px;
  background: linear-gradient(100deg, transparent, rgba(246, 237, 238, 0.09), transparent);
  left: -80px;
  animation: sweep 2.6s ease calc(var(--delay, 1.2s) + .5s) 1;
}
@keyframes sweep { to { left: 110%; } }
.wall-item .mask { font-size: 30px; filter: drop-shadow(0 3px 10px rgba(212, 22, 46, 0.4)); }
.wall-item .who { font-weight: 800; font-size: 17px; }
.wall-item .what { color: var(--accent-hover); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; }
.wall-item .when { margin-left: auto; color: var(--ink-faint); font-size: 13px; white-space: nowrap; }

footer.site { text-align: center; color: var(--ink-faint); font-size: 12.5px; margin-top: 44px; }
.quiet-link { color: var(--ink-faint); text-decoration: underline; }
.quiet-link:hover { color: var(--ink-dim); }

/* ═══════════ Round Table dashboard ═══════════ */
.wrap-wide { max-width: 940px; }

.gate { text-align: center; padding: 48px 24px; max-width: 460px; margin: 0 auto; }
.gate-icon { font-size: 46px; display: block; margin-bottom: 10px; }
.gate h2 { font-size: 22px; margin-bottom: 8px; }
.gate p { color: var(--ink-dim); }
.gate-btn { max-width: 300px; margin: 22px auto 0; display: block; }
.gate.gate-denied { animation: tremor .45s ease; border-color: var(--accent); }
.gate.gate-denied .gate-icon { filter: drop-shadow(0 0 16px rgba(212, 22, 46, 0.6)); }
.gate-link {
  display: inline-block; margin-top: 22px;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; padding: 9px 20px;
}
.gate-link:hover { border-color: var(--accent); }
.gate-switch { display: block; margin-top: 12px; }

.dash-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.whoami { color: var(--ink-dim); font-size: 14px; }
.linkish { color: var(--ink-faint); font-size: 13px; text-decoration: underline; }
.linkish:hover { color: var(--ink); }

.tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 26px;
}
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile {
  background: linear-gradient(180deg, var(--bg-card) 0%, #100608 100%);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-align: center;
}
.tile-num { display: block; font-size: 26px; font-weight: 800; color: var(--accent-hover); }
.tile-label { color: var(--ink-faint); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }

.section-h { margin: 26px 0 10px; font-size: 17px; }

.table-card, .feed-card { padding: 6px 14px; overflow-x: auto; }
table.board { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.board th {
  text-align: left; color: var(--ink-faint); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 700; padding: 12px 10px 8px;
  border-bottom: 1px solid var(--line);
}
table.board td { padding: 12px 10px; border-bottom: 1px solid rgba(64, 26, 33, 0.5); vertical-align: top; }
table.board tr:last-child td { border-bottom: none; }
.role-tag {
  display: inline-block; margin-left: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px;
}
.dots { letter-spacing: 2px; font-size: 12px; }
.um { margin: 2px 0; white-space: nowrap; }
.dim { color: var(--ink-faint); }
.ok { color: #58c48b; }
.due { color: var(--accent-hover); font-weight: 700; }

button.mini {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-dim); font: inherit; font-size: 12px; font-weight: 600;
  padding: 3px 11px; margin-left: 6px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
button.mini:hover { border-color: var(--accent); color: var(--ink); }
button.mini.on { border-color: var(--gold); color: var(--gold); }
button.mini.danger:hover { border-color: var(--accent-hover); color: var(--accent-hover); }

.letter-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid rgba(64, 26, 33, 0.5);
}
.letter-row:last-child { border-bottom: none; }
.letter-main { flex: 1; min-width: 0; }
.letter-note { color: var(--ink-dim); font-size: 13.5px; font-style: italic; margin-top: 2px; }
.letter-when { color: var(--ink-faint); font-size: 12.5px; white-space: nowrap; }
.letter-void { opacity: .45; }
.void-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 6px;
}
.empty-note { color: var(--ink-faint); text-align: center; padding: 20px 10px; }

/* ═══════════ Compact desktop: the form fits without scrolling ═══════════ */
@media (min-width: 820px) and (max-height: 1000px) {
  .wrap { max-width: 620px; padding-top: 10px; }
  .wrap-wide { max-width: 940px; }
  header.site { padding: 4px 0 8px; }
  header.site .mask { font-size: 30px; }
  header.site h1 { font-size: 22px; margin-top: 2px; }
  header.site p.tag { font-size: 13px; margin-top: 2px; }
  nav.tabs { margin-bottom: 14px; }
  nav.tabs a { font-size: 13px; padding: 5px 14px; }

  .report { padding: 20px 24px; }
  label.field { margin: 16px 0 7px; font-size: 12px; }
  .report textarea { min-height: 66px; }
  .chips button { font-size: 13px; padding: 6px 13px; }
  .submit { font-size: 15px; padding: 12px; margin-top: 18px; }
  .fineprint { margin-top: 12px; font-size: 12px; }
  footer.site { margin-top: 14px; }
}

/* ═══════════ Reduced motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .curtain { display: none; }
  .wall-item, .theatre-open .wrap, .stage-lit .wrap, .stage-lit .report { opacity: 1; }
}
