:root {
  --bg1: #fff8f0;
  --bg2: #e1f4df;
  --accent: #d94862;
  --accent-2: #f27f0c;
  --text: #2c1d24;
  --panel: rgba(255, 255, 255, 0.75);
  --shadow: 0 12px 28px rgba(85, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
  image-rendering: pixelated;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23ff4f9f' stroke='%237e2a5f' stroke-width='2' d='M16 27s-9-6.1-12-11.2C1.8 11.7 4.2 7 8.8 7c2.9 0 5.1 1.6 7.2 4.2C18.1 8.6 20.3 7 23.2 7 27.8 7 30.2 11.7 28 15.8 25 20.9 16 27 16 27z'/%3E%3C/svg%3E") 16 16, auto;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Press Start 2P", cursive;
  font-size: 12px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 190, 200, 0.35), transparent 42%),
    radial-gradient(circle at 80% 15%, rgba(171, 225, 177, 0.38), transparent 35%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
  min-height: 100vh;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

body.locked {
  overflow: hidden;
}

#heartCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero,
main,
footer {
  position: relative;
  z-index: 1;
}

.site-content {
  transition: opacity 0.25s ease;
}

body.locked .site-content {
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1rem;
}

body.authenticated .lock-screen {
  display: none;
}

.lock-card {
  width: min(420px, 96vw);
  padding: 1.2rem;
  border-radius: 0;
  background: linear-gradient(180deg, #ffe9f3, #ffd9ea);
  border: 4px solid #ff4f9f;
  box-shadow:
    8px 8px 0 #7e2a5f,
    0 0 0 4px rgba(255, 182, 207, 0.45);
  text-align: center;
  image-rendering: pixelated;
}

.lock-kicker {
  margin: 0;
  color: #b0005b;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: "Press Start 2P", cursive;
  line-height: 1.6;
}

.lock-card h2 {
  margin: 0.6rem 0 0.3rem;
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  font-family: "Press Start 2P", cursive;
  line-height: 1.45;
  color: #3b1230;
}

.lock-note {
  margin: 0 0 1rem;
  color: #6d3b4f;
  font-weight: 700;
  font-family: "Press Start 2P", cursive;
  font-size: 0.57rem;
  line-height: 1.7;
}

.lock-input {
  width: 100%;
  border: 3px solid #ff4f9f;
  border-radius: 0;
  font-family: "Press Start 2P", cursive;
  font-size: 0.66rem;
  padding: 0.95rem 0.8rem;
  background: #fff9fc;
  color: #4f1f34;
  box-shadow: inset 4px 4px 0 #ffd2e7;
}

.lock-input:focus {
  outline: none;
  border-color: #8b3dff;
  box-shadow:
    inset 4px 4px 0 #ffd2e7,
    0 0 0 4px rgba(139, 61, 255, 0.2);
}

.lock-btn {
  margin-top: 0.75rem;
  width: 100%;
  border: 3px solid #ff4f9f;
  border-radius: 0;
  padding: 0.95rem 1rem;
  font-family: "Press Start 2P", cursive;
  font-size: 0.62rem;
  line-height: 1.5;
  font-weight: 400;
  cursor: pointer;
  color: white;
  background: linear-gradient(120deg, #ff5f95, #ec7b1a, #ffcf5a);
  box-shadow: 5px 5px 0 #7e2a5f;
}

.lock-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 4px 4px 0 #7e2a5f;
}

.lock-error {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: #b8004f;
  font-weight: 400;
  font-family: "Press Start 2P", cursive;
  font-size: 0.58rem;
  line-height: 1.6;
}

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

.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1rem 2rem;
  text-align: center;
}

.tag {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 0.8rem;
  color: #8b4762;
}

h1,
h2 {
  font-family: "Press Start 2P", cursive;
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.lead {
  max-width: 700px;
  margin: 1rem auto 1.5rem;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 0;
  padding: 0.72rem 1.1rem;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: white;
  font-family: "Press Start 2P", cursive;
  font-size: 0.62rem;
  line-height: 1.5;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 4px 4px 0 #7e2a5f;
  border: 3px solid #ff4f9f;
  transition: transform 0.08s ease;
}

.btn:hover {
  transform: translate(1px, 1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: #842740;
}

.counter {
  margin-top: 1rem;
  font-weight: 700;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
  padding: 1.25rem;
  box-shadow: 6px 6px 0 rgba(85, 33, 43, 0.24);
}

.panel-head {
  margin-bottom: 0.8rem;
}

.panel h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.memory-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.memory-viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 0;
  border: 3px solid #ff4f9f;
}

.memory-slide {
  margin: 0;
  min-width: 100%;
  scroll-snap-align: start;
}

.memory-slide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  box-shadow: none;
}

.memory-caption {
  margin: 0.6rem 0 0.15rem;
  font-weight: 600;
  text-align: center;
}

.memory-count {
  margin: 0;
  text-align: center;
  color: #7a3951;
  font-weight: 700;
}

.carousel-btn {
  border: 3px solid #ff4f9f;
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: rgba(217, 72, 98, 0.92);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  font-family: "Press Start 2P", cursive;
}

.capsules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.capsule-card {
  min-height: 120px;
  border-radius: 0;
  border: 3px solid #ff4f9f;
  background: linear-gradient(145deg, #fff, #ffe8ee);
  color: #531d30;
  padding: 0.8rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(85, 33, 43, 0.24);
  font-family: inherit;
  font-size: 0.66rem;
  line-height: 1.6;
}

.capsule-card strong {
  display: block;
  margin-bottom: 0.3rem;
}

.mission-text {
  margin: 0.4rem 0 0.9rem;
  padding: 0.9rem;
  border-radius: 0;
  border: 3px solid #ff4f9f;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 400;
  color: #5f1f35;
}

.typewriter {
  min-height: 4.2rem;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.8;
}

footer {
  text-align: center;
  padding: 1rem;
  color: #75354e;
  font-weight: 700;
}

@media (max-width: 700px) {
  .memory-shell {
    grid-template-columns: 1fr;
  }

  .carousel-btn {
    width: 100%;
    border-radius: 14px;
    height: 38px;
  }
}
