/* ===================================================
   TIỆM BOBA! — style.css
   CSS-first design: cup visual không cần ảnh
   =================================================== */

/* ─── Fonts & Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #e8f5ee;
    color: #2c4a36;
    min-height: 100dvh;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* ─── Splash ─── */
#start-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, #4e9a6e 0%, #2d6e4f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
#start-screen.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }

.splash-inner { text-align: center; color: #fff; }
.splash-cup   { font-size: 80px; animation: floatCup 2.5s ease-in-out infinite; display: block; margin-bottom: 16px; }
.splash-title { font-size: 36px; font-weight: 900; letter-spacing: -0.5px; margin-bottom: 8px; }
.splash-sub   { font-size: 16px; opacity: 0.75; }

@keyframes floatCup {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* ─── Game shell ─── */
#game {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: #f0faf4;
    position: relative;
    overflow: hidden;
}

/* ─── Top Bar ─── */
.top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #2d6e4f;
    color: #fff;
    flex-shrink: 0;
    min-height: 52px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    padding: 6px;
    border-radius: 8px;
    transition: background 0.15s;
    flex-shrink: 0;
}
.icon-btn:hover, .icon-btn:active { background: rgba(255,255,255,0.15); }

.top-center { flex: 1; min-width: 0; }
.top-center strong   { display: block; font-size: 15px; font-weight: 800; }
.top-center span     { display: block; font-size: 11px; opacity: 0.78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.money-display {
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 20px;
    transition: transform 0.25s ease, color 0.25s;
    flex-shrink: 0;
}

/* ─── Screen ─── */
#screen {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ─── Bottom Area ─── */
.bottom-area {
    padding: 10px 14px 14px;
    background: #f0faf4;
    border-top: 2px solid #c5e0cc;
    flex-shrink: 0;
}

.main-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 20px;
    background: #2d6e4f;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 0 #1a4a33;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    position: relative;
    overflow: hidden;
}
.main-btn:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #1a4a33;
}
.main-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@keyframes servePulse {
    0%,100% { box-shadow: 0 5px 0 #1a4a33; }
    50%      { box-shadow: 0 5px 0 #1a4a33, 0 0 0 7px rgba(45,110,79,0.22); }
}
.main-btn.ready-to-serve { animation: servePulse 1.4s ease-in-out infinite; }

/* ─── Home Screen ─── */
.home-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
    gap: 20px;
}

.home-cup-anim {
    font-size: 72px;
    animation: floatCup 3s ease-in-out infinite;
}

.home-title { font-size: 28px; font-weight: 900; color: #1e4d30; letter-spacing: -0.5px; }

.home-stats {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 2px solid #c5e0cc;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    max-width: 320px;
}

.home-stat { flex: 1; text-align: center; }
.home-stat-value { font-size: 18px; font-weight: 800; color: #2d6e4f; }
.home-stat-label { font-size: 10px; color: #6b9e80; margin-top: 3px; }

/* ─── Prep Screen ─── */
.prep-screen { display: flex; flex-direction: column; height: 100%; }

.prep-delivery-panel {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background: #d4edda;
    border-bottom: 2px solid #a8d5b5;
}

.delivery-portrait {
    font-size: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.prep-bubble { flex: 1; min-width: 0; }
.prep-bubble-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.prep-bubble-top > span { font-size: 10px; font-weight: 700; color: #3a7a52; text-transform: uppercase; }
#prep-msg-text { font-size: 12px; color: #2c5a3a; line-height: 1.4; }

.prep-station { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }

.prep-section {}
.prep-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #4a8a62;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.prep-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prep-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #c5e0cc;
    border-radius: 14px;
    cursor: pointer;
    min-width: 72px;
    transition: border-color 0.15s, transform 0.1s;
    font-size: 11px;
    color: #2c4a36;
}
.prep-card:active { transform: scale(0.96); }
.prep-card:hover  { border-color: #2d6e4f; }
.prep-card-emoji  { font-size: 24px; }
.prep-card-label  { font-size: 10px; font-weight: 600; text-align: center; }
.prep-card-stock  { font-size: 9px; background: #e8f5ee; padding: 1px 6px; border-radius: 8px; }
.prep-card-stock.stock-low { background: #fef2f2; color: #991b1b; }
.prep-card-price  { font-size: 10px; font-weight: 700; color: #2d6e4f; }
.prep-card-lock   { position: absolute; top: 4px; right: 4px; font-size: 11px; }
.prep-card-sold   { position: absolute; top: 4px; right: 4px; font-size: 9px; background: #fee2e2; color: #991b1b; padding: 1px 4px; border-radius: 4px; font-weight: 700; }
.prep-locked  { opacity: 0.7; border-color: #c5e0cc; border-style: dashed; }
.prep-empty   { opacity: 0.65; }

/* ─── Making Screen ─── */
.making-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: screenFadeIn 0.2s ease-out;
}
@keyframes screenFadeIn {
    from { opacity: 0.92; }
    to { opacity: 1; }
}

/* ─── Patience Queue ─── */
.patience-queue {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #d4edda;
    border-bottom: 1px solid #a8d5b5;
    min-height: 38px;
    flex-shrink: 0;
}
.queue-label  { font-size: 10px; font-weight: 700; color: #3a7a52; text-transform: uppercase; flex-shrink: 0; }
.queue-empty  { font-size: 11px; color: #6b9e80; }

.queue-customer {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 4px;
    background: rgba(255,255,255,0.7);
    border: 1.5px solid #a8d5b5;
    border-radius: 20px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.queue-customer.is-active { border-color: #2d6e4f; background: #fff; }
.queue-emoji  { font-size: 18px; }
.queue-patience { width: 36px; height: 4px; background: #e0f0e6; border-radius: 2px; overflow: hidden; }
.queue-patience > span { display: block; height: 100%; background: #2d6e4f; transition: width 1s linear; }
.queue-patience.is-urgent > span { background: #e63946; }

/* ─── Customer Panel ─── */
.customer-panel {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px 8px;
    background: #d4edda;
    border-bottom: 2px solid #a8d5b5;
    flex-shrink: 0;
    transition: background 0.3s;
}
.customer-panel.is-happy   { background: #dcfce7; }
.customer-panel.is-annoyed { background: #fee2e2; }
.customer-panel.leaving    { opacity: 0; transform: translateX(20px); transition: opacity 0.4s, transform 0.4s; }

.customer-portrait {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    border: 2px solid #a8d5b5;
    box-shadow: 0 3px 0 #8fbf9e;
    flex-shrink: 0;
}
.customer-emoji { font-size: 30px; line-height: 1; }
.waiting-portrait { font-size: 34px; background: transparent; border: none; box-shadow: none; }

.customer-bubble { flex: 1; min-width: 0; }
.customer-bubble-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.customer-bubble-top > span { font-size: 10px; font-weight: 700; color: #3a7a52; text-transform: uppercase; white-space: nowrap; }
.customer-bubble strong     { display: block; font-size: 14px; color: #1e4d30; }
#customer-order-note        { font-size: 11px; font-style: italic; color: #4a8a62; margin: 2px 0 0; line-height: 1.35; }
#customer-reaction          { font-size: 12px; color: #2c4a36; margin-top: 4px; min-height: 16px; }
.wait-countdown             { display: block; font-size: 10px; color: #4a8a62; margin-top: 3px; font-style: italic; }

.active-patience {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    min-height: 20px;
}
#patience-label {
    font-size: 11px;
    font-weight: 700;
    color: #2d6e4f;
    flex-shrink: 0;
    min-width: 98px;
    white-space: nowrap;
    display: inline-block;
    transition: color 0.3s;
}
.patience-track {
    flex: 1;
    height: 7px;
    background: #e2eee6;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
#patience-fill  {
    display: block;
    height: 100%;
    background: #2d6e4f;
    width: 100%;
    border-radius: 4px;
    transition: width 0.3s ease-out, background-color 0.3s;
    will-change: width;
}
.patience-track.is-urgent #patience-fill {
    background: #ef4444;
    animation: urgentPulse 0.5s infinite alternate;
}
.patience-track.is-warning #patience-fill {
    background: #f59e0b;
}
@keyframes urgentPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; filter: drop-shadow(0 0 3px #ef4444); }
}
.customer-portrait.portrait-urgent {
    animation: urgentShake 0.4s infinite alternate;
    border-color: #ef4444 !important;
}
@keyframes urgentShake {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

/* ─── Recipe FAB ─── */
.recipe-fab {
    background: none;
    border: 1.5px solid #a8d5b5;
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    color: #2d6e4f;
    white-space: nowrap;
}
.recipe-fab:hover { background: #e8f5ee; }

/* ─── Cup Visual ─── */
.cup-workspace {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fdf9;
    border-bottom: 2px solid #c5e0cc;
    flex-shrink: 0;
    padding: 12px 0 8px;
    min-height: 140px;
}

.cup-stage-wrap { position: relative; }

.cup-stage {
    position: relative;
    width: 90px;
    height: 130px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}

.cup-straw {
    position: absolute;
    top: -28px;
    right: 22px;
    width: 7px;
    height: 48px;
    background: linear-gradient(to bottom, #ff9999, #ff6666);
    border-radius: 3px 3px 0 0;
    transform: rotate(4deg);
    transform-origin: bottom;
    z-index: 10;
}

.cup-seal {
    position: absolute;
    top: -4px;
    left: -3px;
    right: -3px;
    height: 14px;
    background: #e8e8e8;
    border-radius: 4px;
    border: 2px solid #c0c0c0;
    z-index: 9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.cup-seal::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 20%;
    right: 20%;
    height: 4px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.cup-body {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    height: calc(100% - 16px);
    background: rgba(255,255,255,0.25);
    border: 3px solid #aabba8;
    border-radius: 4px 4px 10px 10px;
    clip-path: polygon(7% 0%, 93% 0%, 100% 100%, 0% 100%);
    overflow: hidden;
}

.cup-bottom-cap {
    position: absolute;
    bottom: 0;
    left: 12%;
    right: 12%;
    height: 16px;
    background: #aabba8;
    border-radius: 0 0 6px 6px;
}

.cup-empty-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: 0.25;
    pointer-events: none;
}

/* Cup layers (stacked) */
.cup-liquid-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    transition: background 0.4s ease, opacity 0.4s;
    opacity: 0;
}
.cup-milk-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    opacity: 0.5;
    transition: background 0.3s;
}
.cup-ice-layer {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    height: 40%;
    pointer-events: none;
}
.cup-toppings-layer {
    position: absolute;
    bottom: 2%;
    left: 0;
    right: 0;
    height: 22%;
    display: flex;
    align-items: flex-end;
    pointer-events: none;
}

/* Liquid colors */
.liq-black  { background: linear-gradient(to top, #5c3420, #8b5c3e); }
.liq-green  { background: linear-gradient(to top, #5a8a40, #8bbf6e); }
.liq-oolong { background: linear-gradient(to top, #8a5a28, #c8943c); }
.liq-jasmine{ background: linear-gradient(to top, #c0a878, #e8d4a0); }
.liq-matcha { background: linear-gradient(to top, #3a5a28, #6a9040); }

/* Milk overlays */
.milk-milktea { background: rgba(255,235,200,0.45); }
.milk-fresh   { background: rgba(255,255,245,0.55); }
.milk-taro    { background: rgba(195,160,225,0.7); box-shadow: inset 0 0 10px rgba(140,80,180,0.3); }

/* Ice cubes */
.ice-cube {
    position: absolute;
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.75);
    border-radius: 3px;
    border: 1px solid rgba(200,230,220,0.8);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* Foam Layer (Kem Muối / Kem Phô Mai) */
.cup-foam-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 25%;
    border-radius: 4px 4px 14px 14px;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cup-foam-layer.foam-cheese {
    background: linear-gradient(to bottom, #fffef0 0%, #faecd0 85%, rgba(245, 225, 180, 0.5) 100%);
    box-shadow: 0 4px 10px rgba(220, 160, 60, 0.25), inset 0 -2px 6px rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid rgba(235, 195, 110, 0.55);
}
.cup-foam-layer.foam-salt {
    background: linear-gradient(to bottom, #ffffff 0%, #f0f7f5 85%, rgba(215, 235, 230, 0.5) 100%);
    box-shadow: 0 4px 10px rgba(80, 160, 140, 0.2), inset 0 -2px 6px rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(170, 210, 200, 0.55);
}

/* Topping dots */
.topping-dot {
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.2s;
}
.dot-pearl       { background: #2d2d2d; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.dot-golden      { background: radial-gradient(circle at 35% 35%, #fff275, #e67e22); box-shadow: 0 0 5px rgba(243, 156, 18, 0.7); border: 1px solid #f39c12; }
.dot-noodle      { width: 20px; height: 5px; border-radius: 4px; background: #3d2314; box-shadow: 0 1px 2px rgba(0,0,0,0.4); transform: rotate(-12deg); }
.dot-jelly       { background: #111; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.dot-osmanthus   { background: radial-gradient(circle at 35% 35%, #fffde7, #fbc02d); border: 1px solid #f9a825; box-shadow: 0 0 4px rgba(249, 168, 37, 0.5); border-radius: 3px; }
.dot-salt-foam   { background: #ffffff; border: 1.5px solid #80cbc4; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.dot-cheese-foam { background: #fff9c4; border: 1.5px solid #fbc02d; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.dot-pudding     { background: #f4c86a; border: 1px solid #e0a830; }
.dot-coconut     { background: #fff; border: 1.5px solid #ddd; }
.dot-aloe        { background: #a0d4a0; border: 1px solid #70b470; }

/* ─── Cup Builder Station ─── */
.cup-builder-station {
    padding: 8px 10px 8px;
    background: #eef6f0;
    border-top: 2px solid #bfe0ca;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.builder-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 8px 10px;
    border: 1px solid rgba(45, 110, 79, 0.14);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.builder-card-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.builder-card-divider {
    height: 1px;
    background: #edf4ef;
    margin: 6px 0;
}

.builder-group-label {
    font-size: 11px;
    font-weight: 800;
    color: #26593e;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
}

.builder-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.builder-card-options {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
}

.builder-dual-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.builder-v-divider {
    width: 1px;
    background: #e5efe8;
    margin: 0 2px;
}

.builder-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.builder-count-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    background: #e6f4ea;
    color: #216a44;
}

.toppings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 5px;
}

/* ─── Buttons ─── */
.cup-builder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 5px 9px;
    border: 1.5px solid #d1e5d8;
    border-radius: 12px;
    background: #fbfdfc;
    color: #22382b;
    font-size: 11.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cup-builder-btn .btn-emoji {
    font-size: 13px;
    flex-shrink: 0;
}

.cup-builder-btn .btn-label {
    font-size: 11px;
    font-weight: 600;
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cup-builder-btn .sel-indicator {
    font-size: 11px;
    font-weight: 800;
    color: #1e6940;
    margin-left: 2px;
}

.cup-builder-btn .stock-pill {
    font-size: 9.5px;
    font-weight: 700;
    color: #5c8f72;
    background: #eaf3ed;
    padding: 1px 5px;
    border-radius: 6px;
    margin-left: 2px;
}
.cup-builder-btn .stock-pill.out {
    color: #dc2626;
    background: #fee2e2;
}

.cup-builder-btn.active-choice {
    border-color: #2d6e4f;
    background: #def4e6;
    color: #154e2d;
    box-shadow: 0 0 0 1px #2d6e4f inset;
    font-weight: 700;
}

.cup-builder-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.cup-builder-btn:hover:not(:disabled):not(.active-choice) {
    border-color: #52a378;
    background: #f4faf6;
}

.cup-builder-btn.btn-locked  { opacity: 0.5; border-style: dashed; background: #f7faf8; }
.cup-builder-btn.btn-empty   { opacity: 0.5; text-decoration: line-through; background: #faf5f5; border-color: #f0d0d0; }
.cup-builder-btn.btn-na      { opacity: 0.35; cursor: not-allowed; }

/* Pill buttons (sugar/ice) */
.pill-btn {
    flex: 1;
    min-width: 44px;
    justify-content: center;
    padding: 5px 6px;
    font-size: 11px;
}
.compact {
    display: flex;
    gap: 4px;
}
.topping-btn { min-width: auto; }

/* ─── Drink Feedback ─── */
.drink-feedback {
    margin: 5px 0 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    text-align: center;
    border: 1.5px solid transparent;
    color: #4a8a62;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    min-height: 30px;
    line-height: 1.4;
}
.drink-feedback.feedback-ready   { background: #dcfce7; border-color: #5fb868; color: #15803d; font-weight: 700; }
.drink-feedback.feedback-warning { background: #fef2f2; border-color: #f87171; color: #991b1b; }

/* ─── Order Checklist ─── */
.order-checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #a8d5b5;
}
.cl-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px 2px 5px;
    border-radius: 10px;
    font-size: 10px;
    background: rgba(255,255,255,0.5);
    border: 1.5px solid #a8d5b5;
    color: #3a7a52;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s;
}
.cl-item.cl-done  { background: #dcfce7; border-color: #5fb868; color: #15803d; }
.cl-item.cl-extra { background: #fef2f2; border-color: #f87171; color: #991b1b; }
.cl-mark { font-size: 9px; font-weight: 700; }
.order-checklist.cl-all-done .cl-item { border-color: #22c55e; background: #dcfce7; color: #15803d; }

/* ─── Order Breakdown ─── */
.order-breakdown { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bd-item { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
.bd-ok   { background: #dcfce7; color: #15803d; border: 1.5px solid #5fb868; }
.bd-bad  { background: #fef2f2; color: #991b1b; border: 1.5px solid #f87171; }

/* ─── Day End ─── */
.day-end-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 16px;
}

.day-receipt {
    background: #fff;
    border: 2px solid #c5e0cc;
    border-radius: 18px;
    padding: 20px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.receipt-header {
    text-align: center;
    margin-bottom: 14px;
}
.receipt-emoji { font-size: 36px; display: block; margin-bottom: 6px; }
.receipt-header strong { font-size: 16px; color: #1e4d30; }

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
    gap: 8px;
}
.receipt-row span { color: #4a8a62; }
.receipt-row strong { font-weight: 700; }
.text-green { color: #2d6e4f; }
.text-red   { color: #e63946; }

.receipt-divider { height: 1px; background: #c5e0cc; margin: 8px 0; border: none; }

.receipt-profit { border-top: 2px solid #2d6e4f; margin-top: 4px; padding-top: 8px; }
.profit-pos strong { color: #2d6e4f; font-size: 15px; }
.profit-neg strong { color: #e63946; font-size: 15px; }

/* ─── Recipe Modal ─── */
.recipe-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: opacity 0.25s;
}
.recipe-modal.hidden { opacity: 0; pointer-events: none; }
.recipe-modal:not(.hidden) { opacity: 1; }

.recipe-modal-inner {
    background: #f0faf4;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 75dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(0);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
}

.recipe-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 2px solid #c5e0cc;
    flex-shrink: 0;
}
.recipe-modal-header h2 { font-size: 16px; color: #1e4d30; }

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #4a8a62;
    padding: 4px 8px;
    border-radius: 8px;
}
.close-btn:hover { background: #d4edda; }

.recipe-list { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.recipe-card {
    position: relative;
    background: #fff;
    border: 2px solid #c5e0cc;
    border-radius: 14px;
    padding: 12px;
    transition: border-color 0.15s;
}
.recipe-locked  { opacity: 0.6; border-style: dashed; }
.recipe-current { border-color: #2d6e4f; background: #f0fdf4; }

.recipe-current-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: #2d6e4f;
    color: #fff;
    font-size: 9px;
    padding: 2px 7px;
    border-radius: 8px;
    font-weight: 700;
}

.recipe-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.recipe-emoji { font-size: 28px; }
.recipe-card-header strong { font-size: 14px; color: #1e4d30; display: block; }
.recipe-price { font-size: 12px; color: #2d6e4f; font-weight: 700; }

.recipe-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.recipe-details span {
    font-size: 11px;
    background: #e8f5ee;
    color: #3a7a52;
    padding: 2px 8px;
    border-radius: 8px;
}

.recipe-lock-info { font-size: 11px; color: #6b9e80; margin-top: 6px; }

/* ─── Pause Overlay ─── */
#pause-overlay, #settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pause-panel, .settings-panel {
    background: #fff;
    border: 3px solid #2d6e4f;
    border-radius: 22px;
    padding: 24px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.pause-icon  { font-size: 40px; margin-bottom: 8px; }
.pause-panel h2, .settings-panel h2 { font-size: 20px; margin-bottom: 16px; color: #1e4d30; }

.pause-menu  { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pause-row {
    background: #f0faf4;
    border: 2px solid #c5e0cc;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #2c4a36;
    transition: background 0.15s;
}
.pause-row:hover   { background: #d4edda; }
.pause-danger      { border-color: #f87171; color: #991b1b; }
.pause-danger:hover { background: #fee2e2; }

.pause-close {
    background: #2d6e4f;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
}

/* Settings panel */
.settings-panel { text-align: left; }
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.settings-header h2 { font-size: 18px; color: #1e4d30; }
.settings-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #6b9e80; }

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e8f5ee;
    font-size: 13px;
    gap: 10px;
}
.settings-section-label {
    font-size: 10px;
    font-weight: 700;
    color: #6b9e80;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 10px 0 4px;
}
.settings-info { font-size: 12px; color: #4a8a62; line-height: 1.5; margin-bottom: 8px; }

.toggle-btn {
    background: #e8e8e8;
    border: none;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.toggle-btn.toggle-on { background: #2d6e4f; color: #fff; }

.settings-btn-sm {
    background: #f0faf4;
    border: 1.5px solid #c5e0cc;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: #2c4a36;
}
.settings-btn-sm.danger { border-color: #f87171; color: #991b1b; }

/* ─── Popup ─── */
#popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}
#popup-overlay.popup-visible { opacity: 1; }

.popup-box {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px 20px;
    width: 100%;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
}
#popup-overlay.popup-visible .popup-box { transform: scale(1); }

.popup-icon    { font-size: 40px; margin-bottom: 8px; }
.popup-title   { font-size: 16px; font-weight: 800; color: #1e4d30; margin-bottom: 8px; }
.popup-message { font-size: 13px; color: #4a8a62; line-height: 1.5; margin-bottom: 18px; }
.popup-actions { display: flex; gap: 8px; justify-content: center; }

.popup-cancel  {
    background: #f0faf4;
    border: 2px solid #c5e0cc;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #4a8a62;
    flex: 1;
}
.popup-confirm {
    background: #2d6e4f;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    flex: 1;
}
.popup-confirm.popup-danger { background: #e63946; }

/* ─── Toast ─── */
#toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    width: min(400px, 90vw);
}

.toast {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 22px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.2s, transform 0.2s;
    max-width: 100%;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.toast.toast-visible { opacity: 1; transform: none; }
.toast.toast-hiding  { opacity: 0; transform: translateY(-6px) scale(0.97); transition: opacity 0.25s, transform 0.25s; }

.toast-info    { background: #f0fdf4; border: 1.5px solid #a8d5b5; color: #1e4d30; }
.toast-warning { background: #fff7e6; border: 1.5px solid #f59e0b; color: #78350f; }
.toast-success { background: #dcfce7; border: 1.5px solid #5fb868; color: #15803d; }
.toast-error   { background: #fef2f2; border: 1.5px solid #f87171; color: #7f1d1d; }
.toast-icon    { font-size: 15px; flex-shrink: 0; }

/* ─── Door Animation ─── */
.door-overlay {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: flex;
    pointer-events: none;
}
.door-left, .door-right {
    flex: 1;
    background: #1a3d2a;
    transition: transform 1.4s cubic-bezier(.77,0,.175,1);
}
.door-left  { transform-origin: left;  }
.door-right { transform-origin: right; }

.door-opening .door-left  { transform: scaleX(0); }
.door-opening .door-right { transform: scaleX(0); }

.door-closing .door-left  { transform: scaleX(0); }
.door-closing .door-right { transform: scaleX(0); }
.door-closed  .door-left  { transform: scaleX(1); }
.door-closed  .door-right { transform: scaleX(1); }

.door-sign {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: 900;
    color: #1e4d30;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 1;
}

/* ─── Animations ─── */
@keyframes itemBounce {
    0%   { transform: scale(1); }
    35%  { transform: scale(0.84); }
    65%  { transform: scale(1.1); }
    85%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.cup-builder-btn.bounce { animation: itemBounce 0.28s ease forwards; }

/* ─── Waiting Screen ─── */
.waiting-screen .cup-builder-station { opacity: 0.7; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #a8d5b5; border-radius: 2px; }

/* --- Shop Decor Counter Shelf --- */
.shop-decor-shelf {
    position: absolute;
    top: 6px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    pointer-events: auto;
}
.decor-item {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    transition: transform 0.2s;
    cursor: default;
}
.decor-item:hover { transform: scale(1.18); }
.decor-paw {
    position: absolute;
    top: -2px;
    right: -4px;
    font-size: 10px;
    animation: pawWave 0.7s infinite alternate ease-in-out;
    transform-origin: bottom left;
}
@keyframes pawWave {
    0% { transform: rotate(-15deg); }
    100% { transform: rotate(25deg); }
}
.decor-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, transparent 70%);
    animation: lampGlow 1.5s infinite alternate;
}
@keyframes lampGlow {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 0.85; transform: scale(1.2); }
}
.decor-note {
    position: absolute;
    top: -6px;
    right: -4px;
    font-size: 10px;
    color: #ff5e7e;
    animation: floatNote 1.4s infinite ease-out;
}
@keyframes floatNote {
    0% { opacity: 0; transform: translateY(0) scale(0.7); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-8px) scale(1.1); }
}
.decor-neon-glow {
    position: absolute;
    inset: -3px;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(255, 71, 126, 0.45) 0%, transparent 75%);
    animation: neonPulse 1.3s infinite alternate ease-in-out;
}
@keyframes neonPulse {
    0% { opacity: 0.3; filter: drop-shadow(0 0 2px #ff477e); }
    100% { opacity: 0.95; filter: drop-shadow(0 0 8px #ff477e); }
}
.decor-chimes {
    animation: chimeSway 2.5s infinite ease-in-out alternate;
    transform-origin: top center;
}
@keyframes chimeSway {
    0% { transform: rotate(-7deg); }
    100% { transform: rotate(7deg); }
}
.decor-crystal {
    animation: crystalShimmer 2.2s infinite ease-in-out alternate;
}
@keyframes crystalShimmer {
    0% { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)) brightness(1); }
    100% { filter: drop-shadow(0 2px 8px rgba(64, 224, 208, 0.6)) brightness(1.25); }
}
.decor-vase {
    animation: vaseGentle 3s infinite ease-in-out alternate;
}
@keyframes vaseGentle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-2px); }
}

/* --- Rhythm Beat Shaker Mini-Game --- */
.shaker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease;
}
.shaker-panel {
    background: #f4faf6;
    border-radius: 28px;
    padding: 24px 20px;
    width: 92%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    border: 3px solid #40916c;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.rhythm-tag {
    font-size: 11px;
    font-weight: 800;
    color: #40916c;
    letter-spacing: 0.8px;
    background: #e2f2e8;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 6px;
}
.shaker-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e4d30;
    margin-bottom: 4px;
}
.shaker-sub {
    font-size: 12px;
    color: #4a7c59;
    margin-bottom: 8px;
    line-height: 1.4;
}
.rhythm-beat-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 12px;
}
.beat-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0ece5;
    color: #718a7c;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #b7d6c4;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.beat-dot.active {
    background: #2d6e4f;
    color: #fff;
    border-color: #1b4332;
    transform: scale(1.22);
    box-shadow: 0 0 12px rgba(45, 110, 79, 0.5);
}
.beat-dot.done.perfect {
    background: #ffb703;
    color: #593900;
    border-color: #fb8500;
    transform: scale(1.05);
}
.beat-dot.done.great {
    background: #52b788;
    color: #fff;
    border-color: #2d6e4f;
}
.beat-dot.done.good {
    background: #95d5b2;
    color: #1b4332;
}

.rhythm-stage {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0 14px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.rhythm-target-ring {
    position: absolute;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 3px solid rgba(45, 110, 79, 0.5);
    background: rgba(64, 145, 108, 0.08);
}
.rhythm-pulse-ring {
    position: absolute;
    width: 95px;
    height: 95px;
    border-radius: 50%;
    border: 3px solid #ff477e;
    pointer-events: none;
    transform-origin: center;
    transition: opacity 0.1s;
}
.shaker-cup-anim {
    font-size: 52px;
    display: inline-block;
    user-select: none;
    animation: shakerShake 0.3s ease-in-out infinite alternate;
}
@keyframes shakerShake {
    0% { transform: rotate(-14deg) translateY(0); }
    100% { transform: rotate(14deg) translateY(-6px); }
}
.shaker-cup-anim.shake-hit {
    animation: cupHitPulse 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
}
@keyframes cupHitPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.28) rotate(16deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.rhythm-hit-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    font-size: 16px;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 10;
}
.rhythm-hit-text.show {
    opacity: 1;
    transform: translate(-50%, -85%) scale(1.15);
}
.rhythm-hit-text.perfect { color: #f59e0b; }
.rhythm-hit-text.great   { color: #2d6e4f; }
.rhythm-hit-text.good    { color: #3b82f6; }

.rhythm-actions {
    width: 100%;
}
.rhythm-tap-btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    background: #2d6e4f;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(45, 110, 79, 0.35);
    transition: transform 0.1s, background 0.2s;
}
.rhythm-tap-btn:active {
    transform: scale(0.96);
    background: #1b4332;
}

.shaker-result {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 800;
    min-height: 22px;
}
.shaker-result.perfect { color: #2d6e4f; }
.shaker-result.great   { color: #2d6e4f; }
.shaker-result.good    { color: #d4a373; }

/* --- Shop Upgrades --- */
.prep-upgrade-card {
    background: #e8f5ec;
    border: 1.5px solid #a3d9b8;
}
.prep-upgrade-card.upgrade-owned {
    opacity: 0.65;
    background: #f0f7f2;
    border-style: dashed;
}
.upgrade-status-badge {
    font-size: 10px;
    font-weight: 800;
    color: #2d6e4f;
    background: #c7e8d3;
    padding: 2px 6px;
    border-radius: 8px;
    margin-top: 4px;
}

/* --- Tutorial Banner --- */
.tutorial-banner {
    background: #fff8e7;
    border: 2px solid #ffd166;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
}
.tutorial-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    background: #ffd166;
    color: #723d46;
    padding: 2px 6px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.tutorial-banner p {
    font-size: 12px;
    color: #593d18;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

/* --- Recipe Economics --- */
.recipe-econ {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
}
.recipe-cost { color: #777; }
.recipe-profit { color: #2d6e4f; background: #e0f2e7; padding: 2px 6px; border-radius: 4px; }

/* ===================================================
   📻 BOBA RADIO & MUSIC PLAYER
   =================================================== */
.top-left-group {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.radio-btn {
    position: relative;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}
.radio-btn * {
    pointer-events: none !important;
}

.music-wave {
    position: absolute;
    bottom: 2px;
    right: 2px;
    display: flex;
    align-items: flex-end;
    gap: 1.5px;
    height: 9px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.music-wave.playing {
    opacity: 1;
}
.music-wave i {
    width: 2px;
    height: 100%;
    background: #ff5e7e;
    border-radius: 1px;
    animation: waveBounce 1.1s ease-in-out infinite;
}
.music-wave i:nth-child(2) { animation-delay: 0.22s; }
.music-wave i:nth-child(3) { animation-delay: 0.44s; }

@keyframes waveBounce {
    0%, 100% { height: 2px; }
    50% { height: 9px; }
}

/* --- Now Playing Toast --- */
.now-playing-toast {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%) translateY(-25px);
    background: rgba(18, 36, 26, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 7px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    max-width: 90vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.now-playing-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.now-playing-disc {
    font-size: 14px;
    display: inline-block;
    animation: spinVinyl 3.5s linear infinite;
}

@keyframes spinVinyl {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Boba Radio Modal --- */
.radio-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 16, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.radio-overlay.hidden {
    opacity: 0;
    pointer-events: none !important;
    visibility: hidden;
}

.radio-box {
    background: #fffdfa;
    width: 100%;
    max-width: 380px;
    border-radius: 24px;
    padding: 16px 16px 14px;
    box-shadow: 0 20px 48px rgba(0,0,0,0.35);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
}

.radio-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.06);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.turntable-visual {
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle, #2d2d2d 30%, #151515 70%, #050505 100%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25), inset 0 0 0 2px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 8px;
}
.turntable-visual.spinning {
    animation: spinVinyl 5s linear infinite;
}

.vinyl-grooves {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.15);
}
.vinyl-center {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ff5e7e;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.radio-now-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #223e2d;
    margin-bottom: 8px;
    text-align: center;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.radio-btn-ctrl {
    background: #f0f7f3;
    border: 1px solid rgba(45,110,79,0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d6e4f;
    transition: transform 0.15s, background 0.15s;
}
.radio-btn-ctrl:active { transform: scale(0.92); }
.radio-play-btn {
    width: 44px;
    height: 44px;
    background: #2d6e4f;
    color: #fff;
    font-size: 18px;
    border: none;
    box-shadow: 0 4px 14px rgba(45,110,79,0.3);
}

.radio-sliders-wrap {
    width: 100%;
    background: #f4f9f6;
    border-radius: 12px;
    padding: 7px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.radio-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #2d6e4f;
}
.radio-slider-row span { min-width: 62px; }
.radio-slider {
    flex: 1;
    height: 4px;
    accent-color: #2d6e4f;
    cursor: pointer;
}

.radio-playlist-section {
    width: 100%;
}
.radio-playlist-label {
    font-size: 10.5px;
    font-weight: 800;
    color: #8c9e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.radio-playlist-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: min(340px, 45vh);
    overflow-y: auto;
}
.radio-track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e3ede6;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 11.5px;
}
.radio-track-item:hover { background: #f2fbf5; }
.radio-track-item.active {
    background: #e5f6ec;
    border-color: #2d6e4f;
    font-weight: 800;
    color: #2d6e4f;
}
.radio-track-badge {
    font-size: 9.5px;
    padding: 2px 6px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #666;
}
.radio-track-badge.chill { background: #e3f2fd; color: #1976d2; }
.radio-track-badge.upbeat { background: #fff3e0; color: #e65100; }

