:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f3f3f5;
  --bg-2: #eaeaf0;
  --surface: #ffffff;
  --ink: #111113;
  --ink-soft: #2c2c30;
  --muted: #6b6b73;
  --line: rgba(17, 17, 19, 0.1);
  --accent: #a33b52;
  --accent-soft: rgba(163, 59, 82, 0.1);
  --hero-veil: linear-gradient(
    180deg,
    rgba(18, 12, 10, 0.22) 0%,
    rgba(18, 12, 10, 0.12) 38%,
    rgba(12, 10, 12, 0.58) 100%
  );
  --shadow: 0 20px 50px rgba(17, 17, 19, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 58px;
  --shell: min(1120px, calc(100% - 40px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button,
input {
  font-family: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(180, 190, 220, 0.28), transparent 55%),
    radial-gradient(70% 50% at 10% 30%, rgba(210, 180, 190, 0.18), transparent 50%),
    linear-gradient(180deg, #f7f7f9 0%, var(--bg) 45%, #ececf2 100%);
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

.site-body.site-body--locked {
  display: none !important;
}

.site-body {
  position: relative;
  z-index: 1;
}

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.shell--narrow {
  max-width: 560px;
  width: min(560px, calc(100% - 32px));
}

/* —— Nav —— */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  min-height: var(--nav-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  column-gap: 10px;
  padding: 0 max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  padding-top: max(10px, env(safe-area-inset-top));
  background: transparent;
  color: #fff;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
}

.nav.is-solid {
  background: rgba(243, 243, 245, 0.82);
  color: var(--ink);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-brand {
  grid-column: 1;
  justify-self: stretch;
  align-self: end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 32px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.nav-nowplaying {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 32px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}

.nav-nowplaying__track {
  display: inline-flex;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  will-change: transform;
  animation: nav-marquee 10s linear infinite;
}

.nav-nowplaying__text {
  display: inline-block;
  padding-right: 2.4em;
}

@keyframes nav-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.nav-links {
  display: none;
  gap: 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: inherit;
  opacity: 0.88;
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  grid-column: 3;
  justify-self: end;
  align-self: end;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 30px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.nav.is-solid .nav-cta {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.22);
}

.nav.is-solid .nav-cta:hover {
  background: #2a2a2e;
}

.nav-cta:active {
  transform: scale(0.98);
}

@media (min-width: 820px) {
  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    min-height: var(--nav-h);
    padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
    padding-top: env(safe-area-inset-top);
  }

  .nav-brand {
    flex: 0 1 140px;
    width: 140px;
    max-width: 140px;
    align-self: center;
    height: 32px;
    line-height: 32px;
  }

  .nav-cta {
    align-self: center;
    height: auto;
    padding: 8px 14px;
    line-height: 1.2;
  }

  .nav-links {
    display: flex;
  }
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.04);
  filter: saturate(0.92) contrast(1.04);
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  will-change: opacity;
}

.hero-media__img.is-active {
  opacity: 1;
  z-index: 1;
  animation: hero-drift 18s var(--ease) infinite alternate;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(0, -1.5%, 0);
  }
}

.hero-media__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--hero-veil);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 0 max(56px, env(safe-area-inset-bottom));
}

.hero-brand {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(44px, 10vw, 80px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero-x {
  display: inline-block;
  margin: 0 0.18em;
  font-weight: 400;
  opacity: 0.7;
}

.hero-sub {
  margin: 18px 0 0;
  max-width: 28ch;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn--solid {
  background: #fff;
  color: var(--ink);
}

.btn--solid:hover {
  background: rgba(255, 255, 255, 0.9);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2;
  width: 24px;
  height: 36px;
  margin-left: -12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero-scroll span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
  animation: scroll-dot 1.6s var(--ease) infinite;
}

@keyframes scroll-dot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Entrance */
.reveal,
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
}

.site-body.is-entered .reveal {
  animation: rise 0.95s var(--ease) forwards;
}

.site-body.is-entered .reveal--d1 {
  animation-delay: 0.1s;
}

.site-body.is-entered .reveal--d2 {
  animation-delay: 0.2s;
}

.site-body.is-entered .reveal--d3 {
  animation-delay: 0.32s;
}

.reveal-up.is-in {
  animation: rise 0.85s var(--ease) forwards;
}

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

.site-body.is-entered .vinyl-player {
  animation: rise 0.8s var(--ease) 0.45s both;
}

@media (max-width: 819px) {
  .site-body.is-entered .vinyl-player {
    animation: none;
    opacity: 1;
  }
}

/* —— Sections —— */
.section {
  padding: clamp(72px, 12vw, 120px) 0;
}

.section--tight {
  padding: clamp(64px, 10vw, 96px) 0;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--on-dark {
  color: rgba(255, 255, 255, 0.65);
}

.section-title {
  margin: 0;
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ink);
}

.section-lead {
  margin: 14px 0 0;
  max-width: 36ch;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--muted);
}

.section-note {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* Meter — 天 : 时 : 分 : 秒 */
.meter {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 40px;
  padding: 8px 0 0;
  max-width: 720px;
}

.meter__item {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.meter__num {
  display: block;
  font-size: clamp(28px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.meter__label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.meter__rule {
  width: 1px;
  height: 42px;
  background: var(--line);
  margin-bottom: 22px;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  .meter {
    gap: 4px;
  }

  .meter__label {
    font-size: 12px;
  }

  .meter__rule {
    height: 36px;
    margin-bottom: 20px;
  }
}

/* Timeline */
.section--story {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.55) 20%, rgba(255, 255, 255, 0.55) 80%, transparent 100%);
}

.timeline {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 36px;
}

@media (min-width: 860px) {
  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
}

.timeline__item {
  margin: 0;
  padding: 0;
}

.timeline__date {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.timeline__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.timeline__text {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.timeline__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e4e4ea;
}

.timeline__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}

.timeline__item:hover .timeline__media img {
  transform: scale(1.03);
}

/* Album */
.section--album .wall-section {
  margin-top: 32px;
}

.section--moments .moments-rail {
  margin-top: 28px;
}

.section--gift .btn {
  margin-top: 28px;
}

.wall-section {
  position: relative;
}

.heart-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #d8d8de;
  box-shadow: var(--shadow), 0 0 0 1px rgba(17, 17, 19, 0.05);
}

.heart-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  z-index: 0;
  pointer-events: none;
  filter: saturate(0.95) contrast(1.02);
}

.heart-frame-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 30%, rgba(0, 0, 0, 0.1));
}

.heart-grid {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 3.5vw, 20px);
  transform: translateX(-50%);
  z-index: 3;
  width: min(80vw, 360px);
  aspect-ratio: 1 / 1.05;
}

.photo-slot {
  position: absolute;
  width: var(--slot-size, 10%);
  height: var(--slot-size, 10%);
  left: var(--x, 0%);
  top: var(--y, 0%);
  transform: translate(-50%, -50%);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(7px, 1.8vw, 9px);
  color: var(--muted);
  overflow: hidden;
}

.photo-slot.has-photo {
  padding: 0;
  background: #111;
}

.photo-slot.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@media (max-width: 540px) {
  .heart-frame-wrap {
    aspect-ratio: 10 / 15;
    border-radius: 16px;
  }

  .heart-grid {
    width: min(90vw, 420px);
    bottom: clamp(6px, 2.2vw, 14px);
  }
}

/* Moments rail */
.section--moments {
  padding-bottom: clamp(48px, 8vw, 80px);
}

.moments-rail {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  padding: 0 max(20px, calc((100% - 1120px) / 2 + 20px));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.moments-rail::-webkit-scrollbar {
  display: none;
}

.moment {
  flex: 0 0 min(58vw, 240px);
  margin: 0;
  scroll-snap-align: start;
}

.moment img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-sm);
  background: #d9d9e0;
}

.moment figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* Wishlist */
.wish-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.wish {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.wish__mark {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1.5px solid rgba(17, 17, 19, 0.28);
  border-radius: 4px;
  flex-shrink: 0;
}

.wish__mark--done {
  background: var(--ink);
  border-color: var(--ink);
  position: relative;
}

.wish__mark--done::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(40deg);
}

.wish__title {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.wish__meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Play — match3 + memory + note draw */
.section--play .section-lead {
  margin-bottom: 0;
}

.play-tabs {
  display: flex;
  gap: 6px;
  margin: 28px 0 22px;
  padding: 4px;
  background: rgba(17, 17, 19, 0.04);
  border-radius: 12px;
  max-width: 420px;
}

.play-tab {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 10px 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.play-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(17, 17, 19, 0.08);
}

.play-panel[hidden] {
  display: none !important;
}

.match3-bar {
  display: none;
}

.lucky-game {
  max-width: 440px;
}

.lucky-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 248, 0.88)),
    radial-gradient(120% 80% at 100% 0%, rgba(232, 90, 122, 0.12), transparent 55%);
  border: 1px solid rgba(163, 59, 82, 0.12);
  box-shadow: 0 10px 28px rgba(17, 17, 19, 0.06);
}

.lucky-hud__label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.lucky-hud__level strong,
.lucky-hud__score strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.lucky-hud__score {
  text-align: right;
}

.lucky-hud__moves {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ffb3c4, #e85a7a 58%, #bf4058);
  color: #fff;
  box-shadow: 0 8px 20px rgba(191, 64, 88, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.lucky-hud__moves-num {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lucky-hud__moves-cap {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.lucky-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.lucky-goal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.04);
  border: 1px solid rgba(17, 17, 19, 0.06);
  font-size: 13px;
  color: var(--ink);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.lucky-goal.is-done {
  background: rgba(79, 209, 139, 0.14);
  border-color: rgba(79, 209, 139, 0.35);
}

.lucky-goal__ico {
  font-size: 15px;
  line-height: 1;
}

.lucky-goal strong {
  font-variant-numeric: tabular-nums;
}

.lucky-lucky {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.lucky-lucky__label {
  font-weight: 600;
  color: var(--accent);
}

.lucky-lucky__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.06);
  overflow: hidden;
}

.lucky-lucky__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8fa3, #f5c542, #8b9cf7);
  transition: width 0.25s var(--ease);
}

.lucky-lucky__tip {
  white-space: nowrap;
}

.lucky-board-wrap {
  position: relative;
  width: min(100%, 420px);
}

.match3-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  height: min(calc(100vw - 48px), 420px);
  max-height: 420px;
  padding: 10px;
  box-sizing: border-box;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 236, 242, 0.55)),
    radial-gradient(80% 60% at 20% 0%, rgba(255, 182, 193, 0.25), transparent 60%);
  border: 1px solid rgba(163, 59, 82, 0.1);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 16px 40px rgba(17, 17, 19, 0.08);
  user-select: none;
  touch-action: manipulation;
}

.match3-grid.is-hammer {
  cursor: crosshair;
  box-shadow: inset 0 0 0 2px rgba(191, 64, 88, 0.35), 0 16px 40px rgba(17, 17, 19, 0.08);
}

.match3-cell {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  position: relative;
  transition: transform 0.12s var(--ease);
}

.match3-cell:active {
  transform: scale(0.92);
}

.match3-gem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  font-size: clamp(14px, 4vw, 22px);
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.1),
    0 4px 10px rgba(17, 17, 19, 0.08);
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.match3-cell.is-selected .match3-gem {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px var(--ink), inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 16px rgba(17, 17, 19, 0.12);
}

.match3-cell.is-hint .match3-gem {
  animation: m3-hint 0.7s ease infinite;
}

.match3-cell.is-clearing .match3-gem {
  transform: scale(0.15) rotate(12deg);
  opacity: 0;
}

.match3-cell.is-special .match3-gem {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.65),
    0 0 12px rgba(191, 64, 88, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(0, 0, 0, 0.1);
}

.match3-gem--0 { background: linear-gradient(160deg, #ff9eb3, #e85a7a); }
.match3-gem--1 { background: linear-gradient(160deg, #ffc2d1, #f48fb1); }
.match3-gem--2 { background: linear-gradient(160deg, #ffe08a, #f5c542); }
.match3-gem--3 { background: linear-gradient(160deg, #d7c2ff, #a78bfa); }
.match3-gem--4 { background: linear-gradient(160deg, #b8c0ff, #8b9cf7); }
.match3-gem--5 { background: linear-gradient(160deg, #ffd6a5, #f4a261); }
.match3-gem--rainbow {
  background: linear-gradient(135deg, #ff8fa3, #ffe08a, #9ef0c3, #8b9cf7, #ffc2d1);
  animation: m3-rainbow 2.2s linear infinite;
  background-size: 200% 200%;
}
.match3-gem--row,
.match3-gem--col,
.match3-gem--wrap {
  font-weight: 700;
}

@keyframes m3-hint {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

@keyframes m3-rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.lucky-fx {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
}

.lucky-pop {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.82);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  animation: lucky-pop 0.9s var(--ease) forwards;
}

.lucky-pop--combo { background: rgba(191, 64, 88, 0.9); }
.lucky-pop--lucky { background: linear-gradient(90deg, #e85a7a, #8b9cf7); }
.lucky-pop--win { background: rgba(79, 209, 139, 0.95); color: #0b2a1a; }
.lucky-pop--level { top: 28%; }

@keyframes lucky-pop {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
  20% { opacity: 1; transform: translate(-50%, -55%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

.lucky-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(247, 247, 249, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 18px;
}

.lucky-overlay.is-hidden {
  display: none;
}

.lucky-overlay__card {
  width: min(100%, 280px);
  padding: 22px 18px 16px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 50px rgba(17, 17, 19, 0.14);
}

.lucky-overlay__stars {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 4px;
  color: #f5c542;
  min-height: 1.2em;
}

.lucky-overlay__title {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.lucky-overlay__msg {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.lucky-overlay__actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.lucky-btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lucky-btn--ghost {
  background: rgba(17, 17, 19, 0.05);
  color: var(--ink);
}

.lucky-btn--solid {
  background: var(--ink);
  color: #fff;
}

.lucky-boosters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0 0;
  max-width: 420px;
}

.lucky-boost {
  appearance: none;
  border: 1px solid rgba(17, 17, 19, 0.08);
  background: #fff;
  border-radius: 14px;
  padding: 10px 6px 8px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}

.lucky-boost:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 17, 19, 0.08);
}

.lucky-boost.is-armed {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(191, 64, 88, 0.18);
}

.lucky-boost.is-empty {
  opacity: 0.45;
}

.lucky-boost__ico {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.lucky-boost__name {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.lucky-boost__count {
  position: absolute;
  top: 4px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.match3-tip {
  margin: 12px 0 0;
  max-width: 420px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.match3-meta,
.match3-actions,
.match3-combo,
.match3-dot {
  /* legacy hooks kept inert */
}

.play-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}

.play-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.play-restart {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.play-restart:hover {
  background: rgba(17, 17, 19, 0.04);
}

.play-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 480px;
}

.play-card {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  perspective: 800px;
}

.play-card__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease);
}

.play-card.is-open .play-card__inner,
.play-card.is-matched .play-card__inner {
  transform: rotateY(180deg);
}

.play-card__back,
.play-card__face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.play-card__back {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a2226 0%, #1a1a1e 100%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.play-card__face {
  transform: rotateY(180deg);
  background: #e8e8ed;
}

.play-card__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-card.is-matched {
  cursor: default;
}

.play-card.is-matched .play-card__face {
  box-shadow: 0 0 0 2px var(--accent);
}

.play-win {
  margin-top: 22px;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  text-align: center;
}

.play-win.is-hidden {
  display: none;
}

.play-win__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.play-win__msg {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.note-draw {
  margin-top: 8px;
  padding-top: 8px;
  border-top: none;
  text-align: center;
}

.note-draw__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.note-draw__hint {
  margin: 8px 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.note-draw__btn {
  min-width: 140px;
  background: var(--ink);
  color: #fff;
}

.note-draw__btn:hover {
  background: #2a2a2e;
}

.note-draw__result {
  margin: 22px auto 0;
  max-width: 28ch;
  min-height: 1.5em;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.note-draw__result.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 480px) {
  .play-board {
    gap: 8px;
  }

  .play-card__back {
    font-size: 16px;
  }
}

/* Notes */
.section--notes {
  background: var(--ink);
  color: #fff;
}

.section--notes .eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.section--notes .section-title {
  color: #fff;
}

.notes-grid {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

@media (min-width: 720px) {
  .notes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.note {
  margin: 0;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.note p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.note cite {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
}

.note--ph {
  opacity: 0.72;
}

/* Gift band */
.section--gift {
  padding: clamp(48px, 8vw, 72px) 0;
}

.shell--gift {
  padding: clamp(40px, 7vw, 64px) clamp(24px, 5vw, 48px);
  background:
    radial-gradient(80% 120% at 100% 0%, rgba(163, 59, 82, 0.35), transparent 55%),
    linear-gradient(135deg, #1a1a1e 0%, #2a2226 100%);
  color: #fff;
  border-radius: 22px;
}

.gift-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.gift-lead {
  margin: 12px 0 28px;
  max-width: 32ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: -0.015em;
}

/* Footer */
.site-footer {
  padding: 48px 0 max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-copy {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.footer-meta {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(107, 107, 115, 0.8);
}

/* —— Flower modal —— */
.flower-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.flower-modal.is-hidden {
  display: none !important;
}

.flower-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.flower-modal__panel {
  position: relative;
  width: min(100%, 400px);
  max-height: min(88dvh, 660px);
  overflow: auto;
  padding: 48px 28px 28px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
  animation: panel-in 0.45s var(--ease);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.flower-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  background: rgba(17, 17, 19, 0.05);
  border: none;
  border-radius: 8px;
}

.flower-modal__title {
  margin: 0 0 20px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}

.flower-modal__img-wrap {
  margin: 0 auto 20px;
  max-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.flower-modal__img-wrap--light {
  background: #f4f4f6;
}

.flower-modal__img {
  max-width: 100%;
  max-height: 48vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.flower-modal__err {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--accent);
}

.flower-modal__err.is-hidden {
  display: none;
}

.flower-modal__hint {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.red-code {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: rgba(196, 48, 48, 0.06);
}

.red-code span {
  min-width: 28px;
  height: 32px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  background: #d4382b;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.flower-modal__actions {
  display: flex;
  gap: 10px;
}

.flower-btn {
  flex: 1 1 120px;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  border-radius: 10px;
}

.flower-btn--like,
.flower-btn--ok {
  background: var(--ink);
  color: #fff;
}

.flower-btn--dislike {
  background: rgba(17, 17, 19, 0.06);
  color: var(--ink);
}

.flower-btn--ok {
  display: block;
  width: 100%;
}

.flower-modal__step.is-hidden {
  display: none !important;
}

body.flower-modal-open {
  overflow: hidden;
}

/* —— Vinyl / mini player —— */
.vinyl-player {
  position: fixed;
  top: calc(var(--nav-h) + 10px + env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 88;
  width: 140px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid rgba(17, 17, 19, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(17, 17, 19, 0.12);
  opacity: 0;
}

/* Mobile: in-nav, bottom-aligned with brand & CTA, true center */
@media (max-width: 819px) {
  .nav .vinyl-player {
    position: static;
    grid-column: 2;
    justify-self: center;
    align-self: end;
    z-index: 1;
    width: auto;
    min-width: 0;
    height: 32px;
    padding: 0 6px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: none;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    transform: none;
    opacity: 1;
  }

  .nav.is-solid .vinyl-player {
    background: rgba(17, 17, 19, 0.06);
    border-color: rgba(17, 17, 19, 0.1);
  }

  .nav .vinyl-player__deck,
  .nav .vinyl-player__meta,
  .nav .vinyl-player__switch {
    display: none !important;
  }

  .nav .vinyl-player__transport {
    height: 100%;
    gap: 2px;
    padding: 0;
    border-top: none;
  }

  .nav .vinyl-player__tbtn {
    width: 28px;
    height: 28px;
    color: #fff;
  }

  .nav.is-solid .vinyl-player__tbtn {
    color: var(--ink);
  }

  .nav .vinyl-player__tbtn--main {
    width: 28px;
    height: 28px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
  }

  .nav.is-solid .vinyl-player__tbtn--main {
    background: var(--ink);
    color: #fff;
  }
}

.vinyl-player__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.vinyl-player__track {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinyl-player__switch {
  min-width: 28px;
  height: 24px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  background: rgba(17, 17, 19, 0.05);
  border-radius: 7px;
}

.vinyl-player__deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 8px;
}

.vinyl-player__disc-btn {
  width: 58px;
  height: 58px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
}

.vinyl-player__disc {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  clip-path: circle(50% at 50% 50%);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, transparent 0 2px, rgba(255, 255, 255, 0.04) 2px 3px),
    conic-gradient(from 0deg, #1a1a1a, #0d0d0d, #252525, #111, #1a1a1a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.28);
  position: relative;
  transform-origin: 50% 50%;
}

.vinyl-player__disc-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22), transparent 40%);
  pointer-events: none;
}

.vinyl-player__disc-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, #c86a7c, var(--accent));
  color: #fff;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  font-weight: 600;
  pointer-events: none;
}

.vinyl-player__arm {
  position: relative;
  width: 44px;
  height: 56px;
  flex-shrink: 0;
}

.vinyl-player__arm-pivot {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2f2f2, #b8b8b8);
  z-index: 2;
}

.vinyl-player__arm-rod {
  position: absolute;
  right: 10px;
  top: 14px;
  width: 3px;
  height: 34px;
  background: linear-gradient(90deg, #eaeaea, #c4c4c4);
  transform-origin: 50% 0;
  transform: rotate(18deg);
  border-radius: 2px;
  z-index: 1;
  transition: transform 0.45s var(--ease);
}

.vinyl-player__arm-head {
  position: absolute;
  right: 5px;
  bottom: 10px;
  width: 10px;
  height: 6px;
  background: #3a3a3a;
  border-radius: 2px;
  transform: rotate(18deg);
  z-index: 2;
  transition: transform 0.45s var(--ease);
}

.vinyl-player.is-playing .vinyl-player__disc {
  animation: vinyl-spin 5.6s linear infinite;
}

.vinyl-player.is-playing .vinyl-player__arm-rod,
.vinyl-player.is-playing .vinyl-player__arm-head {
  transform: rotate(10deg);
}

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

.vinyl-player__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.vinyl-player__tbtn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.vinyl-player__tbtn svg {
  display: block;
  pointer-events: none;
}

.vinyl-player__tbtn--main {
  width: 34px;
  height: 34px;
  font-size: 12px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

/* —— Letter —— */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.letter-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.letter-panel {
  position: relative;
  width: min(100%, 460px);
  max-height: min(88dvh, 700px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panel-in 0.5s var(--ease);
}

.letter-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 44px 28px 32px;
  -webkit-overflow-scrolling: touch;
}

.letter-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
}

.letter-to {
  margin: 0 0 28px;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.letter-body p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.letter-body strong {
  color: var(--ink);
  font-weight: 600;
}

.letter-highlight {
  color: var(--ink) !important;
  font-weight: 500;
  text-align: center;
  padding: 18px 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.letter-sign {
  margin-top: 8px !important;
  color: var(--ink) !important;
  font-weight: 500;
  text-align: center;
}

.letter-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 8px;
}

/* —— Gate —— */
body.gate-active {
  overflow: hidden;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.gate-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-panel {
  width: min(100%, 400px);
  padding: 40px 28px 32px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: panel-in 0.45s var(--ease);
}

.gate-panel--shake {
  animation: gate-shake 0.4s var(--ease);
}

@keyframes gate-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-7px);
  }
  75% {
    transform: translateX(7px);
  }
}

.gate-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.gate-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}

.gate-hint {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.gate-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.gate-input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(17, 17, 19, 0.14);
  box-shadow: 0 0 0 4px rgba(17, 17, 19, 0.04);
}

.gate-error {
  margin: -4px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
}

.gate-error.is-hidden {
  display: none;
}

.gate-submit {
  margin-top: 4px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  color: #fff;
  background: var(--ink);
  border: none;
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up,
  .hero-media__img,
  .hero-scroll span,
  .vinyl-player,
  .vinyl-player.is-playing .vinyl-player__disc,
  .letter-panel,
  .gate-panel,
  .flower-modal__panel,
  .nav-nowplaying__track {
    animation: none !important;
  }

  .reveal,
  .reveal-up,
  .reveal-up.is-in {
    opacity: 1;
    transform: none;
  }

  .hero-media__img {
    transition-duration: 0.01ms;
  }
}
