:root {
  --ink: #281818;
  --card: rgba(255, 255, 255, 0.8);
  --shadow: 0 20px 45px rgba(54, 24, 24, 0.14);
  --line: rgba(255, 255, 255, 0.82);
  --accent-main: #cc5f63;
  --accent-second: #db8e3d;
  --accent-third: #2f857b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.2), transparent 34%),
    radial-gradient(circle at 86% 84%, rgba(255, 255, 255, 0.14), transparent 30%),
    linear-gradient(
      90deg,
      #ce1126 0%,
      #ce1126 30%,
      #ffffff 45%,
      #ffffff 55%,
      #ce1126 70%,
      #ce1126 100%
    );
}

.theme-ultra {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 173, 195, 0.35), transparent 36%),
    radial-gradient(circle at 84% 13%, rgba(255, 124, 150, 0.22), transparent 36%),
    linear-gradient(130deg, #fff0f5 0%, #fbe8ef 50%, #f3dfe8 100%);
}

.theme-select {
  background:
    radial-gradient(circle at 8% 8%, rgba(138, 181, 255, 0.22), transparent 36%),
    radial-gradient(circle at 90% 12%, rgba(255, 181, 117, 0.24), transparent 34%),
    linear-gradient(130deg, #eff5ff 0%, #f3f2fd 48%, #efe9ff 100%);
}

.blob {
  position: fixed;
  z-index: 0;
  width: 34vmax;
  height: 34vmax;
  border-radius: 50%;
  filter: blur(68px);
  opacity: 0.42;
  pointer-events: none;
}

.blob-a {
  background: #e0495b;
  top: -11vmax;
  right: -9vmax;
}

.blob-b {
  background: #f7b6c0;
  bottom: -13vmax;
  left: -9vmax;
}

.theme-ultra .blob-a {
  background: #ff9fbd;
}

.theme-ultra .blob-b {
  background: #ffca86;
}

.theme-select .blob-a {
  background: #9bb7ff;
}

.theme-select .blob-b {
  background: #ffcf99;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
  color: #2d7f75;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(18, 10, 11, 0.52);
  backdrop-filter: blur(8px);
  padding: 1.2rem;
}

.gate-card {
  width: min(560px, 100%);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(255, 247, 237, 0.97));
  border-radius: 24px;
  border: 1px solid #f2e3d4;
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 2.8vw, 2.2rem);
  text-align: center;
}

.gate-card h1,
h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
}

.gate-note {
  margin: 0.8rem auto 1.2rem;
  max-width: 36ch;
  line-height: 1.5;
}

.gate-form {
  display: grid;
  gap: 0.7rem;
  text-align: left;
}

.gate-form label {
  font-size: 0.86rem;
  font-weight: 700;
}

.gate-form input {
  width: 100%;
  border: 1px solid #e8d8cb;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: #fff;
}

button,
.chip-link {
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.music-btn {
  background: linear-gradient(120deg, #ca5f65, #d98644);
  color: #fff;
}

.secondary-btn,
.chip-link {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #ecdccc;
  color: var(--ink);
}

.gate-error {
  margin: 0;
  color: #b43846;
  min-height: 1.2em;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 1.4rem 0 4rem;
}

.music-floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 60;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #ca5f65, #d98644);
  color: #fff;
  box-shadow: 0 12px 24px rgba(60, 20, 20, 0.24);
}

.topbar,
.hero,
.story-grid,
.gallery-section,
.reasons,
.footer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
}

.topbar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  align-items: center;
  padding: clamp(0.7rem, 1.8vw, 1rem) clamp(0.85rem, 2.4vw, 1.25rem);
  margin-bottom: 1rem;
}

.topbar-title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(0.56rem, 1.25vw, 0.92rem);
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: clamp(1.2rem, 2.8vw, 2.2rem);
  margin-bottom: 1rem;
}

.hero-copy {
  width: min(760px, 100%);
}

.hero h1 {
  margin: 0.35rem 0 0.9rem;
  font-size: clamp(2rem, 4.8vw, 3.8rem);
  line-height: 1.03;
}

.theme-ultra .hero h1 {
  color: #8e2f5a;
}

.hero-text {
  margin: 0 auto;
  max-width: 60ch;
  line-height: 1.65;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0 1.2rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #ecdccc;
  background: #fff;
  padding: 0.32rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-media {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  justify-items: center;
  width: min(620px, 100%);
}

.age-orb {
  width: 80px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(135deg, #ca6065, #dd8c4a);
  box-shadow: 0 10px 25px rgba(156, 52, 52, 0.3);
}

.theme-ultra .age-orb {
  background: linear-gradient(130deg, #b14872, #ff7d66);
}

.spotlight-frame {
  border-radius: 18px;
  overflow: hidden;
  background: #f5e7da;
  width: min(560px, 100%);
  min-height: 340px;
  border: 1px solid #ebd8ca;
}

.spotlight-frame img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  display: block;
}

.spotlight-caption {
  margin: 0;
  font-size: 0.88rem;
  color: #67443a;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.9rem;
  margin-bottom: 1rem;
}

.story-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(248, 241, 232, 0.9));
  border-radius: 18px;
  border: 1px solid #f1e2d5;
  padding: 1rem;
}

.story-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.2rem;
}

.story-card p {
  margin: 0;
  line-height: 1.55;
}

.gallery-section,
.reasons,
.footer {
  padding: clamp(1.2rem, 2.4vw, 1.8rem);
  margin-bottom: 1rem;
}

.gallery-header h2,
.reasons h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

.featured-badge {
  margin: 0;
  color: #7b4a2a;
  font-size: 0.92rem;
}

.memory-scatter {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.2rem;
  padding-bottom: 0.6rem;
}

.photo {
  margin: 0.4rem;
  margin-left: var(--overlap, 0px);
  margin-top: var(--lift, 0px);
  width: var(--w, 210px);
  max-width: min(260px, 44vw);
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #ebdfd2;
  background: #fffefb;
  box-shadow: 0 18px 22px rgba(53, 22, 22, 0.18);
  transform: rotate(var(--rot, 0deg));
  transform-origin: center center;
  z-index: var(--z, 1);
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.photo:hover {
  z-index: 35;
  transform: rotate(var(--rot, 0deg)) scale(1.04);
  box-shadow: 0 24px 30px rgba(42, 19, 19, 0.24);
}

.photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  border: 1px solid #f1e8df;
}

.reasons ol {
  margin: 0;
  padding: 0 0 0 1.15rem;
  columns: 2;
  gap: 1.6rem;
}

.reasons li {
  margin: 0 0 0.72rem;
  line-height: 1.45;
}

.footer {
  text-align: center;
  margin-bottom: 0;
}

.selector-app {
  position: relative;
  z-index: 1;
  width: min(1300px, 96vw);
  margin: 0 auto;
  padding: 1.2rem 0 3rem;
}

.selector-header,
.selector-controls,
.selector-grid {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.selector-header {
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.selector-header h1 {
  margin: 0.2rem 0 0.25rem;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
}

.selector-subtitle {
  margin: 0;
}

.selector-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.selector-controls {
  margin-top: 0.8rem;
  padding: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.selector-controls input[type="search"] {
  flex: 1 1 250px;
  min-width: 220px;
  border: 1px solid #e6d8d0;
  border-radius: 10px;
  padding: 0.68rem 0.82rem;
  font: inherit;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.selector-status {
  margin: 0.65rem 0;
  font-weight: 700;
}

.selector-grid {
  margin-top: 0.3rem;
  padding: 0.65rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.select-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #f2ebe5;
}

.select-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.select-card .label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.32rem 0.4rem;
  font-size: 0.68rem;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-card.selected {
  border-color: #e19f35;
  box-shadow: 0 0 0 2px rgba(225, 159, 53, 0.2);
}

.select-card.selected::after {
  content: "✓";
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, 0.75);
  color: #fff;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 620ms ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 70ms;
}

.reveal:nth-child(3) {
  animation-delay: 120ms;
}

.reveal:nth-child(4) {
  animation-delay: 170ms;
}

.reveal:nth-child(5) {
  animation-delay: 220ms;
}

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

@media (max-width: 1080px) {
  .memory-scatter {
    justify-content: center;
  }

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

@media (max-width: 760px) {
  .selector-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .photo {
    width: min(44vw, 210px);
    margin-left: 0.15rem;
  }

  .reasons ol {
    columns: 1;
  }

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

  .music-floating {
    top: 0.7rem;
    right: 0.7rem;
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.83rem;
  }
}

@media (max-width: 520px) {
  .app,
  .selector-app {
    width: min(100%, 94vw);
  }

  .spotlight-frame,
  .spotlight-frame img {
    min-height: 290px;
  }
}
