/* V35: the entry invitation leads; all later actions belong to the apparatus. */
.paper-control{position:relative;isolation:isolate;touch-action:manipulation}
.machine-key.paper-control{min-width:224px;max-width:100%;border-radius:0;background:none;box-shadow:none;font-family:"TT2020","Special Elite","PT Mono",monospace;font-size:1rem;line-height:1.1;letter-spacing:.015em;text-transform:uppercase;text-shadow:.35px .25px 0 rgba(28,20,12,.5);color:#21180f;transition:transform 110ms cubic-bezier(.16,1,.3,1);transform-origin:24% 72%}
.paper-control::after{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;background-image:var(--paper-image);background-size:100% 100%;background-repeat:no-repeat;filter:drop-shadow(0 3px 3px rgba(0,0,0,.48));transition:opacity 100ms ease}
.machine-key.paper-control:active,.machine-key.paper-control.is-pressed{background:none;box-shadow:none;transform:translateY(1px) scale(.975)}
.machine-key.paper-control:disabled{opacity:.45;cursor:not-allowed}
.paper-control.is-crumpling{color:transparent!important;text-shadow:none!important}
.paper-control[data-paper-printed]{color:transparent!important;text-shadow:none!important}
.paper-control[data-paper-printed]>span{opacity:0}
.toggle.paper-control[data-paper-printed]::before{opacity:0}
.printed-heading{color:transparent!important;text-shadow:none!important;background-image:var(--printed-heading);background-size:100% 100%;background-repeat:no-repeat}
html body .scene-copy h2,html body .scene-copy p,html body .game-info h2,html body .game-info h3,html body .game-info p,html body .toggle,html body .brand,html body .observer-link,html body .official-link,html body .threshold-link,html body .game-return,html body .result-actions,html body .fallback-paper{font-family:"TT2020","PT Mono",monospace;font-weight:400;font-feature-settings:"calt" 1}
html body .scene-copy h2{letter-spacing:-.025em;line-height:1.02}
html body .game-info p{line-height:1.48}
.paper-control.is-crumpling>span{opacity:0}
.paper-control.is-crumpling::after,.toggle.paper-control.is-crumpling::before{opacity:0}
.paper-fold{position:absolute;inset:-12px;display:block;width:calc(100% + 24px);height:calc(100% + 24px);pointer-events:none;z-index:2;contain:layout style}
.toggle.paper-control{font-size:.75rem;letter-spacing:.07em}
.toggle.paper-control[data-sound]{min-width:112px}
button.official-link.paper-control{padding-inline:12px;text-decoration:none}
.hero-lockup .observer-link{margin-top:4px}
.scene--threshold .threshold-link{font-family:"PT Mono",monospace;text-decoration:none;border-bottom:1px solid #776c56}
.scene-copy h2.sr-only,.scene-copy p.sr-only{margin:0;font-size:1rem;line-height:1;letter-spacing:0}
@media(hover:hover) and (pointer:fine){.machine-key.paper-control:hover{background:none}.machine-key.paper-control:active{transform:translateY(1px) scale(.975)}}
@media(max-width:560px){.machine-key.paper-control{font-size:.9375rem}.hero-lockup .hero-actions{margin-top:20px}.game-info .machine-key.paper-control{font-size:.875rem}}
/* The controller resolves system and explicit preferences once. Reduced motion
   keeps the entry's readable poses; it must not hide their only canvas. */
[data-motion="reduced"] .paper-control{transform:none!important}
.machine-key.paper-control.is-entry-playing{transform:none!important;cursor:progress}
html body .machine-key.entry-action:active,html body .machine-key.entry-action.is-pressed{transform:none}
.paper-control.is-entry-playing::after{transition:none;opacity:0}
.entry-action.paper-control::after{transition:none}
.paper-fold--entry{display:block;filter:drop-shadow(0 3px 3px rgba(0,0,0,.38))}
.paper-control[data-paper-tone="grey"]::after{filter:drop-shadow(0 3px 3px rgba(0,0,0,.36))}

/* Eight material drawings: torn edges and creases change, the sheet and ink do
   not travel. Longer held exposures keep this a texture loop, not a tremor. */
.entry-action.paper-control[data-paper-loop="running"]:not(.is-entry-playing)::after{inset:-12px;background-image:var(--paper-idle-image);background-size:800% 100%;animation:paper-idle-boil 2560ms steps(1,end) infinite}
.entry-action.paper-control[data-paper-loop="running"]:focus-visible::after{animation-play-state:paused}
@keyframes paper-idle-boil{
  0%,100%{background-position:0% 0}
  14%{background-position:14.285714% 0}
  24%{background-position:28.571429% 0}
  40%{background-position:42.857143% 0}
  51%{background-position:57.142857% 0}
  65%{background-position:71.428571% 0}
  78%{background-position:85.714286% 0}
  90%{background-position:100% 0}
}
[data-motion="reduced"] .entry-action.paper-control::after{animation:none!important}

/* One bright invitation, quiet utilities, then real labels on the machine. */
html body .machine-key.entry-action{min-width:304px;min-height:68px;padding-inline:28px;font-size:1.125rem;letter-spacing:.025em}
html body .hero-lockup .hero-actions{margin-top:32px}
html body .hero-lockup .observer-link{margin-top:8px;min-height:44px;font-size:.8125rem;color:#b8ad95;text-decoration-color:rgba(184,173,149,.28);text-underline-offset:5px}
html body .machine-key:not(.entry-action){color:#d8ccb0}
html body .machine-settings{gap:8px}
html body .toggle{color:#b8b09b}
html body .brand{color:#c6bca5}
html body .brand small{color:#a79f8c}
html[data-phase="desk"] .brand small,html[data-phase="trial"] .brand small{display:none}
.world-control{min-width:192px;min-height:48px;padding:12px 20px;border:1px solid #756d52;background:#25271d;color:#e0d3b1;font:400 .9375rem/1.2 "TT2020","PT Mono",monospace;cursor:pointer;text-transform:uppercase;letter-spacing:.025em}
[data-seat].world-control{display:none;justify-self:center;align-self:end;margin-bottom:12vh}
.scene--desk>#desk-title{left:0;top:0}
.scene--desk.is-current [data-seat].world-control{display:block}
html.webgl .world-control{position:fixed;z-index:12;left:0;top:0;width:var(--control-width,220px);height:var(--control-height,48px);min-width:0;min-height:44px;padding:0;margin:0;border:0;background:transparent;color:transparent;text-shadow:none;transform:translate3d(var(--control-x,-1000px),var(--control-y,-1000px),0);touch-action:manipulation}
html.webgl .world-control>span{opacity:0}
html.webgl .world-control:focus-visible{outline:1px dashed #e0c998;outline-offset:5px}
html.webgl .type-prompt{display:contents}
html.webgl .type-prompt>[data-machine-state]{position:fixed;left:0;top:0}
html.webgl [data-focus].world-control{display:none}
html.webgl[data-phase="trial"][data-trial-state="ready"] [data-focus].world-control,html.webgl[data-phase="trial"][data-trial-state="released"] [data-focus].world-control{display:block}
html.webgl[data-reading="true"] .world-control{display:none}
html body .trial-tools .official-link{background:none;text-decoration:none;color:#b8ad95}
@media(max-width:560px){html body .machine-key.entry-action{min-width:280px;min-height:64px;font-size:1rem}html body .hero-lockup .hero-actions{margin-top:28px}.world-control{font-size:.875rem}}

/* Hierarchy: unframed paper lettering, quiet dark-paper utilities, then the
   single large light-paper invitation. Hitboxes stay larger than the ink. */
html body .site-chrome{padding-top:max(16px,env(safe-area-inset-top));padding-left:max(18px,env(safe-area-inset-left))}
html body .brand{gap:16px;min-width:96px;min-height:48px;letter-spacing:.04em;text-shadow:none}
html body .brand::before{display:none}
html body .brand-mark{display:block;padding:0;background:none;color:#c3b795;font-size:1rem;letter-spacing:.025em;line-height:1.2;text-shadow:none;transform:rotate(-.6deg);filter:drop-shadow(.5px 1px .8px rgba(0,0,0,.65))}
html body .brand-mark::before,html body .brand-mark::after{content:none}
@supports(background-clip:text){html body .brand-mark{background:#c3b795 url('../media/final-sentence/paper-texture-v2.webp') center/180px;background-blend-mode:multiply;background-clip:text;-webkit-background-clip:text;color:transparent}}
@media(forced-colors:active){html body .brand-mark{background:none;color:LinkText;filter:none}}
html body .brand small{max-width:270px;padding:0;background:none;color:#a79f8c;font-size:.75rem;line-height:1.35;letter-spacing:.015em;transform:none;border-radius:0;box-shadow:none}
html body .machine-settings{top:max(17px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right));gap:7px}
html body .machine-settings .toggle{--slip-tilt:-1.2deg;isolation:isolate;display:flex;align-items:center;justify-content:center;width:116px;min-height:48px;padding:0;background:none;color:#c8bea6;font-size:.8125rem;letter-spacing:.025em;text-shadow:none;touch-action:manipulation;transition:none}
html body .machine-settings .toggle:active{transform:none}
html body .machine-settings .toggle::before{display:none}
html body .machine-settings [data-lang]{--slip-tilt:1.6deg;width:48px;min-width:48px;padding:0}
html body .machine-settings .utility-sheet{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;width:100%;height:34px;padding:0 11px;font:inherit;transform:rotate(var(--slip-tilt));transform-origin:18% 62%;filter:drop-shadow(0 2px 2px rgba(0,0,0,.45))}
html body .machine-settings .utility-sheet::before{content:"";position:absolute;inset:0;z-index:-1;background-image:var(--utility-paper,linear-gradient(#303428,#303428));background-size:100% 100%;pointer-events:none}
html body .machine-settings .toggle span{position:relative;display:block;padding:0;background:none;line-height:1.2;white-space:nowrap;border-radius:0;box-shadow:none;transform:none}
html body .machine-settings [data-sound] span{padding-left:13px}
html body .machine-settings [data-sound] span::before{content:"";position:absolute;left:0;top:calc(50% - 3px);width:6px;height:6px;border:1px solid #b2ac86;border-radius:43% 57% 51% 49%;background:#b2ac86}
html body .machine-settings [data-sound][aria-pressed="false"] span::before{background:transparent}
html body .machine-settings .utility-corner{position:absolute;top:0;right:1px;width:16px;height:16px;background:url('./paper-corner.svg') center/contain no-repeat;filter:brightness(.48) saturate(.65);transform-origin:20% 80%;pointer-events:none;transition:transform 180ms cubic-bezier(.16,1,.3,1)}
html body .brand:focus-visible,html body .machine-settings .toggle:focus-visible{outline:2px dashed #f0dab0;outline-offset:4px}
@media(hover:hover) and (pointer:fine){html body .machine-settings .toggle:hover{color:#e1d5b8}html body .machine-settings .toggle:hover .utility-corner{transform:translate(-1px,1px) rotate(-12deg)}html body .brand:hover .brand-mark{filter:brightness(1.1) drop-shadow(.5px 1px .8px rgba(0,0,0,.65))}}
html[data-motion="reduced"] body .machine-settings .toggle .utility-corner{transition:none;transform:none}
@media(prefers-reduced-motion:reduce){html:not([data-motion="full"]) body .machine-settings .toggle .utility-corner{transition:none;transform:none}}

/* Completion is a new decision: two visible paper objects, primary first. */
html.is-result body .trial-tools{width:min(560px,calc(100vw - 32px));align-items:center;gap:16px;bottom:calc(max(24px,env(safe-area-inset-bottom)) + var(--keyboard-inset,0px))}
html.is-result body .trial-tools [data-result]{flex:1;min-width:288px;min-height:66px;padding:0 24px;font-size:1.25rem;letter-spacing:.015em;color:#271b0f;background:#d4c49e url('../media/final-sentence/paper-texture-v2.webp') center/280px;text-shadow:none}
html.is-result body .trial-tools [data-result].paper-control{background:none}
html.is-result body .trial-tools [data-result]::after{filter:drop-shadow(0 5px 7px rgba(0,0,0,.7))}
html.is-result body .trial-tools [data-restart]{position:relative;isolation:isolate;min-width:176px;min-height:56px;padding:0 22px;justify-content:center;background:none;color:#302619;font-size:1.125rem;line-height:1.2;text-shadow:none;text-decoration:none;white-space:normal}
html.is-result body .trial-tools [data-restart]::before{content:"";position:absolute;z-index:-1;inset:3px 0 2px;background:#b8ad95 url('../media/final-sentence/paper-texture-v2.webp') center/240px;clip-path:polygon(1% 7%,19% 3%,37% 5%,61% 1%,80% 4%,98% 2%,100% 26%,99% 57%,100% 90%,83% 96%,65% 93%,39% 98%,18% 94%,1% 98%,0 68%,1% 39%);box-shadow:inset 0 1px 2px rgba(255,240,201,.42),inset 0 -2px 3px rgba(67,45,22,.25)}
html.is-result body .trial-tools [data-restart]{filter:drop-shadow(0 4px 5px rgba(0,0,0,.65))}
html.is-result body .trial-tools button:focus-visible{outline:2px dashed #f0dab0;outline-offset:6px}
@media(hover:hover) and (pointer:fine){html.is-result body .trial-tools [data-restart]:hover{color:#17120d;filter:brightness(1.08) drop-shadow(0 4px 5px rgba(0,0,0,.65))}}
@media(max-width:1000px){html body .brand small{display:none}}
@media(max-width:600px){html.is-result body .trial-tools{width:min(360px,calc(100vw - 32px));flex-direction:column;align-items:stretch;gap:10px}html.is-result body .trial-tools [data-result]{min-width:0;min-height:60px;font-size:1.125rem}html.is-result body .trial-tools [data-restart]{min-width:0;min-height:50px;font-size:1rem}}
@media(max-width:560px){html body .site-chrome{padding-left:10px;padding-top:max(10px,env(safe-area-inset-top))}html body .brand-mark{font-size:.875rem}html body .machine-settings{top:max(10px,env(safe-area-inset-top));right:10px;gap:5px}html body .machine-settings .toggle{width:112px;min-height:48px;padding:0;font-size:.8125rem}html body .machine-settings [data-lang]{width:48px;min-width:48px;padding:0}html body .machine-settings .utility-sheet{height:32px;padding-inline:10px}}
