:root {
  color-scheme: light;
  --ink: #3d3029;
  --muted: #7a665b;
  --cream: #fff8ed;
  --cream-soft: rgba(255, 248, 237, 0.82);
  --sand: #ead7bf;
  --beige: #d9b992;
  --peach: #e9a98e;
  --rose: #c98479;
  --cocoa: #76533d;
  --sage: #8e9a7d;
  --line: rgba(118, 83, 61, 0.16);
  --focus: rgba(201, 132, 121, 0.28);
  --shadow: 0 24px 70px rgba(92, 62, 39, 0.24);
  --radius-card: 28px;
  --radius-panel: 22px;
  --radius-control: 18px;
  --radius-key: 16px;
  --radius-pill: 999px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f2dfca;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.56), rgba(238, 207, 179, 0.36)),
    url("assets/dance-studio-warm.png") center 48% / cover;
}

body.access-checking .page-shell {
  visibility: hidden;
}

button,
input {
  font: inherit;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  position: relative;
  display: grid;
  height: 100svh;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) 16px
    max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  place-items: end center;
}

.page-shell::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.5), transparent 36%),
    linear-gradient(0deg, rgba(96, 63, 40, 0.22), transparent 44%);
  pointer-events: none;
}

.light-wash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 62% 8%, rgba(255, 255, 255, 0.72), transparent 36%);
  pointer-events: none;
}

.floating-notes span {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(118, 83, 61, 0.16);
  border-radius: 50%;
  opacity: 0.72;
  animation: float-note 5s ease-in-out infinite;
}

.floating-notes span::after {
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 18px;
  height: 1px;
  background: rgba(118, 83, 61, 0.16);
  content: "";
  transform: rotate(-26deg);
}

.floating-notes span:nth-child(1) {
  top: 17%;
  right: 12%;
}

.floating-notes span:nth-child(2) {
  top: 36%;
  left: 8%;
  animation-delay: 1.2s;
}

.floating-notes span:nth-child(3) {
  right: 18%;
  bottom: 16%;
  animation-delay: 2.4s;
}

.unlock-card,
.match-card,
.facts-card,
.photo-card,
.boys-card,
.selfie-card,
.success-card {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 32px), 430px);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 237, 0.64)),
    var(--cream-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.12);
}

.unlock-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  overflow: hidden;
}

.match-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
}

.facts-card {
  display: grid;
  gap: 12px;
  padding: 17px 16px 15px;
  overflow: hidden;
}

.photo-card,
.boys-card,
.selfie-card {
  display: grid;
  gap: 12px;
  padding: 17px 16px 15px;
  overflow: hidden;
}

.unlock-card::before,
.match-card::before,
.facts-card::before,
.photo-card::before,
.boys-card::before,
.selfie-card::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: calc(var(--radius-card) - 8px);
  content: "";
  pointer-events: none;
}

.unlock-card::after,
.match-card::after,
.facts-card::after,
.photo-card::after,
.boys-card::after,
.selfie-card::after {
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(
    110deg,
    transparent 34%,
    rgba(255, 255, 255, 0.68) 49%,
    transparent 64%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-34%);
}

.celebration-confetti {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.celebration-confetti span {
  position: absolute;
  top: 31%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--confetti-color, #f7b6ad);
  opacity: 0;
  transform: translate(-50%, -50%) translateY(12px) scale(0.45) rotate(0deg);
  transform-origin: center;
}

.celebration-confetti span:nth-child(1) {
  --confetti-color: #f7b6ad;
  --confetti-x: -136px;
  --confetti-y: -74px;
  --confetti-rotate: 210deg;
}

.celebration-confetti span:nth-child(2) {
  --confetti-color: #f4d78d;
  --confetti-x: -92px;
  --confetti-y: -128px;
  --confetti-rotate: 160deg;
  width: 14px;
  height: 8px;
  border-radius: 4px;
  --confetti-delay: 60ms;
}

.celebration-confetti span:nth-child(3) {
  --confetti-color: #8e9a7d;
  --confetti-x: -36px;
  --confetti-y: -104px;
  --confetti-rotate: 240deg;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  --confetti-delay: 120ms;
}

.celebration-confetti span:nth-child(4) {
  --confetti-color: #fff8ed;
  --confetti-x: 34px;
  --confetti-y: -132px;
  --confetti-rotate: 120deg;
  --confetti-delay: 40ms;
}

.celebration-confetti span:nth-child(5) {
  --confetti-color: #e9a98e;
  --confetti-x: 86px;
  --confetti-y: -96px;
  --confetti-rotate: 260deg;
  width: 13px;
  height: 8px;
  border-radius: 4px;
  --confetti-delay: 150ms;
}

.celebration-confetti span:nth-child(6) {
  --confetti-color: #c98479;
  --confetti-x: 132px;
  --confetti-y: -62px;
  --confetti-rotate: 190deg;
  --confetti-delay: 90ms;
}

.celebration-confetti span:nth-child(7) {
  --confetti-color: #d9b992;
  --confetti-x: -118px;
  --confetti-y: 18px;
  --confetti-rotate: 300deg;
  width: 12px;
  height: 7px;
  border-radius: 4px;
  --confetti-delay: 170ms;
}

.celebration-confetti span:nth-child(8) {
  --confetti-color: #8e9a7d;
  --confetti-x: 124px;
  --confetti-y: 16px;
  --confetti-rotate: 250deg;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  --confetti-delay: 210ms;
}

.celebration-confetti span:nth-child(9) {
  --confetti-color: #f7b6ad;
  --confetti-x: -58px;
  --confetti-y: 42px;
  --confetti-rotate: 180deg;
  --confetti-delay: 230ms;
}

.celebration-confetti span:nth-child(10) {
  --confetti-color: #f4d78d;
  --confetti-x: 56px;
  --confetti-y: 42px;
  --confetti-rotate: 330deg;
  width: 14px;
  height: 8px;
  border-radius: 4px;
  --confetti-delay: 260ms;
}

.celebration-confetti span:nth-child(11) {
  --confetti-color: #fff8ed;
  --confetti-x: -12px;
  --confetti-y: -158px;
  --confetti-rotate: 140deg;
  --confetti-delay: 180ms;
}

.celebration-confetti span:nth-child(12) {
  --confetti-color: #c98479;
  --confetti-x: 10px;
  --confetti-y: 62px;
  --confetti-rotate: 280deg;
  width: 13px;
  height: 8px;
  border-radius: 4px;
  --confetti-delay: 300ms;
}

.unlock-card.is-celebrating .celebration-confetti,
.match-card.is-celebrating .celebration-confetti,
.facts-card.is-celebrating .celebration-confetti,
.photo-card.is-celebrating .celebration-confetti,
.boys-card.is-celebrating .celebration-confetti,
.selfie-card.is-celebrating .celebration-confetti {
  opacity: 1;
}

.unlock-card.is-celebrating .celebration-confetti span,
.match-card.is-celebrating .celebration-confetti span,
.facts-card.is-celebrating .celebration-confetti span,
.photo-card.is-celebrating .celebration-confetti span,
.boys-card.is-celebrating .celebration-confetti span,
.selfie-card.is-celebrating .celebration-confetti span {
  animation: confetti-burst 980ms cubic-bezier(0.17, 0.72, 0.24, 1) both;
  animation-delay: var(--confetti-delay, 0ms);
}

.top-bar {
  display: block;
}

.step-name,
.mission-label {
  margin: 0;
  color: var(--rose);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.step-name::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 5px rgba(201, 132, 121, 0.13);
  content: "";
}

.title-stack {
  min-width: 0;
}

h1,
h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 8.8vw, 44px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
}

.mascot-panel {
  position: relative;
  display: grid;
  width: 132px;
  height: 118px;
  margin: -7px auto -2px;
  place-items: center;
  isolation: isolate;
}

.mascot-panel::before {
  position: absolute;
  inset: 10px 7px 18px;
  border: 1px solid rgba(201, 132, 121, 0.2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 32%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(145deg, rgba(255, 240, 221, 0.82), rgba(233, 169, 142, 0.2));
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.26),
    0 14px 34px rgba(118, 83, 61, 0.13);
  content: "";
  z-index: -2;
}

.mascot-shadow {
  position: absolute;
  bottom: 10px;
  width: 82px;
  height: 14px;
  border-radius: 50%;
  background: rgba(118, 83, 61, 0.12);
  filter: blur(3px);
  transform-origin: center;
  animation: mascot-shadow 3.6s ease-in-out infinite;
  z-index: -1;
}

.quest-mascot {
  width: 112px;
  height: auto;
  filter: drop-shadow(0 12px 13px rgba(92, 62, 39, 0.18));
  transform-origin: center bottom;
  animation: mascot-breathe 3.6s ease-in-out infinite;
  will-change: transform;
}

.mascot-orbit {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mascot-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(201, 132, 121, 0.7);
  box-shadow: 0 0 0 5px rgba(201, 132, 121, 0.1);
  opacity: 0;
}

.mascot-orbit span:nth-child(1) {
  top: 20px;
  left: 16px;
}

.mascot-orbit span:nth-child(2) {
  top: 14px;
  right: 18px;
  background: rgba(142, 154, 125, 0.76);
  box-shadow: 0 0 0 5px rgba(142, 154, 125, 0.11);
}

.mascot-orbit span:nth-child(3) {
  right: 14px;
  bottom: 32px;
  background: rgba(233, 169, 142, 0.78);
  box-shadow: 0 0 0 5px rgba(233, 169, 142, 0.11);
}

.mascot-alert-mark {
  position: absolute;
  top: 14px;
  right: 12px;
  display: grid;
  width: 26px;
  height: 38px;
  place-items: center;
  color: #a85658;
  opacity: 0;
  pointer-events: none;
  transform: rotate(8deg) scale(0.86);
  transform-origin: center bottom;
}

.mascot-alert-mark span:first-child {
  width: 7px;
  height: 25px;
  border-radius: var(--radius-pill);
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(168, 86, 88, 0.12);
}

.mascot-alert-mark span:last-child {
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-radius: var(--radius-pill);
  background: currentColor;
}

.mascot-panel[data-mascot-mode="typing"] .quest-mascot {
  animation: mascot-listen 0.95s ease-in-out infinite;
}

.mascot-panel[data-mascot-mode="error"] .quest-mascot {
  animation: mascot-alert 0.28s ease-in-out 2;
}

.mascot-panel[data-mascot-mode="angry"]::before,
.mascot-panel[data-mascot-mode="error"]::before {
  border-color: rgba(168, 86, 88, 0.34);
  background:
    radial-gradient(circle at 42% 32%, rgba(255, 255, 255, 0.92), transparent 30%),
    linear-gradient(145deg, rgba(255, 235, 224, 0.88), rgba(168, 86, 88, 0.18));
}

.mascot-panel[data-mascot-mode="angry"] .quest-mascot {
  animation: mascot-angry 0.24s linear infinite;
  filter: drop-shadow(0 12px 13px rgba(92, 62, 39, 0.18)) saturate(1.06);
}

.mascot-panel[data-mascot-mode="angry"] .mascot-alert-mark,
.mascot-panel[data-mascot-mode="error"] .mascot-alert-mark {
  opacity: 1;
  animation: alert-mark-pop 0.56s ease-in-out infinite;
}

.mascot-panel[data-mascot-mode="happy"] .quest-mascot {
  animation: mascot-happy 0.72s cubic-bezier(0.26, 1.42, 0.48, 1) 2;
}

.mascot-panel[data-mascot-mode="happy"] .mascot-orbit span {
  animation: mascot-sparkle 0.92s ease-out infinite;
}

.mascot-panel[data-mascot-mode="happy"] .mascot-orbit span:nth-child(2) {
  animation-delay: 0.14s;
}

.mascot-panel[data-mascot-mode="happy"] .mascot-orbit span:nth-child(3) {
  animation-delay: 0.28s;
}

.match-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.match-mascot {
  width: 86px;
  height: 76px;
  margin: -4px 0;
}

.match-mascot::before {
  inset: 7px 5px 12px;
}

.match-mascot .quest-mascot {
  width: 74px;
}

.match-mascot .mascot-shadow {
  bottom: 6px;
  width: 58px;
  height: 10px;
}

.match-panel {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.match-panel span,
.match-status span {
  color: var(--rose);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-panel strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.match-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(118, 83, 61, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.78), transparent 36%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.74), rgba(255, 239, 222, 0.5)),
    rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 16px 32px rgba(118, 83, 61, 0.08);
  touch-action: none;
}

.match-tile {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(118, 83, 61, 0.09);
  border-radius: 20px;
  place-items: center;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 233, 0.9)),
    var(--cream);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -5px 12px rgba(118, 83, 61, 0.05),
    0 8px 18px rgba(118, 83, 61, 0.08);
  cursor: grab;
  touch-action: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.match-tile.is-dragging {
  z-index: 2;
  cursor: grabbing;
  box-shadow:
    0 16px 26px rgba(118, 83, 61, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transform: translate(var(--drag-x, 0), var(--drag-y, 0)) scale(1.04);
  transition: none;
}

.match-tile.is-drop-target {
  border-color: rgba(201, 132, 121, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -5px 12px rgba(118, 83, 61, 0.05),
    0 10px 22px rgba(118, 83, 61, 0.1),
    0 0 0 5px rgba(201, 132, 121, 0.1);
  transform: translate(var(--target-x, 0), var(--target-y, 0)) scale(1.025);
}

.match-tile.is-swapping {
  animation: tile-swap 300ms cubic-bezier(0.2, 0.84, 0.24, 1) both;
}

.match-tile.is-matched {
  border-color: rgba(142, 154, 125, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 233, 210, 0.9)),
    var(--cream);
}

.match-tile.is-matched .match-piece {
  animation: piece-collect 620ms cubic-bezier(0.2, 1.4, 0.35, 1) both;
}

.match-piece {
  position: relative;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.match-piece[data-piece="apple"] {
  width: 31px;
  height: 33px;
  border-radius: 48% 52% 45% 45%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(145deg, #d98b7e, #b85c55);
  box-shadow:
    inset -5px -7px 10px rgba(118, 83, 61, 0.14),
    0 7px 12px rgba(168, 86, 88, 0.14);
}

.match-piece[data-piece="apple"]::before {
  position: absolute;
  top: -8px;
  left: 14px;
  width: 5px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: #76533d;
  content: "";
  transform: rotate(18deg);
}

.match-piece[data-piece="apple"]::after {
  position: absolute;
  top: -7px;
  right: 2px;
  width: 12px;
  height: 8px;
  border-radius: 80% 12% 80% 12%;
  background: #8e9a7d;
  content: "";
  transform: rotate(-18deg);
}

.match-piece[data-piece="heart"] {
  color: #c98479;
  text-shadow: 0 7px 12px rgba(201, 132, 121, 0.15);
}

.match-piece[data-piece="note"] {
  color: #76533d;
  text-shadow: 0 7px 12px rgba(118, 83, 61, 0.12);
}

.match-piece[data-piece="star"] {
  color: #d4a561;
  text-shadow: 0 7px 12px rgba(212, 165, 97, 0.14);
}

.match-piece[data-piece="step"] {
  color: #8e9a7d;
  font-size: 25px;
  text-shadow: 0 7px 12px rgba(142, 154, 125, 0.12);
}

.match-status {
  display: flex;
  min-height: 28px;
  padding: 0 2px;
  justify-content: center;
}

.match-status p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.match-status span {
  min-width: 46px;
  padding: 4px 9px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.48);
  color: var(--cocoa);
  text-align: center;
}

.match-card.has-match-error .match-board {
  animation: soft-shake 260ms ease both;
}

.match-card.is-complete .match-board {
  border-color: rgba(142, 154, 125, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 18px 38px rgba(142, 154, 125, 0.13);
}

.facts-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 2px;
}

.facts-counter {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 7px 12px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: var(--radius-pill);
  color: var(--cocoa);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 244, 231, 0.54)),
    rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(118, 83, 61, 0.08);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.facts-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(135deg, rgba(255, 249, 241, 0.72), rgba(239, 211, 184, 0.46));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 11px 24px rgba(118, 83, 61, 0.08);
}

.facts-hero::after {
  position: absolute;
  inset: auto -14px -18px auto;
  width: 96px;
  height: 96px;
  border: 1px solid rgba(201, 132, 121, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  content: "";
  pointer-events: none;
}

.facts-mascot {
  width: 76px;
  height: 64px;
  margin: -4px 0;
}

.facts-mascot::before {
  inset: 6px 4px 10px;
}

.facts-mascot .quest-mascot {
  width: 62px;
}

.facts-mascot .mascot-shadow {
  bottom: 5px;
  width: 52px;
  height: 9px;
}

.facts-mark {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.facts-mark span {
  height: 10px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(90deg, rgba(201, 132, 121, 0.58), rgba(233, 169, 142, 0.22)),
    rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 5px 10px rgba(118, 83, 61, 0.06);
}

.facts-mark span:nth-child(2n) {
  transform: translateY(5px);
}

.facts-mark span:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(142, 154, 125, 0.56), rgba(255, 255, 255, 0.2)),
    rgba(255, 255, 255, 0.48);
}

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

.fact-tile {
  position: relative;
  display: grid;
  min-height: 92px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(118, 83, 61, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.94), rgba(255, 239, 225, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(118, 83, 61, 0.08);
  cursor: pointer;
  place-content: center start;
  transform: translateZ(0);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.fact-tile:nth-child(5) {
  grid-column: 1 / -1;
  min-height: 88px;
}

.fact-tile::before {
  position: absolute;
  right: -19px;
  bottom: -22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(201, 132, 121, 0.08);
  content: "";
}

.fact-tile::after {
  position: absolute;
  inset: 1px 1px auto;
  height: 45%;
  border-radius: 23px 23px 38px 38px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent);
  content: "";
  pointer-events: none;
}

.fact-label {
  position: relative;
  z-index: 1;
  width: max-content;
  margin-bottom: 7px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: rgba(143, 85, 72, 0.9);
  background: rgba(201, 132, 121, 0.1);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fact-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.12;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -14px 30px rgba(118, 83, 61, 0.08);
  cursor: pointer;
  touch-action: none;
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.fact-tile.is-scratching {
  border-color: rgba(201, 132, 121, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(118, 83, 61, 0.06);
  transform: scale(0.988);
}

.fact-tile.is-revealed {
  border-color: rgba(142, 154, 125, 0.36);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.96), transparent 42%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(239, 246, 226, 0.58));
  cursor: default;
  animation: fact-reveal 360ms ease both;
}

.fact-tile.is-revealed .fact-label {
  color: rgba(93, 111, 76, 0.94);
  background: rgba(142, 154, 125, 0.13);
}

.fact-tile.is-revealed .scratch-canvas {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.facts-card.is-complete .fact-tile {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 11px 22px rgba(142, 154, 125, 0.1);
}

.facts-card.is-complete .facts-counter {
  color: #5d6f4c;
  border-color: rgba(142, 154, 125, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 226, 0.58)),
    rgba(255, 255, 255, 0.5);
}

.photo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-inline: 2px;
}

.photo-counter {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 7px 12px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: var(--radius-pill);
  color: var(--cocoa);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 244, 231, 0.56)),
    rgba(255, 255, 255, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(118, 83, 61, 0.08);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.photo-copy {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(135deg, rgba(255, 250, 243, 0.7), rgba(239, 211, 184, 0.42));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 10px 22px rgba(118, 83, 61, 0.07);
}

.photo-copy p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
}

.photo-card.is-complete .photo-copy {
  border-color: rgba(142, 154, 125, 0.28);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(135deg, rgba(255, 251, 246, 0.86), rgba(232, 241, 215, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 14px 30px rgba(118, 83, 61, 0.09),
    0 0 0 5px rgba(142, 154, 125, 0.08);
}

.photo-card.is-complete .photo-copy p:last-child {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.16;
}

.photo-gallery {
  display: grid;
  grid-auto-columns: 132px;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 142px);
  gap: 10px;
  margin-inline: -3px;
  padding: 2px 3px 11px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 3px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.photo-gallery::-webkit-scrollbar {
  display: none;
}

.photo-option {
  position: relative;
  display: block;
  width: 132px;
  height: 142px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 248, 237, 0.72);
  box-shadow:
    0 11px 22px rgba(118, 83, 61, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  cursor: pointer;
  scroll-snap-align: start;
  transform: translateZ(0);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    filter 220ms ease;
}

.photo-option img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  transition:
    filter 260ms ease,
    transform 260ms ease;
}

.photo-option::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(61, 48, 41, 0.02), transparent 40%),
    linear-gradient(0deg, rgba(61, 48, 41, 0.36), transparent 48%);
  content: "";
  opacity: 0.84;
  pointer-events: none;
}

.photo-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-pill);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(145deg, #d39384, var(--rose));
  box-shadow:
    0 8px 18px rgba(118, 83, 61, 0.18),
    0 0 0 5px rgba(201, 132, 121, 0.12);
  opacity: 0;
  place-items: center;
  transform: scale(0.62) rotate(-12deg);
  transition:
    opacity 200ms ease,
    transform 240ms cubic-bezier(0.2, 0.84, 0.24, 1.24);
}

.photo-check::before {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fffaf4;
  border-left: 2px solid #fffaf4;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.photo-option.is-selected {
  border-color: rgba(201, 132, 121, 0.88);
  box-shadow:
    0 15px 30px rgba(118, 83, 61, 0.15),
    0 0 0 5px rgba(201, 132, 121, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transform: translateY(-3px) scale(1.012);
}

.photo-option.is-selected img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.045);
}

.photo-option.is-selected .photo-check {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.photo-action {
  display: grid;
  gap: 8px;
}

.photo-result {
  min-height: 18px;
  margin: 0;
  color: rgba(122, 102, 91, 0.82);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.photo-submit {
  min-height: 52px;
}

.photo-card.is-complete .photo-option {
  border-color: rgba(142, 154, 125, 0.74);
  animation: photo-final-pop 520ms cubic-bezier(0.2, 0.84, 0.24, 1.18) both;
  animation-delay: var(--photo-delay, 0ms);
  box-shadow:
    0 14px 28px rgba(118, 83, 61, 0.13),
    0 0 0 5px rgba(142, 154, 125, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.photo-card.is-complete .photo-check {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(145deg, #9eaa8a, var(--sage));
  box-shadow:
    0 8px 18px rgba(118, 83, 61, 0.16),
    0 0 0 5px rgba(142, 154, 125, 0.13);
}

.photo-card.is-complete .photo-counter {
  color: #5d6f4c;
  border-color: rgba(142, 154, 125, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 226, 0.58)),
    rgba(255, 255, 255, 0.5);
}

.boys-gallery {
  display: grid;
  grid-auto-columns: 136px;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 148px);
  gap: 10px;
  margin-inline: -3px;
  padding: 2px 3px 11px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 3px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.boys-gallery::-webkit-scrollbar {
  display: none;
}

.boys-option {
  width: 136px;
  height: 148px;
}

.boys-option img {
  object-position: center top;
}

.boys-result {
  display: none;
}

.boys-card.has-choice-error .boys-gallery {
  animation: soft-shake 260ms ease both;
}

.boys-card.has-choice-error .boys-copy {
  border-color: rgba(168, 86, 88, 0.22);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(135deg, rgba(255, 250, 243, 0.78), rgba(246, 218, 211, 0.5));
}

.boys-card.has-choice-error .boys-copy p:last-child {
  color: #8d4e52;
  font-weight: 820;
}

.boys-option.is-wrong {
  border-color: rgba(168, 86, 88, 0.76);
  box-shadow:
    0 14px 28px rgba(118, 83, 61, 0.12),
    0 0 0 5px rgba(168, 86, 88, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.boys-option.is-wrong .photo-check {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(145deg, #b96b68, #a85658);
}

.boys-option.is-correct {
  border-color: rgba(142, 154, 125, 0.82);
  box-shadow:
    0 15px 30px rgba(118, 83, 61, 0.14),
    0 0 0 5px rgba(142, 154, 125, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  animation: photo-final-pop 520ms cubic-bezier(0.2, 0.84, 0.24, 1.18) both;
}

.boys-option.is-correct .photo-check,
.boys-card.is-complete .boys-option.is-correct .photo-check {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.86), transparent 34%),
    linear-gradient(145deg, #9eaa8a, var(--sage));
  box-shadow:
    0 8px 18px rgba(118, 83, 61, 0.16),
    0 0 0 5px rgba(142, 154, 125, 0.13);
}

.boys-card.is-complete .boys-counter {
  color: #5d6f4c;
  border-color: rgba(142, 154, 125, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 226, 0.58)),
    rgba(255, 255, 255, 0.5);
}

.boys-card.is-complete .boys-copy {
  border-color: rgba(142, 154, 125, 0.28);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.88), transparent 36%),
    linear-gradient(135deg, rgba(255, 251, 246, 0.84), rgba(232, 241, 215, 0.56));
}

.boys-card.is-complete .boys-copy p:last-child {
  color: #5d6f4c;
  font-weight: 840;
}

.selfie-stage {
  position: relative;
  display: grid;
  height: min(58vh, 430px);
  min-height: 246px;
  overflow: hidden;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(145deg, rgba(255, 248, 237, 0.82), rgba(233, 169, 142, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 26px rgba(118, 83, 61, 0.09);
  place-items: center;
}

.selfie-stage::after {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(118, 83, 61, 0.18);
  border-radius: 21px;
  content: "";
  pointer-events: none;
}

.selfie-picker {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  min-width: 190px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  place-items: center;
  color: var(--cocoa);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 244, 231, 0.64)),
    rgba(255, 255, 255, 0.58);
  box-shadow:
    0 12px 28px rgba(118, 83, 61, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  text-align: center;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.selfie-picker:active {
  transform: translateY(1px) scale(0.99);
}

.selfie-picker[aria-disabled="true"] {
  cursor: default;
  opacity: 0.58;
  pointer-events: none;
}

.selfie-icon {
  position: relative;
  width: 46px;
  height: 36px;
  border: 3px solid rgba(201, 132, 121, 0.86);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 55%, transparent 0 8px, rgba(201, 132, 121, 0.86) 9px 11px, transparent 12px),
    rgba(255, 250, 244, 0.88);
}

.selfie-icon::before {
  position: absolute;
  top: -9px;
  left: 11px;
  width: 20px;
  height: 9px;
  border-radius: 8px 8px 0 0;
  background: rgba(201, 132, 121, 0.86);
  content: "";
}

.selfie-icon::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(118, 83, 61, 0.42);
  content: "";
}

.selfie-video,
.selfie-preview {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selfie-video {
  background: rgba(61, 48, 41, 0.18);
  transform: scaleX(-1);
}

.selfie-stage.has-preview .selfie-picker,
.selfie-stage.has-live-camera .selfie-picker {
  align-self: end;
  margin-bottom: 14px;
  min-width: 154px;
  padding: 10px 14px;
  color: #fffaf4;
  background: rgba(61, 48, 41, 0.32);
  backdrop-filter: blur(14px);
}

.selfie-stage.has-preview .selfie-icon,
.selfie-stage.has-live-camera .selfie-icon {
  display: none;
}

.selfie-stage.is-checking .selfie-preview,
.selfie-stage.is-checking .selfie-video {
  filter: saturate(0.94) brightness(0.92);
}

.selfie-loading {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.loading-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(122, 102, 91, 0.86);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.2;
}

.loading-copy strong {
  flex: 0 0 auto;
  color: var(--cocoa);
}

.loading-rail {
  height: 9px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(118, 83, 61, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.loading-rail span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--sage));
  transition: width 180ms linear;
}

.selfie-card.is-complete .selfie-counter {
  color: #5d6f4c;
  border-color: rgba(142, 154, 125, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 226, 0.58)),
    rgba(255, 255, 255, 0.5);
}

.mission {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.mission p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.36;
}

.date-console {
  display: grid;
  gap: 10px;
}

#pinInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.code-display {
  display: grid;
  grid-template-columns: repeat(2, 1fr) 8px repeat(2, 1fr) 8px repeat(4, 1fr);
  gap: 6px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.48);
}

.code-display span {
  display: grid;
  aspect-ratio: 0.82;
  min-height: 36px;
  border: 1px solid rgba(118, 83, 61, 0.16);
  border-radius: var(--radius-key);
  place-items: center;
  color: var(--cocoa);
  background: rgba(255, 250, 244, 0.86);
  box-shadow: inset 0 -3px 0 rgba(118, 83, 61, 0.05);
  font-size: clamp(20px, 6.2vw, 28px);
  font-weight: 800;
  line-height: 1;
  transform: translateZ(0);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.code-display span.is-filled {
  border-color: rgba(201, 132, 121, 0.46);
  color: #9b5d52;
  background: #fff3e7;
  box-shadow:
    0 8px 16px rgba(201, 132, 121, 0.14),
    inset 0 -3px 0 rgba(118, 83, 61, 0.05);
  animation: slot-pop 180ms ease both;
}

.code-display i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(118, 83, 61, 0.28);
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  min-height: 36px;
  align-items: start;
}

.hint,
.error,
.digit-count {
  margin: 0;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.hint {
  color: rgba(122, 102, 91, 0.82);
}

.error {
  grid-column: 1 / -1;
  color: #a85658;
}

.date-console.has-live-error .code-display {
  border-color: rgba(168, 86, 88, 0.34);
  background: rgba(255, 244, 238, 0.62);
}

.date-console.has-live-error .code-display span.is-filled {
  border-color: rgba(168, 86, 88, 0.44);
  color: #8d4f50;
  background: #fff0e8;
}

.digit-count {
  min-width: 42px;
  padding: 3px 8px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: var(--radius-pill);
  color: var(--cocoa);
  background: rgba(255, 255, 255, 0.44);
  text-align: center;
}

.keypad-panel {
  display: grid;
  padding: 11px;
  border: 1px solid rgba(118, 83, 61, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.86), transparent 36%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.72), rgba(255, 239, 222, 0.48)),
    rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 16px 32px rgba(118, 83, 61, 0.08);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.keypad button,
.submit-button {
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  letter-spacing: 0;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.keypad button {
  position: relative;
  display: grid;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 24px;
  place-items: center;
  color: #514036;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 244, 233, 0.92)) padding-box,
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(201, 132, 121, 0.24), rgba(142, 154, 125, 0.12)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -5px 12px rgba(118, 83, 61, 0.06),
    0 8px 18px rgba(118, 83, 61, 0.09);
  font-size: 21px;
  font-weight: 780;
  line-height: 1;
}

.keypad button:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 8px rgba(118, 83, 61, 0.06),
    0 4px 10px rgba(118, 83, 61, 0.07);
}

.keypad button.is-tapped {
  transform: translateY(2px) scale(0.982);
}

.keypad button:focus-visible,
.submit-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.keypad .utility-key {
  color: #8a5e52;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.82), rgba(239, 222, 204, 0.82)) padding-box,
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(118, 83, 61, 0.14)) border-box;
  font-size: 17px;
  font-weight: 860;
  line-height: 1;
  white-space: nowrap;
}

.keypad .clear-key {
  color: #9c5f56;
}

.icon-key svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.submit-button {
  min-height: 56px;
  border-radius: var(--radius-pill);
  color: #fffaf4;
  background: linear-gradient(135deg, #80553e, var(--rose) 62%, var(--peach));
  box-shadow:
    0 15px 28px rgba(168, 98, 76, 0.22),
    inset 0 -3px 0 rgba(78, 48, 31, 0.18);
  font-size: 15px;
  font-weight: 840;
}

.submit-button:disabled {
  cursor: default;
  opacity: 0.58;
  background: linear-gradient(135deg, #cbb59f, #d9c3aa);
  box-shadow:
    0 9px 18px rgba(118, 83, 61, 0.12),
    inset 0 -3px 0 rgba(78, 48, 31, 0.1);
}

.submit-button:not(:disabled):active {
  transform: translateY(2px);
  box-shadow:
    0 9px 18px rgba(168, 98, 76, 0.18),
    inset 0 -1px 0 rgba(78, 48, 31, 0.18);
}

.step-track {
  display: grid;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid rgba(118, 83, 61, 0.12);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.track-copy {
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-copy span {
  min-width: 0;
  letter-spacing: 0;
}

.track-copy span {
  color: rgba(122, 102, 91, 0.78);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.track-rail {
  position: relative;
  height: 24px;
}

.track-line {
  position: absolute;
  top: 50%;
  right: 10px;
  left: 10px;
  display: block;
  height: 6px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(90deg, var(--rose) 14.286%, transparent 0),
    rgba(118, 83, 61, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
}

.track-thumb {
  position: absolute;
  top: 50%;
  left: 14.286%;
  width: 20px;
  height: 20px;
  border: 3px solid #fffaf4;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, #d39384, var(--rose));
  box-shadow:
    0 0 0 5px rgba(201, 132, 121, 0.14),
    0 8px 16px rgba(118, 83, 61, 0.15);
  transform: translate(-50%, -50%);
}

.unlock-card.is-switching {
  animation: card-in 340ms ease both;
}

.date-console.has-error {
  animation: soft-shake 260ms ease both;
}

.unlock-card.is-unlocked .mascot-panel {
  animation: unlock-step 520ms ease both;
}

.unlock-card.is-unlocked::after {
  animation: card-shine 560ms ease both;
}

.success-card {
  display: grid;
  gap: 13px;
  padding: 18px;
  justify-items: stretch;
}

.certificate-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.96), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(232, 187, 118, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 237, 0.74)),
    var(--cream-soft);
}

.certificate-card::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(118, 83, 61, 0.1);
  border-radius: calc(var(--radius-card) - 9px);
  content: "";
  pointer-events: none;
}

.gift-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 4px 2px 2px;
}

.gift-mascot {
  width: 76px;
  filter: drop-shadow(0 12px 16px rgba(118, 83, 61, 0.13));
  animation: mascot-breathe 4.4s ease-in-out infinite;
}

.gift-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.gift-title h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.96;
}

.gift-title p:not(.step-name) {
  margin: 0;
  color: rgba(122, 102, 91, 0.9);
  font-size: 14px;
  font-weight: 610;
  line-height: 1.28;
}

.golden-apple-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  gap: 11px;
  width: 100%;
  min-height: 214px;
  overflow: hidden;
  padding: 20px;
  color: #fff8ec;
  border: 1px solid rgba(255, 248, 236, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.26), transparent 27%),
    radial-gradient(circle at 88% 14%, rgba(239, 190, 112, 0.42), transparent 32%),
    linear-gradient(135deg, #332018 0%, #76533d 46%, #c39455 100%);
  box-shadow:
    0 22px 42px rgba(92, 62, 39, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  appearance: none;
  cursor: pointer;
  font: inherit;
  outline: none;
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.golden-apple-card:disabled {
  cursor: default;
}

.golden-apple-card::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 248, 236, 0.18);
  border-radius: 21px;
  content: "";
  pointer-events: none;
}

.golden-apple-card::after {
  position: absolute;
  inset: auto -38px -62px 38%;
  height: 150px;
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.1);
  content: "";
  transform: rotate(-18deg);
}

.golden-apple-card:focus-visible {
  box-shadow:
    0 22px 42px rgba(92, 62, 39, 0.2),
    0 0 0 5px rgba(201, 132, 121, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.golden-apple-card:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  .golden-apple-card:hover {
    box-shadow:
      0 26px 48px rgba(92, 62, 39, 0.24),
      0 0 0 5px rgba(255, 248, 236, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
    transform: translateY(-2px);
  }
}

.golden-apple-orbit {
  position: absolute;
  top: -72px;
  left: -58px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 248, 236, 0.13);
  border-radius: 50%;
}

.golden-apple-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  place-items: center;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.92), transparent 30%),
    linear-gradient(145deg, #f8d18c, #b07a3f);
  box-shadow:
    0 12px 26px rgba(51, 32, 24, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.golden-apple-mark::before {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 14px;
  height: 8px;
  border-radius: 100% 0 100% 0;
  background: rgba(93, 111, 76, 0.86);
  content: "";
  transform: rotate(-20deg);
}

.golden-apple-mark span {
  position: relative;
  width: 25px;
  height: 29px;
  margin-top: 8px;
  border-radius: 48% 48% 42% 42%;
  background: rgba(255, 248, 236, 0.92);
  box-shadow: inset -5px -6px 0 rgba(255, 225, 171, 0.72);
}

.golden-apple-mark span::before,
.golden-apple-mark span::after {
  position: absolute;
  top: 2px;
  width: 14px;
  height: 18px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.golden-apple-mark span::before {
  left: -4px;
}

.golden-apple-mark span::after {
  right: -4px;
}

.gift-card-head,
.gift-card-label,
.golden-apple-card > strong,
.golden-apple-card > p,
.gift-open-hint,
.gift-barcode {
  position: relative;
  z-index: 1;
}

.gift-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: calc(100% - 72px);
}

.gift-card-label {
  margin: 0;
  color: rgba(255, 248, 236, 0.78);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.gift-card-head > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(255, 248, 236, 0.15);
  border-radius: var(--radius-pill);
  color: rgba(255, 248, 236, 0.82);
  background: rgba(255, 248, 236, 0.1);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.golden-apple-card > strong {
  display: block;
  max-width: 72%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 33px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 0.96;
}

.golden-apple-card > p:not(.gift-card-label) {
  max-width: 72%;
  margin: 0;
  color: rgba(255, 248, 236, 0.84);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.28;
}

.gift-open-hint {
  position: absolute;
  right: 15px;
  bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
  min-height: 36px;
  padding: 8px 11px 8px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 236, 0.18);
  border-radius: var(--radius-pill);
  color: rgba(255, 248, 236, 0.94);
  background: rgba(255, 248, 236, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 12px 22px rgba(51, 32, 24, 0.16);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.gift-tap-indicator {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 248, 236, 0.16);
}

.gift-tap-indicator::before {
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255, 248, 236, 0.7);
  border-radius: 50%;
  content: "";
  animation: tap-pulse 1.65s ease-out infinite;
}

.gift-tap-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 248, 236, 0.92);
  box-shadow: 0 0 0 4px rgba(255, 248, 236, 0.12);
}

.gift-disclaimer {
  position: relative;
  z-index: 1;
  margin: 0 2px;
  padding: 9px 11px;
  border: 1px solid rgba(118, 83, 61, 0.1);
  border-radius: 18px;
  color: rgba(122, 102, 91, 0.88);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.24;
  text-align: center;
}

.gift-barcode {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 32px;
  margin-top: 4px;
}

.gift-barcode span {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 4px;
  background: rgba(255, 248, 236, 0.72);
}

.gift-barcode span:nth-child(2),
.gift-barcode span:nth-child(6) {
  width: 6px;
  height: 70%;
}

.gift-barcode span:nth-child(3),
.gift-barcode span:nth-child(8) {
  height: 46%;
}

.gift-barcode span:nth-child(4),
.gift-barcode span:nth-child(9) {
  width: 5px;
  height: 90%;
}

@keyframes float-note {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }

  50% {
    transform: translateY(-10px) rotate(7deg);
  }
}

@keyframes mascot-breathe {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-4px) rotate(-0.7deg) scale(1.012);
  }
}

@keyframes mascot-shadow {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }

  50% {
    opacity: 0.48;
    transform: scaleX(0.88);
  }
}

@keyframes mascot-listen {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  42% {
    transform: translate(4px, -2px) rotate(1.5deg) scale(1.006);
  }

  68% {
    transform: translate(1px, 0) rotate(0.4deg) scale(1);
  }
}

@keyframes mascot-alert {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }

  30% {
    transform: translateX(-4px) rotate(-2deg);
  }

  68% {
    transform: translateX(4px) rotate(2deg);
  }
}

@keyframes mascot-angry {
  0%,
  100% {
    transform: translateX(0) rotate(0deg) scale(1);
  }

  25% {
    transform: translateX(-2px) rotate(-1.8deg) scale(1.006);
  }

  75% {
    transform: translateX(2px) rotate(1.8deg) scale(1.006);
  }
}

@keyframes mascot-happy {
  0%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  34% {
    transform: translateY(-12px) rotate(-2deg) scale(1.035);
  }

  62% {
    transform: translateY(2px) rotate(1.5deg) scale(0.99);
  }
}

@keyframes mascot-sparkle {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.55);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-22px) scale(1.08);
  }
}

@keyframes alert-mark-pop {
  0%,
  100% {
    opacity: 0.82;
    transform: rotate(8deg) scale(0.88);
  }

  50% {
    opacity: 1;
    transform: rotate(8deg) scale(1.08);
  }
}

@keyframes tile-swap {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(var(--swap-x, 0), var(--swap-y, 0)) scale(1.02);
  }
}

@keyframes tap-pulse {
  0% {
    opacity: 0.92;
    transform: scale(0.64);
  }

  72%,
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes piece-collect {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }

  45% {
    opacity: 1;
    transform: scale(1.18) rotate(7deg);
  }

  100% {
    opacity: 0;
    transform: scale(0.5) translateY(-12px) rotate(16deg);
  }
}

@keyframes fact-reveal {
  0% {
    transform: translateY(2px) scale(0.985);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes photo-final-pop {
  0% {
    transform: translateY(0) scale(1);
  }

  46% {
    transform: translateY(-7px) scale(1.035);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes confetti-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(16px) scale(0.42) rotate(0deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--confetti-x), var(--confetti-y))
      scale(1) rotate(var(--confetti-rotate));
  }
}

@keyframes slot-pop {
  0% {
    transform: translateY(2px) scale(0.96);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

@keyframes card-shine {
  0% {
    opacity: 0;
    transform: translateX(-34%);
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(34%);
  }
}

@keyframes soft-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-4px);
  }

  70% {
    transform: translateX(3px);
  }
}

@keyframes unlock-step {
  0% {
    transform: rotate(0) scale(1);
  }

  55% {
    transform: rotate(-8deg) scale(1.08);
  }

  100% {
    transform: rotate(0) scale(1);
  }
}

@media (max-height: 900px) {
  .page-shell {
    padding-block: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-bottom));
  }

  .unlock-card {
    gap: 9px;
    padding: 12px;
  }

  .match-card,
  .facts-card,
  .photo-card,
  .boys-card,
  .selfie-card,
  .success-card {
    gap: 9px;
    padding: 12px;
  }

  .mascot-panel {
    width: 102px;
    height: 88px;
  }

  .quest-mascot {
    width: 86px;
  }

  .match-mascot {
    width: 78px;
    height: 68px;
    margin: -4px 0;
  }

  .match-mascot .quest-mascot {
    width: 66px;
  }

  .match-board {
    gap: 7px;
    padding: 9px;
  }

  .match-piece {
    width: 34px;
    height: 34px;
    font-size: 28px;
  }

  .match-piece[data-piece="apple"] {
    width: 29px;
    height: 31px;
  }

  .facts-hero {
    padding: 7px 10px;
    border-radius: 22px;
  }

  .facts-mascot {
    width: 62px;
    height: 52px;
  }

  .facts-mascot .quest-mascot {
    width: 52px;
  }

  .facts-grid {
    gap: 8px;
  }

  .fact-tile {
    min-height: 82px;
    padding: 10px;
    border-radius: 18px;
  }

  .fact-tile:nth-child(5) {
    min-height: 78px;
  }

  .photo-copy {
    gap: 4px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .photo-copy p:last-child {
    font-size: 13px;
    line-height: 1.26;
  }

  .photo-gallery,
  .boys-gallery {
    grid-auto-columns: 124px;
    grid-template-rows: repeat(2, 128px);
    gap: 8px;
    padding-bottom: 8px;
  }

  .photo-option {
    width: 124px;
    height: 128px;
    border-radius: 21px;
  }

  .photo-submit {
    min-height: 50px;
  }

  .selfie-stage {
    height: min(56vh, 390px);
    min-height: 300px;
    border-radius: 23px;
  }

  .selfie-picker {
    min-width: 174px;
    padding: 15px 18px;
  }

  .mission {
    padding: 10px 12px;
  }

  .mission p:last-child {
    font-size: 14px;
  }

  .code-display {
    padding: 8px;
  }

  .code-display span {
    min-height: 31px;
  }

  .keypad button {
    min-height: 50px;
    border-radius: 22px;
  }

  .submit-button {
    min-height: 52px;
  }

  .gift-hero {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .gift-mascot {
    width: 64px;
  }

  .gift-title h2 {
    font-size: 30px;
  }

  .golden-apple-card {
    min-height: 188px;
    padding: 16px;
    border-radius: 24px;
  }

  .golden-apple-card > strong {
    font-size: 29px;
  }

  .gift-card-head {
    max-width: calc(100% - 62px);
  }

  .gift-card-head > span {
    padding: 5px 7px;
    font-size: 8px;
  }

  .gift-open-hint {
    right: 12px;
    bottom: 12px;
  }

  .gift-disclaimer {
    padding: 9px 11px;
    font-size: 11px;
  }

}

@media (max-height: 700px) {
  .unlock-card,
  .match-card,
  .facts-card,
  .photo-card,
  .boys-card,
  .selfie-card,
  .success-card {
    gap: 6px;
    padding: 8px 10px;
  }

  .mascot-panel {
    width: 64px;
    height: 50px;
    margin-block: -8px -4px;
  }

  .quest-mascot {
    width: 54px;
  }

  .mascot-panel::before {
    inset: 6px 2px 10px;
  }

  .mascot-shadow {
    bottom: 6px;
    width: 56px;
    height: 9px;
  }

  .match-hero {
    gap: 8px;
    padding: 7px 9px;
  }

  .match-mascot {
    width: 58px;
    height: 48px;
    margin: -6px 0;
  }

  .match-mascot .quest-mascot {
    width: 48px;
  }

  .match-panel {
    gap: 3px;
  }

  .match-panel span,
  .match-status span {
    font-size: 10px;
  }

  .match-panel strong {
    font-size: clamp(22px, 6.2vw, 28px);
  }

  .match-board {
    gap: 6px;
    padding: 7px;
    border-radius: 23px;
  }

  .match-tile {
    border-radius: 16px;
  }

  .match-piece {
    width: 30px;
    height: 30px;
    font-size: 25px;
  }

  .match-piece[data-piece="apple"] {
    width: 25px;
    height: 27px;
  }

  .match-status {
    min-height: 28px;
  }

  .match-status p {
    font-size: 12px;
  }

  .facts-top {
    gap: 8px;
  }

  .facts-counter {
    min-width: 44px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .facts-hero {
    gap: 8px;
    padding: 6px 9px;
  }

  .facts-mascot {
    width: 52px;
    height: 42px;
    margin: -6px 0;
  }

  .facts-mascot .quest-mascot {
    width: 42px;
  }

  .facts-mark {
    gap: 5px;
  }

  .facts-mark span {
    height: 6px;
  }

  .facts-grid {
    gap: 7px;
  }

  .fact-tile {
    min-height: 72px;
    padding: 8px;
    border-radius: 16px;
  }

  .fact-tile:nth-child(5) {
    min-height: 66px;
  }

  .fact-label {
    margin-bottom: 4px;
    padding: 3px 7px;
    font-size: 9px;
  }

  .fact-tile p {
    font-size: 12px;
    line-height: 1.06;
  }

  .photo-top {
    gap: 8px;
  }

  .photo-counter {
    min-width: 44px;
    padding: 4px 8px;
    font-size: 10px;
  }

  .photo-copy {
    gap: 3px;
    padding: 8px 10px;
    border-radius: 18px;
  }

  .photo-copy p:last-child {
    font-size: 12px;
    line-height: 1.18;
  }

  .photo-card.is-complete .photo-copy p:last-child {
    font-size: 17px;
    line-height: 1.13;
  }

  .photo-gallery,
  .boys-gallery {
    grid-auto-columns: 104px;
    grid-template-rows: repeat(2, 102px);
    gap: 7px;
    padding-bottom: 5px;
  }

  .photo-option {
    width: 104px;
    height: 102px;
    border-radius: 18px;
  }

  .photo-check {
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
  }

  .photo-result {
    min-height: 15px;
    font-size: 11px;
  }

  .selfie-stage {
    height: min(54vh, 340px);
    min-height: 250px;
    border-radius: 18px;
  }

  .selfie-stage::after {
    inset: 8px;
    border-radius: 14px;
  }

  .selfie-picker {
    min-width: 142px;
    padding: 10px 12px;
    border-radius: 18px;
    font-size: 12px;
  }

  .selfie-icon {
    width: 38px;
    height: 30px;
    border-radius: 12px;
  }

  .selfie-loading {
    gap: 6px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .loading-copy {
    font-size: 11px;
  }

  h1,
  h2 {
    font-size: clamp(29px, 8vw, 38px);
  }

  .mission p:last-child {
    font-size: 13px;
  }

  .mission {
    gap: 3px;
    padding: 8px 10px;
  }

  .code-display {
    padding: 6px;
  }

  .status-row {
    min-height: 28px;
  }

  .step-track {
    gap: 5px;
    padding: 6px 10px;
  }

  .track-copy span {
    font-size: 10px;
  }

  .keypad-panel {
    padding: 7px;
    border-radius: 24px;
  }

  .keypad {
    gap: 7px;
  }

  .keypad button {
    min-height: 44px;
    border-radius: 18px;
    font-size: 19px;
  }

  .submit-button {
    min-height: 48px;
  }

  .gift-hero {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 8px;
  }

  .gift-mascot {
    width: 52px;
  }

  .gift-title h2 {
    font-size: 26px;
  }

  .gift-title p:not(.step-name) {
    font-size: 12px;
    line-height: 1.18;
  }

  .golden-apple-card {
    min-height: 158px;
    padding: 13px;
    border-radius: 22px;
  }

  .golden-apple-mark {
    top: 12px;
    right: 12px;
    width: 46px;
    height: 46px;
    border-radius: 18px;
  }

  .golden-apple-mark span {
    width: 20px;
    height: 23px;
  }

  .gift-card-label {
    font-size: 9px;
  }

  .gift-card-head {
    max-width: calc(100% - 54px);
  }

  .gift-card-head > span {
    padding: 4px 6px;
    font-size: 7px;
  }

  .golden-apple-card > strong {
    font-size: 24px;
  }

  .golden-apple-card > p:not(.gift-card-label) {
    max-width: 72%;
    font-size: 11px;
  }

  .gift-barcode {
    height: 22px;
  }

  .gift-open-hint {
    right: 9px;
    bottom: 9px;
    min-height: 30px;
    padding: 6px 9px 6px 7px;
    font-size: 10px;
  }

  .gift-tap-indicator {
    width: 17px;
    height: 17px;
  }

  .gift-tap-indicator span {
    width: 6px;
    height: 6px;
  }

  .gift-disclaimer {
    margin-top: -1px;
    padding: 7px 9px;
    border-radius: 15px;
    font-size: 10px;
    line-height: 1.18;
  }

}

@media (min-width: 720px) {
  .page-shell {
    padding: 34px;
  }
}

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