:root {
  color-scheme: light;
  --yellow: #ffc400;
  --amber: #f6a91a;
  --green: #04c853;
  --accent-ink: #171717;
  --action-ink: #072414;
  --green-ink: #057936;
  --ink: #202020;
  --muted: #6d6d6d;
  --subtle: #929792;
  --line: #e7e7e7;
  --paper: #ffffff;
  --soft: #f4f4f4;
  --page-background:
    radial-gradient(circle at top left, rgba(255, 196, 0, 0.35), transparent 34rem),
    linear-gradient(135deg, #f7f7f2 0%, #ffffff 50%, #edf8f1 100%);
  --card-border: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 16px 38px rgba(0, 0, 0, 0.12);
  --control-bg: rgba(32, 32, 32, 0.08);
  --theme-filter-bg: rgba(255, 255, 255, 0.72);
  --theme-active-bg: #202020;
  --theme-active-ink: #ffffff;
  --strong-surface: #242424;
  --strong-surface-ink: #ffffff;
  --package-bg: #f3f4f1;
  --package-hover: #ffffff;
  --package-selected: #fff8dc;
  --package-shadow: 0 5px 14px rgba(0, 0, 0, 0.09);
  --field-bg: #fafafa;
  --quantity-field-bg: #dedfe1;
  --quantity-field-ink: #333333;
  --danger-ink: #a12828;
  --button-dark: #242424;
  --modal-backdrop: rgba(0, 0, 0, 0.58);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --yellow: #ffd43b;
  --amber: #ffb326;
  --green: #18ce69;
  --green-ink: #77eaa8;
  --ink: #f3f6f4;
  --muted: #aeb6b1;
  --subtle: #8d9791;
  --line: #363d39;
  --paper: #171b19;
  --soft: #272d2a;
  --page-background:
    radial-gradient(circle at top left, rgba(255, 196, 0, 0.13), transparent 31rem),
    linear-gradient(135deg, #0d100f 0%, #111513 54%, #0d1611 100%);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-shadow: 0 20px 52px rgba(0, 0, 0, 0.38);
  --control-bg: rgba(255, 255, 255, 0.09);
  --theme-filter-bg: rgba(14, 17, 16, 0.72);
  --theme-active-bg: #ffd43b;
  --theme-active-ink: #171717;
  --strong-surface: #0e1110;
  --strong-surface-ink: #f7f8f7;
  --package-bg: #222825;
  --package-hover: #29302c;
  --package-selected: #302b13;
  --package-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
  --field-bg: #222724;
  --quantity-field-bg: #292f2c;
  --quantity-field-ink: #f3f6f4;
  --danger-ink: #ff9b9b;
  --button-dark: #f1f3f2;
  --modal-backdrop: rgba(0, 0, 0, 0.76);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-background);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 220ms ease, color 220ms ease;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid rgba(246, 169, 26, 0.48);
  outline-offset: 3px;
}

.page-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 26px 16px 40px;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.theme-filter {
  display: inline-flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--theme-filter-bg);
  padding: 3px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(12px);
}

.theme-filter button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.theme-filter button:hover {
  color: var(--ink);
}

.theme-filter button[aria-pressed="true"] {
  background: var(--theme-active-bg);
  color: var(--theme-active-ink);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
}

.admin-shortcut {
  display: block;
  width: fit-content;
  margin-left: auto;
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--ink);
  padding: 7px 11px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.raffle-card {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #121212;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 420ms ease;
}

.carousel img {
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  object-fit: cover;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #171717;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-button.previous {
  left: 12px;
}

.carousel-button.next {
  right: 12px;
}

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.carousel-dots button[aria-current="true"] {
  width: 22px;
  background: var(--yellow);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 12px 8px;
}

.summary-box {
  display: grid;
  grid-template-columns: auto minmax(72px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 45px;
  border-radius: 6px;
  background: var(--amber);
  color: var(--accent-ink);
  padding: 8px 10px;
}

.summary-box span {
  font-size: 12px;
  font-weight: 800;
}

.summary-box strong {
  display: block;
  min-width: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.28);
  padding: 7px 10px;
  text-align: center;
  font-size: 13px;
}

.raffle-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 13px 14px;
}

.raffle-title p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.raffle-title span {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 700;
}

.raffle-title time {
  color: var(--amber);
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.raffle-title time strong {
  font-size: 20px;
  font-weight: 900;
}

.status-bar {
  display: grid;
  gap: 9px;
  margin: 0 13px 14px;
  border-radius: 8px;
  background: var(--strong-surface);
  color: var(--strong-surface-ink);
  padding: 12px 13px;
  font-size: 11px;
  font-weight: 800;
}

.status-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-copy > strong {
  color: var(--yellow);
  white-space: nowrap;
  font-size: 11px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-chip svg,
.buy-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--green));
  transition: width 420ms ease;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 11px 13px 13px;
}

.package-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 86px;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--package-bg);
  box-shadow: var(--package-shadow);
  color: var(--ink);
  padding: 16px 8px 12px 42px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.package-card:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
  background: var(--package-hover);
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.14);
}

.package-card.is-selected {
  border-color: var(--yellow);
  background: var(--package-selected);
  box-shadow: 0 0 0 2px var(--yellow), 0 9px 20px rgba(0, 0, 0, 0.14);
}

.package-card::before {
  content: "+";
  position: absolute;
  left: 10px;
  top: 50%;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.package-card.is-selected::before {
  background: var(--yellow);
  color: #171717;
}

.package-card span,
.package-card strong {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.package-card span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.package-card strong {
  color: var(--green-ink);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.package-card em {
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: var(--yellow);
  color: #111;
  padding: 4px 15px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.quantity-panel {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 12px;
  margin: 0 13px 13px;
  border-radius: 5px;
  background: var(--strong-surface);
  padding: 9px 24px;
}

.round-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--amber);
  color: var(--accent-ink);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.quantity-field {
  display: grid;
  gap: 3px;
}

.quantity-field span {
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.quantity-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 4px;
  background: var(--quantity-field-bg);
  color: var(--quantity-field-ink);
  padding: 11px 10px;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.buyer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 13px 13px;
}

.purchase-form {
  margin: 0;
}

.buyer-fields label,
.copy-field {
  display: grid;
  gap: 6px;
}

.buyer-fields span,
.copy-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.buyer-fields input,
.copy-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field-bg);
  color: var(--ink);
  padding: 12px;
  outline: 0;
}

.buyer-fields input:focus,
.copy-field textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(246, 169, 26, 0.18);
}

.purchase-form.was-validated .buyer-fields input:invalid {
  border-color: #d94141;
  box-shadow: 0 0 0 3px rgba(217, 65, 65, 0.12);
}

.buy-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 26px);
  margin: 0 13px;
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: var(--action-ink);
  padding: 14px 11px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 20px rgba(4, 200, 83, 0.24);
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease;
}

.buy-button:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.buy-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.buy-button span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.selection-note {
  margin: 0 13px 14px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--accent-ink);
  padding: 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-feedback {
  margin: -3px 13px 12px;
  border: 1px solid rgba(217, 65, 65, 0.22);
  border-radius: 8px;
  background: rgba(217, 65, 65, 0.08);
  color: var(--danger-ink);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: -4px 13px 15px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust-row span::before {
  content: "✓";
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: rgba(4, 200, 83, 0.12);
  color: var(--green-ink);
  font-size: 10px;
}

.whatsapp-support {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: -4px 13px 16px;
  border-radius: 999px;
  background: #13b95d;
  color: var(--action-ink);
  padding: 12px 14px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(4, 200, 83, 0.2);
}

.whatsapp-support svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: currentColor;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.payment-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--ink);
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.close-button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-sheet h1 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
}

.modal-copy,
.gateway-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.qr-frame {
  display: grid;
  width: 214px;
  height: 214px;
  place-items: center;
  margin: 18px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-frame[hidden] {
  display: none;
}

.qr-frame img {
  width: 190px;
  height: 190px;
}

.copy-field textarea {
  min-height: 92px;
  resize: vertical;
  font-size: 12px;
}

.copy-button {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 7px;
  background: var(--button-dark);
  color: var(--paper);
  padding: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.tickets-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  border-radius: 7px;
  background: rgba(4, 200, 83, 0.12);
  color: var(--green-ink);
  padding: 13px;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 460px) {
  .page-shell {
    padding: 10px 8px 28px;
  }

  .raffle-card {
    border-radius: 10px;
  }

  .summary-grid,
  .package-grid,
  .buyer-fields {
    gap: 8px;
  }

  .theme-filter button {
    padding: 6px 8px;
  }

  .summary-box {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .status-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .package-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 11px 12px 13px;
  }

  .package-card {
    min-height: 91px;
    padding: 18px 6px 11px 34px;
    border-radius: 10px;
    text-align: left;
  }

  .package-card::before {
    left: 7px;
    width: 23px;
    height: 23px;
    font-size: 17px;
  }

  .package-card span,
  .package-card strong {
    width: 100%;
  }

  .package-card span {
    font-size: 11px;
  }

  .package-card strong {
    font-size: 8px;
  }

  .package-card em {
    top: -9px;
    padding: 4px 10px;
    font-size: 9px;
  }

  .buyer-fields {
    grid-template-columns: 1fr;
  }

  .quantity-panel {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    gap: 10px;
    margin: 0 12px 13px;
    padding: 10px 12px;
    border-radius: 9px;
  }

  .round-button {
    width: 46px;
    height: 46px;
    font-size: 34px;
  }

  .quantity-field span {
    font-size: 11px;
  }

  .quantity-field input {
    min-height: 48px;
    font-size: 22px;
  }

  .selection-note {
    margin-right: 12px;
    margin-left: 12px;
    padding: 10px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.35;
  }

  .whatsapp-support {
    margin-right: 12px;
    margin-left: 12px;
    border-radius: 10px;
    padding: 13px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo[hidden] {
  display: none;
}

.brand-logo img {
  display: block;
  max-height: 64px;
  max-width: 280px;
  object-fit: contain;
}
