/* .theatre scoped styles: the Direction C dark room (FM-249). Sky #020407, mint #69f5be working, amber #ffc46b stuck,
   magenta #ff6ad5 needs you. Static by default: only .theatre-arrive and .theatre-pulse move, once, when a new recorded
   event arrives, and never under prefers-reduced-motion. */
.theatre {
  /* Colours come from app.css :root (one block); the page itself is the dark room (body[data-part='theatre']). */
  --t-sky: var(--theatre-bg);
  --t-mint: var(--theatre);
  --t-amber: var(--amber);
  --t-magenta: var(--magenta);
  color-scheme: dark;
  color: var(--t-ink);
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}
.theatre h1 {
  margin: 0 0 6px; font: 650 clamp(2rem, 1.5rem + 2vw, 2.5rem)/1.1 var(--sans); letter-spacing: -0.035em; color: var(--t-ink);
  text-shadow: 0 0 34px var(--glow-theatre);
}
.theatre h2 {
  margin: 0 0 10px; font: 600 0.75rem/1.4 var(--mono);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-dim);
}
.theatre h3 { margin: 4px 0 2px; font-size: 1rem; line-height: 1.35; color: var(--t-ink); overflow-wrap: anywhere; }
.theatre p { margin: 0; }
.theatre a { color: var(--t-mint); }
.theatre :focus-visible { outline: 3px solid var(--t-amber); outline-offset: 3px; }
.theatre .theatre-sub, .theatre .theatre-worker, .theatre .theatre-key, .theatre .theatre-none { color: var(--t-dim); font-size: 0.9rem; }
.theatre .theatre-key { margin-top: 6px; font-size: 0.8rem; }
.theatre .theatre-worker { margin-top: 18px; }
.theatre .theatre-worker a {
  display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; margin-left: 8px;
}

.theatre .theatre-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.theatre .theatre-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px;
  background: var(--t-glass); border: 1px solid var(--t-edge);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.theatre .theatre-num { font-size: 2rem; line-height: 1.1; font-weight: 650; font-variant-numeric: tabular-nums; }
.theatre .theatre-tile-label, .theatre .theatre-lane-caption, .theatre .theatre-chip, .theatre .theatre-card-lane {
  font: 600 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}
.theatre .theatre-tile-label { color: var(--t-dim); }
.theatre .theatre-tile-working .theatre-num { color: var(--t-mint); }
.theatre .theatre-tile-stuck .theatre-num { color: var(--t-amber); }
.theatre .theatre-tile-needs_you .theatre-num { color: var(--t-magenta); }

.theatre .theatre-stage {
  list-style: none; margin: 0 0 8px; padding: 4px 0; border-radius: 12px; border: 1px solid var(--t-lane);
  background-color: var(--t-stage);
  background-image: repeating-linear-gradient(90deg, var(--t-stripe) 0 1px, transparent 1px 40px);
}
.theatre .theatre-lane {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "orb name" "orb counts" "orb total";
  align-items: center; column-gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--t-lane);
}
.theatre .theatre-lane:last-child { border-bottom: 0; }
.theatre .theatre-lane-name { grid-area: name; font-weight: 600; }
.theatre .theatre-lane-caption { grid-area: name; justify-self: end; color: var(--t-dim); }
.theatre .theatre-lane-counts { grid-area: counts; color: var(--t-dim); font-size: 0.88rem; overflow-wrap: anywhere; }
.theatre .theatre-lane-total { grid-area: total; color: var(--t-dim); font-size: 0.8rem; }
.theatre .theatre-orb {
  grid-area: orb; justify-self: center; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--white) 0, var(--t-idle) 55%);
  box-shadow: 0 0 8px 1px var(--t-glow-idle); opacity: 0.6;
}
.theatre .theatre-tone-working .theatre-orb {
  background: radial-gradient(circle at 35% 35%, var(--white) 0, var(--t-mint) 55%); box-shadow: 0 0 14px 3px var(--t-glow-mint); opacity: 1;
}
.theatre .theatre-tone-stuck .theatre-orb {
  background: radial-gradient(circle at 35% 35%, var(--white) 0, var(--t-amber) 55%); box-shadow: 0 0 14px 3px var(--t-glow-amber); opacity: 1;
}
.theatre .theatre-tone-needs_you .theatre-orb {
  background: radial-gradient(circle at 35% 35%, var(--white) 0, var(--t-magenta) 55%); box-shadow: 0 0 16px 4px var(--t-glow-magenta); opacity: 1;
}
.theatre .theatre-lane.theatre-tone-needs_you { background: radial-gradient(circle at 34px 50%, var(--t-needs-haze), transparent 70%); }

.theatre .theatre-empty { margin: 16px 0 0; padding: 14px; border-radius: 12px; background: var(--t-glass); border: 1px solid var(--t-edge); }
.theatre .theatre-error { margin: 16px 0; color: var(--t-amber); }
.theatre section.theatre-group { background: none; border: 0; border-radius: 0; padding: 0; margin: 20px 0 0; }
.theatre article.theatre-card {
  margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--t-glass);
  border: 1px solid var(--t-edge); border-left: 3px solid var(--t-idle);
}
.theatre .theatre-card.theatre-tone-needs_you { border-left-color: var(--t-magenta); }
.theatre .theatre-card.theatre-tone-working { border-left-color: var(--t-mint); }
.theatre .theatre-card.theatre-tone-stuck { border-left-color: var(--t-amber); }
.theatre .theatre-card.theatre-tone-done { border-left-color: var(--t-done-edge); }
.theatre .theatre-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--t-dim); font-size: 0.8rem; }
.theatre .theatre-card-status { color: var(--t-dim); font-size: 0.9rem; }
.theatre .review-preview { overflow-wrap: anywhere; }
.theatre .theatre-card-excerpt { margin-top: 6px; font-size: 0.9rem; overflow-wrap: anywhere; }
.theatre .theatre-chip { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--t-edge); color: var(--t-dim); }
.theatre .theatre-chip-live { background: var(--t-mint); border-color: var(--t-mint); color: var(--t-on-mint); }
.theatre .theatre-chip-stale { border-color: var(--t-amber); color: var(--t-amber); }
.theatre .theatre-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.theatre .theatre-actions button {
  min-height: 44px;
  font: 600 .9375rem/1.2 var(--sans);
  margin: 4px 0; background: transparent; color: var(--t-mint); border: 1px solid var(--t-mint); border-radius: 999px; padding: 8px 16px;
}
.theatre .theatre-actions button:first-child { background: var(--t-mint); color: var(--t-on-mint); }
.theatre .theatre-events { list-style: none; margin: 0; padding: 0; }
.theatre .theatre-events li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--t-lane); font-size: 0.88rem; overflow-wrap: anywhere; }

.theatre .theatre-arrive { animation: theatre-arrive 0.6s ease-out 1; }
.theatre .theatre-pulse { animation: theatre-pulse 1.2s ease-out 1; }
@keyframes theatre-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes theatre-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .theatre, .theatre * { animation: none !important; transition: none !important; }
}

@media (min-width: 640px) {
  .theatre .theatre-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .theatre .theatre-live { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 16px; }
  .theatre .theatre-live > * { grid-column: 1 / -1; }
  .theatre .theatre-live > .theatre-group-needs_you, .theatre .theatre-live > .theatre-group-happening,
  .theatre .theatre-live > .theatre-group-done_today { grid-column: auto; }
}
