/*
    ArmadaOne play surface + Service Record styling (design §11). Mobile-first (~380px baseline);
    palette from design §11.1: deep sector #0b1c3a / lines #22406e, steel-blue hull #9fc2ef,
    amber #f5c451, coral #f0997b (hits), blue #85b7eb (intel), dim miss #5f7bb0.
    Shipped as an RCL asset: _content/Haxahedron.Modules.ArmadaOne/css/armadaone-play.css.
*/

.armadaone-play {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 32rem;
    margin: 0 auto;
}

.armadaone-muted { color: #7ba9e6; }
.armadaone-voice { color: #cfe0f5; font-size: 1.05rem; }
.armadaone-prompt { color: #85b7eb; font-weight: 600; text-align: center; }

/* ---- Grid ---------------------------------------------------------------- */

/* The sector is deep space, not ocean (operator 2026-07-24): a near-black void with a
   continuous star-field painted once across the whole grid (so stars don't tile per cell).
   Since 2026-11-18 the field drifts slowly downward (operator: "ambient pace is good, all boards") -
   every board that uses this grid: deploy, attack, fleet and the results "View grid". */
.armadaone-grid {
    display: grid;
    /* 7 columns for Standard Assault, 9 for Prime Assault - set inline by ArmadaOneGrid. */
    grid-template-columns: 1.5rem repeat(var(--board-size, 7), minmax(0, 1fr));
    gap: 2px;
    background-color: #03040a;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #1a2440;
    user-select: none;
    /* The two star layers below sit behind the cells: isolation keeps their z-index:-1 above this
       black, and overflow clips them to the board's rounded edge. */
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

/* Star layers (ArmadaOneDesign/samples/armadaone-starfield-drift.htm). Each is twice the board's
   height with the same stars painted in both halves, so sliding it down by one half brings an
   identical picture into view and the loop has no seam. transform only, so the browser moves it on
   the graphics chip and nothing else on the board repaints. A sound bit may go here: an ambient hum
   under the board, if one is ever wanted (it is a loop, so it has no beats). */
.armadaone-grid::before,
.armadaone-grid::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -100%;
    height: 200%;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat;
    background-size: 100% 50%;
    will-change: transform;
}

/* Far layer: the original 28 stars, one board height every 150 s. Eight of them are brighter and a
   touch larger (operator 2026-11-18: "make some of the stars a bit brighter"), for variance. */
.armadaone-grid::before {
    background-image:
        radial-gradient(2px 2px at 12% 18%, rgba(255, 255, 255, 1), transparent 60%),
        radial-gradient(1px 1px at 28% 62%, rgba(190, 210, 255, 0.7), transparent 60%),
        radial-gradient(2.2px 2.2px at 46% 32%, rgba(255, 255, 255, 1), transparent 60%),
        radial-gradient(1px 1px at 63% 78%, rgba(255, 235, 210, 0.75), transparent 60%),
        radial-gradient(1px 1px at 78% 22%, rgba(255, 255, 255, 0.75), transparent 60%),
        radial-gradient(2px 2px at 88% 58%, rgba(215, 230, 255, 1), transparent 60%),
        radial-gradient(1px 1px at 36% 88%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 70% 45%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1.1px 1.1px at 18% 82%, rgba(220, 230, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 92% 90%, rgba(255, 255, 255, 0.65), transparent 60%),
        radial-gradient(1.2px 1.2px at 55% 12%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 8% 48%, rgba(210, 225, 255, 0.65), transparent 60%),
        radial-gradient(2px 2px at 22% 38%, rgba(255, 255, 255, 1), transparent 60%),
        radial-gradient(1.8px 1.8px at 5% 72%, rgba(255, 245, 225, 0.95), transparent 60%),
        radial-gradient(1px 1px at 33% 8%, rgba(255, 255, 255, 0.65), transparent 60%),
        radial-gradient(1.2px 1.2px at 41% 55%, rgba(200, 220, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 52% 70%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1px 1px at 60% 28%, rgba(230, 240, 255, 0.65), transparent 60%),
        radial-gradient(2px 2px at 74% 66%, rgba(255, 255, 255, 1), transparent 60%),
        radial-gradient(1px 1px at 83% 40%, rgba(210, 225, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 95% 30%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1.1px 1.1px at 15% 58%, rgba(255, 255, 255, 0.7), transparent 60%),
        radial-gradient(1px 1px at 48% 92%, rgba(230, 235, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 66% 90%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1.9px 1.9px at 30% 76%, rgba(255, 245, 225, 0.95), transparent 60%),
        radial-gradient(1px 1px at 86% 78%, rgba(255, 255, 255, 0.6), transparent 60%),
        radial-gradient(1px 1px at 3% 30%, rgba(220, 230, 255, 0.6), transparent 60%),
        radial-gradient(1.9px 1.9px at 68% 15%, rgba(255, 255, 255, 1), transparent 60%);
    animation: armadaone-drift 150s linear infinite;
}

/* Near layer: seven brighter stars at twice the speed - the depth that makes it read as flowing. */
.armadaone-grid::after {
    background-image:
        radial-gradient(1.8px 1.8px at 20% 27%, rgba(255, 255, 255, 0.95), transparent 60%),
        radial-gradient(1.6px 1.6px at 57% 49%, rgba(215, 228, 255, 0.9), transparent 60%),
        radial-gradient(2px 2px at 81% 9%, rgba(255, 255, 255, 0.95), transparent 60%),
        radial-gradient(1.6px 1.6px at 9% 66%, rgba(255, 240, 220, 0.85), transparent 60%),
        radial-gradient(1.7px 1.7px at 39% 84%, rgba(255, 255, 255, 0.9), transparent 60%),
        radial-gradient(1.6px 1.6px at 72% 74%, rgba(205, 222, 255, 0.85), transparent 60%),
        radial-gradient(1.8px 1.8px at 93% 47%, rgba(255, 255, 255, 0.9), transparent 60%);
    animation: armadaone-drift 75s linear infinite;
}

@keyframes armadaone-drift {
    from { transform: translateY(0); }
    to { transform: translateY(50%); }
}

/* Reduce Motion: the stars hold still. */
@media (prefers-reduced-motion: reduce) {
    .armadaone-grid::before,
    .armadaone-grid::after { animation: none; }
}

.armadaone-grid-corner { min-height: 1.3rem; display: flex; align-items: center; justify-content: center; }

.armadaone-grid-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #5f92d6;
    background: transparent;
    border: 0;
    padding: 0;
    min-height: 1.3rem;
}

.armadaone-grid-header.is-tappable {
    color: #f5c451;
    cursor: pointer;
    border-radius: 4px;
}
.armadaone-grid-header.is-tappable:hover { background: rgba(245, 196, 81, 0.18); }

/* Bottom layer: a near-transparent cell so the grid's star-field shows through the
   void; a faint border draws the sector lines. Clickable. */
.armadaone-cell {
    position: relative;
    aspect-ratio: 1;
    background: rgba(10, 16, 34, 0.28);
    border: 1px solid rgba(130, 155, 215, 0.16);
    border-radius: 3px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 120ms ease;
}

.armadaone-grid.is-interactive .armadaone-cell:not(:disabled) { cursor: pointer; }
.armadaone-grid.is-interactive .armadaone-cell:not(:disabled):hover { box-shadow: inset 0 0 0 2px rgba(133, 183, 235, 0.6); }

/* Ephemeral intel (design §4.7, operator 2026-07-22), drawn over the sector void. is-contact = an
   exact Radar/Recon silhouette (blue ring + diagonal shards); is-scan-contact = fuzzy Sonar contact;
   is-scan-clear = a Sonar line swept empty (a warm gold/white lane wash — must read as *lit*, not
   darkened, against the black void). All fade after the viewer's next move. */
.armadaone-cell.is-contact { box-shadow: inset 0 0 0 2px #85b7eb; }
.armadaone-cell.is-contact::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(133, 183, 235, 0.55) 0, rgba(133, 183, 235, 0.55) 3px, transparent 3px, transparent 8px);
}
.armadaone-cell.is-scan-contact { box-shadow: inset 0 0 0 2px rgba(133, 183, 235, 0.45); }
.armadaone-cell.is-scan-clear::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(245, 238, 210, 0.16);
    box-shadow: inset 0 0 0 1px rgba(245, 205, 130, 0.45);
}

/* A cell already fired on is not a target (operator 2026-10-03): no pointer, no hover ring. */
.armadaone-grid.is-interactive .armadaone-cell.is-fired:not(:disabled) { cursor: default; }
.armadaone-grid.is-interactive .armadaone-cell.is-fired:not(:disabled):hover { box-shadow: none; }

/* Selection ring wins over any intel tint on the same cell. */
.armadaone-cell.is-target { box-shadow: inset 0 0 0 3px #f5c451; }

/* Incoming approach (design.md §11.7.1, operator 2026-10-03): the shot closes in as a shrinking
   plus-sign, one step a second. Each step's cells take the target ring's amber, drawn on ::before
   (::after carries the intel tints) so it can snap in from just outside the cell - the cell clips
   its overflow, so a ring settling from 1.35x reads as closing in. transform + opacity only (§11.7).
   The Final beat on the target itself glows. */
.armadaone-cell.is-approach::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 3px #f5c451;
    animation: armadaone-approach-in 350ms ease-out both;
    pointer-events: none;
}

.armadaone-cell.is-approach--final::before {
    box-shadow: inset 0 0 0 3px #f5c451, inset 0 0 14px rgba(245, 196, 81, 0.55);
}

@keyframes armadaone-approach-in {
    from { transform: scale(1.35); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Orbital Strike sweep (design.md §11.7.2): the travelling two-cell window. Same amber as the
   target ring, no snap-in - at 350 ms a step it should read as one cursor sliding along the line. */
.armadaone-cell.is-sweep::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 3px #f5c451;
    pointer-events: none;
}

/* Recon Drone approach (§11.7.1): the same closing plus-sign, in intel blue. */
.armadaone-cell.is-approach--scan::before {
    box-shadow: inset 0 0 0 3px #85b7eb;
}
.armadaone-cell.is-approach--scan.is-approach--final::before {
    box-shadow: inset 0 0 0 3px #85b7eb, inset 0 0 14px rgba(133, 183, 235, 0.55);
}

/* Radar Sweep scan window (§11.7.3): the intel blue of the contact ring, so a scan never reads as
   a shot (design §4.7: intel overlays are blue, the hit family coral/amber). */
.armadaone-cell.is-sweep--scan::before {
    box-shadow: inset 0 0 0 3px #85b7eb;
}

/* Reduced motion: the steps still change (no movement in that), but each ring appears in place. */
@media (prefers-reduced-motion: reduce) {
    .armadaone-cell.is-approach::before { animation: none; }
}

/* Middle layer: whole-hull ship sprites spanning their cells (rotated for vertical). */
.armadaone-ship {
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}
.armadaone-ship img { display: block; max-width: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.armadaone-ship--h img { width: 100%; height: auto; }
.armadaone-ship--v img { width: calc(var(--hull-len) * 100%); height: auto; transform: rotate(90deg); }

/* Top layer: hit / miss / sunk markers, above the ships. */
.armadaone-marker {
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.armadaone-marker img { width: 76%; height: 76%; object-fit: contain; }

/* A hit reads redder than the coral base sprite — closer to fire than salmon.
   Non-destructive recolor (keeps the starburst's shape + shading). */
.armadaone-marker--hit img { filter: saturate(2) hue-rotate(-20deg) brightness(0.9); }
/* Prime Assault's hit burst carries its own colours - no recolour filter. */
.armadaone-marker--hit.armadaone-marker--prime img { filter: none; }
/* A Prime sunk cell: the same burst inside the dark, red-bordered sunk square (operator mock 2026-10-22). */
.armadaone-marker--sunk.armadaone-marker--prime img { width: 86%; height: 86%; }

/* A miss reads clean white against the black void. */
.armadaone-marker--miss img { filter: brightness(0) invert(1); }

/* Sunk reads as scorched wreckage, not just another hit: a dark burn behind the
   cell, a coral glow ring, and a bigger smoking wreck. Kept clearly distinct from
   the bright standalone starburst of a not-yet-fatal hit. */
.armadaone-marker--sunk {
    background: radial-gradient(circle at center, rgba(120, 26, 12, 0.62) 0%, rgba(8, 4, 2, 0.82) 72%);
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px rgba(240, 120, 70, 0.85), 0 0 6px rgba(240, 120, 70, 0.45);
}
.armadaone-marker--sunk img {
    width: 94%;
    height: 94%;
    filter: drop-shadow(0 0 4px rgba(255, 140, 70, 0.9));
}

.armadaone-scan { color: #85b7eb; font-weight: 600; margin: 0; text-align: center; }
.armadaone-scan-result { color: #f5c451; font-weight: 700; }
.armadaone-scan-fade { color: #5f7bb0; font-weight: 400; font-size: 0.8rem; }

/* The outcome ledger (operator 2026-11-18): one box under the Attack / Bank / Fleet row - whose
   turn it is, then what the last moves did, a line each. Grew out of the old result line, so it
   keeps that line's navy and amber edge. */
.armadaone-ledger {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
    background: #0a0e1c;
    border: 1px solid rgba(245, 196, 81, 0.5);
    border-radius: 6px;
}
.armadaone-ledger p { margin: 0; }
/* Upper section: whose turn. Lower section, under a thin rule: what the last moves did. */
.armadaone-ledger-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(245, 196, 81, 0.3);
}
.armadaone-ledger-label { color: #fcfcfd; font-weight: 600; }
/* The picture for your last action, at text height: the board's own markers for a shot, the power's
   own glyph for a power (operator 2026-11-18). */
.armadaone-ledger-icon {
    width: 1.2em;
    height: 1.2em;
    object-fit: contain;
    vertical-align: -0.25em;
    margin-right: 0.3em;
}
/* The miss ring is drawn white on the board; the same here. */
.armadaone-ledger-icon--miss { filter: brightness(0) invert(1); }
.armadaone-ledger-turn { color: #cfe0f5; font-weight: 600; }
/* Your turn keeps the old banner's amber "go" accent - the words say it too, so colour is never the only cue. */
.armadaone-ledger-turn.is-active { color: #f5c451; }
.armadaone-ledger-notice { color: #bfeee8; font-weight: 600; }
.armadaone-ledger-result { color: #f5c451; font-weight: 700; }
/* Every Command Point award reads light green, with its reason (operator 2026-11-18: "it's clear to
   the player why and how much was given"). The same lime as the win banner. */
/* It may wrap: a turn can earn several awards - "+5 CP (Ship Sunk +1, Flagship Down +2, Comeback +1,
   Hot Streak +1)" - which no phone line holds. */
.armadaone-ledger-cp { color: #a3e635; }

/* ---- Deploy -------------------------------------------------------------- */

.armadaone-deploy { display: flex; flex-direction: column; gap: 0.75rem; }
.armadaone-deploy-message { color: #f0997b; font-weight: 600; margin: 0; }

.armadaone-deploy-tray { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }

.armadaone-ship-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.5rem 0.65rem;
    background: #12294f;
    border: 2px solid #22406e;
    border-radius: 8px;
    color: #cfe0f5;
    cursor: pointer;
    position: relative;
}
.armadaone-ship-chip.is-armed { border-color: #f5c451; box-shadow: 0 0 0 1px #f5c451; }
.armadaone-ship-chip.is-placed { opacity: 0.6; }
.armadaone-ship-chip-sprite { width: 100%; height: 1.5rem; object-fit: contain; object-position: left center; }
.armadaone-ship-chip-name { font-weight: 700; }
.armadaone-ship-chip-pips { letter-spacing: 2px; color: #9fc2ef; }
.armadaone-ship-chip-check { position: absolute; top: 0.35rem; right: 0.5rem; color: #f5c451; }

.armadaone-deploy-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Sound toggle -------------------------------------------------------- */

/* Sound toggle (design.md §11.7.4) - Haxopoly's round control, in the board's top-left corner
   square since 2026-11-18 (the ships-remaining row it sat in is gone). Sized to the 1.5rem label
   column - 24px, the minimum touch target. The glyph says on/off; the dimmed state is a second
   cue, never the only one. */
.armadaone-mute {
    appearance: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fcfcfd;
    border-radius: 999px;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
}
.armadaone-mute:hover { border-color: rgba(255, 255, 255, 0.6); }
.armadaone-mute.is-muted { opacity: 0.5; }

.armadaone-toggle { display: flex; gap: 0.5rem; align-items: stretch; }
.armadaone-toggle-btn {
    flex: 1;
    padding: 0.4rem;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
    color: #7ba9e6;
    cursor: pointer;
    font-weight: 600;
}
.armadaone-toggle-btn.is-active {
    background: #17233f;
    color: #fff;
    border-color: #4a7fd0;
    box-shadow: 0 0 0 1px #4a7fd0, 0 0 8px rgba(74, 127, 208, 0.35);
}

/* Illustrated tab glyphs (operator 2026-10-30), replacing the crossed-swords and shield emoji, which
   every device drew differently: a coral reticle for Attack, a shield with a ship for Fleet. Both
   events use them. Decorative - the button text carries the name. The inactive tab's glyph is
   dimmed a little so the active one leads. */
.armadaone-tab-glyph {
    width: 1.4em;
    height: 1.4em;
    vertical-align: -0.35em;
    margin-right: 0.35em;
}
.armadaone-toggle-btn:not(.is-active) .armadaone-tab-glyph { opacity: 0.7; }

/* The Command Bank tile between Attack and Fleet (operator 2026-09-24). Gold is the bank's own
   colour; the "n / 5" count says the balance in words, so the pips never carry it alone. */
.armadaone-banktile {
    flex: 0 0 auto;
    min-width: 8.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.75rem;
    background: #0a0e1c;
    border: 1px solid #f5c451;
    border-radius: 8px;
    color: #f5c451;
    font: inherit;
    line-height: 1.2;
}
.armadaone-banktile { cursor: pointer; }
.armadaone-banktile:hover:not(:disabled) { background: #17233f; box-shadow: 0 0 8px rgba(245, 196, 81, 0.35); }
.armadaone-banktile-pips { font-size: 1.05rem; letter-spacing: 3px; }
.armadaone-banktile-label { font-size: 0.75rem; font-weight: 600; white-space: nowrap; }

/* Says why the picker is read-only (off turn / empty / short) so a greyed row is never a mystery. */
.armadaone-modal-browsing { margin: 0; font-size: 0.85rem; color: #9fc2ef; line-height: 1.35; }

.armadaone-bank { color: #f5c451; font-weight: 700; letter-spacing: 2px; }

/* Power picker: a vertical list of rows so each power can carry its "what it does" blurb. */
.armadaone-powerdeck { display: flex; flex-direction: column; gap: 0.4rem; }

/* Power picker modal (operator 2026-07-25): floats the deck over the surface so it never pushes the
   grid off-screen on mobile. Scrim blocks the surface behind and does not dismiss on outside tap. */
.armadaone-modal-scrim {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(2, 4, 10, 0.72);
}
.armadaone-modal {
    width: 100%;
    max-width: 24rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 10px;
    padding: 0.9rem;
    box-shadow: 0 10px 44px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.armadaone-modal-head { display: flex; align-items: center; justify-content: space-between; }
.armadaone-modal-title { color: #cfe0f5; font-weight: 700; letter-spacing: 0.5px; }
.armadaone-modal-cancel { width: 100%; }

.armadaone-prompt-row { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.armadaone-cancel-power { padding: 0.3rem 0.75rem; }
.armadaone-launch-recon { padding: 0.3rem 0.9rem; }
.armadaone-power {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.7rem;
    text-align: left;
    width: 100%;
    padding: 0.6rem;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
    color: #85b7eb;
    cursor: pointer;
}
.armadaone-power:disabled { opacity: 0.4; cursor: not-allowed; }
.armadaone-power.is-armed { border-color: #f5c451; box-shadow: 0 0 0 1px #f5c451; }
.armadaone-power-glyph { width: 2rem; height: 2rem; object-fit: contain; flex-shrink: 0; margin-top: 0.05rem; }
.armadaone-power-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; min-width: 0; flex: 1; }
.armadaone-power-heading { display: flex; align-items: baseline; gap: 0.5rem; }
.armadaone-power-desc { font-size: 0.72rem; color: #7ba9e6; line-height: 1.3; }
.armadaone-power-name { font-weight: 600; }
.armadaone-power-cost { font-size: 0.75rem; color: #7ba9e6; }

/* ---- Buttons ------------------------------------------------------------- */

.armadaone-btn {
    padding: 0.5rem 0.9rem;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
    color: #cfe0f5;
    font-weight: 600;
    cursor: pointer;
}
.armadaone-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Fire / launch is the surface's amber command accent (matches the Command Bank + armed-power ring). */
.armadaone-btn--primary { background: #0a0e1c; border-color: #f5c451; color: #f5c451; }
.armadaone-fire { width: 100%; padding: 0.7rem; font-size: 1.05rem; }
.armadaone-fire:not(:disabled) { box-shadow: 0 0 10px rgba(245, 196, 81, 0.3); }
.armadaone-resign-row { display: flex; justify-content: center; }
.armadaone-actions { display: flex; gap: 0.5rem; }
/* Rematch and Match summary side by side on the resolved screen (doc 45 section 7). */
.armadaone-resolved-actions { display: flex; gap: 0.5rem; }
.armadaone-resolved-actions > .armadaone-btn { flex: 1 1 0; }
.armadaone-match-summary-btn { padding: 0.7rem; font-size: 1.05rem; border-color: #4a7fd0; }

/* ---- Banners / recap ----------------------------------------------------- */

.armadaone-banner {
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    color: #cfe0f5;
    text-align: center;
    font-weight: 600;
}
.armadaone-banner--win { background: #123a1e; color: #a3e635; }
.armadaone-banner--loss { background: #2c0f08; color: #f0997b; }

/* Abandonment claim — offered to the waiting player once the opponent has gone dark. */
.armadaone-abandon {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: #0a0e1c;
    border: 1px solid rgba(245, 196, 81, 0.5);
    border-radius: 6px;
}
.armadaone-abandon-note { color: #f5c451; font-weight: 600; text-align: center; }
.armadaone-abandon .armadaone-fire { width: auto; padding: 0.5rem 1.2rem; }

/* Dev-only Force End panel — dashed edge marks it as a testing affordance (never renders in prod). */
.armadaone-force-end {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    background: #0a0e1c;
    border: 1px dashed #4a7fd0;
    border-radius: 6px;
}
.armadaone-force-end-head { display: flex; align-items: center; gap: 0.5rem; }
.armadaone-force-end-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #0a0e1c;
    background: #4a7fd0;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}
.armadaone-force-end-title { color: #7ba9e6; font-weight: 600; font-size: 0.85rem; }
.armadaone-force-end-hint { color: #5f7bb0; font-size: 0.78rem; margin: 0; }
.armadaone-force-end-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.armadaone-dev-bank-head { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed #1a2440; }

.armadaone-recap, .armadaone-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr));
    gap: 0.5rem;
    margin: 0;
}
.armadaone-recap > div, .armadaone-stats-grid > div {
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
}
.armadaone-recap dt, .armadaone-stats-grid dt { font-size: 0.75rem; color: #7ba9e6; }
.armadaone-recap dd, .armadaone-stats-grid dd { margin: 0; font-size: 1.25rem; font-weight: 700; color: #cfe0f5; }

.armadaone-stats-empty, .armadaone-throwdown-preamble, .armadaone-event-card-description { color: #7ba9e6; }

/* ---- After-Action Report (operator 2026-07-25) --------------------------- */
/* A battle recap, not a stat dump: each ship shows its damage (intact hull / scarred but standing /
   wrecked), the powers spent, and a symmetrical Accuracy + CP pair. Both fleets reveal at the end —
   your column beside the opponent's — stacked on mobile, side-by-side once there's room. */

/* Widen the surface only for the resolved two-column view; live play stays the mobile 32rem column. */
.armadaone-play--resolved { max-width: 52rem; }

/* Two columns only when the PANEL fits two (operator 2026-11-28: a viewport breakpoint put two
   columns into a panel that shares its row with the Match thread, and the second spilled into
   it). A column needs ~21rem - the longest ship row (name, six segments, status) - so the grid
   wraps to one column below ~44rem of panel width, whatever the window is doing. */
.armadaone-aar-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 21.5rem), 1fr));
    gap: 1rem;
}
.armadaone-aar-col { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.armadaone-aar-col-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #7ba9e6;
}
.armadaone-aar-col-head.is-you { color: #cfe0f5; }
/* A long username wraps instead of pushing the column wider than its track. */
.armadaone-aar-col-head > span { min-width: 0; overflow-wrap: anywhere; }
/* "View grid" opens the ship-grid popup for that fleet. */
.armadaone-grid-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.6rem;
    background: #10182e;
    border: 1px solid #24345c;
    border-radius: 6px;
    color: #85b7eb;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    cursor: pointer;
}
.armadaone-grid-btn:hover { border-color: #4a7fd0; color: #cfe0f5; }

/* Ship-grid popup: wider than the power modal to fit the 7x7 board, with an X to close. */
.armadaone-grid-modal { max-width: 30rem; }
.armadaone-grid-modal-close {
    background: none;
    border: 0;
    color: #7ba9e6;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    cursor: pointer;
    border-radius: 4px;
}
.armadaone-grid-modal-close:hover { color: #cfe0f5; background: rgba(133, 183, 235, 0.15); }

.armadaone-aar-fleet { display: flex; flex-direction: column; gap: 0.4rem; }

.armadaone-aar-ship {
    display: grid;
    grid-template-columns: 5.25rem 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.6rem;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
}
.armadaone-aar-ship.is-sunk { opacity: 0.9; }
.armadaone-aar-ship-name { color: #cfe0f5; font-weight: 700; font-size: 0.88rem; }

.armadaone-aar-ship-cells { display: flex; gap: 3px; }
.armadaone-aar-seg {
    position: relative;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.armadaone-aar-seg img { object-fit: contain; }
/* Intact hull segment — clean steel-blue. */
.armadaone-aar-seg.is-intact { background: #9fc2ef; box-shadow: inset 0 0 0 1px rgba(207, 224, 245, 0.5); }
/* A hit that didn't sink her — red starburst on a scarred hull. */
.armadaone-aar-seg.is-hit { background: rgba(10, 16, 34, 0.55); box-shadow: inset 0 0 0 1px rgba(240, 120, 70, 0.6); }
.armadaone-aar-seg.is-hit img { width: 90%; height: 90%; filter: saturate(2) hue-rotate(-20deg) brightness(0.9); }
/* Sunk — the same scorched wreck as the attack grid. */
.armadaone-aar-seg.is-sunk {
    background: radial-gradient(circle at center, rgba(120, 26, 12, 0.62) 0%, rgba(8, 4, 2, 0.82) 72%);
    box-shadow: inset 0 0 0 1px rgba(240, 120, 70, 0.7);
}
.armadaone-aar-seg.is-sunk img { width: 94%; height: 94%; filter: drop-shadow(0 0 3px rgba(255, 140, 70, 0.9)); }

.armadaone-aar-ship-status { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; }
.armadaone-aar-ship.is-intact .armadaone-aar-ship-status { color: #7ba9e6; }
.armadaone-aar-ship.is-damaged .armadaone-aar-ship-status { color: #f5c451; }
.armadaone-aar-ship.is-sunk .armadaone-aar-ship-status { color: #f0997b; }

.armadaone-aar-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.5rem 0.6rem;
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
}
.armadaone-aar-label { color: #7ba9e6; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.armadaone-aar-empty { color: #7ba9e6; }

.armadaone-aar-powers { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.armadaone-aar-power {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem 0.3rem 0.4rem;
    background: #10182e;
    border: 1px solid #24345c;
    border-radius: 6px;
    color: #cfe0f5;
    font-size: 0.85rem;
}
.armadaone-aar-power .armadaone-power-glyph { width: 1.4rem; height: 1.4rem; margin: 0; }
.armadaone-aar-power-name { font-weight: 600; }

.armadaone-aar-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0;
}
.armadaone-aar-stats > div {
    background: #0a0e1c;
    border: 1px solid #1a2440;
    border-radius: 6px;
    padding: 0.55rem;
    text-align: center;
}
.armadaone-aar-stats dt { font-size: 0.75rem; color: #7ba9e6; }
.armadaone-aar-stats dd { margin: 0; font-size: 1.4rem; font-weight: 700; color: #cfe0f5; }

/* ---- Prime Assault (ArmadaPrime design; doc 43 stage 3) ---------------------------------------- */

/* Shaped hulls (D10 / D44): one illustrated sprite per ship, drawn in its horizontal form and
   spanning the ship's bounding box. Vertical turns it a quarter-turn clockwise - the turn ShipShape
   uses - so its squares land on the ship's cells. --w / --h are the horizontal form's size in cells. */
.armadaone-hullsprite { position: relative; z-index: 1; pointer-events: none; }
.armadaone-hullsprite img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: none;
    transform: translate(-50%, -50%);
}
.armadaone-hullsprite--h img { width: 100%; }
.armadaone-hullsprite--v img { width: calc(100% * var(--w) / var(--h)); transform: translate(-50%, -50%) rotate(90deg); }

/* Deploy tray chip for a shaped hull: its shape as dots. */
.armadaone-ship-chip-shape { display: grid; gap: 2px; height: 1.5rem; align-content: center; }
.armadaone-ship-chip-shape > span { width: 0.45rem; height: 0.45rem; border-radius: 2px; background: #9fc2ef; }

/* Blocked marker (D21): a teal shield, distinct in shape from the miss ring and the hit star. */
.armadaone-marker--blocked img { width: 70%; height: 70%; }

/* The viewer's own Shield while it stands, and the previews while aiming Shield / Warp Jump. A
   label always accompanies these (the prompt / result line) - colour is never the only signal. */
.armadaone-cell.is-shielded { box-shadow: inset 0 0 0 2px #5fd3c6; background-color: rgba(95, 211, 198, 0.16); }
.armadaone-cell.is-shield-preview { box-shadow: inset 0 0 0 3px #5fd3c6; background-color: rgba(95, 211, 198, 0.28); }
.armadaone-cell.is-jump-selected { box-shadow: inset 0 0 0 3px #f5c451; }
.armadaone-cell.is-jump-preview { box-shadow: inset 0 0 0 3px #5fd3c6; background-color: rgba(95, 211, 198, 0.3); }
.armadaone-cell.is-jump-preview.is-jump-invalid {
    box-shadow: inset 0 0 0 3px #f2997a;
    background: repeating-linear-gradient(45deg, rgba(242, 153, 122, 0.35) 0 4px, transparent 4px 8px);
}

/* The aiming notes. ("Enemy used Warp Jump." is a line in the outcome ledger since 2026-11-18.) */
.armadaone-targeting-note { margin: 0; color: #f2c3b0; text-align: center; font-weight: 600; }

/* End-of-game log of every power (D24). */
.armadaone-battlelog { display: flex; flex-direction: column; gap: 0.4rem; }
.armadaone-battlelog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.armadaone-battlelog-entry {
    display: grid;
    grid-template-columns: 4rem 1.5rem 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    background: #0a0e1c;
    border-radius: 6px;
    font-size: 0.85rem;
}
.armadaone-battlelog-entry.is-you { border-left: 3px solid #f5c451; }
.armadaone-battlelog-entry .armadaone-power-glyph { width: 1.5rem; height: 1.5rem; }
.armadaone-battlelog-turn { color: #7ba9e6; font-size: 0.75rem; font-weight: 700; }
