/* Exchange "Multiplayer" (see multiplayer/shitcoinArena.js): the investment
   bank in the chart's middle, its printer, the bottom team/macro panel with
   your fake trade and 🪽, the golden shop next to it and the floating
   "+0.40%" hits. */

:root {
    --mp-gold: #f5c542;
    --mp-stone: #c9ced9;
    --mp-stone-dark: #8d93a3;
    --mp-bull: var(--color-up);
    --mp-bear: var(--color-down);
    /* Hopium Coin candles - same values as chartConfig.js's MULTIPLAYER_CANDLE_COLORS */
    --mp-candle-up: #26a69a;
    --mp-spot-on-up: #a0761c;
    --mp-spot-on-down: #8a5a14;
}

/* Stains for DOM candles, in var(--spot) - a few spot layers in
   mismatched tile sizes so the pattern doesn't look like a grid. */
body.mp-mode .gag-magnet-candle-body {
    --mp-stains:
        radial-gradient(ellipse 3px 2px at 30% 25%, var(--spot) 90%, transparent),
        radial-gradient(ellipse 2.5px 1.8px at 70% 60%, var(--spot) 90%, transparent),
        radial-gradient(ellipse 3.5px 2.4px at 45% 80%, var(--spot) 90%, transparent);
    background-size: 11px 14px, 13px 19px, 9px 23px;
}

/* ---- Hidden while playing ---- */

/* The left drawing panel: off-screen instead of display:none - the wheel's
   Lines chips still hand their drag off to its buttons (radialMenu.js), same
   as the Strategy/Indicators tabs (chart-controls.css). */
body.mp-mode #drawing-panel {
    position: fixed;
    left: -10000px;
    visibility: hidden;
}

/* The Params tab, its sidebar label and its dot - with Trade the only tab
   left, the sidebar and dots go too (mobilePanelTabs.js skips the swipe). */
body.mp-mode .mobile-tab-group[data-mobile-tab="params"],
body.mp-mode .tab-sidebar,
body.mp-mode .mobile-tab-dots {
    display: none;
}

/* ---- The bank ---- */

/* In the middle until the first candle; from then on shitcoinArena.js's
   anchorBank sets left (and a clip-path to the plot pane) so it stays on
   that candle's spot and slides out to the left with it. */
.mp-bank {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(360px, 70%);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.95;
    transition: opacity 1.2s ease;
}
.mp-bank[hidden] { display: none; }

/* Once candles are there it stays as a watermark behind them. */
.mp-bank.has-candles { opacity: 0.22; }
.mp-bank.printing,
.mp-bank.printed { opacity: 0.95; }

.mp-bank-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.mp-bank-stone { fill: var(--mp-stone); stroke: var(--mp-stone-dark); stroke-width: 1.5; }
.mp-bank-column { fill: #e3e6ee; stroke: var(--mp-stone-dark); stroke-width: 1.5; }
.mp-bank-door { fill: #3b3222; stroke: var(--mp-gold); stroke-width: 2; }
.mp-bank-dollar { fill: var(--mp-gold); font: 700 20px var(--font-main); }
.mp-bank-post { stroke: var(--mp-stone-dark); stroke-width: 4; }
.mp-bank-sign { fill: #1e222d; stroke: var(--mp-gold); stroke-width: 2.5; }
.mp-bank-concrete { fill: #8f949c; stroke: #6b7078; stroke-width: 1.5; }
.mp-bank-concrete-marks { stroke: #6b7078; stroke-width: 1; fill: #6b7078; }
.mp-printer-foot { fill: #2f3441; }
.mp-sign-title { fill: var(--mp-gold); font: 900 17px var(--font-main); letter-spacing: 1.5px; }
.mp-sign-sub { fill: var(--color-text-dim); font: 700 8.5px var(--font-main); letter-spacing: 1.2px; }
.mp-coin { fill: var(--mp-gold); stroke: #b8860b; stroke-width: 2; }
.mp-coin-inner { fill: #ffe08a; }

.mp-printer-body { fill: #2f3441; stroke: #555c6e; stroke-width: 1.5; }
.mp-printer-slot { fill: #0e1017; }
.mp-printer-label { fill: #444b5c; }
.mp-printer-led { fill: #555c6e; }
/* The printed candle: a Hopium Coin up candle like the chart's (chartConfig.js's
   MULTIPLAYER_CANDLE_COLORS), no border, stained. */
.mp-print-wick { stroke: var(--mp-candle-up); stroke-width: 2; }
.mp-print-body { fill: var(--mp-candle-up); }
.mp-print-spots { fill: var(--mp-spot-on-up); opacity: 0.85; }

/* It sits inside the printer (below the clip) until it prints. */
.mp-print-candle {
    transform: translateY(58px);
    transform-box: view-box;
}

.mp-bank.printing .mp-print-candle { animation: mpPrintFeed 3s linear forwards; }
.mp-bank.printing .mp-printer-led { animation: mpLedBlink 0.35s steps(2) infinite; }
.mp-bank.printing .mp-printer-body { animation: mpPrinterRattle 0.12s linear infinite; }
/* Printed: the chart's first candle lies right on top of it now
   (shitcoinArena.js's landPrintedCandle), the one in the printer is gone. */
.mp-bank.printed .mp-print-candle { visibility: hidden; }

@keyframes mpPrintFeed {
    from { transform: translateY(58px); }
    to { transform: translateY(0); }
}

/* ---- Stains (see multiplayer/candleStains.js) ---- */

/* The chart's own candles get theirs on this canvas, right over the chart
   (#live-chart is z-index 1 too) and under the trade zones. */
.mp-candle-stains,
.mp-trade-marks {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

/* A hammer/magnet stand-in for a real candle (gunNukeGag.js) - its colors
   come inline, the stains from here. */
body.mp-mode .gag-magnet-candle-body { --spot: var(--mp-spot-on-up); background-image: var(--mp-stains); }
body.mp-mode .gag-magnet-candle-body[data-dir="down"] { --spot: var(--mp-spot-on-down); }
@keyframes mpLedBlink {
    from { fill: #555c6e; }
    to { fill: #4cff7a; }
}
@keyframes mpPrinterRattle {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(0.8px); }
}

/* "Start minting" over the bank, until someone presses it. */
.mp-start {
    display: block;
    margin: 0 auto 10px;
    padding: 10px 22px;
    border: 2px solid #b8860b;
    border-radius: 999px;
    background: linear-gradient(160deg, #ffe08a 0%, var(--mp-gold) 45%, #c9971c 100%);
    color: #3b2a05;
    font: 900 17px var(--font-main);
    letter-spacing: 0.5px;
    cursor: pointer;
    pointer-events: auto; /* the bank itself lets clicks through */
    box-shadow: 0 0 18px rgba(245, 197, 66, 0.55), var(--shadow-raised);
    animation: mpStartPulse 1.6s ease-in-out infinite;
}
.mp-start[hidden] { display: none; }
.mp-start:hover { filter: brightness(1.08); }
.mp-start:active { transform: scale(0.96); }
@keyframes mpStartPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(245, 197, 66, 0.45), var(--shadow-raised); }
    50% { box-shadow: 0 0 28px rgba(245, 197, 66, 0.9), var(--shadow-raised); }
}

.mp-bank-caption {
    margin-top: 6px;
    text-align: center;
    color: var(--color-text-dim);
    font-size: 13px;
    font-weight: 600;
    visibility: hidden;
}
.mp-bank.printing .mp-bank-caption { visibility: visible; }

/* ---- Bottom panel ---- */

.mp-panel {
    position: absolute;
    left: 50%;
    bottom: 34px; /* clear of the time axis */
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 8px 10px;
    background: color-mix(in srgb, var(--color-panel) 92%, transparent);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-raised);
}
.mp-panel[hidden] { display: none; }

.mp-panel-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.mp-panel-stats {
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-dim);
    font-variant-numeric: tabular-nums;
}
.mp-ticker { color: var(--color-text); }
.mp-ticker b { color: var(--mp-gold); }
.mp-online::before { content: "● "; color: #4cff7a; }
.mp-power.mp-power-weak { color: #ffb74d; }
.mp-power.mp-power-boost { color: #4cff7a; font-weight: 700; }

.mp-panel .btn {
    padding: 6px 10px;
    font-size: 13px;
    white-space: nowrap;
}

.mp-team { min-width: 96px; font-weight: 700; }
.mp-team-bull.active { background: var(--mp-bull); color: #fff; }
.mp-team-bear.active { background: var(--mp-bear); color: #fff; }
.mp-count {
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 12px;
}

.mp-panel-row[hidden],
.mp-macro[hidden] { display: none; }
.mp-macro:disabled { opacity: 0.45; cursor: default; }

.mp-balance b { color: var(--mp-gold); }
.mp-balance.mp-negative b { color: var(--mp-bear); }
.mp-trade { color: var(--color-text); }
.mp-trade[hidden] { display: none; }
.mp-trade .mp-up { color: var(--mp-bull); }
.mp-trade .mp-down { color: var(--mp-bear); }

/* ---- The shop (shop.js): golden buttons in a column on each side of the
   panel - upgrades right, your team's one-shots left ---- */

.mp-shops { display: contents; }
.mp-shop {
    position: absolute;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: max-content;
}
.mp-shop-right { left: calc(100% + 8px); }
.mp-shop-left { right: calc(100% + 8px); }

.mp-upgrade {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 5px 12px;
    border: 2px solid #b8860b;
    border-radius: var(--radius-m);
    background: linear-gradient(160deg, #ffe08a 0%, var(--mp-gold) 45%, #c9971c 100%);
    color: #3b2a05;
    font-family: var(--font-main);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(245, 197, 66, 0.45), var(--shadow-raised);
    transition: transform 0.1s ease, filter 0.15s ease;
}
.mp-upgrade:hover { filter: brightness(1.08); }
.mp-upgrade:active { transform: scale(0.96); }
.mp-upgrade.mp-cant-afford { filter: grayscale(0.6) brightness(0.8); }
.mp-upgrade[hidden] { display: none; }
.mp-upgrade-title { font-size: 13px; font-weight: 900; }
.mp-upgrade-effect { font-size: 10.5px; font-weight: 600; opacity: 0.8; }
.mp-upgrade-cost { font-size: 11px; font-weight: 800; }
.mp-upgrade-count {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #1e222d;
    color: var(--mp-gold);
    font-size: 11px;
    font-weight: 800;
}
.mp-upgrade-count[hidden] { display: none; }
.mp-upgrade.mp-bought { animation: mpUpgradeBought 0.6s ease-out; }
@keyframes mpUpgradeBought {
    0% { box-shadow: 0 0 0 0 rgba(245, 197, 66, 0.9); }
    100% { box-shadow: 0 0 0 18px rgba(245, 197, 66, 0); }
}
.mp-cooldown { font-variant-numeric: tabular-nums; }

/* JP Fed Talk: the panel briefly sags. */
.mp-panel.mp-fed-flash { animation: mpFedFlash 0.9s ease-out; }
@keyframes mpFedFlash {
    0% { box-shadow: 0 0 0 0 rgba(255, 183, 77, 0.8); }
    100% { box-shadow: 0 0 0 14px rgba(255, 183, 77, 0); }
}

/* ---- "+1$" from every price move, popping up at the current candle
   (shitcoinArena.js's showHit); the big macro jumps in the middle ---- */

.mp-hit {
    position: fixed;
    transform: translate(-50%, -50%);
    font: 800 15px var(--font-main);
    white-space: nowrap;
    pointer-events: none;
    z-index: 620;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    animation: mpHitFloat 1.2s ease-out forwards;
}
.mp-hit-up { color: var(--mp-bull); }
.mp-hit-down { color: var(--mp-bear); }

@keyframes mpHitFloat {
    0% { opacity: 0; margin-top: 6px; }
    10% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; margin-top: -56px; }
}

.mp-hit-big {
    font-size: clamp(34px, 7vw, 64px);
    font-weight: 900;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 24px currentColor;
    animation: mpHitBig 2s ease-out forwards;
}

@keyframes mpHitBig {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    25% { transform: translate(-50%, -50%) scale(1); }
    75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .mp-hit, .mp-hit-big { animation-name: mpHitFade; }
}
@keyframes mpHitFade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

/* ---- The all-in taxi (shitcoinArena.js → allInTaxi.js): drives along the
   price, flashes and speaks at the current candle ---- */

.mp-taxi-layer {
    position: fixed;
    z-index: 610;
    overflow: hidden;
    pointer-events: none;
}
.mp-taxi {
    position: absolute;
    left: 0;
    top: 0;
    width: 64px;
    height: 32px;
    will-change: transform;
}
.mp-taxi svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.mp-taxi-arrived svg { animation: mpTaxiFlash 0.45s ease-out; }
@keyframes mpTaxiFlash {
    0%, 60% { filter: brightness(2.2) drop-shadow(0 0 14px #ffe066); }
    30% { filter: brightness(1.2) drop-shadow(0 0 4px #ffe066); }
    100% { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
}

.mp-taxi-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 4px;
    padding: 4px 9px;
    border-radius: 10px;
    background: #fff;
    color: #1b1b1b;
    font: 800 12px var(--font-main);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.4);
    transform-origin: 14px 100%;
}
.mp-taxi-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 12px;
    border: 6px solid transparent;
    border-top-color: #fff;
}
.mp-taxi-arrived .mp-taxi-bubble { animation: mpTaxiBubble 0.25s ease-out forwards; }
@keyframes mpTaxiBubble {
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mp-taxi-arrived svg, .mp-taxi-arrived .mp-taxi-bubble { animation: none; }
    .mp-taxi-arrived .mp-taxi-bubble { opacity: 1; transform: none; }
}

/* The Lambo flashes harder. */
.mp-ride-lambo.mp-taxi-arrived svg { animation: mpLamboFlash 0.7s ease-out; }
.mp-ride-lambo .mp-taxi-bubble { background: #ffd84d; }
.mp-ride-lambo .mp-taxi-bubble::after { border-top-color: #ffd84d; }
@keyframes mpLamboFlash {
    0%, 40% { filter: brightness(2.6) drop-shadow(0 0 22px #c77dff); }
    20%, 60% { filter: brightness(1.3) drop-shadow(0 0 8px #ffd84d); }
    100% { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
}

/* ---- arenaFx.js: shake, edge flash, confetti, combo, REKT, tug of war,
   FRENZY, golden 🪽 ---- */

.chart-canvas.mp-shake { animation: mpShake 0.3s linear; }
.chart-canvas.mp-shake-hard { animation: mpShake 0.5s linear; --shake: 9px; }
@keyframes mpShake {
    0%, 100% { transform: none; }
    20% { transform: translate(calc(var(--shake, 4px) * -1), calc(var(--shake, 4px) * 0.5)); }
    40% { transform: translate(var(--shake, 4px), calc(var(--shake, 4px) * -0.5)); }
    60% { transform: translate(calc(var(--shake, 4px) * -0.6), calc(var(--shake, 4px) * -0.4)); }
    80% { transform: translate(calc(var(--shake, 4px) * 0.5), calc(var(--shake, 4px) * 0.3)); }
}

.mp-edges {
    position: fixed;
    inset: 0;
    z-index: 605;
    pointer-events: none;
    opacity: 0;
    box-shadow: inset 0 0 90px 20px var(--mp-bull);
}
.mp-edges.mp-edges-down { box-shadow: inset 0 0 90px 20px var(--mp-bear); }
.mp-edges.mp-edges-flash { animation: mpEdgesFlash 0.6s ease-out; }
@keyframes mpEdgesFlash {
    0% { opacity: 0.9; }
    100% { opacity: 0; }
}

.mp-confetti {
    position: fixed;
    z-index: 625;
    font-size: 20px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: mpConfetti 1.1s cubic-bezier(0.2, 0.7, 0.4, 1) forwards;
}
@keyframes mpConfetti {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
    70% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 60px)) rotate(var(--rot)) scale(1);
    }
}

.mp-combo {
    position: fixed;
    top: 130px; /* below the "Days till FOMC" */
    left: 50%;
    z-index: 622;
    transform: translateX(-50%) scale(var(--combo-scale, 1));
    font: 900 22px var(--font-main);
    color: var(--mp-bull);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 16px currentColor;
    pointer-events: none;
    white-space: nowrap;
}
.mp-combo[hidden] { display: none; }
.mp-combo.mp-combo-bear { color: var(--mp-bear); }
.mp-combo.mp-combo-bump { animation: mpComboBump 0.18s ease-out; }
@keyframes mpComboBump {
    0% { transform: translateX(-50%) scale(calc(var(--combo-scale, 1) * 1.35)); }
    100% { transform: translateX(-50%) scale(var(--combo-scale, 1)); }
}

.mp-exit { font-size: 16px; animation-duration: 1.6s; }
.mp-hit-landmark { color: var(--mp-gold); }

/* Tug of war: bear red behind, the bulls' green share pushing from the left. */
.mp-momentum {
    position: relative;
    height: 10px;
    margin: 2px 0 6px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--mp-bear);
}
.mp-momentum-bull {
    position: absolute;
    inset: 0 auto 0 0;
    width: 50%;
    background: var(--mp-bull);
    transition: width 0.6s ease-out;
}
.mp-frenzy-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: 900 9px var(--font-main);
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow: 0 0 4px #000;
}
.mp-frenzy-label[hidden] { display: none; }
body.mp-frenzy .mp-momentum { animation: mpFrenzyBar 0.5s ease-in-out infinite alternate; }
@keyframes mpFrenzyBar {
    to { box-shadow: 0 0 12px 2px #ff7a00; }
}
/* The whole chart glows while the room is in a FRENZY. */
body.mp-frenzy .chart-canvas { animation: mpFrenzyGlow 0.45s ease-in-out infinite alternate; }
@keyframes mpFrenzyGlow {
    from { box-shadow: inset 0 0 30px 0 rgba(255, 122, 0, 0.25); }
    to { box-shadow: inset 0 0 60px 6px rgba(255, 60, 0, 0.55); }
}

.mp-golden {
    position: fixed;
    z-index: 630;
    transform: translate(-50%, -50%);
    padding: 0;
    border: 0;
    background: none;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    filter: sepia(1) saturate(6) hue-rotate(5deg) brightness(1.15) drop-shadow(0 0 12px #ffd84d);
    animation: mpGoldenBob 0.6s ease-in-out infinite alternate, mpGoldenFade var(--ttl, 6s) linear forwards;
}
.mp-golden:disabled { cursor: default; }
.mp-golden-reward {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    font: 900 12px var(--font-main);
    color: var(--mp-gold);
    filter: none;
    text-shadow: 0 1px 3px #000;
}
@keyframes mpGoldenBob {
    from { margin-top: -6px; rotate: -8deg; }
    to { margin-top: 6px; rotate: 8deg; }
}
@keyframes mpGoldenFade {
    0%, 75% { opacity: 1; }
    100% { opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    .chart-canvas.mp-shake, .chart-canvas.mp-shake-hard, body.mp-frenzy .chart-canvas,
    body.mp-frenzy .mp-momentum, .mp-combo.mp-combo-bump { animation: none; }
    .mp-confetti { animation-name: mpHitFade; }
    .mp-golden { animation: mpGoldenFade var(--ttl, 6s) linear forwards; }
}

/* No room beside the panel - the shop sits on top of it instead, in rows. */
@media (max-width: 900px) {
    .mp-shops {
        position: absolute;
        left: 0;
        right: 0;
        bottom: calc(100% + 8px);
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .mp-shop {
        position: static;
        width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}
/* Phones: the panel docked across the chart's bottom with thumb-sized
   buttons (44px), the shop one row above it you swipe through sideways -
   so the chart, the bank and "Start minting" stay in sight. */
@media (max-width: 600px) {
    .mp-panel {
        left: 6px;
        right: 6px;
        bottom: 30px;
        transform: none;
        width: auto;
        max-width: none;
        gap: 6px;
        padding: 6px;
    }
    .mp-panel-stats { gap: 10px; font-size: 12px; }
    .mp-panel .btn {
        flex: 1 1 0;
        min-height: 44px;
        padding: 6px 8px;
        font-size: 15px;
    }
    .mp-team { min-width: 0; }
    .mp-count { font-size: 13px; }
    .mp-momentum { margin: 0; height: 12px; }
    .mp-frenzy-label { font-size: 10px; }
    .mp-panel-me { font-size: 14px; }
    .mp-trade { flex-basis: 100%; text-align: center; font-size: 12px; }

    .mp-shops {
        flex-direction: row;
        gap: 6px;
        bottom: calc(100% + 6px);
        padding: 8px 2px 2px; /* room for the level badges */
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        touch-action: pan-x;
    }
    .mp-shops::-webkit-scrollbar { display: none; }
    .mp-shop { flex: 0 0 auto; flex-wrap: nowrap; }
    .mp-upgrade {
        flex: 0 0 auto;
        justify-content: center;
        min-height: 44px;
        padding: 3px 10px;
        box-shadow: 0 0 6px rgba(245, 197, 66, 0.4), var(--shadow-raised);
    }
    .mp-upgrade-title { font-size: 12px; }
    .mp-upgrade-effect { display: none; }
    .mp-upgrade-count { top: -6px; right: -4px; }

    .mp-start { padding: 12px 24px; font-size: 18px; }
}

/* ---- Price landmarks, left of the price scale (priceLandmarks.js) ---- */

.mp-marks {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.mp-marks[hidden] { display: none; }
.mp-mark {
    position: absolute;
    top: 0;
    right: var(--price-scale-width, 0);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: -9px; /* centered on its price */
    height: 18px;
    color: rgba(255, 255, 255, 0.72);
    font: 700 12px var(--font-main);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.mp-mark[hidden] { display: none; }
.mp-mark-line {
    width: 28px;
    border-top: 1px dashed rgba(245, 197, 66, 0.7);
}

/* ---- The sky behind the chart (priceLandmarks.js): the usual chart
   background until 100k $, then space - Earth's atmosphere sinking below,
   the moon on the left growing, stars flying past. --alt 0..1. ---- */

.mp-sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #131722;
    --alt: 0;
}
.mp-sky[hidden] { display: none; }

/* From 1000 $ on: a blue day sky, clouds drifting past. */
.mp-sky-day {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2.5s ease;
    background: linear-gradient(to bottom, #1b4a86 0%, #2f6fb3 55%, #5f9ad2 100%);
}
.mp-sky.mp-day .mp-sky-day { opacity: 1; }
.mp-cloud {
    position: absolute;
    left: -220px;
    width: 120px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 34px -16px 0 6px rgba(255, 255, 255, 0.55), 72px -4px 0 2px rgba(255, 255, 255, 0.55);
    animation: mpCloudDrift 60s linear infinite;
}
.mp-cloud-1 { top: 12%; }
.mp-cloud-2 { top: 30%; transform: scale(0.7); animation-duration: 80s; animation-delay: -35s; }
.mp-cloud-3 { top: 52%; transform: scale(1.3); animation-duration: 70s; animation-delay: -12s; }
.mp-cloud-4 { top: 72%; transform: scale(0.85); animation-duration: 95s; animation-delay: -60s; }
@keyframes mpCloudDrift {
    from { translate: 0 0; }
    to { translate: calc(100vw + 320px) 0; }
}

/* Skyscrapers from the bottom up to the 1000 $ line (priceLandmarks.js
   sets the city's top to it) - the price climbs past their roofs. */
.mp-city {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1%;
    padding: 0 1%;
}
.mp-city[hidden] { display: none; }
.mp-tower {
    --tower: #1c2232;
    --tower-edge: #262d40;
    position: relative;
    flex: 0 0 var(--w);
    height: var(--h);
    /* Window grid: dark pillars over rows of lit windows. */
    background:
        repeating-linear-gradient(to right, var(--tower) 0 5px, transparent 5px 12px),
        repeating-linear-gradient(to bottom, transparent 0 7px, rgba(255, 214, 110, 0.14) 7px 11px, transparent 11px 18px),
        var(--tower);
    border: 1px solid var(--tower-edge);
    border-bottom: none;
}
/* An antenna on the tallest ones. */
.mp-tower-spire::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 2px;
    height: 18px;
    background: #3a4258;
}
.mp-sky.mp-day .mp-tower { --tower: #2a3a55; --tower-edge: #34486a; }

/* The Burj Khalifa: stepped setbacks narrowing into a needle, a bit paler
   than the rest. priceLandmarks.js sets its height - the needle's tip on
   the 828 $ line. */
.mp-tower.mp-burj {
    --tower: #2b3550;
    --tower-edge: #3a4868;
    height: 0;
    clip-path: polygon(
        0 100%, 0 62%, 12% 62%, 12% 44%, 24% 44%, 24% 30%, 36% 30%, 36% 20%,
        44% 20%, 47% 10%, 49.5% 0, 50.5% 0, 53% 10%, 56% 20%,
        64% 20%, 64% 30%, 76% 30%, 76% 44%, 88% 44%, 88% 62%, 100% 62%, 100% 100%
    );
}
.mp-sky.mp-day .mp-tower.mp-burj { --tower: #3a4d72; --tower-edge: #4a5f88; }

.mp-sky-high {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2.5s ease;
    background: radial-gradient(ellipse at 50% 120%, #10204a 0%, #070b1c 55%, #02030a 100%);
}
.mp-sky.mp-in-space .mp-sky-high { opacity: 1; }

.mp-sky-stars {
    position: absolute;
    inset: -200px 0 0 0;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #fff 99%, transparent),
        radial-gradient(1px 1px at 90px 120px, #cfd8ff 99%, transparent),
        radial-gradient(1.5px 1.5px at 150px 60px, #fff 99%, transparent),
        radial-gradient(1px 1px at 60px 170px, #fff 99%, transparent);
    background-size: 200px 200px;
    opacity: calc(0.35 + var(--alt) * 0.65);
    animation: mpStarsFly 9s linear infinite;
}
.mp-sky-stars-near {
    background-image:
        radial-gradient(2px 2px at 40px 80px, #fff 99%, transparent),
        radial-gradient(1.5px 1.5px at 230px 210px, #ffe9b0 99%, transparent);
    background-size: 300px 300px;
    animation-duration: 4s;
}
/* The stars rush down - we're flying up. */
@keyframes mpStarsFly {
    from { transform: translateY(0); }
    to { transform: translateY(200px); }
}
.mp-sky-stars-near { animation-name: mpStarsFlyNear; }
@keyframes mpStarsFlyNear {
    from { transform: translateY(-100px); }
    to { transform: translateY(200px); }
}

/* Earth's curve and the blue glow of its atmosphere, sinking away the
   higher the price. */
.mp-sky-earth {
    position: absolute;
    left: -30%;
    width: 160%;
    height: 70%;
    bottom: calc(-52% - var(--alt) * 30%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: radial-gradient(ellipse at 50% 0%, #2d6fd6 0%, #123f8a 18%, #0a2553 45%, #04112a 100%);
    box-shadow: 0 -8px 30px rgba(110, 185, 255, 0.85), 0 -30px 90px rgba(70, 150, 255, 0.45);
}

/* The moon on the left, closer (bigger) the higher the price. */
.mp-sky-moon {
    position: absolute;
    left: 7%;
    top: 12%;
    width: calc(56px + var(--alt) * 180px);
    height: calc(56px + var(--alt) * 180px);
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 35%, rgba(120, 120, 130, 0.55) 0 9%, transparent 10%),
        radial-gradient(circle at 62% 58%, rgba(120, 120, 130, 0.5) 0 12%, transparent 13%),
        radial-gradient(circle at 45% 75%, rgba(120, 120, 130, 0.45) 0 6%, transparent 7%),
        radial-gradient(circle at 40% 40%, #f4f1e6 0%, #d6d2c4 60%, #9d998d 100%);
    box-shadow: 0 0 40px rgba(255, 250, 225, 0.35);
    transition: width 1.5s ease, height 1.5s ease;
}

/* Satellites, a comet and a rocket drifting past. */
.mp-sky-flyer {
    position: absolute;
    left: -60px;
    font-size: 22px;
    opacity: 0.85;
    animation: mpFlyAcross 26s linear infinite;
}
.mp-sky-flyer-1 { top: 22%; }
.mp-sky-flyer-2 { top: 8%; font-size: 18px; animation-duration: 17s; animation-delay: -6s; }
.mp-sky-flyer-3 { top: 48%; font-size: 26px; animation-duration: 34s; animation-delay: -20s; }
@keyframes mpFlyAcross {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(calc(100vw + 120px), 60px) rotate(25deg); }
}

@media (prefers-reduced-motion: reduce) {
    .mp-sky-stars, .mp-sky-flyer, .mp-start, .mp-cloud { animation: none; }
    .mp-cloud-1 { left: 10%; } .mp-cloud-2 { left: 55%; } .mp-cloud-3 { left: 30%; } .mp-cloud-4 { left: 75%; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-bank.printing .mp-printer-body,
    .mp-bank.printing .mp-printer-led { animation: none; }
}

/* ---- "Days till FOMC" over the chart - the round's countdown, a second
   a day (shitcoinArena.js's renderState) ---- */

.mp-fomc-days {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(19, 23, 34, 0.82);
    color: var(--color-text);
    font: 700 14px var(--font-main);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
.mp-fomc-days[hidden] { display: none; }
.mp-fomc-days b {
    display: inline-block;
    min-width: 3ch;
    margin-left: 6px;
    font-size: 18px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.mp-fomc-days.mp-fomc-days-ending { border-color: var(--mp-bear); color: var(--mp-bear); }
.mp-fomc-days.mp-fomc-days-ending b { animation: mpFomcPulse 1s ease-in-out infinite; }
@keyframes mpFomcPulse {
    50% { transform: scale(1.25); }
}

/* ---- The FOMC TV at the end of a round (fomcTv.js): nothing else to see ---- */

body.mp-fomc-on { overflow: hidden; }

.mp-fomc {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px;
    background: radial-gradient(ellipse at 50% 40%, #2a2419 0%, #0b0b0d 70%);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.mp-fomc.mp-fomc-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.mp-fomc-tv {
    position: relative;
    /* Fits the screen's height too: antenna + TV + the countdown and
       "Leave Meeting" below. */
    width: min(92vw, 760px, calc((100vh - 245px) * 1.25));
    margin-top: 50px; /* room for the antenna */
}
.mp-fomc-antenna span {
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 4px;
    height: 70px;
    background: linear-gradient(#bbb, #555);
    border-radius: 2px;
    transform-origin: bottom center;
}
.mp-fomc-antenna span:first-child { transform: rotate(-32deg); }
.mp-fomc-antenna span:last-child { transform: rotate(28deg); }
.mp-fomc-antenna span::after {
    content: "";
    position: absolute;
    top: -6px;
    left: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #999;
}

.mp-fomc-body {
    display: flex;
    gap: 16px;
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(160deg, #6b4a2b, #3f2a17);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.15), 0 20px 60px rgba(0, 0, 0, 0.7);
}

.mp-fomc-screen {
    position: relative;
    flex: 1;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 36px / 28px;
    background: #081226;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9), 0 0 0 6px #1b1b1b;
    transform: scaleY(0.01);
    filter: brightness(3);
}
.mp-fomc-open .mp-fomc-screen { animation: mpFomcOn 0.8s ease-out 0.2s forwards; }
@keyframes mpFomcOn {
    0% { transform: scaleY(0.01) scaleX(0.6); filter: brightness(3); }
    40% { transform: scaleY(0.01) scaleX(1); filter: brightness(3); }
    100% { transform: none; filter: none; }
}

.mp-fomc-studio {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 14px, transparent 14px 40px),
        linear-gradient(#0f2a5c, #0a1b3d 70%, #06112a);
}
.mp-fomc-seal {
    position: absolute;
    top: 9%;
    left: 50%;
    width: 30%;
    aspect-ratio: 1;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    border: 4px double #c9a64a;
    border-radius: 50%;
    color: #c9a64a;
    font: 900 clamp(14px, 3vw, 26px) Georgia, serif;
    letter-spacing: 0.12em;
    opacity: 0.55;
}
.mp-fomc-flag {
    position: absolute;
    top: 6%;
    width: 9%;
    height: 62%;
    background: repeating-linear-gradient(#b22234 0 7%, #eee 7% 14%);
    box-shadow: inset -6px 0 10px rgba(0, 0, 0, 0.35);
    opacity: 0.75;
}
.mp-fomc-flag::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 38%;
    background: #3c3b6e;
}
.mp-fomc-flag-left { left: 7%; }
.mp-fomc-flag-right { right: 7%; }

.mp-fomc-powell {
    position: absolute;
    bottom: 20%;
    left: 50%;
    width: 38%;
    transform: translateX(-50%) translateY(40%);
    opacity: 0;
}
.mp-fomc-open .mp-fomc-powell { animation: mpFomcStepUp 0.7s ease-out 1s forwards; }
@keyframes mpFomcStepUp {
    to { transform: translateX(-50%); opacity: 1; }
}
.mp-fomc-mouth { transform-box: fill-box; transform-origin: center; }
.mp-fomc-talking .mp-fomc-mouth { animation: mpFomcTalk 0.18s ease-in-out infinite alternate; }
@keyframes mpFomcTalk {
    to { transform: scaleY(2.6); }
}

.mp-fomc-podium {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 46%;
    height: 30%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    padding-top: 3%;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(#5a3b22, #3a2513);
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.12);
    color: #c9a64a;
    font: 700 clamp(8px, 1.5vw, 12px) Georgia, serif;
    letter-spacing: 0.2em;
}

.mp-fomc-live {
    position: absolute;
    top: 5%;
    left: 5%;
    padding: 2px 8px;
    border-radius: 3px;
    background: #d32f2f;
    color: #fff;
    font: 800 clamp(10px, 1.8vw, 13px) var(--font-main);
    letter-spacing: 0.08em;
}

.mp-fomc-lower-third {
    position: absolute;
    left: 0;
    bottom: 30%;
    display: flex;
    flex-direction: column;
    padding: 4px 14px 4px 5%;
    background: linear-gradient(90deg, rgba(10, 24, 60, 0.95), rgba(10, 24, 60, 0.7));
    border-left: 4px solid #c9a64a;
    color: #fff;
    font: 500 clamp(9px, 1.6vw, 12px) var(--font-main);
    opacity: 0;
    transform: translateX(-100%);
}
.mp-fomc-lower-third b { font-size: 1.35em; letter-spacing: 0.06em; }
.mp-fomc-open .mp-fomc-lower-third { animation: mpFomcSlideIn 0.5s ease-out 1.5s forwards; }
@keyframes mpFomcSlideIn {
    to { opacity: 1; transform: none; }
}

.mp-fomc-caption {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 10%;
    min-height: 1.4em;
    color: #fff;
    font: 700 clamp(13px, 2.4vw, 20px) var(--font-main);
    text-align: center;
    text-shadow: 0 2px 6px #000, 0 0 2px #000;
}
.mp-fomc-caption:empty { visibility: hidden; }
.mp-fomc-verdict {
    font-size: clamp(16px, 3.4vw, 30px);
    font-weight: 900;
}
.mp-fomc-verdict-bear { color: #ff6b6b; }
.mp-fomc-verdict-bull { color: #4cff7a; }
/* The verdict tints the studio. */
.mp-fomc-won-bear .mp-fomc-studio { animation: mpFomcTintBear 1.2s ease-out forwards; }
.mp-fomc-won-bull .mp-fomc-studio { animation: mpFomcTintBull 1.2s ease-out forwards; }
@keyframes mpFomcTintBear { to { box-shadow: inset 0 0 120px 30px rgba(211, 47, 47, 0.55); } }
@keyframes mpFomcTintBull { to { box-shadow: inset 0 0 120px 30px rgba(38, 166, 154, 0.55); } }

.mp-fomc-ticker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8%;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #c9a64a;
    color: #111;
    font: 800 clamp(9px, 1.6vw, 13px) var(--font-main);
    white-space: nowrap;
}
.mp-fomc-ticker:has(span:empty) { visibility: hidden; }
.mp-fomc-ticker span {
    padding-left: 100%;
    animation: mpFomcTicker 16s linear infinite;
}
@keyframes mpFomcTicker {
    to { transform: translateX(-100%); }
}

.mp-fomc-scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 4px);
    mix-blend-mode: multiply;
}

.mp-fomc-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 12%;
    padding-top: 10px;
}
.mp-fomc-knob {
    width: 100%;
    max-width: 52px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ddd, #666);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}
.mp-fomc-grille {
    flex: 1;
    width: 100%;
    max-width: 52px;
    border-radius: 6px;
    background: repeating-linear-gradient(#2b1d10 0 3px, #1b120a 3px 6px);
}

.mp-fomc-restart {
    min-height: 1.4em;
    color: var(--color-text-dim, #aaa);
    font: 600 15px var(--font-main);
    text-align: center;
}

.mp-fomc-leave {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: 600 15px var(--font-main);
    cursor: pointer;
}
.mp-fomc-leave:hover,
.mp-fomc-leave:focus-visible { background: rgba(255, 255, 255, 0.16); }
.mp-fomc-leave kbd {
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font: 600 11px var(--font-main);
    color: var(--color-text-dim, #aaa);
}

@media (max-width: 560px) {
    .mp-fomc-body { padding: 12px; gap: 0; border-radius: 18px; }
    .mp-fomc-panel { display: none; }
    .mp-fomc-powell { width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-fomc-open .mp-fomc-screen,
    .mp-fomc-open .mp-fomc-powell,
    .mp-fomc-open .mp-fomc-lower-third { animation-duration: 0.01s; animation-delay: 0s; }
    .mp-fomc-talking .mp-fomc-mouth,
    .mp-fomc-ticker span,
    .mp-fomc-days.mp-fomc-days-ending b { animation: none; }
}

/* ---- The room's shop printers, under the "Days till FOMC" over the chart
   (multiplayer/printerFarm.js) - one per printer running, each feeding out
   a candle every second (+1 $/s) ---- */

.mp-printers {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    width: max-content;
    max-width: min(60%, 360px);
    padding: 6px 10px 4px;
    background: color-mix(in srgb, var(--color-panel) 70%, transparent);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-m);
}
.mp-printers[hidden] { display: none; }

.mp-farm-printer {
    position: relative;
    width: 40px;
    height: 34px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}
.mp-farm-printer svg { display: block; width: 100%; height: 100%; overflow: visible; }

.mp-farm-candle {
    transform-box: view-box;
    animation: mpFarmFeed 1s linear var(--feed-delay, 0s) infinite;
}
@keyframes mpFarmFeed {
    0% { transform: translateY(14px); opacity: 1; }
    70% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-6px); opacity: 0; }
}
.mp-farm-led { fill: #4cff7a; animation: mpLedBlink 0.5s steps(2) var(--feed-delay, 0s) infinite; }

/* Bought: drops in from above. */
.mp-farm-new { animation: mpFarmDrop 0.5s cubic-bezier(0.3, 1.5, 0.6, 1); }
@keyframes mpFarmDrop {
    from { transform: translateY(-40px) scale(0.6); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* Unplugged by a bear: goes dark, the plug pops out, it shrinks away. */
.mp-farm-unplugged { animation: mpFarmUnplug 1.2s ease-in forwards; }
.mp-farm-unplugged .mp-farm-candle { animation: none; opacity: 0; }
.mp-farm-unplugged .mp-farm-led { animation: none; fill: #555c6e; }
.mp-farm-unplugged::after {
    content: '🔌';
    position: absolute;
    top: -14px;
    right: -6px;
    font-size: 16px;
}
@keyframes mpFarmUnplug {
    0%, 60% { transform: none; opacity: 1; filter: grayscale(1) brightness(0.7); }
    100% { transform: scale(0.3); opacity: 0; filter: grayscale(1) brightness(0.7); }
}

.mp-farm-more {
    align-self: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--mp-gold);
    color: #1b1b1b;
    font: 800 12px var(--font-main);
    font-variant-numeric: tabular-nums;
}
.mp-farm-more[hidden] { display: none; }

@media (max-width: 600px) {
    .mp-printers { top: 48px; max-width: 70%; }
    .mp-farm-printer { width: 30px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .mp-farm-candle, .mp-farm-led, .mp-farm-new { animation: none; }
    .mp-farm-candle { transform: none; }
    .mp-farm-unplugged { animation-name: mpHitFade; }
}
