:root {
    --gold: #ffd166;
    --gold-dim: rgba(255, 209, 102, 0.35);
    --gold-glow: rgba(255, 209, 102, 0.16);
    --text: #fff4dc;
    --muted: #a8957a;
    --glass-bg: rgba(36, 24, 54, 0.55);
    --glass-brd: rgba(255, 209, 102, 0.22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    min-height: 100%;
    background: radial-gradient(120% 90% at 50% 0%, #2a1b3d 0%, #12081f 45%, #05030a 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-user-select: none;
}

#bg {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

#app {
    position: relative; z-index: 1;
    min-height: 100%; max-width: 480px;
    margin: 0 auto;
    display: flex; flex-direction: column;
    padding: 10px 12px calc(66px + env(safe-area-inset-bottom));
    gap: 10px;
}

/* Glass */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-brd);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 22px var(--gold-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

/* Topbar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.avatar {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; font-size: 20px;
    color: #1d1505;
    background: var(--gold);
    box-shadow: 0 0 14px var(--gold-dim);
}
.topinfo { flex: 1; min-width: 0; }
.nick {
    font-weight: 700; font-size: 15px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wins { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wins span { color: var(--gold); font-weight: 800; text-shadow: 0 0 8px var(--gold-dim); }

.round-pill {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 7px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid var(--glass-brd);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px; font-weight: 600;
    max-width: 150px;
}
#round-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.state-dot.active { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
.state-dot.ended { background: #f43f5e; box-shadow: 0 0 8px rgba(244, 63, 94, 0.8); }
.state-dot.none { background: #6b7280; }

/* HUD */
.hud { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.hud-left { display: flex; flex-direction: column; min-width: 84px; }
.hud-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hud-count { font-size: 24px; font-weight: 900; line-height: 1.1; color: var(--gold); text-shadow: 0 0 10px var(--gold-dim); }
.hud-total { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.winner-line { flex: 1; font-size: 13px; color: var(--muted); text-align: right; line-height: 1.4; }
.winner-line b { color: var(--gold); }

/* Комнаты */
.rooms {
    display: flex; gap: 6px; overflow-x: auto;
    padding: 2px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rooms::-webkit-scrollbar { display: none; }
.room-chip {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--glass-brd);
    background: var(--glass-bg);
    color: var(--text);
    font-size: 13px; font-weight: 700;
    cursor: pointer;
    transition: transform .12s, border-color .12s, box-shadow .12s;
}
.room-chip:active { transform: scale(0.94); }
.room-chip.active {
    border-color: var(--room, var(--gold));
    box-shadow: 0 0 14px color-mix(in srgb, var(--room, var(--gold)) 35%, transparent);
    background: rgba(255, 255, 255, 0.08);
}
.room-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--room, var(--gold)); box-shadow: 0 0 8px var(--room, var(--gold)); }
.room-num { font-variant-numeric: tabular-nums; }

/* Доска */
.board-wrap {
    flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.board {
    width: 100%; max-width: 400px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--glass-brd);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 0 22px var(--gold-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.cell {
    aspect-ratio: 1;
    border: 1px solid var(--glass-brd);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 22px; font-weight: 800;
    display: grid; place-items: center;
    cursor: pointer; padding: 4px;
    position: relative;
    transition: transform .1s, background .15s, border-color .15s;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    -webkit-tap-highlight-color: transparent;
}
.cell:active { transform: scale(0.93); }
.cell.revealed {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: clamp(8px, 3.4vw, 12px);
    font-weight: 600;
    letter-spacing: 0.04em;
    word-break: break-all;
    line-height: 1.25;
    cursor: pointer;
}
.cell.revealed .pw { max-width: 100%; }
.cell.revealed .copy-ico {
    position: absolute; top: 3px; right: 5px;
    font-size: 10px; opacity: 0.45;
    pointer-events: none;
}
.cell.revealed:active { background: rgba(255, 209, 102, 0.12); }
.cell.pending { opacity: 0.6; cursor: wait; }
.cell.pending::after {
    content: "";
    width: 14px; height: 14px;
    border: 2px solid var(--gold-dim);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.cell.winning {
    background: rgba(255, 209, 102, 0.16);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 18px var(--gold-dim);
    animation: winPulse 1.1s ease-in-out infinite;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: clamp(8px, 3.4vw, 12px);
    font-weight: 700;
}
.cell:disabled { cursor: default; opacity: 0.85; }
.board.disabled .cell { opacity: 0.5; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes winPulse {
    0%, 100% { box-shadow: 0 0 10px var(--gold-dim); }
    50% { box-shadow: 0 0 26px var(--gold-dim); }
}

.board-hint {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 15px; color: var(--muted);
    max-width: 80%;
}
.board-hint.hidden { display: none; }

/* Toast */
.toast {
    position: fixed; left: 50%;
    bottom: calc(74px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-width: 88%;
    background: rgba(20, 12, 30, 0.92);
    border: 1px solid var(--glass-brd);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px; font-weight: 600;
    z-index: 30;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.hidden { display: none; }
.toast.error { border-color: rgba(244, 63, 94, 0.5); color: #ffb3bd; }

/* Модалка */
.modal {
    position: fixed; inset: 0; z-index: 10;
    display: grid; place-items: center;
    padding: 24px;
    background: rgba(5, 3, 10, 0.78);
    backdrop-filter: blur(4px);
}
.modal.hidden { display: none; }
.modal-card {
    position: relative;
    width: 100%; max-width: 380px;
    padding: 28px 24px 24px; text-align: center;
    display: flex; flex-direction: column; gap: 12px; align-items: center;
    overflow: hidden;
}
#winner-title { font-size: 26px; margin: 0; color: var(--gold); text-shadow: 0 0 14px var(--gold-dim); }
.winner-name { font-size: 18px; font-weight: 800; }
.winner-pos { font-size: 13px; color: var(--muted); }
.code-box {
    width: 100%;
    border: 1.5px dashed var(--gold);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 209, 102, 0.06);
    color: var(--gold);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.06em;
    word-break: break-all;
    user-select: text;
    -webkit-user-select: text;
}
.primary-btn {
    background: var(--gold); color: #1d1505; border: none;
    border-radius: 14px; padding: 14px 28px; font-size: 16px; font-weight: 800;
    cursor: pointer; box-shadow: 0 0 18px var(--gold-dim);
    width: 100%;
}
.primary-btn:active { transform: scale(0.97); }
.ghost-btn {
    background: rgba(255, 255, 255, 0.06); color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px; padding: 12px 28px; font-size: 14px; font-weight: 700;
    cursor: pointer; width: 100%;
}

/* Кнопка заработка попытки */
.scratch-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px; font-weight: 800;
    color: var(--gold);
    cursor: pointer;
    border-radius: 999px;
    transition: transform .12s, box-shadow .12s;
}
.scratch-btn:active { transform: scale(0.97); }

/* Реферальная панель */
.ref-panel {
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.ref-panel.hidden { display: none; }
.ref-info { font-size: 13px; font-weight: 700; color: var(--muted); }
.ref-info span { color: var(--gold); }
.ref-actions { display: flex; gap: 8px; }
.ref-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px; font-weight: 800;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform .12s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-btn:active { transform: scale(0.97); }
.ref-btn.primary {
    background: var(--gold); color: #1d1505; border: none;
    box-shadow: 0 0 14px var(--gold-dim);
}
.ref-btn.hidden { display: none; }

/* Рулетка */
.roulette-title { font-size: 24px; margin: 0; color: var(--gold); text-shadow: 0 0 14px var(--gold-dim); }
.roulette-sub { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }
.roulette-plays {
    font-size: 12px; font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 4px 12px;
}
.wheel-wrap {
    position: relative;
    width: 200px; height: 200px;
    margin: 8px auto 4px;
}
.wheel-pointer {
    position: absolute; top: -6px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 20px solid var(--gold);
    filter: drop-shadow(0 0 6px var(--gold-dim));
    z-index: 3;
}
.roulette-wheel {
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 3px solid var(--gold-dim);
    box-shadow: 0 0 24px var(--gold-glow), inset 0 0 18px rgba(0, 0, 0, 0.45);
    will-change: transform;
}
.wheel-hub {
    position: absolute; top: 50%; left: 50%;
    width: 22px; height: 22px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #1d1505;
    border: 2px solid var(--gold);
    box-shadow: 0 0 10px var(--gold-dim);
    z-index: 2;
}
.wheel-label {
    position: absolute; top: 50%; left: 50%;
    width: 22px; height: 22px;
    margin: -11px 0 0 -11px;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 900;
    color: #1d1505;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.4);
}
.roulette-status { font-size: 15px; font-weight: 700; color: var(--text); min-height: 22px; }
.roulette-status.won { color: var(--gold); text-shadow: 0 0 10px var(--gold-dim); }

/* Модалка скрэтча */
.scratch-title { font-size: 24px; margin: 0; color: var(--gold); text-shadow: 0 0 14px var(--gold-dim); }
.scratch-sub { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }
.scratch-plays {
    font-size: 12px; font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 4px 12px;
}
.scratch-plays.zero { color: #ffb3bd; }
.scratch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%; max-width: 260px;
    margin: 6px 0;
}
.scratch-cell {
    aspect-ratio: 1;
    border-radius: 14px;
    border: 1px solid var(--glass-brd);
    background: linear-gradient(145deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.04));
    color: var(--gold);
    font-size: 30px;
    display: grid; place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform .1s;
    -webkit-tap-highlight-color: transparent;
}
.scratch-cell:active { transform: scale(0.92); }
.scratch-cell:disabled { cursor: default; opacity: 0.9; }
.scratch-cell.revealed { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: var(--muted); }
.scratch-cell.revealed.star {
    background: rgba(255, 209, 102, 0.22);
    border-color: var(--gold);
    color: var(--gold);
    animation: winPulse 0.9s ease-in-out infinite;
}
.scratch-status { font-size: 15px; font-weight: 700; color: var(--text); min-height: 22px; }
.scratch-status.won { color: var(--gold); }
.scratch-status.lost { color: #ffb3bd; }

/* Конфетти */
.confetti {
    position: absolute; top: -10px; left: 50%;
    width: 10px; height: 16px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
    pointer-events: none;
}
@keyframes confettiFall {
    to { transform: translate(0, 46vh) rotate(720deg); opacity: 0; }
}

/* Экраны */
.view { display: flex; flex-direction: column; gap: 10px; }
.view.hidden { display: none; }
.view-title {
    font-size: 20px; font-weight: 800;
    color: var(--gold);
    padding: 2px;
    text-shadow: 0 0 10px var(--gold-dim);
}

/* Панели и большие кнопки (экран бонусов) */
.panel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.big-btn {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px; font-weight: 800;
    color: var(--gold);
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid var(--glass-brd);
    border-radius: 14px;
    cursor: pointer;
    transition: transform .1s;
    font-family: inherit;
}
.big-btn.primary { color: #1d1505; background: linear-gradient(135deg, var(--gold), #e8a33d); border-color: transparent; }
.big-btn:active { transform: scale(0.97); }
.big-btn:disabled { opacity: 0.5; cursor: default; }
.task-note { font-size: 12px; color: var(--muted); font-weight: 600; }

/* Достижения */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; }
.ach-emoji { font-size: 26px; }
.ach-value { font-size: 24px; font-weight: 900; color: var(--gold); text-shadow: 0 0 10px var(--gold-dim); }
.ach-label { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.3; }

/* Лучшие */
.leaders { display: flex; flex-direction: column; gap: 6px; }
.leaders-empty { font-size: 14px; color: var(--muted); padding: 18px 4px; text-align: center; }
.leader-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-brd);
    background: rgba(255, 209, 102, 0.05);
    font-size: 14px;
}
.leader-row.me { border-color: var(--gold); background: rgba(255, 209, 102, 0.12); }
.leader-medal { flex: 0 0 auto; width: 26px; text-align: center; font-weight: 800; }
.leader-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.leader-wins { flex: 0 0 auto; font-weight: 800; color: var(--gold); }

/* Нижнее меню */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 5;
    display: flex;
    background: rgba(18, 8, 31, 0.94);
    border-top: 1px solid var(--glass-brd);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    max-width: 480px;
    margin: 0 auto;
}
.tab-btn {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none;
    color: var(--muted);
    font-size: 18px; font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn span { font-size: 10px; letter-spacing: 0.02em; }
.tab-btn.active { color: var(--gold); text-shadow: 0 0 10px var(--gold-dim); }

/* Сундуки */
.chests-wrap { display: flex; flex-direction: column; gap: 6px; }
.section-title {
    font-size: 12px; font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.chests {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.chest-none { font-size: 13px; color: var(--muted); padding: 4px 2px; }
.chest-card {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 5px 3px;
    border-radius: 12px;
    border: 1px solid var(--glass-brd);
    background: linear-gradient(145deg, rgba(255, 209, 102, 0.14), rgba(255, 209, 102, 0.03));
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform .1s;
    font-family: inherit;
    color: var(--text);
}
.chest-card:active { transform: scale(0.93); }
.chest-card.open {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.35);
    cursor: default;
}
.chest-emoji { font-size: 18px; line-height: 1.1; }
.chest-num { font-size: 9px; font-weight: 800; color: var(--muted); }
.chest-amount {
    font-size: 11px; font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold-dim);
}
.chest-who {
    font-size: 8px; color: var(--muted);
    max-width: 100%;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Задания: кнопка + окно */
.bonus-row { display: flex; gap: 8px; }
.scratch-btn { flex: 1; }
.tasks-btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    font-size: 14px; font-weight: 800;
    color: var(--text);
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid var(--glass-brd);
    background: rgba(255, 209, 102, 0.08);
    transition: transform .12s;
}
.tasks-btn.has-pending {
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-dim);
}
.tasks-btn:active { transform: scale(0.97); }

.task-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.task-row:last-of-type { border-bottom: none; }
/* Список оп */
.ops-list { display: flex; flex-direction: column; gap: 8px; }
.op-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.op-row:last-child { border-bottom: none; }
.op-row.done { opacity: 0.8; }
.op-info { display: flex; align-items: center; gap: 6px; min-width: 0; }
.op-emoji { font-size: 16px; }
.op-name { font-weight: 700; font-size: 13px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-bonus { font-size: 12px; font-weight: 800; color: var(--gold); }
.op-filled { font-size: 12px; color: var(--muted); font-weight: 600; }

.task-row span:first-child { flex: 1; min-width: 0; }
.task-btns { display: flex; gap: 6px; flex: 0 0 auto; }
.task-state { font-size: 12px; font-weight: 700; color: var(--muted); flex: 0 0 auto; }
.task-state.done { color: var(--gold); }
.tasks-modal-title { margin: 0 0 4px; font-size: 20px; color: var(--gold); }
.tasks-modal-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.tasks-modal-bonus { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.tasks-modal-bonus span { color: var(--gold); }

/* Модалка сундука: ввод ключа */
.chest-modal-title { margin: 0 0 4px; font-size: 20px; color: var(--gold); }
.chest-modal-sub { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
/* Условия мини-игр */
.info-list {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    display: flex; flex-direction: column; gap: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
}
.info-list li {
    padding-left: 20px;
    position: relative;
}
.info-list li::before {
    content: "•";
    position: absolute; left: 4px;
    color: var(--gold);
    font-weight: 800;
}
.info-list b { color: var(--gold); }

.key-input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid var(--glass-brd);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 16px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    outline: none;
}
.key-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.chest-result { min-height: 48px; margin: 12px 0 4px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.chest-win { font-size: 16px; font-weight: 800; color: var(--gold); }
.chest-link {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gold), #e8a33d);
    color: #1d1505;
    font-weight: 800;
    text-decoration: none;
    font-size: 15px;
    box-shadow: 0 4px 18px var(--gold-dim);
}
.chest-fail { font-size: 14px; font-weight: 700; color: #ffb3bd; }
