* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

html, body, #root {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: #1a0f06;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#root {
    display: block;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    background-color: #1a0f06;
}

#game-stage {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== Full-screen overlays (menus / results) ===== */
.screen-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 6, 2, 0.88);
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    align-items: center;
    gap: 18px;
    overflow-y: auto;
    padding: 16px 12px;
    z-index: 50;
    backdrop-filter: blur(4px);
    padding: 20px;
    text-align: center;
}

.game-title {
    font-size: clamp(32px, 7vw, 64px);
    font-weight: 900;
    color: #facc15;
    text-shadow: 0 4px 0 #b45309, 0 8px 24px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
}

.game-subtitle {
    font-size: clamp(13px, 2.4vw, 18px);
    color: #fcd34d;
    font-weight: 700;
    margin-bottom: 8px;
}

.screen-heading {
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 900;
    color: #facc15;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(320px, 86vw);
}

.menu-btn {
    padding: 14px 22px;
    border-radius: 12px;
    border: 2px solid rgba(250, 204, 21, 0.5);
    background: #292524;
    color: #fde68a;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.menu-btn small {
    font-size: 11px;
    font-weight: 600;
    color: #a8a29e;
}

.menu-btn:hover { transform: scale(1.04); background: #44403c; }
.menu-btn:active { transform: scale(0.96); }

.menu-btn.play {
    background: linear-gradient(180deg, #16a34a, #15803d);
    border-color: #4ade80;
    color: #ffffff;
    font-size: 20px;
}

.diff-easy { border-color: #4ade80; }
.diff-medium { border-color: #facc15; }
.diff-hard { border-color: #ef4444; }

.link-btn {
    background: none;
    border: none;
    color: #a8a29e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 6px;
}

/* Level select grid — 3-column scrollable grid for all 30 levels */
.level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: min(560px, 94vw);
    max-height: 58vh;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: #facc15 #292524;
}

.level-grid::-webkit-scrollbar { width: 8px; }
.level-grid::-webkit-scrollbar-track { background: #292524; border-radius: 8px; }
.level-grid::-webkit-scrollbar-thumb { background: #facc15; border-radius: 8px; }

/* ===== Loading screen (Starting POS) ===== */
.loading-screen {
    background: #000000 !important;
    backdrop-filter: none !important;
    gap: 26px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 900;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    line-height: 1.3;
    max-width: 90vw;
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.45);
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: baseline;
}

.loading-dots span {
    animation: loadingDotBlink 1.2s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDotBlink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.level-cell {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 2px solid rgba(250, 204, 21, 0.5);
    background: #292524;
    color: #fde68a;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.level-cell:hover:not(.locked) { transform: scale(1.06); background: #44403c; }
.level-cell.locked { opacity: 0.4; cursor: not-allowed; border-color: #57534e; }
.level-lock { font-size: 26px; }
.level-cell-content { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.15; padding: 4px; }
.level-cell-content .level-num { font-size: 22px; font-weight: 900; color: #fde68a; }
.level-cell-name { font-size: 10px; font-weight: 700; color: #e7e5e4; text-transform: uppercase; letter-spacing: 0.02em; }
.level-cell-target { font-size: 11px; font-weight: 800; color: #4ade80; }

/* Network wahala lag banner */
.lag-banner {
    position: absolute;
    top: 96px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(120, 53, 15, 0.92);
    color: #fde68a;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 800;
    z-index: 40;
    animation: lagPulse 0.8s ease-in-out infinite alternate;
    pointer-events: none;
    white-space: nowrap;
}
@keyframes lagPulse { from { opacity: 0.75; } to { opacity: 1; } }

/* Share toast + congrats praise line */
.share-toast {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    z-index: 90;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.praise { font-style: italic; color: #fcd34d; }

/* How to play */
.rules-list {
    list-style: none;
    text-align: left;
    color: #e7e5e4;
    font-size: clamp(12px, 2vw, 15px);
    line-height: 1.6;
    max-width: min(620px, 92vw);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ===== HUD ===== */
.hud-topbar {
    position: absolute;
    top: 10px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto;
    z-index: 10;
    pointer-events: none;
}

.hud-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(15, 23, 42, 0.92);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(234, 179, 8, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    min-width: 130px;
}

.hud-label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1px;
}

.money-value {
    font-size: 20px;
    font-weight: 900;
    color: #4ade80;
}

.time-value {
    font-size: 20px;
    font-weight: 900;
    color: #38bdf8;
}

.time-value.danger {
    color: #ef4444;
    animation: pulse 0.6s infinite alternate;
}

@keyframes pulse { from { opacity: 1; } to { opacity: 0.45; } }

.hud-sub {
    font-size: 10px;
    font-weight: 700;
    color: #cbd5e1;
}

.mini-bar {
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
}

.mini-fill { height: 100%; transition: width 0.25s ease-out; }
.mini-fill.money { background: linear-gradient(90deg, #16a34a, #4ade80); }
.mini-fill.time { background: linear-gradient(90deg, #0284c7, #38bdf8); }

.hud-center-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    border: 2px solid #eab308;
    border-radius: 10px;
    padding: 6px 18px;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25);
}

.level-badge {
    font-size: 15px;
    font-weight: 900;
    color: #eab308;
    line-height: 1.1;
}

.level-name {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}

/* Rival banner */
.rival-banner {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(176, 58, 78, 0.95);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 18px;
    border-radius: 10px;
    border: 2px solid #f87171;
    z-index: 12;
    max-width: 90vw;
    text-align: center;
    animation: pulse 0.5s infinite alternate;
    pointer-events: none;
}

/* ===== Customer queue ===== */
.queue-strip {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 11;
    max-width: 94vw;
    overflow-x: auto;
    padding: 4px;
}

.customer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(15, 23, 42, 0.92);
    border: 2px solid #475569;
    border-radius: 12px;
    padding: 8px 10px;
    min-width: 86px;
    cursor: pointer;
    color: #e2e8f0;
    transition: transform 0.1s, border-color 0.15s;
}

.customer-card:hover { transform: translateY(-3px); }
.customer-card.active {
    border-color: #facc15;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.6);
    background: rgba(41, 37, 36, 0.95);
}

.cust-emoji { font-size: 28px; line-height: 1; }
.cust-name { font-size: 11px; font-weight: 800; }
.cust-key { font-size: 9px; color: #94a3b8; font-weight: 700; }

.patience-bar {
    width: 100%;
    height: 5px;
    background: #1e293b;
    border-radius: 3px;
    overflow: hidden;
}

.patience-fill { height: 100%; transition: width 0.3s linear; }

.queue-empty {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    padding: 12px;
}

/* Speech bubble */
.speech-bubble {
    position: absolute;
    top: 268px;
    left: 50%;
    transform: translateX(-50%);
    background: #fffbeb;
    color: #1c1917;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    max-width: min(560px, 92vw);
    text-align: center;
    z-index: 11;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.speech-want {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 800;
    color: #b45309;
}

/* ===== Wahala popup ===== */
.wahala-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(127, 29, 29, 0.97);
    border: 3px solid #ef4444;
    border-radius: 14px;
    padding: 14px 18px;
    z-index: 30;
    width: min(340px, 90vw);
    text-align: center;
    color: #fff;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.7);
    animation: wahalaFlash 0.7s infinite alternate;
}

@keyframes wahalaFlash {
    from { box-shadow: 0 0 18px rgba(239, 68, 68, 0.5); }
    to { box-shadow: 0 0 34px rgba(239, 68, 68, 0.95); }
}

.wahala-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 900;
    color: #fecaca;
}

.wahala-emoji { font-size: 26px; }
.wahala-dialogue { font-size: 13px; margin: 8px 0; color: #fee2e2; font-style: italic; }

.wahala-timer {
    width: 100%;
    height: 7px;
    background: #450a0a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wahala-timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #facc15);
    transition: width 0.3s linear;
}

.wahala-actions { display: flex; justify-content: center; }

.wahala-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    min-height: 48px;
}

.wahala-btn.settle { background: #facc15; color: #1c1917; }
.wahala-btn.reject { background: #16a34a; color: #fff; }
.wahala-btn:hover { transform: scale(1.04); }

/* ===== POS action panel ===== */
.pos-panel {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    z-index: 20;
    max-width: 96vw;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 92px;
    min-height: 64px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-weight: 900;
    color: #fff;
    transition: transform 0.08s, filter 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.pos-btn:hover { filter: brightness(1.15); }
.pos-btn:active { transform: scale(0.93); }

.pos-btn-label { font-size: 14px; letter-spacing: 0.5px; }
.pos-btn-keys { font-size: 9px; opacity: 0.75; font-weight: 700; }

.pos-transfer { background: linear-gradient(180deg, #2563eb, #1d4ed8); }
.pos-withdraw { background: linear-gradient(180deg, #dc2626, #b91c1c); }
.pos-deposit { background: linear-gradient(180deg, #16a34a, #15803d); }
.pos-airtime { background: linear-gradient(180deg, #ca8a04, #a16207); }

.pause-btn {
    min-width: 64px;
    min-height: 48px;
    border-radius: 10px;
    border: 2px solid #94a3b8;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.pause-overlay { z-index: 40; }

/* ===== Result cards ===== */
.result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 36px;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.8);
    min-width: min(340px, 90vw);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #0f172a;
}

.result-card.win {
    border-color: #facc15;
    background: linear-gradient(160deg, #4a3200, #7a5200 40%, #4a3200);
    box-shadow: 0 0 50px rgba(250, 204, 21, 0.5), 0 8px 28px rgba(0, 0, 0, 0.8);
}
.result-card.lose {
    border-color: #ef4444;
    background: linear-gradient(160deg, #3b0a0a, #5c1010 40%, #3b0a0a);
}

.victory-screen {
    background: rgba(40, 24, 0, 0.85);
    overflow: hidden;
}

.gameover-screen {
    background: rgba(20, 4, 4, 0.9);
    overflow: hidden;
}

.storm-clouds {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(120deg, rgba(80, 0, 0, 0.25) 0px, rgba(80, 0, 0, 0.25) 40px, transparent 40px, transparent 80px);
    animation: stormDrift 6s linear infinite;
    pointer-events: none;
}

@keyframes stormDrift {
    from { background-position: 0 0; }
    to { background-position: 200px 100px; }
}

.money-rain {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.money-drop {
    position: absolute;
    top: -60px;
    font-size: 26px;
    color: #facc15;
    animation-name: moneyFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

@keyframes moneyFall {
    from { transform: translateY(-60px) rotate(0deg); opacity: 1; }
    to { transform: translateY(110vh) rotate(360deg); opacity: 0.9; }
}

.win-text {
    font-size: clamp(30px, 6vw, 46px);
    font-weight: 900;
    color: #facc15;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.8), 0 4px 0 #92400e;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.lose-text {
    font-size: clamp(26px, 5vw, 38px);
    font-weight: 900;
    color: #ef4444;
    text-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
    margin-bottom: 10px;
}

.score-summary {
    font-size: 15px;
    color: #cbd5e1;
    font-weight: 700;
    margin-bottom: 20px;
    max-width: 420px;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    border: 2px solid #475569;
    background: #1e293b;
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.1s;
    min-height: 48px;
}

.action-btn:hover { transform: scale(1.04); }
.action-btn:active { transform: scale(0.96); }
.action-btn.next-btn { background: #10b981; color: #052e1c; border-color: #34d399; }
.action-btn.restart-btn { background: #f97316; color: #fff; border-color: #fb923c; }

.action-btn.gold-btn {
    background: linear-gradient(180deg, #92400e, #78350f);
    color: #fde68a;
    border-color: #facc15;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}
.action-btn.gold-btn:hover { filter: brightness(1.12); }
.action-btn.gold-btn:active { transform: scale(0.94); }

/* ===== Loading screen ===== */
.loading-screen {
    background: rgba(10, 6, 2, 0.96);
    gap: 22px;
}

.gold-spinner {
    width: 56px;
    height: 56px;
    border: 6px solid rgba(250, 204, 21, 0.25);
    border-top-color: #facc15;
    border-radius: 50%;
    animation: goldSpin 0.9s linear infinite;
}

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

.loading-text {
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 900;
    color: #facc15;
    letter-spacing: 1px;
}

.how-to-screen .rules-list li {
    color: #fde68a;
    font-weight: 700;
}

/* ===== Final Congratulations screen ===== */
.congrats-screen {
    background: radial-gradient(circle at 50% 30%, rgba(120, 53, 15, 0.55), rgba(10, 6, 2, 0.97));
}

.congrats-card {
    border-color: #facc15;
    box-shadow: 0 0 40px rgba(250, 204, 21, 0.5);
}

.congrats-text {
    background: linear-gradient(90deg, #facc15, #fde68a, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: congratsGlow 1.6s ease-in-out infinite;
}

@keyframes congratsGlow {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6)); }
    50% { filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.95)); }
}

.money-rain {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.money-drop {
    position: absolute;
    top: -40px;
    font-size: 26px;
    animation-name: moneyFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    opacity: 0.9;
}

@keyframes moneyFall {
    0% { transform: translateY(-40px) rotate(0deg); opacity: 0.9; }
    100% { transform: translateY(110vh) rotate(360deg); opacity: 0.4; }
}

/* ===== Pidgin voice subtitle toast (plan section 4) ===== */
.subtitle-toast {
    position: absolute;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92%, 640px);
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(10, 14, 26, 0.82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(253, 224, 71, 0.45);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    color: #fde047;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.35;
    text-align: center;
    z-index: 60;
    pointer-events: none;
    animation: subtitlePop 0.18s ease-out;
}

.subtitle-icon {
    font-size: 17px;
    animation: subtitlePulse 1s ease-in-out infinite;
}

@keyframes subtitlePop {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes subtitlePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.18); opacity: 0.75; }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .pos-btn { min-width: 74px; min-height: 58px; }
    .pos-btn-label { font-size: 12px; }
    .customer-card { min-width: 70px; padding: 6px 7px; }
    .cust-emoji { font-size: 22px; }
    .speech-bubble { top: 250px; font-size: 11px; }
    .queue-strip { top: 116px; }
    .subtitle-toast { font-size: 13px; padding: 8px 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== LEARNING DASHBOARD ===== */
.dashboard-btn { background: linear-gradient(135deg, #0e7490, #0891b2) !important; }
.dashboard-screen { background: radial-gradient(circle at 50% 20%, rgba(14, 116, 144, 0.35), rgba(8, 6, 3, 0.94)); }
.dash-empty { color: #e7d6b8; font-size: 16px; max-width: 520px; text-align: center; margin: 20px auto; }
.dash-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin: 8px auto 18px; width: 92%; }
.dash-card { background: rgba(30, 20, 8, 0.85); border: 2px solid #7a5a1e; border-radius: 12px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dash-card.good { border-color: #22c55e; }
.dash-card.bad { border-color: #ef4444; }
.dash-val { font-size: 24px; font-weight: 800; color: #fbbf24; }
.dash-card.good .dash-val { color: #22c55e; }
.dash-card.bad .dash-val { color: #ef4444; }
.dash-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #cdb98f; text-align: center; }
.dash-subhead { color: #fbbf24; margin: 10px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: 1px; }
.dash-report-list { list-style: none; max-width: 620px; width: 92%; margin: 0 auto 20px; display: flex; flex-direction: column; gap: 8px; }
.dash-report-list li { display: flex; align-items: center; gap: 12px; background: rgba(30, 20, 8, 0.8); border: 1px solid #5a4418; border-radius: 10px; padding: 10px 14px; }
.dash-rep-grade { font-size: 22px; font-weight: 900; min-width: 26px; text-align: center; }
.dash-rep-name { flex: 1; color: #f5e9cd; font-size: 14px; text-align: left; }
.dash-rep-meta { color: #b8a374; font-size: 12px; }

/* ===== LEVEL SELECT SCAM LEVEL ===== */
.level-cell.scam-level { border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
.scam-tag { display: block; font-size: 9px; color: #ef4444; font-weight: 800; letter-spacing: 0.5px; margin-top: 2px; }

/* ===== HUSTLE REPORT ===== */
.report-screen { background: radial-gradient(circle at 50% 15%, rgba(80, 60, 10, 0.4), rgba(6, 5, 2, 0.95)); }
.report-card { position: relative; background: linear-gradient(160deg, rgba(40, 28, 10, 0.97), rgba(18, 12, 4, 0.98)); border: 3px solid #b8860b; border-radius: 18px; padding: 22px 24px 24px; max-width: 480px; width: 92%; max-height: 92vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7); }
.report-head { font-size: 24px; text-align: center; letter-spacing: 1px; margin-bottom: 4px; }
.report-head.win { color: #fbbf24; text-shadow: 0 0 14px rgba(251, 191, 36, 0.6); }
.report-head.lose { color: #ef4444; text-shadow: 0 0 14px rgba(239, 68, 68, 0.5); }
.report-sub { text-align: center; color: #cdb98f; font-size: 13px; margin-bottom: 10px; }
.report-grade-badge { width: 74px; height: 74px; line-height: 70px; text-align: center; font-size: 40px; font-weight: 900; border: 4px solid; border-radius: 50%; margin: 6px auto 14px; background: rgba(0, 0, 0, 0.4); }
.report-metrics { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.rep-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #e7d6b8; padding: 6px 10px; background: rgba(0, 0, 0, 0.28); border-radius: 8px; }
.rep-row strong { font-size: 15px; color: #fde9b8; }
.rep-row.good strong { color: #22c55e; }
.rep-row.bad strong { color: #ef4444; }
.rep-row.net { background: rgba(251, 191, 36, 0.14); border: 1px solid #b8860b; }
.rep-row.net strong { color: #fbbf24; font-size: 18px; }
.rep-loss-breakdown { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 2px 0 6px; }
.rep-loss-breakdown span { font-size: 11px; color: #f0a3a3; background: rgba(120, 20, 20, 0.35); border: 1px solid rgba(239, 68, 68, 0.4); border-radius: 20px; padding: 3px 10px; }
.miss-btn { display: block; margin: 0 auto 8px; }
.error-list { list-style: none; max-height: 140px; overflow-y: auto; margin: 0 auto 12px; width: 100%; }
.error-list li { font-size: 12px; color: #fca5a5; background: rgba(120, 20, 20, 0.25); border-left: 3px solid #ef4444; border-radius: 6px; padding: 6px 10px; margin-bottom: 5px; text-align: left; }

/* ===== FAKE ALERT WIDGET (Level 3.5) ===== */
.fake-alert-widget { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; gap: 20px; align-items: center; z-index: 40; flex-wrap: wrap; justify-content: center; width: 92%; max-width: 620px; }
.phone-frame { width: 210px; background: #1c1c22; border-radius: 26px; padding: 12px 10px 16px; border: 3px solid #3a3a44; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7); position: relative; }
.phone-notch { width: 60px; height: 8px; background: #3a3a44; border-radius: 10px; margin: 0 auto 10px; }
.phone-screen { background: #f4f6f8; border-radius: 10px; padding: 12px 12px 14px; color: #1a1a1a; text-align: left; }
.ph-bank { font-size: 12px; font-weight: 800; color: #0b7a3b; margin-bottom: 6px; }
.ph-line { font-size: 12px; color: #333; margin: 3px 0; }
.ph-amount { font-size: 22px; font-weight: 900; color: #0b7a3b; margin: 6px 0; }
.ph-amount.mismatch { color: #d11; }
.ph-status { font-size: 13px; font-weight: 800; margin-top: 6px; }
.ph-status.ok { color: #0b7a3b; }
.ph-status.pending { color: #d97706; }
.ph-ref { font-size: 10px; color: #888; margin-top: 6px; }
.alert-inspect { flex: 1; min-width: 200px; background: rgba(20, 14, 6, 0.92); border: 2px solid #b8860b; border-radius: 14px; padding: 16px; text-align: center; }
.alert-client { color: #fde9b8; font-size: 15px; margin-bottom: 6px; }
.alert-client strong { color: #fbbf24; }
.alert-question { color: #cdb98f; font-size: 12px; margin-bottom: 14px; }
.alert-buttons { display: flex; gap: 10px; justify-content: center; }
.alert-btn { flex: 1; padding: 12px 8px; border: none; border-radius: 10px; font-weight: 800; font-size: 14px; cursor: pointer; color: #fff; letter-spacing: 0.5px; }
.alert-btn small { display: block; font-size: 10px; opacity: 0.8; font-weight: 600; }
.alert-btn.accept { background: linear-gradient(135deg, #16a34a, #22c55e); }
.alert-btn.reject { background: linear-gradient(135deg, #b91c1c, #ef4444); }

/* ===== Level 5 Fake Alert HUD (non-overlapping top rows) ===== */
.fake-alert-hud { position: absolute; top: 116px; left: 50%; transform: translateX(-50%); width: min(560px, 94vw); z-index: 46; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.fa-hud-row1 { display: flex; justify-content: space-between; align-items: center; }
.fa-level-badge { background: linear-gradient(135deg, #b8860b, #fbbf24); color: #2a1a02; font-weight: 900; font-size: 13px; padding: 5px 12px; border-radius: 8px; letter-spacing: 0.5px; }
.fa-pause-btn { pointer-events: auto; background: rgba(15, 23, 42, 0.9); color: #fde68a; border: 2px solid rgba(250, 204, 21, 0.6); border-radius: 8px; font-weight: 800; font-size: 12px; padding: 5px 14px; cursor: pointer; }
.fa-pause-btn:active { transform: scale(0.95); }
.fa-hud-row2 { display: flex; flex-direction: column; gap: 4px; background: rgba(10, 6, 2, 0.78); border-radius: 10px; padding: 6px 10px; border: 1px solid rgba(250, 204, 21, 0.25); }
.fa-counter { color: #fde9b8; font-size: 12px; font-weight: 800; text-align: center; letter-spacing: 0.3px; }
.fa-progress { width: 100%; height: 8px; background: #292524; border-radius: 6px; overflow: hidden; }
.fa-progress-fill { height: 100%; background: linear-gradient(90deg, #2563eb, #3b82f6); transition: width 0.25s; }
.fake-alert-widget { top: 56% !important; }
.alert-btn:active { transform: scale(0.96); }
.fake-alert-pause { position: absolute; top: 12px; right: 12px; z-index: 41; }

/* ===== TARGET REACHED BANNER ===== */
.target-banner { position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(135deg, #b8860b, #fbbf24); color: #2a1a02; font-weight: 900; font-size: 20px; padding: 14px 26px; border-radius: 14px; z-index: 45; box-shadow: 0 0 30px rgba(251, 191, 36, 0.8); animation: targetPop 0.4s ease-out; text-align: center; letter-spacing: 0.5px; }
@keyframes targetPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 640px) {
    .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fake-alert-widget { top: 46%; gap: 10px; }
    .phone-frame { width: 150px; padding: 8px; }
    .ph-amount { font-size: 17px; }
    .alert-inspect { min-width: 150px; padding: 12px; }
    .report-head { font-size: 19px; }
    .report-grade-badge { width: 60px; height: 60px; line-height: 56px; font-size: 32px; }
    .target-banner { font-size: 15px; padding: 11px 18px; }
}

/* ===== WAT clock + game timer badges ===== */
.badge-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.badge { display: flex; flex-direction: column; align-items: center; background: rgba(15, 23, 42, 0.9); border: 2px solid rgba(250, 204, 21, 0.5); border-radius: 12px; padding: 8px 16px; min-width: 118px; }
.badge-lbl { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #94a3b8; }
.badge-val { font-size: 18px; font-weight: 900; color: #fde68a; }

/* ===== REGISTRATION ===== */
.reg-screen { overflow-y: auto; }
.reg-form { display: flex; flex-direction: column; gap: 12px; width: min(420px, 92vw); text-align: left; }
.reg-field { display: flex; flex-direction: column; gap: 5px; }
.reg-field label { font-size: 12px; font-weight: 800; color: #fcd34d; letter-spacing: 0.4px; text-transform: uppercase; }
.reg-field input, .reg-field select { padding: 11px 12px; border-radius: 10px; border: 2px solid rgba(250, 204, 21, 0.4); background: #1c1917; color: #fde68a; font-size: 15px; font-weight: 700; outline: none; }
.reg-field input:focus, .reg-field select:focus { border-color: #facc15; }
.tribe-select-wrap { position: relative; }
.tribe-toggle { width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; border: 2px solid rgba(250, 204, 21, 0.4); background: #1c1917; color: #fde68a; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.tribe-panel { position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; right: 0; background: #0f172a; border: 2px solid #facc15; border-radius: 12px; padding: 8px; max-height: 260px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7); }
.tribe-search { padding: 9px 10px; border-radius: 8px; border: 1px solid #475569; background: #1e293b; color: #e2e8f0; font-size: 14px; outline: none; }
.tribe-list { list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.tribe-option { padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 700; color: #e2e8f0; cursor: pointer; text-align: left; background: transparent; border: none; width: 100%; }
.tribe-option:hover { background: #1e293b; }
.tribe-option.selected { background: #16a34a; color: #fff; }
.tribe-option.custom { color: #facc15; }
.tribe-empty { color: #94a3b8; font-size: 13px; padding: 8px; }
.tribe-note { font-size: 12px; color: #a3e635; font-weight: 700; line-height: 1.4; }
.preview-line { background: rgba(22, 163, 74, 0.16); border: 1px dashed #4ade80; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 800; color: #bbf7d0; }

/* ===== QUIZ ===== */
.quiz-screen { overflow-y: auto; }
.quiz-card { width: min(560px, 94vw); background: linear-gradient(160deg, rgba(40, 28, 10, 0.97), rgba(18, 12, 4, 0.98)); border: 3px solid #b8860b; border-radius: 16px; padding: 18px 18px 22px; text-align: left; }
.quiz-progress { font-size: 12px; font-weight: 800; color: #fbbf24; text-align: center; margin-bottom: 10px; letter-spacing: 1px; }
.quiz-question { font-size: 15px; font-weight: 800; color: #fde9b8; margin: 14px 0 10px; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option { padding: 11px 14px; border-radius: 10px; border: 2px solid #475569; background: #1e293b; color: #e2e8f0; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.quiz-option:hover { border-color: #facc15; }
.quiz-option.chosen { border-color: #38bdf8; background: #0c4a6e; }
.quiz-option.good { border-color: #22c55e; background: rgba(22, 163, 74, 0.3); color: #bbf7d0; }
.quiz-option.bad { border-color: #ef4444; background: rgba(185, 28, 28, 0.3); color: #fecaca; }
.quiz-explain { font-size: 12px; color: #a3e635; margin-top: 8px; font-weight: 700; }
.quiz-score { text-align: center; font-size: 20px; font-weight: 900; color: #facc15; margin: 14px 0; }
.quiz-nav { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* ===== CERTIFICATE ===== */
.cert-screen { overflow-y: auto; }
.cert-card { width: min(560px, 94vw); background: linear-gradient(160deg, #0b3d1f, #062a14); border: 6px double #facc15; border-radius: 16px; padding: 20px 22px 24px; text-align: center; color: #eafbe7; box-shadow: 0 0 50px rgba(250, 204, 21, 0.4); }
.cert-seal-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cert-emblem { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(180deg, #16a34a, #15803d); border: 3px solid #facc15; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cert-country { font-size: 13px; font-weight: 900; letter-spacing: 2px; color: #facc15; }
.cert-title { font-size: clamp(20px, 4vw, 30px); font-weight: 900; color: #facc15; margin: 4px 0 2px; letter-spacing: 1px; }
.cert-sub { font-size: 12px; color: #cdb98f; margin-bottom: 14px; }
.cert-name { font-size: clamp(20px, 4vw, 28px); font-weight: 900; color: #ffffff; border-bottom: 2px dashed rgba(250, 204, 21, 0.6); display: inline-block; padding: 0 12px 4px; margin-bottom: 12px; }
.cert-rows { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; text-align: left; }
.cert-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; background: rgba(0, 0, 0, 0.25); border-radius: 8px; padding: 7px 11px; }
.cert-row strong { color: #fde9b8; text-align: right; }
.cert-diversity { font-size: 12px; font-style: italic; color: #a3e635; margin: 10px 0; line-height: 1.4; }
.cert-stamp { font-size: 12px; font-weight: 900; color: #facc15; border: 2px solid #facc15; border-radius: 8px; display: inline-block; padding: 6px 14px; transform: rotate(-3deg); margin: 10px 0; }
.cert-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cert-share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-btn { padding: 10px 14px; border-radius: 999px; border: none; font-weight: 800; font-size: 13px; color: #fff; cursor: pointer; min-height: 44px; }
.share-btn.wa { background: #25d366; color: #04331a; }
.share-btn.fb { background: #1877f2; }
.share-btn.x { background: #111; border: 1px solid #555; }

/* ===== COUNTRY SELECTION (57 countries) ===== */
.country-select-screen { overflow-y: auto; gap: 10px; }
.country-toolbar { display: flex; flex-direction: column; gap: 8px; width: min(900px, 96vw); }
.country-search { width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid #444; background: #14161c; color: #fff; font-size: 15px; }
.country-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.country-chip { padding: 8px 12px; border-radius: 999px; border: 2px solid #444; background: #14161c; color: #cbd5e1; font-weight: 800; font-size: 12px; cursor: pointer; min-height: 40px; }
.country-chip.active { background: #16a34a; border-color: #22c55e; color: #fff; }
.country-scroll { width: min(960px, 96vw); max-height: 56vh; overflow-y: auto; padding: 4px 2px 12px; }
.country-section-head { font-size: 14px; font-weight: 900; letter-spacing: 2px; color: #22c55e; text-align: left; margin: 12px 4px 8px; }
.country-section-head.card { color: #38bdf8; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.country-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px; border: 2px solid #333; background: #14161c; color: #e5e7eb; cursor: pointer; min-height: 120px; transition: transform 0.1s, border-color 0.15s; pointer-events: auto; }
.country-card:hover { transform: translateY(-2px); border-color: #22c55e; }
.country-card.agent { border-color: rgba(34, 197, 94, 0.5); }
.country-card.card-shop { border-color: rgba(56, 189, 248, 0.5); }
.country-card.selected { border-color: #facc15; box-shadow: 0 0 14px rgba(250, 204, 21, 0.5); }
.country-flag { font-size: 30px; line-height: 1; }
.country-name { font-size: 13px; font-weight: 800; text-align: center; }
.country-currency { font-size: 13px; font-weight: 900; color: #facc15; }
.country-currency small { color: #94a3b8; font-weight: 700; }
.country-badge { margin-top: 2px; font-size: 9px; font-weight: 900; letter-spacing: 1px; padding: 3px 7px; border-radius: 999px; }
.badge-agent { background: #16a34a; color: #fff; }
.badge-card { background: #0ea5e9; color: #04283a; }
.country-empty { color: #94a3b8; font-size: 14px; padding: 20px; }
.hud-country { font-size: 11px; font-weight: 800; color: #fde9b8; }

/* ===== JAPA CARD SHOP TERMINAL PANEL ===== */
.card-shop-panel { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: min(560px, 95vw); background: linear-gradient(160deg, #04283a, #061826); border: 2px solid #0ea5e9; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; z-index: 30; pointer-events: auto; }
.card-shop-head { display: flex; align-items: center; gap: 8px; }
.card-shop-flag { font-size: 22px; }
.card-shop-title { font-size: 13px; font-weight: 900; color: #7dd3fc; letter-spacing: 1px; }
.card-shop-badge { margin-left: auto; font-size: 9px; font-weight: 900; letter-spacing: 1px; padding: 3px 8px; border-radius: 999px; background: #0ea5e9; color: #04283a; }
.card-shop-order { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: #cbd5e1; background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 8px 10px; }
.card-shop-order.empty { justify-content: center; color: #64748b; }
.card-shop-cust { font-weight: 800; color: #fff; }
.card-shop-method strong { color: #facc15; }
.card-shop-amount { margin-left: auto; font-weight: 900; color: #35d16d; }
.card-shop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-terminal-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 6px; border-radius: 10px; border: 2px solid #0ea5e9; background: #0b1f2e; color: #e0f2fe; font-weight: 800; cursor: pointer; min-height: 54px; }
.card-terminal-btn.wanted { border-color: #facc15; background: #1a2c17; box-shadow: 0 0 12px rgba(250, 204, 21, 0.5); }
.card-btn-label { font-size: 13px; }
.card-btn-hint { font-size: 10px; color: #94a3b8; }
.card-shop-progress { display: flex; flex-direction: column; gap: 4px; }
.share-btn.ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }