/* CASCADE '26 — brochure theme. Pure CSS (no images) so it loads fast. */

:root {
    --space-1: #05030a;
    --space-2: #1a0509;
    --ember: #ff4d2e;
    --ember-glow: rgba(255, 90, 40, 0.55);
    --red: #b3121d;
    --red-dark: #7f0c14;
    --red-soft: rgba(179, 18, 29, 0.08);
    --gold: #e6b65c;
    --cream: #f6eddb;
    --cream-2: #fbf6ea;
    --cream-line: #d9c9a6;
    --ink: #1e1410;
    --muted: #5c4a3c;
    --success: #1f6b3a;
    --error: #c81e1e;
    --radius: 10px;
    --font-display: 'Cinzel', 'Times New Roman', serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: 34px 12px 56px;
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.45;
    min-height: 100vh;
    background-color: var(--space-1);
    background-image:
        /* rim-lit planet at the bottom */
        radial-gradient(ellipse 130% 55% at 50% 118%, #3a0d10 0%, #1c0608 45%, transparent 62%),
        radial-gradient(ellipse 120% 40% at 50% 104%, rgba(255, 96, 48, 0.85) 0%, rgba(255, 60, 30, 0.35) 22%, transparent 48%),
        /* nebula glows */
        radial-gradient(ellipse 60% 40% at 15% 10%, rgba(140, 20, 30, 0.55), transparent 70%),
        radial-gradient(ellipse 50% 35% at 88% 22%, rgba(120, 10, 40, 0.5), transparent 70%),
        radial-gradient(ellipse 80% 50% at 50% 55%, rgba(60, 8, 20, 0.6), transparent 75%),
        /* star fields (three densities, drifting sizes) */
        radial-gradient(1px 1px at 12% 18%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 33% 7%, #fff 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 71% 14%, #ffe9d6 60%, transparent 100%),
        radial-gradient(1px 1px at 88% 41%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 8% 62%, #fff 60%, transparent 100%),
        radial-gradient(2px 2px at 54% 33%, #fff2e0 60%, transparent 100%),
        radial-gradient(1px 1px at 41% 48%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 63% 71%, #fff 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 23% 80%, #ffd9c2 60%, transparent 100%),
        radial-gradient(1px 1px at 93% 76%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 47% 90%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 77% 57%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 5% 36%, #fff 60%, transparent 100%),
        radial-gradient(1.5px 1.5px at 60% 4%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 96% 8%, #fff 60%, transparent 100%),
        radial-gradient(1px 1px at 28% 30%, #fff 60%, transparent 100%),
        linear-gradient(180deg, #07030c 0%, #150407 55%, #22070a 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ---------- Page header (on the dark sky) ---------- */
.page-head {
    max-width: 680px;
    margin: 0 auto 18px;
    text-align: center;
    color: #f2e6d3;
}
.page-head .presents {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #d9c5a5;
    opacity: 0.9;
}
.page-head .title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 40px;
    letter-spacing: 0.28em;
    margin: 6px 0 4px 0.28em; /* offset the trailing letter-spacing */
    color: #fff;
    text-shadow:
        0 0 10px var(--ember-glow),
        0 0 28px rgba(255, 70, 30, 0.45),
        0 0 60px rgba(255, 40, 20, 0.3);
}
.page-head .tagline {
    font-family: var(--font-display);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #cdb89b;
    margin: 0;
}
.page-head .form-name {
    display: inline-block;
    margin-top: 14px;
    padding: 5px 14px;
    border: 1px solid rgba(230, 182, 92, 0.55);
    border-radius: 999px;
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

/* ---------- Brochure frame: chamfered metal edge + red side bars + title plaque ---------- */
.frame-wrap {
    position: relative;
    max-width: 700px;
    margin: 34px auto 0;
    filter: drop-shadow(0 0 14px rgba(255, 80, 40, 0.28)) drop-shadow(0 22px 40px rgba(0, 0, 0, 0.65));
}
.frame {
    --cut: 16px;
    position: relative;
    padding: 7px;
    clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                       calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
    background: linear-gradient(180deg, #e9e2d3 0%, #b9b0a0 18%, #f1ece0 40%, #a89f8f 62%, #ddd5c4 82%, #8f857a 100%);
}
/* segmented red side bars (like the brochure's edge tabs) */
.frame::before, .frame::after {
    content: "";
    position: absolute;
    top: 34px; bottom: 34px;
    width: 7px;
    background: linear-gradient(180deg, #e0202b, #b3121d 50%, #8f0d16);
    z-index: 2;
    pointer-events: none;
}
.frame::before { left: 0; }
.frame::after  { right: 0; }
.card {
    --cut: 13px;
    position: relative;
    clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                       calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
    background:
        radial-gradient(ellipse 80% 30% at 50% 0%, rgba(255,255,255,0.55), transparent 70%),
        linear-gradient(180deg, #f8f0de, #f3e8d2);
}
/* red title plaque overlapping the top edge (lives outside the clipped frame) */
.plaque {
    position: absolute;
    z-index: 3;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 60px);
    padding: 9px 30px 8px;
    clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px),
                       calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
    background: linear-gradient(180deg, #e3222c, #a80f19);
    color: #fff;
    font-family: var(--font-display);
    font-size: 20px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}

.header {
    padding: 44px 30px 14px;
    text-align: center;
    border-bottom: 1px solid var(--cream-line);
}
.header .subtitle { color: var(--muted); font-size: 13px; margin: 0; }
.req { color: var(--error); }

/* ---------- Event topic banner ---------- */
.event-banner {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 14px 30px;
    background: linear-gradient(90deg, #7f0c14, #b3121d 60%, #8f1018);
    color: #fff5e8;
    border-bottom: 1px solid #5c0a10;
}
.event-banner.visible { display: flex; }
.event-banner .eb-main { flex: 1; min-width: 0; }
.event-banner .eb-tag {
    font-family: var(--font-display);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}
.event-banner .eb-name { font-size: 16px; font-weight: 700; line-height: 1.3; margin-top: 3px; }
.event-banner .eb-fee { font-size: 11.5px; text-align: right; flex-shrink: 0; color: #f3d9c9; }
.event-banner .eb-fee strong { display: block; font-size: 16px; color: #fff; font-weight: 700; }
.event-banner .eb-fee strong.closed { color: #ffb4a8; }
.btn-change {
    flex-shrink: 0;
    margin: 0; width: auto;
    padding: 7px 12px;
    font-size: 12.5px; font-weight: 600; font-family: var(--font-body);
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-change:hover { background: rgba(255,255,255,0.22); }

.body { padding: 6px 30px 28px; }

/* ---------- Alerts ---------- */
.alert { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 14px 0 0; }
.alert-success { background: #e6f4ea; color: var(--success); border: 1px solid #a9d6b6; }
.alert-error { background: #fbe6e6; color: #8a1414; border: 1px solid #efb3b3; }

/* ---------- Sections ---------- */
.section { padding-top: 20px; }
.section + .section { border-top: 1px solid var(--cream-line); margin-top: 20px; }
.section-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--red);
}
.section-title .num {
    font-family: var(--font-body);
    font-size: 11px; font-weight: 700;
    color: #fff; background: var(--red);
    border-radius: 999px;
    min-width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
    letter-spacing: 0;
}
.section-desc { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }

/* ---------- Fields ---------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 13px; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
input[type=text], input[type=email], input[type=tel], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c9b48f;
    border-radius: 6px;
    font-size: 14px; font-family: inherit;
    background: var(--cream-2);
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
input[type=file] { font-size: 13px; margin-top: 2px; }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(179, 18, 29, 0.15);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.phone {
    display: flex; align-items: stretch;
    border: 1px solid #c9b48f; border-radius: 6px;
    background: var(--cream-2);
    transition: border-color .15s, box-shadow .15s;
}
.phone:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(179,18,29,0.15); }
.phone.invalid { border-color: var(--error) !important; }
.phone-prefix {
    display: flex; align-items: center;
    padding: 0 10px 0 11px;
    font-size: 14px; font-weight: 600; color: var(--muted);
    border-right: 1px solid #d9c9a6;
    user-select: none;
}
.phone input[type=tel] { border: 0; background: transparent; box-shadow: none !important; flex: 1; min-width: 0; }
.field-error { color: var(--error); font-size: 11.5px; margin-top: 3px; }
.invalid { border-color: var(--error) !important; }
.hint { color: var(--muted); font-size: 12px; }
#other-year-wrap { display: none; }

.check {
    display: flex; align-items: flex-start; gap: 9px;
    margin-top: 12px; padding: 10px 12px;
    border: 1px solid #c9b48f; border-radius: 6px;
    font-size: 13px; font-weight: 500;
    cursor: pointer; background: var(--cream-2);
}
.check input { margin: 3px 0 0; accent-color: var(--red); }
.check:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.check.invalid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(200,30,30,0.12); }
#form_errors { margin: 16px 0 0; }
#form_errors ul { margin: 6px 0 0; padding-left: 18px; }
#form_errors li { margin: 2px 0; }
.check a { color: var(--red); }

/* ---------- Event picker ---------- */
.filter-group { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.filter-chip {
    margin: 0; width: auto;
    padding: 6px 13px;
    border: 1px solid #c9b48f; border-radius: 999px;
    background: var(--cream-2); color: #4a3a2c;
    font-size: 12.5px; font-weight: 600; font-family: inherit;
    cursor: pointer;
}
.filter-chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.event-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.event-option {
    display: flex; align-items: flex-start; gap: 10px;
    border: 1px solid #c9b48f; border-radius: 8px;
    padding: 11px 12px;
    cursor: pointer; font-size: 13.5px;
    background: var(--cream-2);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.event-option:hover { border-color: var(--red); }
.event-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.event-option input { margin-top: 3px; accent-color: var(--red); }
.event-option .ev-label { display: flex; flex-direction: column; }
.event-option .ev-tag { font-family: var(--font-display); font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; }
.event-option .ev-name { font-weight: 600; margin-top: 1px; }
.event-option .ev-fee { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--success); }
.event-option .ev-fee-closed { color: var(--error); }
.event-option.event-closed { opacity: 0.55; cursor: not-allowed; }

/* ---------- Payment ---------- */
.qr-wrap { display: flex; justify-content: center; margin: 10px 0 4px; }
.qr-wrap img {
    max-width: 280px; width: 100%; height: auto;
    border: 1px solid #c9b48f; border-radius: 8px; padding: 6px; background: #fff;
}

/* ---------- Submit ---------- */
.btn-primary {
    margin-top: 22px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(180deg, #d31a26, #a30f19);
    color: #fff;
    border: 1px solid #6d0a11;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 14px; font-weight: 700;
    letter-spacing: 0.16em; text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(179, 18, 29, 0.35);
    transition: transform .1s, box-shadow .15s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(179, 18, 29, 0.45); }
.btn-primary:active { transform: translateY(1px); }
.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 16px; }
.foot a { color: var(--red); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Terms page ---------- */
.terms .body h2 {
    font-family: var(--font-display);
    font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--red);
    margin: 26px 0 8px; padding-bottom: 6px;
    border-bottom: 1px solid var(--cream-line);
}
.terms .body h3 { font-size: 14px; margin: 16px 0 4px; }
.terms .body ul { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }
.terms .body li { margin-bottom: 4px; }
.terms .body code { background: var(--cream-2); border: 1px solid var(--cream-line); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.terms .note { background: var(--red-soft); border: 1px solid #e3b0b4; border-radius: 8px; padding: 12px 14px; font-size: 13px; margin-top: 18px; }
.terms .back-link { display: inline-block; margin-top: 26px; font-weight: 600; color: var(--red); text-decoration: none; }
.terms .back-link:hover { text-decoration: underline; }

/* ---------- Upload control ---------- */
.upload {
    position: relative;
    border: 1px solid #c9b48f;
    border-radius: 6px;
    background: var(--cream-2);
    padding: 14px 16px;
    transition: border-color .15s, background .15s, box-shadow .15s;
    cursor: pointer;
}
.upload input[type=file] {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; cursor: pointer; margin: 0;
}
.upload:hover, .upload.drag { border-color: var(--red); }
.upload.drag { background: #fff; box-shadow: 0 0 0 3px rgba(179,28,28,0.12); }
.upload.invalid { border-color: var(--error); }
.upload-idle { display: flex; align-items: center; gap: 12px; }
.upload-icon { flex-shrink: 0; color: var(--muted); }
.upload-text { flex: 1; font-size: 13.5px; color: var(--ink); }
.upload-cta { font-weight: 600; color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.upload-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.upload-done { display: none; align-items: center; gap: 12px; }
.upload.has-file { border-color: #b7c9b7; background: #f7faf7; }
.upload.has-file .upload-idle { display: none; }
.upload.has-file .upload-done { display: flex; }
.upload-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid #c9b48f; background: #fff; }
.upload-file-icon {
    width: 40px; height: 40px; border-radius: 4px;
    display: none; align-items: center; justify-content: center;
    border: 1px solid #c9b48f; background: #fff;
    color: var(--red); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
}
.upload-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.upload-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-size { font-size: 12px; color: var(--muted); }
.upload-change { font-size: 12.5px; font-weight: 600; color: var(--red); white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Review / OTP modal ---------- */
body.modal-open { overflow: hidden; }
.modal-backdrop {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(5, 2, 8, 0.78);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
    position: relative;
    width: 100%; max-width: 520px;
    max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    background: var(--cream);
    --cut: 12px;
    clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                       calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
    box-shadow: 0 0 0 4px #b9b0a0;
}
.modal-plaque {
    background: linear-gradient(180deg, #e3222c, #a80f19);
    color: #fff;
    font-family: var(--font-display);
    font-size: 16px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    text-align: center;
    padding: 12px 20px;
}
.modal-body { padding: 18px 22px 22px; overflow-y: auto; }
.modal-intro { margin: 0 0 12px; font-size: 13.5px; color: var(--ink); }
.review-highlight {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    margin-bottom: 12px;
}
.rh-item {
    background: #fff;
    border: 2px solid var(--red);
    border-radius: 8px;
    padding: 9px 12px;
}
.rh-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }
.rh-value { display: block; font-size: 14.5px; font-weight: 700; word-break: break-all; margin-top: 2px; }
.review-list { margin: 0; }
.rl-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--cream-line); font-size: 13px; }
.rl-row dt { margin: 0; color: var(--muted); font-weight: 600; }
.rl-row dd { margin: 0; font-weight: 500; word-break: break-word; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn-primary { margin-top: 0; flex: 1; padding: 11px; font-size: 13px; }
.btn-ghost {
    flex: 0 0 auto;
    padding: 11px 16px;
    background: transparent;
    color: var(--red);
    border: 1px solid var(--red);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.btn-ghost:hover { background: var(--red-soft); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
.otp-input-wrap { display: flex; justify-content: center; margin: 14px 0 6px; }
#otp_input {
    width: 232px;
    padding: 12px 10px;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 30px; font-weight: 700;
    letter-spacing: 12px;
    border: 2px dashed var(--red);
    border-radius: 10px;
    background: #fff;
    color: var(--red);
}
#otp_input:focus { border-style: solid; box-shadow: 0 0 0 4px rgba(179,18,29,0.15); }
.otp-resend { text-align: center; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.link-btn {
    background: none; border: 0; padding: 0; margin: 0;
    color: var(--red); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.link-btn:disabled { opacity: 0.5; text-decoration: none; }

/* honeypot (bots fill it; humans never see it) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Mobile (most participants register from a phone) ---------- */
@media (max-width: 600px) {
    body { padding: 18px 8px 32px; background-attachment: scroll; font-size: 16px; line-height: 1.5; }
    .page-head .presents { font-size: 10.5px; letter-spacing: 0.18em; }
    .page-head .title { font-size: 30px; letter-spacing: 0.16em; margin-left: 0.16em; }
    .page-head .tagline { font-size: 10.5px; letter-spacing: 0.1em; line-height: 1.5; padding: 0 10px; }
    .frame-wrap { margin-top: 26px; }
    .frame::before, .frame::after { width: 5px; top: 40px; bottom: 40px; }
    .plaque { font-size: 15px; padding: 9px 18px 8px; top: -18px; letter-spacing: 0.12em; }
    .header { padding: 34px 16px 10px; }
    .header .subtitle { font-size: 14px; }
    .event-banner { padding: 14px 16px; flex-wrap: wrap; }
    .event-banner .eb-main { flex-basis: 100%; }
    .event-banner .eb-tag { font-size: 11px; }
    .event-banner .eb-name { font-size: 17px; }
    .event-banner .eb-fee { text-align: left; font-size: 13px; }
    .event-banner .eb-fee strong { display: inline; margin-left: 6px; font-size: 17px; }
    .btn-change { margin-left: auto; padding: 8px 14px; font-size: 13.5px; }
    .body { padding: 4px 16px 20px; }
    .row-2 { grid-template-columns: 1fr; gap: 0; }

    /* Type & controls: 16px inputs (no iOS zoom), 44px+ tap targets */
    .section-title { font-size: 16px; }
    .section-title .num { width: 24px; height: 24px; font-size: 12px; }
    .section-desc, .hint, .alert { font-size: 14px; }
    label { font-size: 15px; margin: 14px 0 5px; }
    label .hint { font-size: 13px; margin-top: 2px; }
    input[type=text], input[type=email], input[type=tel], select, textarea { font-size: 16px; padding: 12px 12px; min-height: 46px; }
    textarea { min-height: 110px; }
    .phone-prefix { font-size: 16px; padding: 0 12px; }
    .field-error { font-size: 13.5px; margin-top: 4px; }
    .check { font-size: 15px; line-height: 1.45; }
    .check input { width: 20px; height: 20px; margin-top: 2px; }
    .filter-chip { flex: 1 1 auto; text-align: center; padding: 9px 10px; font-size: 13.5px; }
    .event-option { padding: 12px 12px; font-size: 15px; }
    .event-option .ev-tag { font-size: 10.5px; }
    .event-option .ev-fee { font-size: 13px; }
    .btn-primary { min-height: 50px; font-size: 15.5px; }
    .foot { font-size: 13px; }
    .qr-wrap img { width: min(72vw, 280px); height: auto; }

    /* Upload box stacks vertically on narrow screens */
    .upload { padding: 16px 14px; }
    .upload-idle { flex-direction: column; text-align: center; gap: 6px; }
    .upload-text { font-size: 15px; }
    .upload-sub { white-space: normal; font-size: 13px; }
    .upload-done { flex-wrap: wrap; }
    .upload-name { font-size: 14.5px; }

    /* Review / OTP */
    .review-highlight { grid-template-columns: 1fr; }
    .rh-value { font-size: 16px; }
    .rl-row { grid-template-columns: 1fr; gap: 2px; font-size: 14px; }
    .modal-body { padding: 14px 16px 18px; }
    .modal-intro { font-size: 14.5px; }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn-primary { width: 100%; }
    #otp_input { width: 100%; max-width: 260px; font-size: 30px; letter-spacing: 10px; }
    .otp-resend { font-size: 14px; }
}

/* ---------- Accounts: sign in, sign up, portal ---------- */
.alert.good { background: #eef7f0; border: 1px solid #b7c9b7; color: #1f4d30; }
.alert.bad { background: #fdeceb; border: 1px solid #e3b0b4; color: #8f1f1f; }

.verify-row { display: flex; gap: 8px; align-items: stretch; }
.verify-row > .phone, .verify-row > input { flex: 1; min-width: 0; }
.btn-verify {
    flex-shrink: 0; padding: 0 16px; min-height: 44px;
    background: var(--cream-2); color: var(--red);
    border: 1px solid var(--red); border-radius: 8px;
    font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.btn-verify:hover { background: var(--red); color: #fff; }
.btn-verify:disabled { opacity: .6; cursor: default; }

.verify-panel { display: none; margin-top: 10px; padding: 12px 14px; background: var(--red-soft); border: 1px solid #e3b0b4; border-radius: 8px; }
.verify-panel.open { display: block; }
.verify-panel p { margin: 0 0 8px; }

.verified-tag { display: none; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--success); }
.verified-tag.show { display: block; }
.verified-tag::before { content: "\2713  "; }

.pe_signin_button { display: none; margin-top: 8px; }
.pe_signin_button.show { display: block; }

.or-sep { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--cream-line); }

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 48px; margin-top: 4px;
    background: #fff; color: #3c4043; border: 1px solid #c9b48f; border-radius: 8px;
    font-family: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none;
}
.btn-google:hover { border-color: var(--red); }

.linkish { background: none; border: 0; padding: 0; color: var(--red); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.auth-links { margin: 18px 0 0; text-align: center; font-size: 13.5px; line-height: 1.9; }
.auth-links a { color: var(--red); font-weight: 600; }

/* Portal */
.my-card { border: 1px solid var(--cream-line); border-left: 4px solid var(--muted); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; background: var(--cream-2); }
.my-card.verified { border-left-color: var(--success); }
.my-card.rejected { border-left-color: var(--error); }
.my-card.pending { border-left-color: #c98a1e; }
.my-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.my-event { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.my-status { flex-shrink: 0; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 20px; background: #fff; border: 1px solid var(--cream-line); }
.my-card.verified .my-status { color: var(--success); border-color: #b7c9b7; }
.my-card.rejected .my-status { color: var(--error); border-color: #e3b0b4; }
.my-card.pending .my-status { color: #8a5d0c; border-color: #e0c98f; }
.my-facts { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 13.5px; }
.my-facts dt { font-weight: 600; color: var(--muted); }
.my-facts dd { margin: 0; }
.btn-inline { display: inline-block; width: auto; margin-top: 12px; padding: 10px 18px; text-decoration: none; }

.my-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 8px; }
.my-event-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--cream-line); border-radius: 8px; background: var(--cream-2); text-decoration: none; color: var(--ink); }
.my-event-link:hover { border-color: var(--red); }
.my-event-link .ev-tag { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.my-event-link .ev-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.my-event-link .ev-fee { font-size: 12.5px; font-weight: 600; color: var(--success); }

.account-form { margin-top: 6px; }
.terms h2 { font-family: var(--font-display); color: var(--red); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; margin: 26px 0 10px; }

@media (max-width: 600px) {
    .verify-row { flex-wrap: wrap; }
    .verify-row > .phone, .verify-row > input { flex: 1 1 100%; }
    .btn-verify { width: 100%; }
    .my-facts { grid-template-columns: 1fr; gap: 0; }
    .my-facts dd { margin-bottom: 8px; }
    .my-head { flex-direction: column; }
    .btn-inline { width: 100%; text-align: center; }
}

/* ---------- Bank transfer details on the payment step ---------- */
.bank-box { margin: 14px 0 4px; padding: 12px 14px; background: var(--cream-2); border: 1px solid var(--cream-line); border-radius: 8px; }
.bank-title { font-family: var(--font-display); font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.bank-rows { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.bank-rows dt { font-weight: 600; color: var(--muted); }
.bank-rows dd { margin: 0; word-break: break-word; }
/* Shared layout refinement: registration, accounts, terms and portal. */
body { font-size: 16px; line-height: 1.7; padding: 36px 20px 48px; }
.page-head { max-width: 760px; margin-bottom: 28px; }
.page-head .title { font-size: clamp(30px,5vw,44px); letter-spacing: .15em; line-height: 1.3; margin: 8px 0 8px .15em; }
.page-head .presents { font-size: 12px; letter-spacing: .18em; line-height: 1.6; }
.page-head .tagline { font-size: 12px; letter-spacing: .08em; line-height: 1.8; }
.frame-wrap { max-width: 800px; margin-top: 38px; }
.plaque { font-size: 18px; line-height: 1.5; letter-spacing: .1em; margin: 0; }
.header { padding: 42px 36px 20px; }
.header .subtitle { font-size: 15px; line-height: 1.7; }
.body { padding: 16px 36px 36px; }
.section { padding-top: 26px; }
.section + .section { margin-top: 28px; }
.section-title { font-size: 16px; line-height: 1.6; letter-spacing: .055em; }
.section-title .num { flex-shrink: 0; width: 26px; height: 26px; }
.section-desc, .hint { font-size: 14px; line-height: 1.7; }
label { font-size: 15px; margin: 18px 0 7px; }
label .hint { font-size: 13px; line-height: 1.7; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #b49a75; border-radius: 7px; background: var(--cream-2); color: var(--ink); font: 400 16px/1.5 var(--font-body); }
input[type=file] { max-width: 100%; font-size: 15px; }
input[type=checkbox], input[type=radio] { flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--red); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.phone:focus-within, .upload:focus-within { outline: 2px solid var(--red); outline-offset: 3px; }
.phone input { outline-offset: -3px; }
.row-2 { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
.check { font-size: 15px; line-height: 1.7; padding: 14px; min-height: 48px; }
.filter-group { gap: 8px; margin-top: 14px; }
.filter-chip { min-height: 44px; padding: 9px 16px; font-size: 14px; }
.event-list { gap: 12px; margin-top: 16px; }
.event-option { padding: 16px; gap: 12px; font-size: 16px; line-height: 1.6; margin: 0; }
.event-option .ev-label { min-width: 0; }
.event-option .ev-tag { font-size: 11px; letter-spacing: .08em; }
.event-option .ev-fee { font-size: 14px; line-height: 1.7; }
.event-banner { padding: 20px 36px; gap: 18px; }
.event-banner .eb-name { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.event-banner .eb-fee { font-size: 13px; }
.btn-change, .btn-verify, .btn-ghost, .btn-google, .btn-primary { min-height: 48px; }
.btn-primary { display: inline-block; text-align: center; text-decoration: none; font-size: 15px; letter-spacing: .07em; padding: 15px 18px; }
.btn-change { white-space: normal; }
.alert, .field-error { font-size: 14px; line-height: 1.7; }
.alert { padding: 14px 16px; margin-top: 20px; }
.body > h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: .04em; line-height: 1.4; margin: 28px 0 16px; }
.terms .body h2 { font-size: 18px; line-height: 1.5; letter-spacing: .04em; margin-top: 30px; }
.terms .body h3 { font-size: 16px; }
.terms .body ul, .terms .note { font-size: 15px; line-height: 1.8; }
.terms .body li { margin-bottom: 10px; }
.auth-links { font-size: 15px; }
.auth-links a, .back-link { display: inline-block; min-height: 44px; padding-block: 8px; text-underline-offset: 4px; }
.foot { color: #e5d4b9; font-size: 14px; overflow-wrap: anywhere; }
.foot a { color: #f3d391; text-decoration: underline; text-underline-offset: 4px; display: inline-block; padding-block: 8px; }
.frame .foot { color: var(--muted); }
.frame .foot a { color: var(--red); }
.bank-box { padding: 20px; }
.bank-title { font-size: 14px; letter-spacing: .05em; }
.bank-rows { grid-template-columns: 150px minmax(0,1fr); gap: 10px 18px; font-size: 15px; }
.upload { min-height: 76px; }
.upload-text { font-size: 15px; }
.upload-sub { white-space: normal; font-size: 13px; }
.upload-name { white-space: normal; overflow-wrap: anywhere; font-size: 15px; }
.modal { max-height: calc(100dvh - 32px); }
.modal-body { padding: 22px; }
.modal-intro, .rl-row { font-size: 15px; line-height: 1.7; }
.rh-value { word-break: normal; overflow-wrap: anywhere; font-size: 16px; }
.modal-actions { flex-wrap: wrap; }
.link-btn { min-height: 44px; padding-inline: 6px; }
.my-head > div { min-width: 0; }
.my-event { font-size: 17px; line-height: 1.5; }
.my-facts { grid-template-columns: 130px minmax(0,1fr); font-size: 15px; gap: 8px 16px; }
.my-facts dd { overflow-wrap: anywhere; }
.my-events { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 14px; }
.my-event-link { padding: 16px; }
.my-event-link .ev-name { font-size: 16px; line-height: 1.6; }
.my-event-link .ev-fee { font-size: 14px; }
@media (max-width:600px) {
    body { padding: 24px 10px 36px; }
    .page-head { margin-bottom: 22px; }
    .page-head .title { font-size: clamp(26px,8vw,34px); letter-spacing: .08em; margin-left: .08em; }
    .page-head .presents { font-size: 10px; letter-spacing: .12em; }
    .page-head .tagline { font-size: 11px; letter-spacing: .035em; }
    .frame { padding: 5px; }
    .frame-wrap { margin-top: 32px; }
    .plaque { font-size: 14px; letter-spacing: .065em; max-width: calc(100% - 30px); padding-inline: 18px; }
    .header { padding: 34px 18px 16px; }
    .body { padding: 12px 18px 26px; }
    .header .subtitle, .section-desc, .hint { font-size: 14px; }
    .row-2 { grid-template-columns: minmax(0,1fr); }
    .section-title { font-size: 15px; gap: 8px; letter-spacing: .035em; }
    .event-banner { padding: 18px; gap: 14px; }
    .event-banner .eb-name { font-size: 17px; }
    .event-banner .eb-fee { flex: 1 1 100%; }
    .event-banner .eb-fee strong { display: block; margin-left: 0; margin-top: 3px; }
    .btn-change { width: 100%; margin-left: 0; }
    .event-option { padding: 14px 12px; font-size: 15px; }
    .check { padding: 12px; font-size: 14px; }
    .check input { margin-top: 4px; }
    .bank-box { padding: 16px; }
    .bank-rows { grid-template-columns: minmax(0,1fr); gap: 3px; }
    .bank-rows dt { font-size: 13px; margin-top: 10px; }
    .bank-rows dd { font-size: 16px; }
    .modal-backdrop { padding: 10px; }
    .modal { max-height: calc(100dvh - 20px); }
    .modal-body { padding: 18px; }
    .modal-plaque { font-size: 14px; letter-spacing: .06em; }
    .rl-row { grid-template-columns: minmax(0,1fr); }
    .review-highlight { grid-template-columns: minmax(0,1fr); }
    #otp_input { max-width: 100%; }
    .my-head { flex-direction: column; }
    .my-facts { grid-template-columns: minmax(0,1fr); gap: 2px; }
    .my-facts dd { margin-bottom: 10px; }
    .btn-inline { width: 100%; }
}
@media (max-width: 600px) {
    .bank-rows { grid-template-columns: 1fr; gap: 0; }
    .bank-rows dt { margin-top: 6px; font-size: 12.5px; }
    .bank-rows dd { font-size: 15px; }
}

/* Familiar Google sign-in, aligned with the CASCADE account form. */
.participant-login .btn-google {
    min-height:52px;padding:12px;gap:10px;border-radius:8px;
    background:#fff;border:1px solid #747775;color:#1f1f1f;
    font-family:"Google Sans",Inter,Arial,sans-serif;font-size:15px;font-weight:500;
    line-height:20px;letter-spacing:0;text-transform:none;
    box-shadow:0 2px 8px rgba(75,20,25,.07);
    transition:border-color .16s ease,box-shadow .16s ease;
}
.participant-login .btn-google:hover {
    border-color:var(--red);box-shadow:0 3px 12px rgba(120,20,30,.14);
}
.participant-login .btn-google:focus-visible {outline:3px solid var(--red);outline-offset:3px;}
.google-signin-icon {display:block;flex:0 0 20px;width:20px;height:20px;object-fit:contain;}

.quiz-tools{position:sticky;top:0;z-index:4;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px;background:#f6eddb;border:1px solid #b3121d;border-radius:10px;margin:16px 0}.quiz-question{border:1px solid #d8c6ad;border-radius:12px;padding:18px;margin:20px 0;min-width:0}.quiz-question legend{font-weight:600;line-height:1.6;max-width:100%;overflow-wrap:anywhere}.quiz-question .check{margin:12px 0;padding:12px;border-radius:8px;background:#fff8ef}.quiz-question input{accent-color:#b3121d}.quiz-question .check:has(input:checked){outline:2px solid #b3121d}
