/* The world is the app canvas. UI stays outside its camera coordinate space. */
:root{--dock-height:76px;--dock-space:calc(var(--dock-height) + env(safe-area-inset-bottom,0px));--shell-gap:16px}
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{background:#7f9974}
button,select{touch-action:manipulation}
#main{padding:0;width:100%;height:100dvh}
#application{max-width:none;margin:0;height:100%;position:relative;isolation:isolate}
#world-tab.map-card{position:absolute;inset:0;border:0;border-radius:0;background:#7f9974}
#scene-viewport{width:100%;height:100%;position:absolute;inset:0}
.scene-vignette{background:linear-gradient(0deg,#153f2c70,transparent 30%,transparent 85%,#153f2c25)}
.map-controls{right:var(--shell-gap);bottom:calc(var(--dock-space) + 16px);gap:6px}
.map-controls button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #e5dfc8;border-radius:13px;font-size:25px;background:#fffdf5ed;box-shadow:0 3px 12px #173a3020}
.map-controls svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.world-hud{position:absolute;top:calc(env(safe-area-inset-top,0px) + 16px);left:var(--shell-gap);right:var(--shell-gap);z-index:7;pointer-events:none;max-width:520px;display:grid;gap:9px}
.daily-summary,.location-summary{background:#fffdf4f2;border:1px solid #fff9dcaa;border-radius:15px;padding:8px 10px;box-shadow:0 5px 20px #173a301b;backdrop-filter:blur(12px)}
.hud-top{display:flex;align-items:center;gap:8px}
.hud-top>img{flex:none;width:28px;height:28px}
.hud-day{min-width:0;flex:1;display:grid;gap:2px;line-height:1.3}
.day-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hud-day strong{font:600 20px/1.1 var(--serif);white-space:nowrap}
.hud-day>span{font-size:8px;color:#79806b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#participation-count{font-size:9px;color:#677858;white-space:nowrap}
#participation-count:before{content:'';display:inline-block;width:5px;height:5px;background:#84a36c;border-radius:50%;margin-right:5px;vertical-align:1px}
.wallet{pointer-events:auto;min-height:32px;border:1px solid #e2dac0;background:#faf5e6;border-radius:22px;padding:4px 8px;font-size:11px;font-weight:650;white-space:nowrap}
.wallet>span:first-child{color:#aa8134;font-size:15px}
.location-summary h2{font-size:20px;line-height:1.15;letter-spacing:-.4px}
.map-activities{display:grid;gap:6px;margin-top:6px}
.hud-activity{padding:7px 9px;border:1px solid #dfe4d2;border-radius:10px;background:#f1f3e8;pointer-events:auto;min-width:0}
.hud-activity-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;min-width:0}
.area-activity-title,.hud-activity h3{font:600 16px/1.2 var(--serif);color:var(--green);text-align:left}
.area-activity-title{border:0;background:none;padding:0;min-height:0}
.hud-activity .map-activity-button{flex:none;width:auto;margin:0;min-height:30px;padding:5px 10px;border-radius:20px;font-size:10px;line-height:1.2;box-shadow:none}
.hud-activity .map-activity-button.selected{min-height:22px;padding:3px 7px;font-size:9px}
.map-activity-button.selected:disabled{opacity:1;cursor:default;background:#e0e8d4;color:var(--green);border-color:#d2ddc2}
.hud-activity .activity-facts.inline .activity-measure{font-size:9px;line-height:1.3;margin-top:4px;gap:6px}
.activity-progress-line{display:grid;grid-template-columns:minmax(50px,1fr) auto;align-items:center;gap:10px;margin-top:4px}
.hud-activity .activity-facts.inline .progress-track{height:5px;margin:0}
.hud-activity .activity-facts.inline .reward-preview{justify-content:flex-start;gap:8px;margin:0;padding:0;border:0;border-radius:0;font-size:9px;white-space:nowrap}
.hud-activity .activity-facts.inline .reward-preview span+span{border:0;padding:0}
@media(max-width:370px){
.day-heading{gap:7px}
#participation-count{font-size:8.5px}
.area-activity-title,.hud-activity h3{font-size:15px}
}
.bottom-nav{position:fixed;z-index:30;bottom:0;left:0;right:0;height:var(--dock-space);padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;background:#fffdf5f5;border:1px solid #e1dece;border-bottom:0;border-radius:22px 22px 0 0;box-shadow:0 -5px 28px #163c2e13;backdrop-filter:blur(16px)}
.bottom-nav .nav-link{border:0;border-radius:15px;padding:5px 0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-width:0;color:#3b4c3e;font-size:10px;line-height:1.2;background:none}
.bottom-nav .nav-link svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.bottom-nav .nav-link.active{background:#dfe7d5;color:var(--green);font-weight:650}
.bottom-nav .nav-link:hover{background:#edf0e4}
.section-dialog{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:0;background:transparent;color:var(--ink);overflow:hidden}
.section-dialog::backdrop{background:#162b2366;backdrop-filter:blur(1px)}
.section-sheet{position:absolute;bottom:var(--dock-space);left:0;right:0;max-height:calc(100dvh - var(--dock-space) - env(safe-area-inset-top,0px) - 100px);height:auto;background:var(--card);border:1px solid #e5e0cf;border-bottom:0;border-radius:25px 25px 0 0;box-shadow:0 -12px 60px #1a372525;display:flex;flex-direction:column;overflow:hidden}
.sheet-header{position:relative;flex:none;padding:30px 20px 14px}
.sheet-header h1{font-size:30px;line-height:1.15;letter-spacing:-.7px;margin:0 42px 4px 0}
.sheet-header p{font-size:12px;margin-right:35px;line-height:1.5}
.sheet-handle{position:absolute;top:11px;left:calc(50% - 23px);width:46px;height:4px;border-radius:4px;background:#b9b9aa}
.sheet-header .dialog-close{top:22px;right:14px}
.dialog-close{min-width:44px;min-height:44px;border-radius:50%;font-size:28px;display:grid;place-items:center;line-height:1;padding:0}
.sheet-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 18px 18px;scrollbar-width:thin}
.sheet-body .footnote{font-size:10px;line-height:1.6;margin-top:12px;color:#73806d}
.sheet-body .button{min-height:44px;font-size:12px}
.segmented{display:flex;padding:3px;background:#f2f1e8;border:1px solid #e2e2d4;border-radius:12px;gap:3px;margin:0 0 14px;max-width:100%;overflow-x:auto;flex:none;scrollbar-width:thin}
.segmented button{min-height:40px;flex:1;white-space:nowrap;border:0;border-radius:9px;background:transparent;padding:8px 10px;font-size:11px;color:#66765f}
.segmented button[aria-pressed=true]{color:#fffdf5;background:var(--green);box-shadow:0 2px 4px #1b3d2520}
.segmented button:focus-visible{outline-offset:-3px}
.activity-assigned-check{margin-right:5px;font-weight:750;color:#62814e}
.segmented button[aria-pressed=true] .activity-assigned-check{color:inherit}
.atlas-scenes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.atlas-scene{border:1px solid #e3e2d4;background:#faf9f2;border-radius:12px;padding:6px;text-align:left;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.atlas-scene img{width:100%;height:85px;object-fit:cover;border-radius:7px}
.atlas-scene>span{padding:8px 2px 0;display:flex;flex:1;flex-direction:column;gap:4px}
.atlas-scene strong{font:18px/1.1 var(--serif);letter-spacing:-.3px}
.atlas-scene small{font-size:10px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#71806a;margin:0;min-height:28px}
.atlas-scene .atlas-travel{display:flex;align-items:center;justify-content:center;min-height:40px;margin-top:5px;background:var(--green);border-radius:7px;color:#fffdf5;font-size:11px;font-weight:650}
.atlas-scene[aria-current=true]{border-color:#8b9d75}
.atlas-details{display:flex;flex:1;flex-direction:column;gap:6px;padding:8px 2px 0;min-width:0}
.atlas-details h3{font-size:18px;line-height:1.15;letter-spacing:-.3px}
.atlas-description{font-size:10px;line-height:1.4;color:#71806a;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:28px}
.atlas-activities{display:grid;gap:8px;margin:2px 0}
.atlas-activity{display:grid;gap:5px}
.atlas-activity .task-desc{font-size:10px;line-height:1.45;color:#71806a;margin:0 0 3px}
.atlas-scene-full .atlas-activity .task-desc{font-size:12px;line-height:1.6}
.atlas-activity-name{font-family:var(--serif)}
.atlas-activity-name{font-size:10px;line-height:1.3;font-weight:600;color:#586d4c}
.atlas-scene .location-activity-button{width:100%;padding:8px 6px;min-height:44px;font-size:10px;line-height:1.3}
.location-activity-button:disabled{opacity:1;cursor:default;background:#e4ebd8;color:var(--green);border-color:#d6dfc7}
.atlas-details .atlas-travel{border:0;width:100%;margin-top:auto;padding:10px 6px}
.poi-dialog #poi-type{margin:0 38px 14px 0}
.poi-dialog #poi-enter{width:100%;margin-top:14px}
.atlas-scene.atlas-scene-full{padding:0;border:0;border-radius:0;background:none}
.atlas-scene-full img{height:160px;border-radius:13px}
.atlas-scene-full .atlas-details{padding:14px 0 0;gap:10px}
.atlas-scene-full h2{font-size:28px;line-height:1.15}
.atlas-scene-full .atlas-description{display:block;min-height:0;font-size:12px;line-height:1.65}
.atlas-scene-full .atlas-activity-name{font-size:12px}
.atlas-scene-full .location-activity-button{font-size:12px}
.compact-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:12px;font-size:11px}
.compact-pager:empty{display:none}
.pager-button{width:44px;height:44px;background:#f3f4e9;border:1px solid #dce2d1;border-radius:12px;font-size:19px}
.pager-button:disabled{cursor:default;opacity:.4}
.daily-brief{margin:0 0 15px;padding:15px 17px;border:1px solid #e5ddbd;border-left:3px solid #b7a367;border-radius:4px 13px 13px 4px;background:#f7f3e4}
.activity-story{font:17px/1.55 var(--serif);color:var(--green);margin:0;white-space:pre-line;overflow-wrap:anywhere}
#activity-options button{white-space:normal;min-width:0;line-height:1.3;padding:8px 7px}
.activity-location{position:relative;flex:none;width:90px;height:110px;padding:0;border:0;border-radius:9px;overflow:hidden;background:var(--green);color:#fffdf5;text-align:center}
.activity-intro .activity-location img{display:block;width:100%;height:100%;border-radius:0;object-fit:cover}
.activity-location>span{position:absolute;left:0;right:0;bottom:0;padding:5px 2px;background:#193f35e8;font-size:9px;font-weight:600}
.activity-card{padding:14px;border:1px solid #e3e2d4;border-radius:14px;background:#faf9f2}
.activity-intro{display:flex;gap:13px;align-items:center}
.activity-intro img{width:90px;height:100px;border-radius:9px;object-fit:cover}
.activity-intro>div{flex:1;min-width:0}
.activity-card h2{font-size:23px;line-height:1.12}
.activity-card .task-desc{font-size:11px;line-height:1.5;color:#6f7d66;margin:7px 0}
.activity-status{display:inline-block;font-size:10px;border-radius:20px;background:#dfe7d3;padding:5px 9px}
.activity-measure{font-size:11px;margin-top:15px;display:flex;justify-content:space-between;gap:10px}
.activity-card .progress-track{margin-top:7px;height:8px}
.activity-card .button{width:100%;margin-top:12px}
.reward-preview{display:flex;justify-content:space-around;margin-top:14px;border:1px solid #e1deca;border-radius:10px;padding:10px;font-size:12px}
.reward-preview span+span{border-left:1px solid #dfddcc;padding-left:25px}
.reward-note{text-align:center;color:#748069;font-size:10px;margin-top:10px}
.activity-facts.compact .activity-measure{font-size:10px;line-height:1.4;margin-top:6px;gap:8px;align-items:start}
.activity-facts.compact .activity-measure>span:last-child{white-space:nowrap}
.activity-facts.compact .progress-track{height:6px;margin-top:5px}
.activity-facts.compact .reward-preview{margin-top:7px;padding:6px 4px;font-size:10px;gap:6px}
.activity-facts.compact .reward-preview span+span{padding-left:10px}
.activity-facts.compact .reward-note{font-size:9px;line-height:1.4;margin-top:5px}
.sheet-body .character-card{display:block;border:0;border-radius:0;background:none;padding:0;text-align:left;overflow:visible}
.character-hero{display:grid;grid-template-columns:100px minmax(0,1fr);gap:15px;align-items:center}
.sheet-body .character-card .character-portrait{position:static;float:none;grid-column:1;grid-row:1;width:100px;height:150px;margin:0;background:radial-gradient(ellipse,#e8ecd9,transparent 73%)}
.sheet-body .character-card .character-portrait:before{display:none}
.sheet-body .character-card .character-portrait svg{width:100px;height:140px}
.character-identity{grid-column:2;grid-row:1;min-width:0}
.character-name-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.sheet-body .character-card h2{margin:0;text-align:left;font-size:25px;line-height:1.15;overflow-wrap:anywhere}
.character-wallet{display:grid;grid-template-columns:auto auto;align-items:center;gap:1px 5px;flex:none;padding:6px 9px;border:1px solid #e3d2a7;background:#f6efd9;border-radius:12px;color:#977228;line-height:1.1}
.character-wallet>span:first-child{font-size:18px}
.character-wallet strong{font-size:18px;font-weight:650}
.character-wallet>span:last-child{grid-column:1/-1;text-align:right;font-size:8px;color:#9b875d}
.sheet-body .character-handle{font-size:10px;text-align:left;margin:4px 0 0;color:var(--muted);overflow-wrap:anywhere}
.character-title-label{display:block;font-size:9px;color:#879176;line-height:1.3;margin:9px 0 3px}
.sheet-body .character-level{display:flex;align-items:center;gap:8px;margin:10px 0 0}
.character-level .level-roundel{width:28px;height:28px;font-size:16px;flex:none}
.character-level .xp-label{font-size:9px}
.character-level .progress-track{height:5px}
.equipment-slot-strip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:15px 0}
.equipment-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:62px;padding:7px 2px;border:1px dashed #d9dfcf;border-radius:10px;background:#f7f7ef;color:#9ba68d}
.equipment-slot svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.equipment-slot>span{font-size:8px;line-height:1.2;white-space:nowrap}
.equipment-slot.filled{border-style:solid;border-color:#cad6b9;background:#ebf0e2;color:var(--green)}
.equipment-slot.filled svg{stroke:var(--slot-color)}
.equipment-slot.selected{outline:2px solid #a7bb8b;outline-offset:1px}
.equipment-filter .equipment-all{font-size:11px;min-height:30px}
.equipment-filter .equipment-slot-strip{margin-top:6px}
.equipment-grid>.empty-state{grid-column:1/-1;font-size:12px}
.equipment-loadout{display:grid;grid-template-columns:60px minmax(0,1fr) 60px;gap:12px;align-items:center;margin:0 0 16px}
.equipment-loadout .equipment-slot-strip{display:grid;grid-template-columns:1fr;gap:8px;margin:0}
.equipment-loadout .equipment-slot{min-height:60px;padding:6px 3px;gap:3px}
.equipment-avatar{min-width:0;background:radial-gradient(ellipse at 50% 65%,#e5ead8,transparent 70%)}
.equipment-avatar>svg{display:block;width:100%;height:220px;margin:0 auto}
.equipment-loadout .equipped-slot-art{height:32px;width:40px;display:grid;place-items:center}
.equipment-loadout .equipped-slot-art svg{width:100%;height:100%;stroke:none}
.equipment-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:8px;margin-bottom:10px}
.equipment-toolbar select,.equipment-toolbar input{width:100%;min-width:0;min-height:42px;padding:8px 10px;border:1px solid #dce1d0;border-radius:10px;font-size:12px;background-color:#f7f7ef;color:var(--green)}
.sheet-body #equipment-items{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:250px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:3px;margin-bottom:12px;border-radius:10px;align-content:start}
.gear-item{position:relative;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:9px 7px;border:1px solid #e2e3d5;border-radius:12px;background:#faf9f2;color:var(--green);text-align:left}
.gear-item:hover{background:#f0f3e6}
.gear-item.equipped{border-color:#adc096;background:#eef2e5}
.gear-item-art{display:grid;place-items:center;height:76px;background:radial-gradient(ellipse,#e4e9d6,transparent 75%)}
.gear-item-art svg{width:100%;height:100%}
.gear-item-name{font-size:11px;font-weight:600;line-height:1.35}
.gear-item-kind{display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px;font-size:9px;color:#7a866d;margin-top:auto}
.gear-wearing{color:#466744;font-size:8px;white-space:nowrap}
dialog.dialog.gear-dialog{max-width:390px;padding:24px}
.gear-detail-kind{font-size:10px;color:#7a866d;margin:0 36px 5px 0}
.gear-dialog h2{font:27px/1.15 var(--serif);letter-spacing:-.4px;padding-right:26px}
.gear-detail-art{height:190px;display:grid;place-items:center;background:radial-gradient(ellipse,#e5ead8,transparent 70%);margin:12px 0}
.gear-detail-art svg{width:100%;height:100%}
.gear-flavor{font:italic 16px/1.5 var(--serif);color:#6b795f;margin-bottom:18px}
.gear-acquisition{display:grid;gap:10px;padding:14px 0;margin-bottom:16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.gear-acquisition>div{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px}
.gear-acquisition dt{font-size:10px;color:#7a866d}
.gear-acquisition dd{font-size:12px;line-height:1.4;margin:0}
.gear-dialog .button{min-height:44px}
.gear-dialog::backdrop{background:#162b234d;backdrop-filter:blur(2px)}
@media(max-width:370px){
.equipment-loadout{grid-template-columns:54px minmax(0,1fr) 54px;gap:8px}
.equipment-loadout .equipment-slot{min-height:54px}
.equipment-avatar>svg{height:190px}
.gear-item-name{font-size:10px}
.gear-item-art{height:65px}
.gear-dialog .gear-detail-art{height:145px}
}
.character-activity .hud-activity{margin:0}
.character-activity .area-activity-title{font-size:16px}
.character-activity .hud-activity-heading{gap:10px}
.character-section .sheet-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding-right:64px}
.character-section .sheet-header h1{margin:0}
.character-header-actions{display:flex;flex-direction:column;align-items:flex-end;gap:0}
.character-header-actions .text-button{min-height:28px;padding:4px 0;font-size:11px;line-height:1.3;color:#718067;text-decoration:underline;text-underline-offset:3px}
.equipment-slot:disabled{opacity:1;cursor:default}
.equipment-slot .equipped-slot-art{width:32px;height:28px;display:grid;place-items:center}
.equipment-slot .equipped-slot-art svg{width:100%;height:100%;stroke:none}
.character-title-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:36px;padding:7px 9px;border:1px solid #dce2d0;border-radius:9px;background:#f6f7ee;color:var(--green);text-align:left;font-size:11px;line-height:1.4}
.character-title-trigger svg{width:13px;height:13px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.character-title-trigger:hover{background:#edf2e3}
dialog.dialog.title-dialog{max-width:440px;padding:26px 20px}
.title-dialog>h2{font:29px/1.2 var(--serif);margin-bottom:18px}
.title-options{max-height:min(58dvh,430px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:3px}
.title-group+ .title-group{margin-top:20px}
.title-group>h3{font:600 10px/1.3 var(--sans);text-transform:uppercase;letter-spacing:1.3px;color:#7c896e;margin:0 0 9px 3px}
.title-option{display:flex;align-items:center;gap:11px;width:100%;padding:12px 11px;border:1px solid #e2e5d7;border-radius:12px;background:#fafaf3;text-align:left;color:var(--green);margin:0 0 8px;min-height:70px}
.title-option:not(:disabled):hover{background:#eef3e4}
.title-option.selected{border-color:#b1c593;background:#edf3e2}
.title-badge{width:36px;height:36px;flex:none;border:1px solid #e0d6b5;border-radius:50%;display:grid;place-items:center;background:#f8f1df;color:#b18d41}
.title-badge svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.4}
.title-option-copy{flex:1;min-width:0;display:grid;gap:5px}
.title-option-copy strong{font:17px/1.2 var(--serif);font-weight:600}
.title-option-copy small{font-size:10px;line-height:1.4;color:#748269}
.title-option-state{flex:none;width:18px;font-size:17px;color:#688651}
.title-option-state svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.title-option.locked{opacity:1;color:#89937e;background:#f4f4ed;border-style:dashed;cursor:default}
.title-option.locked .title-badge{background:#eeeee4;border-color:#e0e1d5;color:#9aa48b}
.title-option.locked small{color:#8a947d}
.sheet-body .character-card.guest-card{display:flex;align-items:center;gap:14px;min-height:0;padding:0}
.sheet-body .guest-card .character-portrait{height:110px;width:80px;flex:none}
.sheet-body .guest-card .character-portrait svg{width:80px;height:110px}
.sheet-body .guest-card .button{margin:0}
@media(max-width:370px){
.character-hero{grid-template-columns:68px minmax(0,1fr);gap:11px}
.sheet-body .character-card .character-portrait{width:68px;height:125px}
.sheet-body .character-card .character-portrait svg{width:68px;height:110px}
.sheet-body .character-card h2{font-size:22px}
.character-wallet{padding:5px 7px}
.character-wallet strong{font-size:16px}
.equipment-slot-strip{gap:5px}
.equipment-slot{min-height:56px}
.equipment-slot svg{width:22px;height:22px}
.equipment-slot>span{font-size:7px}
.character-header-actions .text-button{font-size:10px}
}
#character-style:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,1fr);align-items:center;gap:16px;padding:8px 0 4px}
.sheet-body .wardrobe-preview{padding:0;border:0;margin:0;text-align:center;min-width:0;background:radial-gradient(ellipse at 50% 65%,#e5ead8,transparent 70%)}
.sheet-body .wardrobe-preview>svg{display:block;height:auto;width:100%;max-height:310px;margin:0 auto}
.sheet-body #appearance-controls{min-width:0}
.sheet-body .palette-group{display:grid;gap:18px;margin:0}
.sheet-body .swatch{width:30px;height:30px;flex:none}
.sheet-body .swatches{display:flex;flex-wrap:wrap;gap:8px;padding:4px}
.sheet-body .palette-label{display:block;font-size:11px;margin:0 0 5px}
.sheet-body #character-gender{width:100%;min-height:42px;padding:8px 28px 8px 10px;font-size:12px;border-radius:10px;background-color:#f5f5eb}
.equipment-grid,.sheet-body .shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px}
.sheet-body .shop-item{padding:10px;border-radius:12px;min-width:0}
.sheet-body .item-art{height:70px}
.sheet-body .shop-item h4{font-size:12px;min-height:32px;margin:4px 0}
.sheet-body .shop-item p{font-size:10px;line-height:1.45;margin:0 0 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sheet-body .shop-item button{width:100%;min-height:40px;padding:8px;font-size:11px}
.sheet-body .section-heading{align-items:center;gap:12px;margin-bottom:12px}
.sheet-body .section-heading .segmented{margin:0}
.sheet-body .section-heading .coin-label{white-space:nowrap;font-size:12px}
.full-width{width:100%}
.story-navigation{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.story-navigation select{min-width:0;flex:1;height:44px;margin:0;padding:8px;font-size:12px;background:#f3f4e9}
.story-chapter{border:1px solid var(--line);border-radius:14px;padding:16px;background:#faf9f2}
.story-chapter h2{font-size:25px;margin:6px 0 10px}
.story-chapter>p:not(.eyebrow){font:15px/1.65 var(--serif);white-space:pre-line}
.chapter-summary{margin-top:14px;border-top:1px solid var(--line);padding-top:12px;font-size:11px;color:#68785e}
.chapter-summary p+p{margin-top:5px}
.story-chapter .button{margin-top:14px;width:100%}
.chapter-events{margin-top:12px}
.chapter-events summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:11px}
.chapter-events article{border-top:1px solid var(--line);padding:10px 0}
.chapter-events h3{font:600 12px var(--sans)}
.chapter-events p{font-size:11px;line-height:1.6;margin-top:5px}
.sheet-body .legacy-intro,.sheet-body .legacy-list{padding:0;border:0;background:none}
.sheet-body .legacy-stats{margin:12px 0}
.sheet-body .legacy-entry{padding:12px 0;border-top:1px solid var(--line)}
.sheet-body .legacy-entry h3{font-size:22px}
.sheet-body .legacy-entry p{font-size:12px;margin-top:6px}
.sheet-body .legacy-entry time{font-size:10px}
.sheet-body .empty-state{padding:20px 8px;text-align:center}
.sheet-body .empty-state h3{font-size:24px}
.sheet-body .empty-state p{font-size:12px;margin-top:8px}
.toast{bottom:calc(var(--dock-space) + 12px);z-index:50;max-width:calc(100% - 32px);pointer-events:none;font-size:12px}
.activity-notice{display:flex;align-items:flex-start;gap:10px;padding:12px 13px;background:#f8fbf0f2;border:1px solid #d7e3c8;border-radius:13px;box-shadow:0 5px 18px #173a3020;backdrop-filter:blur(12px);color:var(--green);opacity:1;transform:translateY(0);transition:opacity .55s ease,transform .55s ease}
.activity-notice.is-fading{opacity:0;transform:translateY(-5px)}
.activity-notice-mark{flex:none;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#e2edcf;color:#587744;font-size:14px;margin-top:1px}
.activity-notice>div{min-width:0}
.activity-notice strong{display:block;font:600 17px/1.25 var(--serif)}
.activity-notice p{font-size:11px;line-height:1.45;color:#65765b;margin:5px 0 7px}
.activity-notice #activity-notice-reward{display:block;font-size:10px;line-height:1.3;font-weight:600;color:#8f7337}
@media(max-height:500px){
.activity-notice{padding:5px 10px;gap:8px}
.activity-notice>div{font-size:9px;line-height:1.3}
.activity-notice-mark{width:21px;height:21px;font-size:12px}
.activity-notice strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:2px}
.activity-notice p{display:inline;font-size:9px;line-height:1.3;margin:0}
.activity-notice #activity-notice-reward{display:inline;font-size:9px;margin-left:6px}
}
@media(prefers-reduced-motion:reduce){
.activity-notice{transition:opacity .15s linear;transform:none}
.activity-notice.is-fading{transform:none}
}
.dialog:not(.section-dialog){width:calc(100% - 32px);max-width:540px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 32px);padding:30px 22px;border-radius:22px}
.dialog.owner-dialog{max-width:850px}
.dialog.storyboard-dialog{max-width:610px}
.dialog .dialog-close{right:10px;top:10px}
.dialog>h2{padding-right:25px}
.boot{height:100%;display:grid;place-content:center;background:var(--paper);padding:30px;color:var(--green);text-align:center}
.boot[hidden]{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:600px){
:root{--shell-gap:24px}
.bottom-nav{width:480px;left:50%;right:auto;transform:translateX(-50%);border-bottom:1px solid #e1dece;border-radius:22px;bottom:16px;height:76px;padding:8px}
.section-sheet{width:480px;left:50%;right:auto;transform:translateX(-50%);bottom:92px;max-height:calc(100dvh - 220px);border-radius:25px;border-bottom:1px solid #e5e0cf}
.map-controls{bottom:28px}
.atlas-scene img{height:100px}
.sheet-body{padding:0 22px 20px}
.sheet-header{padding-left:24px}
.bottom-nav .nav-link{font-size:11px}
}
@media(max-width:370px){
:root{--shell-gap:12px}
.sheet-body{padding-left:12px;padding-right:12px}
.sheet-header{padding-left:14px}
.sheet-header h1{font-size:27px}
.activity-intro img{width:74px;height:95px}
.activity-card h2{font-size:21px}
.atlas-scene img{height:70px}
.atlas-scene strong{font-size:16px}
}
@media(max-height:700px){
.section-sheet{max-height:calc(100dvh - var(--dock-space) - env(safe-area-inset-top,0px) - 24px)}
.sheet-header{padding-top:25px;padding-bottom:10px}
.sheet-header h1{font-size:26px}
.atlas-scene img{height:65px}
.daily-brief{padding:11px 13px}
.activity-story{font-size:15px}
.activity-intro img{height:80px}
.sheet-body .item-art{height:50px}
}
@media(min-width:1024px){
.section-sheet{top:24px;right:24px;bottom:auto;left:auto;transform:none;max-height:calc(100dvh - 136px);box-shadow:-10px 10px 50px #1a372525}
.sheet-handle{display:none}
.sheet-header{padding-top:24px}
}
/* Reserve the dock's row until both map-control corners fit beside it. */
@media(min-width:600px) and (max-width:1359px){
.map-controls{bottom:108px}
}
@media(prefers-reduced-motion:no-preference){
.section-dialog[open] .section-sheet{animation:sheet-appear .22s ease-out}
@keyframes sheet-appear{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}
@keyframes side-appear{from{opacity:0;translate:18px 0}to{opacity:1;translate:0 0}}
}
@media(min-width:1024px) and (prefers-reduced-motion:no-preference){
.section-dialog[open] .section-sheet{animation-name:side-appear}
}
/* Character views share one frame; inventory deliberately expands that frame. */
.character-section .section-sheet{height:min(560px,calc(100dvh - var(--dock-space) - env(safe-area-inset-top,0px) - 32px));max-height:calc(100dvh - var(--dock-space) - env(safe-area-inset-top,0px) - 32px)}
.character-section .sheet-body{flex:1;display:flex;flex-direction:column;overflow:hidden}
#character-panel:not([hidden]){display:flex;flex:1;flex-direction:column;min-height:0}
#character-panel>[id^="character-"]:not([hidden]){flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#character-gear:not([hidden]){display:flex;flex-direction:column}
.equipment-loadout{flex:none}
.inventory-launch{display:flex;align-items:center;gap:13px;flex:none;width:100%;padding:13px 15px;border:1px solid #d2dec3;border-radius:14px;background:#edf3e3;color:var(--green);text-align:left}
.inventory-launch:hover{background:#e4edd7}
.inventory-launch-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;background:#dce8cf;border-radius:11px}
.inventory-launch svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.inventory-launch strong{display:block;font:20px/1.2 var(--serif)}
.inventory-launch small{display:block;font-size:10px;line-height:1.4;color:#748269;margin-top:4px}
.inventory-launch .inventory-launch-arrow{margin-left:auto;width:18px;height:18px}
.inventory-launch-arrow svg{width:18px;height:18px}
.inventory-open #character-panel>#character-gear{overflow:hidden}
.inventory-open .equipment-browser{display:flex;flex:1;flex-direction:column;min-height:0}
.inventory-open .equipment-toolbar{flex:none;grid-template-columns:42px minmax(0,1fr) minmax(0,1.2fr)}
#inventory-close{display:grid;place-items:center;width:42px;min-height:42px;padding:0;border:1px solid #dce1d0;border-radius:10px;color:var(--green);background:#f7f7ef}
#inventory-close svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.inventory-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 2px 16px}
.inventory-open .sheet-body #equipment-items{max-height:none;overflow:visible;margin-bottom:12px}
.inventory-open .sheet-body{padding-bottom:0}
@media(max-width:1023px){
.section-dialog[open] .section-sheet{border-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}
.section-dialog[open] .bottom-nav{border-top:1px solid #e4e5d8;border-top-left-radius:0;border-top-right-radius:0;background:var(--card);box-shadow:none}
.inventory-open .section-sheet{top:0;bottom:var(--dock-space);left:0;right:0;width:100%;height:auto;max-height:none;transform:none;border:0;border-radius:0}
.inventory-open .bottom-nav{bottom:0;left:0;right:0;width:100%;height:var(--dock-space);transform:none;border-radius:0;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
.inventory-open .sheet-header{padding-top:calc(16px + env(safe-area-inset-top,0px));padding-bottom:12px}
.inventory-open .sheet-header .dialog-close{top:calc(12px + env(safe-area-inset-top,0px))}
.inventory-open .equipment-loadout{margin-bottom:10px}
.inventory-open .equipment-avatar>svg{height:190px}
.inventory-open .equipment-loadout .equipment-slot{min-height:54px}
.inventory-open .equipment-loadout .equipment-slot-strip{gap:6px}
}
@media(max-width:599px){
.section-dialog[open] .bottom-nav{border-radius:0}
}
@media(max-height:650px) and (max-width:599px){
.inventory-open .sheet-header{padding-top:calc(12px + env(safe-area-inset-top,0px));padding-bottom:9px}
.inventory-open .sheet-header h1{font-size:25px}
.inventory-open .equipment-loadout{margin-bottom:8px}
.inventory-open .equipment-avatar>svg{height:144px}
.inventory-open .equipment-loadout .equipment-slot{min-height:44px;padding:3px}
.inventory-open .equipment-loadout .equipment-slot-strip{gap:4px}
.inventory-open .equipment-loadout .equipment-slot svg{width:22px;height:22px}
.inventory-open .equipment-loadout .equipped-slot-art{height:24px}
}
@media(min-width:600px) and (max-width:1023px) and (max-height:500px){
.inventory-open .sheet-header{padding-top:8px;padding-bottom:6px}
.inventory-open .sheet-header h1{font-size:24px}
.inventory-open .sheet-header .dialog-close{top:4px}
.inventory-open .character-header-actions .text-button{min-height:20px;font-size:10px}
.inventory-open .segmented button{min-height:34px;padding:5px 8px}
.inventory-open .equipment-loadout{grid-template-columns:minmax(0,1fr) 80px minmax(0,1fr);gap:8px;margin-bottom:6px}
.inventory-open .equipment-avatar>svg{height:64px}
.inventory-open .equipment-loadout .equipment-slot-strip{grid-template-columns:repeat(3,minmax(0,64px));justify-content:center;gap:6px}
.inventory-open .equipment-loadout .equipment-slot{min-height:50px}
}
@media(min-width:1024px){
.character-section .section-sheet{height:min(560px,calc(100dvh - 136px));max-height:calc(100dvh - 136px)}
.character-section.inventory-open .section-sheet{height:min(760px,calc(100dvh - 136px))}
}
.character-tag small{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.atlas-activity .task-desc{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.atlas-scene-full .atlas-activity .task-desc{display:block}
/* Character navigation stays pinned between its content and the main dock. */
.character-views.segmented{flex:none;display:flex;gap:4px;margin:0;padding:6px 10px;border:0;border-top:1px solid #e4e5d8;border-radius:0;background:#f5f6ed}
.character-views button{min-height:40px;padding:8px 6px;border-radius:9px}
.character-section .sheet-header h1{overflow-wrap:anywhere}
#character-profile .character-hero{grid-template-columns:112px minmax(0,1fr);gap:16px;align-items:center}
#character-profile .character-portrait{width:112px;height:164px}
#character-profile .character-portrait svg{width:112px;height:156px}
.character-stats-top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.character-stats-top .character-wallet{margin-left:auto}
.character-stats-top .character-handle{margin:0;min-width:0}
#character-profile .character-level{margin-top:10px}
.character-title-trigger{box-sizing:border-box;white-space:normal;height:auto}
.character-title-trigger>span{min-width:0;white-space:normal;overflow-wrap:anywhere}
.equipment-shop-link{flex:none;display:block;width:100%;min-height:40px;margin-top:auto;padding:10px 6px 4px;text-align:center;font-size:12px;color:var(--green);text-decoration:underline;text-underline-offset:3px}
.equipment-preview{display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
#character-panel>#character-gear{overflow:hidden}
.inventory-open .equipment-preview{flex:none;overflow:visible}
.inventory-open .equipment-shop-link{margin-top:6px;padding:6px;min-height:40px}
.gear-equipment-link{margin-top:9px}
@media(max-width:370px){
#character-profile .character-hero{grid-template-columns:86px minmax(0,1fr);gap:12px}
#character-profile .character-portrait{width:86px;height:148px}
#character-profile .character-portrait svg{width:86px;height:140px}
.character-views.segmented{padding:6px}
.character-views button{font-size:10px;padding:8px 4px}
}
@media(min-width:600px) and (max-width:1023px) and (max-height:500px){
.inventory-open .character-views.segmented{padding:4px 6px}
.inventory-open .character-views button{min-height:34px;padding:5px}
.inventory-open .equipment-toolbar{margin-bottom:6px}
.inventory-open .equipment-shop-link{min-height:32px;margin-top:4px;padding:4px}
.inventory-open .character-header-actions{flex-direction:row;gap:12px}
}
