:root {
    --ink: #1d1c1a;
    --muted: #716d66;
    --paper: #f2efe8;
    --paper-deep: #e8e3da;
    --coral: #d97757;
    --line: rgba(29, 28, 26, .16);
    --white: #fffdf8;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(rgba(29, 28, 26, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(29, 28, 26, .025) 1px, transparent 1px),
        var(--paper);
    background-size: 32px 32px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.site-header, footer {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 5vw, 80px);
}
.site-header { border-bottom: 1px solid var(--line); }
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 1.8px;
}
.brand-mark {
    width: 18px;
    height: 18px;
    background: var(--ink);
    border-radius: 50% 50% 8% 50%;
    transform: rotate(45deg);
}
.edition, .eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 2px; }
.experience {
    min-height: calc(100vh - 138px);
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(500px, 1.15fr);
}
.intro {
    padding: clamp(68px, 9vw, 140px) clamp(32px, 7vw, 110px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line);
}
.eyebrow { margin: 0 0 30px; }
h1 {
    margin: 0;
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: clamp(54px, 6.4vw, 102px);
    line-height: .98;
    font-weight: 400;
    letter-spacing: 0;
}
h1 em { color: var(--coral); font-weight: 400; }
.lead { margin: 32px 0 46px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.prize-list { display: flex; gap: 18px; flex-wrap: wrap; }
.prize-list span { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.prize-list i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }

.draw-stage {
    min-height: 680px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    isolation: isolate;
}
.halo { position: absolute; border: 1px solid var(--line); border-radius: 50%; z-index: -1; }
.halo-one { width: min(62vw, 740px); aspect-ratio: 1; }
.halo-two { width: min(48vw, 570px); aspect-ratio: 1; border-style: dashed; animation: slow-spin 50s linear infinite; }
.draw-core {
    --prize-color: var(--ink);
    width: clamp(210px, 22vw, 286px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--white);
    background: var(--ink);
    box-shadow: 0 30px 80px rgba(29, 28, 26, .22), inset 0 0 0 1px rgba(255,255,255,.1);
    transition: transform .6s ease, background .5s ease, box-shadow .5s ease;
}
.draw-core strong { font: 400 clamp(54px, 6vw, 82px)/1 Georgia, serif; letter-spacing: 0; }
.draw-core .core-label { font-size: 9px; letter-spacing: 2px; opacity: .52; }
.draw-core #coreCaption { font-size: 12px; letter-spacing: 1px; opacity: .72; }
.draw-core.is-ready { transform: scale(1.035); box-shadow: 0 34px 100px rgba(217, 119, 87, .26); }
.draw-core.is-drawing { animation: pulse 1s ease-in-out infinite; }
.draw-core.is-won { background: var(--prize-color); transform: scale(1.06); }
.draw-core.is-won strong { font-size: clamp(37px, 4vw, 56px); }

.action-panel {
    width: min(100%, 510px);
    min-height: 128px;
    margin-top: 54px;
    position: relative;
}
.step { animation: rise .45s ease both; }
.step[hidden] { display: none; }
label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 10px; }
.field-row { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--ink); }
input {
    width: 100%; min-width: 0; height: 50px; border: 0; outline: 0; padding: 0 12px 0 0;
    color: var(--ink); background: transparent; font-size: 17px;
}
input::placeholder { color: #a29d94; }
.field-row > button {
    border: 0; border-radius: 4px 4px 0 0; padding: 0 20px; color: var(--white); background: var(--ink);
    font-size: 13px; cursor: pointer; transition: background .2s, opacity .2s;
}
.field-row > button:hover { background: var(--coral); }
button:disabled { cursor: wait; opacity: .6; }
.microcopy { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.step-heading { display: flex; justify-content: space-between; align-items: baseline; }
.text-button { border: 0; padding: 0; color: var(--muted); background: none; font-size: 11px; cursor: pointer; }
.code-row input { letter-spacing: 8px; font-size: 20px; }
.draw-action { text-align: center; }
.draw-action p { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.primary-action {
    width: 100%; height: 54px; border: 0; border-radius: 4px; color: var(--white); background: var(--coral);
    font-weight: 650; cursor: pointer; box-shadow: 0 12px 34px rgba(217,119,87,.25);
}
.primary-action:hover { filter: brightness(.94); }
.result { text-align: center; }
.result-kicker { margin: 0 0 5px; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.result h2 { margin: 0; font: 400 46px/1.15 Georgia, serif; }
.result > p:not(.result-kicker) { margin: 10px 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.next-time { display: block; color: var(--muted); font-size: 11px; }
.notice { min-height: 20px; margin-top: 13px; text-align: center; color: #527365; font-size: 12px; }
.notice.error { color: #a2483a; }
footer { height: 62px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--ink); }

@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(.96); filter: brightness(1.35); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 900px) {
    .experience { grid-template-columns: 1fr; }
    .intro { min-height: 500px; border-right: 0; border-bottom: 1px solid var(--line); }
    .draw-stage { min-height: 680px; }
    .halo-one { width: 740px; }
    .halo-two { width: 570px; }
}
@media (max-width: 560px) {
    .site-header, footer { padding-inline: 20px; }
    .edition { display: none; }
    .experience { min-height: auto; }
    .intro { min-height: 430px; padding: 60px 24px; }
    h1 { font-size: 58px; }
    .lead { margin: 24px 0 34px; font-size: 15px; }
    .draw-stage { min-height: 650px; padding-inline: 20px; }
    .draw-core { width: 218px; }
    .action-panel { margin-top: 46px; }
    .field-row > button { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
