/* Screening-room type and component styles. Colours here are the original
   light theme; theme.css loads last and sets the dark palette over them. */
@font-face {
  font-family: Barlow Film;
  src: url(media/barlow-display.ttf) format("truetype");
  font-weight: 800;
  font-display: swap;
}
:root {
  --paper: #eeede7;
  --surface: #fffdf8;
  --ink: #211f26;
  --muted: #5d5967;
  --line: #d6d1d2;
  --night: #19181f;
  --night-2: #24212b;
  --night-3: #322d3a;
  --night-line: #4a4452;
  --night-ink: #f6eee9;
  --night-muted: #b9afbd;
  --forest: #603c76;
  --orange: #e96542;
  --peach: #ffb087;
  --blue: #8272c7;
  --lilac: #c4b9ff;
  --lime: #ffb087;
  --display: "Barlow Film", Impact, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
body {
  background: linear-gradient(var(--night) 0 64px, var(--paper) 64px);
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
button:hover,
.action:hover {
  border-color: var(--forest);
  background: #f1ebf4;
}
.mast {
  background: var(--night);
  border-bottom: 1px solid var(--night-line);
}
.mast-inner {
  min-height: 64px;
}
.brand {
  font-size: 1.5rem;
}
.mast nav a {
  border-radius: 20px;
}
.mast nav a[aria-current="page"] {
  background: #44323a;
  color: #ffc9ac;
}
.head h1,
.panel h2,
.picker h2,
.model-picker h2,
.still-dialog h2,
.card-model strong,
.model-tile strong,
.bench-trigger span {
  font-family: var(--display);
  font-weight: 800;
  font-style: normal;
  letter-spacing: -0.01em;
}
.head h1,
.panel h2,
.picker h2,
.model-picker h2,
.still-dialog h2,
.bench-trigger span {
  text-transform: uppercase;
}
.head h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
}
.panel h2 {
  font-size: 1.9rem;
}

/* Comparison deck: benchmark, preview moment, prompt and actions in one panel. */
.deck {
  margin: 1.3rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  color: var(--night-ink);
  background:
    radial-gradient(ellipse at 92% 140%, #6d3b36 0, transparent 55%),
    linear-gradient(110deg, #211c2a, #2e2740 65%, #262330);
}
.deck-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem 1.1rem;
}
.deck-title {
  flex: 1;
  min-width: 0;
}
.eyebrow,
.deck-meta {
  margin: 0;
  font: 500 0.8rem/1.4 var(--mono);
  color: var(--night-muted);
}
.deck h1 {
  margin: 0.15rem 0 0.2rem;
  font-size: inherit;
  line-height: 1;
}
.bench-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  margin-left: -0.5rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--night-ink);
  text-align: left;
}
.bench-trigger span {
  font-size: clamp(2.3rem, 5vw, 3.9rem);
  line-height: 1;
  overflow-wrap: anywhere;
}
.bench-trigger svg {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: var(--peach);
  stroke-width: 2;
  transition: transform 0.15s;
}
.bench-trigger:hover {
  background: #ffffff10;
  border-color: var(--night-line);
}
.bench-trigger:hover svg {
  transform: translateY(2px);
}
.deck .match-launch {
  flex: none;
  background: var(--peach);
  color: #241d27;
  border: 0;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 8px;
}
.deck .match-launch:hover {
  background: #ffc6a6;
}
.deck-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding: 0.65rem 1.5rem;
  background: #00000033;
  border-top: 1px solid #ffffff14;
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #ffffff0f;
  border: 1px solid #ffffff1a;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--night-muted);
  padding: 0.32rem 0.75rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}
.segmented button:hover {
  background: #ffffff14;
  color: var(--night-ink);
}
.segmented button[aria-pressed="true"] {
  background: var(--night-ink);
  color: var(--night);
}
.prompt-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 0 1 26rem;
  font-size: 0.8rem;
  color: var(--night-muted);
}
.prompt-filter select {
  min-width: 0;
  width: 100%;
  padding-block: 0.36rem;
  font-size: 0.86rem;
  background-color: var(--night-3);
  color: var(--night-ink);
  border-color: var(--night-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23d9cfdc' stroke-width='1.5' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  text-overflow: ellipsis;
}
.deck-tools output {
  font-size: 0.85rem;
  color: var(--peach);
}
.deck-tools output:empty {
  display: none;
}
.deck-buttons {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}
.deck-buttons button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--night-ink);
  background: transparent;
  border: 1px solid var(--night-line);
  border-radius: 7px;
}
.deck-buttons button:hover {
  background: #ffffff14;
  border-color: #7d7388;
}
.deck-buttons svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.deck-note {
  margin: 0.6rem 0 0;
}

/* Run cards. */
.stage-shot {
  position: absolute;
  inset: 0;
  background-size: 100% 300%;
  background-repeat: no-repeat;
}
.poster:disabled {
  background: #28242e;
  opacity: 1;
}
.poster .play[hidden] {
  display: none;
}
.card {
  border-radius: 12px;
  border: 0;
  border-top: 4px solid var(--orange);
  background: var(--surface);
  box-shadow: 0 1px 0 #00000010, 0 6px 18px #3420330d;
}
.card.b {
  border-top-color: var(--blue);
}
.card .play {
  background: #1e1a22e8;
  color: var(--peach);
}
.card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 1.1rem;
  background: var(--night-2);
  color: var(--night-ink);
}
.side b,
.b .side b {
  border-radius: 6px;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.95rem;
  background: var(--peach);
  color: #201d25;
}
.b .side b {
  background: var(--lilac);
}
.card-model {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: inherit;
}
.model-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.35rem 0.6rem;
  margin-left: -0.6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  text-align: left;
}
.model-trigger strong {
  font-size: 1.6rem;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-trigger small {
  grid-row: 2;
  font-size: 0.8rem;
  color: var(--night-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-trigger:after {
  content: "Change";
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--night-line);
  color: var(--night-muted);
}
.model-trigger:hover {
  background: #ffffff0d;
  border-color: var(--night-line);
}
.model-trigger:hover:after {
  background: var(--night-ink);
  border-color: var(--night-ink);
  color: var(--night);
}
.card-top .state {
  flex: none;
}
.card-body {
  padding: 0.9rem 1.1rem 1rem;
}
.card-body .variant {
  margin: 0 0 0.15rem;
  font-weight: 650;
  font-size: 0.95rem;
}
.card-body .meta {
  margin: 0 0 0.6rem;
}
.panel,
.model-tile {
  border-radius: 12px;
}
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
}
.model-tile {
  overflow: hidden;
  background: var(--surface);
}
.model-tile strong {
  font-size: 1.72rem;
  letter-spacing: 0;
}
.model-cover {
  height: 7.5rem;
  object-fit: cover;
  margin: -1.1rem -1.1rem 0.6rem;
}
.card-links a:hover,
.table-wrap a:hover {
  color: #a04221;
}

/* Benchmark matchup suggestions. */
.bench-ideas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.bench-idea {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.bench-idea:hover,
.bench-idea:focus-visible {
  border-color: var(--forest);
  background: #faf6fb;
}
.bench-idea[aria-current="true"] {
  border-color: var(--orange);
}
.bench-idea b {
  font: 600 0.75rem/1.3 var(--mono);
  color: var(--forest);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.bench-idea i {
  font: 600 0.72rem/1 var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  padding-left: 0.2rem;
}
.idea-side {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
}
.idea-side img {
  flex: none;
  width: 72px;
  height: 40px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--night-2);
}
.idea-side > span {
  display: grid;
  justify-items: start;
  gap: 0.1rem;
  min-width: 0;
}
.idea-side strong {
  font-size: 0.95rem;
  line-height: 1.2;
}
.idea-side small {
  font-size: 0.78rem;
  color: var(--muted);
}
.idea-side .state {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
}

/* Side picker. */
.model-picker {
  width: min(40rem, 94vw);
  max-height: min(48rem, 90dvh);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px #0b0a1066;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.model-picker[open] {
  display: flex;
}
.model-picker::backdrop {
  background: #120f17b3;
}
.model-picker header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem 0.9rem;
  background: var(--night-2);
  color: var(--night-ink);
}
.model-picker h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1;
}
.model-picker header p {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--night-muted);
}
.model-picker .close {
  border: 1px solid var(--night-line);
  background: transparent;
  color: var(--night-ink);
  font-size: 1.2rem;
  line-height: 1;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
}
.model-picker .close:hover {
  background: #ffffff14;
}
.mp-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.mp-search input {
  flex: 1;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.mp-search input:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 0;
  border-color: var(--forest);
}
.mp-search [role="status"] {
  flex: none;
  font: 500 0.78rem var(--mono);
  color: var(--muted);
}
.mp-list {
  overflow: auto;
  padding: 0.25rem 0.6rem 0.8rem;
  overscroll-behavior: contain;
}
.mp-list h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 0.7rem 0.65rem 0.4rem;
  font: 600 0.72rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface);
}
.mp-list h3[hidden],
.mp-row[hidden] {
  display: none;
}
.mp-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.mp-row:hover,
.mp-row:focus-visible {
  background: #f1ebf4;
  outline: none;
}
.mp-row:focus-visible {
  box-shadow: inset 0 0 0 2px var(--forest);
}
.mp-row[aria-selected="true"] {
  background: #fbe9df;
  box-shadow: inset 3px 0 0 var(--orange);
}
.mp-row:disabled {
  opacity: 0.5;
  cursor: default;
}
.mp-row img,
.mp-noimg {
  flex: none;
  width: 64px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--night-3), var(--night-2));
}
.mp-text {
  display: grid;
  flex: 1;
  min-width: 0;
}
.mp-text strong {
  font-weight: 650;
  line-height: 1.25;
}
.mp-text small,
.mp-text em {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-text em {
  font-style: normal;
  color: var(--forest);
}
.mp-row .state {
  flex: none;
}
.mp-empty {
  padding: 1.5rem 0.65rem;
  color: var(--muted);
}

.picker,
.still-dialog {
  border-radius: 12px;
  background: #f6f2ee;
}

@media (max-width: 800px) {
  .deck-buttons {
    margin-left: 0;
  }
}
@media (max-width: 620px) {
  .deck {
    margin-top: 0.7rem;
  }
  .deck-main {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
    padding: 1.1rem 1rem 0.9rem;
  }
  .deck-tools {
    padding: 0.6rem 1rem 0.75rem;
  }
  .segmented {
    width: 100%;
  }
  .segmented button {
    flex: 1;
    padding-inline: 0.3rem;
  }
  .prompt-filter {
    flex-basis: 100%;
  }
  .deck-buttons {
    width: 100%;
  }
  .deck-buttons button {
    flex: 1;
    justify-content: center;
  }
  .model-cover {
    margin: -0.75rem -0.75rem 0.45rem;
  }
  .card-top {
    padding: 0.6rem 0.75rem;
  }
  .card-body {
    padding: 0.8rem;
  }
  .model-trigger strong {
    font-size: 1.35rem;
  }
  .model-trigger:after {
    display: none;
  }
  .card-top .state {
    font-size: 0.72rem;
  }
  .model-picker {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 14px 14px 0 0;
  }
  .mp-row .state {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bench-trigger svg {
    transition: none;
  }
}
