/* ═══════════════════════════════════════════
   ЗВЕНО — дизайн-система v3
   Бордовый #3D0A14 · Крем #F5ECD7 · Розовое золото #C9896C
   ═══════════════════════════════════════════ */

:root {
  --burgundy: #3D0A14;
  --burgundy-deep: #310811;
  --burgundy-panel: rgba(245, 236, 215, 0.08);
  --burgundy-panel-border: rgba(245, 236, 215, 0.14);
  --cream: #F8F1E1;
  --cream-muted: rgba(245, 236, 215, 0.55);
  --cream-faint: rgba(245, 236, 215, 0.4);
  --rosegold: #C9896C;
  --rosegold-light: #E8B89A;
  --rosegold-glow: rgba(201, 137, 108, 0.4);
  --gold: #FFD700;
  --blush: rgba(232, 196, 184, 0.3);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius-lg: 32px;
  --radius: 22px;
  --radius-btn: 16px;
  --radius-sm: 12px;
}

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

html, body {
  min-height: 100%;
  background: var(--burgundy-deep);
  font-family: var(--sans);
  color: var(--cream);
  overflow-x: hidden;
}

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

/* ═══ BOKEH-ФОН ═══ */
.bokeh-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 55% at 50% 0%, #6B1A2A 0%, #3D0A14 40%, #310811 100%);
}
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.bokeh-1 { width: 320px; height: 320px; top: -8%;  left: -16%; background: rgba(201, 137, 108, 0.18); animation: float1 24s ease-in-out infinite; }
.bokeh-2 { width: 260px; height: 260px; top: 12%;  right: -14%; background: rgba(255, 160, 80, 0.12); animation: float2 28s ease-in-out infinite; }
.bokeh-3 { width: 300px; height: 300px; top: 40%;  left: -18%; background: rgba(180, 80, 60, 0.14); animation: float3 26s ease-in-out infinite; }
.bokeh-4 { width: 200px; height: 200px; top: 34%;  right: 4%;  background: rgba(201, 137, 108, 0.16); animation: float1 30s ease-in-out infinite reverse; }
.bokeh-5 { width: 280px; height: 280px; bottom: 2%; right: -16%; background: rgba(180, 80, 60, 0.13); animation: float2 22s ease-in-out infinite reverse; }
.bokeh-6 { width: 160px; height: 160px; bottom: 14%; left: 10%; background: rgba(255, 160, 80, 0.11); animation: float3 25s ease-in-out infinite reverse; }
.bokeh-7 { width: 110px; height: 110px; top: 6%;   left: 40%;  background: rgba(255, 160, 80, 0.11); animation: float2 20s ease-in-out infinite; }
.bokeh-8 { width: 220px; height: 220px; bottom: -6%; left: 36%; background: rgba(201, 137, 108, 0.16); animation: float1 27s ease-in-out infinite; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(24px, -30px) scale(1.08); }
  66%      { transform: translate(-16px, 18px) scale(0.95); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(-28px, 22px) scale(1.1); }
  70%      { transform: translate(14px, -26px) scale(0.92); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, 24px) scale(1.06); }
}

/* ═══ Каркас ═══ */
#root { min-height: 100%; }
.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 32px;
  animation: screenIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.screen.no-nav { padding-bottom: 24px; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ Типографика ═══ */
.serif { font-family: var(--serif); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; }
.muted { color: var(--cream-muted); }

/* ═══ Верхняя панель ═══ */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 6px;
}
.top-bar-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  flex: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ═══ SVG-иконки ═══ */
.icon {
  width: 20px; height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.top-bar-link {
  width: 22px; height: 22px;
  color: var(--rosegold-light);
  margin-right: 9px;
  vertical-align: -4px;
  filter: drop-shadow(0 0 10px rgba(201, 137, 108, 0.7));
}
.icon-btn .icon { width: 24px; height: 24px; color: var(--cream); }
.top-bar-side {
  width: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 19px;
  transition: all 0.3s ease;
}
.icon-btn:hover  { background: var(--burgundy-panel); }
.icon-btn:active { background: var(--burgundy-panel); transform: scale(0.92); }

/* ═══ Аватары ═══ */
.couple-block { display: flex; flex-direction: column; align-items: center; margin: 12px 0 6px; }
.couple-avatars { display: flex; align-items: center; gap: 26px; }
.avatar {
  border-radius: 50%;
  background-color: #E8C4A0;
  background-size: cover;
  background-position: center;
  border: 2.5px solid #C9896C;
  box-shadow:
    0 0 0 3px rgba(201, 137, 108, 0.25),
    0 0 22px rgba(201, 137, 108, 0.7),
    0 0 48px rgba(232, 184, 154, 0.45);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: box-shadow 0.3s ease;
}
.avatar.size-60 { width: 60px; height: 60px; }
.avatar.size-76 { width: 76px; height: 76px; }
.avatar.size-80 { width: 80px; height: 80px; }

/* иконка-звено */
.couple-link {
  margin: 0 -8px;
  z-index: 2;
  color: var(--rosegold-light);
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 14px rgba(201, 137, 108, 1)) drop-shadow(0 0 26px rgba(255, 215, 0, 0.8));
  animation: linkGlow 3s ease-in-out infinite;
}
.couple-link .icon { width: 19px; height: 19px; }
.couple-link.big { margin: 0 -16px; }
.couple-link.big .icon { width: 26px; height: 26px; }
@keyframes linkGlow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(201, 137, 108, 1)) drop-shadow(0 0 26px rgba(255, 215, 0, 0.8)); }
  50%       { filter: drop-shadow(0 0 24px rgba(232, 184, 154, 1)) drop-shadow(0 0 40px rgba(255, 215, 0, 1)); }
}

.couple-names {
  display: grid;
  grid-template-columns: 80px 80px;
  gap: 19px;
  justify-content: center;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--cream);
  text-align: center;
}
.couple-names.big {
  grid-template-columns: 80px 80px;
  gap: 19px;
  font-size: 20px;
  justify-content: center;
  text-align: center;
}

.together-line {
  margin-top: 8px;
  font-size: 13px;
  font-style: italic;
  color: var(--rosegold-light);
  text-shadow: 0 0 14px rgba(201, 137, 108, 0.4);
}
.together-line .inline-link { width: 13px; height: 13px; margin-left: 4px; vertical-align: -2px; }

/* ═══ Кремовая панель контента ═══ */
.content-sheet {
  flex: 1;
  position: relative;
  background: var(--cream);
  margin: 24px -18px -96px;
  padding: 28px 18px 110px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow:
    0 -2px 0 rgba(201, 137, 108, 0.3),
    0 -12px 48px rgba(0, 0, 0, 0.35);
}
/* золотой ореол над панелью */
.content-sheet::before {
  content: "";
  position: absolute;
  top: -48px;
  left: 5%;
  right: 5%;
  height: 52px;
  background: radial-gradient(ellipse 80% 100% at 50% 100%,
    rgba(255, 200, 120, 1) 0%,
    rgba(201, 137, 108, 0.65) 40%,
    transparent 80%);
  filter: blur(10px);
  pointer-events: none;
}
.content-sheet .section-title { color: #3D0A14; margin-top: 0; text-shadow: none; }
.content-sheet .section-sub   { color: rgba(61, 10, 20, 0.55); }

/* ═══ Сетка колод ═══ */
.section-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 4px;
}
.section-sub {
  font-size: 13.5px;
  color: var(--cream-muted);
  margin-bottom: 20px;
}

.deck-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.deck-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}
.deck-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.52),
    0 0 22px rgba(201, 137, 108, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.deck-card:active { transform: scale(0.98); }

.deck-card .deck-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.28) 45%,
    transparent 70%
  );
}
.deck-card .deck-info { position: relative; z-index: 1; }

.deck-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  color: #FFF6E8;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.deck-sub  { font-size: 11.5px; color: rgba(255, 246, 232, 0.75); margin-top: 4px; display: block; }
.deck-level {
  font-size: 11.5px;
  margin-top: 6px;
  display: flex; align-items: center; gap: 5px;
  color: rgba(255, 246, 232, 0.9);
}
.level-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.deck-lock {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  color: #FFF6E8;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.deck-lock .icon { width: 14px; height: 14px; }
.deck-title .title-lock { width: 13px; height: 13px; margin-left: 5px; vertical-align: -1px; }
.deck-card.locked .deck-info { opacity: 0.75; }

/* ═══ Нижняя навигация — скрыта ═══ */
.bottom-nav {
  display: none;
  background: rgba(245, 236, 215, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(61, 10, 20, 0.1);
  padding: 8px 0 max(10px, env(safe-area-inset-bottom));
  z-index: 50;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: rgba(61, 10, 20, 0.4);
  transition: all 0.25s ease;
  position: relative;
}
.nav-item .nav-icon {
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.nav-item .nav-icon .icon { width: 24px; height: 24px; }

.nav-item.active { color: #3D0A14; }
.nav-item.active .nav-icon .icon {
  filter: drop-shadow(0 0 6px rgba(201, 137, 108, 0.5));
}
.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: #3D0A14;
}

/* ═══ Страница колоды ═══ */
.deck-hero {
  position: relative;
  height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}
.deck-hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 28px;
  color: #FFF6E8;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.deck-hero-tags { display: flex; gap: 8px; margin-top: 10px; position: relative; z-index: 1; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #FFF6E8;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ═══ Прогресс-бар ═══ */
.progress-block { margin: 20px 2px 6px; }
.progress-label { font-size: 12.5px; color: var(--cream-muted); margin-bottom: 8px; }
.progress-track {
  height: 6px;
  border-radius: 10px;
  background: rgba(245, 236, 215, 0.15);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #C9896C, #E8B89A);
  box-shadow: 0 0 10px rgba(201, 137, 108, 0.6);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  animation: progressFill 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}
@keyframes progressFill {
  from { transform: scaleX(0); opacity: 0.4; }
  to   { transform: scaleX(1); opacity: 1; }
}
.progress-row {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 13px;
}
.progress-row .pct { color: var(--rosegold-light); font-weight: 600; }
.progress-couple {
  display: flex; align-items: center; gap: 9px;
  margin-top: 14px; font-size: 12.5px; color: var(--cream-muted);
}
.mini-avatars { display: flex; }
.mini-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background-color: #E8C4A0;
  background-size: cover; background-position: center;
  border: 1.5px solid #C9896C;
  box-shadow: 0 0 10px rgba(201, 137, 108, 0.35);
}
.mini-avatar + .mini-avatar { margin-left: -8px; }

/* ═══ Кремовые карточки ═══ */
.cream-card {
  background: var(--cream);
  color: var(--burgundy);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(201, 137, 108, 0.12);
}
.cream-card h3 { font-size: 20px; margin-bottom: 10px; color: #3D0A14; }
.cream-card p  { font-size: 14px; line-height: 1.65; color: rgba(61, 10, 20, 0.82); }
.cream-card .deck-source { font-size: 12px; font-style: italic; color: rgba(61, 10, 20, 0.5); margin-top: 10px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(61, 10, 20, 0.07);
  color: #4A0E1B;
  border: 1px solid rgba(61, 10, 20, 0.06);
}

.steps { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.step  { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C9896C 0%, #A96A4E 100%);
  color: #FFF6E8;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; font-family: var(--serif);
  box-shadow: 0 3px 10px rgba(201, 137, 108, 0.4);
}
.step-title { font-weight: 600; font-size: 14.5px; color: #3D0A14; font-family: var(--serif); }
.step-desc  { font-size: 13px; color: rgba(61, 10, 20, 0.68); margin-top: 2px; line-height: 1.5; }

/* ═══ Кнопки ═══ */
.btn-primary {
  display: block; width: 100%;
  padding: 16px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, #C9896C, #D4A574);
  color: #3D0A14;
  font-family: var(--serif);
  font-size: 17px; font-weight: bold;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(201, 137, 108, 0.4);
  transition: all 0.3s ease;
  text-align: center;
}
.btn-primary:hover  { box-shadow: 0 6px 30px rgba(201, 137, 108, 0.6); transform: translateY(-2px); }
.btn-primary:active { transform: scale(0.98); box-shadow: 0 3px 14px rgba(201, 137, 108, 0.35); }

.btn-text {
  display: block; width: 100%;
  text-align: center; padding: 12px;
  font-size: 14px; color: var(--cream-muted);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.btn-text:hover { color: var(--cream); }
.btn-text.no-underline { text-decoration: none; }

.deck-page-cta {
  position: sticky;
  bottom: 90px;
  margin-top: 20px;
  z-index: 10;
}

/* ═══ Экран карточки вопроса ═══ */
.card-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.card-progress-track {
  height: 6px; border-radius: 10px;
  background: rgba(245, 236, 215, 0.15);
  overflow: hidden; margin: 8px 0 4px;
}
.question-area {
  flex: 1; display: flex; flex-direction: column;
  justify-content: center; padding: 12px 0;
}
.question-card {
  background: #F5ECD7;
  border-radius: var(--radius-lg);
  min-height: 55vh;
  display: flex; flex-direction: column;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(201, 137, 108, 0.2);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  animation: cardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(28px) rotate(1.2deg); }
  to   { opacity: 1; transform: translateX(0) rotate(0); }
}
.question-card.swipe-back { animation: cardInBack 0.35s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cardInBack {
  from { opacity: 0; transform: translateX(-28px) rotate(-1.2deg); }
  to   { opacity: 1; transform: translateX(0) rotate(0); }
}
.question-card-top {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px 26px;
}
.question-icon { font-size: 36px; margin-bottom: 14px; filter: drop-shadow(0 2px 6px rgba(201, 137, 108, 0.4)); }
.question-line {
  width: 56px; height: 2px;
  background: linear-gradient(90deg, transparent, #C9896C, transparent);
  margin-bottom: 24px;
}
.question-text {
  font-family: Georgia, serif;
  font-size: 22px; line-height: 1.6;
  color: #3D0A14; text-align: center;
}
.question-divider { height: 1px; background: rgba(61, 10, 20, 0.12); margin: 0 26px; }
.question-hint {
  background: rgba(232, 196, 184, 0.3);
  border-radius: var(--radius-sm);
  border-left: 3px solid #C9896C;
  margin: 14px 18px 18px;
  padding: 13px 16px;
  font-size: 13.5px; font-style: italic;
  color: rgba(61, 10, 20, 0.75);
  line-height: 1.5;
}
.card-actions { padding-top: 16px; }
.swipe-hint { text-align: center; font-size: 12px; color: var(--cream-faint); margin-top: 6px; }
.card-dots { display: flex; justify-content: center; gap: 7px; margin-top: 14px; }
.card-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(245, 236, 215, 0.25);
  transition: all 0.3s ease;
}
.card-dot.active { background: var(--rosegold-light); box-shadow: 0 0 8px rgba(201, 137, 108, 0.7); }

/* ═══ Экран завершения ═══ */
.completion-screen { text-align: center; position: relative; }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.confetti {
  position: absolute; top: -14px;
  width: 8px; height: 8px; border-radius: 2px;
  animation: confettiFall linear infinite;
}
@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  80%  { opacity: 0.9; }
  100% { transform: translateY(105vh) rotate(620deg); opacity: 0; }
}
.completion-hero { margin-top: 26px; position: relative; }
.completion-chain {
  font-size: 80px; display: inline-block;
  filter: drop-shadow(0 0 12px rgba(201, 137, 108, 0.8)) drop-shadow(0 0 44px rgba(255, 200, 120, 0.45));
  animation: chainPulse 2.4s ease-in-out infinite;
}
@keyframes chainPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.07); filter: drop-shadow(0 0 22px rgba(232, 184, 154, 1)) drop-shadow(0 0 60px rgba(255, 200, 120, 0.6)); }
}
.sparkle { position: absolute; font-size: 20px; animation: sparkleTwinkle 1.8s ease-in-out infinite; }
@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8) rotate(-8deg); }
  50%       { opacity: 1;   transform: scale(1.15) rotate(8deg); }
}
.completion-title { font-size: 32px; margin-top: 14px; text-shadow: 0 2px 16px rgba(0,0,0,0.45); }
.completion-sub   { font-size: 14px; color: var(--cream-muted); margin-top: 6px; }

.stats-card {
  border: 1px solid rgba(201, 137, 108, 0.25);
  background: var(--burgundy-panel);
  border-radius: var(--radius);
  padding: 18px; margin-top: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.stats-card h3 { font-size: 19px; margin-bottom: 14px; }
.stats-row { display: flex; justify-content: space-around; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-value { font-family: var(--serif); font-size: 24px; color: var(--rosegold-light); }
.stat-label { font-size: 12px; color: var(--cream-muted); }
.stats-quote { font-size: 13px; font-style: italic; color: var(--cream-muted); margin-top: 16px; line-height: 1.55; }
.stats-quote-src { font-size: 11.5px; color: var(--cream-faint); margin-top: 4px; }

.achievement-popup {
  border-radius: var(--radius); padding: 16px 18px; margin-top: 16px;
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(201,137,108,0.1) 100%);
  border: 1px solid rgba(255,215,0,0.4);
  box-shadow: 0 0 24px rgba(255,215,0,0.18), inset 0 0 20px rgba(255,215,0,0.05);
  display: flex; align-items: center; gap: 14px; text-align: left;
  animation: achieveGlow 2.6s ease-in-out infinite;
}
@keyframes achieveGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(255,215,0,0.15); }
  50%       { box-shadow: 0 0 34px rgba(255,215,0,0.32); }
}
.achievement-icon {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F8E7B0 0%, #E8C878 45%, #B08D3E 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 0 16px rgba(255,215,0,0.5);
}
.achievement-new  { font-size: 12px; color: #FFD700; }
.achievement-name { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-top: 1px; }
.achievement-desc { font-size: 12.5px; color: var(--cream-muted); margin-top: 2px; }

.next-deck-card {
  display: flex; align-items: center; gap: 13px; width: 100%;
  border: 1px solid rgba(201,137,108,0.25);
  background: var(--burgundy-panel);
  border-radius: var(--radius); padding: 13px 15px; margin-top: 14px;
  text-align: left; transition: all 0.3s ease;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.next-deck-card:hover { transform: translateY(-2px); border-color: rgba(201,137,108,0.45); }
.next-deck-card:active { transform: scale(0.98); }
.next-deck-thumb {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.next-deck-label { font-size: 11.5px; color: var(--cream-muted); }
.next-deck-name  { font-family: var(--serif); font-weight: 700; font-size: 17px; margin-top: 1px; }
.next-deck-meta  { font-size: 12px; color: var(--cream-muted); margin-top: 2px; }
.next-deck-arrow { margin-left: auto; font-size: 18px; color: var(--rosegold-light); }

/* ═══ Профиль ═══ */
.profile-hero { display: flex; flex-direction: column; align-items: center; margin-top: 12px; }
.profile-avatars { display: flex; align-items: center; gap: 26px; }
.profile-together {
  font-family: var(--serif); font-size: 18px;
  color: var(--rosegold-light); margin-top: 14px;
  text-align: center; text-shadow: 0 0 16px rgba(201,137,108,0.4);
}
.profile-since { font-size: 12.5px; color: var(--cream-muted); margin-top: 4px; }

.profile-columns {
  display: grid; grid-template-columns: 132px 1fr;
  gap: 14px; margin-top: 26px; align-items: start;
}
.col-title { font-family: var(--serif); font-size: 19px; margin-bottom: 12px; }
.col-title .col-count { font-family: var(--sans); font-size: 12px; color: var(--cream-muted); font-weight: 400; }

.stat-big-card {
  border: 1px solid rgba(201,137,108,0.2);
  background: var(--burgundy-panel);
  border-radius: var(--radius); padding: 16px 14px; margin-bottom: 12px;
  position: relative;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}
.stat-big-num   { font-family: var(--serif); font-size: 42px; color: var(--rosegold-light); line-height: 1; }
.stat-big-label { font-size: 12.5px; color: var(--cream-muted); margin-top: 8px; line-height: 1.35; }
.stat-big-emoji { position: absolute; top: 12px; right: 12px; font-size: 20px; }

/* ═══ Достижения ═══ */
.achievement-list { display: flex; flex-direction: column; gap: 9px; }
.achievement-row {
  display: flex; align-items: center; gap: 11px;
  border-radius: var(--radius-sm); padding: 10px 12px;
  border: 1px solid var(--burgundy-panel-border);
  background: var(--burgundy-panel);
  transition: all 0.3s ease;
}
.achievement-row.earned {
  border: 1px solid rgba(201,137,108,0.4);
  background: rgba(201,137,108,0.08);
  box-shadow: 0 0 15px rgba(201,137,108,0.15);
}
.ach-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; line-height: 1;
}
.achievement-row.earned .ach-icon {
  font-size: 22px;
  background: radial-gradient(circle at 35% 30%, #F8E7B0 0%, #E8C878 45%, #B08D3E 100%);
  box-shadow: 0 0 12px rgba(232,200,120,0.5);
}
.achievement-row.locked { opacity: 0.5; filter: grayscale(0.8); }
.achievement-row.locked .ach-icon { background: rgba(245,236,215,0.1); font-size: 17px; }
.ach-name { font-family: var(--serif); font-size: 14.5px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ach-date { font-family: var(--sans); font-size: 11px; color: var(--cream-muted); font-weight: 400; }
.ach-desc { font-size: 11.5px; color: var(--cream-muted); margin-top: 2px; line-height: 1.4; }

/* ═══ Адаптив ═══ */
@media (max-width: 380px) {
  .profile-columns { grid-template-columns: 116px 1fr; gap: 10px; }
  .question-text { font-size: 20px; }
  .stat-big-num { font-size: 36px; }
}

/* ═══ Без анимаций ═══ */
@media (prefers-reduced-motion: reduce) {
  .bokeh, .couple-link, .completion-chain, .sparkle,
  .achievement-popup, .confetti { animation: none !important; }
  * { transition-duration: 0.01ms !important; }
}

.avatar.size-90 { width: 90px; height: 90px; }
.couple-names {
  grid-template-columns: 90px 90px;
  gap: 19px;
}
.couple-names.big {
  grid-template-columns: 90px 90px;
  gap: 19px;
}

/* крупнее звено и название */
.top-bar-title {
  font-size: 26px;
  letter-spacing: 1px;
}
.top-bar-link {
  width: 28px;
  height: 28px;
  margin-right: 10px;
  vertical-align: -6px;
}
.couple-link .icon { width: 24px; height: 24px; }
.couple-link.big .icon { width: 30px; height: 30px; }

/* ═══ COUPLE AVATARS WRAP — финальное решение ═══ */
.couple-avatars-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.couple-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.couple-name {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--cream);
  text-align: center;
}
.couple-name.big {
  font-size: 20px;
}
/* скрываем старый блок имён */
.couple-names { display: none !important; }

.couple-avatars-wrap {
  gap: 20px;
}

.couple-link .icon { width: 28px; height: 28px; }
.couple-link.big .icon { width: 32px; height: 32px; }

.couple-link {
  margin-top: -20px;
}
.couple-link .icon { width: 32px; height: 32px; }

/* более тёплое и мягкое свечение аватаров */
.avatar {
  background-color: #F0D5A0;
  box-shadow:
    0 0 0 3px rgba(255, 220, 150, 0.3),
    0 0 28px rgba(255, 180, 80, 0.85),
    0 0 60px rgba(255, 140, 40, 0.5),
    0 0 90px rgba(200, 100, 40, 0.25);
}

/* свечение иконки звена — теплее и мягче */
.couple-link {
  filter: drop-shadow(0 0 8px rgba(255, 230, 150, 0.9)) drop-shadow(0 0 20px rgba(255, 200, 80, 0.7));
  animation: linkGlow 3s ease-in-out infinite;
}
@keyframes linkGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 230, 150, 0.9)) drop-shadow(0 0 20px rgba(255, 200, 80, 0.7)); }
  50%       { filter: drop-shadow(0 0 14px rgba(255, 240, 180, 1)) drop-shadow(0 0 32px rgba(255, 210, 100, 0.9)); }
}

/* ═══ Профиль — новая структура ═══ */
.profile-section {
  margin-top: 24px;
}
.profile-section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 14px;
}
.profile-stats-row {
  display: flex;
  align-items: center;
  background: var(--burgundy-panel);
  border: 1px solid rgba(201, 137, 108, 0.2);
  border-radius: var(--radius);
  padding: 20px 24px;
  gap: 0;
}
.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.profile-stat-num {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
  color: var(--rosegold-light);
  text-shadow: 0 0 18px rgba(201, 137, 108, 0.5);
}
.profile-stat-label {
  font-size: 13px;
  color: var(--cream-muted);
  text-align: center;
}
.profile-stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(245, 236, 215, 0.15);
  margin: 0 8px;
}

/* ═══ Карточки статистики профиля ═══ */
.profile-stats-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-stat-card {
  background: rgba(201, 137, 108, 0.1);
  border: 1px solid rgba(201, 137, 108, 0.2);
  border-radius: var(--radius);
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.profile-stat-num {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1;
  color: var(--rosegold-light);
  text-shadow: 0 0 20px rgba(201, 137, 108, 0.5);
}
.profile-stat-emoji {
  font-size: 36px;
  opacity: 0.6;
  filter: drop-shadow(0 2px 6px rgba(201, 137, 108, 0.3));
}
.profile-stat-label {
  font-size: 14px;
  color: var(--cream-muted);
}

/* ═══ Статистика горизонтально ═══ */
.profile-stats-cards {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  gap: 0;
  background: rgba(201, 137, 108, 0.1);
  border: 1px solid rgba(201, 137, 108, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-stat-card {
  flex: 1;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 20px 16px 16px;
}
.profile-stat-divider-v {
  width: 1px;
  background: rgba(245, 236, 215, 0.15);
  margin: 12px 0;
}

/* ═══ Статистика профиля — финал ═══ */
.profile-stat-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end;
  position: relative;
  padding: 16px 16px 14px !important;
  min-height: 110px;
}
.profile-stat-card-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.profile-stat-num {
  font-size: 48px !important;
  line-height: 1 !important;
}
.profile-stat-emoji {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 28px !important;
}
.profile-stat-label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--cream-muted);
}

/* ═══ Статистика профиля — цифра крупнее и центр ═══ */
.profile-stat-card {
  align-items: flex-start !important;
  justify-content: center !important;
}
.profile-stat-num {
  font-size: 64px !important;
  line-height: 1 !important;
  display: block;
}
.profile-stat-label {
  font-size: 14px !important;
  margin-top: 8px !important;
}

/* ═══ Статистика — финальное выравнивание ═══ */
.profile-stat-card {
  align-items: center !important;
  text-align: center !important;
}
.profile-stat-card-top {
  align-items: center !important;
  width: 100%;
  justify-content: center !important;
}
.profile-stat-num {
  text-align: center !important;
}
.profile-stat-label {
  text-align: center !important;
  width: 100%;
}
.profile-stat-emoji {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
}

/* ═══ Кнопка выбора аватара ═══ */
.avatar-pick-btn {
  position: relative;
  border-radius: 50%;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  display: block;
}
.avatar-pick-hint {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(201, 137, 108, 0.95);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  pointer-events: none;
}

/* ═══ Отступ под блоком "Как это работает" ═══ */
.deck-page-cta {
  position: relative;
  margin-top: 16px;
}
.cream-card:last-of-type {
  padding-bottom: 100px;
}

/* ═══ Кнопки на странице колоды — финал ═══ */
.cream-card:last-of-type {
  padding-bottom: 24px !important;
}
.deck-page-cta {
  margin: 16px 16px 40px !important;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ═══ Фикс перекрытия кнопкой блока шагов ═══ */
#deck-screen .cream-card:last-of-type {
  padding-bottom: 120px !important;
  margin-bottom: 0 !important;
}
#deck-screen .deck-page-cta {
  position: sticky;
  bottom: 0;
  background: var(--burgundy-deep);
  padding: 12px 16px 28px;
  margin: 0 !important;
  z-index: 10;
}

/* ═══ Убираем лишний отступ в блоке шагов ═══ */
#deck-screen .cream-card:last-of-type {
  padding-bottom: 24px !important;
}

/* ═══════════════════════════════════════════
   ОНБОРДИНГ + ПЕЙВОЛ
   ═══════════════════════════════════════════ */

@keyframes obFloat {
  from { transform: translateY(0px) scale(1); }
  to   { transform: translateY(-20px) scale(1.05); }
}
@keyframes obFadeSlide {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes obCardIn {
  from { opacity:0; transform:scale(0.95); }
  to   { opacity:1; transform:scale(1); }
}
@keyframes obSlideUp {
  from { transform:translateY(100%); opacity:0; }
  to   { transform:translateY(0);    opacity:1; }
}
@keyframes obConfetti {
  0%   { transform:translateY(0) rotate(0deg);   opacity:1; }
  100% { transform:translateY(110vh) rotate(720deg); opacity:0; }
}

.ob-screen {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  box-sizing: border-box;
  background: #310811;
}
.ob-enter {
  animation: obFadeSlide 0.4s ease-out;
}
.ob-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 56px 0 40px;
  box-sizing: border-box;
}
.ob-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}
.ob-title {
  font-family: Georgia, serif;
  font-size: 26px;
  color: #F5ECD7;
  margin: 0 0 8px;
  line-height: 1.3;
}
.ob-sub {
  font-size: 15px;
  color: rgba(245,236,215,0.7);
  margin: 0;
  line-height: 1.5;
}

/* ── Onboarding animations ── */
@keyframes obFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}
@keyframes obFadeSlide {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes obCardIn {
  from { opacity:0; transform:scale(0.9) translateY(16px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}
@keyframes obConfetti {
  0%   { transform:translateY(0) rotate(0deg); opacity:1; }
  100% { transform:translateY(110vh) rotate(720deg); opacity:0; }
}

/* ── Кнопка избранного на карточке ── */
.fav-btn {
  background: none !important;
  border: none !important;
  padding: 4px !important;
  line-height: 1 !important;
  cursor: pointer;
}
.fav-btn:active {
  transform: scale(1.4) !important;
}

/* ── Сердечко на карточке вопроса ── */
.question-card-top > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.fav-btn {
  font-size: 26px !important;
  padding: 0 !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

/* ── position relative для карточки вопроса ── */
.question-card {
  position: relative !important;
}

/* ── Логотип Звена на карточке вопроса ── */
.question-icon-link {
  width: 52px !important;
  height: 52px !important;
  display: block;
  margin: 0 auto 4px;
}

/* ── Логотип в круге на карточке вопроса ── */
.question-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #3D0A14;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}
.question-icon-link {
  width: 36px !important;
  height: 36px !important;
  display: block;
}

/* ── Анимации карточек на экране демо онбординга ── */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateX(60px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
@keyframes cardSlideOutLeft {
  from { opacity: 1; transform: translateX(0)     scale(1); }
  to   { opacity: 0; transform: translateX(-70px) scale(0.95); }
}
@keyframes cardSlideOutRight {
  from { opacity: 1; transform: translateX(0)    scale(1); }
  to   { opacity: 0; transform: translateX(70px) scale(0.95); }
}

/* ── Screen4 card slide animations ── */
@keyframes ob4SlideIn {
  from { opacity: 0; transform: translateX(55px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
@keyframes ob4SlideLeft {
  from { opacity: 1; transform: translateX(0)     scale(1); }
  to   { opacity: 0; transform: translateX(-65px) scale(0.95); }
}
@keyframes ob4SlideRight {
  from { opacity: 1; transform: translateX(0)    scale(1); }
  to   { opacity: 0; transform: translateX(65px) scale(0.95); }
}

/* ── PWA screen logo wobble ── */
@keyframes sc9Wobble {
  0%, 100% { transform: rotate(-3deg); }
  50%       { transform: rotate(3deg); }
}
