@font-face{font-family:Bricolage;src:url('./bricolage-800.ttf') format('truetype');font-style:normal;font-weight:800;font-display:swap}
@font-face{font-family:'DM Sans';src:url('./dm-sans-latin.woff2') format('woff2');font-style:normal;font-weight:100 1000;font-display:swap}

@layer reset, theme, components, responsive;
@layer reset {
  *,*::before,*::after{box-sizing:border-box}
  html{scroll-behavior:smooth;scroll-padding-top:24px}
  body{margin:0}
  button,a,summary{touch-action:manipulation}
  button{font:inherit;cursor:pointer}
  button:disabled{cursor:default;opacity:.38}
  button{border:0}
  a{color:inherit;text-underline-offset:5px}
  img,svg{display:block;max-width:100%}
  [hidden]{display:none!important}
  h1,h2,p{margin-top:0}
  :is(button,a,summary):focus-visible{outline:3px solid var(--accent);outline-offset:5px}
}
@layer theme {
  :root{color-scheme:light;--paper:#f8f5eb;--ink:#263c32;--muted:#56665a;--line:#d8ddcf;--accent:#a94024;--surface:#eeeee2;--stage:#1c2923;--gold:#f5cf89;--on-dark:#fbf7ed;--muted-dark:#d3dbcf;--radius:20px}
  body{background:var(--paper);color:var(--ink);font:16px/1.6 'DM Sans',sans-serif;-webkit-font-smoothing:antialiased}
  h1,h2,.brand,.footer-brand strong{font-family:Bricolage,'DM Sans',sans-serif;font-weight:800;letter-spacing:-.035em}
  h2{font-size:clamp(27px,3.2vw,38px);line-height:1.13;margin-bottom:24px}
  ::selection{background:#f2d4ad;color:var(--ink)}
  svg{width:20px;height:20px;flex-shrink:0}
  kbd{display:inline-flex;align-items:center;justify-content:center;min-width:26px;min-height:27px;padding:1px 7px;border:1px solid #cbd2c4;border-bottom-width:2px;border-radius:5px;font:500 12px/1.4 'DM Sans',sans-serif;background:#fffdf7;color:var(--ink)}
}
@layer components {
  .shell{width:min(1220px,calc(100% - 80px));margin:auto}
  .skip{position:fixed;top:8px;left:16px;z-index:40;padding:12px 20px;background:var(--ink);color:#fff;transform:translateY(-160%)}
  .skip:focus{transform:none}
  .header{min-height:88px;display:flex;align-items:center;justify-content:space-between;gap:32px;border-bottom:1px solid var(--line)}
  .brand{display:flex;align-items:center;gap:8px;text-decoration:none;font-size:23px;line-height:1.1;white-space:nowrap}
  .brand strong{color:var(--accent);font-weight:inherit}
  .brand-icon{width:48px;height:48px;border-radius:12px;background:url('./icon-192.png') center/contain no-repeat}
  .nav{display:flex;gap:32px}
  .nav a{display:flex;align-items:center;min-height:44px;font-size:14px;font-weight:600;text-decoration:none;position:relative}
  .nav a::after{content:'';position:absolute;bottom:5px;left:0;right:0;height:2px;background:var(--accent);transform:scaleX(0);transform-origin:left;transition:transform 180ms ease}
  .nav a:hover{color:var(--accent)}
  .nav a:hover::after{transform:scaleX(1)}
  #nav-toggle{display:none}
  .intro{display:flex;align-items:center;justify-content:space-between;gap:40px;padding:32px 0 30px}
  h1{font-size:clamp(36px,4.8vw,64px);line-height:1.05;margin:0;white-space:nowrap}
  h1 em{font-style:normal;color:var(--accent)}
  .intro-copy p{margin:0 0 9px;font-size:15px;line-height:1.5;color:var(--muted)}
  .platform-note{font-size:12px;font-weight:600;color:var(--ink)}
  .platform-note span{margin:0 7px;color:var(--accent)}
  .stage{position:relative;border-radius:var(--radius);overflow:hidden;background:var(--stage);color:var(--on-dark);box-shadow:0 16px 40px -22px #263c3252;border:1px solid var(--stage);isolation:isolate;scroll-margin-top:18px}
  .stage :is(button,a):focus-visible{outline-color:var(--gold)}
  .stage-head{min-height:56px;display:flex;align-items:center;justify-content:space-between;padding:5px 18px 5px 24px;gap:12px;border-bottom:1px solid #ffffff20}
  .stage-id{font-size:13px;color:var(--muted-dark)}
  .tools{display:flex;align-items:center;gap:6px}
  .tool{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:8px 12px;background:transparent;color:inherit;border-radius:8px;font-size:13px;transition:background 150ms ease}
  .secondary-tool{color:var(--muted-dark)}
  .fullscreen-tool{border:1px solid #ffffff35}
  .tool:hover:enabled{background:#ffffff14}
  .tool svg{width:17px;height:17px}
  .canvas{position:relative;aspect-ratio:16/9;min-height:400px;background:#101c16}
  #frame-slot,#frame-slot iframe,.cover,.cover-art,.cover-shade,.recovery{position:absolute;inset:0;width:100%;height:100%}
  #frame-slot iframe{border:0;background:#101c16}
  .cover{overflow:hidden}
  .cover-art{object-fit:cover;object-position:center;animation:reveal-room 900ms ease-out both}
  .cover-shade{background:linear-gradient(90deg,#11251df5 0%,#11251dd9 25%,#11251d55 57%,#11251d00 85%),linear-gradient(0deg,#11251c66,transparent 40%)}
  .cover-copy{position:absolute;left:6.2%;top:15%;max-width:470px;right:6%}
  .cover h2{font-size:clamp(38px,4.2vw,58px);line-height:1.02;letter-spacing:-.035em;white-space:pre-line;margin-bottom:18px}
  .cover-description{font-size:17px;line-height:1.5;color:#e0e5d8;margin-bottom:26px}
  .play{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:60px;padding:15px 25px;background:var(--gold);color:#203b2c;border-radius:10px;font-size:16px;font-weight:700;box-shadow:0 6px 18px #0003;transition:background 150ms ease,box-shadow 150ms ease}
  .play svg{fill:currentColor;stroke:none;width:23px;height:23px}
  .play:hover{background:#ffdda0;box-shadow:0 8px 24px #0004}
  .play:active{background:#e7bc72}
  .load-note{font-size:12px;color:#e0e5d8;line-height:1.6;margin:17px 0 0}
  .phone-hint{display:none}
  .photo-caption{position:absolute;right:22px;bottom:18px;font-size:12px;color:#fff;background:#122219b8;padding:5px 10px;border-radius:5px}
  .stage-footer{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #ffffff20;padding:0 18px 0 24px;font-size:12px;color:var(--muted-dark)}
  .focus-game{min-height:44px;padding:6px 8px;background:transparent;color:var(--on-dark);font-size:12px;text-decoration:underline;text-underline-offset:4px;white-space:nowrap}
  .under-player{display:flex;align-items:center;justify-content:space-between;padding:14px 0 20px;gap:20px;font-size:13px;color:var(--muted)}
  .under-player p{margin:0}
  .desktop-controls{display:flex;align-items:center;gap:5px}
  .desktop-controls kbd:last-child{margin-right:2px}
  .control-divider{height:16px;width:1px;background:var(--line);margin:0 12px}
  .mobile-controls{display:none}
  .share{display:flex;align-items:center;justify-content:center;gap:8px;background:transparent;color:var(--ink);min-height:44px;padding:10px 0 10px 12px;font-size:13px;white-space:nowrap;border-radius:6px}
  .share:hover,.text-link:hover{color:var(--accent)}
  .share svg{width:18px;height:18px}
  .start-guide{padding:42px 0 40px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
  .start-guide h2{font-size:27px;margin-bottom:26px}
  .start-guide ol{display:grid;grid-template-columns:repeat(3,1fr);list-style:none;margin:0;padding:0;gap:40px;counter-reset:start}
  .start-guide li{counter-increment:start;position:relative;padding-left:36px}
  .start-guide li::before{content:counter(start);position:absolute;top:0;left:0;display:grid;place-items:center;width:24px;height:24px;border:1px solid #b7c2b1;border-radius:50%;font-size:12px;font-weight:600;color:var(--ink)}
  .start-guide strong{font-size:16px;font-weight:700}
  .start-guide p{font-size:14px;color:var(--muted);line-height:1.7;margin:8px 0 0}
  .content-grid{display:grid;grid-template-columns:1fr 1fr;gap:100px;padding:64px 0 72px}
  .story-copy{max-width:500px}
  .body-copy{font-size:16px;color:var(--muted);line-height:1.8;margin-bottom:20px}
  .genre-line{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:18px}
  .genre-line span{margin:0 7px;color:#9aa491}
  .text-link{display:inline-flex;align-items:center;gap:10px;min-height:44px;font-size:14px;font-weight:600;text-decoration:none}
  .text-link svg{width:18px;height:18px;transition:transform 150ms ease}
  .text-link:hover svg{transform:translateX(3px)}
  .save-note{font-size:13px;color:var(--muted);line-height:1.7;margin:22px 0 0;padding-left:16px;border-left:2px solid #bac5ae}
  #controls h2{font-size:30px}
  .controls{margin:0}
  .control-row{display:grid;grid-template-columns:138px 1fr;gap:18px;padding:14px 0;border-bottom:1px solid var(--line);font-size:14px}
  .control-row:first-child{padding-top:0}
  .control-row dt{display:flex;align-items:flex-start;gap:3px}
  .control-row dd{margin:0;color:var(--muted);line-height:1.7}
  .mic-note{font-size:13px;line-height:1.7;color:var(--muted);margin:19px 0 0}
  .faq-section{display:grid;grid-template-columns:1fr 1.5fr;gap:80px;padding:48px;background:var(--stage);color:var(--on-dark);border-radius:var(--radius)}
  .faq-heading p{font-size:14px;line-height:1.8;color:var(--muted-dark);max-width:290px;margin-bottom:15px}
  .faq-heading .text-link{color:var(--gold)}
  .faq-section :is(a,summary):focus-visible{outline-color:var(--gold)}
  .faq-list details{border-bottom:1px solid #ffffff24}
  .faq-list details:last-child{border:0}
  .faq-list summary{display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:15px;font-weight:500;cursor:pointer;min-height:64px;list-style:none;padding:14px 0}
  .faq-list summary::-webkit-details-marker{display:none}
  .faq-list summary::after{content:'';width:12px;height:12px;flex-shrink:0;background:linear-gradient(var(--gold),var(--gold)) center/12px 2px no-repeat,linear-gradient(var(--gold),var(--gold)) center/2px 12px no-repeat}
  .faq-list details[open] summary::after{background-size:12px 2px,0 0}
  .faq-list details p{font-size:14px;line-height:1.8;color:var(--muted-dark);margin:0 24px 22px 0}
  .footer{display:grid;grid-template-columns:1fr 1.3fr auto;gap:48px;padding:36px 0 40px;font-size:12px;color:var(--muted);align-items:center}
  .footer p{margin:0}
  .footer-brand strong{display:block;font-size:23px;color:var(--ink)}
  .footer-brand span{display:block;margin-top:3px;font-size:12px}
  #credits{max-width:450px}
  .footer .text-link{font-size:13px;white-space:nowrap}
  .recovery{background:#1c2923fb;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;gap:24px}
  .recovery h2{font-size:30px;line-height:1.2;margin:0 0 16px}
  .recovery p{font-size:15px;max-width:420px;color:var(--muted-dark);margin:0}
  .recovery-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
  .quiet-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;background:transparent;color:inherit;border:1px solid #ffffff3b;border-radius:8px;font-size:13px}
  .quiet-button:hover{background:#ffffff14}
  .spinner{display:inline-block;width:28px;height:28px;border:2px solid #ffffff30;border-top-color:var(--gold);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:20px}
  .session-confirm{color:var(--ink);background:var(--paper);width:min(450px,calc(100% - 40px));border:1px solid var(--line);border-radius:16px;padding:30px;box-shadow:0 20px 60px #0004}
  .session-confirm::backdrop{background:#0a1715ad}
  .session-confirm h2{font-size:28px;line-height:1.15;margin-bottom:16px}
  .session-confirm p{font-size:15px;color:var(--muted);line-height:1.7;margin-bottom:24px}
  .dialog-actions{display:flex;gap:10px;flex-wrap:wrap}
  .dialog-actions button{min-height:48px;padding:11px 17px;border:1px solid var(--line);border-radius:8px;font-size:14px;background:transparent;color:var(--ink)}
  #session-confirm-cancel{background:var(--ink);border-color:var(--ink);color:var(--paper);font-weight:600}
  #session-confirm-accept{color:var(--accent)}
  .session-confirm :is(button):focus-visible{outline-color:var(--accent)}
  .stage:fullscreen{height:100%;width:100%;border-radius:0;display:flex;flex-direction:column;border:0}
  .stage:fullscreen .canvas{flex:1;min-height:0;height:auto;aspect-ratio:auto}
  .stage:fullscreen .stage-head,.stage:fullscreen .stage-footer{flex-shrink:0}
  .consent{background:var(--paper);color:var(--ink);padding:24px;position:fixed;bottom:20px;right:20px;z-index:30;max-width:350px;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 30px #0002}
  .consent button{min-height:44px;padding:12px}
  @keyframes spin{to{transform:rotate(360deg)}}
  @keyframes reveal-room{from{clip-path:inset(0 0 5% 0);opacity:.65}to{clip-path:inset(0);opacity:1}}
}
@layer responsive {
  @media(max-width:1050px){
    .shell{width:calc(100% - 48px)}.header{min-height:78px}.nav{gap:24px}.intro{gap:24px;padding:28px 0}.intro-copy p{font-size:14px}.cover-copy{top:11%}.cover h2{font-size:46px}.cover-description{font-size:16px;margin-bottom:20px}.content-grid{gap:48px}.faq-section{gap:45px;padding:36px}.footer{gap:28px}.desktop-controls{gap:3px}.control-divider{margin:0 8px}
  }
  @media(max-width:760px){
    .shell{width:calc(100% - 32px)}.header{min-height:72px;gap:0;flex-wrap:wrap;padding:8px 0}.brand{font-size:21px;gap:5px}.brand-icon{width:40px;height:40px}#nav-toggle{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);font-size:13px}.nav{display:none;width:100%;gap:0;justify-content:space-between;padding-top:8px}.nav.is-open{display:flex}.nav a{font-size:13px;padding:0 5px}.intro{display:block;padding:23px 0 22px}h1{font-size:clamp(32px,7.3vw,49px);line-height:1.07}.intro-copy{margin-top:10px}.intro-copy p{font-size:14px;margin-bottom:0}.intro-copy br{display:none}.intro-copy p br::after{content:' '}.platform-note{display:none}.stage{border-radius:14px}.stage-head{min-height:54px;padding:4px 8px 4px 16px;gap:8px}.stage-id{font-size:12px}.tools{gap:2px}.tool{padding:8px;gap:5px;font-size:12px}.secondary-tool span{display:none}.canvas{aspect-ratio:auto;height:440px;min-height:0}.cover-art{object-position:38% center}.cover-shade{background:linear-gradient(90deg,#11251de8,#11251d9e 50%,#11251d1a),linear-gradient(0deg,#11251caa,transparent 60%)}.cover-copy{left:24px;right:24px;top:30px;max-width:350px}.cover h2{font-size:38px;line-height:1.04;margin-bottom:14px}.cover-description{font-size:15px;line-height:1.5;margin-bottom:24px}.play{min-height:56px;padding:14px 20px;font-size:15px;gap:9px}.load-note{font-size:12px;margin-top:16px}.phone-hint{display:block;font-size:12px;line-height:1.6;color:#e0e5d8;margin:12px 0 0;max-width:240px}.photo-caption{font-size:11px;right:14px;bottom:13px;padding:4px 8px}.stage-footer{min-height:48px;padding:0 10px 0 16px;gap:8px;font-size:12px}.focus-game{font-size:12px}.under-player{padding:12px 0 16px;align-items:center;gap:15px}.desktop-controls{display:none}.mobile-controls{display:block;font-size:12px;max-width:250px;line-height:1.7}.share{font-size:12px;padding-left:0}.share svg{width:17px;height:17px}.start-guide{padding:30px 0}.start-guide h2{font-size:25px;max-width:330px;margin-bottom:24px}.start-guide ol{grid-template-columns:1fr;gap:24px}.start-guide li{padding-left:36px}.start-guide p{margin-top:6px}.content-grid{grid-template-columns:1fr;gap:42px;padding:42px 0}.content-grid h2{font-size:31px;margin-bottom:20px}.body-copy{font-size:16px}.story-copy{max-width:600px}.genre-line{font-size:12px}.save-note{margin-top:16px}#controls h2{font-size:27px}.control-row{grid-template-columns:125px 1fr;gap:16px;font-size:14px}.faq-section{grid-template-columns:1fr;gap:20px;padding:30px 24px;border-radius:14px}.faq-heading h2{font-size:31px}.faq-heading h2 br{display:none}.faq-heading p{max-width:400px}.faq-heading .text-link{display:none}.faq-list summary{min-height:64px;font-size:14px}.faq-list details p{font-size:14px;margin-right:0}.footer{grid-template-columns:1fr;gap:20px;padding:28px 0}.footer .text-link{width:fit-content}.recovery h2{font-size:27px}.recovery p{font-size:14px}.session-confirm{padding:24px}.session-confirm h2{font-size:26px}
  }
  @media(max-width:380px){
    .shell{width:calc(100% - 24px)}.header{min-height:66px}.brand{font-size:18px}.brand-icon{width:34px;height:34px}#nav-toggle{padding:8px;font-size:12px}#nav-toggle svg{width:18px;height:18px}.intro{padding:18px 0}h1{font-size:32px}.intro-copy{margin-top:8px}.intro-copy p{font-size:13px;line-height:1.5}.stage-id{font-size:11px;max-width:85px;line-height:1.3}.stage-head{padding-left:14px}.tool{min-width:44px;font-size:11px;gap:5px}.fullscreen-tool{min-width:44px;padding:8px 7px}.canvas{height:420px}.cover-copy{left:20px;right:20px;top:26px}.cover h2{font-size:34px}.cover-description{font-size:14px;margin-bottom:22px}.play{padding:13px 15px;min-height:54px;font-size:14px}.play svg{width:20px;height:20px}.load-note{font-size:12px;margin-top:14px}.phone-hint{margin-top:10px;max-width:235px}.stage-footer{padding-left:14px;font-size:11px}.focus-game{font-size:11px}.mobile-controls{font-size:12px;max-width:170px}.share span{max-width:40px;white-space:normal;line-height:1.3}.share{gap:6px}.control-row{grid-template-columns:113px 1fr;gap:12px}.control-row dt{gap:2px}.control-row kbd{min-width:24px;padding:1px 6px}.faq-section{padding:26px 20px}.dialog-actions button{flex:1;padding:11px 12px}.session-confirm{width:calc(100% - 24px)}
  }
  @media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}.text-link:hover svg{transform:none}}
}
