:root {
  --dusk-1: #1b1233;
  --dusk-2: #3d2458;
  --dusk-3: #6b3d6e;
  --blush: #f4c4c8;
  --petal: #ffe8ee;
  --cream: #fff7f0;
  --lavender: #d4c2f0;
  --lilac: #b89fd4;
  --sage: #c5dbc8;
  --moss: #7a9e7e;
  --gold: #e8c872;
  --honey: #f5e6b8;
  --ink: #2c1e32;
  --ink-soft: #5c4a5e;
  --muted: #8a7380;
  --card: rgba(255, 247, 240, 0.9);
  --card-solid: #fff8f2;
  --line: rgba(90, 50, 80, 0.12);
  --shadow: 0 12px 32px rgba(40, 20, 55, 0.14);
  --shadow-soft: 0 6px 18px rgba(40, 20, 55, 0.1);
  --radius: 22px;
  --radius-sm: 16px;
  --nav-h: calc(62px + env(safe-area-inset-bottom, 0px));
  --top-safe: env(safe-area-inset-top, 0px);
  --font-script: "Great Vibes", "Snell Roundhand", cursive;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --accent: #c45c86;
  --accent-2: #7b5ea7;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
html { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--dusk-1);
  min-height: 100dvh;
  overflow-x: hidden;
}

img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
textarea { resize: vertical; }
a { color: var(--accent-2); text-decoration: none; }
a.btn, a.btn-primary, a.btn-ghost, a.btn-gold, .item-card, .item-card *, .more-tile, .more-tile * {
  text-decoration: none;
  color: inherit;
}
a.item-card h3 { color: var(--ink); }


#app {
  min-height: 100dvh;
  position: relative;
}

.bg-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(255, 200, 180, 0.35), transparent 55%),
    radial-gradient(900px 500px at 10% 10%, rgba(120, 80, 180, 0.35), transparent 50%),
    linear-gradient(180deg, #1b1240 0%, #3d2458 28%, #7a3d72 58%, #e8b8b0 82%, #f6e6d8 100%);
}
#fireflies {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.butterflies { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.butterfly {
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0.85;
  animation: flutter 18s linear infinite;
}
.butterfly svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(40,20,50,0.25)); }
.bf-2 { left: 70%; animation-duration: 22s; animation-delay: -6s; }
.bf-3 { left: 40%; animation-duration: 26s; animation-delay: -12s; width: 22px; height: 22px; }

@keyframes flutter {
  0% { transform: translate(-10vw, 110vh) rotate(-10deg); }
  25% { transform: translate(20vw, 70vh) rotate(12deg); }
  50% { transform: translate(50vw, 40vh) rotate(-8deg); }
  75% { transform: translate(75vw, 18vh) rotate(10deg); }
  100% { transform: translate(110vw, -10vh) rotate(-6deg); }
}

.page {
  position: relative;
  z-index: 3;
  padding: calc(14px + var(--top-safe)) 16px calc(var(--nav-h) + 24px);
  max-width: 640px;
  margin: 0 auto;
  min-height: 100dvh;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; margin: 0; }
.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}
.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 244, 230, 0.78);
  font-weight: 700;
}

.hero-title {
  font-size: clamp(34px, 10vw, 48px);
  color: #fff6ea;
  text-shadow: 0 6px 24px rgba(30, 12, 40, 0.35);
  margin: 0 0 4px;
}

.subtitle, .lede {
  color: rgba(255, 244, 230, 0.88);
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.45;
}

.card {
  background: linear-gradient(180deg, rgba(255,250,247,0.96), rgba(255,240,245,0.92));
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.card h2 { font-size: 22px; color: var(--ink); margin-bottom: 6px; }
.card p { margin: 0 0 8px; color: var(--ink-soft); line-height: 1.5; }
.card-quiet {
  background: rgba(255, 247, 240, 0.72);
}

.chip-row, .mood-row, .tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip, .tab {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
}
.chip.is-on, .tab.is-on, .mood-btn.is-on {
  background: linear-gradient(180deg, #f8d0dc, #e8b4d0);
  color: var(--ink);
  border-color: rgba(255,255,255,0.9);
}
.tab-row { margin: 8px 0 14px; }

.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 58px;
  flex: 1 0 58px;
  max-width: 72px;
  padding: 7px 4px 6px;
  border-radius: 16px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-soft);
}
.mood-btn .emo { font-size: 20px; line-height: 1; }
.mood-btn .lbl { font-size: 11px; font-weight: 700; color: var(--ink-soft); }

.btn, .btn-primary, .btn-ghost, .btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14.5px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.7);
  min-height: 44px;
}
.btn-primary {
  background: linear-gradient(180deg, #f3c0d0, #d98baf);
  color: #3a1830;
}
.btn-gold {
  background: linear-gradient(180deg, #f5e2a8, #e4c06a);
  color: #3a2a10;
}
.btn-ghost {
  background: rgba(255,255,255,0.55);
  color: var(--ink);
}
.btn-danger {
  background: rgba(210, 80, 90, 0.12);
  color: #8a3040;
  border: 1px solid rgba(180, 60, 80, 0.2);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.field { margin: 10px 0; }
.field label, .label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field textarea, .field select,
input[type="text"], input[type="date"], input[type="month"], input[type="url"], input[type="password"],
input[type="datetime-local"], textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.86);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 120px; line-height: 1.55; }
.field input:focus, .field textarea:focus, textarea:focus, input:focus {
  border-color: #c9a0d4;
  box-shadow: 0 0 0 3px rgba(184, 159, 212, 0.35);
}

/* Garden scene */
.garden-toolbar {
  display: block;
  margin: 8px 0 10px;
}
.garden-toolbar .chip-row { align-items: center; }
.garden-toolbar input[type="month"] {
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-size: 13px;
}
.header-row .btn, .header-row a.btn { white-space: nowrap; flex-shrink: 0; padding: 10px 14px; font-size: 13px; }

.garden-scene {
  position: relative;
  height: 310px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.35);
  margin-top: 8px;
}
.garden-scene .scenery {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.garden-bed {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 62%;
  z-index: 2;
}
.flower {
  position: absolute;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  background: none;
  padding: 0;
  filter: drop-shadow(0 4px 6px rgba(20,40,20,0.28));
  animation: sprout 0.7s cubic-bezier(.2,1.2,.3,1) both;
}
.flower:focus-visible { outline: 2px solid #f5e6b8; outline-offset: 2px; }
@keyframes sprout {
  from { transform: translateX(-50%) scale(0.2); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

.question-kicker {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  color: #8a5a8a;
  margin: 0 0 6px;
}
.question-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 8px;
}

/* Lists and entries */
.list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,247,240,0.92);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow-soft);
  color: inherit;
}
.item-card h3 { font-size: 18px; margin-bottom: 4px; }
.item-card .meta { font-size: 12px; color: var(--muted); }
.item-card .excerpt {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--ink-soft);
}
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty h3 { font-size: 22px; margin-bottom: 6px; }

/* Bottom nav */
.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  gap: 2px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255,244,240,0.86), rgba(255,236,244,0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 -8px 24px rgba(40,20,55,0.08);
}
.nav a, .nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 0;
  min-width: 0;
  background: none;
  box-shadow: none;
}
.nav .ico { font-size: 18px; line-height: 1; }
.nav .is-on { color: #7a3a68; }

/* Room */
.room-stage {
  position: relative;
  height: 300px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid #f3dcc8;
  touch-action: none;
  user-select: none;
}
.room-wall {
  position: absolute; inset: 0 0 32% 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.25), transparent 40%),
    repeating-linear-gradient(90deg, #f3d4e4 0 18px, #efc8dc 18px 20px);
}
.room-window {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 28%;
  height: 38%;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #3d2a68 0%, #c989b0 70%, #f0c8b0 100%);
  border: 6px solid #f8eee4;
  box-shadow: inset 0 0 0 3px #d4b49a, 0 8px 16px rgba(40,20,40,0.15);
  overflow: hidden;
}
.room-window::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 46%, #f8eee4 46% 54%, transparent 54%),
    linear-gradient(180deg, transparent 46%, #f8eee4 46% 54%, transparent 54%);
}
.room-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background:
    repeating-linear-gradient(90deg, #e8c8a8 0 28px, #deb898 28px 30px, #e2be9e 30px 56px);
  box-shadow: inset 0 16px 24px rgba(80,40,20,0.12);
}
.room-baseboard {
  position: absolute; left: 0; right: 0; bottom: 33%;
  height: 10px;
  background: #d4b08a;
}
.room-item {
  position: absolute;
  z-index: 3;
  touch-action: none;
  cursor: grab;
  transform: translate(-50%, -50%);
}
.room-item.is-drag { cursor: grabbing; z-index: 5; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.25)); }
.room-tray {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 4px 4px;
  margin-top: 12px;
  -webkit-overflow-scrolling: touch;
}
.tray-item, .room-piece {
  flex: 0 0 auto;
  width: 72px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.tray-item button, .piece-art {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(255,247,240,0.95);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.locked-piece { opacity: 0.45; filter: grayscale(0.4); }

/* Photos / media */
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.thumbs img, .thumbs video {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid #fff;
  box-shadow: var(--shadow-soft);
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid #fffaf4;
  box-shadow: var(--shadow-soft);
}

/* Timeline */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8c872, #d4a0c0, #b89fd4);
}
.tl-item { position: relative; margin: 0 0 14px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -16px; top: 16px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #f5e6b8;
  border: 3px solid #c45c86;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}

/* Lock screen */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(800px 400px at 50% 20%, rgba(255,220,180,0.3), transparent 50%),
    linear-gradient(180deg, #1b1240, #5a2a68 50%, #c9899a);
  text-align: center;
}
.lock-screen h1 { color: #fff6ea; font-family: var(--font-script); font-size: 48px; margin: 8px 0 6px; }
.lock-screen p { color: rgba(255,244,230,0.85); max-width: 320px; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.pin-dots span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,248,240,0.7);
  background: transparent;
}
.pin-dots span.on { background: #f5e6b8; }
.pad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}
.pad button {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(255,255,255,0.16);
  color: #fff8f0;
  font-size: 24px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.25);
}
.pad button:active { background: rgba(255,255,255,0.32); }

/* Modal */
.modal-back {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 10, 30, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.modal {
  width: min(560px, 100%);
  max-height: 86dvh;
  overflow: auto;
  background: var(--card-solid);
  border-radius: 24px 24px 20px 20px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(20,10,30,0.35);
  animation: rise 0.28s ease;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Envelope letter */
.envelope {
  width: 100%;
  max-width: 340px;
  margin: 10px auto 16px;
  aspect-ratio: 4/3;
  position: relative;
}
.envelope .flap, .envelope .body, .envelope .paper {
  position: absolute; inset: 0;
  border-radius: 8px;
}
.envelope .body {
  background: linear-gradient(180deg, #e8c8d8, #d4a8c0);
  box-shadow: var(--shadow);
  clip-path: polygon(0 30%, 50% 58%, 100% 30%, 100% 100%, 0 100%);
}
.envelope .flap {
  background: linear-gradient(180deg, #f0d8e4, #e0b8cc);
  clip-path: polygon(0 0, 100% 0, 50% 52%);
  transform-origin: 50% 0;
  z-index: 2;
}
.envelope.is-open .flap { animation: flap-open 0.7s ease forwards; }
@keyframes flap-open { to { transform: rotateX(180deg); opacity: 0.3; } }
.envelope .paper {
  background: #fffaf4;
  inset: 12% 10% auto;
  height: 70%;
  z-index: 1;
  box-shadow: var(--shadow-soft);
}
.envelope.is-open .paper { animation: letter-up 0.8s 0.25s ease forwards; }
@keyframes letter-up { from { transform: translateY(20%); } to { transform: translateY(-18%); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 12px);
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(40, 22, 48, 0.92);
  color: #fff8f0;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  text-align: center;
  animation: rise 0.25s ease;
}

.more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.more-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 88px;
  padding: 12px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,247,240,0.9);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.more-tile .ico { font-size: 22px; margin-bottom: 4px; }
.more-tile h3 { font-size: 17px; }
.more-tile p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: #c45c86; }
.check-row.is-done span { text-decoration: line-through; color: var(--muted); }

.search-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.search-bar input { flex: 1; }

.audio-row audio { width: 100%; margin-top: 6px; }

.rec-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d4544a;
  display: inline-block;
  margin-right: 6px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.page-title {
  font-size: clamp(28px, 8vw, 36px);
  color: #fff6ea;
  text-shadow: 0 4px 16px rgba(30,12,40,0.3);
  margin: 0 0 6px;
}
.page-ink .page-title, .sheet-page .page-title { color: var(--ink); text-shadow: none; }

.sheet-page {
  background: linear-gradient(180deg, rgba(255,247,240,0.55), rgba(255,240,245,0.25) 220px, transparent);
}

.note {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  background: rgba(255,255,255,0.45);
  border-radius: 12px;
  padding: 10px 12px;
}

.tag {
  display: inline-block;
  background: rgba(184, 159, 212, 0.25);
  color: #5a3a70;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin: 2px 4px 0 0;
}

.fab-space { height: 8px; }

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.back-link {
  color: #fff6ea;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.collage-preview { width: 100%; border-radius: 16px; display: block; box-shadow: var(--shadow); }

.hidden { display: none !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .butterfly { animation: none; opacity: 0.7; }
  .flower { animation: none; }
}

@media (min-width: 720px) {
  .garden-scene, .room-stage { height: 460px; }
}

input[type="file"] {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  font-size: 13px;
}
input[type="file"]::file-selector-button {
  border: 0;
  background: linear-gradient(180deg, #f3c0d0, #e8b4d0);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  margin-right: 10px;
  color: #3a1830;
  font-family: var(--font-body);
}

.card.compact { padding: 12px; margin-bottom: 10px; }
.card.compact h2 { font-size: 18px; margin-bottom: 2px; }
.card.compact p { font-size: 13px; margin-bottom: 6px; }

.lock-screen h1 { font-size: 42px; line-height: 0.95; }
.lock-screen .toast, .lock-screen ~ #toast { z-index: 40; }
#toast { z-index: 30; } /* below lock screen */

/* Sealed envelope — closed, with a wax seal; paper only when opening */
.envelope .paper { display: none; }
.envelope.is-open .paper { display: block; }
.envelope.sealed .body {
  clip-path: none;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #f0d4e0, #d4a8c0);
  top: 22%;
}
.envelope.sealed .flap {
  clip-path: polygon(0 0, 100% 0, 50% 70%);
  background: linear-gradient(180deg, #f8e0ea, #e4b8cc);
  height: 55%;
  bottom: auto;
}
.envelope.sealed::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 48%;
  width: 36px; height: 36px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 40% 35%, #e07080, #b04058);
  border-radius: 50%;
  box-shadow: 0 2px 0 #8a3040;
  z-index: 3;
}

