.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: block;
  width: 46px;
  height: 40px;
  flex: 0 0 46px;
  object-fit: contain;
}

.draw-timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.draw-timer-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.draw-timer-value {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

:root {
  color-scheme: light;
  --ink: #323032;
  --muted: #676676;
  --line: #e4e5eb;
  --surface: #f7f7f9;
  --surface-strong: #f0f0f4;
  --green: #178b45;
  --green-soft: #eaf7ee;
  --red: #d5222f;
  --red-soft: #fff0f1;
}

* {
  box-sizing: border-box;
}

html {
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(50, 48, 50, 0.22);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(228, 229, 235, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.open-app-button,
.primary-button,
.store-button {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
}

.open-app-button {
  padding: 0 22px;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 40px auto 72px;
}

.listing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
  gap: clamp(36px, 5vw, 72px);
}

.media-panel,
.listing-panel {
  min-width: 0;
}

.hero-image-wrap {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #b2b0ba;
  font-size: 64px;
  font-weight: 800;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 1px 3px;
  scrollbar-width: thin;
}

.thumbnail {
  flex: 0 0 76px;
  overflow: hidden;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.thumbnail.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-panel {
  position: sticky;
  top: 106px;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.live::before,
.status-badge.upcoming::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.upcoming,
.status-badge.ended {
  background: var(--red-soft);
  color: var(--red);
}

.listing-kind {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 24px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.subtitle,
.description,
.timing {
  color: var(--muted);
  line-height: 1.5;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 18px;
}

.price {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
}

.timing {
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 600;
}

.description {
  margin: 24px 0;
  font-size: 16px;
  white-space: pre-line;
}

.details-list {
  margin: 28px 0;
  border-top: 1px solid var(--line);
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
}

.detail-row strong {
  overflow-wrap: anywhere;
  text-align: right;
}

.app-cta {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-cta strong,
.app-cta span {
  display: block;
}

.app-cta strong {
  margin-bottom: 5px;
  font-size: 18px;
}

.app-cta span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  padding: 12px 22px;
}

.download-copy {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.store-button {
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
}

.variation-section {
  margin-top: 64px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: 0;
}

.option-count {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-copy {
  max-width: 690px;
  margin: 12px 0 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.variation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.variation-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(50, 48, 50, 0.04);
}

.variation-card.is-unavailable {
  background: var(--surface);
  opacity: 0.72;
}

.variation-card__topline,
.variation-card__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.variation-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.variation-size,
.variation-price {
  font-size: 22px;
}

.variation-price {
  flex: 0 0 auto;
}

.variation-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0;
}

.variation-tags span {
  padding: 6px 9px;
  border-radius: 5px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.variation-card__footer {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.stock-status {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.stock-status.is-out {
  color: var(--red);
}

.variation-extras {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.trust-strip div {
  padding: 22px 24px;
}

.trust-strip div + div {
  border-left: 1px solid var(--line);
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  margin-bottom: 5px;
  font-size: 15px;
}

.trust-strip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

footer {
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.error-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, calc(100% - 40px));
  margin: 100px auto;
  text-align: center;
}

.error-logo {
  display: block;
  width: 150px;
  height: 132px;
  object-fit: contain;
}

.error-shell h1 {
  margin: 24px 0 10px;
  font-size: 32px;
}

.error-shell p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.5;
}

.link-button {
  width: min(100%, 320px);
  padding: 12px 20px;
}

@media (max-width: 860px) {
  .listing-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .listing-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
    padding: 10px 18px;
  }

  .brand {
    font-size: 17px;
  }

  .open-app-button {
    min-height: 44px;
    padding: 0 17px;
    font-size: 14px;
  }

  .page-shell {
    width: 100%;
    margin: 0 auto 44px;
  }

  .listing-layout {
    gap: 0;
  }

  .hero-image-wrap {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .thumbnail-strip {
    padding: 11px 18px 2px;
  }

  .thumbnail {
    flex-basis: 66px;
    width: 66px;
    height: 66px;
  }

  .listing-panel {
    padding: 26px 20px 0;
  }

  h1 {
    margin-top: 20px;
    font-size: 32px;
  }

  .subtitle {
    font-size: 16px;
  }

  .price {
    font-size: 26px;
  }

  .detail-row {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 14px;
    font-size: 14px;
  }

  .variation-section {
    margin: 42px 20px 0;
    padding-top: 32px;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .variation-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .variation-card__footer {
    align-items: flex-end;
  }

  .trust-strip {
    grid-template-columns: minmax(0, 1fr);
    margin: 36px 20px 0;
  }

  .trust-strip div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .variation-card__topline,
  .variation-card__footer {
    gap: 12px;
  }

  .variation-size,
  .variation-price {
    font-size: 20px;
  }

  .variation-extras {
    max-width: 52%;
  }
}
