:root {
  --pink: #ff9ecb;
  --pink-soft: #ffd6ec;
  --purple: #b28dff;
  --purple-soft: #e4d6ff;
  --blue-soft: #cdeeff;
  --plum: #5a3d5c;
  --cream: #fffaf6;
  --shadow: 0 10px 30px rgba(178, 141, 255, 0.25);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  color: var(--plum);
  background: linear-gradient(160deg, #ffe4f0 0%, #f3d9ff 35%, #dcd0ff 65%, #cdeeff 100%);
  background-attachment: fixed;
  overflow: hidden;
  position: relative;
}

h1, h2 {
  font-family: 'Pacifico', cursive;
  font-weight: 400;
}

/* ---------- background floating layer ---------- */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.balloon {
  position: absolute;
  bottom: -140px;
  width: 46px;
  height: 58px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0.85;
  animation: rise linear forwards;
}

.balloon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: 1px;
  height: 32px;
  background: rgba(90, 61, 92, 0.35);
  transform: translateX(-50%);
}

.balloon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 9px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

@keyframes rise {
  0% { transform: translateY(0) translateX(0) rotate(0deg); }
  25% { transform: translateY(-28vh) translateX(20px) rotate(4deg); }
  50% { transform: translateY(-55vh) translateX(-20px) rotate(-4deg); }
  75% { transform: translateY(-80vh) translateX(15px) rotate(3deg); }
  100% { transform: translateY(-115vh) translateX(0) rotate(0deg); opacity: 0; }
}

.heart {
  position: absolute;
  bottom: -40px;
  font-size: 18px;
  opacity: 0.7;
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0.8; }
  100% { transform: translateY(-105vh) translateX(30px); opacity: 0; }
}

/* ---------- confetti canvas ---------- */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* ---------- app / screens ---------- */
#app {
  position: fixed;
  inset: 0;
  z-index: 2;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.25rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* ---------- login screen waves ---------- */
.wave-layer {
  position: fixed;
  inset: auto 0 0 0;
  height: 220px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: waveDrift linear infinite;
}

.wave1 { animation-duration: 16s; opacity: 0.6; }
.wave2 { animation-duration: 22s; opacity: 0.45; animation-direction: reverse; }
.wave3 { animation-duration: 28s; opacity: 0.35; }

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

@media (max-width: 480px) {
  .wave-layer { height: 150px; }
}

/* ---------- login-only bubbles rising off the waves ---------- */
.bubble-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bubble {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25) 55%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: bubbleRise linear forwards;
}

@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0) scale(0.5); opacity: 0; }
  12% { opacity: 0.85; }
  75% { opacity: 0.7; }
  100% { transform: translateY(-105vh) translateX(var(--bubble-drift, 20px)) scale(1); opacity: 0; }
}

/* ---------- unlock flood transition ---------- */
/* guarantees zero see-through behind the flood shapes — hearts/stars/
   balloons all have transparent padding inside their own bounding boxes,
   so shape-tiling alone can never promise 100% opaque coverage on its own.
   this fades in/out in sync with the flood and sits just behind it. */
#unlockFloodBacking {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  opacity: 0;
  pointer-events: none;
}

#unlockFlood {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 80;
}

/* motion for these is driven entirely by JS (Web Animations API) in
   script.js, since each item needs its own stagger + a shared hold
   window — these rules are just the static shape/look. */
/* no string/knot at flood density — when a balloon sits behind others,
   a dangling string with nothing attached above it just reads as noise.
   a soft gloss highlight (like the ambient balloons don't have, but a
   dense wall of shapes needs) keeps the round ones reading as balloons
   even when partly covered by their neighbors. */
.flood-balloon {
  position: absolute;
  width: 260px;
  height: 330px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background:
    radial-gradient(ellipse 55% 40% at 32% 22%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 65%),
    var(--balloon-color);
  opacity: 0.97;
}

.flood-heart-balloon,
.flood-star-balloon {
  position: absolute;
  width: 260px;
  height: 330px;
  opacity: 0.97;
  filter: drop-shadow(0 6px 10px rgba(90, 61, 92, 0.18));
}

.flood-heart-balloon svg,
.flood-star-balloon svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  .flood-balloon { width: 170px; height: 215px; }
  .flood-heart-balloon,
  .flood-star-balloon { width: 170px; height: 215px; }
}

/* ---------- login screen ---------- */
.login-card {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  background: rgba(255, 250, 246, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.login-icon { font-size: 2.2rem; margin-bottom: 0.25rem; }

.login-title {
  font-size: 1.9rem;
  margin: 0 0 0.35rem;
  color: var(--pink);
}

.login-sub {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  opacity: 0.75;
  font-weight: 600;
}

.login-label {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0.5rem 0 0.3rem;
}

.login-input {
  border: 2px solid var(--purple-soft);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--plum);
  background: white;
  outline: none;
  transition: border-color 0.15s ease;
}

.login-input:focus { border-color: var(--pink); }

.password-wrap { position: relative; }

.password-wrap .login-input { width: 100%; padding-right: 2.75rem; }

.toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  opacity: 0.55;
  padding: 0.25rem;
  line-height: 1;
  transition: opacity 0.15s ease;
}

.toggle-password:hover { opacity: 0.9; }

.login-card .cake-btn { margin: 1.5rem auto 0; }

.login-error {
  min-height: 1.2rem;
  color: #e0507a;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}

.login-card.shake { animation: shake 0.4s ease; }

.build-tag {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--purple);
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(178, 141, 255, 0.5);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  backdrop-filter: blur(4px);
  z-index: 3;
  pointer-events: none;
}

.build-tag-right {
  left: auto;
  right: 1.25rem;
  font-family: 'Quicksand', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.15s ease, background 0.15s ease;
}

.build-tag-right:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.8);
}

.info-icon { font-size: 0.85rem; line-height: 1; }

.brand-mark {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  z-index: 3;
  pointer-events: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-name {
  font-family: 'Pacifico', cursive;
  font-size: 2.9rem;
  line-height: 1;
  background: linear-gradient(90deg, #ff8fc7, #b28dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  font-family: 'Quicksand', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--plum);
  opacity: 0.5;
  padding-left: 1.8rem;
}

@media (max-width: 480px) {
  .build-tag { font-size: 0.65rem; }
  .brand-mark { top: 1rem; left: 1rem; gap: 0.1rem; }
  .brand-row { gap: 0.5rem; }
  .brand-mark svg { width: 40px; height: 40px; }
  .brand-name { font-size: 2rem; }
  .brand-tagline { font-size: 0.65rem; padding-left: 1.3rem; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* ---------- hero / birthday screen ---------- */
.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  margin: 0 0 0.5rem;
}

.title {
  font-size: clamp(2.6rem, 9vw, 5rem);
  margin: 0;
  background: linear-gradient(90deg, #ff8fc7, #b28dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}

.age-line {
  margin: 0.5rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--plum);
}

.subtitle {
  margin: 0.75rem 0 2.5rem;
  max-width: 480px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--plum);
  opacity: 0.85;
}

.section-heading {
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
  color: var(--pink);
}

.section-sub {
  margin: 0 0 2rem;
  font-weight: 600;
  opacity: 0.8;
}

.cake-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cake-btn:hover { transform: translateY(-3px) scale(1.03); }
.cake-btn:active { transform: translateY(0) scale(0.98); }

.cake-emoji { font-size: 1.3rem; }

/* ---------- envelope / letter screen ---------- */
.envelope-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  transition: opacity 0.4s ease;
}

.envelope-scene.fade-out { opacity: 0; }

.envelope {
  position: relative;
  width: 280px;
  max-width: 78vw;
  height: 190px;
  cursor: pointer;
  perspective: 800px;
}

.envelope-paper {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: 145px;
  background: var(--cream);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1;
  transition: transform 0.9s ease 0.35s;
}

.envelope-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--pink-soft), var(--purple-soft));
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 2;
  clip-path: polygon(0 22%, 50% 55%, 100% 22%, 100% 100%, 0 100%);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  border-left: 140px solid transparent;
  border-right: 140px solid transparent;
  border-top: 95px solid var(--pink);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.envelope-flap::after {
  content: '💜';
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 0;
}

.envelope.open .envelope-paper {
  transform: translateY(-58px);
}

.envelope-hint {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.6;
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.letter-card {
  max-width: 620px;
  width: 100%;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(178, 141, 255, 0.12),
      rgba(178, 141, 255, 0.12) 1px,
      transparent 1px,
      transparent 34px
    ),
    var(--cream);
  border-radius: 14px;
  padding: 2.75rem 2.25rem 2.25rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  text-align: center;
  position: relative;
  transform: rotate(-0.6deg);
  animation: letterIn 0.5s ease;
}

@keyframes letterIn {
  from { opacity: 0; transform: rotate(-0.6deg) translateY(16px) scale(0.97); }
  to { opacity: 1; transform: rotate(-0.6deg) translateY(0) scale(1); }
}

.letter-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 90px;
  height: 28px;
  background: rgba(255, 214, 236, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.letter-card h2 {
  font-size: 2.2rem;
  margin: 0 0 1.1rem;
  color: var(--pink);
}

.letter-body {
  text-align: left;
  font-family: 'Caveat', cursive;
  font-size: 1.55rem;
  line-height: 34px;
  margin: 0 0 1.25rem;
  color: var(--plum);
}

.inline-name { font-weight: 700; color: var(--purple); }

.signoff {
  text-align: right;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--plum);
  opacity: 0.85;
  margin: 0 0 1.5rem;
}

.closing-card .signoff { margin-bottom: 0; }

/* ---------- gift screen ---------- */
.gifts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0 2rem;
}

.gift-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
}

.gift-box {
  background: none;
  border: none;
  font-size: 4.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
  user-select: none;
  filter: drop-shadow(0 8px 14px rgba(178, 141, 255, 0.35));
  transition: transform 0.08s ease;
}

.gift-box-large {
  font-size: 6rem;
  filter: drop-shadow(0 10px 18px rgba(178, 141, 255, 0.35));
}

.gift-box.shake { animation: giftShake 0.3s ease; }

@keyframes giftShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-8deg) scale(1.03); }
  50% { transform: rotate(7deg) scale(1.05); }
  75% { transform: rotate(-5deg) scale(1.03); }
}

.gift-box.opened {
  animation: giftPop 0.5s ease forwards;
  pointer-events: none;
}

@keyframes giftPop {
  0% { transform: scale(1) rotate(0deg); opacity: 1; }
  60% { transform: scale(1.4) rotate(10deg); opacity: 1; }
  100% { transform: scale(0.3) rotate(20deg); opacity: 0; }
}

.gift-progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(178, 141, 255, 0.18);
  overflow: hidden;
  margin: 0.9rem auto 0.5rem;
}

.gift-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  border-radius: 999px;
  transition: width 0.15s ease;
}

.gift-hint {
  font-weight: 700;
  opacity: 0.6;
  font-size: 0.82rem;
  text-align: center;
}

.gift-slot-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: letterIn 0.5s ease;
}

.gift-slot-emoji { font-size: 3.2rem; }

.gift-slot-text {
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  color: var(--plum);
}

.gift-screen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

/* ---------- gift focus view (single present, entered from the grid) ---------- */
.gift-round-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(178, 141, 255, 0.14);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

#giftFocusView .gift-progress {
  width: 260px;
  max-width: 70vw;
  margin: 1.5rem auto 0.6rem;
}

.gift-focus-reveal .gift-slot-emoji { font-size: 4rem; }

.gift-focus-reveal .gift-slot-text {
  font-size: 1.4rem;
  max-width: 480px;
  margin: 0 auto;
}

.gift-focus-reveal .nav-btn { margin-top: 0.75rem; }

/* ---------- puzzle board (shown in a modal) ---------- */
.puzzle-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 5px;
  width: min(340px, 80vw);
  aspect-ratio: 3 / 2;
  margin: 0 auto 1.75rem;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--cream);
  padding: 5px;
}

.puzzle-cell {
  border-radius: 6px;
  background-size: 300% 200%;
}

.puzzle-cell.filled {
  background-image: var(--puzzle-art);
}

.puzzle-cell.locked {
  background: rgba(178, 141, 255, 0.14);
  border: 2px dashed rgba(178, 141, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-weight: 800;
  font-size: 1.3rem;
  opacity: 0.55;
}

.puzzle-cell.just-placed {
  animation: puzzlePop 0.55s ease;
}

@keyframes puzzlePop {
  0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ---------- closing screen navigation ---------- */
.closing-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.nav-btn {
  border: 2px solid var(--purple-soft);
  background: var(--cream);
  color: var(--purple);
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.nav-btn:hover { border-color: var(--pink); transform: translateY(-2px); }

/* ---------- music toggle ---------- */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  font-size: 1.4rem;
  box-shadow: var(--shadow);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.music-toggle:hover { transform: scale(1.08); }

.music-toggle.playing .note {
  animation: spin 3s linear infinite;
}

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

@media (max-width: 480px) {
  .letter-card { padding: 2.25rem 1.5rem 1.75rem; }
  .cake-btn { padding: 0.85rem 1.5rem; font-size: 0.95rem; }
  .gift-box { font-size: 3.4rem; }
  .gift-box-large { font-size: 4.6rem; }
  .gift-slot { width: 110px; }
  .gifts-row { gap: 1.1rem; }
  .build-tag { font-size: 0.68rem; padding: 0.35rem 0.75rem; }
}

/* ---------- update logs modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(90, 61, 92, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 78vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 24px;
  padding: 2.25rem 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transform: scale(0.92);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(178, 141, 255, 0.15);
  color: var(--plum);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 1.7rem;
  margin: 0 0 1.25rem;
  color: var(--pink);
  text-align: center;
}

.modal-sub {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.75;
}

.pin-boxes {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
}

.pin-box {
  width: 42px;
  height: 52px;
  border: 2px solid var(--purple-soft);
  border-radius: 12px;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--plum);
  background: white;
  outline: none;
  transition: border-color 0.15s ease;
}

.pin-box:focus { border-color: var(--pink); }

@media (max-width: 480px) {
  .pin-box { width: 36px; height: 46px; font-size: 1.2rem; }
  .pin-boxes { gap: 0.45rem; }
}

#changelogPinView .cake-btn {
  display: flex;
  margin: 1.25rem auto 0;
}

#changelogPinView .login-error {
  text-align: center;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}

.changelog-entry {
  border-left: 3px solid var(--purple-soft);
  padding-left: 0.9rem;
}

.changelog-version {
  font-weight: 800;
  color: var(--purple);
  font-size: 1rem;
}

.changelog-date {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.5;
  margin-left: 0.4rem;
}

.changelog-entry ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--plum);
}

.modal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(178, 141, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.65;
}

.info-hover {
  position: relative;
  display: inline-flex;
  cursor: help;
}

.info-tooltip {
  position: absolute;
  bottom: 130%;
  left: 50%;
  width: 200px;
  transform: translateX(-50%) translateY(4px);
  background: var(--plum);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.info-hover:hover .info-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .modal-card { padding: 2rem 1.35rem 1.35rem; }
  .modal-title { font-size: 1.4rem; }
}
