/* Shared world framing, with a small project tab opposite the main navigation. */
:root{--look-x:0;--look-y:0}.page-outline{position:fixed;inset:7px;width:calc(100% - 14px);height:calc(100% - 14px);z-index:65;pointer-events:none;overflow:visible}.page-outline path{fill:none;stroke:#171717;stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.page-outline .page-outline-outside{fill:white;stroke:none;fill-rule:evenodd}.page-outline .page-outline-backing{stroke:white;stroke-width:3.5;opacity:.85}.page-outline .page-outline-inner{stroke-width:.7;opacity:.85}.page-outline .page-outline-pencil{stroke-width:.45;opacity:.35}
.game-dock{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;width:480px;height:64px;padding:3px 9px;gap:9px;z-index:66;color:#171717}.game-dock .dock-outline{display:none}.game-dock a{position:relative;display:flex;align-items:center;justify-content:center;text-decoration:none;min-width:0;flex:1;gap:7px;padding:4px}.game-dock .dock-label{display:flex;flex-direction:column;gap:3px}.game-dock b{font:20px/1.1 Pirata,serif;white-space:nowrap}.game-dock .dock-label>span{font:10px/1.3 monospace;color:#555}.game-dock .dock-icon{width:19px;height:24px;fill:none;stroke:#171717;stroke-width:1.05;flex:0 0 19px;stroke-linecap:round;stroke-linejoin:round}.game-dock .dock-selection{position:absolute;inset:-2px -4px;width:calc(100% + 8px);height:calc(100% + 4px);fill:none;stroke:#171717;stroke-width:.8;opacity:0;pointer-events:none;transform:rotate(-2deg)}.game-dock .active .dock-selection,.game-dock a:hover .dock-selection{opacity:1}.game-dock .dock-home{flex:0 0 48px;padding:0}.game-dock .dock-seal{position:relative;display:grid;place-items:center;width:52px;height:52px;transform:rotate(-8deg);transition:transform .25s}.dock-seal>svg{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#171717;stroke-width:1;overflow:visible}.dock-seal .seal-trace{opacity:.65;stroke-width:.65}.dock-seal img{position:relative;width:30px;height:30px;mix-blend-mode:multiply}.dock-seal .wax-pool{clip-path:circle(0% at 50% 50%);transition:clip-path .6s}.dock-home:hover .wax-pool,.dock-home:focus-visible .wax-pool{clip-path:circle(72% at 50% 50%)}.dock-home:hover .dock-seal img,.dock-home:focus-visible .dock-seal img{background:white;border-radius:50%;mix-blend-mode:normal}.dock-home:hover .dock-seal{transform:rotate(-2deg)}
.project-console{position:fixed;top:8px;left:50%;transform:translateX(-50%);z-index:66;display:flex;align-items:center;justify-content:center;height:46px;width:290px;padding:0 9px;gap:12px;color:#24251f}.project-console button{background:none;border:0;padding:7px;min-height:40px}.project-console>button:not(.index-trigger){flex:0 0 36px}.project-console svg{width:22px;height:22px}.project-console .index-trigger{display:flex;flex-direction:column;justify-content:center;gap:2px;flex:1;min-width:0;font:19px/1 Pirata;white-space:nowrap}.project-console .console-title{font:19px/1 Pirata;color:#222}.project-console #project-count{font:10px/1.3 monospace;color:#666;display:block}.project-console button:hover{color:var(--accent)}
.rail{top:40px;bottom:75px;width:220px;left:20px}.section-nav{transform:none;position:relative;background:#f9f9f3 url('cotton.svg');border:1px solid #6c7063;outline:1px solid #979c8a;outline-offset:-5px;border-radius:2px 9px 2px 5px;gap:5px;padding-top:20px}.rail-return{pointer-events:auto;align-self:center;position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 -1px;padding:12px 11px 10px;min-height:42px;width:calc(100% - 17px);background:#f9f9f3 url('cotton.svg');border:1px solid #6c7063;border-bottom:0;clip-path:polygon(0 12px,9px 9px,12px 0,calc(100% - 12px) 0,calc(100% - 9px) 9px,100% 12px,100% 100%,0 100%);text-decoration:none;font:16px Fell}.rail-return:hover{color:var(--accent)}.rail-return:before{content:'';position:absolute;inset:4px;border:1px solid #8b908188;border-bottom:0;pointer-events:none}
.workspace{inset:42px 0 74px 220px}.held-scene{height:calc(100% - 58px);width:min(780px,calc(100% - 150px));margin-top:0;transform:perspective(1600px) translate(calc(var(--look-x)*-3px),calc(var(--look-y)*-2px)) rotateY(calc(var(--look-x)*.6deg)) rotateX(calc(var(--look-y)*-.4deg));transform-origin:50% 85%}.archive-room{inset:-26px;transform:translate(calc(var(--look-x)*-11px),calc(var(--look-y)*-8px)) scale(1.025)}.paper-stack{z-index:2}.holding-hands{width:185%;left:-42.5%;bottom:-57%;filter:drop-shadow(0 3px 2px #15181020)}.grip-rear{z-index:0}.grip-thumb{z-index:3;clip-path:url(#grip-thumbs)}.workspace-foot{display:none}
.mobile-archive{display:none}.sheet-body{padding-bottom:44px}
@media(max-width:1100px) and (min-width:801px){.rail{width:185px;left:4px}.rail-return{font-size:14px}.workspace{left:185px}.held-scene{width:calc(100% - 94px)}}
@media(max-width:800px){.page-outline{inset:4px;width:calc(100% - 8px);height:calc(100% - 8px)}.project-console{top:7px;width:260px;height:43px}.rail{display:none}.workspace{inset:63px 0 126px}.held-scene{width:calc(100% - 48px);height:calc(100% - 36px);margin:0;transform:none}.holding-hands{bottom:-40%}.game-dock{width:calc(100% - 46px);max-width:430px;height:53px;gap:4px;padding:0 4px}.game-dock .dock-home{flex-basis:35px}.game-dock .dock-seal{width:40px;height:40px}.game-dock .dock-seal img{width:24px;height:24px}.game-dock a{gap:4px;padding:3px}.game-dock b{font-size:17px}.game-dock .dock-label>span{font-size:9px}.game-dock .dock-icon{width:13px;height:18px;flex-basis:13px}.sheet-tabs{bottom:calc(72px + env(safe-area-inset-bottom));width:calc(100% - 44px);max-width:460px;gap:1px;padding:3px}.sheet-tabs button,.sheet-tabs button:nth-child(2),.sheet-tabs button[aria-pressed=true]{font-size:15px;padding:10px 4px;min-height:40px}.sheet-tabs button span{display:none}.mobile-archive{display:flex;align-items:center;padding:6px;text-decoration:none;font:12px Fell;border-right:1px solid #8b908166;margin-right:3px}.archive-room{transform:none}.document-head{flex-basis:40px;min-height:40px}.document-head .doc-title{font-size:14px}}
@media(max-width:360px){.game-dock .dock-icon{display:none}.game-dock b{font-size:16px}.sheet-tabs{width:calc(100% - 30px)}.sheet-tabs button,.sheet-tabs button:nth-child(2){font-size:14px}.mobile-archive{font-size:11px;padding:4px}.holding-hands{bottom:-45%}}
@media(max-height:600px) and (min-width:801px){.workspace{inset:48px 0 60px 185px}.held-scene{height:calc(100% - 24px)}.game-dock{height:49px}.project-console{height:35px}.holding-hands{bottom:-110%}}
.project-console .index-trigger .console-title{font:19px/1.1 Pirata,serif;color:#222;display:block}.holding-hands{bottom:-78%}
@media(max-width:800px){.holding-hands{bottom:-53%}}
@media(max-height:600px) and (min-width:801px){.holding-hands{bottom:-120%}}
/* Confine the oversized room and forearms to the viewport on mobile Safari. */
body{position:relative;contain:paint}

/* The held folio: the paper moves through a quiet grip, then rests flat. */
.held-scene{--feed:0}
.document.front{transform:translateY(calc(var(--feed)*-5px)) rotate(-.45deg) rotateX(calc(var(--feed)*.65deg));transform-origin:50% 92%}
.document .sheet-body{background-color:var(--paper);background-size:420px;background-attachment:local}
.document[data-sheet=overview] .sheet-body{background-image:url('cotton.svg')}
.document[data-sheet=plates] .sheet-body{background-image:url('board.svg')}
.document[data-sheet=record] .sheet-body{background-image:url('ledger.svg')}
.document.front:before{inset:auto 0 0;height:26px;border:0;background:linear-gradient(0deg,#35392a20,transparent);opacity:calc(.22 + var(--feed)*.12);z-index:7;pointer-events:none;transform:scaleY(calc(1 + var(--feed)*.15));transform-origin:bottom}
.holding-hands{translate:0 calc(var(--feed)*1.5px)}
.is-handling .document{will-change:transform;pointer-events:none}
.is-handling .sheet-body{overflow-y:hidden}
.document .sheet-body{scrollbar-gutter:stable}
@media(max-width:800px){.document.front{transform:translateY(calc(var(--feed)*-3px)) rotate(-.45deg) rotateX(calc(var(--feed)*.4deg))}}
/* Keep lettering stable while a sheet travels between front and back. */
.document:not(.front) .sheet-body{opacity:1}
.document:not(.front) .project-heading h1,.document:not(.front) .project-heading h1.long{font-size:clamp(38px,4.8vw,65px)}
.document:not(.front) .section-heading h1{font-size:clamp(36px,4.5vw,60px)}
.document:not(.front) .project-heading{margin-top:25px}
@media(max-width:800px){.document:not(.front) .project-heading h1,.document:not(.front) .project-heading h1.long{font-size:clamp(32px,8.4vw,53px)}.document:not(.front) .section-heading h1{font-size:40px}.document:not(.front) .project-heading{margin-top:22px}}
/* Only the paper contents may scroll; focus and rotation must not move the shell. */
body{overflow:clip}
