/* 0.15.8: portrait beside aligned vitals and a collapsible target panel. */

/* A roster stays four cards wide. Expansion reveals one effect row. */
.spell-panel-battle>.battle-top{grid-row:1;align-self:start;position:relative;z-index:8;width:100%;height:auto;padding:5px 8px 11px;background:#faf7e9;border:1px solid #d5ddc6;border-top:0;border-left:0;border-right:0;border-radius:0 0 17px 17px;box-shadow:0 3px 7px #35452a0b;overflow:visible;}
.spell-panel-battle .combat-roster{position:relative;margin:0;padding:0;border:0;background:transparent;box-shadow:none;--roster-card-width:clamp(64px,calc((100% - 18px)/4),88px);}
.spell-panel-battle .combat-roster+.combat-roster{margin-top:3px;}
.spell-panel-battle .players-cards,.spell-panel-battle .enemy-cards{display:flex;flex-wrap:nowrap;align-items:flex-start;justify-content:flex-start;gap:6px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;}
.players-cards::-webkit-scrollbar,.enemy-cards::-webkit-scrollbar{display:none;}
.spell-panel-battle .player-compact,.spell-panel-battle .player-expanded,.spell-panel-battle .enemy-cards .enemy-card{position:relative;flex:0 0 var(--roster-card-width);width:var(--roster-card-width);max-width:88px;min-width:0;margin:0;border:1px solid #d2dcc3;border-radius:8px;background:linear-gradient(145deg,#fffdf2,#f4f5e7);box-shadow:inset 0 1px 0 #fffef8;text-align:left;transition:height .2s ease,background-color .16s ease,border-color .16s ease;}
.spell-panel-battle .player-compact,.spell-panel-battle .player-expanded{display:flex;flex-direction:column;align-items:stretch;gap:3px;height:60px;min-height:60px;padding:4px;overflow:hidden;}
.spell-panel-battle .player-card-main{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:4px;flex:none;width:100%;height:48px;min-width:0;}
.spell-panel-battle .player-card-portrait{width:24px;height:48px;object-fit:cover;object-position:50% 25%;border:1px solid #c7d3b8;border-radius:5px;}
.spell-panel-battle .player-card-copy{display:flex;flex-direction:column;justify-content:center;min-width:0;height:48px;}
.spell-panel-battle .player-card-identity{display:flex;align-items:center;gap:3px;flex:none;width:100%;min-width:0;height:13px;margin:0;padding:0;}
.player-card-identity>strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:13px;color:#4b6954;}
.player-card-identity .roster-ready{position:static;flex:none;width:9px;height:10px;font-size:7px;line-height:10px;border-radius:3px;}
.spell-panel-battle .player-card-vitals{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;width:100%;margin:2px 0 0;padding:3px 0 0;border-top:1px solid #dce3ce;}
.player-card-vitals .roster-meter{display:grid;grid-template-columns:8px minmax(0,1fr);align-items:center;gap:1px 2px;min-width:0;margin:0;font-size:8px;line-height:9px;}
.player-card-vitals .roster-meter-label{display:grid;place-items:center;min-width:0;width:8px;height:9px;line-height:9px;}
.player-card-vitals .roster-meter-label>.icon{display:grid;place-items:center;width:8px;height:9px;font-size:8px;line-height:9px;color:#c4806a;}
.player-card-vitals .resource-icon{display:block;width:8px;height:9px;object-fit:contain;}
.player-card-vitals .roster-meter-label-text{display:none;}
.player-card-vitals .roster-meter strong{min-width:0;overflow:visible;font-size:8px;line-height:9px;font-weight:700;letter-spacing:-.1px;white-space:nowrap;text-align:right;font-variant-numeric:tabular-nums;color:#a9745e;}
.player-card-vitals .roster-value-max{display:inline;font-size:6.5px;font-weight:400;color:#8c987f;}
.player-card-vitals .mana strong{color:#6d99a4;}
.player-card-vitals .might strong{color:#a18c54;}
.player-card-vitals .roster-meter>i{grid-column:1/-1;height:2px;background:#e8eadb;border-radius:3px;}
.player-card-vitals .roster-meter b{border-radius:3px;}
.spell-panel-battle .player-expanded{height:80px;min-height:80px;}
.player-card-effects{display:flex;align-items:center;justify-content:center;gap:3px;min-height:14px;margin-top:auto;padding-top:3px;border-top:1px solid #e1e6d4;font-size:7px;line-height:11px;color:#8d977c;}
.player-card-effects>span{display:flex;align-items:center;gap:2px;min-height:12px;}
.player-card-effects .icon{font-size:11px;}
.spell-panel-battle .player-compact.mine{border-color:#b3c6a3;}
.spell-panel-battle .player-compact.heal-selected{border-color:#8da779;background:#eef4e4;box-shadow:inset 0 0 0 1px #c5d5b5;}
.spell-panel-battle .player-compact.fallen{opacity:.58;}
.spell-panel-battle .enemy-cards .enemy-card{height:54px;min-height:54px;overflow:hidden;}
.spell-panel-battle .enemy-cards .enemy-card.selected{border-color:#8eaa7c;background:#eef4e3;box-shadow:inset 0 0 0 1px #cadbbb;}
.spell-panel-battle .enemy-card .enemy-card-select{display:block;width:100%;height:52px;min-height:0;margin:0;padding:0;border-radius:7px;opacity:1;}
.spell-panel-battle .enemy-card .enemy-card-main{display:grid;grid-template-columns:10px 25px minmax(0,1fr);grid-template-rows:23px 11px 3px;align-items:center;justify-items:start;gap:3px 3px;width:100%;height:52px;padding:4px;}
.spell-panel-battle .enemy-card-main>img{grid-column:2;grid-row:1;width:25px;height:23px;object-fit:contain;}
.spell-panel-battle .enemy-card .enemy-number{position:static;grid-column:1;grid-row:1;width:10px;height:14px;border:0;border-radius:4px;font-size:7px;font-weight:700;line-height:14px;text-align:center;color:#fffdf2;background:#b7ae87;}
.spell-panel-battle .selected .enemy-number{background:#7d996a;}
.spell-panel-battle .enemy-card-main>strong{grid-column:3;grid-row:1;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:13px;color:#617451;}
.spell-panel-battle .enemy-card-main>.enemy-hp{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:center;gap:3px;width:100%;min-width:0;max-width:none;margin:0;padding-top:3px;border-top:1px solid #dce3ce;overflow:visible;font-size:8px;line-height:11px;color:#a57c64;font-variant-numeric:tabular-nums;}
.enemy-hp>.icon{flex:none;font-size:8px;line-height:11px;color:#c38069;}
.enemy-hp-value{min-width:0;white-space:nowrap;overflow:visible;text-overflow:clip;}
.spell-panel-battle .enemy-card .progress{grid-column:1/-1;grid-row:3;width:100%;height:2px;margin:0;}
.spell-panel-battle .enemy-selected-mark{display:none!important;}
.spell-panel-battle .enemy-card-effects{display:none!important;align-items:center;justify-content:center;gap:3px;height:20px;min-height:20px;margin:0;padding:2px 4px;border-top:1px solid #dce3ce;}
.spell-panel-battle .roster-open .enemy-cards .enemy-card{height:74px;min-height:74px;}
.spell-panel-battle .roster-open .enemy-card-effects{display:flex!important;}
.spell-panel-battle .enemy-effect{display:flex;align-items:center;justify-content:center;gap:3px;min-height:15px;height:15px;margin:0;padding:1px 4px;border:1px solid #d2ddc3;border-radius:5px;background:#f6f8ed;font-size:8px;line-height:11px;color:#7f9473;}
.spell-panel-battle .enemy-effect>.icon{font-size:11px;line-height:11px;}
.spell-panel-battle .enemy-effect>img{width:12px;height:12px;object-fit:contain;}
.spell-panel-battle .enemy-effect-popover{position:absolute;z-index:35;top:calc(100% + 7px);left:var(--effect-left,0px);right:auto;bottom:auto;width:min(214px,calc(100vw - 24px));max-height:140px;margin:0;padding:7px 8px;overflow:auto;border:1px solid #c8d3ba;border-radius:10px;background:#fffdf2;box-shadow:0 5px 16px #354a3028;}
.spell-panel-battle .enemy-effect-popover>header{display:flex;align-items:center;gap:6px;min-height:26px;margin:0 0 5px;padding:0 0 5px;border-bottom:1px solid #e1e6d5;}
.spell-panel-battle .enemy-effect-popover>header>img{width:24px;height:24px;flex:none;object-fit:contain;}
.spell-panel-battle .enemy-effect-popover h3{flex:1;min-width:0;font:700 10px/13px Interface,sans-serif;}
.spell-panel-battle .enemy-effect-popover h3>small{display:block;margin-top:1px;font-size:8px;font-weight:400;color:#8b967d;}
.spell-panel-battle .enemy-effect-popover .icon-button{width:22px;min-width:22px;height:22px;min-height:22px;padding:3px;}
.spell-panel-battle .enemy-effect-copy{padding:0;font-size:10px;line-height:1.4;}
.spell-panel-battle .enemy-effect-copy p{margin:0 0 5px;font-size:10px;line-height:1.4;}
.spell-panel-battle .enemy-effect-copy p:last-child{margin:0;}
.spell-panel-battle .enemy-effect-copy strong,.spell-panel-battle .enemy-effect-copy span{display:block;font-size:10px;}
.spell-panel-battle .enemy-effect-copy small{display:block;margin-top:3px;font-size:8px;line-height:1.3;color:#919982;}
@media(max-width:350px){
 .spell-panel-battle .combat-roster{--roster-card-width:clamp(64px,calc((100% - 12px)/4),88px);}
 .spell-panel-battle .players-cards,.spell-panel-battle .enemy-cards{gap:4px;}
 .spell-panel-battle .player-compact,.spell-panel-battle .player-expanded{padding:4px 2px;}
 .spell-panel-battle .player-card-main{grid-template-columns:18px minmax(0,1fr);gap:2px;}
 .spell-panel-battle .player-card-portrait{width:18px;}
 .player-card-identity{gap:3px;}
 .player-card-identity>strong{font-size:8px;}
 .player-card-vitals .roster-meter,.player-card-vitals .roster-meter strong{font-size:7px;}
 .player-card-vitals .roster-value-max{font-size:5.5px;}
 .spell-panel-battle .enemy-card .enemy-card-main{grid-template-columns:9px 19px minmax(0,1fr);column-gap:2px;}
 .spell-panel-battle .enemy-card-main>img{width:19px;}
 .spell-panel-battle .enemy-card .enemy-number{width:9px;font-size:6px;}
 .spell-panel-battle .enemy-card-main>strong{font-size:8px;}
 .spell-panel-battle .enemy-card-main>.enemy-hp{font-size:7px;}
}
.reduced-motion .spell-panel-battle .player-compact,.reduced-motion .spell-panel-battle .enemy-card{transition:none;}
@media(prefers-reduced-motion:reduce){.spell-panel-battle .player-compact,.spell-panel-battle .enemy-card{transition:none;}}
#app{--chat-strip:34px;--nav:calc(62px + var(--chat-strip));}
#app>.screen{bottom:var(--nav)}
#app>.bottom-nav{bottom:var(--chat-strip);height:62px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:5px 10px;background:#f8f5eb;border-top:1px solid #d7ddc9;box-shadow:none;}
#app .bottom-nav .nav-item{min-width:0;margin:0;padding:5px 4px 6px;display:grid;grid-template-rows:24px 13px;justify-items:center;align-content:center;gap:2px;border:1px solid transparent;border-radius:10px;background:transparent;font-size:10px;line-height:13px;letter-spacing:0;text-align:center;transform:none;}
#app .bottom-nav .nav-item>.icon{height:24px;width:25px;font-size:22px;line-height:1;}
#app .bottom-nav .nav-item.active{background:#edf1e3;border-color:#cbd5bd;color:#365d50;box-shadow:none;}
#app .bottom-nav .nav-item.active:after{display:none;}
#app .bottom-nav .nav-badge{top:0;right:20%;line-height:12px;}
#app.v153-in-battle>.bottom-nav{visibility:hidden;pointer-events:none;}
.chat-dock{position:absolute;left:0;right:0;bottom:0;z-index:9;display:flex;align-items:center;gap:7px;flex:none;width:100%;height:var(--chat-strip);min-height:34px;padding:5px 11px;border:0;border-top:1px solid #d9dfcd;border-radius:0;background:#f6f5e9;color:#71816b;text-align:left;touch-action:none;}
.chat-dock-icon{font:17px/1 Icons;flex:none;color:#7b8e72;}
.chat-dock-copy{min-width:0;flex:1;display:flex;align-items:center;gap:4px;white-space:nowrap;overflow:hidden;font-size:10px;line-height:20px;}
.chat-dock-copy strong{max-width:38%;flex:none;overflow:hidden;text-overflow:ellipsis;font-size:9px;color:#55765d;}
.chat-dock-copy>span{min-width:0;overflow:hidden;text-overflow:ellipsis;}
.chat-dock-badge{flex:none;min-width:17px;padding:1px 4px;border-radius:5px;background:#758d69;color:#fffdf3;text-align:center;font-size:8px;line-height:14px;}
.chat-dock-arrow{flex:none;display:block;width:7px;height:7px;margin:4px 3px 0;border-top:1.5px solid #839377;border-left:1.5px solid #839377;transform:rotate(45deg);}
#chat-open{display:none;}
#battle-root>.spell-panel-battle{--combat-panel-height:110px;--combat-hud-height:0px;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;}
.spell-panel-battle .battle-status{margin:0 0 3px;}
.spell-panel-battle .battle-status .party-clock{min-height:29px;padding:4px 8px 3px;border-radius:8px;background:#f5f5e7;border-color:#d5ddc6;}
.spell-panel-battle .clock-copy{min-height:19px;gap:6px;font-size:10px;}
.spell-panel-battle .battle-status .turn-badge{font-size:9px;padding:2px 6px;border-radius:5px;}
.spell-panel-battle .clock-copy strong{font-size:11px;}
.spell-panel-battle .clock-track{height:2px;margin-top:3px;}
.spell-panel-battle #party-bar,.spell-panel-battle .combat-player{display:none!important;}
.roster-toggle{position:relative;display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:23px;height:23px;margin:0;padding:1px 5px;font-size:9px;font-weight:700;letter-spacing:.1px;color:#74806a;text-align:left;touch-action:none;}
.roster-toggle>span{display:flex;align-items:center;gap:5px;}
.roster-toggle small{font-size:8px;font-weight:400;color:#a0a58c;}
.roster-toggle .chevron{width:6px;height:6px;margin-right:5px;border-color:#8b987e;}
.roster-open>.roster-toggle .chevron{transform:rotate(225deg);}
.roster-ready{position:absolute;right:2px;top:1px;width:11px;height:11px;font:700 8px/11px Interface,sans-serif;background:#759568;color:#fff;border-radius:3px;text-align:center;font-style:normal;}
.roster-detail-card.fallen{opacity:.55;}
.roster-sheet{position:absolute;top:calc(100% + 4px);left:8px;right:8px;z-index:22;max-height:min(320px,46dvh);padding:7px;overflow-y:auto;overscroll-behavior:contain;border:1px solid #bfcdb0;border-radius:10px;background:#fffbed;box-shadow:0 8px 18px #26371e30;animation:roster-in .18s ease-out;}
.roster-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:6px;}
.roster-detail-grid:has(>:only-child){grid-template-columns:1fr;}
.roster-detail-card{min-width:0;margin:0;padding:7px;border:1px solid #d7dfc8;border-radius:8px;background:#f9f9ed;}
.roster-detail-card.selected{border-color:#98ae81;background:#eef3e0;}
.roster-detail-identity{position:relative;display:flex;align-items:center;gap:7px;width:100%;min-width:0;min-height:34px;margin:0 0 6px;padding:0;text-align:left;}
.roster-detail-identity:disabled{opacity:1;}
.roster-detail-identity>img{width:32px;height:34px;flex:none;border:1px solid #c5d1b7;border-radius:7px;object-fit:cover;object-position:50% 25%;}
.enemy-detail .roster-detail-identity>img{object-fit:contain;border:0;}
.roster-detail-identity>span{min-width:0;}
.roster-detail-identity strong{display:block;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:1.35;}
.roster-detail-identity small{display:block;margin-top:2px;font-size:8px;line-height:1.4;color:#8b9477;}
.roster-meter{display:grid;grid-template-columns:1fr auto;gap:2px 6px;margin-top:5px;font-size:9px;line-height:1.3;color:#8a9377;}
.roster-meter strong{font-size:9px;font-variant-numeric:tabular-nums;color:#69775b;}
.roster-meter>i{grid-column:1/-1;height:4px;border-radius:3px;background:#e4e9d7;overflow:hidden;}
.roster-meter b{display:block;height:100%;background:#cb866a;border-radius:3px;transition:width .2s ease;}
.roster-meter.mana b{background:#7ba6b1;}
.roster-meter.might b{background:#b3a16a;}
.roster-effects{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px;}
.roster-effects:empty{display:none;}
.roster-effects>span,.roster-effects>button{padding:3px 5px;border:1px solid #d6ddc4;border-radius:5px;background:#f0f3e3;font-size:8px;line-height:1.25;color:#7c896c;}
.spell-panel-battle .battle-field{flex:1 1 0;min-height:0;margin:0;}
.spell-panel-battle .battle-console{position:relative;z-index:10;flex:none;margin:0;padding:6px 10px 7px;border:1px solid #d3d9c0;border-bottom:0;border-left:0;border-right:0;border-radius:15px 15px 0 0;background:#faf7e9;box-shadow:0 -3px 9px #34492b0e;}
.spell-panel-battle .combat-action-panel{height:var(--combat-panel-height);min-height:var(--combat-panel-height);}
.spell-panel-battle .combat-action-view{grid-template-rows:28px minmax(0,1fr);gap:6px;padding:1px 0;}
.spell-panel-battle .battle-log{position:relative;overflow:visible;border-radius:7px;background:#fffbed;border-color:#d2dac0;}
.spell-panel-battle .battle-log-toggle{height:26px;min-height:26px;width:100%;padding:4px 9px;font-size:10px;}
.spell-panel-battle .battle-log-toggle .icon{font-size:15px;}
.spell-panel-battle .battle-log-toggle small{margin-left:4px;color:#a3a88b;font-size:8px;}
.spell-panel-battle .battle-log.log-expanded{border-top-left-radius:0;border-top-right-radius:0;}
.spell-panel-battle .battle-log-content{position:absolute;z-index:18;left:-1px;right:-1px;bottom:calc(100% - 1px);top:auto;max-height:min(290px,43dvh);overflow-y:auto;overscroll-behavior:contain;padding:8px;border:1px solid #c9d4b7;border-bottom:0;border-radius:11px 11px 0 0;background:#fffbed;box-shadow:0 -6px 14px #29432717;animation:roster-up .18s ease-out;}
.spell-panel-battle .battle-log-content .v15-log-turn{margin:0 0 6px;}
.spell-panel-battle .battle-log-content .log-entry{padding-top:4px;padding-bottom:4px;}
.spell-panel-battle .battle-buttons{gap:7px;}
.spell-panel-battle .battle-console .battle-action{padding:8px 10px;gap:8px;border-radius:10px;font-size:16px;line-height:1.2;}
.spell-panel-battle .battle-action .icon{font-size:24px;}
.spell-panel-battle .battle-action small{font-size:9px;margin-top:4px;}
.spell-panel-battle #skills-root{inset:0;padding:0;min-height:0;overflow:visible;border-radius:0;background:#faf7e9;box-shadow:none;}
.spell-panel-battle .combat-panel-head{position:relative;height:27px;min-height:27px;padding:0 2px 3px;gap:5px;}
.spell-panel-battle .combat-panel-head h3{flex:1;font:700 11px/1.3 Interface,sans-serif;}
.spell-panel-battle .combat-panel-collapse{min-height:25px;padding:3px 7px;font-size:9px;}
.combat-panel-grip{display:grid;place-items:center;width:38px;min-width:38px;height:27px;padding:0;border:0;border-radius:6px;background:transparent;touch-action:none;}
.combat-panel-grip .chevron{width:7px;height:7px;border-color:#80926c;transform:rotate(225deg);}
.combat-panel-grip[aria-expanded="true"] .chevron{transform:rotate(45deg);}
.spell-panel-battle .combat-skills-list{height:80px;min-height:0;flex:1;align-items:flex-start;gap:7px;padding:1px 2px 2px;}
.spell-panel-battle .combat-skill-row{flex:0 0 clamp(44px,calc((100% - 28px)/5),58px);min-width:0;align-items:center;gap:4px;}
.spell-panel-battle .combat-skill-cast{position:relative;width:100%;height:51px;min-height:51px;display:grid;place-items:center;padding:4px;border:1px solid #c5d0b3;border-radius:9px;background:linear-gradient(145deg,#fffdf1,#edf1df);box-shadow:inset 0 1px 0 #ffffffb3;}
.spell-panel-battle .combat-skill-cast .skill-asset{height:42px;width:42px;max-width:100%;object-fit:contain;}
.spell-panel-battle .combat-skill-cost{top:-1px;right:-1px;gap:1px;padding:2px;border-color:#cdd5bd;border-radius:0 8px 0 5px;font-size:8px;line-height:10px;background:#fffdf3;}
.spell-panel-battle .combat-skill-cost .resource-icon{width:8px;height:10px;}
.spell-panel-battle .combat-skill-cooldown{left:2px;bottom:2px;max-width:calc(100% - 4px);font-size:7px;padding:2px;background:#fffbeded;}
.spell-panel-battle .combat-skill-info{align-self:center;width:24px;min-width:24px;height:23px;min-height:23px;border:1px solid #cad4b8;border-radius:7px;background:#f2f5e6;font:700 13px/21px Interface,sans-serif;color:#839274;}
.spell-panel-battle .combat-skill-description{inset:auto -1px calc(100% - 1px);z-index:20;max-height:min(240px,37dvh);min-height:120px;padding:3px 2px 4px;border:1px solid #becdad;border-radius:11px 11px 0 0;background:#fbfbee;box-shadow:0 -6px 14px #2841271c;animation:roster-up .18s ease-out;}
.spell-panel-battle .combat-skill-description>header{min-height:35px;padding:1px 3px 4px 7px;border-bottom:1px solid #e0e5d1;}
.spell-panel-battle .combat-skill-description h4{font:700 12px/1.35 Interface,sans-serif;}
.spell-panel-battle .combat-description-copy{max-height:min(175px,27dvh);padding:7px 9px;line-height:1.5;font-size:11px;}
.spell-panel-battle .combat-description-copy small{font-size:10px;}
.spell-panel-battle>.chat-dock{position:relative;inset:auto;flex:0 0 var(--chat-strip);height:var(--chat-strip);margin:0;z-index:11;}
#hero .v15-skills-panel{padding:11px;border-color:#c9d5b9;border-radius:13px;background:linear-gradient(155deg,#fffdf0,#f3f5e5);}
#hero .v15-skills-panel .fold-head{min-height:35px;}
#hero .v15-skills-panel .fold-head strong{font-size:13px;}
#hero .v15-skills-panel .hero-fold-body{padding-top:9px;}
#hero .v15-skill-slots{gap:5px;}
#hero .v15-skill-slot{min-width:0;min-height:82px;height:82px;padding:6px 3px;border-radius:8px;}
#hero .v15-skill-slot>small{font-size:7px;margin-bottom:2px;}
#hero .v15-slotted-art{width:35px;height:35px;touch-action:none;-webkit-user-select:none;user-select:none;}
#hero .v15-slotted-art .skill-asset{width:32px;height:32px;}
#hero .v15-skill-slot>strong{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;line-height:12px;}
#hero .v15-skill-remove{top:2px;right:1px;width:19px;height:19px;font-size:12px;line-height:17px;}
#hero .v15-loadout-hint{margin:7px 0 10px;font-size:9px;line-height:1.5;}
#hero .v15-skill-subhead{padding-top:9px;margin-bottom:7px;}
#hero .v15-skill-library{gap:6px;}
#hero .v15-skill-library-card{gap:7px;padding:7px;}
#hero .v15-skill-library-card .v15-skill-art{width:39px;height:39px;}
.v15-skill-drag-ghost{transition:box-shadow .15s ease;border-color:#a9ba87;background:#fffae8;box-shadow:0 7px 18px #32462b38;}
.modal.v13-settings{border:1px solid #bfceb0;box-shadow:inset 0 0 0 4px #fff9e5,0 12px 36px #253c2c30;background:#faf6e7;}
.v13-settings .v13-settings-character{padding:12px;border:1px solid #bccdab;border-radius:12px;background:linear-gradient(120deg,#edf2df,#fcf8e8);box-shadow:inset 0 1px 0 #fffdf6;}
.v13-settings .v13-settings-character>img{border:2px solid #fff9e8;box-shadow:0 0 0 1px #bbc9aa;border-radius:9px;}
.v13-settings .v13-preferences{margin:12px 0;padding:2px 11px;border:1px solid #ccd6bb;border-radius:12px;background:#fffbed;}
.v13-settings .v13-preferences .toggle-row{border-color:#e0e4ce;padding:13px 0;}
.v13-settings .v13-preferences .toggle-row:last-child{border-bottom:0;}
.modal.item-detail.v13-item{border:1px solid #c4cfb3;box-shadow:inset 0 0 0 4px #fff9e7,0 12px 32px #263e2d30;}
.v13-item .v13-item-hero{padding:10px;border:1px solid #d1d6ba;border-radius:11px;background:#fffbed;}
.modal.victory-modal{padding:12px;max-width:430px;}
.victory-modal .victory-heading{padding:3px 0 8px;}
.victory-modal .victory-mark{margin-bottom:3px;min-height:0;}
.victory-modal .victory-mark>img{width:32px;height:35px;}
.victory-modal .victory-mark>span,.victory-modal .victory-saved{display:none;}
.victory-modal .victory-heading h2{font-size:28px;line-height:1.15;margin:2px 0 4px;}
.victory-modal .victory-heading p{font-size:11px;margin:0;}
.victory-modal .victory-rewards{padding:8px 10px;margin-bottom:9px;}
.victory-modal .victory-section{margin:5px 0 7px;}
.victory-modal .victory-loot{gap:7px;}
.victory-modal .victory-footer{gap:6px;padding-top:10px;}
.victory-modal .victory-footer .primary{min-height:40px;}
.victory-modal .victory-footer .secondary{min-height:32px;}
.modal.chat-modal{position:absolute;left:0;right:0;bottom:0;width:100%;max-width:none;max-height:76dvh;margin:0;padding:10px 12px;display:flex;flex-direction:column;border:1px solid #c2d0b0;border-bottom:0;border-radius:16px 16px 0 0;background:#faf8ec;box-shadow:0 -10px 32px #31442b26;transform:none;}
.chat-modal:before{content:'';display:block;flex:none;width:32px;height:3px;margin:0 auto 8px;background:#bdc9ad;border-radius:3px;}
.chat-modal .modal-header{margin:0 0 7px;flex:none;}
.chat-modal .modal-header h2{font-size:17px;}
.chat-modal .chat-global-banner{display:none;}
.chat-modal .online-chat-tabs{padding:0;margin:0 0 5px;gap:0;background:transparent;border:0;border-bottom:1px solid #d9e0cb;border-radius:0;}
.chat-modal .online-chat-tabs button{position:relative;min-height:33px;padding:6px;background:transparent;border:0;border-radius:0;font-size:11px;box-shadow:none;}
.chat-modal .online-chat-tabs button.active{background:transparent;box-shadow:inset 0 -2px 0 #80996d;color:#536f4c;}
.chat-modal .shore-messages{background:transparent;border:0;border-radius:0;min-height:100px;height:280px;max-height:43dvh;padding:2px 0 5px;flex:1 1 250px;}
.chat-modal .shore-message,.chat-modal .shore-message.own,.chat-modal .shore-message.system{max-width:100%;margin:0;padding:9px 1px;border:0;border-bottom:1px solid #e2e7d5;border-radius:0;background:transparent;box-shadow:none;gap:6px;}
.chat-modal .message-avatar{width:24px;height:24px;flex-basis:24px;font-size:13px;border-radius:7px;background:#edf0e2;border-color:#d7dfc8;}
.chat-modal .own .message-avatar,.chat-modal .system .message-avatar{background:#edf0e2;border-color:#d7dfc8;color:#7f9072;}
.chat-modal .message-body header strong{font-size:10px;}
.chat-modal .shore-message p{margin-top:2px;font-size:11px;line-height:1.55;color:#606e54;}
.chat-modal .chat-compose{flex:none;margin-top:3px;padding-top:8px;border-top:1px solid #d8dfc8;}
.chat-modal #shore-message{min-height:44px;max-height:88px;padding:8px 9px;font-size:11px;border-radius:8px;}
.chat-modal #shore-chat-send{min-height:44px;flex-basis:76px;width:76px;font-size:10px;box-shadow:none;}
.chat-modal .chat-empty{min-height:110px;}
.chat-modal .chat-empty img{width:33px;height:35px;}
@keyframes roster-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@keyframes roster-up{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:350px){.spell-panel-battle .battle-console{padding-left:8px;padding-right:8px}
.chat-dock-copy{font-size:9px;}
.roster-detail-identity strong{font-size:10px;}
}
@media(max-height:650px){.spell-panel-battle .roster-toggle{height:20px;min-height:20px}
.spell-panel-battle .battle-console{padding-top:4px;padding-bottom:4px}
#battle-root>.spell-panel-battle{--combat-panel-height:104px}
.spell-panel-battle .combat-skills-list{height:76px}
.spell-panel-battle .combat-skill-cast{height:47px;min-height:47px}
.spell-panel-battle .combat-skill-cast .skill-asset{height:38px;width:38px}
.modal.chat-modal{max-height:83dvh}
.chat-modal .shore-messages{max-height:36dvh}
.roster-sheet{max-height:41dvh;}
}
.reduced-motion .roster-sheet,.reduced-motion .combat-skill-description,.reduced-motion .battle-log-content{animation:none;}
@media(prefers-reduced-motion:reduce){.roster-sheet,.spell-panel-battle .combat-skill-description,.spell-panel-battle .battle-log-content{animation:none;}
.roster-meter b{transition:none;}
}
.chat-modal .message-body,.chat-modal .shore-message.own .message-body,.chat-modal .shore-message.system .message-body{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;max-width:none;}
html,body{height:100%;padding:0;}
#app{height:100%;max-height:none;width:100%;border-radius:0;}
#battle-root>.spell-panel-battle{--battle-base-top:171px;--battle-base-console:181px;--combat-panel-height:102px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--battle-base-top) minmax(0,1fr) var(--battle-base-console) var(--chat-strip);padding:0;gap:0;align-content:stretch;transition:grid-template-rows .22s cubic-bezier(.22,.7,.3,1);}
#battle-root>.spell-panel-battle.targets-collapsed{--battle-base-top:48px;}
.spell-panel-battle .battle-status{display:flex;align-items:stretch;gap:5px;height:31px;min-height:31px;margin:0 0 3px;}
.spell-panel-battle .battle-status .party-clock{flex:1;min-width:0;width:auto;height:31px;min-height:31px;padding:4px 8px 3px;}
.spell-panel-battle .combat-targets-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:none;width:32px;height:31px;min-height:31px;margin:0;padding:3px 2px;border:1px solid #d5ddc6;border-radius:8px;background:#f5f5e7;color:#708666;font-size:8px;line-height:10px;}
.combat-targets-toggle>.chevron{width:5px;height:5px;margin:0;border-color:#86997a;transition:transform .2s ease;}
.combat-targets-toggle>.chevron.up{transform:rotate(225deg);}
.spell-panel-battle .combat-targets{margin:0;padding:0;}
.spell-panel-battle.targets-collapsed .battle-status{margin-bottom:0;}
.reduced-motion #battle-root>.spell-panel-battle{transition:none;}
@media(prefers-reduced-motion:reduce){#battle-root>.spell-panel-battle{transition:none;}}
.spell-panel-battle .roster-toggle{height:22px;min-height:22px;padding:1px 4px;}
.spell-panel-battle>.battle-field{grid-row:2;position:relative;align-self:stretch;min-height:0;height:100%;overflow:hidden;}
.spell-panel-battle>.battle-console{grid-row:3;align-self:end;position:relative;z-index:10;height:auto;margin:0;padding:8px 10px;border-top:1px solid #d3d9c0;background:#faf7e9;}
.spell-panel-battle .combat-player{display:flex!important;align-items:center;gap:8px;height:55px;min-height:55px;margin:0 0 7px;}
.spell-panel-battle .combat-player>img{width:40px;height:43px;flex:none;border:1px solid #c6d1b6;border-radius:50%;object-fit:cover;object-position:50% 24%;}
.spell-panel-battle .combat-player-copy{flex:1;min-width:0;}
.spell-panel-battle .combat-player-name{display:flex;justify-content:space-between;align-items:center;gap:6px;margin:0 0 5px;font-size:12px;line-height:15px;}
.spell-panel-battle .combat-player-name>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.spell-panel-battle .combat-player-name small{flex:none;font-size:9px;color:#92987e;}
.spell-panel-battle .combat-vitals{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;}
.spell-panel-battle .combat-vitals .vital-row{font-size:9px;gap:3px;margin:0;}
.spell-panel-battle .combat-vitals .vital-row strong{font-size:10px;white-space:nowrap;}
.spell-panel-battle .combat-vitals .vital-row>span{font-size:9px;gap:3px;}
.spell-panel-battle .combat-vitals .vital-row .icon{font-size:12px;}
.spell-panel-battle .combat-vitals .resource-icon{width:9px;height:12px;}
.spell-panel-battle .combat-vitals .progress{height:4px;margin-top:4px;}
.spell-panel-battle .hero-effects{left:auto;right:0;bottom:calc(100% + 5px);gap:4px;}
.spell-panel-battle .hero-effects>span{padding:3px 5px;font-size:8px;}
.spell-panel-battle .combat-action-panel{height:auto;min-height:102px;}
.spell-panel-battle .combat-action-panel[data-panel="skills"]{height:102px;min-height:102px;}
.spell-panel-battle .combat-action-view{display:flex;flex-direction:column;height:auto;min-height:102px;gap:6px;padding:0;overflow:visible;}
.spell-panel-battle .battle-log,.spell-panel-battle .battle-log.log-expanded{flex:none;position:relative;border-radius:8px;overflow:hidden;}
.spell-panel-battle .battle-log-toggle{height:26px;min-height:26px;}
.spell-panel-battle .battle-log-content{position:static;inset:auto;max-height:min(210px,calc(100dvh - 171px - 181px - 34px - 40px));padding:7px 8px 8px;border:0;border-top:1px solid #e0e5d1;border-radius:0;background:#fdfcee;box-shadow:none;animation:none;}
.spell-panel-battle .battle-buttons{flex:none;height:68px;min-height:68px;}
.spell-panel-battle .battle-console .battle-action{height:68px;min-height:68px;}
.spell-panel-battle .combat-skills-list{height:75px;}
.spell-panel-battle>.chat-dock{grid-row:4;align-self:stretch;height:34px;min-height:34px;max-height:34px;padding:5px 11px;}
.modal.chat-modal{height:min(76dvh,650px);min-height:0;max-height:calc(100dvh - 48px);overflow:hidden;padding:8px 12px 9px;animation:none;scrollbar-gutter:auto;}
.modal.chat-modal.chat-sheet-animating{will-change:transform,opacity;}
.modal.chat-modal:before{display:none;}
.chat-sheet-grip{display:grid;place-items:center;flex:none;width:100%;height:17px;min-height:17px;margin:-4px 0 3px;padding:0;touch-action:none;}
.chat-sheet-grip>i{display:block;width:33px;height:3px;border-radius:4px;background:#b8c6aa;}
.chat-modal>.modal-header{touch-action:none;flex:none;min-height:34px;}
.chat-modal .shore-messages{height:auto;min-height:0;max-height:none;flex:1 1 0;}
.chat-modal .chat-compose{flex:none;}
.chat-modal.chat-resizing{transition:none;}
.modal-shade.chat-sheet-shade{padding:0;animation:none;background:rgba(30,55,40,var(--chat-sheet-dim,.26));}
@media(max-width:350px){.spell-panel-battle .combat-vitals{gap:6px}
.spell-panel-battle .combat-vitals .vital-row>span{font-size:8px}
.spell-panel-battle .combat-vitals .vital-row strong{font-size:9px}
}
.spell-panel-battle .combat-player{display:grid!important;grid-template-columns:28px minmax(0,1fr);grid-template-rows:28px auto;gap:4px 8px;height:62px;min-height:62px;}
.spell-panel-battle .combat-player>img{grid-column:1;grid-row:1;width:28px;height:28px;}
.spell-panel-battle .combat-player-copy{display:contents;}
.spell-panel-battle .combat-player-name{grid-column:2;grid-row:1;margin:0;font-size:13px;}
.spell-panel-battle .combat-vitals{grid-column:1/-1;grid-row:2;align-self:start;padding-top:5px;border-top:1px solid #dce2cc;}
.spell-panel-battle .combat-player{display:flex!important;align-items:center;gap:10px;height:78px;min-height:78px;}
.spell-panel-battle .combat-player>img{width:54px;height:68px;border-radius:9px;object-fit:cover;object-position:50% 25%;}
.spell-panel-battle .combat-player-copy{display:block;flex:1;min-width:0;}
.spell-panel-battle .combat-player-name{font-size:13px;line-height:17px;margin:0 0 5px;padding-bottom:5px;border-bottom:1px solid #dce2cc;}
.spell-panel-battle .combat-vitals{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:0;border:0;}
.spell-panel-battle .combat-vitals .vital-row{font-size:9px;line-height:11px;}
.spell-panel-battle .combat-vitals .progress{height:3px;margin-top:3px;}
.spell-panel-battle .combat-action-panel[data-panel="skills"]{height:auto;min-height:102px;}
.spell-panel-battle #skills-root{position:relative!important;inset:auto;display:flex;flex-direction:column;height:auto;min-height:102px;gap:2px;padding:0;border:0;border-radius:12px;background:transparent;overflow:visible;}
.spell-panel-battle .combat-panel-head{height:27px;flex:none;}
.spell-panel-battle .combat-skills-list,.spell-panel-battle .combat-skills-list.few-skills{flex:none;align-items:center;justify-content:flex-start;height:73px;min-height:73px;gap:8px;padding:5px 1px 4px;}
.spell-panel-battle .combat-skill-row{flex:0 0 64px;height:64px;gap:0;}
.spell-panel-battle .combat-skill-cast{flex:none;width:64px;height:64px;min-height:64px;padding:2px;border-radius:11px;background:linear-gradient(145deg,#fffdf2,#edf1e1);border-color:#bdcdae;box-shadow:inset 0 1px 0 #ffffffc9,0 1px 2px #506d3e12;overflow:visible;}
.spell-panel-battle .combat-skill-art{display:block;width:100%;height:100%;overflow:hidden;border-radius:8px;}
.spell-panel-battle .combat-skill-cast .skill-asset{width:100%;height:100%;max-width:none;object-fit:contain;transform:scale(1.04);}
.spell-panel-battle .combat-skill-cost{position:absolute;top:-4px;right:3px;display:flex;align-items:center;justify-content:center;gap:2px;min-width:24px;min-height:19px;padding:3px 4px 5px;border:1px solid #d0b16b;border-top:0;border-radius:2px 2px 5px 5px;background:linear-gradient(#f8e5b1,#e9cc84);color:#785e30;font-size:8px;line-height:10px;box-shadow:0 1px 2px #806d3a20;clip-path:polygon(0 0,100% 0,100% 100%,50% 85%,0 100%);}
.spell-panel-battle .combat-skill-cost b{font-size:8px;}
.spell-panel-battle .combat-skill-cost .resource-icon{width:8px;height:10px;}
.spell-panel-battle .inspected .combat-skill-cast{border-color:#8ba77b;box-shadow:0 0 0 1px #b8caaa;background:#eef3e4;}
.spell-panel-battle .combat-skill-cooldown{bottom:2px;left:2px;right:2px;max-width:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:7px;line-height:10px;}
.spell-panel-battle .combat-skill-description{position:static;inset:auto;flex:none;width:100%;max-height:220px;min-height:0;margin:5px 0 0;padding:8px;border:1px solid #cbd5bb;border-radius:9px;background:linear-gradient(135deg,#fffdf2,#f2f5e7);box-shadow:none;animation:none;}
.spell-panel-battle .combat-skill-description>header{min-height:27px;height:auto;padding:0 0 6px;gap:6px;}
.combat-skill-description>header>.skill-asset{width:25px;height:25px;flex:none;}
.spell-panel-battle .combat-skill-description h4{font-size:12px;flex:1;}
.combat-skill-description>header .icon-button{width:23px;height:23px;min-height:23px;padding:3px;}
.spell-panel-battle .combat-description-copy{max-height:112px;padding:7px 0;font-size:10px;line-height:1.5;overflow:auto;}
.combat-description-copy p{margin:0 0 5px;}
.spell-panel-battle .combat-description-copy small{font-size:9px;}
.combat-skill-description>footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-top:6px;border-top:1px solid #e0e6d1;}
.combat-skill-description>footer>.combat-description-reason{flex:1;min-width:0;font-size:9px;line-height:1.4;}
.combat-skill-description>footer>.combat-description-reason:empty{display:none;}
.spell-panel-battle .combat-skill-apply{display:flex;align-items:center;justify-content:center;gap:10px;min-height:33px;margin:0;padding:7px 12px;border-radius:7px;font-size:11px;}
.combat-skill-apply>span{display:flex;align-items:center;gap:3px;font-size:10px;}
.combat-skill-apply .resource-icon{width:9px;height:11px;}
.chat-modal .shore-message,.chat-modal .shore-message.own,.chat-modal .shore-message.system{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:start;gap:8px;margin:0;padding:9px 0;border-bottom:1px solid #e2e6d4;background:none;}
.chat-modal .message-avatar{display:grid;place-items:center;width:30px;height:34px;margin-top:1px;border:1px solid #cdd7bf;border-radius:7px;overflow:hidden;background:#edf2e3;}
.message-avatar>img{width:100%;height:100%;object-fit:cover;object-position:50% 25%;}
.message-avatar.neutral>img,.message-avatar.system>img{object-fit:contain;padding:3px;}
.chat-modal .message-body,.chat-modal .shore-message.own .message-body{display:block;min-width:0;width:100%;padding:0;background:none;}
.chat-modal .message-body>header{display:flex;align-items:baseline;justify-content:flex-start;gap:6px;min-height:15px;padding:0;}
.chat-modal .message-body header strong{flex:1;min-width:0;font-size:11px;line-height:15px;color:#496955;overflow-wrap:anywhere;}
.chat-modal .message-body header time{flex:none;font-size:8px;color:#9aa18b;}
.chat-modal .message-body p{margin:2px 0 0;font-size:12px;line-height:1.5;color:#56664f;white-space:pre-wrap;overflow-wrap:anywhere;}
.chat-modal .message-system-label{margin-left:5px;font-size:8px;font-weight:400;color:#9aa18b;}
.chat-modal .message-moderate{flex:none;font-size:8px;padding:2px 3px;}
.chat-modal .chat-compose{padding-top:7px;}
.chat-modal .chat-compose .join-row{align-items:stretch;gap:7px;}
.chat-modal #shore-message{min-height:41px;padding:8px 9px;font-size:12px;line-height:1.45;}
.chat-modal #shore-chat-send{width:75px;flex-basis:75px;min-height:41px;padding:6px;font-size:10px;border-radius:8px;}
.chat-modal .chat-compose-footer{padding-top:5px;min-height:19px;font-size:8px;}
.chat-modal .chat-npc-link{font-size:9px;}
.spell-panel-battle .party-clock.enemy-turn{border-color:#d6c38a;background:#f8f2df;}
.enemy-turn .clock-track>i{background:#baa05e;}
.battle-actor.action-active{will-change:transform;}
.battle-effect{contain:layout style;}
.spell-panel-battle .damage-number{animation-duration:1.05s;}
@media(max-width:350px){.spell-panel-battle .combat-player>img{width:49px;}
.spell-panel-battle .combat-skill-row{flex-basis:64px;}
.spell-panel-battle .combat-skill-cast{width:64px;height:64px;min-height:64px;}
}
.spell-panel-battle .combat-panel-head h3{flex:1;}
.spell-panel-battle .combat-skill-cast:disabled{opacity:1;}
.spell-panel-battle .unavailable .combat-skill-art{opacity:.48;}
#shore-messages>.shore-message{display:grid;grid-template-columns:30px minmax(0,1fr);column-gap:8px;width:100%;max-width:100%;min-width:0;margin:0;padding:9px 0;}
#shore-messages>.shore-message>.message-avatar,#shore-messages>.shore-message.own>.message-avatar,#shore-messages>.shore-message.system>.message-avatar{display:grid;grid-column:1;grid-row:1;align-self:start;width:30px;height:34px;min-width:30px;margin:1px 0 0;}
#shore-messages>.shore-message>.message-body{display:block;grid-column:2;grid-row:1;width:auto;max-width:none;min-width:0;margin:0;padding:0;}
#shore-messages>.shore-message>.message-body>header{display:grid;grid-template-columns:minmax(0,1fr) max-content max-content;align-items:baseline;gap:3px 7px;width:100%;min-width:0;}
#shore-messages>.shore-message>.message-body>header>strong{display:block;min-width:0;font-size:11px;line-height:15px;overflow-wrap:break-word;}
#shore-messages>.shore-message>.message-body>p{display:block;width:100%;min-width:0;max-width:none;font-size:12px;line-height:1.5;word-break:normal;overflow-wrap:anywhere;}
#shore-messages .message-moderate{min-width:0;min-height:19px;padding:1px 3px;font-size:8px;line-height:14px;white-space:nowrap;}
.spell-panel-battle .combat-player{height:72px;min-height:72px;gap:9px;margin-bottom:7px;}
.spell-panel-battle .combat-player>img{width:47px;height:60px;border:1px solid #c7d2ba;border-radius:8px;object-position:50% 25%;box-shadow:0 1px 2px #4e5a3010;}
.spell-panel-battle .combat-player-name{align-items:center;gap:8px;margin-bottom:5px;padding-bottom:4px;line-height:16px;}
.spell-panel-battle .combat-vitals{gap:5px;}
.spell-panel-battle .combat-vitals .vital-row{align-items:center;line-height:11px;}
.spell-panel-battle .combat-vitals .vital-row strong{font-size:10px;}
.spell-panel-battle .combat-vitals .vital-row>span{display:grid;grid-template-columns:12px auto;align-items:center;justify-content:start;gap:4px;}
.spell-panel-battle .combat-vitals .vital-row .icon{display:grid;place-items:center;width:12px;height:12px;line-height:12px;}
.spell-panel-battle .combat-vitals .vital-row .resource-icon{display:block;width:12px;height:12px;object-fit:contain;}
