/* Scrapbook for Anvesha.
   Pink is Anvesha, powder blue is Tarush. Anything one of you writes
   shows up in your colour, so the palette doubles as a "who did this". */

:root {
  color-scheme: light;
  --desk: #dcecf9;
  --desk-dot: #c3dcf2;
  --paper: #fff8fb;
  --grid: rgba(122, 170, 214, 0.2);
  --pink: #f6a9c6;
  --pink-soft: #fde1ec;
  --rose: #c43c76;
  --blue: #a8d0ef;
  --blue-soft: #e3f0fb;
  --navy: #2f4f8f;
  --ink: #34315c;
  --ink-soft: #6b6890;
  --white: #ffffff;
  --shadow: 0 8px 18px rgba(52, 49, 92, 0.16), 0 1px 3px rgba(52, 49, 92, 0.12);
  --shadow-lift: 0 14px 28px rgba(52, 49, 92, 0.22), 0 2px 5px rgba(52, 49, 92, 0.14);

  --hand: "Kalam", "Segoe Print", "Bradley Hand", cursive;
  --display: "Rozha One", "Didot", Georgia, serif;
  --chunk: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.08rem;
  --step-1: 1.35rem;
  --step-2: 1.8rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.6rem, 9vw, 5.2rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--desk);
  background-image: radial-gradient(var(--desk-dot) 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--hand);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px dashed var(--rose); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------------- buttons and inputs ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--white); padding: 0.35em 1.05em;
  font-weight: 700; line-height: 1.3;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.pink { background: var(--pink); }
.btn.blue { background: var(--blue); }
.btn.ghost { box-shadow: none; border-style: dashed; background: transparent; }
.btn.small { font-size: var(--step--1); padding: 0.2em 0.8em; box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: default; }
label.btn { cursor: pointer; }
label.btn:focus-within { outline: 3px dashed var(--rose); outline-offset: 3px; }
.icon-btn {
  border: 0; background: transparent; padding: 0.25em; border-radius: 8px;
  color: var(--ink-soft); line-height: 1; font-size: 1.05rem;
}
.icon-btn:hover { color: var(--rose); background: rgba(196, 60, 118, 0.08); }

.field { display: grid; gap: 0.2em; }
.field label { font-size: var(--step--1); color: var(--ink-soft); }
.input, .textarea {
  width: 100%; border: 2px solid var(--ink); border-radius: 12px;
  background: var(--white); padding: 0.45em 0.75em; font-size: 1.05rem;
}
.textarea { min-height: 7em; resize: vertical; line-height: 1.5; }
.inline-add { display: flex; gap: 0.5em; margin-top: 0.75em; }
.inline-add .input { flex: 1; min-width: 0; }

/* ---------------- gate: the envelope ---------------- */
.gate {
  min-height: 100vh; display: grid; place-items: center;
  padding: 32px 16px 48px;
}
.gate-inner { width: min(420px, 100%); display: grid; gap: 28px; justify-items: center; text-align: center; }
.envelope {
  position: relative; width: min(360px, 92vw); aspect-ratio: 3 / 2;
  perspective: 900px;
}
.env-back, .env-front, .env-flap, .env-card { position: absolute; inset: 0; border-radius: 10px; }
.env-back { background: var(--rose); box-shadow: var(--shadow-lift); z-index: 1; }
.env-card {
  inset: 8% 7% 10%; background: var(--paper); border-radius: 6px;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 18px 18px;
  display: grid; justify-items: center; align-content: start; padding: 9% 10px 10px;
  font-size: var(--step-2); color: var(--rose); font-weight: 700; line-height: 1.1;
  z-index: 3;
  transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.45s;
}
.env-front {
  background: var(--pink);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 9%;
  z-index: 4;
}
.env-front .to { font-size: var(--step-1); color: var(--ink); line-height: 1.2; }
.env-front .to small { display: block; font-size: var(--step--1); color: var(--ink-soft); }
.env-flap {
  background: #f193b8; transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  transition: transform 0.6s ease, z-index 0s 0.3s;
  z-index: 6;
}
.env-seal {
  position: absolute; left: 50%; top: 50%; z-index: 7;
  width: 58px; height: 58px; margin: -36px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e46b9b, var(--rose) 60%, #9c2a5a);
  box-shadow: 0 3px 8px rgba(80, 20, 50, 0.35), inset 0 0 0 4px rgba(255, 255, 255, 0.12);
  display: grid; place-items: center; color: #ffe3ee; font-size: 26px;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.envelope.open .env-seal { transform: scale(1.4); opacity: 0; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 2; }
.envelope.open .env-card { transform: translateY(-56%); }
.envelope { transition: margin 0.6s ease; }
.envelope.open { margin-top: 70px; }
.envelope.shake { animation: shake 0.45s; }
@keyframes shake {
  20%, 60% { transform: translateX(-9px) rotate(-1.5deg); }
  40%, 80% { transform: translateX(9px) rotate(1.5deg); }
}

.gate-form { width: 100%; display: grid; gap: 10px; }
.gate-form label { font-size: var(--step-1); font-weight: 700; color: var(--navy); }
.gate-row { display: flex; gap: 8px; }
.gate-row .input { flex: 1; min-width: 0; text-align: center; font-size: 1.25rem; letter-spacing: 0.06em; }
.gate-msg { min-height: 1.6em; color: var(--rose); font-weight: 700; }
.hint-btn { border: 0; background: none; color: var(--ink-soft); text-decoration: underline dotted; padding: 0; }

.who { display: grid; gap: 14px; justify-items: center; }
.who h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--ink); }
.who-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------------- app shell ---------------- */
.app { width: min(1120px, 100%); margin: 0 auto; padding: 18px 16px 90px; }
.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 6px 0; margin: 0 -6px;
  background: linear-gradient(var(--desk) 70%, transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; border: 2px solid var(--ink); border-bottom: 0;
  border-radius: 14px 14px 0 0; padding: 0.35em 1em 0.3em;
  background: var(--blue-soft); font-weight: 700; color: var(--ink);
  text-decoration: none; transform: translateY(4px); transition: transform 0.15s ease;
}
.tab:nth-child(odd) { background: var(--pink-soft); }
.tab:hover { transform: translateY(1px); }
.tab[aria-current="page"] { background: var(--paper); transform: translateY(2px); position: relative; z-index: 2; }

.page {
  position: relative; background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 2px solid var(--ink); border-radius: 4px 18px 18px 18px;
  box-shadow: 8px 8px 0 rgba(52, 49, 92, 0.14);
  padding: clamp(18px, 4vw, 44px);
  min-height: 70vh;
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 26px; }
.page-title {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: var(--step-3); line-height: 1.05; color: var(--rose);
}
.page-sub { margin: 4px 0 0; color: var(--ink-soft); max-width: 60ch; }
.section-title { font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--navy); margin: 40px 0 14px; line-height: 1.1; }
.empty { color: var(--ink-soft); padding: 14px 0; }

.footer {
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; align-items: center;
  margin-top: 26px; color: var(--ink-soft); font-size: var(--step--1);
}
.footer button { border: 0; background: none; text-decoration: underline; color: var(--navy); padding: 0; }

.save-stamp {
  position: fixed; right: 14px; bottom: 14px; z-index: 50;
  background: var(--white); border: 2px solid var(--ink); border-radius: 999px;
  padding: 0.15em 0.85em; font-size: var(--step--1); font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink); transition: opacity 0.3s;
}
.save-stamp.idle { opacity: 0; pointer-events: none; }
.save-stamp.err { background: var(--pink); }

/* ---------------- tape ---------------- */
.tape {
  position: absolute; top: -12px; left: 50%; width: 92px; height: 26px;
  transform: translateX(-50%) rotate(-3deg); opacity: 0.85; z-index: 2;
  background: repeating-linear-gradient(45deg, rgba(246, 169, 198, 0.9) 0 8px, rgba(255, 255, 255, 0.75) 8px 16px);
  box-shadow: 0 1px 2px rgba(52, 49, 92, 0.15);
  clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 50%);
}
.tape.blue { background: radial-gradient(rgba(255, 255, 255, 0.85) 2.5px, transparent 3px) 0 0 / 11px 11px, rgba(168, 208, 239, 0.92); }

/* ---------------- home ---------------- */
.cover { display: grid; gap: 26px; justify-items: center; text-align: center; padding: 10px 0 8px; }
.ransom { margin: 0; font-size: var(--step-4); line-height: 1.25; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.05em 0; max-width: 11em; }
.ransom .word { display: inline-flex; white-space: nowrap; margin: 0 0.18em; }
.ransom .ch {
  display: inline-block; padding: 0.02em 0.12em 0.06em; margin: 0 0.02em;
  box-shadow: 2px 3px 0 rgba(52, 49, 92, 0.2);
  line-height: 1;
}
.ransom .amp { font-family: var(--hand); color: var(--rose); font-weight: 700; margin: 0 0.15em; align-self: center; }
.tagline { margin: 0; font-size: var(--step-1); color: var(--navy); }

.cover-photos { position: relative; height: 260px; width: min(620px, 100%); margin: 6px auto 0; }
.cover-photos .polaroid { position: absolute; width: 190px; }
.cover-photos .polaroid:nth-child(1) { left: 4%; top: 22px; transform: rotate(-8deg); }
.cover-photos .polaroid:nth-child(2) { left: 50%; top: 0; transform: translateX(-50%) rotate(2deg); z-index: 2; }
.cover-photos .polaroid:nth-child(3) { right: 4%; top: 30px; transform: rotate(7deg); }
@media (max-width: 560px) {
  .cover-photos { height: 210px; }
  .cover-photos .polaroid { width: 140px; }
  .cover-photos .polaroid:nth-child(1) { left: 0; }
  .cover-photos .polaroid:nth-child(3) { right: 0; }
}

.home-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; margin-top: 36px; align-items: start; }
.home-col { display: grid; gap: 28px; }
@media (max-width: 820px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-col { display: contents; }
  .c-question { order: 1; } .c-mood { order: 2; } .c-dates { order: 3; } .c-notes { order: 4; }
}

.card {
  position: relative; background: var(--white); border: 2px solid var(--ink);
  border-radius: 6px; padding: 22px 20px 20px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: var(--step-1); color: var(--navy); line-height: 1.2; }
.lined {
  background-color: var(--white);
  background-image: linear-gradient(transparent calc(1.7em - 1px), rgba(122, 170, 214, 0.45) 1px);
  background-size: 100% 1.7em; line-height: 1.7em;
}

.question { font-size: var(--step-1); font-weight: 700; color: var(--ink); margin: 6px 0 14px; line-height: 1.35; }
.answers { display: grid; gap: 12px; }
.answer { border-radius: 10px; padding: 10px 14px; border: 2px solid var(--ink); }
.answer.bebo { background: var(--pink-soft); }
.answer.tarush { background: var(--blue-soft); }
.answer .who-label { font-size: var(--step--1); color: var(--ink-soft); }
.answer p { margin: 2px 0 0; white-space: pre-wrap; }
.answer .locked { color: var(--ink-soft); font-style: italic; }
.past summary { cursor: pointer; color: var(--navy); margin-top: 14px; }
.past ol { padding-left: 1.2em; margin: 8px 0 0; display: grid; gap: 10px; }
.past li span { display: block; font-size: var(--step--1); color: var(--ink-soft); }

.moods { display: grid; gap: 10px; }
.mood-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mood-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.mood-pick button {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--white); font-size: 22px; line-height: 1; padding: 0;
}
.mood-pick button[aria-pressed="true"] { background: var(--pink); transform: scale(1.08); }
.mood-now { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; }
.mood-now.bebo { background: var(--pink-soft); }
.mood-now.tarush { background: var(--blue-soft); }
.mood-now .big { font-size: 30px; line-height: 1; }
.mood-now small { color: var(--ink-soft); display: block; }
.hug-line { margin: 12px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tickets { display: grid; gap: 12px; }
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  background: var(--blue-soft); border: 2px solid var(--ink); border-radius: 8px; padding: 10px 14px;
  -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket:nth-child(even) { background: var(--pink-soft); }
.ticket .t-title { font-weight: 700; line-height: 1.25; }
.ticket .t-when { font-size: var(--step--1); color: var(--ink-soft); }
.ticket .t-days { font-family: var(--display); font-size: var(--step-2); line-height: 1; color: var(--rose); text-align: right; }
.ticket .t-days small { display: block; font-family: var(--hand); font-size: var(--step--1); color: var(--ink-soft); }
.ticket .icon-btn { font-size: 0.85rem; margin-right: 4px; }

.notes-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 22px; margin-top: 8px; }
.sticky {
  position: relative; min-height: 150px; padding: 18px 14px 28px;
  box-shadow: 0 10px 16px -8px rgba(52, 49, 92, 0.35);
  white-space: pre-wrap; word-break: break-word; line-height: 1.4;
}
.sticky.bebo { background: #fbc4d8; }
.sticky.tarush { background: #bfdcf3; }
.sticky .by { position: absolute; left: 14px; bottom: 6px; font-size: var(--step--1); color: var(--ink-soft); }
.sticky .icon-btn { position: absolute; right: 4px; bottom: 2px; font-size: 0.85rem; }

/* ---------------- photos ---------------- */
.polaroid {
  position: relative; background: var(--white); padding: 10px 10px 0; box-shadow: var(--shadow);
  border: 0; text-align: center; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.polaroid .ph { aspect-ratio: 1; background: var(--blue-soft); overflow: hidden; }
.polaroid .ph img { width: 100%; height: 100%; object-fit: cover; }
.polaroid .cap { font-size: var(--step--1); padding: 6px 2px 9px; line-height: 1.3; min-height: 2.6em; color: var(--ink); }
button.polaroid { display: block; width: 100%; cursor: zoom-in; }
button.polaroid:hover { transform: rotate(0deg) scale(1.03) !important; box-shadow: var(--shadow-lift); z-index: 3; }
.year-sticker {
  display: inline-block; font-family: var(--display); font-size: var(--step-3); line-height: 1;
  background: var(--blue); color: var(--ink); padding: 0.12em 0.45em 0.08em; border: 2px solid var(--ink);
  border-radius: 999px; transform: rotate(-3deg); margin: 34px 0 18px; box-shadow: 3px 3px 0 var(--ink);
}
.year-sticker.pink { background: var(--pink); transform: rotate(2deg); }
.photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 30px 22px; }
@media (max-width: 420px) { .photo-wall { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; } }
.upload-note { font-size: var(--step--1); color: var(--ink-soft); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(39, 36, 72, 0.78);
  display: grid; place-items: center; padding: 16px;
}
.lb-card {
  background: var(--white); padding: 14px 14px 16px; width: min(760px, 100%);
  max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lift); position: relative;
}
.lb-card img { width: 100%; max-height: 66vh; object-fit: contain; background: var(--blue-soft); }
.lb-meta { display: grid; gap: 10px; margin-top: 12px; }
.lb-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.lb-row .field { flex: 1 1 160px; }
.lb-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.lb-close { position: absolute; top: 6px; right: 8px; font-size: 1.6rem; z-index: 2; background: var(--white); }

/* ---------------- letters ---------------- */
.letters-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px 24px; }
.letter-page {
  position: relative; background: var(--white); padding: 10px; box-shadow: var(--shadow); border: 0;
  cursor: zoom-in; transition: transform 0.18s ease;
}
.letter-page:hover { transform: rotate(0) scale(1.03) !important; }
.letter-page img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.letter-page .clip {
  position: absolute; top: -16px; left: 22px; width: 18px; height: 46px; z-index: 2;
  border: 3px solid #8aa4c4; border-radius: 10px; border-bottom-color: transparent;
}
.letter-page .cap { padding: 8px 2px 2px; font-size: var(--step--1); }

.envelopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.ow {
  position: relative; aspect-ratio: 3 / 2; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--blue-soft); overflow: hidden; padding: 0; text-align: center;
  display: grid; place-items: end center; box-shadow: var(--shadow);
}
.ow:nth-child(even) { background: var(--pink-soft); }
.ow::before {
  content: ""; position: absolute; inset: 0; background: rgba(168, 208, 239, 0.9);
  clip-path: polygon(0 0, 100% 0, 50% 55%);
}
.ow:nth-child(even)::before { background: rgba(246, 169, 198, 0.85); }
.ow .ow-label { position: relative; padding: 0 12px 16px; font-weight: 700; font-size: var(--step-1); line-height: 1.2; }
.ow .ow-state { position: absolute; top: 8px; right: 10px; font-size: var(--step--1); color: var(--ink-soft); z-index: 1; }
.letter-paper {
  background-color: var(--white);
  background-image: linear-gradient(transparent calc(1.8em - 1px), rgba(122, 170, 214, 0.5) 1px);
  background-size: 100% 1.8em; line-height: 1.8em; padding: 0.9em 1.3em 1.4em 2.6em;
  border-left: 3px double rgba(196, 60, 118, 0.45); white-space: pre-wrap; font-size: 1.15rem;
}
.typed-letters { display: grid; gap: 26px; max-width: 720px; }
.typed { position: relative; box-shadow: var(--shadow); }
.typed .meta { display: flex; justify-content: space-between; gap: 10px; font-size: var(--step--1); color: var(--ink-soft); padding: 8px 14px 0 2.6em; background: var(--white); }
.typed.bebo .letter-paper { border-left-color: var(--rose); }
.typed.tarush .letter-paper { border-left-color: var(--navy); }

/* ---------------- places: postcards ---------------- */
.progress-line { color: var(--navy); font-weight: 700; }
.postcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px 24px; }
.postcard {
  position: relative; min-height: 200px; background: var(--white); border: 2px solid var(--ink);
  padding: 16px 18px; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr auto; gap: 8px; overflow: hidden;
}
.postcard::after {
  content: ""; position: absolute; top: 18%; bottom: 18%; left: 60%; border-left: 2px dashed rgba(52, 49, 92, 0.25);
}
.postcard .pc-name { font-family: var(--display); font-size: var(--step-2); line-height: 1.05; color: var(--rose); max-width: 58%; overflow-wrap: break-word; }
.postcard .pc-where { color: var(--navy); font-size: var(--step--1); max-width: 58%; }
.postcard .pc-note { font-size: var(--step--1); color: var(--ink-soft); max-width: 58%; align-self: end; line-height: 1.35; }
.postcard .pc-actions { display: flex; gap: 6px; align-items: center; position: relative; z-index: 3; }
.stamp {
  position: absolute; top: 14px; right: 14px; width: 60px; height: 72px; padding: 4px;
  background: var(--white); outline: 2px dashed rgba(52, 49, 92, 0.35); outline-offset: -1px;
  transform: rotate(4deg); box-shadow: 1px 2px 3px rgba(52, 49, 92, 0.2);
}
.stamp div {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center;
  font-family: var(--display); font-size: 1.35rem; line-height: 1; color: var(--white);
}
.postmark {
  position: absolute; top: 96px; right: 26px; width: 64px; height: 64px; border-radius: 50%;
  border: 2px solid rgba(47, 79, 143, 0.45); pointer-events: none;
  display: grid; place-items: center; text-align: center; transform: rotate(-12deg);
  font-size: 0.72rem; line-height: 1.1; color: rgba(47, 79, 143, 0.7);
}
.been-stamp {
  position: absolute; left: 50%; top: 46%; z-index: 4; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-14deg);
  border: 4px double var(--rose); color: var(--rose); border-radius: 12px;
  padding: 0.1em 0.6em; font-family: var(--display); font-size: var(--step-2); line-height: 1.1;
  background: rgba(255, 248, 251, 0.82); text-align: center; white-space: nowrap;
  animation: thunk 0.32s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.been-stamp small { display: block; font-family: var(--hand); font-size: var(--step--1); }
@keyframes thunk { from { transform: translate(-50%, -50%) rotate(-14deg) scale(1.7); opacity: 0; } }

/* ---------------- wishlist: gift tags ---------------- */
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 34px 22px; padding-top: 12px; }
.gift-tag {
  position: relative; background: var(--blue-soft); border: 2px solid var(--ink);
  padding: 30px 16px 14px; min-height: 150px;
  clip-path: polygon(50% 0, 100% 16%, 100% 100%, 0 100%, 0 16%);
  display: grid; grid-template-rows: auto 1fr auto; gap: 4px; text-align: center;
}
.tag-wrap:nth-child(3n+1) .gift-tag { background: var(--pink-soft); }
.tag-wrap:nth-child(3n+2) .gift-tag { background: #fff; }
.tag-wrap { position: relative; filter: drop-shadow(0 6px 8px rgba(52, 49, 92, 0.18)); }
.tag-wrap::before {
  content: ""; position: absolute; left: 50%; top: -18px; width: 2px; height: 34px; z-index: 3;
  background: var(--rose); transform: rotate(10deg);
}
.gift-tag .hole { position: absolute; left: 50%; top: 12px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; border: 2px solid var(--ink); background: var(--desk); }
.gift-tag .g-name { font-weight: 700; font-size: var(--step-1); line-height: 1.2; margin-top: 6px; word-break: break-word; }
.gift-tag .g-note { font-size: var(--step--1); color: var(--ink-soft); }
.gift-tag .g-actions { display: flex; justify-content: center; gap: 4px; align-items: center; flex-wrap: wrap; }
.gift-tag.got .g-name { text-decoration: line-through 2px var(--rose); }
.got-heart {
  position: absolute; right: 10px; top: 26px; width: 40px; height: 40px; z-index: 2;
  display: grid; place-items: center; background: var(--rose); color: white; border-radius: 50%;
  font-size: 1.1rem; transform: rotate(12deg); animation: thunk2 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes thunk2 { from { transform: rotate(12deg) scale(1.8); opacity: 0; } }

/* ---------------- lists ---------------- */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 30px 24px; align-items: start; }
.board { position: relative; background: var(--white); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: 30px 18px 18px; }
.board::before {
  content: ""; position: absolute; top: -11px; left: 18px; right: 18px; height: 22px;
  background: radial-gradient(circle at 50% 50%, transparent 5px, var(--ink) 5.5px, var(--ink) 7px, transparent 7.5px) 0 0 / 22px 22px repeat-x;
}
.board-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.board-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--step-1); color: var(--navy); line-height: 1.15; }
.board-head .emoji { font-size: 1.6rem; line-height: 1; margin-right: 6px; }
.board ul { list-style: none; margin: 10px 0 0; padding: 0; }
.board li { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px dashed rgba(122, 170, 214, 0.6); }
.board li .txt { flex: 1; min-width: 0; word-break: break-word; line-height: 1.35; padding-top: 2px; }
.board li.done .txt { text-decoration: line-through 2px var(--pink); color: var(--ink-soft); }
.check {
  flex: 0 0 auto; width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--white); display: grid; place-items: center; padding: 0; font-size: 15px; line-height: 1;
}
.check[aria-pressed="true"] { background: var(--pink); }
.board .count { font-size: var(--step--1); color: var(--ink-soft); }
.new-board { border: 2px dashed var(--ink); background: transparent; box-shadow: none; min-height: 150px; display: grid; place-items: center; text-align: center; font-weight: 700; font-size: var(--step-1); color: var(--navy); }

/* ---------------- date jar ---------------- */
.jar-zone { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 32px; align-items: center; }
@media (max-width: 680px) { .jar-zone { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.jar { position: relative; width: 230px; height: 280px; }
.jar-lid { position: absolute; left: 32px; right: 32px; top: 0; height: 34px; background: var(--pink); border: 2px solid var(--ink); border-radius: 10px 10px 4px 4px; z-index: 2; }
.jar-lid::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -10px; height: 12px; background: var(--rose); border: 2px solid var(--ink); border-radius: 4px; }
.jar-body {
  position: absolute; left: 6px; right: 6px; top: 40px; bottom: 0; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 40px 40px 34px 34px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.75) 8%, rgba(227, 240, 251, 0.55) 22%, rgba(227, 240, 251, 0.35) 70%, rgba(255, 255, 255, 0.6) 86%);
}
.slip { position: absolute; width: 58px; height: 16px; border: 1.5px solid var(--ink); border-radius: 3px; }
.jar.shake { animation: jarshake 0.7s ease; }
@keyframes jarshake {
  15% { transform: rotate(-9deg); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-6deg); }
  75% { transform: rotate(4deg); } 100% { transform: rotate(0); }
}
.picked {
  background: var(--white); border: 2px solid var(--ink); padding: 18px 20px; box-shadow: var(--shadow);
  transform: rotate(-1.5deg); max-width: 460px; position: relative;
}
.picked .idea { font-size: var(--step-2); line-height: 1.2; font-weight: 700; color: var(--rose); margin: 4px 0 14px; }
.picked.pop { animation: pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes pop { from { transform: translateY(40px) rotate(-6deg) scale(0.7); opacity: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 0.1em 0.3em 0.1em 0.8em; font-size: var(--step--1); }
.chip.done { background: var(--blue-soft); }
.chip .icon-btn { font-size: 0.8rem; }

/* ---------------- coupons ---------------- */
.coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.coupon {
  position: relative; display: grid; grid-template-columns: 1fr 86px; min-height: 130px;
  background: var(--pink-soft); border: 2px solid var(--ink); box-shadow: var(--shadow);
}
.coupon.tarush { background: var(--blue-soft); }
.coupon .c-main { padding: 14px 16px; display: grid; align-content: start; gap: 4px; }
.coupon .c-title { font-family: var(--display); font-size: var(--step-1); line-height: 1.15; color: var(--ink); }
.coupon .c-fine { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.35; }
.coupon .c-stub {
  border-left: 2px dashed var(--ink); display: grid; place-items: center; text-align: center; padding: 8px;
  font-size: var(--step--1); position: relative;
}
.coupon .c-stub::before, .coupon .c-stub::after {
  content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink);
}
.coupon .c-stub::before { top: -11px; }
.coupon .c-stub::after { bottom: -11px; }
.coupon.used .c-main { opacity: 0.55; }
.used-stamp {
  position: absolute; left: 34%; top: 50%; transform: translate(-50%, -50%) rotate(-10deg);
  border: 3px solid var(--navy); color: var(--navy); border-radius: 8px; padding: 0 0.5em;
  font-family: var(--display); font-size: var(--step-1); background: rgba(255, 255, 255, 0.85);
  pointer-events: none; white-space: nowrap; text-align: center; line-height: 1.2;
  animation: thunk3 0.3s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.used-stamp small { display: block; font-family: var(--hand); font-size: 0.75rem; }
@keyframes thunk3 { from { transform: translate(-50%, -50%) rotate(-10deg) scale(1.8); opacity: 0; } }

/* ---------------- dialog ---------------- */
dialog.editor {
  border: 2px solid var(--ink); border-radius: 14px; padding: 22px; width: min(460px, calc(100vw - 32px));
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lift);
}
dialog.editor::backdrop { background: rgba(39, 36, 72, 0.55); }
dialog.editor h3 { margin: 0 0 14px; font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--rose); line-height: 1.1; }
dialog.editor form { display: grid; gap: 12px; }
dialog.editor .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------------- motion preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* small fixes */
.page:focus { outline: none; }
.ow.new-board { background: transparent; box-shadow: none; display: grid; place-items: center; }
.ow.new-board::before { display: none; }
