/**
 * The Spin The Wheel — Page Module: number-wheel.css
 * Dedicated styles for Random Number Wheel (/random-number-wheel)
 * Self-contained layout, range controls, elimination ledger & mobile invariants
 */

/* ==========================================================================
   1. Wheel Stage & Layout Architecture (Anti-Disconnection Guard)
   ========================================================================== */
.wheel-app-container {
    max-width: 1320px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1.25rem;
    overflow-x: clip;
}

.wheel-stage-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 992px) {
    .wheel-stage-grid {
        grid-template-columns: 1fr;
    }
}

.wheel-canvas-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-glow);
    min-height: 580px;
    max-width: 100%;
    overflow: hidden;
}

.wheel-canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    margin: 0 auto;
}

.wheel-canvas-wrapper canvas,
#wheelCanvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    border-radius: var(--radius-full);
    display: block;
}

.wheel-controls-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    max-width: 100%;
}

/* Pointer & Center SPIN Hub */
.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 48px;
    z-index: 10;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
    pointer-events: none;
    transition: transform 0.08s ease;
}

.wheel-pointer svg {
    width: 100%;
    height: 100%;
    display: block;
}

.wheel-pointer.tick {
    transform: translateX(-50%) scale(1.15) translateY(-3px);
}

.wheel-spin-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    border-radius: var(--radius-full);
    background: radial-gradient(circle, #ffffff 0%, #e2e8f0 100%);
    border: 5px solid var(--bg-surface);
    color: #0f172a;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 255, 255, 0.3);
    z-index: 5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-spin-hub:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.7), 0 4px 25px rgba(0, 0, 0, 0.8);
    background: #ffffff;
}

.wheel-spin-hub:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(0.95);
}

.wheel-spin-hub:disabled {
    opacity: 0.85;
    cursor: not-allowed;
    animation: pulse-spin 1.2s infinite alternate;
}

@keyframes pulse-spin {
    from { box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); }
    to { box-shadow: 0 0 35px rgba(99, 102, 241, 0.8); }
}

/* Quick Action Buttons Under Canvas */
.wheel-stage-actions {
    margin-top: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.stage-action-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    min-height: 44px;
}

.stage-action-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-color: var(--border-accent);
}

/* ==========================================================================
   2. Breadcrumbs & SHA-256 Verification Bar
   ========================================================================== */
.tool-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.tool-breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.tool-breadcrumbs a:hover {
    color: var(--text-primary);
}

.crumb-separator {
    color: var(--text-muted);
}

.crumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

.sha256-verify-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.825rem;
    max-width: 100%;
    overflow: hidden;
}

.sha256-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--accent-emerald, #10b981);
    white-space: nowrap;
    flex-shrink: 0;
}

.sha256-hash-display {
    font-family: var(--font-mono, monospace);
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ==========================================================================
   3. Range Presets & Control Chips
   ========================================================================== */
.slices-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.control-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.control-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.control-hint {
    font-size: 0.75rem;
    color: var(--accent-cyan, #06b6d4);
    font-weight: 600;
}

.slice-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.slice-chip {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.slice-chip:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background-color: var(--bg-card-hover);
}

.slice-chip.active {
    color: #ffffff;
    background: var(--primary, #6366f1);
    border-color: var(--primary, #6366f1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   4. Range & Advanced Numeric Inputs
   ========================================================================== */
.num-range-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.num-advanced-inputs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.num-options-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
}

.num-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.num-toggle-label:hover {
    color: var(--text-primary);
}

.num-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.num-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.num-input-field {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease;
    min-height: 44px;
}

.num-input-field:focus {
    border-color: var(--border-focus);
}

/* ==========================================================================
   5. Draw Mode Selection Pills (With vs Without Replacement)
   ========================================================================== */
.mode-pills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.mode-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.mode-pill:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.mode-pill.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.15));
    border-color: var(--primary, #6366f1);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.mode-pill-sub {
    font-size: 0.675rem;
    font-weight: 500;
    opacity: 0.75;
}

/* ==========================================================================
   6. Duration Slider & Settings Box
   ========================================================================== */
.duration-setting-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem;
}

.duration-label-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.duration-badge {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 0.775rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono, monospace);
}

.duration-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--bg-input, rgba(255, 255, 255, 0.1));
    outline: none;
    transition: opacity 0.2s;
    cursor: pointer;
}

.duration-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: transform 0.1s ease;
}

.duration-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.duration-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   7. Drawn Numbers Ledger Tray
   ========================================================================== */
.drawn-tray-container {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-top: 1rem;
}

.drawn-tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.drawn-tray-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-accent);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.drawn-tray-actions {
    display: flex;
    gap: 0.4rem;
}

.drawn-tray-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.725rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 28px;
}

.drawn-tray-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.drawn-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-height: 120px;
    overflow-y: auto;
    padding-top: 0.25rem;
}

.drawn-chip {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 0.775rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.drawn-chip-order {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* ==========================================================================
   7B. Interactive Bingo 75 Caller Master Board
   ========================================================================== */
.bingo-board-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-soft);
    max-width: 100%;
}

.bingo-board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.85rem;
}

.bingo-header-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.bingo-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-size: 0.725rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
}

.bingo-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.bingo-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.bingo-last-called {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bingo-call-highlight {
    color: #38bdf8;
    font-size: 1.05rem;
    font-weight: 800;
    background: rgba(56, 189, 248, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono, monospace);
}

.bingo-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
}

.bingo-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.bingo-columns-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.65rem;
}

.bingo-column {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.bingo-col-header {
    font-size: 1.25rem;
    font-weight: 900;
    text-align: center;
    padding: 0.25rem 0;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.bingo-col-B { color: #38bdf8; background: rgba(56, 189, 248, 0.1); }
.bingo-col-I { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.bingo-col-N { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.bingo-col-G { color: #f43f5e; background: rgba(244, 63, 94, 0.1); }
.bingo-col-O { color: #a855f7; background: rgba(168, 85, 247, 0.1); }

.bingo-cells-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
    gap: 0.25rem;
}

.bingo-cell {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.775rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: all 0.2s ease;
}

.bingo-cell.called {
    background: #10b981;
    color: #ffffff;
    font-weight: 800;
    border-color: #059669;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
}

.bingo-cell.latest-called {
    background: #f59e0b;
    border-color: #d97706;
    color: #000000;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.8);
    animation: bingo-pulse 1.5s infinite;
}

@keyframes bingo-pulse {
    0%, 100% { transform: scale(1.08); }
    50% { transform: scale(0.96); }
}

/* ==========================================================================
   7C. Empirical Cryptographic Uniformity Lab (Monte Carlo Simulator)
   ========================================================================== */
.monte-carlo-section {
    max-width: 1320px;
    margin: 3.5rem auto 0 auto;
    padding: 0 1.25rem;
}

.monte-carlo-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-glow);
}

.monte-carlo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.histogram-container {
    height: 150px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 0.75rem 0.5rem 0.75rem;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.histogram-col {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem;
}

.histogram-pct {
    font-size: 0.675rem;
    font-weight: 700;
    color: var(--text-muted);
}

.histogram-bar {
    width: 80%;
    background: linear-gradient(180deg, #38bdf8 0%, #6366f1 100%);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.histogram-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.monte-carlo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.mc-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    text-align: center;
}

.mc-metric-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
    margin-bottom: 0.2rem;
}

.mc-metric-label {
    font-size: 0.725rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mc-verdict-card {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .mc-verdict-card {
        grid-column: span 1;
    }
}

/* ==========================================================================
   8. Tool Switcher Section (Related Wheels Grid)
   ========================================================================== */
.tool-switcher-section {
    max-width: 1320px;
    margin: 3.5rem auto 0 auto;
    padding: 0 1.25rem;
}

.switcher-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.75rem;
}

.switcher-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.switcher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.switcher-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.switcher-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-soft);
}

.switcher-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.switcher-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.switcher-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   9. Editorial Section & Technical Prose
   ========================================================================== */
.editorial-section {
    max-width: 1100px;
    margin: 4rem auto 2rem auto;
    padding: 0 1.25rem;
    overflow-x: clip;
}

.editorial-prose {
    max-width: 900px;
    margin: 0 auto 5rem auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.editorial-block {
    margin-bottom: 4rem;
}

.editorial-prose h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
    color: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.editorial-prose h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    color: #f1f5f9;
}

.editorial-prose p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.editorial-prose strong {
    color: #ffffff;
    font-weight: 600;
}

.editorial-prose a {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.editorial-prose a:hover {
    color: #38bdf8;
}

.editorial-prose ul, .editorial-prose ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.editorial-prose li {
    margin-bottom: 0.5rem;
}

.editorial-figure {
    margin: 2.5rem 0;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

.editorial-figure picture, .editorial-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
}

.editorial-figure figcaption {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-style: italic;
}

.code-block-wrapper,
.editorial-prose pre {
    background-color: #0b1120;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.9rem;
    margin: 1.75rem 0;
    line-height: 1.5;
    -webkit-overflow-scrolling: touch;
}

.editorial-prose code {
    background-color: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: var(--accent-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.editorial-prose pre code {
    background-color: transparent;
    padding: 0;
    color: #38bdf8;
}

.editorial-prose .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0 0.5rem 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    max-width: 100%;
}

.editorial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.925rem;
    text-align: left;
}

.editorial-table th, .editorial-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.editorial-table th {
    background-color: rgba(255, 255, 255, 0.03);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.editorial-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.015);
}

.editorial-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.035);
}

.editorial-table tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   10. Mobile & Touch Responsive Invariants
   ========================================================================== */
@media (max-width: 768px) {
    .wheel-app-container {
        padding: 0 0.75rem;
        margin-top: 1rem;
    }

    .wheel-canvas-card {
        min-height: auto;
        padding: 1.5rem 0.75rem 1.25rem 0.75rem;
    }

    .wheel-canvas-wrapper {
        max-width: 340px;
    }

    .wheel-spin-hub {
        width: 68px;
        height: 68px;
        font-size: 0.9rem;
    }

    .wheel-pointer {
        width: 30px;
        height: 40px;
        top: -10px;
    }

    .editorial-section {
        margin-top: 2.5rem;
        padding: 0 0.75rem;
    }

    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .editorial-prose h2 {
        font-size: 1.45rem;
        margin-top: 2.5rem;
    }

    .editorial-prose h3 {
        font-size: 1.15rem;
    }
    .bingo-columns-grid {
        gap: 0.35rem;
    }
    .bingo-column {
        padding: 0.35rem 0.2rem;
    }
    .bingo-cell {
        height: 26px;
        font-size: 0.7rem;
    }
    .histogram-container {
        padding: 0.5rem 0.25rem;
        gap: 0.2rem;
    }
    .histogram-bar {
        width: 90%;
    }
    .histogram-pct {
        font-size: 0.55rem;
    }
    .histogram-label {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .wheel-canvas-wrapper {
        max-width: 290px;
    }

    .wheel-spin-hub {
        width: 64px;
        height: 64px;
        font-size: 0.85rem;
    }

    .num-range-inputs-grid {
        grid-template-columns: 1fr;
    }

    .mode-pills-grid {
        grid-template-columns: 1fr;
    }
}
