/* A viewport-sized play surface with a compact utility rail. Mobile keeps its touch layout. */
@media (min-width:761px) and (min-height:501px), (min-width:1001px) {
  .desktop-play-page { --desktop-game-height: calc(100dvh - 94px); }
  body.desktop-play-page .world-motion { opacity: .17; }
  .desktop-play-page > :is(.shell,.page-shell) { position: relative; display: flex; flex-direction: column; width: 100%; max-width: none; height: 100dvh; min-height: 0; padding: 0 28px; }
  .desktop-play-page :is(.header,.site-header) { flex: 0 0 60px; height: 60px; min-height: 60px; padding: 0; border: 0; }
  .desktop-play-page :is(.header,.site-header) .brand { font-size: 22px; }
  .desktop-play-page > :is(.shell,.page-shell) > main { flex: 1; min-height: 0; padding: 14px 0 20px; overflow: auto; }
  .desktop-play-page > :is(.shell,.page-shell) > footer { display: none; }
  .desktop-play-page .game-switcher { position: absolute; top: 8px; left: 164px; z-index: 30; width: 190px; height: 44px; min-height: 0; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; backdrop-filter: none; overflow: visible; }
  .desktop-play-page .game-switcher > :is(a,.switcher-label) { display: none; }
  .desktop-play-page .mobile-game-picker { position: static; display: flex; width: 100%; margin: 0; padding: 0; }
  .desktop-play-page .mobile-game-picker-label { display: none; }
  .desktop-play-page .mobile-game-picker > .select-control { width: 100%; }
  .desktop-play-page .mobile-game-picker .select-trigger { height: 44px; min-height: 44px; padding: 0 13px; border: 0; border-radius: 9px; background: #ffffff03; box-shadow: none; font-size: 12px; color: #aaa; }
  .desktop-play-page .mobile-game-picker .select-trigger:hover { background: #ffffff07; color: #ddd; }

  .desktop-play-page .play-layout { --play-height: max(300px,min(var(--desktop-game-height),calc(100vw - 232px))); --play-width: var(--play-height); position: relative; display: block; width: calc(var(--play-width) + 176px); height: var(--play-height); max-width: none; margin: 0 auto; padding: 0; }
  .desktop-play-page .blocks-layout { --play-height: max(340px,var(--desktop-game-height)); --play-width: calc((var(--play-height) - 16px) / 2 + 16px); }
  .desktop-play-page .game-intro { position: absolute; top: 0; right: 0; z-index: 5; width: 148px; max-width: none; margin: 0; padding: 0; }
  .desktop-play-page .game-intro > :is(.eyebrow,p) { display: none; }
  .desktop-play-page .game-intro h1 { margin: 0; font-family: inherit; font-size: 30px; line-height: 1.2; font-weight: 350; letter-spacing: -.055em; color: #d2d2d2; }
  .desktop-play-page .game-help { position: relative; width: 100%; max-width: none; margin: 8px 0 0; }
  .desktop-play-page .game-help > summary { font-size: 11px; color: #929292; padding: 5px 0; }
  .desktop-play-page .game-help[open] { position: absolute; right: 0; top: 36px; z-index: 30; width: min(330px,calc(100vw - 64px)); max-height: calc(100dvh - 140px); overflow: auto; padding: 12px 18px; border-radius: 12px; background: #272727; box-shadow: 0 12px 40px #0006,inset 0 1px 1px #ffffff06; }
  .desktop-play-page .game-help[open] > summary { padding: 3px 0 7px; }
  .desktop-play-page .game-help .rules-list { padding: 10px 0 0; margin: 0; border: 0; }
  .desktop-play-page .game-help :is(.rules-list,.blocks-note) { font-size: 12px; }
  .desktop-play-page .play-column { width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; }
  .desktop-play-page .game-panel { display: grid; grid-template-columns: var(--play-width) 148px; grid-template-rows: 76px auto minmax(0,1fr) 66px; gap: 12px 28px; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .desktop-play-page .stats-row { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 17px; width: 100%; margin: 0; padding: 0; border: 0; }
  .desktop-play-page .stats-row > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; justify-self: stretch; min-width: 0; }
  .desktop-play-page .stat-label { font-size: 11px; line-height: 14px; color: #949494; letter-spacing: .02em; }
  .desktop-play-page .stat-value { font-size: 30px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: #d3d3d3; }
  .desktop-play-page :is(.board-container,.blocks-board-wrap) { grid-column: 1; grid-row: 1 / -1; width: var(--play-width); height: var(--play-height); min-height: 0; margin: 0; padding: 10px; border: 0; border-radius: 17px; background: #1b1b1b; box-shadow: inset 0 2px 5px #00000050,inset 0 -1px 2px #ffffff04,0 12px 35px #00000018; }
  .desktop-play-page :is(.snake-canvas,.merge-board) { display: grid; width: 100%; height: 100%; max-height: none; aspect-ratio: 1; }
  .desktop-play-page .snake-canvas { display: block; }
  .desktop-play-page .blocks-stage { display: contents; }
  .desktop-play-page .blocks-board-wrap { padding: 8px; border-radius: 13px; }
  .desktop-play-page .blocks-canvas { width: 100%; height: 100%; max-height: none; aspect-ratio: 1 / 2; }
  .desktop-play-page .blocks-stage > aside { grid-column: 2; grid-row: 3; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 12px; min-height: 0; }
  .desktop-play-page .next-piece { width: 88px; padding: 10px; border: 0; border-radius: 10px; background: #ffffff02; box-shadow: inset 0 1px 3px #0002; }
  .desktop-play-page .next-piece p { margin: 0 0 5px; font-size: 10px; color: #8e8e8e; text-align: left; }
  .desktop-play-page .next-canvas { width: 68px; height: 68px; }
  .desktop-play-page .blocks-side-note { margin: 0; font-size: 10px; line-height: 1.6; text-align: left; }
  .desktop-play-page .blocks-side-note b { font-size: 12px; font-weight: 400; color: #bbb; }
  .desktop-play-page .game-panel-bottom { grid-column: 2; grid-row: 4; align-self: end; display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; margin: 0; padding: 0; }
  .desktop-play-page .game-panel-bottom > :is(span,p) { min-height: 0; font-size: 11px; line-height: 14px; color: #929292; }
  .desktop-play-page .game-panel-bottom .solid-button { width: 100%; min-width: 0; min-height: 44px; height: 44px; padding: 0 14px; font-size: 12px; border: 0; border-radius: 10px; background: linear-gradient(155deg,#303030,#252525); color: #d0d0d0; box-shadow: inset 0 1px 1px #ffffff08,0 3px 7px #00000033; }
  .desktop-play-page :is(.game-controls,.blocks-controls,.game-footnote) { display: none; }
  .desktop-play-page .game-overlay { border-radius: inherit; }
  .desktop-play-page .merge-board { --merge-gap: clamp(8px,1vw,12px); }
  .desktop-play-page .merge-cell { font-size: clamp(26px,8cqw,64px); }
  .desktop-play-page .merge-cell:is([data-value="128"],[data-value="256"],[data-value="512"]) { font-size: clamp(22px,7cqw,56px); }
  .desktop-play-page .merge-cell:is([data-value="1024"],[data-value="2048"],[data-value="4096"],[data-value="8192"]) { font-size: clamp(19px,6cqw,48px); }
}
@media (min-width:761px) and (min-height:501px) and (max-height:650px), (min-width:1001px) and (max-height:650px) {
  .desktop-play-page .game-intro h1 { font-size: 25px; }
  .desktop-play-page .game-panel { grid-template-rows: 61px auto minmax(0,1fr) 66px; gap: 10px 28px; }
  .desktop-play-page .stats-row { gap: 11px; }
  .desktop-play-page .stats-row > div { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
  .desktop-play-page .stat-value { font-size: 25px; }
  .desktop-play-page .stat-label { font-size: 9px; }
  .desktop-play-page .next-piece { width: 70px; padding: 7px; }
  .desktop-play-page .next-canvas { width: 56px; height: 56px; }
  .desktop-play-page .blocks-stage > aside { gap: 8px; }
  .desktop-play-page .game-help[open] { top: 30px; }
}
