/* Combat, final layer: the stall's language (gilt lettering and brass on verdigris lacquer, Palatino)
   over the arena. Loaded last. Rules are scoped to the combat phase, plus the duel's result card, which
   can be held over the arena while the camp or the final standings wait. Positions still come from the
   scene's anchors (positionCombatUI in vesperkin-app.mjs); this layer sets how each piece reads. */
:root{
 --cu-display:"Palatino Linotype","Book Antiqua",Palatino,"Iowan Old Style",Georgia,serif;
 --cu-gilt-hi:#fff3cf;--cu-gilt:#e8c17a;--cu-gilt-deep:#a9763b;
 --cu-ink:#f4ead2;--cu-ink-soft:#d8ccae;--cu-ink-faint:#a6a08c;
 --cu-panel-top:rgba(14,19,30,.9);--cu-panel-bottom:rgba(5,8,15,.94);--cu-well:rgba(3,5,10,.62);
 --cu-lit-top:rgba(28,38,61,.95);--cu-lit-bottom:rgba(10,15,26,.97);
 --cu-hair:rgba(232,193,122,.42);--cu-hair-soft:rgba(232,193,122,.2);
 --cu-rose:#e9a091;--cu-jade:#9fdcb8;
 --cu-gilt-text:linear-gradient(176deg,#fff6d8 0%,#f3d695 24%,#cf9a52 46%,#f7dfa0 60%,#b07a3a 84%,#94632e 100%);
}

/* ---- the top band: round, the companies, the turn plaque, the field journal ---- */
body[data-phase="combat"] .topbar .top-center .eyebrow{font:500 clamp(10px,.6vw,24px)/1.2 var(--cu-display);letter-spacing:.42em;text-transform:uppercase;color:var(--cu-ink-soft);text-shadow:0 1px 8px rgba(0,0,0,.95)}
body[data-phase="combat"] .top-tools .icon-button{background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well);color:var(--cu-gilt)}
body[data-phase="combat"] .top-tools .icon-button:hover{border-color:var(--cu-gilt);color:var(--cu-gilt-hi)}

body[data-phase="combat"] .battle .battle-teams{left:clamp(18px,2.2vw,90px);right:clamp(18px,2.2vw,90px);top:clamp(62px,6.3vh,170px);gap:2rem;align-items:flex-start;color:var(--cu-ink);font:inherit;letter-spacing:0;text-shadow:none}
body[data-phase="combat"] .battle .team-plate{display:grid;gap:.18em;max-width:30%;min-width:0}
body[data-phase="combat"] .battle .team-plate.foe{text-align:right;justify-items:end}
body[data-phase="combat"] .battle .team-plate small{font:500 clamp(10px,.58vw,22px)/1.2 var(--cu-display);letter-spacing:.38em;text-transform:uppercase;color:var(--cu-ink-soft);text-shadow:0 1px 8px rgba(0,0,0,.95)}
body[data-phase="combat"] .battle .team-plate strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 .06em .14em 0;font:400 clamp(24px,1.75vw,68px)/1 var(--cu-display);letter-spacing:-.005em;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.7)) drop-shadow(0 6px 16px rgba(0,0,0,.6))}
body[data-phase="combat"] .battle .team-plate span{font:italic clamp(12px,.74vw,28px)/1.2 var(--cu-display);color:var(--cu-ink-soft);text-shadow:0 1px 8px rgba(0,0,0,.95)}
body[data-phase="combat"] .battle .team-plate.foe small{color:#e8c3b8}

body[data-phase="combat"] .battle.two-lane-battle .battle-heading{top:clamp(50px,5.3vh,140px);left:50%;right:auto;width:auto;min-width:clamp(230px,14vw,560px);max-width:min(32vw,1100px);transform:translateX(-50%);padding:.42em 1.5em .55em;text-align:center;
 background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-hair);border-radius:2px;box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.12),0 14px 30px rgba(0,0,0,.42)}
body[data-phase="combat"] .battle.two-lane-battle .battle-heading h2{margin:0;padding-bottom:.06em;font:400 clamp(22px,1.45vw,56px)/1.05 var(--cu-display);letter-spacing:.01em;text-shadow:none;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.6))}
body[data-phase="combat"] .battle.two-lane-battle .battle-status{min-height:0;margin:.22em 0 0;font:italic clamp(12px,.72vw,28px)/1.3 var(--cu-display);color:var(--cu-ink-soft);text-shadow:none}
body[data-phase="combat"] .battle .catalyst-meter{display:inline-flex;align-items:baseline;justify-content:center;gap:.32em;margin:.45em 0 0;padding:.42em .2em 0;border-top:1px solid var(--cu-hair-soft);font:clamp(12px,.7vw,28px)/1 var(--cu-display);color:var(--cu-ink-soft);text-shadow:none}
body[data-phase="combat"] .battle .catalyst-meter:empty{display:none}
body[data-phase="combat"] .battle .catalyst-meter b{font-weight:600;color:var(--cu-gilt)}
body[data-phase="combat"] .battle .catalyst-meter small{margin-left:.55em;font:italic .92em var(--cu-display);color:var(--cu-ink-faint)}
body[data-phase="combat"] .battle .catalyst-gem{display:inline-block;align-self:center;width:.62em;height:.62em;margin:0 .22em 0 .1em;border-radius:1px;transform:rotate(45deg);background:linear-gradient(135deg,#efd6ff,#a86cff 60%,#5a2a98);box-shadow:0 0 8px rgba(190,140,255,.6)}

body[data-phase="combat"] .battle.two-lane-battle .battle-tools{top:clamp(146px,14.6vh,394px);left:clamp(18px,2.2vw,90px);gap:clamp(2px,.2vw,8px);padding:clamp(3px,.28vh,8px);
 background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well),0 10px 24px rgba(0,0,0,.4)}
body[data-phase="combat"] .battle.two-lane-battle .battle-tools button{display:inline-flex;align-items:center;gap:.42em;min-height:0;padding:.42em .72em .46em;font:500 clamp(12px,.72vw,28px)/1 var(--cu-display);font-variant:small-caps;letter-spacing:.05em;color:var(--cu-ink-soft);
 background:none;border:1px solid transparent;border-radius:2px;box-shadow:none;text-shadow:none}
body[data-phase="combat"] .battle.two-lane-battle .battle-tools button .icon{width:1.05em;height:1.05em;color:var(--cu-gilt);opacity:.9}
body[data-phase="combat"] .battle.two-lane-battle .battle-tools button:hover,body[data-phase="combat"] .battle.two-lane-battle .battle-tools button:focus-visible{color:var(--cu-ink);border-color:rgba(232,193,122,.45);background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom))}
body[data-phase="combat"] .battle.two-lane-battle .battle-tools button.primary{color:var(--cu-ink);border-color:var(--cu-gilt);background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom))}

/* ---- the creatures' plates: name, life in a gilt-edged case, statuses (what each will do is on the turn rail) ---- */
body[data-phase="combat"] .two-lane-battle .lane-combatant .combatant-name h3{font-family:var(--cu-display);font-weight:500;letter-spacing:.02em;color:var(--cu-ink);text-shadow:0 1px 2px #000,0 0 10px rgba(0,0,0,.9)}
body[data-phase="combat"] .two-lane-battle[data-lane-count="1"] .lane-combatant .combatant-name{height:clamp(24px,1.5vw,56px)}
body[data-phase="combat"] .two-lane-battle[data-lane-count="1"] .lane-combatant .combatant-name h3{font-size:clamp(16px,.98vw,38px)}
body[data-phase="combat"] .two-lane-battle .lane-combatant .health-shell{background:linear-gradient(180deg,#0f141e,#06080d);border:1px solid rgba(232,193,122,.6);border-radius:2px;clip-path:none;overflow:hidden;
 box-shadow:inset 0 0 0 2px rgba(3,5,10,.9),0 0 0 1px rgba(0,0,0,.45),0 4px 12px rgba(0,0,0,.5)}
body[data-phase="combat"] .two-lane-battle[data-lane-count="1"] .lane-combatant .health-shell{height:clamp(26px,1.55vw,58px);min-height:0}
body[data-phase="combat"] .two-lane-battle .health-track{inset:3px;border:0;border-radius:1px;background:#0b0e15}
body[data-phase="combat"] .two-lane-battle .health-fill{border-top:0;background:linear-gradient(180deg,#c8edcc 0%,#79c79b 34%,#46966f 68%,#2d6c53 100%);box-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -1px 0 rgba(0,0,0,.25)}
body[data-phase="combat"] .two-lane-battle .lane-combatant .health-text{font:600 clamp(14px,.86vw,32px)/1 var(--cu-display);letter-spacing:.03em;color:#fffaf0;text-shadow:0 0 3px #000,0 1px 2px #000,0 0 8px rgba(0,0,0,.8)}
body[data-phase="combat"] .battle .lane-combatant .health-text.negative{color:#ffd6cc!important}
body[data-phase="combat"] .battle .lane-combatant .health-text.positive{color:#ddffe0!important}
/* the health a plan would leave, after the health it has now (the plate showed only the forecast, as if the pet were already hurt) */
body[data-phase="combat"] .battle .lane-combatant .health-next.negative{color:#ffb4a4}
body[data-phase="combat"] .battle .lane-combatant .health-next.positive{color:#c4f5c9}
body[data-phase="combat"] .battle .lane-combatant .health-next{font-weight:600}
body[data-phase="combat"] .two-lane-battle .health-endpoint{background:var(--cu-gilt-hi);box-shadow:0 0 4px rgba(0,0,0,.9)}
body[data-phase="combat"] .two-lane-battle .lane-combatant.enemy .combatant-name h3{color:#f7e2d8}

/* the turn rail: this exchange's moves, fastest first, under the round (positionCombatUI places it; while an exchange plays out the
   strip of what resolves takes over). Gilt edges are your company's moves, rose the foe's. */
body[data-phase="combat"] .battle .turn-rail{--rs:var(--rail-scale,1);position:fixed;left:50%;top:56px;z-index:13;transform:translateX(-50%);width:max-content;display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;gap:calc(8px * var(--rs)) calc(24px * var(--rs));pointer-events:none}
body[data-phase="combat"] .battle .turn-rail[hidden],body[data-phase="combat"] .battle .order-badges[hidden],body[data-phase="combat"] .battle .order-badge[hidden]{display:none}
body[data-phase="combat"] .battle .rail-token{position:relative;display:flex;align-items:center;gap:calc(9px * var(--rs));min-height:0;margin:0;padding:calc(5px * var(--rs)) calc(13px * var(--rs)) calc(5px * var(--rs)) calc(5px * var(--rs));pointer-events:auto;cursor:pointer;
 font:600 calc(15px * var(--rs))/1 var(--cu-display);color:var(--cu-ink);text-align:left;white-space:nowrap;text-shadow:0 1px 2px #000;
 background:linear-gradient(180deg,rgba(14,19,30,.93),rgba(5,8,15,.96));border:1px solid var(--cu-gilt);border-radius:3px;box-shadow:inset 0 0 0 2px var(--cu-well),0 8px 20px rgba(0,0,0,.45);transition:background .15s,box-shadow .15s}
body[data-phase="combat"] .battle .rail-token.foe{border-color:rgba(233,160,145,.78)}
body[data-phase="combat"] .battle .rail-token:is(:hover,:focus-visible,.rail-linked){background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom));box-shadow:inset 0 0 0 2px var(--cu-well),0 0 0 1px rgba(232,193,122,.55),0 8px 20px rgba(0,0,0,.45);outline:none}
/* the step from one move to the next */
body[data-phase="combat"] .battle .rail-token + .rail-token::before{content:'';position:absolute;left:calc(-16px * var(--rs));top:50%;width:calc(7px * var(--rs));height:calc(7px * var(--rs));border:solid var(--cu-gilt);border-width:2px 2px 0 0;transform:translateY(-50%) rotate(45deg);opacity:.8;pointer-events:none}
body[data-phase="combat"] .battle .rail-speed{flex:0 0 auto;display:grid;place-items:center;width:calc(32px * var(--rs));height:calc(32px * var(--rs));border-radius:50%;border:1px solid #f3d99a;
 font:700 calc(14px * var(--rs))/1 var(--cu-display);color:#2a1a0c;text-shadow:0 1px 0 rgba(255,240,200,.6);background:radial-gradient(circle at 36% 28%,#fff1c4 0 12%,#e9c070 38%,#b98236 72%,#7d531f 100%);box-shadow:inset 0 0 0 2px rgba(122,82,30,.55),inset 0 -2px 3px rgba(60,30,8,.4),0 2px 6px rgba(0,0,0,.55)}
body[data-phase="combat"] .battle .rail-speed.positive{color:#192237;background:radial-gradient(circle at 36% 28%,#f2ffe0 0 12%,#bfe39a 38%,#7fb05a 72%,#4b7433 100%)}
body[data-phase="combat"] .battle .rail-speed.negative{color:#3d140e;background:radial-gradient(circle at 36% 28%,#ffe3d8 0 12%,#eaa58f 38%,#c06850 72%,#7d3a2a 100%)}
body[data-phase="combat"] .battle .rail-what{display:flex;flex-direction:column;gap:calc(4px * var(--rs))}
body[data-phase="combat"] .battle .rail-what small{font:500 calc(10px * var(--rs))/1 var(--cu-display);letter-spacing:.22em;text-transform:uppercase;color:var(--cu-ink-faint);text-shadow:none}
body[data-phase="combat"] .battle .rail-token.foe .rail-what small{color:#e8c3b8}
body[data-phase="combat"] .battle .rail-move{font:500 calc(16px * var(--rs))/1 var(--cu-display)}
body[data-phase="combat"] .battle .rail-hit{display:inline-flex;align-items:center;gap:calc(7px * var(--rs));font-size:calc(18px * var(--rs))}
body[data-phase="combat"] .battle .rail-hit .intent-value{display:inline-flex;align-items:center;gap:.2em;font-size:1em}
body[data-phase="combat"] .battle .rail-hit .icon{width:1em;height:1em}
body[data-phase="combat"] .battle .rail-hit .intent-effects{display:inline-flex;align-items:center;gap:calc(6px * var(--rs));height:auto;overflow:visible;font-size:.78em}
body[data-phase="combat"] .battle .rail-hit .intent-effect{display:inline-flex;align-items:center;gap:.15em}
body[data-phase="combat"] .battle .rail-target{font:italic 400 calc(12px * var(--rs))/1 var(--cu-display);color:var(--cu-ink-faint);text-shadow:none}
body[data-phase="combat"] .battle .rail-token.cancelled{opacity:.6}
body[data-phase="combat"] .battle .rail-token.cancelled .rail-move{text-decoration:line-through}
body[data-phase="combat"] .battle .rail-token.crescendo{border-color:#f4c862;box-shadow:inset 0 0 0 2px var(--cu-well),0 0 0 1px rgba(244,200,98,.55),0 0 14px rgba(244,200,98,.5)}
body[data-phase="combat"] .battle .rail-token .intent-crescendo{display:inline-flex;color:#f4c862;filter:drop-shadow(0 0 4px rgba(244,200,98,.8))}
body[data-phase="combat"] .battle .rail-token .intent-crescendo .icon{fill:currentColor;stroke:none}
/* several lanes: each move in short (its Speed, whose and which lane, what it does); the move's name is on hover */
body[data-phase="combat"] .battle .rail-token.compact{display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;column-gap:calc(7px * var(--rs));row-gap:calc(3px * var(--rs));align-items:center;padding-right:calc(10px * var(--rs))}
body[data-phase="combat"] .battle .rail-token.compact .rail-speed{grid-row:1 / span 2;width:calc(28px * var(--rs));height:calc(28px * var(--rs));font-size:calc(12px * var(--rs))}
body[data-phase="combat"] .battle .rail-token.compact .rail-what small{font-size:calc(9px * var(--rs));letter-spacing:.18em}
body[data-phase="combat"] .battle .rail-token.compact .rail-hit{font-size:calc(15px * var(--rs))}
/* the rules, under the rail */
body[data-phase="combat"] .battle .rail-token .intent-tooltip{display:none;position:absolute;left:50%;top:calc(100% + 8px);bottom:auto;transform:translateX(-50%);width:calc(250px * var(--rs));text-align:left;pointer-events:none;z-index:2}
body[data-phase="combat"] .battle .rail-token:is(:hover,:focus-visible) .intent-tooltip{display:block}
body[data-phase="combat"] .battle .rail-token .intent-tooltip :is(strong,span){display:block;white-space:normal}
/* each creature's place in the order, over its head (gilt; the foe's with a rose ring) */
body[data-phase="combat"] .battle .order-badges{position:fixed;inset:0;pointer-events:none;z-index:12}
body[data-phase="combat"] .battle .order-badge{--bs:var(--badge-scale,1);position:fixed;transform:translateX(-50%);display:grid;place-items:center;width:calc(28px * var(--bs));height:calc(28px * var(--bs));border-radius:50%;border:1px solid #f3d99a;
 font:700 calc(14px * var(--bs))/1 var(--cu-display);color:#2a1a0c;text-shadow:0 1px 0 rgba(255,240,200,.6);background:radial-gradient(circle at 36% 28%,#fff1c4 0 12%,#e9c070 38%,#b98236 72%,#7d531f 100%);box-shadow:inset 0 0 0 2px rgba(122,82,30,.55),0 2px 8px rgba(0,0,0,.6);transition:transform .15s,box-shadow .15s}
body[data-phase="combat"] .battle .order-badge.foe{box-shadow:inset 0 0 0 2px rgba(122,82,30,.55),0 0 0 2px rgba(233,160,145,.85),0 2px 8px rgba(0,0,0,.6)}
body[data-phase="combat"] .battle .order-badge.rail-linked{transform:translateX(-50%) scale(1.22);box-shadow:inset 0 0 0 2px rgba(122,82,30,.55),0 0 0 2px var(--cu-gilt-hi),0 0 14px rgba(244,200,98,.7)}
body[data-phase="combat"] .battle .lane-combatant.rail-linked .health-shell{border-color:var(--cu-gilt-hi);box-shadow:inset 0 0 0 2px rgba(3,5,10,.9),0 0 0 1px rgba(232,193,122,.6),0 0 14px rgba(244,200,98,.45)}
@media (prefers-reduced-motion:reduce){body[data-phase="combat"] .battle :is(.rail-token,.order-badge){transition:none}}

body[data-phase="combat"] .two-lane-battle .lane-combatant{--plate-h:clamp(30px,1.95vw,72px)}
body[data-phase="combat"] .battle .intent-tooltip{background:linear-gradient(180deg,rgba(16,21,34,.98),rgba(5,8,15,.98));border:1px solid var(--cu-hair);border-radius:2px;color:var(--cu-ink-soft);font:400 clamp(13px,.74vw,28px)/1.4 var(--cu-display);text-shadow:none;white-space:normal;box-shadow:0 12px 26px rgba(0,0,0,.55)}
body[data-phase="combat"] .battle .intent-tooltip strong{margin-bottom:.25em;font:600 1.05em var(--cu-display);color:var(--cu-gilt)}
body[data-phase="combat"] .two-lane-battle .lane-combatant .combat-status{display:inline-flex;align-items:center;gap:.25em;padding:.18em .45em;border-radius:2px;background:rgba(5,8,15,.78);border:1px solid var(--cu-hair-soft);box-shadow:0 2px 6px rgba(0,0,0,.35);filter:none;font-family:var(--cu-display);font-weight:600}
body[data-phase="combat"] .two-lane-battle .lane-combatant .combat-status .icon{width:1.05em;height:1.05em}
/* statuses: a row under the health bar, in the creature's own plate (its name, health and statuses in one place).
   An empty row keeps its height, so every creature's health bar sits at the same height. */
body[data-phase="combat"] .battle.two-lane-battle[data-lane-count] .lane-combatant .status-list{position:static;left:auto;right:auto;top:auto;width:auto;height:auto;min-height:0;margin:.3em 0 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.3em;overflow:visible;transform:none;font-size:calc(var(--plate-h) * .4);min-height:calc(var(--plate-h) * .8)}
/* several lanes: one block beside each creature, on the outside of its lane, top to bottom its name, health and statuses (kept apart in
   positionCombatUI, vesperkin-app.mjs) */
body[data-phase="combat"] .battle.two-lane-battle:not([data-lane-count="1"])[data-lane-count] .lane-combatant{display:flex;flex-direction:column;align-items:stretch}
/* the fight's tools: the top bar's left-hand twin of its right-hand group */
body[data-phase="combat"] .topbar .fight-tools .icon-button.primary{border-color:var(--cu-gilt);color:var(--cu-gilt-hi)}
/* each keeper's Vows: tokens beside the name, the rule on hover or focus */
body[data-phase="combat"] .battle .team-plate{position:relative}
.battle-teams .team-plate .vow-tokens{position:absolute;top:50%;transform:translateY(-50%);display:flex;gap:6px}
.battle-teams .team-plate.own .vow-tokens{left:calc(100% + 14px)}
.battle-teams .team-plate.foe .vow-tokens{right:calc(100% + 14px);flex-direction:row-reverse}
.battle-teams .vow-token{display:inline-block;width:34px;height:34px;border-radius:50%;overflow:hidden;border:2px solid #d9b45a;box-shadow:0 0 0 1px rgba(0,0,0,.6),0 0 10px rgba(217,180,90,.45);background:#120e06;cursor:help;animation:vow-made .5s cubic-bezier(.2,1.6,.4,1) both}
.battle-teams .vow-token:focus-visible{outline:2px solid #f4c862;outline-offset:2px}
.battle-teams .vow-token .vow-token-art,.battle-teams .vow-token img{width:100%;height:100%;object-fit:cover;display:block}
@keyframes vow-made{from{transform:scale(.3);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.battle-teams .vow-token{animation:none}}
/* a keeper's Keepsakes, before its Vows: square, in brass (shared/vesperkin-keepsakes.mjs) */
.battle-teams .keepsake-token{display:inline-block;width:30px;height:30px;align-self:center;border-radius:4px;overflow:hidden;border:2px solid #9c7a3c;box-shadow:0 0 0 1px rgba(0,0,0,.6);background:#120e06;cursor:help}
.battle-teams .keepsake-token:focus-visible{outline:2px solid #f4c862;outline-offset:2px}
.battle-teams .keepsake-token img{width:100%;height:100%;object-fit:cover;display:block}
.game-card.vow-card .card-speed{color:#d9b45a}
.game-card.cost-lowered .card-cost{color:#ffe7aa;background:#7a5a16;box-shadow:0 0 0 2px #e8c96a}
body[data-phase="combat"] .battle .team-plate .keeper-way{cursor:help;text-decoration:underline dotted rgba(232,193,122,.6);text-underline-offset:3px}
/* a Crescendo held: a gold chip (the move that will spend it is marked on the rail) */
body[data-phase="combat"] .two-lane-battle .lane-combatant .combat-status.status-crescendo{color:#ffe7aa;border-color:rgba(244,200,98,.9);background:linear-gradient(180deg,rgba(84,60,16,.94),rgba(34,23,5,.92));box-shadow:0 0 10px rgba(244,200,98,.45),0 2px 6px rgba(0,0,0,.35)}
body[data-phase="combat"] .two-lane-battle .lane-combatant .combat-status.status-crescendo .icon{fill:currentColor;stroke:none}
.intent-tooltip .intent-crescendo-note{display:block;margin-top:.35em;color:#f4c862}
.intent-tooltip .intent-gift-note{display:block;margin-top:.35em;color:#c9b7f0}
.pet-gifts{margin:.6em 0 0;display:grid;gap:.35em}.pet-gift{margin:0;line-height:1.35}.pet-gift b{color:#b0883a;font-variant:small-caps;letter-spacing:.04em}.pet-gift small{font-weight:400;font-style:italic;color:#8a7650}
/* two and three lanes: the plates' scale */
body[data-phase="combat"] .two-lane-battle:not([data-lane-count="1"]) .lane-combatant{--plate-h:calc(30px * var(--compact-hud-scale,1))}
body[data-phase="combat"] .two-lane-battle:not([data-lane-count="1"]) .lane-combatant .combat-status{padding:.1em .35em}

/* ---- the hand, the purse of energy, the turn's commitment ---- */
/* glyphs on the cards are inked for parchment (the HUD's pale glyph colours are for dark plates) */
body[data-phase="combat"] .battle .game-card .icon{opacity:1}
body[data-phase="combat"] .battle .game-card .icon-poison{color:#3d6a1c;fill:rgba(71,111,49,.22)}
body[data-phase="combat"] .battle .game-card .icon-weak{color:#7a3b84}
body[data-phase="combat"] .battle .game-card .icon-strength{color:#9a4f14;fill:rgba(184,103,39,.2)}
body[data-phase="combat"] .battle .game-card .icon-speed{color:#1d5f8a;fill:rgba(101,196,250,.22)}
body[data-phase="combat"] .battle .game-card .icon-shield{color:#255f76;fill:rgba(65,109,130,.2)}
body[data-phase="combat"] .battle .game-card .icon-heart{color:#9b2c40;fill:rgba(173,64,85,.18)}
body[data-phase="combat"] .battle .game-card .icon-sword{color:#4b3826}
body[data-phase="combat"] .battle .game-card :is(.icon-counter,.icon-charge){color:#7d5d10}
body[data-phase="combat"] .battle .game-card :is(.icon-leech,.icon-recoil){color:#9b3324}
body[data-phase="combat"] .battle .game-card :is(.icon-pierce,.icon-expose){color:#7a4a18}
body[data-phase="combat"] .battle .game-card .icon-cleanse{color:#22676a}
body[data-phase="combat"] .battle .game-card .icon-deck{color:#5b4a7a}
body[data-phase="combat"] .battle .card-speed{display:inline-flex;align-items:center;justify-content:flex-end;gap:.1em;flex-basis:auto}
body[data-phase="combat"] .battle .card-speed .icon{width:.85em;height:.85em;opacity:.75}
body[data-phase="combat"] .battle .card-speed b{font-weight:600}

body[data-phase="combat"] .two-lane-battle .energy-constellation{display:flex;flex-direction:column;align-items:center;gap:.55em;width:auto;min-width:clamp(120px,7.6vw,300px);padding:.6em .9em .75em;left:clamp(18px,2.2vw,90px);
 background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-hair);border-radius:2px;box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.1),0 12px 26px rgba(0,0,0,.45)}
body[data-phase="combat"] .two-lane-battle .energy-constellation[hidden]{display:none}
body[data-phase="combat"] .two-lane-battle .energy-caption{display:block;order:-1;margin:0;font:500 clamp(10px,.6vw,24px)/1 var(--cu-display);letter-spacing:.34em;text-transform:uppercase;color:var(--cu-ink-soft)}
body[data-phase="combat"] .two-lane-battle .energy-caption b{margin-left:.3em;font:600 1.5em/1 var(--cu-display);letter-spacing:0;color:var(--cu-gilt);vertical-align:-.12em}
body[data-phase="combat"] .two-lane-battle .energy-pips{gap:.45em;max-width:none}

body[data-phase="combat"] .two-lane-battle .lock-control{display:flex;flex-direction:column;align-items:stretch;gap:.5em;width:clamp(150px,10.5vw,400px);right:clamp(18px,2.2vw,90px)}
body[data-phase="combat"] .two-lane-battle .lock-control[hidden]{display:none}
body[data-phase="combat"] .two-lane-battle .lock-button{display:flex;align-items:center;justify-content:center;width:100%;min-height:clamp(48px,3vw,110px);padding:.4em .9em;clip-path:none;border-radius:2px;
 font:600 clamp(17px,1.05vw,40px)/1 var(--cu-display);font-variant:small-caps;letter-spacing:.08em;color:var(--cu-gilt-hi);text-shadow:0 1px 2px #000;
 background:linear-gradient(180deg,#6a2a24,#3d1714 62%,#2a0f0d);border:1px solid var(--cu-gilt);box-shadow:inset 0 0 0 3px rgba(20,6,5,.55),inset 0 0 0 4px rgba(232,193,122,.35),0 0 22px rgba(255,170,90,.18),0 10px 24px rgba(0,0,0,.5);transition:filter .2s,box-shadow .2s,translate .2s}
body[data-phase="combat"] .two-lane-battle .lock-button:hover:not(:disabled){filter:brightness(1.15);background:linear-gradient(180deg,#7c3229,#4a1c17 62%,#301210);box-shadow:inset 0 0 0 3px rgba(20,6,5,.55),inset 0 0 0 4px rgba(232,193,122,.5),0 0 30px rgba(255,180,100,.32),0 10px 24px rgba(0,0,0,.5);translate:0 -1px}
body[data-phase="combat"] .two-lane-battle .lock-button:disabled{color:var(--cu-ink-soft);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border-color:rgba(232,193,122,.35);box-shadow:inset 0 0 0 3px var(--cu-well);filter:none;opacity:1}
body[data-phase="combat"] .two-lane-battle .direction-button{display:flex;align-items:baseline;justify-content:center;gap:.45em;width:100%;margin:0;padding:.55em .7em;white-space:nowrap;
 font:500 clamp(13px,.76vw,30px)/1 var(--cu-display);font-variant:small-caps;letter-spacing:.05em;color:var(--cu-ink-soft);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well)}
body[data-phase="combat"] .two-lane-battle .direction-button small{font:italic .9em var(--cu-display);font-variant:normal;letter-spacing:0;color:var(--cu-ink-faint)}
body[data-phase="combat"] .two-lane-battle .direction-button:hover:not(:disabled){color:var(--cu-ink);border-color:var(--cu-gilt);background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom))}
body[data-phase="combat"] .two-lane-battle .direction-button:disabled{opacity:.55}

body[data-phase="combat"] .battle .hover-preview-note,body[data-phase="combat"] #card-target-hint{font:italic clamp(13px,.74vw,28px)/1.35 var(--cu-display);color:var(--cu-ink-soft);text-shadow:0 1px 6px rgba(0,0,0,.95);background:linear-gradient(180deg,rgba(14,19,30,.82),rgba(5,8,15,.88));border:1px solid var(--cu-hair-soft);border-radius:2px;box-shadow:0 8px 20px rgba(0,0,0,.4)}
body[data-phase="combat"] #tactic-choice{z-index:40;font-family:var(--cu-display);color:var(--cu-ink);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-gilt);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well),0 12px 28px rgba(0,0,0,.55)}
@media(min-width:761px){body[data-phase="combat"] #tactic-choice{top:clamp(178px,17.4vh,470px);bottom:auto}}
body[data-phase="combat"] #tactic-choice strong{font-weight:600;color:var(--cu-gilt-hi)}
body[data-phase="combat"] #tactic-choice span{font-style:italic;color:var(--cu-ink-soft)}
body[data-phase="combat"] #tactic-choice button{font-family:var(--cu-display);color:var(--cu-ink-soft);background:none;border:0;border-left:1px solid var(--cu-hair-soft);border-radius:0}

/* the creatures' models arriving: a quiet line under the turn plaque, not over it (its inline style is the fallback) */
body .combat-loading-status{top:clamp(178px,17.4vh,470px)!important;padding:.45em 1.1em .5em!important;font:italic clamp(13px,.78vw,30px)/1.3 "Palatino Linotype","Book Antiqua",Palatino,Georgia,serif!important;color:#d8ccae!important;
 background:linear-gradient(180deg,rgba(14,19,30,.88),rgba(5,8,15,.93))!important;border:1px solid rgba(232,193,122,.32)!important;border-radius:2px!important}

/* notices (a card that will fail, a refused play) drop in under the turn plaque, clear of the hand and the rail */
body[data-phase="combat"] .toast{top:clamp(178px,17.4vh,470px);bottom:auto;transform:translate(-50%,-10px);max-width:min(40vw,1100px);padding:.6em 1.3em .65em;
 font:italic clamp(14px,.82vw,32px)/1.4 var(--cu-display);color:var(--cu-ink);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-gilt);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well),0 14px 30px rgba(0,0,0,.5)}
body[data-phase="combat"] .toast.visible{transform:translate(-50%,0)}

/* ---- the exchange: the order of play as a rail of tiles, the current beat captioned above it ---- */
body[data-phase="combat"] .battle .resolution-strip{bottom:clamp(14px,2.2vh,60px);gap:clamp(6px,.5vw,18px);padding:clamp(6px,.6vh,14px);background:linear-gradient(180deg,rgba(14,19,30,.7),rgba(5,8,15,.84));border:1px solid var(--cu-hair-soft);border-radius:2px;box-shadow:0 14px 30px rgba(0,0,0,.45);scrollbar-width:none}
body[data-phase="combat"] .battle .resolution-strip::-webkit-scrollbar{display:none}
body[data-phase="combat"] .battle .resolution-card{width:clamp(112px,6.9vw,260px);flex:0 0 clamp(112px,6.9vw,260px);padding:.35em .35em .45em;opacity:.62;font-family:var(--cu-display);
 background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.25);border-top:3px solid rgba(159,220,184,.65);border-radius:2px;box-shadow:inset 0 0 0 1px var(--cu-well)}
body[data-phase="combat"] .battle .resolution-card.foe{border-top-color:rgba(233,160,145,.7)}
body[data-phase="combat"] .battle .resolution-card.end-turn{border-top-color:rgba(232,193,122,.5)}
body[data-phase="combat"] .battle .resolution-card img{height:clamp(52px,3.4vw,130px);margin-bottom:.35em;border:1px solid rgba(232,193,122,.3)}
body[data-phase="combat"] .battle .resolution-card strong{font:600 clamp(12px,.7vw,26px)/1.15 var(--cu-display);color:var(--cu-ink)}
body[data-phase="combat"] .battle .resolution-card small{font:italic clamp(11px,.62vw,24px)/1.2 var(--cu-display);color:var(--cu-ink-faint)}
body[data-phase="combat"] .battle .resolution-card.active{opacity:1;transform:translateY(-8px);border-color:var(--cu-gilt);background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom));box-shadow:inset 0 0 0 1px var(--cu-well),0 0 22px rgba(255,190,110,.22),0 10px 20px rgba(0,0,0,.45)}
body[data-phase="combat"] .battle .resolution-card.done{opacity:.34}
body[data-phase="combat"] .battle .queue-cancel-label{font:600 .8em var(--cu-display);font-variant:small-caps;letter-spacing:.06em;background:rgba(84,28,24,.92)}
body[data-phase="combat"] .battle .resolution-message{bottom:calc(clamp(14px,2.2vh,60px) + var(--rail-h,clamp(140px,8vw,300px)) + 14px);width:auto;min-width:min(40vw,640px);max-width:min(58vw,1400px);min-height:0;padding:.55em 1.6em .7em;text-shadow:none;
 background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-hair);border-radius:2px;box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.12),0 14px 30px rgba(0,0,0,.45)}
body[data-phase="combat"] .battle .resolution-message[hidden]{display:none}
body[data-phase="combat"] .battle .resolution-message h3{margin:0 0 .15em;padding-bottom:.06em;font:400 clamp(24px,1.5vw,58px)/1.08 var(--cu-display);text-shadow:none;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.6))}
body[data-phase="combat"] .battle .resolution-message p{margin:0;font:clamp(14px,.84vw,32px)/1.4 var(--cu-display);color:var(--cu-ink-soft)}
body[data-phase="combat"] .battle .resolution-message small{display:block;margin-top:.35em;font:italic clamp(12px,.7vw,26px)/1.3 var(--cu-display);color:var(--cu-ink-faint)}

/* ---- deployment: the companies' rosters and the lanes in the arena ---- */
body[data-phase="combat"] .battlefield-deployment h2{font:400 clamp(30px,2.2vw,84px)/1 var(--cu-display);letter-spacing:-.005em;text-shadow:none;padding-bottom:.08em;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.66)) drop-shadow(0 10px 24px rgba(0,0,0,.5))}
body[data-phase="combat"] .battlefield-deployment .deployment-placement-hint{font:italic clamp(14px,.86vw,34px)/1.35 var(--cu-display);color:var(--cu-ink-soft);text-shadow:0 1px 8px rgba(0,0,0,.95)}
/* a soft dark glow under the heading and its hint: the arena's painted backdrop behind them is bright and busy */
body[data-phase="combat"] .battlefield-deployment::before{content:"";position:absolute;left:50%;top:0;width:min(980px,72vw);height:clamp(150px,13vw,420px);transform:translateX(-50%);
 background:radial-gradient(ellipse 50% 58% at 50% 34%,rgba(6,7,11,.72),rgba(6,7,11,.38) 55%,transparent 78%);pointer-events:none;z-index:-1}
body[data-phase="combat"] .battlefield-deployment>h2,body[data-phase="combat"] .battlefield-deployment .deployment-placement-hint{z-index:1}
body[data-phase="combat"] .battlefield-deployment .deployment-foe-tray,body[data-phase="combat"] .battlefield-deployment .deployment-tray.deployment-tray.deployment-tray{background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom))!important;border:1px solid var(--cu-hair)!important;border-radius:2px!important;
 box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.12),0 16px 36px rgba(0,0,0,.45)!important}
body[data-phase="combat"] .battlefield-deployment .deployment-roster{background:none!important;border-radius:0}
body[data-phase="combat"] .battlefield-deployment .deployment-foe-tray>small{display:block;font:italic 500 clamp(15px,.95vw,36px)/1.2 var(--cu-display);color:var(--cu-gilt);text-align:center}
body[data-phase="combat"] .battlefield-deployment .deployment-foe-tray>small::before{content:'Opposing company';display:block;margin-bottom:.35em;font:500 clamp(10px,.56vw,22px)/1.2 var(--cu-display);font-style:normal;letter-spacing:.36em;text-transform:uppercase;color:var(--cu-ink-faint)}
body[data-phase="combat"] .battlefield-deployment .deployment-sprite{font-family:var(--cu-display)}
body[data-phase="combat"] .battlefield-deployment .deployment-sprite>span{font:500 clamp(14px,.86vw,32px)/1.2 var(--cu-display);color:var(--cu-ink)}
body[data-phase="combat"] .battlefield-deployment .deployment-tray-pet.selected .deployment-sprite{outline:1px solid var(--cu-gilt);outline-offset:3px;background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom))}
body[data-phase="combat"] .battlefield-deployment .deployment-sprite .deployment-fatigue{background:rgba(3,5,10,.5);border:1px solid var(--cu-hair-soft);border-radius:2px;color:var(--cu-ink-soft);font-family:var(--cu-display)}
body[data-phase="combat"] .battlefield-deployment .deployment-sprite .deployment-max-hp{font-family:var(--cu-display);color:var(--cu-ink-soft)}
body[data-phase="combat"] .battlefield-deployment .pet-description-preview{background:rgba(3,5,10,.5)!important;border:1px solid var(--cu-hair-soft)!important;border-radius:2px!important;font-family:var(--cu-display)}
body[data-phase="combat"] .battlefield-deployment .pet-description-preview strong{color:var(--cu-gilt)!important;font-family:var(--cu-display)}
body[data-phase="combat"] .battlefield-deployment .pet-description-preview p{color:var(--cu-ink-soft);font-family:var(--cu-display)}
body[data-phase="combat"] .battlefield-deployment .deploy-lock .deployment-count{font:italic clamp(13px,.8vw,30px)/1.2 var(--cu-display);color:var(--cu-ink-soft)}
body[data-phase="combat"] .battlefield-deployment .deploy-lock button{font:500 clamp(14px,.86vw,34px)/1 var(--cu-display);font-variant:small-caps;letter-spacing:.06em;border-radius:2px;text-shadow:none}
body[data-phase="combat"] .battlefield-deployment .deploy-lock button.quiet{padding:.7em 1em;color:var(--cu-ink-soft);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);box-shadow:inset 0 0 0 2px var(--cu-well)}
body[data-phase="combat"] .battlefield-deployment .deploy-lock button.quiet:hover{color:var(--cu-ink);border-color:var(--cu-gilt)}
body[data-phase="combat"] .battlefield-deployment .deploy-lock button.primary{min-width:9em;padding:.75em 1.4em;font-weight:600;font-size:clamp(16px,1vw,38px);color:var(--cu-gilt-hi);background:linear-gradient(180deg,#6a2a24,#3d1714 62%,#2a0f0d);border:1px solid var(--cu-gilt);
 box-shadow:inset 0 0 0 3px rgba(20,6,5,.55),inset 0 0 0 4px rgba(232,193,122,.35),0 0 22px rgba(255,170,90,.18),0 10px 24px rgba(0,0,0,.45)}
body[data-phase="combat"] .battlefield-deployment .deploy-lock button.primary:disabled{color:var(--cu-ink-faint);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border-color:rgba(232,193,122,.3);box-shadow:inset 0 0 0 3px var(--cu-well);opacity:1}
body[data-phase="combat"] .battlefield-deployment .deployment-slot-label{font:500 clamp(13px,.76vw,30px)/1.1 var(--cu-display);color:var(--cu-ink);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-hair);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well),0 4px 12px rgba(0,0,0,.4)}
body[data-phase="combat"] .battlefield-deployment .deployment-plus{color:var(--cu-gilt);background:rgba(5,8,15,.75);border:1px solid var(--cu-hair)}

/* ---- the versus splash: the stage clears for it, then the plates and the hand arrive ---- */
body[data-phase="combat"] .battle :is(#lane-vitals,#turn-rail,#order-badges,.hand-zone,.energy-constellation,.lock-control,.battle-tools){transition:opacity .5s ease}
body[data-phase="combat"]:has(#announcement.visible) .battle :is(#lane-vitals,#turn-rail,#order-badges,.hand-zone,.energy-constellation,.lock-control,.battle-tools){opacity:0}
body[data-phase="combat"] .announcement{background:radial-gradient(ellipse 70% 60% at 50% 50%,rgba(10,8,6,.86),rgba(10,8,6,.45) 62%,transparent)}
body[data-phase="combat"] .versus-team h2{font:400 clamp(28px,2.3vw,88px)/1.05 var(--cu-display);text-shadow:none;padding-bottom:.08em;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.66)) drop-shadow(0 10px 24px rgba(0,0,0,.5))}
body[data-phase="combat"] .versus-team p{font:italic clamp(14px,.9vw,34px)/1.3 var(--cu-display);color:var(--cu-ink-soft);text-shadow:0 1px 8px rgba(0,0,0,.95)}
body[data-phase="combat"] .versus-mark{font:italic 400 clamp(30px,2.4vw,90px)/1 var(--cu-display);color:var(--cu-gilt);text-shadow:0 0 18px rgba(255,190,110,.35),0 2px 0 rgba(30,10,16,.7)}

/* ---- the duel's result: in the arena, over the trainers' victory or defeat ---- */
body.outcome-hold .topbar .brand,body.outcome-hold .topbar .top-center,body:has(#app .duel-result) .topbar .brand{visibility:hidden}
body.outcome-hold .room-tag,body:has(#app .duel-result) .room-tag{display:none}
body.outcome-hold .top-tools .icon-button{background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);border-radius:2px;box-shadow:inset 0 0 0 2px var(--cu-well);color:var(--cu-gilt)}
#app .duel-result{position:fixed;left:50%;bottom:clamp(18px,3vh,80px);top:auto;z-index:30;width:min(44rem,92vw);max-width:none;margin:0;transform:translateX(-50%);padding:clamp(16px,1.6vh,40px) clamp(20px,1.6vw,60px) clamp(14px,1.4vh,36px);text-align:center;
 font-family:var(--cu-display);color:var(--cu-ink);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid var(--cu-hair);border-radius:2px;
 box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.14),0 22px 48px rgba(0,0,0,.55);animation:duel-result-in .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes duel-result-in{from{opacity:0;transform:translate(-50%,18px)}to{opacity:1;transform:translate(-50%,0)}}
body.reduced-motion #app .duel-result{animation:none}
#app .duel-result .kicker{margin:0 0 .4em;font:500 clamp(10px,.62vw,24px)/1.2 var(--cu-display);letter-spacing:.42em;text-transform:uppercase;color:var(--cu-ink-soft)}
#app .duel-result.victory .kicker{color:var(--cu-gilt)}
#app .duel-result.defeat .kicker{color:var(--cu-rose)}
#app .duel-result h2{margin:0;padding-bottom:.08em;font:400 clamp(32px,2.3vw,88px)/1.02 var(--cu-display);letter-spacing:-.005em;text-shadow:none;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 rgba(30,10,16,.66)) drop-shadow(0 8px 20px rgba(0,0,0,.5))}
#app .duel-result .duel-result-line{margin:.5em auto 0;max-width:34em;font:italic clamp(14px,.86vw,32px)/1.4 var(--cu-display);color:var(--cu-ink-soft)}
#app .duel-result .duel-result-decided{margin:.45em auto 0;max-width:34em;font:600 clamp(13px,.8vw,30px)/1.4 var(--cu-display);color:var(--cu-gilt,#e8c17a)}
/* what happened: two lines from the duel's record and one rule of thumb */
#app .duel-result .duel-summary{margin:.9em auto 0;max-width:36em;padding:.7em 1em .75em;border-top:1px solid rgba(232,193,122,.28);border-bottom:1px solid rgba(232,193,122,.28);text-align:left}
#app .duel-result .duel-summary h3{margin:0 0 .3em;font:500 clamp(10px,.62vw,24px)/1.2 var(--cu-display);letter-spacing:.28em;text-transform:uppercase;color:var(--cu-ink-faint)}
#app .duel-result .duel-summary p{margin:.15em 0;font:clamp(13px,.8vw,30px)/1.45 var(--cu-display);color:var(--cu-ink)}
#app .duel-result .duel-summary .duel-tip{margin-top:.45em;font-style:italic;color:var(--cu-gilt)}
#app .duel-result .result-facts{display:flex;justify-content:center;gap:clamp(24px,2.4vw,90px);margin:.9em 0 .2em;padding:.7em 0 .2em;border-top:1px solid var(--cu-hair-soft)}
#app .duel-result .result-fact{display:grid;gap:.2em;min-width:0;padding:0;background:none;border:0}
#app .duel-result .result-fact strong{font:400 clamp(26px,1.7vw,64px)/1 var(--cu-display);color:var(--cu-gilt)}
#app .duel-result .result-fact small{font:500 clamp(10px,.58vw,22px)/1.2 var(--cu-display);letter-spacing:.24em;text-transform:uppercase;color:var(--cu-ink-faint)}
#app .duel-result .causal-facts{margin:.7em auto 0;padding:.6em 0 0;max-width:38em;list-style:none;border-top:1px solid var(--cu-hair-soft);text-align:left}
#app .duel-result .causal-facts li{position:relative;margin:.28em 0;padding-left:1.1em;font:clamp(13px,.78vw,30px)/1.4 var(--cu-display);color:var(--cu-ink-soft)}
#app .duel-result .causal-facts li::before{content:'';position:absolute;left:.1em;top:.55em;width:.42em;height:.42em;transform:rotate(45deg);background:var(--cu-gilt-deep)}
#app .duel-result .paired-results{display:flex;justify-content:center;gap:clamp(10px,.8vw,30px);margin:.9em 0 0}
#app .duel-result .paired-results article{flex:1 1 0;min-width:0;padding:.55em .7em;background:rgba(3,5,10,.45);border:1px solid var(--cu-hair-soft);border-radius:2px}
#app .duel-result .paired-results h3{margin:0;font:500 clamp(10px,.6vw,24px)/1.2 var(--cu-display);letter-spacing:.3em;text-transform:uppercase;color:var(--cu-ink-faint)}
#app .duel-result .paired-results p{margin:.3em 0 .2em;font:italic clamp(13px,.8vw,30px)/1.25 var(--cu-display);color:var(--cu-gilt)}
#app .duel-result .paired-results small{font:clamp(11px,.64vw,24px)/1.3 var(--cu-display);color:var(--cu-ink-soft)}
#app .duel-result .button-row{display:flex;justify-content:center;flex-wrap:wrap;gap:clamp(8px,.6vw,22px);margin:1.1em 0 0}
#app .duel-result .button-row button{min-height:0;padding:.7em 1.2em;font:500 clamp(14px,.84vw,32px)/1 var(--cu-display);font-variant:small-caps;letter-spacing:.06em;border-radius:2px;text-shadow:none;
 color:var(--cu-ink-soft);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32);box-shadow:inset 0 0 0 2px var(--cu-well)}
#app .duel-result .button-row button:hover{color:var(--cu-ink);border-color:var(--cu-gilt);background:linear-gradient(180deg,var(--cu-lit-top),var(--cu-lit-bottom))}
#app .duel-result .button-row button.primary{display:inline-flex;align-items:center;gap:.5em;font-weight:600;color:var(--cu-gilt-hi);background:linear-gradient(180deg,#6a2a24,#3d1714 62%,#2a0f0d);border-color:var(--cu-gilt);
 box-shadow:inset 0 0 0 3px rgba(20,6,5,.55),inset 0 0 0 4px rgba(232,193,122,.35),0 0 22px rgba(255,170,90,.18)}
#app .duel-result .button-row button.primary:hover{filter:brightness(1.15)}
#app .duel-result .button-row .icon{width:1em;height:1em}
#app .duel-result .duel-result-note{margin:.85em 0 0;font:italic clamp(12px,.68vw,26px)/1.35 var(--cu-display);color:var(--cu-ink-faint)}
/* short screens: the card keeps to the lower third so the fallen creature stays in view */
@media(max-height:860px) and (min-width:761px){
 #app .duel-result{width:min(40rem,70vw);padding:12px 22px 12px}
 #app .duel-result .causal-facts,#app .duel-result .duel-result-note{display:none}
 #app .duel-result .result-facts{margin:.6em 0 0;padding:.5em 0 0}
 #app .duel-result .button-row{margin:.8em 0 0}
}

/* ---- the company's records opened from the arena (standings, engines, growth): lacquer folios ---- */
body[data-phase="combat"] .modal.frame.company-record:not(.in-book){background:linear-gradient(180deg,rgba(16,21,34,.97),rgba(5,8,15,.98))!important;border:1px solid var(--cu-hair)!important;border-radius:2px!important;
 box-shadow:inset 0 0 0 3px var(--cu-well),inset 0 0 0 4px rgba(232,193,122,.12),0 24px 60px rgba(0,0,0,.6)!important;font-family:var(--cu-display)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) .keeper-document-label{font:500 clamp(10px,.58vw,22px)/1.2 var(--cu-display);letter-spacing:.38em;text-transform:uppercase;color:var(--cu-ink-soft)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book)>h2{font:400 clamp(26px,1.6vw,60px)/1.1 var(--cu-display)!important;letter-spacing:-.005em;padding-bottom:.35em!important;border-bottom:1px solid var(--cu-hair-soft)!important;
 background:var(--cu-gilt-text);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:drop-shadow(0 2px 0 rgba(30,10,16,.6))}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) .company-record-body{font-family:var(--cu-display)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) .company-record-body :is(h3,h4){font-family:var(--cu-display);color:var(--cu-gilt)!important}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) :is(p,li,td,small,strong,summary){font-family:var(--cu-display)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) button{font-family:var(--cu-display);font-variant:small-caps;letter-spacing:.05em;border-radius:2px;color:var(--cu-ink-soft);background:linear-gradient(180deg,var(--cu-panel-top),var(--cu-panel-bottom));border:1px solid rgba(232,193,122,.32)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) button:hover:not(:disabled){color:var(--cu-ink);border-color:var(--cu-gilt)}
body[data-phase="combat"] .modal.frame.company-record:not(.in-book) .modal-close{color:var(--cu-gilt);font-variant:normal}

/* ---- phones: the same language at the existing compact sizes ---- */
@media(prefers-reduced-motion:reduce){body[data-phase="combat"] .two-lane-battle .lock-button{transition:none}#app .duel-result{animation:none}}

/* ==== juice: the combat UI answers what happens ==== */
/* life: the fill moves at once; a pale chip lingers where it was, then drains (a hit you can read) */
/* (the track is already positioned: absolute and inset in the aqueduct battle, relative elsewhere; forced relative here, it collapsed to
   no height and every health bar vanished, leaving only its numbers) */
body[data-phase="combat"] .battle .health-fill{position:absolute;left:0;top:0;bottom:0;transition:width .22s cubic-bezier(.2,.8,.2,1);z-index:1}
body[data-phase="combat"] .battle .health-chip{position:absolute;left:0;top:0;bottom:0;z-index:0;background:linear-gradient(180deg,#fff1d6,#f0b28a 60%,#c96d55);opacity:.92;transition:width .75s cubic-bezier(.45,0,.2,1) .38s}
body[data-phase="combat"] .battle .health-forecast,body[data-phase="combat"] .battle .health-endpoint,body[data-phase="combat"] .battle .health-poison{z-index:2}
/* a creature hit flinches its plate and flashes its case; a creature mended glows */
body[data-phase="combat"] .battle .lane-combatant.hurt .health-shell{animation:hud-hurt .5s cubic-bezier(.2,.8,.2,1)}
body[data-phase="combat"] .battle .lane-combatant.hurt .combatant-name h3{animation:hud-name-hurt .5s ease-out}
body[data-phase="combat"] .battle .lane-combatant.mended .health-shell{animation:hud-mended .7s ease-out}
@keyframes hud-hurt{0%{transform:translateX(0);box-shadow:0 0 0 1px rgba(0,0,0,.45),0 0 0 rgba(255,90,60,0)}15%{transform:translateX(-5px);box-shadow:0 0 0 1px rgba(255,140,110,.9),0 0 18px rgba(255,90,60,.65)}30%{transform:translateX(4px)}45%{transform:translateX(-3px)}60%{transform:translateX(2px)}100%{transform:none}}
@keyframes hud-name-hurt{0%,100%{color:inherit}20%{color:#ffb4a4}}
@keyframes hud-mended{0%{box-shadow:0 0 0 1px rgba(0,0,0,.45)}30%{box-shadow:0 0 0 1px rgba(170,240,190,.9),0 0 20px rgba(120,230,160,.6)}100%{box-shadow:0 0 0 1px rgba(0,0,0,.45)}}
/* statuses pop in as they arrive */
body[data-phase="combat"] .battle .lane-combatant .combat-status{animation:status-pop .4s cubic-bezier(.2,1.6,.4,1) both}
@keyframes status-pop{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:none}}
/* energy: a spent pip sinks and dims; the purse refills with a glint */
body[data-phase="combat"] .two-lane-battle .energy-pip{transition:transform .28s cubic-bezier(.2,1.4,.4,1),filter .28s,opacity .28s}
body[data-phase="combat"] .two-lane-battle .energy-pip.spent{transform:scale(.72);opacity:.55}
body[data-phase="combat"] .two-lane-battle .energy-pip:not(.spent){animation:pip-glint .6s ease-out both}
@keyframes pip-glint{0%{filter:brightness(1.9) saturate(1.3)}100%{filter:none}}
/* commitment: Lock in stamps a seal */
body[data-phase="combat"] .two-lane-battle .lock-button:disabled{animation:lock-seal .55s cubic-bezier(.2,1.5,.4,1) both}
body[data-phase="combat"] .two-lane-battle .lock-button:disabled::before{content:'';display:inline-block;width:.95em;height:.95em;margin-right:.45em;border-radius:50%;vertical-align:-.12em;
 background:radial-gradient(circle at 38% 32%,#e58a7a,#8e2a22 55%,#4a120e);box-shadow:inset 0 0 0 2px rgba(255,214,190,.25),0 1px 2px rgba(0,0,0,.6)}
@keyframes lock-seal{0%{transform:scale(1.12)}55%{transform:scale(.96)}100%{transform:none}}
/* buttons press */
body[data-phase="combat"] .battle button:not(:disabled):active,#app .duel-result button:active,#app .champions-screen button:active{transform:translateY(1px) scale(.985)}
/* the exchange rail deals its tiles in, the current one breathing */
body[data-phase="combat"] .battle .resolution-card{animation:rail-in .38s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i,0) * 45ms)}
body[data-phase="combat"] .battle .resolution-card.active{animation:rail-in .38s cubic-bezier(.2,.8,.2,1) both,rail-breathe 1.6s ease-in-out .4s infinite}
@keyframes rail-in{from{opacity:0;transform:translateY(18px)}to{opacity:.62;transform:none}}
@keyframes rail-breathe{50%{box-shadow:inset 0 0 0 1px var(--cu-well),0 0 30px rgba(255,190,110,.32),0 10px 20px rgba(0,0,0,.45)}}
/* the turn opens: a gilt flourish across the stage, then gone */
.turn-flourish{position:fixed;left:50%;top:38%;z-index:60;display:flex;align-items:center;gap:1.1em;translate:-50% -50%;pointer-events:none;
 font-family:"Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;animation:flourish 1.6s cubic-bezier(.2,.7,.2,1) both}
.turn-flourish b{font-size:clamp(44px,3.4vw,140px);font-weight:400;line-height:1;letter-spacing:.02em;background:linear-gradient(176deg,#fff6d8 0%,#f3d695 26%,#cf9a52 48%,#f7dfa0 62%,#b07a3a 86%);-webkit-background-clip:text;background-clip:text;color:transparent;
 filter:drop-shadow(0 2px 0 rgba(30,10,16,.7)) drop-shadow(0 10px 26px rgba(0,0,0,.6))}
.turn-flourish .rule{display:block;width:clamp(60px,6vw,240px);height:1px;background:linear-gradient(90deg,transparent,#e8c17a,transparent);box-shadow:0 0 8px rgba(255,200,120,.6)}
.turn-flourish small{position:absolute;left:50%;top:100%;translate:-50% .6em;white-space:nowrap;font-size:clamp(14px,.9vw,34px);font-style:italic;line-height:1;color:#f0c06a;text-shadow:0 1px 8px #000}
@keyframes flourish{0%{opacity:0;transform:scale(.92)}18%{opacity:1;transform:none}70%{opacity:1}100%{opacity:0;transform:translateY(-14px)}}
@media (prefers-reduced-motion:reduce){body[data-phase="combat"] .battle :is(.health-fill,.health-chip,.energy-pip){transition:none}body[data-phase="combat"] .battle :is(.combat-status,.resolution-card,.lock-button,.health-shell){animation:none!important}}
