:root{color-scheme:dark;--yellow:#ffe631;--ink:#0d0f18;--panel:#161925;--line:#333745;--muted:#a9aabd;--purple:#be98ff}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:#f5f3ed;font:16px/1.5 Arial,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;background:#252937;border:1px solid #424758;border-radius:9px;padding:10px 15px;touch-action:manipulation;min-height:44px}button:hover{border-color:var(--yellow)}button:focus-visible,a:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}button:disabled{opacity:.5;cursor:default}a{color:var(--yellow);text-decoration:none}h1,h2,p{margin:0}h2{font-size:20px;line-height:1.3}button.primary{background:var(--yellow);color:#13140c;font-weight:700}.game-app{max-width:1540px;margin:auto;padding:18px 28px}.masthead{display:flex;align-items:center;gap:24px;margin-bottom:18px}.masthead>a{font-weight:700;white-space:nowrap}.masthead>div{flex:1}.brand{font-size:13px;color:var(--yellow);letter-spacing:.13em}h1{font-size:clamp(17px,2.3vw,26px);letter-spacing:.04em}h1 span{font-weight:400;color:#aaaabd}.masthead #help{border-radius:50%;width:44px;padding:0}.districts{display:flex;gap:8px;margin-bottom:16px}.districts button{flex:1;background:#181b28;color:#b7b9c7;border-color:#303547}.districts button[aria-current=true]{background:var(--yellow);border-color:var(--yellow);color:#13140d;font-weight:700}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px}.play-column{min-width:0}.location-bar{display:flex;align-items:center;justify-content:space-between;padding:0 0 12px;gap:10px}#location-kicker,.eyebrow{font-size:12px;letter-spacing:.13em;color:var(--purple);font-weight:700}.prototype{font-size:11px;border:1px solid #5f586c;color:#cbb8dc;border-radius:5px;padding:4px 6px}.viewport{position:relative;aspect-ratio:4/3;border:1px solid #4b465a;border-radius:14px;overflow:hidden;background:#151422;isolation:isolate;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}canvas{display:block;width:100%;height:100%;outline:none;touch-action:none}#load-cover{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;background:#141423;padding:20px;text-align:center}#load-cover[hidden]{display:none}#load-cover strong{font-size:24px;color:var(--yellow)}#toast{position:absolute;top:14px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;border:1px solid #bfa3e6;border-radius:8px;padding:8px 14px;background:#141020ed;color:#f2e9ff;pointer-events:none;font-size:14px;opacity:0;transition:opacity .2s}#toast.visible{opacity:1}#world-hint{position:absolute;top:12px;left:12px;max-width:75%;font-size:13px;background:#111420da;border-radius:6px;padding:6px 10px;pointer-events:none}#toast.visible~#world-hint{opacity:0}#placement-hint{position:absolute;top:12px;left:12px;right:12px;text-align:center;padding:8px;background:#181127e8;font-size:14px;color:var(--yellow)}.touch-controls{position:absolute;bottom:14px;left:16px;right:16px;display:flex;align-items:end;justify-content:space-between;pointer-events:none}#stick{display:none;width:100px;height:100px;border:1px solid #fff5;border-radius:50%;background:#14142299;pointer-events:auto;touch-action:none;position:relative}#stick span{position:absolute;inset:30px;background:#ffe631bb;border:2px solid #ffe631;border-radius:50%;pointer-events:none}#interact{pointer-events:auto;min-width:110px;min-height:52px;background:#ffe631;color:#13140d;font-weight:700;border-color:#fdeb8d;box-shadow:0 3px 18px #0008;margin-left:auto}#interact small{display:inline-block;border:1px solid #3734176b;border-radius:4px;margin-left:8px;padding:0 5px}#interact:disabled{background:#202231;color:#c4c3d0;border-color:#77748a;opacity:.85}.play-toolbar{display:flex;gap:8px;align-items:center;margin-top:10px}.play-toolbar span{font-size:12px;color:var(--muted);flex:1}.play-toolbar button{font-size:14px;padding:8px 12px}#craft-open{border-color:#d7bd3d;color:var(--yellow)}#placement-tools{display:flex;gap:6px;flex-wrap:wrap;padding:12px;background:#221c30;border:1px solid #544563;border-radius:9px;margin-top:10px}#placement-tools[hidden]{display:none}#placement-name{width:100%;font-weight:700}#placement-tools button{font-size:14px}#place-confirm{background:var(--yellow);color:#13140d}.journal{border-left:1px solid var(--line);padding-left:24px}.journal section{margin-top:24px}.chapter h2{margin:8px 0}.chapter p{color:#bfc0cc;font-size:14px}.chapter ol{list-style:none;padding:0;margin:18px 0 0;counter-reset:quest}.chapter li{counter-increment:quest;display:flex;gap:10px;font-size:14px;margin-bottom:14px;align-items:center;color:#bfc0cc}.chapter li:before{content:counter(quest);flex:0 0 25px;height:25px;display:grid;place-items:center;border:1px solid #5b506d;border-radius:50%;font-size:12px}.chapter li.done{color:#eee6ff}.chapter li.done:before{content:'✓';background:#b99bdc;color:#10131b;border-color:transparent}#quest-done{color:var(--yellow)}.satchel h2{margin-bottom:10px}.resource{display:flex;align-items:center;gap:9px;padding:7px 0;font-size:14px}.resource strong{margin-left:auto;color:#fff;font-variant-numeric:tabular-nums}.resource-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}.shard{background:#bf91ff}.scrap{background:#74e1d1}.ember{background:#ffa658}.shelf-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.shelf-heading span{font-size:12px;color:var(--muted)}#inventory{display:grid;gap:7px;margin-top:12px}#inventory button{display:flex;align-items:center;justify-content:space-between;text-align:left;font-size:14px}#inventory small{font-size:12px;color:var(--yellow)}.muted,.save-note{color:var(--muted);font-size:13px;line-height:1.6}.save-note{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}footer{display:flex;justify-content:space-between;gap:16px;color:#8c8d9f;font-size:12px;margin-top:22px;padding-bottom:12px}dialog{max-width:650px;width:calc(100% - 28px);max-height:85dvh;overflow:auto;background:#171b27;color:#f6f4ed;border:1px solid #726482;border-radius:16px;padding:24px}dialog::backdrop{background:#070913ba;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.dialog-heading button{font-size:24px;line-height:1;padding:4px 13px}dialog>p{margin:12px 0;color:#bfc0cc;font-size:15px}#recipes{display:grid;gap:10px;margin-top:18px}.recipe{display:grid;grid-template-columns:60px 1fr auto;align-items:center;gap:12px;padding:12px;background:#202333;border:1px solid #414155;border-radius:10px}.recipe canvas{width:60px;height:60px}.recipe h3{font-size:16px;margin:0 0 5px}.recipe p{font-size:12px;color:#c9bfd9}.recipe button{font-size:14px}.recipe .missing{color:#f4a8a1}#craft-message{color:var(--yellow)}[hidden]{display:none!important}
@media(pointer:coarse){#stick{display:block}#interact small{display:none}.play-toolbar span{display:none}}
@media(max-width:1000px){.game-app{padding:14px 16px}.game-layout{grid-template-columns:minmax(0,1fr) 250px;gap:16px}.journal{padding-left:16px}}
@media(max-width:760px){.game-app{padding:12px}.masthead{gap:12px;margin-bottom:12px}.masthead>a{font-size:13px}.brand{font-size:11px}h1{font-size:16px}h1 span{display:block;font-size:12px;margin-top:1px}.game-layout{display:block}.districts{gap:5px;margin-bottom:12px}.districts button{font-size:13px;padding:8px 4px}.prototype{font-size:10px;max-width:82px;text-align:center}.location-bar h2{font-size:19px}.viewport{aspect-ratio:1/1.1;max-height:65dvh;min-height:290px}.journal{border:0;padding:20px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:18px}.journal .chapter{grid-column:1/-1}.chapter ol{display:grid;grid-template-columns:1fr 1fr 1fr;gap:9px}.chapter li{font-size:12px;align-items:start;gap:6px}.chapter li:before{flex-basis:20px;height:20px}.journal section{margin:0}.journal h2{font-size:17px}.save-note{grid-column:1/-1;margin-top:0}.play-toolbar{justify-content:flex-end}.play-toolbar button{flex:1}.resource{font-size:12px;gap:6px}.recipe{grid-template-columns:44px 1fr auto;padding:9px;gap:8px}.recipe canvas{width:44px;height:44px}.recipe h3{font-size:14px}dialog{padding:18px}#world-hint{font-size:12px;max-width:92%}#stick{width:88px;height:88px}#stick span{inset:25px}.touch-controls{bottom:12px;left:12px;right:12px}footer span{max-width:55%}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Keep decoration controls within the visible game surface. */
#placement-tools{position:absolute;z-index:4;top:52px;left:12px;right:12px;margin:0;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:9px;background:#161020f2;border:1px solid #79668e;border-radius:10px;box-shadow:0 8px 24px #0008}
#placement-name{width:auto;margin-right:auto}
#placement-tools button{font-size:13px;padding:7px 11px;min-height:40px}
#place-confirm{font-weight:700}
@media(max-width:620px){#placement-tools{top:48px;padding:7px;gap:4px}#placement-name{width:100%;margin:0}#placement-tools button{font-size:12px;padding:6px 8px;min-height:36px}}

/* Cursed District combat and in-window decorating controls. */
#danger-hud{position:absolute;z-index:3;top:12px;right:12px;display:flex;align-items:center;gap:9px;padding:7px 10px;border:1px solid #ef864d;border-radius:8px;background:#140d13e8;box-shadow:0 5px 18px #0008;pointer-events:none}#danger-hud span{font-size:10px;letter-spacing:.16em;color:#ffb76f;font-weight:800}#danger-hud strong{font-size:15px;letter-spacing:.08em;color:#ffe631;text-shadow:0 0 8px #ff6b35}
.viewport.decorating .play-toolbar{position:absolute;z-index:4;left:12px;right:12px;bottom:12px;margin:0;padding:8px;display:flex;border:1px solid #79668e;border-radius:10px;background:#11131eef;box-shadow:0 8px 24px #000a}.viewport.decorating .play-toolbar span{display:none}.viewport.decorating .play-toolbar button{flex:1;min-width:0;font-size:13px;padding:7px 9px}.viewport.decorating .touch-controls{display:none}
@media(max-width:620px){#danger-hud{top:48px;right:8px;padding:5px 7px}.viewport.decorating .play-toolbar{left:8px;right:8px;bottom:8px;padding:6px;gap:5px}.viewport.decorating .play-toolbar button{font-size:12px;padding:6px 5px;min-height:38px}}

/* Keep the main game's identity above the current seasonal chapter. */
.game-heading{min-width:0}.game-heading h1{font-size:clamp(18px,2.3vw,28px);line-height:1.15;letter-spacing:.01em}.game-heading h1 em{font-style:normal;color:var(--yellow)}.chapter-name{margin-top:4px;color:#c6c6d0;font-size:clamp(12px,1.2vw,14px);line-height:1.3}.chapter-name span{color:#8d8299;margin:0 .32em}.chapter-name strong{color:#f5f1e9;font-weight:700}
@media(max-width:620px){.masthead{gap:10px}.game-heading h1{font-size:clamp(16px,4.5vw,21px)}.chapter-name{font-size:12px}.masthead>a{font-size:12px}}

/* On small screens, tips can be closed without covering the play field again. */
#world-hint{z-index:3}#hint-dismiss,#placement-hint-dismiss{display:none}#hint-restore{margin:12px 12px 0 0;border-color:var(--yellow);color:var(--yellow)}
@media(max-width:760px){#world-hint,#placement-hint{display:flex;align-items:flex-start;gap:8px;max-width:none;right:12px;padding:8px 8px 8px 12px;font-size:14px;line-height:1.4;text-align:left}#hint-text,#placement-hint-text{flex:1}#hint-dismiss,#placement-hint-dismiss{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:-5px -4px -5px 0;padding:0;border:0;background:transparent;color:var(--yellow);font-size:27px;line-height:1;pointer-events:auto}}
/* First Night campaign */
#room-progress{position:absolute;left:12px;bottom:120px;max-width:75%;font-size:13px;color:#f2eaff;background:#101321df;border:1px solid #706285;border-radius:8px;padding:6px 10px;pointer-events:none}#boss-bar{position:absolute;left:20%;right:20%;top:12px;text-align:center;padding:5px 10px;background:#171121e8;border:1px solid #a585bd;border-radius:8px;pointer-events:none}#boss-name{display:block;font-size:13px;color:#ffe631}#boss-health{display:block;width:100%;height:8px;margin-top:5px;accent-color:#ce82f8}#boss-bar:not([hidden])~#danger-hud{top:65px}#world-hint{top:65px;max-width:65%}#toast{z-index:6}#danger-hud{top:12px}#swipe{pointer-events:auto;min-height:54px;min-width:85px;margin-left:auto;margin-right:8px;box-shadow:0 3px 18px #0008}#swipe small{display:block;font-size:11px}#interact{margin-left:0}#swipe:active{transform:scale(.95)}.chapter ol{display:grid;grid-template-columns:1fr;gap:0}.chapter li{margin-bottom:9px}.chapter li.active{color:var(--yellow)}#active-objective{margin-top:10px;color:var(--yellow);font-size:16px}#chapters-open{color:#d9b7ff}.journal .save-note{font-size:14px}.button{display:inline-block;min-height:44px;padding:10px 16px;border-radius:9px;background:var(--yellow);color:#12130b;font-weight:700}dialog form{display:grid;gap:10px}dialog input,dialog select,dialog textarea{font:inherit;font-size:16px;width:100%;min-height:44px;background:#0e1220;color:#fff;border:1px solid #686176;border-radius:8px;padding:10px}dialog label{font-size:14px;margin-top:8px}dialog textarea{min-height:75px}#player-id{font-size:13px;overflow-wrap:anywhere}#profile-form{margin:16px 0}#profile-message,#claim-message{color:var(--yellow)}#profile-open{font-size:14px;padding:8px 12px}#wardrobe{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-height:38dvh;overflow:auto;margin-top:14px}#wardrobe button{padding:6px;display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center;font-size:12px;line-height:1.3}#wardrobe button[aria-pressed=true]{border-color:var(--yellow);background:#393520}#wardrobe img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:6px}#wardrobe small{font-size:12px;color:var(--yellow)}.wardrobe-filter{display:flex;gap:10px}.wardrobe-filter [aria-pressed=true]{border-color:var(--yellow);color:var(--yellow)}.mirror-preview{display:grid;grid-template-columns:minmax(0,1fr) 1fr;gap:18px;align-items:center;margin:12px 0 20px}.mirror-preview canvas{aspect-ratio:1;height:auto;background:radial-gradient(ellipse,#393645,#131725 70%);border:2px solid #cfb657;border-radius:48% 48% 12px 12px}.mirror-preview h3{margin:0 0 8px}.mirror-preview p{font-size:14px;color:#c6c3d0;margin:0 0 12px}.upgrade-card,.chapter-room,.claim-row{background:#212434;border:1px solid #494455;border-radius:9px;margin:10px 0;padding:12px}.upgrade-card h3{margin:0}.upgrade-card p{font-size:14px;margin:7px 0;color:#c2bdcf}.chapter-room{display:flex;justify-content:space-between;gap:12px}.chapter-room small{color:#cba6ef}#chapters-dialog #new-expedition{margin-top:14px}.claim-row{font-size:14px}.claim-row strong{display:block}#save-retry,#reload-save{color:var(--yellow);font-size:14px}#story-dialog{text-align:center;max-width:530px;padding:32px}#story-dialog .dialog-heading{justify-content:center}#story-dialog h2{font-size:28px;color:var(--yellow)}#story-dialog p{line-height:1.7;margin:20px 0}#story-dialog .eyebrow{display:block;margin-bottom:12px}
@media(max-width:760px){.masthead{flex-wrap:wrap}.masthead .game-heading{order:-1;flex:1 0 100%}.masthead>a{margin-right:auto}.masthead #help{width:40px}.journal .chapter{grid-column:1/-1}.chapter ol{grid-template-columns:1fr 1fr;gap:8px}.chapter li{font-size:13px}.play-toolbar{flex-wrap:wrap}.play-toolbar button{font-size:13px;padding:7px 8px}#world-hint{top:58px;max-width:none;font-size:13px;left:8px;right:8px}#boss-bar{left:8px;right:110px;top:8px}#boss-bar:not([hidden])~#danger-hud,#danger-hud{top:8px;right:8px}#danger-hud span{display:none}#room-progress{bottom:115px;left:8px;max-width:90%;font-size:12px}.touch-controls{gap:6px}#interact{min-width:78px;font-size:14px;padding:8px;min-height:52px}#swipe{min-width:70px;font-size:14px;padding:8px;margin-right:0}#swipe small{display:none}#wardrobe{grid-template-columns:repeat(3,minmax(0,1fr))}.mirror-preview{gap:12px}.mirror-preview h3{font-size:17px}.mirror-preview button{font-size:14px}.viewport.decorating #room-progress,.viewport.decorating #boss-bar{display:none}.chapter-room{font-size:14px}.prototype{font-size:12px}}
@media(pointer:fine){#room-progress{bottom:80px}}

#dash{pointer-events:auto;min-height:52px;padding:8px 12px;color:#a4efff;border-color:#6bc9dd;background:#102534e8;margin-left:auto;margin-right:8px}#dash small{display:block;font-size:11px}#hints-toggle[aria-pressed=true]{color:var(--yellow);border-color:#9a892f}.play-toolbar{flex-wrap:wrap}.play-toolbar #status{min-width:120px}.viewport.decorating #placement-tools{top:12px}.viewport.decorating #placement-hint{top:auto;bottom:80px}.viewport.decorating #chapters-open{display:none}
@media(max-width:760px){#dash{position:absolute;right:0;bottom:66px;min-width:70px;margin:0;font-size:13px}#dash small{display:none}.play-toolbar button{flex:1 1 auto}.viewport.decorating .play-toolbar{flex-wrap:wrap}.viewport.decorating #hints-toggle{flex:0 0 auto}.touch-controls #swipe{margin-left:auto}}

#tutorial-card{position:absolute;left:14px;top:14px;max-width:min(420px,calc(100% - 28px));display:flex;gap:16px;padding:14px 16px;background:#111525ed;border:1px solid #ffe631;border-radius:12px;z-index:6;box-shadow:0 8px 28px #0008}#tutorial-card[hidden]{display:none}#tutorial-card strong{font-size:16px;color:#ffe631}#tutorial-card p{font-size:14px;line-height:1.5;margin:6px 0 0}#tutorial-card button{align-self:start;padding:2px 9px}#equipped-look{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);max-width:65%;font-size:14px;color:#ffe631;background:#0a0d18dd;border-radius:6px;padding:4px 10px;pointer-events:none;text-align:center}#equipped-look:empty{display:none}#wardrobe .locked{border-style:dashed}#wardrobe .locked img{opacity:.55}#wardrobe small{font-size:13px;line-height:1.4}#wardrobe-summary{color:#ffe631}#hats-refresh{margin-bottom:14px}.action-flash{animation:swipe-flash .26s ease-out}@keyframes swipe-flash{50%{box-shadow:0 0 24px #ffe631;transform:scale(1.06)}}@media(prefers-reduced-motion:reduce){.action-flash{animation:none}}@media(max-width:600px){#tutorial-card{top:46px;padding:10px;max-width:calc(100% - 28px)}#tutorial-card p{font-size:14px}#equipped-look{bottom:106px}}

#equipped-look{position:static;transform:none;max-width:none;background:none;padding:0;margin-top:4px;font-size:14px;text-align:left;line-height:1.4}

#danger-hud{display:flex;flex-direction:column;align-items:flex-end;gap:3px;pointer-events:none}#danger-hud[hidden]{display:none}#health-meter{width:150px;height:8px;accent-color:#8cffbd}#curse-status{font-size:12px;color:#d8c6ef}#danger-hud.low-health{color:#ff927f}#danger-hud.low-health #health-meter{accent-color:#ff927f}
#toast{top:auto;bottom:155px}#danger-hud.low-health strong{color:#ff927f}.viewport:has(#tutorial-card:not([hidden])) #world-hint{display:none}@media(max-width:600px){#tutorial-card{top:88px}#world-hint{top:82px}}

#email-form,#code-form{display:grid;gap:12px;margin:20px 0}#email-form[hidden],#code-form[hidden]{display:none}#email-form .muted{font-size:14px}#account-code{letter-spacing:.22em;font-size:22px}#profile-message{overflow-wrap:anywhere}#account-unavailable{padding:16px;background:#252937;border-radius:9px;margin:16px 0}

/* Beta activities sit beside the world, leaving movement and combat visible. */
.beta-banner{padding:10px 14px;margin:0 0 18px;border:1px solid #71608d;background:#211930;color:#e6d7ff;border-radius:9px;font-size:14px;line-height:1.5}#beta-tasks{border-top:1px solid var(--line);padding-top:18px}#beta-tasks h3{font-size:16px;margin:18px 0 6px}#beta-tasks p{font-size:14px;color:#c9c7d7;line-height:1.5;margin:8px 0}#beta-tasks #weapon-status{color:#ffe631}#beta-tasks button{width:100%;font-size:14px;margin-top:6px}.viewport:has(#boss-bar:not([hidden])) #tutorial-card{top:130px}.viewport:has(#boss-bar:not([hidden])) #world-hint{top:128px}#hint-dismiss{display:block;pointer-events:auto;min-height:30px;padding:0 8px;border:0;background:transparent;font-size:22px}#world-hint{display:flex;align-items:start;gap:8px;font-size:14px}.prototype{font-size:12px}#world-hint[hidden]{display:none}#tutorial-card{max-width:min(380px,calc(100% - 28px))}#beta-tasks + .satchel{margin-top:24px}
@media(max-width:760px){#beta-tasks{grid-column:1/-1}.beta-banner{font-size:14px}.chapter li,.resource,.recipe p,.save-note{font-size:14px}.viewport:has(#boss-bar:not([hidden])) #tutorial-card{top:112px}#tutorial-card p{max-height:75px;overflow:auto}.viewport:has(#boss-bar:not([hidden])) #world-hint{top:108px}.prototype{max-width:none}.play-toolbar #status{flex-basis:100%}}

/* Keep the encounter visible and the hideout tools anchored to the world. */
.viewport.shop-combat #tutorial-card,.viewport.shop-combat #world-hint,.viewport.shop-combat #toast{display:none!important}
.viewport.at-home #world-hint{display:none}
.viewport.at-home .play-toolbar{position:absolute;z-index:4;top:8px;right:8px;left:auto;bottom:auto;margin:0;padding:5px;gap:4px;max-width:calc(100% - 16px);background:#11131eef;border:1px solid #79668e;border-radius:10px;box-shadow:0 5px 18px #0008;display:flex;flex-wrap:wrap;justify-content:flex-end}
.viewport.at-home .play-toolbar #status{display:none}.viewport.at-home .play-toolbar button{flex:0 1 auto;min-height:40px;font-size:12px;padding:6px 8px}.viewport.at-home #chapters-open{display:block}
.viewport.decorating #decoration-shelf{position:absolute;z-index:4;left:8px;top:62px;width:185px;max-width:43%;max-height:42%;overflow:auto;margin:0;padding:10px;background:#11131eef;border:1px solid #79668e;border-radius:10px;touch-action:pan-y}
.viewport.decorating .shelf-heading{display:block}.viewport.decorating .shelf-heading h2{font-size:14px}.viewport.decorating #inventory{margin-top:6px}.viewport.decorating #inventory button{font-size:12px;display:block;width:100%;padding:8px}.viewport.decorating #inventory small{display:block}
.viewport.decorating #placement-tools{top:auto;left:8px;right:auto;bottom:8px;max-width:calc(100% - 16px);padding:6px}.viewport.decorating #placement-name{font-size:12px}.viewport.decorating #placement-hint{top:auto;bottom:65px;left:auto;right:8px;max-width:52%;font-size:12px;padding:6px;pointer-events:none}.viewport.decorating #placement-hint-dismiss{pointer-events:auto}
.viewport.decorating #toast{bottom:120px}.viewport.at-home #hints-toggle{display:none}
@media(max-width:620px){.viewport.at-home .play-toolbar{gap:3px;padding:4px}.viewport.at-home .play-toolbar button{padding:5px 7px;min-height:40px}.viewport.decorating #decoration-shelf{top:62px;padding:7px;max-height:34%;width:155px}.viewport.decorating #placement-tools button{min-height:40px}.viewport.decorating #placement-hint{bottom:98px}}

#tutorial-card{pointer-events:none}#tutorial-card button{pointer-events:auto}

.viewport.decorating #placement-hint{position:static;max-width:none;margin-top:8px;padding:0;background:none;text-align:left;color:#d4c8e4}.viewport.decorating #placement-hint-dismiss{display:none}

/* Hatquarters beta: visible rewards, room-safe guidance, and collectible identity. */
.gate-banner{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 18px;margin:-6px 0 20px;background:linear-gradient(105deg,#281a3c,#141824);border:1px solid #68507e;border-radius:12px}.gate-banner strong{display:block;font-size:22px;color:#ffe631;font-variant-numeric:tabular-nums}.gate-banner .eyebrow{font-size:10px}.gate-banner button{font-size:14px}.keeper-call{padding:10px 13px;border-left:3px solid #ffe631;background:#221f25;color:#eee4bf;font-size:14px;margin:0 0 10px;line-height:1.5}
.hat-reveal{text-align:center;max-width:480px;overflow-x:hidden;background:radial-gradient(ellipse at 50% 40%,#624681 0,#211b34 48%,#111725 90%);border-color:#c6a36b;box-shadow:0 0 80px #bb77ff30}.hat-reveal h2{font-size:28px;color:#ffe631;margin:14px 0}.hat-reveal canvas{height:auto;width:min(100%,280px);margin:auto;filter:drop-shadow(0 0 20px #dac28d55);animation:hat-arrival .5s ease-out}.hat-reveal .primary{width:100%;margin-top:12px}#reveal-loading{color:#8cf5e5;font-size:14px}#wardrobe .collected{border-color:#72c8b8}#wardrobe .wearing{border:2px solid #ffe631;background:#383020}#wardrobe .locked small{color:#b7a9c6}#wardrobe .locked img{filter:grayscale(.75);opacity:.45}
.keeper-errand{border:1px solid #46695f;background:#102820;padding:14px;border-radius:12px;margin:20px 0}.keeper-errand h3{margin:0 0 8px}#keeper-stamps{width:100%;height:12px;accent-color:#8cf5e5}#keeper-stamp-label{color:#8cf5e5!important}#inventory canvas{width:42px;height:42px;float:left;margin-right:8px;object-fit:contain;pointer-events:none}.viewport.decorating #inventory button{min-height:58px}.viewport.decorating #inventory canvas{width:34px;height:34px}.viewport.decorating #placement-feedback{flex-basis:100%;font-size:12px}.valid{color:#aaf3c7}.invalid{color:#ffa99e}.district-teaser{width:100%;border-radius:10px;max-height:230px;object-fit:cover}.district-peek{padding-left:24px}.district-peek li{padding:8px 0}.district-peek span{display:block;font-size:13px;color:#c1b4d2}#gate-dialog-clock{font-size:24px;font-weight:bold;color:#ffe631}@keyframes hat-arrival{from{opacity:0;transform:translateY(22px) scale(.86)}to{opacity:1;transform:none}}
@media(max-width:760px){.gate-banner{padding:10px;gap:8px}.gate-banner strong{font-size:18px}.gate-banner button{font-size:12px;padding:8px;max-width:46%}.keeper-call{font-size:13px}.hat-reveal h2{font-size:23px}.hat-reveal canvas{max-width:220px}.hat-reveal>p{font-size:14px}}
@media(prefers-reduced-motion:reduce){.hat-reveal canvas{animation:none}}
/* Keep the doorway floor accessible while choosing placement. */
.viewport.decorating #placement-tools{top:62px;right:8px;left:auto;bottom:auto;width:230px;max-width:48%;align-items:flex-start}.viewport.decorating #placement-hint{bottom:8px}
@media(max-width:620px){.viewport.decorating #placement-tools{width:190px;max-width:47%;font-size:11px}.viewport.decorating #placement-tools button{padding:5px 6px;font-size:11px}}

.radio-art{display:block;width:210px;max-width:65%;height:auto;margin:0 auto 14px;image-rendering:pixelated}#radio-tracks{display:grid;gap:8px;margin:14px 0}#radio-tracks button{text-align:left}#radio-tracks button[aria-pressed=true]{border-color:#8cf5e5;color:#8cf5e5}.radio-transport{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}#radio-volume{width:100%;accent-color:#8cf5e5;min-height:44px}#radio-volume-label{color:#8cf5e5;margin-left:10px}.community-poster{display:block;width:auto;max-width:100%;max-height:60dvh;margin:auto;border:6px solid #66543d;box-shadow:0 4px 18px #0008}#poster-dialog{text-align:center}#poster-dialog .dialog-heading{text-align:left}
/* Compact play controls and a clear combat canvas. */
#pause{position:absolute;top:8px;left:8px;z-index:5;width:44px;height:44px;min-height:44px;padding:0;font-size:20px;background:#141722db;border-color:#76668b;line-height:1}.viewport.at-home .play-toolbar{max-width:calc(100% - 70px)}
.viewport.in-district #world-hint,.viewport.in-district #tutorial-card,.viewport.in-district #toast{display:none!important}
.viewport.in-district #danger-hud{top:8px;right:8px;padding:6px 9px;min-height:36px;display:flex;flex-direction:row;align-items:center;gap:5px;border-radius:8px;background:#141722c9;box-shadow:none}.viewport.in-district #danger-hud>span,.viewport.in-district #health-meter{display:none}.viewport.in-district #hearts{font-size:14px;letter-spacing:0}.viewport.in-district #curse-status{font-size:15px}
.viewport.in-district #room-progress{left:60px;right:auto;top:8px;bottom:auto;max-width:110px;padding:8px;font-size:13px;min-height:36px;border-radius:8px;background:#141722c9}.viewport.in-district #boss-bar{top:54px;left:16px;right:16px;padding:5px 9px;max-width:none;background:#141722bd}.viewport.in-district #boss-name{font-size:13px}.viewport.in-district #boss-health{height:6px}
.district-note{font-size:14px;color:#c4b8d3;min-height:1.5em;margin:8px 0;line-height:1.5}.home-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}#storage-items{display:grid;gap:8px;margin:16px 0}#storage-items button{text-align:left}#district-log{color:#c4b8d3;font-size:14px;line-height:1.6;padding-left:20px}#district-log:empty{display:none}
.viewport:not(.in-district) #world-hint{left:62px;right:8px;max-width:none}

#session-complete{border:1px solid #a887d8;border-radius:16px;padding:20px;background:#1c1730;margin-bottom:18px}#feedback-dialog textarea{width:100%;box-sizing:border-box;min-height:140px}#feedback-context{overflow-wrap:anywhere}#shop-reward{color:#e6d17e}#feedback-list .player-card p{white-space:pre-wrap;overflow-wrap:anywhere}
/* A room workbench: controls, world and inventory each have their own space. */
#game-shell{scroll-margin-top:8px}#game-shell>.play-toolbar{position:static;display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 8px;padding:8px;background:#151824;border:1px solid #514461;border-radius:12px}#game-shell>.play-toolbar #status{display:none}#game-shell>.play-toolbar button{font-size:14px;padding:7px 10px;min-height:44px}#game-shell>.play-toolbar #wrench-toggle{margin-right:auto}#game-shell.at-home{display:grid;grid-template-rows:auto minmax(190px,1fr) auto;height:min(850px,calc(100dvh - 24px));gap:6px}#game-shell.at-home>.viewport{height:100%;min-height:0;aspect-ratio:auto;margin:0}#game-shell.at-home canvas#world{width:100%;height:100%;display:block}body.home-view .game-layout{display:block}body.home-view .play-column{max-width:1000px;margin:auto}body.home-view .journal{display:none}#game-shell.at-home>.play-toolbar{margin:0;max-width:none}#game-shell.at-home #hints-toggle{display:none}
#game-shell>#decoration-shelf{position:static;width:100%;max-width:none;max-height:none;padding:8px 10px;margin:0;background:#151824;border:1px solid #514461;border-radius:12px;overflow:hidden}#game-shell .shelf-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}#game-shell .shelf-heading h2{font-size:14px;margin:0}#game-shell #inventory{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;max-height:94px;overscroll-behavior:contain;touch-action:pan-x;padding:4px 0;margin:0}#game-shell #inventory button{flex:0 0 145px;font-size:13px;min-height:68px;padding:7px;text-align:left}#game-shell #inventory small{display:block;font-size:12px}#game-shell #inventory canvas{width:38px;height:38px;float:left;margin-right:6px}#game-shell #placement-tools{position:static;max-width:none;width:auto;padding:5px 0;background:none;border:0;display:flex;flex-wrap:wrap;gap:5px}#game-shell #placement-tools[hidden]{display:none}#game-shell #placement-tools button{font-size:13px;min-height:40px;padding:5px 10px}#game-shell #placement-feedback{font-size:13px}#game-shell #placement-hint{position:static;margin:3px 0;max-width:none;font-size:13px;padding:0;background:none}#game-shell #placement-hint-dismiss{display:none}#game-shell .viewport #world-hint{display:none}#game-shell .touch-controls{pointer-events:none}#game-shell .touch-controls>*{pointer-events:auto}
#hearts{display:flex;gap:3px;white-space:nowrap}.health-heart{display:inline-block;color:transparent;background:linear-gradient(to right,#ffe631 0 var(--fill),#555361 var(--fill) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-stroke:.3px #c6a858;font-size:18px;line-height:1.2}
@media(max-width:620px){#game-shell>.play-toolbar{gap:4px;padding:5px}#game-shell>.play-toolbar button{font-size:12px;padding:5px 7px}#game-shell #inventory button{flex-basis:126px}#game-shell.at-home{height:calc(100dvh - 16px)}#game-shell #placement-name{font-size:13px}#game-shell #placement-feedback{flex-basis:100%}#game-shell #decoration-shelf{padding:6px}.health-heart{font-size:15px}}
#game-shell #inventory button{display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto;align-content:center;gap:2px 7px}#game-shell #inventory button canvas{grid-row:1/3;grid-column:1;float:none;margin:0;align-self:center}#game-shell #inventory button span,#game-shell #inventory button small{grid-column:2;white-space:normal;overflow-wrap:normal;line-height:1.2}
#game-shell.at-home{grid-template-rows:auto minmax(190px,1fr) auto auto}.game-save-strip{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12px}.game-save-strip .save-note{margin:0;font-size:12px}.game-save-strip button{min-height:36px;font-size:12px;padding:4px 8px}#game-shell.at-home #decoration-shelf[hidden]{display:none}
#game-shell.at-home{height:auto;grid-template-rows:auto auto auto auto}#game-shell.at-home>.viewport{height:min(calc((100vw - 24px)*.75),calc(100dvh - 250px));min-height:150px;max-height:620px;aspect-ratio:auto}#game-shell #inventory button{min-width:126px}#game-shell #placement-tools{max-height:110px;overflow-y:auto}

#game-shell.at-home>.viewport.decorating{height:min(calc((100vw - 24px)*.75),calc(100dvh - 350px))}
/* Equal room dimensions; home inventory overlays rather than compresses the world. */
.game-layout,body.home-view .game-layout{display:block}.play-column,body.home-view .play-column{max-width:1000px;margin:auto}.journal{max-width:1000px;margin:24px auto 0;border:0;display:grid;grid-template-columns:1fr 1fr;gap:20px}body.home-view .journal{display:none}
#game-shell,#game-shell.at-home{display:block;height:auto}#game-shell>.viewport,#game-shell.at-home>.viewport,#game-shell.at-home>.viewport.decorating{width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:4/3;margin-top:8px}
#game-shell .viewport>#decoration-shelf{position:absolute;bottom:8px;left:8px;right:8px;width:auto;max-height:46%;overflow:auto;z-index:7;padding:8px;background:#151824f5;border:1px solid #736382;border-radius:10px;touch-action:pan-y}
#game-shell .viewport>#decoration-shelf[hidden]{display:none!important}#game-shell .shelf-heading{flex-wrap:wrap}#inventory-close{order:5;margin-left:auto;padding:0;width:36px;min-height:36px}#trophy-view{font-size:12px;padding:4px 8px;min-height:36px}#game-shell #placement-tools{max-height:none}#game-shell .viewport.decorating .touch-controls{display:none}#sound-toggle,#owner-copy-link{font-size:13px}#trophy-dialog{max-width:620px}#trophy-earned{font-size:13px;color:#b3a3c2}
@media(max-width:620px){.masthead{flex-wrap:wrap;gap:8px}.journal{display:block}#game-shell>.viewport,#game-shell.at-home>.viewport,#game-shell.at-home>.viewport.decorating{aspect-ratio:3/4;height:auto}#game-shell .viewport>#decoration-shelf{max-height:42%;bottom:6px;left:6px;right:6px}#game-shell>.play-toolbar button{flex:0 1 auto}#game-shell #inventory button{min-height:64px}#game-shell .shelf-heading h2{font-size:13px}}
#game-shell>.play-toolbar>#placement-tools{flex:1 0 100%;display:flex;align-items:center;gap:6px;padding:6px 0 0;border-top:1px solid #50425d}#game-shell>.play-toolbar>#placement-tools[hidden]{display:none}#game-shell>.play-toolbar #placement-name{width:auto;flex:1}#game-shell>.play-toolbar #placement-feedback{width:auto;flex-basis:auto}#game-shell>.play-toolbar #placement-tools button{min-height:36px;padding:4px 8px}
/* Override old HUD label rules: fractional hearts are visible, uncoloured glyph masks. */
#danger-hud #hearts>.health-heart{display:inline-block;color:transparent;-webkit-text-fill-color:transparent;text-shadow:none;font-size:18px;letter-spacing:0;font-weight:800;background:linear-gradient(to right,#ffe631 0 var(--fill),#555361 var(--fill) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-stroke:.3px #c6a858}
@media(max-width:620px){#danger-hud #hearts>.health-heart{font-size:16px}}
.viewport.shop-combat #boss-bar{top:54px;left:16px;right:16px;padding:5px 9px;background:#141722bd}.viewport.shop-combat #boss-name{font-size:13px}.viewport.shop-combat #boss-health{height:6px}

#storage-dialog{max-width:620px}#storage-items section{border:1px solid #494455;border-radius:10px;padding:12px;display:grid;gap:8px}#storage-items h3{margin:0 0 4px;font-size:16px;color:#e9d66a}.storage-row{display:flex;align-items:center;gap:10px;padding:10px;font-size:14px;line-height:1.4}.storage-row canvas{width:48px;height:48px;flex-shrink:0;image-rendering:pixelated}.storage-row span{overflow-wrap:anywhere}

#storage-dialog{width:min(720px,calc(100vw - 32px));max-width:720px;box-sizing:border-box}#storage-items{max-height:58dvh;overflow:auto;padding-right:5px;overscroll-behavior:contain}#storage-items section{display:block;border:0;padding:0 0 14px;margin:0 0 8px;border-bottom:1px solid #393346}#storage-items h3{margin:0 0 12px}.storage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.storage-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:6px;min-width:0;padding:12px 8px;background:#171a25;border:1px solid #42404f;border-radius:12px;text-align:center!important;color:#f2edf8}.storage-tile canvas{width:64px;height:64px;image-rendering:pixelated;object-fit:contain;margin:4px auto}.storage-tile strong{font-size:14px;line-height:1.3;font-weight:600;overflow-wrap:anywhere}.storage-tile small{font-size:13px;color:#bbb2ca;line-height:1.3}.storage-count{position:absolute;right:7px;top:6px;padding:3px 7px;border:1px solid #756832;border-radius:7px;background:#292619;color:#ffe631;font-size:14px;font-weight:700}.storage-action{margin-top:auto;padding:6px 0 0;color:#8ce6d9;font-size:14px;font-weight:600}.storage-tile:focus-visible{outline:2px solid #ffe631;outline-offset:2px}button.storage-tile:hover{border-color:#8ce6d9;background:#202832}@media(max-width:520px){.storage-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#storage-dialog{padding:18px}#storage-items{max-height:55dvh}.storage-tile{padding:10px 6px}}

/* Room changes never reflow or scroll the play surface. */
html{scrollbar-gutter:stable}#game-shell{overflow-anchor:none}#game-shell>.play-toolbar{height:66px;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;white-space:nowrap}#game-shell>.play-toolbar button{flex:0 0 auto}#game-shell>.play-toolbar>#placement-tools{position:absolute;z-index:9;top:74px;left:8px;right:8px;padding:8px;background:#171b27ed;border:1px solid #716187;border-radius:9px;white-space:normal}#game-shell{position:relative}.location-bar{height:76px}.location-bar h2{font-size:clamp(17px,2.3vw,24px)}#keeper-call{height:72px;overflow:auto}#keeper-call[hidden]{display:block!important;visibility:hidden}body.home-view .journal{display:grid}#district-note{min-height:46px}#district-note[hidden]{display:block!important;visibility:hidden}@media(max-width:620px){body.home-view .journal{display:block}.location-bar{height:80px}#game-shell>.play-toolbar{height:62px}#game-shell>.play-toolbar>#placement-tools{top:70px}}

#event-meter{display:block;width:100%;height:18px;accent-color:#c59aff;margin:12px 0}.event-milestone{display:flex;flex-direction:column;gap:4px;padding:14px;border:1px solid #655379;border-radius:10px;margin:8px 0}.event-milestone strong{color:#d5b6ff}#shop-community{border-top:1px solid #665476;margin:18px 0;padding-top:12px}#shop-community button{margin:8px 6px 0 0}
/* The keeper's counter: dark metal, brass labels and luminous item previews. */
#shop-dialog,#craft-dialog{width:min(860px,calc(100vw - 24px));max-width:860px;border-color:#907348;background:radial-gradient(ellipse at 100% 0,#40214b66,transparent 60%),#141923;box-shadow:0 24px 90px #000a}
#shop-dialog .keeper-heading{min-height:116px;padding:18px;border:1px solid #856a4666;border-radius:12px;background:linear-gradient(90deg,#111720f5 15%,#11172055),url('/first-night/shop.png') center 32%/cover}#shop-dialog h2{font-size:30px;color:#ffe58a}.keeper-heading p{font-size:14px;color:#d7c9b3;margin-top:6px}.keeper-heading>button{align-self:flex-start;background:#141923e8}.keeper-counter{display:grid;grid-template-columns:1fr 1fr;gap:14px}.keeper-counter>section,.keeper-craft-card{margin:0!important;border:1px solid #514c61;border-radius:12px;padding:18px;background:#202331}.keeper-counter h3{margin:7px 0 10px;font-size:18px}.keeper-counter p{font-size:14px;line-height:1.6;margin:8px 0;color:#d0c9db}.keeper-counter small{display:block;margin-top:12px;color:#ada7ba;font-size:13px}.keeper-counter button:not(.keeper-craft-card){font-size:14px}.keeper-craft-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;text-align:left;background:radial-gradient(ellipse at top right,#7c42834d,transparent 70%),#242333;border-color:#b79954}.keeper-craft-card strong{font-size:23px;line-height:1.2;color:#ffe58a}.keeper-craft-card>span:not(.eyebrow){font-size:14px;color:#d8cbe3}.keeper-craft-card b{margin-top:auto;font-size:14px;color:#8debd9}.keeper-counter>.keeper-errand{border-color:#47786e}.keeper-counter>#shop-community{border-color:#9268aa}#shop-dialog .eyebrow{color:#d6b67a}
#craft-dialog[open]{display:flex;flex-direction:column;max-height:90dvh;overflow:hidden;padding:22px}#craft-dialog>.dialog-heading{flex:0 0 auto;margin-bottom:6px}#craft-dialog h2{font-size:26px;color:#ffe58a}#craft-dialog>.craft-intro{margin:0 0 14px;font-size:14px;color:#bcb3cb}#craft-wallet{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;flex-shrink:0}.craft-balance{display:flex;align-items:baseline;justify-content:center;gap:8px;border:1px solid #545367;border-radius:9px;padding:10px 7px;background:#1d2130}.craft-balance strong{font-size:21px}.craft-balance span{font-size:14px}.craft-balance.shard{color:#d3aeff;border-color:#796190}.craft-balance.scrap{color:#8ce5d6;border-color:#497a76}.craft-balance.ember{color:#ffc08b;border-color:#866246}.craft-filters{display:flex;gap:8px;margin:12px 0;flex-shrink:0}.craft-filters button{font-size:14px;flex:1}.craft-filters [aria-pressed=true]{background:#3d324d;border-color:#c5a0e6;color:#f0dcff}.craft-catalog{overflow:auto;overscroll-behavior:contain;min-height:0;padding-right:5px;scrollbar-gutter:stable}#recipes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}#recipes>.workshop-recipe{display:grid;grid-template-columns:84px minmax(0,1fr);gap:12px;align-items:center;padding:15px;background:#1c2130;border:1px solid #51445e;border-radius:12px;min-width:0}#recipes>.workshop-recipe.is-ready{border-color:#628f86;box-shadow:inset 0 2px #83d7c044}.recipe-art{width:84px;height:90px;display:grid;place-items:center;border-radius:10px;background:radial-gradient(ellipse,#72509c66,transparent 72%),#131824;border:1px solid #41374e}#recipes .recipe-art canvas{width:80px;height:80px;image-rendering:pixelated}#recipes .recipe-heading h3{font-size:17px;line-height:1.3;margin:0 0 7px}#recipes .recipe-owned{font-size:13px;color:#c8bad8;margin:0;line-height:1.5}#recipes .craft-costs,#recipes .recipe-state,#recipes .workshop-recipe>button{grid-column:1/-1}.craft-costs{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}.craft-costs th{text-align:left;color:#aaa5ba;font-weight:400;font-size:13px;padding:5px 0}.craft-costs td{padding:6px 0;border-top:1px solid #ffffff12}.craft-costs td:not(:first-child),.craft-costs th:not(:first-child){text-align:right}.craft-costs .cost-ready td:nth-child(2){color:#8de5cb}.craft-costs .cost-short td:nth-child(2){color:#ffb28e}#recipes .recipe-state{font-size:14px;color:#c9c2d6;min-height:42px;margin:0;line-height:1.45}#recipes .is-ready .recipe-state{color:#8de5cb}.recipe-state small{font-size:12px;color:#b0a3c0}#recipes .workshop-recipe>button{min-height:44px;font-size:14px}#recipes .workshop-recipe>button.primary{background:#8de5cb;color:#132a25;border-color:#b9fff0}.craft-empty{grid-column:1/-1;padding:24px;font-size:15px;border:1px dashed #71627f;border-radius:10px;color:#c4bcd0}.workbench-upgrades{margin:18px 0;border:1px solid #64516d;border-radius:10px;padding:12px}.workbench-upgrades summary{cursor:pointer;font-size:15px;color:#e1c698;min-height:32px}.workbench-upgrades #upgrades{margin-top:12px}.workbench-upgrades .upgrade-card{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}.workbench-upgrades .upgrade-card h3{margin:0;font-size:17px}.workbench-upgrades .upgrade-card p{font-size:14px;color:#bdb3cd}.craft-limits{font-size:13px;color:#aaa3b8;line-height:1.5;margin-bottom:6px}#craft-dialog>#craft-message{flex-shrink:0;min-height:24px;margin:10px 0 0;font-size:14px;color:#a1efd7}
@media(max-width:600px){.keeper-counter{grid-template-columns:1fr}#shop-dialog .keeper-heading{padding:14px}#shop-dialog h2{font-size:26px}#craft-dialog[open]{padding:16px;max-height:92dvh}#craft-dialog h2{font-size:22px}#recipes{grid-template-columns:1fr}.craft-balance{padding:8px 4px;gap:5px}.craft-balance strong{font-size:19px}.craft-balance span{font-size:13px}#recipes>.workshop-recipe{padding:13px}.craft-filters button{padding:8px;font-size:13px}#craft-dialog>.craft-intro{margin-bottom:10px}#craft-wallet{gap:5px}}

/* Character equipment and pre-expansion activities */
#character-dialog{width:min(740px,94vw)}.character-layout{display:grid;grid-template-columns:1fr 1fr;gap:24px}.character-portrait{display:flex;flex-direction:column;align-items:center;background:radial-gradient(ellipse at center,#31324b,#101322);border:1px solid #65768b;border-radius:16px;padding:16px}.character-portrait canvas{width:100%;max-width:280px;height:auto;image-rendering:pixelated}.character-portrait progress{width:100%;margin-top:12px;accent-color:#ffe631}.equipment-slots{display:grid;gap:8px;align-content:start}.equipment-slots label{color:#ffe631;font-weight:700;margin-top:8px}.equipment-slots select,.equipment-slots button{width:100%;min-height:48px;white-space:normal;font-size:1rem;text-align:left}.equipment-slots p{margin:0;padding:12px;border:1px dashed #65768b;border-radius:8px;color:#acb7c9}#character-inventory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;list-style:none;padding:0}#character-inventory li{padding:12px;background:#1c2537;border-radius:8px}#training-progress{position:absolute;top:12px;left:50%;transform:translateX(-50%);max-width:65%;padding:8px 12px;background:#101b13ed;border:1px solid #a9ff49;border-radius:8px;color:#d3ffa7;font-size:14px;font-weight:bold;text-align:center;pointer-events:none}#game-shell{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#character-dialog select{color:#fff;background:#1c2537;padding:10px;border:1px solid #65768b;border-radius:8px}@media(max-width:540px){.character-layout{grid-template-columns:1fr;gap:16px}.character-portrait canvas{max-width:180px}.equipment-slots{grid-template-columns:1fr}.character-portrait{padding:8px}#training-progress{top:54px;font-size:14px;max-width:85%}}

/* In-world player HUD */
#player-hud{position:absolute;right:10px;top:10px;z-index:4;display:flex;gap:6px;padding:5px;background:#0b101be8;border:1px solid #667084;border-radius:12px;box-shadow:0 4px 16px #0008;touch-action:manipulation}#player-hud button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:58px;min-height:56px;padding:5px 8px;background:#1a2332;border:1px solid #596579;border-bottom:3px solid #394355;border-radius:7px;color:#fff3b0}#player-hud button:hover,#player-hud button:focus-visible{border-color:#ffe631;background:#2d3440}#player-hud button:active{transform:translateY(1px)}#player-hud svg{width:23px;height:23px;fill:none;stroke:#ffe631;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#player-hud span{font-size:12px;font-weight:700;line-height:1.2}#load-cover{z-index:10}#hud-menu-content .play-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 0}#hud-menu-content #status{display:none}#hud-menu-content button{min-height:48px;font-size:14px}#game-shell.at-home{grid-template-rows:minmax(190px,1fr) auto}#game-shell .viewport #placement-tools{position:absolute;left:8px;right:8px;bottom:12px;background:#111825ee;padding:10px;border:1px solid #65768b;border-radius:10px;z-index:5}#game-shell .viewport #danger-hud{top:70px;left:10px;right:auto;max-width:190px;padding:6px 9px;background:#101722df}#game-shell .viewport #boss-bar{top:126px;left:10px;right:10px;max-width:none}#game-shell .viewport #training-progress{top:84px;right:10px;left:auto;transform:none;max-width:calc(100% - 205px);font-size:13px}#game-shell .viewport #room-progress{top:84px;right:10px;left:auto;max-width:110px}#game-shell .viewport #toast{top:174px;z-index:3}#game-shell .viewport #tutorial-card{top:174px}#game-shell .viewport #pause{top:10px;left:10px;width:48px;height:48px}#character-dialog .dialog-heading h2{font-size:22px}@media(max-width:480px){#player-hud{right:7px;top:7px;gap:4px;padding:4px}#player-hud button{min-width:52px;min-height:52px;padding:4px 6px}#game-shell .viewport #danger-hud{max-width:165px}#game-shell .viewport #training-progress{max-width:calc(100% - 182px);font-size:12px}}
#game-shell .viewport #danger-hud:not([hidden]){display:flex;flex-direction:row;align-items:center;gap:5px;min-height:36px}#game-shell .viewport #danger-hud>span,#game-shell .viewport #health-meter{display:none}#game-shell .viewport #hearts{white-space:nowrap;letter-spacing:0}#game-shell .viewport #danger-hud[hidden]{display:none}

#game-shell .viewport #player-hud #chapters-open{display:flex;flex-direction:column;align-items:center;justify-content:center;width:66px;height:58px;min-height:58px;min-width:66px;padding:5px 8px;flex:none}#game-shell .viewport #player-hud #chapters-open svg{display:block;width:23px;height:23px;min-width:23px;flex:none}#secondary-attack{pointer-events:auto;margin-left:auto;margin-right:8px;min-width:100px;min-height:62px;border:2px solid #ffe631;border-radius:14px;background:linear-gradient(to top,#4e4623 var(--cooldown,100%),#131b2b var(--cooldown,100%));box-shadow:0 4px 15px #0009;color:#fff4b5;padding:8px 12px}#secondary-attack strong,#secondary-attack small{display:block}#secondary-attack strong{font-size:14px}#secondary-attack small{font-size:12px;margin-top:3px}#secondary-attack:disabled{opacity:.65}#secondary-attack:active{transform:translateY(2px)}.viewport.decorating #secondary-attack{display:none}@media(max-width:480px){#game-shell .viewport #player-hud #chapters-open{width:58px;min-width:58px;height:54px;min-height:54px}#secondary-attack{min-width:92px;padding:7px;margin-right:4px}}

#game-shell #player-hud #build-mode[hidden]{display:none}#player-hud #build-mode[aria-pressed=true]{background:#514719;border-color:#ffe631}#collected-gear{display:grid;gap:10px;margin:12px 0}#collected-gear>div{padding:12px;background:#202b37;border:1px solid #6a7854;border-radius:8px}#collected-gear strong{color:#ffe631}#collected-gear p{margin:6px 0 10px;font-size:14px}#bounty-meter{width:100%;accent-color:#a9ff49;margin:10px 0}#game-shell .viewport.decorating #player-hud #chapters-open{display:flex}@media(max-width:480px){#player-hud{gap:3px;padding:3px}#player-hud button{min-width:48px;padding:4px}#player-hud span{font-size:12px}#game-shell .viewport #player-hud #chapters-open{min-width:52px;width:52px}}

/* Toasts must size to their text, never stretch between opposing anchors. */
#game-shell .viewport #toast{top:174px;bottom:auto;height:auto;min-height:0;max-height:100px;overflow:hidden;max-width:min(420px,calc(100% - 32px));padding:8px 12px;font-size:14px;line-height:1.4;text-align:center}#secondary-attack{min-width:114px}#secondary-attack:not(:disabled){box-shadow:0 0 0 2px #ffe63133,0 4px 15px #0009}#secondary-attack small{font-variant-numeric:tabular-nums}@media(max-width:480px){#secondary-attack{min-width:100px}#secondary-attack small{font-size:12px}}

/* Decoration overlays have one bottom anchor; never stretch between top and bottom. */
#game-shell .viewport > #decoration-shelf{top:auto;bottom:8px;left:8px;right:8px;width:auto;height:auto;min-height:0;max-width:none;max-height:38%;margin:0;padding:8px;overflow:auto}
#game-shell .viewport #decoration-shelf .shelf-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#game-shell .viewport #decoration-shelf h2{font-size:14px}
#game-shell .viewport #inventory{display:flex;flex-wrap:nowrap;gap:8px;max-height:84px;overflow-x:auto;overflow-y:hidden;touch-action:pan-x}
#game-shell .viewport #inventory button{display:block;flex:0 0 140px;width:140px;min-width:140px;min-height:64px;padding:7px;font-size:12px}
#game-shell .viewport > #placement-tools{top:auto;bottom:8px;left:8px;right:8px;width:auto;height:auto;min-height:0;max-width:none;max-height:30%;margin:0;padding:8px;overflow:auto;align-items:center;gap:6px}
#game-shell .viewport #placement-name{width:auto;flex:1 1 120px;font-size:13px}
#game-shell .viewport #placement-feedback{flex:1 1 160px;font-size:12px}
#game-shell .viewport #placement-tools button{min-height:44px;padding:6px 10px;font-size:12px}
#game-shell .viewport #placement-hint{position:static;inset:auto;max-width:none;margin:4px 0 0;padding:0;background:none;font-size:12px;line-height:1.3;flex:1 0 100%;pointer-events:none}
#game-shell .viewport #placement-hint-dismiss{display:none}

#game-shell .viewport #secondary-attack{min-width:82px;min-height:48px;padding:6px 10px;margin-right:6px;border:1px solid #9b915b;border-radius:9px;background:linear-gradient(to top,#544b29 var(--cooldown,100%),#151c2be8 var(--cooldown,100%));box-shadow:0 3px 9px #0006;color:#f4e9b7}
#game-shell .viewport #secondary-attack strong{font-size:12px;font-weight:600}#game-shell .viewport #secondary-attack small{font-size:11px;margin-top:2px}#game-shell .viewport.at-home #secondary-attack{display:none}
#story-dialog.legend-return{border:2px solid #e7c54c;max-width:520px;text-align:center;padding:32px 24px;background:radial-gradient(ellipse at top,#493032,#151923 65%);box-shadow:0 0 70px #d1a93433}
#story-dialog.legend-return #story-kicker{color:#ffa6a0;letter-spacing:.12em}#story-dialog.legend-return #story-title{color:#ffe631;font-size:clamp(26px,5vw,38px);line-height:1.1;margin:18px 0}#story-dialog.legend-return #story-copy{font-size:16px;line-height:1.6}#story-dialog.legend-return #story-continue{width:100%;margin-top:18px;min-height:50px;font-weight:700}

#player-identity{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin:0 0 8px;border:1px solid #3d7065;border-radius:10px;background:#12221f;color:#b5f5d8}#player-identity>div{min-width:0}#identity-name{display:block;font-size:14px;overflow-wrap:anywhere}#identity-warning{display:block;color:#efd5ab;font-size:13px;line-height:1.4}#identity-warning:empty{display:none}#player-identity.guest{background:#292217;border-color:#a7883f;color:#ffe631}#identity-action{flex-shrink:0;font-size:13px;min-height:44px;padding:6px 10px}#combat-buttons{display:flex;align-items:flex-end;gap:6px;margin-left:auto;pointer-events:none}#game-shell .viewport #combat-buttons #secondary-attack,#game-shell .viewport #combat-buttons #dash{margin:0;pointer-events:auto}#game-shell .viewport .touch-controls #interact{margin-left:8px}#game-shell .viewport #combat-buttons #dash{min-height:48px;border-radius:9px;padding:6px 10px}@media(max-width:480px){#player-identity{gap:8px;padding:8px}#identity-action{max-width:100px;white-space:normal}#combat-buttons{gap:4px}}

/* Content-sized notices keep the room, rather than banners, in focus. */
#game-status-ribbon{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin:0 0 10px}
#game-status-ribbon #keeper-call{flex:0 1 auto;width:fit-content;max-width:min(100%,560px);height:auto;min-height:0;max-height:none;overflow:visible;margin:0;padding:8px 12px;border:1px solid #655835;border-left:3px solid #d8bd48;border-radius:3px 9px 9px 3px;background:#211f1bd9;font-size:14px;line-height:1.45}
#game-status-ribbon #keeper-call[hidden]{display:none!important}
#game-status-ribbon #player-identity{flex:0 1 auto;width:fit-content;max-width:100%;margin:0 0 0 auto;gap:12px;padding:4px 5px 4px 12px;border-color:#365047;border-radius:12px;background:#121c1ad9}
#game-status-ribbon #player-identity.guest{max-width:min(100%,450px);border-color:#766337;background:#242015}
#game-status-ribbon #identity-name{font-size:14px;font-weight:600}
#game-status-ribbon #identity-warning{max-width:300px;font-size:13px}
#game-status-ribbon #identity-action{background:#202c29;border-color:#3b5148;border-radius:8px;min-height:40px;padding:6px 10px}
@media(max-width:620px){#game-status-ribbon{gap:8px}#game-status-ribbon #keeper-call{max-width:100%}#game-status-ribbon #player-identity{margin-left:0}#game-status-ribbon #identity-action{min-height:44px}}

#pinned-quest{display:block;width:fit-content;max-width:100%;min-height:40px;margin:8px 0;padding:7px 12px;text-align:left;color:#e9db96;background:#1c211e;border:1px solid #4b5545;border-radius:8px;font-size:14px;line-height:1.4}#loot-summary{width:fit-content;max-width:100%;margin:6px 0;padding:6px 10px;border-radius:8px;border:1px solid #49635a;background:#17241f;color:#b9f4ce;font-size:14px}.quest-picker{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:15px 0}.quest-picker select{max-width:100%;padding:10px;background:#202737;color:#fff;border:1px solid #647185;border-radius:8px;font-size:16px}#decoration-undo{font-size:12px;min-height:40px;padding:5px 8px}#character-inventory{list-style:none;padding:0;display:grid;gap:10px}#character-inventory li{min-height:44px;padding:8px;background:#202634;border-radius:8px;overflow:hidden}#character-inventory canvas{width:64px;height:64px;float:left;margin-right:10px}#character-inventory strong{display:block;font-size:14px}#character-inventory small{display:block;font-size:13px;color:#c1c7d1;line-height:1.5}#collected-gear>div{display:flow-root;padding:10px 0;border-bottom:1px solid #3c4654}#collected-gear p{font-size:14px;line-height:1.5;color:#c1c7d1;margin:5px 0 10px}

/* Boss health shares the top row with pause and inventory. */
#game-shell .viewport #boss-bar{top:10px;left:66px;right:calc(var(--player-hud-width, 205px) + 20px);min-width:0;max-width:none;min-height:48px;padding:5px 7px;z-index:4;display:flex;flex-direction:column;justify-content:center}
#game-shell .viewport #boss-bar[hidden]{display:none}
#game-shell .viewport #boss-name{font-size:12px;line-height:1.15;overflow-wrap:anywhere}
#game-shell .viewport #boss-health{height:7px;margin-top:4px}
@media(max-width:480px){#game-shell .viewport #boss-bar{left:64px;right:calc(var(--player-hud-width, 180px) + 14px);top:7px;min-height:56px;padding:4px}}

/* Keep encounter guidance readable without covering the game or touch controls. */
.district-guidance{font-size:14px;line-height:1.5;color:#e3d8ee;margin:10px 0 4px;padding:10px 12px;background:#1b1928;border-left:3px solid #be98ff;border-radius:6px;overflow-wrap:anywhere}.district-guidance[hidden]{display:none!important}

/* Compact release notices and a descriptive guide button. */
.beta-banner{width:fit-content;max-width:100%;margin-bottom:10px;padding:9px 14px;border-color:#69547c;background:#211b2ccc;border-radius:10px;overflow-wrap:anywhere}
.gate-banner{width:fit-content;max-width:min(100%,680px);padding:10px 14px;gap:10px 20px;flex-wrap:wrap;margin-bottom:12px;border-color:#69547c;background:#211b2ccc;border-radius:10px}
.gate-banner #gate-countdown{font-size:18px}
.masthead #help{width:auto;border-radius:9px;padding:8px 12px;min-height:44px;white-space:nowrap;font-size:14px}
@media(max-width:620px){.gate-banner{max-width:100%}.gate-banner button{max-width:100%;min-height:44px}.masthead #help{width:auto;min-height:44px;padding:8px 10px}}

.identity-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-left:auto;max-width:100%}#game-status-ribbon .identity-controls #player-identity{margin-left:0;flex:1 1 auto}#event-open{flex:0 0 auto;min-height:44px;padding:8px 12px;border-color:#806594;background:#272033;color:#e7d7f8;font-size:14px}.raid-repeat{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:12px 0;padding:14px;border:1px solid #85702f;border-radius:12px;background:#252117}.raid-repeat[hidden]{display:none!important}.raid-repeat h3{color:#ffe631;margin:0 0 6px}.raid-repeat p{font-size:14px;max-width:65ch}.raid-repeat small{color:#c5ba99}.raid-repeat button{min-height:44px}@media(max-width:620px){.identity-controls{justify-content:flex-start;margin-left:0;width:100%}.raid-repeat button{width:100%}}

.event-cosmetic-preview{width:160px;max-width:100%;height:100px;object-fit:contain;image-rendering:pixelated;align-self:center}.event-milestone small{color:#c2b6d4;line-height:1.5}

/* Mobile playfield only: suppress pinch/double-tap, callouts and text/image dragging.
   Keep page zoom and form editing available outside the game. */
#viewport{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#viewport *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#viewport img,#viewport canvas{-webkit-user-drag:none}
#viewport input,#viewport textarea,#viewport select,#viewport [contenteditable="true"],#viewport [contenteditable=""]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#viewport #player-hud,#viewport #player-hud button,#viewport #pause,#viewport #combat-buttons,#viewport #combat-buttons button,#viewport #interact{touch-action:none}
