/* Emerald edition: a coherent adventure interface, layered over legacy mechanics. */
:root{--rpg-pine:#102e2b;--rpg-gold:#e8c884;--rpg-cream:#f6f1dd;--teal:#3e8e77;--yellow:#e8c884;--navy:#193832;--ink:#243e36;--deluxe-cyan:#8bb79c;--deluxe-gold:#e8c884}
#app{background:#0c211f}#game-canvas{filter:none!important}
#title-screen{isolation:isolate;background:linear-gradient(90deg,rgba(7,28,27,.95),rgba(9,31,28,.79) 30%,rgba(9,31,28,.12) 66%),url('../assets/rpg/emerald-village.png') center/cover;display:flex;align-items:center;justify-content:flex-start;padding:80px 7vw;overflow:auto}
#title-screen:not(.active){display:none}
#title-screen:before{inset:0;width:auto;height:auto;border-radius:0;background:linear-gradient(0deg,#071f24b0,transparent 22%,transparent 85%,#071f2444);filter:none;animation:none}
#title-screen:after{display:none}
.title-topline,.title-footer{position:absolute;left:7vw;right:7vw;display:flex;justify-content:space-between;align-items:center;color:#f5efdc;font-size:10px;letter-spacing:2.5px}
.title-topline{top:30px}.title-topline>span:first-child{font-size:16px;letter-spacing:3px}.title-topline>span:last-child{opacity:.7}.title-footer{bottom:25px;color:#bbcdc1;font-size:9px;letter-spacing:1.7px}
#title-screen .title-card{position:relative;width:min(480px,48vw);padding:0;text-align:left;border:0;border-radius:0;box-shadow:none;background:none!important;backdrop-filter:none!important;overflow:visible;color:var(--rpg-cream)}
#title-screen .title-card:before,#title-screen .title-card:after{display:none}
#title-screen .title-kicker{justify-content:flex-start;color:#c6d6b5;font-size:9px;letter-spacing:2.4px;margin:0 0 22px}
#title-screen .title-kicker i{width:5px;height:5px;background:#ddc589;box-shadow:0 0 12px #dfca87;animation:none}
.rpg-wordmark{font-family:Georgia,'Times New Roman',serif;font-size:clamp(50px,5.6vw,86px);font-weight:400;letter-spacing:-4px;line-height:.96;color:#f7f3da;text-shadow:0 3px 30px #092b2a}
.rpg-wordmark>span{color:#e9c780}.rpg-wordmark small{display:block;font:700 9px Nunito,sans-serif;letter-spacing:5.3px;color:#aec4b7;margin:18px 0 32px}
#title-screen #game-title{font:400 clamp(25px,2.8vw,40px)/1.15 Georgia,serif;letter-spacing:-.6px;color:#f6f1dd;text-shadow:none;margin:0 0 19px;white-space:pre-line}
#title-screen .subtitle{font-size:14px;line-height:1.8;color:#c5d5c8;max-width:385px;margin:0}
#title-screen .title-prompt{font-size:12px;line-height:1.6;color:#96b4a5;border:0;background:none;padding:0;margin:12px 0 0;max-width:360px}
.title-metrics{display:flex;gap:25px;margin:25px 0;padding:17px 0;border-block:1px solid #e8c8842b;max-width:385px}
.title-metrics span{display:grid;justify-content:start;gap:3px;background:none;border:0;border-radius:0;padding:0;font-size:8px;letter-spacing:1.4px;color:#b1c7b5}
.title-metrics strong{font:400 25px Georgia,serif;color:#eddba8}
#title-screen .title-actions{max-width:385px;margin:24px 0 20px;grid-template-columns:1fr 1fr;gap:11px}
#title-screen .title-actions .btn{border:1px solid #c8d5bd40;border-radius:6px;background:#163c3399;box-shadow:none;color:#d5e2cd;min-height:42px;font-size:11px}
#title-screen .title-actions .btn.primary{background:linear-gradient(115deg,#ecd39c,#cfa85e);color:#263a2d;border:1px solid #ffe2a3;border-radius:6px;box-shadow:0 4px 0 #886c3c,0 12px 24px #081e2455;min-height:52px;font-size:13px;padding:12px 20px}
#title-screen .title-actions #continue-btn{grid-column:1/-1}
#title-screen .title-actions .btn.ghost{color:#c6d4bb;border-color:transparent}
#title-screen .tiny{margin:0;color:#90ac9e;font-size:9px;line-height:1.8}#title-screen .tiny span{color:#c8d7b9}
.title-location{position:absolute;right:7vw;bottom:115px;display:flex;gap:15px;align-items:center;padding:16px 25px;border:1px solid #e8d4a642;border-radius:8px;background:#0d332ab3;backdrop-filter:blur(15px);color:#f3e9cc;box-shadow:0 12px 40px #061d2630}
.title-location>span{font-size:33px;color:#e9c780}.title-location small{display:block;font-size:8px;letter-spacing:2px;color:#c5cfaa}.title-location strong{display:block;margin-top:5px;font:23px Georgia,serif}.title-location p{margin:5px 0 0;font-size:10px;color:#adbfad}
.loading-screen{background:linear-gradient(#0a2b26d9,#0a2b26ef),url('../assets/rpg/emerald-village.png') center/cover!important}
.loading-card{background:#102e2bee!important;border-color:#d2ba7855!important}.loading-kicker{color:#ead39d}
#hud{top:18px;left:22px;right:22px;gap:9px}.hud-brand,.hud-stat,.hud-icon{border:1px solid #d6c28b66;background:linear-gradient(135deg,#123c32f5,#0d2824f5);color:#f4e9c9;box-shadow:0 5px 15px #09251d40,inset 0 1px #d0d6a720;border-radius:9px;min-height:48px}.hud-brand:hover,.hud-stat:hover,.hud-icon:hover{background:#285548}.hud-brand{font:22px Georgia,serif;padding:9px 16px}.hud-brand img{display:none}.hud-brand span{font:8px Nunito;letter-spacing:2px;margin-left:8px}.hud-stat strong{font-size:13px;color:#f5eac9}.hud-stat img{width:26px;height:26px}.hud-icon img{width:28px;height:28px}.rep-track{border:1px solid #b9c59866;height:7px}.rep-track i{background:linear-gradient(90deg,#77af89,#d7cf82)}
#world-compass{position:absolute;right:23px;top:87px;z-index:8;padding:13px;border:1px solid #d6c28b66;border-radius:10px;background:#0e302ae8;color:#ecd9a4;box-shadow:0 8px 24px #102c2440;pointer-events:none}#world-compass>span{display:block;font-size:10px;letter-spacing:1.4px}#world-compass small{display:block;color:#9ebea9;font-size:9px;margin:4px 0 10px}#rpg-minimap{display:block;width:180px;height:110px;border-radius:4px}
#mission-pill{left:22px;bottom:27px;max-width:345px;padding:14px 18px;border:1px solid #d6c28b77;border-radius:8px;background:#12382fee;box-shadow:0 5px 20px #08251d55}#mission-pill small{font-size:8px;color:#c2be8c;letter-spacing:2px;margin-bottom:5px}#mission-pill strong{font-size:12px;color:#f5ebd0}#mission-pill>span{font-size:20px;filter:none}
#interaction-hint{bottom:30px;border-radius:8px;background:#12382ff2;border-color:#d6c28b77;font-size:12px;animation:none}kbd{background:#e8c884;border:1px solid #f6e3b0;border-radius:4px;color:#253c30;box-shadow:0 2px #8f794d;font-size:11px}#explore-controls{position:absolute;right:24px;bottom:30px;display:flex;gap:12px;align-items:center;color:#dfebd4;z-index:8;font-size:9px;text-shadow:0 1px 4px #143f2b}#explore-controls kbd{display:inline-block;font-size:8px;padding:4px;margin-right:4px;background:#183c31;border-color:#adc2a066;color:#e6dbb9;box-shadow:none}
.modal{background:#061e20b8;backdrop-filter:blur(7px)}.panel-card,.minigame-shell,.dialog-card{border:1px solid #c7b27b;border-radius:16px;background:linear-gradient(135deg,#fbf5e5,#edf0df);box-shadow:0 25px 80px #031d2499}.panel-title h2,.dialog-copy h2,.minigame-head h2{font-family:Georgia,serif;font-weight:400;color:#24483c}.panel-title h2{font-size:29px}.panel-title{border-color:#b3b99566}.btn{border:1px solid #a0b39a;border-radius:7px;box-shadow:0 3px 0 #8da28c;font-size:13px;padding:12px 19px}.btn.primary{background:linear-gradient(135deg,#4b9074,#2f715a);border-color:#2a654f;color:#fff8df;box-shadow:0 3px 0 #214e3c}.btn.ghost{background:transparent;box-shadow:none}.btn:hover{filter:brightness(1.07)}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}.task-card,.work-card,.badge-card,.equipment-card,.guide-card,.status-card{border-color:#afbea3;border-radius:10px;background:#fffdf4}.context{background:#e7eee0;border-left-color:#709b7d}.dialog-ui-art{display:none!important}.dialog-card>img#dialog-portrait{object-fit:contain;image-rendering:pixelated;background:linear-gradient(#bed5ae,#769981);padding:16px;min-height:220px}.dialog-copy p{font-size:16px}.dialog-copy small,.minigame-head small{color:#547b60}.toast{background:#faf4df;border-color:#b8bd98;border-left-color:#67977c;border-radius:8px;color:#2c4b3e}.icon-btn,#panel-card .icon-btn[data-close-panel]{background:#234d3c!important;border-radius:8px}.feedback{border-top:1px solid #aab89d}.action-cameo{background:#173d32;border-color:#c8b67e;border-radius:15px}
@media(max-width:1050px){#explore-controls{display:none}.title-location{right:4vw;bottom:100px}.title-topline,.title-footer{left:5vw;right:5vw}#title-screen{padding-left:5vw}.title-topline>span:last-child{font-size:8px}.hud-brand{font-size:18px}.hud-brand span{display:none}}
@media(max-width:700px){#title-screen{padding:90px 7vw 70px;align-items:flex-start;background:linear-gradient(90deg,#092c27ed,#092c278f),url('../assets/rpg/emerald-village.png') 62% center/cover}#title-screen .title-card{width:100%;max-width:440px;padding:0}#title-screen .rpg-wordmark{font-size:65px}.title-location{display:none}.title-topline>span:last-child,.title-footer>span:last-child{display:none}#title-screen .title-actions,#title-screen .title-metrics{max-width:100%}#title-screen .title-kicker{font-size:8px}.title-topline{left:7vw}.title-footer{left:7vw;position:fixed;bottom:18px}#world-compass{display:none}#hud{left:10px;right:10px;gap:5px}.hud-brand{padding:8px;font-size:15px}.hud-stat{padding:6px}.hud-stat img{width:20px;height:20px}.hud-stat strong{font-size:10px}.reputation{display:none}.hud-icon{width:37px;min-height:40px}.hud-icon img{width:24px;height:24px}#mission-pill{left:10px;bottom:15px;max-width:230px;padding:9px}#mission-pill strong{font-size:10px}#interaction-hint{bottom:88px;max-width:90vw;white-space:nowrap}.dialog-copy{padding:20px}.dialog-card{grid-template-columns:90px 1fr}.dialog-card>img#dialog-portrait{padding:4px}.dialog-copy p{font-size:14px}.panel-card{padding:18px}.panel-title h2{font-size:24px}}
@media(max-height:720px) and (min-width:701px){#title-screen{padding-block:65px}#title-screen .title-card{padding:0}.rpg-wordmark{font-size:58px}.rpg-wordmark small{margin:12px 0 20px}#title-screen #game-title{font-size:29px;margin-bottom:12px}#title-screen .title-prompt{display:none}#title-screen .title-metrics{margin:15px 0;padding:12px 0}#title-screen .title-actions{margin:15px 0}.title-location{bottom:85px}#world-compass{transform:scale(.8);transform-origin:top right}}
html.mobile-landscape #title-screen .title-card{background:none!important;width:54vw;padding:0}html.mobile-landscape #title-screen .rpg-wordmark{font-size:38px}html.mobile-landscape #title-screen .rpg-wordmark small{margin:8px 0 12px;font-size:7px}html.mobile-landscape #title-screen .title-kicker,html.mobile-landscape .title-footer,html.mobile-landscape .title-location{display:none}html.mobile-landscape #title-screen #game-title{font-size:22px}html.mobile-landscape #title-screen .subtitle{font-size:11px}html.mobile-landscape #title-screen .title-actions .btn.primary{grid-column:1/-1}html.mobile-landscape #title-screen .title-actions{margin:10px 0}html.mobile-landscape #title-screen{padding-block:50px}html.mobile-landscape #title-screen .title-card .title-actions .btn{min-height:32px;padding:6px 10px}html.mobile-landscape #world-compass{display:none}html.mobile-landscape #touch-controls:not(.hidden){display:flex!important}html.mobile-landscape #mission-pill{bottom:auto;top:74px;padding:8px 12px}html.mobile-landscape #interaction-hint{bottom:16px}html.mobile-landscape #explore-controls{display:none}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

#title-screen .title-card .title-prompt{margin-left:0;text-align:left}#hud button,#mission-pill,#interaction-hint{backdrop-filter:none!important}#title-screen .title-actions #continue-btn b{margin-left:10px}
.map-wrap{background:#799a78;border:1px solid #78866a;border-radius:12px}.map-wrap:before{background:#cfc09c;border-color:#eadbb3;outline-color:#6f8768}.map-road{background:#c8bd9c}.map-pin{border:1px solid #c7b47e;border-radius:5px;background:#f4ebcd;color:#2b513d;font-size:10px;box-shadow:0 3px 8px #24493422}.map-pin.locked{background:#bdc6b0;color:#506452}.map-player{background:#dfa952;border-color:#fff4c7;box-shadow:0 0 0 2px #365b45}
@media(max-height:500px){#title-screen{align-items:flex-start;padding-top:58px;padding-bottom:40px}#title-screen .title-kicker,#title-screen .title-metrics,#title-screen .title-prompt,#title-screen .tiny,.title-location,.title-footer{display:none}#title-screen .rpg-wordmark{font-size:44px}#title-screen .rpg-wordmark small{margin:10px 0 14px;font-size:7px}#title-screen #game-title{font-size:24px;margin-bottom:10px}#title-screen .subtitle{font-size:11px;line-height:1.5}#title-screen .title-actions{margin:12px 0;gap:7px}#title-screen .title-actions .btn,#title-screen .title-actions .btn.primary{min-height:34px;padding:7px 12px;font-size:10px}.title-topline{top:20px}.title-topline>span:last-child{display:none}}
/* Panels must fit inside the modal padding, including narrow portrait viewports. */
.modal{padding:clamp(10px,2vw,22px)}.minigame-shell{width:min(1120px,100%);max-height:calc(100dvh - 20px)}.panel-card{width:min(1000px,100%)}.dialog-card{width:min(900px,100%)}.minigame-body{min-height:0}.minigame-head{gap:12px}.minigame-head>div{min-width:0}.minigame-head .icon-btn{flex-shrink:0}
@media(max-width:700px){.minigame-head{padding:16px}.minigame-head h2{font-size:25px}.minigame-body{padding:12px}.game-layout{height:auto}.mission-token-bank{grid-template-columns:repeat(3,1fr)}.mission-asset img{width:80px;height:80px}.task-card,.work-card{padding:15px}.mission-mechanic>small{font-size:10px}}
/* Adventure expansion: quest journal, profiles, and world activities. */
.profile-button{grid-column:1/-1!important}.journal-button{font:24px Georgia,serif}.hud-icon.journal-button+ .hud-icon{margin-left:0}#mission-pill{text-align:left;cursor:pointer}#mission-pill:hover{border-color:#f0d8a1}#quest-compass{position:absolute;top:85px;left:23px;z-index:8;display:flex;align-items:center;gap:12px;background:#153c31ee;border:1px solid #bda97588;border-radius:8px;padding:10px 14px;color:#f1e3bb;pointer-events:none}#quest-compass>span{font-size:26px;display:block;color:#e9c783}#quest-compass small{display:block;font-size:8px;letter-spacing:.7px;color:#b8c7a8}#quest-compass strong{display:block;font-size:12px;margin:3px 0}.festival-summary{display:flex;align-items:center;gap:20px;padding:20px;background:#e6ecd9;border:1px solid #b5c29e;border-radius:12px;margin-bottom:20px}.festival-summary>span{font:45px Georgia;color:#997c3e}.festival-summary>div{flex:1}.festival-summary strong{font:24px Georgia;color:#35523d}.festival-summary p{margin:7px 0;font-size:12px}.festival-summary progress{display:block;width:100%;height:12px;accent-color:#638a61}.festival-summary small{display:block;margin-top:6px;font-size:11px}.quest-list{display:grid;gap:12px}.quest-card{display:flex;gap:16px;padding:18px;border:1px solid #c8c9ac;border-radius:10px;background:#fffdf4}.quest-card.tracked{border:2px solid #779b77;background:#eef3e5}.quest-number{flex:0 0 35px;font:26px Georgia;color:#718564}.quest-card small{font-size:10px;color:#62765c;line-height:1.6}.quest-card h3{font:22px Georgia;color:#35523d;margin:5px 0}.quest-card p{font-size:12px;line-height:1.6}.quest-card .row-actions{margin-top:12px}.save-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0}.save-slot{background:#fffdf4;border:1px solid #c7c4a1;padding:18px;border-radius:10px}.save-slot.active{background:#e7efdc;border:2px solid #709670}.save-slot small{font-size:10px;letter-spacing:1px;color:#7e855e}.save-slot h3{font:23px Georgia;overflow-wrap:anywhere}.save-slot p{font-size:12px;line-height:1.6}.save-slot .btn{width:100%;font-size:12px}.profile-name{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.profile-name label{flex:1 1 100%;font-size:12px}.profile-name input,.import-review select{border:1px solid #8ca385;border-radius:6px;background:#fffdf4;padding:10px;color:#294f3b}.profile-name input{flex:1;min-width:100px}#import-progress{max-width:100%;font-size:12px}.import-review{padding:18px;border:1px solid #b69d64;border-radius:10px;background:#f7ebc8;margin-top:16px}.import-review p,#profile-message{font-size:12px;line-height:1.6}.import-review label{margin-right:12px}.street-task{position:absolute;z-index:12;left:50%;bottom:100px;transform:translateX(-50%);width:min(550px,calc(100% - 24px));padding:15px 20px;border:1px solid #ddc183;border-radius:12px;background:#f8f0dbf5;box-shadow:0 12px 35px #0d302855;color:#2b503b}.street-task header{display:flex;justify-content:space-between;align-items:center;gap:12px}.street-task header strong{font:22px Georgia}.street-task .icon-btn{width:30px;height:30px;font-size:20px;flex-shrink:0}.street-task p{font-size:12px;line-height:1.5;margin:8px 0}.street-options{display:flex;gap:8px}.street-options .btn{flex:1}.street-task>.btn{font-size:10px;padding:5px 10px}.street-task #street-message{color:#5c724f;min-height:1.5em}.dialog-card #dialog-portrait{image-rendering:auto!important;animation:npc-talking 1.5s ease-in-out infinite}.character-preview img,.equipment-item-preview img{image-rendering:auto}.feedback-avatar-stack img{object-fit:contain}.action-cameo>span img{object-fit:contain}@keyframes npc-talking{50%{transform:translateY(-3px)}}
@media(max-width:700px){.save-slots{grid-template-columns:1fr}.festival-summary{padding:14px;gap:10px;flex-wrap:wrap}.festival-summary>span{display:none}.festival-summary strong{font-size:20px}.quest-card{padding:12px;gap:8px}.quest-number{flex-basis:27px;font-size:21px}.quest-card h3{font-size:19px}.quest-card .btn{font-size:11px;padding:9px 12px}.street-task{bottom:125px;padding:12px}.street-task header strong{font-size:19px}#quest-compass{top:69px;left:10px;padding:7px 10px}.hud-brand{font-size:12px;padding:6px}.hud-stat{padding:5px}.hud-icon{width:31px}.hud-icon img{width:22px;height:22px}.hud-stat img{width:17px;height:17px}.journal-button{font-size:20px}.title-card .profile-button{font-size:10px!important}}
@media(max-height:500px){.street-task{left:auto;right:12px;top:72px;bottom:auto;transform:none;width:320px;max-height:calc(100dvh - 90px);overflow:auto}.street-task p{font-size:11px}.street-task header strong{font-size:18px}#quest-compass{top:73px}.profile-button{min-height:28px!important}.title-topline{position:fixed}.save-slots{grid-template-columns:repeat(3,minmax(0,1fr))}}
html.mobile-landscape #quest-compass{display:none}
@media(min-width:1051px) and (min-height:501px){.street-task{left:auto;right:24px;bottom:110px;transform:none;width:400px}}.dialog-copy{min-width:0}.save-slot h3{min-height:1.2em}
#import-progress{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}label[for=import-progress]{cursor:pointer;display:inline-flex;align-items:center}
