:root {
  --citrus: #FF7A00;
  --paper: #FFF7ED;
  --peach: #FFD3A5;
  --ink: #172033;
  --blue: #146CFF;
  --yellow: #FACC15;
  --red: #EF4444;
  --line: rgba(23, 32, 51, .16);
  color-scheme: light;
}

html {
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
  background: var(--citrus);
}

body {
  min-height: 200vh;
  margin: 0;
  overflow-x: clip;
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(255, 247, 237, .14) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(255, 247, 237, .14) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--citrus);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body .poster-shell {
  width: min(100% - 24px, 1600px);
  margin-inline: auto;
}

.poster-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: auto;
  min-height: 70px;
  border-bottom: 3px solid var(--ink);
  background: rgba(255, 247, 237, .96);
  box-shadow: 0 4px 0 rgba(23, 32, 51, .14);
}

.poster-nav {
  display: grid;
  grid-template-columns: auto minmax(200px, .9fr) minmax(340px, 1.55fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding-block: 8px;
}

.poster-brand,
.site-footer .brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: .94rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark,
.site-footer .brand span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50% 43% 49% 40%;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 1.2rem;
  line-height: 1;
}

.poster-brand > span:not(.brand-mark) {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.game-search {
  display: flex;
  min-width: 0;
  height: auto;
  max-width: none;
  margin: 0;
  align-items: stretch;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  overflow: clip;
}

.game-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: clip;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.game-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  outline: 0;
}

.game-search button,
.random-game {
  width: auto;
  min-width: max-content;
  border: 0;
  border-left: 2px solid var(--ink);
  padding: 9px 12px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.random-game {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}

.poster-nav-links {
  display: flex;
  min-width: 0;
  margin: 0;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.poster-nav-links a {
  color: var(--ink);
  font-size: .76rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.poster-nav-links a:hover,
.poster-nav-links a:focus-visible { color: var(--blue); }

.poster-home { min-height: 200vh; }

.hot-today {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding-top: 14px;
}

.section-label,
.terminal-stream,
.launch-stream,
.game-conveyor,
.poster-vault {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(23, 32, 51, .2);
}

.section-label {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: center;
  padding: 13px;
  border-radius: 13px 5px 13px 5px;
}

.live-dot {
  width: 10px;
  height: 10px;
  margin-bottom: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .18);
}

.section-label h1,
.vault-heading h2 {
  margin: 0;
  font-size: 1.26rem;
  font-weight: 950;
  line-height: 1;
}

.section-label p {
  margin: 7px 0 0;
  font-size: .74rem;
  font-weight: 650;
  line-height: 1.35;
}

.story-rail {
  min-width: 0;
  border: 2px solid var(--ink);
  border-radius: 5px 14px 5px 14px;
  background: var(--blue);
  box-shadow: 4px 4px 0 rgba(23, 32, 51, .2);
  overflow: clip;
}

.story-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: story-marquee 43s linear infinite;
  will-change: transform;
}

.story-rail:hover .story-track,
.story-rail:focus-within .story-track { animation-play-state: paused; }

.story-set {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  padding: 10px 5px;
}

.story-card {
  display: grid;
  width: 94px;
  flex: 0 0 94px;
  gap: 5px;
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.story-card img {
  display: block;
  width: 72px;
  height: 72px;
  margin: auto;
  border: 3px solid var(--paper);
  border-radius: 50% 44% 50% 45%;
  object-fit: cover;
  box-shadow: 3px 3px 0 var(--ink);
}

.console-dashboard {
  display: grid;
  grid-template-columns: minmax(186px, .78fr) minmax(0, 2fr) minmax(225px, .95fr);
  gap: 12px;
  align-items: stretch;
  padding-top: 12px;
}

.terminal-stream,
.launch-stream {
  position: relative;
  display: flex;
  min-height: 272px;
  flex-direction: column;
  border-radius: 11px 4px 11px 4px;
  padding: 11px;
}

.console-title,
.conveyor-label {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .06em;
}

.terminal-stream > a {
  display: block;
  position: relative;
  z-index: 2;
  padding: 7px 6px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .71rem;
  font-weight: 750;
  text-decoration: none;
}

.terminal-stream > a:hover,
.terminal-stream > a:focus-visible {
  border-radius: 5px;
  background: var(--yellow);
  outline: 2px solid var(--ink);
}

.launch-stream > a {
  display: grid;
  position: relative;
  z-index: 2;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 7px 4px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line);
  font-size: .73rem;
  font-weight: 850;
  text-decoration: none;
}

.launch-stream b { color: var(--red); }
.launch-stream span { overflow: clip; text-overflow: ellipsis; white-space: nowrap; }
.launch-stream i { color: var(--blue); font-size: .62rem; font-style: normal; font-weight: 800; }
.launch-stream > a:hover,
.launch-stream > a:focus-visible { border-radius: 5px; background: var(--yellow); outline: 2px solid var(--ink); }

.panel-hover-gallery {
  position: relative;
  min-height: 88px;
  flex: 1;
  margin-top: 8px;
}

.panel-preview {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  opacity: 0;
  transform: translateY(5px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.panel-preview--default { opacity: 1; transform: none; }

.panel-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 74px;
  border: 2px solid var(--ink);
  border-radius: 8px 2px 8px 2px;
  object-fit: cover;
  box-shadow: 2px 2px 0 var(--blue);
}

.terminal-stream:has(a[data-preview="puzzle"]:is(:hover, :focus-visible)) .panel-preview,
.terminal-stream:has(a[data-preview="arcade"]:is(:hover, :focus-visible)) .panel-preview,
.terminal-stream:has(a[data-preview="sports"]:is(:hover, :focus-visible)) .panel-preview,
.terminal-stream:has(a[data-preview="racing"]:is(:hover, :focus-visible)) .panel-preview,
.terminal-stream:has(a[data-preview="action"]:is(:hover, :focus-visible)) .panel-preview,
.launch-stream:has(a[data-preview="paper"]:is(:hover, :focus-visible)) .panel-preview,
.launch-stream:has(a[data-preview="drift"]:is(:hover, :focus-visible)) .panel-preview,
.launch-stream:has(a[data-preview="kick"]:is(:hover, :focus-visible)) .panel-preview,
.launch-stream:has(a[data-preview="agent"]:is(:hover, :focus-visible)) .panel-preview { opacity: 0; transform: translateY(5px) scale(.98); }

.terminal-stream:has(a[data-preview="puzzle"]:is(:hover, :focus-visible)) .panel-preview--puzzle,
.terminal-stream:has(a[data-preview="arcade"]:is(:hover, :focus-visible)) .panel-preview--arcade,
.terminal-stream:has(a[data-preview="sports"]:is(:hover, :focus-visible)) .panel-preview--sports,
.terminal-stream:has(a[data-preview="racing"]:is(:hover, :focus-visible)) .panel-preview--racing,
.terminal-stream:has(a[data-preview="action"]:is(:hover, :focus-visible)) .panel-preview--action,
.launch-stream:has(a[data-preview="paper"]:is(:hover, :focus-visible)) .panel-preview--paper,
.launch-stream:has(a[data-preview="drift"]:is(:hover, :focus-visible)) .panel-preview--drift,
.launch-stream:has(a[data-preview="kick"]:is(:hover, :focus-visible)) .panel-preview--kick,
.launch-stream:has(a[data-preview="agent"]:is(:hover, :focus-visible)) .panel-preview--agent { opacity: 1; transform: none; }

.game-conveyor {
  min-width: 0;
  border-radius: 4px 18px 4px 18px;
  padding: 11px;
  background: var(--blue);
}

.game-conveyor .conveyor-label { color: var(--yellow); }

.conveyor-window {
  min-height: 231px;
  border: 2px solid var(--ink);
  border-radius: 3px 12px 3px 12px;
  background: linear-gradient(135deg, rgba(255, 247, 237, .18), transparent 46%), #0d52c9;
  overflow: clip;
}

.conveyor-track {
  display: flex;
  width: max-content;
  min-height: 231px;
  align-items: center;
  animation: conveyor-marquee 33s linear infinite;
  will-change: transform;
}

.conveyor-window:hover .conveyor-track,
.conveyor-window:focus-within .conveyor-track { animation-play-state: paused; }

.conveyor-set {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 12px 5px;
}

.conveyor-set a,
.conveyor-set > span {
  display: block;
  width: 144px;
  height: 190px;
  flex: 0 0 144px;
  border: 3px solid var(--paper);
  border-radius: 13px 3px 13px 3px;
  background: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-2deg);
}

.conveyor-set > :nth-child(even) { transform: rotate(2deg); }

.conveyor-set img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conveyor-set a:hover,
.conveyor-set a:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; transform: translateY(-7px) rotate(-2deg); }

.poster-vault {
  margin-top: 14px;
  margin-bottom: 18px;
  border-radius: 17px 5px 17px 5px;
  padding: 13px;
}

.vault-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--red);
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .05em;
}

.vault-heading > p {
  margin: 0;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 850;
}

.vault-heading strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.poster-card {
  min-width: 0;
  aspect-ratio: 3 / 4;
  background: var(--ink);
  clip-path: polygon(0 0, 87% 0, 100% 9%, 100% 100%, 13% 100%, 0 91%);
}

.poster-card:nth-child(even) { clip-path: polygon(13% 0, 100% 0, 100% 91%, 87% 100%, 0 100%, 0 9%); }

.poster-card a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  color: var(--ink);
  text-decoration: none;
}

.poster-card > a > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 3px;
  padding: 10px;
  background: var(--yellow);
  transform: translateY(101%);
  transition: transform .2s ease;
}

.poster-overlay strong { font-size: .82rem; line-height: 1.14; }
.poster-overlay small { font-size: .68rem; font-weight: 750; }
.poster-overlay b { margin-top: 3px; color: #fff; font-size: .67rem; font-weight: 950; text-transform: uppercase; }
.poster-touch-title { display: none; }

.poster-card:hover .poster-overlay,
.poster-card:focus-within .poster-overlay { transform: translateY(0); }

.poster-card a:focus-visible { outline: 4px solid var(--blue); outline-offset: -4px; }
.poster-card:hover { transform: translateY(-4px); filter: saturate(1.08); }
.poster-card[hidden] { display: none; }

.search-empty {
  margin: 14px 0 0;
  padding: 10px;
  border: 2px dashed var(--red);
  color: var(--red);
  font-weight: 800;
}

.site-footer {
  border-top: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.site-footer .shell { width: min(100% - 24px, 1600px); margin-inline: auto; }
.footer-columns { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 28px; padding-block: 24px; }
.footer-columns p { max-width: 34rem; font-size: .84rem; line-height: 1.5; }
.footer-columns h2 { margin: 0 0 8px; color: var(--blue); font-size: .86rem; }
.footer-columns a:not(.brand) { display: block; margin: 6px 0; color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none; }
.footer-columns a:not(.brand):hover { color: var(--blue); }
.footer-floor { padding: 11px 0; border-top: 1px solid var(--line); font-size: .72rem; }

@keyframes story-marquee { to { transform: translateX(-25%); } }
@keyframes conveyor-marquee { to { transform: translateX(-50%); } }

@media (max-width: 1120px) {
  .poster-nav { grid-template-columns: auto minmax(200px, 1fr) auto; }
  .poster-brand { grid-column: 1; grid-row: 1; }
  .game-search { grid-column: 2; grid-row: 1; }
  .random-game { grid-column: 3; grid-row: 1; }
  .poster-nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .console-dashboard { grid-template-columns: minmax(180px, .8fr) minmax(0, 1.8fr); }
  .launch-stream { grid-column: 1 / -1; min-height: 0; }
  .launch-stream .panel-hover-gallery { display: none; }
  .launch-stream { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .launch-stream .console-title { grid-column: 1 / -1; }
  .launch-stream > a { border: 1px solid var(--line); border-radius: 6px; }
  .poster-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body .poster-shell,
  .site-footer .shell { width: min(100% - 16px, 1600px); }
  .poster-topbar { position: static; }
  .poster-nav { grid-template-columns: 1fr auto; gap: 8px; min-height: 0; padding-block: 9px; }
  .poster-brand { grid-column: 1; grid-row: 1; }
  .random-game { grid-column: 2; grid-row: 1; }
  .game-search { grid-column: 1 / -1; grid-row: 2; }
  .poster-nav-links { grid-row: 3; gap: 12px; }
  .random-game { padding-inline: 9px; font-size: .7rem; }
  .hot-today { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .section-label { min-height: 0; padding: 11px; }
  .section-label h1 { font-size: 1.06rem; }
  .story-rail { min-height: 106px; }
  .story-card { width: 76px; flex-basis: 76px; font-size: .58rem; }
  .story-card img { width: 58px; height: 58px; }
  .console-dashboard { grid-template-columns: 1fr; gap: 8px; padding-top: 8px; }
  .terminal-stream { min-height: 0; }
  .panel-hover-gallery { display: none; }
  .game-conveyor { padding: 9px; }
  .conveyor-window,
  .conveyor-track { min-height: 164px; }
  .conveyor-set { gap: 8px; padding-block: 9px; }
  .conveyor-set a,
  .conveyor-set > span { width: 108px; height: 142px; flex-basis: 108px; }
  .launch-stream { display: flex; min-height: 0; }
  .launch-stream > a { border: 0; border-bottom: 1px dashed var(--line); border-radius: 0; }
  .poster-vault { margin-top: 10px; padding: 9px; }
  .vault-heading h2 { font-size: 1.1rem; }
  .poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .poster-overlay { display: none; }
  .poster-touch-title { position: absolute; right: 0; bottom: 0; left: 0; display: block; padding: 7px 8px; background: rgba(23, 32, 51, .88); color: #fff; font-size: .7rem; font-weight: 850; line-height: 1.18; }
  .footer-columns { grid-template-columns: 1fr; gap: 12px; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .story-track,
  .conveyor-track { animation: none; }
}
