:root {
  color-scheme: dark;
  --finish: #f5b8b4;
  --accent: #d97d8d;
  --accent-soft: #fde7e5;
  --image-filter: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

::selection {
  background: #f7ce68;
  color: #111217;
}

#cosmos,
#sparkLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#cosmos {
  z-index: 0;
  width: 100vw;
  height: 100vh;
  background: #05060a;
}

#sparkLayer {
  z-index: 40;
  overflow: hidden;
}

.announcement {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  isolation: isolate;
}

.announcement::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 36rem),
    linear-gradient(180deg, rgba(5, 6, 10, 0.38), #05060a 86%);
  content: "";
  transition: background 320ms ease;
}

.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.intro-stack,
.screen-inner {
  width: min(72rem, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}

.intro-stack {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(1.2rem, 4vw, 2.4rem);
  text-align: center;
}

.screen-inner {
  display: grid;
  align-items: center;
  gap: 2rem;
}

.details-layout,
.color-layout,
.final-layout {
  grid-template-columns: minmax(0, 0.82fr) minmax(20rem, 0.78fr);
}

.copy {
  max-width: 43rem;
}

.intro-copy {
  max-width: 58rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #f7ce68;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.copy h1,
.copy h2 {
  margin: 0;
  color: #fff8ed;
  font-size: clamp(3rem, 8vw, 7.2rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.86;
  text-wrap: balance;
}

.intro-copy h1 {
  line-height: 1.02;
}

.copy h2 {
  font-size: clamp(3rem, 6.2vw, 5.6rem);
}

.copy h1 span {
  display: block;
}

.intro-copy h1 span + span {
  margin-top: 0.08em;
}

.copy p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: #d9d6cc;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.55;
  text-wrap: pretty;
}

.intro-after {
  display: none;
  margin: 1.25rem auto 0;
  max-width: 44rem;
  place-items: center;
  row-gap: 0.9rem;
}

.announcement[data-opened="true"] .intro-before {
  display: none;
}

.announcement[data-opened="true"] .intro-after {
  display: grid;
}

.intro-after p {
  margin: 0 !important;
  line-height: 1.18 !important;
}

.intro-after .command-button {
  margin-top: 0.45rem;
}

.present-stage {
  position: relative;
  display: grid;
  width: min(38rem, 100%);
  min-height: clamp(20rem, 44vw, 32rem);
  place-items: center;
}

.gift-button {
  position: relative;
  z-index: 3;
  width: min(22rem, 72vw);
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 34px 54px rgba(0, 0, 0, 0.48));
}

.gift-button img,
.pop-laptop,
.preview-laptop,
.final-image img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.gift-button:focus-visible,
.command-button:focus-visible,
.ghost-button:focus-visible,
.finish-choice:focus-visible {
  outline: 3px solid rgba(247, 206, 104, 0.7);
  outline-offset: 0.35rem;
}

.pop-laptop {
  position: absolute;
  z-index: 4;
  width: min(34rem, 88vw);
  opacity: 0;
  filter:
    var(--image-filter)
    drop-shadow(0 32px 58px rgba(0, 0, 0, 0.44));
  pointer-events: none;
}

.detail-list,
.choice-stage {
  display: grid;
  gap: 1rem;
}

.detail-pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.08)), rgba(255, 255, 255, 0.035));
  padding: 1.2rem;
  cursor: default;
}

.detail-pill strong,
.detail-pill span {
  display: block;
}

.detail-pill strong {
  color: #fff8ed;
  font-size: 1.5rem;
  font-weight: 950;
  line-height: 1;
}

.detail-pill span {
  margin-top: 0.5rem;
  color: #d9d6cc;
  font-size: 1rem;
  font-weight: 700;
}

.command-button,
.ghost-button,
.finish-choice {
  border: 0;
  cursor: pointer;
}

.command-button,
.ghost-button {
  display: inline-flex;
  min-height: 3.45rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 1.45rem;
  font-size: 0.85rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.command-button {
  background: #fff8ed;
  color: #111217;
  box-shadow: 0 22px 60px rgba(255, 255, 255, 0.15);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff8ed;
}

.finish-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.choice-command {
  margin-top: 1rem;
  width: min(100%, 18rem);
}

.finish-choice {
  display: grid;
  min-height: 5.8rem;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #fff8ed;
  padding: 0.8rem;
  text-align: left;
}

.finish-choice[aria-pressed="true"] {
  border-color: var(--choice-accent);
  background: color-mix(in srgb, var(--choice-accent) 20%, rgba(255, 255, 255, 0.055));
}

.finish-swatch {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.06)),
    linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.finish-choice strong,
.finish-choice small {
  display: block;
}

.finish-choice strong {
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}

.finish-choice small {
  margin-top: 0.38rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.choice-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 18rem),
    rgba(255, 255, 255, 0.04);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.preview-laptop {
  margin: 0 auto;
  max-width: 30rem;
  filter:
    var(--image-filter)
    drop-shadow(0 30px 58px rgba(0, 0, 0, 0.42));
}

.finish-nameplate {
  display: flex;
  min-height: 4.4rem;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1rem;
}

.finish-nameplate span {
  color: white;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 1000;
  line-height: 0.84;
}

.finish-nameplate small {
  max-width: 12rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.final-image {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.34);
}

#toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 60;
  max-width: min(92vw, 32rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.84);
  color: white;
  font-size: 0.9rem;
  font-weight: 850;
  opacity: 0;
  padding: 0.85rem 1.05rem;
  pointer-events: none;
  transform: translate(-50%, 1rem);
  backdrop-filter: blur(20px);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spark {
  position: fixed;
  left: 0;
  top: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--spark-color, #f7ce68);
  box-shadow: 0 0 18px var(--spark-color, #f7ce68);
  pointer-events: none;
}

@media (max-width: 880px) {
  .details-layout,
  .color-layout,
  .final-layout {
    grid-template-columns: 1fr;
  }

  .screen-inner {
    align-content: center;
  }

  .intro-stack {
    align-content: start;
    padding-top: 4rem;
  }

  .present-stage {
    min-height: 24rem;
  }
}

@media (max-width: 620px) {
  .intro-stack,
  .screen-inner {
    padding: 2.4rem 1rem 1.25rem;
  }

  .intro-stack {
    gap: 1rem;
  }

  .copy h1 {
    font-size: 2.55rem;
  }

  .copy h2 {
    font-size: 2.85rem;
  }

  .present-stage {
    min-height: 22rem;
  }

  .gift-button {
    width: min(17rem, 78vw);
  }

  .pop-laptop {
    width: min(25rem, 95vw);
  }

  .finish-choices {
    grid-template-columns: 1fr;
  }

  .finish-nameplate {
    align-items: start;
    flex-direction: column;
  }

  .finish-nameplate small {
    max-width: none;
    text-align: left;
  }
}
