:root {
  --night-0: #07041a;
  --night-1: #120a2e;
  --plum: #2c0f3f;
  --wine: #4a1240;
  --rose: #ff6f98;
  --rose-2: #ff9bb8;
  --blush: #ffd3df;
  --gold: #ffd9a0;
  --ink: #fff5f8;
  --ink-soft: rgba(255, 238, 245, 0.72);
  --ink-faint: rgba(255, 238, 245, 0.45);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 210, 225, 0.16);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --arabic: 'Amiri', 'Geeza Pro', serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* iOS web apps can stop the layout just above the home bar; backgrounds overhang by this much */
  --bleed: 140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

/* Pin the page to the screen: no rubber-band bounce, no white edges, full bleed under the
   Dynamic Island and home indicator (content is kept clear of them with safe-area padding). */
html {
  height: 100%;
  background: #2a0e3c; /* matches the bottom of the sky, in case anything shows beneath */
}
html, body {
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The night gradient lives on its own layer that overhangs the bottom edge. */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: calc(-1 * var(--bleed));
  z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 110%, var(--wine) 0%, transparent 60%),
    radial-gradient(90% 60% at 10% 0%, #1c0c3d 0%, transparent 70%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 45%, var(--plum) 100%);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ——— living backdrop ——— */
.aurora { position: fixed; top: 0; left: 0; right: 0; bottom: calc(-1 * var(--bleed)); overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute;
  width: 80vmax; height: 80vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.32;
  mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: radial-gradient(circle, #ff5e8e 0%, transparent 60%); left: -30vmax; top: 30%; }
.aurora i:nth-child(2) { background: radial-gradient(circle, #7b3cff 0%, transparent 60%); right: -35vmax; top: -20vmax; animation-duration: 32s; animation-delay: -8s; }
.aurora i:nth-child(3) { background: radial-gradient(circle, #ffb36b 0%, transparent 60%); left: 10vmax; bottom: -55vmax; opacity: 0.18; animation-duration: 38s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8vmax, -6vmax, 0) scale(1.15); }
  100% { transform: translate3d(-6vmax, 4vmax, 0) scale(0.95); }
}

#sky { position: fixed; top: 0; left: 0; width: 100%; height: calc(100% + var(--bleed)); pointer-events: none; }

/* ——— screens ——— */
#app { position: relative; height: 100%; }
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 14px) 20px calc(var(--safe-b) + 14px);
  opacity: 0; visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), visibility 0s linear 0.7s;
  pointer-events: none;
}
.screen.active {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), visibility 0s;
}
/* Let taps on empty space reach the sky */
.screen > * { pointer-events: auto; }

/* ——— buttons ——— */
.btn {
  display: block; width: 100%; max-width: 340px;
  padding: 17px 24px; border-radius: 999px;
  font-weight: 500; font-size: 17px; letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.3s, background 0.3s;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, #ff8fb1 0%, #ff5c8d 50%, #d23a7a 100%);
  box-shadow: 0 10px 40px -8px rgba(255, 92, 141, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 3.6s ease-in-out infinite;
}
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }
.btn-soft { background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost { color: var(--ink-soft); margin-top: 6px; }

/* ——— welcome ——— */
.welcome {
  margin: auto; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
}
.bismillah { font-family: var(--arabic); font-size: 22px; color: var(--blush); opacity: 0.85; }
.welcome-heart { width: 120px; animation: beat 1.6s var(--ease-out) infinite; filter: drop-shadow(0 0 30px rgba(255, 111, 152, 0.8)); }
.welcome-heart use { fill: var(--rose); }
.title { font-family: var(--serif); font-weight: 600; font-size: 58px; line-height: 0.92; letter-spacing: -0.01em; }
.title em { font-style: italic; color: var(--rose-2); background: linear-gradient(90deg, #ffb3c7, #ffd9a0, #ffb3c7); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: 200% 0; } }
.lede { font-family: var(--serif); font-size: 21px; line-height: 1.35; color: var(--ink-soft); max-width: 300px; margin-bottom: 12px; }
.fine { font-size: 13px; color: var(--ink-faint); }

/* ——— PIN ——— */
.pin { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 340px; }
.pin-heart { width: 46px; margin-bottom: 4px; filter: drop-shadow(0 0 18px rgba(255, 111, 152, 0.8)); animation: beat 1.8s var(--ease-out) infinite; }
.pin-heart use { fill: var(--rose); }
.pin-title { font-family: var(--serif); font-size: 32px; font-weight: 600; }
.pin-sub { color: var(--ink-faint); font-size: 14px; text-align: center; }
.pin-dots { display: flex; gap: 22px; margin: 22px 0 26px; }
.pin-dots span {
  width: 16px; height: 16px; position: relative;
  transition: transform 0.35s var(--ease-spring);
}
.pin-dots span::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid var(--ink-faint);
  transition: opacity 0.2s;
}
.pin-dots span::after {
  content: '❤'; position: absolute; inset: -6px; display: grid; place-items: center;
  font-size: 22px; color: var(--rose);
  text-shadow: 0 0 14px rgba(255, 111, 152, 0.9);
  transform: scale(0); transition: transform 0.35s var(--ease-spring);
}
.pin-dots span.on::before { opacity: 0; }
.pin-dots span.on::after { transform: scale(1); }
.pin-dots.shake { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 16px 26px; }
.keypad button {
  width: 76px; height: 76px; border-radius: 50%;
  font-family: var(--serif); font-size: 32px; font-weight: 500; font-variant-numeric: lining-nums;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s var(--ease-spring), background 0.25s, box-shadow 0.3s;
}
.keypad button:active, .keypad button.pressed {
  transform: scale(0.9);
  background: rgba(255, 111, 152, 0.3);
  box-shadow: 0 0 30px rgba(255, 111, 152, 0.5);
}
.keypad .key-del { background: none; border-color: transparent; font-family: var(--sans); font-size: 22px; color: var(--ink-soft); }

/* ——— who ——— */
.who { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 380px; }
.who-title { font-family: var(--serif); font-size: 36px; font-weight: 600; text-align: center; line-height: 1.05; }
.who-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 26px; }
.who-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 28px 12px 22px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.4s;
}
.who-card:active { transform: scale(0.95); }
.who-card.chosen { box-shadow: 0 0 0 2px var(--rose), 0 0 50px rgba(255, 111, 152, 0.6); transform: scale(1.04); }
.who-initial {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 38px; font-weight: 600;
  background: radial-gradient(circle at 35% 30%, #ffc3d6, #ff6f98 55%, #9e2463);
  box-shadow: 0 10px 30px -6px rgba(255, 92, 141, 0.7);
  margin-bottom: 6px;
}
.who-card[data-who='amna'] .who-initial { background: radial-gradient(circle at 35% 30%, #f3d2ff, #b173ff 55%, #5a2a9e); box-shadow: 0 10px 30px -6px rgba(177, 115, 255, 0.7); }
.who-name { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.who-role { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.12em; text-transform: uppercase; }

/* ——— home ——— */
#screen-home { justify-content: space-between; gap: 10px; }
.topbar { width: 100%; max-width: 440px; display: flex; justify-content: space-between; align-items: center; }
.greet { display: flex; flex-direction: column; }
.greet-salaam { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.greet-name { font-family: var(--serif); font-size: 26px; font-weight: 600; font-style: italic; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform 0.2s var(--ease-spring);
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg path[fill='none'] { fill: none; }
.icon-btn svg { width: 20px; height: 20px; fill: var(--ink); stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.heart {
  --size: 230px;
  position: relative;
  width: calc(var(--size) * var(--grow, 1)); height: calc(var(--size) * var(--grow, 1));
  display: grid; place-items: center;
  touch-action: none;
  transition: width 1.2s var(--ease-out), height 1.2s var(--ease-out);
}
.heart-svg {
  position: absolute; width: 74%; top: 16%;
  overflow: visible;
  filter: drop-shadow(0 0 28px rgba(255, 90, 140, 0.75)) drop-shadow(0 18px 40px rgba(160, 20, 90, 0.55));
  animation: beat var(--beat, 1.5s) var(--ease-out) infinite;
  transform-origin: 50% 55%;
  transition: filter 0.4s;
}
.heart.holding .heart-svg { animation-duration: 0.45s; filter: drop-shadow(0 0 48px rgba(255, 120, 170, 1)) drop-shadow(0 18px 40px rgba(160, 20, 90, 0.55)); }
.heart.checked .heart-svg { filter: drop-shadow(0 0 40px rgba(255, 210, 160, 0.9)) drop-shadow(0 18px 40px rgba(160, 20, 90, 0.55)); }
@keyframes beat {
  0% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(0.98); }
  42% { transform: scale(1.05); }
  70%, 100% { transform: scale(1); }
}
.heart-ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: rgba(255, 210, 225, 0.1); stroke-width: 2; }
.ring-fill {
  fill: none; stroke: var(--blush); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 591; stroke-dashoffset: 591;
  filter: drop-shadow(0 0 6px rgba(255, 200, 220, 0.9));
}
.heart-count {
  position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 700;
  font-size: calc(var(--size) * var(--grow, 1) * 0.3); line-height: 1;
  margin-top: -6%;
  text-shadow: 0 2px 20px rgba(120, 0, 50, 0.6);
  font-variant-numeric: lining-nums;
}
.heart-count.bump { animation: bump 0.7s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.25); } }
.heart-label {
  position: absolute; bottom: 12%; z-index: 1;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 245, 248, 0.85);
}
.hint { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink-soft); text-align: center; min-height: 24px; transition: opacity 0.4s; }

.checkins { display: flex; align-items: center; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  transition: background 0.5s, box-shadow 0.5s, border-color 0.5s;
}
.chip-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.5s;
}
.chip-text { font-size: 14px; }
.chip-state { font-size: 12px; color: var(--ink-faint); }
.chip.done { background: rgba(255, 111, 152, 0.16); border-color: rgba(255, 150, 185, 0.5); box-shadow: 0 0 24px rgba(255, 111, 152, 0.25); }
.chip.done .chip-dot { background: linear-gradient(135deg, #ff9bb8, #ff5c8d); }
.chip.done .chip-state { color: var(--blush); }
.chip-link { width: 18px; height: 2px; border-radius: 2px; background: var(--line); transition: background 0.6s, box-shadow 0.6s; }
.checkins.both .chip-link { background: var(--rose); box-shadow: 0 0 12px var(--rose); }

.note {
  width: 100%; max-width: 440px;
  padding: 18px 20px 16px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  position: relative; overflow: hidden;
  transition: transform 0.5s var(--ease-spring);
}
.note::before {
  content: ''; position: absolute; inset: -1px;
  background: radial-gradient(200px 80px at var(--mx, 20%) 0%, rgba(255, 180, 210, 0.22), transparent 70%);
  pointer-events: none;
}
.note:active { transform: scale(0.98); }
.note-kind { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.note-text { font-family: var(--serif); font-size: 20px; line-height: 1.3; margin: 8px 0 8px; font-weight: 500; }
.note-ref { font-size: 12px; color: var(--ink-faint); }
.note.reveal .note-text { animation: ink 1.1s var(--ease-out); }
@keyframes ink { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } }

.progress { width: 100%; max-width: 440px; }
.progress-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.progress-row strong { color: var(--ink); font-weight: 600; }
.progress-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #ff9bb8, #ff5c8d, #ffd9a0);
  box-shadow: 0 0 12px rgba(255, 111, 152, 0.7);
  transition: width 1.4s var(--ease-out);
}
.upset { font-size: 13px; color: var(--ink-faint); padding: 8px 14px; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.2); text-underline-offset: 4px; }

/* ——— sheets ——— */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 2, 15, 0.5);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade 0.35s ease;
}
.sheet-wrap[hidden] { display: none; }
.sheet {
  width: 100%; max-width: 480px;
  padding: 12px 24px calc(var(--safe-b) + 22px);
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #2a1340 0%, #1a0b2c 100%);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  animation: rise 0.55s var(--ease-out);
  max-height: calc(100% - var(--safe-t) - 12px); overflow-y: auto;
}
.sheet-handle { width: 40px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.2); margin-bottom: 8px; }
.sheet h3 { font-family: var(--serif); font-size: 28px; font-weight: 600; }
.sheet p { color: var(--ink-soft); line-height: 1.45; margin-bottom: 8px; }
.row {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 16px;
}
.row-val { color: var(--rose-2); }
.history { width: 100%; text-align: left; margin: 8px 0; }
.history h4 { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin: 10px 0; font-weight: 500; }
.history ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.history li { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); }
.history li b { font-family: var(--serif); font-size: 18px; color: var(--ink); }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ——— overlays ——— */
.overlay {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 24px);
  overflow-y: auto;
  background: radial-gradient(circle at 50% 40%, rgba(70, 16, 60, 0.88), rgba(5, 2, 15, 0.96));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fade 0.6s ease;
}
.overlay[hidden] { display: none; }
.overlay-dawn { background: radial-gradient(circle at 50% 110%, rgba(255, 170, 120, 0.4), rgba(15, 8, 35, 0.97) 60%); }
.overlay-card {
  width: 100%; max-width: 380px; text-align: center; margin: auto 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: bloom 0.9s var(--ease-spring);
}
@keyframes bloom { from { opacity: 0; transform: scale(0.85) translateY(20px); } }
.ayah { font-family: var(--arabic); font-size: 26px; line-height: 1.9; color: var(--blush); text-shadow: 0 0 24px rgba(255, 170, 200, 0.6); }
.ayah-en { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.4; color: var(--ink-soft); }
.ayah-ref { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.ms-number {
  font-family: var(--serif); font-weight: 700; font-variant-numeric: lining-nums; font-size: 110px; line-height: 1; margin-top: 12px;
  background: linear-gradient(180deg, #fff, #ffb3c7 60%, #ff6f98);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 111, 152, 0.6));
}
.ms-unit { font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-soft); margin-top: -8px; }
.ms-message { font-family: var(--serif); font-size: 22px; margin: 6px 0 14px; }
.overlay-title { font-family: var(--serif); font-size: 36px; font-weight: 600; margin-top: 6px; }
.overlay-text { color: var(--ink-soft); font-size: 16px; line-height: 1.5; margin-bottom: 14px; }
.both-hearts { display: flex; align-items: center; gap: 0; margin-bottom: 8px; }
.both-hearts span {
  width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 32px; font-weight: 700;
  background: radial-gradient(circle at 35% 30%, #ffc3d6, #ff6f98 55%, #9e2463);
  box-shadow: 0 0 40px rgba(255, 111, 152, 0.7);
  animation: meet-l 1.2s var(--ease-spring);
}
.both-hearts span:last-child { background: radial-gradient(circle at 35% 30%, #f3d2ff, #b173ff 55%, #5a2a9e); animation-name: meet-r; }
.both-hearts i { width: 34px; height: 34px; margin: 0 -8px; z-index: 1; background: var(--rose); clip-path: path('M17 31C7 24 1 18 1 11 1 5.6 5 2 9.6 2c3.1 0 5.8 1.7 7.4 4.2C18.6 3.7 21.3 2 24.4 2 29 2 33 5.6 33 11c0 7-6 13-16 20z'); animation: beat 1.2s infinite; filter: drop-shadow(0 0 10px var(--rose)); }
@keyframes meet-l { from { transform: translateX(-60px); opacity: 0; } }
@keyframes meet-r { from { transform: translateX(60px); opacity: 0; } }

/* ——— install hint & toast ——— */
.install {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); z-index: 15;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 18px;
  background: rgba(40, 18, 60, 0.9); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; color: var(--ink-soft);
  animation: rise 0.6s var(--ease-out);
}
.install[hidden] { display: none; }
.install span { flex: 1; }
.install svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--rose-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install button { padding: 4px 8px; color: var(--ink-faint); }

.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 16px); z-index: 40;
  transform: translate(-50%, -140%);
  padding: 12px 20px; border-radius: 999px;
  background: rgba(40, 18, 60, 0.92); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 14px; white-space: nowrap;
  opacity: 0;
  transition: transform 0.5s var(--ease-spring), opacity 0.3s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ——— small / short screens ——— */
@media (max-height: 740px) {
  .heart { --size: 190px; }
  .note-text { font-size: 18px; }
  .note { padding: 14px 18px 12px; }
  .keypad { grid-template-columns: repeat(3, 68px); gap: 12px 22px; }
  .keypad button { width: 68px; height: 68px; }
}
@media (max-height: 640px) {
  .heart { --size: 160px; }
  .hint { font-size: 15px; }
  .pin-dots { margin: 14px 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora i, .btn-primary::after, .title em { animation: none; }
  .heart-svg { animation-duration: 3s; }
}
