/* Local combat review: light battle surfaces, readable statistics and compact settings. */
#valgard-effect-note.combat-note{border:1px solid #b9c9b0;border-radius:10px;background:#fffdf3;box-shadow:0 6px 22px #203e3326,inset 0 1px #fff;color:#52644e;padding:10px 12px;font:12px/1.5 Interface,sans-serif}
#valgard-effect-note.combat-note:after{background:#fffdf3;border-color:#b9c9b0}
#valgard-effect-note.combat-note>header{padding-bottom:7px;border-color:#dce3cf}
#valgard-effect-note.combat-note>header h3{font-size:15px;color:#315f55}
#valgard-effect-note.combat-note>header>button{border-color:#d4ddc6;border-radius:6px;background:#f5f7ec;color:#577061}
#valgard-effect-note.combat-note .effect-note-text{color:#52644e;font-size:12px;line-height:1.5}
#valgard-effect-note.combat-note .effect-note-link{color:#3d6b59}

/* The map continues behind the header's rounded bottom corners. */
#world .map{top:calc(var(--world-header-height,57px) - 18px)}
#app.has-maintenance #world .map{top:calc(var(--world-header-height,57px) + 9px)}

/* All rarities retain the real item's artwork; its surround follows rarity. */
#app #toast.top-notice.notice-loot{--notice-accent:var(--notice-rarity,#929a94);--notice-ring:var(--notice-rarity,#929a94)}
#app #toast.top-notice.notice-loot .notice-emblem{background:#f0f2eb;background:color-mix(in srgb,var(--notice-rarity,#929a94) 16%,#fffdf7);box-shadow:inset 0 0 0 1.5px var(--notice-ring),0 1px 3px #354b3620}
#app #toast.top-notice.notice-loot .notice-text{color:#475c4e}
#app #toast.top-notice.notice-loot .notice-meta{border-color:color-mix(in srgb,var(--notice-rarity,#929a94) 45%,#fffdf7);background:color-mix(in srgb,var(--notice-rarity,#929a94) 12%,#fffdf7)}

/* Frames fit the panel; artwork and spacing adapt within each fixed frame. */
.world-panel-body:has(.world-opponents){align-items:stretch;overflow-y:hidden;overscroll-behavior-y:contain;padding-bottom:2px}
.world-opponents{flex:0 0 auto;height:min(100%,238px);min-height:0;max-height:100%}
@media(min-width:900px){.world-panel-body .world-opponents{height:100%}}
.world-opponents>.opponent-card{height:100%;min-height:0;max-height:100%;container-type:size;container-name:enemy-card}
.opponent-active{gap:5px;padding:9px 7px 8px}
.world-opponents .opponent-card .opponent-inspect{grid-template-rows:14px minmax(0,1fr) 28px;gap:3px;min-height:0}
.opponent-art{max-height:74px;padding:0}
.opponent-name{height:32px;line-height:14px;align-content:center}
.opponent-stats{display:flex;flex:0 0 23px;height:23px;min-height:23px;gap:0;padding:0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x}
.opponent-stats::-webkit-scrollbar{display:none}
.world-opponents .opponent-stats>.opponent-stat-page{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:23px;align-items:center;flex:0 0 100%;height:23px;box-sizing:border-box;padding:0 5px 0 1px;scroll-snap-align:start;gap:2px}
.opponent-stat-page>span{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0}
.opponent-stat-page:after{content:'›';position:absolute;right:0;top:3px;color:#a99e7e;font-size:12px}
.opponent-stat-page:last-child:after{content:'‹'}
.opponent-stat-page img{flex:0 0 12px!important;width:12px!important;height:12px!important}
.opponent-stats .opponent-stat-page b{font:600 10px/13px Interface,sans-serif;white-space:nowrap;overflow-wrap:normal;letter-spacing:0}
.opponent-loot{flex-basis:29px;height:29px}
.opponent-attack.world-attack-button{height:29px;min-height:29px;max-height:29px}

.journal-view-controls{padding:3px;gap:3px;border-color:#d5dec9;border-radius:8px;background:#fffdf5}
.journal-view-controls>button{height:25px;color:#809077;border-radius:5px}
.journal-view-controls>button[aria-pressed="true"]{background:#edf2e3;color:#345f51;box-shadow:inset 0 0 0 1px #c6d2b8}
.journal-stat{display:inline-block;vertical-align:baseline;white-space:nowrap}
.journal-stat-glyph{display:inline-block;width:12px;margin-right:2px;vertical-align:-1px;text-align:center;font:12px/12px Icons!important;color:inherit}
.journal-stat-asset{display:inline-block;width:14px;height:14px;margin-right:2px;vertical-align:-3px;object-fit:contain}
.journal-stat-attack{color:#326d52}
#app .journal-hostile .journal-stat-attack,#modal-root .journal-hostile .journal-stat-attack{color:#ad5141}
.journal-shield>.journal-num{color:inherit!important}
.journal-operator{display:inline;margin-right:3px;color:#7d886e;font-weight:400}
#app .journal-stat-defense,#modal-root .journal-stat-defense,#app .journal-stat-block,#modal-root .journal-stat-block{color:#3f72a4}
#app .journal-breakdown .journal-stat-defense .journal-num,#modal-root .journal-breakdown .journal-stat-defense .journal-num{color:#3f72a4}
#app .journal-breakdown .journal-stat-block .journal-num,#modal-root .journal-breakdown .journal-stat-block .journal-num{color:#3f72a4}
#app .journal-hostile .journal-stat-attack .journal-num,#modal-root .journal-hostile .journal-stat-attack .journal-num{color:#ad5141}
.journal-modifier>img{border-radius:4px;background:#f5f7ec;border-color:#c6d2b8}
.journal-breakdown .journal-modifier{display:inline-block;min-height:0;padding:0 1px;vertical-align:baseline;white-space:nowrap;font:inherit}
.journal-breakdown .journal-modifier>img{display:inline-block;width:14px;height:14px;vertical-align:-3px;margin-right:2px}
.v15-log-turn .log-entry{align-items:center;gap:7px}
.v15-log-turn .log-entry>.log-symbol{display:grid;place-items:center;align-self:center;width:22px;min-width:22px;height:22px;margin:0;padding:0}
.v15-log-turn .log-symbol>.icon{display:block;width:16px;height:16px;min-width:16px;margin:0;padding:0;font-size:13px;line-height:16px;text-align:center;color:inherit;transform:none}

/* Event labels share one footprint; event colour carries the meaning. */
#battle-root .combat-popup{box-sizing:border-box;min-height:28px;padding:3px 7px;gap:5px;border-radius:6px;border:1px solid #bac6ad;background:#faf9eff5;box-shadow:0 2px 5px #263b2d20;color:#4d6656;font:700 12px/20px Interface,sans-serif}
#battle-root .combat-popup>img{width:20px;height:20px;object-fit:contain}
#battle-root .combat-popup .combat-popup-glyph{display:inline-block;flex:0 0 20px;width:20px;height:20px;text-align:center;font:19px/20px Icons!important;font-style:normal;color:inherit;transform:translateY(1px)}
#battle-root .combat-popup .combat-damage-art>.combat-popup-glyph{position:absolute;inset:0;width:16px;height:16px;font-size:16px!important;line-height:16px!important}
#battle-root .combat-popup .combat-popup-glyph[data-glyph="sword"]{transform:translate(.13846em,.02em)}
#battle-root .combat-popup .combat-popup-glyph[data-glyph="shield"]{transform:translate(.12308em,.01em)}
#battle-root .combat-popup .combat-popup-glyph[data-glyph="heart"]{transform:translate(.08077em,0)}
#battle-root .combat-popup.critical{color:#9d5748;border-color:#c9b5a0;background:#faf9eff5;box-shadow:0 2px 5px #263b2d20}
#battle-root .combat-popup.critical>b{color:#d34c2b}
#battle-root .combat-popup .combat-critical-mark{display:inline-block;flex:0 0 11px;width:11px;font:11px/15px Icons!important;color:#e68932}
.v15-log-turn .log-entry>.log-symbol{position:relative}
.log-event-art{display:block;width:18px;height:18px;object-fit:contain;object-position:center}
.log-critical-star{position:absolute;right:1px;top:0;font:9px/9px Icons!important;color:#d98b32}
.journal-potion{color:#587565}
#app .journal-mana-gain,#modal-root .journal-mana-gain{color:#4285a1}
.journal-stat-attack>.journal-stat-glyph{transform:translateX(.13846em)}
.journal-stat-block>.journal-stat-glyph{transform:translateX(.12308em)}
.journal-heal>.journal-stat-glyph{transform:translateX(.08077em)}
#battle-root .combat-popup b{font:inherit;line-height:20px}
#battle-root .combat-popup.damage,#battle-root .combat-popup.received{color:#9d5748;border-color:#c9b5a0}
#battle-root .combat-popup.bleed,#battle-root .combat-popup.bleed-damage{color:#98544e;border-color:#c7ada6;background:#fbf5eef5}
#battle-root .combat-popup.poison,#battle-root .combat-popup.poison-damage{color:#667e48;border-color:#bdc7a4;background:#f4f7ebf5}
#battle-root .combat-popup .combat-number-icon-wrap{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;margin:0 3px 0 0}
#battle-root .combat-number-icon-wrap>img:first-child{width:20px;height:20px}
#battle-root .combat-number-icon-wrap>.combat-number-source{width:11px!important;height:11px!important;bottom:-2px;background:#faf9ef;border-color:#b8c7b1;border-radius:3px;padding:0}

.modal.v13-settings{width:calc(100% - 20px);max-width:440px!important;max-height:calc(100dvh - 24px);padding:15px;border-radius:14px;background:#faf8ee;box-shadow:0 12px 35px #213d2f30,inset 0 1px #fff;scrollbar-width:thin;scrollbar-color:#c8d1b9 transparent}
.v13-settings .modal-head{margin-bottom:12px;min-height:32px}
.v13-settings .modal-head h2{font:700 20px/25px Interface,sans-serif}
.v13-settings .modal-head .icon-button{width:32px;height:32px;min-height:32px;padding:6px;border-radius:8px}
.v13-settings .v13-settings-character{gap:10px;padding:8px 10px;margin-bottom:0;border-radius:10px;background:#f0f3e5}
.v13-settings .v13-settings-character>img{width:42px;height:46px;border-radius:7px}
.v13-settings .v13-settings-character small{font-size:8px;margin-bottom:2px}
.v13-settings .v13-settings-character strong{font-size:16px;line-height:20px}
.v13-settings .v13-settings-character span{font-size:9px;margin-top:2px}
.v13-settings .settings-group-title{margin:12px 1px 5px;font-size:9px;letter-spacing:.7px;color:#849174}
.v13-settings .v13-preferences{padding:0 10px;border-color:#d5dec8;border-radius:10px;background:#fffdf5}
.v13-settings .v13-preferences .toggle-row{min-height:43px;padding:8px 0;gap:8px;box-sizing:border-box}
.v13-settings .v13-preferences .toggle-row strong{font-size:12px;line-height:15px}
.v13-settings .v13-preferences .toggle-row small{font-size:9px;line-height:12px;margin-top:2px}
.v13-settings .v13-preferences .toggle-row>.icon{width:18px;font-size:18px}
.v13-settings .text-scale-row,.v13-settings .settings-journal-row{display:grid;grid-template-columns:18px minmax(0,1fr);gap:5px 8px}
.v13-settings .text-scale-row>.text-scale-input{grid-column:2;min-width:0;padding:0;gap:5px}
.v13-settings .journal-view-controls{grid-column:2;width:100%;padding:3px;margin:1px 0 0;font-size:10px;box-sizing:border-box}
.v13-settings .loading-preview-button{min-height:45px;padding:8px 10px;border-radius:10px;background:#f0f3e7;margin-top:8px}
.v13-settings .loading-preview-button>img{width:27px;height:27px}
.v13-settings .v13-account-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}
.v13-settings .v13-account-actions>button{min-height:38px;font-size:10px;padding:7px;border-radius:8px;line-height:13px}
.v13-settings .v13-settings-footer{font-size:8px;line-height:13px;margin:10px 0 0}
@media(max-width:350px){.opponent-active{padding-inline:5px}.opponent-stats .opponent-stat-page b{font-size:9px}.opponent-stat-page>span{gap:2px}.modal.v13-settings{padding:12px}.v13-settings .v13-account-actions>button{font-size:9px}}


/* Optical centering from the actual visible glyph bounds. */
.v15-log-turn .log-symbol>.icon[data-glyph="heart"]{transform:translate(0.08077em,-0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="water"]{transform:translate(0.25em,0.01923em)}
.v15-log-turn .log-symbol>.icon[data-glyph="compass"]{transform:translate(0.08462em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="hero"]{transform:translate(0.16538em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="bag"]{transform:translate(0.16538em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="chat"]{transform:translate(0.08462em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="right"]{transform:translate(0.16923em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="left"]{transform:translate(0.16923em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="close"]{transform:translate(0.20769em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="settings"]{transform:translate(0.09231em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="sword"]{transform:translate(0.13846em,0.01923em)}
.v15-log-turn .log-symbol>.icon[data-glyph="shield"]{transform:translate(0.12308em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="tree"]{transform:translate(0.12308em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="home"]{transform:translate(0.16538em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="lighthouse"]{transform:translate(0.16923em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="bread"]{transform:translate(0.08077em,-0.02308em)}
.v15-log-turn .log-symbol>.icon[data-glyph="coins"]{transform:translate(0.04231em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="star"]{transform:translate(0.03846em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="eye"]{transform:translate(0.03846em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="fire"]{transform:translate(0.20385em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="footsteps"]{transform:translate(0.16154em,0.0em)}
.v15-log-turn .log-symbol>.icon[data-glyph="sound"]{transform:translate(0.12308em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="mute"]{transform:translate(0.12308em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="vibrate"]{transform:translate(0.0em,0.00385em)}
.v15-log-turn .log-symbol>.icon[data-glyph="motion"]{transform:translate(0.08462em,0.00385em)}

/* Event balances share the row's text size at every device text scale. */
.journal-balance{display:inline-flex;align-items:center;gap:2px;white-space:nowrap;vertical-align:-.1em;height:1em;line-height:1;font-variant-numeric:tabular-nums}
#app .log-entry .journal-balance,#modal-root .log-entry .journal-balance{font-size:inherit;font-family:inherit;font-weight:400;color:#7b8079}
#app .log-entry .journal-balance b,#modal-root .log-entry .journal-balance b{font:inherit!important;font-weight:700!important;color:inherit;line-height:1}
.journal-balance img{display:block;flex:0 0 11px;width:11px;height:11px;object-fit:contain;align-self:center}
.journal-balance-glyph{display:inline-block;flex:0 0 11px;width:11px;height:11px;font:11px/11px 'Icons';font-style:normal;text-align:center;align-self:center}
.journal-balance-health-icon{color:#df7e65;transform:translateX(.08077em)}
.journal-balance-shield-icon{color:#3f72a4;transform:translateX(.12308em)}
#app .log-entry .journal-amount,#modal-root .log-entry .journal-amount{font-size:inherit;font-family:inherit}

/* Retain circles and the item's real proportions, including narrow screens. */
#app #toast.top-notice.top-notice .notice-emblem{padding:0;box-sizing:border-box;flex:0 0 auto;aspect-ratio:1;width:34px;height:34px;min-width:34px;min-height:34px;align-self:center;display:grid;place-items:center;border-radius:50%;overflow:visible}
#app #toast.top-notice .notice-emblem img{display:block;width:30px;height:30px;max-width:none;max-height:none;object-fit:contain;flex:none;aspect-ratio:1}
#app #toast.top-notice.notice-mastery .notice-emblem{overflow:hidden}
#app #toast.top-notice.notice-mastery .notice-emblem>img{border-radius:50%;object-fit:cover}
#battle-root .combat-popup.wait-resource>img{width:20px;height:20px}

.journal-area-summary{display:block;line-height:1.5}
.journal-area-total{font-size:inherit;color:#2f6a52}
.journal-area-targets{display:block;width:100%;max-width:100%;margin-top:2px}
.journal-area-target{display:block;min-width:0;max-width:100%;line-height:1.5}
.journal-area-name{display:inline;margin-right:8px;color:#94503f;font-weight:400;font-variant-numeric:tabular-nums}
.journal-area-hit{display:inline;font-variant-numeric:tabular-nums}
.journal-area-hit>.journal-detail-wrap{display:none;opacity:1;overflow:visible;transition:none}
.journal-area-target[data-expanded="true"] .journal-area-hit>.journal-detail-wrap{display:inline}
.journal-area-target .journal-balance{margin-left:3px}

.opponent-stat-glyph{display:inline-block;flex:0 0 12px;width:12px;height:12px;font:12px/12px Icons!important;font-style:normal;text-align:center}
.opponent-stat-glyph[data-glyph="heart"]{color:#df7e65;transform:translateX(.08077em)}
.opponent-stat-glyph[data-glyph="sword"]{color:#7b9270;transform:translateX(.13846em)}
.opponent-defense-icon{display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;box-sizing:border-box;border:1px solid #b1c5d7;border-radius:4px;background:#e7eff6}
.opponent-stat-page .opponent-defense-icon img{width:13px!important;height:13px!important;flex:none!important}
.opponent-defense-magic .opponent-defense-icon{border-color:#c2b6d5;background:#eee8f5}
.opponent-defense-physical b{color:#3f6f9b}.opponent-defense-magic b{color:#78608e}
@container enemy-card (max-height:210px){
 .opponent-active{padding:6px 5px;gap:3px}
 .world-opponents .opponent-card .opponent-inspect{grid-template-rows:11px minmax(0,1fr) 25px;gap:2px}
 .opponent-name{height:25px;line-height:12px;font-size:9px}
 .opponent-loot{height:25px;flex-basis:25px;padding-top:2px}
 .opponent-loot>button{width:22px;min-width:22px;flex-basis:22px;height:22px;min-height:22px}
 .opponent-loot>button>img{width:18px;height:18px}
 .opponent-attack.world-attack-button{height:25px;min-height:25px;max-height:25px}
}
@container enemy-card (max-height:170px){
 .opponent-active{padding:5px 4px;gap:2px}
 .world-opponents .opponent-card .opponent-inspect{grid-template-rows:10px minmax(0,1fr) 21px;gap:1px}
 .opponent-name{height:21px;line-height:10px;font-size:8px}
 .opponent-attack.world-attack-button{height:23px;min-height:23px;max-height:23px;font-size:9px}
 .opponent-loot{height:23px;flex-basis:23px}
 .opponent-loot>button{width:20px;min-width:20px;flex-basis:20px;height:20px;min-height:20px}
 .opponent-loot>button>img{width:17px;height:17px}
}

/* Never enlarge short panels; cap tall panels at the cards' natural height. */
#world .destination>.location-inline-panel:has(.world-opponents){inset:0;width:100%;height:100%;padding:clamp(10px,calc(6dvh - 30.8px),13px)}
.opponent-stat-token{display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;box-sizing:border-box;border:1px solid;border-radius:4px}
.opponent-token-heart{background:#f8e7df;border-color:#dbbdb0}
.opponent-token-sword{background:#e8efde;border-color:#bdcba9}

#world .location-inline-panel:has(.world-opponents)>.world-panel-heading{flex-basis:clamp(28px,calc(10dvh - 40px),33px);min-height:clamp(28px,calc(10dvh - 40px),33px);margin-bottom:clamp(6px,calc(6dvh - 34.8px),9px);padding-bottom:clamp(6px,calc(4dvh - 21.2px),8px)}

#app .journal-modifier[data-journal-tone="guard"],#modal-root .journal-modifier[data-journal-tone="guard"],#app .journal-modifier[data-journal-tone="guard"] b,#modal-root .journal-modifier[data-journal-tone="guard"] b{color:#3f72a4}
#app .journal-modifier[data-journal-tone="boost"],#modal-root .journal-modifier[data-journal-tone="boost"],#app .journal-modifier[data-journal-tone="boost"] b,#modal-root .journal-modifier[data-journal-tone="boost"] b{color:#326d52}
#app .journal-modifier[data-journal-tone="foe"],#modal-root .journal-modifier[data-journal-tone="foe"],#app .journal-modifier[data-journal-tone="foe"] b,#modal-root .journal-modifier[data-journal-tone="foe"] b{color:#ad5141}
#battle-log-content{overflow-anchor:none}
#app .journal-amount,#modal-root .journal-amount{box-shadow:none;border:0;border-radius:0;background:none;transform:none;transition:none;outline:none;vertical-align:baseline}
#app .journal-amount:focus-visible,#modal-root .journal-amount:focus-visible{outline:none;text-decoration-thickness:2px;text-decoration-style:solid}

/* Journal event tiles follow meaning, including recovery and missed turns. */
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="ally"]{color:#61846a;background:#eaf0df}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="heal"]{color:#4d875c;background:#e3eedf}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="guard"]{color:#3f72a4;background:#e3edf5}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="foe"]{color:#ac5c4d;background:#f5e6df}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="control"]{color:#7b72a0;background:#ece9f4}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="poison"]{color:#788b4e;background:#edf0da}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="critical"]{color:#ba683c;background:#f8e7cf}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="resource"]{color:#9a7b42;background:#f4ebd4}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="neutral"]{color:#7c8f72;background:#edf0e4}
.log-event-badge{position:absolute;right:0;bottom:0;display:block;width:10px;height:10px;border-radius:3px;background:#fffdf3;font:9px/10px Icons!important;font-style:normal;text-align:center;color:inherit;transform:translateX(.15em)}
.log-event-badge[data-badge="star"]{color:#d18431;top:0;bottom:auto}

/* Transparent artwork inside the original compact effect blocks. */
#battle-root .spell-panel-battle .combat-effect-icon,#battle-root .spell-panel-battle .enemy-effect{display:inline-flex;align-items:center;justify-content:center;border:1px solid #c6d3b8;background:#fffdf1;box-shadow:none;border-radius:5px;padding:0 3px;gap:3px;min-width:29px;height:20px;min-height:20px;}
#battle-root .spell-panel-battle .combat-effect-icon[aria-expanded="true"],#battle-root .spell-panel-battle .enemy-effect[aria-expanded="true"]{border-color:#377c6c;background:#e4eee0;box-shadow:inset 0 0 0 1px #92b4a1;}
#battle-root .spell-panel-battle .combat-effect-icon>img,#battle-root .spell-panel-battle .enemy-effect>img{padding:0;border:0;border-radius:0;background:none;object-fit:contain;width:18px;height:18px;flex:0 0 18px;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon{height:18px;min-height:18px;min-width:27px;padding:0 2px;gap:2px;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon>img,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon>img{width:14px;height:14px;flex-basis:14px;}
#battle-root .spell-panel-battle .combat-effect-icon .effect-duration{font-family:Interface,sans-serif;font-size:9px;font-weight:700;line-height:12px;position:static;background:none;}
#battle-root .spell-panel-battle .combat-effect-icon .effect-permanent{font-size:12px;line-height:12px;min-width:10px;}
#battle-root .spell-panel-battle .combat-effect-icon:focus-visible{outline:1px solid #477b71;outline-offset:2px;}
#battle-root .combat-popup .combat-number-icon-wrap>img.combat-number-source{background:transparent;border:0;border-radius:0;}
/* Balance figures use the surrounding text baseline and proportional numerals. */
#app .log-entry .journal-balance,#modal-root .log-entry .journal-balance{display:inline;height:auto;vertical-align:baseline;line-height:inherit;font-family:inherit;font-size:inherit;font-variant-numeric:normal;}
#app .log-entry .journal-balance b,#modal-root .log-entry .journal-balance b{display:inline;vertical-align:baseline;line-height:inherit!important;font-family:inherit!important;font-size:inherit!important;font-weight:700!important;font-variant-numeric:normal;}
#app .journal-balance img,#modal-root .journal-balance img{display:inline-block;width:.9em;height:.9em;margin:0 .18em 0 .08em;vertical-align:-.1em;object-fit:contain;}
#app .journal-balance-glyph,#modal-root .journal-balance-glyph{display:inline-block;width:.9em;height:.9em;margin:0 .18em 0 .08em;vertical-align:-.1em;font-size:.9em;line-height:1;}

#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon .effect-duration.effect-permanent,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon .effect-duration.effect-permanent{font-size:12px!important;font-weight:700;line-height:12px;min-width:10px;}

/* Permanent statuses use the compact square requested by the owner. */
#battle-root .spell-panel-battle .combat-effect-icon.effect-square{width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;padding:1px;gap:0;}
#battle-root .spell-panel-battle .combat-effect-icon.effect-square>img{width:16px;height:16px;flex-basis:16px;}
#battle-root .spell-panel-battle .combat-effect-icon.effect-square .effect-duration{display:none;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon.effect-square,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon.effect-square{width:18px;min-width:18px;max-width:18px;height:18px;min-height:18px;padding:1px;}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon.effect-square>img,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon.effect-square>img{width:14px;height:14px;flex-basis:14px;}

#app .log-entry button[data-journal-amount],#modal-root .log-entry button[data-journal-amount]{outline:0!important;box-shadow:none!important;border:0!important;border-radius:0!important;}
#app .log-entry button[data-journal-amount]:focus-visible,#modal-root .log-entry button[data-journal-amount]:focus-visible{text-decoration-thickness:2px!important;text-underline-offset:2px;}

/* Identical art size and block height within each effects row. */
#battle-root .spell-panel-battle .combat-effect-icon{--effect-art:18px;--effect-box:22px;height:var(--effect-box);min-height:var(--effect-box);}
#battle-root .spell-panel-battle .player-card-effects .combat-effect-icon,#battle-root .spell-panel-battle .enemy-card-effects .combat-effect-icon{--effect-art:14px;--effect-box:18px;}
#battle-root .spell-panel-battle .combat-effect-icon.effect-square{width:var(--effect-box);min-width:var(--effect-box);max-width:var(--effect-box);height:var(--effect-box);min-height:var(--effect-box);}
#battle-root .spell-panel-battle .combat-effect-icon>img{width:var(--effect-art)!important;height:var(--effect-art)!important;flex:0 0 var(--effect-art)!important;}

#battle-root .spell-panel-battle .combat-effect-icon{box-sizing:border-box!important;height:var(--effect-box)!important;min-height:var(--effect-box)!important;max-height:var(--effect-box)!important;padding-top:1px!important;padding-bottom:1px!important;vertical-align:middle;}

/* Small upward paper tabs: numerals remain clear of the painted skill. */
#battle-root .spell-panel-battle .combat-skill-cost{
 top:-2px;bottom:auto;right:2px;left:auto;box-sizing:border-box;
 height:19px;min-height:19px;min-width:27px;padding:5px 4px 2px;
 border:1px solid #c5ac79;border-bottom:0;border-radius:3px 3px 0 0;
 clip-path:polygon(0 0,50% 3px,100% 0,100% 100%,0 100%);
 background:linear-gradient(#fff0c9,#ead49e);box-shadow:none;
 font:700 8px/10px Interface,sans-serif;
}
#battle-root .spell-panel-battle .combat-skill-cooldown.on-cooldown{
 top:auto;bottom:-1px;left:1px;right:auto;box-sizing:border-box;
 height:19px;min-height:19px;min-width:29px;padding:5px 4px 2px;
 border:1px solid #8b4d5a;border-bottom:0;border-radius:3px 3px 0 0;
 clip-path:polygon(0 0,50% 3px,100% 0,100% 100%,0 100%);
 background:linear-gradient(#a65c6b,#7f3749);box-shadow:none;
 font:700 8px/10px Interface,sans-serif;
}
#battle-root .spell-panel-battle .combat-skill-cooldown:not(.on-cooldown){
 bottom:1px;left:2px;right:2px;max-width:calc(100% - 4px);padding:2px 1px;
 border-radius:3px;background:#fffbedeb;color:#797b70;
 font:700 7px/9px Interface,sans-serif;
}
/* Compact attached tags, with a clean border and no clipped ribbon tails. */
#battle-root .spell-panel-battle .combat-skill-cost{top:1px;right:1px;bottom:auto;left:auto;height:17px;min-height:17px;min-width:25px;padding:2px 4px;border:1px solid #c4ad78;border-radius:4px;background:linear-gradient(#fff3d0,#eedaa9);clip-path:none;box-shadow:0 1px 2px #57492720;font:700 8px/11px Interface,sans-serif;}
#battle-root .spell-panel-battle .combat-skill-cooldown.on-cooldown{left:1px;bottom:1px;top:auto;right:auto;height:17px;min-height:17px;min-width:27px;padding:2px 4px;border:1px solid #934a5a;border-radius:4px;background:linear-gradient(#ac6272,#8b4053);clip-path:none;box-shadow:0 1px 2px #62273a25;font:700 8px/11px Interface,sans-serif;}

/* The same established arcane glyph is violet in amounts and the journal. */
.combat-popup-glyph[data-glyph="magic"],.journal-stat .magic-damage-glyph{color:#8663ab!important}
.v15-log-turn .log-entry>.log-symbol[data-journal-tone="magic"]{color:#8663ab;background:#eee8f5}
.log-event-source{position:absolute;right:0;bottom:0;width:13px;height:13px;object-fit:contain;background:transparent;pointer-events:none}

.hero-combat-stats [data-hero-stat="spell"]>.icon,.item-stat-chip .item-glyph-star,.log-symbol[data-journal-event="magic-damage"]>.icon{color:#8663ab!important}

/* Skill artwork uses the same circular crop as mastery notices. */
#app #toast.top-notice.notice-round-skill .notice-emblem>img{border-radius:50%;object-fit:cover}

/* Local review: prevent accidental selection while keeping text fields editable. */
html,body,body *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"],[contenteditable="true"] *{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
img{-webkit-user-drag:none}
.skill-fact-icon{display:inline-block;width:14px;height:14px;object-fit:contain;vertical-align:-2px;margin-right:5px}

/* Fallback group dialog must be self-contained outside the world panel. */
.dungeon-dialog.dungeon-group-dialog{width:min(360px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow-y:auto;box-sizing:border-box;padding:16px;border-radius:16px}
.dungeon-group-dialog .dungeon-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid #d4cfb9;margin-bottom:14px}
.dungeon-group-dialog .dungeon-dialog-heading h2{margin:0;font:700 19px/1.3 Interface,sans-serif}
.dungeon-group-dialog .dungeon-dialog-heading>button{width:36px;height:36px;flex:none}
.dungeon-group-dialog .dungeon-group-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.dungeon-group-dialog .dungeon-group-title>span{display:grid;gap:4px;flex:1;min-width:0}
.dungeon-group-dialog .dungeon-group-title strong{font:700 14px/1.4 Interface,sans-serif}
.dungeon-group-dialog .dungeon-group-title small{font:11px/1.4 Interface,sans-serif}
.dungeon-group-dialog .dungeon-group-title>b{white-space:nowrap;font-size:12px}
.dungeon-group-dialog .dungeon-group-title>button{flex:none;width:44px;height:48px;padding:3px}
.dungeon-group-dialog .dungeon-group-title>button img{max-width:38px;max-height:42px;object-fit:contain}
.dungeon-group-dialog .dungeon-member-list{display:grid;gap:8px;list-style:none;padding:0;margin:0 0 16px}
.dungeon-group-dialog .dungeon-member{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid #d3d8c0;border-radius:10px;background:#f1f3e7}
.dungeon-group-dialog .dungeon-member>img{width:44px;height:52px;max-width:44px;max-height:52px;object-fit:cover;border-radius:8px}
.dungeon-group-dialog .dungeon-member>span{display:grid;gap:4px;min-width:0}
.dungeon-group-dialog .dungeon-member strong{font:650 13px/1.4 Interface,sans-serif;overflow-wrap:anywhere}
.dungeon-group-dialog .dungeon-member small,.dungeon-group-dialog .dungeon-leader-label{font:10px/1.4 Interface,sans-serif}
.dungeon-group-dialog .dungeon-group-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dungeon-group-dialog .dungeon-group-actions>button{min-height:42px;padding:9px 10px;border-radius:9px;font:650 12px/1.35 Interface,sans-serif}
.local-dark-screen .dungeon-group-dialog{background:#203340;color:#d4e4e6;border-color:#587581}
.local-dark-screen .dungeon-group-dialog .dungeon-member{background:#2b414d;border-color:#526c77}
.local-dark-screen .dungeon-group-dialog .dungeon-dialog-heading{border-color:#526c77}
