/* Game-wide palette. Scoped to panels so character colors and scene canvases stay intact.
   High-priority colors also cover styles loaded lazily by save/social/story modules. */
html body :is(.scr,dialog,#inviteNotice){--panel:#fffced;--panel2:#eff9ff;--ink:#294e50;--muted:#4d686b;--acc:#946017;--ok:#28733c;--bad:#b13449;--line:#39aac5;color-scheme:light}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) .box,
html body dialog,html body #inviteNotice{background:#fffced!important;color:#294e50!important;border:3px solid #28a6be!important;border-radius:22px;box-shadow:0 5px #137d98,0 16px 36px #143e5945}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) :is(h2,h3),html body dialog :is(h2,h3){color:#146c8a!important}
html body .scr :is(label,.muted,.cost,.logline .d),html body dialog :is(label,.muted){color:#4d686b!important}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) :is(.btn,.item button),html body dialog button,html body #inviteNotice button{background:#d2f0ff!important;color:#25536b!important;border:2px solid #39a9d3!important;border-radius:13px;box-shadow:0 3px #8bc9e3}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) :is(.btn.pri,.friendInvite),html body dialog .pri{background:#d9f4aa!important;color:#315522!important;border-color:#79b833!important;box-shadow:0 3px #a2ce69}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) .btn.warn{background:#ffe1b1!important;color:#793d1e!important;border-color:#ed9e32!important}
html body .scr :is(.btn small,.item .nm small){color:#4d686b!important}
html body :is(.scr,dialog) :is(input:not([type=color]):not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:#fffef8!important;color:#294e50!important;border-color:#46acc1!important;accent-color:#258fb9}
html body :is(.scr,dialog) :is(input,textarea)::placeholder{color:#61757a;opacity:1}
html body .scr:where(:not(#title):not(#menuScr)) :is(.item,.social-card,.life-card,.furniture-card,.hw-card){background:#effaff!important;color:#294e50!important;border:2px solid #50b9d4!important;border-radius:16px;box-shadow:0 3px #addce8}
html body .scr:where(:not(#title):not(#menuScr)) :is(.item,.social-card,.life-card,.furniture-card,.hw-card):nth-child(3n+2){background:#f0fadd!important;border-color:#8bc54b!important;box-shadow:0 3px #cae5a2}
html body .scr:where(:not(#title):not(#menuScr)) :is(.item,.social-card,.life-card,.furniture-card,.hw-card):nth-child(3n){background:#fff1d2!important;border-color:#eab24b!important;box-shadow:0 3px #eed294}
html body .scr :is(.logline,.social-result){border-color:#8bc6d5}
html body .scr :is(.life-box>header,.social-tabs,.hw-head,.illustrated-close-bar),html body dialog .welcome-head{background:#fffced!important;border-color:#37b2cd!important}
html body .scr :is(.life-host,.destination-current,.recovery-note,#recoveryResult,.hw-help,.hw-progress){background:#ddf3c5!important;color:#35592f!important;border-radius:14px;border:1px solid #83bd48}
html body .scr :is(.life-notice,.hw-notice,.hw-kicker,.hw-date,.friendPresence,.destination-help,.destination-eyebrow,.recovery-eyebrow){color:#53646a!important}
html body .scr :is(.life-card small,.furniture-card p,.destination-choice small){color:#4b6967!important}
html body .scr :is(.life-tabs .btn,.social-tabs .btn,.destination-tabs .btn):nth-child(3n+2){background:#ffe1b1!important;border-color:#e8a037!important;color:#79511c!important}
html body .scr :is(.life-tabs .btn,.social-tabs .btn,.destination-tabs .btn):nth-child(3n){background:#eadbff!important;border-color:#a777dc!important;color:#68458a!important}
html body :is(.scr,dialog) [aria-pressed=true]:not(canvas){outline:2px solid #176e98!important;outline-offset:1px;font-weight:700}
html body .scr :is(.life-condition,#slotConfirm,.hw-caption,#tutorialSpeech),html body #welcomeSpeech{background:#fff0c6!important;color:#674b23!important;border:2px solid #e8ae37;border-radius:14px}
html body :is(#tutorialSpeech,#welcomeSpeech)::before{color:#805119!important}
html body :is(#tutorialHint,#tutorialProgress,#welcomeProgress,.welcome-note){color:#506c68!important}
html body :is(.scr,dialog) :is(.btn,button):focus-visible{outline:3px solid #116fa9!important;outline-offset:3px}
html body .scr:where(:not(#title):not(#menuScr):not(#dailyNewsScr)) button:disabled{background:#ebeee8!important;color:#667169!important;border-color:#b7c4b6!important;box-shadow:none;opacity:.75}
/* Five keepsake cards, including empty slots and overwrite/restore confirmation. */
html body #saveSlotsScr .box{border-color:#9c65d6!important;box-shadow:0 5px #7846ae,0 16px 36px #40305b40}
html body #saveSlotsScr h2{color:#7343a3!important}
html body #saveSlotsScr #slotWhere{background:#e8dbff;color:#593a7c;border:1px solid #ad81de}
html body #saveSlotsScr .slot-card{--slot:#249dc6;--slot-bg:#e1f5ff;background:var(--slot-bg);border:2px solid var(--slot);border-left-width:6px;box-shadow:0 3px color-mix(in srgb,var(--slot),white 60%);border-radius:18px}
html body #saveSlotsScr .slot-card:nth-child(2){--slot:#73b535;--slot-bg:#effbd9}
html body #saveSlotsScr .slot-card:nth-child(3){--slot:#e89e29;--slot-bg:#fff0cf}
html body #saveSlotsScr .slot-card:nth-child(4){--slot:#d96b9c;--slot-bg:#ffe6f0}
html body #saveSlotsScr .slot-card:nth-child(5){--slot:#9b6bd3;--slot-bg:#eee2ff}
html body #saveSlotsScr .slot-number{background:var(--slot-bg);color:#294e50;border:2px solid #fff;box-shadow:0 2px #36586435;text-shadow:none;border-radius:50%}
html body #saveSlotsScr .slot-card h3,html body #saveSlotsScr #slotConfirmTitle{color:#34525b!important}
/* Story panels, furniture and seasonal pages share the same illustration frames. */
html body #storyScene .scene-stage{background:#d7f0c0}
html body #storyScene .scene-bubble{background:#fffbed;border-color:#6dbb64;color:#345646}
html body #storyScene .scene-bubble:after{background:#fffbed;border-color:#6dbb64}
html body #storyScene .scene-name{color:#2b784d}
html body #storyScene button{background:#cceeff;color:#275974;border-color:#37a3ce;box-shadow:0 3px #9bd0e2}
html body #storyScene .scene-next{background:#ffd28d;color:#754b20;border-color:#e8a130}
html body #halloweenScr .hw-box{border-color:#d98b32!important;box-shadow:0 5px #ab6926}
html body #halloweenScr button{background:#eedcff!important;color:#634482!important;border-color:#a47bc8!important}
html body #halloweenScr .hw-primary{background:#ffd697!important;color:#75451a!important;border-color:#e39a31!important}
html body .scr .furniture-wallet{background:#ffdf83;color:#71501d;border:1px solid #e0a331}
html body .scr :is(.furniture-price,#furnitureNotice){color:#85551c}
html body #furnitureChoices canvas,html body .furniture-card canvas{background:#fff9dc!important;border:2px solid #f5d176!important}
html body #dlg{background:#fffbedf5;color:#294e50;border-color:#36aac1;box-shadow:0 3px #16809c}
html body #dlg .who{color:#147594}html body #dlg .cb{background:#d9f2ff;color:#2c5267;border:2px solid #4ca8cb}html body #dlg .cb.pri{background:#dbf3ad;border-color:#81b73f;color:#35552b}
html body #coopChatToggle{background:#c5eeff;color:#255c75;border:2px solid #289cbe}
html body #inviteNotice{border-color:#9c6ad3!important}
html body #friendChat{background:#fffced;color:#294e50;border:2px solid #34a7c2;box-shadow:0 -3px #a4dce9}
html body #friendChatLog p{background:#e2f4ff;color:#294e50;border:1px solid #75c2dc}
html body #friendChat button{background:#d9f3b4;color:#345725;border:2px solid #82b744}
html body #friendChat input{background:#fffef8;color:#294e50;border:2px solid #45aac5}
html body #friendChat input::placeholder{color:#61757a}
html body #socialMsg{color:#8c591b}

#bagSort,#rankMetric{display:block;width:100%;min-height:44px;margin:6px 0 12px;padding:10px;font-size:16px;border:2px solid #20aacc;border-radius:12px;background:#effcff;color:#175c70}#rankSelf:not(:empty){margin:12px 0;padding:5px;border:2px solid #edac32;border-radius:14px;background:#fff2bb}
