:root{color-scheme:dark;--ink:#eceddc;--muted:#a8b7a7;--gold:#e7cd8f;--green:#203c33;--line:#ffffff13;--panel:#1a3029;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:#12261f;color:var(--ink)}button{font:inherit;color:inherit;border:1px solid #ffffff22;background:#2e4b3d;border-radius:10px;padding:10px 14px;cursor:pointer;min-height:42px}button:hover{background:#3a5c48}button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}button:disabled{opacity:.45;cursor:default}header{height:86px;padding:15px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:var(--green)}h1,h2,p{margin:0}h1{font-family:Georgia,serif;font-size:26px;font-weight:500;letter-spacing:.3px}h2{font-size:16px;font-weight:650}.brand{display:flex;gap:15px;align-items:center}.brand p{color:var(--muted);font-size:12px;margin-top:4px}.mark{display:grid;place-items:center;border:1px solid #c9bb8555;color:var(--gold);width:40px;height:40px;border-radius:50%;font-size:25px}.connection{display:flex;align-items:flex-end;flex-direction:column;gap:6px;font-size:12px;color:#c5d9b2}.connection time{font-variant-numeric:tabular-nums;color:var(--gold)}main{display:grid;grid-template-columns:minmax(0,1fr) 360px;height:calc(100dvh - 86px)}.world{position:relative;min-width:0;overflow:hidden;background:#608e7d}#map{display:block;width:100%;height:100%;image-rendering:pixelated;touch-action:none}.map-title{pointer-events:none;position:absolute;top:22px;left:24px;background:#163329e8;border:1px solid #d8dfb52b;border-radius:12px;padding:13px 18px;box-shadow:0 8px 22px #08150f20}.eyebrow{display:block;font-size:10px;letter-spacing:2px;color:var(--gold);margin-bottom:6px}.map-title strong{font-size:13px;font-weight:500}.map-tools{position:absolute;bottom:36px;left:22px;display:flex;gap:6px}.map-tools button{background:#19372eea;box-shadow:0 3px 10px #12271d30}.map-tools button:not(:first-child){width:44px;font-size:20px}.hint{position:absolute;bottom:12px;left:24px;font-size:10px;color:#eef3df;text-shadow:0 1px 4px #000;pointer-events:none}#notice{position:absolute;left:22px;right:22px;top:105px;background:#503e26eb;color:#fff0c6;padding:13px;border-radius:10px;font-size:13px}#back{position:absolute;right:20px;top:22px;background:#19372eee}aside{overflow-y:auto;background:var(--panel);padding:24px;scrollbar-width:thin;scrollbar-color:#4e6755 transparent}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.pill{font-size:10px;border:1px solid #d4dda52b;border-radius:30px;padding:5px 8px;color:#b9cbae}.supplies{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--line);padding-bottom:20px;gap:16px}.supplies span{display:block;color:var(--muted);font-size:11px}.supplies strong{display:block;font-size:25px;color:var(--gold);font-weight:450;margin-top:5px}nav{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:20px 0}nav button{padding:7px 2px 9px;background:#223d31;border-color:transparent;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px}nav button[aria-pressed=true]{border-color:#d9c38a;background:#3a4c35}nav canvas{width:32px;height:48px;image-rendering:pixelated}.person{padding-top:6px}.person-heading{display:flex;align-items:center;justify-content:space-between}.person-heading h2{font-family:Georgia,serif;font-size:24px;font-weight:400}.person-heading p{font-size:11px;color:var(--muted);margin-top:4px}.person-heading button{font-size:11px;padding:5px 10px;min-height:36px}#follow[aria-pressed=true]{background:#55623c;border-color:var(--gold)}#task{margin:20px 0 18px;font-size:13px;color:#d6dfcc;line-height:1.5;min-height:20px}.need{display:grid;grid-template-columns:72px 1fr 30px;align-items:center;font-size:11px;gap:10px;margin:11px 0;color:var(--muted)}.bar{height:5px;background:#ffffff12;border-radius:4px;overflow:hidden}.bar i{display:block;height:100%;background:#afc88d;border-radius:4px}.need em{font-style:normal;text-align:right;font-variant-numeric:tabular-nums;font-size:10px}#equipment{font-size:11px;color:var(--muted);line-height:1.7;margin:18px 0}#interior{width:100%;font-size:12px;text-align:left}.talk,.chronicle{border-top:1px solid var(--line);margin-top:24px;padding-top:22px}.dot{width:6px;height:6px;border-radius:50%;background:#b1c986}.muted{font-size:11px;color:var(--muted);line-height:1.5}.message{border-left:2px solid #98ad75;margin:15px 0;padding-left:12px}.message b{font-size:11px;color:var(--gold)}.message p{font-size:12px;line-height:1.6;margin-top:5px;color:#d6dfcc}.message time{font-size:10px;color:#879d8a;margin-left:7px}#events{margin-top:14px}#events p{font-size:11px;line-height:1.6;padding:9px 0;border-bottom:1px solid #ffffff08;color:#b6c6b0}footer{font-size:10px;color:#829784;line-height:1.8;padding:26px 0 2px}#revision{font-variant-numeric:tabular-nums}[hidden]{display:none!important}@media(max-width:760px){header{height:72px;padding:12px 16px}h1{font-size:22px}.brand{gap:10px}.mark{height:32px;width:32px;font-size:21px}.brand p{font-size:10px}.connection{font-size:10px;max-width:110px;text-align:right}main{height:auto;display:block}.world{height:54dvh;min-height:300px;border-bottom:2px solid #72885e}.map-title{left:12px;top:12px;padding:10px 13px}.map-tools{left:12px;bottom:28px}.hint{left:12px;font-size:9px;bottom:8px}.map-tools button{min-height:38px;padding:7px 11px}.map-tools button:not(:first-child){width:39px}.map-tools span{font-size:11px}aside{overflow:visible;padding:22px 20px}.supplies{padding-bottom:16px}nav{grid-template-columns:repeat(6,1fr);gap:4px}nav button{font-size:10px;min-width:0}nav canvas{width:28px;height:42px}#notice{top:89px;left:12px;right:12px;font-size:12px}#back{right:12px;top:12px;font-size:11px;padding:8px}.person-heading h2{font-size:26px}body{padding-bottom:env(safe-area-inset-bottom)}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

#weatherInfo{display:block;font-size:10px;line-height:1.5;color:#c4d4c3;margin-top:5px;max-width:250px}footer a{color:#afc6b5}

.memory-section{border-top:1px solid var(--line);padding-top:22px;margin-top:24px}.memory-section summary{cursor:pointer;color:var(--gold);font-family:Georgia,serif;font-size:19px}.memory-section details>p{margin:12px 0}.memory-entry{border-left:2px solid #829c85;padding:9px 0 9px 12px;margin:14px 0}.memory-entry p{font-size:12px;line-height:1.65;color:#d6dfcc;margin:8px 0;white-space:pre-wrap}.memory-entry small,.memory-entry time{font-size:10px;line-height:1.5;color:var(--muted)}.memory-badge{font-size:10px;color:#d1e3ba}.memory-entry[data-level="inferred"]{border-color:#d5b76c}.memory-entry[data-level="heard"]{border-color:#80aabc}.memory-tools{display:flex;gap:8px;flex-wrap:wrap}.memory-tools button{font-size:11px}.memory-tools button:disabled{opacity:.45;cursor:default}

#speechLayer{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}.speech-bubble{position:absolute;left:0;top:0;padding:10px 12px;background:rgba(14,22,24,.91);border:1px solid #b8ae827d;border-radius:4px;box-shadow:0 4px 12px #0004;color:#f1eee3;pointer-events:none;font:14px/19px system-ui,sans-serif;will-change:transform}.speech-name{font:600 12px/16px system-ui,sans-serif;color:#ead59d;margin-bottom:5px}.speech-body{white-space:pre-wrap;font:14px/19px system-ui,sans-serif}.speech-page{margin-top:5px;color:#b6bea9;font:10px/12px system-ui,sans-serif}.speech-link{position:absolute;left:0;top:0;width:1px;background:#c8bf9899;transform-origin:0 0;pointer-events:none}.map-title,.map-tools,#back,.hint,#notice{z-index:4}@media(max-width:520px){.speech-bubble{font-size:13px}.speech-body{font:13px/18px system-ui,sans-serif}}

.resource-info{margin:12px 0;padding:12px;border:1px solid #ffffff14;border-radius:10px}.resource-info summary{cursor:pointer;color:#e5d7b6}.resource-info p{line-height:1.55;margin:10px 0 0}

#habitats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}#habitats button{padding:10px;font-size:12px;text-align:left}

.rescue-case{padding:12px 0;border-bottom:1px solid #ffffff15}.rescue-case strong{font-size:13px;color:#ecd9ac}.rescue-case p{margin:8px 0}.rescue-case button{padding:8px 12px}

/* Readable resource overview, including narrow phone sidebars. */
.resource-overview{display:grid;gap:12px;margin-top:14px;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));align-items:start}
.resource-card{min-width:0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#ffffff03}
.resource-card h3{margin:0 0 8px;color:var(--gold);font-size:12px;font-weight:600;letter-spacing:.2px}
.resource-card dl{margin:0}
.resource-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:6px 0;border-bottom:1px solid #ffffff08;font-size:12px;line-height:1.45}
.resource-row:last-child{border-bottom:0;padding-bottom:0}
.resource-row dt{color:#bdccbb;min-width:0;overflow-wrap:anywhere}
.resource-row dd{margin:0;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:baseline;gap:3px 5px;flex-shrink:0;text-align:right;max-width:45%}
.resource-row strong{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink)}
.resource-row strong.resource-zero{color:#889e8c;font-weight:400}
.resource-row dd span{font-size:10px;color:var(--muted)}
.resource-notes{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.resource-info .resource-notes summary{font-size:11px;color:var(--muted)}
.resource-notes ul{margin:10px 0 0;padding-left:17px;font-size:11px;line-height:1.6;color:var(--muted)}
.resource-notes li+li{margin-top:7px}

.project-card{border-bottom:1px solid var(--line);padding:12px 0}.project-card button{width:100%;text-align:left;font-size:12px}.project-card progress{width:100%;height:7px;accent-color:#b5c889;margin-top:10px}.skills-list{margin:12px 0;font-size:12px}.skills-list>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px solid var(--line)}.skills-list dt{color:var(--muted)}.skills-list dd{margin:0;font-variant-numeric:tabular-nums}.project-card .muted{overflow-wrap:anywhere}

/* Species and location groups use the same hierarchy as the supply cards. */
#habitats{display:block}
.habitat-group{margin-top:16px}
.habitat-group h3{margin:0 0 8px;color:var(--gold);font-size:12px;font-weight:600}
.habitat-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#habitats button{min-width:0;overflow-wrap:anywhere}
#habitats button strong,#habitats button small{display:block}
#habitats button strong{font-size:12px;font-weight:500}
#habitats button small{color:var(--muted);font-size:10px;line-height:1.5;margin-top:5px}

/* One shared palette for diary borders, origin labels, counters and legend. */
:root{--memory-experienced:#829c85;--memory-heard:#80aabc;--memory-inferred:#d5b76c}
.memory-entry{border-color:var(--memory-experienced)}
.memory-entry[data-level="heard"]{border-color:var(--memory-heard)}
.memory-entry[data-level="inferred"]{border-color:var(--memory-inferred)}
.memory-badge,.memory-kind[data-level="experienced"]{color:var(--memory-experienced)}
.memory-entry[data-level="heard"] .memory-badge,.memory-kind[data-level="heard"]{color:var(--memory-heard)}
.memory-entry[data-level="inferred"] .memory-badge,.memory-kind[data-level="inferred"]{color:var(--memory-inferred)}
