/* 0.10.49: white/sage menus and capsule controls. Original home geometry stays intact. */
:root{--game-ink:#344d40;--game-paper:#fcfdfb;--game-paper-low:#f0f4ee;--game-edge:#d5ded3;--game-muted:#66756b;--game-green:#52745d}
/* Restore the light home; no new frame or decorative strip around its HUD. */
#app>.topbar,#app>.care-status,#speech.speech{background:#f8faf7}
.topbar .currency{background:#edf2e9;border:1px solid #e0e7dc;border-radius:999px;box-shadow:none}
.topbar .sand-currency{background:#edf3f0;border-color:#dce7df}
.topbar .settings-entry{background:#edf2ec;border:1px solid #dfe6dc;border-radius:999px;box-shadow:none}
.care-status .status-pill{background:#fff;border-color:#e2e8de;box-shadow:none;border-radius:999px}
#stage .friend-chip,#stage .round-tool{background:#ffffffeb;border:1px solid #e0e7dd;box-shadow:0 2px 5px #294c3c08;border-radius:20px}
#app>.bottom-nav{background:#f8faf7;border-top:1px solid #e0e7dc;box-shadow:none}
.bottom-nav button{border-radius:999px;background:transparent;box-shadow:none}
.bottom-nav button.selected{background:#e1ecdd;box-shadow:none}
.bottom-nav .nav-icon{background:transparent!important;border-radius:999px}
#stage :is(.feed-tray,.bath-bar,.action-bar){background:#fcfdfaf5;border-color:#dce5d8;box-shadow:0 5px 20px #3150400d}
#stage :is(.bath-bar,.action-bar) button{border-radius:999px}
/* One framed menu with a left back button, centered title and internal scrolling. */
#sheetBackdrop{align-items:center;justify-content:center;padding:calc(12px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));background:#263d343d;backdrop-filter:blur(3px)}
#sheetBackdrop>.sheet{width:100%;max-height:100%;min-height:0;border:1px solid #d9e1d6;border-radius:24px;background:var(--game-paper);padding-bottom:0;box-shadow:0 12px 38px #243e3522;overflow:hidden;animation:soft-panel-in .14s ease-out}
#sheetBackdrop .sheet-head{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;min-height:66px;padding:10px 14px;border-bottom:1px solid #e3e9df;background:#fcfdfb;box-shadow:none}
#sheetBackdrop .sheet-head>div{grid-column:2;grid-row:1;min-width:0;text-align:center}
#sheetBackdrop .sheet-head h2{font-size:20px;line-height:1.3;margin:0;color:#344d40;font-weight:750;letter-spacing:0;overflow-wrap:anywhere}
#sheetBackdrop #sheetEyebrow{display:none}
#sheetBackdrop .close-sheet{grid-column:1;grid-row:1;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;background:#edf3e9;color:#48644e;border:1px solid #e0e8db;border-radius:999px;box-shadow:none;font:inherit}
#sheetBackdrop .sheet-back svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#sheetBackdrop .sheet-content{min-height:0;padding:16px 16px 20px;scrollbar-width:thin;scrollbar-color:#c3d0bf transparent;scroll-padding:12px}
#sheetBackdrop :is(.button,.studio-button,.claim){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:10px 18px;border:1px solid #d2dfcc;border-radius:999px;box-shadow:none;background:#edf4e8;color:#435f43;text-align:center;font-size:14px;line-height:1.4;transition:background .12s,transform .1s}
#sheetBackdrop :is(.button.primary,.studio-button:not(.secondary),.claim:not(.done)):not(:disabled){background:#577b5b;border-color:#577b5b;color:#fff}
#sheetBackdrop :is(.button.ghost,.studio-button.secondary){background:#fff;border-color:#d8e3d3;color:#49664b}
#sheetBackdrop :is(.button,.studio-button,.claim):disabled{background:#eef1ed;border-color:#e1e6dd;color:#879180;box-shadow:none;opacity:1}
#sheetBackdrop button:active:not(:disabled){transform:scale(.98);filter:brightness(.97)}
#sheetBackdrop button:disabled{cursor:default}
#sheetBackdrop button:focus-visible,#sheetBackdrop summary:focus-visible{outline:3px solid #729c79;outline-offset:2px}
#sheetBackdrop :is(.journal-tabs,.wish-main-tabs,.studio-tabs,.wardrobe-filter,.arsenal-tabs){border:1px solid #e0e8dc;border-radius:999px;background:#f0f4ee;padding:4px;gap:4px}
#sheetBackdrop :is(.journal-tabs,.studio-tabs,.wardrobe-filter,.arsenal-tabs) button{min-height:44px;font-size:13px;border-radius:999px;color:#60715e;text-align:center}
#sheetBackdrop :is(.journal-tabs,.studio-tabs,.wardrobe-filter,.arsenal-tabs) :is(button.active,button[aria-selected=true],button[aria-pressed=true]){background:#dae9d5;color:#345239;box-shadow:none}
#sheetBackdrop :is(.list-card,.shop-card,.building-card,.journey-row,.book-card,.save-card){background:#fff;border:1px solid #e0e7dc;border-radius:18px;box-shadow:none}
#sheetBackdrop :is(.list-copy p,.shop-card p,.studio-caption,.studio-row p,.studio-item small,.memory p){color:#64745f}
#sheetBackdrop :is(.notice,.studio-note){background:#f0f5ec;border:1px solid #e1e8dd;border-radius:16px;font-size:12px;color:#61705b;line-height:1.65}
#sheetBackdrop .sheet-intro{font-size:13px;color:#667461}
#sheetBackdrop summary{cursor:pointer;touch-action:manipulation}
.game-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:3px 0 10px}
.game-section-title h3{font-size:15px;line-height:22px;margin:0;color:#435a44}
.game-section-title>span{font-size:11px;color:#74816d}
/* Existing illustrations sit above clean white labels, without colored overlays. */
.play-room .owned-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:19px}
.play-room .mode-entry.owned-mode{position:relative;display:flex;align-items:stretch;justify-content:flex-start;flex-direction:column;min-height:0;padding:0;gap:0;margin:0;border:1px solid #dce5d6;border-radius:20px;overflow:hidden;background:#fff;color:#344d40;text-align:left;isolation:isolate;box-shadow:none}
.play-room .owned-mode .mode-art{position:static;inset:auto;width:100%;height:auto;aspect-ratio:1/1;flex:none;border-radius:0;object-fit:cover;object-position:center;z-index:auto;filter:none}
.play-room .owned-mode:after,.play-room .owned-mode:before{display:none}
.play-room .owned-mode>.mode-kind{position:absolute;top:9px;left:8px;padding:4px 8px;margin:0;background:#ffffffed;border:1px solid #e4eadf;border-radius:999px;color:#526b4e;font-size:10px;font-weight:650;letter-spacing:0}
.play-room .mode-entry.owned-mode.adventure .mode-kind{color:#526b4e}
.play-room .owned-mode>div{padding:12px 10px 10px;display:flex;flex-direction:column;flex:1;align-items:stretch}
.play-room .mode-entry.owned-mode div>b{font-size:20px;line-height:1.25;color:#345039;letter-spacing:0;text-align:center}
.play-room .mode-entry.owned-mode small{font-size:11px;line-height:1.5;color:#6b7b61;margin-top:6px;white-space:normal;text-align:center}
.play-room .owned-mode .mode-start{display:flex;align-items:center;justify-content:center;gap:4px;min-height:40px;margin-top:12px;padding:8px 5px;border:1px solid #d9e6d2;border-radius:999px;background:#e8f1e2;color:#486543;font-size:12px;font-weight:750;text-align:center}
.play-room .owned-mode .mode-start i{display:none}
.play-room .play-cards{display:grid;grid-template-columns:1fr;gap:8px;margin:0}
.play-room .play-card{display:flex;align-items:center;gap:12px;min-height:68px;padding:9px 14px;background:#f0f5ec;border:1px solid #e0e9d9;border-radius:20px;text-align:left;box-shadow:none}
.play-room .play-card:nth-child(2){background:#f0f5f3;border-color:#e0e9e4}
.play-room .play-card:after{display:none}
.play-room .play-card .game-icon{width:38px;height:38px;flex:none}
.play-room .play-card h3{font-size:14px;margin:0 0 4px;color:#435c43}
.play-room .play-card p{font-size:11px;color:#708267;margin:0}
.play-room .play-card>i{margin-left:auto;font-style:normal;font-size:25px;color:#899b80}
.pet-play-tools{display:flex;gap:8px;margin:12px 0 16px}
.pet-play-tools>button{flex:1;min-width:0;background:#fff!important;color:#5b7353!important;border-color:#dfe8da!important;font-size:12px!important;padding:8px 4px!important}
.game-menu-details{border:1px solid #e0e7db;border-radius:18px;padding:0 12px;background:#f8faf6;margin:10px 0 0}
.game-menu-details>summary{min-height:44px;padding:12px 0;font-size:13px;font-weight:650;color:#56714e;line-height:20px}
.game-menu-details>summary>span{float:right;font-size:11px;color:#76866b;font-weight:400}
.game-menu-details>p{font-size:12px;line-height:1.75;margin:0 0 12px;color:#66795d}
.play-wish .wish-summary{margin:0 0 10px}
.play-room .more-games{border-top:1px solid #e0e7db;padding-top:0;margin-top:8px}
/* Keep the compact settings layout and explicit on/off labels from .48. */
.game-settings>section{margin:0 0 17px}
.game-settings .quality-options{gap:7px;margin:0;padding:4px;border:1px solid #e0e7da;border-radius:999px;background:#f0f4eb}
.game-settings .quality-options button{min-height:45px;padding:6px;background:transparent;color:#647858;font-size:14px;border-radius:999px;position:relative;text-align:center}
.game-settings .quality-options button.active{background:#597e58;color:#fff;box-shadow:none}
.game-settings .quality-options i{font-size:10px;vertical-align:top;margin-left:4px;font-style:normal}
.game-settings .setting-caption{font-size:11px;color:#708466;margin:8px 0 0;line-height:1.5}
.game-settings .settings-row{min-height:69px;padding:10px 0;border-bottom:1px solid #e6ebdf;gap:8px}
.game-settings .settings-row b{font-size:14px;color:#48613f}
.game-settings .settings-row p{font-size:11px;line-height:1.5;color:#6d8062;margin:4px 0 0}
.game-settings .toggle{width:62px;min-width:62px;height:44px;min-height:44px;border:1px solid #dce4d6;border-radius:999px;background:#e2e8dc;box-shadow:inset 0 1px 3px #3655320a}
.game-settings .toggle:after{width:30px;height:34px;top:4px;left:4px;border:1px solid #dce3d4;border-radius:999px;background:#fff;box-shadow:0 1px 3px #4564381a}
.game-settings .toggle.on{background:#88a977;border-color:#82a071}
.game-settings .toggle.on:after{left:26px}
.game-settings .toggle>span{position:absolute;font-size:11px;right:7px;top:12px;line-height:16px;color:#738369}
.game-settings .toggle.on>span{left:8px;right:auto;color:#fff;font-weight:750}
.game-settings .settings-links{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:17px 0}
.game-settings .settings-links>button{width:100%;justify-content:center;font-size:13px!important}
.game-settings .settings-links>button>span{display:none}
.game-settings .save-note{font-size:11px;line-height:18px;margin:15px 0 0;color:#7a8970}
/* Preserve the wardrobe's dedicated preview / scroll / fixed confirmation layout. */
#sheetBackdrop>.studio-panel.sheet{height:min(880px,100%);max-height:100%;background:var(--game-paper)}
#sheetBackdrop .studio-panel .sheet-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;padding:0}
#sheetBackdrop .studio-wallet{padding:9px 13px;gap:8px}
#sheetBackdrop .studio-wallet>span{border-radius:999px;background:#f1f6ec;border-color:#dfe8d7}
#sheetBackdrop .studio-tabs{margin-inline:13px}
#sheetBackdrop .studio-scroll{padding-inline:13px}
#sheetBackdrop .wardrobe-hero{border:1px solid #e0e7d9;border-radius:20px;background:#f6f9f2;box-shadow:none}
#sheetBackdrop .wardrobe-hero .studio-preview{background:#edf3e8;border-radius:16px}
#sheetBackdrop .wardrobe-summary h3{font-size:17px;color:#435e3d}
#sheetBackdrop .wardrobe-summary p{font-size:12px;color:#6a7e60}
#sheetBackdrop :is(.studio-item,.outfit-card,.studio-row){border-color:#e0e7d9;border-radius:16px;background:#fff;box-shadow:none}
#sheetBackdrop .studio-item.selected{outline-color:#91b17e!important;background:#edf5e6!important}
#sheetBackdrop .studio-item.equipped{border-color:#7fa570}
#sheetBackdrop .studio-item>svg{background:#f0f5e9;border-radius:12px}
#sheetBackdrop .wardrobe-footer{background:#fcfdf9;border-top:1px solid #e1e8d9;box-shadow:0 -4px 10px #3c573108}
#sheetBackdrop .journal-tabs{position:sticky;top:0;z-index:2}
#sheetBackdrop .memory{border-radius:16px;border:1px solid #e1e8da;box-shadow:0 2px 5px #3f59320a}
@keyframes soft-panel-in{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:360px){
 #sheetBackdrop{padding-inline:8px}
 #sheetBackdrop .sheet-content{padding-inline:12px}
 #sheetBackdrop .sheet-head{padding-inline:10px;gap:4px}
 #sheetBackdrop .sheet-head h2{font-size:18px}
 .play-room .owned-modes{gap:8px}
 .play-room .mode-entry.owned-mode div>b{font-size:18px}
 .play-room .owned-mode>div{padding-inline:8px}
 .play-room .mode-entry.owned-mode small{font-size:10px}
 .play-room .owned-mode .mode-start{font-size:11px}
}
@media(max-height:650px){
 #sheetBackdrop{padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
 #sheetBackdrop .sheet-head{padding-block:7px;min-height:58px}
 .play-room .owned-modes{margin-bottom:13px}
}
@media(orientation:landscape) and (max-height:560px){
 #app>.care-status{background:none}
 #app>.bottom-nav{height:100%;width:80px;padding:8px 8px calc(8px + var(--safe));gap:8px;border-top:0;border-left:1px solid #e0e7dc}
 #app>.bottom-nav button{min-height:44px;flex:1;gap:0}
 #stage .friend-chip{top:10px;left:14px}
 #stage .side-tools{top:8px;right:12px;gap:7px}
}
@media(prefers-reduced-motion:reduce){#sheetBackdrop>.sheet{animation:none}#sheetBackdrop button{transition:none}}
/* The common top-left arrow is the only page-level back affordance. */
#sheetBackdrop :is(.wish-back,.wish-destination-nav,.pve-back-start),
#sheetBackdrop .book-back [data-action="pvebook-back"],
#sheetBackdrop .author-contact [data-action="contact-back"],
#sheetBackdrop .author-qr-view [data-action="contact"],
#sheetBackdrop [data-action="save-settings"]{display:none}
#stage .feed-tray .tray-top{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:5px;min-height:44px}
#stage .feed-tray .tray-top>b{text-align:center;line-height:1.5}
#stage :is(#closeFeed,#quitGame){display:grid;place-items:center;min-width:44px;min-height:44px;width:44px;height:44px;margin:0;padding:0;border:1px solid #e0e8db;border-radius:999px;background:#f8fcf5;color:#4b6a49}
#stage :is(#closeFeed,#quitGame) svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
