:root {
    --border: rgba(255, 255, 255, 0.14);
    --text: rgba(255, 255, 255, 0.96);
    --muted: rgba(255, 255, 255, 0.68);

    --green: #00ff85;
    --green-glow: rgba(0, 255, 133, 0.45);

    --red: #ff375f;
    --red-glow: rgba(255, 55, 95, 0.45);

    --screen-padding: 14px;
    --screen-radius: 22px;

    --top-h: 14vh;
    --center-h: 56vh;
    --bottom-h: 30vh;

    --top-inner-gap: 14px;
    --dock-gap: 14px;
    --dock-pad-x: 16px;
    --dock-pad-y: 16px;
    --control-radius: 22px;
}

* {
    box-sizing: border-box;
}

/* =========================================
   DISABLE TEXT SELECTION IN GAMEPLAY
========================================= */
.gameplay-stage,
.stage-inner,
.stage-inner * {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.08), transparent 32%),
        linear-gradient(180deg, #07101a 0%, #04060a 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--screen-padding);
}

.trendline-run-shell {
    width: 100%;
    height: calc(100dvh - (var(--screen-padding) * 2));
    border: 1px solid var(--border);
    border-radius: var(--screen-radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(0, 0, 0, 0.45);
    box-shadow:
        0 0 24px rgba(255, 255, 255, 0.06),
        0 0 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* =========================================================
   TOP BAR
========================================================= */
.top-bar {
    flex: 0 0 var(--top-h);
    min-height: 92px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(300px, 1.45fr) minmax(132px, 1fr);
    align-items: stretch;
    gap: var(--top-inner-gap);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
}

.top-button {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.10), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: #fff;
    font-weight: 800;
    font-size: clamp(0.88rem, 1vw, 1rem);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 8px 22px rgba(0, 0, 0, 0.24);
    transition:
        transform 0.15s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease,
        border-color 0.18s ease;
}

.top-button:hover {
    filter: brightness(1.05);
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.10), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
}

.top-button:active {
    transform: translateY(1px) scale(0.99);
}

.trendline-audio-wrap {
    width: min(100%, 760px);
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 260ms ease, transform 260ms ease;
}

.trendline-audio-wrap.is-visible {
    opacity: 1;
    transform: scale(1);
}

.trendline-audio-row {
    width: min(720px, 92%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 2px solid white;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.trendline-audio-row-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.trendline-audio-row-title {
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    font-weight: 800;
    color: #fff;
}

.trendline-audio-row-status {
    opacity: 0.9;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: rgba(255, 255, 255, 0.9);
}


.ios-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.ios-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ios-switch .track {
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    transition: background 180ms ease, box-shadow 180ms ease;
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
}

.ios-switch .knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.28),
        inset 0 0 3px rgba(255, 255, 255, 0.65);
    transition: transform 180ms ease;
}

.ios-switch input:checked+.track {
    background: rgba(0, 255, 133, 0.42);
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.08),
        0 0 12px rgba(0, 255, 133, 0.24);
}

.ios-switch input:checked+.track .knob {
    transform: translateX(26px);
}

.coins-button {
    justify-self: stretch;
    max-width: none;
    padding: 0 18px;
}

.top-button-text {
    position: relative;
    top: 1px;
}

.top-status-panel {
    height: 100%;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.10), transparent 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.top-status-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.top-status-divider {
    width: 68%;
    height: 1px;
    margin: 7px 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.18),
            transparent);
}

.top-status-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 3px;
    white-space: nowrap;
}

.top-status-value {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.balance-display {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.positive {
    color: var(--green);
    text-shadow: 0 0 10px rgba(0, 255, 133, 0.18);
}

.assets-button-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.control-tile {
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.10), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 8px 22px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    transition:
        transform 0.15s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease,
        border-color 0.18s ease;
}

.control-tile:hover {
    filter: brightness(1.05);
}

.control-tile-half {
    flex: 1 1 50%;
    min-height: 0;
    width: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    font-weight: 800;
    font-size: clamp(0.88rem, 1vw, 1rem);
    letter-spacing: 0.10em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    padding: 0 12px;
    transition:
        background 0.18s ease,
        opacity 0.18s ease;
}

.control-tile-half:hover {
    background: rgba(255, 255, 255, 0.03);
}

.control-tile-half:active {
    background: rgba(255, 255, 255, 0.045);
}

.control-tile:has(.control-tile-half:active) {
    transform: translateY(1px) scale(0.99);
}

.control-tile-half-top {
    border-top-left-radius: var(--control-radius);
    border-top-right-radius: var(--control-radius);
}

.control-tile-half-bottom {
    border-bottom-left-radius: var(--control-radius);
    border-bottom-right-radius: var(--control-radius);
}

.control-tile-divider {
    position: absolute;
    left: 12%;
    right: 12%;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.18),
            transparent);
    z-index: 2;
    pointer-events: none;
}

.control-tile-text {
    position: relative;
    top: 1px;
    z-index: 2;
}

.control-tile-half-bottom .control-tile-text {
    transition: opacity 0.18s ease, text-shadow 0.18s ease;
}

.control-tile-strike {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 4.8em;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.92) 16%,
            rgba(255, 255, 255, 0.98) 50%,
            rgba(255, 255, 255, 0.92) 84%,
            transparent 100%);
    transform: translate(-50%, -50%) scaleX(0.72);
    transform-origin: center;
    opacity: 0;
    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.16),
        0 0 14px rgba(255, 255, 255, 0.08);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
    pointer-events: none;
    z-index: 3;
}

.control-tile-half-bottom.is-muted {
    opacity: 0.78;
}

.control-tile-half-bottom.is-muted .control-tile-text {
    opacity: 0.82;
}

.control-tile-half-bottom.is-muted .control-tile-strike {
    opacity: 1;
    transform: translate(-50%, -50%) scaleX(1);
}

.control-tile-half:focus-visible {
    outline: none;
}

.control-tile:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-offset: -2px;
}

/* =========================================================
   GAMEPLAY AREA
========================================================= */
.gameplay-stage {
    flex: 0 0 var(--center-h);
    min-height: 240px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.04), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.01));
}

.stage-inner {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 18px 18px 22px;
    cursor: default;
}

.trendline-branding {
    position: absolute;
    left: 50%;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    text-align: center;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.050);
    font-weight: 500;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1;
    display: inline-block;
    font-size: clamp(1.05rem, 2.2vw, 1.9rem);
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.040),
        0 0 18px rgba(255, 255, 255, 0.020);
    opacity: 0;
    transform: translateX(-50%) rotate(-3deg);
    -webkit-transform: translateX(-50%) rotate(-3deg);
    transform-origin: center center;
    will-change: transform, opacity;
    transition:
        top 260ms ease,
        bottom 260ms ease,
        opacity 220ms ease,
        transform 220ms ease;
}

.trendline-branding::after {
    content: attr(data-brand);
    position: absolute;
    inset: 0;
    display: block;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;

    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0.00) 0%,
            rgba(255, 255, 255, 0.00) 36%,
            rgba(255, 255, 255, 0.10) 45%,
            rgba(255, 255, 255, 0.78) 50%,
            rgba(255, 255, 255, 0.10) 55%,
            rgba(255, 255, 255, 0.00) 64%,
            rgba(255, 255, 255, 0.00) 100%);

    background-repeat: no-repeat;
    background-size: 220% 100%;
    background-position: 140% 0%;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.12),
        0 0 14px rgba(255, 255, 255, 0.06);

    will-change: opacity, background-position;
}

.stage-inner.live-running .trendline-branding {
    animation: trendlineBrandingBreathe 2.4s linear infinite;
}

.stage-inner.live-running .trendline-branding::after {
    animation: trendlineBrandingSweepRTL 2.4s linear infinite;
}

.stage-inner.mode-long .trendline-branding {
    top: 7%;
    bottom: auto;
}

.stage-inner.mode-short .trendline-branding {
    top: auto;
    bottom: 7%;
}

@keyframes trendlineBrandingBreathe {
    0% {
        opacity: 0.58;
        transform: translateX(-50%) rotate(-3deg) translateY(0) scale(1);
    }

    12% {
        opacity: 0.64;
        transform: translateX(-50%) rotate(-3deg) translateY(-0.4px) scale(1.003);
    }

    30% {
        opacity: 0.68;
        transform: translateX(-50%) rotate(-3deg) translateY(-0.7px) scale(1.005);
    }

    55% {
        opacity: 0.64;
        transform: translateX(-50%) rotate(-3deg) translateY(-0.3px) scale(1.003);
    }

    80% {
        opacity: 0.59;
        transform: translateX(-50%) rotate(-3deg) translateY(0) scale(1.001);
    }

    100% {
        opacity: 0.58;
        transform: translateX(-50%) rotate(-3deg) translateY(0) scale(1);
    }
}

@keyframes trendlineBrandingSweepRTL {
    0% {
        opacity: 0;
        background-position: 140% 0%;
    }

    10% {
        opacity: 0.20;
        background-position: 118% 0%;
    }

    24% {
        opacity: 0.46;
        background-position: 84% 0%;
    }

    40% {
        opacity: 0.42;
        background-position: 60% 0%;
    }

    58% {
        opacity: 0.22;
        background-position: 34% 0%;
    }

    78% {
        opacity: 0.08;
        background-position: 6% 0%;
    }

    100% {
        opacity: 0;
        background-position: -24% 0%;
    }
}

@keyframes trendlineBrandingBreatheMobilePortrait {
    0% {
        opacity: 0.46;
        transform: translateX(-50%) rotate(-2deg) translateY(0) scale(1);
    }

    18% {
        opacity: 0.50;
        transform: translateX(-50%) rotate(-2deg) translateY(-0.25px) scale(1.002);
    }

    38% {
        opacity: 0.54;
        transform: translateX(-50%) rotate(-2deg) translateY(-0.45px) scale(1.003);
    }

    62% {
        opacity: 0.50;
        transform: translateX(-50%) rotate(-2deg) translateY(-0.15px) scale(1.002);
    }

    84% {
        opacity: 0.47;
        transform: translateX(-50%) rotate(-2deg) translateY(0) scale(1.001);
    }

    100% {
        opacity: 0.46;
        transform: translateX(-50%) rotate(-2deg) translateY(0) scale(1);
    }
}

@keyframes trendlineBrandingSweepRTLMobilePortrait {
    0% {
        opacity: 0;
        background-position: 140% 0%;
    }

    14% {
        opacity: 0.12;
        background-position: 116% 0%;
    }

    30% {
        opacity: 0.30;
        background-position: 84% 0%;
    }

    46% {
        opacity: 0.26;
        background-position: 58% 0%;
    }

    64% {
        opacity: 0.12;
        background-position: 30% 0%;
    }

    82% {
        opacity: 0.04;
        background-position: 2% 0%;
    }

    100% {
        opacity: 0;
        background-position: -24% 0%;
    }
}

/* =========================================================
   PRE-START OVERLAY
========================================================= */

.instruction-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.instruction-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.instruction-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.prestart-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.prestart-title-lockup {
    position: absolute;
    top: 8%;
    left: 0;
    width: 100%;
    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    text-align: center;
    pointer-events: none;
}

/* Desktop-only SHORT overlay spacing fix */
@media (min-width: 641px) and (min-height: 501px) {
    .stage-inner.prestart-active.mode-short .prestart-title-lockup {
        top: 12%;
    }
}

.prestart-game-title {
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.20em;
    color: rgba(255, 255, 255, 0.98);
    font-size: clamp(1.15rem, 2.6vw, 2.15rem);
    line-height: 1;
    white-space: nowrap;
    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.22),
        0 0 30px rgba(255, 255, 255, 0.10);
}

.prestart-title-lockup .prestart-copy {
    position: static;
    width: auto;
    font-size: clamp(0.72rem, 1.15vw, 1rem);
    letter-spacing: 0.18em;
    opacity: 0.86;
}

.prestart-copy {
    position: absolute;
    top: 10%;
    left: 0;
    width: 100%;
    z-index: 3;

    display: flex;
    justify-content: center;
    align-items: center;

    text-align: center;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.96);
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.18),
        0 0 24px rgba(255, 255, 255, 0.08);

    font-size: clamp(1rem, 2.2vw, 1.8rem);
    white-space: nowrap;
    animation: prestartCopyPulse 1.65s ease-in-out infinite;
    pointer-events: none;
}

@keyframes prestartCopyPulse {

    0%,
    100% {
        opacity: 0.72;
        transform: scale(1);
        text-shadow:
            0 0 8px rgba(255, 255, 255, 0.16),
            0 0 18px rgba(255, 255, 255, 0.08);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
        text-shadow:
            0 0 16px rgba(255, 255, 255, 0.34),
            0 0 34px rgba(255, 255, 255, 0.18);
    }
}

.prestart-tap-cue {
    position: absolute;
    top: 6.8%;
    left: 50%;
    width: clamp(150px, 28vw, 220px);
    height: auto;
    transform: translateX(-50%);
    z-index: 3;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
}

.prestart-game-title-mobile {
    font-size: clamp(0.86rem, 4vw, 1.15rem);
    letter-spacing: 0.16em;
}

.prestart-tap-cue.is-visible {
    display: flex;
    opacity: 1;
    animation: prestartTapCueFadeIn 320ms ease-out forwards;
}

@keyframes prestartTapCueFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.prestart-tap-word-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prestart-tap-word {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.96);
    text-align: center;
    white-space: nowrap;
    font-size: clamp(1rem, 2.2vw, 1.8rem);
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.18),
        0 0 24px rgba(255, 255, 255, 0.08);
    transform-origin: center center;
    animation: prestartCopyPulse 1.65s ease-in-out infinite;
    will-change: transform, opacity, text-shadow;
}

.prestart-trendline-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.prestart-coins {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.prestart-coin {
    position: absolute;
    width: clamp(34px, 4.5vw, 54px);
    height: clamp(34px, 4.5vw, 54px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    font-size: clamp(0.9rem, 1.4vw, 1.15rem);
    color: #2d1f00;
    background:
        radial-gradient(circle at 32% 28%, #fff4b0 0%, #ffe27a 22%, #f7c948 48%, #d99a1b 76%, #8a5c00 100%);
    border: 1px solid rgba(255, 230, 140, 0.95);
    box-shadow:
        0 0 10px rgba(255, 210, 80, 0.35),
        0 0 18px rgba(255, 210, 80, 0.18),
        inset 0 0 6px rgba(255, 255, 255, 0.35);
    animation:
        prestartCoinSpin 1.8s linear infinite,
        prestartCoinFloat 2.2s ease-in-out infinite;
    transform-style: preserve-3d;
}

.prestart-coin.preview-start-coin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.prestart-coin::before {
    content: "";
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    border: 1px solid rgba(140, 90, 0, 0.45);
    pointer-events: none;
}

@keyframes prestartCoinSpin {
    0% {
        transform: rotateY(0deg) scale(1);
    }

    50% {
        transform: rotateY(90deg) scale(0.86);
    }

    100% {
        transform: rotateY(180deg) scale(1);
    }
}

@keyframes prestartCoinFloat {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -6px;
    }
}

/* hide placeholder while overlay active */
.stage-inner.prestart-active .trendline-branding {
    opacity: 0;
}

.liquidation-line {
    position: absolute;
    left: 3%;
    right: 3%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 55, 95, 0.26) 12%,
            rgba(255, 55, 95, 0.42) 50%,
            rgba(255, 55, 95, 0.26) 88%,
            transparent 100%);
    box-shadow:
        0 0 6px rgba(255, 55, 95, 0.10),
        0 0 12px rgba(255, 55, 95, 0.06);
    transition: top 260ms ease;
    transform-origin: center center;
    opacity: 1;
    z-index: 2;
    pointer-events: none;
}

.liquidation-pulse-line {
    position: absolute;
    left: 3%;
    right: 3%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 55, 95, 0.82) 18%,
            rgba(255, 55, 95, 1) 50%,
            rgba(255, 55, 95, 0.82) 82%,
            transparent 100%);
    box-shadow:
        0 0 10px rgba(255, 55, 95, 0.28),
        0 0 18px rgba(255, 55, 95, 0.16);
    transition: top 260ms ease;
    transform-origin: center center;
    transform: scaleX(0.02);
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    will-change: transform, opacity;
}

.liquidation-label {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 55, 95, 0.88);
    font-size: clamp(0.72rem, 1vw, 0.9rem);
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow:
        0 0 8px rgba(255, 55, 95, 0.16),
        0 0 16px rgba(255, 55, 95, 0.08);
    transition: top 260ms ease;
    transform-origin: center center;
    opacity: 0.78;
    z-index: 4;
    pointer-events: none;
    will-change: transform, opacity;
    user-select: none;
    -webkit-user-select: none;
    line-height: 1;
}

@keyframes liquidationPulseExpand {
    0% {
        transform: scaleX(0.02);
        opacity: 0;
    }

    8% {
        transform: scaleX(0.14);
        opacity: 0.95;
    }

    20% {
        transform: scaleX(1);
        opacity: 1;
    }

    50% {
        transform: scaleX(1);
        opacity: 0.92;
    }

    78% {
        transform: scaleX(1);
        opacity: 0.16;
    }

    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

@keyframes liquidationLabelReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.985);
    }

    20% {
        opacity: 0;
        transform: translateX(-50%) scale(0.985);
    }

    28% {
        opacity: 0.82;
        transform: translateX(-50%) scale(1);
    }

    38% {
        opacity: 1;
        transform: translateX(-50%) scale(1.03);
    }

    58% {
        opacity: 0.94;
        transform: translateX(-50%) scale(1);
    }

    78% {
        opacity: 0;
        transform: translateX(-50%) scale(0.99);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.99);
    }
}

/* LONG = line at very bottom, label underneath */
.stage-inner.mode-long .liquidation-line,
.stage-inner.mode-long .liquidation-pulse-line {
    top: 92%;
}

.stage-inner.mode-long .liquidation-label {
    top: calc(92% + 10px);
}

/* SHORT = line at very top, label above */
.stage-inner.mode-short .liquidation-line,
.stage-inner.mode-short .liquidation-pulse-line {
    top: 8%;
}

.stage-inner.mode-short .liquidation-label {
    top: calc(8% - 24px);
}

.prestart-trendline-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    transform-origin: center center;
    --prestart-trendline-stroke: 4px;
    --prestart-trendline-under-stroke: 8px;
}

.prestart-trendline-under,
.prestart-trendline-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    opacity: 1;
}

.prestart-trendline-under {
    stroke: rgba(0, 0, 0, 0.74);
    stroke-width: var(--prestart-trendline-under-stroke, 8px);
    opacity: 0.92;
}

.prestart-trendline-path {
    stroke-width: var(--prestart-trendline-stroke, 4px);
    transition:
        stroke 220ms ease,
        filter 220ms ease,
        opacity 220ms ease;
}

.prestart-trendline-path.long {
    stroke: rgba(0, 255, 120, 0.92);
    filter:
        drop-shadow(0 0 6px rgba(0, 255, 120, 0.62)) drop-shadow(0 0 12px rgba(0, 255, 120, 0.34));
}

.prestart-trendline-path.short {
    stroke: rgba(255, 77, 109, 0.92);
    filter:
        drop-shadow(0 0 6px rgba(255, 77, 109, 0.62)) drop-shadow(0 0 12px rgba(255, 77, 109, 0.34));
}

.prestart-trendline-svg.is-breathing {
    animation: prestartTrendlineFloat 2.8s ease-in-out infinite;
}

.prestart-trendline-path.is-breathing,
.prestart-trendline-under.is-breathing {
    animation: prestartTrendlineGlowPulse 2.35s ease-in-out infinite;
}

@keyframes prestartTrendlineFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-1.4px);
    }
}

@keyframes prestartTrendlineGlowPulse {

    0%,
    100% {
        opacity: 0.90;
    }

    50% {
        opacity: 1;
    }
}

.live-run-layer {
    position: absolute;
    inset: 0;
    z-index: 12;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
}

.live-run-layer.is-visible {
    opacity: 1;
}

.live-run-coins {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 7;
}

.live-run-coin {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 3;
    transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
    will-change: transform;
}

.live-run-coin-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    font-size: clamp(0.9rem, 1.4vw, 1.15rem);
    color: #2d1f00;
    background:
        radial-gradient(circle at 32% 28%, #fff4b0 0%, #ffe27a 22%, #f7c948 48%, #d99a1b 76%, #8a5c00 100%);
    border: 1px solid rgba(255, 230, 140, 0.95);
    box-shadow:
        0 0 10px rgba(255, 210, 80, 0.35),
        0 0 18px rgba(255, 210, 80, 0.18),
        inset 0 0 6px rgba(255, 255, 255, 0.35);
    transform-style: preserve-3d;
    animation:
        liveCoinSpin 1.8s linear infinite,
        liveCoinFloat 2.2s ease-in-out infinite;
}

.live-run-coin-inner::before {
    content: "";
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    border: 1px solid rgba(140, 90, 0, 0.45);
    pointer-events: none;
}

@keyframes liveCoinSpin {
    0% {
        transform: rotateY(0deg) scale(1);
    }

    50% {
        transform: rotateY(90deg) scale(0.72);
    }

    100% {
        transform: rotateY(180deg) scale(1);
    }
}

@keyframes liveCoinFloat {

    0%,
    100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -6px;
    }
}

.live-run-tip {
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(10px, 1.1vw, 14px);
    height: clamp(10px, 1.1vw, 14px);
    border-radius: 50%;
    background: #fff;
    transform: translate3d(-9999px, -9999px, 0) translate(-50%, -50%);
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.72),
        0 0 18px rgba(255, 255, 255, 0.34),
        0 0 26px rgba(255, 255, 255, 0.18);
    pointer-events: none;
    z-index: 5;
}

/* Electrical Pulse on coin collect */

.live-run-spark-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    z-index: 6;
}

.live-run-spark-svg.is-visible {
    opacity: 1;
}

.live-run-spark-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-width: 7px;
    opacity: 0.98;
}

.live-run-spark-svg.long .live-run-spark-path {
    stroke: rgba(0, 255, 120, 1);
    filter:
        drop-shadow(0 0 5px rgba(0, 255, 120, 0.85)) drop-shadow(0 0 12px rgba(0, 255, 120, 0.42));
}

.live-run-spark-svg.short .live-run-spark-path {
    stroke: rgba(255, 77, 109, 1);
    filter:
        drop-shadow(0 0 5px rgba(255, 77, 109, 0.85)) drop-shadow(0 0 12px rgba(255, 77, 109, 0.42));
}

@media (max-width: 640px) and (orientation: portrait) {
    .live-run-spark-path {
        stroke-width: 5.5px;
    }
}

@media screen and (orientation: landscape) and (max-height: 500px) {
    .live-run-spark-path {
        stroke-width: 4.5px;
    }
}

.live-run-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    --prestart-trendline-stroke: 4px;
    --prestart-trendline-under-stroke: 8px;
}

@media (max-width: 640px) and (orientation: portrait) {
    .live-run-svg {
        --prestart-trendline-stroke: 3.2px;
        --prestart-trendline-under-stroke: 6.4px;
    }

}

@media screen and (orientation: landscape) and (max-height: 500px) {
    .live-run-svg {
        --prestart-trendline-stroke: 3.6px;
        --prestart-trendline-under-stroke: 7.2px;
    }

    .live-run-tip {
        width: 8px;
        height: 8px;
    }

}

.run-start-pulse {
    animation: runStartPulse 220ms ease-out;
}

@keyframes runStartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.985);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 640px) and (orientation: portrait) {

    .trendline-branding {
        font-size: clamp(0.78rem, 3.4vw, 1.05rem);
        letter-spacing: 0.12em;
        color: rgba(255, 255, 255, 0.040);
        text-shadow:
            0 0 6px rgba(255, 255, 255, 0.026),
            0 0 12px rgba(255, 255, 255, 0.014);
        transform: translateX(-50%) rotate(-2deg);
        -webkit-transform: translateX(-50%) rotate(-2deg);
    }

    .trendline-branding::after {
        background-image: linear-gradient(90deg,
                rgba(255, 255, 255, 0.00) 0%,
                rgba(255, 255, 255, 0.00) 38%,
                rgba(255, 255, 255, 0.09) 46%,
                rgba(255, 255, 255, 0.64) 50%,
                rgba(255, 255, 255, 0.09) 54%,
                rgba(255, 255, 255, 0.00) 62%,
                rgba(255, 255, 255, 0.00) 100%);
        text-shadow:
            0 0 5px rgba(255, 255, 255, 0.10),
            0 0 12px rgba(255, 255, 255, 0.045);
    }

    .stage-inner.live-running .trendline-branding {
        animation: trendlineBrandingBreatheMobilePortrait 2.8s linear infinite;
    }

    .stage-inner.live-running .trendline-branding::after {
        animation: trendlineBrandingSweepRTLMobilePortrait 2.8s linear infinite;
    }

    .prestart-copy {
        top: 9%;
        width: 100%;
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    .prestart-tap-cue {
        top: 6.8%;
        width: clamp(150px, 42vw, 220px);
        gap: 8px;
    }

    .prestart-tap-word {
        font-size: 0.95rem;
        letter-spacing: 0.14em;
    }

    .live-run-coin-inner {
        font-size: 0.82rem;
    }

    .prestart-coin {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }

    .prestart-trendline-svg {
        --prestart-trendline-stroke: 3.2px;
        --prestart-trendline-under-stroke: 6.4px;
    }

    .stage-inner.prestart-active .liquidation-line,
    .stage-inner.prestart-active .liquidation-pulse-line,
    .stage-inner.prestart-active .liquidation-label {
        opacity: 0;
        pointer-events: none;
    }

    .stage-inner.mode-long .liquidation-line,
    .stage-inner.mode-long .liquidation-pulse-line {
        top: 93%;
    }

    .stage-inner.mode-long .liquidation-label {
        top: calc(93% - 18px);
    }

    .stage-inner.mode-short .liquidation-line,
    .stage-inner.mode-short .liquidation-pulse-line {
        top: 7%;
    }

    .stage-inner.mode-short .liquidation-label {
        top: calc(7% + 10px);
    }

}

/* Short landscape */
@media screen and (orientation: landscape) and (max-height: 500px) {

    .prestart-tap-cue {
        top: 5.2%;
        width: 116px;
        height: auto;
        gap: 3px;
    }

    .prestart-game-title-mobile {
        font-size: 0.48rem;
        letter-spacing: 0.10em;
    }

    .prestart-copy {
        top: 8%;
        width: 100%;
        font-size: 0.52rem;
        letter-spacing: 0.1em;
    }

    .prestart-tap-word {
        font-size: 0.44rem;
        letter-spacing: 0.10em;
    }

    .live-run-coin-inner {
        font-size: 0.42rem;
    }

    .prestart-coin {
        width: 18px;
        height: 18px;
        font-size: 0.42rem;
    }

    .stage-inner.prestart-active .liquidation-line,
    .stage-inner.prestart-active .liquidation-pulse-line,
    .stage-inner.prestart-active .liquidation-label {
        opacity: 0;
        pointer-events: none;
    }

    .stage-inner.mode-long .liquidation-line,
    .stage-inner.mode-long .liquidation-pulse-line {
        top: 93%;
    }

    .stage-inner.mode-long .liquidation-label {
        top: calc(93% - 10px);
    }

    .stage-inner.mode-short .liquidation-line,
    .stage-inner.mode-short .liquidation-pulse-line {
        top: 7%;
    }

    .stage-inner.mode-short .liquidation-label {
        top: calc(7% + 6px);
    }

    .prestart-trendline-svg {
        --prestart-trendline-stroke: 3.6px;
        --prestart-trendline-under-stroke: 7.2px;
    }

}

/* =========================================================
   BOTTOM ACTION BAND
========================================================= */
.bottom-action-band {
    flex: 0 0 var(--bottom-h);
    min-height: 180px;
    padding: 12px 14px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.025));
    position: relative;
    overflow: hidden;
}

.bottom-action-dock {
    position: relative;
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: var(--dock-pad-y) var(--dock-pad-x);
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 296px) minmax(0, 1fr);
    align-items: stretch;
    gap: var(--dock-gap);
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.04),
        0 -8px 26px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.trade-button {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border);
    color: #fff;
    font-weight: 800;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    position: relative;
    overflow: hidden;
    z-index: 2;
    align-self: stretch;
    transition:
        transform 0.15s ease,
        filter 0.18s ease;
}

.trade-button:active {
    transform: translateY(1px) scale(0.995);
}

.trade-button span {
    position: relative;
    z-index: 2;
}

.trade-button::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    pointer-events: none;
}

.trade-button.long {
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.15), transparent 50%),
        linear-gradient(180deg, rgba(0, 255, 133, 0.30), rgba(0, 255, 133, 0.12));
    border-color: rgba(0, 255, 133, 0.55);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.08),
        0 0 18px var(--green-glow);
}

.trade-button.short {
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.15), transparent 50%),
        linear-gradient(180deg, rgba(255, 55, 95, 0.30), rgba(255, 55, 95, 0.12));
    border-color: rgba(255, 55, 95, 0.55);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.08),
        0 0 18px var(--red-glow);
}

.trade-button:hover {
    filter: brightness(1.06);
}

.trade-button.is-selected {
    transform: scale(1.01);
    filter: brightness(1.08);
}

/* =========================================================
   DIAL SLOT
========================================================= */
.dial-slot {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 4;
    padding: 4px 2px 8px;
}

.dial-wrapper {
    width: min(100%, 100%);
    height: min(calc(100% - 8px), 312px);
    aspect-ratio: 1 / 1;
    max-height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.bet-dial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.10), transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015) 60%, rgba(0, 0, 0, 0.22) 100%);
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.08),
        0 0 28px rgba(255, 255, 255, 0.12),
        0 12px 24px rgba(0, 0, 0, 0.24);
    position: relative;
}

.dial-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.dial-value {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform-origin: center center;
    text-align: center;
    font-size: clamp(0.58rem, 0.9vw, 0.82rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
    user-select: none;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        color 0.18s ease,
        text-shadow 0.18s ease,
        opacity 0.18s ease,
        filter 0.18s ease;
    background: none;
    border: none;
    padding: 0;
    overflow: visible;
}

.dial-value span {
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(34px, 3.8vw, 50px);
    height: clamp(34px, 3.8vw, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.05),
        0 0 10px rgba(255, 255, 255, 0.06),
        0 6px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
    line-height: 1;
    transform: translate(-50%, -50%);
}

.dial-value:hover {
    filter: brightness(1.08);
}

.dial-value:hover span {
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.08),
        0 0 12px rgba(255, 255, 255, 0.10),
        0 8px 18px rgba(0, 0, 0, 0.34);
}

.dial-value.is-selected {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.28);
}

.dial-value.is-selected span {
    animation: dialChipPulse 1.8s ease-in-out infinite;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 58%),
        linear-gradient(180deg, rgba(0, 255, 133, 0.28), rgba(0, 255, 133, 0.10));
    border-color: rgba(0, 255, 133, 0.55);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.08),
        0 0 14px rgba(0, 255, 133, 0.22),
        0 0 28px rgba(0, 255, 133, 0.12),
        0 8px 18px rgba(0, 0, 0, 0.34);
}

.dial-value:not(.is-selected) {
    opacity: 0.86;
}

@keyframes dialChipPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.04);
    }
}

.dial-center-button {
    position: absolute;
    inset: 50%;
    width: 42%;
    height: 42%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(180deg, rgba(0, 255, 133, 0.42), rgba(0, 255, 133, 0.18));
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.10),
        0 0 18px rgba(0, 255, 133, 0.24);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 900;
    font-size: clamp(0.9rem, 1.35vw, 1.25rem);
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    text-transform: none;
    padding: 6px;
    line-height: 1;
    user-select: none;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition:
        transform 0.15s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease,
        background 0.18s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dial-center-button.bet-size-2 {
    font-size: clamp(1.05rem, 1.7vw, 1.5rem);
}

.dial-center-button.bet-size-3 {
    font-size: clamp(0.98rem, 1.55vw, 1.35rem);
}

.dial-center-button.bet-size-4 {
    font-size: clamp(0.9rem, 1.35vw, 1.18rem);
}

.dial-center-button.bet-size-5 {
    font-size: clamp(0.72rem, 1.05vw, 0.96rem);
}

.dial-center-button:hover {
    filter: brightness(1.05);
}

.dial-center-button:active {
    transform: translate(-50%, -50%) scale(0.985);
}

/* =========================================================
   TABLET / SMALL DESKTOP
========================================================= */
@media (max-width: 980px) {
    :root {
        --screen-padding: 10px;
        --top-h: 15vh;
        --center-h: 55vh;
        --bottom-h: 30vh;
        --top-inner-gap: 10px;
        --dock-gap: 10px;
        --dock-pad-x: 12px;
        --dock-pad-y: 14px;
    }

    .top-bar {
        grid-template-columns: minmax(100px, 1fr) minmax(220px, 1.55fr) minmax(100px, 1fr);
        padding: 10px 12px;
    }

    .top-button {
        font-size: 0.82rem;
    }

    .top-status-panel {
        padding: 10px 14px;
    }

    .bottom-action-band {
        min-height: 170px;
    }

    .trade-button {
        font-size: clamp(0.95rem, 2vw, 1.15rem);
    }

    .dial-value span {
        width: 44px;
        height: 44px;
        font-size: 0.72rem;
    }

    .bottom-action-dock {
        grid-template-columns: minmax(0, 1fr) clamp(190px, 26vw, 250px) minmax(0, 1fr);
    }

    .dial-wrapper {
        height: min(calc(100% - 6px), 280px);
    }
}

/* =========================================================
   TRENDLINE RUN STORE / FAUCET OVERLAY
========================================================= */

.stage-inner.store-active .liquidation-label,
.stage-inner.store-active .liquidation-line,
.stage-inner.store-active .liquidation-pulse-line,
.stage-inner.store-active .trendline-branding,
.stage-inner.store-active .instruction-overlay {
    opacity: 0;
    pointer-events: none;
}

.stage-store-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.stage-store-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.stage-store-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.06), transparent 36%),
        linear-gradient(180deg, rgba(3, 7, 12, 0.82), rgba(3, 7, 12, 0.92));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stage-store-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.08),
        0 0 16px rgba(255, 255, 255, 0.14);
    animation: stageStoreClosePulse 1.7s ease-in-out infinite;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.stage-store-close:hover {
    filter: brightness(1.08);
}

.stage-store-close:active {
    transform: scale(0.96);
}

@keyframes stageStoreClosePulse {

    0%,
    100% {
        box-shadow:
            inset 0 0 10px rgba(255, 255, 255, 0.08),
            0 0 16px rgba(255, 255, 255, 0.14);
    }

    50% {
        box-shadow:
            inset 0 0 12px rgba(255, 255, 255, 0.11),
            0 0 22px rgba(255, 255, 255, 0.22);
    }
}

.stage-store-panel {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 26px 22px 22px;
    overflow: hidden;
}

.stage-store-header {
    width: 100%;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    margin-bottom: 16px;
    padding-top: 4px;
}

.stage-store-kicker {
    font-size: clamp(0.72rem, 0.95vw, 0.88rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.66);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.stage-store-title {
    font-size: clamp(1.25rem, 2.3vw, 2.1rem);
    font-weight: 1000;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
}

.stage-store-subtitle {
    min-height: 1.2em;
    font-size: clamp(0.82rem, 1.05vw, 1rem);
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.stage-store-body {
    width: 100%;
    max-width: 980px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    /* 🔥 key change */
    justify-content: center;
    position: relative;
    overflow-y: auto;
    /* vertical scroll */
    overflow-x: hidden;
    /* no horizontal scroll */
    padding: 6px 4px 12px;
    /* extra bottom breathing room */
}


/* Treasure grid */
.trendline-store-treasure-grid {
    width: min(100%, 900px);
    display: grid;
    gap: clamp(14px, 1.8vw, 22px);
    justify-content: center;
    align-content: center;
}

.trendline-store-treasure-grid.normal-mode {
    grid-template-columns: repeat(4, minmax(84px, 1fr));
    max-width: 760px;
}

.trendline-store-treasure-grid.rescue-mode {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    max-width: 760px;
}

.trendline-treasure-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.10), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 12px 26px rgba(0, 0, 0, 0.34);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease,
        opacity 0.18s ease;
    overflow: hidden;
}

.trendline-treasure-item:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.07),
        0 0 20px rgba(255, 255, 255, 0.12),
        0 16px 28px rgba(0, 0, 0, 0.38);
    filter: brightness(1.06);
}

.trendline-treasure-item.is-redeemed {
    cursor: default;
    opacity: 0.28;
    transform: scale(0.97);
    filter: grayscale(1);
}

.trendline-treasure-item.is-redeemed:hover {
    transform: scale(0.97);
    filter: grayscale(1);
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.03),
        0 8px 18px rgba(0, 0, 0, 0.22);
}

.trendline-treasure-icon {
    position: absolute;
    inset: 14%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.18)) drop-shadow(0 0 18px rgba(255, 255, 255, 0.08));
    transition: opacity 0.18s ease;
}

.trendline-treasure-item.is-redeemed .trendline-treasure-icon {
    opacity: 0.14;
}

.trendline-treasure-value {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    font-size: clamp(0.72rem, 0.95vw, 0.92rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.18);
    white-space: nowrap;
}

.trendline-treasure-popup {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(0.85rem, 1.2vw, 1.08rem);
    font-weight: 1000;
    color: var(--green);
    text-shadow:
        0 0 10px rgba(0, 255, 133, 0.28),
        0 0 18px rgba(0, 255, 133, 0.18);
    pointer-events: none;
    animation: trendlineTreasurePopupFloat 820ms ease forwards;
}

@keyframes trendlineTreasurePopupFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.92);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -135%) scale(1.05);
    }
}

/* Timer */
.trendline-store-timer-wrap {
    width: min(100%, 720px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 260ms ease, transform 260ms ease;
}

.trendline-store-timer-wrap.is-visible {
    opacity: 1;
    transform: scale(1);
}

.trendline-store-timer-value {
    font-weight: 1000;
    color: #fff;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow:
        0 0 14px rgba(255, 255, 255, 0.12),
        0 0 30px rgba(255, 255, 255, 0.06);
    font-variant-numeric: tabular-nums;
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 1;
}

.trendline-store-timer-caption {
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
    text-align: center;
    font-size: clamp(0.72rem, 0.95vw, 0.9rem);
    opacity: 0.58;
    letter-spacing: 0.12em;
    line-height: 1.1;
}

.trendline-store-timer-wrap.is-fading-out {
    opacity: 0;
    transform: scale(0.96);
}

/* Buy coins */
.trendline-buy-coins-grid {
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: clamp(12px, 1.5vw, 20px);
    align-content: center;
}

.trendline-buy-coins-button {
    min-height: 108px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.12), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow:
        inset 0 0 12px rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(0, 0, 0, 0.28);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 16px;
    transition:
        transform 0.16s ease,
        filter 0.16s ease,
        box-shadow 0.18s ease;
}

.trendline-buy-coins-button:hover {
    transform: translateY(-4px);
    filter: brightness(1.05);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.07),
        0 0 18px rgba(255, 255, 255, 0.08),
        0 14px 26px rgba(0, 0, 0, 0.34);
}

.trendline-buy-coins-button:active {
    transform: translateY(-1px) scale(0.99);
}

.trendline-buy-coins-price {
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    font-weight: 1000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.trendline-buy-coins-amount {
    font-size: clamp(0.84rem, 1.05vw, 1rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.74);
    letter-spacing: 0.04em;
}

.trendline-store-empty {
    text-align: center;
    font-size: clamp(0.9rem, 1.05vw, 1rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
    max-width: 520px;
    line-height: 1.45;
}

.trendline-buy-coins-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 260ms ease, transform 260ms ease;
}

.trendline-buy-coins-wrap.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Center Dial Sphere Live Gameplay */

.dial-center-button.is-live-run {
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.22), transparent 55%),
        linear-gradient(180deg, rgba(0, 255, 133, 0.54), rgba(0, 255, 133, 0.24));
    border-color: rgba(0, 255, 133, 0.68);
    box-shadow:
        inset 0 0 14px rgba(255, 255, 255, 0.12),
        0 0 22px rgba(0, 255, 133, 0.28),
        0 0 34px rgba(0, 255, 133, 0.14);
    animation: dialCenterLivePulse 1.35s ease-in-out infinite;
}

.dial-center-button.is-live-run:hover {
    filter: brightness(1.08);
}

.dial-center-button.is-live-run:active {
    transform: translate(-50%, -50%) scale(0.96);
}

.stage-inner.live-running .liquidation-pulse-line {
    animation: liquidationPulseExpand 2.4s linear infinite;
}

.stage-inner.live-running .liquidation-label {
    animation: liquidationLabelReveal 2.4s linear infinite;
}

@keyframes dialCenterLivePulse {

    0%,
    100% {
        box-shadow:
            inset 0 0 14px rgba(255, 255, 255, 0.12),
            0 0 18px rgba(0, 255, 133, 0.22),
            0 0 28px rgba(0, 255, 133, 0.10);
    }

    50% {
        box-shadow:
            inset 0 0 16px rgba(255, 255, 255, 0.14),
            0 0 26px rgba(0, 255, 133, 0.34),
            0 0 40px rgba(0, 255, 133, 0.18);
    }
}

@media (hover: hover) and (pointer: fine) {
    .top-button:hover {
        filter: brightness(1.05);
        background:
            radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.10), transparent 56%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
    }

    .control-tile:hover {
        filter: brightness(1.05);
    }

    .control-tile-half:hover {
        background: rgba(255, 255, 255, 0.03);
    }

    .trade-button:hover {
        filter: brightness(1.06);
    }

    .dial-value:hover {
        filter: brightness(1.08);
    }

    .dial-value:hover span {
        box-shadow:
            inset 0 0 10px rgba(255, 255, 255, 0.08),
            0 0 12px rgba(255, 255, 255, 0.10),
            0 8px 18px rgba(0, 0, 0, 0.34);
    }

    .stage-store-close:hover {
        filter: brightness(1.08);
    }

    .trendline-treasure-item:hover {
        transform: translateY(-8px) scale(1.04);
        box-shadow:
            inset 0 0 14px rgba(255, 255, 255, 0.07),
            0 0 20px rgba(255, 255, 255, 0.12),
            0 16px 28px rgba(0, 0, 0, 0.38);
        filter: brightness(1.06);
    }

    .trendline-buy-coins-button:hover {
        transform: translateY(-4px);
        filter: brightness(1.05);
        box-shadow:
            inset 0 0 14px rgba(255, 255, 255, 0.07),
            0 0 18px rgba(255, 255, 255, 0.08),
            0 14px 26px rgba(0, 0, 0, 0.34);
    }

    .dial-center-button:hover {
        filter: brightness(1.05);
    }
}

/* Portrait */
@media (max-width: 640px) and (orientation: portrait) {
    .stage-store-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.35rem;
    }

    .stage-store-panel {
        padding: 18px 14px 14px;
    }

    .stage-store-header {
        margin-bottom: 6px;
        gap: 2px;
    }

    .stage-store-title {
        letter-spacing: 0.12em;
        font-size: clamp(1rem, 4vw, 1.4rem);
    }

    .stage-store-subtitle {
        font-size: 0.78rem;
    }

    .trendline-store-treasure-grid.normal-mode,
    .trendline-store-treasure-grid.rescue-mode {
        grid-template-columns: repeat(2, minmax(96px, 1fr));
        max-width: 320px;
        gap: 12px;
    }

    .trendline-treasure-item {
        border-radius: 18px;
    }

    .trendline-treasure-value {
        font-size: 0.68rem;
        bottom: 8px;
    }

    .trendline-buy-coins-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 360px;
    }

    .trendline-buy-coins-button {
        min-height: 88px;
        border-radius: 18px;
    }
}

/* Short landscape */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .stage-store-close {
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .stage-store-panel {
        padding: 10px 10px 8px;
    }

    .stage-store-header {
        margin-bottom: 6px;
        gap: 1px;
    }

    .stage-store-kicker {
        font-size: 0.42rem;
    }

    .stage-store-title {
        font-size: 0.76rem;
        letter-spacing: 0.1em;
    }

    .stage-store-subtitle {
        font-size: 0.42rem;
        min-height: 1em;
    }

    .trendline-store-treasure-grid.normal-mode,
    .trendline-store-treasure-grid.rescue-mode {
        grid-template-columns: repeat(4, minmax(48px, 1fr));
        gap: 8px;
        max-width: 320px;
    }

    .trendline-treasure-item {
        border-radius: 10px;
    }

    .trendline-treasure-value {
        font-size: 0.34rem;
        bottom: 4px;
    }

    .trendline-store-timer-value {
        font-size: 1rem;
        letter-spacing: 0.1em;
    }

    .trendline-store-timer-caption {
        font-size: 0.4rem;
    }

    .trendline-buy-coins-grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        gap: 8px;
        max-width: 280px;
    }

    .trendline-buy-coins-button {
        min-height: 52px;
        border-radius: 12px;
        padding: 8px;
        gap: 3px;
    }

    .trendline-buy-coins-price {
        font-size: 0.48rem;
    }

    .trendline-buy-coins-amount {
        font-size: 0.38rem;
    }

    .trendline-store-empty {
        font-size: 0.44rem;
        max-width: 220px;
    }
}

/* =========================================================
   MOBILE PORTRAIT
========================================================= */
@media (max-width: 640px) and (orientation: portrait) {
    :root {
        --top-h: 22vh;
        --center-h: 43vh;
        --bottom-h: 36vh;
        --top-inner-gap: 8px;
        --dock-gap: 8px;
    }

    .top-bar {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "status status"
            "assets coins";
        gap: 8px;
        padding: 10px;
        border-bottom: none;
        align-content: stretch;
    }

    .coins-button {
        grid-area: coins;
    }

    .top-status-panel {
        grid-area: status;
        min-height: 0;
        height: 100%;
        border-radius: 20px;
        padding: 12px 12px;
        justify-content: space-between;
    }

    .top-status-row {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 10px;
        min-height: 0;
    }

    .top-status-label {
        font-size: 0.64rem;
        margin-bottom: 0;
        line-height: 1;
        justify-self: start;
    }

    .top-status-value {
        font-size: 0.92rem;
        line-height: 1.05;
        justify-self: center;
        text-align: center;
    }

    .top-status-divider {
        width: 100%;
        margin: 6px 0;
    }

    .top-button {
        min-height: 50px;
        height: 100%;
        border-radius: 18px;
        font-size: 0.76rem;
        letter-spacing: 0.08em;
    }

    .gameplay-stage {
        min-height: 170px;
        border-top: 1px solid var(--border);
    }

    .stage-inner {
        padding: 14px 14px 18px;
    }

    .trendline-branding {
        font-size: clamp(0.82rem, 3.8vw, 1.15rem);
        letter-spacing: 0.14em;
        color: rgba(255, 255, 255, 0.058);
    }

    .liquidation-label {
        font-size: 0.68rem;
    }

    .bottom-action-band {
        padding: 10px 10px 14px;
        min-height: 260px;
    }

    .bottom-action-dock {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 48px minmax(0, 1fr);
        grid-template-areas:
            "long short"
            "dial dial";
        justify-items: stretch;
        align-items: stretch;
        padding: 10px 10px 10px;
        gap: 8px;
        border-radius: 24px;
        overflow: hidden;
    }

    .trade-button.long {
        grid-area: long;
        width: 100%;
        height: 48px;
        min-height: 48px;
        border-radius: 18px;
    }

    .trade-button.short {
        grid-area: short;
        width: 100%;
        height: 48px;
        min-height: 48px;
        border-radius: 18px;
    }

    .dial-slot {
        grid-area: dial;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 2px 0 4px;
        align-self: start;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .dial-wrapper {
        width: min(34vw, 132px);
        height: auto;
        max-height: calc(100% - 6px);
        margin: 0 auto;
    }

    .dial-value span {
        width: 24px;
        height: 24px;
        font-size: 0.40rem;
    }

    .dial-center-button {
        font-size: 0.54rem;
    }

    .assets-button-wrap {
        grid-area: assets;
    }

    .control-tile {
        border-radius: 18px;
    }

    .control-tile-half {
        font-size: 0.72rem;
        letter-spacing: 0.08em;
        padding: 0 8px;
    }

    .control-tile-divider {
        left: 10%;
        right: 10%;
    }

    .control-tile-strike {
        width: 4.5em;
        height: 2px;
    }

}

/* =========================================================
   MOBILE LANDSCAPE / SHORT HEIGHT
========================================================= */
@media screen and (orientation: landscape) and (max-height: 500px) {
    :root {
        --screen-padding: 4px;
        --top-inner-gap: 4px;
        --dock-gap: 3px;
    }

    html,
    body {
        overflow: hidden;
    }

    .trendline-run-shell {
        height: calc(100dvh - (var(--screen-padding) * 2));
    }

    .top-bar {
        flex: 0 0 36px;
        min-height: 36px;
        padding: 3px 4px;
        grid-template-columns: minmax(62px, 1fr) minmax(128px, 1.6fr) minmax(62px, 1fr);
        align-items: stretch;
        gap: 4px;
    }

    .top-button {
        min-height: 0;
        font-size: 0.48rem;
        border-radius: 8px;
        letter-spacing: 0.02em;
        gap: 2px;
        padding: 0 4px;
    }

    .top-status-panel {
        min-height: 0;
        height: 100%;
        padding: 2px 4px;
        border-radius: 8px;
        justify-content: center;
    }

    .top-status-row {
        width: 100%;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 4px;
    }

    .top-status-label {
        font-size: 0.32rem;
        margin-bottom: 0;
        line-height: 1;
        justify-self: start;
    }

    .top-status-value {
        font-size: 0.46rem;
        line-height: 1;
        justify-self: center;
        text-align: center;
    }

    .top-status-divider {
        width: 100%;
        margin: 1px 0;
    }

    .gameplay-stage {
        flex: 1 1 auto;
        min-height: 0;
    }

    .stage-inner {
        padding: 4px 6px;
    }

    .trendline-branding {
        font-size: 0.50rem;
        letter-spacing: 0.10em;
        color: rgba(255, 255, 255, 0.048);
    }

    .liquidation-label {
        font-size: 0.36rem;
    }

    .trade-button.long {
        grid-area: long;
        font-size: 0.40rem;
        border-radius: 8px;
        min-height: 0;
        height: 100%;
        padding: 0 3px;
    }

    .trade-button.short {
        grid-area: short;
        font-size: 0.40rem;
        border-radius: 8px;
        min-height: 0;
        height: 100%;
        padding: 0 3px;
    }

    .dial-value span {
        width: 10px;
        height: 10px;
        font-size: 0.15rem;
    }

    .dial-center-button {
        width: 38%;
        height: 38%;
        padding: 0 2px;
        letter-spacing: 0;
        line-height: 1;
        overflow: hidden;
        white-space: nowrap;
    }

    .dial-center-button.bet-size-2 {
        font-size: 0.30rem;
    }

    .dial-center-button.bet-size-3 {
        font-size: 0.26rem;
    }

    .dial-center-button.bet-size-4 {
        font-size: 0.22rem;
    }

    .dial-center-button.bet-size-5 {
        font-size: 0.17rem;
    }

    .bottom-action-band {
        flex: 0 0 68px;
        min-height: 68px;
        padding: 3px 4px 4px;
        overflow: hidden;
    }

    .bottom-action-dock {
        grid-template-columns: 1fr 70px 1fr;
        grid-template-rows: 1fr;
        grid-template-areas: "long dial short";
        gap: 3px;
        border-radius: 10px;
        padding: 3px;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        align-items: center;
        justify-items: stretch;
    }

    .dial-slot {
        grid-area: dial;
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dial-wrapper {
        width: 70px;
        height: 70px;
        max-height: 100%;
        margin: 0 auto;
    }

    .trendline-audio-row {
        width: min(300px, 96%);
        padding: 6px 8px;
        gap: 8px;
        border-width: 1px;
        border-radius: 8px;
    }

    .trendline-audio-row-title {
        font-size: 0.5rem;
    }

    .trendline-audio-row-status {
        font-size: 0.38rem;
    }

    .ios-switch .track {
        width: 32px;
        height: 18px;
    }

    .ios-switch .knob {
        width: 12px;
        height: 12px;
        top: 2px;
        left: 2px;
    }

    .ios-switch input:checked+.track .knob {
        transform: translateX(14px);
    }

    .stage-store-body {
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 10px;
    }

    .control-tile {
        border-radius: 8px;
    }

    .control-tile-half {
        font-size: 0.44rem;
        letter-spacing: 0.04em;
        padding: 0 4px;
    }

    .control-tile-divider {
        left: 8%;
        right: 8%;
    }

    .control-tile-strike {
        width: 4.2em;
        height: 1px;
    }

}