:root {
  --orange: #ff5a00;
  --orange-dark: #d94d00;
  --orange-soft: #fff0e5;
  --yellow: #ffb000;
  --yellow-soft: #fff8d6;
  --green: #00b81a;
  --green-dark: #008c14;
  --green-soft: #eaffed;
  --red: #c62828;
  --red-soft: #fff1f1;
  --text: #202020;
  --muted: #6f6f6f;
  --border: #e8e8e8;
  --card: #ffffff;
  --background: #fffaf4;
  --shadow: 0 18px 55px rgba(31, 31, 31, 0.09);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 90, 0, 0.13), transparent 30%),
    linear-gradient(180deg, #fff8f1 0%, #ffffff 50%, #fffaf4 100%);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #fff;
  background: rgba(255, 90, 0, 0.97);
  box-shadow: 0 8px 28px rgba(255, 90, 0, 0.22);
  backdrop-filter: blur(12px);
}
.app-nav-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.app-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 900; }
.app-brand img { width: 36px; height: 36px; object-fit: contain; }
.app-nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 800; }
.app-nav-pill { padding: 10px 15px; color: var(--orange); background: #fff; border-radius: 12px; }

.app-hero { padding: 72px 0 38px; }
.app-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 34px; align-items: center; }
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 17px;
  padding: 8px 13px;
  color: #854100;
  background: var(--yellow-soft);
  border: 1px solid #ffe288;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 800px; margin-bottom: 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -2.5px; }
h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.12; letter-spacing: -1px; }
h3 { line-height: 1.25; }
.lead { max-width: 760px; margin-bottom: 0; color: var(--muted); font-size: 18px; }
.hero-icon {
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, var(--orange), var(--yellow));
  box-shadow: 0 22px 55px rgba(255, 90, 0, 0.26);
  font-size: 64px;
  transform: rotate(3deg);
}

.section { padding: 34px 0 72px; }
.section-heading { max-width: 720px; margin-bottom: 25px; }
.section-heading p { color: var(--muted); }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.app-tile {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.app-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 62px rgba(31,31,31,.13); }
.app-tile-icon { width: 66px; height: 66px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 20px; background: var(--orange-soft); font-size: 34px; }
.app-tile h2 { margin-bottom: 8px; font-size: 24px; }
.app-tile p { color: var(--muted); }
.app-tag { width: max-content; margin-top: auto; padding: 7px 11px; color: var(--green-dark); background: var(--green-soft); border-radius: 999px; font-size: 12px; font-weight: 900; }
.app-tile.coming { opacity: .72; }

.role-shell, .form-card, .event-card, .notice-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.role-shell { padding: 28px; }
.role-heading { text-align: center; max-width: 650px; margin: 0 auto 24px; }
.role-heading p { color: var(--muted); }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.role-button {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.role-button:hover, .role-button.active { border-color: var(--orange); background: var(--orange-soft); transform: translateY(-2px); }
.role-button .role-icon { font-size: 38px; }
.role-button strong { font-size: 21px; }
.role-button span { max-width: 330px; color: var(--muted); font-size: 14px; }

.panel { display: none; margin-top: 22px; }
.panel.active { display: block; }
.form-card { padding: 30px; }
.form-card-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.form-card-header p { color: var(--muted); margin-bottom: 0; }
.form-card-header .eyebrow { margin-bottom: 10px; }
.form-card-header h2 { margin-bottom: 8px; }
.form-section {
  min-width: 0;
  margin: 0 0 20px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
}
.form-section legend {
  width: auto;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: var(--text);
}
.form-section legend > span:last-child { display: grid; gap: 1px; }
.form-section legend strong { font-size: 16px; }
.form-section legend small { color: var(--muted); font-size: 12px; font-weight: 500; }
.section-step {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--orange);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.form-field { min-width: 0; display: grid; gap: 7px; align-content: start; align-self: start; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 14px; font-weight: 850; }
.form-field small { color: var(--muted); font-size: 12px; }
.required::after { content: " *"; color: var(--red); }
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 1px solid #d9d9d9;
  border-radius: 13px;
  padding: 13px 14px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:not([type="checkbox"]):not([type="radio"]), select { height: 52px; }
textarea { min-height: 120px; resize: vertical; }
[hidden] { display: none !important; }
input:focus, textarea:focus, select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 90, 0, .11); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(198, 40, 40, .09); }
input[readonly] { background: #f7f7f7; color: #555; }
.form-field.has-error label { color: var(--red); }

.form-field input::placeholder, .form-field textarea::placeholder { color: #858585; opacity: 1; }
input[type="datetime-local"] { appearance: none; -webkit-appearance: none; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; }
.checkbox-row input { width: 21px; height: 21px; min-height: 21px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--orange); }
.checkbox-row label { color: #454545; font-size: 13px; line-height: 1.55; cursor: pointer; }
.acceptance-card {
  padding: 19px;
  background: #fffaf4;
  border: 1px solid #ffd2b5;
  border-radius: 16px;
}
.acceptance-card.has-error { border-color: var(--red); background: var(--red-soft); }
.acceptance-heading { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 14px; }
.acceptance-heading > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--orange);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}
.acceptance-heading strong { display: block; margin-bottom: 2px; }
.acceptance-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.acceptance-heading a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 2px; font-weight: 800; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 900;
}
.btn-primary { color: #fff; background: var(--orange); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { color: var(--orange); background: #fff; border-color: #ffc7a6; }
.btn-dark { color: #fff; background: #252525; }
.btn:disabled { cursor: not-allowed; opacity: .65; }
.btn[aria-busy="true"]::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.status-message { display: none; margin-top: 18px; padding: 13px 15px; border-radius: 13px; font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
.status-message.show { display: block; }
.status-message.success { color: var(--green-dark); background: var(--green-soft); border: 1px solid #bdeac3; }
.status-message.error { color: #a51d1d; background: var(--red-soft); border: 1px solid #ffcaca; }
.status-message.info { color: #704000; background: var(--yellow-soft); border: 1px solid #ffe28c; }

.result-card { display: none; margin-top: 22px; padding: 28px; background: #fff; border: 1px solid #bdeac3; border-radius: var(--radius); box-shadow: var(--shadow); }
.result-card.show { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: center; }
.qr-shell { padding: 13px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.qr-shell img { display: block; width: 100%; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.url-box { width: 100%; margin: 12px 0 16px; padding: 12px 13px; border: 1px dashed #ffb281; border-radius: 12px; background: #fff7ef; overflow-wrap: anywhere; font-size: 13px; }

.lookup-card { max-width: 700px; margin: 0 auto; padding: 30px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.lookup-card p { color: var(--muted); }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.event-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 24px; align-items: start; }
.event-card, .notice-card { padding: 28px; }
.event-code-badge { display: inline-flex; padding: 7px 11px; margin-bottom: 14px; color: #8a3d00; background: var(--orange-soft); border-radius: 999px; font-size: 12px; font-weight: 900; }
.event-details { color: #4e4e4e; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-meta { display: grid; gap: 12px; margin-top: 24px; }
.meta-row { display: grid; grid-template-columns: 135px minmax(0, 1fr); gap: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.meta-row span:first-child { color: var(--muted); font-size: 13px; font-weight: 800; }
.meta-row strong, .meta-row a { overflow-wrap: anywhere; }

.registration-status {
  margin-bottom: 20px;
  padding: 18px;
  background: #252525;
  color: #fff;
  border-radius: 18px;
}
.registration-status.open { background: linear-gradient(135deg, #006e14, #00a91b); }
.registration-status.upcoming { background: linear-gradient(135deg, #7a4100, #b86a00); }
.registration-status.closed { background: linear-gradient(135deg, #6c1c1c, #a72828); }
.registration-status small { display: block; color: rgba(255,255,255,.78); font-weight: 800; }
.registration-status strong { display: block; margin-top: 3px; font-size: 21px; }
.countdown { margin-top: 8px; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 800; }
.capacity-wrap { margin-top: 14px; }
.capacity-label { display: flex; justify-content: space-between; gap: 15px; color: rgba(255,255,255,.88); font-size: 12px; font-weight: 800; }
.capacity-track { height: 8px; margin-top: 7px; overflow: hidden; background: rgba(255,255,255,.24); border-radius: 999px; }
.capacity-fill { height: 100%; width: 0; background: #fff; border-radius: 999px; transition: width .3s ease; }
.payment-box { margin-top: 18px; padding: 16px; background: var(--yellow-soft); border: 1px solid #ffe18a; border-radius: 14px; }
.payment-box h3 { margin-bottom: 5px; font-size: 16px; }
.payment-box p { margin-bottom: 0; white-space: pre-wrap; }

.disclaimer {
  margin-top: 28px;
  padding: 22px;
  background: #fffdf5;
  border: 1px solid #f0dda4;
  border-radius: 18px;
}
.notice-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 14px; }
.notice-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #6d4700;
  background: #ffe79c;
  border-radius: 50%;
  font-weight: 950;
}
.disclaimer h2, .disclaimer h3 { margin-bottom: 4px; font-size: 19px; }
.disclaimer p, .disclaimer li { color: #5e5848; font-size: 13px; }
.disclaimer ul { margin: 12px 0 0; padding-left: 20px; }
.disclaimer li + li { margin-top: 7px; }
.notice-summary { margin: 0; }
.data-note {
  margin-bottom: 15px;
  padding: 13px 14px;
  color: #4d3b00 !important;
  background: #fff4c4;
  border: 1px solid #efd477;
  border-radius: 12px;
}

.loading-card { padding: 55px 25px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.spinner { width: 36px; height: 36px; margin: 0 auto 14px; border: 4px solid #eee; border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-footer { margin-top: 50px; padding: 28px 0; color: #666; border-top: 1px solid var(--border); background: rgba(255,255,255,.7); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: center; font-size: 13px; }
.footer-links { display: flex; gap: 16px; font-weight: 800; }

@media (max-width: 900px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-layout { grid-template-columns: 1fr; }
  .app-hero-grid { grid-template-columns: 1fr; }
  .hero-icon { display: none; }
}

@media (max-width: 700px) {
  .container { width: min(100% - 22px, 1120px); }
  .app-nav-inner { min-height: 62px; }
  .app-brand { font-size: 16px; }
  .app-brand img { width: 31px; height: 31px; }
  .app-nav-links a:not(.app-nav-pill) { display: none; }
  .app-nav-pill { padding: 9px 12px; font-size: 12px; }
  .app-hero { padding-top: 48px; }
  h1 { letter-spacing: -1.6px; }
  .app-grid, .role-grid, .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  input, textarea, select { font-size: 16px; }
  input[type="datetime-local"] { width: 100%; }
  .role-shell, .form-card, .event-card, .notice-card, .lookup-card { padding: 18px; border-radius: 19px; }
  .role-shell { padding-inline: 12px; }
  .form-card { padding-inline: 13px; }
  .form-section { padding: 17px 13px; border-radius: 15px; }
  .form-section legend { align-items: flex-start; padding-inline: 4px; }
  .form-section legend small { line-height: 1.35; }
  .form-actions, .result-actions { display: grid; grid-template-columns: 1fr; }
  .form-actions .btn, .result-actions .btn { width: 100%; }
  .acceptance-card { padding: 16px 13px; }
  .checkbox-row label { font-size: 12.5px; }
  .form-card-header { display: block; }
  .result-card.show { grid-template-columns: 1fr; }
  .qr-shell { max-width: 260px; margin: 0 auto; }
  .inline-form { grid-template-columns: 1fr; }
  .inline-form .btn { width: 100%; }
  .meta-row { grid-template-columns: 1fr; gap: 3px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .container { width: min(100% - 14px, 1120px); }
  .app-hero { padding-top: 36px; }
  .app-hero h1 { font-size: 36px; }
  .role-button { min-height: 140px; padding: 18px 14px; }
  .form-card, .lookup-card { padding-inline: 9px; }
  .form-section { padding-inline: 10px; }
}
