/* ============ TOKENS ============ */
/* 팔레트 출처: @jnu_f4_festival 포스터 (마젠타 핑크 그라디언트 + 화이트 글로우) */
:root {
  --backdrop: #F7CBE2;
  --ground:   #FFF1F8;
  --ticket:   #FFFFFF;
  --ticket-2: #FFF1F8;
  --ink:      #3A0E2A;
  --ink-soft: #9C6883;
  --cerise:   #FF2D82;
  --cerise-d: #E0116B;
  --gold:     #D8912B;
  --gold-ink: #935B12;
  --line:     rgba(58,14,42,0.20);
  --line-2:   rgba(58,14,42,0.09);
  --shadow:   0 12px 30px -14px rgba(58,14,42,0.35);
  --appshadow: 0 40px 90px -30px rgba(58,14,42,0.45);
  --stub-tint: rgba(255,45,130,0.07);
  --bar-bg:   rgba(255,255,255,0.86);
}
@media (prefers-color-scheme: dark) {
  :root {
    --backdrop: #1B0714;
    --ground:   #26091E;
    --ticket:   #36112B;
    --ticket-2: #401433;
    --ink:      #FCE6F1;
    --ink-soft: #D99DBB;
    --cerise:   #FF62A8;
    --cerise-d: #FF80B9;
    --gold:     #F0B45E;
    --gold-ink: #F0B45E;
    --line:     rgba(252,230,241,0.24);
    --line-2:   rgba(252,230,241,0.11);
    --shadow:   0 12px 30px -14px rgba(0,0,0,0.6);
    --appshadow: 0 40px 90px -30px rgba(0,0,0,0.8);
    --stub-tint: rgba(255,98,168,0.10);
    --bar-bg:   rgba(54,17,43,0.86);
  }
}
:root[data-theme="light"] {
  --backdrop:#F7CBE2; --ground:#FFF1F8; --ticket:#FFFFFF; --ticket-2:#FFF1F8; --ink:#3A0E2A;
  --ink-soft:#9C6883; --cerise:#FF2D82; --cerise-d:#E0116B; --gold:#D8912B; --gold-ink:#935B12;
  --line:rgba(58,14,42,0.20); --line-2:rgba(58,14,42,0.09);
  --shadow:0 12px 30px -14px rgba(58,14,42,0.35); --appshadow:0 40px 90px -30px rgba(58,14,42,0.45);
  --stub-tint:rgba(255,45,130,0.07); --bar-bg:rgba(255,255,255,0.86);
}
:root[data-theme="dark"] {
  --backdrop:#1B0714; --ground:#26091E; --ticket:#36112B; --ticket-2:#401433; --ink:#FCE6F1;
  --ink-soft:#D99DBB; --cerise:#FF62A8; --cerise-d:#FF80B9; --gold:#F0B45E; --gold-ink:#F0B45E;
  --line:rgba(252,230,241,0.24); --line-2:rgba(252,230,241,0.11);
  --shadow:0 12px 30px -14px rgba(0,0,0,0.6); --appshadow:0 40px 90px -30px rgba(0,0,0,0.8);
  --stub-tint:rgba(255,98,168,0.10); --bar-bg:rgba(54,17,43,0.86);
}

/* ============ BASE ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--backdrop);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

/* ============ PHONE APP SHELL ============ */
.app {
  width: min(440px, 100%);
  margin-inline: auto;
  min-height: 100dvh;
  background: var(--ground);
  background-image:
    radial-gradient(circle at 15% 4%, var(--stub-tint), transparent 40%),
    radial-gradient(circle at 90% 96%, var(--stub-tint), transparent 44%);
  position: relative;
  display: flex; flex-direction: column;
  padding-bottom: 86px;               /* room for the bottom action bar */
  overflow: clip;
}
@media (min-width: 461px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100dvh - 48px); border-radius: 34px; box-shadow: var(--appshadow); }
}
.app.no-actionbar { padding-bottom: 0; }

/* status bar */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1.4rem .2rem; font-size: .78rem; font-weight: 700; color: var(--ink);
}
.statusbar .dots { letter-spacing: .04em; }
.statusbar .glyphs { display: inline-flex; gap: .5ch; align-items: center; opacity: .9; }

/* ============ HEADER ============ */
header.booth { text-align: center; padding: 1.4rem 1.4rem .6rem; }
.festchip {
  display: inline-flex; align-items: center; gap: .5ch;
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-ink); border: 1.5px solid var(--gold); border-radius: 999px;
  padding: .35rem .85rem; background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.wordmark {
  font-size: 2.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  margin: .8rem 0 .1rem; text-wrap: balance;
}
.wordmark em { font-style: normal; color: var(--cerise); position: relative; }
.wordmark em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: .06em; height: .13em;
  background: var(--gold); border-radius: 2px; opacity: .85;
}
.subline { font-size: 1rem; color: var(--ink-soft); margin: .35rem auto 0; max-width: 24ch; text-wrap: balance; }
.eng-label { margin-top: .7rem; font-size: .66rem; letter-spacing: .38em; text-transform: uppercase; color: var(--ink-soft); opacity: .8; }

/* ============ SECTIONS ============ */
main { padding: 0 1.15rem; display: flex; flex-direction: column; gap: 1.8rem; margin-top: 1rem; }
.section-eyebrow {
  display: flex; align-items: center; gap: .8rem;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cerise); margin-bottom: 1rem;
}
.section-eyebrow::after { content: ""; flex: 1; height: 1.5px; background: var(--line-2); }

/* ============ TICKETS ============ */
.tickets { display: flex; flex-direction: column; gap: 1.3rem; }
.ticket {
  position: relative; background: var(--ticket); border-radius: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; isolation: isolate;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.ticket::before {
  content: ""; position: absolute; inset: 9px; border: 1.5px dashed var(--line);
  border-radius: 12px; pointer-events: none; z-index: 0;
}
.ticket:active { transform: scale(.985); }
.ticket-body { position: relative; z-index: 1; padding: 1.4rem 1.4rem 1.2rem; }
.ticket-icon { font-size: 2.1rem; line-height: 1; float: right; }
.ticket-no { font-size: .68rem; letter-spacing: .09em; color: var(--ink-soft); }
.ticket-kind { display: block; margin-top: .25rem; font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }
.ticket.reveal .ticket-kind { color: var(--gold-ink); }
.ticket-desc { margin: .7rem 0 0; color: var(--ink-soft); font-size: .95rem; max-width: 30ch; }
.ticket ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.ticket li { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; }
.ticket li::before { content: "❤"; color: var(--cerise); font-size: .78rem; margin-top: .18rem; flex: none; }
.ticket.reveal li::before { content: "🔍"; font-size: .8rem; }

.tear { position: relative; height: 0; border-top: 2px dashed var(--line); margin: .2rem 1rem 0; z-index: 1; }
.tear::before, .tear::after {
  content: ""; position: absolute; top: -12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.tear::before { left: -23px; } .tear::after { right: -23px; }
.stub {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: 1.1rem 1.4rem 1.3rem; background: var(--stub-tint); border-radius: 0 0 20px 20px;
}
.price-label { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); display: block; }
/* ↓↓↓ 가격은 이 줄들에서 수정하세요 ↓↓↓ */
.price .amount { font-size: 1.95rem; font-weight: 800; color: var(--cerise); letter-spacing: -.02em; }
.ticket.reveal .price .amount { color: var(--gold-ink); }
.price .won { font-size: .95rem; font-weight: 700; color: var(--ink); margin-left: .1ch; }
.buy-note {
  font-size: .76rem; font-weight: 700; color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 999px; padding: .45rem .8rem; white-space: nowrap;
  background: none; font-family: inherit; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: background .2s, color .2s, transform .15s;
}
.buy-note:hover, a.buy-note:hover { background: var(--ink); color: var(--ground); }
.buy-note:active { transform: scale(.95); }
.stamp {
  position: absolute; top: 12px; right: -4px; z-index: 2; font-size: .62rem; font-weight: 800;
  letter-spacing: .08em; color: var(--gold-ink); border: 2px solid var(--gold);
  padding: .28rem .6rem; border-radius: 6px; transform: rotate(7deg);
  background: color-mix(in srgb, var(--gold) 14%, var(--ticket)); text-transform: uppercase;
}

/* ============ STEPS ============ */
.steps { display: flex; flex-direction: column; gap: .8rem; }
.step {
  display: flex; gap: 1rem; align-items: flex-start; background: var(--ticket);
  border-radius: 15px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); border: 1.5px solid var(--line-2);
}
.step .num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--cerise); color: #fff;
  font-weight: 800; font-size: .98rem;
}
.step h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .88rem; }
.cash-tag { margin-top: .3rem; text-align: center; font-size: .86rem; color: var(--ink-soft); }
.cash-tag b { color: var(--ink); }

/* ============ FORM ============ */
.reg-card { position: relative; background: var(--ticket); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.reg-head {
  padding: 1.2rem 1.1rem 1.2rem 1.3rem; background: var(--cerise); color: #fff;
  display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem;
}
.reg-head h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.reg-head .tiny { font-size: .74rem; opacity: .92; }
.modal-close {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: none;
  background: rgba(255,255,255,.22); color: #fff; font-size: 1rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .2s, transform .15s;
}
.modal-close:hover { background: rgba(255,255,255,.34); }
.modal-close:active { transform: scale(.92); }
form { padding: 1.3rem; display: grid; gap: 1.05rem; }
.field { display: grid; gap: .4rem; }
label { font-size: .8rem; font-weight: 700; letter-spacing: .03em; }
label .req { color: var(--cerise); }
.hint { font-size: .72rem; color: var(--ink-soft); font-weight: 400; }
input, select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--ticket-2);
  border: 1.5px solid var(--line-2); border-radius: 11px; padding: .85rem .95rem; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 4.2rem; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--cerise);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--cerise) 22%, transparent);
}
.insta-wrap { position: relative; }
.insta-wrap span { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 700; }
.insta-wrap input { padding-left: 2rem; }
.submit {
  font: inherit; font-weight: 800; font-size: 1.02rem; cursor: pointer; color: #fff;
  background: var(--cerise); border: none; border-radius: 12px; padding: 1.05rem 1.2rem;
  transition: transform .15s, background .2s; box-shadow: 0 10px 24px -10px var(--cerise);
}
.submit:active { transform: scale(.98); background: var(--cerise-d); }
.form-foot { font-size: .78rem; color: var(--ink-soft); text-align: center; margin-top: -.2rem; }

/* ============ FOOTER ============ */
footer { text-align: center; padding: 2rem 1.4rem 1.4rem; color: var(--ink-soft); font-size: .82rem; }
footer b { color: var(--ink); }
footer a { color: inherit; }

/* ============ BOTTOM ACTION BAR ============ */
.actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(440px, 100%); z-index: 30;
  display: flex; gap: .6rem; padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom));
  background: var(--bar-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--line-2);
}
@media (min-width: 461px) {
  .actionbar { bottom: 24px; border-radius: 0 0 34px 34px; overflow: hidden; }
}
.actionbar button, .actionbar a {
  font: inherit; font-weight: 800; cursor: pointer; border-radius: 13px; padding: .95rem .5rem;
  border: none; transition: transform .15s; text-decoration: none;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.actionbar button:active, .actionbar a:active { transform: scale(.97); }
.act-primary { flex: 1.6; background: var(--cerise); color: #fff; box-shadow: 0 8px 20px -10px var(--cerise); }
.act-ghost { flex: 1; background: transparent; color: var(--ink); border: 1.5px solid var(--line) !important; }

/* toast + confetti */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 140px);
  background: var(--ink); color: var(--ground); padding: .9rem 1.3rem; border-radius: 999px;
  font-weight: 700; font-size: .92rem; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); z-index: 50;
  transition: transform .45s cubic-bezier(.2,.9,.2,1); display: flex; align-items: center; gap: .5ch;
  white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

/* ============ REGISTER MODAL ============ */
html.modal-open { overflow: hidden; }
dialog#regModal {
  border: none; padding: 0; background: transparent; color: inherit;
  width: min(440px, 92vw); max-height: 86dvh; border-radius: 20px; overflow: visible;
}
dialog#regModal::backdrop {
  background: color-mix(in srgb, var(--ink) 58%, transparent);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
dialog#regModal .reg-card {
  max-height: 86dvh; display: flex; flex-direction: column;
  transform: scale(.96); opacity: 0;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s ease-out;
}
dialog#regModal.is-open .reg-card { transform: scale(1); opacity: 1; }
dialog#regModal form { overflow-y: auto; }

@media (prefers-reduced-motion: reduce) {
  *, html { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rise { opacity: 1 !important; transform: none !important; }
}
.rise { opacity: 0; transform: translateY(16px); animation: rise .6s cubic-bezier(.2,.8,.2,1) forwards; }
.rise.d1 { animation-delay: .07s; } .rise.d2 { animation-delay: .14s; } .rise.d3 { animation-delay: .21s; }
@keyframes rise { to { opacity: 1; transform: none; } }
