/* Equipped quick bar: five persistent roles, independent of collection size. */
.equipped-martial-bar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.equipped-martial-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;padding:5px 2px!important;border-radius:5px;border:1px solid #7c704d;background:linear-gradient(145deg,#273a35,#142522);color:#eee3c9;box-shadow:inset 0 1px #ffffff08}.equipped-martial-slot .loadout-icon{width:34px;height:34px;border-radius:5px}.equipped-martial-name{font-size:10px;line-height:1.25;white-space:nowrap;letter-spacing:-.4px}.equipped-martial-slot small{font-size:9px;line-height:1.2;color:#d0bc95}.martial-quick:has(.equipped-martial-bar){padding:5px;overflow:visible}.martial-choice.incomplete{opacity:.55}.martial-choice.incomplete .loadout-icon{filter:grayscale(1)}.martial-choice.incomplete button:disabled{opacity:1}
/* All collection icons fit the selected branch; there are no pages or scrollbars. */
.sheet:has([data-martial-collection=true]){height:min(88dvh,780px);max-height:88dvh;display:flex;flex-direction:column;overflow:hidden}.sheet #dialog-content[data-martial-collection=true]{flex:1;min-height:0;overflow:hidden;display:flex}.martial-collection{width:100%;min-width:0;min-height:0;flex:1;display:flex;flex-direction:column;gap:7px}.martial-collection-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sheet .martial-collection-tabs button{min-height:34px;padding:5px;font-size:13px}.martial-collection-toolbar{display:flex;justify-content:space-between;align-items:center;gap:6px;flex:none}.sheet .martial-collection-toolbar button{min-height:28px;padding:3px 7px;font-size:10px}.martial-collection-toolbar small{font-size:11px;color:#c7bda7}.martial-collection-grid{display:grid;grid-template-columns:repeat(var(--martial-columns,3),minmax(0,1fr));grid-template-rows:repeat(var(--martial-rows,2),minmax(0,1fr));gap:6px;flex:1;min-height:0}.sheet .martial-collection-card{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px 3px;border-radius:6px}.martial-collection-card .martial-mark{width:clamp(26px,5.5dvh,44px);height:clamp(26px,5.5dvh,44px);flex:none}.martial-group-heading .martial-fast-equip{grid-column:3;grid-row:1/span 2}.martial-group-heading{grid-template-columns:40px minmax(0,1fr) auto}.martial-group-heading strong{grid-column:2}.martial-group-heading .slot-grade{grid-column:2}.martial-group-card .martial-grade-options{margin-top:6px}
/* Compact heart controls; the left rail and node viewport share the remaining height. */
.passive-overlay{height:100dvh;overflow:hidden}.tree-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;padding:calc(5px + env(safe-area-inset-top,0px)) 8px 5px;min-height:0;max-height:none;flex:0 0 auto}.tree-title{font-size:14px;line-height:1.3;min-width:0;flex:0 1 auto;width:auto;cursor:pointer}.tree-points{font-size:11px;white-space:nowrap;margin-left:auto;order:2;flex:0 0 auto;width:auto}.tree-toolbar button{font-size:11px;min-height:27px;padding:3px 7px;white-space:nowrap}.tree-equip{order:3}.tree-reset{order:4;margin-left:0}.tree-intrinsic,.tree-intrinsic:has(.plum-level-panel){display:flex;align-items:center;gap:7px;order:1;flex:0 1 auto;padding:0;border:0;background:none;min-height:0;max-height:none;overflow:visible;line-height:1.3}.plum-level-panel{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0;padding:0;border:0;background:none;min-height:0}.plum-level-panel strong{font-size:11px;line-height:1.3;white-space:nowrap;margin:0}.plum-level-panel span{font-size:10px;line-height:1.3;white-space:nowrap;color:#b7c9bb}.plum-level-up{font-size:10px!important;min-height:25px!important;padding:3px 5px!important;line-height:1.3;white-space:nowrap}.plum-level-up:before{display:none}.tree-workspace{display:flex;flex:1 1 0;min-height:0;min-width:0;overflow:hidden}.tree-viewport{flex:1 1 0;min-height:0;min-width:0;overflow:hidden}.tree-footer{flex:0 0 auto;min-height:0;gap:5px;padding:4px 8px calc(4px + env(safe-area-inset-bottom,0px));flex-wrap:nowrap}.tree-footer button{min-height:30px;font-size:11px;margin:0;padding:4px 6px;flex:1;min-width:0}
.tree-heart-info[hidden]{display:none}.tree-heart-info{position:absolute;z-index:6;left:8px;right:8px;top:8px;max-width:400px;margin:0 auto;padding:10px;border:1px solid #97815c;border-radius:6px;background:#152521f5;box-shadow:0 5px 22px #0009;font-size:12px;line-height:1.5;touch-action:auto}.tree-heart-info-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.tree-heart-info-head button{padding:3px 7px;font-size:11px;background:#263b32;color:#eee;border:1px solid #8c795e;border-radius:4px}.tree-heart-info p{margin:8px 0}.tree-heart-info small{font-size:10px;color:#c4bdac}
@media(max-width:600px){.tree-toolbar{gap:3px 6px}.tree-title{flex:1}.tree-points{order:0;flex:none;margin-left:0}.tree-intrinsic{flex:1 1 auto}.tree-reset{margin-left:auto}.tree-toolbar button{min-height:25px}.plum-level-panel{gap:5px}}
/* One icon cell for every martial grade, with visible grade borders. */
.martial-collection-grid{gap:5px;position:relative}.sheet .martial-collection-card{position:relative;display:grid;place-items:center;gap:0;padding:3px;overflow:hidden;border:1px solid #aeb9b6;box-shadow:none;background:#17292d}.martial-collection-card[data-grade="1"]{border-color:#b7c2bd}.martial-collection-card[data-grade="2"]{border-color:#69b7da}.martial-collection-card[data-grade="3"]{border-color:#b38be2}.martial-collection-card[data-grade="4"]{border-color:#e6bf63}.martial-collection-card[data-equipped=true]{box-shadow:none;background:#344339}.martial-collection-card .martial-mark{height:100%;width:auto;aspect-ratio:1;max-width:54px;max-height:54px;min-height:0;min-width:0;border-radius:3px}.martial-collection-card[data-owned=false] .martial-mark{filter:grayscale(.8);opacity:.4}.manual-count{position:absolute;right:3px;bottom:2px;min-width:15px;padding:0 2px;font-size:10px;line-height:1.25;font-weight:700;color:#fff1cb;background:#0d1b24e6;border-radius:3px;font-variant-numeric:tabular-nums}.manual-state{position:absolute;top:2px;left:3px;font-size:9px;line-height:1.3;font-weight:700;color:#f6df91;text-shadow:0 1px 2px #000}.martial-grade-legend{display:flex;gap:6px;font-size:9px;white-space:nowrap}.martial-grade-legend span:before{content:'';display:inline-block;width:5px;height:5px;margin-right:2px;border:1px solid currentColor;vertical-align:1px}.martial-grade-legend [data-grade="1"]{color:#b7c2bd}.martial-grade-legend [data-grade="2"]{color:#69b7da}.martial-grade-legend [data-grade="3"]{color:#b38be2}.martial-grade-legend [data-grade="4"]{color:#e6bf63}#dialog-content[data-martial-collection=true]{position:relative}.martial-detail-overlay{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:5px;background:#060e17ba}.martial-detail-panel{width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;padding:10px;border:1px solid #a18b61;border-radius:6px;background:#172a2dfc;box-shadow:0 5px 28px #000a;font-size:12px;line-height:1.45}.martial-detail-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.martial-detail-head strong{font-size:14px}.sheet .martial-detail-head button{min-height:28px;font-size:11px;padding:3px 7px}.martial-detail-panel .martial-detail-mark{width:42px;height:42px;float:left;margin:8px 9px 5px 0}.martial-detail-summary{margin:8px 0;font-size:12px}.martial-detail-panel .martial-grades{clear:both;display:flex;gap:4px;margin:7px 0}.martial-detail-panel .martial-grades button{flex:1;font-size:11px;min-height:30px;padding:4px}.martial-detail-panel p{margin:7px 0}.martial-detail-panel .martial-effect-title{font-size:12px;margin:7px 0 3px}.martial-detail-panel .martial-lore{font-size:11px;color:#b6c7bd}.sheet .martial-detail-panel .detail-action{min-height:32px;font-size:12px;padding:5px 8px;margin:5px 4px 0 0}
/* Reference layout: title above art, grade and book progress at the bottom. */
.manual-name{position:absolute;top:3px;left:3px;right:2px;font-size:clamp(8px,2.3vw,11px);font-weight:700;line-height:1.2;color:#f3eee1;text-align:left;white-space:nowrap;text-shadow:0 1px 3px #000}.manual-grade{position:absolute;right:3px;bottom:14px;color:#edd78d;font-size:9px;font-weight:700;line-height:1.1}.manual-progress{position:absolute;left:2px;right:2px;bottom:2px;height:9px;background:#10202bdd;border-radius:2px;overflow:hidden}.manual-progress-fill{display:block;height:100%;background:#2385a1;max-width:100%}.manual-count{right:4px;bottom:2px;z-index:1;padding:0;background:none;font-size:9px;line-height:9px}.manual-state{top:auto;left:3px;bottom:14px;font-size:8px}.martial-collection-card .martial-mark{width:75%;height:75%;max-height:60px;max-width:60px;aspect-ratio:1}.detail-equipped{display:inline-block;font-size:11px;color:#edd78d;margin:6px 0}.martial-detail-panel .detail-action:disabled{opacity:.45}

/* Auxiliary cards use a full-width text flow; metadata never occupies the icon column. */
.martial-choice.auxiliary-choice{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;padding:12px}.auxiliary-heading{display:flex;align-items:center;gap:12px;min-width:0}.auxiliary-heading .loadout-icon{width:50px;height:50px;flex:0 0 50px}.auxiliary-heading-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.auxiliary-heading-copy strong{font-size:15px;line-height:1.35;word-break:keep-all}.auxiliary-heading-copy .slot-grade{font-size:11px;white-space:nowrap}.auxiliary-choice p{margin:0;min-width:0;width:100%;font-size:12px;line-height:1.55;word-break:keep-all;overflow-wrap:normal}.auxiliary-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;width:100%;min-width:0;color:#b3bdb6;font-size:11px;line-height:1.4}.auxiliary-meta>span{white-space:nowrap}.auxiliary-equipped{font-size:11px;color:#e0b56d;line-height:1.4}.auxiliary-actions{display:flex;flex-wrap:wrap;gap:6px;width:100%;min-width:0}.auxiliary-actions .detail-action{flex:1;min-width:100px;min-height:34px;padding:5px 8px;white-space:nowrap;word-break:keep-all}.martial-choice.heart-choice{grid-template-columns:40px minmax(0,1fr) auto}.heart-choice strong,.heart-choice small{min-width:0;word-break:keep-all}.martial-picker-header strong{min-width:0;word-break:keep-all}.sheet .martial-back,.sheet .martial-detach{flex-shrink:0;white-space:nowrap}
/* Labels and slider captions retain their intended width instead of wrapping letter by letter. */
.profile-stat dt{flex:0 0 auto;word-break:keep-all}.profile-stat dd{flex:1;min-width:0;word-break:keep-all}.profile-setting.profile-volume{grid-template-columns:minmax(90px,auto) minmax(0,1fr) 36px;gap:6px}.profile-setting.profile-volume>span{font-size:12px;white-space:nowrap}.profile-setting.profile-volume>input{min-width:0;width:100%}

/* Restore the original green stronger badge, shared by book cards and branch tabs. */
.martial-collection-card[data-learnable=true]:after,.martial-collection-tabs button[data-learnable=true]:after{content:'▲';padding:0 2px;font-size:10px;line-height:14px;border-radius:3px;box-shadow:0 1px 4px #000;background:#236d42;color:#d5ffe1;pointer-events:none}.martial-collection-card[data-learnable=true]:after{position:absolute;right:3px;top:17px;z-index:2}.martial-collection-tabs button[data-learnable=true]:after{display:inline-block;margin-left:5px;vertical-align:1px}.martial-collection-tabs button{white-space:nowrap}

.plum-level-up{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}.plum-level-up .plum-upgrade-label{font-size:11px;color:#f4e7cf;line-height:1.2}.plum-level-up .plum-upgrade-cost{font-size:9px;color:#cbbb9d;line-height:1.2;white-space:nowrap}

.martial-collection-card[data-equipped=true] .manual-state{left:3px;bottom:14px;z-index:2;padding:1px 3px;border-radius:3px;background:#234f3bf2;color:#e0ffe9;font-size:9px;font-weight:700;line-height:1.3;text-shadow:none;white-space:nowrap}

.equipped-martial-slot:hover,.equipped-martial-slot:focus-visible{background:linear-gradient(145deg,#354a3e,#20362d);border-color:#ba9b62;outline:2px solid #b9995a66;outline-offset:1px}.equipped-martial-slot:active{background:#354638}.equipped-martial-name{color:#eee3c9}.equipped-martial-slot .slot-category{color:#b6b7a4}

/* Small combat skill control stays above the lower menus, at the right edge. */
.attack-skill-hud{position:absolute;right:10px;bottom:150px;z-index:5;display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:auto}.attack-skill-hud[hidden]{display:none}.attack-skill-cast{position:relative;display:grid;place-items:center;width:50px;height:50px;padding:3px;border:2px solid #ab9262;border-radius:50%;background:#132925;color:#fff;overflow:hidden;touch-action:manipulation}.attack-skill-cast .attack-skill-art{width:100%;height:100%;border-radius:50%;pointer-events:none}.attack-skill-cast[data-cooling=true]:after{content:'';position:absolute;inset:0;background:conic-gradient(#08111ccb var(--skill-cooldown),transparent 0);pointer-events:none}.attack-skill-clock{position:absolute;inset:0;z-index:1;display:grid;place-items:center;font-size:17px;font-weight:800;color:#fff;text-shadow:0 1px 3px #000,0 0 4px #000;pointer-events:none}.attack-skill-cast[data-active=true]{border-color:#86dfaf;box-shadow:0 0 7px #71d19b77}.attack-skill-cast:disabled{cursor:default;opacity:1}.attack-skill-mode{padding:2px 9px;min-height:24px;border:1px solid #847756;border-radius:10px;background:#142925;color:#ead9b3;font-size:10px;line-height:1.4}.attack-skill-mode[aria-pressed=true]{color:#a4e6b3;border-color:#537f64}.attack-skill-name{max-width:76px;font-size:9px;color:#eee0bb;white-space:nowrap;text-shadow:0 1px 3px #000;pointer-events:none}

/* Translucent notices retain readable text; only equip recommendations follow the skill. */
.notice,.notice[data-theme=reward],.notice[data-theme=warning],.notice[data-theme=battle]{background:#14231d70;background-image:none;border-color:#b49a6655;text-shadow:0 1px 2px #000;box-shadow:none}.notice[data-theme=warning]{background:#3a292570}.notice[data-theme=battle]{background:#31243270}.bottom-hud .equipment-recommendation{background:#192a30a8;background-image:none;right:8px}.attack-skill-hud{right:8px}

.tree-world[data-heart=HEART_QINGMU_POISON]{background-size:1600px 1600px;background-position:center}.tree-world[data-heart=HEART_QINGMU_POISON] .tree-node:not(.small),.tree-world[data-heart=HEART_HUA_BASE] .tree-node:not(.small){background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}.tree-node .tree-node-symbol{width:100%;height:100%;border:0;border-radius:0}.tree-world[data-heart=HEART_QINGMU_POISON] .tree-node[data-state=INVESTED]{filter:brightness(1.15) drop-shadow(0 0 4px #65cf93)}.tree-world[data-heart=HEART_QINGMU_POISON] .tree-node[data-state=LOCKED]{opacity:.65;filter:saturate(.5) brightness(.7)}
.martial-collection-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.sheet .martial-collection-tabs button{font-size:11px;padding:5px 2px}.martial-collection-card .auxiliary-icon{background-size:contain;background-position:center;background-repeat:no-repeat}.ronin-title{white-space:nowrap}

.martial-collection-tabs button{position:relative}.martial-collection-card[data-unread=true]:before,.martial-collection-tabs button[data-unread=true]:before{content:'';position:absolute;top:3px;right:3px;z-index:3;width:6px;height:6px;background:#ef5057;border-radius:50%;box-shadow:0 0 0 1px #18272d;pointer-events:none}.tree-world[data-heart=HEART_QINGMU_POISON] svg line{stroke:#3a6a57;stroke-width:2}.tree-world[data-heart=HEART_QINGMU_POISON] svg line.invested,.tree-world[data-heart=HEART_QINGMU_POISON] svg line.pending{stroke:#91ddbd;stroke-width:3}.tree-world[data-heart=HEART_QINGMU_POISON] .tree-node:not(.small):before,.tree-world[data-heart=HEART_QINGMU_POISON] .tree-node:not(.small):after,.tree-world[data-heart=HEART_HUA_BASE] .tree-node:not(.small):before,.tree-world[data-heart=HEART_HUA_BASE] .tree-node:not(.small):after{display:none}.tree-world[data-heart=HEART_HUA_BASE] .tree-node:not(.small)[data-state=LOCKED]{opacity:.8;filter:grayscale(.5) brightness(.7)}

/* Adjustment panel: current controls and per-heart fragment grants. */
.debug-section-title{margin:9px 0 2px;padding-top:9px;border-top:1px solid #b5a17c40;color:#e8d4ab;font-size:13px}.debug-section-title:first-child{margin-top:0;padding-top:0;border-top:0}.debug-heart-row{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:6px 0;border-bottom:1px solid #a5b6ab20}.debug-heart-info{display:grid;gap:2px;min-width:0}.debug-heart-info strong{font-size:13px}.debug-heart-info small{font-size:11px;color:#b9cdbf}.debug-heart-actions{display:flex;gap:5px;flex-shrink:0}.debug-heart-actions button{padding:5px 7px;font-size:12px;white-space:nowrap}.debug-heart-actions button:disabled{opacity:.4;cursor:default}.debug-controls select{font-size:12px}.debug-controls .debug-actions{margin:2px 0}
.tree-world[data-heart=HEART_QINGMU_POISON]{background-repeat:no-repeat;background-color:#0c1915}.qingmu-channel{fill:none;stroke:#538e6c;stroke-opacity:.22;stroke-width:15;stroke-linecap:round}.qingmu-seat{fill:#10291a88;stroke:#8c9570;stroke-opacity:.45;stroke-width:3}
/* Shared geometry and state language for Huashan and Qingmu. */
.tree-world[data-heart=HEART_HUA_BASE]{--tree-accent:#f59cbb;--tree-ready:#ffffff}.tree-world[data-heart=HEART_QINGMU_POISON]{--tree-accent:#65e3a5;--tree-ready:#ffffff}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node{border-radius:50%;clip-path:none;isolation:isolate;animation:none}
.tree-state-ring{position:absolute;inset:-4px;z-index:2;border:1px solid #71817a;border-radius:50%;pointer-events:none}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node[data-state=AVAILABLE]{opacity:1;filter:none}.tree-node[data-state=AVAILABLE]>.tree-state-ring{border:4px solid var(--tree-ready);box-shadow:0 0 0 3px #071612bb,0 0 12px 3px var(--tree-accent)}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node[data-state=INVESTED]{opacity:1;filter:none}.tree-node[data-state=INVESTED]>.tree-state-ring{border:4px solid var(--tree-accent);box-shadow:0 0 0 2px #071612bb,0 0 8px 2px var(--tree-accent)}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node[data-state=PENDING]{opacity:1;filter:none}.tree-node[data-state=PENDING]>.tree-state-ring{border:4px solid #ffe3a2;box-shadow:0 0 0 3px #21170ddd,0 0 12px 3px #edba60}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) svg path:is(.locked,.available,.invested,.pending){fill:none;stroke-linecap:round;stroke-linejoin:round}.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) svg path.locked{stroke:#51665d;stroke-width:2;opacity:.65;filter:none}.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) svg path.available{stroke:var(--tree-ready);stroke-width:4;opacity:.9;filter:none}.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) svg path.invested{stroke:var(--tree-accent);stroke-width:4;stroke-dasharray:none;opacity:1;filter:drop-shadow(0 0 3px var(--tree-accent))}.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) svg path.pending{stroke:#ffe3a2;stroke-width:4;stroke-dasharray:none;opacity:1;filter:drop-shadow(0 0 3px #edba60)}.tree-state-legend{flex-basis:100%;text-align:center;font-size:10px;color:#e2e9df;line-height:1.2;white-space:nowrap}.tree-state-legend[hidden]{display:none}

.tree-footer:has(.tree-state-legend:not([hidden])){flex-wrap:wrap;row-gap:5px}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node:is([data-state=AVAILABLE],[data-state=INVESTED],[data-state=PENDING]){box-shadow:none}
/* Keep both automation controls legible without compressing the four art tabs. */
.martial-collection-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px}.martial-collection-toolbar>small{grid-area:1/1}.martial-collection-toolbar>.martial-grade-legend{grid-area:1/2;justify-self:end}.martial-collection-toolbar>.merge-toggle{grid-area:2/1}.martial-collection-toolbar>.martial-auto-toggle{grid-area:2/2}.sheet .martial-collection-toolbar button{white-space:nowrap;font-size:11px;padding:4px 3px}.martial-auto-toggle[aria-pressed=true]{border-color:#98ba88;background:#345141;color:#ebf1ca}
/* Shared Qingmu stone fill; only each heart's ring and branch accents differ. */
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small{overflow:visible;background:radial-gradient(circle at 35% 25%,#9da5a8 0%,#656f74 42%,#333b40 78%);border:1px solid #929ca2;opacity:1;filter:none;box-shadow:inset 0 1px 2px #ffffff60,inset 0 -3px 4px #101820b3,0 2px 3px #0009}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small[data-state=LOCKED]{background:radial-gradient(circle at 35% 25%,#606b70,#3b464c 48%,#252d33);border-color:#5d6970;opacity:.65;filter:saturate(.5) brightness(.7);box-shadow:inset 0 1px 1px #a7b1b833,inset 0 -3px 3px #111a20b3,0 2px 3px #0007}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small[data-state=AVAILABLE]{background:radial-gradient(circle at 35% 25%,#d0d8d9,#879295 45%,#4a585e 80%);border-color:#c2cdd0;box-shadow:inset 0 1px 2px #ffffffa0,inset 0 -3px 4px #1c2a32a0,0 2px 4px #0009}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small[data-state=INVESTED]{background:radial-gradient(circle at 35% 25%,#e2e7e6,#a8b3b0 44%,#657670 80%);border-color:#e1e8e4;box-shadow:inset 0 1px 2px #ffffffe0,inset 0 -3px 4px #273d35a0,0 2px 4px #0009}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small[data-state=PENDING]{background:radial-gradient(circle at 35% 25%,#fff,#d0d7d5 45%,#8c9b96 80%);border-color:#fff;box-shadow:inset 0 1px 2px #fff,inset 0 -2px 3px #53655e80,0 0 0 2px #d7e1dc44,0 2px 4px #0009}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small[data-state=EXCLUSIVE_LOCKED]{background:radial-gradient(circle at 35% 25%,#555d62,#30393f 70%);border-color:#525d65;opacity:.65;filter:saturate(.5) brightness(.7);box-shadow:inset 0 1px 1px #9aa7af22,inset 0 -2px 3px #07121bcc,0 2px 3px #0007}
.tree-world:is([data-heart=HEART_HUA_BASE],[data-heart=HEART_QINGMU_POISON],[data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node.small>.tree-state-ring{box-shadow:0 0 0 2px #071612bb}

/* Jeokyang uses the same node and state-ring UI as the established hearts. */
.tree-world[data-heart=HEART_CHIYANG_FIRE]{--tree-accent:#ffb15e;--tree-ready:#fff;background-color:#151310;background-repeat:no-repeat}
.tree-world[data-heart=HEART_CHIYANG_FIRE] .tree-node:not(.small){background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}

.tree-world[data-heart=HEART_HANYU_ICE]{--tree-accent:#9ddff1;--tree-ready:#fff}
.tree-world:is([data-heart=HEART_CHIYANG_FIRE],[data-heart=HEART_HANYU_ICE],[data-heart=HEART_TIANLEI_LIGHTNING]) .tree-node:not(.small){background:transparent;border:0;box-shadow:none;padding:0;overflow:visible}

/* Hanok keeps its shared small-node silhouette and a constant state-ring width. */


/* One node silhouette and ring geometry for all hearts and states. */
.tree-world .tree-node{box-sizing:border-box;min-height:0;min-width:0}
.tree-world .tree-node>.tree-state-ring{border-width:4px}
.tree-world .tree-node.small>.tree-state-ring{border-width:1px}

.tree-world .qingmu-channel{stroke:var(--tree-accent);stroke-opacity:.18}
.tree-world .qingmu-seat{fill:#111b2488;stroke:var(--tree-accent);stroke-opacity:.35}

/* Every heart uses the same two header rows: three facts, four fixed actions. */
.passive-overlay .tree-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:calc(6px + env(safe-area-inset-top,0px)) 8px 6px;align-items:center}
.tree-header-stats{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;min-width:0;min-height:22px}
.tree-header-identity{display:flex;align-items:baseline;gap:5px;min-width:0;white-space:nowrap}
.tree-header-identity .tree-title{flex:none;margin:0;font-size:13px;line-height:1.4;color:#f1d99d}
.tree-level{font-size:10px;line-height:1.4;color:#d7c4d2;white-space:nowrap}
.tree-header-stats .tree-points{order:0;flex:none;width:auto;margin:0;font-size:11px;line-height:1.4;white-space:nowrap;color:#f1d99d;font-variant-numeric:tabular-nums}
.tree-qi{font-size:10px;line-height:1.4;white-space:nowrap;color:#b8c8bf;font-variant-numeric:tabular-nums}
.tree-toolbar .tree-intrinsic,.tree-toolbar .tree-intrinsic:has(.plum-level-panel){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;order:0;width:100%;min-width:0;margin:0;padding:0;border:0;background:none;overflow:visible;max-height:none}
.tree-toolbar .plum-level-panel{display:contents}
.tree-toolbar .tree-intrinsic button,.tree-toolbar .tree-heart-select{display:flex;flex-direction:column;align-items:center;justify-content:center;order:0;flex:none;width:100%;min-width:0;height:36px;min-height:36px!important;margin:0;padding:3px 2px!important;border:1px solid #8c795e;border-radius:5px;background:#1b2a31;color:#f4e7cf;font-size:11px!important;line-height:1.25;white-space:nowrap;box-sizing:border-box}
.tree-toolbar .tree-intrinsic button:disabled{opacity:.5;cursor:default}
.tree-toolbar .tree-intrinsic .plum-level-up{gap:1px}
.tree-toolbar .tree-intrinsic .plum-upgrade-label{font-size:11px;line-height:1.2}
.tree-toolbar .tree-intrinsic .plum-upgrade-cost{font-size:9px;line-height:1.2;color:#cbbb9d}
.tree-toolbar .tree-reset{background-image:none;margin-left:0}
@media(max-width:360px){.tree-header-stats{gap:6px}.tree-header-identity{gap:3px}.tree-header-identity .tree-title{font-size:12px}.tree-header-stats .tree-points,.tree-qi{font-size:10px}}

.tree-world[data-heart=HEART_TIANLEI_LIGHTNING]{--tree-accent:#a9dfff;--tree-ready:#fff}

/* Backdrop-only treatment: node art and state/connection contrast stay unchanged. */
.tree-world[data-heart=HEART_TIANLEI_LIGHTNING]{background-image:none!important;isolation:isolate}
.tree-world[data-heart=HEART_TIANLEI_LIGHTNING]::before{content:"";position:absolute;inset:0;background:url('./assets/tianlei-v1/background.webp') center/1600px 1600px no-repeat;filter:saturate(.65) brightness(.52) contrast(.9);pointer-events:none;z-index:0}
.tree-world[data-heart=HEART_TIANLEI_LIGHTNING]>svg{z-index:1}
.tree-world[data-heart=HEART_TIANLEI_LIGHTNING]>.tree-node{z-index:2}

.tree-toolbar .tree-heart-select{display:block;padding-inline:4px!important;text-align:center;cursor:pointer}

/* Persistent, high-contrast point balance and visible per-node costs. */
.passive-overlay .tree-toolbar{position:relative;z-index:5;flex-shrink:0;background:#101a20}
.tree-toolbar .tree-header-stats{order:0;grid-template-columns:minmax(0,1fr) auto;width:100%}
.tree-toolbar>.tree-points{order:1;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 10px;flex:0 0 100%;width:100%;box-sizing:border-box;margin:3px 0 4px;padding:8px 12px;border:1px solid #a98a48;border-radius:7px;background:#080e13;color:#f8e5b5;line-height:1.3}
.tree-points-label{font-size:14px;font-weight:600}.tree-points-value{font-size:28px;font-weight:800;color:#ffe5a1;font-variant-numeric:tabular-nums;letter-spacing:.02em;text-shadow:0 1px 2px #000}
.tree-points-selection{grid-column:1/-1;font-size:11px;color:#c8c2ae;text-align:right}.tree-points-selection[hidden]{display:none}
.tree-toolbar>.tree-intrinsic{order:2}.tree-node>.tree-node-cost{position:absolute;top:calc(100% + 7px);left:50%;transform:translateX(-50%);z-index:6;display:block;min-width:29px;padding:2px 5px;border:1px solid #9aaea0;border-radius:4px;background:#080f16;color:#e8f9e9;font:bold 13px/1.3 system-ui;white-space:nowrap;pointer-events:none;text-shadow:0 1px 2px #000}
@media(max-width:360px){.tree-toolbar>.tree-points{padding:7px 10px}.tree-points-label{font-size:13px}.tree-points-value{font-size:26px}}

.tree-world .tree-node.small{overflow:visible}.tree-node>.tree-node-cost{transform:translateX(-50%) scale(var(--tree-cost-scale,1));transform-origin:top center}

.passive-overlay .tree-toolbar{display:flex;flex-wrap:wrap}.passive-overlay .tree-toolbar>.tree-intrinsic{order:2;width:100%}

/* Show costs only on the next investable nodes; keep confirmation beside the selected node. */
.tree-node>.tree-node-cost[hidden]{display:none}
.tree-detail .tree-confirm{display:block;width:100%;min-height:42px;margin:10px 0 0;padding:9px 12px;border:1px solid #c5a568;border-radius:6px;background:#294139;color:#ffe6a5;font-size:15px;font-weight:700;text-align:center;line-height:1.4}
.tree-detail .tree-confirm[hidden]{display:none}
.passive-overlay .tree-toolbar .tree-heart-select{text-align:center;text-align-last:center;appearance:none;-webkit-appearance:none;padding:3px 2px!important}

.tree-toolbar .tree-heart-select-control{position:relative;width:100%;min-width:0;height:36px}.tree-toolbar .tree-heart-select-control>.tree-heart-select{color:transparent;text-shadow:none}.tree-heart-select option{color:#f4e7cf;background:#1b2a31}.tree-toolbar .tree-heart-select-control>.tree-heart-select-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;color:#f4e7cf;font-size:11px;line-height:1.25;text-align:center}

/* Node details contain interactive controls and must receive real pointer input. */
.passive-overlay .tree-detail{pointer-events:auto;touch-action:pan-y}

/* A reached next node keeps its price visible even when points are exhausted. */
.tree-node[data-point-state=insufficient]>.tree-node-cost{color:#ffb4b4;border-color:#d87171}
