:root {
  --ink: #171717;
  --muted: #6b6861;
  --paper: #fff;
  --canvas: #f4f1ea;
  --line: #ddd8cc;
  --gold: #d4ad4f;
  --gold-dark: #8a671b;
  --gold-soft: #fbf4e2;
  --error: #a32f2a;
  --success: #1f704c;
  --font: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

button, input, textarea { font: inherit; }
button, label, input[type="checkbox"], input[type="radio"], summary { cursor: pointer; }
[hidden] { display: none !important; }

.app-bar {
  display: flex;
  min-height: 58px;
  padding: 0 max(18px, env(safe-area-inset-left));
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  background: #111;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-decoration: none;
}

.brand-number {
  padding: 3px 7px;
  border: 1px solid var(--gold);
  border-radius: 12px 4px;
  color: var(--gold);
  font-size: 16px;
  letter-spacing: -.04em;
}

.event { color: #d6d3cc; font-size: 11px; letter-spacing: .08em; }

.app-shell {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 28px 16px calc(40px + env(safe-area-inset-bottom));
}

.intro { margin: 0 4px 22px; }
.eyebrow { color: var(--gold-dark); font-size: 13px; font-weight: 800; }

.intro h1 {
  margin: 5px 0 8px;
  font-size: clamp(30px, 8vw, 40px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.intro p { margin: 0; color: var(--muted); font-size: 16px; }

.form-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 15px 42px rgba(40, 34, 22, .08);
}

.form-section { padding: 24px 20px; border-bottom: 1px solid #ece8df; }
.section-title { display: flex; margin-bottom: 14px; align-items: center; gap: 9px; }

.section-title > span {
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.section-title h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.section-title h2 small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.section-help { margin: -6px 0 13px 33px; color: var(--muted); font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; }

input[type="text"], input[type="number"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input[type="text"], input[type="number"] { min-height: 48px; padding: 0 13px; }
textarea { min-height: 92px; padding: 12px 13px; resize: vertical; }
input[type="text"]:focus, input[type="number"]:focus, textarea:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(212, 173, 79, .18); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(163, 47, 42, .1); }
.microcopy { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.night-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.night-card { position: relative; display: block; }
.night-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.night-card > span:last-child {
  display: flex;
  min-height: 98px;
  padding: 17px 13px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  flex-direction: column;
  justify-content: center;
  transition: border-color .15s, background .15s, transform .15s;
}

.night-card strong { font-size: 17px; }
.night-card small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.night-card input:checked ~ span:last-child { border-color: var(--gold-dark); background: var(--gold-soft); transform: translateY(-1px); }
.night-card input:focus-visible ~ span:last-child { outline: 3px solid rgba(212, 173, 79, .35); outline-offset: 2px; }

.check-mark {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 10px;
  display: grid;
  width: 21px;
  height: 21px;
  border: 1.5px solid #bdb6a8;
  border-radius: 50%;
  place-items: center;
  color: transparent;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.night-card input:checked + .check-mark { border-color: var(--ink); color: #fff; background: var(--ink); }
.field-error { margin: 9px 0 0; color: var(--error); font-size: 13px; font-weight: 700; }

.quick-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-choice { position: relative; display: block; }
.quick-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.quick-choice > span {
  display: grid;
  min-height: 58px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  transition: border-color .15s, background .15s, transform .15s;
}

.quick-choice input:checked + span { border-color: var(--gold-dark); background: var(--gold-soft); transform: translateY(-1px); }
.quick-choice input:focus-visible + span { outline: 3px solid rgba(212, 173, 79, .35); outline-offset: 2px; }
.support-count-fields { max-width: 280px; margin-top: 14px; }

.booth-request {
  position: relative;
  display: flex;
  min-height: 72px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  align-items: center;
  gap: 12px;
}

.booth-request input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.booth-check {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 1.5px solid #bcb5a8;
  border-radius: 8px;
  place-items: center;
  color: transparent;
  font-size: 14px;
  font-weight: 900;
}

.booth-request > span:last-child { display: grid; gap: 2px; }
.booth-request strong { font-size: 16px; }
.booth-request small { color: var(--muted); font-size: 12px; }
.booth-request input:checked + .booth-check { border-color: var(--ink); color: #fff; background: var(--ink); }
.booth-request:has(input:checked) { border-color: var(--gold-dark); background: var(--gold-soft); }
.booth-request input:focus-visible + .booth-check { outline: 3px solid rgba(212, 173, 79, .35); outline-offset: 2px; }
.booth-fields { margin-top: 16px; }
.booth-warning { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; color: #765317; background: var(--gold-soft); font-size: 13px; font-weight: 800; }
.booth-grid { display: grid; grid-template-columns: 1.25fr .8fr .7fr; gap: 10px; }
.field span small { margin-left: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.booth-notes-field { margin-top: 12px; }
.booth-notes-field textarea { min-height: 76px; }
.booth-info { display: grid; margin-top: 14px; padding: 13px 14px; border-radius: 11px; gap: 4px; color: #514c42; background: #f4f2ed; font-size: 12px; }
.booth-info p { margin: 0; }
.booth-info strong { color: var(--ink); }
.booth-example { color: var(--gold-dark); font-weight: 700; }

.guide { padding: 24px 20px; border-bottom: 1px solid #ece8df; background: #faf9f6; }
.guide h2 { margin: 0 0 14px; font-size: 18px; }
.guide ul { display: grid; margin: 0; padding: 0; gap: 11px; list-style: none; }
.guide li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: start; font-size: 13px; }
.guide li strong { color: var(--gold-dark); }
.guide li span { color: #494740; }

.agreements { padding: 20px; }
.agreement { position: relative; display: flex; min-height: 44px; align-items: center; gap: 10px; }
.agreement input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.agreement-check {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1.5px solid #bcb5a8;
  border-radius: 7px;
  place-items: center;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
}

.agreement input:checked + .agreement-check { border-color: var(--ink); color: #fff; background: var(--ink); }
.agreement input:focus-visible + .agreement-check { outline: 3px solid rgba(212, 173, 79, .35); outline-offset: 2px; }
.agreement b { margin-right: 4px; color: var(--gold-dark); font-size: 12px; }
.agreement > span:last-child { font-size: 14px; }
.privacy-detail { margin: 5px 0 0 34px; color: var(--muted); font-size: 12px; }
.privacy-detail summary { width: fit-content; text-decoration: underline; text-underline-offset: 3px; }
.privacy-detail p { margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; background: #f4f2ed; }

.status { margin: 0 20px 14px; padding: 12px 13px; border-radius: 10px; color: var(--error); background: #fff0ee; font-size: 13px; font-weight: 700; }
.status.info { color: #67501a; background: var(--gold-soft); }

.submit-button, .secondary-button {
  display: block;
  width: calc(100% - 40px);
  min-height: 54px;
  margin: 0 20px;
  border: 0;
  border-radius: 13px;
  font-weight: 800;
}

.submit-button { color: #fff; background: var(--ink); }
.submit-button:hover:not(:disabled) { background: #2d2d2d; }
.submit-button:disabled { cursor: not-allowed; opacity: .42; }
.connection-caption { margin: 9px 20px 20px; color: var(--muted); font-size: 11px; text-align: center; }
.success-panel { padding: 52px 24px; text-align: center; }
.success-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 17px; border-radius: 50%; place-items: center; color: #fff; background: var(--success); font-size: 24px; font-weight: 900; }
.success-panel h2 { margin: 0 0 8px; font-size: 27px; }
.success-panel > p { margin: 6px 0; color: var(--muted); }
.receipt { font-size: 13px; }
.receipt strong { color: var(--ink); }
.secondary-button { margin-top: 24px; border: 1px solid var(--line); color: var(--ink); background: #f7f5ef; }
.footnote { margin: 16px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.hp-field { position: fixed !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body.is-embed { background: #fff; }
body.is-embed .app-bar, body.is-embed .footnote { display: none; }
body.is-embed .app-shell { padding-top: 10px; padding-bottom: 20px; }
body.is-embed .form-card { border-color: #e4e0d7; box-shadow: none; }

@media (max-width: 460px) {
  .app-shell { padding-right: 12px; padding-left: 12px; }
  .field-grid { grid-template-columns: 1fr; }
  .form-section, .guide { padding: 22px 17px; }
  .agreements { padding: 18px 17px; }
  .night-card > span:last-child { min-height: 94px; padding: 16px 11px; }
  .night-card strong { font-size: 16px; }
  .guide li { grid-template-columns: 72px 1fr; gap: 8px; }
  .booth-grid { grid-template-columns: 1fr 1fr; }
  .team-name-field { grid-column: 1 / -1; }
  .submit-button, .secondary-button { width: calc(100% - 34px); margin-right: 17px; margin-left: 17px; }
  .status { margin-right: 17px; margin-left: 17px; }
}

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