/* =========================================================
   Hub Weekly Arena - Styles
   Golden Gate brand theme (kem / vàng / cam)
   Single-screen: 3 stacked sections (checkin → challenge → pikachu)
   ========================================================= */

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

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: #FBF3DC;
    color: #2D2D2D;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; }

/* ── Mobile / No-token warnings ─────────────────────────── */
.mobile-warning, .no-token-msg {
    display: none;
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #FF9E5E 0%, #E95526 100%);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.mobile-warning.show, .no-token-msg.show { display: flex; }

.warning-box {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.warning-icon { font-size: 3rem; margin-bottom: .75rem; }
.warning-box h2 { font-size: 1.2rem; color: #333; margin-bottom: .5rem; }
.warning-box p  { font-size: .9rem; color: #777; line-height: 1.5; }

/* ── Loading Overlay ─────────────────────────────────────── */
.loading-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 8000;
    flex-direction: column;
    align-items: center; justify-content: center;
    color: #fff;
    gap: .75rem;
}
.loading-overlay.show { display: flex; }
.loading-spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(255,255,255,.3);
    border-top-color: #FFC107;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { font-size: .95rem; font-weight: 500; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-msg {
    position: fixed;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 50%;
    width: calc(100vw - 48px);
    max-width: 360px;
    transform: translateX(-50%);
    background: rgba(45,45,45,.92);
    color: #fff;
    padding: .65rem .9rem;
    border-radius: 18px;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.28;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
    z-index: 7000;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
}
.toast-msg.show { opacity: 1; }

/* ── Hub Wrap ────────────────────────────────────────────── */
.hub-wrap {
    display: none;
    position: fixed; inset: 0;
    overflow: hidden;
}
.hub-wrap.show { display: block; }

/* ── Screens ─────────────────────────────────────────────── */
.screen {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s, visibility .25s;
}
.screen.active { opacity: 1; visibility: visible; pointer-events: auto; }

/* ── Main Screen ─────────────────────────────────────────── */
#mainScreen {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #FFF3D6 0%, #FCE7BA 100%);
}

/* ── Player Header ───────────────────────────────────────── */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    background: #ECE7BB;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    flex-shrink: 0;
}
.player-info { display: flex; align-items: center; gap: .6rem; }
.player-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #FFDB58 0%, #FFB84D 50%, #FFA726 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(255,184,77,.4);
}
.player-name  { font-size: .85rem; color: #2D2D2D; font-weight: 600; }
.player-phone { font-size: .8rem; color: #E95526; font-weight: 700; }
.header-logo-img { height: 28px; object-fit: contain; }

/* ── Hub Body (scrollable) ───────────────────────────────── */
.hub-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: .75rem .85rem calc(.85rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

/* ── Section Card ────────────────────────────────────────── */
.hub-section {
    background: #FFFFFF;
    border: 1px solid #F0E4C0;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 4px 14px rgba(233,85,38,.08);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-bottom: .85rem;
}
.section-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.section-title { font-size: 1rem; font-weight: 800; color: #2D2D2D; }
.section-sub   { font-size: .75rem; color: #A89A70; margin-top: .15rem; }

/* ════════════════════════════════════════════════════════════
   SECTION 1: CHECK-IN
   ════════════════════════════════════════════════════════════ */
.streak-info {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .75rem;
    font-size: .85rem;
    color: #E95526;
    font-weight: 700;
}
.streak-flame { font-size: 1rem; }
.streak-hint  { margin-left: auto; font-size: .75rem; color: #A89A70; font-weight: 500; }

/* Weekly calendar */
.checkin-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .35rem;
    margin-bottom: .85rem;
}
.checkin-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .45rem .2rem;
    border-radius: 10px;
    background: #FFF6E0;
    border: 1px solid #F0E4C0;
    transition: all .2s;
    min-width: 0;
}
.checkin-day.today   { border-color: #FFB300; background: #FFF1C4; box-shadow: 0 0 0 2px rgba(255,179,0,.25); }
.checkin-day.checked { background: #E4F4E2; border-color: #81C784; }
.checkin-day.future  { opacity: .5; }

.day-label { font-size: .65rem; color: #7A6A44; font-weight: 700; }
.day-icon  { font-size: .95rem; line-height: 1; }
.day-gcoin {
    font-size: .6rem;
    color: #E95526;
    font-weight: 800;
    white-space: nowrap;
}
.day-gcoin.preview { color: rgba(233,85,38,.45); }

/* Check-in button */
.btn-checkin {
    width: 100%;
    padding: .8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFDB58 0%, #FFB84D 50%, #FFA726 100%);
    color: #5A3B00;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255,167,38,.4);
    transition: transform .1s, opacity .2s;
}
.btn-checkin:active { transform: scale(.97); }
.btn-checkin:disabled, .btn-checkin.checked {
    background: #EAE0C4;
    color: #A89A70;
    box-shadow: none;
}

/* ════════════════════════════════════════════════════════════
   SECTION 2: CHALLENGES
   ════════════════════════════════════════════════════════════ */
.challenge-list { display: flex; flex-direction: column; gap: .6rem; }

.challenge-card {
    background: #FFFBF2;
    border-radius: 14px;
    padding: .85rem;
    border: 1px solid #F0E4C0;
    transition: border-color .2s, background .2s;
}
.challenge-card.challenge-active    { border-color: #FF6633; background: #FFF3EC; }
.challenge-card.challenge-completed { border-color: #FFB300; background: #FFF6DC; }
.challenge-card.challenge-claimed   { border-color: #E8DFC6; opacity: .65; }
.challenge-card.challenge-locked    { opacity: .6; }

.challenge-header {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: .6rem;
}
.challenge-icon { font-size: 1.4rem; flex-shrink: 0; }
.challenge-info { flex: 1; min-width: 0; }
.challenge-title { font-size: .9rem; font-weight: 800; color: #2D2D2D; }
.challenge-desc  { font-size: .75rem; color: #7A6A44; margin-top: .15rem; }
.challenge-reward {
    flex-shrink: 0;
    font-size: .9rem;
    font-weight: 800;
    color: #E95526;
    text-align: right;
    white-space: nowrap;
}
.challenge-reward small { display: block; font-size: .65rem; font-weight: 500; color: #A89A70; }

/* Progress bar */
.progress-bar-wrap {
    height: 7px;
    background: #F0E4C0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .3rem;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFC107, #FF7744);
    border-radius: 4px;
    transition: width .4s;
}
.progress-label  { font-size: .72rem; color: #7A6A44; margin-bottom: .5rem; }
.locked-msg      { font-size: .75rem; color: #A89A70; margin-bottom: .5rem; }
.lock-icon       { font-size: 1.1rem; }

.challenge-action { display: flex; justify-content: flex-end; }
.btn-claim {
    padding: .48rem 1.2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #FFDB58 0%, #FFB84D 50%, #FFA726 100%);
    color: #5A3B00;
    font-size: .8rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(255,167,38,.35);
    transition: transform .1s;
}
.btn-claim:active  { transform: scale(.96); }
.btn-claim.claimed { background: #EAE0C4; color: #A89A70; box-shadow: none; }

/* ════════════════════════════════════════════════════════════
   SECTION 3: PIKACHU
   ════════════════════════════════════════════════════════════ */
.pik-stats {
    display: flex;
    justify-content: space-around;
    background: #FFF6E0;
    border: 1px solid #F0E4C0;
    border-radius: 12px;
    padding: .7rem .4rem;
    margin-bottom: .75rem;
}
.pik-stat-item { text-align: center; }
.pik-stat-val   { font-size: 1.05rem; font-weight: 800; color: #E95526; }
.pik-stat-label { font-size: .65rem; color: #A89A70; margin-top: .15rem; }

.pik-actions {
    display: flex;
    gap: .6rem;
    margin-bottom: .85rem;
}
.btn-play {
    flex: 2;
    padding: .8rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF9966 0%, #FF7744 50%, #FF6633 100%);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255,102,51,.4);
    transition: transform .1s, opacity .2s;
}
.btn-play:active   { transform: scale(.97); }
.btn-play:disabled { opacity: .5; }
.btn-ranking {
    flex: 1;
    padding: .8rem;
    border-radius: 14px;
    background: #FFF6E0;
    border: 1px solid #FFD08A;
    color: #E95526;
    font-size: .85rem;
    font-weight: 700;
    transition: background .2s;
}
.btn-ranking:active { background: #FFEDCB; }

/* Milestones */
.milestone-header {
    font-size: .82rem;
    font-weight: 800;
    color: #2D2D2D;
    margin-bottom: .55rem;
}
.milestone-list { display: flex; flex-direction: column; gap: .5rem; }

.milestone-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #FFFBF2;
    border: 1px solid #F0E4C0;
    border-radius: 12px;
    padding: .65rem .75rem;
    transition: border-color .2s;
}
.milestone-card.milestone-eligible { border-color: #FFB300; background: #FFF6DC; }
.milestone-card.milestone-claimed  { opacity: .55; }

.m-lock { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

.milestone-body { flex: 1; min-width: 0; }
.milestone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .3rem;
}
.milestone-name    { font-size: .78rem; color: #2D2D2D; font-weight: 700; }
.milestone-reward  { font-size: .78rem; color: #E95526; font-weight: 800; white-space: nowrap; }

.milestone-progress-wrap {
    height: 5px;
    background: #F0E4C0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: .25rem;
}
.milestone-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9966, #FF6633);
    border-radius: 3px;
    transition: width .4s;
}
.milestone-score { font-size: .65rem; color: #A89A70; }

.btn-milestone-claim {
    flex-shrink: 0;
    padding: .42rem .85rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #FFDB58 0%, #FFB84D 50%, #FFA726 100%);
    color: #5A3B00;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(255,167,38,.35);
    transition: transform .1s;
}
.btn-milestone-claim:active { transform: scale(.95); }

/* ════════════════════════════════════════════════════════════
   GAME SCREEN
   ════════════════════════════════════════════════════════════ */
#gameScreen {
    background: url('https://tgscms.ggg.com.vn/wp-content/uploads/2025/07/bg_man-hinh-choi-game-2.jpg') center / cover no-repeat, linear-gradient(160deg, #FF9966, #E95526);
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
}
.game-screen-inner { width: 100%; max-width: 480px; display: flex; flex-direction: column; height: 100%; }
.game-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1rem;
    background: rgba(45,20,0,.42);
    flex-shrink: 0;
}
.btn-back-game {
    padding: .4rem .85rem;
    border-radius: 20px;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}
.game-score-bar { display: flex; gap: 1rem; font-size: .85rem; color: #fff; font-weight: 600; }
#pikachuGameContainer {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    gap: 4px;
}

/* ── In-game notification ── */
.pik-notification {
    flex-shrink: 0;
    background: #E95526;
    color: #fff;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pik-notification.combo {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #333;
}

/* ── Powerup bar ── */
.pik-powerups {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: .85rem;
    padding: .4rem .6rem;
    background: rgba(45,20,0,.3);
}
.pik-pow-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .35rem .65rem;
    border-radius: 10px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    transition: opacity .2s, transform .1s;
    min-width: 52px;
}
.pik-pow-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    pointer-events: none;
}
.pik-pow-btn:active { transform: scale(.93); }
.pik-pow-btn:disabled { opacity: .35; }

/* ── Game board (copy pikachu-api-v2: ô vuông, canh giữa) ── */
.pik-board {
    display: grid;
    gap: 1px;
    padding: 3px;
    background: rgba(255,255,255,.1);
    border-radius: 12px;
    width: 100%;
    margin: 0 auto;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}
.pik-path-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    overflow: visible;
}
.pik-path-line {
    position: absolute;
    height: 3px;
    background: #FF0000;
    border-radius: 1px;
    z-index: 51;
    pointer-events: none;
    transform-origin: 0 50%;
}
.pik-cell {
    aspect-ratio: 1;
    background: rgba(255,255,255,.9);
    border: 1px solid #FFCB56;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background .15s;
    -webkit-tap-highlight-color: rgba(0,0,0,.1);
    touch-action: manipulation;
}
.pik-cell.pik-cell-empty {
    background: rgba(255,255,255,.08);
    cursor: default;
}
.pik-cell.pik-selected {
    background: #E3F2FD;
    border: 2px solid #2196F3;
    transform: scale(1.05);
}
.pik-brand {
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pik-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
}
#liveTimer.timer-warning { color: #ffd54f; }
#liveTimer.timer-caution { color: #ffe082; }

/* ════════════════════════════════════════════════════════════
   RESULT SCREEN
   ════════════════════════════════════════════════════════════ */
#resultScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: max(40px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom));
    background: #FFCB56;
    font-family: 'Nunito', sans-serif;
}

.result-card {
    position: relative;
    z-index: 0;
    width: min(342px, calc(100vw - 34px));
    padding: 74px 18px 22px;
    border: 4px solid #FFE4A6;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 252, 241, .96) 0%, #FFFCF1 100%);
    text-align: center;
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .95),
        0 11px 0 #B45A24,
        0 20px 26px rgba(133, 61, 9, .22);
}

.result-card::before,
.result-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.result-card::before {
    left: 22px;
    right: 22px;
    top: 16px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 224, 142, .7);
}

.result-card::after {
    left: 19px;
    right: 19px;
    bottom: -18px;
    height: 24px;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #D77638 0%, #8F3C18 100%);
    z-index: 0;
}

.result-card > * {
    position: relative;
    z-index: 1;
}

.result-title-img {
    position: absolute;
    top: -34px;
    left: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(292px, calc(100% - 38px));
    height: 72px;
    transform: translateX(-50%);
    border-radius: 24px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 34%, #DB3600 100%);
    box-shadow:
        inset 0 3px 1px -1px rgba(255, 255, 255, .72),
        0 5px 0 #B9521E,
        0 9px 14px rgba(119, 45, 0, .22);
}

.result-title-img::before,
.result-title-img::after {
    content: "";
    position: absolute;
    top: 24px;
    width: 42px;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(180deg, #FFB01E 0%, #D93600 100%);
    box-shadow: 0 4px 0 rgba(142, 60, 0, .28);
    z-index: 0;
}

.result-title-img::before {
    left: -26px;
    transform: skewY(16deg);
}

.result-title-img::after {
    right: -26px;
    transform: skewY(-16deg);
}

.result-title-img span {
    position: relative;
    z-index: 1;
    color: #fff;
    font-family: 'Paytone One', sans-serif;
    font-size: clamp(28px, 8.2vw, 36px);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(155, 35, 0, .42);
    white-space: nowrap;
}

.result-score-panel {
    display: grid;
    gap: 9px;
    margin-bottom: 14px;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 11px 13px 11px 15px;
    border: 2px solid #FFE0A1;
    border-radius: 16px;
    background: #FFF7DF;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .9),
        0 3px 0 rgba(255, 172, 52, .24);
    font-size: 15px;
    line-height: 1.15;
    text-align: left;
}

.result-row span {
    color: #7A5A2A;
    font-size: 15px;
    font-weight: 900;
}

.result-row strong {
    flex: 0 0 auto;
    min-width: 82px;
    color: #E95526;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    text-align: right;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}

.result-plays-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0 auto 13px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #FFF2B8 0%, #FFD366 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .72),
        0 4px 0 rgba(197, 102, 15, .28);
    color: #E95526;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: 1rem;
}

#resultScreen .result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2px;
}

#resultScreen .btn-play,
#resultScreen .btn-back-hub,
#resultScreen .btn-quiz-bonus {
    width: 100%;
    min-height: 58px;
    border-radius: 18px;
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    transition: transform .1s, box-shadow .1s, opacity .2s;
}

#resultScreen .btn-play {
    padding: 0 16px;
    border: 3px solid rgba(255, 255, 255, .8);
    background: linear-gradient(180deg, #FF8B5B 0%, #FF6536 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .45),
        0 5px 0 #B9521E,
        0 9px 16px rgba(118, 44, 0, .2);
    color: #fff;
    text-shadow: 0 2px 0 rgba(151, 42, 0, .35);
}

#resultScreen .btn-back-hub {
    padding: 0 16px;
    border: 3px solid #FFCE72;
    background: #FFF7DF;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .85),
        0 4px 0 rgba(214, 129, 36, .26);
    color: #E95526;
}

#resultScreen .btn-quiz-bonus {
    margin: 0 0 12px;
    padding: 0 14px;
    border: 3px solid rgba(255, 255, 255, .78);
    background: linear-gradient(180deg, #FFE884 0%, #FFB300 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .72),
        0 5px 0 #B87500,
        0 9px 14px rgba(133, 80, 0, .18);
    color: #7A3C00;
    font-size: 18px;
}

#resultScreen .btn-play:active,
#resultScreen .btn-back-hub:active,
#resultScreen .btn-quiz-bonus:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .55),
        0 2px 0 rgba(150, 73, 10, .45),
        0 5px 9px rgba(118, 44, 0, .12);
}

.btn-back-hub {
    padding: .75rem;
    border-radius: 14px;
    background: #FFF6E0;
    border: 1px solid #FFD08A;
    color: #E95526;
    font-size: .88rem;
    font-weight: 700;
}

@media (max-width: 360px) {
    #resultScreen {
        padding-left: 12px;
        padding-right: 12px;
    }

    .result-card {
        width: min(330px, calc(100vw - 24px));
        padding: 70px 14px 19px;
        border-radius: 24px;
    }

    .result-title-img {
        width: min(266px, calc(100% - 32px));
        height: 66px;
    }

    .result-title-img::before,
    .result-title-img::after {
        width: 34px;
    }

    .result-row {
        min-height: 54px;
        padding-left: 12px;
        padding-right: 10px;
    }

    .result-row span {
        font-size: 14px;
    }

    .result-row strong {
        min-width: 76px;
        font-size: 22px;
    }

    #resultScreen .btn-play,
    #resultScreen .btn-back-hub {
        min-height: 54px;
        font-size: 20px;
    }
}

/* Result screen refresh: reuse the home/store material system. */
#resultScreen {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 0 max(28px, env(safe-area-inset-bottom));
    background: #FFCB56;
    font-family: 'Nunito', sans-serif;
}

.result-card {
    position: relative;
    width: min(375px, 100vw);
    min-height: 100dvh;
    padding: 0 14px 24px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #FFCB56;
    box-shadow: none;
    text-align: center;
}

.result-card::before,
.result-card::after {
    content: none;
}

.result-header-card {
    position: absolute;
    top: 22px;
    left: 50%;
    z-index: 1;
    width: min(334px, calc(100% - 38px));
    height: 104px;
    transform: translateX(-50%);
    border-radius: 18px 18px 0 0;
    background: linear-gradient(180deg, #FF9135 0%, #F2451F 38%, #E92900 100%);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .52),
        0 6px 0 #B34B1E,
        0 10px 14px rgba(143, 54, 0, .16);
}

.result-title-img {
    position: absolute;
    top: 58px;
    left: 50%;
    z-index: 4;
    width: min(340px, calc(100% - 26px));
    height: auto;
    transform: translateX(-50%);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.result-title-img::before,
.result-title-img::after {
    content: none;
}

.result-title-img span {
    display: block;
    color: #fff;
    font-family: 'Paytone One', sans-serif;
    font-size: clamp(28px, 9.1vw, 34px);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(174, 45, 0, .3);
    white-space: nowrap;
}

.result-awning {
    position: absolute;
    top: 119px;
    left: 50%;
    z-index: 5;
    display: block;
    width: min(360px, calc(100% - 8px));
    height: 52px;
    transform: translateX(-50%);
    object-fit: fill;
    pointer-events: none;
}

.result-body-panel {
    position: relative;
    z-index: 2;
    width: min(344px, 100%);
    margin: 160px auto 0;
    padding: 58px 14px 24px;
    border: 2px solid #FFE3AD;
    border-radius: 23px;
    background: linear-gradient(180deg, #FFFCF1 0%, #FFF8E5 100%);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .92),
        0 9px 18px rgba(143, 74, 12, .14);
}

.result-score-panel {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 10px 13px;
    border: 2px solid #FFE0A1;
    border-radius: 16px;
    background: #FFF7DF;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .9),
        0 3px 0 rgba(255, 206, 114, .56);
    line-height: 1.12;
    text-align: left;
}

.result-row span {
    color: #755628;
    font-size: 14px;
    font-weight: 900;
}

.result-row strong {
    flex: 0 0 auto;
    min-width: 82px;
    color: #E95526;
    font-size: 24px;
    font-weight: 900;
    line-height: .95;
    text-align: right;
    text-shadow: 0 2px 0 rgba(255, 255, 255, .82);
}

.result-plays-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin: 2px auto 12px;
    padding: 0 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, #FFF2B8 0%, #FFD568 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .74),
        0 4px 0 rgba(199, 112, 30, .22);
    color: #E95526;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

#resultScreen .result-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 0;
}

#resultScreen .btn-play,
#resultScreen .btn-back-hub,
#resultScreen .btn-quiz-bonus {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    transition: transform .1s, box-shadow .1s, opacity .2s;
}

#resultScreen .btn-play {
    padding: 0 16px;
    border: 3px solid rgba(255, 225, 206, .92);
    background: linear-gradient(180deg, #FF8E62 0%, #FF673E 46%, #F14B21 100%);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .38),
        0 5px 0 #B74D1D,
        0 9px 13px rgba(118, 44, 0, .16);
    color: #fff;
    text-shadow: 0 2px 0 rgba(151, 42, 0, .34);
}

#resultScreen .btn-back-hub {
    padding: 0 16px;
    border: 2px solid #FFC75B;
    background: #FFF7DF;
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, .88),
        0 3px 0 rgba(214, 129, 36, .24);
    color: #E95526;
}

#resultScreen .btn-quiz-bonus {
    margin: 0 0 9px;
    padding: 0 16px;
    border: 2px solid rgba(255, 255, 255, .8);
    background: linear-gradient(180deg, #FFE884 0%, #FFB300 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .72),
        0 4px 0 #B87500,
        0 7px 11px rgba(133, 80, 0, .16);
    color: #7A3C00;
    font-size: 15px;
}

#resultScreen .btn-play:active,
#resultScreen .btn-back-hub:active,
#resultScreen .btn-quiz-bonus:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .55),
        0 2px 0 rgba(150, 73, 10, .45),
        0 5px 9px rgba(118, 44, 0, .12);
}

.result-shelf {
    position: relative;
    z-index: 5;
    display: block;
    width: min(371px, calc(100% + 2px));
    height: 34px;
    margin: -13px auto 0;
    pointer-events: none;
}

@media (max-width: 360px) {
    .result-card {
        padding-right: 10px;
        padding-left: 10px;
    }

    .result-header-card {
        top: 18px;
        width: min(318px, calc(100% - 34px));
        height: 96px;
    }

    .result-title-img {
        top: 51px;
    }

    .result-title-img span {
        font-size: clamp(27px, 8.8vw, 32px);
    }

    .result-awning {
        top: 109px;
        height: 48px;
    }

    .result-body-panel {
        margin-top: 146px;
        padding: 54px 12px 22px;
        border-radius: 21px;
    }

    .result-row {
        min-height: 50px;
        padding: 9px 11px;
    }

    .result-row span {
        font-size: 13px;
    }

    .result-row strong {
        min-width: 75px;
        font-size: 22px;
    }

    #resultScreen .btn-play,
    #resultScreen .btn-back-hub,
    #resultScreen .btn-quiz-bonus {
        min-height: 46px;
        font-size: 18px;
    }

    #resultScreen .btn-quiz-bonus {
        font-size: 14px;
    }
}

@media (max-height: 720px) {
    #resultScreen {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .result-card {
        padding-right: 12px;
        padding-left: 12px;
        padding-bottom: 16px;
    }

    .result-header-card {
        top: 16px;
        height: 92px;
        border-radius: 16px 16px 0 0;
    }

    .result-title-img {
        top: 48px;
    }

    .result-title-img span {
        font-size: clamp(26px, 8.6vw, 31px);
    }

    .result-awning {
        top: 102px;
        height: 45px;
    }

    .result-body-panel {
        width: min(340px, 100%);
        margin-top: 137px;
        padding: 50px 12px 20px;
        border-radius: 20px;
    }

    .result-score-panel {
        gap: 7px;
        margin-bottom: 10px;
    }

    .result-row {
        min-height: 48px;
        padding: 8px 11px;
        border-radius: 14px;
    }

    .result-row span {
        font-size: 13px;
    }

    .result-row strong {
        min-width: 73px;
        font-size: 21px;
    }

    .result-plays-info {
        min-height: 34px;
        margin-bottom: 10px;
        padding: 0 18px;
        font-size: 15px;
    }

    #resultScreen .result-actions {
        gap: 8px;
    }

    #resultScreen .btn-play,
    #resultScreen .btn-back-hub,
    #resultScreen .btn-quiz-bonus {
        min-height: 44px;
        border-radius: 14px;
        font-size: 17px;
    }

    #resultScreen .btn-quiz-bonus {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .result-shelf {
        height: 30px;
        margin-top: -11px;
    }
}

/* ════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 5000;
    align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-overlay.active,
.modal-overlay.show { display: flex; }

/* Ranking panel */
.ranking-panel {
    background: #fff;
    border: 1px solid #F0E4C0;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .95rem 1rem;
    background: linear-gradient(173deg, #FFD200 0%, #FF3603 100%);
    font-size: .98rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.modal-close {
    color: #fff;
    font-size: 1.15rem;
    padding: .3rem .6rem;
    border-radius: 8px;
    transition: background .2s;
}
.modal-close:active { background: rgba(255,255,255,.25); }

.my-rank-stats {
    padding: .6rem 1rem;
    font-size: .82rem;
    color: #2D2D2D;
    background: #FFF6E0;
    border-bottom: 1px solid #F0E4C0;
    flex-shrink: 0;
}
.my-rank-stats strong { color: #E95526; }

.rank-spinner {
    padding: 1.5rem;
    text-align: center;
    color: #A89A70;
    font-size: .85rem;
}

.ranking-list {
    flex: 1;
    overflow-y: auto;
    padding: .5rem .75rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}
.rank-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .5rem;
    border-bottom: 1px solid #F3ECD8;
    font-size: .85rem;
}
.rank-item.rank-mine { background: #FFF1C4; border-radius: 8px; }
.rank-pos   { font-size: 1rem; width: 2rem; text-align: center; flex-shrink: 0; font-weight: 700; color: #E95526; }
.rank-name  { flex: 1; color: #2D2D2D; }
.rank-score { color: #E95526; font-weight: 800; font-size: .88rem; }
.rank-empty { padding: 1.5rem; text-align: center; color: #A89A70; font-size: .85rem; }

.rank-pagination {
    padding: .65rem 1rem;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid #F0E4C0;
    background: #fff;
    flex-shrink: 0;
}
.rank-pagination button {
    padding: .4rem .9rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFDB58 0%, #FFB84D 50%, #FFA726 100%);
    color: #5A3B00;
    font-weight: 700;
    font-size: .9rem;
    transition: opacity .2s;
}
.rank-pagination button:disabled { opacity: .35; }
#rankPageInfo { font-size: .82rem; color: #7A6A44; min-width: 3rem; text-align: center; }

/* Alert modal */
.alert-panel {
    background: #fff;
    border: 1px solid #F0E4C0;
    border-radius: 20px;
    width: 100%;
    max-width: 320px;
    padding: 1.75rem 1.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: popIn .25s ease-out;
}
@keyframes popIn {
    from { opacity: 0; transform: scale(.88); }
    to   { opacity: 1; transform: scale(1); }
}
.modal-icon {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto .85rem;
}
.modal-icon.success { background: #E4F4E2; color: #2E7D32; border: 2px solid #66BB6A; }
.modal-icon.error   { background: #FDE7E7; color: #D32F2F; border: 2px solid #EF5350; }
.modal-icon.info    { background: #FFF6E0; color: #E95526; border: 2px solid #FFB74D; }
.modal-icon.warning { background: #FFF3E0; color: #E65100; border: 2px solid #FFB74D; }

.modal-title { font-size: 1.05rem; font-weight: 800; color: #2D2D2D; margin-bottom: .5rem; }
.modal-msg   { font-size: .88rem; color: #7A6A44; line-height: 1.5; margin-bottom: 1.25rem; }
.btn-modal-ok {
    width: 100%;
    padding: .75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF9966 0%, #FF7744 50%, #FF6633 100%);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255,102,51,.4);
    transition: transform .1s;
}
.btn-modal-ok:active { transform: scale(.97); }

/* ════════════════════════════════════════════════════════════
   QUIZ (chung của hub - +1 lượt chơi khi hết lượt)
   ════════════════════════════════════════════════════════════ */
.btn-quiz-bonus {
    width: 100%;
    padding: .75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFD200 0%, #FFB300 100%);
    color: #5A3B00;
    font-size: .88rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(255,179,0,.35);
    margin-bottom: .85rem;
    transition: transform .1s;
}
.btn-quiz-bonus:active { transform: scale(.97); }

.quiz-panel {
    background: #fff;
    border: 1px solid #F0E4C0;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.quiz-intro {
    padding: .75rem 1rem;
    font-size: .82rem;
    color: #7A6A44;
    background: #FFF6E0;
    border-bottom: 1px solid #F0E4C0;
    flex-shrink: 0;
}
.quiz-intro strong { color: #E95526; }

.quiz-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
}

.quiz-loading, .quiz-error, .quiz-done {
    padding: 2rem 1rem;
    text-align: center;
    font-size: .9rem;
    color: #A89A70;
}
.quiz-error { color: #D32F2F; }
.quiz-done  { color: #2E7D32; font-weight: 700; }

.quiz-progress { font-size: .75rem; color: #A89A70; margin-bottom: .3rem; }
.quiz-progress-bar {
    height: 6px;
    background: #F0E4C0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: .75rem;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD200, #FF9500);
    border-radius: 3px;
    transition: width .3s;
}
.quiz-brand-tag {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    color: #E95526;
    background: #FFF1C4;
    padding: .2rem .6rem;
    border-radius: 999px;
    margin-bottom: .6rem;
}
.quiz-question-text {
    font-size: .95rem;
    font-weight: 700;
    color: #2D2D2D;
    line-height: 1.4;
    margin-bottom: .85rem;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: .75rem;
}
.quiz-option-btn {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-align: left;
    padding: .6rem .75rem;
    border-radius: 12px;
    border: 1px solid #F0E4C0;
    background: #FFFBF2;
    font-size: .85rem;
    color: #2D2D2D;
    transition: background .2s, border-color .2s;
}
.quiz-option-btn:active { background: #FFF1C4; }
.quiz-option-btn.correct { background: #E4F4E2; border-color: #66BB6A; color: #2E7D32; }
.quiz-option-btn.wrong   { background: #FDE7E7; border-color: #EF5350; color: #D32F2F; }
.quiz-option-btn.dimmed  { opacity: .45; }
.quiz-option-btn:disabled { pointer-events: none; }
.quiz-option-letter {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #FFE9A8;
    color: #5A3B00;
    font-weight: 800;
    font-size: .75rem;
    display: flex; align-items: center; justify-content: center;
}
.quiz-option-text { flex: 1; }

.quiz-feedback {
    font-size: .82rem;
    font-weight: 700;
    padding: .5rem .7rem;
    border-radius: 10px;
    margin-bottom: .75rem;
}
.quiz-feedback.correct { background: #E4F4E2; color: #2E7D32; }
.quiz-feedback.wrong    { background: #FDE7E7; color: #D32F2F; }

.quiz-next-btn, .quiz-retry-btn, .quiz-close-btn {
    width: 100%;
    padding: .75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #FF9966 0%, #FF7744 50%, #FF6633 100%);
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
    transition: opacity .2s, transform .1s;
}
.quiz-next-btn:active, .quiz-retry-btn:active, .quiz-close-btn:active { transform: scale(.97); }
.quiz-next-btn:disabled { opacity: .4; pointer-events: none; }

.quiz-complete-banner {
    text-align: center;
    font-size: .92rem;
    color: #2E7D32;
    background: #E4F4E2;
    border-radius: 12px;
    padding: .75rem;
    margin-bottom: .6rem;
}
.quiz-score-line {
    text-align: center;
    font-size: .82rem;
    color: #A89A70;
    margin-bottom: .75rem;
}
.quiz-results-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .85rem; }
.quiz-result-item {
    display: flex;
    gap: .55rem;
    padding: .55rem .65rem;
    border-radius: 10px;
    background: #FFFBF2;
    border: 1px solid #F0E4C0;
    font-size: .78rem;
}
.quiz-result-icon { flex-shrink: 0; }
.quiz-result-q   { color: #2D2D2D; margin-bottom: .2rem; }
.quiz-result-ans { color: #7A6A44; }
.quiz-result-item.correct strong { color: #2E7D32; }
.quiz-result-item.incorrect strong { color: #D32F2F; }

/* =========================================================
   HUB V3 - OP1 Layout
   ========================================================= */
#mainScreen {
    background: #FFCB56;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

#mainScreen .home-screen-shell {
    width: 375px;
    max-width: 100vw;
    min-height: 1253px;
    min-height: max(1253px, 100dvh);
    margin: 0 auto;
    overflow: visible;
}

.home-header-card {
    position: absolute;
    top: 38px;
    left: 50%;
    z-index: 1;
    width: min(306px, calc(100% - 74px));
    height: 129px;
    transform: translateX(-50%);
    border-radius: 19px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 12.98%, #DB3600 83.17%);
    box-shadow: inset 0 3px 1.2px -1px rgba(255, 255, 255, .71);
}

.home-screen-title {
    position: absolute;
    top: 60px;
    left: 50%;
    z-index: 6;
    width: 268px;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Paytone One', sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.12;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255, 0, 0, .25);
    white-space: nowrap;
}

.home-player-meta {
    position: absolute;
    top: 98px;
    left: 50%;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: min(286px, calc(100% - 74px));
    height: 24px;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.13;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}

.home-player-meta img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.home-player-meta .player-name,
.home-player-meta .player-phone {
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.home-player-meta .player-name {
    display: block;
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: clip;
}

.home-player-meta .player-name.name-long {
    font-size: 12px;
}

.home-player-meta .player-name.name-very-long {
    font-size: 11px;
}

.home-player-meta .player-phone {
    flex: 0 0 auto;
    max-width: none;
    margin-left: 6px;
    overflow: hidden;
    color: #fff;
    text-overflow: clip;
}

.home-body-panel {
    position: absolute;
    top: 145px;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 651px;
    border-radius: 20px 20px 0 0;
    background: #FCF4D5;
    box-shadow: inset 0 4px 4px rgba(255, 199, 77, .2);
}

.home-top-awning {
    position: absolute;
    top: 139px;
    left: 50%;
    z-index: 5;
    width: 356px;
    height: 58px;
    max-width: calc(100% - 19px);
    transform: translateX(-50%);
    pointer-events: none;
}

.home-shelf {
    position: absolute;
    left: 50%;
    z-index: 5;
    display: block;
    width: 371px;
    height: 43px;
    max-width: calc(100% + 2px);
    transform: translateX(-50%);
    pointer-events: none;
}

.home-points-card {
    position: absolute;
    top: 213px;
    left: 50%;
    z-index: 4;
    width: min(360px, calc(100% - 14px));
    height: 225px;
    transform: translateX(-50%);
    overflow: hidden;
    border-radius: 22px;
    background: #222010;
    color: #fff;
}

.home-point-decor {
    position: absolute;
    opacity: .28;
    pointer-events: none;
}

.home-point-decor-salad {
    left: 21px;
    bottom: -18px;
    width: 130px;
}

.home-point-decor-skewer {
    right: -24px;
    bottom: 9px;
    width: 130px;
}

.home-points-label {
    position: absolute;
    top: 17px;
    left: 21px;
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.5;
    text-transform: uppercase;
}

.home-points-value {
    position: absolute;
    top: 52px;
    left: 21px;
    color: #F7941D;
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    white-space: nowrap;
}

.points-reset-note {
    position: absolute;
    top: 88px;
    left: 21px;
    z-index: 2;
    width: calc(100% - 42px);
    color: #FFEAA5;
    font-family: 'Nunito', sans-serif;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
}

.home-plays-copy {
    position: absolute;
    top: 16px;
    right: 57px;
    width: 38px;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.04;
    text-align: right;
}

.home-plays-count {
    position: absolute;
    top: 12px;
    right: 17px;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    white-space: nowrap;
}

.home-plays-count strong {
    color: #F7941D;
    font-size: 30px;
    line-height: 1;
}

.home-plays-count span {
    font-size: 14px;
}

.home-mini-quiz-btn {
    position: absolute;
    top: 42px;
    right: 7px;
    display: flex;
    align-items: center;
    gap: 3px;
    width: 96px;
    height: 24px;
    padding: 2px 6px 2px 3px;
    border-radius: 6px;
    background: #FF9F42;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 7px;
    font-weight: 900;
    line-height: 1.05;
    text-align: left;
}

.home-mini-quiz-btn img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.home-plays-bar {
    position: absolute;
    top: 106px;
    left: 21px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: calc(100% - 42px);
    height: 9px;
}

.home-plays-bar .play-dot {
    flex: 1;
    height: 6px;
    border-radius: 200px;
    background: #fff;
}

.home-plays-bar .play-dot.used {
    background: rgba(255, 255, 255, .35);
}

.home-store-btn,
.home-history-btn {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: calc(100% - 40px);
    height: 33px;
    padding: 0 30px;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: normal;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.home-store-btn {
    top: 120px;
    border: 2px solid #E95526;
    background: linear-gradient(179deg, #FFF5D6 7.46%, #FFA43D 84.63%);
    color: #E95526;
}

.home-history-btn {
    top: 157px;
    border: 2px solid #C7C7C7;
    background: linear-gradient(180deg, #E6E6E6 0%, #C3C3C3 15.86%, #858585 83.17%);
    color: #fff;
}

.home-store-btn img,
.home-history-btn img {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.home-store-btn .tile-badge {
    top: -9px;
    right: -9px;
}

.home-info-links {
    position: absolute;
    top: 195px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 34px);
    transform: translateX(-50%);
}

.home-info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #60FF70;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.13;
    white-space: nowrap;
}

.home-info-link img {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
}

.home-points-shelf { top: 423px; }

.home-checkin-card {
    position: absolute;
    top: 483px;
    left: 50%;
    z-index: 4;
    width: min(360px, calc(100% - 14px));
    height: 219px;
    transform: translateX(-50%);
    border-radius: 22px;
    background: linear-gradient(180deg, #FFC035 0%, #E95626 100%);
    box-shadow: 0 7px 0 #FF9F10;
}

.home-checkin-title {
    position: absolute;
    top: -3px;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 230px;
    height: 43px;
    transform: translateX(-50%);
    border-radius: 12px;
    background: linear-gradient(180deg, #FFA135 0%, #E88409 12.98%, #FFBD0C 83.17%);
    box-shadow: 0 3px 0 #FF9F10;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 15.3px;
    font-weight: 900;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
}

.home-checkin-stats {
    position: absolute;
    top: 55px;
    left: 11px;
    right: 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 29px;
    padding: 0 10px;
    border-radius: 12px;
    background: rgba(255, 219, 121, .3);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.5;
}

.home-streak-left,
.home-streak-next {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.home-streak-left img {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.home-streak-next {
    color: #FFFC65;
    font-weight: 700;
}

.home-checkin-card .checkin-grid {
    position: absolute;
    top: 92px;
    left: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
    width: calc(100% - 22px);
    height: 99px;
    padding: 23px 8px 20px;
    border: none;
    border-radius: 14px;
    background: #FEF1CE;
}

.home-checkin-card .checkin-day {
    position: relative;
    flex: 1 1 0;
    height: 55px;
    min-height: 55px;
    overflow: hidden;
    border: none;
    border-radius: 6px;
    background: #FFE08E;
    box-shadow: 0 1px 0 #FFBD0C;
}

.home-checkin-card .checkin-day.checked {
    background: #FFFEF8;
}

.home-checkin-card .checkin-day.future {
    opacity: 1;
}

.home-checkin-card .day-label {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 12px;
    padding: 0;
    background: #E17509;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 7px;
    font-weight: 900;
    line-height: 12px;
    text-align: center;
}

.home-checkin-card .day-icon {
    position: absolute;
    top: 15px;
    left: 50%;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    transform: translateX(-50%);
    font-size: 17px;
    line-height: 24px;
    text-align: center;
}

.home-checkin-card .day-coin {
    width: 23px;
    height: 24px;
    object-fit: contain;
}

.home-checkin-card .checkin-day.day-seven:not(.checked) .day-icon {
    top: 12px;
    width: 31px;
    height: 31px;
}

.home-checkin-card .day-prize-img {
    width: 31px;
    height: 31px;
    object-fit: contain;
}

.home-checkin-card .day-checkmark {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #76BE3B;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.home-checkin-card .day-prize {
    position: relative;
    display: block;
    width: 34px;
    height: 24px;
}

.home-checkin-card .day-prize-coin {
    position: absolute;
    top: -1px;
    left: 0;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.home-checkin-card .day-prize-gift {
    position: absolute;
    right: 0;
    bottom: 1px;
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.home-checkin-card .day-gcoin {
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 12px;
    padding: 0;
    background: #FFFC65;
    color: #E17509;
    font-family: 'Nunito', sans-serif;
    font-size: 5.9px;
    font-weight: 900;
    line-height: 12px;
    text-align: center;
    white-space: nowrap;
}

.home-checkin-action {
    position: absolute;
    left: 50%;
    top: 677px;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 193px;
    height: 35px;
    padding: 0 10px;
    transform: translateX(-50%);
    border: 2px solid #E95526;
    border-radius: 12px;
    background: linear-gradient(179deg, #FFF5D6 7.46%, #FFA43D 84.63%);
    color: #E95526;
    box-shadow: none;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.home-checkin-action:active {
    transform: translateX(-50%) scale(.97);
}

.home-checkin-action:disabled,
.home-checkin-action.checked {
    border-color: #D6C59C;
    background: #EAE0C4;
    color: #A89A70;
    font-size: 12px;
}

.home-checkin-shelf {
    top: 685px;
    z-index: 5;
}

.home-games-card {
    position: absolute;
    top: 792px;
    left: 50%;
    z-index: 6;
    width: min(360px, calc(100% - 14px));
    height: 380px;
    transform: translateX(-50%);
    border-radius: 22px;
    background: #FFFCF1;
    color: #E95526;
}

.home-games-awning {
    position: absolute;
    top: -37px;
    left: 50%;
    z-index: 5;
    width: 392px;
    height: 64px;
    max-width: calc(100% + 32px);
    transform: translateX(-50%);
    pointer-events: none;
}

.home-games-card h2 {
    position: absolute;
    top: 19px;
    left: 0;
    width: 100%;
    color: #E95526;
    font-family: 'Paytone One', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.326;
    text-align: center;
}

.home-games-grid {
    position: absolute;
    top: 60px;
    left: 7px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
    gap: 4px;
    width: calc(100% - 14px);
}

.home-games-card .hub-game-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 137px;
    padding: 4px 4px 6px;
    overflow: hidden;
    border: 1px solid #FFE1AB;
    border-radius: 12px;
    background: #FFF8E6;
    box-shadow: 0 2px 0 rgba(255, 159, 16, .28);
}

.home-games-card .hub-game-tile.playable {
    color: #E95526;
    background: #FFF8E6;
}

.home-games-card .hub-game-tile.playable:active {
    transform: translateY(1px) scale(.98);
}

.home-tile-art-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 101px;
    min-height: 101px;
    overflow: hidden;
    border-radius: 9px;
    background: #fff;
}

.home-games-card .home-tile-art {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    transform: none;
    object-fit: contain;
    pointer-events: none;
}

.home-tile-art-wrap.image-error::after {
    content: "🎮";
    color: #E95526;
    font-size: 30px;
}

.home-game-name {
    display: -webkit-box;
    min-height: 28px;
    margin-top: 4px;
    overflow: hidden;
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 9.5px;
    font-weight: 900;
    line-height: 1.12;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-game-note {
    position: absolute;
    top: 325px;
    left: 54px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 268px;
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.13;
}

.home-game-note img {
    width: 18px;
    height: 26px;
    flex: 0 0 18px;
    object-fit: fill;
}

.home-quiz-cta {
    position: absolute;
    left: 50%;
    bottom: -10px;
    z-index: 7;
    width: 239px;
    height: 35px;
    transform: translateX(-50%);
    border: 2px solid #E95526;
    border-radius: 12px;
    background: linear-gradient(180deg, #FFF5D6 7.46%, #FFA43D 84.63%);
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.home-games-shelf {
    top: 1165px;
    z-index: 5;
}

.hub-op1-shell {
    position: relative;
    width: min(375px, 100vw);
    min-height: 100dvh;
    background: #FFCB56;
}

.hub-op1-back {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 25px;
    height: 25px;
    border-radius: 999px;
    background: #fff;
    color: #D86900;
    font-size: 12px;
    font-weight: 900;
    z-index: 6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.hub-op1-header-card {
    position: absolute;
    width: 306px;
    height: 124px;
    left: 50%;
    transform: translateX(-50%);
    top: 38px;
    border-radius: 19px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 12.98%, #DB3600 83.17%);
    box-shadow: inset 0 3px 1.2px -1px rgba(255, 255, 255, .71);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hub-op1-title {
    font-family: 'Paytone One', sans-serif;
    font-size: 40px;
    line-height: 1;
    letter-spacing: .5px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255, 0, 0, .25);
}

.hub-op1-player-meta {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.player-name,
.player-phone {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 900;
    color: #FFEAB4;
}

.hub-op1-content {
    position: relative;
    margin-top: 94px;
    min-height: calc(100dvh - 94px);
    background: #FCF4D5;
    box-shadow: inset 0 4px 4px rgba(255, 199, 77, .2);
    border-radius: 28px 28px 0 0;
    padding: 58px 12px 16px;
}

.hub-op1-checkin-wrap {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 360px;
    border-radius: 28px;
    padding: 28px 12px 12px;
    border: 4px solid #E86C1E;
    background: linear-gradient(180deg, #FFC035 0%, #E95626 100%);
    box-shadow: 0 5px 0 #FF9F10;
}

.hub-op1-checkin-wrap .streak-info {
    margin-bottom: 8px;
    color: #fff;
    font-size: 11px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
}

.hub-op1-checkin-wrap .streak-hint {
    color: rgba(255, 255, 255, .85);
    font-size: 10px;
}

.hub-op1-checkin-ribbon {
    position: absolute;
    left: 50%;
    top: -12px;
    transform: translateX(-50%);
    min-width: 228px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(180deg, #FFA135 0%, #E88409 12.98%, #FFBD0C 83.17%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 900;
    text-align: center;
    letter-spacing: .2px;
    padding: 0 18px;
}

.hub-op1-checkin-wrap .checkin-grid {
    background: #FEF1CE;
    border-radius: 22px;
    border: 2px solid rgba(233, 117, 9, .4);
    padding: 10px 10px 34px;
    gap: 6px;
}

.hub-op1-checkin-wrap .checkin-day {
    min-height: 58px;
    border-radius: 8px;
    background: #FFFEF8;
    border: 1px solid #F0E4C0;
    padding: 0;
    position: relative;
    justify-content: space-between;
    gap: 0;
    overflow: hidden;
}

.hub-op1-checkin-wrap .checkin-day.checked {
    background: linear-gradient(0deg, #FFE08E, #FFE08E), #FFFEF8;
    border-color: #E7B93E;
}

.hub-op1-checkin-wrap .checkin-day.today {
    box-shadow: inset 0 0 0 2px #E17509;
}

.hub-op1-checkin-wrap .day-label {
    width: 100%;
    min-height: 15px;
    padding-top: 1px;
    background: #E17509;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 8px;
    font-weight: 900;
    text-align: center;
}

.hub-op1-checkin-wrap .day-icon {
    font-size: 16px;
    line-height: 1;
    margin: 4px 0;
}

.hub-op1-checkin-wrap .day-gcoin {
    width: 100%;
    background: #FFFC65;
    color: #E17509;
    font-family: 'Nunito', sans-serif;
    font-size: 7px;
    font-weight: 900;
    text-align: center;
    padding: 1px 0 2px;
}

.checkin-nav {
    position: absolute;
    top: 102px;
    width: 24px;
    height: 24px;
    border-radius: 100px;
    background: #FFFEF8;
    border: 1px solid #FFC88F;
    color: #1E2124;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkin-nav.left { left: 10px; }
.checkin-nav.right { right: 10px; }

.hub-op1-checkin-wrap .btn-checkin {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -17px;
    width: 193px;
    height: 35px;
    border-radius: 12px;
    border: 1px solid #FFC47C;
    box-shadow: 0 3px 0 #D36A1D;
    background: linear-gradient(176.76deg, #FFF5D6 7.46%, #FFA43D 84.63%);
    color: #D34A00;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
}

.hub-op1-checkin-wrap .btn-checkin:disabled,
.hub-op1-checkin-wrap .btn-checkin.checked {
    background: #EAE0C4;
    border-color: #D6C59C;
    color: #A89A70;
    box-shadow: none;
}

.hub-op1-hunt {
    margin-top: 26px;
}

.hub-op1-hunt h2 {
    margin-bottom: 10px;
    color: #E14800;
    font-family: 'Paytone One', sans-serif;
    font-size: 31px;
    line-height: 1.05;
    letter-spacing: .2px;
}

.hub-op1-games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.hub-game-tile {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    border: 1px solid #E0D7CE;
    background: #fff;
    color: #DBDBDB;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
}

.hub-game-tile.playable {
    border-color: #FFB35A;
    color: #E65C00;
    background: linear-gradient(180deg, #FFF9E6, #FFF);
    box-shadow: 0 3px 0 #FFD08A;
    transition: transform .1s;
}

.hub-game-tile.playable:active { transform: scale(.95); }

.hub-game-tile.playable:disabled {
    border-color: #DCCFB9;
    color: #B8AA90;
    background: #F6F0E4;
    box-shadow: none;
}

.tile-icon  { font-size: 26px; line-height: 1; }
.tile-label { font-size: 10px; font-weight: 900; }

.tile-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #E53935;
    border: 2px solid #fff;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.tile-badge.show { display: flex; }

/* ── Sub screens (Challenge / Pikachu lobby) ─────────────── */
#challengeScreen,
#pikachuScreen {
    background: #FFCB56;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

.sub-screen-shell {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sub-header-card { height: 100px; }

.sub-title { font-size: 30px; }

.sub-content {
    margin-top: 118px;
    min-height: calc(100dvh - 118px);
    padding-top: 24px;
}

#challengeScreen .challenge-list,
#pikachuScreen .milestone-list {
    max-width: 360px;
    margin: 0 auto;
}

#pikachuScreen .pik-stats,
#pikachuScreen .pik-actions,
#pikachuScreen .milestone-header {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

#pikachuScreen .pik-stats    { margin-bottom: .75rem; }
#pikachuScreen .pik-actions  { margin-bottom: .85rem; }
#pikachuScreen .milestone-header { margin-bottom: .55rem; }

.hub-hidden {
    display: none !important;
}

@media (max-width: 390px) {
    .hub-op1-content {
        padding-left: 9px;
        padding-right: 9px;
    }

    .hub-op1-title {
        font-size: clamp(34px, 10.6vw, 40px);
    }

    .hub-op1-hunt h2 {
        font-size: clamp(27px, 8.4vw, 31px);
    }
}

/* ════════════════════════════════════════════════════════════
   POINT/PLAYS SUMMARY (trang chủ) — hệ điểm + lượt chơi CHUNG 4 game
   ════════════════════════════════════════════════════════════ */
.points-summary-card {
    background: linear-gradient(135deg, #2D2D2D 0%, #4A3B2A 100%);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.points-summary-top { display: flex; align-items: center; justify-content: space-between; }
.points-summary-label { font-size: .72rem; color: #FFD08A; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.points-summary-value { font-size: 1.7rem; font-weight: 900; color: #FFD200; margin-top: .1rem; }
.points-summary-plays {
    text-align: right;
    font-size: .8rem;
    color: #fff;
}
.points-summary-plays strong { color: #FFD200; font-size: 1.1rem; }
.points-summary-bar {
    display: flex;
    gap: .3rem;
    margin-top: .7rem;
}
.points-summary-bar .play-dot {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,.2);
}
.points-summary-bar .play-dot.used { background: #FFD200; }
#homeQuizBtn.btn-quiz-bonus { margin-top: .8rem; margin-bottom: 0; }
.btn-goto-store {
    width: 100%;
    margin-top: .8rem;
    padding: .65rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFD200 0%, #FFB300 100%);
    color: #5A3B00;
    font-size: .85rem;
    font-weight: 800;
    position: relative;
}
.btn-goto-store .tile-badge { top: -8px; right: -8px; }
.btn-goto-history {
    width: 100%;
    margin-top: .6rem;
    padding: .6rem;
    border-radius: 12px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════════
   GAME PLAYER SCREEN (iframe nhúng Pikachu/Suika/Line98/Candy)
   ════════════════════════════════════════════════════════════ */
#gamePlayerScreen {
    --game-topbar-height: 32px;
    background: #FFCB56;
    overflow: hidden;
    font-family: 'Nunito', sans-serif;
}

.player-topbar {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: min(100%, 520px);
    min-height: 32px;
    padding: 2px 8px 3px;
    transform: translateX(-50%);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.player-topbar::before {
    content: none;
}

.player-game-copy {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: calc(100% - 112px);
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    background: rgba(74, 38, 3, .6);
    pointer-events: auto;
}

.player-game-eyebrow {
    color: #FFE08E;
    font-size: 6px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.player-topbar .player-game-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.08;
    text-shadow: 0 1.5px 0 rgba(155, 35, 0, .42);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-topbar .btn-end-game {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 28px;
    padding: 0 8px;
    border: 2px solid rgba(255, 255, 255, .86);
    border-radius: 999px;
    background: linear-gradient(180deg, #FFF2B8 0%, #FFC85C 100%);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .65),
        0 3px 0 #B9521E,
        0 5px 9px rgba(114, 45, 0, .18);
    color: #D84D19;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    pointer-events: auto;
}

.player-topbar .btn-end-game span:first-child {
    font-size: 13px;
    line-height: 1;
}

.player-topbar .btn-end-game:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, .65),
        0 2px 0 #B9521E,
        0 4px 8px rgba(114, 45, 0, .18);
}

.player-topbar .btn-end-game:disabled,
.player-topbar .btn-end-game.is-saving {
    cursor: default;
    opacity: .82;
    transform: none;
}

#gameFrame {
    position: absolute;
    top: var(--game-topbar-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--game-topbar-height));
    border: none;
    background: #FFCB56;
}
.game-frame-loading {
    position: absolute;
    top: var(--game-topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E95526;
    font-size: .9rem;
    font-weight: 900;
    background: #FFCB56;
    z-index: 10;
}

@media (max-width: 360px) {
    #gamePlayerScreen { --game-topbar-height: 30px; }
    .player-topbar {
        width: 100%;
        min-height: 30px;
        padding: 2px 7px 2px;
    }
    .player-game-copy {
        max-width: calc(100% - 102px);
        min-height: 23px;
        padding: 2px 6px;
    }
    .player-topbar .player-game-label {
        font-size: 11px;
    }
    .player-topbar .btn-end-game {
        min-height: 26px;
        padding: 0 7px;
        font-size: 10px;
    }
}

@media (max-height: 720px) {
    #gamePlayerScreen { --game-topbar-height: 28px; }

    .player-topbar {
        min-height: 28px;
        padding: 1px 7px 2px;
    }

    .player-game-eyebrow {
        display: none;
    }

    .player-game-copy {
        min-height: 22px;
        padding: 2px 6px;
    }

    .player-topbar .player-game-label {
        font-size: 11px;
    }

    .player-topbar .btn-end-game {
        min-height: 24px;
        padding: 0 7px;
        font-size: 10px;
    }

    .player-topbar .btn-end-game span:first-child {
        font-size: 12px;
    }
}

/* ════════════════════════════════════════════════════════════
   KHO ĐỔI THƯỞNG (Redemption Store)
   ════════════════════════════════════════════════════════════ */
#storeScreen {
    background: #FFCB56;
    overflow: hidden;
}

.store-screen-shell {
    height: 100dvh;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    background: #FFCB56;
}

.store-back-btn {
    position: absolute;
    top: 13px;
    z-index: 7;
    width: 25px;
    height: 25px;
    padding: 0;
    border-radius: 999px;
}

.store-back-btn { left: 12px; }

.store-back-btn img {
    display: block;
    width: 25px;
    height: 25px;
}

.store-header-card {
    position: absolute;
    top: 38px;
    left: calc(50% + 2.5px);
    z-index: 1;
    width: 306px;
    height: 129px;
    transform: translateX(-50%);
    border-radius: 19px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 12.98%, #DB3600 83.17%);
    box-shadow: inset 0 3px 1.2px -1px rgba(255, 255, 255, .71);
}

.store-screen-title {
    position: absolute;
    top: 64px;
    left: calc(50% + 2.5px);
    z-index: 6;
    width: 246px;
    transform: translateX(-50%);
    font-family: 'Paytone One', sans-serif;
    font-size: 24px;
    line-height: 1.12;
    font-weight: 400;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255, 0, 0, .25);
}

.store-body-panel {
    position: absolute;
    top: 122px;
    bottom: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    min-height: 0;
    padding: 0 7px;
    overflow: visible;
    border-radius: 20px 20px 0 0;
    background: #FCF4D5;
    box-shadow: inset 0 4px 4px rgba(255, 199, 77, .2);
}

.store-awning {
    position: absolute;
    top: -19px;
    left: calc(50% + 2.5px);
    z-index: 5;
    display: block;
    width: 356px;
    height: 58px;
    max-width: calc(100% - 19px);
    transform: translateX(-50%);
    pointer-events: none;
}

.store-balance-card {
    position: absolute;
    top: 45px;
    left: 50%;
    z-index: 6;
    width: min(360px, calc(100% - 15px));
    height: 112px;
    transform: translateX(-50%);
    border: 1px solid #FF8D28;
    border-radius: 10px;
    background: #222010;
    color: #fff;
    box-shadow: 0 3px 0 #FF9F10;
}

.store-balance-label {
    position: absolute;
    top: 16px;
    left: 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.5;
    text-transform: uppercase;
}

.store-balance-value {
    position: absolute;
    top: 36px;
    left: 14px;
    color: #F7941D;
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    white-space: nowrap;
}

.store-reset-note {
    top: 75px;
    left: 14px;
    width: calc(100% - 28px);
    color: #FFEAA5;
    font-size: 9px;
}

.store-history-btn {
    position: absolute;
    top: 36px;
    right: 15px;
    display: flex;
    align-items: center;
    width: 71px;
    height: 20px;
    padding: 0 7px 0 2px;
    border-radius: 5px;
    background: #848484;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.13;
    text-transform: uppercase;
    white-space: nowrap;
}

.store-history-btn img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.store-shelf {
    position: absolute;
    top: 144px;
    left: 50%;
    z-index: 5;
    display: block;
    width: 371px;
    height: 43px;
    max-width: calc(100% + 2px);
    transform: translateX(-50%);
    pointer-events: none;
}

.reward-list { display: flex; flex-direction: column; gap: 6px; }
.store-reward-list {
    position: absolute;
    top: 200px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 4;
    width: min(360px, 100%);
    margin: 0;
    padding: 0 0 10px;
    transform: translateX(-50%);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.reward-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 175px) 101px;
    align-items: center;
    column-gap: 6px;
    width: 100%;
    min-height: 117px;
    padding: 8px 11px 8px 12px;
    border: 2px solid #FFE1AB;
    border-radius: 10px;
    background: #FFFCF1;
    position: relative;
}

.reward-gift-icon {
    position: relative;
    width: 48px;
    height: 48px;
    overflow: visible;
}

.reward-gift-icon img {
    position: absolute;
    display: block;
    max-width: none;
}

.reward-gift-base {
    top: 37px;
    left: 4px;
    width: 42px;
    height: 11px;
}

.reward-gift-box {
    top: 5px;
    left: 9.5px;
    width: 29px;
    height: 38px;
}

.reward-copy { min-width: 0; }

.reward-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.reward-title {
    min-width: 0;
    overflow: hidden;
    color: #000;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.13;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reward-flash-badge {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 10px;
    background: #E95526;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.13;
    text-transform: uppercase;
}

.reward-desc {
    min-width: 0;
    overflow: hidden;
    margin-top: 2px;
    color: #A9A9A9;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.13;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reward-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.reward-cost {
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.13;
    text-transform: uppercase;
    white-space: nowrap;
}

.reward-cost span,
.reward-stock span {
    display: block;
}

.reward-stock {
    min-width: 0;
    overflow: hidden;
    color: #000;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.13;
    white-space: nowrap;
}

.reward-stock span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-window-hint {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    margin-top: 6px;
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.32;
    white-space: normal;
}

.reward-window-hint img {
    width: 8px;
    height: 12px;
    flex: 0 0 8px;
    margin-top: 1px;
    object-fit: fill;
}

.reward-window-hint span {
    word-break: break-word;
}

.btn-redeem {
    justify-self: end;
    width: 101px;
    height: 35px;
    padding: 0 6px;
    border: 1px solid #E95526;
    border-radius: 12px;
    background: linear-gradient(178.88deg, #FFF5D6 7.46%, #FFA43D 84.63%);
    color: #DB3600;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-redeem.has-countdown {
    height: 44px;
    padding: 4px 6px;
    flex-direction: column;
    gap: 2px;
}

.btn-redeem-top {
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: .02em;
    text-transform: uppercase;
    opacity: 0.85;
}

.btn-redeem-main {
    font-size: 12px;
    font-weight: 900;
    line-height: 1.05;
}

.btn-redeem-cd {
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-redeem.cd-open:disabled {
    background: linear-gradient(180deg, #FFF5EE 0%, #FFE4D4 100%);
    border-color: #F4B699;
    color: #C94114;
    opacity: 1;
}

.btn-redeem.cd-close .btn-redeem-cd {
    font-size: 9.5px;
    font-weight: 800;
    color: #8C2000;
    background: rgba(255, 255, 255, 0.55);
    padding: 1px 5px;
    border-radius: 6px;
}

.btn-redeem:disabled {
    border-color: #8F8F8F;
    background: linear-gradient(180deg, #E7E7E7 0%, #B4B4B4 100%);
    color: #8F8F8F;
}

#storeScreen .store-empty {
    width: 100%;
    min-height: 117px;
    padding: 48px 12px;
    border: 2px solid #FFE1AB;
    border-radius: 10px;
    background: #FFFCF1;
}

.history-screen-shell {
    height: 100dvh;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    background: #FFCB56;
}

#historyScreen {
    background: #FFCB56;
    overflow: hidden;
}

.history-back-btn {
    position: absolute;
    top: 13px;
    left: 12px;
    z-index: 7;
    width: 25px;
    height: 25px;
    padding: 0;
    border-radius: 999px;
}

.history-back-btn img {
    display: block;
    width: 25px;
    height: 25px;
}

.history-header-card {
    position: absolute;
    top: 38px;
    left: 50%;
    z-index: 1;
    width: 306px;
    height: 129px;
    transform: translateX(-50%);
    border-radius: 19px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 12.98%, #DB3600 83.17%);
    box-shadow: inset 0 3px 1.2px -1px rgba(255, 255, 255, .71);
}

.history-screen-title {
    position: absolute;
    top: 64px;
    left: 50%;
    z-index: 6;
    width: 246px;
    transform: translateX(-50%);
    font-family: 'Paytone One', sans-serif;
    font-size: 24px;
    line-height: 1.12;
    font-weight: 400;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255, 0, 0, .25);
}

.history-body-panel {
    position: absolute;
    top: 123px;
    bottom: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    min-height: 0;
    padding: 0 7px;
    overflow: visible;
    border-radius: 20px 20px 0 0;
    background: #FCF4D5;
    box-shadow: inset 0 4px 4px rgba(255, 199, 77, .2);
}

.history-awning {
    position: absolute;
    top: -20px;
    left: 50%;
    z-index: 5;
    display: block;
    width: 356px;
    height: 58px;
    max-width: calc(100% - 19px);
    transform: translateX(-50%);
    pointer-events: none;
}

.history-list {
    position: absolute;
    top: 44px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(360px, 100%);
    margin: 0;
    padding: 0 0 10px;
    transform: translateX(-50%);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

.history-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 64px;
    align-items: center;
    column-gap: 6px;
    width: 100%;
    height: 83px;
    padding: 8px 8px 8px 10px;
    border: 2px solid #FFE1AB;
    border-radius: 10px;
    background: #FFFCF1;
}

.history-icon-box {
    position: relative;
    width: 48px;
    height: 48px;
    overflow: hidden;
}

.history-icon-box img {
    position: absolute;
    display: block;
    max-width: none;
}

.history-icon-box.is-game img,
.history-icon-box.is-quiz img,
.history-icon-box.is-redemption img {
    top: 9.5px;
    left: 4px;
    width: 40px;
    height: 30px;
}

.history-icon-box.is-checkin img {
    top: 4px;
    left: 10px;
    width: 27px;
    height: 40px;
}

.history-icon-box.is-weekly_reset img {
    top: 6px;
    left: 6px;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.history-copy {
    min-width: 0;
}

.history-title {
    overflow: hidden;
    color: #000;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.13;
    text-transform: uppercase;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: 2px;
    color: #A9A9A9;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.13;
    white-space: nowrap;
}

.history-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta .history-detail {
    width: 70px;
}

.history-meta .history-time {
    width: 27px;
    text-align: center;
}

.history-meta .history-date {
    width: 61px;
}

.history-meta-divider {
    width: 1px;
    height: 6px;
    flex: 0 0 1px;
    background: #D9D9D9;
}

.history-amount {
    justify-self: end;
    color: #E95526;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.13;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.history-amount span {
    display: block;
}

.history-list .store-empty {
    width: 100%;
    min-height: 83px;
    padding: 30px 12px;
    border: 2px solid #FFE1AB;
    border-radius: 10px;
    background: #FFFCF1;
}

.terms-screen-shell {
    min-height: 885px;
    min-height: max(885px, 100dvh);
    margin: 0 auto;
    overflow: hidden;
    background: #FFCB56;
}

#termsScreen,
#guideScreen {
    background: #FFCB56;
    overflow: hidden;
}

.terms-back-btn {
    position: absolute;
    top: 13px;
    left: 12px;
    z-index: 7;
    width: 25px;
    height: 25px;
    padding: 0;
    border-radius: 999px;
}

.terms-back-btn img {
    display: block;
    width: 25px;
    height: 25px;
}

.terms-header-card {
    position: absolute;
    top: 38px;
    left: calc(50% + 2.5px);
    z-index: 1;
    width: 306px;
    height: 129px;
    transform: translateX(-50%);
    border-radius: 19px;
    background: linear-gradient(180deg, #FFA135 0%, #E95626 12.98%, #DB3600 83.17%);
    box-shadow: inset 0 3px 1.2px -1px rgba(255, 255, 255, .71);
}

.terms-screen-title {
    position: absolute;
    top: 59px;
    left: calc(50% + 2.5px);
    z-index: 6;
    width: 306px;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Paytone One', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.12;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255, 0, 0, .25);
}

.terms-body-panel {
    position: absolute;
    top: 123px;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 762px;
    min-height: calc(100% - 123px);
    border-radius: 20px 20px 0 0;
    background: #FCF4D5;
    box-shadow: inset 0 4px 4px rgba(255, 199, 77, .2);
}

.terms-awning {
    position: absolute;
    top: -20px;
    left: calc(50% + 2.5px);
    z-index: 5;
    display: block;
    width: 356px;
    height: 58px;
    max-width: calc(100% - 19px);
    transform: translateX(-50%);
    pointer-events: none;
}

.terms-content {
    position: absolute;
    top: 60px;
    left: 17px;
    right: 16px;
    bottom: 41px;
    z-index: 4;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    color: #000;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.13;
    word-break: break-word;
}

.terms-content ol {
    margin: 0;
    padding-left: 18px;
}

.terms-content ul {
    margin: 4px 0 8px;
    padding-left: 15px;
}

.terms-content p {
    margin: 0 0 8px;
}

.terms-content li {
    margin: 0 0 4px;
}

.terms-content > ol > li {
    margin-bottom: 8px;
}

.terms-content strong {
    font-weight: 900;
}

.terms-content .terms-table {
    width: 100%;
    margin: 6px 0 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #FFE1AB;
    border-radius: 8px;
    background: #FFFCF1;
    font-size: 10px;
    line-height: 1.2;
}

.terms-content .terms-table th,
.terms-content .terms-table td {
    padding: 6px;
    border-bottom: 1px solid #FFE1AB;
    text-align: left;
    vertical-align: top;
}

.terms-content .terms-table th {
    color: #E95526;
    font-weight: 900;
}

.terms-content .terms-table tr:last-child td {
    border-bottom: 0;
}
.store-empty { text-align: center; padding: 2rem 1rem; color: #A89A70; font-size: .85rem; }


/* Game catalog V3: four dynamic tiles still fit narrow mobile screens. */
@media (max-width: 360px) {
    .home-games-grid { gap: 4px; }
    .home-games-card .hub-game-tile { min-height: 130px; padding: 3px 3px 5px; }
    .home-tile-art-wrap { height: 95px; min-height: 95px; }
    .home-game-name { min-height: 27px; font-size: 8.8px; }
}

/* 2026-09-25 Game Library / chọn hoạt động / rating */
.home-games-heading{position:absolute;top:19px;left:0;width:100%;z-index:7}.home-games-heading h2{position:static;width:100%;padding:0 72px 0 8px}.home-change-games-btn{position:absolute;top:-2px;right:9px;min-height:30px;padding:0 9px;border:1px solid #FFB24A;border-radius:999px;background:#FFF3C8;color:#E95526;font:900 10px/1 Nunito,sans-serif}.home-game-rating{position:absolute;top:7px;right:7px;z-index:4;padding:3px 5px;border-radius:999px;background:rgba(34,32,16,.78);color:#fff;font:900 8px/1 Nunito,sans-serif}.hub-game-tile-add{justify-content:center;align-items:center;border-style:dashed!important;color:#E95526}.home-add-game-plus{display:grid;place-items:center;width:52px;height:52px;margin:22px auto 10px;border-radius:50%;background:#FFE6A5;font-size:30px;font-weight:900}
.game-picker-panel{width:min(420px,calc(100vw - 24px));max-height:80vh;overflow:hidden}
.game-picker-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.game-picker-header>span:first-child{min-width:0;font-family:'Nunito',sans-serif;font-size:15px;font-weight:900;line-height:1.15}
.game-picker-count{display:grid;place-items:center;min-width:43px;height:28px;padding:0 8px;border:1px solid rgba(255,255,255,.55);border-radius:999px;background:rgba(255,255,255,.2);font-size:11px;font-weight:900}
.game-picker-note{padding:11px 14px;color:#7A6A44;font-size:12px;font-weight:800;line-height:1.38}
.game-picker-list{display:grid;gap:8px;max-height:52vh;overflow-y:auto;padding:10px 12px 12px}
.game-picker-item{display:grid;grid-template-columns:72px minmax(0,1fr) 32px;align-items:center;gap:11px;width:100%;min-height:108px;padding:7px 9px 7px 7px;border:2px solid #FFE1AB;border-radius:14px;background:#FFF8E6;text-align:left;box-shadow:0 2px 0 rgba(255,159,16,.15);transition:border-color .15s,background .15s,opacity .15s,transform .08s}
.game-picker-item:active{transform:scale(.99)}
.game-picker-art.home-tile-art-wrap{width:72px;height:94px;min-height:94px;border-radius:10px;background:#fff;box-shadow:inset 0 0 0 1px rgba(255,225,171,.55)}
.game-picker-art .home-tile-art{position:static;display:block;width:100%;height:100%;max-width:100%;transform:none;object-fit:contain;pointer-events:none}
.game-picker-art.image-error::after{content:'🎮';font-size:28px}
.game-picker-copy{display:flex;min-width:0;flex-direction:column;gap:5px}
.game-picker-copy strong{display:-webkit-box;overflow:hidden;color:#E95526;font-size:14px;font-weight:900;line-height:1.2;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.game-picker-copy small{color:#8A7955;font-size:11px;font-weight:800;line-height:1.3}
.game-picker-check{display:grid;place-items:center;width:28px;height:28px;border:2px solid #D8C99A;border-radius:50%;background:#fff;color:transparent;font-size:15px;font-weight:900;transition:border-color .15s,background .15s,color .15s}
.game-picker-item.selected{border-color:#F36A32;background:#FFF0D7;box-shadow:0 2px 0 rgba(243,106,50,.18)}
.game-picker-item.selected .game-picker-check{border-color:#F36A32;background:#F36A32;color:#fff}
.game-picker-item.selection-locked:not(.selected){opacity:.55}
.game-picker-save{width:calc(100% - 24px);min-height:46px;margin:0 12px 12px;border:0;border-radius:14px;background:#F15B2A;color:#fff;font-weight:900;box-shadow:0 3px 0 #C8441A}
.game-picker-save:disabled{background:#D9CCB2;color:#8F8064;box-shadow:none;cursor:default}
@media(max-width:360px){.game-picker-item{grid-template-columns:64px minmax(0,1fr) 30px;gap:9px;min-height:98px}.game-picker-art.home-tile-art-wrap{width:64px;height:88px;min-height:88px}.game-picker-copy strong{font-size:13px}.game-picker-copy small{font-size:10px}}
.game-rating-panel{margin:2px 0 12px;padding:12px;border:2px solid #FFE0A1;border-radius:16px;background:#FFF7DF}.game-rating-title{color:#755628;font-size:14px;font-weight:900}.game-rating-stars{display:flex;justify-content:center;gap:3px;margin:7px 0}.game-rating-stars button{width:42px;height:42px;border:0;background:transparent;color:#D9C9A1;font-size:31px}.game-rating-stars button.selected{color:#FFB300}.game-rating-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.game-rating-tags button,.game-rating-replay button{min-height:31px;padding:0 9px;border:1px solid #E6C881;border-radius:999px;background:#fff;color:#755628;font-size:11px;font-weight:900}.game-rating-tags button.selected,.game-rating-replay button.selected{border-color:#F36A32;background:#FFE2D1;color:#D94818}.game-rating-replay{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:9px;color:#755628;font-size:12px;font-weight:900}.game-rating-submit{width:100%;min-height:38px;margin-top:9px;border:0;border-radius:12px;background:#E95526;color:#fff;font-size:13px;font-weight:900}.game-rating-skip{margin-top:6px;border:0;background:transparent;color:#9D8B61;font-size:11px;font-weight:800;text-decoration:underline}

/* ── Feedback V3: dynamic Hub Survey wizard ── */
.hub-survey-panel{position:relative;width:min(440px,calc(100vw - 20px));max-height:min(760px,92vh);overflow:hidden;border:1px solid #F0D39A;border-radius:24px;background:#FFFDF7;box-shadow:0 18px 60px rgba(82,45,12,.22)}
.hub-survey-close{position:absolute;top:10px;right:10px;z-index:5;display:grid;place-items:center;width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.88);color:#7E6842;font-size:23px;font-weight:800;box-shadow:0 1px 0 rgba(108,73,25,.12)}
.hub-survey-hero{padding:22px 54px 14px 18px;background:linear-gradient(180deg,#FFF3C9 0%,#FFF9E9 100%);border-bottom:1px solid #F2DEB4}
.hub-survey-badge{display:inline-flex;min-height:24px;align-items:center;padding:0 9px;border-radius:999px;background:#F15B2A;color:#fff;font-size:10px;font-weight:1000;letter-spacing:.08em}
.hub-survey-hero h2{margin:8px 0 4px;color:#5F3F1C;font-family:'Nunito',sans-serif;font-size:20px;font-weight:1000;line-height:1.15;text-align:left;text-transform:none;text-shadow:none}
.hub-survey-hero p{margin:0;color:#836E49;font-size:12px;font-weight:750;line-height:1.42}
.hub-survey-progress-row{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:8px;margin-top:12px;color:#9C7B47;font-size:10px;font-weight:900}
.hub-survey-progress{height:7px;overflow:hidden;border-radius:999px;background:#EADDBF}.hub-survey-progress i{display:block;width:0;height:100%;border-radius:inherit;background:#F15B2A;transition:width .2s ease}
.hub-survey-body{min-height:250px;max-height:48vh;overflow-y:auto;padding:18px 16px 14px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.survey-step{position:relative;min-width:0}.survey-question-number{display:block;margin-bottom:6px;color:#E95526;font-size:10px;font-weight:1000;letter-spacing:.08em}.survey-question-title{margin:0 0 14px;color:#51391D;font-size:18px;font-weight:1000;line-height:1.28}.survey-optional{display:inline-flex;margin:-7px 0 12px;padding:3px 8px;border-radius:999px;background:#F3EAD4;color:#947B51;font-size:10px;font-weight:850}
.survey-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.survey-choice-grid.two{grid-template-columns:1fr 1fr}.survey-choice{display:flex;align-items:center;gap:9px;min-width:0;min-height:52px;padding:10px 11px;border:1.5px solid #E5D2A4;border-radius:14px;background:#fff;color:#6D522C;text-align:left;font:900 12px/1.25 'Nunito',sans-serif;transition:border-color .15s,background .15s,transform .08s}.survey-choice i{display:grid;place-items:center;width:22px;height:22px;flex:0 0 22px;border:1.5px solid #D7C396;border-radius:50%;color:transparent;font-style:normal;font-size:12px}.survey-choice span{min-width:0;overflow-wrap:anywhere}.survey-choice.selected{border-color:#F15B2A;background:#FFF0E7;color:#C94418}.survey-choice.selected i{border-color:#F15B2A;background:#F15B2A;color:#fff}.survey-choice:active{transform:scale(.985)}
.survey-stars-new{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:8px}.survey-star-btn{display:grid;place-items:center;min-width:0;min-height:64px;padding:5px 2px;border:1.5px solid #E7D5AA;border-radius:14px;background:#fff;color:#D7C59A}.survey-star-btn span{font-size:30px;line-height:1}.survey-star-btn small{margin-top:2px;font-size:10px;font-weight:900}.survey-star-btn.selected{border-color:#F5B62C;background:#FFF6D7;color:#F5A700}.survey-scale-hints{display:flex;justify-content:space-between;margin-top:7px;color:#A08B65;font-size:10px;font-weight:800}
.survey-multi-note{margin:-5px 0 10px;color:#947B51;font-size:11px;font-weight:800}.survey-textarea{display:block;width:100%;min-height:112px;resize:vertical;padding:12px;border:1.5px solid #E5D2A4;border-radius:14px;background:#fff;color:#51391D;font:700 16px/1.4 'Nunito',sans-serif;outline:none}.survey-textarea:focus{border-color:#F15B2A;box-shadow:0 0 0 3px rgba(241,91,42,.10)}.survey-text-count{text-align:right;margin-top:5px;color:#A08B65;font-size:10px;font-weight:800}
.hub-survey-error{min-height:18px;padding:0 16px;color:#C83E25;font-size:11px;font-weight:900;line-height:1.35}
.hub-survey-actions{display:grid;grid-template-columns:minmax(92px,.42fr) minmax(0,1fr);gap:9px;padding:10px 16px 8px;background:#FFFDF7}.hub-survey-back,.hub-survey-next{min-height:46px;border-radius:14px;font:1000 13px/1 'Nunito',sans-serif}.hub-survey-back{border:1px solid #DFCAA0;background:#fff;color:#7A6845}.hub-survey-back:disabled{opacity:.35}.hub-survey-next{border:0;background:#F15B2A;color:#fff;box-shadow:0 3px 0 #C8441A}.hub-survey-next:disabled{opacity:.55;box-shadow:none}.hub-survey-later{display:block;margin:0 auto 12px;padding:7px 16px;border:0;background:transparent;color:#988462;font-size:11px;font-weight:850;text-decoration:underline}
@media(max-width:380px){.hub-survey-panel{width:calc(100vw - 12px);border-radius:20px}.hub-survey-hero{padding:18px 48px 12px 14px}.hub-survey-hero h2{font-size:18px}.hub-survey-body{padding:15px 12px 12px;max-height:50vh}.survey-question-title{font-size:16px}.survey-choice-grid{grid-template-columns:1fr}.survey-choice-grid.two{grid-template-columns:1fr 1fr}.survey-star-btn{min-height:58px}.survey-star-btn span{font-size:27px}.hub-survey-actions{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){.hub-survey-progress i,.survey-choice{transition:none}}


/* =========================================================
   2026-09-17 — Game Picker modal: opaque panel / backdrop fix
   ========================================================= */
#gamePickerModal {
    background: rgba(18, 13, 7, .72);
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

#gamePickerModal .game-picker-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(420px, calc(100vw - 24px));
    max-height: min(80dvh, 760px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid #F0D39A;
    border-radius: 20px;
    background: #FFFDF7;
    box-shadow: 0 18px 60px rgba(58, 31, 8, .34);
    isolation: isolate;
}

#gamePickerModal .modal-header {
    flex: 0 0 auto;
}

#gamePickerModal .game-picker-note {
    flex: 0 0 auto;
    margin: 0;
    background: #FFF8E6;
    border-bottom: 1px solid #F2DEB4;
}

#gamePickerModal .game-picker-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    background: #FFFDF7;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

#gamePickerModal .game-picker-save {
    flex: 0 0 auto;
}

@media (max-width: 380px) {
    #gamePickerModal {
        padding-left: 6px;
        padding-right: 6px;
    }

    #gamePickerModal .game-picker-panel {
        width: calc(100vw - 12px);
        border-radius: 18px;
    }
}

/* ── Hiệu ứng điểm danh (2026-11-27) ───────────────────────────── */
/* 1. Chưa điểm danh: ô hôm nay sáng lấp lánh, đồng xu xoay nhẹ; nút có vệt sáng + quầng vàng. */
.home-checkin-card.fx-unclaimed .checkin-day.today {
    background: linear-gradient(180deg, #FFF6D8 0%, #FFE08E 100%);
    box-shadow: inset 0 0 0 2px #E95526, 0 1px 0 #FFBD0C;
    animation: fxTodayGlow 1.6s ease-in-out infinite;
}
.home-checkin-card.fx-unclaimed .checkin-day.today::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.85) 50%, transparent 70%);
    transform: translateX(-120%); animation: fxSweep 2.4s ease-in-out infinite;
}
.home-checkin-card.fx-unclaimed .checkin-day.today .day-label { background: #E95526 !important; color: #FFFFFF !important; }
.home-checkin-card.fx-unclaimed .checkin-day.today .day-coin { animation: fxCoinSpin 2.4s ease-in-out infinite; }
.btn-checkin.fx-attention { overflow: hidden; animation: fxHalo 1.8s ease-out infinite; }
.btn-checkin.fx-attention:not(.home-checkin-action) { position: relative; }
.btn-checkin.fx-attention::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.9) 50%, transparent 65%);
    transform: translateX(-120%); animation: fxSweep 2.4s ease-in-out .3s infinite;
}
@keyframes fxTodayGlow { 0%,100% { box-shadow: inset 0 0 0 2px #E95526, 0 1px 0 #FFBD0C; } 50% { box-shadow: inset 0 0 0 2px #FF9F10, 0 0 12px 2px rgba(255,179,0,.75); } }
@keyframes fxSweep { 0% { transform: translateX(-120%); } 45%,100% { transform: translateX(120%); } }
@keyframes fxCoinSpin { 0%,60%,100% { transform: rotateY(0) translateY(0); } 75% { transform: rotateY(180deg) translateY(-3px); } 90% { transform: rotateY(360deg) translateY(0); } }
@keyframes fxHalo { 0% { box-shadow: 0 0 0 0 rgba(255,236,150,.95); } 100% { box-shadow: 0 0 0 12px rgba(255,236,150,0); } }

/* 2. Vừa điểm danh: xu tung từ ô hôm nay (canvas) + thẻ thưởng có tia sáng xoay. */
.fx-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.fx-reward { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(40, 22, 4, .5); animation: fxFade .25s ease both; }
.fx-reward.closing { animation: fxFadeOut .22s ease both; }
.fx-reward-card { position: relative; z-index: 1; width: min(320px, 100%); padding: 96px 22px 22px; border-radius: 28px; text-align: center;
    background: linear-gradient(180deg, #FFFCF1 0%, #FFF3D1 100%); border: 4px solid #FFE4A6;
    box-shadow: 0 10px 0 #B45A24, 0 22px 40px rgba(60, 25, 0, .45); animation: fxCardIn .5s cubic-bezier(.2,1.4,.4,1) .55s both; }
.fx-rays { position: absolute; left: 50%; top: -70px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; pointer-events: none;
    background: repeating-conic-gradient(from 0deg, rgba(255,214,90,.0) 0deg 10deg, rgba(255,214,90,.55) 10deg 20deg);
    -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%);
    animation: fxSpin 9s linear infinite; }
.fx-big-coin { position: absolute; left: 50%; top: -48px; width: 124px; height: 124px; margin-left: -62px; object-fit: contain;
    filter: drop-shadow(0 8px 10px rgba(133, 61, 9, .45)); animation: fxCoinPop .7s cubic-bezier(.2,1.5,.4,1) .65s both, fxFloat 2.6s ease-in-out 1.4s infinite; }
.fx-reward-title { margin: 0; font-size: 15px; font-weight: 900; color: #7A5A2A; letter-spacing: .3px; }
.fx-reward-amount { margin: 4px 0 2px; font-family: 'Paytone One', sans-serif; font-size: 56px; line-height: 1;
    background: linear-gradient(180deg, #FFD54A 0%, #FF9F10 55%, #E95526 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-text-stroke: 1.5px #9A3A0A; filter: drop-shadow(0 3px 0 rgba(154, 58, 10, .35)); animation: fxAmountIn .5s cubic-bezier(.2,1.5,.4,1) .9s both; }
.fx-reward-unit { font-size: 16px; font-weight: 900; color: #C43E12; }
.fx-streak { display: flex; justify-content: center; gap: 6px; margin: 16px 0 6px; }
.fx-streak span { width: 30px; height: 8px; border-radius: 999px; background: #F1E3C2; }
.fx-streak span.on { background: linear-gradient(90deg, #FFB300, #E95526); }
.fx-streak span.now { animation: fxDot .6s ease 1.1s both; }
.fx-reward-next { margin: 0; font-size: 13px; font-weight: 800; color: #5A3B00; min-height: 18px; }
.fx-reward-btn { display: block; width: 100%; min-height: 54px; margin-top: 18px; border: 3px solid rgba(255,255,255,.8); border-radius: 18px;
    background: linear-gradient(180deg, #FF8B5B 0%, #FF6536 100%); box-shadow: inset 0 2px 0 rgba(255,255,255,.45), 0 5px 0 #B9521E;
    color: #FFFFFF; font-family: inherit; font-size: 19px; font-weight: 900; cursor: pointer; }
.fx-reward-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #B9521E; }
.checkin-day.fx-stamp { animation: fxStamp .55s cubic-bezier(.2,1.6,.4,1); }
@keyframes fxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fxFadeOut { to { opacity: 0; } }
@keyframes fxCardIn { 0% { opacity: 0; transform: translateY(30px) scale(.85); } 100% { opacity: 1; transform: none; } }
@keyframes fxSpin { to { transform: rotate(360deg); } }
@keyframes fxCoinPop { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes fxFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes fxAmountIn { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fxDot { 0% { transform: scaleX(.2); opacity: .3; } 100% { transform: scaleX(1); opacity: 1; } }
@keyframes fxStamp { 0% { scale: 1.3; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) {
    .home-checkin-card.fx-unclaimed .checkin-day.today, .home-checkin-card.fx-unclaimed .checkin-day.today::after,
    .home-checkin-card.fx-unclaimed .checkin-day.today .day-coin, .btn-checkin.fx-attention, .btn-checkin.fx-attention::after,
    .fx-rays, .fx-big-coin, .fx-reward-card, .fx-reward-amount, .fx-streak span.now, .checkin-day.fx-stamp { animation: none; }
}
