/* Codex plays Catan. The video is the recording from astra.brianzhou.org, cropped to the
   game panel; the lines are Codex's own messages from the same session. */
:root { --red: #d64541; }

/* ---------- hero: the board on Colonist's sea, the commentary beside it */
#hero { background: #2f7fc1; container-type: size; }
.cw-wall { position: absolute; inset: 0; background:
  radial-gradient(70% 90% at 0% 100%, #f2c14e 0%, rgba(242, 193, 78, 0) 42%),
  radial-gradient(60% 70% at 100% 0%, #6fb3e8 0%, rgba(111, 179, 232, 0) 60%),
  linear-gradient(150deg, #1d5f99 0%, #2f7fc1 50%, #3a8fd0 100%); }
:root[data-theme="dark"] .cw-wall { filter: brightness(0.55) saturate(1.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-wall { filter: brightness(0.55) saturate(1.05); } }
.cw-stage { position: absolute; left: 0; top: 0; width: 1200px; height: 720px; transform-origin: 0 0; font-family: var(--sans); }
.cw-board { position: absolute; left: 44px; top: 54px; width: 820px; height: 603px; overflow: hidden; border-radius: 12px; background: #1c6aa8;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.25), 0 30px 80px rgba(0, 25, 60, 0.4), 0 8px 24px rgba(0, 25, 60, 0.2); }
.cw-board video, .cw-board img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cw-rail { position: absolute; left: 896px; top: 54px; width: 270px; height: 603px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 30%); mask-image: linear-gradient(to bottom, transparent 0, black 30%); }
.cw-who { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; color: rgba(255, 255, 255, 0.82); font: 500 12px/16px var(--sans); }
.cw-who i { width: 8px; height: 8px; border-radius: 50%; background: #7ee08a; box-shadow: 0 0 0 3px rgba(126, 224, 138, 0.25); }
.cw-line { padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, 0.94); color: #1b1b1b; font: 400 13px/18.5px var(--sans); text-wrap: pretty;
  box-shadow: 0 6px 20px rgba(0, 25, 60, 0.18); transition: opacity 0.42s ease, transform 0.42s cubic-bezier(.2, .8, .2, 1); }
:root[data-theme="dark"] .cw-line { background: rgba(28, 28, 30, 0.94); color: #f2f2f2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cw-line { background: rgba(28, 28, 30, 0.94); color: #f2f2f2; } }
.cw-line.old { opacity: 0.5; }
.cw-line.older { opacity: 0.22; }
.cw-line.in { animation: cw-in 0.36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cw-in { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.cs-hero .cs-hero-fade { height: 10%; }

/* ---------- the player */
.gp { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; padding: 14px; }
.gp-video { position: relative; overflow: hidden; border-radius: 6px; background: #1c6aa8; aspect-ratio: 1026 / 754; }
.gp-video video { display: block; width: 100%; height: 100%; }
.gp-bar { grid-column: 1 / -1; position: relative; height: 22px; cursor: pointer; touch-action: none; }
.gp-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 1px; background: var(--frame-2); }
.gp-fill { position: absolute; left: 0; top: 10px; height: 2px; border-radius: 1px; background: var(--ink); }
.gp-tick { position: absolute; top: 6px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--frame); box-shadow: inset 0 0 0 1.5px var(--muted); transition: background 0.14s, box-shadow 0.14s; }
.gp-tick.past { background: var(--ink); box-shadow: none; }
/* contain: size keeps the list from setting the row's height, so it scrolls beside the video.
   position: relative makes the rows' offsetTop count from the list. */
.gp-list { position: relative; display: flex; flex-direction: column; gap: 2px; contain: size; overflow-y: auto; scrollbar-width: thin; }
.gp-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 7px 9px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer;
  font: 400 12.5px/17.5px var(--sans); color: var(--muted); transition: background 0.14s, color 0.14s; }
.gp-row time { font: 500 11px/17.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.gp-row.past { color: var(--ink-2); }
.gp-row.on { background: var(--bg); color: var(--ink); }
.gp-row.on time { color: var(--red); }
@media (hover: hover) { .gp-row:hover { color: var(--ink); } }

@media (max-width: 640px) {
  .gp { grid-template-columns: 1fr; }
  .gp-list { height: 260px; }
}

/* ---------- the strategy subagent */
.sa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 14px; align-items: start; }
.sa-board { overflow: hidden; border-radius: 6px; background: #1c6aa8; aspect-ratio: 1026 / 754; }
.sa-board img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sa-talk { display: flex; flex-direction: column; gap: 10px; }
.sa-msg { padding: 11px 13px; border-radius: 12px; font: 400 13px/19px var(--sans); color: var(--ink-2); text-wrap: pretty; overflow-wrap: anywhere; }
.sa-msg b { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; font: 500 12px/16px var(--sans); color: var(--muted); }
.sa-msg b time { font: 500 11px/16px var(--mono); font-variant-numeric: tabular-nums; }
.sa-msg.sub { background: var(--bg); }
.sa-msg.main { background: var(--bg); color: var(--ink); }
.cw-who span { color: rgba(255, 255, 255, 0.6); font-weight: 400; }
@media (max-width: 640px) { .sa { grid-template-columns: 1fr; } }
