/*
 * The getcheer.app home page. Colours and type come from the app's theme
 * file (src/theme/tokens.ts), which follows Cheer Design System v1 in Figma.
 * Fonts are served from here, so visitors aren't sent to anyone else.
 */
@font-face {
  font-family: "Young Serif";
  src: url("/fonts/YoungSerif_400Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Base */
  --surface: #f9f7fd;
  --card: #ffffff;
  --line: #e7e3ee;
  --ink: #1d1b23;
  --ink-muted: #494650;
  --focus: #5b54b8;
  /* Brand and states */
  --cheer: #ee5f00;
  --cheer-soft: #ffebd1;
  --love: #c92e6f;
  --love-soft: #ffe8f4;
  --love-ink: #b8336a;
  /* Type chips */
  --win-bg: #e3f5ea;
  --step-bg: #fdebdd;
  --hardday-bg: #e4effb;
  /* Pills */
  --notes-bg: #ecebfb;
  --notes-icon: #5a56b8;
  /* Sky and intro mesh */
  --sky-lilac: #c9b8f5;
  --intro-orange: #ff9a1f;
  --intro-pink: #ffc6f5;
  --intro-lilac: #d9ccfa;
  --intro-aqua: #cff3f7;
  --intro-peach: #ffd9c2;
  --character-orange: #f5814c;
  --character-pink: #f4a3be;

  --radius-card: 24px;
  --shadow: 0 1px 2px rgba(29, 27, 35, 0.04), 0 12px 32px rgba(29, 27, 35, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
  /* No single word left alone on the last line. */
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 10;
  width: calc(100% - 32px);
  max-width: 1120px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Young Serif", Georgia, serif;
  font-size: 24px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark .icon {
  width: 28px;
  height: 28px;
  color: var(--cheer);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 16px;
}

.nav-links a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--ink);
  color: var(--card);
}

.outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}

.large {
  min-height: 56px;
  padding: 0 32px;
  font-size: 18px;
}

/* ---------- Hero: characters circling the headline ---------- */

.hero {
  /* Tall, so the circle turns as you scroll through it. */
  height: 180vh;
  position: relative;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--surface);
  background-image:
    radial-gradient(45% 40% at 8% 10%, var(--intro-pink) 0%, transparent 70%),
    radial-gradient(40% 40% at 95% 5%, var(--intro-peach) 0%, transparent 70%),
    radial-gradient(45% 45% at 0% 95%, var(--intro-aqua) 0%, transparent 70%),
    radial-gradient(45% 45% at 100% 90%, var(--intro-lilac) 0%, transparent 70%);
}

.ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --char: clamp(100px, 17vh, 180px);
}

.ring img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--char);
  height: var(--char);
  margin: calc(var(--char) / -2);
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(29, 27, 35, 0.12));
  /* Placed on an oval by the script below, and kept upright. */
  will-change: transform;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
}

/* Always two lines: "Your effort," then "warmly cheered." */
.hero h1 .line {
  display: block;
  white-space: nowrap;
}

.glow {
  font-style: italic;
  background: linear-gradient(100deg, var(--character-orange), var(--love) 55%, var(--focus));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Young Serif has no italic, so the browser leans it. Room for the lean. */
  padding-right: 0.08em;
}

.hero p {
  font-size: 20px;
  color: var(--ink-muted);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Sound familiar: quotes around a phone ---------- */

.section {
  position: relative;
  padding: 120px 24px;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--cheer-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.section h2 {
  font-size: clamp(36px, 5vw, 60px);
}

.section-head p {
  font-size: 20px;
  color: var(--ink-muted);
}

.familiar {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.quote {
  position: absolute;
  z-index: 2;
  max-width: 340px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
}

.quote strong {
  display: block;
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.quote span {
  font-size: 16px;
  color: var(--ink-muted);
}

.quote.one {
  top: 60px;
  left: 0;
  transform: rotate(-3deg);
}

.quote.two {
  top: 200px;
  right: 0;
  transform: rotate(3deg);
}

.quote.three {
  bottom: 80px;
  left: 6%;
  transform: rotate(2deg);
}

/* ---------- The phone ---------- */

.phone {
  position: relative;
  width: 320px;
  flex-shrink: 0;
  padding: 12px;
  border-radius: 52px;
  background: var(--ink);
  box-shadow: 0 30px 60px rgba(29, 27, 35, 0.22);
}

.screen {
  position: relative;
  height: 640px;
  border-radius: 42px;
  overflow: hidden;
  background-color: var(--surface);
  background-image:
    radial-gradient(70% 35% at 0% 0%, var(--intro-pink) 0%, transparent 70%),
    radial-gradient(60% 30% at 100% 0%, var(--intro-peach) 0%, transparent 70%),
    radial-gradient(70% 40% at 100% 100%, var(--intro-lilac) 0%, transparent 70%);
  padding: 56px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
}

.screen::before {
  /* The island. */
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 96px;
  height: 28px;
  margin-left: -48px;
  border-radius: 999px;
  background: var(--ink);
}

.screen-title {
  font-family: "Young Serif", Georgia, serif;
  font-size: 26px;
  line-height: 1.1;
  padding: 0 4px;
}

.screen-sub {
  color: var(--ink-muted);
  font-size: 13px;
  padding: 0 4px 4px;
}

.moment {
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.chip.win {
  background: var(--win-bg);
}

.chip.step {
  background: var(--step-bg);
}

.chip.hard {
  background: var(--hardday-bg);
}

.who {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: 13px;
}

.who b {
  color: var(--ink);
  font-weight: 600;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--sky-lilac);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.moment-title {
  font-weight: 600;
  font-size: 16px;
}

.moment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  border: 1.5px solid var(--line);
  background: var(--card);
}

.mini.cheer {
  background: var(--cheer);
  border-color: var(--cheer);
  color: var(--card);
}

.mini.love {
  background: var(--love);
  border-color: var(--love);
  color: var(--card);
}

.mini.cheered {
  background: var(--cheer-soft);
  border-color: var(--cheer-soft);
}

.arrival {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 20px;
  text-align: center;
  background:
    radial-gradient(60% 70% at 0% 0%, var(--intro-pink) 0%, transparent 70%),
    radial-gradient(60% 70% at 100% 0%, var(--intro-peach) 0%, transparent 70%),
    radial-gradient(70% 70% at 50% 100%, var(--intro-aqua) 0%, transparent 70%), var(--card);
}

.arrival img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.arrival b {
  display: block;
  font-family: "Young Serif", Georgia, serif;
  font-weight: 400;
  font-size: 19px;
  margin: 4px 0 2px;
}

.arrival span {
  color: var(--ink-muted);
  font-size: 13px;
}

.note-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
}

.pill-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pill-icon.notes {
  background: var(--notes-bg);
  color: var(--notes-icon);
}

.pill-icon.love {
  background: var(--love-soft);
  color: var(--love-ink);
}

.note-row p {
  font-size: 13px;
  color: var(--ink-muted);
}

.note-row b {
  color: var(--ink);
}

/* ---------- How it works ---------- */

.steps {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  padding: 32px;
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 8px;
}

.step-card h3 {
  font-size: 28px;
}

.step-card p {
  color: var(--ink-muted);
}

.step-card .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ---------- Two phones ---------- */

.duo {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.duo-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.duo-copy h2 {
  font-size: clamp(36px, 5vw, 56px);
}

.duo-copy p {
  font-size: 20px;
  color: var(--ink-muted);
}

.promises {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.promises li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.promises .icon {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--cheer);
}

/* ---------- Closing ---------- */

.closing {
  position: relative;
  overflow: hidden;
  margin: 0 24px 24px;
  padding: 120px 24px;
  border-radius: 48px;
  text-align: center;
  background-color: var(--card);
  background-image:
    radial-gradient(50% 60% at 0% 0%, var(--intro-pink) 0%, transparent 70%),
    radial-gradient(50% 60% at 100% 0%, var(--intro-orange) 0%, transparent 75%),
    radial-gradient(60% 60% at 50% 100%, var(--intro-aqua) 0%, transparent 70%);
}

.closing .faces {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.closing .faces img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 -10px;
}

.closing h2 {
  font-size: clamp(40px, 6vw, 72px);
  max-width: 760px;
  margin: 0 auto 20px;
}

.closing p {
  font-size: 20px;
  color: var(--ink-muted);
  max-width: 520px;
  margin: 0 auto 32px;
}

footer {
  padding: 24px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: center;
  font-size: 15px;
  color: var(--ink-muted);
}

footer a {
  color: inherit;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.seen {
  opacity: 1;
  transform: none;
}

.quote.reveal.seen.one {
  transform: rotate(-3deg);
}

.quote.reveal.seen.two {
  transform: rotate(3deg);
}

.quote.reveal.seen.three {
  transform: rotate(2deg);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.seen {
    opacity: 1;
    transition: none;
  }
  .button {
    transition: none;
  }
}

/* ---------- Smaller screens ---------- */

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .familiar {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .quote {
    position: static;
    max-width: 420px;
    width: 100%;
  }

  .familiar .phone {
    order: -1;
    margin-bottom: 24px;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .duo {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 48px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
  }

  .hero {
    height: 150vh;
  }

  .ring {
    --char: 84px;
  }

  /* Shrinks on the smallest phones so "warmly cheered." stays on one line. */
  .hero h1 {
    font-size: min(38px, 9.6vw);
  }

  .hero p {
    font-size: 18px;
  }

  .section {
    padding: 60px 20px;
  }

  .section-head {
    margin-bottom: 40px;
  }

  .phone {
    width: 300px;
  }

  .screen-title {
    font-size: 23px;
  }

  .screen {
    height: 600px;
  }

  .closing {
    margin: 0 12px 12px;
    padding: 64px 20px;
    border-radius: 36px;
  }

  .closing .faces img {
    width: 68px;
    height: 68px;
  }
}

/* ---------- Plain pages (privacy) ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}

.page h1 {
  font-size: clamp(40px, 6vw, 60px);
  margin-bottom: 16px;
}

.page .lede {
  font-size: 20px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.page .updated {
  font-size: 15px;
  color: var(--ink-muted);
  margin-bottom: 40px;
}

.page h2 {
  font-size: 30px;
  margin: 48px 0 12px;
}

.page p,
.page li {
  color: var(--ink-muted);
}

.page p + p {
  margin-top: 12px;
}

.page ul {
  margin: 12px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page b {
  color: var(--ink);
}

.page a {
  color: var(--ink);
}

.summary {
  padding: 24px 28px;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
}

.summary ul {
  margin: 0;
}

/* The menu button stays on one line, and slims down on the smallest phones. */
.nav .button {
  white-space: nowrap;
}

@media (max-width: 360px) {
  .nav {
    padding-left: 16px;
  }

  .nav .button {
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }
}

/* ---------- Around the phone: notes popping in, sparkles drifting ---------- */

.toast {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  font-size: 15px;
  white-space: nowrap;
}

.toast b {
  display: block;
  font-weight: 600;
}

.toast small {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.toast-icon .icon {
  width: 22px;
  height: 22px;
}

.toast-icon.cheer {
  background: var(--cheer-soft);
  color: var(--cheer);
}

.toast-icon.love {
  background: var(--love-soft);
  color: var(--love-ink);
}

.toast-gift {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Overlapping the phone's edges, between the quote cards. */
.toast.t1 {
  top: -28px;
  left: calc(50% + 90px);
}

.toast.t2 {
  top: 300px;
  right: calc(50% + 120px);
}

.toast.t3 {
  top: 470px;
  left: calc(50% + 120px);
}

.toast.reveal {
  transform: translateY(12px) scale(0.96);
}

.toast.reveal.seen {
  transform: none;
}

.toast.t2.reveal {
  transition-delay: 0.25s;
}

.toast.t3.reveal {
  transition-delay: 0.5s;
}

.spark {
  position: absolute;
  z-index: 1;
  width: 26px;
  height: 26px;
  fill: currentColor;
  animation: drift 5s ease-in-out infinite;
}

/* Character colours, as round the app's characters. */
.spark.s1 {
  top: -24px;
  left: calc(50% - 200px);
  color: var(--character-pink);
}

.spark.s2 {
  top: 140px;
  left: calc(50% + 200px);
  width: 30px;
  height: 30px;
  color: #f9d36e;
  animation-delay: -1.2s;
}

.spark.s3 {
  top: 250px;
  right: calc(50% + 200px);
  color: #f5b489;
  animation-delay: -2.4s;
}

.spark.s4 {
  top: 400px;
  left: calc(50% + 190px);
  color: var(--character-orange);
  animation-delay: -3.1s;
}

.spark.s5 {
  bottom: 40px;
  right: calc(50% + 190px);
  width: 22px;
  height: 22px;
  color: var(--sky-lilac);
  animation-delay: -1.8s;
}

.spark.s6 {
  bottom: -10px;
  left: calc(50% + 170px);
  color: #7ad3ca;
  animation-delay: -0.6s;
}

@keyframes drift {
  50% {
    transform: translateY(-8px) rotate(8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spark {
    animation: none;
  }
}

/* On smaller screens the notes sit over the phone's edges, staggered. */
@media (max-width: 960px) {
  .familiar .toast {
    position: absolute;
    width: max-content;
    max-width: 270px;
  }

  .familiar .toast.t1 {
    top: 96px;
    left: auto;
    right: max(0px, calc(50% - 190px));
  }

  .familiar .toast.t2 {
    top: 300px;
    left: max(0px, calc(50% - 190px));
    right: auto;
  }

  .familiar .toast.t3 {
    top: 500px;
    left: auto;
    right: max(0px, calc(50% - 190px));
  }

  .spark.s1 {
    top: -16px;
    left: calc(50% - 170px);
  }

  .spark.s2 {
    top: 90px;
    left: calc(50% + 150px);
  }

  .spark.s3,
  .spark.s4,
  .spark.s5,
  .spark.s6 {
    display: none;
  }
}

/* Links: one unbroken underline, sitting just below the letters. */
a {
  text-decoration-skip-ink: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ---------- Hero sparkles ---------- */

.hero-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hs {
  position: absolute;
  width: 28px;
  height: 28px;
  fill: currentColor;
  animation: drift 5s ease-in-out infinite;
}

/* Between the characters and the words, in character colours. */
.hs.h1 { top: 24%; left: 30%; color: var(--character-pink); }
.hs.h2 { top: 20%; left: 66%; width: 32px; height: 32px; color: #f9d36e; animation-delay: -1.2s; }
.hs.h3 { top: 47%; left: 19%; color: #f5b489; animation-delay: -2.4s; }
.hs.h4 { top: 52%; left: 79%; color: var(--character-orange); animation-delay: -3.1s; }
.hs.h5 { top: 76%; left: 26%; width: 30px; height: 30px; color: var(--cheer); animation-delay: -0.8s; }
.hs.h6 { top: 80%; left: 71%; color: #7ad3ca; animation-delay: -1.8s; }
.hs.h7 { top: 33%; left: 84%; width: 22px; height: 22px; color: var(--sky-lilac); animation-delay: -2.9s; }
.hs.h8 { top: 66%; left: 12%; width: 22px; height: 22px; color: #a7d4a1; animation-delay: -0.4s; }

@media (prefers-reduced-motion: reduce) {
  .hs {
    animation: none;
  }
}

/* On a phone the middle is all words, so only the corners keep sparkles. */
@media (max-width: 600px) {
  .hs {
    width: 20px;
    height: 20px;
  }
  .hs.h1 { top: 27%; left: 24%; }
  .hs.h2 { top: 17%; left: 84%; width: 22px; height: 22px; }
  .hs.h5 { top: 84%; left: 30%; width: 22px; height: 22px; }
  .hs.h6 { top: 86%; left: 66%; }
  .hs.h3,
  .hs.h4,
  .hs.h7,
  .hs.h8 {
    display: none;
  }
}

/* ---------- A card to open, in the Cheers phone ---------- */

#cheers-screen {
  /* Smaller arrival, so the card fits on screen. */
  gap: 10px;
}

#cheers-screen .arrival {
  padding: 12px 16px 14px;
}

#cheers-screen .arrival img {
  width: 64px;
  height: 64px;
}

.sealed {
  display: block;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  perspective: 550px;
}

.sealed:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 20px;
}

/*
 * The app's ticket: an iridescent mirror with a notch cut out of each side,
 * a pattern on top and a soft glint. Leans towards your pointer.
 */
.ticket {
  --lean-x: 0deg;
  --lean-y: 0deg;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1.7;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  /* A white base under the colours, so they come out light and soft. */
  background: var(--card);
  box-shadow: 0 12px 24px rgba(29, 27, 35, 0.12);
  transform: perspective(550px) rotateX(var(--lean-x)) rotateY(var(--lean-y));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.3, 1);
  /* The side notches, cut right through so the screen shows. */
  -webkit-mask:
    radial-gradient(circle 10px at left center, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 10px at right center, #0000 97%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 10px at left center, #0000 97%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle 10px at right center, #0000 97%, #000) right / 51% 100% no-repeat;
}

.ticket-colours {
  position: absolute;
  z-index: -3;
  width: 820px;
  height: 820px;
  top: 50%;
  left: 50%;
  margin: -410px 0 0 -410px;
  background: linear-gradient(
    135deg,
    #c9b8f5,
    #9cc8f2,
    #cff2de,
    #f4b8d9,
    #f5b489,
    #c9b8f5,
    #9cc8f2,
    #cff2de,
    #f4b8d9,
    #f5b489
  );
  opacity: 0.6;
  animation: spin 24s linear infinite;
}

.ticket-pattern {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("/img/ticket-pattern.svg") 0 0 / 72px 72px repeat;
  opacity: 0.45;
}

.ticket-glint {
  position: absolute;
  z-index: -1;
  top: -60%;
  bottom: -60%;
  left: 50%;
  width: 120px;
  margin-left: -60px;
  background: linear-gradient(90deg, #fff0, #fff6, #fff0);
  animation: glint 8s ease-in-out infinite;
}

/* A whisper of drift, as the app's calm card. */
.calm-drift {
  animation: calm 8s ease-in-out infinite;
}

.calm-drift:hover {
  animation-play-state: paused;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes glint {
  0%,
  100% {
    transform: translateX(-140px) rotate(24deg);
  }
  50% {
    transform: translateX(140px) rotate(24deg);
  }
}

@keyframes calm {
  0%,
  100% {
    transform: perspective(550px) rotateX(calc(var(--lean-x) + 2.5deg)) rotateY(var(--lean-y));
  }
  25% {
    transform: perspective(550px) rotateX(var(--lean-x)) rotateY(calc(var(--lean-y) + 2.5deg));
  }
  50% {
    transform: perspective(550px) rotateX(calc(var(--lean-x) - 2.5deg)) rotateY(var(--lean-y));
  }
  75% {
    transform: perspective(550px) rotateX(var(--lean-x)) rotateY(calc(var(--lean-y) - 2.5deg));
  }
}

.ticket-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.sealed .ticket-face img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.ticket-label {
  padding: 4px 14px;
  border-radius: 8px;
  background: var(--card);
  font-weight: 600;
  font-size: 15px;
  transform: rotate(-3deg);
}

.ticket-hint {
  font-size: 12px;
  color: var(--ink-muted);
}

.pill-icon.cards {
  background: var(--love-soft);
  color: #a84d7d;
}

.opened-row {
  align-items: center;
}

.opened-row p {
  flex: 1;
}

.again {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* The sheet, sliding up inside the phone. */
.sheet-shade {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(29, 27, 35, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sheet-shade.on {
  opacity: 1;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px 22px;
  border-radius: 24px 24px 0 0;
  background: var(--card);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.sheet.on {
  transform: none;
}

.grabber {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  margin-bottom: 10px;
}

.sheet-title {
  font-family: "Young Serif", Georgia, serif;
  font-size: 22px;
}

.sheet-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px 0 18px;
}

.card-face {
  width: 84%;
  aspect-ratio: 1.05;
}

.card-face img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin-bottom: 2px;
}

.card-line {
  font-family: "Young Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.2;
  padding: 0 16px;
}

.card-from,
.card-day {
  font-size: 12px;
  color: var(--ink-muted);
}

.card-from b {
  color: var(--ink);
  font-weight: 400;
}

.keep {
  width: 100%;
}

/* The cheer burst, from the middle of the card. */
.burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.burst .bit {
  position: absolute;
  top: 0;
  left: 0;
  fill: currentColor;
}

.burst .dot {
  border-radius: 999px;
}

.ring-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: -60px;
  border-radius: 999px;
  border: 2px solid var(--cheer);
  animation: pulse 1.1s 0.2s ease-out both;
}

@keyframes pulse {
  from {
    opacity: 0.5;
    transform: scale(1.56);
  }
  to {
    opacity: 0;
    transform: scale(4.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .calm-drift,
  .ticket-colours,
  .ticket-glint {
    animation: none;
  }
  .ticket,
  .sheet,
  .sheet-shade {
    transition: none;
  }
}

/* Hidden means hidden, whatever the layout. */
[hidden] {
  display: none !important;
}

/* Nothing on the phone's screen squashes to fit. */
.screen > * {
  flex-shrink: 0;
}

.nowrap {
  white-space: nowrap;
}

.opened-row {
  gap: 8px;
  padding-right: 10px;
}

.opened-row .again {
  padding: 0 12px;
}

.opened-row p {
  min-width: 0;
}

.arrival span {
  display: block;
  text-wrap: balance;
}

