#playerHome{position:fixed;inset:0;z-index:2147482000;background:#182b27;color:#fff0ca;font-family:'Inter',sans-serif;overflow:clip;touch-action:none}
#playerHome>canvas{position:absolute;inset:0;width:100%;height:100%}.ph-look{position:absolute;inset:0;outline:none;touch-action:none}
.ph-top{position:absolute;top:max(14px,env(safe-area-inset-top));left:14px;right:14px;display:flex;align-items:start;gap:8px;pointer-events:none}.ph-top>*{pointer-events:auto}.ph-title{flex:1;text-align:center;text-shadow:0 2px 10px #000}.ph-title small{display:block;font-size:9px;letter-spacing:.18em;color:#eee0b5}.ph-title strong{font:700 21px/1.2 'Rajdhani',sans-serif}
#playerHome button:where([data-ph],.ph-stick){color:#ffedc1;background:#20382eea;border:1px solid #b9a36b;border-radius:12px;font:800 13px/1.2 'Rajdhani',sans-serif;padding:12px 15px;min-height:44px;cursor:pointer;touch-action:manipulation}#playerHome button:where([data-ph],.ph-stick):disabled{opacity:.5;cursor:default}#playerHome button:where([data-ph],.ph-stick):focus-visible{outline:3px solid #ffdb78;outline-offset:3px}#playerHome button:where([data-ph],.ph-stick).ph-gold{background:#e7c276;color:#21352a}#playerHome button:where([data-ph],.ph-stick)[hidden],#playerHome>[hidden],#playerHome>.ph-top>[hidden]{display:none!important}
.ph-bottom{position:absolute;bottom:max(22px,env(safe-area-inset-bottom));left:16px;right:16px;display:flex;align-items:end;justify-content:center;gap:10px;pointer-events:none}.ph-bottom>*{pointer-events:auto}.ph-interact{box-shadow:0 5px 20px #0007;max-width:250px}.ph-hint{position:absolute;bottom:94px;left:75px;right:75px;text-align:center;font-size:11px;text-shadow:0 1px 6px #000;pointer-events:none}
.ph-stick{position:absolute;left:24px;bottom:30px;width:96px;height:96px;border-radius:50%!important;background:#102b2366!important;border:2px solid #e8d2a466!important;touch-action:none!important}.ph-knob{display:block;position:absolute;left:28px;top:28px;width:36px;height:36px;border-radius:50%;background:#ebd19699;pointer-events:none}.ph-reticle{position:absolute;left:50%;top:50%;width:5px;height:5px;border-radius:50%;background:#fff7;pointer-events:none}
.ph-merlin{position:absolute;left:16px;right:16px;bottom:125px;max-width:520px;margin:auto;display:flex;align-items:center;gap:10px;padding:14px 15px 14px 8px;background:#152c26ed;border:1px solid #b8a069;border-radius:18px;box-shadow:0 10px 35px #0005}.ph-merlin img{width:72px;height:82px;object-fit:contain}.ph-merlin strong{color:#e9c778;font:800 16px 'Rajdhani',sans-serif}.ph-merlin p{font-size:13px;line-height:1.55;margin:5px 0 0}
.ph-panel{position:absolute;inset:80px 14px 20px;max-width:540px;margin:auto;overflow-y:auto;background:#162d27f7;border:1px solid #b9a36b;border-radius:20px;padding:20px;touch-action:pan-y;box-shadow:0 10px 50px #0008}.ph-panel h2{font:800 25px 'Rajdhani',sans-serif;margin:0 0 8px}.ph-panel p{font-size:13px;line-height:1.6;color:#e8dfc8}.ph-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px}.ph-items{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ph-item{border:1px solid #b9a36b55;border-radius:12px;padding:12px}.ph-item h3{font:800 17px 'Rajdhani',sans-serif;margin:0 0 4px}.ph-item p{font-size:11px;margin:0 0 8px}.ph-item button{padding:9px!important;width:100%;margin-top:5px}.ph-tools{position:absolute;left:12px;right:12px;bottom:20px;display:flex;flex-wrap:wrap;gap:6px;justify-content:center}.ph-notice{position:absolute;left:15px;right:15px;top:88px;max-width:460px;margin:auto;border-radius:10px;background:#20382ef0;padding:10px 15px;font-size:12px;text-align:center;pointer-events:none}.ph-error{position:absolute;inset:100px 22px auto;padding:24px;background:#142c25;border:1px solid #d2b67a;border-radius:16px}.ph-error p{line-height:1.6}
.scan-home-command-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#24362b;border-bottom:1px solid #c5a761;color:#f4e3b8}.scan-home-command-bar span{font:800 11px 'Rajdhani',sans-serif;letter-spacing:.12em}.scan-home-command-bar button{min-height:44px;padding:8px 13px;background:#e7c276;border:1px solid #eed9a3;border-radius:10px;color:#203a2d;font:800 14px 'Rajdhani',sans-serif;cursor:pointer}
body.player-at-desk #screen-scan{box-shadow:inset 0 0 0 3px #a99054}
@media(max-width:420px){.ph-top{left:10px;right:10px}.ph-title strong{font-size:18px}.ph-top button{padding:10px!important}.ph-bottom{justify-content:flex-end}.ph-merlin{bottom:142px}.ph-hint{bottom:135px;left:15px;right:15px}.ph-panel{inset:75px 10px 12px;padding:16px}}

.scan-home-command-bar button{order:-1;flex-shrink:0}.scan-home-command-bar span{padding-right:82px;font-size:10px}.ph-merlin:not([hidden])~.ph-hint{display:none}

@media(max-width:420px){.ph-top .ph-title{position:absolute;top:62px;left:0;right:0;text-align:center}.ph-title small{font-size:8px}.ph-title strong{font-size:20px}.ph-top>[data-ph="back"]{margin-right:auto}.ph-notice{top:130px}.ph-panel{top:118px}.ph-error{top:135px}}

.scan-home-command-bar{min-width:0}.scan-home-command-bar span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:420px){.scan-home-command-bar span{display:none}.scan-home-command-bar{justify-content:flex-start}}

/* One live application, projected into the real desk. The room canvas above it
   supplies depth-correct occlusion through the monitor's transparent aperture. */
.ph-screen-surface{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden;pointer-events:none;isolation:isolate;z-index:0;contain:layout paint;will-change:transform}
/* Keep app layout alive outdoors or behind the camera so nested scroll survives. */
#playerHome>.ph-screen-surface[hidden]{display:block!important;visibility:hidden}
#playerHome>canvas{z-index:1;pointer-events:none}
#playerHome>.ph-look{z-index:2}
#playerHome>:is(.ph-top,.ph-reticle,.ph-stick,.ph-hint,.ph-bottom,.ph-merlin,.ph-panel,.ph-tools,.ph-notice,.ph-error){z-index:3}
#playerHome.ph-travelling>:is(.ph-top,.ph-reticle,.ph-stick,.ph-hint,.ph-bottom,.ph-merlin){opacity:0;pointer-events:none;transition:opacity .3s ease}
#playerHome:not(.ph-travelling)>:is(.ph-top,.ph-stick,.ph-hint,.ph-bottom){transition:opacity .35s ease}
@media(prefers-reduced-motion:reduce){#playerHome>*{transition:none!important}}

.ph-room-list{display:grid;gap:14px;margin:20px 0}.ph-room-card{padding:18px;border:1px solid #b9a36b70;border-radius:15px;background:linear-gradient(130deg,#35513f,#1c372c)}.ph-room-card:nth-child(2){background:linear-gradient(130deg,#3a5540,#233c2d)}.ph-room-card:nth-child(3){background:linear-gradient(130deg,#594938,#343b2c)}.ph-room-card h3{font:800 22px/1.2 'Rajdhani',sans-serif;color:#ffe3a0;margin:8px 0}.ph-room-card>small,.ph-item-kind{display:block;font:700 9px/1.4 'Inter',sans-serif;letter-spacing:.1em;color:#d7c69d}.ph-room-card button{width:100%;margin-top:5px}.ph-room-note{padding:12px;border-left:3px solid #d7bc75;background:#a58d3620}.ph-item-kind{font-size:8px;min-height:13px;margin-bottom:7px}.ph-items{margin-top:18px}.ph-item{background:linear-gradient(140deg,#34513d55,transparent)}.ph-tools{padding:6px;border-radius:14px;background:#142b24de;border:1px solid #b9a36b55;max-width:640px;margin:auto}.ph-panel>p:last-child{margin-bottom:8px}

/* Build: a quiet field guide, with planting and furniture in one catalogue. */
.ph-build-panel{max-width:760px;padding:0;background:#152a23;scrollbar-color:#9d8b5b #162d27;overscroll-behavior:contain}
.ph-build-panel>header{position:sticky;top:0;z-index:2;padding:14px 20px;background:#142920;border-bottom:1px solid #b9a36b44}.ph-build-panel>header h2{margin:0;font-size:28px;letter-spacing:.02em}
.ph-build-intro{display:flex;align-items:center;justify-content:space-between;padding:24px 24px 18px;background:radial-gradient(ellipse at 85% 110%,#64734866,transparent 60%),#233d2d;overflow:hidden}.ph-build-intro small{color:#d5c393;font-size:9px;letter-spacing:.14em}.ph-build-intro h3{font:700 32px/1.15 'Rajdhani',sans-serif;margin:8px 0;color:#f3deb1}.ph-build-intro p{margin:0;color:#d5dac4}.ph-build-intro>span{font-size:88px;line-height:.8;color:#d7c08a66;transform:rotate(-9deg);padding-left:15px}
.ph-build-wallet{display:flex;flex-wrap:wrap;gap:8px 20px;padding:13px 24px;font:600 11px 'Inter',sans-serif;color:#e8d6af;background:#0e211a}.ph-build-tabs{position:sticky;top:73px;z-index:1;display:grid;grid-template-columns:repeat(4,1fr);padding:8px 16px;gap:5px;background:#152a23;border-bottom:1px solid #b9a36b44}
#playerHome .ph-build-tabs button{border-color:transparent;background:transparent;border-radius:8px;color:#c9ccb7;padding:10px 6px;font-size:15px}#playerHome .ph-build-tabs button[aria-pressed=true]{background:#e7c276;color:#20382c}
.ph-build-content{padding:20px 24px}.ph-field-summary{display:grid;grid-template-columns:1fr auto;gap:10px 16px;padding:17px;border:1px solid #c6b47b55;border-radius:12px;background:#31473155}.ph-field-summary h3{font:700 22px 'Rajdhani',sans-serif;margin:0}.ph-field-summary p{margin:6px 0;font-size:12px}.ph-field-summary>small{grid-column:1/-1;font-size:10px;line-height:1.6;color:#c2ccb5}.ph-field-summary>button{align-self:center}
.ph-crop-list{display:grid;gap:12px;margin:20px 0}.ph-crop-card{display:grid;grid-template-columns:100px 1fr;gap:18px;padding:16px 0;border-bottom:1px solid #b9a36b33}.ph-crop-card:last-child{border-bottom:0}.ph-crop-card h3{font:700 22px 'Rajdhani',sans-serif;margin:0 0 4px}.ph-crop-card p{font-size:12px;margin:5px 0;line-height:1.5}.ph-crop-art{display:grid;place-items:center;align-self:start;height:110px;border:1px solid #8a9b6344;border-radius:10px;background:radial-gradient(ellipse at bottom,#718b4740,#203b2b);font-size:50px;text-shadow:0 6px 12px #07150b66}.ph-crop-reed{background:linear-gradient(160deg,#4d6944,#213d34)}.ph-crop-sunflower{background:linear-gradient(160deg,#6c6535,#3a4628)}.ph-crop-berries{background:linear-gradient(160deg,#474968,#243d31)}.ph-crop-pondweed{background:linear-gradient(160deg,#397567,#203e3c)}
.ph-crop-card .ph-seed-count{color:#d7c28c;font-size:11px}.ph-crop-card .ph-crop-yield{font-size:10px;color:#b2c6a7}.ph-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.ph-card-actions button{flex:1}.ph-build-footnote{padding-top:10px;border-top:1px solid #b9a36b33;font-size:11px!important;color:#bdcbb1!important}
.ph-plot-heading{display:flex;gap:18px;align-items:center;margin:20px}.ph-plot-heading>span{font-size:55px}.ph-plot-heading h3{font:700 25px 'Rajdhani',sans-serif;margin:4px 0}.ph-plot-heading small{font-size:9px;letter-spacing:.1em;color:#d5c393}.ph-growth{display:block;width:calc(100% - 40px);height:10px;margin:20px;accent-color:#c5d387}.ph-build-panel>p,.ph-build-panel>button{margin:16px 20px}.ph-build-panel>.ph-crop-list{margin:20px}.ph-build-panel [hidden]{display:none!important}
@media(max-width:520px){.ph-build-intro{padding:20px}.ph-build-intro h3{font-size:28px}.ph-build-intro>span{font-size:64px}.ph-build-wallet{padding:12px 20px;gap:8px 12px}.ph-build-content{padding:16px}.ph-field-summary{grid-template-columns:1fr}.ph-field-summary>button{width:100%}.ph-crop-card{grid-template-columns:65px 1fr;gap:12px}.ph-crop-art{height:84px;font-size:37px}.ph-crop-card h3{font-size:21px}.ph-build-tabs{padding:8px 10px}.ph-card-actions button{font-size:12px!important;padding:11px 8px!important}.ph-build-panel{padding:0}.ph-tools:has([data-ph=farm-place]){max-width:360px}.ph-tools:has([data-ph=farm-place])~.ph-notice{top:126px}}
@media(max-height:500px){.ph-panel.ph-build-panel{inset:65px 12px 8px}.ph-build-intro{padding:12px 20px}.ph-build-intro h3{font-size:24px}.ph-build-intro>span{font-size:50px}.ph-top .ph-title{position:static}.ph-tools{bottom:8px}.ph-notice{top:66px}}

#playerHome:has(.ph-panel:not([hidden]))>.ph-tools,#playerHome:has(.ph-panel:not([hidden]))>.ph-hint{visibility:hidden;pointer-events:none}
.ph-panel .ph-panel-status{padding:12px 14px;margin:12px 20px;background:#304a34;border:1px solid #b9a36b66;border-radius:8px;color:#f1e1b9;font-size:12px;line-height:1.5}
@media(max-height:500px){.ph-build-panel .ph-build-intro{display:none}.ph-build-wallet{padding-block:9px}.ph-build-tabs{padding-block:5px}}

#playerHome.ph-controls-locked :is(.ph-stick,.ph-bottom,.ph-reticle,.ph-tools),#playerHome.ph-controls-locked .ph-top>:not([data-ph="settings"]) { visibility:hidden; }

/* A small visual example, never an input surface or a practice receipt. */
#alderwingIntroGuide .ai-turn-demo{display:flex;align-items:center;gap:10px;margin:8px 0;pointer-events:none;color:#ead5a6;font:10px/1.4 'Inter',sans-serif}
#alderwingIntroGuide .ai-turn-demo[hidden]{display:none}
#alderwingIntroGuide .ai-demo-screen{position:relative;display:block;flex:none;width:100px;height:48px;border:2px solid #bda675;border-radius:7px;background:#17150f;overflow:hidden}
#alderwingIntroGuide .ai-demo-zone{position:absolute;inset:3px 3px 3px 50%;border-left:1px dashed #bda675;background:#d4b47625}
#alderwingIntroGuide .ai-demo-arrow{position:absolute;right:6px;top:1px;font-size:24px;line-height:28px}
#alderwingIntroGuide .ai-demo-thumb{position:absolute;right:7px;bottom:3px;width:15px;height:23px;border:2px solid #fff0cc;border-radius:9px 9px 6px 6px;background:#bb945e;transform:rotate(-16deg);animation:alderwing-thumb-swipe 2.6s ease-in-out infinite}
@keyframes alderwing-thumb-swipe{0%,15%{transform:translateX(0) rotate(-16deg);opacity:.45}25%{opacity:1}65%{transform:translateX(-25px) rotate(-16deg);opacity:1}80%,100%{transform:translateX(-25px) rotate(-16deg);opacity:0}}
#playerHome:has(#settingsModal.show) #alderwingIntroGuide,#villageWalk:has(#settingsModal.show) #alderwingIntroGuide,#playerHome:has(.ph-panel:not([hidden])) #alderwingIntroGuide{visibility:hidden;pointer-events:none}
#playerHome:has(#settingsModal.show) .ai-demo-thumb,#playerHome:has(.ph-panel:not([hidden])) .ai-demo-thumb{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){#alderwingIntroGuide .ai-demo-thumb{animation:none;transform:rotate(-16deg)}}
@media(orientation:portrait) and (max-width:420px){#playerHome #alderwingIntroGuide{top:118px}}
@media(orientation:landscape) and (max-height:550px){#playerHome #alderwingIntroGuide{left:12px;right:auto;width:min(350px,47vw);top:66px}#alderwingIntroGuide .ai-turn-demo{margin:5px 0}#alderwingIntroGuide .ai-demo-screen{height:40px;width:90px}}
