.play-page{padding-top:64px;}.play-heading{display:flex;justify-content:space-between;gap:32px;align-items:end;margin-bottom:40px;}.play-heading h1{font-size:clamp(42px,6vw,76px);line-height:1.08;letter-spacing:-.045em;margin:18px 0;}.play-heading p{line-height:1.8;color:var(--muted,var(--theme-muted, #a6bac4));}.play-beta{font-size:11px;letter-spacing:0;border:1px solid var(--theme-border, #38515c);padding:4px 8px;margin-left:10px;border-radius:20px;}.play-workbench{display:grid;grid-template-columns:260px minmax(0,1fr);border:1px solid var(--theme-border, #2b404d);border-radius:22px;background:var(--theme-inset, #0d171f);overflow:hidden;box-shadow:0 25px 90px var(--theme-shadow-color, #0004);}.play-library{padding:28px;background:var(--theme-surface, #101c24);border-right:1px solid var(--theme-border, #2b404d);}.play-library h2{font-size:22px;margin:10px 0 26px;}.play-app{display:block;position:relative;margin:14px 0;cursor:pointer;}.play-app input{position:absolute;top:19px;right:16px;accent-color:#83edcf;}.play-app>span{display:grid;gap:8px;padding:17px 34px 17px 17px;border:1px solid var(--theme-border, #34464f);border-radius:12px;transition:background .15s,border-color .15s;}.play-app input:checked+span{background:var(--theme-subtle, #1b3539);border-color:var(--theme-edge, #6ddac0);}.play-app input:focus-visible+span{outline:3px solid var(--theme-edge, #85c9ff);outline-offset:3px;}.play-app b{font:10px monospace;letter-spacing:.08em;color:var(--theme-link, #88c3bd);}.play-app strong{font-size:17px;}.play-app small{font-size:12px;line-height:1.7;color:var(--theme-muted, #aabdc8);}.play-help{font-size:12px;line-height:1.85;margin-top:32px;color:var(--theme-muted, #aabdc8);}.play-help strong{color:var(--theme-link, #e2eef4);}.play-console{min-width:0;padding:24px;}.play-console-bar{display:flex;justify-content:space-between;gap:16px;align-items:center;color:var(--theme-muted, #9db4c2);font:11px monospace;margin-bottom:24px;}.play-console-bar>span{white-space:nowrap;}.play-console-bar output{font:12px/1.5 system-ui;text-align:right;overflow-wrap:anywhere;}.play-stage{width:100%;max-width:640px;margin:auto;}.play-screen{position:relative;background:var(--theme-inset, #080e14);aspect-ratio:4/3;border:1px solid var(--theme-border, #314654);border-radius:12px;overflow:hidden;}.play-screen canvas{display:block;width:100%;height:100%;object-fit:contain;touch-action:none;outline-offset:-4px;}.play-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background:radial-gradient(ellipse at 50% 80%,var(--theme-surface, #14343c),var(--theme-inset, #0a151f) 70%);pointer-events:none;}.play-placeholder span{font:12px monospace;letter-spacing:.25em;color:var(--theme-accent-ink, #7de6cb);}.play-placeholder p{font-size:clamp(22px,3vw,36px);text-align:center;line-height:1.5;color:var(--theme-link, #d2e4eb);}.play-screen.running .play-placeholder{display:none;}.play-pad{display:flex;justify-content:space-between;padding:18px 6px 8px;}.play-pad>div{display:flex;gap:12px;}.play-pad button{width:52px;height:48px;border:1px solid var(--theme-edge, #375463);border-radius:12px;background:var(--theme-surface, #192a36);color:var(--theme-link, #d5ecf2);font:18px monospace;touch-action:none;user-select:none;}.play-pad button:active,.play-pad button[aria-pressed=true]{background:var(--theme-subtle, #28584f);color:var(--theme-accent-ink, #a0ffe0);border-color:var(--theme-accent-ink, #80e7c7);}.play-pad>div:last-child button{border-radius:50%;background:var(--theme-subtle, #203d40);}.play-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:20px;}.play-actions .button{padding:10px 18px;font-size:13px;}.play-actions button:disabled{opacity:.4;cursor:default;}.play-expand{background:none;border:0;color:var(--theme-link, #b5d7e0);margin-left:auto;cursor:pointer;}.play-stats{display:flex;flex-wrap:wrap;gap:20px;border-top:1px solid var(--theme-border, #273a45);padding-top:17px;margin-top:22px;font-size:11px;color:var(--theme-muted, #92aab8);}.play-stats output{font:12px monospace;color:var(--theme-link, #c7e6ed);margin-left:5px;}.play-notes{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;margin:48px 0 68px;}.play-notes span{font:10px monospace;letter-spacing:.1em;color:var(--theme-muted, #76afa9);}.play-notes h2{font-size:19px;margin:13px 0;}.play-notes p{font-size:13px;line-height:1.9;color:var(--theme-muted, #9bb1bf);}.play-notes a{font-size:13px;}.play-stage:fullscreen{max-width:none;background:var(--theme-inset, #081018);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;}.play-stage:fullscreen .play-screen{width:min(100%,calc((100dvh - 110px)*var(--display-ratio,1.333333)));max-height:calc(100dvh - 110px);}.play-stage:fullscreen .play-pad{width:min(100%,640px);}@media(max-width:800px){.play-heading{display:block;}.play-heading>a{display:inline-block;margin-top:14px;}.play-workbench{grid-template-columns:1fr;}.play-library{border-right:0;border-bottom:1px solid var(--theme-border, #2b404d);padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:12px;}.play-library>.eyebrow,.play-library>h2,.play-help{display:none;}.play-app{margin:0;}.play-app>span{padding:14px 28px 14px 12px;}.play-console{padding:20px;}.play-notes{grid-template-columns:1fr;gap:20px;}.play-page{padding-top:32px;}.play-console-bar{flex-wrap:wrap;margin-bottom:16px;}.play-heading{margin-bottom:24px;}}@media(prefers-reduced-motion:reduce){.play-app>span{transition:none;}}

.play-editor { margin: 12px 0 0; padding: 16px; border: 1px solid var(--theme-edge, #516f7b); border-radius: 10px; background: var(--theme-surface, #12232d); color: var(--theme-text, #e3edef); }
.play-editor[hidden],.play-editor [hidden] { display: none; }
.play-editor label { display: grid; gap: 10px; font-size: 13px; }
.play-editor input,.play-editor textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--theme-edge, #52727f); border-radius: 6px; background: var(--theme-inset, #080e13); color: var(--theme-text, #e3edef); font: 16px/1.5 system-ui,sans-serif; }
.play-editor p { font-size: 11px; color: var(--theme-muted, #b1c3ca); margin: 8px 0 12px; }
.play-editor>div { display: flex; gap: 10px; }
.play-editor button { min-height: 40px; padding: 8px 18px; background: #b6f568; color: #142008; border: 0; border-radius: 5px; }
.play-editor [data-cancel] { background: var(--theme-subtle, #253943); color: var(--theme-text, #e3edef); }
.play-platform-status { color: var(--theme-muted, #a5bac2); font-size: 12px; line-height: 1.7; }
.play-logs { color: var(--theme-muted, #a5bac2); font-size: 12px; margin: 12px 0; }
.store-play-heading { display: flex; gap: 24px; align-items: center; justify-content: space-between; margin: 28px 0; }
.store-play-heading h1 { font-size: clamp(25px,4vw,42px); margin: 16px 0 8px; }
.store-play-heading p,.store-play-help p { color: var(--theme-muted, #a5bac2); line-height: 1.8; }
.store-play-heading a { font-size: 13px; }
.store-play-console { border: 1px solid var(--theme-border, #2b404d); border-radius: 18px; background: var(--theme-inset, #0d171f); max-width: 900px; margin: auto; }
.store-play-help { max-width: 900px; margin: 32px auto; }
.store-play-help h2 { font-size: 20px; }
.play-pad .play-dpad { display: grid; grid-template-columns: repeat(3,42px); gap: 5px; }
.play-dpad [data-key="1"] { grid-column: 2; }.play-dpad [data-key="4"] { grid-row: 2; grid-column: 1; }.play-dpad [data-key="2"] { grid-row: 2; grid-column: 2; }.play-dpad [data-key="8"] { grid-row: 2; grid-column: 3; }
.play-pad .play-pad-system { align-items: end; gap: 6px; }
.play-pad-system button { font-size: 9px; width: 54px; height: 30px; border-radius: 20px; }
.play-pad .play-pad-face { display: grid; grid-template-columns: repeat(2,42px); gap: 7px; transform: rotate(-12deg); }
.play-pad-face button { border-radius: 50%; }
.play-dpad button,.play-pad-face button { width: 42px; height: 42px; padding: 0; }
.play-pad-face [data-key="16"] { border-color: var(--theme-accent-ink, #81bd49); color: var(--theme-accent-ink, #b6f568); }
.store-play-console .play-actions { flex-wrap: wrap; }
.play-stage:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; max-width: none; width: 100%; height: 100%; background: var(--theme-inset, #060c10); box-sizing: border-box; }
.play-stage:fullscreen .play-screen { width: min(100%, calc((100dvh - 140px) * var(--display-ratio, 1.333333))); max-height: calc(100dvh - 140px); flex-shrink: 0; }
.play-stage:fullscreen .play-pad { width: min(640px, 100%); box-sizing: border-box; flex-shrink: 0; }
@media(max-width:560px) {
  .store-play-heading { align-items: start; }.store-play-heading>.button { padding: 8px 10px; }
  .store-play-console { padding: 12px; }.play-pad { gap: 8px; padding-left: 0; padding-right: 0; }
  .play-pad .play-dpad { grid-template-columns: repeat(3,36px); }.play-dpad button { width: 36px; height: 40px; }
  .play-pad-system { flex-direction: column; justify-content: end; }.play-pad-system button { width: 48px; height: 27px; }
}
.play-logs pre { max-height: 180px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--theme-inset, #080e13); padding: 12px; border-radius: 6px; }

/* CSS sampling only: no additional canvas, texture copy or animation loop. */
.play-stage[data-scaling="pixel"] canvas { image-rendering:pixelated; }
.play-stage[data-scaling="smooth"] canvas { image-rendering:auto; }
.player-settings { display:flex; align-items:start; flex-wrap:wrap; gap:12px; margin:14px 0; }
.player-devices { flex:1 1 310px; min-width:0; border:1px solid var(--theme-border, #33444c); border-radius:10px; background:var(--theme-inset, #0b141a); }
.player-devices summary { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:48px; padding:12px 14px; cursor:pointer; list-style:none; }
.player-devices summary::-webkit-details-marker { display:none; }
.player-devices summary strong { font:600 12px/1.6 system-ui; color:var(--theme-text, #d8e8e0); }
.player-devices summary>span { font:11px/1.5 system-ui; color:var(--theme-accent-ink, #b6f568); white-space:nowrap; }
.player-devices summary>span::after { content:" +"; }
.player-devices[open] summary>span::after { content:" −"; }
.player-devices summary:focus-visible { outline:2px solid var(--theme-accent-ink, #b6f568); outline-offset:3px; }
.player-device-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:0 12px; }
.player-device-option { display:flex; flex-direction:column; gap:7px; padding:9px; border:1px solid var(--theme-border, #3b4c55); border-radius:8px; position:relative; cursor:pointer; min-width:0; color:var(--theme-text, #e1eae9); }
.player-device-option input { position:absolute; right:14px; top:14px; accent-color:#8dc94f; width:16px; height:16px; margin:0; }
.player-device-option img { width:100%; height:105px; object-fit:contain; background:radial-gradient(ellipse at 50% 65%,var(--theme-subtle, #23382f),var(--theme-inset, #101b20) 75%); border-radius:4px; }
.player-device-placeholder { display:flex; align-items:center; justify-content:center; height:105px; background:var(--theme-surface, #17291f); border:1px dashed var(--theme-edge, #52664b); color:var(--theme-accent-ink, #a4c875); border-radius:4px; font:12px monospace; }
.player-device-option strong { font:600 11px/1.4 system-ui; overflow-wrap:anywhere; }
.player-device-option small { font:10px/1.6 system-ui; color:var(--theme-muted, #9bafb8); }
.player-device-option:has(input:checked) { background:var(--theme-surface, #1c2d23); border-color:var(--theme-accent-ink, #a1d45f); }
.player-device-option:has(input:focus-visible) { outline:2px solid var(--theme-accent-ink, #b6f568); outline-offset:2px; }
.player-device-option:has(input:disabled) { opacity:.5; cursor:wait; }
.player-device-note { padding:0 14px; color:var(--theme-muted, #a2b3bb); font:11px/1.8 system-ui; }
.player-scaling { display:flex; gap:10px; align-items:center; color:var(--theme-muted, #9caeb7); font:12px system-ui; min-height:48px; }
.player-scaling select { background:var(--theme-surface, #14221b); border:1px solid var(--theme-edge, #456047); border-radius:7px; color:var(--theme-accent-ink, #c9f39f); min-height:44px; padding:8px 28px 8px 12px; font:12px system-ui; width:auto; }
.player-scaling select:focus-visible { outline:2px solid var(--theme-accent-ink, #b6f568); outline-offset:2px; }
.play-file-picker { width:min(480px,calc(100vw - 32px)); padding:24px; border:1px solid var(--theme-border); border-radius:14px; background:var(--theme-surface); color:var(--theme-text); }
.play-file-picker::backdrop { background:#0009; }
.play-file-picker h2 { margin:0 0 12px; font-size:20px; }
.play-file-picker p { font-size:13px; line-height:1.8; }
.play-file-picker input { display:block; width:100%; margin:20px 0; min-height:44px; }
@media(max-width:560px) {
  .player-device-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .player-devices { flex-basis:100%; }
  .player-scaling { min-height:44px; }
}

.play-actions [hidden] { display: none !important; }

.play-capability-status { flex-basis:100%; font-size:12px; line-height:1.6; color:var(--theme-muted, #68766f); overflow-wrap:anywhere; }
