:root {
    --red: #c4161c;
    --yellow: #ffd43b;
    --cream: #fff8e8;
    --dark: #1f1f1f;
    --muted: #6f6f6f;
    --white: #ffffff;
    --border: rgba(196, 22, 28, 0.08);
    --shadow: 0 18px 40px rgba(196, 22, 28, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 212, 59, 0.55), transparent 30%),
        linear-gradient(180deg, #fff6dc 0%, #fffefb 42%, #fff4f4 100%);
    color: var(--dark);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

.app,
.page-shell {
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px;
}

.hero {
    padding: 10px 2px 20px;
}

.hero-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(196, 22, 28, 0.1);
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero h1,
.page-header h1 {
    margin: 14px 0 10px;
    font-size: 31px;
    line-height: 1.08;
}

.hero-price {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--red);
}

.hero-copy,
.page-header p,
.helper-text,
.countdown-caption,
.session-info,
.quota-info,
.product-description,
.promo-body p,
.result-card p {
    color: var(--muted);
    line-height: 1.6;
}

.card {
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.section-title span {
    font-size: 18px;
    font-weight: 800;
}

.section-title small {
    color: var(--muted);
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.stack-form input[type="text"],
.stack-form input[type="tel"],
.stack-form input[type="password"],
.stack-form input[type="number"],
.stack-form input[type="datetime-local"],
.stack-form select,
.stack-form textarea {
    width: 100%;
    border: 1px solid rgba(31, 31, 31, 0.1);
    border-radius: 16px;
    padding: 14px 16px;
    font: inherit;
    background: #fffdfa;
}

.stack-form textarea {
    min-height: 110px;
    resize: vertical;
}

.checkbox-row {
    grid-template-columns: 20px 1fr;
    align-items: start;
}

.checkbox-row input {
    margin-top: 4px;
}

.user-card h2,
.product-content h2,
.result-card h1,
.promo-body h2 {
    margin: 0 0 8px;
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff8e8 0%, #fff3bf 100%);
    padding: 14px;
    margin-bottom: 16px;
}

.product-image-wrap img {
    width: 100%;
    border-radius: 18px;
}

.product-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--red);
    color: white;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.normal-price {
    color: #9f9f9f;
    text-decoration: line-through;
    font-weight: 700;
}

.sale-price {
    color: var(--red);
    font-size: 28px;
    font-weight: 800;
}

.countdown-number,
.display-countdown {
    font-size: 42px;
    font-weight: 800;
    color: var(--red);
    letter-spacing: 1px;
    text-align: center;
    margin: 10px 0 12px;
}

.buy-button,
.secondary-button {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

.buy-button {
    background: linear-gradient(135deg, #cf2027 0%, #a90d12 100%);
    color: white;
    box-shadow: 0 12px 24px rgba(196, 22, 28, 0.25);
}

.buy-button:disabled {
    background: #d6d6d6;
    box-shadow: none;
    color: #8b8b8b;
}

.buy-button.is-live {
    animation: pulse 1.4s infinite;
}

.buy-button.is-active {
    background: #c4161c;
    color: #fff;
    animation: pulseBuy 1s infinite;
}

.quota-info {
    margin: 4px 0 0;
    font-size: 14px;
    text-align: center;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.secondary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: white;
    border: 1px solid rgba(196, 22, 28, 0.14);
    color: var(--red);
}

.outline-button {
    cursor: pointer;
}

.form-message {
    min-height: 20px;
    margin: 0;
    color: var(--red);
    font-size: 14px;
}

.promo-card {
    padding: 12px;
}

.promo-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.promo-body {
    padding: 12px 8px 4px;
}

.promo-section {
    margin-top: 22px;
    padding-bottom: 30px;
}

.section-header {
    margin-bottom: 12px;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
}

.section-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.promo-banner-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.promo-banner-card,
.default-promo-card {
    display: block;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
}

.promo-banner-card img {
    display: block;
    width: 100%;
    height: auto;
}

.promo-banner-content {
    padding: 14px 16px 16px;
}

.promo-banner-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.default-promo-card {
    padding: 18px;
    background: linear-gradient(135deg, #c4161c 0%, #8f0f14 100%);
    color: #ffffff;
}

.default-promo-card h3 {
    margin: 8px 0 4px;
    font-size: 22px;
    font-weight: 900;
}

.default-promo-card p {
    margin: 0 0 8px;
    color: inherit;
}

.default-promo-card ul {
    margin: 12px 0;
    padding-left: 18px;
}

.promo-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--yellow);
    color: #1f1f1f;
    font-size: 11px;
    font-weight: 800;
}

.promo-note {
    font-weight: 700;
}

.survey-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.survey-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
}

.survey-dialog {
    position: relative;
    width: min(100%, 430px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    border-radius: 24px;
    background: #fffefb;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
    padding: 22px 18px 18px;
}

.survey-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: 0;
    background: rgba(196, 22, 28, 0.08);
    color: var(--red);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.survey-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.15;
}

.survey-header p,
.survey-hint {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.survey-form {
    margin-top: 18px;
}

.survey-group {
    display: grid;
    gap: 10px;
}

.survey-question {
    font-size: 15px;
    font-weight: 800;
    color: var(--dark);
}

.survey-question small {
    font-weight: 600;
    color: var(--muted);
}

.survey-options {
    display: grid;
    gap: 10px;
}

.survey-options.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.survey-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(31, 31, 31, 0.08);
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.survey-options input {
    flex: 0 0 auto;
}

.survey-dependent {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.survey-dependent span {
    font-size: 14px;
    font-weight: 700;
}

.survey-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.survey-modal .form-message {
    min-height: 22px;
    text-align: center;
}

.winner-row,
.schedule-row {
    display: grid;
    gap: 4px;
    padding: 14px 0;
}

.winner-row + .winner-row,
.schedule-row + .schedule-row {
    border-top: 1px solid rgba(31, 31, 31, 0.08);
}

.schedule-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.schedule-row span,
.winner-row span,
.winner-row small {
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 212, 59, 0.25);
    color: #6d5400;
    font-size: 12px;
}

.result-card {
    text-align: center;
    padding: 26px 20px;
}

.result-card.success {
    background: linear-gradient(180deg, #fffefc 0%, #fff7df 100%);
}

.claim-code-box {
    margin: 18px auto;
    width: fit-content;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(196, 22, 28, 0.08);
    color: var(--red);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
}

.display-shell {
    min-height: 100vh;
    padding: 28px;
    color: white;
    background: linear-gradient(140deg, #9d0a0f 0%, #c4161c 48%, #efb414 100%);
}

.display-hero h1 {
    margin: 0;
    font-size: 48px;
}

.display-hero p {
    margin: 8px 0 28px;
    font-size: 22px;
    opacity: 0.9;
}

.display-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.display-panel {
    border-radius: 28px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
}

.panel-label {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.78;
}

.display-panel strong {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.display-winner {
    padding: 12px 0;
}

.display-winner + .display-winner {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.running-text {
    overflow: hidden;
    white-space: nowrap;
    margin-top: 28px;
    font-weight: 700;
}

.running-text span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 18s linear infinite;
}

.text-link {
    color: var(--red);
    font-weight: 700;
}

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

@keyframes pulseBuy {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 20px rgba(196, 22, 28, 0.25);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 14px 28px rgba(196, 22, 28, 0.35);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 10px 20px rgba(196, 22, 28, 0.25);
    }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@media (max-width: 480px) {
    .actions-grid,
    .display-grid {
        grid-template-columns: 1fr;
    }

    .survey-options.two-columns,
    .survey-actions {
        grid-template-columns: 1fr;
    }

    .display-hero h1 {
        font-size: 34px;
    }

    .display-shell {
        padding: 18px;
    }
}
