@font-face{font-family:Newsreader;src:url('fonts/newsreader-400.woff2')}
@font-face{font-family:Plex;src:url('fonts/plex-mono-400.woff2')}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden}
body{font-family:Arial,sans-serif;color:#293c30;background:#b8c4ac;font-size:14px}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;border:1px solid #53674725;background:#f6f3e7e8;border-radius:9px;padding:11px 15px;transition:background .16s,transform .16s}
button:hover{background:#fffdf0}
button:active{transform:translateY(1px)}
button:disabled{opacity:.46;cursor:not-allowed}
button:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #cf9a48;outline-offset:3px}
button.primary{background:#3f5b47;color:#faf4df;border-color:#3f5b47}
button.primary:hover{background:#304c3a}
[hidden]{display:none!important}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-family:Newsreader,Georgia,serif;font-weight:400}
h2{font-size:31px;line-height:1.1;margin:8px 0 12px}
h3{font-size:23px}
p{line-height:1.6;color:#60705f}
.eyebrow{font:10px Plex,monospace;letter-spacing:1.5px;color:#6a775f}
#game,#world,#pins,.vignette{position:absolute;inset:0;width:100%;height:100%}
#world{display:block;touch-action:none}
#pins{pointer-events:none;overflow:hidden}
.world-pin{position:absolute;top:0;left:0;pointer-events:auto;padding:0;border:0;background:transparent!important;display:flex;flex-direction:column;align-items:center;filter:drop-shadow(0 2px 3px #28362535)}
.world-pin span{background:#faf5dfdd;border:1px solid #fff7decc;width:32px;height:32px;display:grid;place-items:center;border-radius:50%;font-size:18px}
.world-pin em{font-style:normal;background:#f5f1dde8;padding:4px 7px;border-radius:4px;font-size:10px;margin-top:4px;white-space:nowrap}
.world-pin:hover span{background:#fff7d6;transform:scale(1.1)}
.vignette{pointer-events:none;background:radial-gradient(ellipse,transparent 45%,#304b2c20 100%)}
.badge{font:9px Plex;background:#d9dfc9;border-radius:50%;padding:3px 5px}
dialog{color:inherit;background:#f7f3e8;border:1px solid #ffff;box-shadow:0 24px 90px #14221555;border-radius:18px;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 50px);padding:30px;overflow:auto}
dialog::backdrop{background:#26362c45;backdrop-filter:blur(5px)}
#dialog-close{position:absolute;right:12px;top:12px;border:0;background:#e9ebdf;font-size:22px;line-height:1;padding:7px 11px}
#dialog-content{padding-top:6px}
#dialog-content>.eyebrow{padding-right:32px}
.dialog-intro{margin-bottom:20px}
.actions{display:grid;gap:9px;margin-top:22px}
.action{display:block;text-align:left;width:100%;padding:14px 15px;background:#eeeee1;border:1px solid #6b806c22}
.action strong{display:block;font-size:13px;font-weight:500}
.action small{display:block;font-size:11px;line-height:1.5;color:#71806c;margin-top:6px}
.action .cost{display:block;font:9px Plex;color:#7c866b;margin-top:7px}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.separator{height:1px;background:#617a4b22;margin:22px 0}
.quest-row{border-bottom:1px solid #65734c22;padding:16px 0}
.quest-row h3{font-size:23px;margin-bottom:5px}
.quest-row p{font-size:12px}
.quest-row .complete{color:#6b834b;font:10px Plex}
.quest-row button{margin-top:10px;font-size:11px}
.photo-card{margin:16px 0;background:#fffaf0;padding:10px;box-shadow:0 3px 10px #20332210}
.photo-card img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover}
.photo-card figcaption{font:16px Newsreader;margin:12px 3px 5px}
.photo-card small{font-size:10px;color:#7b826e}
.journal-note{padding:12px 0;border-bottom:1px solid #65734c22}
.journal-note b{font-family:Newsreader;font-size:20px;font-weight:400}
.journal-note p{font-size:12px;margin-top:5px}
.muted{font-size:11px;color:#7a866e}
label.setting{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #65734c22}
input[type=checkbox]{width:18px;height:18px;accent-color:#536c42}
select,input[type=number]{border:1px solid #8b9a7d77;background:#fffcf2;border-radius:6px;padding:7px}
.error{padding:12px;background:#efe0d3;color:#874a35;border-radius:6px;margin:12px 0;font-size:12px}
#build-panel{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);width:min(650px,calc(100vw - 32px));max-height:60dvh;overflow:auto;background:#f7f3e8f5;backdrop-filter:blur(14px);padding:20px;border-radius:16px;box-shadow:0 15px 60px #1d38262b}
.build-heading{display:flex;justify-content:space-between;align-items:flex-start}
.build-heading h2{font-size:25px;margin-bottom:14px}
.build-heading button{padding:4px 10px;font-size:22px;border:0}
#catalog{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
#catalog button{padding:10px 5px;font-size:10px;line-height:1.4}
#catalog button span{display:block;font:22px Newsreader;margin-bottom:5px}
#catalog button.selected{border:1px solid #5f774d;background:#dfe7d0}
.build-tools{display:flex;gap:8px;align-items:end;margin-top:14px}
.build-tools label{font:9px Plex;display:grid;gap:4px}
.build-tools input{width:66px}
.build-tools button{flex:1;font-size:11px}
#build-status{font-size:11px;line-height:1.5;margin-top:10px}
#existing{display:flex;gap:5px;flex-wrap:wrap;margin:12px 0}
#existing button{font-size:10px;padding:7px}
#construction-open{font-size:11px;padding:9px 12px;width:100%;text-align:left}
.building .toolbar,.building .movement,.building .quest-card,.building .controls-hint,.building #joystick{display:none!important}
#photo-mode{position:absolute;inset:0;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:110px 25px 30px;text-align:center}
#photo-mode>div:first-child{background:#f6f3e4e6;padding:15px 24px;border-radius:12px}
#photo-mode h2{font-size:26px;margin:6px 0}
#photo-mode p{font-size:11px}
#photo-mode button{pointer-events:auto}
.viewfinder{border:1px solid #fff9;aspect-ratio:3/2;width:min(65vw,650px);box-shadow:0 0 0 100vmax #24342318;max-height:50vh}
.photographing .toolbar,.photographing .movement,.photographing .quest-card,.photographing #pins,.photographing .controls-hint{display:none!important}
#fallback{position:absolute;top:32%;left:50%;transform:translateX(-50%);max-width:500px;width:80%;background:#f5f1e5;padding:30px;border-radius:18px}
#fallback p{margin-top:12px}
.reading #world,.reading #pins,.reading .movement,.reading #joystick{display:none}
#joystick{display:none;touch-action:none}
@media(max-width:700px){.badge{position:absolute;top:5px;right:10px;font-size:7px}
.world-pin span{width:27px;height:27px;font-size:15px}
.world-pin em{font-size:8px;padding:3px 5px}
#joystick{display:block;position:absolute;bottom:120px;left:25px;width:92px;height:92px;border-radius:50%;background:#f4f0de65;border:1px solid #fffc;box-shadow:0 0 0 8px #eff0de18}
#joystick div{position:absolute;left:28px;top:28px;width:34px;height:34px;border-radius:50%;background:#f4eed6b3;box-shadow:0 2px 7px #23391c20;pointer-events:none}
dialog{padding:25px 21px;width:calc(100vw - 24px);max-height:calc(100dvh - 28px)}
h2{font-size:29px}
#build-panel{bottom:12px;padding:14px;max-height:53dvh;width:calc(100% - 24px)}
.build-heading h2{font-size:23px}
#catalog{grid-template-columns:repeat(3,1fr)}
#catalog button{padding:6px;font-size:10px}
#catalog button span{display:none}
.build-tools{gap:5px}
.build-tools input{width:54px}
.build-tools button{padding:9px 6px}
#build-status{font-size:10px}
#existing{max-height:60px;overflow:auto}
#photo-mode{padding:145px 17px 35px}
#photo-mode>div:first-child{padding:12px}
.viewfinder{width:90vw}
#photo-mode h2{font-size:23px}
#photo-mode button{font-size:11px}
#fallback{top:36%;width:90%;padding:22px}
.reading .quest-card{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:360px){.build-tools input{width:47px}
.build-tools button{font-size:10px}}
/* The scene leads. Conversations sit along the lower edge like game dialogue. */
svg{width:22px;height:22px;flex-shrink:0;vertical-align:middle}
button svg{pointer-events:none}
.world-pin span svg{width:18px;height:18px}
.game-dialog{inset:auto 0 30px;margin:0 auto;width:min(750px,calc(100vw - 44px));max-height:60dvh;padding:22px 26px;background:#243e33f7;color:#f5edd8;border-color:#9b9d7955;border-radius:13px;box-shadow:0 15px 45px #182a2140;overflow:auto}
.game-dialog::backdrop{background:#2135260c;backdrop-filter:none}
.game-dialog #dialog-close{background:transparent;color:#d5d9b9;right:10px;top:10px;padding:8px 12px}
.speaker{display:flex;align-items:center;gap:13px;padding-right:30px}
.speaker-mark{width:42px;height:42px;display:grid;place-items:center;background:#c6d0a619;border:1px solid #c2cea83d;border-radius:50%;color:#d6c991}
.speaker h2{font-size:28px;line-height:1;margin:0}
.speaker small{margin-left:auto;color:#bfcaae;font-size:10px}
.dialogue-line{font-family:Newsreader,Georgia,serif;font-size:23px;line-height:1.35;color:#ede6d0;margin:15px 0 18px;max-width:58ch;text-wrap:pretty}
.game-dialog .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0}
.game-choice{display:flex;align-items:center;position:relative;flex-wrap:wrap;gap:7px;padding:12px 13px;text-align:left;border:1px solid #d9dbb92b;border-radius:6px;background:#dfe3be09;color:#f2ebd6;min-height:45px}
.game-choice strong{font-size:12px;font-weight:500;padding-right:22px}
.game-choice small{display:block;font-size:10px;color:#bac9ac;line-height:1.4;flex-basis:100%}
.game-choice>.choice-arrow,.game-choice>svg:last-child{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#c5ccaa}
.game-choice>.choice-arrow svg,.game-choice>svg:last-child{width:15px;height:15px}
.game-choice:hover{background:#b8c69b25}
.game-choice:focus-visible{outline-color:#e7c789}
.game-choice:disabled{opacity:.55}
.game-choice>svg:first-child:not(:last-child){position:static;transform:none;color:#c7ceac}
.game-dialog .home-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
.game-dialog .home-choices strong{padding:0}
.game-dialog .home-choices svg{width:18px}
.reward-line{color:#d4d8ab;font-size:12px;margin-bottom:17px}
.continue-button{display:flex;align-items:center;gap:12px;margin-left:auto;background:#cdd6ad!important;color:#233d31!important;border:0!important}
.continue-button svg{width:16px;height:16px}
.result-dialog{width:min(600px,calc(100vw - 44px))}
.result-dialog .dialogue-line{margin-bottom:12px}
.game-dialog:not(.result-dialog) .dialogue-line{max-height:100px;overflow:auto}
#activity{position:absolute;bottom:30px;left:50%;transform:translateX(-50%);width:min(610px,calc(100vw - 32px));display:flex;align-items:center;gap:16px;padding:18px 22px;color:#f0ead6;background:#243e33f5;border-radius:12px;box-shadow:0 12px 35px #10281940;z-index:15}
#activity-icon{color:#d6c991;display:grid;place-items:center;width:42px;height:42px;flex-shrink:0}
#activity-icon svg{width:30px;height:30px}
.activity-copy{flex:1}
.activity-copy strong{font:24px Newsreader}
.activity-copy p{color:#bcc7ab;font-size:11px;margin:5px 0 9px}
.activity-track{background:#e0e3b922;height:3px;overflow:hidden;border-radius:3px}
.activity-track i{display:block;background:#d8cd98;width:100%;height:100%;transform:scaleX(0);transform-origin:left;transition:transform .08s linear}
#activity button{background:transparent;color:#e4dfc9;border-color:#dce0b92b;font-size:11px}
#activity-cancel{padding:8px;border:0!important;font-size:23px!important}
.acting .toolbar,.acting .quest-card,.acting .movement,.acting #pins,.acting #joystick,.acting .controls-hint{display:none!important}
#sleep-fade{position:absolute;inset:0;background:#182a25;opacity:0;transition:opacity .6s;pointer-events:none;z-index:14}
.sleeping #sleep-fade{opacity:.88}
.game-dialog~*{pointer-events:auto}
#dialog-content>.eyebrow:first-child{display:none}
::selection{background:#d0bd78;color:#20372c}
*{scrollbar-width:thin;scrollbar-color:#889575 #eee9d8}
@media(max-width:700px){.game-dialog{bottom:14px;width:calc(100vw - 24px);max-height:57dvh;padding:17px 18px}
.speaker{gap:10px}
.speaker-mark{width:34px;height:34px}
.speaker h2{font-size:24px}
.speaker small{font-size:9px}
.dialogue-line{font-size:21px;margin:13px 0}
.game-dialog .actions{gap:6px}
.game-choice{padding:10px;min-height:46px}
.game-choice strong{font-size:11px}
.game-choice small{font-size:9px}
.game-dialog .home-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
.game-dialog .home-choices svg{width:16px}
.result-dialog .continue-button{font-size:12px;padding:10px 15px}
#activity{padding:15px;gap:9px;bottom:18px}
.activity-copy strong{font-size:21px}
.activity-copy p{font-size:10px}
#activity-icon{width:27px}
#activity button{padding:8px}
#activity-icon svg{width:25px}
.game-dialog #dialog-close{padding:7px 10px}}
body:has(.game-dialog[open]) .quest-card,body:has(.game-dialog[open]) #pins,body:has(.game-dialog[open]) .toolbar,body:has(.game-dialog[open]) .movement,body:has(.game-dialog[open]) .controls-hint,body:has(.game-dialog[open]) #hint,body:has(.game-dialog[open]) #joystick{visibility:hidden}
.acting #hint{visibility:hidden}
/* Meadow navigation: the resident remains legible without covering the landscape. */
.world-pin em{opacity:0;transform:translateY(-3px);transition:opacity .15s,transform .15s;pointer-events:none}
.world-pin:hover em,.world-pin:focus-visible em{opacity:1;transform:none}
.world-pin span{width:27px;height:27px;background:#faf2dbd0}
.world-pin span svg{width:15px;height:15px}
.world-pin:hover span{background:#fff4cd}
#resident-marker{position:absolute;top:0;left:0;pointer-events:none;display:flex;align-items:center;gap:5px;white-space:nowrap;background:#35483be8;color:#fff2d5;padding:5px 8px;border:1px solid #f9e9bc88;border-radius:15px;font-size:10px;box-shadow:0 3px 12px #24372b30}
#resident-marker span{width:5px;height:5px;background:#e2bd72;border-radius:50%}
#resident-marker small{font:7px Plex;opacity:.68}
.control-guide{margin:20px 0}
.control-guide p{display:grid;grid-template-columns:105px 1fr;gap:15px;padding:12px 0;border-bottom:1px solid #64745822;font-size:12px}
.control-guide b{color:#38523e;font-weight:500}
.building .camera-tools,.acting .camera-tools,.reading .camera-tools,.photographing .camera-tools,body:has(dialog[open]) .camera-tools{visibility:hidden}
@media(max-width:700px){.world-pin span{width:25px;height:25px}
.world-pin em{display:none}
#resident-marker{font-size:9px;padding:4px 7px}
.control-guide p{grid-template-columns:80px 1fr;gap:10px}
.vignette{background:radial-gradient(ellipse,transparent 50%,#304b2c14 100%)}}
.resident-list{display:grid;gap:15px;margin:20px 0}
.resident-card{padding:17px;border:1px solid #5b735b29;border-radius:12px;background:#efeedf}
.resident-heading{display:flex;align-items:center;gap:13px}
.resident-emblem{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;background:var(--resident-colour);border-radius:50%;color:#fff4d7}
.resident-heading h3{font-size:25px}
.resident-heading p{font-size:11px}
.resident-now{display:grid;gap:4px;margin:15px 0;font-size:12px}
.resident-now b{font-weight:500;color:#36523e}
.resident-now span{font-size:10px;color:#6d7c66}
.resident-card>button{width:100%;font-size:12px}
.resident-card details{margin-top:13px;font-size:11px}
.resident-card summary{cursor:pointer;padding:7px 0;color:#5a7155}
.resident-card ol{padding:8px 0 0;margin:0;list-style:none}
.resident-card li{display:flex;gap:12px;padding:8px 7px;border-radius:6px;color:#67785f}
.resident-card li.current{background:#dce3ca;color:#2f4b36}
.resident-card time{font:10px Plex;min-width:40px;padding-top:2px}
.resident-card li small{display:block;font-size:10px;opacity:.7;margin-top:3px}
.wait-button{width:100%;margin-bottom:12px}
@media(max-width:700px){.resident-card{padding:14px}
.resident-heading p{font-size:10px}}
/* Quiet,readable resident wellbeing. */
.need-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px;margin:20px 0}
.need-item>div:first-child{display:flex;justify-content:space-between;font-size:12px}
.need-item b{font-weight:500}
.need-item small{display:block;font-size:10px;color:#61705f;margin-top:5px}
.need-track{height:6px;background:#dce0ce;border-radius:4px;overflow:hidden;margin-top:7px}
.need-track i{height:100%;display:block;background:#8b9c82;border-radius:4px}
.need-track.hunger i{background:#b99a6a}
.resident-reason{font-family:Newsreader,Georgia,serif;font-size:19px;line-height:1.35;color:#4b5f4f}
.resident-buttons{display:flex;gap:8px;flex-wrap:wrap}
.resident-buttons button{flex:1;min-width:100px;padding:11px 10px}
.friendship-note{display:flex;gap:13px;background:#e6e8d8;padding:16px;border-radius:12px;margin:20px 0}
.friendship-note>svg{flex-shrink:0;width:23px;height:23px}
.friendship-note b{font-size:13px;font-weight:500}
.friendship-note span{display:block;font-size:11px;line-height:1.5;margin-top:5px;color:#61705f}
.resident-memory{font-size:14px;border-bottom:1px solid #dce0ce;padding-bottom:15px}
.resident-memory small{display:block;font-size:10px;color:#6a7968;margin-bottom:5px}
.resident-card details p{font-size:12px;line-height:1.6}
.resident-speech{position:absolute;left:0;top:0;max-width:220px;padding:12px 16px;background:#f8f4e8;color:#354c40;border-radius:14px 14px 14px 3px;font:17px/1.25 Newsreader,Georgia,serif;box-shadow:0 4px 20px #243f2920;pointer-events:none;text-align:center}
.resident-speech[hidden]{display:none}
@media(max-width:400px){.need-grid{gap:15px 12px}
.resident-buttons button{font-size:12px}
.resident-reason{font-size:18px}
.resident-speech{max-width:190px;font-size:15px}}
/* v9 · Clear,tactile game HUD and character creation. */
.brand h1{font-size:36px;line-height:.98;letter-spacing:-1.1px;text-shadow:0 1px 18px #f8f5df88}
.game-choice strong{font-size:16px;line-height:1.3}
.game-choice small{font:12px/1.5 Arial,sans-serif;color:#64705c}
.game-dialog{border:1px solid #fff9;box-shadow:0 24px 90px #172f2859}
.dialogue-line{font-size:23px;line-height:1.35}
.bond-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 22px;font:13px Arial,sans-serif;color:#526a4c}
.bond-banner>b{display:flex;gap:6px;align-items:center}
.bond-banner svg{width:17px;height:17px}
.bond-banner small{font-weight:400;opacity:.65}
.bond-banner>div{height:5px;flex-basis:100%;background:#d9dfca;border-radius:10px;overflow:hidden}
.bond-banner i{height:100%;display:block;background:#779167;border-radius:inherit}
.social-choice{display:flex!important;align-items:center;gap:13px;padding:15px!important;text-align:left}
.social-choice>span:nth-child(2){flex:1}
.social-symbol{display:grid;place-items:center;background:#e0e6d0;width:42px;height:42px;flex-shrink:0;border-radius:12px}
.social-symbol svg{width:22px;height:22px}
.social-choice>svg{width:18px;flex-shrink:0}
.social-choice:disabled{opacity:.52}
.request-offer,.request-card{padding:18px 20px;margin:20px 0;background:#e3e7d3;border:1px solid #c9d3b6;border-radius:14px}
.request-offer h3,.request-card h3{font:26px/1.15 Newsreader,Georgia,serif;margin:10px 0}
.request-card p{font-size:14px;line-height:1.55}
.request-card small{font:11px Arial,sans-serif;color:#5b7350}
.request-card.locked{background:transparent;border-style:dashed;opacity:.72}
.request-card.complete{color:inherit}
.request-card button{min-height:44px}
.active-request{border-left:3px solid #8ca277;padding:8px 12px;font-size:13px;background:#e7e8d9}
.more-conversation{margin-top:20px;border-top:1px solid #cdd3c0;padding-top:15px}
.more-conversation summary{cursor:pointer;font-size:13px;padding:8px 0}
.more-conversation .actions{margin-top:12px}
.your-friendship{display:flex;align-items:center;gap:8px;padding:10px;background:#e2e8d7;border-radius:8px;font-size:11px}
.your-friendship>svg{width:16px;flex-shrink:0}
.your-friendship>span{flex:1}
.your-friendship>b{white-space:nowrap}
#activity{background:#f4f0e3f5;border:1px solid #fff9;box-shadow:0 14px 50px #1d30294d;border-radius:18px;max-width:620px}
#activity-name{font:25px/1.15 Newsreader,Georgia,serif}
#activity-note{font:14px/1.4 Arial,sans-serif}
#activity-skip{min-height:42px}
#activity-cancel{min-width:38px;min-height:42px}
.acting .toolbar,.acting .movement,.acting .quest-card,.acting .controls-hint,.acting .resources{opacity:0;pointer-events:none}
.acting .world-pin{display:none}
button:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #718f58;outline-offset:3px}
#creator{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;overflow:auto;background:#eeeada;color:#304435}
#creator::backdrop{background:#e5e7d5}
.creator-layout{display:grid;grid-template-columns:1.1fr 1fr;min-height:100%;max-width:1440px;margin:auto}
.creator-stage{position:relative;min-height:720px;background:radial-gradient(ellipse at 50% 45%,#e8ead9 0%,#c5d1b6 58%,#9eb39a 100%);overflow:hidden}
.creator-stage:after{content:'';position:absolute;inset:auto -10% -180px;height:290px;border-radius:50%;background:#b1bf9b77;pointer-events:none}
.creator-brand{position:absolute;top:40px;left:42px;z-index:1;font:42px Newsreader,Georgia,serif;letter-spacing:-1px}
.creator-brand>span{display:block;font:13px Arial,sans-serif;letter-spacing:.2px;margin-top:8px}
.creator-stage canvas{display:block;width:100%;height:100%;position:absolute;inset:0;touch-action:none}
.preview-caption{position:absolute;bottom:45px;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:14px;z-index:1}
.preview-caption>span{font:10px Arial,sans-serif;letter-spacing:3px;color:#53694d}
.preview-caption button{font-size:12px;background:#e7ebdccc;border:1px solid #ffffff80;padding:9px 16px}
.creator-form{align-self:center;padding:45px 64px}
.creator-form>.eyebrow{font:10px Arial,sans-serif;letter-spacing:2px;color:#728366}
.creator-form h1{font:49px/.98 Newsreader,Georgia,serif;letter-spacing:-1.5px;margin:15px 0}
.creator-form>p{font:14px/1.6 Arial,sans-serif;color:#66725d;max-width:340px}
.name-label{display:block;font:600 12px Arial,sans-serif;margin:26px 0 9px}
#character-name{width:100%;max-width:360px;min-height:47px;border:1px solid #bac6ab;border-radius:9px;background:#f9f6ec;color:#314735;padding:11px 14px;font:18px Newsreader,Georgia,serif}
.creator-choices{display:grid;gap:19px;margin-top:24px}
.creator-choices fieldset{padding:0;border:0;margin:0;min-width:0}
.creator-choices legend{padding:0;margin-bottom:9px;font:600 12px Arial,sans-serif}
.appearance-options{display:flex;gap:8px;flex-wrap:wrap}
.appearance-options button{min-height:40px;background:#e5e6d5;font:12px Arial,sans-serif;border:1px solid transparent;padding:9px 14px;border-radius:9px}
.appearance-options button[aria-pressed=true]{border-color:#3c5b3e;box-shadow:0 0 0 2px #eeeada,0 0 0 3px #5d7851}
.appearance-options button.swatch{width:38px;height:38px;min-height:38px;border-radius:50%;padding:0;background:var(--swatch)}
.swatch span{opacity:0;color:#fff;text-shadow:0 1px 4px #000;font-size:17px}
.swatch[aria-pressed=true] span{opacity:1}
.creator-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
.creator-actions .primary{min-height:50px;border-radius:10px;display:flex;gap:28px;justify-content:space-between;align-items:center;font-size:13px}
.creator-form>small{display:block;font:11px/1.5 Arial,sans-serif;color:#78826d;margin-top:14px}
#creator-error{color:#9f4532;margin:12px 0 0;min-height:0;font-size:12px}
.creator-form #creator-error:empty{display:none}
@media(min-width:701px) and (max-height:760px){.creator-stage{min-height:620px}
.creator-form{padding:30px 48px}
.creator-choices{gap:15px;margin-top:18px}
.creator-form h1{font-size:42px}
.creator-form>p{margin:8px 0}
.creator-brand{top:30px}
.preview-caption{bottom:30px}}
@media(max-width:700px){.game-dialog{padding:25px 20px}
.dialogue-line{font-size:22px}
.social-choice{gap:10px;padding:12px!important}
.social-symbol{width:35px;height:35px}
.social-choice strong{font-size:14px}
.social-choice small{font-size:11px}
.request-offer,.request-card{padding:15px}
.your-friendship{font-size:10px}
#activity{width:calc(100% - 24px);bottom:20px;padding:16px 14px;gap:9px}
#activity-name{font-size:23px}
#activity-note{font-size:12px}
#activity-skip{font-size:11px;padding:8px}
#activity-icon{display:none}
.creator-layout{display:block}
.creator-stage{min-height:0;height:290px}
.creator-brand{top:22px;left:24px;font-size:30px}
.creator-brand>span{font-size:10px;margin-top:4px}
.creator-stage canvas{height:100%;width:100%}
.preview-caption{bottom:13px;gap:7px;align-items:flex-end;right:20px}
.preview-caption>span{display:none}
.preview-caption button{padding:7px 11px;font-size:10px}
.creator-form{padding:27px 26px 36px}
.creator-form h1{font-size:38px;margin:11px 0}
.creator-form>p{font-size:13px;line-height:1.5}
.name-label{margin-top:18px}
.creator-choices{gap:19px}
.creator-actions{margin-top:24px}
.creator-actions .primary{width:100%}
.creator-form>small{text-align:center}
.appearance-options{gap:10px}
.appearance-options button.swatch{width:36px;height:36px;min-height:36px}
#character-name{max-width:none}}
@media(prefers-reduced-motion:reduce){#activity{transition:none}}
.game-dialog{background:#f3efdfF7;color:#304435;border-radius:18px}
.game-dialog #dialog-close{color:#536a4c}
.speaker-mark{color:#617c4c;background:#e0e7cd;border-color:#cbd6bb}
.speaker small{color:#637458;font-size:11px}
.game-dialog .dialogue-line{color:#334b38}
.game-choice{background:#e8ebdba8;color:#304435;border-color:#cdd6bd;border-radius:10px}
.game-choice:hover{background:#dfe6ce}
.game-choice strong{font-weight:600}
.game-choice>.choice-arrow,.game-choice>svg:last-child{color:#6b8059}
.social-symbol{color:#687f53}
.social-choice>span:nth-child(2){padding-right:16px}
.bond-banner>div{flex-basis:100%;background:#d8dec9}
.bond-banner i{min-width:0}
.reward-line{color:#527047;line-height:1.6}
.request-offer .eyebrow{color:#5d7551}
.game-dialog .primary{background:#405f49;color:#f8f2df;border-color:#405f49}
#activity{color:#304435}
#activity-note{color:#5e7053}
#activity-icon{color:#648352}
#activity button{color:#405b40;border-color:#bdcba9}
#activity button:hover{background:#dde5cd}
#activity .activity-track{background:#d4ddc3}
#activity .activity-track i{background:#799b61}
@media(max-width:700px){.game-dialog .actions{grid-template-columns:1fr}
.game-dialog .home-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
.game-dialog{max-height:62dvh}
.speaker small{font-size:10px}
.creator-form h1{line-height:1.05}}
.avatar-unavailable{position:absolute;top:45%;left:15%;right:15%;text-align:center;color:#52694f;font-size:14px;line-height:1.6}
#creator-unsaved{margin-top:16px;font-size:12px}
#creator-start:disabled{cursor:wait}
.creator-stage canvas[hidden]{display:none!important}
/* v10 character wardrobe */
.creator-form{padding-top:32px;padding-bottom:32px}
.creator-form h1{font-size:44px}
.creator-choices{gap:15px;margin-top:20px}
.creator-choices .appearance-options button:not(.swatch){min-height:40px;padding:9px 12px}
.creator-music{position:absolute;bottom:40px;left:38px;z-index:3;display:flex;align-items:center;gap:8px;background:#eef1e1dd;border-color:#fff9;font-size:11px}
.creator-music svg{width:18px;height:18px}
.creator-stage{min-height:820px}
#music-volume{max-width:170px;accent-color:#6f8c59}
@media(max-width:700px){.creator-stage{height:300px;min-height:0}
.creator-form{padding:25px 26px 36px}
.creator-form h1{font-size:37px}
.creator-choices{gap:17px}
.creator-music{bottom:13px;left:20px;padding:8px 12px}
.creator-music svg{width:16px}
.creator-form>small{line-height:1.6}
.creator-choices .appearance-options button:not(.swatch){min-height:44px}}



/* A complete, browsable furnishing list uses the same quiet game surfaces. */
.furnishings-group{margin-top:24px}
.furnishings-group h3{margin:0 0 11px;font:24px/1.2 Newsreader,Georgia,serif;color:#304435}
.furnishing-choice{flex-wrap:nowrap;align-items:flex-start;gap:12px;min-height:64px}
.furnishing-choice>span:nth-child(2){min-width:0;flex:1;padding-right:20px}
.furnishing-choice strong{display:block;padding-right:0}
.furnishing-choice small{margin-top:4px}
.furnishing-symbol{display:grid;place-items:center;width:24px;flex:0 0 24px;color:#607750;margin-top:2px}
.furnishing-symbol svg{width:22px;height:22px}
.browse-furnishings{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:18px;width:100%;min-height:48px}
.browse-furnishings svg{width:21px;height:21px}

/* Village HUD: warm paper, forest ink, and restrained brass details. */
/* Programmatic modal focus should not look like a clicked selection. */
:is(button, a, summary, canvas, [role="button"]) { -webkit-tap-highlight-color: transparent; }
html[data-input-mode="pointer"] :is(button, a, summary, select, canvas, [role="button"], input[type="checkbox"], input[type="radio"], input[type="range"]):focus { outline: none !important; }
html[data-input-mode="keyboard"] :is(button, a, summary, input, select, textarea, [role="button"]):focus {
  outline: 2px solid var(--focus-ring, #718f58);
  outline-offset: 3px;
}
:root {
  --hud-paper: #f5f0e2;
  --hud-ink: #293f35;
  --hud-secondary: #53644f;
  --hud-forest: #294b3c;
  --hud-forest-hover: #365e49;
  --hud-brass: #cbb17a;
  --hud-line: #d7d9c5;
  --hud-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --hud-shadow: 0 6px 20px #142b2426;
  --hud-radius: 14px;
}
header {
  position: absolute; inset: 0 0 auto; pointer-events: none;
  padding: 24px 28px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: start; gap: 20px; background: none;
}
header>* { pointer-events: auto; }
.brand {
  width: max-content; padding: 13px 18px 14px; border-radius: var(--hud-radius);
  background: var(--hud-paper); box-shadow: var(--hud-shadow); color: var(--hud-ink);
}
.brand h1 { font: 34px/.98 Newsreader, Georgia, serif; letter-spacing: -.8px; text-shadow: none; }
.brand h1 span { display: block; font: 11px/1.3 var(--hud-font); letter-spacing: .35px; margin-top: 8px; color: var(--hud-secondary); }
.clock {
  display: flex; align-items: center; gap: 14px; height: 60px; padding: 8px 8px 8px 18px;
  color: var(--hud-paper); background: var(--hud-forest); border: 0;
  border-radius: var(--hud-radius); box-shadow: var(--hud-shadow);
}
.clock-icon { display: grid; place-items: center; color: var(--hud-brass); }
.clock-icon svg { width: 23px; height: 23px; }
.clock-copy { display: flex; flex-direction: column; align-items: center; min-width: 52px; gap: 3px; }
.clock #day { font: 600 9px/1 var(--hud-font); letter-spacing: 1px; color: #e3ddc8; }
.clock #time { font: 24px/1 Newsreader, Georgia, serif; font-variant-numeric: tabular-nums; }
.clock button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: #ffffff12; color: var(--hud-paper); }
.clock button svg { width: 18px; height: 18px; }
.clock button:hover { background: #ffffff24; }
.top-actions { justify-self: end; display: flex; gap: 8px; }
.top-actions button {
  min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 14px; color: var(--hud-ink); background: var(--hud-paper); border: 0;
  border-radius: 11px; box-shadow: var(--hud-shadow); font: 500 12px/1.2 var(--hud-font);
}
.top-actions button span { margin: 0; font: inherit; }
.top-actions button svg { width: 19px; height: 19px; }
.top-actions #settings { width: 46px; padding: 0; }
.top-actions button:hover { background: #fff9ed; }
.top-actions #sound[aria-pressed=true] { color: var(--hud-forest); }
.quest-card {
  position: absolute;
  top: 130px; left: 28px; width: 284px; padding: 20px; border: 0;
  border-radius: var(--hud-radius); background: var(--hud-paper); box-shadow: var(--hud-shadow);
  backdrop-filter: none; color: var(--hud-ink);
}
.quest-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.quest-emblem { display: flex; color: #65734c; }
.quest-emblem svg { width: 23px; height: 23px; }
#quest-count { color: var(--hud-secondary); font: 500 11px/1.2 var(--hud-font); font-variant-numeric: tabular-nums; }
#quest-go { display: block; padding: 0; border: 0; width: 100%; background: none; text-align: left; border-radius: 6px; color: var(--hud-ink); }
#quest-go strong { display: block; font: 29px/1.1 Newsreader, Georgia, serif; letter-spacing: -.35px; margin: 0 0 9px; text-wrap: balance; }
#quest-description { display: block; color: var(--hud-secondary); font: 13px/1.55 var(--hud-font); }
#quest-go i {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; min-height: 42px; margin-top: 18px; padding: 10px 13px;
  color: var(--hud-paper); background: var(--hud-forest); border-radius: 8px;
  font: 600 12px/1.3 var(--hud-font); transition: background .16s ease;
}
#quest-go i svg { width: 17px; height: 17px; }
#quest-go:hover i { background: var(--hud-forest-hover); }
#quest-go:active { transform: none; }
.resources {
  position: absolute;
  top: 99px; right: 28px; padding: 14px 17px; gap: 17px; display: flex;
  color: var(--hud-ink); background: var(--hud-paper); border: 0;
  border-radius: var(--hud-radius); box-shadow: var(--hud-shadow);
}
.resources>div { display: grid; grid-template-columns: 20px auto; column-gap: 8px; align-items: center; }
.resources>div+div { border-left: 1px solid var(--hud-line); padding-left: 17px; }
.resource-icon { display: grid; place-items: center; grid-row: span 2; color: #60724c; }
.resource-icon svg { width: 20px; height: 20px; }
.resources b { font: 24px/1 Newsreader, Georgia, serif; font-variant-numeric: tabular-nums; }
.resources small { margin-top: 4px; color: var(--hud-secondary); font: 10px/1.2 var(--hud-font); }
.save-label { position: absolute; top: 177px; right: 29px; padding: 5px 9px; border-radius: 6px; background: #294b3cf2; color: #f5f0e2; font: 10px/1.3 var(--hud-font); text-shadow: none; }
.hint {
  position: absolute;
  top: 215px; right: 28px; max-width: 300px; padding: 14px 17px;
  background: var(--hud-forest); color: var(--hud-paper); border: 0; border-radius: 11px;
  box-shadow: var(--hud-shadow); font: 13px/1.5 var(--hud-font);
  opacity: 0; transform: translateY(-4px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.hint.show { opacity: 1; transform: none; }
.movement {
  position: absolute; left: 28px; right: auto; bottom: 146px;
  display: flex; flex-direction: row; gap: 3px; padding: 5px;
  background: var(--hud-paper); border-radius: 11px; box-shadow: var(--hud-shadow);
}
.movement button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 11px; border: 0; border-radius: 7px; background: none; color: var(--hud-ink); font: 500 12px/1.2 var(--hud-font); }
.movement button span { margin: 0; font: inherit; }
.movement kbd { display: grid; place-items: center; min-width: 23px; height: 24px; margin: 0; padding: 2px 4px; border: 1px solid #abb6a3; border-radius: 4px; font: 11px/1 Plex, monospace; color: var(--hud-secondary); }
.movement button svg { width: 18px; height: 18px; }
.movement button:hover { background: #e3e8d5; }
.movement .active { background: var(--hud-forest); color: var(--hud-paper); }
.movement .active:hover { background: var(--hud-forest-hover); }
.movement .active kbd { color: #f5f0e2; border-color: #96ad97; }
.toolbar {
  position: absolute; left: 50%; bottom: 49px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 7px; width: max-content; border: 0;
  border-radius: 16px; background: var(--hud-forest); box-shadow: 0 8px 24px #142b2433;
}
.toolbar>button {
  position: relative; min-width: 78px; height: 62px; padding: 7px 12px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  background: none; border: 0; border-radius: 10px; color: var(--hud-paper);
  font: 500 12px/1.2 var(--hud-font);
}
.toolbar>button>span:first-child { display: grid; place-items: center; width: 25px; height: 25px; color: #e2d2ac; }
.toolbar svg { width: 23px; height: 23px; stroke-width: 1.6; }
.toolbar button:hover,.toolbar button:focus-visible { background: var(--hud-forest-hover); }
.toolbar .badge { position: absolute; right: 8px; top: 2px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 1px 4px; border-radius: 6px; background: #e7d7b0; color: #293f35; font: 600 9px/1 var(--hud-font); }
.controls-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; padding: 6px 12px;
  background: var(--hud-paper); color: var(--hud-secondary); border-radius: 6px;
  font: 11px/1.3 var(--hud-font); white-space: nowrap; text-shadow: none;
}
.controls-hint span { margin: 0; color: inherit; }
.controls-hint kbd { font: 10px/1 Plex, monospace; border: 1px solid #abb6a3; background: none; border-radius: 3px; padding: 2px 4px; margin-right: 4px; }
.camera-tools {
  position: absolute; right: 28px; bottom: 146px; display: flex; flex-direction: column; gap: 0;
  padding: 4px; border-radius: 11px; background: var(--hud-paper); box-shadow: var(--hud-shadow);
}
.camera-tools button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--hud-ink); box-shadow: none; }
.camera-tools button:hover { background: #e3e8d5; }
.camera-tools button svg { width: 19px; height: 19px; }
.camera-tools #controls-help { margin-top: 4px; border-top: 1px solid var(--hud-line); border-radius: 0 0 6px 6px; }
:is(.top-actions,.movement,.toolbar,.camera-tools,.clock) button:focus-visible,#quest-go:focus-visible {
  outline: 3px solid #b77c35; outline-offset: 3px;
}
:is(.toolbar,.clock) button:focus-visible { outline-color: #f2d48d; }
@media (max-width: 1000px) and (min-width: 701px) {
  header { padding: 18px 20px; gap: 12px; }
  .brand h1 { font-size: 30px; }
  .quest-card { left: 20px; top: 118px; width: 256px; padding: 17px; }
  #quest-go strong { font-size: 27px; }
  .resources { right: 20px; }
  .save-label,.hint { right: 20px; }
  .movement { left: 20px; }
  .movement button { padding: 8px 9px; }
  .camera-tools { right: 20px; }
}
@media (max-width: 700px) {
  header { padding: 12px; display: flex; justify-content: space-between; align-items: start; gap: 8px; }
  .brand { padding: 11px 13px; border-radius: 11px; }
  .brand h1 { font-size: 27px; letter-spacing: -.55px; }
  .brand h1 span { font-size: 10px; margin-top: 5px; letter-spacing: .1px; }
  .top-actions { gap: 6px; }
  .top-actions button,.top-actions #settings { min-width: 44px; width: 44px; min-height: 44px; height: 44px; padding: 0; border-radius: 10px; }
  .top-actions button span { display: none; }
  .clock { position: absolute; top: 84px; left: 12px; width: 132px; height: 56px; gap: 8px; padding: 6px; border-radius: 11px; }
  .clock-icon { display: none; }
  .clock-copy { flex: 1; min-width: 0; gap: 5px; }
  .clock #time { font-size: 22px; }
  .clock #day { font-size: 9px; }
  .resources { top: 84px; right: 12px; width: calc(100% - 164px); height: 56px; padding: 9px 10px; gap: 7px; justify-content: space-between; border-radius: 11px; }
  .resources>div { display: flex; flex-direction: column; gap: 0; min-width: 0; }
  .resources>div+div { padding-left: 7px; }
  .resources .resource-icon { display: none; }
  .resources b { font-size: 21px; }
  .resources small { font-size: 9px; margin-top: 4px; }
  .save-label { top: 146px; right: 12px; font-size: 9px; padding: 3px 6px; }
  .quest-card { top: 177px; left: 12px; width: calc(100% - 82px); max-width: 260px; padding: 14px; border-radius: 11px; }
  .quest-top { margin-bottom: 7px; }
  .quest-emblem svg { width: 19px; height: 19px; }
  #quest-count { font-size: 10px; }
  #quest-go strong { font-size: 24px; margin: 0 0 7px; }
  #quest-description { display: block; font-size: 12px; line-height: 1.45; }
  #quest-go i { margin-top: 12px; padding: 9px 11px; min-height: 44px; font-size: 11px; }
  .hint { top: auto; bottom: 252px; left: 12px; right: 76px; max-width: none; padding: 11px 13px; font-size: 12px; }
  .toolbar { bottom: calc(12px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 430px; padding: 5px; gap: 0; border-radius: 13px; }
  .toolbar>button,.toolbar #build { min-width: 0; flex: 1; height: 60px; padding: 5px 2px; gap: 5px; font-size: 11px; }
  .toolbar svg,.toolbar button>span:first-child svg { width: 22px; height: 22px; }
  .toolbar .badge { right: 3px; top: 0; min-width: 16px; height: 16px; font-size: 8px; }
  .controls-hint { display: none; }
  .movement { bottom: calc(96px + env(safe-area-inset-bottom)); right: 12px; left: auto; flex-direction: column; width: 144px; padding: 4px; gap: 2px; border-radius: 11px; }
  .movement button { min-height: 44px; height: auto; padding: 8px 10px; font-size: 12px; }
  .movement button span { font-size: 12px; overflow-wrap: anywhere; }
  .movement kbd { display: none; }
  .movement #room { display: none; }
  .camera-tools { bottom: calc(252px + env(safe-area-inset-bottom)); right: 12px; padding: 4px; gap: 0; }
  .camera-tools button { width: 44px; height: 44px; }
  .camera-tools #controls-help { margin-top: 4px; }
  #joystick { bottom: calc(120px + env(safe-area-inset-bottom)); left: 22px; }
}
@media (max-width: 360px) {
  .brand { padding: 10px 11px; }
  .brand h1 { font-size: 25px; }
  .clock { width: 119px; }
  .resources { width: calc(100% - 151px); padding: 9px 7px; gap: 5px; }
  .resources>div+div { padding-left: 5px; }
  .resources b { font-size: 20px; }
  .resources small { font-size: 8px; }
  .quest-card { padding: 13px; }
  #quest-go strong { font-size: 23px; }
  #quest-description { font-size: 11px; }
  .movement { width: 132px; }
  .toolbar>button,.toolbar #build { font-size: 10px; }
}
@media (max-height: 540px) and (min-width: 701px) {
  header { padding: 12px 18px; }
  .brand { padding: 10px 13px; }
  .brand h1 { font-size: 27px; }
  .brand h1 span { display: none; }
  .clock { height: 48px; padding: 4px 4px 4px 12px; }
  .quest-card { top: 82px; left: 18px; width: 235px; padding: 13px; }
  .quest-top { margin-bottom: 5px; }
  #quest-go strong { font-size: 24px; margin-bottom: 0; }
  #quest-description { display: none; }
  #quest-go i { margin-top: 10px; min-height: 40px; }
  .resources { top: 82px; right: 18px; padding: 10px 12px; }
  .save-label { top: 147px; right: 18px; }
  .hint { top: 182px; right: 18px; }
  .movement { left: 18px; bottom: 100px; }
  .camera-tools { right: 18px; bottom: 100px; }
  .toolbar { bottom: 12px; }
  .controls-hint { display: none; }
}

/* Action controls stay separate from the camera and village navigation. */
.locomotion-controls {
  position: absolute; right: 96px; bottom: 146px; width: 200px;
  display: flex; gap: 4px; padding: 5px;
  background: var(--hud-paper); border-radius: 11px; box-shadow: var(--hud-shadow);
}
.locomotion-controls button {
  flex: 1; min-width: 0; min-height: 52px; padding: 7px 10px;
  display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto;
  align-items: center; column-gap: 8px; row-gap: 3px;
  color: var(--hud-ink); background: none; border: 0; border-radius: 7px;
  font: 600 12px/1.2 var(--hud-font); text-align: left;
  touch-action: manipulation;
}
.locomotion-icon { display: grid; place-items: center; grid-row: span 2; color: #60724c; }
.locomotion-icon svg { width: 21px; height: 21px; }
.locomotion-controls kbd { grid-column: 2; color: var(--hud-secondary); font: 10px/1 Plex, monospace; }
.locomotion-controls button:hover { background: #e3e8d5; }
.locomotion-controls button:active { transform: translateY(1px); }
.locomotion-controls button[aria-pressed=true] { background: var(--hud-forest); color: var(--hud-paper); }
.locomotion-controls button[aria-pressed=true] :is(kbd,.locomotion-icon) { color: #e2d2ac; }
.locomotion-controls button:focus-visible { outline: 3px solid #b77c35; outline-offset: 3px; }
.locomotion-controls button[aria-pressed=true]:focus-visible { outline-color: #f2d48d; }
.locomotion-controls button:disabled { opacity: .45; cursor: default; }
:is(.acting,.building,.photographing,.reading) .locomotion-controls,
body:has(dialog[open]) .locomotion-controls { visibility: hidden; pointer-events: none; }
@media (min-width: 701px) and (max-width: 850px) {
  .locomotion-controls { bottom: 212px; }
  .controls-hint { gap: 10px; font-size: 10px; }
}
@media (max-height: 540px) and (min-width: 701px) {
  .locomotion-controls { bottom: 100px; }
}
@media (max-height: 540px) and (min-width: 701px) and (max-width: 850px) {
  .locomotion-controls { bottom: 166px; }
}
@media (max-width: 700px) {
  .locomotion-controls {
    left: 12px; right: auto; bottom: calc(96px + env(safe-area-inset-bottom));
    width: 132px; padding: 4px; gap: 2px;
  }
  .locomotion-controls button {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    min-height: 52px; padding: 6px 3px; font-size: 11px; text-align: center;
  }
  .locomotion-controls kbd { display: none; }
  .locomotion-controls .locomotion-label { display: block; }
  .locomotion-icon svg { width: 20px; height: 20px; }
  #joystick { bottom: calc(160px + env(safe-area-inset-bottom)); }
}

/* Full-screen game opening. Live scenery, a title treatment, and quiet captions. */
body.story-playing #game > :not(#world) { visibility: hidden !important; }
body.story-playing #world { inset: 0; width: 100%; height: 100%; }
#opening-story {
  position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; height: 100dvh;
  max-width: none; max-height: none; border: 0; border-radius: 0;
  background: transparent; color: #fff6dd; box-shadow: none;
  overflow: auto; scrollbar-color: #a9b99a #1e3329;
}
#opening-story[open] { display: flex; flex-direction: column; }
#opening-story::backdrop { background: transparent; backdrop-filter: none; }
#opening-story::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #10271feb 0%, #142c23bd 28%, #172e2173 48%, #182e2112 73%), linear-gradient(0deg, #10261fe8, transparent 37%, transparent 82%, #152a224d);
}
#opening-story::after { content: ''; position: fixed; inset: 0; pointer-events: none; border-block: 12px solid #10231cb3; }
#opening-story::selection { background: #eddbad; color: #203c2c; }
.story-top { position: sticky; top: 0; z-index: 2; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(32px, env(safe-area-inset-top)) 44px 0; }
.story-brand { font: 27px/1.1 Newsreader, Georgia, serif; letter-spacing: -.5px; text-shadow: 0 2px 12px #11261f80; }
[data-scene="title"] .story-brand { visibility: hidden; }
.story-top-actions { display: flex; gap: 10px; }
#opening-story button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 500 13px/1.3 var(--hud-font); border-radius: 7px; }
#opening-story button svg { width: 18px; height: 18px; flex: none; }
#opening-story .story-top-actions button { background: #18372d99; color: #fff6dd; border: 1px solid #f1e5c936; }
#opening-story .story-top-actions button:hover { background: #264c3de8; }
#opening-story button:focus-visible { outline: 3px solid #edd49b; outline-offset: 5px; }
#story-title:focus { outline: none; }
.story-stage { flex: 1; display: flex; flex-direction: column; padding: 36px clamp(36px, 6.8vw, 112px) max(42px, env(safe-area-inset-bottom)); }
.story-copy { width: min(520px, 46%); margin: auto 0; padding: 30px 0 42px; }
#story-title { font: 400 clamp(38px, 4vw, 58px)/1.03 Newsreader, Georgia, serif; letter-spacing: -.025em; text-wrap: balance; max-width: 13ch; margin: 0 0 26px; color: #fff4d6; text-shadow: 0 3px 20px #10291c70; }
#story-prose { max-width: 46ch; }
#story-prose p { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.65; color: #f1eedc; text-wrap: pretty; text-shadow: 0 2px 12px #10271f80; }
#story-prose p + p { margin-top: 16px; }
.story-flourish { display: none; }
[data-scene="title"] .story-copy { text-align: center; width: min(540px, 48%); padding-top: 0; }
[data-scene="title"] #story-title { font-size: clamp(92px, 10.8vw, 154px); line-height: .84; max-width: 5ch; margin: 0 auto 27px; letter-spacing: -.035em; }
[data-scene="title"] .story-flourish { display: flex; align-items: center; justify-content: center; gap: 17px; margin: 0 auto 23px; color: #d4c48a; }
.story-flourish span { width: 48px; height: 1px; background: currentColor; opacity: .65; }
.story-flourish svg { width: 27px; height: 27px; transform: rotate(-25deg); }
[data-scene="title"] #story-prose { margin: 0 auto; }
[data-scene="title"] #story-prose p { font: 24px/1.5 Newsreader, Georgia, serif; color: #f1e5c9; }
[data-scene="invitation"] #story-prose p:nth-child(-n+2) { font: italic 24px/1.5 Newsreader, Georgia, serif; color: #fff4d9; }
[data-scene="invitation"] #story-prose p:last-child { margin-top: 24px; }
.story-footer { position: relative; flex: none; padding-top: 24px; border-top: 1px solid #e8e3bd29; }
.story-progress { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 0); display: flex; align-items: center; gap: 14px; color: #e2dec6; font: 12px/1.3 var(--hud-font); }
.story-marks { display: flex; gap: 6px; }
.story-marks i { width: 22px; height: 3px; background: #d1d6b84d; }
.story-marks i.current { background: #e4cd91; }
.story-navigation { display: flex; justify-content: space-between; gap: 12px; }
#story-back { background: transparent; border-color: #e4e3be52; color: #ede9d4; }
#story-next { min-height: 50px; background: #f4e8c8; color: #23412f; border: 0; padding-inline: 24px; font-weight: 600 !important; box-shadow: 0 6px 22px #101f1838; }
#story-next:hover { background: #fff3d6; transform: translateY(-2px); }
#story-back:hover:not(:disabled) { background: #f3e7c512; }
[data-scene="title"] .story-footer { border: 0; padding-top: 0; width: min(540px, 48%); margin-bottom: 72px; }
[data-scene="title"] .story-progress, [data-scene="title"] #story-back { display: none; }
[data-scene="title"] .story-navigation { justify-content: center; }
[data-scene="title"] #story-next { min-height: 56px; min-width: 228px; justify-content: space-between; padding-inline: 25px; font-size: 15px; }
#story-caption { position: fixed; bottom: 40px; right: 44px; padding: 0; max-width: 40%; text-align: right; font: italic 20px/1.4 Newsreader, Georgia, serif; color: #fff0cf; text-shadow: 0 2px 12px #10271f; pointer-events: none; }
#opening-story:not([data-scene="title"]) #story-caption { display: none; }
body.reading #opening-story { background: #284537; }
@media (prefers-reduced-motion: no-preference) {
  #opening-story[open][data-scene="title"] .story-copy { animation: story-arrive 1.2s cubic-bezier(.16,1,.3,1); }
  @keyframes story-arrive { from { opacity: .5; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 700px) {
  #opening-story::before { background: linear-gradient(0deg, #10271ffa 0%, #122c22eb 28%, #183626a6 53%, #142c2233 76%, #142c2270); }
  #opening-story[data-scene="title"]::before { background: linear-gradient(0deg, #10271feb, #142c2259 29%, #12291f24 55%, #142c22a1 80%, #11271fbf); }
  #opening-story::after { border-block-width: 8px; }
  .story-top { min-height: 64px; padding: max(18px, env(safe-area-inset-top)) 18px 0; gap: 8px; }
  .story-brand { font-size: 23px; white-space: nowrap; }
  .story-top-actions { gap: 6px; }
  #opening-story .story-top-actions button { padding: 8px 10px; font-size: 12px; min-height: 44px; }
  #story-sound span { display: none; }
  #opening-story .story-top-actions #story-sound { width: 44px; padding: 8px; }
  .story-stage { padding: 0 26px max(28px, env(safe-area-inset-bottom)); }
  .story-copy { width: 100%; margin: auto 0 0; padding: 23dvh 0 28px; }
  #story-title { font-size: 38px; max-width: 14ch; margin-bottom: 20px; }
  #story-prose { max-width: none; }
  #story-prose p { font-size: 16px; line-height: 1.55; }
  #story-prose p + p { margin-top: 13px; }
  [data-scene="invitation"] #story-prose p:nth-child(-n+2) { font-size: 21px; line-height: 1.45; }
  .story-footer { padding-top: 38px; }
  .story-progress { top: 12px; transform: translate(-50%, 0); font-size: 11px; white-space: nowrap; }
  #story-next { padding-inline: 15px; }
  [data-scene="title"] .story-copy { width: 100%; margin: 0 auto auto; padding-top: clamp(35px, 8dvh, 90px); }
  [data-scene="title"] #story-title { font-size: clamp(88px, 25vw, 118px); }
  [data-scene="title"] #story-prose p { font-size: 22px; }
  [data-scene="title"] .story-footer { width: 100%; margin-bottom: 42px; padding: 0; }
  #story-caption { bottom: 27px; left: 16px; right: 16px; max-width: none; text-align: center; font-size: 17px; }
}
@media (max-width: 360px) {
  .story-stage { padding-inline: 20px; }
  .story-top { padding-inline: 14px; }
  .story-copy { padding-top: 10dvh; }
  #story-title { font-size: 34px; }
  #story-prose p { font-size: 15px; }
  #opening-story .story-navigation button { font-size: 12px; }
  [data-scene="title"] .story-copy { padding-top: 35px; }
}
@media (min-width: 701px) and (max-height: 620px) {
  .story-top { padding-top: 22px; padding-bottom: 10px; background: #17392de8; }
  .story-stage { padding-top: 18px; padding-bottom: 25px; }
  .story-copy { padding: 12px 0 24px; width: 51%; }
  #story-title { font-size: 34px; margin-bottom: 15px; }
  #story-prose p { font-size: 15px; line-height: 1.45; }
  #story-prose p + p { margin-top: 10px; }
  [data-scene="title"] #story-title { font-size: 90px; }
  [data-scene="title"] .story-footer { margin-bottom: 30px; }
  [data-scene="invitation"] #story-prose p:nth-child(-n+2) { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { #opening-story button { transition: none; } }

/* Character setup: a live portrait beside a quiet, grouped wardrobe. */
#creator { height: 100dvh; background: var(--hud-paper); color: var(--hud-ink); }
#creator::backdrop { background: #213f31; }
#creator .creator-layout { grid-template-columns: minmax(0, .96fr) minmax(0, 1fr); max-width: none; min-height: 100%; }
#creator .creator-stage {
 position: sticky; top: 0; align-self: start; height: 100dvh; min-height: 650px;
 background: radial-gradient(ellipse at 52% 43%, #ecedd1 0%, #c4d0ac 43%, #91a984 100%);
 isolation: isolate;
}
#creator .creator-stage::before { content: ''; position: absolute; inset: 124px 12% 135px; border: 1px solid #f8f3dba1; border-radius: 45% 45% 18px 18px;  pointer-events: none; }
#creator .creator-stage::after { inset: auto -15% -180px; height: 330px; background: #748e6b1a; z-index: -1; }
#creator .creator-stage canvas { z-index: 0; }
#creator .creator-brand { top: 36px; left: 40px; font: 38px/1 Newsreader, Georgia, serif; letter-spacing: -1px; color: #294b3c; }
#creator .creator-brand>span { margin-top: 10px; font: 12px/1.4 var(--hud-font); letter-spacing: .3px; color: #4d644d; }
#creator .creator-preview-identity { position: absolute; bottom: 115px; inset-inline: 30px; z-index: 1; text-align: center; pointer-events: none; }
#creator .creator-preview-identity>span { display: block; color: #50654b; font: 600 9px/1.4 var(--hud-font); letter-spacing: 1.9px; margin-bottom: 6px; }
#creator .creator-preview-identity strong { display: block; font: 32px/1.1 Newsreader, Georgia, serif; color: #2c4938; overflow-wrap: anywhere; }
#creator .preview-caption { bottom: 39px; inset-inline: 32px; display: flex; flex-direction: row; justify-content: center; gap: 10px; align-items: center; }
#creator .preview-caption button { position: static; min-height: 44px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 12px/1.3 var(--hud-font); background: #f8f4e5cc; color: #294b3c; border: 1px solid #fff8eaaa; border-radius: 10px; }
#creator .preview-caption button:hover { background: #fff9eb; }
#creator .preview-caption svg { width: 18px; height: 18px; }
#creator .creator-form { align-self: start; width: 100%; max-width: 690px; margin: 0 auto; padding: 47px clamp(32px, 4.5vw, 76px) 38px; }
#creator .creator-kicker { font: 600 9px/1.3 var(--hud-font); letter-spacing: 1.8px; color: #738267; }
#creator .creator-intro h1 { font: 400 clamp(38px, 3.4vw, 52px)/1.06 Newsreader, Georgia, serif; letter-spacing: -1.15px; margin: 13px 0 12px; }
#creator-title:focus { outline: none; }
#creator .creator-intro>p { max-width: 37ch; font: 14px/1.55 var(--hud-font); color: #66735e; }
#creator .creator-name-block { margin: 27px 0 0; }
#creator .name-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 9px; font: 600 12px/1.4 var(--hud-font); }
#creator .name-label>span { font-size: 10px; font-weight: 400; color: #5f7057; }
#creator .creator-name-field { position: relative; }
#creator #character-name { max-width: none; min-height: 55px; border: 1px solid #bfc7b0; border-radius: 9px; padding: 12px 49px 12px 16px; background: #fffaf0; font: 25px/1.2 Newsreader, Georgia, serif; color: #294b3c; }
#creator #character-name::placeholder { color: #64715a; opacity: 1; }
#creator #character-name:focus { border-color: #496747; outline: 2px solid #496747; outline-offset: 2px; }
#creator #character-name[aria-invalid="true"] { border-color: #a2513e; outline-color: #a2513e; }
#creator .creator-name-field>span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; color: #83966d; pointer-events: none; }
#creator .creator-name-field svg { width: 20px; height: 20px; }
#creator #character-name-help { display: block; margin-top: 8px; font: 11px/1.4 var(--hud-font); color: #78816e; }
#creator .creator-choices { display: grid; gap: 23px; margin-top: 28px; }
#creator .creator-choice-section { padding-top: 20px; border-top: 1px solid #d7dbc8; min-width: 0; }
#creator .creator-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
#creator .creator-section-heading>span { font: 10px/1 Plex, monospace; color: #8c9a7e; }
#creator .creator-section-heading h2 { margin: 0; font: 25px/1.15 Newsreader, Georgia, serif; letter-spacing: -.3px; }
#creator .creator-choice { min-width: 0; border: 0; padding: 0; margin: 0; }
#creator .creator-choice + .creator-choice { margin-top: 15px; }
#creator .creator-choice legend { display: flex; align-items: baseline; gap: 11px; width: 100%; margin-bottom: 9px; padding: 0; font: 600 11px/1.3 var(--hud-font); }
#creator .choice-current { margin-left: auto; font: 400 11px/1.3 var(--hud-font); color: #5c6d52; }
#creator .appearance-options { gap: 7px; }
#creator .appearance-options.is-labels { display: flex; flex-wrap: wrap; }
#creator .appearance-options button:not(.swatch) { min-height: 44px; padding: 10px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d7ddca; border-radius: 8px; background: #e9eddf; color: #4a6047; font: 500 12px/1.3 var(--hud-font); }
#creator .appearance-options button:not(.swatch):hover { background: #dde5cf; border-color: #b6c6a6; }
#creator .appearance-options button:not(.swatch)[aria-pressed="true"] { background: var(--hud-forest); color: var(--hud-paper); border-color: var(--hud-forest); box-shadow: none; }
#creator .appearance-options[data-options="character"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#creator .appearance-options[data-options="outfit"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#creator .appearance-options[data-options="outfit"] button { padding-inline: 9px; gap: 5px; }
#creator .option-check { display: inline-flex; flex: none; opacity: 0; }
#creator .option-check svg { width: 13px; height: 13px; }
#creator [aria-pressed="true"] .option-check { opacity: 1; }
#creator .appearance-options.is-swatches { display: grid; grid-template-columns: repeat(6, 44px); gap: 11px; }
#creator .appearance-options button.swatch { position: relative; isolation: isolate; width: 44px; height: 44px; min-height: 44px; border: 2px solid transparent; border-radius: 50%; padding: 0; background: transparent; box-shadow: none; }
#creator .swatch::before { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px #0000000f, 0 1px 2px #00000017; }
#creator .swatch:hover { border-color: #b2bfa3; }
#creator .appearance-options button.swatch[aria-pressed="true"] { border-color: #3c5e42; box-shadow: none; }
#creator .swatch .option-check { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; align-items: center; justify-content: center; border: 2px solid var(--hud-paper); border-radius: 50%; background: #35563f; color: #fffaf0; text-shadow: none; }
#creator .swatch .option-check svg { width: 11px; height: 11px; }
#creator .creator-actions { gap: 9px; margin-top: 25px; }
#creator .creator-actions button { min-height: 51px; }
#creator #creator-start { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 18px; border: 0; border-radius: 10px; background: var(--hud-forest); color: var(--hud-paper); font: 600 13px/1.4 var(--hud-font); }
#creator #creator-start:hover { background: var(--hud-forest-hover); }
#creator #creator-start svg { width: 18px; height: 18px; flex: none; }
#creator #creator-cancel { padding: 12px 15px; background: transparent; border-color: #c5ceb6; color: #5b6e52; font-size: 12px; }
#creator .creator-later { margin-top: 13px; font: 11px/1.5 var(--hud-font); color: #5c6d52; }
#creator #creator-error { max-width: none; margin: 17px 0 0; padding: 11px 13px; border: 1px solid #c79580; background: #f0e4d8; color: #854630; font: 12px/1.5 var(--hud-font); }
#creator #creator-unsaved { min-height: 44px; margin-top: 12px; background: #e8ecd9; border-color: #b6c4a0; font: 500 12px/1.4 var(--hud-font); }
#creator button { transition-property: background-color, border-color, color, transform; transition-duration: 140ms; transition-timing-function: cubic-bezier(.2, 0, 0, 1); }
#creator button:active:not(:disabled) { transform: scale(.96); }
#creator button:focus-visible { outline: 3px solid #9a6d30; outline-offset: 3px; }
#creator button:disabled { opacity: .5; }
#creator form[aria-busy="true"] { cursor: progress; }
#creator .avatar-unavailable { top: 42%; left: 16%; right: 16%; color: #3d5b42; }
@media (min-width: 701px) and (max-width: 1050px) {
 #creator .creator-layout { grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
 #creator .creator-form { padding-inline: 28px; }
 #creator .creator-brand { left: 28px; font-size: 32px; }
 #creator .appearance-options.is-swatches { gap: 6px; }
 #creator .appearance-options[data-options="outfit"] { display: flex; }
}
@media (max-width: 700px) {
 #creator .creator-layout { display: block; }
 #creator .creator-stage { position: relative; height: 360px; min-height: 0; }
 #creator .creator-stage::before { inset: 66px 17% 50px; border-radius: 46% 46% 14px 14px; }
 #creator .creator-stage::after { height: 190px; bottom: -135px; }
 #creator .creator-stage canvas { top: -20px; height: 420px; width: 100%; }
 #creator .creator-brand { top: 23px; left: 24px; font-size: 28px; }
 #creator .creator-brand>span { margin-top: 6px; font-size: 10px; }
 #creator .creator-preview-identity { display: none; }
 #creator .preview-caption { bottom: 16px; inset-inline: 20px; justify-content: space-between; gap: 8px; }
 #creator .preview-caption button { padding: 10px 12px; font-size: 11px; }
 #creator .preview-caption svg { width: 17px; height: 17px; }
 #creator .creator-form { max-width: none; padding: 27px 24px max(31px, env(safe-area-inset-bottom)); }
 #creator .creator-intro h1 { font-size: 38px; margin-block: 12px; }
 #creator .creator-intro>p { font-size: 13px; max-width: 33ch; }
 #creator .creator-name-block { margin-top: 23px; }
 #creator .creator-choices { gap: 23px; margin-top: 26px; }
 #creator .creator-choice-section { padding-top: 19px; }
 #creator .creator-section-heading { margin-bottom: 16px; }
 #creator .creator-section-heading h2 { font-size: 25px; }
 #creator .appearance-options.is-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
 #creator .appearance-options button:not(.swatch) { padding: 10px 11px; }
 #creator .appearance-options[data-options="outfit"] { gap: 6px; }
 #creator .appearance-options[data-options="outfit"] button { padding-inline: 7px; font-size: 11px; }
 #creator .creator-actions { margin-top: 25px; }
 #creator #creator-start { width: 100%; flex-basis: 100%; }
 #creator #creator-cancel { width: 100%; }
 #creator .creator-later { text-align: center; }
}
@media (max-width: 360px) {
 #creator .creator-form { padding-inline: 20px; }
 #creator .creator-stage { height: 340px; }
 #creator .creator-stage canvas { height: 400px; }
 #creator .creator-brand { left: 20px; font-size: 26px; }
 #creator .creator-intro h1 { font-size: 35px; }
 #creator .appearance-options.is-swatches { gap: 3px; }
 #creator .appearance-options[data-options="outfit"] { display: flex; }
 #creator .appearance-options[data-options="outfit"] button { flex: 1; min-width: 78px; }
}
@media (prefers-reduced-motion: reduce) { #creator button { transition: none; } #creator button:active:not(:disabled) { transform: none; } }
