:root{color-scheme:light;--ink:#26372c;--green:#385b45;--deep:#263e30;--soft:#e7ede0;--canvas:#f3f0e5;--paper:#fffef7;--line:#ced5c3;--muted:#889486;--gold:#c99c58;--red:#a8584c;font-family:"D2Coding","Sarasa Mono K","Apple SD Gothic Neo","Malgun Gothic",ui-monospace,monospace}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{background:var(--canvas);color:var(--ink);font-size:13px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}a{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #b98a4b;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.header{height:76px;background:#fdfcf5;border-bottom:2px solid #d6dccd;display:flex;justify-content:space-between;align-items:center;padding:0 max(28px,calc((100vw - 1400px)/2))}.header-brand,.header-actions{display:flex;align-items:center;gap:14px}.brand-icon{width:42px;height:42px;background:var(--green);color:#f7f0d5;display:grid;place-items:center;border:2px solid #254132;box-shadow:3px 3px 0 #d2dcc8;font-size:21px}.header-brand strong{display:block;font-size:19px;letter-spacing:-.06em;margin-top:3px}.brand-sub{font-size:8px;font-weight:800;letter-spacing:.16em;color:#8b9a87}.brand-divider{height:28px;width:1px;background:#e3e5dc;margin-left:5px}.brand-description{color:#91a093;font-size:11px}.status-pill{display:flex;align-items:center;gap:8px;border:1px solid #d8ddce;background:#f6f6ee;padding:8px 11px;font-size:11px;font-weight:700;color:#798779}.status-pill.running{background:#e8f0e2;color:#54735a;border-color:#bdcfb8}.status-dot{display:inline-block;width:7px;height:7px;background:#a4aca0}.running .status-dot{background:#77a070;box-shadow:0 0 0 3px #c9ddc5}.icon-button{border:1px solid #d4dbc9;background:#fffef8;color:#708473;width:35px;height:35px;font-size:17px}.icon-button:hover,.button.secondary:hover{background:#eff3e8}
.main-shell{max-width:1400px;padding:36px 28px 20px;margin:0 auto}.page-intro{display:flex;align-items:end;justify-content:space-between;margin-bottom:25px;gap:16px}.eyebrow{font-size:9px;letter-spacing:.16em;color:#a0a894;font-weight:800;margin:0 0 9px}.page-intro h1{font-size:26px;letter-spacing:-.07em;margin:0;color:#2e4635}.page-intro h1 span{font-size:17px;color:#bda268}.page-intro p:not(.eyebrow){color:#899789;margin:8px 0 0;font-size:12px}.intro-controls{display:flex;gap:8px}.button{min-height:39px;border:1px solid #c4cdbb;padding:0 15px;font-size:12px;font-weight:800;white-space:nowrap}.button.primary{color:#fffdf0;background:#3d634a;border-color:#345741;box-shadow:2px 2px 0 #b8c6ad}.button.primary:hover:not(:disabled){background:#2f533b}.button.secondary{background:#fffef8;color:#4f6b54}.button.wide{width:100%}.notice,.setup-notice{margin-bottom:16px;border:1px solid #dfd0ad;background:#fff9e9;color:#846c3c;padding:13px 15px;line-height:1.5}.notice.error{background:#fff3ef;border-color:#e3c3ba;color:#a65c51}.setup-notice{display:flex;align-items:center;gap:13px}.setup-notice>span{font-size:20px;color:#b99654}.setup-notice strong{font-size:12px}.setup-notice p{margin:4px 0 0;font-size:11px}.setup-notice .text-button{margin-left:auto;white-space:nowrap}.text-button{padding:0;border:0;background:transparent;color:#54775b;font-size:11px;font-weight:800}.text-button:hover{text-decoration:underline}.text-button.danger{color:#aa6b61}
.dashboard{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}.left-column,.right-column{display:grid;gap:16px;min-width:0}.frame{background:var(--paper);border:1px solid #cbd5c5;box-shadow:4px 4px 0 #dfe4d8;min-width:0}.window-title{min-height:49px;padding:0 16px;border-bottom:1px solid #e7eadf;display:flex;align-items:center;justify-content:space-between;gap:8px}.window-title>div{display:flex;align-items:center;gap:9px}.window-title h2{font-size:13px;margin:0;letter-spacing:-.04em}.window-symbol{color:#79977c;font-size:16px}.window-corners{font-size:20px;color:#c8d1c1;letter-spacing:2px}.section-english{font-size:9px;font-weight:800;letter-spacing:.1em;color:#a9b4a4}.world-bar{height:50px;display:flex;align-items:center;gap:0;padding:0 18px;border-bottom:1px solid #edf0e7}.world-bar>div{display:flex;align-items:center;gap:9px;color:#657867;font-size:11px}.world-bar>div:not(:last-child){border-right:1px solid #e7eadf;padding-right:18px;margin-right:18px}.world-icon{font-size:15px;color:#9aaa96}.map-field{background:#eff3e6;padding:17px 20px 0;position:relative;background-image:radial-gradient(#d7e1cf 0.7px,transparent .7px);background-size:15px 15px}.map-caption{font-size:10px;color:#95a792}.map-caption span{font-size:15px;color:#7c9b7e}.map-layout{max-width:650px;margin:14px auto 0;display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"garden workshop" "middle middle" "square well";gap:0 70px;position:relative}.map-place{min-height:112px;background:#fbfcf1;border:1px solid #cad8c0;padding:12px 14px;position:relative;box-shadow:3px 3px 0 #d7e4ce}.map-place::before{content:"";position:absolute;inset:3px;border:1px solid #e5ecdc;pointer-events:none}.map-place.garden{grid-area:garden;background:#f7faec}.map-place.workshop{grid-area:workshop;background:#faf8ed}.map-place.square{grid-area:square;background:#fbf9ec}.map-place.well{grid-area:well;background:#eff7f2}.place-title{font-size:12px;font-weight:800;color:#526d57;position:relative}.place-title span{color:#82a181;font-size:15px}.place-sub{color:#b0bfaa;letter-spacing:.12em;font-size:8px;font-weight:700;margin:4px 0 10px 20px}.place-occupants{display:flex;gap:5px;flex-wrap:wrap;position:relative;min-height:27px}.resident-marker{display:inline-flex;gap:5px;align-items:center;max-width:100%;border:1px solid #d6dfcf;background:#fffef8;color:#4e6652;padding:4px 7px;font-size:10px;font-weight:800;position:relative;z-index:1}.resident-marker:hover{background:#e9f0e4;border-color:#96af94}.marker-dot{width:7px;height:7px;background:var(--marker);display:inline-block}.empty-place{color:#b8c5b2;font-size:10px;padding:6px 1px}.place-decor{position:absolute;right:12px;bottom:10px;color:#c5d6bb;font-size:11px;letter-spacing:2px}.map-crossing{grid-area:middle;display:flex;align-items:center;justify-content:center;gap:20px;height:47px;color:#b0c5a9;font-size:11px}.map-crossing b{display:grid;place-items:center;width:27px;height:27px;background:#e1ebd9;border:1px solid #cadbc4;font-size:14px;color:#7d9f7e}.map-foot{text-align:center;padding:16px 0 15px;color:#91a18c;font-size:10px}.resources{display:grid;grid-template-columns:repeat(3,1fr);padding:16px 10px}.resources>div{display:flex;align-items:center;gap:10px;padding:0 13px;min-width:0}.resources>div:not(:last-child){border-right:1px solid #edf0e8}.resource-icon{display:grid;place-items:center;width:32px;height:32px;background:#f2f2e4;color:#a0a773;font-size:17px;flex:none}.resource-icon.blue{background:#edf5ef;color:#80a89a}.resource-icon.gold{background:#f7f2e5;color:#c3a16b}.resources>div>span:not(.resource-icon){font-size:10px;color:#7a8879;white-space:nowrap}.resources small{display:block;color:#b4bdb1;font-size:9px;margin-top:4px}.resources strong{margin-left:auto;font-size:18px;color:#435f49}.resources strong span{font-size:10px;margin-left:2px}
.tiny-muted{font-size:10px;color:#a6b1a4}.resident-list{display:grid;grid-template-columns:repeat(4,1fr);padding:13px;gap:9px}.resident-card{text-align:left;border:1px solid #e4e9dd;background:#fcfdf8;padding:11px;min-width:0;transition:border .15s,transform .15s}.resident-card:hover{border-color:#a9bda6;transform:translateY(-2px)}.resident-head{display:flex;gap:9px;align-items:center}.avatar{width:33px;height:33px;display:grid;place-items:center;background:var(--avatar-bg);color:var(--avatar-fg);border:1px solid var(--avatar-border);font-size:13px;font-weight:900;flex:none}.resident-head strong{display:block;font-size:12px}.resident-head small{display:block;color:#a0aa9d;font-size:10px;margin-top:4px}.resident-goal{font-size:10px;color:#879589;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:11px 0}.energy-row{display:flex;align-items:center;gap:7px;color:#9da99d;font-size:9px}.energy-track{height:5px;background:#e9eee5;flex:1}.energy-track span{display:block;height:100%;background:#a5be9c}.energy-row strong{color:#71856e;font-size:9px}
.incident-body{padding:16px}.incident-body p{margin:0 0 12px;color:#849187;font-size:11px;line-height:1.6}.incident-presets{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.incident-presets button{border:1px solid #e1e7db;background:#f9fbf5;padding:7px 10px;color:#6c806d;font-size:10px}.incident-presets button:hover{border-color:#a9bda5}.incident-body form{display:flex;gap:8px}.incident-body input{flex:1;min-width:0;border:1px solid #dce5d8;padding:0 11px;background:#fff;color:var(--ink);min-height:39px}.incident-body input::placeholder{color:#b0bbae}.incident-body small{display:block;color:#a3afa2;font-size:10px;margin-top:9px}
.activity-window{min-height:443px;display:flex;flex-direction:column}.activity-intro{font-size:10px;color:#a3ada0;margin:14px 16px}.event-list{flex:1;max-height:454px;overflow:auto;padding:0 16px}.event-entry{padding:0 0 16px 17px;border-left:1px solid #e2e9df;position:relative}.event-entry::before{content:"";position:absolute;top:3px;left:-4px;width:7px;height:7px;background:#a6bca0;border:2px solid #fffef7}.event-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:#abb6a8;font-size:9px;font-weight:700}.event-label{color:#728e74;background:#eef4e8;padding:3px 5px}.event-entry.director .event-label{background:#f8f0df;color:#ad9363}.event-message{font-size:11px;color:#647466;line-height:1.7;margin:7px 0 0;overflow-wrap:anywhere}.event-speech{font-size:11px;color:#3f5a45;line-height:1.6;background:#f1f5eb;padding:8px;margin:8px 0 0;overflow-wrap:anywhere}.activity-footer{margin:7px 16px 14px;padding-top:13px;border-top:1px dashed #e5eadd;font-size:10px;color:#b0b9ad}.activity-footer span{color:#9eb89c}.rules-window ul{list-style:none;padding:14px 17px;margin:0}.rules-window li{color:#8c9a8a;font-size:10px;line-height:1.7;margin-bottom:8px}.rules-window li::before{content:"· ";color:#a4ba9d;font-weight:bold}.limits{display:flex;justify-content:space-between;padding:10px 17px;color:#98a597;font-size:10px;border-top:1px solid #f0f2eb}.limits strong{color:#607960;font-size:11px}.budget-note{margin:0 17px 15px;color:#a4b0a1;font-size:9px;line-height:1.6}.page-footer{display:flex;justify-content:space-between;color:#b2bdaf;font-size:9px;padding:28px 0 4px;letter-spacing:.04em}.page-footer span:first-child{font-weight:800;letter-spacing:.12em}
.login-screen{min-height:100dvh;display:grid;place-content:center;padding:20px;background:#e9eee0;background-image:radial-gradient(#d3dfcc 1px,transparent 1px);background-size:20px 20px}.login-box{width:min(420px,calc(100vw - 40px));box-shadow:6px 6px 0 #c5d1bd}.title-bar,.dialog-top{display:flex;align-items:center;justify-content:space-between;background:#3d5d47;color:#f4f3e2;padding:11px 14px;font-size:10px;font-weight:800;letter-spacing:.1em}.login-content{padding:32px;text-align:center}.login-art{display:inline-block;background:#edf4e5;border:1px solid #d9e8d2;padding:14px 19px;color:#8cae84;font-size:22px;letter-spacing:3px;margin-bottom:23px}.login-content h1{font-size:28px;letter-spacing:-.07em;margin:0}.login-copy{font-size:12px;line-height:1.8;color:#98a697;margin:13px 0 24px}.login-content form{text-align:left}.login-content label,.settings-content label{display:block;font-size:11px;font-weight:800;color:#637a66;margin-bottom:8px}.login-content input,.settings-content input,.settings-content select{width:100%;height:42px;border:1px solid #d6e0d2;background:#fbfdf8;padding:0 11px;color:var(--ink)}input::placeholder{color:#b0bbae}.login-submit{width:100%;margin-top:12px;display:flex;align-items:center;justify-content:center;gap:12px}.login-foot{font-size:10px;color:#b1bfae;margin:26px 0 0}.form-error{font-size:11px;color:#aa5c4f;line-height:1.5;margin:8px 0}.dialog{width:min(490px,calc(100% - 30px));max-height:calc(100% - 36px);padding:0;border:1px solid #516f55;background:var(--paper);color:var(--ink);box-shadow:6px 6px 0 #192a1e55}.dialog::backdrop{background:#192a1e99}.dialog-top{padding:10px 14px}.dialog-close{border:0;background:transparent;color:#ecf4e8;font-size:22px;line-height:1}.settings-content{padding:22px 24px 25px}.settings-content h2{font-size:20px;margin:0;letter-spacing:-.05em}.dialog-lead{font-size:11px;color:#9ba99a;margin:7px 0 20px}.settings-section{border-top:1px solid #e7ece3;padding-top:16px;margin-top:17px}.settings-section h3{font-size:12px;margin:0}.settings-section p{font-size:10px;line-height:1.7;color:#879987;margin:7px 0 13px}.settings-section small,.password-dialog small{display:block;color:#a4b0a1;font-size:10px;line-height:1.6;margin-top:8px}.settings-heading{display:flex;justify-content:space-between;align-items:center}.key-badge{font-size:10px;color:#a69b80;background:#f7f2e5;padding:5px 7px}.key-badge.connected{color:#5e8064;background:#eaf2e7}.key-row{display:flex;gap:8px}.key-row input{min-width:0;flex:1}.settings-links{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.settings-links a,.export-link{font-size:10px;color:#77937a;text-decoration:none}.settings-links a:hover,.export-link:hover{text-decoration:underline}.schedule-form{display:grid;grid-template-columns:1fr 1fr auto;gap:9px;align-items:end}.schedule-form label{margin:0}.schedule-form input,.schedule-form select{margin-top:7px}.settings-section #logout{margin-left:12px}.export-link{display:inline-block;margin-left:12px}.password-dialog{width:min(410px,calc(100% - 30px))}.password-dialog label{margin:15px 0 7px}.password-dialog .wide{margin-top:20px}.resident-profile{padding:24px}.profile-head{display:flex;gap:13px;align-items:center}.profile-head .avatar{width:46px;height:46px;font-size:19px}.profile-head h2{margin:0;font-size:20px}.profile-head p{color:#96a595;font-size:11px;margin:5px 0 0}.profile-description{color:#6f8070;line-height:1.8;font-size:12px;margin:17px 0}.profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.profile-stat{background:#f4f7ee;padding:11px;color:#839283;font-size:10px}.profile-stat strong{display:block;color:#4c6a51;font-size:12px;margin-top:6px}.profile-section{margin-top:22px}.profile-section h3{font-size:11px;color:#718a72;margin:0 0 10px}.memory-list{list-style:none;padding:0;margin:0}.memory-list li{border-top:1px solid #edf0e8;padding:10px 0;font-size:11px;color:#667868;line-height:1.6}.memory-kind{color:#a1b19e;font-size:9px;margin-right:6px}.relationship-list{display:flex;flex-wrap:wrap;gap:7px}.relationship-list span{background:#eef4e9;color:#718971;font-size:10px;padding:7px}
@media(max-width:1050px){.dashboard{grid-template-columns:minmax(0,1fr) 300px}.map-layout{gap:0 35px}.resident-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.header{height:67px;padding:0 17px}.brand-divider,.brand-description{display:none}.brand-icon{width:36px;height:36px}.header-brand strong{font-size:17px}.header-actions{gap:8px}.main-shell{padding:26px 16px 20px}.dashboard{grid-template-columns:1fr}.right-column{grid-template-columns:1fr}.activity-window{min-height:280px}.event-list{max-height:350px}.page-intro h1{font-size:23px}.page-intro p:not(.eyebrow){max-width:235px;line-height:1.5}.intro-controls{gap:6px}.button{padding:0 10px;font-size:11px}.page-footer span:last-child{display:none}}
@media(max-width:480px){.page-intro{align-items:start;flex-direction:column}.intro-controls{width:100%}.intro-controls button{flex:1}.setup-notice{align-items:flex-start;flex-wrap:wrap}.setup-notice .text-button{margin-left:33px}.world-bar{padding:0 12px}.world-bar>div:not(:last-child){padding-right:9px;margin-right:9px}.world-bar>div{font-size:10px;gap:5px}.map-field{padding:14px 10px 0}.map-layout{gap:0 14px}.map-place{min-height:103px;padding:10px}.place-title{font-size:11px}.place-decor{font-size:9px}.place-sub{margin-left:0;font-size:7px}.map-crossing{height:39px}.resources{padding:13px 4px}.resources>div{gap:6px;padding:0 7px}.resource-icon{width:25px;height:25px;font-size:14px}.resources small{display:none}.resources strong{font-size:14px}.resident-list{gap:7px;padding:9px}.resident-card{padding:9px}.incident-body form{flex-direction:column}.incident-body form button{min-height:38px}.schedule-form{grid-template-columns:1fr 1fr}.schedule-form button{grid-column:span 2}.settings-content{padding:20px}.key-row{flex-direction:column}.key-row button{width:100%}}
.resident-yuna{--marker:#c87c5e;--avatar-bg:#f5e7df;--avatar-fg:#a95d42;--avatar-border:#e9c9ba}.resident-doyun{--marker:#71947b;--avatar-bg:#e7f0e5;--avatar-fg:#5a8466;--avatar-border:#c6d9c4}.resident-hari{--marker:#c99b59;--avatar-bg:#f7efda;--avatar-fg:#a88242;--avatar-border:#e7d8b5}.resident-miran{--marker:#8394ae;--avatar-bg:#e8edf4;--avatar-fg:#687f9a;--avatar-border:#cbd6e4}

/* Keep the RPG panels, but make the information comfortable to read. */
body { font-size: 16px; line-height: 1.5; }
.brand-sub, .eyebrow, .section-english, .place-sub, .page-footer { font-size: 11px; }
.brand-sub, .brand-description, .eyebrow, .section-english, .place-sub,
.page-footer, .tiny-muted, .map-caption, .map-foot, .activity-intro,
.activity-footer, .resident-head small, .incident-body small, .budget-note,
.settings-section small, .password-dialog small, .login-foot, .memory-kind {
  color: #586d5a;
}
.brand-description, .status-pill, .world-bar > div, .map-caption, .map-foot,
.resources > div > span:not(.resource-icon), .resources small, .tiny-muted,
.resident-head small, .energy-row, .energy-row strong, .incident-body small,
.activity-intro, .event-meta, .activity-footer, .rules-window li, .limits,
.budget-note, .login-foot, .settings-section small, .password-dialog small,
.key-badge, .settings-links a, .export-link, .profile-stat, .memory-kind,
.relationship-list span { font-size: 13px; }
.page-intro h1 { font-size: 30px; }
.page-intro p:not(.eyebrow), .setup-notice p, .incident-body p,
.dialog-lead, .settings-section p, .profile-head p { font-size: 15px; color: #536a55; }
.window-title h2, .place-title, .resident-head strong, .settings-section h3,
.profile-section h3, .login-content label, .settings-content label { font-size: 16px; }
.window-title { min-height: 54px; }
.window-title h2 { color: #263c2c; }
.button, .text-button, .setup-notice strong, .resident-goal, .resident-marker,
.empty-place, .incident-presets button, .event-message, .event-speech,
.login-copy, .form-error, .profile-description, .profile-stat strong,
.memory-list li { font-size: 15px; }
.button, .icon-button, .theme-toggle { min-height: 44px; }
.button { padding-inline: 16px; }
.icon-button { width: 44px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 11px; border: 1px solid #bdcbb9; background: #fffef8; color: #36543e; font-size: 14px; font-weight: 800; white-space: nowrap; }
.theme-toggle:hover { background: #eaf1e6; }
.theme-icon { font-size: 20px; line-height: 1; }
.theme-toggle-login { min-height: 36px; color: #fffef0; background: transparent; border-color: #a6bea5; font-size: 13px; }
.theme-toggle-login:hover { background: #506f58; }
.status-pill { color: #485e4b; }
.world-bar { height: auto; min-height: 54px; padding-block: 9px; }
.world-bar > div { color: #4c6550; }
.map-place { min-height: 124px; }
.place-title { color: #385a40; }
.place-sub { color: #5b735d; }
.resident-marker, .empty-place { color: #425f48; }
.resources > div > span:not(.resource-icon) { color: #516954; }
.resources small { color: #667969; }
.resources strong { font-size: 20px; }
.resources strong { white-space: nowrap; }
.resources strong span { font-size: 13px; }
.resident-goal { white-space: normal; overflow: visible; line-height: 1.5; color: #536a57; min-height: 3em; }
.energy-row { color: #596e5b; }
.energy-row strong { color: #465f48; }
.incident-presets button { min-height: 42px; color: #47644d; }
.incident-body input, .login-content input, .settings-content input, .settings-content select { min-height: 44px; font-size: 16px; }
input::placeholder, .incident-body input::placeholder { color: #687c6b; opacity: 1; }
.event-meta { color: #5b715e; }
.event-label { color: #365c40; }
.event-entry.director .event-label { color: #72561f; }
.event-message, .memory-list li { color: #405947; }
.event-speech { color: #2f4d36; }
.resident-goal, .event-message, .event-speech, .memory-list li,
.incident-body p, .settings-section p, .login-copy { font-size: 16px; }
.rules-window li, .limits { color: #536b55; }
.limits strong { color: #395d40; font-size: 14px; }
.login-copy, .dialog-lead { line-height: 1.7; }
.login-content label, .settings-content label { color: #415c46; }
.settings-section p, .settings-links a, .export-link { color: #506c55; }
.key-badge { color: #665324; }
.key-badge.connected { color: #365f3f; }
.profile-stat { color: #566f59; }
.profile-stat strong { color: #36563d; }
.profile-section h3 { color: #496d50; }
.relationship-list span { color: #47694c; }

/* User choice is stored in the browser; without one, follow the device. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e2ede1;
  --green: #85b691;
  --deep: #d1e5d3;
  --soft: #304135;
  --canvas: #141c18;
  --paper: #202c25;
  --line: #45584a;
  --muted: #bbcfbc;
}
:root[data-theme="dark"] .header { background: #1b2720; border-color: #3a4d3e; }
:root[data-theme="dark"] .brand-icon { background: #375f44; border-color: #638b6c; color: #f4f5db; box-shadow: 3px 3px 0 #101813; }
:root[data-theme="dark"] .brand-divider { background: #45564a; }
:root[data-theme="dark"] .brand-sub, :root[data-theme="dark"] .brand-description,
:root[data-theme="dark"] .eyebrow, :root[data-theme="dark"] .section-english,
:root[data-theme="dark"] .place-sub, :root[data-theme="dark"] .page-footer,
:root[data-theme="dark"] .tiny-muted, :root[data-theme="dark"] .map-caption,
:root[data-theme="dark"] .map-foot, :root[data-theme="dark"] .activity-intro,
:root[data-theme="dark"] .activity-footer, :root[data-theme="dark"] .resident-head small,
:root[data-theme="dark"] .incident-body small, :root[data-theme="dark"] .budget-note,
:root[data-theme="dark"] .settings-section small, :root[data-theme="dark"] .password-dialog small,
:root[data-theme="dark"] .login-foot, :root[data-theme="dark"] .memory-kind { color: #b5cbb8; }
:root[data-theme="dark"] .status-pill { background: #29362d; color: #d1dfd1; border-color: #536658; }
:root[data-theme="dark"] .status-pill.running { background: #2c4934; color: #ddf1dc; border-color: #6f9b74; }
:root[data-theme="dark"] .running .status-dot { background: #9dda9f; box-shadow: 0 0 0 3px #49694b; }
:root[data-theme="dark"] .icon-button, :root[data-theme="dark"] .theme-toggle,
:root[data-theme="dark"] .button.secondary { background: #293a2f; color: #e1ede0; border-color: #5b7560; }
:root[data-theme="dark"] .icon-button:hover, :root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .button.secondary:hover { background: #3a5140; }
:root[data-theme="dark"] .button.primary { background: #8dbd94; border-color: #a8d2ab; color: #172d1d; box-shadow: 2px 2px 0 #0e1711; }
:root[data-theme="dark"] .button.primary:hover:not(:disabled) { background: #b0d7b3; }
:root[data-theme="dark"] .page-intro h1, :root[data-theme="dark"] .window-title h2 { color: #e2efe1; }
:root[data-theme="dark"] .page-intro p:not(.eyebrow), :root[data-theme="dark"] .setup-notice p,
:root[data-theme="dark"] .incident-body p, :root[data-theme="dark"] .dialog-lead,
:root[data-theme="dark"] .settings-section p, :root[data-theme="dark"] .profile-head p { color: #c2d3c2; }
:root[data-theme="dark"] .notice, :root[data-theme="dark"] .setup-notice { background: #403a29; border-color: #8c7b4e; color: #f2dfad; }
:root[data-theme="dark"] .notice.error { background: #4b302d; border-color: #a46d64; color: #ffd1c8; }
:root[data-theme="dark"] .text-button, :root[data-theme="dark"] .settings-links a,
:root[data-theme="dark"] .export-link { color: #a8d5ad; }
:root[data-theme="dark"] .text-button.danger, :root[data-theme="dark"] .form-error { color: #ffb8ac; }
:root[data-theme="dark"] .frame { border-color: #495d4c; box-shadow: 4px 4px 0 #101813; }
:root[data-theme="dark"] .window-title, :root[data-theme="dark"] .world-bar,
:root[data-theme="dark"] .world-bar > div:not(:last-child), :root[data-theme="dark"] .settings-section,
:root[data-theme="dark"] .memory-list li, :root[data-theme="dark"] .resources > div:not(:last-child),
:root[data-theme="dark"] .limits { border-color: #3a4b3e; }
:root[data-theme="dark"] .world-bar > div, :root[data-theme="dark"] .resources > div > span:not(.resource-icon),
:root[data-theme="dark"] .resources small, :root[data-theme="dark"] .resident-goal,
:root[data-theme="dark"] .energy-row, :root[data-theme="dark"] .rules-window li,
:root[data-theme="dark"] .limits, :root[data-theme="dark"] .event-meta,
:root[data-theme="dark"] .profile-stat, :root[data-theme="dark"] .profile-description { color: #c4d6c4; }
:root[data-theme="dark"] .resources strong, :root[data-theme="dark"] .energy-row strong,
:root[data-theme="dark"] .limits strong, :root[data-theme="dark"] .profile-stat strong,
:root[data-theme="dark"] .profile-section h3 { color: #e1efe0; }
:root[data-theme="dark"] .map-field { background-color: #19271e; background-image: radial-gradient(#3a5140 .7px, transparent .7px); }
:root[data-theme="dark"] .map-place, :root[data-theme="dark"] .map-place.garden,
:root[data-theme="dark"] .map-place.workshop, :root[data-theme="dark"] .map-place.square,
:root[data-theme="dark"] .map-place.well { background: #283a2c; border-color: #58725a; box-shadow: 3px 3px 0 #121d16; }
:root[data-theme="dark"] .map-place.workshop, :root[data-theme="dark"] .map-place.square { background: #36392a; }
:root[data-theme="dark"] .map-place.well { background: #263d37; }
:root[data-theme="dark"] .map-place::before { border-color: #415943; }
:root[data-theme="dark"] .place-title, :root[data-theme="dark"] .resident-marker,
:root[data-theme="dark"] .empty-place { color: #d9ead8; }
:root[data-theme="dark"] .place-decor, :root[data-theme="dark"] .map-crossing { color: #a6c1a4; }
:root[data-theme="dark"] .map-crossing b { background: #354d38; border-color: #617d60; color: #c0ddbc; }
:root[data-theme="dark"] .resident-marker { background: #344b38; border-color: #708d71; }
:root[data-theme="dark"] .resident-marker:hover { background: #49644c; }
:root[data-theme="dark"] .resource-icon, :root[data-theme="dark"] .resource-icon.blue,
:root[data-theme="dark"] .resource-icon.gold { background: #34493a; color: #d3e6c8; }
:root[data-theme="dark"] .resident-card { background: #29382d; border-color: #536c57; }
:root[data-theme="dark"] .resident-card:hover { border-color: #9bc4a1; }
:root[data-theme="dark"] .resident-yuna { --avatar-bg: #61443a; --avatar-fg: #ffdac8; --avatar-border: #a47c6b; --marker: #f2ad8b; }
:root[data-theme="dark"] .resident-doyun { --avatar-bg: #36583f; --avatar-fg: #d4f5d6; --avatar-border: #77a27d; --marker: #9cdaa5; }
:root[data-theme="dark"] .resident-hari { --avatar-bg: #62532e; --avatar-fg: #ffe7ac; --avatar-border: #a99862; --marker: #edc879; }
:root[data-theme="dark"] .resident-miran { --avatar-bg: #3d5068; --avatar-fg: #d8e8ff; --avatar-border: #7e96b3; --marker: #aacbf1; }
:root[data-theme="dark"] .energy-track { background: #435348; }
:root[data-theme="dark"] .energy-track span { background: #a5d0a6; }
:root[data-theme="dark"] .incident-presets button { background: #2d3f32; color: #d5e8d6; border-color: #58705b; }
:root[data-theme="dark"] .incident-body input, :root[data-theme="dark"] .login-content input,
:root[data-theme="dark"] .settings-content input, :root[data-theme="dark"] .settings-content select { background: #17231b; border-color: #607a63; color: #edf8ec; }
:root[data-theme="dark"] input::placeholder { color: #b4c6b5; }
:root[data-theme="dark"] .event-entry { border-color: #526453; }
:root[data-theme="dark"] .event-entry::before { border-color: #202c25; background: #b3d0ad; }
:root[data-theme="dark"] .event-label { background: #3a5140; color: #daefd9; }
:root[data-theme="dark"] .event-entry.director .event-label { background: #554a30; color: #ffe5ae; }
:root[data-theme="dark"] .event-message, :root[data-theme="dark"] .memory-list li { color: #e0ede0; }
:root[data-theme="dark"] .event-speech { background: #314639; color: #e4f4df; }
:root[data-theme="dark"] .activity-footer { border-color: #526453; }
:root[data-theme="dark"] .login-screen { background-color: #18251c; background-image: radial-gradient(#3b5340 1px, transparent 1px); }
:root[data-theme="dark"] .login-box { box-shadow: 6px 6px 0 #101813; }
:root[data-theme="dark"] .title-bar, :root[data-theme="dark"] .dialog-top { background: #385944; color: #f5f8ed; }
:root[data-theme="dark"] .login-art { background: #304a36; border-color: #617e62; color: #c0dfb9; }
:root[data-theme="dark"] .login-content label, :root[data-theme="dark"] .settings-content label { color: #d4e5d3; }
:root[data-theme="dark"] .login-copy { color: #c7d8c5; }
:root[data-theme="dark"] .key-badge { background: #544b34; color: #f5e1ac; }
:root[data-theme="dark"] .key-badge.connected { background: #35503b; color: #d1f0d0; }
:root[data-theme="dark"] .profile-stat, :root[data-theme="dark"] .relationship-list span { background: #304435; color: #d4e8d3; }

@media (max-width: 760px) {
  .page-intro h1 { font-size: 27px; }
  .button { font-size: 15px; }
  .header-actions .theme-label { display: none; }
  .header-actions .theme-toggle { width: 44px; padding: 0; }
  .world-bar > div { font-size: 13px; }
}
@media (max-width: 480px) {
  .header { height: auto; min-height: 67px; padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .header-brand { gap: 8px; }
  .brand-sub { display: none; }
  .header-actions { gap: 6px; }
  .status-pill { font-size: 12px; padding: 7px 8px; }
  .world-bar { flex-wrap: wrap; row-gap: 6px; }
  .world-bar > div { font-size: 13px; }
  .place-title { font-size: 14px; }
  .place-sub { font-size: 11px; }
  .resources strong { font-size: 17px; }
  .resources > div { padding-inline: 4px; gap: 4px; }
  .resources > div > span:not(.resource-icon) { font-size: 14px; }
  .resources .resource-icon { display: none; }
  .resident-card { padding: 10px; }
  .incident-body form button { min-height: 44px; }
}
@media (max-width: 375px) {
  .resident-list { grid-template-columns: 1fr; }
  .resident-goal { min-height: 0; }
  .tiny-muted { display: none; }
}
