/* ═══════════════════════════════════════════════════════════════
   Miles Statement — the history modal as a frequent-flyer statement.
   Balance at the top (existing .history-balance + split-flap), then
   every earn and spend as a dated line. Scoped to body.dpad-statement-on
   so the old tabbed history stays intact underneath until it's flipped.
   Design: /static/miles-statement-preview.html,
           /static/statement-game-detail-preview.html
   ═══════════════════════════════════════════════════════════════ */

body.dpad-statement-on #history-tabs,
body.dpad-statement-on #history-modal-content > .history-panel,
body.dpad-statement-on #history-modal-content .step-resync-row { display: none !important; }

body.dpad-statement-on .history-balance .hero-label {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    letter-spacing: 0.22em; text-transform: uppercase;
}

/* One-line summary under the flap. Mono, tabular, never wraps. */
.stmt-pulse {
    margin-top: 14px; text-align: center;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 12px; color: rgba(26,26,26,0.6); white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.stmt-pulse b { color: var(--ink, #1a1a1a); font-weight: 600; }
.stmt-pulse .dot { margin: 0 6px; color: rgba(26,26,26,0.45); }

#statement-root { padding: 4px 0 12px; }

.stmt-month {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(26,26,26,0.45); padding: 22px 22px 6px;
}
.stmt-day { padding: 0 22px; }
.stmt-day + .stmt-day { margin-top: 6px; }
.stmt-day-head {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 16px 0 6px; border-bottom: 1px solid rgba(26,26,26,0.12);
}
.stmt-day-head .lbl {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
}
.stmt-day-head .lbl small {
    font-family: var(--font-ui, 'Figtree', sans-serif); font-weight: 500;
    letter-spacing: 0.02em; text-transform: none; color: rgba(26,26,26,0.45);
    margin-left: 8px; font-size: 12.5px;
}
.stmt-day-head .tot {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.stmt-day-head .tot.neg { color: #c0392b; }

.stmt-line {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center;
    gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(26,26,26,0.07);
    width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0;
    text-align: left; font-family: inherit; color: inherit; cursor: default;
}
.stmt-line:last-child { border-bottom: 0; }
button.stmt-line { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.stmt-line:active { background: rgba(26,26,26,0.05); }
.stmt-line .g { font-size: 18px; text-align: center; line-height: 1; }
.stmt-thumb {
    display: block; width: 36px; height: 48px; object-fit: cover; border-radius: 5px;
    background: #2b2b3b; box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.08);
}
.stmt-line .g.when {
    font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 11px;
    color: rgba(26,26,26,0.45); line-height: 1.1;
}
.stmt-line .w { min-width: 0; }
.stmt-line .w .t, .stmt-line .w .s { display: block; }
.stmt-line .t { font-size: 15px; font-weight: 500; line-height: 1.25; }
.stmt-line .s { font-size: 12px; color: rgba(26,26,26,0.45); margin-top: 3px; line-height: 1.3; }
.stmt-boost {
    display: inline-block; vertical-align: 1px; margin-left: 6px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 10.5px; font-weight: 600;
    background: #f3e7c2; color: #b38728; padding: 2px 6px; border-radius: 100px;
}
.stmt-line .a {
    font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 15px; font-weight: 600;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stmt-line .a.neg { color: #c0392b; }
.stmt-line .a .chev { color: rgba(26,26,26,0.45); font-size: 18px; margin-left: 8px; vertical-align: -1px; }
.stmt-line .a.earned {
    font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 40%, #b38728 60%, #fbf5b7 100%);
    color: var(--ink, #1a1a1a); padding: 5px 9px; border-radius: 100px;
}

.stmt-foot {
    text-align: center; padding: 22px 22px 30px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 11.5px; color: rgba(26,26,26,0.45);
}
.stmt-foot button {
    display: inline-block; margin-top: 8px; background: none; border: 0; padding: 8px 4px;
    font-family: inherit; font-size: inherit; color: rgba(26,26,26,0.6);
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.stmt-empty { text-align: center; padding: 40px 22px; color: rgba(26,26,26,0.45); font-size: 13px; }

/* ── Game page ─────────────────────────────────────────────── */
.stmt-back {
    display: inline-flex; align-items: center; gap: 8px; margin: 14px 22px 4px;
    padding: 8px 14px 8px 12px; border-radius: 100px;
    background: #e9e5db; border: 1px solid rgba(26,26,26,0.12);
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700); font-size: 11px;
    letter-spacing: 0.14em; text-transform: uppercase; color: rgba(26,26,26,0.6); cursor: pointer;
}
.stmt-hero { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; padding: 12px 22px 18px; }
.stmt-cover {
    width: 84px; height: 112px; border-radius: 10px; object-fit: cover; background: #2b2b3b;
    box-shadow: 0 8px 20px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.08);
    display: grid; place-items: center; color: #bf953f;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700); font-size: 22px;
}
.stmt-title { font-family: var(--font-display, 'Archivo Black', sans-serif);
 font-weight: var(--font-display-weight, 700); font-size: 19px; line-height: 1.15; margin: 2px 0 8px; }
.stmt-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.stmt-counts { font-size: 12px; color: rgba(26,26,26,0.45); margin-top: 9px; line-height: 1.35; }
.stmt-counts b { color: var(--ink, #1a1a1a); font-weight: 600; }
.stmt-stats {
    display: grid; grid-template-columns: 1fr 1fr 1fr; margin: 0 22px; padding: 14px 0;
    border-top: 1px solid rgba(26,26,26,0.12); border-bottom: 1px solid rgba(26,26,26,0.12);
}
.stmt-stat { text-align: center; }
.stmt-stat b { display: block; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stmt-stat span {
    display: block; font-family: var(--font-display, 'Archivo Black', sans-serif);
 font-weight: var(--font-display-weight, 700); font-size: 9.5px;
    letter-spacing: 0.18em; text-transform: uppercase; color: rgba(26,26,26,0.45); margin-top: 4px;
}
