/* v2.1: readable combat phases, conditions, and spell encounters. */
.combat-statuses { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); padding: 9px 4px 0; }
.status-info { display: inline-flex; align-items: center; gap: 6px; background: #10221b70; color: #b5bead; padding: 5px 8px; font-size: 10px; border-radius: 4px; }
.status-info:hover { border-color: var(--gold); color: var(--ink); }
.status-info b { font-size: 12px; color: var(--ink); }
.status-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.status-info[data-stat=wounds] .status-icon { color: #e6a69c; }
.status-info[data-stat=fatigue] .status-icon { color: #ddbd7b; }
.status-info[data-stat=poison] .status-icon { color: #b6ce8e; }
.status-info[data-stat=regen] .status-icon { color: #9dddab; }
.status-info.active { background: #72513130; }
.status-summary { grid-column: 1 / -1; color: #b6c2ab; padding: 0 5px 2px; font-size: 10px; }
.combatant { row-gap: 5px; }
.combatant .protections { margin-top: 7px; }
.hand { --card-w: 58px; --card-h: 84px; padding-bottom: 22px; padding-top: 5px; gap: 12px; }
.hand .card .age { bottom: -21px; border: 1px solid #c3aa7440; padding: 2px 4px; border-radius: 3px; gap: 3px; font-size: 9px; white-space: nowrap; color: #d0bb88; }
.age .status-icon { width: 12px; height: 12px; }
.age span { line-height: 12px; }
.card.critical .age { color: #ffb1a1; border-color: #d98563; font-size: 8px; }
.hand .empty-slot { height: 84px; width: 58px; }
#statusDialog { max-width: 580px; }
#statusTitle { display: flex; align-items: center; gap: 15px; }
#statusTitle .status-icon { width: 37px; height: 37px; color: var(--gold); }
.wear-list { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; color: #dcc48f; }
.combat-readout { position: relative; border: 1px solid #b7a36d66; background: linear-gradient(115deg,#30392bc9,#14241fd9); padding: 13px 18px; margin-bottom: 15px; border-left: 3px solid var(--gold); }
.combat-readout[data-actor="1"] { border-left-color: #d19279; background: linear-gradient(110deg,#49302be0,#18231f); }
.readout-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pace-controls { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--muted); }
.pace-controls select { font: inherit; color: var(--ink); background: #15271f; border: 1px solid var(--line); padding: 5px; }
.pace-controls .quiet { font-size: 9px; padding: 4px 9px; min-width: 70px; }
.pace-controls button[aria-pressed=true] { color: #e7c98c; border-color: #b79862; }
.readout-content { display: flex; align-items: center; gap: 15px; margin-top: 8px; }
#announcedCard { width: 42px; height: 61px; object-fit: fill; border-radius: 3px; flex: 0 0 auto; box-shadow: 0 3px 12px #0006; }
.readout-content h2 { margin: 0; font: 20px var(--display); color: #ead7b1; }
.readout-content p { margin: 5px 0 0; color: #c0c7b6; font-size: 11px; line-height: 1.65; max-width: 800px; }
.combat-result { white-space: pre-line; font-size: 12px; line-height: 1.8; color: #ebcf96; margin-top: 8px; }
.combat-result:empty { display: none; }
.card.ai-selected { outline: 2px solid #e0b976; outline-offset: 4px; box-shadow: 0 0 30px #d38f4a90; }
.challenge-dialog { max-width: 620px; padding: 35px 40px; text-align: center; overflow-x: hidden; background: radial-gradient(ellipse at 50% 25%,#345148,#0e1a18 70%); }
.challenge-dialog::backdrop { background: #040d0ddd; backdrop-filter: blur(9px); }
.qte-emblem { font: 72px var(--display); color: #d9bd80; text-shadow: 0 0 35px #b7d3d277; line-height: 1.2; margin-top: 10px; }
.challenge-dialog h2 { margin: 12px 0; font-size: 30px; }
.power-options { display: flex; justify-content: center; gap: 40px; color: #b1b7a6; font-size: 11px; margin: 20px 0 28px; }
.power-options b { display: block; color: #ead49b; font: 30px var(--display); }
.qte-track { height: 32px; position: relative; border: 1px solid #826e48; background: repeating-linear-gradient(90deg,transparent 0 24px,#bea9771b 24px 25px),#091710; margin: 0 8px; }
.qte-window { position: absolute; top: 0; bottom: 0; left: 38%; width: 24%; background: #d4b77382; box-shadow: 0 0 23px #e1c78135; border-inline: 2px solid #e8d092; }
.qte-marker { position: absolute; top: -7px; bottom: -7px; width: 4px; left: 0; transform: translateX(-50%); background: #f5f2df; box-shadow: 0 0 12px #d9f4ff; }
.qte-marker:before { content: ''; position: absolute; left: -4px; top: -6px; width: 12px; height: 12px; transform: rotate(45deg); background: #e4ce9b; }
.qte-legend { display: flex; justify-content: space-between; margin: 14px 8px; color: #919e89; font-size: 8px; letter-spacing: 1px; }
#qteResult { min-height: 25px; color: #d9c594; }
.challenge-dialog .restart-button { margin: 5px 8px 10px; min-width: 205px; }
.challenge-note { font-size: 10px !important; color: #95a590 !important; margin: 18px auto 0; max-width: 450px; }
#qteDialog[data-state=success] .qte-emblem { color: #fff0bc; text-shadow: 0 0 25px #daeabbaa; }
#qteDialog[data-state=success] #qteResult { color: #c4ecb0; }
#qteDialog[data-state=miss] #qteResult { color: #e6a99b; }
.dice-stage { display: flex; align-items: center; justify-content: center; gap: 55px; height: 210px; perspective: 750px; overflow: visible; }
.dice-toss { width: 68px; height: 68px; position: relative; transform-style: preserve-3d; }
.die { width: 68px; height: 68px; position: relative; transform-style: preserve-3d; }
.die-face { position: absolute; inset: 0; background: linear-gradient(135deg,#f6e8c7,#d6bd88); border: 2px solid #b09261; border-radius: 9px; display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); padding: 9px; gap: 3px; backface-visibility: hidden; box-shadow: inset 0 0 9px #fff8,0 0 1px #907447; }
.die-face i { align-self: center; justify-self: center; width: 10px; height: 10px; border-radius: 50%; }
.die-face i.pip { background: #28332a; box-shadow: inset 1px 2px 2px #000a,0 1px 0 #fff9; }
.face-1 { transform: translateZ(34px); }
.face-6 { transform: rotateY(180deg) translateZ(34px); }
.face-2 { transform: rotateY(90deg) translateZ(34px); }
.face-5 { transform: rotateY(-90deg) translateZ(34px); }
.face-3 { transform: rotateX(90deg) translateZ(34px); }
.face-4 { transform: rotateX(-90deg) translateZ(34px); }
.dice-result { font: 24px var(--display); min-height: 34px; color: #e7d29f; }
.dice-bands { display: flex; justify-content: center; gap: 10px; margin: 20px 0; }
.dice-bands>span { min-width: 90px; padding: 8px 12px; border: 1px solid var(--line); color: #9fa78e; font-size: 11px; }
.dice-bands b { display: block; color: #cec6a3; margin-top: 4px; }
.dice-bands .chosen { background: #b59b542e; color: #ffe6a7; border-color: #d0b477; }
.spell-strike { position: fixed; pointer-events: none; z-index: 1300; width: 280px; height: 180px; transform: translate(-50%,-50%); }
.spell-strike .sigil { position: absolute; inset: -30px 20px; border: 2px solid #e4cc95; border-radius: 50%; box-shadow: 0 0 25px #c7e4dd66,inset 0 0 35px #bfdacd55; animation: sigil-impact 1.2s both; }
.spell-strike .sigil:before { content: '♠'; position: absolute; inset: 0; display: grid; place-items: center; font: 80px var(--display); color: #e9d6aa; text-shadow: 0 0 20px #a8dce6; }
.spell-strike .slash { position: absolute; left: 50%; top: 50%; width: 330px; height: 7px; background: #f3ecd9; box-shadow: 0 0 15px #aedaf4,0 0 35px #dab970; transform-origin: center; animation: blade-impact .7s .38s both; }
.spell-strike .slash.second { animation-delay: .48s; rotate: -85deg; }
.spell-strike.weak { opacity: .7; scale: .75; }
.spell-strike.weak .second { display: none; }
@keyframes sigil-impact { 0% { opacity:0; transform:scale(.4) rotate(-40deg); } 35% { opacity:1; transform:scale(1) rotate(0); } 60% { opacity:.9; transform:scale(1.12); } 100% { opacity:0; transform:scale(1.6); } }
@keyframes blade-impact { 0% { opacity:0; transform:translate(-50%,-50%) rotate(-30deg) scaleX(0); } 25% { opacity:1; transform:translate(-50%,-50%) rotate(-30deg) scaleX(1.1); } 100% { opacity:0; transform:translate(-50%,-50%) rotate(-30deg) scaleX(1.3); } }
@media(max-width:1150px) { .hand { --card-w:48px; --card-h:70px; gap:10px; }.hand .empty-slot { width:48px; height:70px; }.status-info { gap:4px; padding:4px 6px; }.readout-top .eyebrow { letter-spacing:1px; } }
@media(max-width:580px) {
  .combat-statuses { gap:4px; padding-top:7px; }.status-info { font-size:8px; padding:3px 4px; gap:3px; }.status-info b { font-size:10px; }.status-icon { width:16px; height:16px; }.status-summary { font-size:8px; line-height:1.5; }
  .hand { --card-w:39px; --card-h:57px; gap:8px; }.hand .empty-slot { width:39px; height:57px; }.hand .card .age { font-size:8px; padding:1px 3px; bottom:-19px; }.card.critical .age { font-size:6px; }.age .status-icon { width:9px; height:9px; }.save-zone { padding-bottom:10px; }
  .combat-readout { padding:10px; }.readout-top { flex-wrap:wrap; gap:8px; }.readout-top .eyebrow { font-size:7px; }.pace-controls { font-size:8px; gap:6px; }.pace-controls .quiet { min-width:65px; font-size:8px; }.readout-content h2 { font-size:18px; }.readout-content p { font-size:10px; }.combat-result { font-size:10px; }#announcedCard { width:36px; height:52px; }
  .challenge-dialog { padding:24px 18px; }.challenge-dialog h2 { font-size:25px; }.qte-emblem { font-size:56px; }.power-options { margin:12px 0 25px; }.dice-stage { height:175px; gap:45px; }.dice-result { font-size:20px; }.dice-bands>span { min-width:0; padding:7px; }.qte-legend { letter-spacing:0; }.challenge-note { font-size:9px !important; }
}
@media(prefers-reduced-motion:reduce) { .spell-strike .sigil,.spell-strike .slash { animation:none; opacity:.65; }.spell-strike .slash { transform:translate(-50%,-50%) rotate(-30deg); } }
/* v2.5: dice are part of the table, never a modal. */
.table-dice{position:absolute;inset:-5px;z-index:20;border:1px solid #b9a774;border-radius:8px;background:radial-gradient(ellipse,#315448,#142c23);display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 8px 25px #0006}.table-dice .dice-stage{height:65px;width:180px;gap:28px;margin:0;cursor:grab;touch-action:none;user-select:none;transform-origin:center}.table-dice .dice-stage.held{cursor:grabbing;filter:drop-shadow(0 0 12px #f0d994aa)}.table-dice .dice-toss{scale:.6;width:68px;height:68px;flex-shrink:0}.table-dice .dice-instruction{font-size:10px;color:#e2d8b7;pointer-events:none}.table-dice .dice-result{font-size:16px;min-height:19px;pointer-events:none}.table-dice .die-face{pointer-events:none}.table-dice .dice-stage:focus-visible{outline:1px dashed #e5cd8d;outline-offset:2px}@media(max-width:580px){.table-dice .dice-stage{width:135px;gap:0}.table-dice .dice-instruction{font-size:8px}.table-dice .dice-result{font-size:13px}}
