#arcade[data-view="game"] :is(#catalog, .sync-card) { display: none; }

.game-page {
  width: min(1080px, calc(100% - clamp(32px, 9vw, 112px)));
  padding-block: clamp(16px, 3vh, 32px) clamp(24px, 4vh, 44px);
}

.channel-preview {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 225px;
  height: min(54svh, 510px);
  isolation: isolate;
  overflow: hidden;
  color: white;
  background: #112c43;
  border: 3px solid white;
  border-radius: clamp(16px, 2vw, 25px);
  box-shadow: 0 0 0 1px #9fbdd5, 0 13px 24px #183f6125;
}

.channel-preview > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 51%;
}

.channel-preview::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
  background: linear-gradient(90deg, #081829c9, #0a1a2a43 43%, transparent 73%);
  pointer-events: none;
}

[data-channel-game="storm-rig"] .channel-preview { background: #182940; }
[data-channel-game="storm-rig"] .channel-preview > img { left: auto; width: 74%; }
[data-channel-game="storm-rig"] .channel-preview::after {
  background: linear-gradient(90deg, #182940 19%, #182940a6 39%, transparent 71%);
}

.channel-title { padding: clamp(22px, 5vw, 68px); }
.channel-title h1 {
  max-width: 12ch;
  font-size: clamp(40px, 6.3vw, 87px);
  font-weight: 880;
  letter-spacing: -.065em;
  line-height: .98;
  text-shadow: 0 2px 3px #091629c0, 0 5px 24px #09162969;
  text-wrap: balance;
}
.channel-title h1:focus { outline: none; }

.channel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 20px);
  width: min(590px, 100%);
  margin: clamp(16px, 2.9vh, 28px) auto 0;
}
.game-page .channel-actions .button {
  min-height: clamp(52px, 7vh, 66px);
  padding-inline: 16px;
  border-radius: 999px;
  gap: 10px;
  font-size: clamp(16px, 2.2vw, 23px);
  font-weight: 790;
  box-shadow: inset 0 1px white, 0 3px 6px #21486623;
}
.game-page .channel-actions .secondary {
  color: var(--ink);
  background: linear-gradient(#fff, #edf5fd);
  border-color: #a3c5df;
}
.game-page .channel-actions .primary {
  color: #222c42;
  background: linear-gradient(#fff199, #ffe16c 60%, #ffd652);
  border-color: #c49719;
}
.game-page .channel-actions .primary:hover {
  background: linear-gradient(#fff5b6, #ffe16c 70%, #ffd652);
}
.game-page .channel-actions .button:focus-visible,
.game-page .channel-utilities .button:focus-visible {
  outline: 2px solid #164c73;
  outline-offset: 3px;
}

.channel-description {
  max-width: 59ch;
  margin: clamp(15px, 3vh, 27px) auto 0;
  text-align: center;
  text-wrap: pretty;
  color: var(--muted);
  font-size: clamp(13px, 1.3vw, 15px);
  line-height: 1.55;
}
.channel-utilities {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.game-page .channel-utilities .button {
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}
.game-page .channel-utilities .button:hover { background: #e6f2fc; }
.channel-utilities [aria-pressed="true"] .icon { fill: #16659f; color: #16659f; }

#panel:has(.channel-info) { width: min(760px, calc(100% - 28px)); }
.channel-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 17px 0;
}
.channel-info > div {
  padding: 13px;
  border-radius: 13px;
  border: 1px solid #ccddea;
  background: #f6fbff;
}
.channel-info strong { display: flex; align-items: center; gap: 6px; }
.channel-info strong .icon { color: var(--accent-deep); }
#panel .channel-info p { margin: 7px 0 0; }
.channel-info .text-button { text-align: left; }
#panel .game-peep-callout { margin-bottom: 16px; }
#panel .game-peep-callout p { margin: 4px 0 0; }
.channel-instructions a { color: var(--accent-deep); text-decoration: underline; }

#panel:has(.screenshot-panel) { width: min(980px, calc(100% - 28px)); }
.channel-screenshot {
  width: 100%;
  height: auto;
  max-height: 64svh;
  object-fit: contain;
  margin-block: 12px;
  border-radius: 12px;
  background: #102231;
}
.channel-screenshot-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.channel-screenshot-nav > span { color: var(--muted); font-size: 13px; white-space: nowrap; }

#panel[open]:has(.playing) {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #10182e;
}

html:has(#panel[open] .playing) { overflow: hidden; }
#panel .playing {
  width: 100%;
  height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #10182e;
}
#panel .playing .game-toolbar {
  padding: 4px max(10px, 1.25vw);
  color: #142d4a;
  background: linear-gradient(#fff, #ebf5fd);
  border-bottom: 1px solid #abc5d9;
}
#panel .playing .game-toolbar button {
  min-height: 36px;
  border: 1px solid #c0d6e9;
  border-radius: 999px;
  padding-inline: 10px;
  background: #fdfdff;
  box-shadow: 0 1px 2px #0f365821;
}
#panel .playing .game-toolbar button:hover { background: #e1f0fb; }
#panel .playing .game-toolbar .game-announcement { color: #176442; }
#panel .player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #10182e;
}

@media (max-width: 650px) {
  .channel-preview { height: clamp(230px, 50vw, 325px); align-items: end; }
  .channel-preview::after { background: linear-gradient(0deg, #081829d9, #0818293d 38%, transparent 67%); }
  [data-channel-game="storm-rig"] .channel-preview > img { width: 100%; }
  [data-channel-game="storm-rig"] .channel-preview::after { background: linear-gradient(0deg, #101d2ed9, #101d2e33 43%, transparent 72%); }
  .channel-title h1 { max-width: 100%; font-size: clamp(36px, 8vw, 49px); }
  .channel-utilities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-page .channel-utilities .button {
    flex-direction: column;
    gap: 4px;
    min-height: 48px;
    padding: 5px 3px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    white-space: normal;
  }
  .channel-info { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .channel-utilities { gap: 2px; }
  .channel-screenshot-nav .button { padding-inline: 8px; }
}
