@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fredoka-600.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/nunito-400.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/nunito-600.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/nunito-700.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/nunito-800.ttf") format("truetype");
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-mono-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --bg-peach: #ffe8d6;
  --bg-cream: #fff6ec;
  --surface: #ffffff;
  --ink: #3b2e25;
  --muted: #9c8a7a;
  --line: rgba(123, 89, 56, 0.13);
  --peach: #ffb48a;
  --rose: #f4a7c3;
  --rose-deep: #e85d8a;
  --mango: #ffd166;
  --matcha: #9bc48b;
  --green: #2e7d4f;
  --chocolate: #2a1e16;
  --gold-a: #f5c86b;
  --gold-b: #e8a64c;
  --glow-a: #f7b8cc;
  --glow-b: #ee8fb0;
  --shadow: 0 22px 58px rgba(150, 93, 45, 0.14);
  --shadow-soft: 0 12px 30px rgba(150, 93, 45, 0.1);
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-peach) 0%, var(--bg-cream) 68%, #fffaf4 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  content: "";
  background-image:
    radial-gradient(circle at 16px 16px, rgba(255, 180, 138, 0.22) 2px, transparent 2px),
    radial-gradient(circle at 46px 42px, rgba(232, 93, 138, 0.12) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 72%);
}

button,
input {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.blob {
  position: fixed;
  z-index: -3;
  width: 42vw;
  max-width: 520px;
  min-width: 230px;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.48;
  pointer-events: none;
}

.blob-peach {
  top: -120px;
  left: -110px;
  background: var(--peach);
}

.blob-rose {
  top: 24%;
  right: -160px;
  background: var(--rose);
}

.blob-mango {
  bottom: -180px;
  left: 24%;
  background: var(--mango);
  opacity: 0.36;
}

.shell {
  width: min(1460px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.lookup-panel,
.sidebar,
.right-rail > *,
.points-card,
.tier-card,
.metric,
.milestone-panel,
.list-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.lookup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.portal-open .lookup-panel {
  display: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2,
h3,
.brand-logo,
.points-number,
.tier-card strong {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  max-width: 790px;
  margin-bottom: 0;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.95;
}

.lookup-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 900;
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.lookup-row input {
  width: 100%;
  min-width: 0;
  height: 58px;
  border: 2px solid rgba(255, 180, 138, 0.48);
  border-radius: 999px;
  padding: 0 20px;
  color: var(--ink);
  background: var(--surface);
  font-family: "Space Mono", monospace;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lookup-row input:focus-visible,
.lookup-row button:focus-visible,
.code-pill button:focus-visible,
.tiny-action:focus-visible,
.portal-nav a:focus-visible,
.shop-button:focus-visible {
  outline: 4px solid rgba(232, 93, 138, 0.26);
  outline-offset: 3px;
}

.lookup-row input:focus-visible {
  border-color: var(--rose-deep);
}

.lookup-row button,
.shop-button,
.tiny-action {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.lookup-row button {
  min-width: 128px;
  height: 58px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mango), var(--gold-b));
  box-shadow: 0 12px 22px rgba(232, 166, 76, 0.32);
}

.lookup-row button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.message {
  min-height: 26px;
  margin: 10px 0 18px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.message.error {
  color: #b33a54;
}

.hidden {
  display: none;
}

.portal {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}

.portal.is-ready {
  animation: fadeUp 420ms ease both;
}

.sidebar,
.right-rail {
  position: sticky;
  top: 18px;
}

.sidebar {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.brand-logo {
  color: #c77b19;
  font-size: 1.6rem;
  line-height: 0.95;
}

.brand-lockup p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-nav {
  display: grid;
  gap: 7px;
}

.portal-nav a {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 12px;
  color: #6a5545;
  font-size: 0.94rem;
  font-weight: 900;
}

.portal-nav a.active,
.portal-nav a:hover {
  color: var(--rose-deep);
  background: #ffe8ef;
}

.portal-nav span {
  width: 18px;
  text-align: center;
}

.shop-button {
  display: inline-flex;
  justify-content: center;
  padding: 12px 16px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mango), var(--gold-b));
}

.sidebar-promo {
  overflow: hidden;
  border: 1px solid rgba(232, 93, 138, 0.18);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff1f5, #ffe3d3);
}

.sidebar-promo img {
  width: 100%;
  aspect-ratio: 1.15;
  object-fit: cover;
}

.sidebar-promo.image-missing {
  min-height: 150px;
  background:
    radial-gradient(circle at 80% 18%, rgba(232, 93, 138, 0.2), transparent 32%),
    linear-gradient(145deg, #fff1f5, #ffe3d3);
}

.sidebar-promo div {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.sidebar-promo strong {
  color: var(--rose-deep);
  font-size: 1.1rem;
  line-height: 1.05;
}

.sidebar-promo span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.portal-main {
  display: grid;
  gap: 18px;
}

.welcome-strip {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.welcome-strip span {
  color: var(--muted);
  font-weight: 800;
}

.welcome-strip h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
}

.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 10px 16px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 10px 22px rgba(46, 125, 79, 0.24);
  font-weight: 900;
}

.status-pill.inactive {
  border: 2px solid rgba(255, 180, 138, 0.64);
  color: var(--ink);
  background: rgba(255, 232, 214, 0.74);
  box-shadow: none;
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(160px, 0.85fr);
  gap: 18px;
  min-height: 258px;
  overflow: hidden;
  border-radius: 24px;
  padding: clamp(22px, 4vw, 34px);
  color: #fff8f0;
  background:
    radial-gradient(circle at 82% 28%, rgba(255, 209, 102, 0.2), transparent 18%),
    radial-gradient(circle at 20% 0%, rgba(244, 167, 195, 0.13), transparent 28%),
    linear-gradient(135deg, #2a1e16, #15100d);
  box-shadow: 0 28px 62px rgba(42, 30, 22, 0.22);
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 44% 12%, var(--mango) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 20%, var(--gold-a) 0 5px, transparent 6px),
    linear-gradient(28deg, transparent 48%, rgba(245, 200, 107, 0.8) 49% 52%, transparent 53%),
    linear-gradient(142deg, transparent 58%, rgba(245, 200, 107, 0.85) 59% 61%, transparent 62%);
  background-size: auto, auto, 120px 90px, 150px 110px;
  opacity: 0.75;
}

.hero-copy,
.hero-image {
  position: relative;
  z-index: 1;
}

.hero-copy h3 {
  max-width: 520px;
  margin: 0 0 12px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 0.9;
}

.hero-copy h3 span {
  color: transparent;
  background: linear-gradient(90deg, var(--peach), var(--rose-deep));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p {
  max-width: 460px;
  margin-bottom: 26px;
  color: rgba(255, 248, 240, 0.84);
  font-weight: 800;
}

.code-copy-wrap small {
  display: block;
  margin-bottom: 8px;
  color: var(--mango);
  font-weight: 900;
}

.code-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.code-pill span {
  font-family: "Space Mono", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.code-pill button,
.tiny-action {
  padding: 9px 12px;
  color: var(--rose-deep);
  background: #ffe3ed;
}

.hero-image {
  display: grid;
  place-items: center;
  min-height: 180px;
}

.hero-image img {
  width: min(100%, 280px);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 26px 25px rgba(0, 0, 0, 0.28));
}

.hero-image.image-missing {
  display: none;
}

.points-tier-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 18px;
}

.points-card,
.tier-card {
  padding: 24px;
}

.points-card {
  background:
    radial-gradient(circle at 86% 14%, rgba(255, 209, 102, 0.16), transparent 28%),
    rgba(255, 255, 255, 0.92);
}

.mini-label {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.points-number {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 16px;
  font-size: clamp(3.2rem, 8vw, 5.2rem);
  line-height: 0.9;
}

.points-number em {
  color: var(--rose-deep);
  font-family: "Nunito", sans-serif;
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 900;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffe5d2;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose-deep), var(--mango));
  transition: width 320ms ease;
}

.progress-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.tier-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: center;
  overflow: hidden;
}

.tier-card.tier-glow {
  background: linear-gradient(135deg, rgba(247, 184, 204, 0.28), rgba(255, 255, 255, 0.94));
}

.tier-card.tier-gold {
  background: linear-gradient(135deg, rgba(245, 200, 107, 0.3), rgba(255, 255, 255, 0.94));
}

.tier-card.tier-diamond {
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(135deg, rgba(248, 215, 131, 0.52), rgba(255, 255, 255, 0.94));
}

.card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 26%, rgba(255, 255, 255, 0.42) 45%, transparent 62%);
  transform: translateX(-120%);
  animation: shineSweep 4.8s ease-in-out infinite;
}

.tier-glow .card-shine,
.tier-gold .card-shine {
  display: none;
}

.tier-medallion {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 10px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4d0, var(--gold-a));
  box-shadow: inset 0 0 0 1px rgba(138, 85, 19, 0.18), 0 18px 30px rgba(166, 105, 30, 0.18);
  font-size: 2.2rem;
}

.tier-card > div:last-child {
  position: relative;
  z-index: 1;
}

.tier-card strong {
  display: block;
  color: #c77b19;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.tier-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  min-height: 156px;
  border-top: 4px solid var(--rose-deep);
  padding: 18px;
}

.metric-mango {
  border-top-color: var(--mango);
}

.metric-matcha {
  border-top-color: var(--matcha);
}

.metric-credit {
  border-top-color: var(--gold-b);
}

.icon-chip,
.step-chip {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffe4ee;
  font-size: 1.2rem;
}

.metric-mango .icon-chip {
  background: #fff2c8;
}

.metric-matcha .icon-chip {
  background: #e7f3df;
}

.metric-credit .icon-chip {
  background: #efe2ff;
}

.metric span {
  display: block;
  margin: 12px 0 8px;
  color: var(--muted);
  font-weight: 900;
}

.metric strong {
  display: block;
  color: var(--ink);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  line-height: 0.95;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
}

.milestone-panel,
.list-panel {
  padding: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.section-heading h3 {
  margin: 0;
  font-size: 1.22rem;
}

.section-heading span {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--rose-deep);
  background: #fff0f5;
  font-weight: 900;
}

.milestone-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.milestone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.milestone:not(:last-child)::after {
  position: absolute;
  top: 18px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 3px;
  border-radius: 999px;
  background: #f2d4c7;
  content: "";
}

.milestone.done:not(:last-child)::after {
  background: var(--rose-deep);
}

.milestone-circle {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 3px solid #f2d4c7;
  border-radius: 999px;
  color: var(--muted);
  background: #fffaf4;
  font-weight: 900;
}

.milestone.done .milestone-circle {
  border-color: var(--rose-deep);
  color: #fff;
  background: var(--rose-deep);
}

.milestone strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.milestone small {
  font-weight: 900;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.list {
  display: grid;
}

.list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.list-item:first-child {
  border-top: 0;
}

.list-title {
  margin: 0 0 4px;
  font-weight: 900;
}

.list-title.order-id {
  font-family: "Space Mono", monospace;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.list-subtitle,
.list-detail {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.list-detail {
  margin-top: 5px;
}

.list-value {
  color: var(--green);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

#points-ledger .list-value {
  color: var(--rose-deep);
}

.empty {
  margin: 0;
  padding: 18px 0 2px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.perk-note {
  line-height: 1.5;
}

.right-rail {
  display: grid;
  gap: 18px;
}

.guide-card,
.offer-card {
  padding: 20px;
}

.guide-card ol {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-card li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.guide-card strong {
  display: block;
  margin-bottom: 4px;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.offer-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
  color: #fff8f0;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 209, 102, 0.28), transparent 25%),
    linear-gradient(145deg, #2a1e16, #15100d);
}

.offer-card p {
  margin: 0 0 8px;
  color: var(--rose);
  font-weight: 900;
}

.offer-card strong {
  display: block;
  max-width: 220px;
  line-height: 1.25;
}

.offer-card img {
  width: min(100%, 210px);
  justify-self: end;
  object-fit: contain;
  filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.3));
}

.offer-card.image-missing {
  min-height: 230px;
}

@keyframes shineSweep {
  0%,
  48% {
    transform: translateX(-120%);
  }

  68%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .lookup-panel {
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 460px);
  }

  .lookup-row {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 1180px) {
  .portal {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    position: static;
  }
}

@media (max-width: 940px) {
  .portal {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .portal-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .portal-nav a {
    flex: 0 0 auto;
  }

  .sidebar-promo {
    display: none;
  }

  .points-tier-row,
  .bottom-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .shell {
    width: min(100% - 20px, 1460px);
    padding-top: 12px;
  }

  .hero-card {
    grid-template-columns: 1fr;
  }

  .hero-image {
    min-height: 120px;
  }

  .metric-grid,
  .milestone-strip {
    grid-template-columns: 1fr;
  }

  .milestone {
    justify-items: start;
    grid-template-columns: 38px 1fr;
    text-align: left;
  }

  .milestone small {
    grid-column: 2;
  }

  .milestone:not(:last-child)::after {
    top: 42px;
    left: 18px;
    width: 3px;
    height: calc(100% - 10px);
  }

  .tier-card {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 1fr;
  }

  .list-value {
    justify-self: start;
  }

  .welcome-strip {
    display: grid;
  }

  .status-pill {
    justify-self: start;
  }
}

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