/* ===========================================================================
 * "Give advice" panel on the battle replay (/replay/{battleId})
 *
 * Loaded only on a replay the signed-in user played, or on any replay for an
 * admin — the template emits neither this file nor the panel otherwise — so
 * nothing here needs to defend against being on the page by accident.
 *
 * It borrows the player's material rather than inventing any: the same
 * --rail hairline, the same scheme-main-bis panel, the same tiny uppercase
 * section head as "What happened", the same ink-filled primary button the
 * transport spends on Play, and the same var(--mono) for everything the
 * machine measured. The only hues used are the four the page already has
 * (--hit, --mend, --ward, --win); a coach that arrived with its own palette
 * would read as a widget bolted to the page.
 * ------------------------------------------------------------------------- */

.rp-advice {
    /* Same measure as the written log: these are sentences, and a sentence that
       runs the width of a 1600px page is one you lose your place in. */
    margin: 18px auto 0;
    max-width: 900px;
}

.rp-adv-h {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 6px 2px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bulma-text-weak);
}

.rp-adv-sub {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.75;
}

.rp-adv {
    border: 1px solid var(--rail);
    border-radius: 10px;
    background: var(--bulma-scheme-main-bis);
    overflow: hidden;
}

/* The admin strip ----------------------------------------------------------
   Only rendered for an admin, and it has to read as a different kind of thing
   from the controls below it: this one reviews somebody else's play. So it gets
   its own band above the bar — the page's ward hue at a tint it uses elsewhere
   for readouts, a dashed rule rather than the solid hairline every other
   division on this page uses, and a mono badge. Nothing here is a boundary; the
   endpoints resolve the side from who is asking. */
.rp-adv-admin {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 8px 12px;
    border-bottom: 1px dashed var(--rail);
    background: hsl(var(--ward) / 0.07);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--bulma-text-weak);
}

.rp-adv-badge {
    flex: none;
    padding: 2px 6px;
    border: 1px solid hsl(var(--ward) / 0.55);
    border-radius: 5px;
    background: hsl(var(--ward) / 0.12);
    color: hsl(var(--ward));
    font-family: var(--mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* The sentence takes the slack, so the side picker stays beside the badge on a
   narrow panel instead of being pushed onto a line of its own. */
.rp-adv-admin-t {
    flex: 1 1 16rem;
    min-width: 0;
}

/* Same shape as the language picker — it is the same kind of control — but the
   key beside it is the one thing on this strip that names a player, so it may
   run as wide as the team names need. */
.rp-adv-side {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.rp-adv-side .rp-adv-sel { max-width: 16rem; }

/* "Auto · Advanced (Challenger, last season)" is the longest thing the level picker
   says, and it is the guess the reader is meant to check — so it is not clipped. */
.rp-adv-level .rp-adv-sel { max-width: 17rem; }

/* Controls ------------------------------------------------------------------
   One button and one language picker (and, above, an admin's side picker).
   There is deliberately no field: the prompt is built server-side from the
   replay, so the panel has nothing for a player to type into and never will. */
.rp-adv-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
}

/* The one strong control on the panel, in the page's own ink fill — the same
   treatment the transport gives Play, which is the only other primary action
   on this page. */
.rp-adv-go {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--bulma-text);
    border-radius: 8px;
    background: var(--bulma-text);
    color: var(--bulma-scheme-main);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.rp-adv-go:hover { opacity: 0.86; }
.rp-adv-go:focus-visible { outline: 2px solid hsl(var(--ward)); outline-offset: 2px; }

.rp-adv-go[disabled] {
    cursor: default;
    background: var(--bulma-scheme-main-bis);
    border-color: var(--rail);
    color: var(--bulma-text-weak);
    opacity: 1;
}

.rp-adv-lang {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: var(--bulma-text-weak);
}

.rp-adv-lang-k {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.62rem;
}

.rp-adv-sel {
    height: 30px;
    max-width: 12rem;
    padding: 0 6px;
    border: 1px solid var(--rail);
    border-radius: 8px;
    background: var(--bulma-scheme-main);
    color: var(--bulma-text);
    font-size: 0.78rem;
    font-family: inherit;
}

.rp-adv-sel:focus-visible { outline: 2px solid hsl(var(--ward)); outline-offset: 1px; }

/* "Written for · Beginner" under the coaching block's heading: quiet, because it
   is a fact about the review rather than part of it — and there at all so that a
   reader whose level was guessed wrong can see the guess. */
.rp-adv-for {
    margin: 2px 0 10px;
    font-size: 0.72rem;
    color: var(--bulma-text-weak);
}

.rp-adv-for-k {
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.62rem;
    margin-right: 6px;
}

/* What is going on, in words. This line is the whole progress indicator: a
   generation runs for minutes and nothing reports a percentage of it, so a bar
   here could only be decoration pretending to be information. The elapsed
   clock beside it is a fact. */
.rp-adv-status {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0;
    padding: 0 12px 11px;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--bulma-text-weak);
}

.rp-adv-note { margin: 0; min-width: 0; flex: 1 1 14rem; }

.rp-adv-clock {
    flex: none;
    font-family: var(--mono);
    font-size: 0.7rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

/* Running: a single pulsing dot in front of the sentence. It says "still
   working" without claiming to know how far along it is. */
.rp-advice[data-state="running"] .rp-adv-note::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-inline-end: 7px;
    border-radius: 50%;
    background: hsl(var(--ward));
    transform: translateY(-1px);
    animation: rp-adv-pulse 1.4s ease-in-out infinite;
}

@keyframes rp-adv-pulse {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 1; }
}

.rp-advice[data-state="error"] .rp-adv-note { color: hsl(var(--hit)); }
.rp-advice[data-state="ready"] .rp-adv-note { color: var(--bulma-text-weak); }
/* Out of reviews for the day: not an error — the sentence says when, the clock counts it down. */
.rp-advice[data-state="limit"] .rp-adv-note { color: hsl(var(--win)); }

/* "2 of 5 today · your reviews" — the allowance, quiet, at the end of the status line. */
.rp-adv-quota {
    flex: none;
    margin-inline-start: auto;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}

.rp-adv-quota[hidden] { display: none; }

.rp-adv-quota-a {
    margin-inline-start: 6px;
    color: inherit;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
}

.rp-adv-quota-a:hover { color: hsl(var(--ward)); }

/* The report ---------------------------------------------------------------
   Its own scroll, like every other panel on this page: the field, the tape and
   the log all stay put while their contents move, and a report that pushed the
   transport off the screen would break that agreement. */
.rp-adv-body {
    border-top: 1px solid var(--rail);
    padding: 12px 14px 14px;
    max-height: 52vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.rp-adv-sum {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--bulma-text);
}

.rp-adv-sh {
    margin: 16px 0 6px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--bulma-text-weak);
}

/* Key moments --------------------------------------------------------------
   Each one is a place in this battle, not a paragraph about it: the turn is the
   handle, and pressing it moves the player's cursor to the exact step the model
   quoted. */
.rp-adv-moments {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--rail);
    border-radius: 8px;
    background: var(--bulma-scheme-main);
    overflow: hidden;
}

.rp-adv-mo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-inline-start: 2px solid transparent;
}

.rp-adv-mo + .rp-adv-mo { border-top: 1px solid var(--rail); }

/* The moment the cursor was last sent to. Same mark the log and the history
   rail use for "you are here", so the three panels agree. */
.rp-adv-mo.is-now {
    border-inline-start-color: var(--bulma-text);
    background: var(--bulma-scheme-main-bis);
}

.rp-adv-jump {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 4.4rem;
    padding: 4px 6px;
    border: 1px solid var(--rail);
    border-radius: 7px;
    background: var(--bulma-scheme-main-bis);
    color: var(--bulma-text);
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rp-adv-jump:hover {
    border-color: var(--bulma-text-weak);
    background: var(--bulma-scheme-main-ter);
}

.rp-adv-jump:focus-visible { outline: 2px solid hsl(var(--ward)); outline-offset: 2px; }

.rp-adv-jump-s {
    font-size: 0.56rem;
    color: var(--bulma-text-weak);
    letter-spacing: 0.02em;
}

.rp-adv-mo-body { min-width: 0; }

.rp-adv-did {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--bulma-text);
}

/* The advice itself, in the hue the page already spends on things that help. */
.rp-adv-better {
    margin: 3px 0 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: hsl(var(--mend));
}

.rp-adv-why {
    margin: 3px 0 0;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--bulma-text-weak);
}

.rp-adv-k {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-inline-end: 5px;
}

.rp-adv-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rp-adv-li {
    position: relative;
    padding-inline-start: 14px;
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--bulma-text);
}

.rp-adv-li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: 0.62em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--bulma-text-weak);
    opacity: 0.55;
}

/* Two blocks, and the header that keeps them apart ------------------------
   The report holds two analyses written from two different vantages: coaching
   from the player's chair, against only what they could see, and a post-mortem
   with the fog lifted. Confusing the two is the one way this feature can do
   harm — "you should have known" — so each block opens by saying which one it
   is. The kick is the mono badge idiom the admin strip already uses; the
   sentence under it is not decoration, it is the disclaimer. */
.rp-adv-bh {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0 0 10px;
}

.rp-adv-kick {
    flex: none;
    padding: 2px 6px;
    border: 1px solid var(--rail);
    border-radius: 5px;
    background: var(--bulma-scheme-main);
    color: var(--bulma-text-weak);
    font-family: var(--mono);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Bigger than a section head and set in the humane face, so the two blocks
   read as the report's two halves and the headings inside them as parts. */
.rp-adv-bt {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bulma-text);
}

.rp-adv-bv {
    flex: 1 1 100%;
    margin: 1px 0 0;
    font-size: 0.71rem;
    line-height: 1.55;
    color: var(--bulma-text-weak);
}

/* The post-mortem ----------------------------------------------------------
   A panel within the panel, and dashed rather than solid: every other division
   on this page is a hairline, and the dashed frame is what the admin strip uses
   to say "a different kind of thing from the controls next to it". Same job
   here. It sits on scheme-main against the report's scheme-main-bis, so the
   seam is visible without a colour or a rule shouting about it. */
.rp-adv-pm {
    margin-top: 20px;
    padding: 12px 12px 14px;
    border: 1px dashed var(--rail);
    border-radius: 10px;
    background: var(--bulma-scheme-main);
}

/* The one inverted thing in the report. This badge says the block was written
   with information the reader did not have, which is the fact the whole design
   is organised around, so it gets the panel's strongest small treatment — the
   same ink fill the "Give advice" button wears — rather than a new hue. */
.rp-adv-pm .rp-adv-kick {
    border-color: var(--bulma-text);
    background: var(--bulma-text);
    color: var(--bulma-scheme-main);
}

/* The verdict --------------------------------------------------------------
   One word for how this battle went, given the weight of a conclusion: the
   largest type in the report, on its own card, with the reasoning under it.

   The hue is the page's own vocabulary and it reports something: --hit where the
   cause was the player or their build, --ward where it was outside both players'
   hands, --win where they won it. PLAYED_WELL_AND_LOST is deliberately plain
   INK — green would read as praise, and that verdict is a finding, not a prize;
   ink is what this page uses for a fact. UNDETERMINED goes weak, because it is
   an absence of a judgement rather than one. */
.rp-adv-vd {
    --vd: var(--bulma-text);
    margin-top: 11px;
    padding: 10px 12px;
    border: 1px solid var(--rail);
    border-radius: 8px;
    background: var(--bulma-scheme-main-bis);
    box-shadow: inset 3px 0 0 var(--vd);
}

.rp-adv-pm[data-verdict="OUTPLAYED"] .rp-adv-vd,
.rp-adv-pm[data-verdict="OUTBUILT"] .rp-adv-vd,
.rp-adv-pm[data-verdict="LOST_AT_SELECT"] .rp-adv-vd { --vd: hsl(var(--hit)); }

.rp-adv-pm[data-verdict="UNLUCKY"] .rp-adv-vd,
.rp-adv-pm[data-verdict="WON_BY_LUCK"] .rp-adv-vd { --vd: hsl(var(--ward)); }

.rp-adv-pm[data-verdict="WON_ON_MERIT"] .rp-adv-vd,
.rp-adv-pm[data-verdict="WON_DESPITE_MISPLAYS"] .rp-adv-vd { --vd: hsl(var(--win)); }

.rp-adv-pm[data-verdict="UNDETERMINED"] .rp-adv-vd { --vd: var(--bulma-text-weak); }

.rp-adv-vd-w {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--vd);
    overflow-wrap: break-word;
}

.rp-adv-vd-g {
    margin: 4px 0 0;
    font-size: 0.76rem;
    line-height: 1.55;
    color: var(--bulma-text-weak);
}

/* Winnability, and the moment it went. A different question from the verdict —
   not how it went but whether the outcome was ever in the player's hands — so
   it keeps its own line under the verdict rather than folding into it. The pair
   is the point: "you played well" beside "winnable throughout" is the honest,
   uncomfortable reading this block exists to be able to give. */
.rp-adv-win {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 9px;
    padding-top: 9px;
    padding-inline-start: 8px;
    border-top: 1px solid var(--rail);
    /* Room for the "you are here" mark kept whether or not it is showing, so
       pressing the jump does not nudge the line sideways. */
    border-inline-start: 2px solid transparent;
}

.rp-adv-win.is-now { border-inline-start-color: var(--bulma-text); }

.rp-adv-win-k {
    flex: none;
    font-family: var(--mono);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bulma-text-weak);
}

.rp-adv-win-v {
    flex: 1 1 12rem;
    min-width: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--bulma-text);
    overflow-wrap: break-word;
}

/* The winnability line is a reading rather than a reported fact, and this says
   so. Same weak ink as the verdict's gloss, indented to sit under the line it
   qualifies rather than under the card. */
.rp-adv-win-note {
    margin-top: 6px;
    padding-inline-start: 10px;
}

.rp-adv-pm-p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.62;
    color: var(--bulma-text);
    overflow-wrap: break-word;
}

/* Missing, and said quietly. The second reading is optional: when it fails the
   coaching above is still the whole report, so this is a note about what is not
   here — not an error, and not the reader's to retry. Never the --hit hue. */
.rp-adv-pm--none { opacity: 0.9; }

/* And the badge goes back to a hairline: the ink fill is there to draw the eye
   to a block written with information the reader did not have, and there is no
   such block here. */
.rp-adv-pm--none .rp-adv-kick {
    border-color: var(--rail);
    background: var(--bulma-scheme-main);
    color: var(--bulma-text-weak);
}

.rp-adv-pm-note {
    margin: 10px 0 0;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--bulma-text-weak);
}

.rp-adv-pm-why {
    margin: 3px 0 0;
    font-family: var(--mono);
    font-size: 0.62rem;
    line-height: 1.5;
    color: var(--bulma-text-weak);
    opacity: 0.8;
    overflow-wrap: break-word;
}

/* What a block is about ----------------------------------------------------
   The axies and cards the model named, shown with the art the page already has:
   the battlefield's own render for an axie, the hand's own face for a card.
   Three axies on one team commonly share a name, so a picture says which one is
   meant where a name cannot.

   Round for an axie, cornered for a card — the same distinction the field and
   the hand draw — so two chips carrying the same string are still two different
   things. A name the page cannot resolve keeps its chip and loses its picture;
   there is no state in which a broken image appears. */
.rp-adv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.rp-adv-chips--pm { margin-top: 11px; align-items: center; }

/* The key on the post-mortem's row, in the same mono voice as the winnability
   line above it, so the two readouts under the verdict read as a pair. */
.rp-adv-chips-k { align-self: center; }

.rp-adv-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding: 3px 9px 3px 3px;
    border: 1px solid var(--rail);
    border-radius: 999px;
    background: var(--bulma-scheme-main-bis);
}

.rp-adv-chip--card { border-radius: 7px; }
.rp-adv-chip.is-plain { padding-inline-start: 9px; }

.rp-adv-chip-n {
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--bulma-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The render is 512x384 with the axie small and centred in transparent margin,
   so it is fitted and then blown up about the centre, exactly as the history
   rail does it — a transform rather than an oversized box, because the site sets
   img { max-width: 100% } globally and would clamp the box. */
.rp-adv-face--axie {
    position: relative;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--cls, #8b8b9c);
    background: color-mix(in srgb, var(--cls, #8b8b9c) 22%, var(--bulma-scheme-main));
    overflow: hidden;
}

.rp-adv-face--axie img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    transform: scale(1.9);
}

/* The site's class colours again, for the ring. Third copy on this page (the
   field and the history rail each carry one) because each is scoped to the
   element that wears it rather than to a shared ancestor. */
.rp-adv-face--axie[data-class="0"]  { --cls: #f0921f; }
.rp-adv-face--axie[data-class="1"]  { --cls: #ff5f42; }
.rp-adv-face--axie[data-class="2"]  { --cls: #ff6fa5; }
.rp-adv-face--axie[data-class="3"]  { --cls: #63b900; }
.rp-adv-face--axie[data-class="4"]  { --cls: #00b7d4; }
.rp-adv-face--axie[data-class="5"]  { --cls: #b06fe0; }
.rp-adv-face--axie[data-class="8"]  { --cls: #8598a0; }
.rp-adv-face--axie[data-class="9"]  { --cls: #b79bf0; }
.rp-adv-face--axie[data-class="10"] { --cls: #2b7f92; }

.rp-adv-face--card {
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 5px;
    border: 1px solid var(--rail);
    background: var(--bulma-scheme-main);
    object-fit: cover;
}

/* An axie named inside a sentence ---------------------------------------------
   The model brackets every axie label it writes and the server keeps only real
   ones (MarkedProse). An axie's name is its owner's own words — "Y", "Fire And
   Ice", "Life is good" — and set into a Russian or Japanese sentence it reads as
   part of the sentence, so the panel draws the axie instead (owner, 2026-11-02):
   a pill with the log's own round portrait (.rp-hist-who, from
   REPLAY_MODEL.axieChip) and the axie's id, its name on hover, as a button —
   hover lights the axie on the board as a card does, a press brings the board
   into view and keeps it lit (replay.js, "an axie picked from outside the
   board"). The pill's edge says the team (below); the portrait's ring, the class.

   Sized in em so it sits in the line at any text size; unbreakable, because a
   badge split across two lines reads as two. */
.rp-adv-ax {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
    margin: -0.15em 1px 0;
    padding: 1px 7px 1px 1px;
    border: 1px solid color-mix(in srgb, var(--cls, #8b8b9c) 55%, var(--rail));
    border-radius: 999px;
    background: color-mix(in srgb, var(--cls, #8b8b9c) 10%, var(--bulma-scheme-main-bis));
    color: var(--bulma-text-strong, var(--bulma-text));
    font: inherit;
    font-family: var(--mono);
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color var(--ease-state, 0.15s ease), background var(--ease-state, 0.15s ease);
}

.rp-adv-ax .rp-hist-who { --chip: 1.75em; border-width: 1.5px; }

.rp-adv-ax:hover,
.rp-adv-ax:focus-visible {
    border-color: var(--cls, #8b8b9c);
    background: color-mix(in srgb, var(--cls, #8b8b9c) 22%, var(--bulma-scheme-main-bis));
    outline: none;
}

/* Whose axie it is (owner, 2026-11-02: "green or red border"): green for the
   coached side — the "you" of every sentence — red for the opponent, in the
   page's own heal and damage hues so both themes keep their contrast. The
   portrait's ring inside still says the class. A badge whose side is not known
   keeps the class-coloured edge above. */
.rp-adv-ax.is-yours {
    border: 1.5px solid hsl(var(--mend));
    background: hsl(var(--mend) / 0.12);
}

.rp-adv-ax.is-theirs {
    border: 1.5px solid hsl(var(--hit));
    background: hsl(var(--hit) / 0.12);
}

.rp-adv-ax.is-yours:hover,
.rp-adv-ax.is-yours:focus-visible { border-color: hsl(var(--mend)); background: hsl(var(--mend) / 0.24); }

.rp-adv-ax.is-theirs:hover,
.rp-adv-ax.is-theirs:focus-visible { border-color: hsl(var(--hit)); background: hsl(var(--hit) / 0.24); }

@media (prefers-reduced-motion: reduce) {
    .rp-adv-ax { transition: none; }
}

/* A card, status, rune or charm named inside a sentence ----------------------
   Its own art in front of its name (termChip; owner, 2026-11-02): the card's
   face, the status's icon, the rune's gem, the charm's art, as the log and the
   board draw them. Quieter than an axie's badge on purpose — these are the
   game's vocabulary and a paragraph can hold a dozen, where an axie is a
   subject — so a hairline pill, the name in the sentence's own weight. A status
   chip takes the page's status panel on hover and focus. */
.rp-adv-term {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: baseline;
    margin: 0 1px;
    padding: 0 4px 0 2px;
    border: 1px solid var(--rail);
    border-radius: 5px;
    background: var(--bulma-scheme-main-bis);
    line-height: 1.35;
    white-space: nowrap;
}

.rp-adv-term.is-plain { padding-inline-start: 4px; }

.rp-adv-term-i {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    object-fit: contain;
    align-self: center;
}

/* A card face is a picture, not a glyph: cropped to fill, with a corner. */
.rp-adv-term-i.is-face { object-fit: cover; border-radius: 3px; }

.rp-adv-term[tabindex] { cursor: help; }
.rp-adv-term[tabindex]:focus-visible { outline: 2px solid var(--bulma-link, #485fc7); outline-offset: 1px; }

/* An amount in a sentence: the log's own chip (.rp-lg-amt — bold number, unit
   icon after it, the shield in its hue), with the HP heart told apart the way a
   reader of the log tells it apart by its row — red for damage, green for
   healing. No tooltip, so no help cursor: the words around it say what it is. */
.rp-adv-amt { cursor: inherit; margin-inline: 0.1em; }
.rp-adv-amt--dmg { color: hsl(var(--hit)); }
.rp-adv-amt--heal { color: hsl(var(--mend)); }
.rp-adv-amt--shield .rp-adv-amt-n { color: hsl(var(--ward)); }

/* A step or a turn the review cites: a link into the replay, the key moments'
   jump in sentence size — a play glyph and the replay's own number. */
.rp-adv-at {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: baseline;
    margin: 0 1px;
    padding: 0 5px;
    border: 1px solid var(--rail);
    border-radius: 5px;
    background: var(--bulma-scheme-main-bis);
    color: var(--bulma-link, #485fc7);
    font: inherit;
    font-family: var(--mono);
    font-size: 0.82em;
    font-weight: 600;
    line-height: 1.45;
    white-space: nowrap;
    cursor: pointer;
}

.rp-adv-at i { font-size: 0.72em; }
.rp-adv-at-t { color: var(--bulma-text-strong, var(--bulma-text)); }
.rp-adv-at-sep { opacity: 0.5; }
.rp-adv-at--step .rp-adv-at-n { font-weight: 500; }
.rp-adv-at:hover, .rp-adv-at:focus-visible { border-color: currentColor; outline: none; }

/* The same badge in a row of chips (what a moment or the post-mortem is
   about): sized to the chips beside it — a 24px portrait, the chip's own
   padding and text size — rather than to a line of prose. */
.rp-adv-ax.is-about {
    margin: 0;
    padding: 3px 9px 3px 3px;
    font-size: 0.7rem;
    vertical-align: middle;
}

.rp-adv-ax.is-about .rp-hist-who { --chip: 24px; border-width: 2px; }

.rp-adv-chip[data-term-card] { cursor: help; }
.rp-adv-chip[data-term-card]:focus-visible { outline: 2px solid var(--bulma-link, #485fc7); outline-offset: 1px; }

/* A label that resolves to no single fighter with a picture keeps its name, in
   a pill — never the wrong axie's face. The dot is the class colour when the
   fighter is known; unbreakable, because a name split across two lines reads
   as two names. */
.rp-adv-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 1px;
    padding: 0 6px;
    border: 1px solid var(--rail);
    border-radius: 999px;
    background: var(--bulma-scheme-main-bis);
    color: var(--bulma-text-strong, var(--bulma-text));
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: baseline;
    unicode-bidi: isolate;
}

.rp-adv-name[data-class]::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--cls, #8b8b9c);
}

.rp-adv-name[data-class="0"]  { --cls: #f0921f; }
.rp-adv-name[data-class="1"]  { --cls: #ff5f42; }
.rp-adv-name[data-class="2"]  { --cls: #ff6fa5; }
.rp-adv-name[data-class="3"]  { --cls: #63b900; }
.rp-adv-name[data-class="4"]  { --cls: #00b7d4; }
.rp-adv-name[data-class="5"]  { --cls: #b06fe0; }
.rp-adv-name[data-class="8"]  { --cls: #8598a0; }
.rp-adv-name[data-class="9"]  { --cls: #b79bf0; }
.rp-adv-name[data-class="10"] { --cls: #2b7f92; }

/* An admin's reviews ---------------------------------------------------------
   Every stored review of this side and language, one chip each, and "Another
   review". The same ward tint and dashed rule as the admin strip above, because
   it is the same kind of thing: an operator's control, not a reader's. A chip is
   numbered in the order the reviews were written and named by its model — the
   model is the point of comparing them — and the one players are shown carries a
   small "players" key. The chip being read is pressed. */
.rp-adv-takes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 12px;
    border-top: 1px dashed var(--rail);
    background: hsl(var(--ward) / 0.05);
    font-size: 0.72rem;
    color: var(--bulma-text-weak);
}

.rp-adv-takes[hidden] { display: none; }

.rp-adv-takes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.rp-adv-take {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding: 3px 9px;
    border: 1px solid var(--rail);
    border-radius: 7px;
    background: var(--bulma-scheme-main);
    color: var(--bulma-text);
    font-family: var(--mono);
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.rp-adv-take:hover { border-color: hsl(var(--ward) / 0.6); }
.rp-adv-take:focus-visible { outline: 2px solid hsl(var(--ward)); outline-offset: 1px; }

.rp-adv-take[aria-pressed="true"] {
    border-color: hsl(var(--ward));
    background: hsl(var(--ward) / 0.14);
}

.rp-adv-take.is-stale { opacity: 0.72; }

.rp-adv-take.is-pending {
    cursor: default;
    border-style: dashed;
    color: var(--bulma-text-weak);
}

.rp-adv-take-n { font-weight: 700; }

.rp-adv-take-m {
    min-width: 0;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-adv-take-t { color: var(--bulma-text-weak); }

.rp-adv-take-k {
    padding: 0 4px;
    border-radius: 4px;
    background: hsl(var(--win) / 0.16);
    color: hsl(var(--win));
    font-size: 0.56rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rp-adv-take-k.is-stale {
    background: hsl(var(--hit) / 0.12);
    color: hsl(var(--hit));
}

.rp-adv-another {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid hsl(var(--ward) / 0.55);
    border-radius: 7px;
    background: transparent;
    color: hsl(var(--ward));
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}

.rp-adv-another[hidden] { display: none; }
.rp-adv-another:hover { background: hsl(var(--ward) / 0.1); }
.rp-adv-another:focus-visible { outline: 2px solid hsl(var(--ward)); outline-offset: 1px; }
.rp-adv-another[disabled] { cursor: default; opacity: 0.5; background: transparent; }

.rp-adv-takes-note {
    flex: 1 1 100%;
    margin: 0;
    line-height: 1.5;
}

.rp-adv-takes-note:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
    .rp-adv-take { transition: none; }
}

/* Which model wrote this report — only ever drawn on an operator's panel, since
   the model reaches the page on an operator's answer alone. */
.rp-adv-by {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0 0 10px;
    font-size: 0.7rem;
    color: var(--bulma-text-weak);
}

.rp-adv-by-m {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--bulma-text);
}

.rp-adv-by-t {
    font-family: var(--mono);
    font-size: 0.64rem;
}

/* Who wrote it and when. A generated report is machine output and says so. */
.rp-adv-foot {
    margin: 14px 0 0;
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--bulma-text-weak);
    opacity: 0.75;
}

/* Locked -------------------------------------------------------------------
   The same shape as the panel's normal contents: this is a section of a battle
   page, not a landing pad, so it does not grow a banner.

   (There is no separate "not configured" block. That state is the ordinary
   panel with a disabled button and a quiet status line, so a report generated
   before the key went away is still readable.) */
.rp-adv-lock {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
}

.rp-adv-lock .premium-lock { flex: none; margin-top: 2px; }

.rp-adv-lock-t {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--bulma-text);
}

.rp-adv-lock-b {
    margin: 3px 0 0;
    font-size: 0.78rem;
    line-height: 1.6;
    color: var(--bulma-text-weak);
}

/* Narrow ------------------------------------------------------------------- */
@media (max-width: 720px) {
    /* The bar stacks rather than squeezing: a 34px button beside a select beside
       a sentence is three things competing for 320px. */
    .rp-adv-bar { gap: 8px; }
    .rp-adv-go { flex: 1 1 auto; justify-content: center; }
    .rp-adv-lang { flex: 1 1 auto; justify-content: flex-end; }
    .rp-adv-body { max-height: 60vh; }
    .rp-adv-mo { gap: 8px; padding: 9px 8px; }
    .rp-adv-jump { min-width: 4rem; }
    /* The post-mortem keeps its frame at every width — it is what says the block
       is a different kind of thing — and only gives up padding. */
    .rp-adv-pm { padding: 11px 10px 12px; }
    .rp-adv-vd { padding: 9px 10px; }
    .rp-adv-vd-w { font-size: 0.96rem; }
    /* A card name can run long, and a chip that is wider than the phone is a
       panel that scrolls sideways. The name ellipses; the row wraps. */
    .rp-adv-chip-n { max-width: 11rem; }
    .rp-adv-win { gap: 4px 7px; }
    .rp-adv-win-v { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .rp-adv-go, .rp-adv-jump { transition: none; }
    .rp-advice[data-state="running"] .rp-adv-note::before { animation: none; opacity: 0.9; }
}
