/* One continuous display inside a quiet glass/titanium shell. The complete
   original canvas stays visible; the device footprint and game logic stay fixed. */
.cinematic-workshop { position:relative; z-index:1; box-sizing:border-box; width:min(1180px,100%); margin:0 auto; padding:clamp(52px,8vw,112px) clamp(16px,4vw,48px); background:transparent; color:#173238; }
.cinematic-workshop * { box-sizing:border-box; }
.cw-intro { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:16px 40px; align-items:end; margin-bottom:32px; }
.cw-kicker { grid-column:1/-1; margin:0; font-size:.75rem; line-height:1.5; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.cw-intro h2 { margin:0; color:#173238; font-family:var(--font-display,"Cormorant Garamond",Georgia,serif); font-size:clamp(46px,6vw,84px); font-weight:500; line-height:.97; letter-spacing:-.035em; }
.cw-intro h2 em { color:#315e60; font-weight:500; }
.cw-intro > p:last-child { max-width:34ch; margin:0 0 5px; font-size:clamp(1rem,1.4vw,1.125rem); line-height:1.65; }
.cw-console { position:relative; border:1px solid #31575e; border-radius:20px; background:#101c30; color:#f8f6ed; box-shadow:0 24px 64px rgb(18 44 49 / .2); overflow:hidden; }
.cw-console-top { display:flex; justify-content:space-between; flex-wrap:wrap; gap:5px 20px; padding:15px clamp(14px,3vw,32px); color:#d6e4dd; border-bottom:1px solid #365263; font-size:.69rem; line-height:1.5; letter-spacing:.11em; text-transform:uppercase; }
.cw-scene-surface { position:relative; min-width:0; padding:clamp(16px,3vw,32px) 8px; isolation:isolate; overflow:hidden; background:radial-gradient(ellipse at 50% 40%,#273b4b,#101c30 76%); }
/* Reserve the largest 3:2 scene footprint before the original pixel-fit runs.
   The game can choose its own smaller fitted size without shifting content. */
.cw-camera { position:relative; width:100%; transform-origin:50% 46%; will-change:auto; }
.cw-screen-wrap { display:flex; width:100%; aspect-ratio:3/2; max-height:480px; align-items:center; justify-content:center; touch-action:pan-y pinch-zoom; outline-offset:-4px; }
.cw-fold { position:relative; width:min(720px,100%); aspect-ratio:3/2; border-radius:16px; background:#080e16; box-shadow:0 0 0 1px #62717d,0 0 0 3px #17212c,0 16px 30px rgb(2 8 16 / .34); perspective:1200px; transform-style:preserve-3d; }
.cw-fold::before { content:""; position:absolute; z-index:3; inset:-2px; border:1px solid rgb(216 228 235 / .62); border-radius:18px; box-shadow:inset 0 1px 0 rgb(255 255 255 / .28),0 1px 0 rgb(3 8 15 / .9); pointer-events:none; }
.cw-fold-world { position:relative; z-index:1; display:grid; place-items:center; width:100%; height:100%; clip-path:inset(0 50% 0 50%); transition:clip-path 1.3s cubic-bezier(.22,.8,.24,1); }
.cw-fold.is-open .cw-fold-world { clip-path:inset(0); }
.cw-fold-world::after { content:""; position:absolute; inset:0; border-radius:16px; pointer-events:none; background:linear-gradient(90deg,transparent 48.9%,rgb(1 5 12 / .055) 49.8%,rgb(242 249 255 / .035) 50.2%,transparent 51.1%),linear-gradient(155deg,rgb(239 247 255 / .065),transparent 27%,transparent 79%,rgb(218 232 241 / .025)); }
/* A small inset leaves room for the rounded frame without clipping any native
   pixel. Override only the original inline display size, never canvas resolution. */
#cw-gba { display:block; width:calc(100% - 16px) !important; height:auto !important; background:#203050; image-rendering:pixelated; image-rendering:crisp-edges; }
.cw-leaf { display:none; }
.cw-slab { position:absolute; z-index:4; left:24%; right:24%; top:8%; bottom:8%; border-radius:16px; background:linear-gradient(145deg,#82919c,#263541 36%,#0b121d 74%,#637480); box-shadow:0 0 0 1px #b4c0c8,0 0 0 3px #17212c,0 18px 34px rgb(2 8 16 / .32); transition:opacity .45s ease; }
.cw-slab-gear { position:absolute; left:50%; top:50%; width:26px; height:26px; transform:translate(-50%,-50%); border:3px solid #9baab5; border-radius:50%; box-shadow:inset 0 0 0 3px #203041,0 0 0 2px #203041; }
.cw-gleam { position:absolute; z-index:5; left:50%; top:10%; width:2px; height:80%; transform:translateX(-50%); pointer-events:none; background:linear-gradient(transparent,rgb(239 248 255 / .55),transparent); transition:opacity .6s ease; }
.cw-fold.is-open .cw-slab,.cw-fold.is-open .cw-gleam { opacity:0; visibility:hidden; }
.cw-hinge-cap { display:none; }
.cw-device-shadow { position:absolute; z-index:0; left:12%; right:12%; bottom:-14px; height:18px; pointer-events:none; background:radial-gradient(ellipse,rgb(16 24 48 / .34),transparent 70%); }
.cw-poster { position:absolute; inset:0; display:block; width:100%; height:100%; padding:24px; object-fit:contain; background:#101c30; image-rendering:pixelated; }
[data-workshop-ready="true"] .cw-poster { display:none; }
.cw-controls { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; padding:18px 16px 12px; border-top:1px solid #365263; }
.cinematic-workshop button { min-height:44px; min-width:44px; padding:10px 17px; border:1px solid #66858d; border-radius:999px; background:transparent; color:inherit; font:inherit; font-size:.875rem; line-height:1.35; cursor:pointer; }
.cw-controls [data-workshop-action="disrupt"] { border-color:#f3d57f; color:#141f30; background:#f3d57f; font-weight:700; }
.cinematic-workshop button:disabled { opacity:.5; cursor:wait; }
.cinematic-workshop button:focus-visible,.cw-screen-wrap:focus-visible,.cw-more summary:focus-visible,.cw-role-bubble a:focus-visible { outline:3px solid #20d0d8; outline-offset:3px; }
.cinematic-workshop button:hover:enabled { border-color:#20d0d8; }
.cw-readout { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:0 24px 20px; }
.cw-readout p { margin:0; color:#d6e4dd; font-size:.8rem; line-height:1.55; }
.cw-meter { flex:0 0 58px; height:4px; border-radius:4px; overflow:hidden; background:#365263; }
.cw-meter > span { display:block; width:100%; height:100%; background:#f3d57f; transform-origin:left center; }
.cw-help { max-width:80ch; margin:22px auto 0; font-size:.875rem; line-height:1.7; }
.cw-more { max-width:80ch; margin:12px auto 0; font-size:.85rem; line-height:1.7; }
.cw-more summary { display:list-item; width:fit-content; min-height:44px; padding:10px 0; cursor:pointer; font-weight:700; }
.cw-more-controls { display:flex; flex-wrap:wrap; gap:8px; margin:5px 0 12px; }
.cw-mode-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 12px; }
.cw-mode-controls > span { min-width:48px; font-weight:700; }
.cw-mode-controls [aria-checked="true"] { background:#173238; color:#faf9f4; }
.cw-more p { margin:0; max-width:75ch; }
.cw-role-bubble { position:fixed; z-index:100; width:min(260px,calc(100vw - 24px)); padding:15px; border:1px solid #8ca5a2; border-radius:12px; color:#173238; background:#faf9f4; box-shadow:0 12px 32px rgb(16 24 48 / .22); }
.cw-role-bubble[hidden] { display:none; }
.cw-role-bubble p { margin:0 0 8px; font-size:.875rem; line-height:1.5; }
.cw-role-bubble a { display:inline-flex; align-items:center; min-height:44px; color:inherit; margin-right:10px; text-decoration:underline; }
.cw-fold.is-calm .cw-leaf,.cw-fold.is-calm .cw-fold-world,.cw-fold.is-calm .cw-slab,.cw-fold.is-calm .cw-gleam { transition:none; }
.cw-fold.is-calm .cw-leaf { transform:none; }.cw-fold.is-calm .cw-fold-world { clip-path:none; }.cw-fold.is-calm .cw-slab,.cw-fold.is-calm .cw-gleam { display:none; }
@media (max-width:620px) {
  .cw-intro { grid-template-columns:1fr; gap:14px; margin-bottom:24px; }
  .cw-intro > p:last-child { max-width:42ch; margin:0; }
  .cw-console { border-radius:14px; }
  .cw-console-top { font-size:.6rem; letter-spacing:.07em; }
  .cw-console-top span:last-child { display:none; }
  .cw-scene-surface { padding:18px 0; }
  .cw-controls { padding:14px 10px 10px; gap:6px; }
  .cw-controls button { flex:1 0 calc(50% - 6px); }
  .cw-readout { padding:0 15px 16px; gap:10px; }
  .cw-readout p { font-size:.75rem; min-height:4.65em; }
  .cw-meter { flex-basis:36px; }
}
@media (prefers-reduced-motion:reduce) {
  .cw-camera { transform:none !important; }
  .cw-fold-world,.cw-leaf,.cw-slab,.cw-gleam { transition:none; }
  .cw-leaf { transform:none; }.cw-fold-world { clip-path:none; }.cw-slab,.cw-gleam { display:none; }
}
@media print {
  .cw-camera { transform:none !important; }
  .cw-controls,.cw-more,.cw-role-bubble { display:none !important; }
  .cw-poster { display:block !important; }
  .cw-console { box-shadow:none; break-inside:avoid; }
}
