/* Battle clarity and faceted elemental gems. Loaded after the original theme. */
body{font-size:16px}
.battle-mode main{max-width:1390px;padding:24px 32px 16px}
.battle-mode .header{height:76px}
.battle-heading{margin-bottom:24px}
.battle-heading h1{font-size:32px;margin-top:7px}
.battle-heading .eyebrow{font-size:11px;letter-spacing:1.3px}
.battle-heading>.secondary{font-size:14px;min-height:44px}
.battle-layout{grid-template-columns:minmax(135px,180px) minmax(420px,550px) minmax(225px,1fr);gap:28px;justify-content:center}
.battle-center{max-width:550px;min-width:0}
.lore-panel{padding-top:14px}
.lore-portrait{aspect-ratio:1;border-radius:6px}
.lore-portrait span{font-size:26px}
.lore-panel .eyebrow{font-size:10px;letter-spacing:1.1px}
.lore-panel .quote{font-size:21px;line-height:1.3;margin:16px 0 12px}
.lore-panel .quiet{font-size:14px;min-height:44px}
.team-head{min-height:43px;align-items:center;gap:8px;padding-bottom:8px;letter-spacing:.4px}
.team-name{display:flex;flex-direction:column;gap:4px;min-width:0}
.team-name strong{font-size:13px;letter-spacing:.7px;color:#e8ebeb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-name .active-badge{font-size:10px;letter-spacing:1px;color:#abb2bd}
.team.active .team-name .active-badge{color:#d2efc7;font-weight:700}
.team.enemy.active .team-name .active-badge{color:#f3bda8}
.hp-numeric{font-size:14px;letter-spacing:0;white-space:nowrap}
.hp-numeric b{font-size:22px;letter-spacing:-.6px}
.hp-numeric small{font-size:11px}
.hpbar{height:12px;margin-bottom:12px;border-radius:4px;background:#080c12}
.crystal-count{display:flex;align-items:center;gap:6px;color:#d4edfb;flex:none;letter-spacing:0}
.crystal-count>svg{height:31px;width:29px;filter:drop-shadow(0 2px 4px #53699a90)}
.crystal-count>span{display:flex;flex-direction:column;gap:2px}
.crystal-count b{font-size:19px;line-height:1;white-space:nowrap}
.crystal-count b small{display:inline;font-size:13px;color:#acbdca;font-weight:400}
.crystal-count>span>small{font-size:9px;letter-spacing:.8px;color:#b1c5d2}
.monster-row{gap:10px}
.monster{grid-template-columns:58px minmax(0,1fr);gap:9px;padding:9px;border-radius:5px;align-items:center}
.portrait-btn{width:58px;height:66px;border-radius:3px;flex:none}
.monster-name{font-size:24px;line-height:1.05}
.monster-type{font-size:12px;margin:6px 0 9px;line-height:1.2;color:#bac3cf}
.mana{height:6px;border-radius:3px;overflow:hidden}
.mana-label{font-size:12px;margin-top:6px;align-items:center;color:#aeb9c7;line-height:1.2;gap:4px}
.mana-label strong{color:#ebeff3;font-size:13px;white-space:nowrap;font-weight:500}
.feed{min-height:48px;margin-top:2px;padding:7px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#314134;border-color:#9fc29565;border-radius:4px}
.feed:hover:enabled{background:#405a43;box-shadow:0 0 12px #afdb8b22}
.feed-label{font-size:15px;font-weight:600;line-height:1.1}
.feed-cost{font-size:12px;display:flex;align-items:center;gap:3px;line-height:1.1;color:#c8dbd5;white-space:nowrap}
.feed-cost svg{width:15px;height:15px;flex:none}
.feed:disabled{opacity:.68;background:#20282b;color:#bbc3c8;border-color:#6570784d}
.feed:disabled .feed-cost{color:#a5b5c0}
.team.active .monster{border-color:#a9d6a46b;box-shadow:0 0 14px #a1da8320}
.team.enemy.active .monster{border-color:#d0a18a75;box-shadow:0 0 14px #d89c7820}
.team.waiting .monster{border-color:#aeb9c42a}
.statuses{font-size:12px;color:#e1c693;line-height:1.5;min-height:0}
.team-status{font-size:12px;line-height:1.6;color:#d2bd93;margin-top:8px}
.turnline{position:sticky;top:8px;z-index:25;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;margin:18px 0 12px;padding:12px 14px 10px;background:linear-gradient(120deg,#203a2c,#1b2a26);border:1px solid #a9d7a670;border-radius:6px;box-shadow:0 6px 20px #080b1060;color:#d8eed2;isolation:isolate}
.turn-theirs{background:linear-gradient(120deg,#3b2c2a,#2b2428);border-color:#dca38673;color:#f2cab1}
.turn-owner{display:flex;gap:9px;align-items:center;min-width:0}
.turn-owner strong{font-size:20px;line-height:1.15;letter-spacing:.3px;font-weight:700}
.turn-dot{width:10px;height:10px;border-radius:50%;background:#bce9a5;box-shadow:0 0 0 4px #bce9a51c,0 0 12px #bce9a55e;flex:none}
.turn-theirs .turn-dot{background:#efb394;box-shadow:0 0 0 4px #efb3941b,0 0 12px #efb39455}
.turnline .moves{display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 8px;text-align:right;grid-row:1/3;grid-column:2;min-width:94px}
.moves>strong{font-size:27px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-1px;grid-column:1/-1}
.moves>strong small{font-size:16px;letter-spacing:0;font-weight:400;opacity:.75}
.moves>span:not(.move-pips){font-size:10px;letter-spacing:.7px;font-weight:600}
.move-pips{display:flex;gap:5px;justify-content:flex-end}
.move-gem{height:7px;width:7px;box-shadow:none;background:#c9e9b9}
.turn-theirs .move-gem{background:#e9bc9e}
.move-gem.spent{background:#75847b;opacity:.35}
#turn-status{grid-row:2;grid-column:1;font-size:13px;line-height:1.45;letter-spacing:0;color:#c3d0c6;min-height:19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.turn-theirs #turn-status{color:#d4c3be}
#turn-status.resolving{color:#e2d6b3}
.match-feedback{grid-column:1/-1;padding-top:7px;margin-top:3px;border-top:1px solid #ffffff14;font-size:13px;line-height:1.35;letter-spacing:0;color:#c8d9c4;font-weight:500;min-height:26px;display:flex;gap:7px;align-items:center}
.match-feedback>span{font-size:15px;color:#d1ebbf}
.match-feedback.bonus-used{color:#e0d0a6}
.match-feedback.bonus-used>span{color:#e5d393}
.opponent-side .match-feedback{color:#d9c9ba}
.your-side .board-frame{border:2px solid #a8c99c8c;box-shadow:0 0 0 3px #acd4910a,0 10px 35px #0005}
.opponent-side .board-frame{border:2px solid #c3927d7d;box-shadow:0 0 0 3px #dca3860a,0 10px 35px #0005}
.board-frame{padding:8px;border-radius:7px;background:linear-gradient(130deg,#34413d,#1f2930 55%,#343844)}
.board{padding:5px;gap:4px;border-radius:4px}
.tile{border-radius:7px;padding:7px;background:linear-gradient(145deg,var(--tile-top),#171c28 70%,#141824);border:1px solid var(--tile-border);box-shadow:inset 0 1px 1px #ffffff14,inset 0 -2px 2px #0007,0 2px 3px #0006;overflow:hidden}
.tile svg{filter:drop-shadow(0 3px 1.2px #060910b0);width:100%;height:100%;overflow:visible}
.tile:hover{filter:brightness(1.1)}
.tile.selected{outline:3px solid #fff0b9;outline-offset:-1px;box-shadow:inset 0 0 10px #ffe9b740,0 0 15px #e9c77888;transform:scale(.94)}
.tile.gathering{box-shadow:inset 0 0 18px #fff7d766,0 0 14px currentColor;filter:brightness(1.25)}
.crystal-tile:not(.frozen)::after{content:'';position:absolute;inset:-30% -80%;background:linear-gradient(110deg,transparent 41%,#e6ffff05 44%,#f7ffffa0 49%,#ffffff25 54%,transparent 59%);transform:translateX(-70%);animation:crystal-shimmer 7.8s ease-in-out infinite;animation-delay:calc(var(--glint-index,0)*-.78s);pointer-events:none}
.crystal-tile:not(.frozen) svg{animation:crystal-breathe 6.5s ease-in-out infinite;animation-delay:calc(var(--glint-index,0)*-.62s)}
.empty-tile{box-shadow:none;background:#0b0e15}
.tile.frozen::after{z-index:3}
.board-help{padding:9px 1px 12px;gap:8px;align-items:center;line-height:1.4;color:#bcc5d0;font-size:13px}
.hint{font-size:14px;min-height:44px;min-width:65px;color:#d1e7c6;background:#b5d6ad0c;border:1px solid #b5d6ad25;padding:7px 10px;border-radius:4px;flex:none}
.hint:disabled{opacity:.6;color:#9ba9a8}
.battle-controls{margin-top:15px;gap:10px;flex-wrap:wrap}
.battle-controls button{font-size:14px;min-height:44px;padding:10px 12px;color:#d0d6df;border:1px solid #ffffff20;border-radius:4px;background:#ffffff04}
.sidebar{min-width:0}
.stage-card{padding:17px;margin-bottom:20px}
.stage-card h3{font-size:27px}
.stage-card p{font-size:14px;line-height:1.65;color:#b8c1cd}
.stage-card .stage-icon{font-size:30px;margin-bottom:6px}
.chronicle-panel,.rewards-panel{border-top:1px solid #ffffff20;padding:0 0 5px;margin-bottom:12px}
.chronicle-panel summary,.rewards-panel summary{font-size:15px;line-height:1.5;cursor:pointer;color:#dce1e7;padding:13px 0;min-height:48px}
.chronicle-panel summary span{font-size:12px;margin-left:9px;color:#a7b6c7;white-space:nowrap}
.log-entry{font-size:13px;line-height:1.65;padding:10px 0;color:#b8c2cf}
.log-entry .logturn{font-size:11px;color:#8e9cad}
.battle-log{max-height:260px}
.legend{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 8px;margin:10px 0 20px}
.legend span{font-size:13px;gap:7px;color:#c7d0da}
.legend svg{width:24px;height:24px;flex:none;filter:drop-shadow(0 2px 1px #0007)}
.rule-reminder{font-size:13px!important;line-height:1.9;color:#bec9d6}
.crystal-explainer{display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.6;margin-top:15px;padding-top:15px;border-top:1px solid #ffffff12;color:#c3d1da}
.crystal-explainer svg{width:32px;height:38px;flex:none}
#pace-settings{font-size:14px;min-height:44px}
.roster-info strong{font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis}
.roster-info small{font-size:11px;margin-top:5px}
.pick-status{font-size:14px;line-height:1.5}
.config-row .segmented button,.rules-choice .segmented button{font-size:13px;min-height:42px}
.rules-choice>span{font-size:11px}
.rules-choice small{font-size:12px}
.setup-side .field{font-size:12px}
.setup-side select{font-size:14px;min-height:44px}
.setup-side .stage-desc{font-size:13px}
.setup-side .fine{font-size:12px}
.mini-links button{font-size:13px;min-height:38px}
.subtle-note{font-size:12px}
.modal p,.modal li{font-size:14px;line-height:1.7}
.modal table{font-size:12px;line-height:1.5}
.modal .segmented button{font-size:13px;min-height:42px}
.modal .settings-row{font-size:15px}
.modal .settings-row p{font-size:13px}
.volume-label{font-size:13px}
.modal .fine{font-size:12px}
.character-detail small{font-size:12px}
.combat-float{font-size:23px;letter-spacing:.1px}
@keyframes crystal-shimmer{0%,76%{transform:translateX(-70%);opacity:0}79%{opacity:.85}91%{transform:translateX(70%);opacity:.7}94%,100%{transform:translateX(70%);opacity:0}}
@keyframes crystal-breathe{0%,100%{filter:drop-shadow(0 3px 1.2px #060910b0)}50%{filter:drop-shadow(0 3px 1.2px #060910b0) drop-shadow(0 0 2.5px #accdff6a)}}
@media(max-width:1150px){.battle-mode main{padding:22px 24px 14px}.battle-layout{grid-template-columns:minmax(390px,530px) minmax(230px,1fr);gap:24px}.lore-panel{display:none}.battle-center{max-width:530px}}
@media(max-width:850px){.battle-layout{display:block}.battle-center{max-width:490px}.sidebar{max-width:490px;margin:25px auto 0}.stage-card{display:grid;grid-template-columns:35px 1fr;gap:4px 12px}.stage-card .stage-icon{grid-row:1/3;margin:0}.stage-card h3{font-size:25px}.stage-card p{font-size:14px}.legend{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){
 .battle-mode .header{height:61px;padding:0 16px}.battle-mode main{padding:14px 12px 8px}.battle-heading{margin-bottom:13px;gap:12px}.battle-heading h1{font-size:27px;margin:6px 0 0}.battle-heading .eyebrow{font-size:10px;letter-spacing:.4px}.battle-heading>.secondary{font-size:12px;padding:0 12px;min-height:42px}.battle-center{max-width:450px}
 .team-head{min-height:41px;gap:6px;padding-bottom:7px}.team-name strong{font-size:12px;letter-spacing:.3px}.team-name .active-badge{font-size:9px;letter-spacing:.7px}.hp-numeric{font-size:13px}.hp-numeric b{font-size:20px}.hp-numeric small{font-size:10px}.hpbar{height:10px;margin-bottom:9px}.crystal-count{gap:3px}.crystal-count>svg{height:27px;width:23px}.crystal-count b{font-size:17px}.crystal-count b small{font-size:12px}.crystal-count>span>small{font-size:8px;letter-spacing:.4px}
 .monster-row{gap:8px}.monster{grid-template-columns:44px minmax(0,1fr);gap:7px;padding:7px}.portrait-btn{width:44px;height:55px}.monster-name{font-size:21px}.monster-type{font-size:11px;margin:5px 0 7px}.mana{height:5px}.mana-label{font-size:11px;margin-top:5px}.mana-label strong{font-size:12px}.feed{min-height:46px;padding:6px 3px;gap:3px}.feed-label{font-size:14px}.feed-cost{font-size:11px}.feed-cost svg{height:14px;width:14px}.team-status,.statuses{font-size:12px}
 .turnline{margin:13px 0 10px;padding:11px 11px 8px;gap:5px 8px;top:5px}.turn-owner{gap:8px}.turn-owner strong{font-size:19px}.turn-dot{height:8px;width:8px}.turnline .moves{min-width:84px;gap:4px 6px}.moves>strong{font-size:25px}.moves>strong small{font-size:14px}.moves>span:not(.move-pips){font-size:9px}.move-pips{gap:4px}.move-gem{height:6px;width:6px}#turn-status{font-size:12px;line-height:1.5}.match-feedback{font-size:12px;min-height:26px;line-height:1.4;padding-top:7px}
 .board-frame{padding:6px}.board{padding:4px;gap:3px}.tile{padding:5px;border-radius:5px}.tile svg{filter:drop-shadow(0 2px .8px #060910b0)}.tile.selected{outline-width:2px}.board-help{font-size:12px;padding:6px 1px 10px;gap:6px}.hint{font-size:13px;min-height:42px;min-width:58px;padding:6px 8px}.battle-controls{margin-top:12px;gap:7px}.battle-controls button{font-size:13px;padding:8px 10px;min-height:44px}.sidebar{max-width:450px;margin-top:22px}.stage-card p{font-size:14px}.stage-card h3{font-size:25px}.stage-card{padding:14px}
 .legend{grid-template-columns:repeat(2,minmax(0,1fr))}.legend span{font-size:14px}.rule-reminder{font-size:13px!important}.log-entry{font-size:14px}.chronicle-panel summary,.rewards-panel summary{font-size:15px}.crystal-explainer{font-size:13px}.combat-float{font-size:18px}.roster-info strong{font-size:12px}.roster-info small{font-size:10px}.config-row .segmented button,.rules-choice .segmented button{font-size:12px}.modal p,.modal li{font-size:14px}.modal table{font-size:12px}.modal .segmented button{font-size:12px;padding:8px 6px}.character-detail{grid-template-columns:92px minmax(0,1fr);gap:14px}.modal h2{font-size:29px}.character-detail h3{font-size:23px}
}
@media(max-width:370px){.battle-mode main{padding-left:9px;padding-right:9px}.turn-owner strong{font-size:17px}.monster{grid-template-columns:37px minmax(0,1fr);gap:6px;padding:6px}.portrait-btn{width:37px;height:51px}.monster-name{font-size:20px}.feed-cost{font-size:10px}.feed-cost svg{height:12px;width:12px}.hp-numeric b{font-size:18px}}
@media(prefers-reduced-motion:reduce){.crystal-tile:not(.frozen)::after{animation:none;opacity:0}.crystal-tile:not(.frozen) svg{animation:none}.turn-dot{box-shadow:none}}
.quick-health{display:flex;justify-content:space-between;gap:12px;grid-column:1/-1;font-size:13px;color:#c8d3cc;line-height:1.35;margin-top:2px}
.quick-health strong{font-size:15px;color:#eef6e9;font-weight:600;font-variant-numeric:tabular-nums;margin-left:5px}
.quick-opponent strong{color:#f2c8ba}
@media(max-width:650px){.quick-health{font-size:12px}.quick-health strong{font-size:14px}}
