/* blazehilo.css — 🃏 Higher & Lower.
 *
 * Modeled on blazecrash.css: same dark-panel, gold-glow, Comic-Sans identity,
 * and self-sufficient on purpose — nav.css is the only other stylesheet this
 * page links, so the .viewer-info-btn / .viewer-modal-* "how it works" block
 * and the footer/trust-strip rules are copied here rather than shared.
 *
 * nav.css CONSUMES --navbar-bg, --glow, --c-gold and --c-orange from the page's
 * own stylesheet (it carries a fallback since 1203b4f, but the brand colours
 * belong to the page). Declared first, below, as on every sibling.
 *
 * THE TABLE'S MOTION CONTRACT. The one place this page spends its boldness is
 * the FELT — a green card-table oval behind the cards, unique to this game the
 * way the wheel owns its wheel and crash owns its sky. Cards flip with a CSS
 * transform driven by blazehilo.js, and a flip NEVER starts before the chain
 * has published the card it lands on (the Shown/Rung event) — the animation is
 * the proof, not a prediction. Under prefers-reduced-motion cards just appear.
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --nav-h: 80px;
    --touch: 44px;

    /* The four tokens nav.css needs. Do not remove. */
    --navbar-bg: rgba(0, 0, 0, 0.95);
    --glow: 0 0 10px rgba(255, 69, 0, 0.7);
    --c-gold: #ffcf48;
    --c-orange: orange;

    --c-red: #ff4500;
    --c-green: #2ecc71;
    --c-felt: #1c6b40;        /* the table */
    --c-felt-deep: #0d3b22;

    /* TEXT CONTRAST — the same two solid warm neutrals as the casino siblings. */
    --c-soft: #f2ece0;
    --c-dim: #ded6c6;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body, "Comic Sans MS", system-ui, sans-serif);
    /* Same art treatment as wheel/plinko/dice/crash — the house sky. */
    background: url('images/BlazeitBG.png') no-repeat center center;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    background-color: #b0e8f7;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    padding-top: calc(var(--nav-h) + 24px);
}

@media screen and (max-width: 768px) {
    body { padding-top: calc(var(--nav-h) + 16px); }
}

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: #000; color: var(--c-gold); padding: 10px 16px; z-index: 3000;
}
.skip-link:focus { left: 8px; top: calc(var(--nav-h) + 8px); }

main.container {
    flex: 1 1 auto;
    width: min(1500px, 96vw);
    margin: 0 auto 24px;
    padding: 18px;
    background: rgba(0, 0, 20, 0.75);
    border-radius: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.6fr) minmax(260px, 1fr);
    gap: 18px;
    align-items: start;
}

.info-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.info-panel h3, .info-panel h2 { text-align: center; }
.game-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }

@media screen and (max-width: 1100px) {
    main.container { grid-template-columns: 1fr; }
    /* Spine first on a phone: the table and the buttons above the fold. */
    .game-panel { order: -1; }
}

.stats {
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 207, 72, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--glow);
    width: 100%;
    color: var(--c-soft);
}
.stats h3, .stats h2 { margin: 0 0 10px; color: var(--c-gold); font-size: 1.05rem; }
.stats p { margin: 6px 0; font-size: 0.95rem; line-height: 1.45; }

.hl-mode-note {
    margin-top: 10px;
    padding: 8px 10px;
    border-left: 3px solid var(--c-orange);
    border-radius: 6px;
    background: rgba(255, 140, 0, 0.09);
}

.title {
    margin: 0;
    color: var(--c-gold);
    text-shadow: 0 0 12px rgba(255, 69, 0, 0.8);
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    text-align: center;
}
.tagline { margin: 0; color: var(--c-dim); text-align: center; }

.hl-banner {
    width: 100%;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: bold;
    text-align: center;
}
.hl-banner-warn { background: rgba(255, 69, 0, 0.18); border: 1px solid var(--c-red); color: #ffd9c9; }

/* ============================ THE FELT ============================ */
/* The one bold move on this page. An oval of casino felt with a gold rim;
   everything the game says lands on it. */
.hl-table {
    width: 100%;
    border-radius: 50% / 22%;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.10), transparent 60%),
        radial-gradient(ellipse at center, var(--c-felt) 0%, var(--c-felt-deep) 85%);
    border: 6px solid #6b4a12;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(255, 207, 72, 0.35);
    padding: 26px 18px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* The cards row: previous card (small, dimmed) → THE card → face-down next. */
.hl-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 170px;
}

.hl-card {
    width: 110px;
    height: 158px;
    border-radius: 12px;
    perspective: 700px;
    position: relative;
}
.hl-card-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1.1);
}
.hl-card.is-facedown .hl-card-inner { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) {
    .hl-card-inner { transition: none; }
}

.hl-card-face, .hl-card-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hl-card-face {
    background: #fdf8ec;
    color: #1a1a1a;
    border: 2px solid #d8cfae;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.hl-card-back {
    transform: rotateY(180deg);
    background:
        repeating-linear-gradient(45deg, rgba(255, 207, 72, 0.25) 0 8px, transparent 8px 16px),
        linear-gradient(160deg, #7a1f10, #3d0d06);
    border: 2px solid var(--c-gold);
    color: var(--c-gold);
    font-size: 2rem;
}

.hl-card-rank { font-size: 3.1rem; font-weight: bold; line-height: 1; }
.hl-card-suit { font-size: 1.6rem; margin-top: 6px; }

/* The smaller "previous card" ghost. */
.hl-card.hl-card-prev { width: 74px; height: 106px; opacity: 0.55; }
.hl-card.hl-card-prev .hl-card-rank { font-size: 2rem; }
.hl-card.hl-card-prev .hl-card-suit { font-size: 1.1rem; margin-top: 3px; }

/* Outcome pop on the middle card. */
.hl-card.hl-win .hl-card-face { box-shadow: 0 0 22px var(--c-green); border-color: var(--c-green); }
.hl-card.hl-bust .hl-card-face { box-shadow: 0 0 22px var(--c-red); border-color: var(--c-red); }
.hl-card.hl-push .hl-card-face { box-shadow: 0 0 22px var(--c-gold); border-color: var(--c-gold); }

/* Status line on the felt — the accessible narration of the table. */
.hl-readout {
    margin: 0;
    text-align: center;
    color: #eafff2;
    font-weight: bold;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    min-height: 1.4em;
}

/* The banked bar: what walking away pays RIGHT NOW. */
.hl-bank {
    display: flex;
    align-items: baseline;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 207, 72, 0.45);
    border-radius: 999px;
    padding: 6px 18px;
}
.hl-bank-label { color: var(--c-dim); font-size: 0.85rem; }
.hl-bank-amount { color: var(--c-gold); font-weight: bold; font-size: 1.15rem; }

/* ====================== HIGHER / LOWER buttons ===================== */
.hl-guess-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    max-width: 560px;
}
.hl-guess-btn {
    min-height: 74px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    font-size: 1.05rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hl-guess-btn:not(:disabled):hover { transform: translateY(-2px); }
.hl-guess-btn:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.hl-guess-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.hl-btn-higher { background: linear-gradient(180deg, #1d8a4e, #0f5530); box-shadow: 0 0 12px rgba(46, 204, 113, 0.5); }
.hl-btn-lower  { background: linear-gradient(180deg, #b3341c, #6e1c0d); box-shadow: 0 0 12px rgba(255, 69, 0, 0.5); }
.hl-guess-odds { font-weight: normal; font-size: 0.82rem; color: rgba(255, 255, 255, 0.9); }

/* The FREE RUNG / warning ribbons on a guess button. */
.hl-guess-tag { font-size: 0.78rem; font-weight: bold; }
.hl-guess-tag.free { color: #b6ffce; }
.hl-guess-tag.warn { color: #ffd9a0; }

/* Cash out — the golden door. */
.hl-cashout-btn {
    width: 100%;
    max-width: 560px;
    min-height: var(--touch);
    border-radius: 12px;
    border: 2px solid var(--c-gold);
    background: linear-gradient(180deg, #8a6d1d, #55420f);
    color: #fff7dd;
    font-family: inherit;
    font-weight: bold;
    font-size: 1.02rem;
    cursor: pointer;
    padding: 10px;
}
.hl-cashout-btn:not(:disabled):hover { box-shadow: 0 0 14px rgba(255, 207, 72, 0.7); }
.hl-cashout-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hl-cashout-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ========================= The ladder rail ========================= */
/* Rungs climbed this session, as chips. Data comes straight from events. */
.hl-ladder {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 560px;
}
.hl-rung-chip {
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid var(--c-green);
    color: #c9ffdf;
}
.hl-rung-chip.push { background: rgba(255, 207, 72, 0.14); border-color: var(--c-gold); color: #ffedb0; }

/* ============================ The console ========================== */
.hl-console { display: flex; flex-direction: column; gap: 8px; }
.hl-budget-line, .hl-bet-summary, .hl-odds-line, .hl-payout-preview { margin: 0; }
.hl-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.hl-step { margin: 0; color: var(--c-dim); font-size: 0.85rem; }
.hl-hint { margin: 0; color: var(--c-dim); font-size: 0.9rem; text-align: center; }
.hl-tx-status { margin: 4px 0 0; min-height: 1.2em; text-align: center; }
.hl-tx-link { margin: 0; text-align: center; }
.hl-tx-link a { color: var(--c-gold); }

.wallet-btn {
    min-height: var(--touch);
    min-width: 220px;
    border-radius: 12px;
    border: 2px solid var(--c-orange);
    background: linear-gradient(180deg, #b3341c, #7a1f10);
    color: #fff;
    font-family: inherit;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px 18px;
}
.wallet-btn:not(:disabled):hover { box-shadow: 0 0 14px rgba(255, 140, 0, 0.8); }
.wallet-btn:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.wallet-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hl-reclaim-btn { border-color: var(--c-gold); background: linear-gradient(180deg, #6b5410, #423408); }

/* Stake input + chips (house shape). */
.hl-amount input, .stats input[type="text"] {
    width: 100%;
    min-height: var(--touch);
    border-radius: 10px;
    border: 1px solid rgba(255, 207, 72, 0.5);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    padding: 8px 12px;
    text-align: center;
}
.hl-amount input:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 1px; }

.hl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; justify-content: center; }
.hl-chip, .hl-budget-chip {
    min-height: var(--touch, 44px);
    min-width: var(--touch, 44px);
    border-radius: 999px;
    border: 1px solid rgba(255, 207, 72, 0.6);
    background: rgba(0, 0, 0, 0.55);
    color: var(--c-soft);
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    padding: 6px 14px;
}
.hl-chip:hover, .hl-budget-chip:hover { background: rgba(255, 207, 72, 0.18); }
.hl-chip:focus-visible, .hl-budget-chip:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
.hl-budget-chip[aria-pressed="true"] { background: rgba(255, 207, 72, 0.3); color: #fff; }
.hl-allin-chip { border-color: var(--c-red); }
.hl-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.hl-limits { margin: 8px 0 0; color: var(--c-dim); font-size: 0.85rem; text-align: center; }
.hl-amount-error { margin: 6px 0 0; color: #ffb4a0; font-weight: bold; text-align: center; }
.hl-group-label { margin: 0 0 4px; color: var(--c-dim); font-size: 0.88rem; }
.hl-budget-note { margin: 8px 0 0; color: var(--c-dim); font-size: 0.85rem; text-align: center; }

/* Game info list + odds table. */
.hl-info-label { margin: 10px 0 4px; color: var(--c-gold); font-weight: bold; }
.hl-info-list { margin: 0; padding-left: 18px; }
.hl-info-list li { margin: 3px 0; font-size: 0.9rem; }
.hl-odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.hl-odds-table th, .hl-odds-table td {
    padding: 3px 6px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 207, 72, 0.15);
}
.hl-odds-table th { color: var(--c-gold); }
.hl-odds-scroll { overflow-x: auto; }
.hl-verify-head { margin: 12px 0 4px; color: var(--c-gold); font-weight: bold; }
.hl-verify-note { color: var(--c-dim); font-size: 0.85rem; }
.contract-link { color: var(--c-gold); }

/* Result banner + quote. */
.hl-result {
    width: 100%;
    max-width: 560px;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
    font-weight: bold;
}
.hl-result[data-kind="win"] { background: rgba(46, 204, 113, 0.16); border: 1px solid var(--c-green); color: #c9ffdf; }
.hl-result[data-kind="push"] { background: rgba(255, 207, 72, 0.14); border: 1px solid var(--c-gold); color: #ffedb0; }
.hl-result[data-kind="bust"] { background: rgba(255, 69, 0, 0.16); border: 1px solid var(--c-red); color: #ffd9c9; }
.hl-result[data-kind="cash"] { background: rgba(255, 207, 72, 0.18); border: 1px solid var(--c-gold); color: #fff3c9; }
.hl-result[data-kind="reclaim"] { background: rgba(176, 232, 247, 0.14); border: 1px solid #8fd8f0; color: #d9f4fd; }
.hl-quote { margin: 0; color: var(--c-dim); font-style: italic; text-align: center; min-height: 1.2em; }

/* THE MAXED BOX — somebody topped the whole ladder (~1 in 553). Louder than
   any ordinary banner, dismissible, and only ever written from real numbers. */
.hl-maxed {
    width: 100%;
    max-width: 560px;
    border: 3px double var(--c-gold);
    border-radius: 14px;
    background:
        radial-gradient(ellipse at top, rgba(255, 207, 72, 0.25), transparent 70%),
        rgba(0, 0, 0, 0.82);
    padding: 16px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 26px rgba(255, 207, 72, 0.6);
}
.hl-maxed-title { margin: 0; color: var(--c-gold); font-size: 1.2rem; font-weight: bold; }
.hl-maxed-sub { margin: 6px 0 0; color: var(--c-soft); }
.hl-maxed-pop { margin: 8px 0 0; font-size: 1.3rem; }
.hl-maxed-close {
    position: absolute; top: 6px; right: 8px;
    background: none; border: none; color: var(--c-dim);
    font-size: 1rem; cursor: pointer; min-width: var(--touch); min-height: 32px;
}

/* Stat rows: label recedes (small, uppercase, dim), the value — always the
   span[id] the scripts write into — goes big, bold, gold, tabular. Copied
   from blazecrash.css so the rails read like one casino. `:has(span[id])`
   keeps prose paragraphs in the same panels untouched. */
.stats p:has(span[id]) {
    display: block;
    margin: 0;
    padding: 6px 0;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-dim, #ded6c6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stats p:has(span[id]):last-child { border-bottom: none; }

.stats p:has(span[id]) span[id] {
    display: inline-block;
    margin-left: 2px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-gold, #ffcf48);
    font-variant-numeric: tabular-nums;
}

/* Feed + podium (right rail). */
.hl-feed, .hl-podium, .hl-history { list-style: none; margin: 0; padding: 0; }
.hl-feed li, .hl-podium li, .hl-history li {
    padding: 5px 0;
    border-bottom: 1px dashed rgba(255, 207, 72, 0.18);
    font-size: 0.87rem;
    line-height: 1.4;
}
.hl-feed li:last-child, .hl-podium li:last-child { border-bottom: none; }
.hl-feed-status, .hl-history-status { color: var(--c-dim); font-size: 0.85rem; }
.hl-podium li { font-weight: bold; }

/* ===================== "how it works" modal shell =================== */
/* Copied from the casino siblings so the page stays self-sufficient. */
.viewer-info-btn {
    min-height: var(--touch, 44px);
    border-radius: 999px;
    border: 1px solid rgba(255, 207, 72, 0.6);
    background: rgba(0, 0, 0, 0.55);
    color: var(--c-gold);
    font-family: inherit;
    cursor: pointer;
    padding: 6px 14px;
}
.viewer-info-btn:hover { background: rgba(255, 207, 72, 0.18); }
.viewer-info-btn:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }

.viewer-modal { position: fixed; inset: 0; z-index: 4000; display: flex; align-items: center; justify-content: center; }
.viewer-modal[hidden] { display: none; }
.viewer-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.75); }
.viewer-modal-card {
    position: relative;
    width: min(720px, 94vw);
    max-height: 86vh;
    overflow-y: auto;
    background: #120a02;
    border: 2px solid var(--c-gold);
    border-radius: 16px;
    padding: 22px 24px;
    color: var(--c-soft);
    box-shadow: 0 0 30px rgba(255, 207, 72, 0.5);
}
.viewer-modal-card h2 { margin: 0 0 10px; color: var(--c-gold); font-size: 1.25rem; }
.viewer-modal-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; color: var(--c-dim);
    font-size: 1.1rem; cursor: pointer; min-width: var(--touch); min-height: var(--touch);
}
.viewer-modal-close:focus-visible { outline: 3px solid var(--c-gold); }
.viewer-rap-intro { color: var(--c-dim); }
.viewer-rap-verse { margin: 14px 0; padding: 10px 12px; border-left: 3px solid var(--c-orange); background: rgba(255, 140, 0, 0.07); border-radius: 6px; }
.viewer-rap-mode { margin: 0 0 6px; color: var(--c-gold); font-weight: bold; }
.viewer-rap { margin: 6px 0; line-height: 1.55; }
.viewer-rap-outro { margin: 14px 0 10px; line-height: 1.55; }
.viewer-modal-done { display: block; margin: 8px auto 0; }

/* ============================== Footer ============================= */
/* Footer — the SITE-STANDARD block, byte-for-byte the one in wrapper.css /
   revoker.css / txdecoder.css and the rest. This page used to carry its own
   darker, dimmer variant (0.9 alpha, dim text, bigger padding); the owner saw
   the seam from page to page (2026-09-02: "the footer has to be the same in
   all of our pages"). tests/footer-parity.spec.js pins the computed result. */
.footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 14px;
    margin-top: 20px;
    box-sizing: border-box;
}
.footer p { margin: 0; }
.trust-strip {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: center;
    align-items: baseline;
    padding: 0 12px;
    font-size: 12px;
    color: #ded6c6; /* opaque: translucent text over a translucent panel has no contrast ratio (READABILITY rule) */
}
.trust-strip a { color: var(--c-gold); text-decoration: none; }
.trust-strip a:hover, .trust-strip a:focus-visible { color: var(--c-orange); text-decoration: underline; }
.trust-sep { opacity: 0.5; }
