/* lock.css — auto-split from styles.css */
/* ===== LOCK ===== */
#lock {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 18px;
  isolation: isolate;
}
.lock-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(224, 192, 138, 0.14), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 55%, rgba(224, 192, 138, 0.06), transparent 70%);
  animation: lockAmbient 8s ease-in-out infinite alternate;
}
@keyframes lockAmbient {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.04); }
}
.lock-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 44px 32px 36px;
  border: 1px solid rgba(224, 192, 138, 0.32);
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(224, 192, 138, 0.08);
  animation: lockCardIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes lockCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.lock-kicker {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 1;
  text-shadow: 0 0 28px rgba(232, 204, 150, 0.45);
}
.lock-icon {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 26px;
  display: grid;
  place-items: center;
}
.lock-icon-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(232, 204, 150, 0.45);
  box-shadow:
    0 0 28px rgba(232, 204, 150, 0.2),
    inset 0 0 24px rgba(232, 204, 150, 0.08);
  animation: lockRing 3.2s ease-in-out infinite alternate;
}
.lock-icon-ring--outer {
  inset: 0;
  border-color: rgba(232, 204, 150, 0.2);
  box-shadow: none;
  animation: lockRingOuter 4s ease-in-out infinite alternate;
}
@keyframes lockRing {
  from { transform: scale(1); opacity: 0.75; }
  to   { transform: scale(1.05); opacity: 1; }
}
@keyframes lockRingOuter {
  from { transform: scale(1); opacity: 0.5; }
  to   { transform: scale(1.08); opacity: 0.85; }
}
.lock-icon-heart {
  position: relative;
  z-index: 1;
  font-size: 2.1rem;
  line-height: 1;
  color: #e8cc96;
  filter: drop-shadow(0 0 12px rgba(232, 204, 150, 0.65));
  animation: softPulse 2.4s ease-in-out infinite;
  font-family: Georgia, 'Playfair Display', serif;
  -webkit-text-fill-color: #e8cc96;
  background: linear-gradient(180deg, #f5e6c0 0%, #d4af77 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lock-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 5.5vw, 2.55rem);
  font-weight: 500;
  color: #fffaf0;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lock-text {
  margin: 0 auto 28px;
  max-width: 300px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e8dfd0;
}
.lock-text b {
  color: #fffaf0;
  font-weight: 600;
}
.lock-field {
  margin: 0 auto 20px;
  width: min(240px, 100%);
}
.lock-field input,
#password {
  width: 100%;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(224, 192, 138, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: #fffaf0;
  text-align: center;
  font-size: 1.3rem;
  letter-spacing: 0.4em;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: inherit;
  box-sizing: border-box;
}
#password::placeholder {
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.5em;
}
#password:focus {
  border-color: rgba(232, 204, 150, 0.7);
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 4px rgba(224, 192, 138, 0.14), 0 0 32px rgba(224, 192, 138, 0.12);
}

/* Soft pill lock button — gold, high specificity */
#lock button.lock-btn,
#lock .lock-btn,
button.lock-btn.lock-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 15px 38px !important;
  margin-top: 10px !important;
  color: #ffffff !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #e8c070 0%, #d4a040 50%, #c49030 100%) !important;
  background-color: #d4a040 !important;
  box-shadow: 0 10px 28px rgba(196, 146, 58, 0.4), 0 4px 12px rgba(0, 0, 0, 0.18) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  font-family: inherit !important;
  text-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
}
#lock .lock-btn-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
#lock .lock-btn-heart {
  font-size: 1.1rem !important;
  line-height: 1 !important;
  display: inline-block !important;
  color: inherit !important;
  -webkit-text-fill-color: initial !important;
  background: none !important;
  filter: none !important;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif !important;
}
#lock button.lock-btn:hover,
#lock .lock-btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 14px 34px rgba(196, 146, 58, 0.5), 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}
#lock button.lock-btn:active {
  transform: translateY(0) !important;
}

.lock-hint {
  margin-top: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.8;
}
.lock-card.lock-shake {
  animation: lockShake 0.45s ease;
}
@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* generic heart used in chapters */
.heart {
  font-size: 2.4rem;
  margin-bottom: 10px;
  filter: grayscale(0.15) brightness(1.05);
  animation: softPulse 2.4s ease-in-out infinite;
}
@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.06); opacity: 1; }
}


button, .album-button { font-family: inherit; }
.primary-btn,
.question-btn,
#modal button,
.return-close,
.letter-close {
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  margin-top: 20px;
  color: #1a1610;
  cursor: pointer;
  background: linear-gradient(135deg, #d4af77, #b8954f);
  box-shadow: 0 10px 28px rgba(201, 168, 108, 0.22);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.primary-btn:hover,
.question-btn:hover,
#modal button:hover,
.return-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(201, 168, 108, 0.3);
}
.primary-btn:active,
.question-btn:active { transform: translateY(0); }
.primary-btn:focus-visible,
.question-btn:focus-visible,
.round-btn:focus-visible,
.envelope:focus-visible,
.memory-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

#content { position: relative; z-index: 2; }

.chapter {
  position: relative;
  min-height: 90svh;
  padding: 96px var(--space);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.chapter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 64px;
  background: linear-gradient(transparent, rgba(224, 192, 138, 0.6));
  transform: translateX(-50%);
}
.chapter-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 18px;
  text-transform: uppercase;
  opacity: 1;
  text-shadow: 0 0 20px rgba(201, 168, 108, 0.25);
}
.chapter-lead { color: var(--muted); font-size: 0.98rem; }

.card {
  width: min(800px, 100%);
  padding: 30px 28px;
  border: 1px solid rgba(224, 192, 138, 0.3);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 50px rgba(224, 192, 138, 0.07);
}
.card p {
  padding: 13px 6px;
  margin: 0;
  border-bottom: 1px solid rgba(224, 192, 138, 0.15);
  text-align: left;
  color: #f5efe3;
}
.card p:last-child { border-bottom: 0; }

.divider {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--gold);
  opacity: 0.65;
  letter-spacing: 12px;
  font-size: 1.2rem;
  margin: 8px 0;
  user-select: none;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}
.reveal.show {
  opacity: 1;
  transform: none;
}

.secret-heart,
.touch-me,
.hold-text {
  cursor: pointer;
  color: var(--gold);
  margin-top: 26px;
  user-select: none;
  transition: color 0.2s, transform 0.2s;
}
.secret-heart { animation: softPulse 2.4s ease-in-out infinite; }
.secret-heart:hover { transform: scale(1.06); }
.secret-text,
.whisper,
.hold-secret,
.soft-end {
  color: #e8dcc4;
  font-style: italic;
}
.hold-text:active { color: var(--gold); }

.touch-glow {
  position: fixed;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, rgba(201, 168, 108, 0.18), transparent 70%);
  animation: glowFade 0.85s ease-out forwards;
}
@keyframes glowFade {
  to { transform: scale(2); opacity: 0; }
}

.gallery-shell {
  width: min(640px, 100%);
  margin-top: 28px;
}
.polaroid-stack {
  position: relative;
  height: min(68vh, 620px);
  min-height: 400px;
  perspective: 1200px;
  touch-action: pan-y;
}
.polaroid {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(84vw, 410px);
  height: max-content;
  padding: 12px 12px 48px;
  background: #f2ebe0;
  border-radius: 3px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(40px) rotate(3deg) scale(0.93);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}
.polaroid.active {
  opacity: 1;
  transform: translateX(0) rotate(-1deg) scale(1);
  pointer-events: auto;
}
.polaroid img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #e5ddd0;
  border-radius: 1px;
}
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 22px;
  color: var(--gold);
}
.gallery-controls small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 4px;
}
.round-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(201, 168, 108, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  display: grid;
  place-items: center;
}
.round-btn:hover {
  background: rgba(201, 168, 108, 0.12);
  border-color: rgba(201, 168, 108, 0.45);
  transform: scale(1.05);
}
.round-btn:active { transform: scale(0.96); }

.album-v2 { overflow: hidden; }
.vinyl {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  margin-bottom: 18px;
  background: repeating-radial-gradient(circle, #0c0c0c 0 6px, #161616 7px 9px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 0 18px rgba(0, 0, 0, 0.6);
  animation: spin 11s linear infinite;
  border: 2px solid #2a2a2a;
  color: var(--gold);
}
@keyframes spin { to { transform: rotate(360deg); } }
.album-button {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  color: #1a1610;
  font-weight: 600;
  background: linear-gradient(135deg, #d4af77, #b8954f);
  box-shadow: 0 12px 32px rgba(201, 168, 108, 0.2);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.album-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 40px rgba(201, 168, 108, 0.28);
}
.equalizer {
  height: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}
.equalizer i {
  display: block;
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--gold);
  animation: eq 0.85s ease-in-out infinite alternate;
  opacity: 0.7;
}
.equalizer i:nth-child(2) { animation-delay: 0.12s; }
.equalizer i:nth-child(3) { animation-delay: 0.24s; }
.equalizer i:nth-child(4) { animation-delay: 0.36s; }
.equalizer i:nth-child(5) { animation-delay: 0.48s; }
@keyframes eq { to { height: 26px; } }

.question-btn { display: block; margin: 18px auto; }
#questions {
  width: min(780px, 100%);
  margin-top: 28px;
  text-align: left;
}
#questions p {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(224, 192, 138, 0.15);
  margin: 0;
  font-size: 1.04rem;
  color: #f5efe3;
}
#questions h2 { text-align: center; }

.love-title {
  font-size: clamp(2.6rem, 9.5vw, 5.2rem);
  margin-top: 56px;
  text-shadow: 0 0 50px rgba(201, 168, 108, 0.22);
  line-height: 1.05;
}

#modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
#modal.show { display: flex; animation: fadeIn 0.35s ease; }
#modalContent {
  width: min(680px, 100%);
  max-height: 82vh;
  overflow: auto;
  padding: 36px 30px;
  border-radius: 24px;
  text-align: center;
  border: 1px solid rgba(224, 192, 138, 0.28);
  background: linear-gradient(160deg, #1e1a14, #14110e);
  box-shadow: var(--shadow-strong);
}
.final-signature {
  margin-top: 32px;
  color: var(--muted);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
}

.easter {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: rgba(201, 168, 108, 0.2);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.25s, transform 0.25s;
}
.easter:hover { color: rgba(201, 168, 108, 0.55); transform: scale(1.12); }
.easter-msg {
  position: fixed;
  right: 16px;
  bottom: 58px;
  z-index: 31;
  max-width: 240px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e1a14;
  color: #e8dcc4;
  border: 1px solid rgba(224, 192, 138, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.3s var(--ease);
}
.easter-msg.show { opacity: 1; transform: none; }

.update-card,
.future-card,
.daily-card,
.memory-card,
.envelope-grid {
  width: min(800px, 100%);
}
.update-card,
.future-card,
.daily-card,
.memory-card {
  padding: 28px 26px;
  border: 1px solid rgba(224, 192, 138, 0.3);
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft), 0 0 50px rgba(224, 192, 138, 0.07);
}
.update-date {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 500;
}
.update-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  margin: 0.5rem 0 0.6rem;
  font-weight: 500;
}
.daily-message {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 4.2vw, 1.95rem);
  line-height: 1.55;
  color: #fffaf0;
  font-weight: 500;
}

.envelope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.envelope {
  min-height: 136px;
  padding: 18px;
  border: 1px solid rgba(224, 192, 138, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 10%, rgba(224, 192, 138, 0.16), transparent 40%),
    linear-gradient(150deg, rgba(42, 36, 26, 0.95), rgba(22, 18, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-size: 0.94rem;
  font-weight: 500;
}
.envelope:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 108, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(201, 168, 108, 0.06);
}
.envelope:active { transform: translateY(-1px); }
.envelope-icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.envelope small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 400;
}

.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.letter-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
.letter-paper {
  width: min(640px, 100%);
  max-height: 84vh;
  overflow: auto;
  padding: 32px 26px;
  border-radius: 22px;
  border: 1px solid rgba(201, 168, 108, 0.18);
  background:
    radial-gradient(circle at 85% 8%, rgba(224, 192, 138, 0.12), transparent 40%),
    linear-gradient(155deg, #1e1a14, #14110e);
  color: var(--text);
  text-align: left;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}
.letter-paper h2 { color: #fffaf0; margin-bottom: 0.6em; }
.letter-paper p { color: #f5efe3; line-height: 1.85; margin: 0.7em 0; }
.letter-close {
  display: block;
  margin: 22px auto 0;
  background: #2a261e !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

.memory-btn {
  border: 1px solid rgba(201, 168, 108, 0.22);
  border-radius: 999px;
  padding: 13px 24px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font-size: 0.92rem;
}
.memory-btn:hover {
  background: rgba(201, 168, 108, 0.1);
  border-color: rgba(201, 168, 108, 0.4);
  transform: translateY(-1px);
}
.memory-result {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-top: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  line-height: 1.55;
  color: #f5efe3;
}

.future-lines {
  width: 100%;
  margin-top: 24px;
  opacity: 0.35;
}
.future-lines div {
  height: 34px;
  border-bottom: 1px dashed rgba(201, 168, 108, 0.25);
}
.site-promise {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3.8vw, 1.95rem);
  line-height: 1.55;
  font-weight: 500;
  color: #fffaf0;
}

.hidden-heart {
  position: absolute;
  z-index: 12;
  border: 0;
  background: transparent;
  color: rgba(201, 168, 108, 0.2);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.25s, transform 0.25s, opacity 0.3s;
}
.hidden-heart:nth-of-type(1) { transform: rotate(-10deg); }
.hidden-heart:nth-of-type(2) { transform: rotate(8deg); }
.hidden-heart:nth-of-type(3) { transform: rotate(-5deg); }
.hidden-heart:nth-of-type(4) { transform: rotate(11deg); }
.hidden-heart:nth-of-type(5) { transform: rotate(-3deg); }
.hidden-heart:hover {
  color: var(--gold);
  transform: scale(1.18) !important;
}
.secret-progress {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
.secret-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 12000;
  transform: translate(-50%, 16px);
  width: min(90vw, 390px);
  padding: 14px 16px;
  border-radius: 14px;
  background: #1e1a14;
  color: #e8dcc4;
  border: 1px solid rgba(224, 192, 138, 0.28);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.35s var(--ease);
  text-align: center;
  font-size: 0.9rem;
}
.secret-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.return-overlay {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.return-overlay.show {
  display: flex;
  animation: fadeIn 0.5s ease;
}
.return-card {
  width: min(600px, 100%);
  padding: 36px 26px;
  border-radius: 24px;
  text-align: center;
  border: 1px solid rgba(224, 192, 138, 0.3);
  background:
    radial-gradient(circle at 50% 0, rgba(224, 192, 138, 0.14), transparent 45%),
    linear-gradient(155deg, #1e1a14, #14110e);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}
.return-heart {
  font-size: 3rem;
  animation: softPulse 2.2s ease-in-out infinite;
}
.return-card h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.return-card p { color: #f5efe3; }
.return-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.76rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ===== SCROLL UNLOCK (iOS) ===== */
@media (max-width: 900px) {
  html {
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: clip !important;
  }
  body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: auto !important;
    touch-action: manipulation;
    position: relative !important;
  }
  #content {
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    touch-action: pan-y;
  }
  .chapter {
    touch-action: pan-y;
  }
  /* don't trap scroll on gallery */
  .polaroid-stack {
    touch-action: pan-y !important;
  }
}


/* ===== LOCK SCREEN UPGRADE ===== */
#lock {
  min-height: 100svh;
  padding: 40px 18px;
}
.lock-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(232,204,150,0.45), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(255,250,240,0.35), transparent),
    radial-gradient(1.5px 1.5px at 88% 62%, rgba(232,204,150,0.3), transparent),
    radial-gradient(1px 1px at 20% 70%, rgba(255,250,240,0.25), transparent),
    radial-gradient(1px 1px at 55% 12%, rgba(232,204,150,0.35), transparent);
  opacity: 0.7;
  animation: lockStars 8s ease-in-out infinite alternate;
}
@keyframes lockStars {
  from { opacity: 0.45; }
  to { opacity: 0.85; }
}
.lock-card {
  width: min(400px, 100%);
  padding: 40px 28px 32px;
  border-radius: 28px;
  border: 1px solid rgba(224, 192, 138, 0.35);
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(232,204,150,0.12), transparent 55%),
    linear-gradient(165deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  box-shadow:
    0 28px 80px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 50px rgba(224,192,138,0.08);
  animation: lockCardIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lock-kicker {
  letter-spacing: 0.38em;
  margin-bottom: 18px;
  text-shadow: 0 0 24px rgba(232,204,150,0.4);
}
.lock-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
}
.lock-icon-heart {
  font-size: 2.2rem;
}
.lock-title {
  font-size: clamp(2rem, 6vw, 2.7rem);
  margin: 0 0 12px;
  background: linear-gradient(180deg, #fffaf0, #e8cc96);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lock-text {
  max-width: 280px;
  margin: 0 auto 10px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e8dfd0;
}
.lock-hint-main {
  margin: 0 auto 22px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}
.lock-field {
  width: min(220px, 100%);
  margin: 0 auto 18px;
}
#password {
  padding: 15px 16px;
  border-radius: 16px;
  font-size: 1.35rem;
  letter-spacing: 0.45em;
  border: 1px solid rgba(224,192,138,0.4);
  background: rgba(0,0,0,0.28);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
#password:focus {
  border-color: rgba(232,204,150,0.8);
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 4px rgba(224,192,138,0.16), 0 0 28px rgba(224,192,138,0.12);
}
#lock .lock-btn,
#lock button.lock-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 15px 40px !important;
  margin-top: 4px !important;
  color: #fff !important;
  cursor: pointer !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  letter-spacing: 0.03em !important;
  background: linear-gradient(135deg, #e8c070 0%, #d4a040 50%, #c49030 100%) !important;
  box-shadow: 0 12px 32px rgba(196,146,58,0.42), 0 4px 12px rgba(0,0,0,0.2) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
#lock .lock-btn:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.06);
  box-shadow: 0 16px 40px rgba(196,146,58,0.5), 0 6px 14px rgba(0,0,0,0.22) !important;
}
#lock .lock-btn:active {
  transform: translateY(0) !important;
}
#lock .lock-btn-text {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
#lock .lock-btn-heart {
  font-size: 1.05rem !important;
  line-height: 1 !important;
}
.lock-hint {
  margin-top: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.75;
}

/* hide unused fly heart if present */
.intro-fly-heart { display: none !important; }

@media (max-width: 700px) {
  .lock-stars { animation: none !important; opacity: 0.55; }
  .lock-card {
    padding: 32px 20px 28px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .lock-title { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  #lock .lock-btn {
    width: 100% !important;
    max-width: 260px !important;
  }
}


/* ===== LOCK ALIVE: breathe + shimmer + success ===== */
.lock-card {
  animation:
    lockCardIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) both,
    lockBreathe 4.5s ease-in-out 1.1s infinite alternate;
  transform-origin: center center;
}
@keyframes lockBreathe {
  from { transform: scale(1); box-shadow: 0 28px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04) inset, 0 0 50px rgba(224,192,138,0.08); }
  to   { transform: scale(1.018); box-shadow: 0 32px 90px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.05) inset, 0 0 64px rgba(224,192,138,0.14); }
}

.lock-title {
  position: relative;
  display: inline-block;
}
.lock-title::after {
  content: "";
  position: absolute;
  top: 0; left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,250,240,0.55), transparent);
  transform: skewX(-18deg);
  animation: titleShimmer 3.8s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes titleShimmer {
  0% { left: -50%; opacity: 0; }
  20% { opacity: 1; }
  55% { left: 110%; opacity: 0.8; }
  100% { left: 110%; opacity: 0; }
}

.lock-card.lock-success {
  animation: lockDissolve 0.95s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}
@keyframes lockDissolve {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  40% { opacity: 1; transform: scale(1.03); filter: brightness(1.15); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(8px) brightness(1.2); }
}

.lock-success-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255,250,240,0.55), rgba(232,204,150,0.2) 35%, transparent 65%);
}
.lock-success-flash.show {
  animation: lockFlash 0.9s ease-out forwards;
}
@keyframes lockFlash {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 700px) {
  .lock-card {
    animation: lockCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both !important;
  }
  .lock-title::after {
    animation-duration: 4.5s;
  }
  .lock-card.lock-success {
    animation: lockDissolve 0.8s ease forwards !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lock-card { animation: lockCardIn 0.01s both !important; }
  .lock-title::after { animation: none !important; display: none; }
  .lock-window, .lock-flies { display: none !important; }
}

/* ===== WEJŚCIE: okno, świetliki, reakcja na hasło ===== */
.lock-window {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 0;
  width: 16px;
  height: 22px;
  margin: 0 0 0 -8px;
  border-radius: 3px;
  pointer-events: none;
  background: #f4e4bc;
  box-shadow: 0 0 18px 6px rgba(244, 228, 188, 0.7);
  opacity: 0;
}
html.intro-done .lock-window {
  animation: lockWindowOpen 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes lockWindowOpen {
  0% { opacity: 0; transform: scale(0.2); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(16); }
}
.lock-flies {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.lock-flies span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f6e7c4;
  box-shadow: 0 0 10px 3px rgba(246, 231, 196, 0.75);
  animation: lockFly 12s ease-in-out infinite;
}
.lock-flies span:nth-child(1) { top: 24%; left: 14%; }
.lock-flies span:nth-child(2) { top: 70%; left: 76%; animation-duration: 15s; animation-delay: -4s; }
.lock-flies span:nth-child(3) { top: 34%; left: 72%; animation-duration: 13s; animation-delay: -8s; }
@keyframes lockFly {
  0% { transform: translate(0, 0); opacity: 0.15; }
  45% { opacity: 0.9; }
  100% { transform: translate(36px, -64px); opacity: 0.2; }
}
#lock.lock-listening .lock-icon-ring--outer {
  animation: lockRingListen 1.5s ease-in-out infinite alternate;
}
@keyframes lockRingListen {
  from { transform: scale(0.88); opacity: 0.65; }
  to { transform: scale(1.02); opacity: 1; }
}
#lock.lock-typed .lock-icon-heart {
  animation: lockHeartTick 0.32s ease;
}
#lock.lock-typed #password {
  animation: lockDigit 0.4s ease;
}
@keyframes lockHeartTick {
  0% { transform: scale(1); }
  40% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
@keyframes lockDigit {
  0% { box-shadow: 0 0 0 0 rgba(232, 204, 150, 0); }
  40% { box-shadow: 0 0 0 4px rgba(232, 204, 150, 0.45); }
  100% { box-shadow: 0 0 0 0 rgba(232, 204, 150, 0); }
}
#lock.lock-opening .lock-window {
  animation: lockWindowBloom 0.9s ease forwards;
}
@keyframes lockWindowBloom {
  0% { opacity: 0.35; transform: scale(2); }
  100% { opacity: 0.9; transform: scale(26); }
}
@media (max-width: 700px) {
  .lock-flies span:nth-child(3) { display: none; }
  .lock-window { animation-duration: 0.85s; }
}
@media (prefers-reduced-motion: reduce) {
  .lock-window, .lock-flies { display: none !important; }
  #lock.lock-typed .lock-icon-heart,
  #lock.lock-typed #password,
  #lock.lock-listening .lock-icon-ring--outer { animation: none !important; }
}


