/* Gameplay only. The shared shell, menu and dialogs remain in page.css. */
.prism-stage { width:100%;max-width:100%;min-width:0;margin:6px auto 0;padding-bottom:24px; }
.prism-machine { position:relative;width:100%;padding:clamp(13px,3.4cqw,22px);border:1px solid #978063;border-radius:22px;background:repeating-linear-gradient(105deg,#ffffff02 0 1px,transparent 1px 4px),linear-gradient(145deg,#25303d 0%,#101b29 38%,#080e17 70%,#1c2836 100%);box-shadow:inset 0 1px 0 #e6dcba3d,inset 0 0 0 4px #080e16,inset 0 0 0 5px #73808d33,0 18px 30px #0008; }
.prism-board { display:grid;grid-template-columns:repeat(var(--board-size,5),minmax(0,1fr));gap:clamp(4px,1.2cqw,10px);width:100%;min-width:0;padding:4px;border-radius:14px;background:radial-gradient(ellipse at 50% 20%,#20314855,transparent 75%); }
.prism-lens { display:block;position:relative;width:100%;min-width:0;aspect-ratio:1;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;box-shadow:none; }
.prism-lens svg { display:block;width:100%;height:100%;overflow:visible; }
.prism-lens:disabled { opacity:1;filter:none;cursor:default; }
.prism-lens:focus-visible { outline:2px solid #ffe4a1;outline-offset:2px; }
.prism-lens:not(:disabled):active { transform:scale(.97); }
.lens-field { fill:var(--lens-colour,#060d16); }
.iris-leaf { transform-origin:50px 50px;transition:transform .6s cubic-bezier(.3,0,.15,1); }
.is-open .iris-leaf { transform:translateY(-52px) rotate(-12deg); }
.lens-found-ring { opacity:0;transition:opacity .35s; }
.is-found .lens-found-ring { opacity:.85; }
.machine-screw { position:absolute;width:5px;height:5px;border-radius:50%;background:linear-gradient(135deg,#bdc6cf,#29313c 45%,#060b12 50%,#9aa5b1);box-shadow:0 1px 2px #000; }
.screw-tl { left:9px;top:9px; }.screw-tr { right:9px;top:9px; }.screw-bl { left:9px;bottom:9px; }.screw-br { right:9px;bottom:9px; }
.prism-console { display:flex;justify-content:center;padding:20px 8px 0; }
.prism-roll { display:flex;align-items:center;justify-content:center;gap:22px;width:min(100%,320px);height:124px;min-height:124px;padding:16px 24px;border:1px solid #8a7450;border-radius:20px;background:radial-gradient(ellipse at 20% 0,#34425a66,transparent 70%),linear-gradient(140deg,#192330,#080e17);box-shadow:inset 0 1px 0 #eee1bb20,0 10px 24px #0006;color:#ffe7ae;font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent; }
.prism-roll:disabled { opacity:1;cursor:default;border-color:#4c5060; }
.prism-roll:not(:disabled):hover { border-color:#f2d394; }
.prism-roll:focus-visible { outline:2px solid #ffe5a0;outline-offset:4px; }
.die-copy { display:flex;align-items:center;flex:1;min-width:0;height:76px;text-align:start; }
.die-copy strong { display:block;width:100%;font-size:16px;line-height:1.35;overflow-wrap:anywhere; }
.die-perspective { position:relative;flex:0 0 76px;width:76px;height:76px; }
.closed-die { position:absolute;display:block;width:128px;height:128px;max-width:none;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none; }
.prism-reduced .iris-leaf { transition-duration:.08s; }
.prism-paused .iris-leaf { transition-duration:.08s; }
@media(prefers-reduced-motion:reduce){.iris-leaf { transition-duration:.08s; }}
/* Tablet: size the square board to the usable height, leaving a protected banner area. */
@container gf-page (min-width:600px) {
 .prism-stage { width:min(100%,600px);width:min(100%,600px,max(400px,calc(100svh - 480px)));padding-bottom:calc(160px + env(safe-area-inset-bottom,0px)); }
 .prism-board { gap:8px; }
 .prism-machine { padding:20px; }
 .prism-console { padding-top:16px; }
}
/* The shared page stays narrow in landscape; compact only the touch-tablet board. */
@media (min-width:600px) and (orientation:landscape) and (pointer:coarse) {
 .prism-stage { width:min(100%,400px);width:min(100%,max(320px,calc(100svh - 430px)));padding-bottom:calc(160px + env(safe-area-inset-bottom,0px)); }
 .prism-board { gap:4px; }
 .prism-machine { padding:13px; }
 .prism-console { padding-top:16px; }
}

