:root {
  --green: #16833b;
  --green-dark: #0f6b2f;
  --green-soft: #effaf3;
  --green-border: #9dd8b1;
  --text: #121417;
  --muted: #636b74;
  --line: #e6e8eb;
  --card: #ffffff;
  --bg: #f6f7f8;
  --danger: #b42318;
  --danger-soft: #fff2f0;
  --shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 131, 59, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff, var(--bg));
  min-height: 100vh;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.56; cursor: not-allowed; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--text);
  font-weight: 850;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-decoration: none;
}
.brand span { color: var(--green); }

.trust-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 3vw, 42px);
  color: #1d2a22;
  font-size: 0.84rem;
  line-height: 1.15;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  color: var(--green);
  flex: 0 0 auto;
}

.main { padding: 28px 32px 32px; }

.stepper {
  display: grid;
  grid-template-columns: 1fr 120px 1fr 120px 1fr;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
}
.step-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #d6dade;
  display: grid;
  place-items: center;
  background: #f2f4f5;
  color: #33383d;
  font-weight: 850;
}
.step.active { color: var(--green); }
.step.active .step-number {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 6px 18px rgba(22, 131, 59, 0.24);
}
.step.complete { color: var(--green-dark); }
.step.complete .step-number {
  color: var(--green);
  border-color: var(--green-border);
  background: var(--green-soft);
}
.step-line {
  height: 2px;
  background: var(--line);
}

.queue-banner {
  margin: 0 auto 22px;
  max-width: 760px;
  padding: 14px 16px;
  border: 1px solid var(--green-border);
  border-radius: 14px;
  background: linear-gradient(90deg, var(--green-soft), #fff);
  color: var(--green-dark);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.alert {
  margin-bottom: 18px;
  border-radius: 14px;
  padding: 14px 16px;
  line-height: 1.4;
  font-weight: 650;
}
.alert-error {
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f3b7b0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
}

.content-grid > * {
  min-width: 0;
}

.section-card, .summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}
.section-card { padding: 24px; }

h1, h2, h3, p { margin: 0; }

.section-title {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.section-subtitle {
  color: #2e3439;
  font-weight: 650;
  margin-bottom: 18px;
}
.subsection-heading {
  font-size: 0.92rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.subsection-heading.top-gap {
  margin-top: 24px;
}

.event-list { display: grid; gap: 12px; }
.loading-card, .ticket-empty {
  padding: 22px;
  color: var(--muted);
  background: #fbfbfc;
  border: 1px dashed #d5dadd;
  border-radius: 14px;
}

.event-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(88px, 140px) minmax(150px, 1.25fr) minmax(130px, 0.95fr) minmax(84px, 96px);
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  color: inherit;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.event-row:hover,
.event-row:focus-visible {
  transform: translateY(-1px);
  border-color: var(--green-border);
  background: #fcfffd;
  outline: none;
}
.event-row.selected {
  border-color: var(--green);
  background: linear-gradient(90deg, var(--green-soft), #fff);
  box-shadow: inset 0 0 0 1px rgba(22, 131, 59, 0.05);
}
.event-row.season-pass-row {
  border-color: #d9c978;
  background: linear-gradient(90deg, #fff8d7, #fff);
}
.event-row.season-pass-row.selected {
  border-color: #b39a27;
  background: linear-gradient(90deg, #fff6c6, #fff);
}

.radio {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid #c5cbd1;
  display: grid;
  place-items: center;
}
.selected .radio {
  border-color: var(--green);
  background: var(--green);
}
.selected .radio::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
}
.season-pass-row.selected .radio {
  border-color: #b39a27;
  background: #b39a27;
}

.event-thumb {
  width: 100%;
  max-width: 140px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: #dbe1e5;
}
.event-thumb.placeholder-thumb {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3eab1, #e8d98b);
  color: #7a6612;
}
.event-thumb.placeholder-thumb svg {
  width: 34px;
  height: 34px;
  color: #7a6612;
}
.event-title {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.event-desc, .small-muted {
  color: var(--muted);
  line-height: 1.35;
}
.event-meta {
  display: grid;
  gap: 12px;
  color: #3f464d;
  line-height: 1.25;
}
.meta-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.meta-line svg {
  width: 18px;
  height: 18px;
  color: #59626b;
  flex: 0 0 auto;
  margin-top: 1px;
}

.event-status {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.event-meta,
.event-status {
  min-width: 0;
}
.event-status-badge {
  min-width: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 850;
  border: 1px solid #d8dfe3;
  color: var(--muted);
  background: #fff;
}
.event-status-badge.in-cart {
  color: var(--green-dark);
  border-color: var(--green-border);
  background: var(--green-soft);
}
.event-status-badge.season-pass-badge {
  border-color: #e5d58c;
  background: #fff7d2;
  color: #8a7315;
}
.event-status-badge.season-pass-badge.in-cart {
  border-color: #d4be60;
  background: #fff2b6;
  color: #7a6612;
}
.event-status-badge svg {
  width: 14px;
  height: 14px;
}
.event-qty-note {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.ticket-section { margin-top: 24px; }
.ticket-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.ticket-table {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.ticket-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 120px 140px 120px;
  align-items: center;
  min-height: 66px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.ticket-row.header {
  min-height: auto;
  padding-top: 13px;
  padding-bottom: 13px;
  color: #32383f;
  font-size: 0.82rem;
  font-weight: 800;
  background: #fbfbfc;
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-row.featured {
  margin: 10px;
  border: 1px solid #d7c77c;
  border-radius: 12px;
  background: linear-gradient(90deg, #fff8d7, #fff);
}
.ticket-type {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ticket-icon {
  width: 26px;
  height: 26px;
  color: var(--green);
  flex: 0 0 auto;
}
.ticket-icon.season-pass-icon {
  color: #9b8421;
}
.ticket-name { font-weight: 800; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--green);
  background: #dff5e7;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  margin-left: 8px;
  vertical-align: middle;
}
.badge.gold-badge {
  color: #7a6612;
  background: #fff1b0;
}
.price, .subtotal { font-weight: 800; }

.qty {
  width: max-content;
  display: inline-grid;
  grid-template-columns: 34px 38px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty button {
  height: 34px;
  border: 0;
  background: #fff;
  color: var(--green);
  font-weight: 900;
}
.qty span {
  height: 34px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-weight: 750;
}

.season-note {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 22px 26px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--green-soft), rgba(239, 250, 243, 0.28));
  color: var(--green-dark);
}
.season-note p {
  color: #3f4b43;
  margin-top: 4px;
}
.note-icon {
  width: 38px;
  height: 38px;
}

.summary-card {
  position: sticky;
  top: 116px;
  overflow: hidden;
}
.summary-inner { padding: 24px; }
.summary-title {
  font-size: 1.38rem;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.summary-groups {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.summary-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.summary-group.season-pass-group {
  border-color: #d9c978;
  background: linear-gradient(180deg, #fffdf3, #fff);
}
.summary-group-header {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.summary-group-header img,
.summary-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #edf1f3, #dce3e7);
}
.summary-placeholder.gold-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f3eab1, #e8d98b);
}
.summary-placeholder.gold-placeholder svg {
  width: 28px;
  height: 28px;
  color: #7a6612;
}
.empty-summary {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.group-items {
  display: grid;
  gap: 10px;
}
.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #31373d;
}
.group-item span:last-child,
.group-subtotal strong { font-weight: 850; }
.group-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #d7dde2;
}

.summary-lines {
  display: grid;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.summary-line strong { font-weight: 850; }

.total-line {
  padding: 22px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 1.15rem;
  font-weight: 850;
}
.total-line .amount {
  color: var(--green);
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(180deg, #1b9143, #0f6f31);
  padding: 16px 18px;
  font-weight: 850;
  font-size: 1.06rem;
  box-shadow: 0 12px 24px rgba(22, 131, 59, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.button-icon { color: #fff; }

.secure-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 16px;
}
.lock-icon {
  width: 17px;
  height: 17px;
  color: #7a828a;
}

.summary-benefits {
  background: #fbfcfb;
  padding: 24px;
  display: grid;
  gap: 24px;
  border-top: 1px solid var(--line);
}
.benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.benefit strong {
  display: block;
  margin-bottom: 3px;
}
.benefit p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.mobile-footer { display: none; }

@media (max-width: 980px) {
  .page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .topbar { padding: 18px; }
  .trust-strip { display: none; }
  .main { padding: 20px 16px 120px; }

  .stepper {
    grid-template-columns: 1fr 48px 1fr 48px 1fr;
    gap: 0;
    margin-bottom: 16px;
    font-size: 0.72rem;
  }
  .step {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .step-number {
    width: 28px;
    height: 28px;
  }

  .queue-banner {
    margin-bottom: 18px;
    font-size: 0.88rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .section-card { padding: 16px; }

  .event-row {
    grid-template-columns: 24px 92px 1fr;
    gap: 12px;
    padding: 10px;
  }
  .event-thumb {
    width: 92px;
    height: 70px;
  }
  .event-title {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }
  .event-desc { display: none; }
  .event-meta {
    grid-column: 3;
    font-size: 0.78rem;
    gap: 5px;
  }
  .meta-line { gap: 6px; }
  .meta-line svg {
    width: 14px;
    height: 14px;
  }
  .event-status {
    grid-column: 2 / 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-left: 0;
  }
  .event-qty-note { text-align: left; font-size: 0.75rem; }

  .ticket-row {
    grid-template-columns: minmax(110px, 1fr) 66px 95px 72px;
    gap: 8px;
    padding: 10px;
    min-height: 56px;
    font-size: 0.78rem;
  }
  .ticket-row.header { font-size: 0.68rem; }
  .ticket-icon { display: none; }
  .ticket-type { gap: 6px; }
  .small-muted { font-size: 0.7rem; }
  .badge {
    margin-left: 0;
    margin-top: 3px;
    width: fit-content;
  }
  .qty { grid-template-columns: 26px 28px 26px; }
  .qty button, .qty span { height: 28px; }
  .season-note { padding: 16px; }

  .summary-card {
    position: static;
    display: none;
  }

  .mobile-footer {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -18px 40px rgba(16, 24, 40, 0.12);
    backdrop-filter: blur(14px);
  }
  .mobile-total {
    display: grid;
    gap: 2px;
  }
  .mobile-total span:first-child { font-weight: 800; }
  .mobile-total span:last-child {
    color: var(--green);
    font-size: 1.35rem;
    font-weight: 900;
  }
  .mobile-footer .primary-btn { padding: 14px 12px; }
}

@media (max-width: 520px) {
  .brand { font-size: 1.45rem; }
  .section-title { font-size: 1.12rem; }

  .event-row { grid-template-columns: 20px 82px 1fr; }
  .event-thumb { width: 82px; }

  .ticket-row {
    grid-template-columns: 1.2fr 58px 86px 62px;
    font-size: 0.72rem;
  }
  .price, .subtotal { font-size: 0.72rem; }

  .mobile-footer { grid-template-columns: 104px 1fr; }
  .mobile-footer .primary-btn { font-size: 0.9rem; }
}
