:root {
  --brand: #2a0d70;
  --brand-deep: #1a0848;
  --brand-soft: rgba(42, 13, 112, 0.14);
  --bg: #0a0618;
  --card: #ffffff;
  --text: #14101f;
  --muted: #6b6280;
  --line: #e6e0f0;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #070412;
  color: var(--text);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(7, 4, 18, 0.42) 0%, rgba(7, 4, 18, 0.28) 28%, rgba(7, 4, 18, 0.72) 58%, rgba(7, 4, 18, 0.92) 100%),
    url("./bg-hero.jpg") center 42% / cover no-repeat;
  pointer-events: none;
}

#app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 18px 36px;
}

.hero {
  text-align: center;
  padding: 10px 4px 20px;
  color: #fff;
}
.hero-brand {
  display: block;
  width: min(92%, 360px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.45));
}
.hero-title {
  margin: 16px 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.view {
  background: var(--card);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 24px 20px 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.view h1,
.view > section > h1 {
  margin: 0 0 6px;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
}

.warn-box {
  margin: -6px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}
.warn-box strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #c2410c;
}
.warn-box p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 600;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--text);
}
label .req {
  color: #dc2626;
  font-weight: 800;
}

input, select, button { font: inherit; }

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
  font-weight: 500;
}
input:focus, select:focus {
  outline: 2px solid var(--brand-soft);
  border-color: var(--brand);
}

/* Searchable nationality picker */
.nat-picker {
  position: relative;
}
.nat-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  background: #fff;
  color: #9ca3af;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.nat-trigger.has-value {
  color: var(--text);
}
.nat-trigger:focus {
  outline: 2px solid var(--brand-soft);
  border-color: var(--brand);
}
.nat-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #9ca3af;
  flex-shrink: 0;
}
.nat-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(20, 10, 40, 0.14);
  overflow: hidden;
}
.nat-search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  background: #faf9fc;
}
.nat-search:focus {
  outline: none;
  background: #fff;
}
.nat-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 220px;
  overflow-y: auto;
}
.nat-option {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.nat-option:hover,
.nat-option.on {
  background: rgba(42, 13, 112, 0.08);
  color: var(--brand);
}
.nat-empty {
  padding: 14px;
  color: #9ca3af;
  font-size: 0.88rem;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(42, 13, 112, 0.35);
  transition: background .15s, transform .1s;
}
.btn:hover:not(:disabled) { background: var(--brand-deep); }
.btn:active:not(:disabled) { transform: scale(0.99); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid rgba(42, 13, 112, 0.35);
  margin-top: 10px;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.hint, .err, .ok {
  font-size: 0.86rem;
  line-height: 1.4;
  margin-top: 10px;
  font-weight: 500;
}
.hint { color: var(--muted); }
.err { color: var(--danger); }
.ok { color: var(--ok); }

.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.steps span {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #ebe6f4;
}
.steps span.on { background: var(--brand); }

.ticket {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
.ticket:hover, .ticket.on {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.ticket .t-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(42, 13, 112, 0.1);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticket .t-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}
.ticket .t-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}
.ticket .t-price-row {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.ticket .t-price {
  color: var(--brand);
  font-weight: 800;
  font-size: 1.12rem;
}
.ticket .t-price-old {
  color: #9ca3af;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  opacity: 0.85;
}

.pass-banner {
  margin: -4px -4px 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1228;
}
.pass-banner[hidden] { display: none !important; }
.pass-banner-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.pass-banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pass-banner-track .pass-banner-img {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.pass-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  margin: 8px -6px 0;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.pass-carousel::-webkit-scrollbar { display: none; }
.pass-carousel .pass-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: 8px 10px 16px;
  border-bottom: 0;
  margin-bottom: 0;
}
.pass-carousel .pass-card .t-title {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  padding: 0 6px;
  word-break: break-word;
}
.pass-carousel .pass-card .meta-grid .v.title {
  font-size: 0.86rem;
  font-weight: 700;
  max-width: 62%;
}
.pass-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
  margin: 6px 0 12px;
}
.pass-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8d0e8;
}
.pass-dot.on {
  background: var(--brand);
  width: 18px;
  border-radius: 999px;
}

.pass-card {
  text-align: center;
  padding: 8px 4px 4px;
}
.qr-box {
  margin: 14px auto 6px;
  padding: 14px 12px 10px;
  max-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(42, 13, 112, 0.1);
}
.qr-box .qr-img {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  cursor: zoom-in;
  image-rendering: pixelated;
}
.qr-box .qr-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.qr-box .qr-code {
  margin-top: 4px;
  font-size: 0.72rem;
  color: #7a6f8f;
  word-break: break-all;
  letter-spacing: 0.02em;
}
.meta-grid {
  text-align: left;
  margin-top: 14px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}
.meta-grid .li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid #f2eef8;
}
.meta-grid .k { color: var(--muted); font-weight: 600; }
.meta-grid .v { font-weight: 700; text-align: right; word-break: break-all; }

.foot {
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 20px;
  padding-bottom: env(safe-area-inset-bottom);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: center;
}
.captcha-img {
  width: 120px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: #f4f1fa;
  object-fit: cover;
}

@media (min-width: 520px) {
  #app { padding-top: 40px; }
  .hero-title { font-size: 1.75rem; }
}
