:root {
  color-scheme: dark;
}

body.skin-palaye {
  color-scheme: light;
}

body.skin-palaye .continue {
  background: var(--accent);
  color: var(--accent-ink);
}

body.skin-palaye .joined {
  color: var(--accent);
}

body.skin-palaye .offer {
  box-shadow: 0 18px 40px rgba(76, 29, 149, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 100% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--page);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  padding: 20px 16px 32px;
}

.top, main, .gate, footer {
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.mark {
  color: var(--ink);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.relay, .eyebrow, .meta, .operator {
  color: var(--muted);
}

.eyebrow {
  margin: 28px 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(32px, 8vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.lede { font-size: 17px; }

.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.picker a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
}

.offer {
  display: grid;
  gap: 12px;
  padding: 0 0 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card) 88%, white), var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  animation: rise 0.45s ease both;
  animation-delay: calc(var(--i) * 45ms);
}

.flip-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.flip-hit {
  display: block;
  width: 100%;
  perspective: 900px;
  cursor: pointer;
}

.flip {
  position: relative;
  width: 100%;
  min-height: 168px;
}

.face {
  width: 100%;
  border-radius: 16px;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.flip-toggle:checked + .flip-hit .front {
  opacity: 0;
  transform: rotateY(90deg);
  pointer-events: none;
}

.front {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas:
    "logo copy"
    "joined joined";
  gap: 8px 12px;
  align-items: center;
  min-height: 168px;
  padding: 14px;
}

.back {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: rotateY(-90deg);
  background: #0b0b0b;
  overflow: hidden;
  pointer-events: none;
}

.flip-toggle:checked + .flip-hit .back {
  opacity: 1;
  transform: none;
}

.back img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.back-name {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: 28px;
  font-weight: 800;
}

.logo-tile {
  grid-area: logo;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0b;
  display: grid;
  place-items: center;
}

.logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.monogram { font-size: 28px; font-weight: 800; }

.copy { grid-area: copy; min-width: 0; display: block; }

.brand, .pack, .meta, .operator { display: block; }

.brand { margin: 0; font-weight: 700; }

.pack {
  margin: 4px 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.joined {
  grid-area: joined;
  margin: 0;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #ffe14a;
}

.joined b {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.meta, .operator { margin: 0; font-size: 13px; }

.continue {
  position: relative;
  z-index: 2;
  width: auto;
  margin: 0 12px;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  background: #2bd66a;
  color: #fff;
  cursor: pointer;
}

.gate {
  position: sticky;
  bottom: 12px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--page) 88%, black);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  backdrop-filter: blur(10px);
}

.tick {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.35;
}

.tick input { width: 22px; height: 22px; margin-top: 2px; }

.tick a { color: var(--accent); }

.tick-error { color: #ffb4b4; }

.err { display: block; margin-top: 6px; }

.empty { padding: 20px 0; }

footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

footer a { color: var(--muted); }

.splash {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: var(--page);
  animation: dismiss 0.35s ease 2s forwards;
}

.splash-mark {
  margin: 0;
  font-size: clamp(40px, 10vw, 72px);
  font-weight: 800;
  letter-spacing: -0.05em;
}

@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dismiss {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .offer, .splash { animation: none; }
  .splash { display: none; }
}

@media (min-width: 800px) {
  .front {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-areas: "logo copy joined";
  }
  .joined { text-align: right; max-width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .flip { transition: none; }
}
