/* Woodland surfaces are shared by every tab; scene art and its animations stay untouched. */
html[data-theme="light"] {
  color-scheme: light;
  --wood-bg: #fff3df; --wood-surface: #fff7e9; --wood-card: #fff4e3;
  --wood-ink: #303c25; --wood-muted: #6b7156; --wood-line: #dfcfac;
  --wood-green: #344c28; --wood-accent: #6e823c; --wood-shadow: #6a4d2826;
  --wood-wash: #f0dfbf; --wood-field: #fffaf0;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --wood-bg: #101e13; --wood-surface: #1d301d; --wood-card: #21351f;
  --wood-ink: #f5eed3; --wood-muted: #c8d2aa; --wood-line: #63734b;
  --wood-green: #a4b967; --wood-accent: #bed477; --wood-shadow: #010b0699;
  --wood-wash: #142416; --wood-field: #2a3e27;
}
html { background: var(--wood-bg); }
body { color: var(--wood-ink); font-family: 'DM Sans', system-ui, sans-serif; background: var(--wood-bg) url('woodland-corner.svg') left top / min(23vw,180px) auto no-repeat; }
html[data-theme="dark"] body { background-color: var(--wood-bg); }
body::after { content:''; position:fixed; right:0; top:0; width:min(23vw,180px); height:170px; background:url('woodland-corner.svg') top right / contain no-repeat; transform:scaleX(-1); transform-origin:center; opacity:.75; pointer-events:none; z-index:0; }
html[data-theme="dark"] body::after { opacity:.52; }
.app { position:relative; z-index:1; max-width:1000px; }
header { padding:10px 8px 5px; }
header .brand { font:600 clamp(26px,4.8vw,48px)/1.04 Fraunces, Georgia, serif; letter-spacing:-.035em; color:var(--wood-ink); }
header .brand span { color:#dc6b18!important; }
header .eyebrow { font-size:clamp(9px,1.4vw,13px); letter-spacing:.22em; color:var(--wood-ink); margin-bottom:6px; }
header .device-clock { color:var(--wood-ink); margin-top:8px; }
header .device-clock time,header .device-clock #liveDate { font-size:clamp(11px,1.8vw,16px); font-weight:500; }
.tools { align-items:center; gap:9px; }
.small,.tribute-shortcut { display:grid; place-items:center; border:1.5px solid var(--wood-line); color:var(--wood-ink); background:linear-gradient(150deg,var(--wood-surface),var(--wood-wash)); box-shadow:0 4px 9px var(--wood-shadow),inset 0 1px #ffffff33; }
.small { width:44px; height:44px; font-size:21px; }
.tribute-shortcut { display:flex; padding:10px 17px; min-height:44px; font-size:13px; border-radius:26px; }
.tribute-shortcut:hover,.tribute-shortcut[aria-pressed="true"] { color:var(--wood-ink); background:var(--wood-field); border-color:var(--wood-accent); }
html[data-theme="dark"] .small,html[data-theme="dark"] .tribute-shortcut { background:linear-gradient(#3a5128,#1a2d1b); border-color:#81975c; color:#fff4db; }
.game { display:flex; flex-direction:column; align-items:stretch; background:transparent; border:0; box-shadow:none; gap:11px; }
#world.world { position:relative; top:auto; align-self:stretch; width:100%; min-height:420px; height:clamp(420px,63svh,690px); }
#world.world { border:3px solid var(--wood-surface); border-radius:clamp(22px,5vw,46px); box-shadow:0 5px 12px var(--wood-shadow); }
.scene-bond,.world .floorlabel { background:linear-gradient(140deg,#547039e8,#1e371de8); border:1.5px solid #e0deab; border-radius:999px; color:#fff7de; box-shadow:0 4px 12px #09160d55; }
.environment-rail { background:color-mix(in srgb,var(--wood-surface) 91%,transparent); border:1.5px solid var(--wood-line); border-radius:24px; box-shadow:0 4px 14px #12231355; }
.environment-rail { left:14px; top:78px; width:76px; padding:6px; gap:3px; }
#world .environment-rail { left:14px; top:78px; bottom:auto; width:76px; height:auto; max-height:calc(100% - 96px); display:flex; flex-direction:column; gap:3px; padding:6px; transform:none; overflow-y:auto; background:color-mix(in srgb,var(--wood-surface) 91%,transparent); border:1.5px solid var(--wood-line); border-radius:24px; box-shadow:0 4px 14px #12231355; }
.environment-choice { background:transparent; color:var(--wood-ink); border:1px solid transparent; border-radius:17px; }
.environment-choice { min-height:53px; padding:5px 2px; font-size:11px; }
#world .environment-choice { min-height:53px; flex-shrink:0; padding:5px 2px; font-size:11px; line-height:1.1; border-radius:17px; }
.environment-icon svg { width:24px; height:24px; }
#world .environment-icon svg { width:24px; height:24px; }
.environment-choice:hover { background:var(--wood-field); }
.environment-choice.active,.environment-choice[aria-pressed="true"] { background:linear-gradient(150deg,#718750,#354a29); border-color:#f7e4a1; color:#fff8e1; box-shadow:0 3px 7px #17251266; }
#world .environment-choice[aria-pressed="true"] { background:linear-gradient(150deg,#718750,#354a29); border-color:#f7e4a1; color:#fff8e1; opacity:1; }
.panel { background:transparent; color:var(--wood-ink); padding:0 5px 18px; gap:12px; border-radius:0; }
.panel>.needs-bar { order:0; margin:0; padding:12px 7px; border:1.5px solid var(--wood-line); border-radius:26px; background:linear-gradient(150deg,var(--wood-surface),var(--wood-wash)); box-shadow:0 5px 12px var(--wood-shadow),inset 0 1px #ffffff80; }
.panel>.tabs { order:1; }
.panel>#achievementsPanel,.panel>#scrapbookPanel { order:3; }
.panel>.zoomies-alert,.panel>.potty-alert { order:2; }
.panel>#actions { order:3; }
.panel>#fetchbar { order:4; }
.panel>#watchPanel,.panel>#galleryPanel,.panel>#piggyLadyPanel { order:5; }
.panel>.hello { order:6; border-color:var(--wood-line); }
.panel>.needs { order:7; }
.panel>.foodwater-help,.panel>.inverse-help,.panel>.journal,.panel>.hint { color:var(--wood-muted); }
.needs-bar .needs { grid-template-columns:repeat(6,minmax(0,1fr)); }
.need-mini { color:var(--wood-ink); border-right-color:var(--wood-line); }
.need-mini-label { font-size:clamp(9px,1.4vw,13px); }
.need-mini-value { font-size:clamp(12px,1.7vw,17px); }
.need-mini-icon,.need-mini-icon>svg { width:clamp(22px,3.6vw,33px); height:clamp(22px,3.6vw,33px); }
.need-mini { --need-color:#8cab45; }
.need-mini:nth-child(1) { --need-color:#ec8423; }
.need-mini:nth-child(2) { --need-color:#dd5360; }
.need-mini:nth-child(3) { --need-color:#edbf28; }
.need-mini:nth-child(4) { --need-color:#8cad3e; }
.need-mini:nth-child(5) { --need-color:#a5a98a; }
.need-mini:nth-child(6) { --need-color:#b1bba2; }
.need-mini::after { content:''; display:block; width:78%; height:7px; margin:3px 0 0; border:1px solid #766e5140; border-radius:999px; background:linear-gradient(to right,var(--need-color) 0 var(--need-level,0%),var(--wood-line) var(--need-level,0%) 100%); box-shadow:inset 0 1px 2px #0003; }
.need-status { box-shadow:0 0 0 1px var(--wood-card); }
.needs .track,.need-mini .track { border-radius:999px; }
.tabs,.panel>.tabs { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; padding:0; margin:0; border:0; background:transparent; }
.tab,.phone-fit .tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:80px; padding:9px 3px; border:1.5px solid var(--wood-line); border-radius:19px; background:linear-gradient(150deg,var(--wood-surface),var(--wood-card)); color:var(--wood-ink); box-shadow:0 4px 9px var(--wood-shadow); font-size:clamp(10px,1.5vw,15px); font-weight:600; white-space:normal; }
.tab:hover { background:var(--wood-field); }
.tab.active,.tab[aria-selected="true"] { background:linear-gradient(155deg,#7b8f55,#334c29); color:#fff8e4; border-color:#f9eab4; box-shadow:0 3px 9px var(--wood-shadow),inset 0 1px #ffffff55; }
.tab.active .tab-icon,.tab .tab-icon { width:clamp(21px,3vw,31px); height:clamp(21px,3vw,31px); color:inherit; background:transparent; }
.tab-icon svg,.tab.active .tab-icon svg { width:100%; height:100%; }
.tab.active:after { display:none; }
.tab-label { white-space:normal; overflow-wrap:normal; }
.actions { gap:10px; }
.activity-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.action,.phone-fit .action { min-height:106px; border:1.5px solid var(--wood-line); border-radius:25px; background:linear-gradient(160deg,var(--wood-surface),var(--wood-card)); color:var(--wood-ink); box-shadow:0 5px 12px var(--wood-shadow),inset 0 1px #ffffff59; padding:11px 5px; gap:6px; font-size:clamp(12px,1.9vw,19px); font-weight:600; line-height:1.15; }
.action:hover { border-color:var(--wood-accent); background:var(--wood-field); }
.action:active { background:var(--wood-wash); }
.action .icon,.action .icon svg { width:clamp(34px,5vw,54px); height:clamp(34px,5vw,54px); }
.action .icon { display:grid; place-items:center; font-size:clamp(30px,4.7vw,49px); }
.action .icon img { width:100%!important; height:100%!important; object-fit:contain; }
.action[data-action="recall"]:not(:disabled) { background:linear-gradient(145deg,#526b37,#253e26); border-color:#bfd17f; color:#fff8e4; }
.action-section-title,.destinations-title { color:var(--wood-muted); font-size:12px; letter-spacing:.1em; border-color:var(--wood-line); }
.hello h1,.panel h2,.panel h3,dialog h2,dialog h3 { font-family:Fraunces,Georgia,serif; color:var(--wood-ink); }
.hello p,.panel p,.panel label,.panel summary { color:var(--wood-ink); }
.panel a,dialog a { color:var(--wood-green); }
.panel :is(.watch-panel,.gallery-panel,.photoform,.tribute,.loveletter,.journal,.training-rail,#achievementsPanel,#scrapbookPanel,#packGamePanel,#careRoutinePanel,#decorPanel,#storytimePanel,.backup-card,.challenge-details,.new-panel,.new-activity-panel,.new-build-art,.new-box-scene,.new-toy-patient),
dialog :is(.backup-card,.cover-setting,.trainer-mode-setting,#cheatsMenu) { background:var(--wood-surface); color:var(--wood-ink); border-color:var(--wood-line); box-shadow:0 4px 12px var(--wood-shadow); border-radius:18px; }
.panel .achievement-card,.panel .achievement-streak,.panel .scout-badges,.panel .scout-badge-card,.panel .scout-badge-picker,.panel .keepsake-card.found,.panel .nature-book-grid article.found { background:var(--wood-card); color:var(--wood-ink); border-color:var(--wood-line); box-shadow:0 3px 9px var(--wood-shadow); }
.panel .achievement-card.earned,.panel .scout-badge-card.earned { border-color:var(--wood-accent); }
.panel .achievement-card :is(h4,p,small),.panel .achievement-streak :is(summary,strong,.streak-meta,.streak-rules),.panel .scout-badge-card :is(h4,p,small,strong),.panel .nature-book-grid article.found :is(strong,small,span) { color:var(--wood-ink); }
.panel .achievements-head .achievement-rules { color:var(--wood-muted); }
.panel .watch-panel .youtube-button { color:#fff7e7; }
.panel :is(.new-choice,.pack-controls button,.care-routine-controls button,.training-reward,.gear-choice,.decor-choice,.photo-input,input,textarea,select),
dialog :is(input,textarea,select) { background:var(--wood-field); color:var(--wood-ink); border-color:var(--wood-line); }
.panel :is(button,.new-choice,.training-reward,.gear-choice,.decor-choice):focus-visible,dialog :is(button,input,select,textarea):focus-visible { outline:3px solid var(--wood-accent); outline-offset:2px; }
dialog { background:var(--wood-bg); color:var(--wood-ink); border:2px solid var(--wood-line); border-radius:26px; box-shadow:0 18px 55px #020c09aa; }
dialog::backdrop { background:#07150eb8; }
dialog button { background:var(--wood-field); border-color:var(--wood-line); color:var(--wood-ink); }
dialog p,dialog label,dialog summary,dialog .backup-help { color:var(--wood-ink); }
dialog .backup-card h3,dialog .backup-card p,dialog .backup-card .backup-help,dialog #restorePreview p { color:var(--wood-ink); }
dialog #cheatsMenu p,dialog .cover-setting p,dialog .trainer-mode-setting p { color:var(--wood-ink); }
.appearance-setting { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 17px; padding:14px; border:1.5px solid var(--wood-line); border-radius:18px; background:var(--wood-surface); box-shadow:0 4px 12px var(--wood-shadow); }
.appearance-setting strong { display:block; font:600 21px Fraunces,Georgia,serif; color:var(--wood-ink); }
.appearance-setting span { display:block; font-size:11px; color:var(--wood-muted); }
#themeToggle { display:flex; align-items:center; gap:9px; margin:0; min-height:44px; flex-shrink:0; border-radius:999px; padding:6px 8px 6px 11px; background:var(--wood-field); color:var(--wood-ink); }
#themeToggle .appearance-current { color:inherit; font-weight:700; font-size:11px; white-space:nowrap; }
.appearance-switch { display:flex!important; align-items:center; width:38px; height:23px; padding:3px; border-radius:999px; background:#c4d4a6; box-shadow:inset 0 1px 4px #18321a44; }
.appearance-switch span { width:17px; height:17px; border-radius:50%; background:#fff7e8; box-shadow:0 1px 3px #0005; transition:transform .2s; }
#themeToggle[aria-checked="true"] .appearance-switch { background:#687d3e; }
#themeToggle[aria-checked="true"] .appearance-switch span { transform:translateX(15px); }
html[data-theme="dark"] .panel :is(.new-panel,.new-activity-panel,.challenge-details,.watch-panel,.gallery-panel,.photoform,#achievementsPanel,#scrapbookPanel,#packGamePanel,#careRoutinePanel,#decorPanel,#storytimePanel) :is(h2,h3,p,small,span,label,summary,strong) { color:var(--wood-ink); }
html[data-theme="dark"] :is(.action,.tab,.panel>.needs-bar,.panel .watch-panel,dialog) { text-shadow:none; }
@media (max-width:700px) {
  body { background-image:none; }
  body::after { display:none; }
  .app { padding:8px max(8px,env(safe-area-inset-right)) 12px max(8px,env(safe-area-inset-left)); }
  header,.phone-fit header { display:flex; flex-direction:column; align-items:stretch; flex-wrap:nowrap; gap:0; position:relative; padding:4px 2px 4px; margin-bottom:4px; min-height:0; }
  header .eyebrow,.phone-fit header .eyebrow { margin-bottom:2px; }
  header .brand,.phone-fit header .brand { font-size:24px; line-height:1; }
  header .device-clock,.phone-fit header .device-clock { margin-top:3px; }
  header .tools,.phone-fit header .tools { position:static; align-self:flex-end; margin:-17px 0 0; gap:5px; }
  .small { width:38px; height:38px; }
  .tribute-shortcut { min-height:38px; padding:7px 9px; }
  .phone-fit .game,.game { gap:7px; }
  .phone-fit .panel,.panel { padding:0 2px 12px; gap:8px; }
  .phone-fit .panel>.needs-bar,.panel>.needs-bar { padding:7px 2px; border-radius:16px; }
  .tabs,.panel>.tabs { gap:4px; }
  .panel>.tabs { position:sticky; top:0; z-index:12; padding:4px 1px; background:var(--wood-bg); border-radius:15px; }
  .tab,.phone-fit .tab { min-height:60px; border-radius:13px; font-size:10px; padding:6px 1px; gap:3px; }
  .tab .tab-icon,.tab.active .tab-icon { display:grid; width:19px; height:19px; }
  .need-mini-label { font-size:9px; }
  .need-mini-value { font-size:11px; }
  .need-mini-icon,.need-mini-icon>svg,.phone-fit .need-mini-icon,.phone-fit .need-mini-icon>svg { width:20px; height:20px; }
  .action,.phone-fit .action { min-height:78px; border-radius:17px; font-size:12px; }
  .action .icon,.action .icon svg,.phone-fit .action .icon svg { width:32px; height:32px; }
  .activity-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .world .floorlabel { max-width:72%; }
  .environment-rail { left:5px; top:73px; width:49px; padding:3px; gap:3px; border-radius:13px; }
  .environment-choice { min-height:44px; padding:4px 0; font-size:9px; border-radius:9px; }
  .environment-icon svg { width:18px; height:18px; }
  #world .environment-icon svg { width:18px; height:18px; }
  #world .environment-rail { left:5px; top:30px!important; bottom:55px!important; width:39px; height:auto!important; max-height:none; display:grid; grid-auto-rows:minmax(0,1fr); padding:2px; gap:1px; overflow:hidden; border-radius:11px; }
  #world .environment-choice { min-height:0; height:auto; padding:1px 0; font-size:8px; line-height:1; border-radius:6px; }
  #world .environment-icon svg { width:14px; height:14px; }
  #world.world { min-height:0; height:clamp(230px,42svh,390px); }
}
@media (max-width:359px) {
  .brand { font-size:21px!important; }
  .tab,.phone-fit .tab { font-size:9px; min-height:56px; }
  .tab .tab-icon { display:grid; width:17px; height:17px; }
  .tools { gap:4px; }
  .tribute-shortcut { font-size:10px; }
  .small { width:32px; height:32px; }
  .activity-grid { gap:5px; }
  header .tools,.phone-fit header .tools { margin-top:2px; }
}
@media (min-width:701px) and (min-height:551px) { #world .environment-rail { height:max-content!important; } }
@media (orientation:landscape) and (max-height:550px) and (max-width:1024px) { .phone-fit .game,.game { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:0; } #world.world { height:100%; min-height:0; } .phone-fit .panel,.panel { padding:8px; } .tab,.phone-fit .tab { min-height:53px; } }

/* Illustrated, raised controls for both palettes. */
html[data-theme="light"] { --wood-shadow:#6846263d; }
html[data-theme="dark"] { --wood-shadow:#010b06a8; }
body { background-color:var(--wood-bg); }
.panel>.needs-bar { border-color:var(--wood-surface); background:radial-gradient(ellipse at 35% 0%,var(--wood-field),transparent 72%),linear-gradient(155deg,var(--wood-surface),var(--wood-wash)); box-shadow:0 7px 15px var(--wood-shadow),inset 0 2px 0 #ffffff55,inset 0 -3px 5px #5f452015; }
.tab,.phone-fit .tab { background:radial-gradient(ellipse at 28% 0%,var(--wood-field),transparent 70%),linear-gradient(160deg,var(--wood-surface),var(--wood-wash)); border-color:var(--wood-line); box-shadow:0 5px 8px var(--wood-shadow),inset 0 2px 1px #ffffffa8,inset 0 -2px 3px #7b57251b; }
.tab.active,.tab[aria-selected="true"] { background:radial-gradient(ellipse at 20% 0%,#899e60,#526b37 60%,#2e4a27); border-color:#f5e6ae; box-shadow:0 5px 10px var(--wood-shadow),0 0 0 2px #f5e6ae70,inset 0 2px #ffffff55; }
.tab-icon { filter:drop-shadow(0 1px 1px #49391a55); }
.action,.phone-fit .action { position:relative; overflow:hidden; background:radial-gradient(ellipse at 22% 0%,var(--wood-field),transparent 78%),linear-gradient(155deg,var(--wood-surface),var(--wood-wash)); border-color:var(--wood-surface); box-shadow:0 8px 13px var(--wood-shadow),0 2px 2px #503b1b24,inset 0 2px 1px #ffffffb3,inset 0 -3px 5px #7051261c; }
.action::before { content:''; position:absolute; inset:3px; border:1px solid color-mix(in srgb,var(--wood-line) 48%,transparent); border-radius:inherit; pointer-events:none; }
.action .icon { flex-shrink:0; background-size:contain; background-position:center; background-repeat:no-repeat; filter:drop-shadow(0 3px 2px #563a2638); }
.action .icon>svg,.action .icon>img { display:block; width:100%; height:100%; object-fit:contain; }
.panel>.tabs::after { content:''; grid-column:1/-1; height:27px; background:url('woodland-divider.svg') center/contain no-repeat; pointer-events:none; }
html[data-theme="dark"] .action,html[data-theme="dark"] .tab,html[data-theme="dark"] .panel>.needs-bar { border-color:#788a59; box-shadow:0 7px 13px #010900aa,inset 0 2px #c9dba933,inset 0 -3px #07150855; }
html[data-theme="dark"] .action:not(:disabled) { background:radial-gradient(ellipse at 20% 0%,#466338,#263e27 65%,#1b301e); }
html[data-theme="dark"] .action .icon { filter:drop-shadow(0 3px 3px #071508aa); }
.action:disabled,.phone-fit .action:disabled { opacity:1; color:var(--wood-ink); cursor:default; }
.action:disabled .icon { opacity:.88; }
.action:disabled::after { content:''; position:absolute; inset:0; border-radius:inherit; background:color-mix(in srgb,var(--wood-surface) 8%,transparent); pointer-events:none; }
html[data-theme="dark"] .action:disabled { background:radial-gradient(ellipse at 20% 0%,#435b35,#253c26 65%,#1b301e); }
html[data-theme="dark"] .action:disabled::after { background:#08160820; }
@media(max-width:700px) {
  .activity-grid,.phone-fit #actions>.activity-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
  .action,.phone-fit .action { min-height:94px; padding:8px 2px; gap:3px; border-radius:21px; font-size:11px; line-height:1.12; }
  .action .icon,.action .icon svg,.phone-fit .action .icon,.phone-fit .action .icon svg { width:39px; height:39px; }
  .panel>.tabs::after { height:19px; }
}
@media(max-width:359px) { .activity-grid,.phone-fit #actions>.activity-grid { gap:4px; } .action,.phone-fit .action { font-size:10px; min-height:84px; border-radius:15px; } .action .icon,.phone-fit .action .icon { width:33px; height:33px; } }

/* Leaves frame the title without sitting behind its letters. */
body,html[data-theme="dark"] body { background-image:none; }
body::after { display:none; }
.app::before,.app::after { content:''; position:absolute; top:0; width:125px; height:118px; background:url('woodland-corner.svg') top left/contain no-repeat; pointer-events:none; opacity:.9; }
.app::before { left:-124px; }
.app::after { right:-69px; transform:scaleX(-1); }
html[data-theme="dark"] .app::before,html[data-theme="dark"] .app::after { opacity:.65; }
header { position:relative; z-index:1; }
.tribute-shortcut { font-size:11px; min-height:32px; padding:5px 10px; font-weight:600; box-shadow:0 2px 5px var(--wood-shadow); }
.tribute-icon { font-size:15px; line-height:1; margin-right:4px; }
.woodland-landscape { order:100; flex-shrink:0; height:155px; margin:2px -5px -18px; background:url('woodland-footer.svg') center bottom/100% 100% no-repeat; pointer-events:none; }
html[data-theme="dark"] .woodland-landscape { filter:brightness(.74) saturate(.9); }
.settings-toolbar { position:sticky; top:-1px; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0 11px; margin:-8px 0 8px; background:var(--wood-bg); border-bottom:1px solid var(--wood-line); }
.settings-toolbar h2 { margin:0; font:600 23px Fraunces,Georgia,serif; }
#dialog .settings-toolbar #close { width:auto; min-height:38px; margin:0; padding:7px 12px; flex-shrink:0; border-radius:999px; background:linear-gradient(150deg,var(--wood-surface),var(--wood-wash)); font-size:12px; font-weight:700; }
.admin-panel { margin:16px 0 0; padding:13px; border:1.5px solid var(--wood-line); border-radius:18px; background:var(--wood-surface); box-shadow:0 4px 12px var(--wood-shadow); }
.admin-heading { display:flex; align-items:baseline; justify-content:space-between; gap:7px; }
.admin-heading h3 { margin:0; font:600 20px Fraunces,Georgia,serif; color:var(--wood-ink); }
.admin-state { font-size:10px; color:var(--wood-muted); text-align:right; }
.admin-panel p { font-size:12px; line-height:1.45; }
.admin-entry { display:flex; gap:6px; margin-top:5px; }
.admin-entry input { flex:1; min-width:0; min-height:42px; }
.admin-entry button { min-height:42px; padding:7px 12px; }
#adminMessage { color:#ab4730; min-height:1em; margin:5px 0 0; }
#adminGate[hidden],#adminSettings[hidden] { display:none!important; }
@media(max-width:700px) {
  .app::before,.app::after { width:92px; height:88px; top:-5px; }
  .app::before { left:-70px; }
  .app::after { right:-32px; }
  header,.phone-fit header { min-height:78px; padding:4px 3px 38px; margin-bottom:2px; }
  header .brand,.phone-fit header .brand { font-size:clamp(23px,6.1vw,29px); white-space:nowrap; }
  header .device-clock,.phone-fit header .device-clock { position:absolute; left:3px; bottom:10px; margin:0; }
  header .tools,.phone-fit header .tools { position:absolute; right:2px; bottom:2px; margin:0; align-self:auto; gap:5px; }
  .tribute-shortcut { min-height:30px; padding:4px 7px; font-size:10px; }
  .tribute-icon { font-size:13px; margin-right:2px; }
  .small { min-width:34px; min-height:34px; width:34px; height:34px; font-size:17px; }
  .woodland-landscape { height:88px; margin:0 -2px -12px; }
}
@media(max-width:359px) {
  header,.phone-fit header { min-height:80px; }
  header .brand,.phone-fit header .brand { font-size:21px!important; }
  .tribute-shortcut { font-size:9px; }
  .small { width:31px; min-width:31px; height:31px; min-height:31px; }
}

/* Detailed activity stickers sit within each button without changing Book art. */
.action .icon .sticker-art {
  display:block;
  width:100%;
  height:100%;
  flex:none;
  background-repeat:no-repeat;
  background-size:400% 400%;
}
.action .icon { width:68px; height:68px; filter:drop-shadow(0 2px 2px #57402546); }
@media(max-width:700px) {
  .panel>.tabs,.phone-fit .panel>.tabs {
    position:static;
    top:auto;
    z-index:auto;
    background:transparent;
  }
  .action .icon,.phone-fit .action .icon { width:55px; height:55px; }
}
@media(max-width:359px) {
  .action .icon,.phone-fit .action .icon { width:48px; height:48px; }
}

/* Environment artwork uses the same four-column atlas as the activity buttons. */
#world .environment-icon .sticker-art {
  display:block;
  width:100%; height:100%;
  background-size:400% 400%; background-repeat:no-repeat;
}

/* The Needs panel no longer reserves a row for invisible icon placeholders. */
.panel>.needs-bar,.phone-fit .panel>.needs-bar { padding:7px 5px; }
.need-mini,.phone-fit .need-mini { gap:1px; }
.need-mini-icon { display:none; }
@media(max-width:700px) {
  .panel>.needs-bar,.phone-fit .panel>.needs-bar { padding:5px 2px; }
}

/* A locked or out-of-location button should not look ready to play. */
.action:disabled,.phone-fit .action:disabled {
  opacity:.78;
  filter:saturate(.48);
  cursor:not-allowed;
  box-shadow:0 2px 5px var(--wood-shadow),inset 0 1px #ffffff59;
}
.action:disabled .icon { opacity:.84; }
.action:disabled::after { background:color-mix(in srgb,var(--wood-bg) 15%,transparent); }
html[data-theme="dark"] .action:disabled { background:linear-gradient(155deg,#26372a,#18291e); }
html[data-theme="dark"] .action:disabled::after { background:#09140a4a; }
.activity-location-note { display:block; max-width:100%; font-size:10px; line-height:1.1; color:var(--wood-muted); }
@media(max-width:700px) { .activity-location-note { font-size:8px; } }

/* Give the Care and Play grids a little more breathing room while keeping labels inside. */
.activity-grid .action,.phone-fit .activity-grid .action {
  width:90%; justify-self:center; min-height:95px;
  padding:9px 4px; gap:4px;
  font-size:clamp(11px,1.7vw,17px);
  overflow-wrap:break-word;
}
.activity-grid .action .icon,.phone-fit .activity-grid .action .icon { width:61px; height:61px; }
@media(max-width:700px) {
  .activity-grid .action,.phone-fit .activity-grid .action {
    min-height:85px; padding:7px 2px; gap:3px; font-size:10px;
  }
  .activity-grid .action .icon,.phone-fit .activity-grid .action .icon { width:50px; height:50px; }
}
@media(max-width:359px) {
  .activity-grid .action,.phone-fit .activity-grid .action { min-height:76px; font-size:9px; }
  .activity-grid .action .icon,.phone-fit .activity-grid .action .icon { width:43px; height:43px; }
}

/* Keep the small illustrated destinations legible even when Maple is resting. */
#world .environment-icon { width:23px; height:23px; }
#world .environment-choice:disabled:not([aria-pressed="true"]) { opacity:.72; }
@media(max-width:700px) { #world .environment-icon { width:19px; height:19px; } }
