* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* 色彩系统：iOS 风格（浅、柔、清爽） */
    --bg-from: #fff5f5; /* 浅红粉 */
    --bg-to: #ffeaea;   /* 肤感浅红 */
    --card-bg: rgba(255,255,255,0.75);
    --card-border: rgba(15, 23, 42, 0.08);
    --card-shadow: 0 8px 30px rgba(2, 6, 23, 0.08);
    /* 主题联动的表面与边框颜色 */
    --surface: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 10px;

    --text: #0f172a;          /* slate-900 */
    --text-muted: #475569;    /* slate-600 */
    --line: rgba(15, 23, 42, 0.08);

    /* 喜庆主题：红 + 金 */
    --primary: #e53935;       /* Chinese Red */
    --primary-hover: #c62828;
    --success: #d4af37;       /* Gold as “win” */
    --danger: #e53935;        /* Red */
    --warning: #ffcc33;       /* Warm Gold */
    --gold: #d4af37;
    --surface-success: #fff6da; /* light gold surface */
    --surface-danger: #ffeaea;
    --surface-warning: #fff8e6;
}

/* 背景主题：通过 body[data-theme] 切换 */
body { transition: background 480ms ease; }
body[data-theme="festive"] {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(212,175,55,0.08), transparent 60%),
        radial-gradient(1000px 500px at 110% 10%, rgba(229,57,53,0.06), transparent 60%),
        linear-gradient(135deg, #fff5f5, #ffeaea);
    /* 表面/边框 */
    --surface: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
}
body[data-theme="royal"] {
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(212,175,55,0.12), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(102,51,0,0.08), transparent 60%),
        linear-gradient(135deg, #fffaf0, #fff3d9);
    --surface: #fffaf0; /* 米金偏暖 */
    --border: rgba(102, 51, 0, 0.14);
}
body[data-theme="spring"] {
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(66, 185, 131, 0.12), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(255, 143, 163, 0.10), transparent 60%),
        linear-gradient(135deg, #f4fff6, #f0fff9);
    --surface: #f9fffb; /* 偏浅绿色 */
    --border: rgba(16, 94, 61, 0.12);
}
body[data-theme="night"] {
    background:
        radial-gradient(800px 480px at 20% -10%, rgba(255,255,255,0.08), transparent 60%),
        radial-gradient(700px 420px at 100% 0%, rgba(255,215,0,0.10), transparent 60%),
        linear-gradient(135deg, #0c1024, #1b1740);
    --surface: rgba(16, 18, 40, 0.65);
    --border: rgba(148, 163, 184, 0.2);
    --text: #e5e7eb;
    --text-muted: #cbd5e1;
    /* 结果面板的主题表面，夜空下降低亮度，提升对比 */
    --surface-success: rgba(212, 175, 55, 0.14);
    --surface-danger: rgba(229, 57, 53, 0.16);
    --surface-warning: rgba(255, 204, 51, 0.10);
}

/* 夜空主题：进行中状态的文字使用浅色，避免在暗面板上发灰不清 */
body[data-theme="night"] .result.playing { color: var(--text); }

/* 主题选择器 */
.theme-switch { display: flex; gap: 8px; align-items: center; margin-left: 5px; }
.theme-swatch {
    width: 22px; height: 22px; border-radius: 999px; border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), inset 0 0 0 1px rgba(255,255,255,0.45);
    cursor: pointer; position: relative; overflow: hidden; transition: transform 0.16s ease;
}
.theme-swatch:hover { transform: translateY(-1px); }
.theme-swatch[data-theme="festive"] { background: linear-gradient(135deg, #ff6b6b, #e53935); }
.theme-swatch[data-theme="royal"] { background: linear-gradient(135deg, #f7e9c7, #d4af37); }
.theme-swatch[data-theme="spring"] { background: linear-gradient(135deg, #a8f0c6, #69d6a4); }
.theme-swatch[data-theme="night"] { background: linear-gradient(135deg, #1b1740, #0c1024); }

@media (prefers-color-scheme: dark) {
    :root {
        --bg-from: #180b0b;
        --bg-to: #1e0f0f;
        --card-bg: rgba(34, 17, 17, 0.6);
        --card-border: rgba(148, 163, 184, 0.16);
        --card-shadow: 0 12px 40px rgba(0,0,0,0.4);
        --text: #f8fafc;
        --text-muted: #e2e8f0cc;
        --line: rgba(255, 255, 255, 0.14);
        --primary: #ff4d4f;
        --primary-hover: #ff6b6d;
        --surface-success: rgba(212, 175, 55, 0.16);
        --surface-danger: rgba(229, 57, 53, 0.18);
        --surface-warning: rgba(255, 204, 51, 0.16);
    }
}

/* 统一隐藏语义，避免不同浏览器差异 */
[hidden] { display: none !important; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text);
        background:
            radial-gradient(1200px 600px at 10% -10%, rgba(212,175,55,0.08), transparent 60%),
            radial-gradient(1000px 500px at 110% 10%, rgba(229,57,53,0.06), transparent 60%),
            linear-gradient(135deg, var(--bg-from), var(--bg-to));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.header {
    background: transparent;
    color: var(--text);
    text-align: center;
    padding: 18px 20px 8px;
    position: relative;
}

.header h1 {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-sheen 4s ease-in-out infinite;
}

@keyframes title-sheen {
    0% { background-position: 0% 50%; text-shadow: 0 2px 12px rgba(229,57,53,0.18); }
    50% { background-position: 100% 50%; text-shadow: 0 4px 18px rgba(212,175,55,0.28); }
    100% { background-position: 0% 50%; text-shadow: 0 2px 12px rgba(229,57,53,0.18); }
}

.price { font-size: 13px; color: var(--primary); }

.ticket {
    position: relative;
    background: transparent;
    padding: 16px 20px 20px;
}

.decorative-seven {
    position: absolute;
    top: 4px;
    right: 14px;
    font-size: 96px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), rgba(229,57,53,0.9));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.16;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 1;
    user-select: none;
}

/* 福字徽章 */
.badge-fu {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, var(--primary));
    color: #fff9e6;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(229,57,53,0.28), inset 0 0 0 1px rgba(255,255,255,0.24);
    transform: rotate(-10deg);
    text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* 节日小装饰 */
.festive-ornaments { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ornament { position: absolute; opacity: 0.8; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.12)); }
.ornament.lantern { top: 10px; right: 58px; font-size: 22px; animation: sway 3.5s ease-in-out infinite; }
.ornament.envelope { top: 54px; left: 8px; font-size: 18px; animation: float 6s ease-in-out infinite; }
.ornament.coin { bottom: 30px; right: 16px; font-size: 18px; animation: float 7s ease-in-out infinite 0.4s; }
.ornament.firecracker { bottom: 10px; left: 12px; font-size: 20px; animation: sway 4s ease-in-out infinite 0.2s; }

@keyframes sway { 0%,100%{ transform: rotate(-4deg) translateY(0); } 50%{ transform: rotate(4deg) translateY(2px);} }
@keyframes float { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-6px);} }

.ticket-content {
    position: relative;
    z-index: 2;
}

.wallet-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 14px rgba(229,57,53,0.06);
}

.wallet-stats span { margin-right: 10px; color: var(--text); }

/* 让“已花费”换行显示 */
.wallet-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
}
.wallet-stats span:last-child {
    flex-basis: 100%;
    margin-right: 0;
}

.wallet-actions .btn-secondary {
    background: rgba(229,57,53,0.08);
    color: var(--primary);
    border: 1px solid rgba(229,57,53,0.28);
}

.wallet-actions .btn-secondary:hover {
    background: rgba(229,57,53,0.12);
}

.prize-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: rgba(212,175,55,0.08);
    border-radius: var(--radius-md);
    border: 1px solid rgba(212,175,55,0.45);
}

.prize-info h2 { color: var(--text); font-size: 16px; margin-bottom: 6px; }

.max-prize { 
    font-size: 22px; font-weight: 900; color: var(--text);
    background: linear-gradient(90deg, #c59d1a, #f7e08b, #c59d1a);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    background-size: 180% 100%;
    animation: gold-flow 5s ease-in-out infinite;
}

@keyframes gold-flow { 0%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } 100%{ background-position: 0% 50%; } }

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2), 0 0 10px rgba(220, 53, 69, 0.5);
    }
    to {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2), 0 0 20px rgba(220, 53, 69, 0.8);
    }
}
/* 移除夸张发光动画 */

.scratch-area h3 { text-align: center; color: var(--text); margin-bottom: 16px; font-size: 18px; }

.scratch-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.scratch-item {
    position: relative;
    width: 100%;
    height: 80px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(2,6,23,0.04);
}

.scratch-item:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(229,57,53,0.18), 0 0 0 1px rgba(212,175,55,0.35) inset; border-color: rgba(212,175,55,0.55); }
.scratch-item::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.2s ease;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.35) 35%, transparent 50%);
}
.scratch-item:hover::after { opacity: 1; animation: sweep 1.2s ease-in-out; }
@keyframes sweep { from{ background-position: -200% 0; } to{ background-position: 200% 0; } }
.scratch-item.scratched { box-shadow: 0 8px 24px rgba(212,175,55,0.28); border-color: rgba(212,175,55,0.75); }

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: crosshair;
    /* 允许 Pointer Events 控制触摸，不触发滚动/缩放 */
    touch-action: none;
}

/* 在整个刮奖区域内禁用浏览器原生滚动手势，避免滑动导致 pointercancel */
.scratch-item,
.scratch-grid,
.scratch-area {
    touch-action: none;
}

.prize-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    z-index: 1;
}

.rules {
    background: var(--surface);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.rules h4 { color: var(--text); margin-bottom: 8px; font-size: 15px; position: relative; }
.rules h4::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: linear-gradient(90deg, rgba(229,57,53,0.6), rgba(212,175,55,0.6)); border-radius: 2px; }

.rules p { color: var(--text-muted); margin-bottom: 4px; font-size: 14px; line-height: 1.5; }

.controls { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.btn {
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

/* 主按钮：红金光泽与扫光 */
#resetBtn { position: relative; overflow: hidden; background: linear-gradient(180deg, #ff5a5f, var(--primary)); color: #fff; box-shadow: 0 6px 16px rgba(229,57,53,0.28); }
#resetBtn::before { content:""; position: absolute; top:0; left:-150%; width: 120%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-20deg); }
#resetBtn:hover::before { animation: btn-shine 1.2s ease; }
@keyframes btn-shine { 0%{ left:-150%; } 100%{ left:150%; } }

#resetBtn:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(229,57,53,0.36); }

#revealAllBtn { position: relative; overflow: hidden; background: rgba(212,175,55,0.12); color: var(--gold); border-color: rgba(212,175,55,0.35); }
#revealAllBtn::before { content:""; position:absolute; inset:-2px; background: radial-gradient(120px 60px at -10% 50%, rgba(255,255,255,0.25), transparent 60%); opacity: 0; transition: opacity 0.2s; }
#revealAllBtn:hover::before { opacity: 1; }

#revealAllBtn:hover { background: rgba(212,175,55,0.18); transform: translateY(-1px); }

/* 按钮禁用态 */
#resetBtn:disabled,
#revealAllBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result {
    text-align: center;
    padding: 16px;
    margin-top: 16px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
}
.result.win { border-color: rgba(212,175,55,0.55); }
.result.lose { border-color: rgba(229,57,53,0.45); }
.result.playing { border-color: rgba(212,175,55,0.35); }

.result__content { display:flex; flex-direction: column; align-items:center; gap:6px; }
.result__icon { font-size: 22px; line-height:1; }
.result__title { font-size: 16px; font-weight: 800; color: var(--text); }
.result__amount { font-size: 26px; font-weight: 900; background: linear-gradient(90deg, #c59d1a, #f7e08b, #c59d1a); -webkit-background-clip: text; background-clip:text; color: transparent; text-shadow: 0 2px 10px rgba(212,175,55,0.25); }
.result__desc { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.result__progress { width: 100%; max-width: 360px; height: 8px; background: rgba(212,175,55,0.16); border-radius: 999px; overflow: hidden; border: 1px solid rgba(212,175,55,0.28); margin-top: 4px; }
.result__bar { height:100%; background: linear-gradient(90deg, rgba(212,175,55,0.85), rgba(229,57,53,0.85)); border-radius: 999px; box-shadow: inset 0 0 6px rgba(255,255,255,0.35); transition: width 0.25s ease; }

/* 夜空主题下提升结果面板对比度 */
body[data-theme="night"] .result.playing {
    background: rgba(21, 25, 52, 0.78);
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.28);
}
body[data-theme="night"] .result .result__title { color: #e5e7eb; }
body[data-theme="night"] .result .result__desc { color: #cbd5e1; }

.history {
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.history h4 { margin-bottom: 8px; position: relative; }
.history h4::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: linear-gradient(90deg, rgba(212,175,55,0.6), rgba(229,57,53,0.6)); border-radius: 2px; }

.history-list {
    list-style: none;
    max-height: 180px;
    overflow: auto;
    padding-left: 0;
    /* 预留滚动条空间，避免挡住文字 */
    padding-right: 16px;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
    box-sizing: content-box;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    border-bottom: 1px dashed var(--line);
    font-size: 14px;
}

.history-list li:last-child { border-bottom: none; }

.history-empty {
    color: #64748b;
    text-align: center;
    padding: 8px 0;
}

/* 模态弹窗 */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 10000;
}
.modal.show { display: block; }
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(229,57,53,0.35);
    backdrop-filter: blur(6px);
}
.modal__dialog {
    position: relative;
    width: min(560px, 92vw);
    max-height: 80vh;
    margin: 8vh auto;
    background: var(--card-bg);
    backdrop-filter: saturate(180%) blur(14px);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(2,6,23,0.35);
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}
.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}
.modal__body {
    padding: 12px 16px;
    overflow: auto;
    /* 预留滚动条空间与稳定轨道 */
    padding-right: 16px;
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
}

/* 自定义滚动条（WebKit 内核） */
.history-list::-webkit-scrollbar,
.modal__body::-webkit-scrollbar { width: 10px; }
.history-list::-webkit-scrollbar-thumb,
.modal__body::-webkit-scrollbar-thumb { background-color: rgba(212, 175, 55, 0.6); border-radius: 8px; }
.history-list::-webkit-scrollbar-thumb:hover,
.modal__body::-webkit-scrollbar-thumb:hover { background-color: rgba(212, 175, 55, 0.85); }
.history-list::-webkit-scrollbar-track,
.modal__body::-webkit-scrollbar-track {
    background: transparent;
}
.modal__close { border: 1px solid rgba(212,175,55,0.35); background: rgba(212,175,55,0.12); font-size: 18px; line-height: 1; cursor: pointer; color: var(--text); border-radius: 10px; padding: 4px 10px; }
.modal__close:hover { background: rgba(212,175,55,0.18); }

.result.win {
    background: var(--surface-success);
    color: var(--gold);
    animation: celebration 0.8s ease-in-out;
}

.result.lose {
    background: var(--surface-danger);
    color: var(--danger);
}

.result.playing {
    background: var(--surface-warning);
    color: #7a5d00;
}

@keyframes celebration {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.footer {
    background: transparent;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
    font-size: 13px;
    border-top: 1px solid var(--line);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        max-width: none;
    }
    body { padding: 16px; }
    .wallet-bar { flex-direction: column; align-items: stretch; padding: 8px 10px; }
    .wallet-stats { width: 100%; row-gap: 2px; }
    .wallet-stats span { margin-right: 8px; font-size: 14px; }
    .wallet-actions { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
    .wallet-actions .btn-secondary { flex: 1; min-width: 140px; }
    .theme-switch { order: 2; width: 100%; justify-content: flex-start; }
    .theme-swatch { width: 18px; height: 18px; }
    
    .scratch-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .decorative-seven {
        font-size: 72px;
        top: 5px;
        right: 15px;
    }
    
    .header h1 {
        font-size: 19px;
    }
    
    .max-prize {
        font-size: 22px;
    }

    .prize-info { margin-bottom: 16px; padding: 10px 12px; }
    .rules { padding: 10px 12px; margin-bottom: 12px; }
    .rules h4 { font-size: 14px; }
    .rules p { font-size: 13px; }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .btn {
        width: 100%;
        font-size: 14px;
        padding: 9px 14px;
    }

    .result { padding: 14px; font-size: 15px; min-height: 50px; }
    .result__amount { font-size: 24px; }
    .result__desc { font-size: 12px; }
}

@media (max-width: 480px) {
    body { padding: 10px; }
    .scratch-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .scratch-item {
        height: 62px;
    }
    
    .prize-content {
        font-size: 11px;
    }
    
    .decorative-seven {
        font-size: 52px;
    }
    .wallet-actions .btn-secondary { min-width: 120px; }
    .price { font-size: 12px; }
    .header h1 { font-size: 18px; }
    #resetBtn, #revealAllBtn { padding: 9px 12px; font-size: 14px; }
    .result { padding: 12px; min-height: 48px; }
    .result__amount { font-size: 22px; }
    .result__icon { font-size: 20px; }
    .theme-swatch { width: 16px; height: 16px; }
    .ornament { opacity: 0.7; }
}

@media (max-width: 360px) {
    .scratch-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .scratch-item { height: 56px; }
    .result { padding: 10px; }
    .result__amount { font-size: 20px; }
    .header h1 { font-size: 16px; }
}

/* 刮奖特效 */
.scratch-item.scratched {
    animation: reveal 0.5s ease-out;
}

@keyframes reveal {
    from {
        opacity: 0.8;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}