/* ═══════════════════════════════════════════════════════════
   MONEY SHOP TUTORIAL (ms-tutorial.js)
   Green & gold money theme — Jackbox-style motion graphics
   ═══════════════════════════════════════════════════════════ */

/* --- Overlay --- */
.mst-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #0a1a0f 0%, #0d2818 40%, #0a1a0f 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

/* Animated dot-grid */
.mst-overlay::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(circle, rgba(34, 197, 94, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: mstGridDrift 20s linear infinite;
    pointer-events: none;
}

@keyframes mstGridDrift {
    from { transform: translate(0, 0) rotate(0deg); }
    to   { transform: translate(40px, 40px) rotate(3deg); }
}

/* Floating glow orbs */
.mst-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(251, 191, 36, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 197, 94, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 40%);
    pointer-events: none;
    animation: mstGlowPulse 6s ease-in-out infinite alternate;
}

@keyframes mstGlowPulse {
    from { opacity: 0.7; }
    to   { opacity: 1; }
}

.mst-overlay.mst-visible {
    opacity: 1;
}

/* --- Close button --- */
.mst-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.mst-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: rotate(90deg);
}

/* --- Modal mode --- */
.mst-overlay.mst-modal-mode {
    background: none;
}

.mst-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
}

.mst-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: linear-gradient(135deg, #0a1a0f 0%, #0d2818 40%, #0a1a0f 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(34, 197, 94, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    z-index: 1;
    aspect-ratio: 16 / 10;
}

.mst-modal-container .mst-close-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
}

.mst-modal-container .mst-stage { padding: 1.5rem; }
.mst-modal-container .mst-subtitle-bar { padding: 0 1.5rem 1rem; min-height: 60px; }
.mst-modal-container .mst-subtitle-text { font-size: 1rem; }
.mst-modal-container .mst-play-btn { padding: 1.5rem 2.5rem; font-size: 1rem; border-radius: 18px; }
.mst-modal-container .mst-play-btn svg { width: 36px; height: 36px; }
.mst-modal-container .mst-heading { font-size: 1.6rem; }
.mst-modal-container .mst-title-text { font-size: 3.5rem; }

/* --- Stage --- */
.mst-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.mst-stage.mst-fade-out {
    opacity: 0;
    transform: scale(0.96);
}

.mst-stage.mst-fade-in {
    animation: mstFadeIn 0.4s ease both;
}

@keyframes mstFadeIn {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Subtitle bar --- */
.mst-subtitle-bar {
    width: 100%;
    max-width: 800px;
    min-height: 80px;
    padding: 0 2rem 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.mst-subtitle-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1.5;
    transition: opacity 0.25s ease;
    margin: 0;
}

/* --- Progress bar --- */
.mst-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 2;
}

.mst-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #fbbf24, #f97316);
    width: 0%;
    transition: width 0.3s linear;
}

/* --- Play overlay --- */
.mst-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(0, 0, 0, 0.4);
}

.mst-play-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 24px;
    padding: 2rem 3rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow:
        0 8px 40px rgba(34, 197, 94, 0.35),
        0 0 30px rgba(22, 163, 74, 0.2);
}

.mst-play-btn:hover {
    transform: scale(1.06);
    box-shadow:
        0 12px 50px rgba(34, 197, 94, 0.5),
        0 0 40px rgba(22, 163, 74, 0.3);
}

/* ─────────────────────────────────────────────────────
   SHARED SCENE STYLES
   ───────────────────────────────────────────────────── */
.mst-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
    width: 100%;
}

.mst-heading {
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(34, 197, 94, 0.3);
}

/* Reusable animations */
.mst-fade-up {
    animation: mstFadeUp 0.5s ease var(--delay, 0s) both;
}

@keyframes mstFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mst-pop-in {
    animation: mstPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes mstPopIn {
    from { opacity: 0; transform: scale(0) rotate(-10deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.mst-slide-in {
    animation: mstSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes mstSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.8); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Fly-in: money flies up from wallet to counter with bounce */
.mst-fly-in {
    animation: mstFlyIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes mstFlyIn {
    0%   { opacity: 0; transform: translateY(70px) scale(0.3); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rot, 0deg)); }
}

.mst-slide-up {
    animation: mstSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes mstSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────
   SCENE: Title
   ───────────────────────────────────────────────────── */
.mst-title-text {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #22c55e, #16a34a, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -2px;
    animation: mstTitleSlam 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    filter: drop-shadow(0 4px 30px rgba(34, 197, 94, 0.4));
}

.mst-title-text-2 {
    animation-delay: 0.15s;
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 4px 30px rgba(251, 191, 36, 0.4));
}

.mst-title-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.3rem;
    font-weight: 500;
    animation: mstFadeUp 0.5s ease 0.4s both;
}

@keyframes mstTitleSlam {
    from { opacity: 0; transform: scale(1.8) rotate(-3deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ─────────────────────────────────────────────────────
   SCENE: Shopping
   ───────────────────────────────────────────────────── */
.mst-shopping-row {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
    max-width: 600px;
}

.mst-shopping-list {
    background: #fef9e7;
    border-radius: 12px;
    padding: 1rem 1.2rem;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: rotate(-2deg);
    border: 1px solid rgba(200, 180, 120, 0.4);
}

.mst-list-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b5b3a;
    margin-bottom: 0.7rem;
    text-align: left;
}

.mst-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #4a3f2f;
}

.mst-list-qty {
    font-weight: 700;
    color: #22c55e;
    min-width: 1.2rem;
}

.mst-list-emoji {
    font-size: 1.1rem;
}

.mst-list-name {
    font-weight: 500;
}

/* Shelf */
.mst-shelf {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-height: 180px;
    overflow: hidden;
}

.mst-shelf-bar {
    position: absolute;
    left: 8%;
    width: 84%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 2px;
}

.mst-shelf-item {
    position: absolute;
    font-size: 2rem;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

/* Shelf target item — pulse glow when cursor reaches it */
.mst-shelf-target {
    animation: mstPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1) var(--delay, 0s) both,
               mstTargetGrab 0.5s ease 2s both;
}

@keyframes mstTargetGrab {
    0%   { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
    40%  { filter: drop-shadow(0 0 18px rgba(34,197,94,0.7)); transform: translate(-50%,-50%) scale(1.2); }
    100% { filter: drop-shadow(0 0 10px rgba(34,197,94,0.3)); transform: translate(-50%,-50%) scale(0.7); opacity: 0.3; }
}

/* Animated cursor moving toward the target shelf item */
.mst-cursor-hint {
    position: absolute;
    font-size: 1.8rem;
    pointer-events: none;
    z-index: 5;
}

.mst-cursor-anim {
    left: 50%;
    top: 70%;
    opacity: 0;
    animation: mstCursorMove 1.8s ease 0.6s both;
}

@keyframes mstCursorMove {
    0%   { opacity: 0; left: 50%; top: 70%; }
    12%  { opacity: 1; left: 50%; top: 70%; }
    55%  { opacity: 1; left: 22%; top: 35%; }
    70%  { opacity: 1; left: 22%; top: 35%; transform: scale(0.8); }
    85%  { opacity: 0.4; left: 22%; top: 35%; transform: scale(0.8); }
    100% { opacity: 0; left: 22%; top: 35%; }
}

/* Grabbed list item — strikethrough + checkmark */
.mst-list-grabbed {
    animation: mstFadeUp 0.5s ease var(--delay, 0s) both,
               mstListGrab 0.4s ease 2.3s both;
}

@keyframes mstListGrab {
    from { background: transparent; }
    to   { background: rgba(34,197,94,0.12); text-decoration: line-through; color: rgba(74,63,47,0.5); }
}

.mst-list-check {
    color: #22c55e;
    font-weight: 700;
    margin-left: auto;
    opacity: 0;
    animation: mstCheckPop 0.35s cubic-bezier(0.34,1.56,0.64,1) 2.3s both;
}

@keyframes mstCheckPop {
    from { opacity: 0; transform: scale(0); }
    to   { opacity: 1; transform: scale(1); }
}

/* ─────────────────────────────────────────────────────
   SCENE: Paying
   ───────────────────────────────────────────────────── */
.mst-paying-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
    max-width: 500px;
}

.mst-counter {
    width: 100%;
    background: linear-gradient(180deg, #5c4a32 0%, #3d3225 100%);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    position: relative;
    min-height: 100px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mst-price-tag {
    position: absolute;
    top: -10px;
    right: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 0.35rem 0.9rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.mst-price-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.mst-price-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}

/* Counter money (real NZ images placed on counter) */
.mst-counter-money {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.6rem;
    flex-wrap: wrap;
}

.mst-placed {
    display: block;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
    object-fit: contain;
}

.mst-placed-note {
    height: 50px;
}

.mst-placed-coin {
    border-radius: 50%;
}

.mst-placed-coin-lg { height: 48px; }
.mst-placed-coin-sm { height: 38px; }
.mst-placed-coin-xs { height: 32px; }

/* Running total counter */
.mst-running-total {
    position: relative;
    height: 1.6rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mst-rt-val {
    position: absolute;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fbbf24;
    opacity: 0;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.mst-rt-step {
    animation:
        mstRtShow 0.25s ease var(--show) forwards,
        mstRtHide 0.15s ease var(--hide) forwards;
}

.mst-rt-final {
    animation: mstRtFinal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--show) forwards;
}

@keyframes mstRtShow {
    from { opacity: 0; transform: translateY(4px) scale(0.85); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mstRtHide {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateY(-4px); }
}

@keyframes mstRtFinal {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); color: #4ade80; text-shadow: 0 0 20px rgba(34, 197, 94, 0.5); }
}

/* Exact! badge */
.mst-exact-badge {
    display: inline-block;
    margin-top: 0.3rem;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.25rem 0.9rem;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.4), 0 0 30px rgba(34, 197, 94, 0.15);
    letter-spacing: 0.5px;
}

/* Wallet (real NZ images in grid) */
.mst-wallet {
    width: 100%;
    background: linear-gradient(180deg, #1e293b, #334155);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mst-wallet-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.mst-wallet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.mst-wallet-item {
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.3));
    transition: transform 0.15s ease;
}

.mst-wallet-note {
    height: 40px;
}

.mst-wallet-coin {
    height: 38px;
}

/* ─────────────────────────────────────────────────────
   SCENE: Change
   ───────────────────────────────────────────────────── */
.mst-change-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.mst-register {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mst-register-top {
    background: linear-gradient(180deg, #374151, #1f2937);
    border-radius: 12px 12px 0 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.mst-register-screen {
    display: flex;
    justify-content: space-between;
    background: #0f172a;
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    font-family: 'Courier New', monospace;
}

.mst-register-paid {
    color: #4ade80;
    font-size: 0.8rem;
    font-weight: 600;
}

.mst-register-cost {
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 600;
}

.mst-register-drawer {
    background: linear-gradient(180deg, #292524, #1c1917);
    border-radius: 0 0 12px 12px;
    padding: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 2px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mst-drawer-slots {
    display: flex;
    gap: 0.35rem;
}

.mst-drawer-slot {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.mst-drawer-coins {
    display: flex;
    gap: 0.35rem;
}

.mst-drawer-coin {
    flex: 1;
    text-align: center;
    padding: 0.3rem 0.15rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    font-weight: 600;
}

.mst-slot-highlight {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #4ade80 !important;
    animation: mstSlotPulse 1.5s ease-in-out infinite;
}

@keyframes mstSlotPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(34, 197, 94, 0.2); }
    50%      { box-shadow: 0 0 12px rgba(34, 197, 94, 0.4); }
}

/* Drawer open animation — more dramatic slide + slight overshoot */
.mst-drawer-open {
    animation: mstDrawerOpen 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both;
}

@keyframes mstDrawerOpen {
    0%   { opacity: 0; transform: translateY(-20px) scaleY(0.3); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

/* Change tray */
.mst-change-tray {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.mst-tray-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mst-tray-pieces {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    align-items: center;
}

.mst-tray-piece {
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.mst-tray-note {
    height: 36px;
}

.mst-tray-coin {
    height: 34px;
}

.mst-tray-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: #4ade80;
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.mst-change-rt {
    height: 1.4rem;
    margin-top: 0.2rem;
}

.mst-change-exact {
    font-size: 0.75rem;
    padding: 0.2rem 0.7rem;
    margin-top: 0.1rem;
}

/* ─────────────────────────────────────────────────────
   SCENE: Deals
   ───────────────────────────────────────────────────── */
.mst-need-badge {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.mst-deals-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.mst-deal-card {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.mst-deal-winner {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
    box-shadow: 0 0 25px rgba(34, 197, 94, 0.15);
}

.mst-deal-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mst-deal-emoji {
    font-size: 1.6rem;
    letter-spacing: 2px;
}

.mst-deal-desc {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.mst-deal-promo {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.mst-deal-total {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Delayed winner reveal — card gets glow border after a beat */
.mst-deal-reveal {
    animation:
        mstPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both,
        mstDealWin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both;
}

@keyframes mstDealWin {
    0%   { border-color: rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.06); box-shadow: none; }
    50%  { transform: scale(1.06); }
    100% { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.08);
           box-shadow: 0 0 30px rgba(34, 197, 94, 0.2); transform: scale(1); }
}

/* Loser card — fades slightly when winner is revealed */
.mst-deal-loser {
    animation:
        mstPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) var(--delay, 0s) both,
        mstDealLose 0.4s ease 1.3s both;
}

@keyframes mstDealLose {
    from { opacity: 1; }
    to   { opacity: 0.55; transform: scale(0.97); }
}

/* Badge stamps in after reveal */
.mst-deal-badge {
    font-size: 0.8rem;
    font-weight: 700;
    color: #22c55e;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.mst-badge-stamp {
    opacity: 0;
    animation: mstBadgeStamp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s both;
}

@keyframes mstBadgeStamp {
    0%   { opacity: 0; transform: scale(2.5) rotate(-15deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.mst-deal-vs {
    font-size: 1.4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

/* ─────────────────────────────────────────────────────
   SCENE: Outro
   ───────────────────────────────────────────────────── */
.mst-title-outro {
    font-size: 4rem;
}

.mst-outro-coins {
    display: flex;
    gap: 1.5rem;
}

.mst-outro-coin {
    font-size: 2.5rem;
    animation: mstCoinBounce 2s ease-in-out infinite;
}

.mst-outro-coin:nth-child(2) { animation-delay: 0.3s; }
.mst-outro-coin:nth-child(3) { animation-delay: 0.6s; }

@keyframes mstCoinBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(10deg); }
}

/* ─────────────────────────────────────────────────────
   HOW TO PLAY BUTTON (page integration)
   ───────────────────────────────────────────────────── */
.mst-how-to-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
}

.mst-how-to-play-btn:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .mst-title-text { font-size: 3rem; }
    .mst-title-outro { font-size: 2.5rem; }
    .mst-heading { font-size: 1.5rem; }
    .mst-shopping-row { flex-direction: column; gap: 1rem; }
    .mst-shopping-list { transform: none; min-width: auto; }
    .mst-shelf { min-height: 140px; }
    .mst-change-layout { flex-direction: column; align-items: center; }
    .mst-deals-row { flex-direction: column; gap: 0.75rem; }
    .mst-deal-vs { display: none; }
    .mst-deal-card { min-width: 200px; }
    .mst-placed-note { height: 40px; }
    .mst-placed-coin-lg { height: 38px; }
    .mst-wallet-note { height: 32px; }
    .mst-wallet-coin { height: 30px; }
    .mst-outro-coin { font-size: 2rem; }
}
