:root {
  --bg: #fbf3f0;
  --bg-2: #f6e3df;
  --ink: #4a3b3a;
  --ink-soft: #8a7472;
  --rose: #d98a86;
  --rose-deep: #c2655f;
  --plum: #7c5b6b;
  --boy: #7fa6c9;
  --girl: #e09ab2;
  --match: #d05a6e;
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 20px 60px -25px rgba(124, 91, 107, 0.45);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* атрибут hidden всегда должен прятать элемент (иначе display из классов перебивает его) */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 120% at 50% 0%, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- фон с лепестками ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.petal {
  position: absolute;
  top: -8vh;
  font-size: 1.1rem;
  opacity: 0;
  animation: fall linear infinite;
  filter: drop-shadow(0 4px 6px rgba(192, 101, 95, 0.15));
}
@keyframes fall {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(112vh) translateX(8vw) rotate(320deg); opacity: 0; }
}

/* ---------- сцена и экраны ---------- */
.stage { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }

.screen { display: none; width: 100%; max-width: 560px; animation: rise 0.7s var(--ease) both; }
.screen.active { display: block; }
.screen--app.active { max-width: 720px; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- карточка ---------- */
.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 38px;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: var(--rose-deep);
  margin-bottom: 18px;
}

.title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.accent { color: var(--rose-deep); font-style: italic; }

.subtitle { color: var(--ink-soft); margin-top: 14px; font-weight: 300; }

/* ---------- формы ---------- */
.form { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.field {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(192, 101, 95, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(217, 138, 134, 0.16); }

.btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s, background 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(194, 101, 95, 0.7);
}
.btn--primary:hover { box-shadow: 0 16px 32px -10px rgba(194, 101, 95, 0.85); transform: translateY(-2px); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink-soft); border: 1px solid rgba(140, 91, 107, 0.3); }
.btn--big { width: 100%; padding: 18px; font-size: 1.05rem; margin-top: 8px; }

.hint { min-height: 1.2em; font-size: 0.88rem; color: var(--rose-deep); }

/* ---------- выбор имени ---------- */
.name-choices { margin-top: 30px; display: flex; gap: 16px; }
.name-btn {
  flex: 1;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  padding: 26px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s;
}
.name-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.name-btn span { display: block; font-size: 1.8rem; margin-bottom: 6px; }
.name-btn--boy:hover { background: rgba(127, 166, 201, 0.18); }
.name-btn--girl:hover { background: rgba(224, 154, 178, 0.18); }

/* ---------- шапка приложения ---------- */
.screen--app .card { padding: 0; }
.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px;
  background: var(--card);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.greeting { display: flex; flex-direction: column; line-height: 1.1; }
.greeting__hi { font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.05em; }
.greeting__name { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; color: var(--rose-deep); }

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; background: rgba(255,255,255,0.5); padding: 5px; border-radius: 14px; }
.tab {
  font-family: inherit; font-size: 0.85rem; color: var(--ink-soft);
  background: transparent; border: none; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.25s, color 0.25s; white-space: nowrap;
}
.tab.active { background: #fff; color: var(--rose-deep); box-shadow: 0 6px 14px -8px rgba(194,101,95,0.5); }

.logout {
  background: transparent; border: 1px solid rgba(140,91,107,0.25); color: var(--ink-soft);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 1.1rem;
  transition: background 0.25s;
}
.logout:hover { background: rgba(255,255,255,0.6); }

/* ---------- лента: "вместе уже…" + сердечки ---------- */
.ribbon { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.together {
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  color: var(--plum);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px -20px rgba(124, 91, 107, 0.5);
}
.together b { color: var(--rose-deep); font-weight: 600; font-variant-numeric: tabular-nums; }
.poke-banner {
  text-align: center;
  font-size: 0.92rem;
  color: var(--rose-deep);
  background: linear-gradient(135deg, rgba(224,154,178,0.2), rgba(217,138,134,0.16));
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  padding: 10px 14px;
  animation: rise 0.4s var(--ease) both;
}
.poke-banner b { font-weight: 600; }

/* ---------- плавающая кнопка "думаю о тебе" ---------- */
.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);          /* закреплена справа по центру экрана */
  z-index: 30;
  display: none;                        /* показывается только внутри приложения */
  align-items: center; gap: 8px;
  font-family: inherit; font-size: 0.92rem; font-weight: 500;
  color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--girl) 0%, var(--rose-deep) 100%);
  border: none; border-radius: 999px; padding: 13px 18px;
  box-shadow: 0 14px 30px -10px rgba(194, 101, 95, 0.7);
  transition: transform 0.18s var(--ease), box-shadow 0.25s;
}
body.in-app .fab { display: inline-flex; }
.fab:hover { transform: translateY(-50%) scale(1.05); box-shadow: 0 18px 36px -10px rgba(194,101,95,0.85); }
.fab:active { transform: translateY(-50%) scale(0.95); }
.fab__heart { font-size: 1.15rem; animation: heartbeat 1.6s var(--ease) infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
}

/* ---------- летящие сердечки (poke + пасхалка) ---------- */
.flyheart {
  position: fixed; z-index: 40; pointer-events: none;
  font-size: 1.4rem;
  animation: flyup 1.5s var(--ease) forwards;
}
@keyframes flyup {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(var(--dx, 0), -42vh) scale(1.3) rotate(var(--rot, 20deg)); opacity: 0; }
}

/* ---------- тосты-нежности ---------- */
.toasts {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
.toast {
  background: rgba(74, 59, 58, 0.92); color: #fff;
  font-size: 0.9rem; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.4);
  animation: toastIn 0.35s var(--ease) both;
}
.toast.is-out { animation: toastOut 0.4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(0.96); } }

/* ---------- countdown до встречи ---------- */
.match-row--next { outline: 2px solid rgba(208,90,110,0.5); outline-offset: -1px; }
.countdown {
  display: inline-block; margin-top: 4px;
  font-family: "Manrope", sans-serif; font-size: 0.8rem; color: var(--rose-deep); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .fab__label { display: none; }
  .fab { padding: 14px; }
  .fab__heart { font-size: 1.35rem; }
}

/* ---------- панели ---------- */
.panel { display: none; margin-top: 18px; animation: rise 0.5s var(--ease) both; }
.panel.active { display: block; }
.panel__intro { text-align: center; margin-bottom: 18px; }
.panel__title { font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 2rem; }
.panel__hint { color: var(--ink-soft); font-weight: 300; margin-top: 6px; font-size: 0.92rem; }

/* ---------- календарь ---------- */
.legend { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.82rem; color: var(--ink-soft); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.7rem; }
.dot--boy { background: var(--boy); }
.dot--girl { background: var(--girl); }
.dot--match { background: transparent; color: var(--match); width: auto; height: auto; }

.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 10px; }
.cal-arrow {
  background: var(--card); border: 1px solid rgba(255,255,255,0.6); width: 38px; height: 38px;
  border-radius: 12px; font-size: 1.3rem; color: var(--rose-deep); cursor: pointer; transition: transform 0.18s;
}
.cal-arrow:hover { transform: scale(1.08); }
.cal-month { font-family: "Cormorant Garamond", serif; font-weight: 500; font-size: 1.5rem; min-width: 200px; text-align: center; text-transform: capitalize; }

.weekdays, .calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.weekdays { margin-bottom: 8px; }
.weekdays span { text-align: center; font-size: 0.74rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }

.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.25s, box-shadow 0.25s;
  user-select: none;
}
.cell:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cell--empty { background: transparent; border: none; cursor: default; }
.cell--empty:hover { transform: none; box-shadow: none; }
.cell--past { opacity: 0.35; cursor: not-allowed; }
.cell--past:hover { transform: none; box-shadow: none; }
.cell--today { outline: 2px solid var(--rose); outline-offset: -2px; }
.cell--mine { background: rgba(217, 138, 134, 0.16); border-color: rgba(217,138,134,0.4); }
.cell--match {
  background: linear-gradient(135deg, rgba(224,154,178,0.35), rgba(127,166,201,0.3));
  box-shadow: 0 8px 20px -10px rgba(208,90,110,0.6);
}
.cell--match::after { content: "♥"; position: absolute; top: 3px; right: 6px; color: var(--match); font-size: 0.7rem; }
.cell__dots { position: absolute; bottom: 6px; display: flex; gap: 3px; }
.cell__dots .dot { width: 6px; height: 6px; }

/* ---------- совпадения ---------- */
.matches { margin-top: 26px; }
.matches__title { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.4rem; margin-bottom: 12px; }
.matches__list { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(224,154,178,0.18), rgba(127,166,201,0.14));
  border: 1px solid rgba(255,255,255,0.6); border-radius: 14px; padding: 14px 16px;
  animation: rise 0.4s var(--ease) both;
}
.match-row__date { font-family: "Cormorant Garamond", serif; font-size: 1.3rem; color: var(--rose-deep); min-width: 84px; }
.match-row__info { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }
.matches__empty { text-align: center; color: var(--ink-soft); font-weight: 300; padding: 10px; }

/* ---------- редактор дня ---------- */
.day-editor {
  margin-top: 20px; padding: 20px; border-radius: 18px;
  background: var(--card); border: 1px solid rgba(255,255,255,0.6); box-shadow: var(--shadow);
  animation: rise 0.35s var(--ease) both;
}
.day-editor h4 { font-family: "Cormorant Garamond", serif; font-size: 1.4rem; margin-bottom: 14px; text-align: center; }
.day-editor__row { display: flex; gap: 14px; justify-content: center; margin-bottom: 12px; }
.day-editor__row label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.9rem; }
.day-editor__row input[type="time"] { font-family: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(192,101,95,0.25); }
.day-editor__actions { display: flex; gap: 12px; margin-top: 14px; }
.day-editor__actions .btn { flex: 1; }

/* ---------- комплименты ---------- */
.compliment-card {
  background: var(--card); border: 1px solid rgba(255,255,255,0.6); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 40px 34px; min-height: 180px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.compliment-text {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-size: clamp(1.4rem, 4.5vw, 2rem);
  line-height: 1.35; color: var(--plum);
}
.compliment-text.is-loading { color: var(--ink-soft); }
.compliment-meter { display: flex; gap: 7px; margin-top: 22px; }
.heart { font-size: 1rem; transition: transform 0.3s var(--ease), opacity 0.3s; }
.heart--full { color: var(--rose-deep); }
.heart--empty { color: rgba(124,91,107,0.25); }
.heart--pop { animation: pop 0.5s var(--ease); }
@keyframes pop { 0%{transform:scale(1);} 40%{transform:scale(1.5);} 100%{transform:scale(1);} }

.boy-note { text-align: center; color: var(--ink-soft); font-weight: 300; margin-top: 8px; }

.history { margin-top: 30px; }
.history__title { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.4rem; margin-bottom: 14px; }
.history__list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.6); border-radius: 14px;
  padding: 14px 18px; font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.15rem; color: var(--plum);
  animation: rise 0.4s var(--ease) both;
}
.history-item small { display: block; font-family: "Manrope", sans-serif; font-style: normal; font-size: 0.72rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- адаптив ---------- */
@media (max-width: 560px) {
  .card { padding: 32px 22px; }
  .app-header { padding: 16px; gap: 12px; }
  .tabs { order: 3; width: 100%; justify-content: center; }
  .calendar, .weekdays { gap: 5px; }
  .cell { border-radius: 11px; font-size: 0.85rem; }
  .compliment-card { padding: 30px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .petals { display: none; }
}

/* ============================ ЭТАП 2: альбом, игры, мы ============================ */

/* подвкладки */
.subtabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 18px; }
.subtab {
  font-family: inherit; font-size: 0.85rem; color: var(--ink-soft);
  background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.6);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all 0.2s var(--ease);
}
.subtab.active { background: var(--rose); color: #fff; border-color: transparent; }
.subpanel { display: none; animation: rise 0.4s var(--ease) both; }
.subpanel.active { display: block; }

.upload-btn { display: inline-flex; justify-content: center; align-items: center; cursor: pointer; }
.album-head { margin-top: 32px; }

/* «сейчас» */
.now-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.now-card { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); aspect-ratio: 3/4; }
.now-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.now-card figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; color: #fff; font-size: 0.8rem;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.now-card figcaption span { display: block; opacity: 0.85; font-size: 0.72rem; margin-top: 2px; }
.now-card--empty { display: grid; place-items: center; aspect-ratio: 3/4; border: 1px dashed rgba(140,91,107,0.4); box-shadow: none; }
.now-empty { text-align: center; color: var(--ink-soft); }
.now-empty span { display: block; font-size: 0.74rem; margin-top: 4px; }

/* альбом */
.album-meta { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin: 12px 0; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ph { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); cursor: pointer; animation: rise 0.4s var(--ease) both; }
.ph img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.ph:hover img { transform: scale(1.05); }
.ph figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; color: #fff; font-size: 0.74rem;
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); }
.ph figcaption span { display: block; }
.ph figcaption small { opacity: 0.8; }
.ph-day { font-family: "Cormorant Garamond", serif; font-size: 0.9rem; }
.ph-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.45); color: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.ph-del:hover { background: var(--rose-deep); }

/* модалка фото */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(74,59,58,0.45); backdrop-filter: blur(4px); animation: rise 0.25s var(--ease) both; }
.modal__box { background: var(--bg); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; width: 100%; max-width: 420px; text-align: center; }
.modal__box h3 { font-family: "Cormorant Garamond", serif; font-size: 1.5rem; margin-bottom: 14px; }
.photo-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 14px; margin-bottom: 14px; background: rgba(0,0,0,0.04); }
.modal__box .field { margin-bottom: 12px; }
.modal__actions { display: flex; gap: 12px; margin-top: 6px; }
.modal__actions .btn { flex: 1; }
.cap-date-row { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 12px; }
.cap-date-row input { padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(192,101,95,0.25); font-family: inherit; }

/* лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 70; display: none; place-items: center; padding: 24px; background: rgba(0,0,0,0.85); cursor: zoom-out; }
.lightbox.show { display: grid; animation: rise 0.2s var(--ease) both; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* общий заголовок секции игры/истории */
.game-title { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.5rem; margin: 6px 0 14px; line-height: 1.25; }

/* вопрос дня */
#q-answer { margin-bottom: 12px; resize: vertical; }
.q-reveal { margin-top: 16px; }
.q-card { background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.6); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; font-size: 0.95rem; }
.q-card b { color: var(--rose-deep); }
.q-card--p { background: linear-gradient(135deg, rgba(224,154,178,0.18), rgba(127,166,201,0.14)); }
.q-wait { text-align: center; color: var(--ink-soft); font-weight: 300; padding: 8px; }
.q-history { margin-top: 22px; }
.q-hist-title { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.3rem; margin-bottom: 12px; }
.q-hist { margin-bottom: 18px; }
.q-hist-q { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.05rem; color: var(--plum); margin-bottom: 8px; text-align: center; }

/* колесо */
.wheel-result { min-height: 90px; display: grid; place-items: center; text-align: center; padding: 20px;
  font-family: "Cormorant Garamond", serif; font-size: clamp(1.4rem, 5vw, 2rem); color: var(--plum);
  background: var(--card); border: 1px solid rgba(255,255,255,0.6); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.wheel-pop { animation: pop 0.5s var(--ease); }
#wheel-towish { width: 100%; margin-top: 10px; }

/* крестики-нолики */
.ttt-score { display: flex; justify-content: center; gap: 16px; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 10px; flex-wrap: wrap; }
.ttt-score b { color: var(--rose-deep); }
.ttt-status { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.3rem; margin-bottom: 14px; }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; margin: 0 auto 16px; }
.ttt-cell { aspect-ratio: 1/1; font-size: 2rem; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.6); border-radius: 16px; transition: transform 0.15s var(--ease), background 0.2s; }
.ttt-cell:not(:disabled):hover { transform: translateY(-2px); background: #fff; }
.ttt-cell:disabled { cursor: default; }
#ttt-reset { display: block; margin: 0 auto; }

/* память */
.memory-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--ink-soft); font-size: 0.9rem; }
.memory-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.mem-card { aspect-ratio: 1/1; font-size: 1.7rem; display: grid; place-items: center; cursor: pointer; border-radius: 14px; border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%); color: rgba(255,255,255,0.85); transition: transform 0.2s var(--ease); }
.mem-card.is-up { background: rgba(255,255,255,0.85); transform: rotateY(0); }
.mem-card.is-done { opacity: 0.55; }
.memory-win { text-align: center; font-family: "Cormorant Garamond", serif; font-size: 1.5rem; color: var(--rose-deep); margin-top: 16px; animation: pop 0.6s var(--ease); }

/* статистика */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid rgba(255,255,255,0.6); border-radius: 16px; padding: 14px 8px; text-align: center; box-shadow: 0 10px 26px -20px rgba(124,91,107,0.5); }
.stat__ic { font-size: 1.3rem; }
.stat__val { font-family: "Cormorant Garamond", serif; font-size: 1.8rem; color: var(--rose-deep); line-height: 1.1; }
.stat__lbl { font-size: 0.7rem; color: var(--ink-soft); }

/* таймлайн */
.timeline { position: relative; margin: 0 0 14px; padding-left: 8px; }
.tl-item { position: relative; display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; animation: rise 0.4s var(--ease) both; }
.tl-ic { font-size: 1.3rem; }
.tl-date { font-size: 0.74rem; color: var(--ink-soft); }
.tl-title { font-family: "Cormorant Garamond", serif; font-size: 1.15rem; color: var(--plum); }
.tl-body { flex: 1; }
.tl-del { background: transparent; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1.2rem; }
.ms-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#ms-add-btn { display: block; margin: 0 auto; }

/* настроение */
.mood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.mood-card { background: var(--card); border: 1px solid rgba(255,255,255,0.6); border-radius: 18px; padding: 18px 12px; text-align: center; box-shadow: var(--shadow); }
.mood-emoji { font-size: 2.6rem; line-height: 1; }
.mood-emoji--none { opacity: 0.4; }
.mood-name { font-family: "Cormorant Garamond", serif; font-size: 1.2rem; color: var(--rose-deep); margin-top: 6px; }
.mood-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.mood-when { font-size: 0.7rem; color: var(--ink-soft); opacity: 0.7; margin-top: 4px; }
.mood-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 14px; }
.mood-opt { font-size: 1.5rem; background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.6); border-radius: 14px; padding: 8px; cursor: pointer; transition: transform 0.15s var(--ease); }
.mood-opt:hover { transform: scale(1.15); }

/* желания */
.wish-add { display: flex; gap: 8px; margin-bottom: 16px; }
.wish-add .field { flex: 1; }
.wish-add .btn { padding: 12px 18px; }
.wish { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.55); border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; animation: rise 0.3s var(--ease) both; }
.wish-check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--rose); background: transparent; color: var(--rose-deep); cursor: pointer; font-weight: 700; flex-shrink: 0; }
.wish.is-done .wish-check { background: var(--rose); color: #fff; }
.wish-text { flex: 1; font-size: 0.95rem; }
.wish.is-done .wish-text { text-decoration: line-through; color: var(--ink-soft); }
.wish-del { background: transparent; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1.2rem; }

/* капсула */
.capsule-new { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
#cap-body { resize: vertical; }
.capsule { background: var(--card); border: 1px solid rgba(255,255,255,0.6); border-radius: 16px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); animation: rise 0.4s var(--ease) both; }
.capsule.locked { display: flex; align-items: center; gap: 14px; opacity: 0.92; }
.cap-lock { font-size: 1.6rem; }
.cap-info b { display: block; }
.cap-info small { color: var(--ink-soft); font-size: 0.78rem; }
.cap-head { font-family: "Cormorant Garamond", serif; font-size: 1.2rem; margin-bottom: 8px; }
.cap-head small { font-family: "Manrope", sans-serif; font-size: 0.74rem; color: var(--ink-soft); }
.cap-body { white-space: pre-wrap; color: var(--plum); font-size: 0.95rem; line-height: 1.5; }
.cap-del { background: transparent; border: none; color: var(--ink-soft); cursor: pointer; font-size: 0.8rem; margin-left: auto; }
.capsule.open .cap-del { display: block; margin-top: 10px; }

@media (max-width: 560px) {
  .now-grid, .mood-grid { gap: 10px; }
  .album { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .ttt-cell { font-size: 1.6rem; }
  .mem-card { font-size: 1.4rem; }
}
