:root{color-scheme:dark;--bg:#10191c;--panel:#172427;--line:#334044;--gold:#e0bc7a;--muted:#a4b5b4;--text:#edf0e9;--green:#81c6b1;--red:#e29d8f;font-family:"Microsoft YaHei","PingFang SC",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 30% 0,#253b3c 0,transparent 65%),var(--bg);min-height:100vh}button,input,select{font:inherit}button{cursor:pointer;color:var(--text);border:1px solid #52615e;background:#263735;padding:.7rem 1rem;border-radius:7px;transition:background .18s,transform .18s}button:hover:not(:disabled){background:#3b514b;transform:translateY(-1px)}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--gold);outline-offset:4px}button.primary{background:var(--gold);border-color:var(--gold);color:#202a27;font-weight:700}button.primary:hover:not(:disabled){background:#efd298}.topbar{max-width:1480px;margin:auto;padding:24px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;align-items:center;gap:14px}.seal{font-family:serif;font-size:28px;color:var(--gold);border:1px solid var(--gold);padding:3px 10px;border-radius:3px}h1{font-family:"STKaiti","KaiTi",serif;margin:0;font-size:27px;letter-spacing:3px}h2{font-family:"STKaiti","KaiTi",serif;font-size:27px;font-weight:500;margin:8px 0 20px}h3{font-size:17px;margin:0 0 10px}p{line-height:1.75;margin:8px 0}.brand p,.eyebrow{font-size:13px;color:var(--gold);letter-spacing:2px}.chapter-tag{font-size:14px;color:var(--muted)}.shell{max-width:1480px;margin:auto;padding:24px 32px;display:grid;grid-template-columns:minmax(340px,1fr) minmax(320px,1fr);gap:24px;align-items:start}.panel{background:linear-gradient(135deg,#1c2d2fd9,#152125ef);border:1px solid var(--line);padding:26px;border-radius:12px;min-width:0}.wheel-panel{text-align:center;position:relative;overflow:hidden}.wheel-wrap{position:relative;width:min(340px,90%);aspect-ratio:1;margin:30px auto}.wheel{position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(from 0deg,#33534d 0deg 39.5deg,#ae915c 39.5deg 40deg,#294440 40deg 79.5deg,#ae915c 79.5deg 80deg);border:8px double #b49b69;box-shadow:0 0 0 8px #172326,0 0 0 9px #867653,0 0 55px #d3ae6422,inset 0 0 35px #0008;transition:transform 1.5s cubic-bezier(.14,.74,.19,1)}.wheel:after{content:"";position:absolute;inset:22%;border:1px solid #c4a36d88;border-radius:50%}.wheel-word{position:absolute;top:50%;left:50%;font-family:serif;font-size:20px;color:#eed6a7;transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-119px) rotate(calc(-1 * var(--angle)));white-space:nowrap}.wheel-hub{position:absolute;inset:34%;border:2px solid #a78e60;border-radius:50%;background:radial-gradient(#344d46,#1b2e2b);display:grid;place-content:center;font-family:"KaiTi",serif;color:var(--gold);font-size:26px;line-height:1.4;box-shadow:0 5px 20px #0009;pointer-events:none}.pointer{position:absolute;top:-19px;left:calc(50% - 10px);width:20px;height:28px;background:var(--gold);clip-path:polygon(0 0,100% 0,50% 100%);filter:drop-shadow(0 3px 3px #000)}.card{border:1px solid var(--line);border-radius:8px;padding:16px;margin:12px 0;background:#11202466}.muted{color:var(--muted);font-size:14px}.eyebrow{margin:0}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.toolbar button{font-size:14px;padding:8px 12px}.stats{max-width:1416px;margin:22px auto 0;display:grid;grid-template-columns:1.25fr 1.6fr repeat(3,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden}.stat{padding:16px 22px;background:#17272a;min-width:0}.stat label{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}.stat strong{font-size:24px;font-weight:500;color:var(--gold)}.stat small{color:var(--muted);font-size:13px}.bar{height:5px;border-radius:8px;background:#344647;overflow:hidden;margin-top:9px}.bar i{display:block;height:100%;background:var(--gold)}.game-grid{grid-template-columns:minmax(330px,.95fr) minmax(450px,1.35fr)}.nav{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}.nav button{background:transparent;border-color:transparent;color:var(--muted);font-size:15px}.nav .active{border-color:#a58b58;color:var(--gold);background:#aa8f5212}.section-head{display:flex;justify-content:space-between;align-items:start;gap:12px}.section-head h2{margin-top:0}.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.action{padding:17px;text-align:left;display:block;min-width:0}.action strong{display:block;color:var(--gold);font-size:17px}.action small{display:block;color:var(--muted);font-size:13px;line-height:1.6;margin-top:6px}.pill{border:1px solid #617c71;color:var(--green);font-size:12px;padding:3px 7px;border-radius:4px;white-space:nowrap}.pill.dim{color:var(--muted);border-color:var(--line)}.pill.gold{color:var(--gold);border-color:#957744}.row{display:flex;justify-content:space-between;align-items:center;gap:12px}.stack{display:grid;gap:12px}.card p{font-size:14px;color:var(--muted)}.card .toolbar{margin-top:12px}.positive{color:var(--green)}.danger{color:var(--red)}.gold{color:var(--gold)}.log{max-height:210px;overflow:auto;text-align:left;border-top:1px solid var(--line);margin-top:24px;padding-top:16px}.log p{font-size:13px;color:var(--muted);padding-left:14px;border-left:2px solid #72896b;margin-bottom:12px}.log time{color:var(--gold);margin-right:8px}.subtle{background:transparent;border-color:var(--line)}.battle-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;text-align:center}.portrait{font-family:serif;font-size:45px;color:var(--gold);margin:18px auto;background:#30413c;border:1px solid #738263;width:80px;height:80px;display:grid;place-items:center;border-radius:50%}.health i{background:var(--green)}.map-path{display:flex;justify-content:space-around;margin:20px 0}.node{padding:12px;border:1px solid var(--line);border-radius:50%;color:var(--muted)}.node.current{color:var(--gold);border-color:var(--gold);background:#caa55c16}dialog{color:var(--text);background:var(--panel);border:1px solid #7b785b;border-radius:12px;padding:28px;width:min(520px,90vw);max-height:85vh}dialog::backdrop{background:#030a0bbd}dialog input{background:#102024;color:var(--text);border:1px solid var(--line);padding:12px;width:100%;border-radius:6px;margin:12px 0}.footer{max-width:1416px;margin:0 auto;padding:4px 0 24px;color:var(--muted);font-size:12px;text-align:center}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#30473e;color:#fff;border:1px solid #8ca988;padding:12px 22px;border-radius:8px;max-width:90vw;z-index:10;opacity:0;pointer-events:none}#toast.show{opacity:1}.result{border-left:3px solid var(--gold);background:#cda76612;padding:15px;margin:14px 0}.empty{padding:24px 8px;text-align:center;color:var(--muted);line-height:1.8}.item-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.item-grid .card{margin:0}.chapter-score{font-family:serif;font-size:52px;color:var(--gold)}.cost{font-size:13px;color:var(--muted)}.location{display:flex;justify-content:space-between;gap:8px;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line)}@media(max-width:1050px){.stats{margin:18px 24px 0}.shell{padding:20px 24px;gap:16px}.game-grid{grid-template-columns:340px 1fr}.panel{padding:20px}.wheel-word{transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-99px) rotate(calc(-1 * var(--angle)));font-size:18px}.topbar{padding:20px 24px}.stat{padding:14px}.actions{grid-template-columns:1fr}}@media(max-width:790px){.shell,.game-grid{grid-template-columns:1fr;padding:16px}.stats{margin:16px 16px 0;grid-template-columns:repeat(3,1fr)}.stat:first-child{display:none}.stat:nth-child(2){grid-column:span 2}.topbar{padding:16px;flex-wrap:wrap}.chapter-tag{display:none}.toolbar{gap:6px}.toolbar button{font-size:13px}.panel{padding:20px}.wheel-wrap{width:280px;margin:23px auto}.wheel-word{transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-100px) rotate(calc(-1 * var(--angle)))}.wheel-hub{font-size:23px}.wheel-panel h2{margin-bottom:0}.log{max-height:140px}.actions{grid-template-columns:1fr 1fr}.nav{gap:0}.nav button{padding:10px}.footer{padding:10px 16px 30px}.item-grid{grid-template-columns:1fr}body{padding-bottom:env(safe-area-inset-bottom)}}@media(max-width:370px){.actions{grid-template-columns:1fr}.wheel-wrap{width:240px}.wheel-word{transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-85px) rotate(calc(-1 * var(--angle)));font-size:17px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

.wheel-word>span{display:inline-block;transform:rotate(calc(-1 * var(--wheel-rotation,0deg)));transition:transform 1.5s cubic-bezier(.14,.74,.19,1)}
.training-panel{text-align:center}.training-panel .wheel-wrap{width:240px;max-width:100%;margin:28px auto}.training-wheel{background:conic-gradient(#304943 0deg 89.5deg,#ae915c 89.5deg 90deg,#466053 90deg 179.5deg,#ae915c 179.5deg 180deg,#59634c 180deg 269.5deg,#ae915c 269.5deg 270deg,#6c6547 270deg 359.5deg,#ae915c 359.5deg 360deg)}.training-wheel .wheel-word{transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-80px) rotate(calc(-1 * var(--angle)));font-size:18px}.destinations{display:grid;gap:8px}.stats .stat strong{font-size:20px}@media(prefers-reduced-motion:reduce){.wheel-word>span{transition:none!important}}

@media(max-width:790px){.stats .stat:first-child{display:block}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat:nth-child(2){grid-column:auto}.stat:last-child{grid-column:span 2}}

/* v0.5: compact progression HUD and visible story guidance. */
.stats{grid-template-columns:1.2fr 1.55fr repeat(4,minmax(0,1fr))}.stat strong{overflow-wrap:anywhere}.story-banner{max-width:1416px;margin:16px auto 0;padding:17px 22px;border:1px solid #897348;border-left:4px solid var(--gold);border-radius:8px;background:linear-gradient(110deg,#62513235,#213a332e);display:flex;justify-content:space-between;align-items:center;gap:20px}.story-banner strong{color:var(--gold);font-size:17px}.story-banner p{font-size:14px;color:var(--muted);margin:5px 0 0}.story-banner>div{min-width:0}.story-banner button{flex-shrink:0;min-height:44px}.family-contest .row{flex-wrap:wrap}.family-contest .pill{white-space:normal;line-height:1.7}.family-contest .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.childhood-actions{grid-template-columns:1fr}.training-panel{border-color:#86744d}.training-panel .row{align-items:center}.training-panel .row h3{margin:0}.training-panel .row button{min-height:44px}.nav button[data-page="story"]{color:var(--gold)}
@media(max-width:1050px){.story-banner{margin:16px 24px 0}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.stats .stat:first-child{display:block}.stats .stat:nth-child(2){grid-column:auto}}
@media(max-width:790px){.story-banner{margin:16px 16px 0;padding:15px;align-items:start}.story-banner strong{font-size:16px}.story-banner button{font-size:14px}.stats .stat strong{font-size:18px}.stats .stat label{font-size:12px}.stats .stat{padding:13px 12px}.story-banner p{line-height:1.7}.family-contest .toolbar{grid-template-columns:1fr}}
@media(max-width:480px){.story-banner{flex-direction:column;gap:12px}.story-banner button{width:100%}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats .stat:nth-child(2){grid-column:auto}}

/* Birth wheel: four equal visible sectors, with result weights applied by the engine. */
.origin-wheel-wrap{position:relative;width:min(270px,80vw);aspect-ratio:1;margin:26px auto 36px}.origin-wheel{position:absolute;inset:0;border-radius:50%;background:conic-gradient(#345249 0deg 89.5deg,#bca06a 89.5deg 90deg,#50634b 90deg 179.5deg,#bca06a 179.5deg 180deg,#3b554b 180deg 269.5deg,#bca06a 269.5deg 270deg,#5f6549 270deg 359.5deg,#bca06a 359.5deg);border:8px double #b49b69;box-shadow:0 0 0 8px #172326,0 0 0 9px #867653,inset 0 0 35px #0008;transition:transform 1.5s cubic-bezier(.14,.74,.19,1)}.origin-word{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-91px) rotate(calc(-1 * var(--angle)));white-space:nowrap;color:#f1d8a6;font-size:16px}.origin-word>span{display:inline-block;transform:rotate(calc(-1 * var(--wheel-rotation,0deg)));transition:transform 1.5s cubic-bezier(.14,.74,.19,1)}.origin-wheel-wrap .wheel-hub{inset:34%;font-size:20px}.origin-wheel-wrap .pointer{z-index:2}.annual-test,.tri-clan{border-color:#c7a15d}.annual-test h3,.tri-clan h3{color:var(--gold)}@media(max-width:370px){.origin-wheel-wrap{width:230px}.origin-word{transform:translate(-50%,-50%) rotate(var(--angle)) translateY(-76px) rotate(calc(-1 * var(--angle)));font-size:14px}}
@media(max-width:790px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stats .stat:last-child{grid-column:span 2}}
@media(max-width:790px){.stats .stat:last-child{grid-column:auto}}
.wheel-hub{padding:0;cursor:pointer;color:var(--gold);border-color:#a78e60}.wheel-hub:hover:not(:disabled){background:radial-gradient(#415b51,#1b2e2b);transform:none}.grasp-options{grid-template-columns:repeat(2,minmax(0,1fr))}.grasp-options .action{text-align:left}@media(max-width:520px){.grasp-options{grid-template-columns:1fr}}

/* v0.8 responsive HUD and direct wheel interaction */
.wheel{cursor:pointer}
.wheel-hub{pointer-events:auto;cursor:pointer;z-index:1}
.stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.stats .stat:nth-child(1),.stats .stat:nth-child(2){grid-column:span 2}
.stats .stat:last-child{grid-column:span 2}
.stat strong{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.stat label{white-space:normal}
@media(max-width:790px){.stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-left:12px;margin-right:12px}.stats .stat:nth-child(1),.stats .stat:nth-child(2),.stats .stat:last-child{grid-column:span 1}.stats .stat:nth-child(6){grid-column:span 2}.stat strong{font-size:18px}.stat{padding:14px 13px}}
@media(max-width:480px){.stats{grid-template-columns:1fr}.stats .stat:nth-child(1),.stats .stat:nth-child(2),.stats .stat:last-child,.stats .stat:nth-child(6){grid-column:span 1}.stat strong{font-size:17px}}


/* Status HUD: the two resource bars share a row; compact values and gear fill the rest. */
.log p{white-space:pre-line}
.stats.hud{grid-template-columns:repeat(12,minmax(0,1fr))}
.stats.hud .stat{grid-column:auto;display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;padding:14px 18px}
.stats.hud .hud-identity,.stats.hud .hud-realm,.stats.hud .hud-health{grid-column:span 4;min-height:112px}
.stats.hud .hud-metric{grid-column:span 3;min-height:75px}
.stats.hud .hud-config{grid-column:span 3;min-height:92px}
.stats.hud .stat label{margin:0;color:var(--muted)}
.stats.hud .stat strong{font-size:clamp(17px,1.7vw,23px);line-height:1.3;overflow-wrap:anywhere}
.stats.hud .hud-metric strong{font-size:clamp(18px,1.6vw,22px)}
.stats.hud .hud-config strong{font-size:18px}
.stats.hud .stat small{display:block;line-height:1.45;overflow-wrap:anywhere}
.stats.hud .bar{width:100%;margin-top:7px}
.stats.hud .hud-equipment small{max-width:100%}
@media(max-width:1050px){.stats.hud{grid-template-columns:repeat(4,minmax(0,1fr))}.stats.hud .hud-identity,.stats.hud .hud-realm,.stats.hud .hud-health{grid-column:span 2}.stats.hud .hud-metric{grid-column:span 1}.stats.hud .hud-config{grid-column:span 2}}
@media(max-width:620px){.stats.hud{grid-template-columns:repeat(2,minmax(0,1fr))}.stats.hud .stat{padding:12px}.stats.hud .hud-identity,.stats.hud .hud-realm,.stats.hud .hud-metric,.stats.hud .hud-config{grid-column:span 1;min-height:70px}.stats.hud .hud-health{grid-column:span 2}.stats.hud .hud-config strong{font-size:16px}}

/* Always-visible character overview; the underlying game state drives each render. */
.attribute-overview{max-width:1416px;margin:14px auto 0;padding:16px 18px;background:linear-gradient(135deg,#1b2b2ed9,#152125ef);border:1px solid var(--line);border-radius:10px;min-width:0}
.attribute-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.attribute-heading h2{font-size:21px;margin:0;color:var(--gold)}
.attribute-heading>span{font-size:12px;color:var(--muted)}
.attribute-groups{display:grid;grid-template-columns:1fr 1.1fr 1.45fr;gap:14px;align-items:start}
.attribute-group{min-width:0}
.attribute-group h3{font-size:13px;color:var(--muted);font-weight:500;letter-spacing:1px;margin:0 0 9px}
.attribute-trio{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.attribute-tile{border:1px solid #3b504f;background:#10202188;border-radius:7px;min-width:0;padding:10px 9px;display:flex;flex-direction:column;gap:4px}
.attribute-label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:5px}
.attribute-tile>strong{font-size:clamp(18px,1.65vw,24px);font-weight:500;color:var(--gold);font-variant-numeric:tabular-nums;line-height:1.25;overflow-wrap:anywhere}
.attribute-tile small{display:block;font-size:11px;line-height:1.6;overflow-wrap:anywhere;color:var(--muted)}
.attribute-tile small.positive{color:var(--green)}.attribute-tile small.danger{color:var(--red)}.attribute-tile small.gold{color:var(--gold)}
.attribute-foot{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:9px;font-size:12px;color:var(--muted)}
.attribute-foot b{color:var(--text);font-weight:500;font-variant-numeric:tabular-nums}
.attribute-note{font-size:11px;line-height:1.6;color:var(--muted);margin:7px 0 0}
.element-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.element-tile{padding:8px;gap:3px}.element-tile>strong{font-size:19px}.element-tile>strong>small{display:inline;margin-left:4px}
.element-tile.dormant{background:#13202255;border-color:#2e4142}.element-tile.dormant>strong{color:#94a9a4}
.element-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--muted);flex-shrink:0}
[data-element="fire"] .element-dot{background:#eea483}[data-element="water"] .element-dot{background:#8bbde5}[data-element="wood"] .element-dot{background:#97ce9b}[data-element="rock"] .element-dot{background:#bca889}[data-element="dark"] .element-dot{background:#af9dce}[data-element="poison"] .element-dot{background:#b7c679}[data-element="ice"] .element-dot{background:#b3e0e6}[data-element="thunder"] .element-dot{background:#d5b6ef}
@media(max-width:1480px){.attribute-overview{margin-left:32px;margin-right:32px}}
@media(max-width:1100px){.attribute-groups{grid-template-columns:repeat(2,minmax(0,1fr))}.attribute-elements{grid-column:1/-1}.element-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:620px){.attribute-overview{margin:12px 14px 0;padding:14px}.attribute-groups{grid-template-columns:minmax(0,1fr);gap:16px}.attribute-elements{grid-column:auto}.element-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.attribute-heading h2{font-size:19px}.attribute-tile>strong{font-size:21px}.element-tile>strong{font-size:19px}}
.item-heading{align-items:flex-start;flex-wrap:wrap}.item-heading h3{margin:0;min-width:0;overflow-wrap:anywhere}.item-heading .pill{white-space:normal;text-align:center}.auction-focus{text-align:center;padding:30px}.auction-focus .pill{display:inline-block;margin:2px 0 8px}

/* Inventory and recipe filters share touch-friendly, wrapping controls. */
.bag-select,.craft-filters>label{display:flex;flex-direction:column;gap:6px;min-width:0;margin:8px 10px 8px 0;max-width:100%}
.bag-select select,.craft-filters select{max-width:100%;min-height:40px;padding:7px 10px;border:1px solid #526564;border-radius:6px;background:#1b2a2b;color:#e1e9e8;font:inherit}
.craft-filters .craft-toggle{flex-direction:row;align-items:center;gap:8px}
.bag-select select:focus-visible,.craft-filters select:focus-visible{outline:2px solid #d9b76f;outline-offset:2px}
[data-bag-filter][aria-pressed="true"]{border-color:#d9b76f;color:#f6d698;background:#35413b}

.craft-recipe>.row{flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;gap:8px}
.craft-recipe>.row h3{flex:1 1 100%;min-width:0;margin:0}
.craft-recipe>.row .pill{white-space:normal}

/* Companion cards use fluid grids within the existing game panel. */
.companion-panel{margin-top:2rem;min-width:0}
.companion-roster,.companion-candidate-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.companion-card,.companion-candidate{min-width:0;margin:0;overflow-wrap:anywhere}
.companion-card-heading{align-items:flex-start;gap:12px}
.companion-card-heading h3{margin-bottom:6px}
.companion-trust{display:flex;align-items:center;gap:12px;margin:12px 0 18px}
.companion-trust>.companion-meter{flex:1}
.companion-trust strong{white-space:nowrap;font-size:16px}
.companion-trust strong span{font-size:12px;color:var(--muted,#abc0c4)}
.companion-meter{height:7px;background:#ffffff18;border-radius:20px;overflow:hidden}
.companion-meter i{height:100%;display:block;background:#d9bd7f;border-radius:inherit}
.companion-meter.health i{background:#8abfb0}
.companion-meter.qi i{background:#85aeca}
.companion-battle-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}
.companion-meter-block{grid-column:span 2;padding:12px;background:#ffffff05;border:1px solid #ffffff12;border-radius:10px;min-width:0}
.companion-meter-block .row{margin-bottom:10px;gap:6px;font-size:14px;flex-wrap:wrap}
.companion-metric,.companion-slot{background:#ffffff05;border:1px solid #ffffff12;border-radius:10px;padding:12px;min-width:0}
.companion-metric small,.companion-slot small{display:block;color:var(--muted,#abc0c4);line-height:1.5}
.companion-metric strong,.companion-slot strong{display:block;font-size:18px;margin-top:5px;overflow-wrap:anywhere}
.companion-gear{display:grid;gap:8px;margin:14px 0;font-size:14px;color:var(--muted,#abc0c4)}
.companion-slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.companion-actions{flex-wrap:wrap;margin-top:14px;gap:8px}
.companion-details,.companion-kind,.companion-support{border-top:1px solid #ffffff18;padding-top:14px;margin-top:16px}
.companion-details summary,.companion-kind summary{cursor:pointer;padding:4px 0;line-height:1.7}
.companion-item-list{display:grid;gap:10px;margin-top:10px}
.companion-item{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid #ffffff18;border-radius:10px}
.companion-item-copy{flex:1 1 220px;min-width:0}
.companion-item-copy p{font-size:13px;line-height:1.7}
.companion-item .row{flex-wrap:wrap;gap:8px}
.companion-checks{padding-left:20px;line-height:1.9;font-size:14px}
.companion-candidates{margin-top:24px}
.companion-story-row{flex-wrap:wrap;gap:10px}
.companion-story-row>div{flex:1 1 200px;min-width:0}
@media(max-width:600px){.companion-battle-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.companion-meter-block{grid-column:1/-1}.companion-metric strong,.companion-slot strong{font-size:16px}.companion-actions>button{flex:1 1 130px}.companion-slot{padding:10px}.companion-trust{gap:8px}}

/* Companion coin allocation: rectangular track, warm gold at full balance. */
.coin-transfer{margin:16px 0;padding:18px;border:1px solid #cbb27c30;border-radius:10px;background:#101b1d66;min-width:0}
.coin-transfer>.row{gap:12px;margin-bottom:14px;flex-wrap:wrap}.coin-transfer label{font-weight:600}.coin-transfer small{color:var(--muted,#a9bec0)}
.coin-track{height:44px;position:relative;border-radius:7px;background:#89959418;isolation:isolate}
.coin-fill{position:absolute;inset:0;width:100%;clip-path:inset(0 calc(100% - var(--coin-fill)) 0 0);border-radius:4px;background:linear-gradient(90deg,#929a9625,hsla(43,var(--coin-saturation),var(--coin-light),var(--coin-alpha)));pointer-events:none;overflow:hidden;transition:background .15s,box-shadow .25s}
.coin-full .coin-fill{box-shadow:0 0 19px #eec76532,inset 0 1px 0 #fff1bd70}
.coin-range{appearance:none!important;-webkit-appearance:none!important;position:absolute;inset:0;width:100%!important;height:44px!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;cursor:ew-resize;border-radius:7px;z-index:2;box-shadow:none!important}
.coin-range::-webkit-slider-runnable-track{height:44px;background:transparent}.coin-range::-moz-range-track{height:44px;background:transparent}
.coin-range::-webkit-slider-thumb{appearance:none;width:24px;height:44px;background:#f5eddb;border:2px solid #fff9ec;border-radius:6px;box-shadow:0 2px 9px #0004}
.coin-range::-moz-range-thumb{width:20px;height:40px;background:#f5eddb;border:2px solid #fff9ec;border-radius:6px;box-shadow:0 2px 9px #0004}
.coin-range:focus-visible{outline:2px solid #f2cd75!important;outline-offset:5px}.coin-range:disabled{opacity:.35;cursor:not-allowed}
.coin-stars{position:absolute;inset:0;opacity:0;transition:opacity .3s}.coin-full .coin-stars{opacity:1}.coin-stars i{position:absolute;left:var(--x);top:var(--y);color:#fff4c5;font-style:normal;font-size:13px;text-shadow:0 0 7px #fff1a7;animation:coin-drift 3s ease-in-out var(--delay) infinite;animation-play-state:paused}.coin-full .coin-stars i{animation-play-state:running}
@keyframes coin-drift{0%,100%{transform:translateY(3px);opacity:.4}50%{transform:translateY(-4px);opacity:1}}
.coin-scale{display:flex;justify-content:space-between;font-size:12px;color:#a7b3af;margin:7px 0 13px}.coin-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:10px}.coin-controls label{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.coin-controls input{width:100%;min-width:0;max-width:220px;font-variant-numeric:tabular-nums}.coin-controls button{white-space:normal;overflow-wrap:anywhere}.coin-transfer>small{display:block;line-height:1.6}
@media(max-width:540px){.coin-transfer{padding:13px}.coin-controls{align-items:stretch}.coin-controls label,.coin-controls button{flex:1 1 100%}.coin-controls input{max-width:none}}
@media(prefers-reduced-motion:reduce){.coin-stars i{animation:none}.coin-fill,.coin-stars{transition:none}}

.coin-controls label{white-space:nowrap}.coin-controls input{flex:1;border:1px solid #cab78555;border-radius:6px;background:#122224;color:#f4dfad;padding:9px 11px;font:inherit;min-height:42px}.coin-controls input:focus-visible{outline:2px solid #f2cd75;outline-offset:2px}.coin-full .coin-stars{opacity:1;transition:none}.coin-stars i{font-size:16px;text-shadow:0 0 5px #fff6d9,0 0 10px #f2c559}

/* Keep the paint layer full size: reveal by clipping, never stretch the gradient. */
.coin-track{height:44px;min-height:44px;max-height:44px;border-radius:4px;contain:layout;overflow:hidden}
.coin-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.coin-controls label{min-width:0}.coin-controls button{width:100%;min-width:0;font-variant-numeric:tabular-nums;transform:none!important}.coin-controls input{max-width:none}
.coin-transfer>.row{min-height:24px}.coin-transfer>small{min-height:44px;font-variant-numeric:tabular-nums}
.companion-battle-card{text-align:center}.companion-identity{display:flex;align-items:center;gap:16px;min-width:0}.companion-identity .portrait{margin:0;flex:0 0 64px;width:64px;height:64px;font-size:36px}
@media(max-width:540px){.coin-controls{grid-template-columns:minmax(0,1fr)}.coin-controls button{min-height:46px}}

/* Resource palettes share the fixed, clipped paint layer. */
.coin-transfer{--resource-hue:43;--resource-start:#929a9625;--resource-star:#fff4c5;--resource-full:#eec76532}
.coin-fill{background:linear-gradient(90deg,var(--resource-start),hsla(var(--resource-hue),var(--coin-saturation),var(--coin-light),var(--coin-alpha)))}
.coin-full .coin-fill{box-shadow:inset 0 0 18px var(--resource-full),inset 0 1px 0 #ffffff50}
.coin-stars i{color:var(--resource-star);text-shadow:0 0 6px var(--resource-star)}
.tone-green{--resource-hue:145;--resource-start:#a8dcc020;--resource-star:#c9ffe0;--resource-full:#45d88245}
.tone-black{--resource-hue:220;--resource-start:#00000018;--resource-star:#d8e4f7;--resource-full:#99b6d655}
.tone-black .coin-fill{background:linear-gradient(90deg,#00000010,rgba(8,12,18,var(--coin-alpha)),rgba(56,66,84,var(--coin-alpha)));border-bottom:1px solid #99afc744}
.tone-blue{--resource-hue:210;--resource-start:#e5f3ff18;--resource-star:#effaff;--resource-full:#9ad4ff50}
.tone-blue .coin-fill{background:linear-gradient(90deg,#ffffff10,hsla(207,var(--coin-saturation),calc(var(--coin-light) + 15%),var(--coin-alpha)))}
.tone-purple{--resource-hue:285;--resource-start:#f4b6d820;--resource-star:#ffe0f8;--resource-full:#ed95fa45}
.resource-item{padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:#101b1d55;min-width:0}
.resource-item>summary{cursor:pointer;line-height:1.8;overflow-wrap:anywhere}.resource-item>summary .pill{display:inline-block;margin-left:10px;white-space:normal}
.resource-item .coin-transfer{margin:12px 0 0}.resource-filters{margin:15px 0}.resource-filters label{display:flex;gap:8px;align-items:center}.resource-filters select{max-width:100%;background:#132427;color:var(--text);border:1px solid var(--line);padding:8px;border-radius:5px}
.resource-items{margin-bottom:10px}.companion-item-list .coin-transfer{width:100%}

.tone-green .coin-fill{background:linear-gradient(90deg,#b2edd322,rgba(25,174,91,var(--coin-alpha)))}

/* One companion at a time: horizontal navigation without interfering with resource sliders. */
.companion-carousel{min-width:0}
.companion-carousel-nav{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;gap:12px;align-items:center;margin:18px 0 12px}
.companion-carousel-nav>button{padding:10px;min-height:44px;font-size:23px}
.companion-carousel-title{text-align:center;display:grid;gap:4px;min-width:0}
.companion-carousel-title span{font-size:13px;color:var(--muted)}
.companion-carousel-tabs{display:flex;gap:8px;overflow-x:auto;max-width:100%;padding:4px 0 12px}
.companion-carousel-tabs>button{flex:0 0 auto;white-space:nowrap;padding:10px 14px;font-size:14px}
.companion-carousel-tabs>button.active{border-color:#d9bd7f;background:#d9bd7f22;color:#edcc88}
.companion-carousel-viewport{overflow:hidden;touch-action:pan-y;min-width:0}
.companion-growth{font-size:13px;line-height:1.6;margin-top:8px}
.companion-roster.slide-next{animation:companion-next .2s ease-out}
.companion-roster.slide-previous{animation:companion-previous .2s ease-out}
@keyframes companion-next{from{opacity:.55;transform:translateX(28px)}to{opacity:1;transform:none}}
@keyframes companion-previous{from{opacity:.55;transform:translateX(-28px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.companion-roster.slide-next,.companion-roster.slide-previous{animation:none}}

.consignment-items>.resource-item>summary{display:list-item}
.consignment-items>.resource-item>summary strong{font-size:17px}
.consignment-batch{border-top:1px solid var(--line);padding-top:16px;margin-top:20px}
.consignment-batch>summary{cursor:pointer;line-height:1.8;color:var(--muted)}
.consignment-panel .resource-filters{flex-wrap:wrap}
@media(max-width:600px){.consignment-panel .resource-filters>label{flex:1 1 130px;min-width:0}.consignment-panel .resource-filters select{flex:1;min-width:0}.consignment-items>.resource-item>summary .pill{margin:5px 0 0;display:block;width:fit-content}.consignment-items>.resource-item{padding:12px}}

.explore-progress{flex-wrap:wrap;justify-content:flex-start;gap:10px}.explore-progress .node{display:grid;place-items:center;width:36px;height:36px;padding:0;flex:0 0 36px}.explore-progress .visited{border-color:var(--green);color:var(--green);background:#81c6b110}.exploration-event h3{font-size:20px;margin-top:10px}.exploration-choices .action{height:auto;min-height:110px;overflow-wrap:anywhere}.explore-trade-list{grid-column:1/-1;min-width:0;border:1px solid var(--line);padding:14px;border-radius:8px}.explore-trade-list summary{cursor:pointer;color:var(--gold)}.explore-trade-list .actions{margin-top:14px}@media(max-width:480px){.exploration-choices{grid-template-columns:1fr}.explore-trade-list .actions{grid-template-columns:1fr}}

.faction-panel{min-width:0}.faction-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0}.faction-overview .card{margin:0;min-width:0}.faction-overview small{display:block;color:var(--muted)}.faction-overview strong{display:block;color:var(--gold);font-size:23px;font-weight:500;margin-top:8px;overflow-wrap:anywhere}.faction-departments{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.faction-departments>.card{margin:0;min-width:0}.faction-department .toolbar button{flex:1 1 140px}.faction-monthly .toolbar{margin:14px 0}.faction-panel summary{color:var(--gold);cursor:pointer;line-height:1.6}.faction-stock .row{padding:10px 0;border-bottom:1px solid var(--line)}.companion-quick-actions{margin:14px 0 18px;padding:14px;border:1px solid #a78e6066;background:#cda7660d;border-radius:8px}.companion-quick-actions .toolbar{gap:10px}.companion-quick-actions button{padding:12px 14px;flex:1 1 150px}.companion-quick-actions p{margin-bottom:0}.faction-panel>h3{margin-top:26px}@media(max-width:600px){.faction-departments{grid-template-columns:1fr}.faction-overview strong{font-size:19px}.faction-stock .row{align-items:flex-start}.companion-quick-actions button{flex-basis:100%}}

/* Alchemy workbench and persistent companion development. */
.craft-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:end}
.craft-filters>label{min-width:0;display:flex;flex-direction:column;gap:7px}
.craft-filters input[type=search],.craft-filters select{box-sizing:border-box;min-width:0;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:#ffffff06;color:var(--ink);font:inherit}
.craft-filters input[type=search]::placeholder{color:var(--muted)}
.craft-filters input[type=search]:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.craft-filters>.craft-toggle{grid-column:1/-1;flex-direction:row;align-items:center}
.craft-overview{line-height:1.8;border-color:#cda76655;background:#cda76608}
.craft-overview>p{margin:10px 0 0}.craft-ingredients{padding-left:20px;display:grid;gap:10px}
.craft-ingredient{line-height:1.7;overflow-wrap:anywhere}.craft-ingredient details{padding:6px 0}.craft-ingredient summary{color:var(--gold);cursor:pointer}
.craft-batch-controls{gap:9px}.craft-batch-controls button{min-height:44px}
.companion-development{margin:14px 0 18px;padding:16px;border:1px solid var(--line);border-radius:8px;background:#ffffff03;min-width:0}
.companion-development h4{margin:0 0 12px}.companion-focus-options{display:flex;flex-wrap:wrap;gap:8px}
.companion-development>.row{flex-wrap:wrap;align-items:flex-start}.companion-development>.row>div{flex:1 1 180px;min-width:0}.companion-development>.row>.pill{flex:none;white-space:normal}.companion-development meter{display:block;width:100%;height:14px;margin-top:6px;accent-color:var(--gold)}
.companion-focus-options button{flex:1 1 90px;min-height:44px}.companion-development-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.companion-development-metrics>*{min-width:0;overflow-wrap:anywhere}.companion-development p{line-height:1.8}
@media(max-width:600px){.craft-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.craft-filters>label:first-child{grid-column:1/-1}.craft-batch-controls button{flex:1 1 120px}.companion-development{padding:12px}.companion-development-metrics{grid-template-columns:1fr}}
@media(max-width:360px){.craft-filters{grid-template-columns:1fr}.craft-filters>label:first-child{grid-column:auto}}
.qingshan-chain .actions small{line-height:1.7}
.field-notes{margin:10px 0;color:var(--muted);font-size:13px;line-height:1.7}
.field-notes>summary{cursor:pointer;min-height:32px;padding:5px 0;color:var(--muted)}
.field-notes[open]{padding-bottom:8px;border-bottom:1px solid var(--line)}
.field-notes p{margin:8px 0;overflow-wrap:anywhere}
.field-notes>summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:3px}
.decision-note{padding:10px 13px;border-left:3px solid var(--gold);background:#d7b7770c;color:var(--gold);font-size:14px;line-height:1.65}
.decision-note.danger{border-color:#ef9d8d;color:#ffc0ac;background:#dc745e10}
.risk-note{display:block;color:#ffc0ac;margin-top:7px}
.journey-caption{font-size:13px;color:var(--muted)}
.footer .field-notes{margin:4px auto;max-width:640px}.footer .field-notes>summary{min-height:24px}
@media(max-width:600px){.qingshan-chain .actions{grid-template-columns:1fr}.qingshan-chain .action{text-align:left}}

/* Group encounters keep independent targets readable at narrow widths. */
.battle-pack .card { min-width:0; padding:1rem; }
.battle-pack .card.selected { border-color:var(--gold,#dcc083); box-shadow:inset 0 0 0 1px #dcc08366; }
.battle-pack .card h3 { font-size:1.05rem; }
.battle-pack .card p { font-size:.95rem; }
.battle-pack button { width:100%; }

@media (max-width:640px) { .battle-grid { grid-template-columns:minmax(0,1fr); } .battle-grid .card { padding:1rem; } .battle-grid .portrait { width:64px; height:64px; font-size:2rem; } }

/* Native select menus need an opaque popup surface on Windows. */
select,select option,select optgroup{color-scheme:dark;background-color:#172427;color:#edf0e9}
select option:checked{background-color:#35514b;color:#ffe0a3}
select option:disabled{color:#9aa9a8;background-color:#172427}
select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* Vertical exploration: unknown distance, inspect before committing. */
.exploration-scene{position:relative;isolation:isolate;overflow:hidden;min-height:520px;border:1px solid #53645b;border-radius:14px;padding:24px clamp(12px,3vw,30px);background:radial-gradient(ellipse at 50% 100%,#52634c38,transparent 65%),linear-gradient(180deg,#101c20,#20312f 60%,#182624);margin:16px 0}
.exploration-scene:before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:calc(50% - 22px);width:44px;background:linear-gradient(90deg,transparent,#c5b67b15,transparent);border-left:1px dashed #b5bf9326;border-right:1px dashed #b5bf9326;transform:perspective(500px) rotateX(15deg)}
.exploration-fog{text-align:center;color:#b6c9bb;font-size:26px;padding:0 0 24px;mask-image:linear-gradient(transparent,#000 35%);background:radial-gradient(ellipse,#839c8230,transparent 65%)}
.exploration-fog span{display:block;font-size:12px;letter-spacing:3px}.scene-arrival{text-align:center;background:#142321e8;border:1px solid #94ac8a30;border-radius:10px;padding:14px 18px;max-width:640px;margin:auto}.scene-arrival h3{margin:8px 0;color:var(--gold)}.scene-arrival p{margin:8px 0;line-height:1.7}.scene-hint{text-align:center;font-size:12px;color:var(--muted)}
.scene-encounters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;margin:24px auto;max-width:720px}.encounter-marker{min-width:0;border:1px solid #91ad8255;border-radius:10px;background:#162724ee;overflow:hidden}.encounter-marker summary{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:130px;gap:10px;padding:16px 10px;cursor:pointer;text-align:center;list-style:none;color:var(--gold);font-size:15px}.encounter-marker summary::-webkit-details-marker{display:none}.encounter-marker summary span{overflow-wrap:anywhere}.encounter-marker summary small{font-size:12px;color:var(--muted)}.encounter-icon{width:58px;height:58px;flex-shrink:0;filter:drop-shadow(0 2px 7px #d9bc6b20)}.encounter-marker summary:hover{background:#b9bd8420}.encounter-marker summary:focus-visible{outline:3px solid var(--gold);outline-offset:-4px}.encounter-marker[open]{grid-column:1/-1;border-color:var(--gold)}.encounter-marker[open] summary{min-height:80px;flex-direction:row;border-bottom:1px solid var(--line)}.encounter-decision{padding:16px}.encounter-decision p{margin:0 0 14px;font-size:14px;line-height:1.8}.encounter-decision .action{min-height:44px;width:100%;height:auto}.encounter-marker.unavailable summary{color:#93a29a}.scene-traveler{display:flex;align-items:center;flex-direction:column;gap:8px;color:var(--green);margin:32px auto 0}.scene-traveler i{font-style:normal;font-size:12px;color:var(--muted)}.scene-encounters>.explore-trade-list{background:#182724;grid-column:1/-1}.scene-encounters .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:480px){.exploration-scene{padding:18px 12px}.scene-encounters{gap:10px}.encounter-marker summary{font-size:13px;padding:12px 8px}.scene-arrival{padding:12px}.scene-arrival p{font-size:14px}.scene-encounters .actions{grid-template-columns:1fr}}

.wheel-guidance{margin:12px 0 20px;border-left:3px solid var(--gold);padding:4px 14px;background:#d9ba7410;border-radius:0 8px 8px 0;font-size:14px;line-height:1.75}.wheel-guidance article+article{border-top:1px solid var(--line);padding-top:10px}.wheel-guidance p{margin:6px 0;overflow-wrap:anywhere}.encounter-decision [data-harvest-target]{width:100%;max-width:100%;margin:8px 0 16px}.encounter-decision label{display:block}

.boss-plan{border:1px solid #a8844b;border-left:4px solid var(--gold);border-radius:8px;background:linear-gradient(120deg,#49392366,#182b2b);overflow-wrap:anywhere}.boss-plan .row{flex-wrap:wrap;align-items:flex-start}.boss-plan .actions:empty{display:none}.boss-plan .actions button{min-height:44px;text-align:left;white-space:normal}.boss-mark{display:inline-block;color:#ffd0ab;border-color:#d69362;background:#a3522522;white-space:normal}.companion-battle-card .boss-mark{margin-bottom:8px}
.story-stage .row > button { flex-shrink: 0; min-width: 5em; white-space: nowrap; }

/* Imperial guild trial: quiet progress, explicit costs, room for narrow screens. */
.empire-workbench>summary{cursor:pointer;color:var(--gold);font-size:1.08rem;font-weight:600}
.imperial-contest{margin-top:18px;min-width:0}
.contest-stages{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;list-style:none;padding:0;margin:18px 0}
.contest-stages li{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:12px;border:1px solid var(--line);border-radius:8px;color:var(--muted)}
.contest-stages li span{display:grid;place-items:center;width:25px;height:25px;border:1px solid currentColor;border-radius:50%;flex:none}
.contest-stages li small{display:block;flex-basis:100%;font-size:.8rem}
.contest-stages li.current{border-color:var(--gold);color:var(--gold);background:rgba(222,190,121,.07)}
.contest-stages li.complete{color:var(--green)}
.contest-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:12px;margin:18px 0}
.contest-option{min-width:0;padding:15px;border:1px solid var(--line);border-radius:9px;background:rgba(6,14,15,.17)}
.contest-option h4{margin:0 0 10px}.contest-option p{font-size:.9rem;overflow-wrap:anywhere}
.contest-option button{width:100%;white-space:normal}.contest-option .risk-note{margin-bottom:0}
.contest-receipt{padding:16px;border-left:3px solid var(--gold);background:rgba(222,190,121,.06);margin:16px 0}
@media(max-width:560px){.contest-stages{gap:5px}.contest-stages li{padding:8px;font-size:.9rem}.contest-options{grid-template-columns:1fr}}

.empire-goals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:16px;margin:16px 0}
.empire-goals article{padding:18px;background:rgba(6,14,15,.17);border:1px solid var(--line);border-radius:10px;min-width:0}
.empire-goals h4{color:var(--gold);margin:8px 0}.empire-goals p{font-size:.9rem}
.goal-symbol svg{width:44px;height:44px;color:var(--gold)}
.empire-goals button{width:100%;white-space:normal}
.journey-objectives{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:8px;list-style:none;padding:0;margin:16px 0}
.journey-objectives li{display:flex;gap:12px;justify-content:space-between;padding:10px;background:rgba(6,14,15,.12);border:1px solid var(--line);border-radius:6px;color:var(--muted)}
.journey-objectives .complete{color:var(--green);border-color:rgba(129,198,177,.35)}

/* Yunlan continuous scenes */
.academy-panel{margin:16px 0;min-width:0}.academy-panel>summary{cursor:pointer;color:var(--gold);line-height:1.8;font-weight:600}
.pan-gate-panel{margin:16px 0;min-width:0}.pan-gate-panel>summary{cursor:pointer;color:var(--gold);line-height:1.8;font-weight:600}
.pan-gate-content{margin-top:14px;min-width:0}.pan-gate-content [data-pan-gate-heading]{scroll-margin-top:18px}.pan-gate-content [data-pan-gate-heading]:focus-visible{outline:2px solid var(--gold);outline-offset:5px}
.pan-gate-facts{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.pan-gate-facts span{padding:4px 9px;color:var(--green);border:1px solid #81c6b144;border-radius:5px;font-size:.85rem}
.pan-gate-items{list-style:none;padding:0;margin:14px 0;border-top:1px solid var(--line)}.pan-gate-items li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}.pan-gate-items small{display:block;color:var(--muted);font-size:.78rem}.pan-gate-items strong{white-space:nowrap;font-size:.9rem}
.pan-gate-board{padding-top:18px;margin-top:22px;border-top:1px solid var(--line)}.pan-gate-rewards{line-height:1.8}.pan-gate-content .toolbar{flex-wrap:wrap}
.academy-card{min-width:0;margin-top:14px}.academy-card-header{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 16px;border:1px solid #a98b5755;border-radius:9px;background:linear-gradient(110deg,#a98b571a,#172427)}
.academy-card-header h3{margin:0;flex:1}.academy-card-header strong{color:var(--gold);font-size:1.2rem}.academy-card-header small{color:var(--muted)}
.academy-hunt,.academy-tower{margin:20px 0;min-width:0}.academy-tower{padding-top:18px;border-top:1px solid var(--line)}
.academy-card [data-academy-heading]{color:var(--gold);scroll-margin-top:16px}.academy-card [data-academy-heading]:focus-visible{outline:2px solid var(--gold);outline-offset:5px}
.academy-receipt{margin:16px 0;padding:14px 16px;border-left:3px solid var(--green);background:#81c6b10d}.academy-receipt h4{margin:0 0 8px;color:var(--green)}.academy-receipt p,.academy-intro p{line-height:1.8;overflow-wrap:anywhere}
.academy-tower-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.academy-card .toolbar{flex-wrap:wrap}
@media(max-width:600px){.academy-card-header{padding:12px;gap:8px}.academy-tower-options{grid-template-columns:1fr}.academy-receipt{padding:12px}.academy-card .contest-stages{gap:5px;font-size:.82rem}}
.yunlan-scenes{min-width:0;margin-top:18px}
.yunlan-scenes .contest-stages{grid-template-columns:repeat(4,minmax(0,1fr))}
.yunlan-scene-title{color:var(--gold);scroll-margin-top:20px}
.yunlan-scene-title:focus-visible{outline:2px solid var(--gold);outline-offset:5px;border-radius:3px}
.yunlan-intro p,.yunlan-last-choice p{line-height:1.85;overflow-wrap:anywhere}
.yunlan-last-choice{padding:14px 16px;border-left:3px solid var(--green);background:rgba(129,198,177,.05);margin:16px 0}
.yunlan-last-choice>p:last-child{margin-bottom:0}.yunlan-last-choice h4{margin:0 0 8px;color:var(--green)}
.yunlan-option-preview{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}
.yunlan-option-preview span{border:1px solid var(--line);border-radius:5px;padding:3px 8px;font-size:.8rem;color:var(--muted)}
.yunlan-consequences{border:1px solid rgba(222,190,121,.3);background:rgba(222,190,121,.05);padding:14px;border-radius:8px;margin:16px 0}
.yunlan-consequences h4{margin:0 0 8px;color:var(--gold)}.yunlan-consequences p{margin-bottom:0}
.yunlan-scene-history p{white-space:pre-line;overflow-wrap:anywhere}
.yunlan-escape{margin:18px 0}.yunlan-aftermath{margin:16px 0}.yunlan-aftermath>summary{cursor:pointer;color:var(--gold);line-height:1.8}
@media(max-width:600px){.yunlan-scenes .contest-stages{grid-template-columns:repeat(2,minmax(0,1fr))}.yunlan-scenes .contest-option{padding:13px}.yunlan-scenes .toolbar>button{flex:1 1 160px}.yunlan-last-choice{padding:12px}}

.pan-gate-items .pan-gate-recipe{padding:0;background:none;border:0;color:inherit;text-align:left;width:auto;font-size:inherit;text-decoration:underline;text-decoration-color:#81c6b155;text-underline-offset:4px}

@media(max-width:600px){.pan-gate-content .academy-card-header h3{flex:1 0 100%}.pan-gate-content .academy-card-header strong{flex:1}}

.identity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:12px;margin:14px 0}.identity-grid>div{border:1px solid var(--line);border-radius:8px;padding:12px;min-width:0}.identity-grid strong{color:var(--gold);display:block;overflow-wrap:anywhere}.identity-grid small{display:block;color:var(--muted);line-height:1.8;margin-top:5px}.people-identity{color:var(--gold);overflow-wrap:anywhere}.hud-background{display:block;margin-top:7px;overflow-wrap:anywhere;line-height:1.6}

/* Learned manuals stay distinct from their tradable scrolls. */
.manual-loadout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:16px 0}
.manual-loadout h4{margin:0 0 10px;color:var(--muted)}
.manual-loadout .toolbar{align-items:stretch}
.manual-loadout button{max-width:100%;text-align:left;overflow-wrap:anywhere}
.manual-loadout p{margin:0}
@media(max-width:640px){.manual-loadout{grid-template-columns:1fr;gap:20px}}

/* Expedition preview: only two places ahead, with the traveler below them. */
.expedition-scene{padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right));min-width:0}
.expedition-route-preview{display:flex;flex-direction:column;gap:24px;position:relative;list-style:none;padding:0;margin:0 auto;max-width:760px}
.expedition-route-preview:before{content:"";position:absolute;z-index:-1;left:50%;top:0;bottom:40px;border-left:2px dashed #c4b98055}
.expedition-stop{position:relative;min-width:0;width:100%;margin:0 auto}
.expedition-stop.future{max-width:480px;color:#c9d9d0;cursor:default}
.expedition-stop-marker{display:flex;align-items:center;gap:18px;min-height:104px;padding:16px 20px;border:1px solid #758c7955;border-radius:6px;background:linear-gradient(120deg,#253932,#172926);box-shadow:0 5px 14px #09161344}
.expedition-stop-marker>div{display:flex;flex-direction:column;gap:6px;min-width:0}
.expedition-stop-marker strong{font-size:1rem;line-height:1.5;overflow-wrap:anywhere}
.expedition-stop-marker small,.expedition-stop-marker span{font-size:.78rem;color:#a6b9ae;line-height:1.5}
.expedition-stop.future[data-preview-offset="2"]{opacity:.72}
.expedition-stop.future .encounter-icon{width:52px;height:52px;flex:none;color:#b5c5a0}
.expedition-stop.current{padding:16px;border:1px solid #d9b97b;border-radius:8px;background:#152723f0;box-shadow:0 0 24px #ddbb6b14}
.expedition-position{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;padding:0 0 12px;color:var(--gold)}
.expedition-position>span:last-child{border:1px solid #d9b97b77;border-radius:4px;padding:3px 8px;font-size:.75rem;background:#d9b97b11}
.expedition-position-symbol{display:flex;align-items:center}
.expedition-position-symbol .encounter-icon{width:36px;height:36px}
.expedition-scene .scene-arrival{border:0;background:transparent;padding:4px 8px}
.expedition-scene .scene-encounters{grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:12px;margin:18px auto}
.expedition-scene .encounter-marker{border-radius:6px}
.expedition-scene .encounter-marker summary{flex-direction:row;justify-content:flex-start;min-height:96px;padding:14px;gap:14px;text-align:left}
.expedition-scene .encounter-marker summary span{flex:1;line-height:1.5}
.expedition-scene .encounter-marker summary small{flex-basis:5em}
.expedition-scene .encounter-marker summary .encounter-icon{width:52px;height:52px}
.expedition-scene .encounter-marker summary:focus-visible{outline:3px solid var(--gold);outline-offset:-4px;background:#c5ba8326}
.expedition-scene .encounter-marker[open] summary{min-height:82px}
.expedition-scene .scene-traveler{margin-top:18px}
.expedition-resource-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.expedition-resource-row .action{height:auto;min-height:44px;white-space:normal;overflow-wrap:anywhere}
.expedition-energy{display:flex;flex-direction:column;gap:6px;margin:0;color:var(--gold)}
.expedition-energy strong{font-size:1.1rem;line-height:1.5}
.expedition-energy small{font-size:.8rem;color:var(--muted)}
.expedition-withdraw button{min-height:44px;white-space:normal}
@media(max-width:480px){.expedition-scene{padding-top:18px;padding-bottom:18px}.expedition-route-preview{gap:18px}.expedition-stop-marker{gap:12px;padding:12px 14px;min-height:94px}.expedition-stop.current{padding:12px 8px}.expedition-scene .scene-encounters{grid-template-columns:1fr}.expedition-scene .encounter-marker summary{min-height:88px;padding:12px}.expedition-resource-row{align-items:stretch}.expedition-resource-row .action{width:100%}.expedition-withdraw button{width:100%}}
/* Relic choices share the game's dark cards and keep each reward easy to select. */
.branch-map{margin:22px 0;border:1px solid #819a8b66;border-radius:12px;padding:18px 12px;background:radial-gradient(ellipse at 50% 20%,#40514744,transparent 65%),#12211fe6;overflow:hidden}
.branch-map-fog{display:flex;flex-direction:column;align-items:center;gap:4px;color:#a6b9ae;font-size:28px;line-height:1.2;padding:4px 0 16px}
.branch-map-fog span{font-size:13px;letter-spacing:2px}
.branch-map-board{position:relative;max-width:720px;margin:auto;isolation:isolate}
.branch-map-lines{position:absolute;inset:0;width:100%;height:100%;z-index:-1;overflow:visible;pointer-events:none}
.branch-map-lines path{fill:none;stroke:#7d96864d;stroke-width:1;stroke-dasharray:2 2;vector-effect:non-scaling-stroke}
.branch-map-lines path.lit{stroke:#e0be77;stroke-width:2;stroke-dasharray:none}
.branch-map-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;min-height:144px}
.branch-map-stop{position:relative;min-width:0;text-align:center;justify-self:center;width:min(100%,156px);padding:0 5px}
.branch-map-node{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;min-height:110px;height:auto;padding:10px 6px;border:1px solid #77948166;border-radius:14px;background:#1b2c27;color:#baceb8;text-align:center;white-space:normal;box-shadow:0 3px 14px #08151288}
.branch-map-node .encounter-icon{width:42px;height:42px;flex:none}
.branch-map-node strong{font-size:15px;line-height:1.35}
.branch-map-node small{font-size:11px;line-height:1.4;color:#adc0b2}
.branch-map-stop.future .branch-map-node{opacity:.48}
.branch-map-stop.current .branch-map-node{opacity:1;border-color:var(--gold);color:var(--gold);background:#2d3828;box-shadow:0 0 18px #e9be6326}
.branch-map-stop.reachable .branch-map-node{border-color:#cfb777;color:#e1c887}
.branch-map-stop.kind-elite .branch-map-node,.branch-map-stop.kind-boss .branch-map-node{color:#ebb38b}
.branch-map-stop.reachable .branch-map-node:hover:not(:disabled){background:#344234;border-color:#f1d58e;transform:translateY(-2px)}
.branch-map-node:focus-visible{outline:3px solid #ffe1a0;outline-offset:3px}
.branch-map-mark{position:absolute;left:0;right:0;top:-16px;color:#d3bd83;font-size:10px;line-height:1.4}
.branch-map-guide{margin:15px auto 0;max-width:720px;text-align:center;color:#b0c0b2;font-size:13px;line-height:1.6}
.branch-map-arrival{padding:16px;border:1px solid #71897b55;border-radius:10px;background:#192a26}
.encounter-battle-direct{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:10px;padding:14px;min-height:90px;height:auto;text-align:left;white-space:normal}
.encounter-battle-direct .encounter-icon{width:42px;height:42px;flex:none}.encounter-battle-direct>small{flex-basis:100%;font-size:13px;line-height:1.6;color:var(--muted)}
@media(max-width:480px){.branch-map{padding:16px 6px}.branch-map-row{min-height:124px}.branch-map-stop{padding:0 3px}.branch-map-node{min-height:98px;padding:8px 4px;border-radius:10px}.branch-map-node .encounter-icon{width:34px;height:34px}.branch-map-node strong{font-size:13px}.branch-map-node small{font-size:10px}.branch-map-arrival{padding:12px 8px}}
@media(prefers-reduced-motion:reduce){.branch-map-node{transition:none}.branch-map-stop.reachable .branch-map-node:hover:not(:disabled){transform:none}}
.unique-reward{width:calc(100% - 32px);max-width:1440px;margin:20px auto;border:1px solid #bc995755;border-left:3px solid var(--gold);border-radius:10px}
.unique-reward .item-grid,.expedition-box .item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.unique-reward .card,.expedition-box .card{min-width:0;display:flex;flex-direction:column;align-items:flex-start;overflow-wrap:anywhere}
.unique-reward .card button,.expedition-box .card button{margin-top:auto}
.expedition-box .card.chosen{border-color:var(--green);background:#81c6b10a;opacity:.65}
.flame-collection{margin:24px 0}
@media(max-width:1200px){.expedition-box .item-grid{grid-template-columns:1fr 1fr}.expedition-box .card:last-child{grid-column:1/-1}}
@media(max-width:680px){.unique-reward .item-grid,.expedition-box .item-grid{grid-template-columns:1fr}.unique-reward{width:calc(100% - 24px);margin:12px auto}.expedition-box .card:last-child{grid-column:auto}.camp-services button{max-width:100%;white-space:normal}}

/* Fortune stays compact, with details available on demand. */
.luck-overview{border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin-bottom:16px;background:rgba(219,190,125,.035)}
.luck-overview summary{display:flex;justify-content:space-between;align-items:center;gap:8px;cursor:pointer;color:var(--muted);font-size:13px;flex-wrap:wrap}
.luck-overview summary>span:first-child{color:var(--gold);font-size:16px}.luck-overview b{font-size:22px;margin-left:8px;font-variant-numeric:tabular-nums}
.luck-overview p{font-size:13px;line-height:1.65;color:var(--muted);margin:8px 0 0}.luck-overview.ill-fortune{border-color:rgba(218,151,128,.35)}
.luck-overview.ill-fortune summary>span:first-child{color:#dba48e}

/* Camp services occupy a full map row; depth, recovery and departure are visually separated. */
.camp-layout{grid-column:1/-1;display:grid;gap:16px;min-width:0;width:100%;text-align:left}
.camp-layout .card{min-width:0;margin:0}
.camp-heading,.camp-section-title,.camp-departure{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.camp-heading h2,.camp-section-title h3,.camp-departure h3{margin:0}.camp-heading p,.camp-departure p{margin-bottom:0}
.camp-depth-emblem{display:grid;place-items:center;align-self:stretch;min-width:112px;padding:12px 18px;border:1px solid #b99b5966;border-radius:14px;background:linear-gradient(145deg,#243d38,#182b2c);color:var(--muted);font-size:13px;letter-spacing:.12em;text-align:center}
.camp-depth-emblem strong{display:block;margin-top:2px;color:var(--gold);font-size:36px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:0}
.camp-depth-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}
.camp-depth-grid>div{display:flex;flex-direction:column;gap:5px;min-width:0;padding:13px 14px;border:1px solid #54736b66;border-radius:10px;background:#152a2b}
.camp-depth-grid small{color:var(--muted);font-size:12px}.camp-depth-grid strong{color:#ead29a;font-size:16px;overflow-wrap:anywhere}.camp-depth-grid span{color:var(--muted);font-size:12px;line-height:1.5}
.camp-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.camp-layout button{min-height:44px;max-width:100%;white-space:normal;word-break:normal;overflow-wrap:break-word}
.camp-service{position:relative;display:grid!important;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;column-gap:12px;align-items:center;min-height:88px!important;padding:14px 16px!important;text-align:left!important;background:#183130!important;border-color:#597b71!important}
.camp-service:hover:not(:disabled){transform:translateY(-1px);border-color:#b59b63!important;background:#1e3935!important}.camp-service:disabled{opacity:.58}
.camp-service-mark{grid-row:1/3;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid #b99b5966;background:#2b4038;color:var(--gold);font-family:serif;font-size:18px}
.camp-service strong{align-self:end;color:var(--gold);font-size:16px}.camp-service small{align-self:start;color:var(--muted);font-size:13px;line-height:1.55}
.camp-rest-actions,.camp-exit-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.camp-shop>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;cursor:pointer;color:var(--gold);min-height:48px;font-weight:600}
.camp-shop>summary>span{display:flex;flex-direction:column;gap:3px}.camp-shop>summary small{display:block;color:var(--muted);font-weight:400}.camp-shop>summary b{font-size:14px;color:#e1c887}.camp-shop>summary::before{content:'▸';margin-right:4px}.camp-shop[open]>summary::before{content:'▾'}
.camp-stock{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px;margin-top:18px}
.camp-product{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:18px}
.camp-product .row{flex-wrap:wrap;gap:8px}.camp-product h4{font-size:18px;margin:0}.camp-product p{font-size:14px;line-height:1.7;margin:0;overflow-wrap:break-word}.camp-product small{color:var(--muted)}
.camp-product button{margin-top:auto;width:100%}.camp-shop:focus-within{border-color:var(--gold)}
.camp-departure{align-items:center;border-color:#806d4566!important;background:#172b2a!important}.camp-departure>div:first-child{flex:1 1 360px}.camp-departure .camp-exit-actions{justify-content:flex-end;flex:1 1 320px}.camp-departure .primary{min-width:220px}
@media(max-width:860px){.camp-depth-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.camp-service-grid{grid-template-columns:1fr}.camp-depth-emblem{min-width:96px}.camp-departure .camp-exit-actions{justify-content:flex-start}}
@media(max-width:480px){.camp-layout .card{padding:12px}.camp-heading{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:10px}.camp-depth-emblem{min-width:0;padding:10px 8px}.camp-depth-emblem strong{font-size:30px}.camp-depth-grid{grid-template-columns:1fr 1fr;gap:8px}.camp-depth-grid>div{padding:10px}.camp-depth-grid strong{font-size:14px}.camp-service{grid-template-columns:36px minmax(0,1fr);min-height:82px!important;padding:12px!important}.camp-service-mark{width:34px;height:34px}.camp-exit-actions>button,.camp-exit-actions>.encounter-marker{width:100%}.camp-shop>summary{justify-content:flex-start}.camp-shop>summary b{width:100%;padding-left:22px}.camp-stock{grid-template-columns:1fr}.camp-product button{font-size:14px;padding:10px 6px}.camp-exit-actions .encounter-marker summary{min-height:64px}.camp-departure .primary{min-width:0}}

/* Prominent, touch-friendly battle supplies. */
.battle-relics,.battle-medicine{margin:1rem 0;padding:1rem;border:1px solid var(--gold,#d7b875);border-radius:14px;background:#1b2929;}
.battle-relics>summary,.battle-medicine>summary{font-size:1.15rem;font-weight:700;color:var(--gold,#d7b875);min-height:48px;display:list-item;align-content:center;cursor:pointer;}
.battle-relics .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:.7rem;}
.battle-relics .relic-use{display:flex;flex-direction:column;}
.battle-relics .relic-use button{width:100%;min-height:56px;font-size:1.05rem;border-color:#b99b59;}
.battle-medicine .actions>button{min-height:52px;}
.flame-trail small{display:block;margin:.6rem 0;color:var(--muted,#a8bbb9);line-height:1.65}
.flame-trail .actions{margin:.9rem 0}
.flame-region{margin:.8rem 0;border-top:1px solid rgba(219,190,132,.15);padding:.65rem 0}
.flame-region>summary{color:var(--gold,#ddbd7d);cursor:pointer}
.flame-region>.item-grid{margin-top:.9rem}
.battle-action-feed{margin:1rem 0;padding:1rem;border:1px solid #759c8b;border-radius:12px;background:#142725;overflow-wrap:anywhere}.battle-action-feed h3{margin:0;color:var(--gold)}.battle-recent-actions{max-height:260px;overflow:auto;scrollbar-color:#7eaa98 #142725}.battle-recent-actions p{margin:.55rem 0;padding:.45rem .7rem;border-left:3px solid #7eaa98;background:#31493c44;font-size:.95rem;line-height:1.6}.battle-action-feed .field-notes{margin:.6rem 0 0}

/* Circuit choices and the expedition ledger flow with the available screen width. */
.circuit-plans>.row{align-items:flex-start;flex-wrap:wrap}.circuit-plans h3{margin:0}.circuit-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.circuit-plan{display:flex;flex-direction:column;gap:8px;padding:14px;text-align:left;min-width:0;background:#182d2d;border-color:#5e7972}.circuit-plan strong{font-size:16px;color:var(--gold)}.circuit-plan small{font-size:14px;line-height:1.7;color:var(--muted)}.circuit-plan.chosen{background:#29382c;border-color:var(--gold)}.circuit-plan:disabled{opacity:.7}.circuit-plan.chosen:disabled{opacity:1}.circuit-badge{display:inline-block;margin:0 0 8px;padding:5px 10px;border:1px solid #b09a65;border-radius:20px;color:var(--gold);background:#28392d;font-size:13px;line-height:1.5}
.expedition-haul{background:#152629;min-width:0}.expedition-haul>summary{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;cursor:pointer;min-height:48px;color:var(--gold)}.expedition-haul>summary strong{font-size:17px}.expedition-haul>summary>span{font-size:14px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}.expedition-haul>summary::before,.haul-group>summary::before{content:'▸';color:var(--gold)}.expedition-haul[open]>summary::before,.haul-group[open]>summary::before{content:'▾'}.expedition-haul summary::-webkit-details-marker{display:none}.expedition-haul summary{list-style:none}.expedition-haul .haul-note{font-size:14px;margin-top:12px;color:var(--muted)}.haul-totals{display:flex;flex-wrap:wrap;gap:10px 20px;padding:10px 0;font-size:14px}.haul-totals strong{color:var(--gold);overflow-wrap:anywhere}.haul-group{border-top:1px solid var(--line);margin-top:8px;padding-top:4px;min-width:0}.haul-group>summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:48px;cursor:pointer;color:var(--text);font-size:15px}.haul-group>summary span{margin-left:auto;color:var(--muted);font-size:14px}.haul-items{list-style:none;margin:4px 0 10px;padding:0;display:grid;gap:8px}.haul-items li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:10px 12px;border-radius:6px;background:#1c3132}.haul-items li>span{min-width:0;overflow-wrap:anywhere}.haul-items strong{font-size:15px;font-weight:500}.haul-items small{display:block;margin-top:3px;color:var(--muted);font-size:13px}.haul-items b{font-size:15px;font-weight:500;color:var(--gold);overflow-wrap:anywhere;max-width:45%}.camp-shop>summary:focus-visible,.expedition-haul summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px;border-radius:4px}
@media(max-width:520px){.circuit-plan-grid{grid-template-columns:1fr}.circuit-plan{padding:14px}.expedition-haul{padding:12px}.expedition-haul>summary>span{flex-basis:100%}.haul-totals{gap:8px 16px}.haul-items li{padding:10px}.haul-group>summary span{font-size:13px}.circuit-plans>.row .pill{white-space:normal;line-height:1.6}}

/* Faction development: actionable costs first, with secondary management folded. */
.faction-development{min-width:0;max-width:100%;overflow-wrap:anywhere}
.faction-development .faction-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;margin-bottom:12px}
.faction-development .faction-heading h2{margin:0}.faction-development .faction-heading .eyebrow{margin:0 0 5px}
.faction-development .faction-free{display:inline-block;border:1px solid #7dba9b77;background:#19342b;color:#b8dec6;padding:6px 10px;border-radius:6px;font-size:13px;line-height:1.5}
.faction-development .faction-overview{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.faction-development .faction-overview .card{padding:12px;background:#172c2c}.faction-development .faction-overview strong{font-size:21px;margin-top:6px;font-variant-numeric:tabular-nums}
.faction-development .faction-today{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;padding:10px 12px;border:1px solid #6a9d8577;border-radius:8px;background:#19322d;color:#bad6c8;font-size:14px;line-height:1.6;margin-bottom:12px}
.faction-development .faction-today strong{color:var(--gold)}
.faction-development .card{min-width:0;background:#172b2d}.faction-development .row{flex-wrap:wrap;gap:6px 12px}.faction-development .row>*{min-width:0}
.faction-development h3,.faction-development h4{overflow-wrap:anywhere}.faction-development .row h3,.faction-development .row h4{margin:0;font-size:17px}
.faction-development .faction-departments,.faction-development .faction-development-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0 20px}
.faction-development .faction-departments>.card,.faction-development .faction-development-grid>.card{margin:0;padding:14px}
.faction-development .faction-cost-line{font-size:15px;line-height:1.7;color:var(--gold);margin:10px 0 6px}
.faction-development .faction-cost-line b{color:#b6dfc7;font-weight:600}
.faction-development .faction-department>.cost{margin:0 0 10px}.faction-development .faction-department>button{width:100%;margin-top:4px}
.faction-development .faction-action-status{font-size:13px;line-height:1.7;margin:8px 0 0}.faction-development .faction-recruit{margin-top:12px;border-top:1px solid var(--line);padding-top:4px}.faction-development .faction-recruit summary{font-size:13px}.faction-development .faction-recruit>button{margin-top:8px}
.faction-development details.card>summary{display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;list-style:none;cursor:pointer;min-height:44px;color:var(--gold)}
.faction-development details.card>summary::-webkit-details-marker{display:none}.faction-development details.card>summary::before{content:'▸';color:var(--gold)}.faction-development details.card[open]>summary::before{content:'▾'}
.faction-development details.card>summary>span{font-size:13px;color:var(--muted);line-height:1.7}.faction-development details.card>summary>strong{font-size:16px}
.faction-development .faction-monthly{padding:8px 14px;margin:12px 0}.faction-development .faction-monthly p{font-size:14px;line-height:1.7}
.faction-development .faction-outposts,.faction-development .faction-research{margin:22px 0}.faction-development .faction-upgrade-effect{font-size:14px;line-height:1.75;color:#b7cbbf;margin:10px 0}.faction-development .faction-upgrade-effect>strong{display:block;color:var(--gold);margin-bottom:4px}
.faction-development .faction-material-cost{padding:9px 10px;border:1px solid #647a6455;border-radius:6px;background:#20342e;margin:8px 0 12px;font-size:14px;line-height:1.6}
.faction-development .faction-material-cost>strong,.faction-development .faction-material-cost>span{display:block}.faction-development .faction-material-cost>span{font-size:13px;color:#b5c7b8;margin-top:4px}
.faction-development .faction-outpost-yield{border-left:3px solid #72a78c;padding-left:9px;font-size:14px;line-height:1.75;margin:12px 0;color:#bed9c9}.faction-development .faction-outpost-yield b{font-weight:600}
.faction-development .faction-outpost-upgrade{border-top:1px solid var(--line);padding-top:2px;margin-top:12px}
.faction-development .faction-duty{gap:6px}.faction-development .faction-duty button{flex:1 1 105px;padding:8px;font-size:13px}
.faction-development .faction-research-card>button,.faction-development .faction-outpost-card>button{width:100%}
.faction-development .toolbar{flex-wrap:wrap}.faction-development button{max-width:100%;white-space:normal;overflow-wrap:anywhere;min-height:44px}.faction-development .pill{white-space:normal;line-height:1.6}
.faction-development button:focus-visible,.faction-development summary:focus-visible,.faction-development input:focus-visible{outline:3px solid #f5d58d;outline-offset:3px;border-radius:5px}
.faction-development summary{min-height:44px;align-content:center}.faction-development .faction-finance,.faction-development .faction-warehouse,.faction-development .faction-facilities{margin-top:14px;padding:10px 14px}
.faction-development .faction-stock .row{align-items:center}.faction-development .faction-stock .row>div{flex:1 1 130px}.faction-development .faction-stock strong{font-size:14px}.faction-development .coin-transfer,.faction-development .coin-controls,.faction-development .coin-controls label,.faction-development .coin-controls input{min-width:0;max-width:100%}
@media(max-width:900px){.faction-development .faction-development-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.faction-development .faction-departments{grid-template-columns:1fr}.faction-development .faction-department{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px}.faction-development .faction-department>.row,.faction-development .faction-department>.faction-cost-line,.faction-development .faction-department>.cost{grid-column:1}.faction-development .faction-department>button{grid-column:2;grid-row:2/4;align-self:center;margin:0}.faction-development .faction-department>.faction-action-status,.faction-development .faction-department>.faction-recruit{grid-column:1/-1}}
@media(max-width:520px){.faction-development .faction-overview{grid-template-columns:repeat(2,minmax(0,1fr))}.faction-development .faction-overview .card{padding:10px}.faction-development .faction-overview strong{font-size:18px}.faction-development .faction-development-grid{grid-template-columns:1fr}.faction-development .faction-department{display:block}.faction-development .faction-department>button{width:100%;margin-top:6px}.faction-development .faction-departments>.card,.faction-development .faction-development-grid>.card{padding:12px}.faction-development .faction-today{gap:4px 10px}.faction-development .faction-today>strong{flex-basis:100%}.faction-development .faction-duty button{flex-basis:100%}.faction-development .coin-controls{flex-wrap:wrap}.faction-development .coin-controls>label{width:100%}.faction-development .coin-controls>label>input{width:min(180px,65%)}.faction-development .coin-controls>button{width:100%}.faction-development details.card>summary>span{flex-basis:100%;padding-left:16px}.faction-development .faction-free{font-size:12px}}


/* compact floating depth drawer + automatic branch-map dismissal (2026-10-06) */
.camp-layout-sidebar{position:relative;display:block;min-width:0}
.camp-main{display:grid;gap:16px;min-width:0}
.camp-layout-sidebar .camp-overview{padding-right:168px}
.camp-layout-sidebar .camp-overview p{max-width:58ch}
.camp-depth-drawer{position:absolute;top:12px;right:12px;z-index:8;width:auto;min-width:0;margin:0}
.camp-depth-drawer>summary{list-style:none;display:flex;align-items:center;gap:10px;min-height:46px;padding:7px 10px 7px 12px;border:1px solid #b99b5966;border-radius:999px;background:#172b2bea;box-shadow:0 8px 24px #07110f55;cursor:pointer;color:var(--gold);backdrop-filter:blur(8px)}
.camp-depth-drawer>summary::-webkit-details-marker{display:none}
.camp-depth-drawer>summary:focus-visible{outline:3px solid #ffe1a0;outline-offset:3px}
.camp-depth-mini{display:grid;gap:1px;line-height:1.2;text-align:left}.camp-depth-mini b{font-size:14px;letter-spacing:.04em}.camp-depth-mini small{font-size:11px;color:var(--muted);white-space:nowrap}
.camp-depth-toggle{display:grid;place-items:center;height:28px;padding:0 9px;border-radius:999px;background:#2a3c35;color:#dbc17f;font-size:11px}
.camp-depth-drawer[open] .camp-depth-toggle{font-size:0}.camp-depth-drawer[open] .camp-depth-toggle::after{content:'收起';font-size:11px}
.camp-depth-popover{position:absolute;top:54px;right:0;width:min(320px,calc(100vw - 40px));margin:0;padding:16px;box-shadow:0 18px 42px #06100e99;background:#142724f5;backdrop-filter:blur(10px)}
.camp-sidebar-copy h3{margin:2px 0 7px;color:var(--gold)}.camp-sidebar-copy p{margin:0}
.camp-depth-grid-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.camp-depth-grid-sidebar>div{padding:10px 11px}.camp-depth-grid-sidebar strong{font-size:14px}.camp-depth-grid-sidebar small,.camp-depth-grid-sidebar span{font-size:11px}
.branch-map-arrival .camp-layout{margin-top:14px}
@media(max-width:760px){.camp-layout-sidebar .camp-overview{padding-right:16px;padding-top:72px}.camp-depth-drawer{top:12px;left:12px;right:12px}.camp-depth-drawer>summary{width:100%;justify-content:space-between;border-radius:12px}.camp-depth-popover{left:0;right:0;width:100%}.camp-depth-grid-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:440px){.camp-depth-grid-sidebar{grid-template-columns:1fr}.camp-depth-mini small{white-space:normal}.camp-depth-popover{width:100%}}


/* 2026-10-06 left depth rail on branch map */
.branch-map-shell{display:grid;grid-template-columns:84px minmax(0,1fr);gap:14px;align-items:stretch}
.branch-depth-rail{display:flex;flex-direction:column;align-items:center;gap:10px;padding:12px 8px;border:1px solid #7e966d55;border-radius:12px;background:linear-gradient(180deg,#182826,#12201f)}
.branch-depth-track{position:relative;display:flex;justify-content:center;width:18px;flex:1;min-height:220px}
.branch-depth-track::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:2px;transform:translateX(-50%);background:linear-gradient(180deg,#efcf8a,#7c8b80)}
.branch-depth-track i{align-self:flex-end;display:block;width:12px;height:12px;border-radius:50%;background:#efcf8a;box-shadow:0 0 0 3px #243530}
.branch-depth-meta{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center}
.branch-depth-meta span{font-size:11px;letter-spacing:.18em;color:var(--muted);writing-mode:vertical-rl;text-orientation:mixed}
.branch-depth-meta strong{font-size:28px;line-height:1;color:var(--gold);font-variant-numeric:tabular-nums}
.branch-depth-meta small{font-size:11px;line-height:1.45;color:#aebfb1}
.branch-map-main{min-width:0}
@media(max-width:720px){.branch-map-shell{grid-template-columns:1fr}.branch-depth-rail{flex-direction:row;align-items:center;justify-content:flex-start;padding:10px 12px}.branch-depth-track{width:40px;min-height:0;height:44px;flex:none}.branch-depth-track::before{top:50%;bottom:auto;left:0;right:0;width:auto;height:2px;transform:translateY(-50%)}.branch-depth-track i{align-self:auto;justify-self:flex-end;margin-left:auto}.branch-depth-meta{align-items:flex-start;text-align:left}.branch-depth-meta span{writing-mode:horizontal-tb;letter-spacing:.12em}}

/* Complete landed output: scoped, brief feedback without delaying actions. */
.combat-impact{position:relative;isolation:isolate;overflow:hidden;min-width:0;margin:14px 0 18px;padding:16px 18px;border:1px solid #927346;border-left:3px solid #e0bc7a;border-radius:10px;background:linear-gradient(120deg,#302b2099,#152125);color:var(--text);font-variant-numeric:tabular-nums}
.combat-impact-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;font-size:12px;color:var(--muted)}
.combat-impact-heading strong{font-size:15px;color:var(--gold);letter-spacing:.08em}
.combat-impact-output{position:relative;display:grid;min-width:0;gap:2px;margin:10px 0 4px}
.combat-impact-output>span:first-child{font-size:12px;color:var(--muted)}
.combat-impact-output>strong{display:block;min-width:0;color:#f4d997;font-size:clamp(24px,5vw,43px);line-height:1.18;letter-spacing:.025em;overflow-wrap:anywhere}
.combat-impact-source{font-size:12px;color:var(--muted);overflow-wrap:anywhere;margin:7px 0 12px}
.combat-impact-metrics{display:grid;grid-template-columns:1fr 1fr minmax(0,1.4fr);gap:12px;margin:0;padding-top:10px;border-top:1px solid #a58b583a}
.combat-impact-metrics>div{min-width:0}.combat-impact-metrics dt{font-size:11px;color:var(--muted)}.combat-impact-metrics dd{font-size:15px;margin:5px 0 0;color:#eee6d1;overflow-wrap:anywhere}
.combat-impact-note,.combat-impact-latest{font-size:11px;line-height:1.65;color:var(--muted);margin:12px 0 0;overflow-wrap:anywhere}
.combat-impact-latest{color:#cfba8e}
.combat-impact--world,.combat-impact--rift{border-color:#c19a59;background:linear-gradient(120deg,#49351d99,#152125)}
.combat-impact-pop{position:absolute;right:0;top:0;opacity:0;pointer-events:none;color:#f8db98;font-size:clamp(18px,3.5vw,28px);font-weight:700;max-width:75%;overflow-wrap:anywhere}
.combat-impact::before{content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;opacity:0;background:radial-gradient(ellipse at 30% 55%,#e6bb623a,transparent 68%)}
.combat-impact-pulse{animation:combat-impact-highlight 680ms ease-out both}
.combat-impact-pulse::before{animation:combat-impact-gold 620ms ease-out both}
.combat-impact-pulse .combat-impact-pop{animation:combat-impact-number 680ms cubic-bezier(.15,.7,.2,1) both}
@keyframes combat-impact-highlight{0%{box-shadow:0 0 0 1px #edc36b88,0 0 22px #edc36b26}100%{box-shadow:0 0 0 0 transparent,0 0 0 transparent}}
@keyframes combat-impact-gold{0%{opacity:0;transform:scale(.7)}20%{opacity:1}100%{opacity:0;transform:scale(1.15)}}
@keyframes combat-impact-number{0%{opacity:0;transform:translateY(7px) scale(.9)}18%{opacity:1;transform:translateY(-2px) scale(1.04)}65%{opacity:.85}100%{opacity:0;transform:translateY(-23px) scale(1)}}
@media(max-width:480px){.combat-impact{padding:13px 12px}.combat-impact-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.combat-impact-metrics>div:last-child{grid-column:1/-1}.combat-impact-output>strong{font-size:28px}.combat-impact-note{font-size:11px}}
@media(max-width:350px){.combat-impact-output>strong{font-size:24px}.combat-impact-heading strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.combat-impact-pulse,.combat-impact-pulse::before,.combat-impact-pulse .combat-impact-pop{animation:none!important}.combat-impact::before,.combat-impact-pop{opacity:0!important}}