:root {
    --red-900: #670006;
    --red-800: #8f070b;
    --red-700: #bd1417;
    --red-500: #ef2a24;
    --orange: #ff6b0d;
    --gold: #ffe485;
    --gold-strong: #efb75d;
    --paper: #ffffff;
    --paper-soft: #f1e2e2;
    --ink: #3a3636;
    --muted: #777;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    background: #f3f3f3;
}

a {
    color: inherit;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background:
        radial-gradient(circle at 85% 6%, rgba(255, 229, 143, .28), transparent 24%),
        linear-gradient(180deg, #a00b0d, #ea261e);
}

.phone-stage {
    position: relative;
    width: min(100%, 480px);
    min-height: 100vh;
    overflow: hidden;
    padding: 24px 18px 34px;
}

.home-page {
    background-image: var(--home-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.home-page .phone-stage {
    min-height: 100vh;
    padding: 0 22px 30px;
}

.home-side-btn {
    position: absolute;
    right: 0;
    top: 38%;
    z-index: 12;
    min-width: 34px;
    max-width: 42px;
    padding: 14px 8px;
    border: 0;
    border-radius: 10px 0 0 10px;
    color: #fff;
    background: linear-gradient(180deg, rgba(255, 107, 13, .96), rgba(239, 42, 36, .96));
    box-shadow: -4px 4px 16px rgba(80, 0, 0, .28);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
}

.home-side-btn:active {
    transform: scale(.97);
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    background: rgba(20, 0, 0, .68);
}

.intro-overlay[hidden] {
    display: none;
}

.intro-modal {
    position: relative;
    width: min(100%, 400px);
    max-height: min(78vh, 560px);
    display: flex;
    flex-direction: column;
    padding: 28px 22px 24px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.intro-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #999;
    background: #f5f5f5;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.intro-title {
    margin: 0 28px 16px 0;
    color: var(--red-700);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.intro-body {
    flex: 1;
    overflow-y: auto;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.home-only {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: clamp(460px, 51vh, 650px);
    text-align: center;
    z-index: 1;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 12px 26px;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.btn.full {
    width: 100%;
}

.btn.primary,
.start-button {
    color: #8b2500;
    background: linear-gradient(180deg, #fffdf2 0%, #fff0a9 46%, #ffd35e 100%);
    border: 2px solid rgba(255, 255, 255, .86);
    box-shadow: 0 10px 26px rgba(86, 20, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .78);
}

.btn.red {
    color: #fff;
    background: linear-gradient(180deg, #ff321f, #d60d11);
}

.btn.ghost {
    color: #8f1012;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(174, 22, 25, .24);
}

.start-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 222px;
    min-height: 64px;
    border-radius: 12px;
    padding: 13px 34px;
    font-size: 22px;
    animation: startFloat 2.2s ease-in-out infinite, startGlow 1.35s ease-in-out infinite alternate;
}

.start-button span {
    position: relative;
    z-index: 1;
}

.start-button::before {
    content: "";
    position: absolute;
    inset: -35% -95%;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .9) 49%, transparent 60%);
    transform: translateX(-46%);
    animation: shineSweep 2.8s ease-in-out infinite;
}

.start-button::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -8px;
    border: 1px solid rgba(255, 234, 141, .78);
    border-radius: 16px;
    animation: ringPulse 1.8s ease-out infinite;
}

.chance {
    margin-top: 16px;
    padding: 5px 16px 6px;
    color: #fff;
    background: rgba(112, 0, 0, .26);
    border-radius: 999px;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 3px 7px rgba(62, 0, 0, .76);
    backdrop-filter: blur(2px);
}

.footer-text {
    position: relative;
    z-index: 3;
    margin: 16px 0 0;
    color: rgba(255, 246, 220, .8);
    text-align: center;
    font-size: 13px;
}

.home-page .footer-text {
    display: none;
}

.notice {
    padding: 12px 14px;
    border-radius: 8px;
    margin: 14px 0;
    line-height: 1.55;
}

.notice.danger {
    color: #8c0008;
    background: #ffe9e8;
    border: 1px solid #ffc7c4;
}

.notice.success {
    color: #6e4300;
    background: #fff3ce;
    border: 1px solid #f3cf76;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.panel {
    position: relative;
    z-index: 1;
    margin: 20px 0;
    padding: 24px;
    background: rgba(255, 244, 234, .94);
    border: 1px solid rgba(255, 218, 183, .72);
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(90, 0, 3, .28);
}

.register-page,
.quiz-page,
.result-page,
.lottery-page,
.ranking-page {
    background-image:
        linear-gradient(180deg, rgba(95, 0, 2, .04), rgba(95, 0, 2, .28)),
        var(--quiz-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

.panel-title {
    margin: 0 0 22px;
    color: #cf1416;
    text-align: center;
    font-size: 27px;
}

.top-image {
    width: calc(100% + 48px);
    height: 148px;
    margin: -24px -24px 24px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    display: block;
}

.field {
    display: block;
    margin-bottom: 14px;
}

.field span {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
}

.field input,
.field textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid #c61a20;
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    color: var(--ink);
    font: inherit;
}

.check-line {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin: 16px 0 20px;
    line-height: 1.5;
}

.check-line input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.quiz-scene {
    min-height: calc(100vh - 58px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 12px 36px;
}

.quiz-form {
    position: relative;
}

.quiz-card-shell {
    position: relative;
    min-height: 580px;
    padding: 96px 20px 24px;
    background: rgba(255, 255, 255, .98);
    border-radius: 16px;
    box-shadow: 0 18px 0 rgba(255, 255, 255, .26), 0 24px 44px rgba(92, 0, 4, .32);
}

.corner-ribbon {
    position: absolute;
    top: -6px;
    left: 24px;
    width: 48px;
    height: 72px;
    background: linear-gradient(180deg, #ffb150, #ff7b27);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.corner-ribbon::before {
    content: "★";
    position: absolute;
    left: 0;
    right: 0;
    top: 12px;
    color: #fff;
    text-align: center;
    font-size: 20px;
}

.timer-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 112px;
    height: 112px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ba151c;
    background: #fff;
    border: 3px solid #b4161b;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(95, 0, 5, .16);
}

.timer-badge span {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
}

.timer-badge strong {
    margin-top: 4px;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .02em;
}

.quiz-slide {
    display: none;
}

.quiz-slide.active {
    display: block;
}

.quiz-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.type-tab {
    min-width: 96px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: #fff;
    background: linear-gradient(180deg, #ff3127, #e91d22);
    border-radius: 0 12px 0 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
}

.count {
    color: #f0272d;
    font-size: 18px;
    font-weight: 700;
}

.count em {
    font-style: normal;
    font-size: 22px;
}

.progress-bars {
    display: grid;
    grid-template-columns: repeat(var(--total, 10), 1fr);
    gap: 6px;
    margin: 14px 0 22px;
}

.progress-bars i {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: #e8e8e8;
}

.progress-bars i.active {
    background: #f0272d;
}

.quiz-question {
    margin: 0 0 20px;
    color: #2c2c2c;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.75;
    letter-spacing: .01em;
}

.answer-list {
    display: grid;
    gap: 12px;
}

.answer-option {
    display: block;
    cursor: pointer;
}

.answer-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.answer-option span {
    min-height: 52px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    color: #333;
    background: #f7f7f8;
    border: 1.5px solid #ececec;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.answer-option b {
    flex-shrink: 0;
    min-width: 28px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

.answer-option input:checked + span {
    color: #e85d00;
    background: #fff4e8;
    border-color: #ffb36a;
    box-shadow: none;
}

.quiz-slide.is-locked .answer-option {
    pointer-events: none;
    cursor: default;
}

.answer-option.is-wrong span {
    color: #e85d00;
    background: #fff4e8;
    border-color: #ffb36a;
}

.answer-option.is-right span {
    color: #0f7a3a;
    background: #edfbf2;
    border-color: #7ed39f;
}

.answer-option.is-correct-answer span {
    color: #0f7a3a;
    background: #edfbf2;
    border-color: #7ed39f;
}

.answer-feedback {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1.5px solid #f0272d;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.answer-feedback.is-wrong {
    color: #e02020;
    background: #fff8f8;
    border-color: #f0272d;
}

.answer-feedback.is-correct {
    color: #0f7a3a;
    background: #edfbf2;
    border-color: #7ed39f;
}

.quiz-confirm {
    width: min(72%, 280px);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 28px auto 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, #ff8222, #ff6208);
    box-shadow: 0 10px 22px rgba(135, 35, 0, .22);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}

.quiz-confirm:active {
    transform: scale(.98);
}

.lottery-scene {
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 6px 36px;
}

.lottery-card {
    position: relative;
    width: 100%;
    padding: 24px 14px 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 228, 133, .55);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 233, 143, .35), transparent 35%),
        linear-gradient(180deg, rgba(156, 0, 7, .92), rgba(108, 0, 9, .96));
    box-shadow: 0 20px 46px rgba(75, 0, 4, .36);
}

.lottery-heading {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
    text-align: center;
}

.lottery-heading span {
    color: rgba(255, 230, 143, .82);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
}

.lottery-heading h1 {
    margin: 4px 0 8px;
    color: #ffe485;
    font-size: 30px;
    line-height: 1.15;
    text-shadow: 0 3px 8px rgba(80, 0, 0, .48);
}

.lottery-heading p {
    margin: 0;
    color: rgba(255, 249, 224, .92);
    font-size: 15px;
    line-height: 1.5;
}

.wheel-wrap {
    --wheel-size: min(82vw, 344px);
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    margin: 8px auto 22px;
    filter: drop-shadow(0 16px 22px rgba(54, 0, 0, .34));
}

.wheel {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: 9px solid #ffe79e;
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 5px rgba(183, 28, 22, .36),
        inset 0 0 42px rgba(98, 0, 0, .32),
        0 0 0 7px rgba(255, 247, 199, .2);
    transition: transform 4.6s cubic-bezier(.12, .78, .13, 1);
    will-change: transform;
}

.wheel::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 50%;
    pointer-events: none;
}

.wheel-prize {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    color: #7a1700;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .46);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--wheel-size) * -.32)) rotate(var(--angle-back));
}

.wheel-prize img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .84);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 8px rgba(112, 0, 0, .22);
}

.wheel-prize strong {
    max-width: 86px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
}

.wheel-prize span {
    max-width: 86px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.wheel-pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    z-index: 4;
    width: 0;
    height: 0;
    transform: translateX(-50%);
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 30px solid #fff4b8;
    filter: drop-shadow(0 4px 4px rgba(92, 0, 0, .22));
}

.wheel-core {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 96px;
    height: 96px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    align-content: center;
    color: #9a2600;
    background: radial-gradient(circle at 35% 25%, #fffdf0, #ffe070 62%, #e6a32f);
    border: 5px solid #fff6c8;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(80, 0, 0, .26), inset 0 2px 8px rgba(255, 255, 255, .55);
}

.wheel-core strong {
    font-size: 29px;
    line-height: 1;
}

.wheel-core span {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 900;
}

.lottery-spin {
    width: min(82%, 300px);
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 0;
    border-radius: 999px;
    color: #8b2500;
    background: linear-gradient(180deg, #fffdf2 0%, #fff1aa 48%, #ffd15a 100%);
    box-shadow: 0 11px 26px rgba(67, 0, 0, .28), inset 0 0 0 2px rgba(255, 255, 255, .78);
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
}

.lottery-spin:not(:disabled) {
    animation: startGlow 1.35s ease-in-out infinite alternate;
}

.lottery-spin:disabled {
    cursor: default;
    opacity: .82;
}

.lottery-links {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.lottery-links a {
    min-width: 108px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff7d2;
    border: 1px solid rgba(255, 228, 133, .52);
    border-radius: 999px;
    background: rgba(95, 0, 0, .28);
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
}

.lottery-result-mask {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    background: rgba(27, 0, 0, .72);
}

.lottery-result-mask[hidden] {
    display: none;
}

.lottery-result-box {
    position: relative;
    width: min(100%, 360px);
    padding: 82px 22px 24px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff, #fff8ec);
    text-align: center;
    box-shadow: 0 22px 58px rgba(0, 0, 0, .32);
}

.result-spark {
    position: absolute;
    left: 50%;
    top: -46px;
    width: 138px;
    height: 118px;
    transform: translateX(-50%);
    border-radius: 999px 999px 36px 36px;
    background:
        radial-gradient(circle at 50% 28%, #fff7ba 0 18%, transparent 19%),
        linear-gradient(180deg, #ffcc57, #f43b2b);
    border: 6px solid #fff7c8;
    box-shadow: 0 12px 28px rgba(129, 0, 0, .24);
}

.result-spark::after {
    content: "奖";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fffde6;
    font-size: 48px;
    font-weight: 900;
    text-shadow: 0 3px 0 rgba(151, 38, 0, .36);
}

.result-prize-image {
    width: 92px;
    height: 92px;
    margin: -18px auto 14px;
    border: 4px solid #ffe59b;
    border-radius: 50%;
    background-position: center;
    background-size: cover;
    box-shadow: 0 8px 20px rgba(117, 0, 0, .18);
}

.lottery-result-box h2 {
    margin: 0 0 12px;
    color: #f43168;
    font-size: 30px;
}

.result-prize-name {
    margin: 0;
    color: #a43a00;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.4;
}

.result-prize-tip {
    margin: 12px 0 22px;
    color: #777;
    font-size: 16px;
    line-height: 1.6;
}

.lottery-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.lottery-result-actions a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: #edb55c;
    text-decoration: none;
    font-size: 17px;
    font-weight: 900;
}

.lottery-result-actions a:first-child {
    background: linear-gradient(180deg, #ff3467, #f72b62);
}

.result-scene {
    min-height: calc(100vh - 70px);
    display: grid;
    place-items: center;
    padding: 48px 0 26px;
}

.result-backdrop {
    width: 100%;
    min-height: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 0, 0, .68);
    border-radius: 8px;
    padding: 34px 18px;
}

.result-modal {
    position: relative;
    width: min(100%, 360px);
    margin-top: 90px;
    padding: 78px 22px 28px;
    background: #fff;
    border-radius: 22px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.result-ribbon {
    position: absolute;
    left: 50%;
    top: -74px;
    width: 254px;
    min-height: 78px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(180deg, #8b78c8, #6e5eb4);
    border-radius: 8px;
    font-size: 31px;
    font-weight: 900;
    text-shadow: 0 2px 0 rgba(75, 57, 129, .5);
}

.avatar-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 74px;
    height: 74px;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #ff325d, #b60810);
    border: 4px solid #efc3c3;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 900;
}

.result-modal h1 {
    margin: 10px 0 14px;
    color: #f43168;
    font-size: 26px;
}

.result-modal h1 strong {
    font-size: 34px;
}

.result-modal p {
    margin: 9px 0;
    color: #777;
    font-size: 19px;
    line-height: 1.45;
}

.result-prize {
    margin: 18px 0 0;
    padding: 12px 14px;
    color: #a43a00;
    background: #fff3c2;
    border-radius: 10px;
    font-weight: 800;
}

.result-prize strong {
    color: #f43168;
}

.result-divider {
    height: 1px;
    margin: 22px 0 18px;
    background: #ddd;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.result-stats div {
    padding: 0 8px;
    border-left: 1px solid #ddd;
}

.result-stats div:first-child {
    border-left: 0;
}

.result-stats span {
    display: block;
    color: #f43168;
    font-size: 15px;
    font-weight: 800;
}

.result-stats strong {
    display: block;
    margin-top: 10px;
    color: var(--gold-strong);
    font-size: 22px;
    white-space: nowrap;
}

.result-actions {
    margin-top: 26px;
}

.modal-primary {
    width: 100%;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #fff6ab;
    background: linear-gradient(180deg, #ff3467, #f72b62);
    font-size: 24px;
    font-weight: 900;
    text-decoration: none;
}

.below-actions {
    width: min(100%, 360px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 32px;
}

.below-actions.single {
    grid-template-columns: 1fr;
}

.below-actions a {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #edb55c;
    border-radius: 999px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
}

.ranking-card {
    margin: 48px 0 26px;
    padding: 24px 18px;
    background: rgba(255, 255, 255, .94);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(80, 0, 0, .25);
}

.ranking-card h1 {
    margin: 0;
    color: #d51620;
    text-align: center;
    font-size: 30px;
}

.ranking-sub {
    margin: 8px 0 18px;
    color: #8f6868;
    text-align: center;
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 42px 1fr 64px 64px;
    gap: 8px;
    align-items: center;
    min-height: 48px;
    padding: 8px 10px;
    background: #fff6f0;
    border-radius: 10px;
}

.ranking-row.top {
    background: linear-gradient(90deg, #fff1ba, #fff8ea);
}

.rank-no {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #d51620;
    border-radius: 50%;
    font-weight: 900;
}

.rank-name {
    font-weight: 800;
}

.rank-score {
    color: #d51620;
    font-weight: 900;
}

.rank-time {
    color: #8a736d;
    font-size: 13px;
}

@keyframes startFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes startGlow {
    from {
        box-shadow: 0 10px 26px rgba(86, 20, 0, .3), 0 0 0 0 rgba(255, 230, 118, .28), inset 0 0 0 1px rgba(255, 255, 255, .78);
    }

    to {
        box-shadow: 0 14px 34px rgba(86, 20, 0, .42), 0 0 24px rgba(255, 230, 118, .75), 0 0 0 10px rgba(255, 230, 118, .2), inset 0 0 0 1px rgba(255, 255, 255, .86);
    }
}

@keyframes shineSweep {
    0% {
        transform: translateX(-46%);
    }

    58%,
    100% {
        transform: translateX(46%);
    }
}

@keyframes ringPulse {
    0% {
        transform: scale(.98);
        opacity: .72;
    }

    100% {
        transform: scale(1.14);
        opacity: 0;
    }
}

@media (max-width: 390px) {
    .phone-stage {
        padding-left: 14px;
        padding-right: 14px;
    }

    .home-only {
        padding-top: clamp(430px, 51vh, 610px);
    }

    .start-button {
        min-width: 204px;
        min-height: 60px;
        padding: 12px 30px;
        font-size: 21px;
    }

    .chance {
        margin-top: 14px;
        font-size: 20px;
    }

    .quiz-card-shell {
        min-height: auto;
        padding: 88px 16px 20px;
    }

    .type-tab {
        min-width: 88px;
        min-height: 36px;
        font-size: 14px;
    }

    .count {
        font-size: 16px;
    }

    .count em {
        font-size: 20px;
    }

    .quiz-question {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .answer-option span {
        min-height: 48px;
        padding: 11px 12px;
        font-size: 15px;
    }

    .answer-feedback {
        font-size: 14px;
        margin-top: 14px;
    }

    .quiz-confirm {
        min-height: 48px;
        font-size: 17px;
    }

    .lottery-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .lottery-heading h1 {
        font-size: 27px;
    }

    .wheel-wrap {
        --wheel-size: min(84vw, 318px);
    }

    .wheel-prize {
        width: 78px;
        min-height: 84px;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(var(--wheel-size) * -.31)) rotate(var(--angle-back));
    }

    .wheel-prize img {
        width: 34px;
        height: 34px;
    }

    .wheel-prize strong {
        max-width: 74px;
        font-size: 13px;
    }

    .wheel-prize span {
        max-width: 74px;
        font-size: 11px;
    }

    .wheel-core {
        width: 86px;
        height: 86px;
    }

    .lottery-spin {
        min-height: 54px;
        font-size: 20px;
    }

    .result-modal {
        padding-left: 18px;
        padding-right: 18px;
    }
}
