/* emberfield.css — 🔥 Ember Field (Mines).
 *
 * Modeled on blazehilo.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 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 FIELD'S MOTION CONTRACT. The one place this page spends its boldness
 * is the FLOOD — at settlement a wave of 💧 tint sweeps the grid row by row
 * (transition-delay set per tile by emberfield.js). A tile NEVER turns
 * before the chain event that names it has landed, and the flood board is
 * cosmetic and labeled as such. Under prefers-reduced-motion everything
 * just appears.
 */

*, *::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-water: #3aa7e8;       /* the flood */
    --c-water-deep: #123a5c;
    --c-soil: #3d2b17;        /* the untouched field */
    --c-soil-deep: #241708;

    /* 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/hilo — 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 field 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; }

/* Stat rows: the label recedes (small, uppercase, dim) and the VALUE — always
   the span[id] the script writes into — goes big, bold, gold and tabular,
   with a hairline between rows.
 *
 * Byte-identical to the block in blazehilo.css, which itself came from
 * blazecrash.css so the rails read as one casino. Ember Field shipped
 * WITHOUT it (owner report 2026-08-19): its markup already matched the
 * pattern on all fifteen rows, so every stat rendered as a flat sentence
 * while the six sibling games rendered a proper readout. Nothing was broken,
 * which is exactly why it survived — it looked deliberate.
 *
 * `:has(span[id])` is what keeps prose paragraphs inside the same panels
 * untouched, so the honesty notes below the numbers stay sentences. */
.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; }

/* [hidden] MUST beat the display:block above, or a row hidden in JS still
   paints. Same lesson the replay buttons learned, and source-gates enforces it
   for those. The selector repeats :has(span[id]) because it has to out-specify
   the rule it is correcting (0,3,2 vs 0,2,2) — a plain `.stats p[hidden]`
   loses and the row stays on screen. */
.stats p:has(span[id])[hidden] { display: 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;
}

.ef-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; }

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

/* ============================ THE FIELD ============================ */
/* A patch of dark soil with a gold rim; everything the game says lands
   here. The grid is 25 real buttons — the keyboard works for free. */
.ef-field {
    width: 100%;
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(255, 200, 90, 0.08), transparent 60%),
        linear-gradient(170deg, var(--c-soil) 0%, var(--c-soil-deep) 90%);
    border: 4px solid #6b4a12;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(255, 207, 72, 0.35);
    padding: 18px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.ef-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: min(420px, 100%);
}

.ef-tile {
    aspect-ratio: 1;
    min-width: 0;
    min-height: var(--touch);
    border-radius: 10px;
    border: 2px solid rgba(255, 207, 72, 0.3);
    background: linear-gradient(160deg, #55381c, #2e1d0c);
    color: var(--c-soft);
    font-size: clamp(1.1rem, 3vw, 1.7rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}
.ef-tile:not(:disabled):hover,
.ef-tile:not(:disabled):focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(255, 207, 72, 0.55);
    border-color: var(--c-gold);
    outline: none;
}
.ef-tile:disabled { cursor: default; opacity: 0.85; }

.ef-tile.ef-safe {
    background: linear-gradient(160deg, #b4601a, #7a3708);
    border-color: var(--c-orange);
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.55);
    opacity: 1;
}
.ef-tile.ef-pending {
    border-color: var(--c-gold);
    animation: ef-pulse 1.1s ease-in-out infinite;
    opacity: 1;
}
@keyframes ef-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 207, 72, 0.35); }
    50% { box-shadow: 0 0 16px rgba(255, 207, 72, 0.85); }
}

/* ==================== THE FLOOD (cosmetic, labeled) ================= */
/* emberfield.js sets transition-delay per tile by ROW, so the water
   sweeps top to bottom. The colours transition; nothing moves. */
.ef-flooding .ef-tile {
    transition: background-color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease;
}
.ef-tile.ef-flood-wet {
    background: linear-gradient(160deg, var(--c-water), var(--c-water-deep));
    border-color: var(--c-water);
    box-shadow: 0 0 12px rgba(58, 167, 232, 0.6);
    opacity: 1;
}
.ef-tile.ef-flood-safe {
    filter: saturate(0.8);
    opacity: 0.55;
}
/* YOUR pick on the reveal board: dry picks reuse .ef-safe's ember look at
   full strength; the fatal wet pick gets a gold ring so the tile that ended
   the run reads as yours, not as drawn water. */
.ef-tile.ef-flood-wet.ef-your-pick {
    border-color: var(--c-gold);
    box-shadow: 0 0 14px rgba(255, 207, 72, 0.8);
}
@media (prefers-reduced-motion: reduce) {
    .ef-tile, .ef-flooding .ef-tile { transition: none; animation: none; }
}

/* The narration + honesty lines on the field. */
.ef-readout { margin: 2px 0 0; color: var(--c-soft); text-align: center; font-weight: bold; }
.ef-composition { margin: 0; color: var(--c-gold); text-align: center; font-size: 0.95rem; }
.ef-wetline { margin: 0; color: var(--c-dim); text-align: center; font-size: 0.88rem; }
.ef-style-note {
    margin: 4px 0 0;
    color: var(--c-dim);
    text-align: center;
    font-size: 0.85rem;
    font-style: italic;
}
.ef-ceiling { margin: 0; color: var(--c-gold); text-align: center; font-size: 0.9rem; }

.ef-firstwarn {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--c-orange);
    background: rgba(255, 140, 0, 0.12);
    color: #ffe6c9;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ef-bank {
    display: flex;
    align-items: baseline;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--c-gold);
    border-radius: 999px;
    padding: 8px 18px;
}
.ef-bank-label { color: var(--c-dim); font-size: 0.9rem; }
.ef-bank-amount { color: var(--c-gold); font-weight: bold; font-size: 1.15rem; }

.ef-cashout-btn {
    min-height: var(--touch);
    padding: 10px 26px;
    border-radius: 999px;
    border: 2px solid var(--c-green);
    background: linear-gradient(160deg, #1d7a44, #0d3b22);
    color: #eafff2;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.45);
}
.ef-cashout-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 0 18px rgba(46, 204, 113, 0.7); }
.ef-cashout-btn:disabled { opacity: 0.6; cursor: default; }

/* ======================== PERFECT DIG box ========================== */
.ef-perfect {
    position: relative;
    width: 100%;
    border-radius: 14px;
    border: 2px solid var(--c-gold);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 207, 72, 0.25), transparent 70%),
        rgba(0, 0, 0, 0.8);
    padding: 16px;
    text-align: center;
    box-shadow: 0 0 22px rgba(255, 207, 72, 0.6);
}
.ef-perfect-title { margin: 0; color: var(--c-gold); font-size: 1.3rem; font-weight: bold; }
.ef-perfect-sub { margin: 8px 0 0; color: var(--c-soft); }
.ef-perfect-pop { margin: 8px 0 0; font-size: 1.2rem; }
.ef-perfect-close {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; color: var(--c-dim);
    font-size: 1rem; cursor: pointer; min-width: var(--touch); min-height: var(--touch);
}

.ef-result {
    width: 100%;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    font-weight: bold;
    border: 1px solid var(--c-gold);
    background: rgba(0, 0, 0, 0.6);
}
.ef-result[data-kind="win"] { border-color: var(--c-orange); color: #ffe0b8; }
.ef-result[data-kind="cash"] { border-color: var(--c-green); color: #d7ffe7; }
.ef-result[data-kind="bust"] { border-color: var(--c-water); color: #cfe9fb; }
.ef-result[data-kind="reclaim"] { border-color: var(--c-dim); color: var(--c-soft); }

/* =========================== THE CONSOLE =========================== */
.ef-console { text-align: center; }
.ef-budget-line { color: var(--c-dim); font-size: 0.9rem; }
.ef-bet-summary { color: var(--c-soft); }
.ef-payout-preview { color: var(--c-dim); font-size: 0.9rem; }

.ef-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }

.wallet-btn {
    min-height: var(--touch);
    padding: 10px 24px;
    border-radius: 999px;
    border: 2px solid var(--c-gold);
    background: linear-gradient(160deg, #a0541a, #6b3006) /* was #b4601a: 4.2:1 under #fff6e3, now 5.2:1 */;
    color: #fff6e3;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--glow);
}
.wallet-btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 0 16px rgba(255, 140, 0, 0.8); }
.wallet-btn:disabled { opacity: 0.6; cursor: default; }

.ef-action-btn { font-size: 1.1rem; padding: 12px 30px; }
.ef-step { margin: 0; color: var(--c-gold); font-size: 0.85rem; }
.ef-hint { margin: 0; color: var(--c-dim); font-size: 0.88rem; max-width: 46ch; line-height: 1.5; }
.ef-tx-status { color: var(--c-soft); font-size: 0.9rem; min-height: 1.2em; }
.ef-tx-link a { color: var(--c-gold); }

/* ===================== water slider + stake chips =================== */
.ef-mines, .ef-amount, .ef-budget { text-align: center; }
.ef-slider-label { display: block; color: var(--c-soft); margin-bottom: 8px; }
.ef-slider-label strong { color: var(--c-gold); font-size: 1.1rem; }

#efMineSlider {
    width: 100%;
    accent-color: var(--c-orange);
    min-height: var(--touch);
    cursor: pointer;
}
.ef-mine-row { margin-top: 6px; }
.ef-mine-note { color: var(--c-dim); font-size: 0.85rem; }

.ef-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}
.ef-chip, .ef-budget-chip {
    min-height: var(--touch);
    min-width: var(--touch);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 207, 72, 0.5);
    background: rgba(0, 0, 0, 0.55);
    color: var(--c-soft);
    font-family: inherit;
    font-size: 0.92rem;
    cursor: pointer;
}
.ef-chip:not(:disabled):hover, .ef-budget-chip:not(:disabled):hover {
    border-color: var(--c-gold);
    box-shadow: 0 0 8px rgba(255, 207, 72, 0.5);
}
.ef-chip:disabled, .ef-budget-chip:disabled { opacity: 0.55; cursor: default; }
.ef-budget-chip[aria-pressed="true"] {
    background: linear-gradient(160deg, #a0541a, #6b3006) /* was #b4601a: 4.2:1 under #fff6e3, now 5.2:1 */;
    border-color: var(--c-gold);
    color: #fff6e3;
}
.ef-hunt-chip { border-color: var(--c-red); color: #ffd9c9; }

#efAmountInput {
    width: min(220px, 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: var(--c-soft);
    font-family: inherit;
    font-size: 1.05rem;
    text-align: center;
    padding: 8px 12px;
}
#efAmountInput:focus { outline: none; border-color: var(--c-gold); box-shadow: 0 0 10px rgba(255, 207, 72, 0.5); }

.ef-limits { color: var(--c-dim); font-size: 0.85rem; }
.ef-amount-error { color: #ffb199; font-weight: bold; }
.ef-group-label { color: var(--c-dim); font-size: 0.88rem; }
.ef-budget-note { color: var(--c-dim); font-size: 0.85rem; }

/* ============================ the boards ============================ */
.ef-board {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ef-board li {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.88rem;
    color: var(--c-soft);
    overflow-wrap: anywhere;
}
.ef-board-empty { text-align: center; color: var(--c-dim); }
.ef-busts li { border-left: 3px solid var(--c-water); }
.ef-feed-status { color: var(--c-dim); font-size: 0.85rem; }

/* ======================= the Superstition Map ====================== */
.ef-heat {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 8px;
}
.ef-heat-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    border: 1px solid rgba(255, 207, 72, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: var(--c-soft);
}

/* ========================== rescue patrol ========================== */
.ef-patrol { text-align: center; border-color: var(--c-water); }
.ef-patrol-line { color: var(--c-soft); }
.ef-patrol-btn { border-color: var(--c-water); background: linear-gradient(160deg, #1d5a7a, #0d2b3b); }

/* =========================== game info ============================= */
.ef-info-label { color: var(--c-gold); margin-top: 10px; font-weight: bold; }
.ef-info-list { margin: 4px 0 0; padding-left: 20px; }
.ef-info-list li { margin: 4px 0; font-size: 0.9rem; }

.ef-odds-scroll { overflow-x: auto; }
.ef-odds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}
.ef-odds-table th, .ef-odds-table td {
    padding: 4px 8px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 207, 72, 0.15);
}
.ef-odds-table th { color: var(--c-gold); position: sticky; top: 0; background: rgba(0, 0, 0, 0.9); }
.ef-odds-table td:first-child, .ef-odds-table th:first-child { text-align: left; }
.ef-odds-star { color: var(--c-gold); }

.ef-verify-head { color: var(--c-gold); font-weight: bold; margin-top: 12px; }
.ef-verify-note { color: var(--c-dim); font-size: 0.85rem; line-height: 1.55; }
.contract-link { color: var(--c-gold); }

/* ============================= 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; }
