:root {
    --sky: #eaf8ff;
    --sky-deep: #c9ebfb;
    --ink: #19324a;
    --muted: #60778b;
    --blue: #287dcc;
    --blue-deep: #15599a;
    --gold: #e7ad43;
    --line: rgba(42, 105, 151, .17);
    --white: rgba(255, 255, 255, .91);
    --shadow: 0 24px 65px rgba(34, 101, 145, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 2%, rgba(255,255,255,.98) 0 9%, transparent 27%),
        radial-gradient(circle at 90% 9%, rgba(255,255,255,.8) 0 5%, transparent 22%),
        linear-gradient(180deg, var(--sky) 0%, #f8fcff 48%, #edf8ff 100%);
    font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
    min-height: 100vh;
    font-size: 16px;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 13rem;
    border-radius: 50%;
    background: rgba(255,255,255,.72);
    filter: blur(2px);
}
body::before { left: -12rem; top: 33rem; transform: rotate(8deg); }
body::after { right: -14rem; top: 16rem; transform: rotate(-10deg); }

a { color: inherit; }
.topbar {
    height: 76px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-gem {
    display: grid; place-items: center; width: 40px; height: 40px;
    color: white; border-radius: 50% 50% 44% 56%;
    background: linear-gradient(145deg, #75c8ef, #287dcc);
    box-shadow: 0 6px 18px rgba(29, 111, 178, .24);
}
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .12em; }
.brand small { font: 700 10px/1.5 Georgia, serif; letter-spacing: .13em; color: var(--muted); }
.home-link { text-decoration: none; color: var(--muted); font-weight: 700; }
.home-link:hover { color: var(--blue); }

main { width: min(1050px, calc(100% - 36px)); margin: 24px auto 72px; }
.intro { display: grid; grid-template-columns: 1fr 330px; align-items: end; gap: 52px; padding: 58px 42px 42px; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .75rem; font-weight: 900; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 5.6rem); line-height: .98; letter-spacing: -.055em; }
h1 span { color: var(--blue); }
.lead { max-width: 650px; margin: 26px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.9; }
.reward-card {
    position: relative; overflow: hidden; padding: 28px; border: 1px solid rgba(255,255,255,.8);
    border-radius: 30px 30px 8px 30px; color: white;
    background: linear-gradient(145deg, #328edc 0%, #15599a 100%); box-shadow: var(--shadow);
}
.reward-card::after { content: "✦"; position: absolute; right: -10px; bottom: -36px; color: rgba(255,255,255,.12); font-size: 8rem; }
.reward-icon { display: block; margin-bottom: 20px; font-size: 2.4rem; }
.reward-card small, .reward-card strong { display: block; }
.reward-card small { opacity: .74; margin-bottom: 4px; }
.reward-card strong { font-family: Georgia, "Noto Serif TC", serif; font-size: 1.85rem; }
.reward-card p { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.2); opacity: .84; }

.event-strip {
    display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,.68);
    border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 30px rgba(49, 114, 158, .07);
}
.event-strip div { padding: 21px 25px; }
.event-strip div + div { border-left: 1px solid var(--line); }
.event-strip small, .event-strip strong { display: block; }
.event-strip small { margin-bottom: 6px; color: var(--muted); font-size: .78rem; }
.event-strip strong { font-size: .98rem; }

.form-card, .success-panel {
    margin-top: 28px; padding: 42px; border-radius: 30px; background: var(--white);
    border: 1px solid rgba(255,255,255,.95); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.form-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
h2 { margin: 0; font: 700 clamp(1.8rem, 4vw, 2.8rem)/1.25 Georgia, "Noto Serif TC", serif; }
.date-chip { min-width: 158px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 16px; background: #f5fbff; }
.date-chip small, .date-chip strong { display: block; }
.date-chip small { color: var(--muted); font-size: .72rem; }
.date-chip strong { margin-top: 3px; color: var(--blue-deep); }

.error-box { margin-bottom: 28px; padding: 18px 22px; border: 1px solid #f0aaa5; border-radius: 14px; background: #fff3f2; color: #8c3029; }
.error-box ul { margin: 8px 0 0; padding-left: 22px; line-height: 1.7; }
fieldset { margin: 0; padding: 30px 0; border: 0; border-top: 1px solid var(--line); }
legend { padding: 0 18px 0 0; font-size: 1.14rem; font-weight: 900; }
legend span { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 8px; border-radius: 12px; background: var(--blue); color: white; font-size: .85rem; }
.fieldset-note { margin: 14px 0 18px; color: var(--muted); line-height: 1.7; }
.field-grid { display: grid; gap: 20px; }
.two-columns { grid-template-columns: 1fr 1fr; }
.floor-grid { grid-template-columns: repeat(2, 1fr); }
.floor-grid label:last-child { grid-column: 1 / -1; }
label { color: #29465e; font-weight: 800; }
.required, .optional { margin-left: 8px; font-size: .72rem; }
.required { color: var(--blue); }
.optional { color: var(--muted); font-weight: 600; }
.forum-link { color: inherit; text-decoration: none; text-underline-offset: 4px; }
.forum-link:hover, .forum-link:focus-visible { color: var(--primary); text-decoration: underline; }
.forum-link span { margin-left: 5px; font-size: .82em; }
input, textarea {
    width: 100%; margin-top: 9px; padding: 14px 15px; border: 1px solid #bfd4e3; border-radius: 12px;
    background: #fff; color: var(--ink); font: inherit; outline: none; transition: .18s ease;
}
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(40,125,204,.12); }
label small { display: block; margin-top: 7px; color: var(--muted); font-size: .78rem; font-weight: 500; }
.lookup-status { display:block; min-height:20px; margin-top:7px; color:#17805e; font-size:.78rem; font-weight:800; }
.lookup-status.warning { color:#a3423b; }
.confirm-row { display: flex; align-items: flex-start; gap: 12px; padding: 18px; border-radius: 14px; background: #eef8ff; line-height: 1.65; }
.confirm-row input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); }
.submit-button, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 52px;
    border: 0; border-radius: 14px; padding: 0 24px; font: 800 1rem/1 "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.submit-button { width: 100%; margin-top: 18px; color: white; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); box-shadow: 0 12px 25px rgba(31, 108, 177, .22); }
.submit-button:disabled { cursor:not-allowed; opacity:.48; transform:none; box-shadow:none; }
.submit-button:hover, .button:hover { transform: translateY(-2px); }
.submit-button span { margin-left: auto; font-size: 1.35rem; }
.submit-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .82rem; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.success-panel { text-align: center; }
.success-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%; background: #dff7ec; color: #17805e; font-size: 2rem; font-weight: 900; }
.success-panel > p:not(.eyebrow):not(.copy-status) { max-width: 660px; margin: 16px auto 26px; color: var(--muted); line-height: 1.8; }
.success-panel label { display: block; max-width: 680px; margin: 0 auto; text-align: left; }
.success-panel textarea { min-height: 270px; resize: vertical; line-height: 1.7; }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.button.primary { background: var(--blue); color: white; }
.button.discord { background: #5865f2; color: white; }
.button.ghost { background: #eef5f9; color: var(--ink); }
.copy-status { min-height: 24px; color: #17805e; font-weight: 800; }

.steps { display: grid; grid-template-columns: 250px 1fr; gap: 40px; margin: 64px 8px 34px; }
.steps ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.steps li { display: flex; gap: 13px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.55); }
.steps li > span { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); font-weight: 900; }
.steps p { margin: 0; color: var(--muted); line-height: 1.55; }
.steps strong { display: block; margin-bottom: 5px; color: var(--ink); }
.notice { display: flex; gap: 24px; padding: 22px 26px; border-left: 4px solid var(--gold); border-radius: 4px 16px 16px 4px; background: rgba(255,255,255,.67); }
.notice strong { flex: 0 0 auto; }
.notice p { margin: 0; color: var(--muted); line-height: 1.7; }
footer { max-width: 1050px; margin: 0 auto; padding: 24px 18px 40px; display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
footer a { text-decoration: none; font-weight: 800; }

@media (max-width: 760px) {
    .topbar { height: 68px; padding: 0 18px; }
    main { width: min(100% - 24px, 1050px); margin-top: 8px; }
    .intro { grid-template-columns: 1fr; gap: 28px; padding: 40px 10px 28px; }
    .reward-card { max-width: none; }
    .event-strip { grid-template-columns: 1fr; }
    .event-strip div + div { border-left: 0; border-top: 1px solid var(--line); }
    .form-card, .success-panel { padding: 27px 20px; border-radius: 22px; }
    .form-heading { align-items: flex-start; flex-direction: column; }
    .date-chip { width: 100%; }
    .two-columns, .floor-grid { grid-template-columns: 1fr; }
    .floor-grid label:last-child { grid-column: auto; }
    .steps { grid-template-columns: 1fr; gap: 24px; margin-top: 48px; }
    .steps ol { grid-template-columns: 1fr; }
    .notice { flex-direction: column; gap: 8px; }
}

@media (max-width: 440px) {
    h1 { font-size: 2.65rem; }
    .home-link { font-size: .85rem; }
    .brand small { display: none; }
    .success-actions { flex-direction: column; }
    .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
