/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Unbounded:wght@700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --brand-primary:   #6BBAD8;
  --brand-primary-dark: #4A98C0;
  --brand-teal:      #3ABAB4;
  --brand-blue:      #4A90D9;
  --gradient-btn:    linear-gradient(135deg, #6EC8E2 0%, #4A8FD9 50%, #9B82EE 100%);
  --gradient-btn-shadow: rgba(107,150,220,0.45);
  --brand-yellow:    #F5C842;
  --brand-green:     #42B97A;

  --bg:              transparent;
  --surface:         rgba(255,255,255,0.90);
  --surface-2:       rgba(255,255,255,0.80);
  --surface-3:       rgba(255,255,255,0.70);

  --text-dark:       #1C1917;
  --text-secondary:  #78716C;
  --text-hint:       #A8A29E;

  --border:          #E7E4DC;
  --border-strong:   #D4D0C8;

  --radius:          16px;
  --radius-sm:       10px;
  --radius-pill:     100px;

  --shadow-sm:  0 1px 3px rgba(28,25,23,0.08);
  --shadow-md:  0 4px 16px rgba(28,25,23,0.10);
  --shadow-lg:  0 8px 32px rgba(28,25,23,0.12);

  --safe-top:             env(safe-area-inset-top, 0px);
  --safe-bottom:          env(safe-area-inset-bottom, 16px);
  --tg-content-safe-top:  0px;
  --topbar-h:             42px;
  --bottomnav-h: 64px;

  /* legacy compat */
  --brand-accent:      var(--brand-teal);
  --glass:             rgba(255,255,255,0.70);
  --glass-strong:      rgba(255,255,255,0.95);
  --glass-border:      var(--border);
  --glass-shadow-card: var(--shadow-sm);
  --blur:              blur(0px);
  --blur-nav:          blur(0px);
  --card-radius:       var(--radius);
  --brand-bg:          var(--bg);
  --white:             #ffffff;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html { height: -webkit-fill-available; overflow: hidden; }

@keyframes bg-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: var(--text-dark);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ── Fixed hero photo background layer (top half only) ── */
#hero-photo-fixed {
  position: fixed;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: 56vh;
  min-height: 280px;
  max-height: 460px;
  object-fit: cover;
  object-position: center 20%;
  z-index: 0;
  display: none;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* ── Animated soft background ── */
#bg-anim {
  display: block;
  position: fixed;
  inset: -15% -5%;
  width: 110%;
  height: 130%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  will-change: transform;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.bg-blob-1 {
  width: 380px; height: 340px;
  background: radial-gradient(circle at 40% 40%, rgba(255,255,255,0.95), rgba(240,240,240,0.80));
  opacity: 0.70;
  top: -100px; left: -80px;
  animation: blobDrift1 16s ease-in-out infinite;
}
.bg-blob-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle at 60% 40%, rgba(255,255,255,0.90), rgba(245,245,245,0.75));
  opacity: 0.60;
  top: 10%; right: -100px;
  animation: blobDrift2 20s ease-in-out infinite;
}
.bg-blob-3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.88), rgba(238,238,238,0.70));
  opacity: 0.55;
  bottom: 30%; left: -60px;
  animation: blobDrift3 18s ease-in-out infinite;
}
.bg-blob-4 {
  width: 420px; height: 300px;
  background: radial-gradient(circle at 55% 55%, rgba(255,255,255,0.85), rgba(242,242,242,0.72));
  opacity: 0.50;
  bottom: -80px; right: -100px;
  animation: blobDrift4 22s ease-in-out infinite;
}
.bg-blob-5 {
  width: 340px; height: 300px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.90), rgba(248,248,248,0.76));
  opacity: 0.55;
  top: 46%; left: 10%;
  animation: blobDrift5 24s ease-in-out infinite;
}

@keyframes blobDrift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(40px,-30px) scale(1.06); }
  66%      { transform: translate(-20px,35px) scale(0.94); }
}
@keyframes blobDrift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(-50px,25px) scale(1.08); }
  66%      { transform: translate(30px,-40px) scale(0.93); }
}
@keyframes blobDrift3 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(35px,30px) scale(0.96); }
  66%      { transform: translate(-25px,-30px) scale(1.10); }
}
@keyframes blobDrift4 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(-35px,-20px) scale(1.05); }
  66%      { transform: translate(45px,25px) scale(0.92); }
}
@keyframes blobDrift5 {
  0%,100% { transform: translate(0,0) scale(1); }
  25%      { transform: translate(30px,-40px) scale(1.12); }
  50%      { transform: translate(-40px,20px) scale(0.90); }
  75%      { transform: translate(25px,35px) scale(1.07); }
}

.aurora, .geo-ring, .geo-dots { display: none; }

/* ── Abstract animated background blobs ── */
#bg-anim {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  background: #ffffff;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.55;
  will-change: transform;
}

.bg-blob-1 {
  width: 600px; height: 560px;
  background: radial-gradient(circle at 38% 38%, #d4edf8 0%, #a8d8f0 50%, #7bbcde 100%);
  opacity: 0.70;
  top: -180px; left: -140px;
  animation: blob-float-1 18s ease-in-out infinite;
}
.bg-blob-2 {
  width: 500px; height: 480px;
  background: radial-gradient(circle at 40% 36%, #e4d8fc 0%, #c8b8f4 50%, #a898e0 100%);
  opacity: 0.60;
  top: 5%; right: -150px;
  animation: blob-float-2 22s ease-in-out infinite;
}
.bg-blob-3 {
  width: 580px; height: 580px;
  background: radial-gradient(circle at 42% 40%, #c4edd8 0%, #90d4ae 50%, #60b888 100%);
  opacity: 0.55;
  top: 42%; left: -80px;
  animation: blob-float-3 26s ease-in-out infinite;
}
.bg-blob-4 {
  width: 520px; height: 480px;
  background: radial-gradient(circle at 40% 38%, #d4edc8 0%, #a8d890 50%, #80c068 100%);
  opacity: 0.50;
  bottom: -60px; right: -120px;
  animation: blob-float-4 20s ease-in-out infinite;
}
.bg-blob-5 {
  width: 460px; height: 440px;
  background: radial-gradient(circle at 40% 38%, #b8e8d0 0%, #80cca8 50%, #54b080 100%);
  opacity: 0.48;
  bottom: 10%; left: -100px;
  animation: blob-float-5 24s ease-in-out infinite;
}
.bg-blob-6 {
  width: 500px; height: 500px;
  background: radial-gradient(circle at 40% 38%, #dce8f8 0%, #b0cce8 50%, #88aed4 100%);
  opacity: 0.45;
  top: 50%; left: 30%;
  animation: blob-float-6 28s ease-in-out infinite;
}

@keyframes blob-float-1 {
  0%   { transform: translate(0px, 0px) scale(1); }
  25%  { transform: translate(50px, 70px) scale(1.07); }
  50%  { transform: translate(100px, 25px) scale(0.94); }
  75%  { transform: translate(25px, 90px) scale(1.04); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-float-2 {
  0%   { transform: translate(0px, 0px) scale(1); }
  30%  { transform: translate(-70px, 50px) scale(1.09); }
  60%  { transform: translate(-35px, 95px) scale(0.93); }
  80%  { transform: translate(-80px, 25px) scale(1.05); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-float-3 {
  0%   { transform: translate(0px, 0px) scale(1); }
  20%  { transform: translate(60px, -50px) scale(1.06); }
  50%  { transform: translate(-50px, 70px) scale(0.95); }
  75%  { transform: translate(70px, 35px) scale(1.04); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-float-4 {
  0%   { transform: translate(0px, 0px) scale(1); }
  33%  { transform: translate(-60px, -70px) scale(1.10); }
  66%  { transform: translate(50px, -35px) scale(0.91); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-float-5 {
  0%   { transform: translate(0px, 0px) scale(1); }
  40%  { transform: translate(70px, -60px) scale(1.08); }
  70%  { transform: translate(35px, -95px) scale(0.94); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-float-6 {
  0%   { transform: translate(0px, 0px) scale(1); }
  25%  { transform: translate(-80px, 50px) scale(1.07); }
  55%  { transform: translate(60px, 80px) scale(0.93); }
  80%  { transform: translate(-35px, -50px) scale(1.05); }
  100% { transform: translate(0px, 0px) scale(1); }
}

/* ── Topbar ── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0;
  height: calc(var(--safe-top) + var(--topbar-h));
  display: block;
  border-bottom: none;
  overflow: visible;
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

/* Transparent topbar when hero photo is at top */
#topbar.hero-mode {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
}
#topbar.hero-mode .topbar-logo {
  background: linear-gradient(90deg, #4AAAD8 0%, #C06ABE 52%, #8858D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.98)) drop-shadow(0 0 16px rgba(255,255,255,0.80));
}
#topbar.hero-mode #profile-btn {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
#topbar.hero-mode #topbar-back-btn {
  color: #fff;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}

#topbar-back-btn {
  position: absolute;
  left: 18px;
  top: calc(var(--safe-top) + 44px);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #e8f4fc 100%);
  border: 1px solid rgba(255,255,255,0.90);
  border-bottom-color: rgba(160,180,220,0.40);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow:
    0 8px 20px rgba(60,100,180,0.20),
    0 3px 6px rgba(0,0,0,0.10),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -2px 0 rgba(140,160,210,0.28);
  transition: opacity 0.2s ease, background 0.2s;
}
#topbar-back-btn.visible {
  opacity: 1;
  pointer-events: all;
}
#topbar-back-btn:active {
  background: linear-gradient(180deg, #f0f0f0 0%, #d8ecf8 100%);
}

.topbar-logo {
  font-family: 'Unbounded', -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1;
  position: absolute;
  top: calc(var(--safe-top) + 13px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #4AAAD8 0%, #C06ABE 52%, #8858D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.98)) drop-shadow(0 0 16px rgba(255,255,255,0.80));
}

.topbar-subtitle {
  display: none;
}

#profile-btn {
  position: absolute;
  right: 26px;
  top: calc(var(--safe-top) + 44px);
  bottom: auto;
  width: 38px; height: 38px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f4fc 100%);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.90);
  border-bottom-color: rgba(160,180,220,0.40);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 8px 20px rgba(60,100,180,0.20),
    0 3px 6px rgba(0,0,0,0.10),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -2px 0 rgba(140,160,210,0.28);
  -webkit-appearance: none;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

/* ── Hero photo (baby portrait at top of home) ── */
#hero-photo-wrap {
  position: relative;
  width: 100%;
  height: 56vh;
  min-height: 280px;
  max-height: 460px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

/* Fade-out element hidden — gradient handled by .home-content::before */
#hero-fade-out {
  display: none;
}
#hero-photo-el {
  /* Hidden — photo is now shown via #hero-photo-fixed */
  display: none !important;
}
#hero-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
}
.hero-ph-ring {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 2.5px dashed rgba(255,255,255,0.70);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
}
.hero-ph-text {
  font-size: 16px; font-weight: 700;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(0,0,0,0.15);
}
.hero-ph-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}
#hero-photo-grad {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(15,10,20,0.52) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#hero-photo-wrap.has-photo #hero-photo-grad {
  opacity: 1;
}
#hero-baby-info {
  position: absolute; bottom: 52px; left: 20px;
  color: #fff;
  pointer-events: none;
  will-change: transform, opacity;
}
#hero-baby-name {
  font-size: 24px; font-weight: 800;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  line-height: 1.15;
}
#hero-baby-age {
  font-size: 14px; font-weight: 500;
  opacity: 0.85;
  margin-top: 3px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
#hero-child-dots {
  display: none;
  flex-direction: row;
  gap: 6px;
  margin-top: 8px;
  pointer-events: all;
}
.hero-child-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-child-dot.active {
  background: #fff;
  transform: scale(1.25);
}
#hero-cam-btn {
  position: absolute; bottom: 52px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.40);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
#hero-cam-btn:active { transform: scale(0.93); background: rgba(255,255,255,0.35); }
#hero-cam-btn svg { width: 22px; height: 22px; color: #fff; }

/* ── AI Smart Mama floating action button — Liquid Glass ── */
@keyframes fab-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-3px); }
}
#ai-fab {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 20px);
  left: 12px; right: 12px;
  transform: none;
  z-index: 98;

  /* Liquid glass */
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.10);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.10);

  /* Border */
  border: 1px solid rgba(255,255,255,0.60);
  border-bottom-color: rgba(255,255,255,0.28);

  /* Shadow stack */
  box-shadow:
    0 8px 32px rgba(0,0,0,0.13),
    0 2px 8px rgba(0,0,0,0.07),
    inset 0 1.5px 0 rgba(255,255,255,0.90),
    inset 0 -1px 0 rgba(255,255,255,0.15);

  color: var(--text-dark);
  border-radius: 22px;
  padding: 13px 16px 13px 14px;
  font-size: 15px; font-weight: 700;
  font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.1px;
  animation: fab-float 3.5s ease-in-out infinite;
  transition: transform 0.15s ease, opacity 0.2s ease;
  width: auto;
}

/* Specular top shimmer */
#ai-fab::before {
  content: '';
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.95) 30%,
    rgba(255,255,255,0.95) 70%,
    transparent 100%);
  border-radius: 100px;
  pointer-events: none;
}

/* Inner glass refraction */
#ai-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.30) 0%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}

.ai-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: rgba(107,186,216,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(107,186,216,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70);
  color: var(--brand-primary);
  position: relative;
  z-index: 1;
}

.ai-fab-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: var(--text-dark);
  position: relative;
  z-index: 1;
  flex: 1;
}

.ai-fab-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: rgba(107,186,216,0.12);
  border: 1px solid rgba(107,186,216,0.20);
  border-radius: 50%;
  color: var(--brand-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60);
}

#ai-fab:active {
  transform: scale(0.97);
  animation: none;
}

#ai-fab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  animation: none;
}

/* ── Scroll fade — disabled ── */
#scroll-fade {
  display: none;
}

/* Floor behind the nav pills — transparent, white card covers it */
#nav-floor {
  display: none;
}

/* ── Bottom nav — two separate floating glass pills ── */

#bottom-nav {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 10px);
  left: 12px; right: 12px;
  z-index: 100;
  height: var(--bottomnav-h);
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* ── Shared pill mixin ── */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.2px;
  -webkit-appearance: none;
  border: none;
  position: relative;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;

  /* Liquid glass */
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(28px) saturate(180%) brightness(1.10);
  -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(1.10);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.80);
  border-bottom-color: rgba(200,210,230,0.45);
  box-shadow:
    0 12px 32px rgba(60,100,180,0.18),
    0 4px 10px rgba(0,0,0,0.10),
    0 1px 2px rgba(0,0,0,0.06),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -2px 0 rgba(140,160,210,0.28);
  overflow: hidden;
}

/* Specular top shimmer — glass highlight */
.nav-item::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 8px; right: 8px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.95) 25%,
    rgba(255,255,255,1) 50%,
    rgba(255,255,255,0.95) 75%,
    transparent 100%);
  border-radius: 100px;
  pointer-events: none;
  z-index: 10;
}

/* Inner glass refraction overlay */
.nav-item::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(170deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.00) 100%);
  pointer-events: none;
  z-index: 1;
}

.nav-item:active { transform: scale(0.93); }

/* ── Home pill — compact square ── */
.nav-item:not(.nav-ai-btn) {
  flex: 0 0 80px;
  color: #4A90B8;
  gap: 4px;
  padding: 8px 6px;
}
.nav-item .nav-ico {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  position: relative; z-index: 3;
  transition: background 0.2s, transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  /* glass icon well */
  background: linear-gradient(180deg, #ffffff 0%, #c8e8f8 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: #3D88B8;
  border: 1px solid rgba(210,130,175,0.50);
  border-bottom-color: rgba(160,130,200,0.40);
  box-shadow:
    0 8px 20px rgba(60,140,200,0.32),
    0 3px 6px rgba(0,0,0,0.12),
    0 1px 2px rgba(0,0,0,0.07),
    inset 0 2.5px 0 rgba(255,255,255,1),
    inset 0 -2.5px 0 rgba(100,130,200,0.32);
}
.nav-item .nav-ico svg { width: 22px; height: 22px; }
.nav-item span:last-child {
  position: relative; z-index: 3;
  font-size: 10px; font-weight: 700;
  background: linear-gradient(90deg, #3AAED8 0%, #D4A0C8 52%, #8B6FD0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-item.active:not(.nav-ai-btn) { color: #3878A8; }
.nav-item.active:not(.nav-ai-btn) .nav-ico {
  background: linear-gradient(180deg, #ffffff 0%, #c8e8f8 100%);
  color: #3D88B8;
  box-shadow:
    0 10px 24px rgba(60,140,200,0.36),
    0 4px 8px rgba(0,0,0,0.13),
    0 1px 2px rgba(0,0,0,0.07),
    inset 0 2.5px 0 rgba(255,255,255,1),
    inset 0 -2.5px 0 rgba(100,130,200,0.32);
  transform: scale(1.08);
  border-color: rgba(210,130,175,0.50);
  border-bottom-color: rgba(160,130,200,0.40);
}

/* ── AI Smart Mama pill — wide ── */
.nav-ai-btn {
  flex: 1;
  flex-direction: row;
  justify-content: flex-start;
  padding: 0 14px;
  gap: 12px;
  color: #4A90B8;
  /* inherits liquid glass from .nav-item */
}

.nav-ai-btn .nav-ico {
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #c8e8f8 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: #3D88B8;
  border: 1px solid rgba(210,130,175,0.50);
  border-bottom-color: rgba(160,130,200,0.40);
  box-shadow:
    0 8px 20px rgba(60,140,200,0.32),
    0 3px 6px rgba(0,0,0,0.12),
    0 1px 2px rgba(0,0,0,0.07),
    inset 0 2.5px 0 rgba(255,255,255,1),
    inset 0 -2.5px 0 rgba(100,130,200,0.32);
}

.nav-ai-label {
  flex: 1;
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(90deg, #4AAAD8 0%, #C06ABE 52%, #8858D0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.98)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.80));
  background-clip: text;
  text-align: left;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.nav-ai-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #e8d4f0 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  color: #9B6FD0;
  flex-shrink: 0;
  border: 1px solid rgba(210,130,175,0.60);
  box-shadow:
    0 5px 14px rgba(60,140,200,0.22),
    0 1px 3px rgba(0,0,0,0.08),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -2px 0 rgba(180,130,210,0.22);
}

.nav-ai-btn.active { color: #3878A8; }
.nav-ai-btn.active .nav-ai-label {
  background: linear-gradient(90deg, #3AAED8 0%, #6B90D0 55%, #8B6FC8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-ai-btn.active .nav-ico {
  background: linear-gradient(180deg, #ffffff 0%, #d4eef8 100%);
  color: #3D88B8;
  box-shadow:
    0 5px 14px rgba(60,140,200,0.28),
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -2px 0 rgba(100,150,200,0.22);
  transform: scale(1.08);
}
.nav-ai-btn:active { opacity: 0.85; transform: scale(0.97); }

/* ── Main content area ── */
#app {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 1;
  background: transparent;
}

/* ── Screens ── */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  background: #F5F3EE;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: calc(var(--safe-top) + var(--tg-content-safe-top) + var(--topbar-h) + 36px) 14px calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
  background: transparent;
}
.screen.active { display: block; animation: fadeIn 0.18s ease; }

/* ── Benefits screen: warm amber/gold background tint ── */
#bg-anim {
  transition: filter 0.5s ease, background 0.3s ease;
}
body.on-benefits #bg-anim {
  filter: none;
}
body.on-referral #bg-anim {
  filter: none;
}

/* ── Solid white background on all non-home screens ── */
body:not(.on-home) #bg-anim {
  background: #ffffff !important;
}
body:not(.on-home) .bg-blob {
  opacity: 0 !important;
  animation: none !important;
  transition: opacity 0.3s ease;
}

/* ── Bowling balls (all non-home screens) ── */
#bowl-balls {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
body:not(.on-home) #bowl-balls {
  display: block;
}

.bowl-ball {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

/* Finger holes via box-shadow dots */
.bowl-ball::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  box-shadow:
    0 0 0 0 transparent,
    10px -6px 0 2px rgba(0,0,0,0.22),
    18px  2px 0 2px rgba(0,0,0,0.22);
  width: 7px; height: 7px;
  top: 28%; left: 30%;
}

/* Ball 1 — deep purple */
.bowl-ball-1 {
  width: 90px; height: 90px;
  background: radial-gradient(circle at 35% 32%, #a87edc 0%, #6b3db5 45%, #3a1a7a 100%);
  box-shadow: inset -8px -8px 18px rgba(0,0,0,0.35), 0 6px 24px rgba(80,30,160,0.18);
  top: 8%; left: -30px;
  opacity: 0.55;
  animation: bowl-drift-1 20s ease-in-out infinite;
}
/* Ball 2 — midnight blue */
.bowl-ball-2 {
  width: 68px; height: 68px;
  background: radial-gradient(circle at 35% 32%, #6fa8dc 0%, #2455a0 45%, #0d1f52 100%);
  box-shadow: inset -6px -6px 14px rgba(0,0,0,0.35), 0 5px 20px rgba(20,50,140,0.18);
  top: 55%; right: -18px;
  opacity: 0.50;
  animation: bowl-drift-2 26s ease-in-out infinite;
}
.bowl-ball-2::after {
  width: 5px; height: 5px;
  top: 26%; left: 32%;
  box-shadow: 8px -5px 0 1.5px rgba(0,0,0,0.22), 14px 2px 0 1.5px rgba(0,0,0,0.22);
}
/* Ball 3 — forest green */
.bowl-ball-3 {
  width: 54px; height: 54px;
  background: radial-gradient(circle at 35% 32%, #7ddba8 0%, #1f8a56 45%, #0b3d24 100%);
  box-shadow: inset -5px -5px 12px rgba(0,0,0,0.35), 0 4px 16px rgba(15,90,50,0.18);
  bottom: 20%; left: 8%;
  opacity: 0.45;
  animation: bowl-drift-3 22s ease-in-out infinite;
}
.bowl-ball-3::after {
  width: 4px; height: 4px;
  top: 26%; left: 30%;
  box-shadow: 6px -4px 0 1px rgba(0,0,0,0.22), 11px 1px 0 1px rgba(0,0,0,0.22);
}
/* Ball 4 — burgundy */
.bowl-ball-4 {
  width: 76px; height: 76px;
  background: radial-gradient(circle at 35% 32%, #e08080 0%, #a02828 45%, #4a0a0a 100%);
  box-shadow: inset -7px -7px 16px rgba(0,0,0,0.35), 0 5px 22px rgba(120,20,20,0.18);
  bottom: 5%; right: 10%;
  opacity: 0.48;
  animation: bowl-drift-4 28s ease-in-out infinite;
}
.bowl-ball-4::after {
  width: 6px; height: 6px;
  top: 27%; left: 31%;
  box-shadow: 9px -5px 0 1.5px rgba(0,0,0,0.22), 16px 2px 0 1.5px rgba(0,0,0,0.22);
}
/* Ball 5 — charcoal small */
.bowl-ball-5 {
  width: 44px; height: 44px;
  background: radial-gradient(circle at 35% 32%, #888 0%, #3c3c3c 45%, #111 100%);
  box-shadow: inset -4px -4px 10px rgba(0,0,0,0.40), 0 3px 12px rgba(0,0,0,0.15);
  top: 30%; right: 12%;
  opacity: 0.38;
  animation: bowl-drift-5 18s ease-in-out infinite;
}
.bowl-ball-5::after {
  width: 3px; height: 3px;
  top: 26%; left: 30%;
  box-shadow: 5px -3px 0 1px rgba(255,255,255,0.18), 9px 1px 0 1px rgba(255,255,255,0.18);
}

/* Animations — slow organic drift */
@keyframes bowl-drift-1 {
  0%,100% { transform: translate(0px, 0px) rotate(0deg); }
  25%      { transform: translate(22px, 40px) rotate(25deg); }
  50%      { transform: translate(45px, 15px) rotate(55deg); }
  75%      { transform: translate(15px, 55px) rotate(80deg); }
}
@keyframes bowl-drift-2 {
  0%,100% { transform: translate(0px, 0px) rotate(0deg); }
  30%      { transform: translate(-28px, -35px) rotate(-30deg); }
  60%      { transform: translate(-10px, -60px) rotate(-65deg); }
  80%      { transform: translate(-38px, -25px) rotate(-90deg); }
}
@keyframes bowl-drift-3 {
  0%,100% { transform: translate(0px, 0px) rotate(0deg); }
  33%      { transform: translate(30px, -25px) rotate(40deg); }
  66%      { transform: translate(-15px, -45px) rotate(85deg); }
}
@keyframes bowl-drift-4 {
  0%,100% { transform: translate(0px, 0px) rotate(0deg); }
  25%      { transform: translate(-25px, -30px) rotate(-20deg); }
  50%      { transform: translate(-50px, -10px) rotate(-50deg); }
  75%      { transform: translate(-20px, -45px) rotate(-75deg); }
}
@keyframes bowl-drift-5 {
  0%,100% { transform: translate(0px, 0px) rotate(0deg); }
  40%      { transform: translate(-20px, 28px) rotate(50deg); }
  70%      { transform: translate(15px, 40px) rotate(100deg); }
}
#screen-referral {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Referral hero ── */
.ref-hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #F3EEFF 0%, #EAE0FF 100%);
  border: 1.5px solid rgba(160,110,240,0.22);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(140,100,220,0.12);
}
.ref-hero-left { flex: 1; }
.ref-hero-title {
  font-size: 20px; font-weight: 800;
  color: #2D2040; letter-spacing: -0.4px;
  line-height: 1.2; margin-bottom: 5px;
}
.ref-hero-sub {
  font-size: 13px; line-height: 1.5;
  color: #6A4A90; font-weight: 500;
}
.ref-hero-ico { font-size: 46px; margin-left: 12px; }

/* ── Referral stats ── */
.ref-stats-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.ref-stat {
  flex: 1;
  background: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(160,110,240,0.18);
  border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center;
  box-shadow: 0 2px 8px rgba(140,100,220,0.08);
}
.ref-stat-ico { font-size: 20px; margin-bottom: 4px; }
.ref-stat-val {
  font-size: 26px; font-weight: 800;
  color: var(--text-dark); font-family: 'Unbounded', sans-serif;
}
.ref-stat-val--status { font-size: 14px; font-weight: 800; color: #7040C0; }
.ref-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.ref-stat--status { background: rgba(240,233,255,0.90); border-color: rgba(140,100,220,0.28); }

/* ── Amb cards redesign ── */
.amb-card {
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.amb-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.amb-badge-wrap {
  width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.amb-badge-wrap--1 { background: linear-gradient(135deg, #FFE8F4 0%, #FFD0E8 100%); }
.amb-badge-wrap--2 { background: linear-gradient(135deg, #FFF8D6 0%, #FFE89A 100%); }
.amb-badge-wrap--3 { background: linear-gradient(135deg, #EEE8FF 0%, #D8C8FF 100%); }

.amb-card.level-1 {
  background: linear-gradient(135deg, #FFF8FC 0%, #FFE8F4 100%);
  border-color: rgba(230,100,160,0.22);
}
.amb-card.level-2 {
  background: linear-gradient(135deg, #FFFDF0 0%, #FFF5CC 100%);
  border-color: rgba(210,160,30,0.22);
}
.amb-card.level-3 {
  background: linear-gradient(135deg, #F6F0FF 0%, #EAE0FF 100%);
  border-color: rgba(120,80,200,0.22);
}
.amb-badge  { font-size: 24px; margin-bottom: 5px; }
.amb-title  { font-size: 15px; font-weight: 800; margin-bottom: 3px; color: var(--text-dark); }
.amb-req    { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.amb-rewards { font-size: 13px; color: var(--text-dark); list-style: none; padding: 0; margin: 0; }
.amb-rewards li {
  padding: 3px 0 3px 16px; position: relative;
}
.amb-rewards li::before {
  content: '✓'; position: absolute; left: 0;
  font-size: 11px; font-weight: 800;
}
.amb-card.level-1 .amb-rewards li::before { color: #D4588A; }
.amb-card.level-2 .amb-rewards li::before { color: #B8860A; }
.amb-card.level-3 .amb-rewards li::before { color: #7040C0; }

/* ── Promo hint ── */
.ref-promo-hint {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(160,110,240,0.09);
  border: 1px solid rgba(140,90,220,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
  color: #5A3090; font-weight: 500;
  margin-bottom: 14px;
}
.ref-promo-hint span { flex-shrink: 0; font-size: 15px; }

/* ── Share/copy buttons ── */
.ref-share-btn {
  background: linear-gradient(135deg, #B07EF0 0%, #8B5CE8 50%, #6B3ED8 100%) !important;
  box-shadow: 0 4px 14px rgba(120,80,220,0.38) !important;
}
.ref-copy-btn {
  display: block; width: 100%;
  padding: 13px 18px;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: -0.3px;
  text-align: center; cursor: pointer;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.90);
  border: 2px solid #8B5CE8;
  border-radius: var(--radius-pill);
  color: #6B3ED8;
  box-shadow: 0 2px 10px rgba(120,80,200,0.18);
  transition: transform 0.10s, opacity 0.10s;
}
.ref-copy-btn:active { transform: scale(0.97); opacity: 0.85; }

#screen-benefits {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Pricing screen themed background ── */
body.on-pricing #bg-anim {
  filter: none;
}
#screen-pricing {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Pricing screen: card colour accents ── */
body.on-pricing .price-card.start-c {
  border-color: rgba(90,150,240,0.50) !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.94) 0%, rgba(220,235,255,0.88) 100%);
}
body.on-pricing .price-card.start-c .price-card-badge {
  background: linear-gradient(135deg, #6BAEF0 0%, #4B8FE0 100%);
}
body.on-pricing .price-card.prem-c {
  border-color: rgba(110,80,230,0.55) !important;
  border-width: 2px !important;
  background: linear-gradient(145deg, rgba(255,255,255,0.94) 0%, rgba(230,220,255,0.88) 100%);
}
body.on-pricing .price-card.prem-c .price-card-badge {
  background: linear-gradient(135deg, #9060E8 0%, #6B3ED8 100%);
}
body.on-pricing .price-card.free-c {
  background: rgba(255,255,255,0.82);
}

/* ── Period toggle themed ── */
body.on-pricing .period-toggle {
  background: rgba(255,255,255,0.55);
  border-color: rgba(100,120,255,0.20);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.on-pricing .period-btn.active {
  background: rgba(255,255,255,0.90);
  color: #4B6ED8;
  box-shadow: 0 2px 8px rgba(80,100,240,0.18);
}
body.on-pricing .period-badge {
  background: #6B5CE8;
}

/* ── Pricing buttons themed ── */
body.on-pricing .price-btn.starter-btn {
  background: linear-gradient(135deg, #70AFEF 0%, #4B8FE0 50%, #3568CF 100%);
  box-shadow: 0 6px 20px rgba(70,120,220,0.40), 0 3px 8px rgba(70,120,220,0.22) !important;
}
body.on-pricing .price-btn.prem-btn {
  background: linear-gradient(135deg, #A070EF 0%, #7B50E0 50%, #5B30D0 100%);
  box-shadow: 0 6px 20px rgba(100,70,220,0.42), 0 3px 8px rgba(100,70,220,0.24) !important;
}

/* ── Sounds screen themed background ── */
body.on-sounds #bg-anim {
  filter: none;
}
#screen-sounds {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Sounds: card tint ── */
body.on-sounds .sound-card {
  background: linear-gradient(145deg, rgba(240,252,255,0.95) 0%, rgba(210,240,252,0.88) 100%);
  border-color: rgba(60,170,200,0.30) !important;
  box-shadow:
    0 7px 24px rgba(40,140,180,0.14),
    0 2px 7px rgba(40,140,180,0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
}
body.on-sounds .sound-card.playing {
  border-color: rgba(40,180,175,0.70) !important;
  background: linear-gradient(145deg, rgba(210,252,250,0.96) 0%, rgba(170,238,234,0.88) 100%);
  box-shadow:
    0 7px 24px rgba(40,180,175,0.28),
    0 2px 7px rgba(40,180,175,0.15),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
}

/* ── Sounds: category labels ── */
body.on-sounds .section-label {
  color: rgba(30,110,140,0.70);
}

/* ── Sounds: timer chips ── */
body.on-sounds .sounds-timer-chip.active {
  background: linear-gradient(135deg, #5BC8D8 0%, #3ABAB4 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(58,186,180,0.35);
}

/* ── Sounds: mini-player bar ── */
body.on-sounds .sounds-mini-bar {
  background: linear-gradient(135deg, rgba(200,242,248,0.95) 0%, rgba(170,226,236,0.90) 100%);
  border-color: rgba(60,170,200,0.35);
}

/* ── Diary screen themed background ── */
body.on-diary #bg-anim {
  filter: none;
}
#screen-diary {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Diary: hero card rose-pink ── */
body.on-diary .diary-hero {
  background: linear-gradient(135deg, rgba(255,220,230,0.95) 0%, rgba(250,200,218,0.90) 50%, rgba(245,210,230,0.87) 100%);
  border-color: rgba(210,120,150,0.28);
  box-shadow: 0 4px 18px rgba(200,100,135,0.16), inset 0 1.5px 0 rgba(255,255,255,0.90);
}
body.on-diary .diary-stat-pill {
  background: rgba(255,255,255,0.85);
  border-color: rgba(210,120,150,0.28);
  color: #8B3055;
}

/* ── Diary: segment control ── */
body.on-diary .diary-segment {
  background: rgba(255,240,248,0.80);
  border-color: rgba(210,120,150,0.26);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.on-diary .diary-seg.active {
  background: linear-gradient(135deg, #E8758A 0%, #D4566A 50%, #C04060 100%);
  box-shadow: 0 3px 12px rgba(200,80,110,0.38);
}

/* ── Diary: filter tabs ── */
body.on-diary .diary-tab {
  background: linear-gradient(145deg, rgba(255,235,242,0.96) 0%, rgba(255,218,232,0.90) 100%);
  border-color: rgba(210,120,150,0.30);
  color: #8B3055;
}
body.on-diary .diary-tab.active {
  background: linear-gradient(135deg, #E8758A 0%, #D4566A 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(200,80,110,0.35);
}

/* ── Diary: timeline items ── */
body.on-diary .diary-tl-item {
  background: linear-gradient(145deg, rgba(255,238,246,0.96) 0%, rgba(255,220,236,0.88) 100%);
  border-color: rgba(210,120,150,0.22);
  box-shadow: 0 3px 12px rgba(190,90,120,0.10), inset 0 1px 0 rgba(255,255,255,0.90);
}

/* ── Diary: doc items ── */
body.on-diary .doc-item {
  background: linear-gradient(145deg, rgba(255,238,246,0.96) 0%, rgba(255,220,236,0.88) 100%);
  border-color: rgba(210,120,150,0.24);
  box-shadow: 0 3px 10px rgba(190,90,120,0.09);
}
body.on-diary .doc-item:active {
  background: rgba(240,185,210,0.50);
}

/* ── Diary: FAB button ── */
body.on-diary .diary-fab {
  background: linear-gradient(135deg, #E8758A 0%, #D4566A 50%, #C04060 100%);
  box-shadow:
    0 8px 24px rgba(200,80,110,0.42),
    0 3px 8px rgba(200,80,110,0.22),
    inset 0 1.5px 0 rgba(255,255,255,0.28);
}

/* ── Feed screen themed background ── */
body.on-feed #bg-anim {
  filter: none;
}
#screen-feed {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Feed: hero card richer teal ── */
body.on-feed .feed-hero {
  background: linear-gradient(135deg,
    rgba(60,200,185,0.30) 0%,
    rgba(70,190,210,0.24) 50%,
    rgba(80,170,220,0.18) 100%);
  box-shadow:
    0 10px 34px rgba(50,185,170,0.26),
    0 3px 10px rgba(50,185,170,0.14),
    inset 0 1.5px 0 rgba(255,255,255,0.85);
}

/* ── Feed: quick buttons ── */
body.on-feed .feed-quick-btn {
  background: linear-gradient(145deg, rgba(228,252,248,0.96) 0%, rgba(200,244,238,0.90) 100%);
  border-color: rgba(50,190,170,0.30) !important;
  box-shadow:
    0 4px 14px rgba(40,180,160,0.14),
    0 1px 3px rgba(40,180,160,0.07),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
}
body.on-feed .feed-quick-btn span:last-child {
  color: #1A6E62;
}

/* ── Feed: norm cards ── */
body.on-feed .feed-norm-card {
  background: linear-gradient(145deg, rgba(220,250,246,0.95) 0%, rgba(195,242,236,0.88) 100%);
  border-color: rgba(50,190,170,0.30) !important;
  box-shadow:
    0 4px 14px rgba(40,180,160,0.14),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
}
body.on-feed .feed-norm-card-val {
  color: #1A7A6E;
}

/* ── Feed: form card ── */
body.on-feed .form-card {
  background: rgba(220,250,246,0.92);
  border-color: rgba(50,190,170,0.24) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ── Feed: section label ── */
body.on-feed .section-label,
body.on-feed .feed-quick-label {
  color: rgba(30,130,115,0.70);
}

/* ── Sleep screen themed background ── */
body.on-sleep #bg-anim {
  filter: none;
}
#screen-sleep {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Sleep: hero card deeper night tones ── */
body.on-sleep .sleep-hero {
  background: linear-gradient(135deg,
    rgba(100,80,200,0.28) 0%,
    rgba(80,60,180,0.22)  50%,
    rgba(60,80,210,0.18)  100%);
  box-shadow:
    0 10px 36px rgba(80,60,200,0.28),
    0 3px 10px rgba(80,60,200,0.16),
    inset 0 1.5px 0 rgba(255,255,255,0.80);
}

/* ── Sleep: norm cards ── */
body.on-sleep .sleep-norm-card {
  background: linear-gradient(145deg, rgba(230,225,255,0.94) 0%, rgba(210,200,250,0.88) 100%);
  border-color: rgba(100,80,200,0.28) !important;
  box-shadow:
    0 4px 14px rgba(80,60,200,0.14),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
}
body.on-sleep .sleep-norm-card-val {
  color: #5040B0;
}

/* ── Sleep: form card ── */
body.on-sleep .form-card {
  background: rgba(228,222,255,0.92);
  border-color: rgba(100,80,200,0.22) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ── Sleep: section label ── */
body.on-sleep .section-label {
  color: rgba(80,60,180,0.65);
}

/* ── Sleep: start button stronger night gradient ── */
body.on-sleep .sleep-start-btn {
  background: linear-gradient(135deg,
    rgba(110,85,230,0.65) 0%,
    rgba(85,65,210,0.58)  50%,
    rgba(65,80,225,0.52)  100%);
  box-shadow:
    0 10px 36px rgba(90,70,220,0.46),
    0 4px 12px rgba(90,70,220,0.26),
    inset 0 1.5px 0 rgba(255,255,255,0.65),
    inset 0 -2px 0 rgba(0,0,0,0.12);
}

/* ── Sleep: wake button ── */
body.on-sleep .sleep-wake-btn {
  background: linear-gradient(135deg, rgba(110,85,230,0.18) 0%, rgba(85,65,210,0.12) 100%);
  border-color: rgba(100,80,200,0.30);
  color: #5040B0;
}

/* ── Neuro photo screen themed background ── */
body.on-neuro #bg-anim {
  filter: none;
}
#screen-neuro {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── Neuro: style buttons ── */
body.on-neuro .neuro-style-btn {
  background: linear-gradient(145deg, rgba(248,240,255,0.96) 0%, rgba(230,215,252,0.90) 100%) !important;
  border-color: rgba(160,100,230,0.28) !important;
  box-shadow:
    0 3px 10px rgba(140,80,220,0.13),
    inset 0 1.5px 0 rgba(255,255,255,0.95) !important;
}
body.on-neuro .neuro-style-btn.selected {
  background: linear-gradient(135deg, rgba(200,140,255,0.42) 0%, rgba(160,100,240,0.36) 100%) !important;
  border-color: rgba(160,100,230,0.70) !important;
  box-shadow:
    0 5px 18px rgba(160,100,240,0.35),
    inset 0 1.5px 0 rgba(255,255,255,0.90) !important;
}

/* ── Neuro: section label ── */
body.on-neuro .neuro-sec-label {
  color: rgba(110,60,180,0.65);
}

/* ── Neuro: upload card ── */
body.on-neuro .neuro-upload-card {
  background: linear-gradient(145deg, rgba(245,238,255,0.96) 0%, rgba(228,210,255,0.88) 100%);
  border-color: rgba(160,100,230,0.40);
  box-shadow: 0 4px 16px rgba(140,80,220,0.14), inset 0 1.5px 0 rgba(255,255,255,0.85);
}

/* ── Neuro: create button (enhance the existing gradient) ── */
body.on-neuro .btn-neuro-create:not(:disabled) {
  background: linear-gradient(135deg, #C070FF 0%, #8B40E8 45%, #6020D0 100%);
  box-shadow:
    0 10px 30px rgba(140,64,232,0.45),
    0 4px 12px rgba(140,64,232,0.25),
    inset 0 1.5px 0 rgba(255,255,255,0.25);
}

/* ── Workout screen themed background ── */
body.on-workout #bg-anim {
  filter: none;
}
#screen-workout {
  background: transparent;
}
body.on-workout #screen-workout {
  background: transparent !important;
}

/* ── Workout: chips ── */
body.on-workout .chip {
  background: linear-gradient(145deg, rgba(255,232,242,0.96) 0%, rgba(248,210,230,0.90) 100%) !important;
  border-color: rgba(220,100,160,0.35) !important;
  color: #9B3470 !important;
  box-shadow:
    0 4px 14px rgba(200,80,140,0.14),
    0 1px 4px rgba(200,80,140,0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.85) !important;
}

/* ── Workout: user messages ── */
body.on-workout .msg.user {
  background: linear-gradient(135deg, #F4A0C0 0%, #C084E8 100%);
  box-shadow: 0 3px 12px rgba(200,100,200,0.35);
}

/* ── Workout: AI messages ── */
body.on-workout .msg.ai {
  background: rgba(255,240,248,0.94);
  border-color: rgba(220,140,190,0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Workout: chat input bar ── */
body.on-workout .chat-bar {
  background: rgba(255,240,250,0.92);
  border-top-color: rgba(220,140,190,0.30);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.on-workout .chat-bar textarea {
  background: rgba(255,255,255,0.75);
  border-color: rgba(220,140,190,0.35);
}
body.on-workout .chat-bar textarea:focus {
  border-color: #C084E8;
}
body.on-workout .btn-send {
  background: linear-gradient(135deg, #F4A0C0 0%, #C084E8 100%);
  box-shadow: 0 3px 12px rgba(192,132,232,0.40);
}

/* ── YouTube video card in workout chat ── */
.yt-video-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(220,140,190,0.30);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 4px 0 8px 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(200,100,190,0.12);
  max-width: 88%;
}
.yt-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF3D00 0%, #FF8A65 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.yt-thumb-emoji {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 2px;
}
.yt-play-btn {
  font-size: 10px;
  color: rgba(255,255,255,0.9);
  background: rgba(255,0,0,0.7);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.yt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.yt-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-channel {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.yt-watch-btn {
  display: inline-block;
  background: linear-gradient(135deg, #FF3D00 0%, #FF6E40 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  align-self: flex-start;
  letter-spacing: 0.2px;
}
.yt-watch-btn:active { opacity: 0.85; transform: scale(0.97); }

/* ── КБЖУ screen themed background ── */
body.on-kbzhu #bg-anim {
  filter: none;
}
#screen-kbzhu {
  background: transparent;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
}

/* ── КБЖУ: calorie card ── */
body.on-kbzhu .kbzhu-cal-card {
  background: linear-gradient(135deg, rgba(230,252,235,0.96) 0%, rgba(200,245,215,0.90) 100%);
  border-color: rgba(50,180,100,0.28);
  box-shadow: 0 4px 16px rgba(40,160,90,0.12), inset 0 1.5px 0 rgba(255,255,255,0.80);
}

/* ── КБЖУ: macro cards ── */
body.on-kbzhu .kbzhu-prot {
  background: linear-gradient(145deg, #e2f9ec 0%, #c8f0d8 100%);
  border-color: rgba(40,180,100,0.35);
  box-shadow: 0 3px 10px rgba(40,180,100,0.12);
}
body.on-kbzhu .kbzhu-fat {
  background: linear-gradient(145deg, #fff5e0 0%, #ffe8b8 100%);
  border-color: rgba(240,165,40,0.38);
  box-shadow: 0 3px 10px rgba(240,165,40,0.12);
}
body.on-kbzhu .kbzhu-carb {
  background: linear-gradient(145deg, #eaf2ff 0%, #d0e4ff 100%);
  border-color: rgba(70,130,220,0.30);
  box-shadow: 0 3px 10px rgba(70,130,220,0.10);
}

/* ── КБЖУ: form-card and meal items ── */
body.on-kbzhu .form-card {
  background: rgba(240,252,244,0.94);
  border-color: rgba(60,180,100,0.25) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.on-kbzhu .kbzhu-meal-item {
  background: linear-gradient(145deg, rgba(235,252,240,0.96) 0%, rgba(215,246,228,0.90) 100%);
  border-color: rgba(50,180,100,0.22);
}

/* ── Home screen: hero extends under topbar ── */
#screen-home {
  padding: 0;
  background: transparent;
}
.home-content {
  padding: 20px 14px calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 28px 28px 0 0;
  position: relative;
  z-index: 3;
  margin-top: -32px;
  box-shadow: 0 -6px 32px rgba(0,0,0,0.10);
  min-height: 100%;
  overflow: hidden;
}

/* Animated soft aura blobs inside the white card */
.home-content::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(107,186,216,0.12), rgba(245,200,66,0.08) 60%, transparent 100%);
  animation: hc-blob-a 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.home-content::after {
  content: '';
  position: absolute;
  bottom: 120px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 60%, rgba(58,186,180,0.10), rgba(74,144,217,0.07) 60%, transparent 100%);
  animation: hc-blob-b 16s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes hc-blob-a {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  33%      { transform: translate(-30px, 40px) scale(1.15); opacity: 0.8; }
  66%      { transform: translate(20px, -20px) scale(0.90); opacity: 1; }
}
@keyframes hc-blob-b {
  0%,100% { transform: translate(0,0) scale(1); opacity: 1; }
  40%      { transform: translate(50px, -30px) scale(1.12); opacity: 0.7; }
  70%      { transform: translate(20px, 30px) scale(0.92); opacity: 0.9; }
}

/* Floating sparkle dots */
.home-content .hc-spark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.home-content .hc-spark-1 {
  width: 6px; height: 6px;
  background: rgba(107,186,216,0.30);
  top: 60px; right: 30px;
  animation: spark-float 8s ease-in-out infinite;
}
.home-content .hc-spark-2 {
  width: 4px; height: 4px;
  background: rgba(58,186,180,0.35);
  top: 140px; left: 20px;
  animation: spark-float 11s ease-in-out infinite 2s;
}
.home-content .hc-spark-3 {
  width: 5px; height: 5px;
  background: rgba(155,127,212,0.28);
  top: 40px; left: 50%;
  animation: spark-float 9s ease-in-out infinite 1s;
}
.home-content .hc-spark-4 {
  width: 3px; height: 3px;
  background: rgba(245,200,66,0.40);
  top: 200px; right: 60px;
  animation: spark-float 13s ease-in-out infinite 3s;
}
.home-content .hc-spark-5 {
  width: 5px; height: 5px;
  background: rgba(66,185,122,0.28);
  top: 180px; left: 40%;
  animation: spark-float 10s ease-in-out infinite 1.5s;
}

@keyframes spark-float {
  0%,100% { transform: translateY(0px) scale(1); opacity: 0.7; }
  30%      { transform: translateY(-14px) scale(1.3); opacity: 1; }
  60%      { transform: translateY(-6px) scale(0.8); opacity: 0.5; }
  80%      { transform: translateY(-18px) scale(1.1); opacity: 0.9; }
}

/* Ensure content is above the animated layers */
.home-content > * {
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Section titles ── */
.sec-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-hint);
  margin: 20px 0 10px 16px;
}

/* ── Tiles grid ── */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

/* ── Tiles ── */
.tile {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 18px rgba(28,25,23,0.10), 0 1px 4px rgba(28,25,23,0.06), inset 0 1px 0 rgba(255,255,255,0.95);
  padding: 14px 12px 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.10s ease, box-shadow 0.10s ease;
  -webkit-user-select: none; user-select: none;
}
/* Glass sheen overlay */
.tile::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tile:active {
  transform: scale(0.97);
  box-shadow: 0 1px 6px rgba(28,25,23,0.08);
}

.tile-full {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.tile-top {
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.tile-top.tile-pi-b { background: var(--brand-primary); }
.tile-top.tile-ac-b { background: var(--brand-teal); }
.tile-top.tile-dr-b { background: var(--brand-blue); }
.tile-top.tile-fd-b { background: #F59E42; }
.tile-top.tile-gr-b { background: var(--brand-green); }

.tile-ico {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 8px; margin-top: 6px;
}
.tile-ico.tile-pi { background: rgba(107,186,216,0.12); }
.tile-ico.tile-ac { background: rgba(58,186,180,0.12); }
.tile-ico.tile-dr { background: rgba(74,144,217,0.12); }
.tile-ico.tile-fd { background: rgba(245,158,66,0.12); }
.tile-ico.tile-gr { background: rgba(66,185,122,0.12); }

.tile-name { font-size: 12px; font-weight: 700; color: var(--text-dark); font-family: 'Unbounded', sans-serif; letter-spacing: -0.3px; }
.tile-sub  { font-size: 11px; color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.tile-stat {
  position: absolute; top: 14px; right: 12px;
  font-size: 18px; font-weight: 800; color: var(--text-dark);
}
.tile-full .tile-ico { margin-bottom: 0; margin-top: 0; width: 46px; height: 46px; }
.tile-full .tile-text { flex: 1; }

/* ── Banners shared ── */
.ai-banner, .neuro-banner, .moms-chat-banner, .price-banner,
.ref-home-banner, .sounds-home-banner {
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.10s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  -webkit-user-select: none; user-select: none;
  border: 1px solid rgba(255,255,255,0.80);
  box-shadow: 0 4px 18px rgba(28,25,23,0.10), inset 0 1px 0 rgba(255,255,255,0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.ai-banner::after, .neuro-banner::after, .moms-chat-banner::after,
.price-banner::after, .ref-home-banner::after, .sounds-home-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.ai-banner:active, .neuro-banner:active, .moms-chat-banner:active,
.price-banner:active, .ref-home-banner:active, .sounds-home-banner:active {
  transform: scale(0.98);
}

.ai-banner {
  background: linear-gradient(135deg, #FEF3EE 0%, #FDEBE0 100%);
  margin-top: 6px;
  border-color: rgba(107,186,216,0.25);
}
.ai-banner .banner-ico {
  width: 46px; height: 46px;
  background: rgba(107,186,216,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.ai-banner .banner-text { flex: 1; min-width: 0; }
.ai-banner .banner-title { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.ai-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.banner-arrow { font-size: 18px; color: var(--text-secondary); flex-shrink: 0; }

.neuro-banner {
  background: linear-gradient(135deg, #F0F4FF 0%, #E4ECFF 100%);
  border-color: rgba(74,144,217,0.25);
}
.neuro-banner .banner-ico {
  background: rgba(74,144,217,0.15); border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.neuro-banner .banner-title { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.neuro-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.moms-chat-banner {
  background: linear-gradient(135deg, #EDFAF8 0%, #DCFAF6 100%);
  border-color: rgba(58,186,180,0.25);
}
.moms-chat-banner .banner-ico {
  background: rgba(58,186,180,0.15); border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.moms-chat-banner .banner-title { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.moms-chat-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.price-banner {
  background: linear-gradient(135deg, #F0F7FF 0%, #E0EDFF 100%);
  border-color: rgba(74,144,217,0.25);
}
.price-banner .banner-title { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.price-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.price-banner .banner-ico {
  width: 42px; height: 42px;
  background: rgba(74,144,217,0.15);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.ref-home-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FFF3C4 100%);
  border-color: rgba(245,200,66,0.35);
}
.ref-home-banner .banner-title { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.ref-home-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ref-home-banner .banner-ico   { font-size: 26px; flex-shrink: 0; }

.sounds-home-banner {
  background: linear-gradient(135deg, #EDFAF8 0%, #D8F5F2 100%);
  border-color: rgba(58,186,180,0.25);
}
.sounds-home-banner .banner-title { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.sounds-home-banner .banner-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.sounds-home-banner .banner-ico {
  background: rgba(58,186,180,0.15); border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

/* ── Category chips / quick actions ── */
.ai-caps, .chips-scroll {
  display: flex; gap: 7px;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 0 10px; margin-top: 10px; margin-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ai-caps::-webkit-scrollbar, .chips-scroll::-webkit-scrollbar { display: none; }

.ai-cap, .chip {
  white-space: nowrap;
  flex-shrink: 0;
  overflow: visible;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
  min-height: 36px;
  display: inline-flex; align-items: center;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ai-cap:active, .chip:active {
  transform: scale(0.95);
  background: var(--surface-3);
}

/* ── Chat screens ── */
.chat-screen { overflow: hidden; padding: 0; background: #ffffff; }
.screen.chat-screen.active {
  display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + var(--tg-content-safe-top) + var(--topbar-h) + 22px) 14px calc(var(--bottomnav-h) + var(--safe-bottom) + 10px);
  overflow: hidden;
}

.chat-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0 10px; flex-shrink: 0;
}
.chat-hdr.pink, .chat-hdr.green, .chat-hdr.teal, .chat-hdr.lav {
  background: var(--surface-2);
  margin: 0 -14px; padding: 12px 14px;
  border-radius: 0 0 var(--radius) var(--radius);
  border-bottom: 1px solid var(--border);
}

.chat-hdr-ico   { font-size: 24px; }
.chat-hdr-title { font-family: 'Unbounded', -apple-system, sans-serif; font-size: 15px; font-weight: 700; flex: 1; letter-spacing: -0.2px; }
.chat-hdr-sub   { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.back-btn {
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text-dark); padding: 4px 6px;
  min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none;
}

.msgs-area {
  flex: 1;
  overflow-y: auto; overflow-x: hidden;
  padding: 12px 0 8px;
  display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px; line-height: 1.55;
  word-break: break-word; hyphens: auto;
}
.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #ADE8F4 0%, #F9A8C9 33%, #C9A0DC 66%, #8B6FD0 100%);
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 2px 8px rgba(139,111,208,0.30);
}
.msg.ai {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-bottom-left-radius: 5px;
}

.msg.ai p {
  margin: 0 0 6px;
}
.msg.ai p:last-child { margin-bottom: 0; }

.msg.ai strong {
  font-weight: 600;
  color: var(--text-dark);
}
.msg.ai em {
  font-style: italic;
}

.msg.ai ol,
.msg.ai ul {
  margin: 4px 0 6px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg.ai ol { list-style: decimal; }
.msg.ai ul { list-style: disc; }

.msg.ai li {
  line-height: 1.5;
  padding-left: 2px;
}
.msg.ai li strong {
  font-weight: 600;
}

.msg.typing { opacity: 0.6; font-style: italic; }

.chat-bar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 0 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-bar textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 10px 14px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 16px;
  resize: none;
  max-height: 100px;
  background: var(--surface);
  color: var(--text-dark);
  outline: none; line-height: 1.4;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.chat-bar textarea:focus { border-color: var(--brand-primary); }

.chat-btn {
  width: 44px; height: 44px;
  border-radius: 50%; border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: transform 0.12s; flex-shrink: 0;
  -webkit-appearance: none;
}
.chat-btn:active { transform: scale(0.88); }
.btn-send {
  background: linear-gradient(135deg, #ADE8F4 0%, #F9A8C9 33%, #C9A0DC 66%, #8B6FD0 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(139,111,208,0.35);
}
.btn-cam {
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-mic {
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 20px;
}
.btn-mic.recording {
  background: #FF4B4B;
  color: #fff;
  border: none;
  box-shadow: 0 0 0 3px rgba(255,75,75,0.25);
  animation: pulse-mic 1.2s ease-in-out infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,75,75,0.25); }
  50%       { box-shadow: 0 0 0 7px rgba(255,75,75,0.08); }
}

.ai-counter {
  text-align: center; font-size: 11px;
  color: var(--text-secondary); padding: 2px 0; flex-shrink: 0;
}
.health-alert {
  background: #FFFBEB;
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; font-weight: 600;
  color: #92400E; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

/* ── Tracker cards ── */
.tr-card {
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.tr-card.pink  { border-left: 4px solid var(--brand-primary); }
.tr-card.teal  { border-left: 4px solid var(--brand-teal); }
.tr-card.lav   { border-left: 4px solid var(--brand-blue); }
.tr-card.green { border-left: 4px solid var(--brand-green); }

.tr-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-secondary); }
.tr-val   { font-size: 34px; font-weight: 800; color: var(--text-dark); margin: 4px 0 2px; font-family: 'Unbounded', sans-serif; }
.tr-norm  { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
.tr-bar-bg {
  height: 6px; background: var(--surface-3);
  border-radius: 3px; overflow: hidden;
  border: 1px solid var(--border);
}
.tr-bar {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.tr-card.teal  .tr-bar { background: var(--brand-teal); }
.tr-card.lav   .tr-bar { background: var(--brand-blue); }
.tr-card.green .tr-bar { background: var(--brand-green); }

/* ── Form cards ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.form-toggle {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; min-height: 36px;
}
.form-toggle-title { font-size: 14px; font-weight: 700; color: var(--brand-primary); }
.form-body { padding-top: 12px; }

.field-label {
  display: block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-hint);
  margin: 12px 0 5px;
}
.field-input, .field-select, .field-textarea {
  display: block; width: 100%;
  padding: 10px 12px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 15px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  outline: none;
  -webkit-appearance: none; appearance: none;
  margin-bottom: 4px;
  transition: border-color 0.15s;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: var(--brand-primary);
  background: var(--surface);
}
.field-textarea { min-height: 72px; resize: vertical; line-height: 1.5; }

.form-btns {
  display: flex; gap: 8px; margin-top: 14px;
}

/* ── Primary / outline buttons ── */
.btn-pri {
  display: block; width: 100%;
  padding: 13px 18px;
  background: var(--gradient-btn);
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: -0.3px;
  border: none; border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s, transform 0.10s;
  -webkit-appearance: none;
  box-shadow:
    0 6px 20px var(--gradient-btn-shadow),
    0 2px 6px rgba(0,0,0,0.10);
}
.btn-pri:active  { transform: scale(0.97); opacity: 0.85; }
.btn-pri:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-out {
  display: block; width: 100%;
  padding: 13px 18px;
  background: transparent;
  color: var(--text-dark);
  font-family: 'Unbounded', sans-serif;
  font-size: 14px; font-weight: 700; letter-spacing: -0.3px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  transition: background 0.12s, transform 0.10s, box-shadow 0.12s;
  -webkit-appearance: none;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.08),
    0 1px 4px rgba(0,0,0,0.05);
}
.btn-out:active { transform: scale(0.97); background: var(--surface-3); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* ── Entry lists ── */
.entry-list { list-style: none; }
.entry-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 6px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.entry-time  { font-weight: 700; color: var(--text-dark); flex-shrink: 0; }
.entry-label { color: var(--text-secondary); flex: 1; }
.entry-note  { font-size: 12px; color: var(--text-hint); margin-top: 1px; }
.entry-del {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--text-hint); padding: 2px;
  min-width: 28px; min-height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.12s;
}
.entry-del:active { background: rgba(107,186,216,0.12); }

/* ── Norm list (legacy, sleep tracker) ── */
.norm-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.norm-item {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 9px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.norm-val { font-weight: 700; color: var(--brand-primary); }

/* ════════════════════════════════════════
   ТРЕКЕР ПИТАНИЯ — redesigned
   ════════════════════════════════════════ */

/* Hero card */
.feed-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg,
    rgba(100,200,190,0.22) 0%,
    rgba(107,186,216,0.18) 50%,
    rgba(130,160,240,0.14) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(255,255,255,0.58);
  border-bottom-color: rgba(255,255,255,0.28);
  box-shadow:
    0 10px 32px rgba(80,180,160,0.22),
    0 3px 10px rgba(80,180,160,0.12),
    inset 0 1.5px 0 rgba(255,255,255,0.85);
  border-radius: 24px;
  padding: 20px 20px 20px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.feed-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.40) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.00) 55%);
  pointer-events: none;
  border-radius: inherit;
}

/* Ring wrapper */
.feed-hero-ring {
  position: relative;
  flex-shrink: 0;
  width: 110px;
  height: 110px;
}
.feed-ring-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}
.feed-ring-track {
  fill: none;
  stroke: rgba(100,200,190,0.18);
  stroke-width: 9;
  stroke-linecap: round;
}
.feed-ring-fill {
  fill: none;
  stroke: url(#feedRingGrad);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
.feed-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.feed-ring-val {
  font-size: 32px;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  color: var(--text-dark);
  line-height: 1;
}
.feed-ring-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

/* Right info block */
.feed-hero-info {
  flex: 1;
  min-width: 0;
  z-index: 1;
}
.feed-hero-norm-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.feed-hero-norm {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}
.feed-hero-bar-wrap {
  height: 7px;
  background: rgba(100,200,190,0.18);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(100,200,190,0.20);
}
.feed-hero-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-teal) 0%, var(--brand-blue) 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.feed-hero-hint {
  font-size: 12px;
  color: var(--brand-teal);
  font-weight: 600;
}

/* Quick-log buttons */
.feed-quick-section {
  margin-bottom: 14px;
}
.feed-quick-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-hint);
  margin-bottom: 8px;
  padding-left: 2px;
}
.feed-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.feed-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.64);
  box-shadow:
    0 4px 14px rgba(28,25,23,0.09),
    0 1px 3px rgba(28,25,23,0.05),
    inset 0 1.5px 0 rgba(255,255,255,1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.feed-quick-btn span:first-child { font-size: 22px; line-height: 1; }
.feed-quick-btn span:last-child  { font-size: 11px; font-weight: 600; color: var(--text-dark); letter-spacing: 0.1px; }
.feed-quick-btn:active {
  transform: scale(0.93);
  box-shadow: 0 2px 6px rgba(28,25,23,0.08);
}

/* Norms grid */
.feed-norms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.feed-norm-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 4px 14px rgba(28,25,23,0.09),
    inset 0 1.5px 0 rgba(255,255,255,1);
  border-radius: 16px;
  padding: 14px 12px 12px;
}
.feed-norm-card-age {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.feed-norm-card-type {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.feed-norm-card-val {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  color: var(--brand-teal);
  line-height: 1.1;
}
.feed-norm-card-val span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-hint);
  font-family: 'Inter', sans-serif;
}

/* ════════════════════════════════════════
   ТРЕКЕР СНА — redesigned
   ════════════════════════════════════════ */

/* Hero card */
.sleep-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg,
    rgba(180,150,240,0.20) 0%,
    rgba(140,120,220,0.16) 50%,
    rgba(107,130,235,0.14) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1.5px solid rgba(255,255,255,0.58);
  border-bottom-color: rgba(255,255,255,0.28);
  box-shadow:
    0 10px 32px rgba(140,110,220,0.22),
    0 3px 10px rgba(140,110,220,0.12),
    inset 0 1.5px 0 rgba(255,255,255,0.85);
  border-radius: 24px;
  padding: 20px 20px 20px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.sleep-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.40) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.00) 55%);
  pointer-events: none;
  border-radius: inherit;
}

/* Ring */
.sleep-hero-ring {
  position: relative;
  flex-shrink: 0;
  width: 110px;
  height: 110px;
}
.sleep-ring-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}
.sleep-ring-track {
  fill: none;
  stroke: rgba(160,130,220,0.18);
  stroke-width: 9;
  stroke-linecap: round;
}
.sleep-ring-fill {
  fill: none;
  stroke: url(#sleepRingGrad);
  stroke-width: 9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
.sleep-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.sleep-ring-h {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  color: var(--text-dark);
  line-height: 1;
}
.sleep-ring-m {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Right info */
.sleep-hero-info {
  flex: 1;
  min-width: 0;
  z-index: 1;
}
.sleep-hero-norm-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-hint);
  margin-bottom: 4px;
}
.sleep-hero-norm {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}
.sleep-hero-bar-wrap {
  height: 7px;
  background: rgba(160,130,220,0.16);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(160,130,220,0.18);
}
.sleep-hero-bar {
  height: 100%;
  background: linear-gradient(90deg, #B8A0E8 0%, #8B6FD0 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.sleep-hero-hint {
  font-size: 12px;
  color: #8B6FD0;
  font-weight: 600;
}

/* Timer block */
.sleep-timer-wrap {
  margin-bottom: 14px;
}
.sleep-start-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  color: #fff;
  /* Lavender liquid glass */
  background: linear-gradient(135deg,
    rgba(160,130,240,0.55) 0%,
    rgba(130,100,220,0.50) 50%,
    rgba(107,130,235,0.45) 100%);
  backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  border: 1.5px solid rgba(255,255,255,0.52);
  border-bottom-color: rgba(255,255,255,0.22);
  box-shadow:
    0 10px 32px rgba(140,110,220,0.40),
    0 4px 12px rgba(140,110,220,0.22),
    inset 0 1.5px 0 rgba(255,255,255,0.70),
    inset 0 -2px 0 rgba(0,0,0,0.10);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.sleep-start-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  border-radius: 100px;
  pointer-events: none;
}
.sleep-start-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.06) 48%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.sleep-start-btn:active { transform: scale(0.98); opacity: 0.88; }
.sleep-btn-icon { font-size: 26px; z-index: 1; flex-shrink: 0; }
.sleep-btn-text {
  display: flex; flex-direction: column; gap: 2px; z-index: 1; text-align: left;
}
.sleep-btn-text span:first-child { font-size: 16px; font-weight: 700; }
.sleep-btn-text span:last-child  { font-size: 12px; font-weight: 500; opacity: 0.82; }

/* Recording state */
.sleep-recording {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.62);
  box-shadow:
    0 6px 22px rgba(140,110,220,0.18),
    inset 0 1.5px 0 rgba(255,255,255,1);
  border-radius: 20px;
  padding: 14px 16px;
}
.sleep-rec-info {
  display: flex; align-items: center; gap: 8px;
}
.sleep-rec-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #8B6FD0;
  box-shadow: 0 0 0 3px rgba(139,111,208,0.25);
  animation: sleep-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes sleep-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(139,111,208,0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(139,111,208,0.10); }
}
.sleep-rec-label { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.sleep-wake-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px; font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #B8A0E8, #8B6FD0);
  border: none;
  box-shadow: 0 4px 12px rgba(139,111,208,0.40);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.sleep-wake-btn:active { transform: scale(0.95); }

/* Norms grid */
.sleep-norms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.sleep-norm-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 4px 14px rgba(28,25,23,0.09),
    inset 0 1.5px 0 rgba(255,255,255,1);
  border-radius: 16px;
  padding: 14px 12px 12px;
}
.sleep-norm-card--wide {
  grid-column: 1 / -1;
}
.sleep-norm-card-age {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.sleep-norm-card-val {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  color: #8B6FD0;
  line-height: 1.1;
}
.sleep-norm-card-val span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-hint);
  font-family: 'Inter', sans-serif;
}

/* ── Collapse / history toggle ── */
.collapse-toggle {
  display: block; width: 100%;
  background: none; border: none;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer; text-align: left;
  padding: 10px 0;
  -webkit-appearance: none;
}

/* ── Pricing ── */
.period-toggle {
  display: flex; gap: 6px;
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.period-btn {
  flex: 1; padding: 8px 6px;
  border-radius: var(--radius-pill); border: none;
  font-family: inherit; font-size: 12px; font-weight: 700;
  color: var(--text-secondary);
  background: none; cursor: pointer;
  transition: all 0.15s;
  position: relative;
  -webkit-appearance: none;
}
.period-btn.active {
  background: var(--surface);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}
.period-badge {
  position: absolute; top: -4px; right: -2px;
  background: var(--brand-green);
  color: #fff; font-size: 8px; font-weight: 800;
  padding: 1px 4px; border-radius: 6px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.price-card.start-c { border-color: rgba(107,186,216,0.40); }
.price-card.prem-c  { border-color: rgba(74,144,217,0.40); border-width: 2px; }
.price-card.free-c  { border-color: var(--border); }

.price-card-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--brand-primary);
  color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 10px; border-radius: var(--radius-pill);
}
.price-card.prem-c .price-card-badge { background: var(--brand-blue); }

.price-ico    { font-size: 28px; margin-bottom: 6px; }
.price-name   { font-family: 'Unbounded', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.3px; }
.price-amount { font-size: 28px; font-weight: 800; color: var(--text-dark); margin-bottom: 2px; font-family: 'Unbounded', sans-serif; }
.price-amount span { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.price-total  { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }

.price-features { list-style: none; font-size: 13px; margin-bottom: 14px; }
.price-features li { padding: 4px 0; color: var(--text-dark); display: flex; align-items: center; gap: 7px; }
.price-features li::before { content: '✓'; color: var(--brand-green); font-weight: 800; font-size: 13px; flex-shrink: 0; }
.price-features li.no { color: var(--text-hint); }
.price-features li.no::before { content: '×'; color: var(--text-hint); }

.price-btn {
  width: 100%; padding: 13px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; text-align: center; background: var(--surface-3);
  color: var(--text-secondary); -webkit-appearance: none;
  transition: all 0.12s;
}
.price-btn.current { border-color: var(--border); cursor: default; }
.price-btn.starter-btn {
  background: var(--gradient-btn); color: #fff; border: none;
  box-shadow: 0 4px 14px var(--gradient-btn-shadow);
}
.price-btn.prem-btn {
  background: var(--gradient-btn); color: #fff; border: none;
  box-shadow: 0 4px 14px var(--gradient-btn-shadow);
}
.price-btn.starter-btn:active { transform: scale(0.97); }
.price-btn.prem-btn:active     { transform: scale(0.97); }

/* ── Children bar ── */
/* ── Profile: swipe dots indicator ── */
.profile-child-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 0 10px;
}
.profile-child-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(192,132,232,0.28);
  border: none; cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.profile-child-dot.active {
  background: #C084E8;
  transform: scale(1.3);
}

.home-children-bar, .children-bar {
  display: flex; gap: 7px; overflow-x: auto;
  padding: 2px 0 10px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.home-children-bar::-webkit-scrollbar, .children-bar::-webkit-scrollbar { display: none; }

.child-pill, .child-chip {
  white-space: nowrap; padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  background: var(--surface);
  color: var(--text-dark);
  border: 1.5px solid var(--border);
  cursor: pointer; flex-shrink: 0;
  min-height: 34px; display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; -webkit-appearance: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.12s;
}
.child-pill.active, .child-chip.active {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
}
.add-child-pill, .add-child-btn {
  white-space: nowrap; padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1.5px dashed var(--border-strong);
  cursor: pointer; flex-shrink: 0;
  min-height: 34px; display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; -webkit-appearance: none;
}

/* ── Neuro screen ── */
/* ════════════════════════════════════════
   НЕЙРОФОТО — redesigned
   ════════════════════════════════════════ */

/* Hero banner */
.neuro-hero-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg,
    rgba(249,168,201,0.30) 0%,
    rgba(201,160,220,0.24) 40%,
    rgba(139,111,208,0.20) 70%,
    rgba(255,210,100,0.18) 100%);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1.5px solid rgba(255,255,255,0.62);
  border-bottom-color: rgba(255,255,255,0.28);
  box-shadow:
    0 10px 36px rgba(200,140,180,0.22),
    0 3px 10px rgba(200,140,180,0.12),
    inset 0 1.5px 0 rgba(255,255,255,0.90);
  border-radius: 24px;
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.neuro-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0.00) 55%);
  pointer-events: none;
  border-radius: inherit;
}
.neuro-hero-left { z-index: 1; }
.neuro-hero-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 3px;
  font-family: 'Inter', sans-serif;
}
.neuro-hero-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.neuro-hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(249,168,201,0.60), rgba(201,160,220,0.60));
  border: 1px solid rgba(255,255,255,0.60);
  color: #6B3A6A;
  backdrop-filter: blur(8px);
}
.neuro-hero-icos {
  font-size: 26px;
  letter-spacing: 2px;
  z-index: 1;
  line-height: 1.4;
}

/* Section label */
.neuro-sec-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-hint);
  margin-bottom: 8px;
  padding-left: 2px;
}

/* Styles grid — 4 cols */
.neuro-styles-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px;
}
/* Style buttons — icon top, name below */
.neuro-style-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  padding: 10px 4px 9px !important;
  min-height: 70px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid rgba(255,255,255,0.60) !important;
  box-shadow:
    0 3px 10px rgba(28,25,23,0.08),
    inset 0 1.5px 0 rgba(255,255,255,1) !important;
  cursor: pointer !important;
  transition: transform 0.12s ease, box-shadow 0.12s ease !important;
  font-family: 'Inter', sans-serif !important;
  -webkit-appearance: none !important;
}
.neuro-style-btn:active {
  transform: scale(0.92) !important;
  box-shadow: 0 1px 4px rgba(28,25,23,0.06) !important;
}
.neuro-style-btn.selected {
  background: linear-gradient(135deg,
    rgba(249,168,201,0.28) 0%,
    rgba(201,160,220,0.24) 100%) !important;
  border-color: rgba(201,140,200,0.60) !important;
  box-shadow:
    0 4px 16px rgba(200,140,180,0.30),
    inset 0 1.5px 0 rgba(255,255,255,1) !important;
}
.nsb-ico  { font-size: 22px; line-height: 1; display: block; }
.nsb-name {
  font-size: 10px; font-weight: 700;
  color: var(--text-dark);
  text-align: center; display: block;
  line-height: 1.2; letter-spacing: 0.1px;
}

/* Upload card */
.neuro-upload-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 20px;
  cursor: pointer;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px dashed rgba(200,140,200,0.45);
  box-shadow:
    0 4px 16px rgba(28,25,23,0.09),
    inset 0 1.5px 0 rgba(255,255,255,1);
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}
.neuro-upload-card:active { background: rgba(249,168,201,0.10); border-color: rgba(200,140,200,0.70); }
.neuro-upload-card-ico { font-size: 28px; flex-shrink: 0; }
.neuro-upload-card-text {
  display: flex; flex-direction: column; gap: 2px;
}
.neuro-upload-card-text span:first-child {
  font-size: 15px; font-weight: 700; color: var(--text-dark);
}
.neuro-upload-card-text span:last-child {
  font-size: 11px; font-weight: 500; color: var(--text-secondary);
}
.neuro-upload-card img {
  width: 100%; border-radius: 12px; display: block;
}

/* Create button */
.btn-neuro-create {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 17px 20px;
  border-radius: 20px;
  font-size: 16px; font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #fff;
  cursor: pointer;
  margin-bottom: 14px;
  background: linear-gradient(135deg,
    rgba(249,140,185,0.75) 0%,
    rgba(201,130,210,0.70) 50%,
    rgba(139,111,208,0.65) 100%);
  backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  border: 1.5px solid rgba(255,255,255,0.52);
  border-bottom-color: rgba(255,255,255,0.22);
  box-shadow:
    0 10px 32px rgba(200,120,180,0.42),
    0 4px 12px rgba(200,120,180,0.24),
    inset 0 1.5px 0 rgba(255,255,255,0.70),
    inset 0 -2px 0 rgba(0,0,0,0.10);
  position: relative; overflow: hidden;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-neuro-create::before {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
  border-radius: 100px; pointer-events: none;
}
.btn-neuro-create::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.06) 48%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
}
.btn-neuro-create:active  { transform: scale(0.98); opacity: 0.88; }
.btn-neuro-create:disabled {
  opacity: 0.45; cursor: not-allowed;
  filter: grayscale(0.3);
}

/* Loader inner */
.neuro-loader-inner {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 0 16px;
  gap: 8px;
}
.neuro-loader-inner p {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--text-dark); line-height: 1.5; margin: 0;
}

/* ── Legacy .neuro-style-card (keep for other uses) ── */
.neuro-style-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 10px; text-align: center;
  cursor: pointer; transition: all 0.12s;
  box-shadow: var(--shadow-sm);
}
.neuro-style-card:active { transform: scale(0.95); }
.neuro-style-card.selected {
  border-color: var(--brand-primary);
  background: rgba(107,186,216,0.07);
}
.neuro-style-ico  { font-size: 28px; margin-bottom: 6px; display: block; }
.neuro-style-name { font-size: 12px; font-weight: 700; color: var(--text-dark); }

.neuro-upload-btn {
  display: block; width: 100%; padding: 18px;
  background: var(--surface-2);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius); text-align: center;
  cursor: pointer; margin-bottom: 12px;
  transition: all 0.12s;
}
.neuro-upload-btn:active { background: rgba(107,186,216,0.07); border-color: var(--brand-primary); }
.neuro-upload-ico  { font-size: 36px; margin-bottom: 6px; display: block; }
.neuro-upload-text { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.neuro-upload-sub  { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.neuro-result-img {
  width: 100%; border-radius: var(--radius);
  margin-bottom: 12px; display: block;
  box-shadow: var(--shadow-lg);
}

/* ── Benefits ── */
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

/* ── Sounds ── */
.sounds-now-card {
  background: linear-gradient(135deg, #EDFAF8 0%, #D8F5F2 100%);
  border: 1px solid rgba(58,186,180,0.30);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px;
}
.sounds-mini-controls { display: flex; gap: 6px; flex-shrink: 0; }
.sounds-ctrl-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(58,186,180,0.20);
  color: var(--text-dark);
  border: 1px solid rgba(58,186,180,0.35);
  transition: transform 0.12s; -webkit-appearance: none;
}
.sounds-ctrl-btn:active { transform: scale(0.88); }
.sounds-stop-btn { background: rgba(107,186,216,0.15); border-color: rgba(107,186,216,0.30); }
.sounds-ctrl-btn.paused { background: var(--surface-3); border-color: var(--border); }

.sounds-timer-row {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 2px 0 10px; -webkit-overflow-scrolling: touch;
}
.sounds-timer-row::-webkit-scrollbar { display: none; }
.sounds-timer-chip {
  white-space: nowrap; padding: 7px 13px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.12s;
  font-family: inherit; min-height: 36px;
  -webkit-appearance: none;
}
.sounds-timer-chip.active {
  background: var(--gradient-btn); color: #fff; border-color: transparent;
}

.sounds-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px;
}
.sound-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 12px 12px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.12s;
  box-shadow: var(--shadow-sm);
  text-align: center;
  -webkit-user-select: none; user-select: none;
}
.sound-card:active { transform: scale(0.95); }
.sound-card.playing {
  border-color: var(--brand-teal);
  background: rgba(58,186,180,0.07);
}
.sound-card.playing::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--brand-teal);
  animation: soundProgress 1s linear infinite;
}
@keyframes soundProgress {
  0%   { opacity: 1; }
  50%  { opacity: 0.4; }
  100% { opacity: 1; }
}
.sound-ico  { font-size: 30px; margin-bottom: 6px; display: block; }
.sound-name { font-size: 12px; font-weight: 700; color: var(--text-dark); }
.sound-desc { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.sound-wave {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 2px; height: 16px; margin: 6px 0 2px;
}
.sound-wave-bar {
  width: 3px; border-radius: 2px;
  background: var(--brand-teal);
  animation: waveAnim 0.8s ease-in-out infinite;
}
.sound-wave-bar:nth-child(1) { height: 6px;  animation-delay: 0s;    }
.sound-wave-bar:nth-child(2) { height: 12px; animation-delay: 0.1s;  }
.sound-wave-bar:nth-child(3) { height: 8px;  animation-delay: 0.2s;  }
.sound-wave-bar:nth-child(4) { height: 14px; animation-delay: 0.05s; }
.sound-wave-bar:nth-child(5) { height: 6px;  animation-delay: 0.15s; }
@keyframes waveAnim {
  0%,100% { transform: scaleY(1); }
  50%     { transform: scaleY(0.4); }
}
.sound-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(107,186,216,0.15);
  color: var(--brand-primary); font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid rgba(107,186,216,0.25);
}

/* ── Page title ── */
.page-title {
  font-family: 'Unbounded', -apple-system, sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--text-dark);
  margin: 4px 0 16px;
  letter-spacing: -0.4px;
}

/* ── Bottom sheet / modal ── */
.diary-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28,25,23,0.40);
  align-items: flex-end;
  justify-content: center;
}
.diary-modal-overlay.open {
  display: flex;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.diary-modal-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 12px 16px 32px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 -8px 48px rgba(28,25,23,0.15);
  animation: sheetUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 14px;
}
.modal-title {
  font-family: 'Unbounded', -apple-system, sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

/* ── Diary type grid ── */
.diary-type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.diary-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 4px;
  border-radius: 14px;
  border: 1.5px solid rgba(200,120,150,0.20);
  background: rgba(255,240,248,0.80);
  cursor: pointer;
  -webkit-appearance: none;
  transition: transform 0.12s, background 0.12s;
}
.diary-type-card:active { transform: scale(0.93); background: rgba(235,185,210,0.55); }
.dtc-ico { font-size: 26px; line-height: 1; }
.dtc-lbl { font-size: 10px; font-weight: 600; color: var(--text-secondary); text-align: center; line-height: 1.2; }

/* ── Diary form step 2 ── */
.diary-form-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.diary-back-btn {
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  flex-shrink: 0;
  -webkit-appearance: none;
}
.diary-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.diary-field-unit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.diary-unit-input { flex: 1; margin-bottom: 0 !important; }
.diary-unit-label { font-size: 16px; font-weight: 700; color: var(--text-secondary); flex-shrink: 0; }
.diary-temp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.diary-temp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.diary-preset-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(200,120,150,0.28);
  background: rgba(255,240,248,0.80);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-appearance: none;
  transition: background 0.12s;
}
.diary-preset-btn:active { background: rgba(220,140,170,0.40); }

/* ── Diary date quick-select ── */
.diary-date-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.diary-date-chip {
  flex: 1;
  padding: 9px 6px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(200,120,150,0.26);
  background: rgba(255,240,248,0.80);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-appearance: none;
  transition: background 0.12s, color 0.12s;
}
.diary-date-chip.active {
  background: linear-gradient(135deg, #E8758A 0%, #D4566A 100%);
  border-color: transparent;
  color: #fff;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 14px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: var(--text-dark);
  color: white;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Onboarding overlay: step-by-step ── */
#onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: linear-gradient(160deg, #fdf2f8 0%, #e8f4fd 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding-top: calc(var(--safe-top) + var(--tg-content-safe-top));
  padding-bottom: var(--safe-bottom);
}

/* Progress bar at top */
.ob-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}
.ob-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(107,150,220,0.18);
  border-radius: 10px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: var(--gradient-btn);
  border-radius: 10px;
  transition: width 0.35s ease;
}
.ob-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 32px;
  text-align: right;
}

/* Each step */
.ob-step {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 0 24px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ob-step.ob-step-active {
  display: flex;
}
.ob-step-emoji {
  font-size: 56px;
  text-align: center;
  margin-top: 24px;
  margin-bottom: 16px;
  flex-shrink: 0;
  animation: ob-bounce 1.4s ease infinite alternate;
}
@keyframes ob-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
.ob-step-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
  font-family: Unbounded, sans-serif;
  line-height: 1.25;
  flex-shrink: 0;
}
.ob-step-sub {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
  flex-shrink: 0;
}
.ob-input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: white;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  margin-bottom: 16px;
}
.ob-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(107,186,216,0.15);
}
.ob-age-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.ob-age-col {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ob-age-col .ob-input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}
.ob-age-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.ob-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239CA3AF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}
.ob-gender-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.ob-gender-btn {
  flex: 1;
  padding: 20px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.ob-gender-btn.selected {
  border-color: var(--brand-primary);
  background: rgba(107,186,216,0.10);
  color: var(--brand-primary-dark);
}

/* Spacer so buttons stay at bottom */
.ob-step > .ob-btn-next { margin-top: auto; }

.ob-btn-next {
  width: 100%;
  padding: 16px;
  background: var(--gradient-btn);
  border: none;
  border-radius: var(--radius-pill);
  color: white;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--gradient-btn-shadow);
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.ob-btn-next:active { opacity: 0.85; transform: scale(0.98); }

.ob-btn-skip,
.ob-btn-back {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.ob-btn-back:active, .ob-btn-skip:active { opacity: 0.6; }

/* ── Upload area ── */
.upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  background: var(--surface-2);
  transition: background 0.15s, border-color 0.15s;
}
.upload-area:active { background: rgba(107,186,216,0.07); border-color: var(--brand-primary); }
.upload-area img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto; }

/* ── Spinner ── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 24px auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Neuro result ── */
.neuro-result { text-align: center; margin-top: 12px; }
.neuro-result img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: block;
}

/* ── Dish list ── */
.dish-list { list-style: none; margin-bottom: 8px; }
.dish-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer; transition: background 0.12s;
}
.dish-item:active { background: rgba(66,185,122,0.08); }
.dish-ico  { font-size: 22px; flex-shrink: 0; }
.dish-name { flex: 1; font-size: 14px; font-weight: 700; color: var(--text-dark); }
.dish-ask  { font-size: 12px; color: var(--text-secondary); }

/* ── Benefits items ── */
.benefit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px;
  font-size: 14px; line-height: 1.6;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}
.benefit-item h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }

/* ── Diary ── */
/* ── Diary hero header ── */
.diary-hero {
  background: linear-gradient(135deg, #FEF3EE 0%, #EEF4FE 100%);
  border: 1.5px solid rgba(255,255,255,0.70);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(107,130,235,0.12), inset 0 1.5px 0 rgba(255,255,255,0.90);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.diary-hero-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.diary-hero-avatar { font-size: 38px; flex-shrink: 0; }
.diary-hero-info { min-width: 0; }
.diary-hero-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.diary-hero-age { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.diary-hero-stats { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.diary-stat-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.80); backdrop-filter: blur(8px);
  border: 1px solid rgba(107,186,216,0.20);
  font-size: 11px; font-weight: 700; color: var(--text-dark);
  white-space: nowrap;
}

/* ── Diary segment control ── */
.diary-segment {
  display: flex; gap: 6px; margin-bottom: 14px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.70);
  border-radius: var(--radius-pill);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.diary-seg {
  flex: 1; padding: 8px 12px;
  border-radius: 20px; border: none;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
  background: transparent; cursor: pointer;
  transition: all 0.18s; -webkit-appearance: none;
}
.diary-seg.active {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 3px 10px rgba(107,130,235,0.35);
}

/* ── Diary docs grid ── */
.diary-docs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.doc-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 6px;
  text-align: center; cursor: pointer;
  transition: all 0.12s; box-shadow: var(--shadow-sm);
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
  min-height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.doc-item:active { transform: scale(0.93); }
.doc-item.has-doc {
  border-color: rgba(200,80,110,0.40);
  box-shadow: 0 3px 10px rgba(200,80,110,0.14);
}
.doc-ico  { font-size: 24px; display: block; margin-bottom: 4px; position: relative; z-index: 2; }
.doc-name { font-size: 10px; font-weight: 600; color: var(--text-dark); line-height: 1.2; position: relative; z-index: 2; }

/* Thumbnail overlay on doc-item */
.doc-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  opacity: 0.90;
  z-index: 1;
}
.doc-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.10) 60%, transparent 100%);
  border-radius: inherit;
}
.doc-item.has-doc .doc-ico { display: none; }
.doc-item.has-doc .doc-name { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6); font-size: 9px; }

/* Green check badge */
.doc-check {
  position: absolute;
  top: 5px; right: 5px;
  width: 18px; height: 18px;
  background: #E8758A;
  color: #fff;
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ── Doc upload area in modal ── */
.doc-upload-area {
  border: 2px dashed rgba(200,120,150,0.40);
  border-radius: var(--radius);
  min-height: 180px;
  cursor: pointer;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,240,248,0.60);
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 10px;
}
.doc-upload-area:active { border-color: rgba(200,80,110,0.60); background: rgba(255,225,240,0.70); }
.doc-upload-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.doc-upload-ico  { font-size: 40px; }
.doc-upload-hint { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.upload-preview  { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Doc delete button ── */
.doc-delete-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(220,60,60,0.08);
  color: #C03040;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  margin-bottom: 2px;
}
.doc-delete-btn:active { background: rgba(220,60,60,0.18); }

/* ── Diary tabs (filter chips) ── */
.diary-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin-bottom: 12px; padding-bottom: 2px;
}
.diary-tabs::-webkit-scrollbar { display: none; }
.diary-tab {
  white-space: nowrap; padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.72); color: var(--text-secondary);
  border: 1.5px solid rgba(255,255,255,0.60);
  cursor: pointer; transition: all 0.14s;
  -webkit-appearance: none;
  backdrop-filter: blur(8px);
}
.diary-tab.active {
  background: var(--gradient-btn); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(107,130,235,0.30);
}

/* ── Diary timeline ── */
.diary-timeline { list-style: none; padding-bottom: 80px; }
.diary-tl-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.65);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 12px rgba(28,25,23,0.08), inset 0 1px 0 rgba(255,255,255,0.90);
}
.diary-tl-ico  { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.diary-tl-body { flex: 1; min-width: 0; }
.diary-tl-type {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-hint);
}
.diary-tl-val  { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-top: 2px; }
.diary-tl-date { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ── Diary empty state ── */
.diary-empty {
  text-align: center; padding: 48px 20px 80px;
}
.diary-empty-ico   { font-size: 48px; margin-bottom: 12px; }
.diary-empty-title { font-size: 16px; font-weight: 700; color: var(--text-dark); }
.diary-empty-sub   { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* ── Diary FAB ── */
.diary-fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 16px);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff; font-size: 28px; font-weight: 300;
  border: none; cursor: pointer;
  box-shadow:
    0 8px 24px rgba(107,130,235,0.50),
    0 3px 8px rgba(107,130,235,0.30),
    inset 0 1.5px 0 rgba(255,255,255,0.40);
  display: flex; align-items: center; justify-content: center;
  -webkit-appearance: none; transition: transform 0.15s, box-shadow 0.15s;
  z-index: 50;
  line-height: 1;
}
.diary-fab:active {
  transform: scale(0.92);
  box-shadow: 0 3px 10px rgba(107,130,235,0.30);
}

/* ── Diary notes list (legacy) ── */
.diary-notes-list { list-style: none; }
.diary-note-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

/* ── Legacy entry items ── */
.diary-entry-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.diary-entry-ico  { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.diary-entry-body { flex: 1; min-width: 0; }
.diary-entry-type { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-hint); }
.diary-entry-val  { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-top: 2px; }
.diary-entry-date { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* ── Docs grid (card view) ── */
.docs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 12px;
  text-align: center; cursor: pointer;
  transition: transform 0.12s;
  box-shadow: var(--shadow-sm);
  -webkit-user-select: none; user-select: none;
}
.doc-card:active { transform: scale(0.95); }
.doc-card img { width: 100%; border-radius: 8px; display: block; margin-bottom: 6px; }
.doc-card-ico  { font-size: 28px; display: block; margin-bottom: 6px; }
.doc-card-name { font-size: 12px; font-weight: 700; color: var(--text-dark); }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-secondary);
}
.empty-state-ico  { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; }
.empty-state-sub  { font-size: 13px; }

/* ── Neuro style grid (3-column) ── */
.style-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.style-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 6px;
  text-align: center; cursor: pointer;
  transition: all 0.12s; box-shadow: var(--shadow-sm);
}
.style-card:active { transform: scale(0.95); }
.style-card.selected {
  border-color: var(--brand-primary);
  background: rgba(107,186,216,0.07);
}
.style-ico  { font-size: 24px; display: block; margin-bottom: 4px; }
.style-name { font-size: 11px; font-weight: 700; color: var(--text-dark); }

/* ── Plan card (profile) ── */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.plan-name  { font-size: 16px; font-weight: 700; color: var(--text-dark); }
.plan-until { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.plan-change-btn {
  padding: 8px 16px; border-radius: var(--radius-pill);
  background: var(--gradient-btn); color: #fff;
  border: none; font-family: inherit;
  font-size: 13px; font-weight: 700; cursor: pointer;
  -webkit-appearance: none;
  box-shadow: 0 2px 8px var(--gradient-btn-shadow);
}

/* ── Plan badge ── */
.plan-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  background: rgba(107,186,216,0.12);
  border: 1px solid rgba(107,186,216,0.25);
  color: var(--brand-primary); margin-top: 6px;
}
.plan-badge.prem { background: rgba(74,144,217,0.12); border-color: rgba(74,144,217,0.25); color: var(--brand-blue); }

/* ── AI usage bar ── */
.ai-usage-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.ai-usage-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); flex: 1; }
.ai-usage-count { font-size: 14px; font-weight: 800; color: var(--text-dark); }

/* ── Referral link box (kept for other uses) ── */
.ref-link-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px;
  font-size: 13px; font-weight: 600; color: var(--text-dark);
  word-break: break-all;
}

/* ── Profile ── */
.profile-header {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 0 16px;
}
.profile-avatar { font-size: 60px; margin-bottom: 8px; }
.profile-name   { font-family: 'Unbounded', -apple-system, sans-serif; font-size: 20px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.4px; }
.profile-plan   { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.profile-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.profile-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer; min-height: 52px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.profile-item:last-child { border-bottom: none; }
.profile-item:active { background: rgba(107,186,216,0.06); }
.profile-item-ico  { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.profile-item-text { flex: 1; }
.profile-item-name { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.profile-item-sub  { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.profile-item-arr  { font-size: 18px; color: var(--text-hint); }

#screen-profile {
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 30px);
  padding-top: calc(var(--safe-top) + var(--tg-content-safe-top) + var(--topbar-h) + 30px);
}

/* ── Profile floating hero ── */
.profile-float-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 2px 18px;
}
.profile-float-avatar {
  font-size: 52px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.10));
}
.profile-float-info {
  flex: 1;
  min-width: 0;
}
.profile-float-plan {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  font-family: 'Unbounded', -apple-system, sans-serif;
  letter-spacing: -0.3px;
}
.profile-float-until {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ── Age drum picker ── */
.age-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  margin-bottom: 14px;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.age-picker-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.age-picker-divider {
  width: 1px;
  height: 60px;
  background: var(--border);
  margin-bottom: 20px;
}
.age-drum-wrap {
  position: relative;
  height: 132px;
  width: 72px;
  overflow: hidden;
  border-radius: 10px;
}
.age-drum-wrap::before,
.age-drum-wrap::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 44px;
  z-index: 3;
  pointer-events: none;
}
.age-drum-wrap::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(248,247,244,0.96) 0%, rgba(248,247,244,0) 100%);
}
.age-drum-wrap::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(248,247,244,0.96) 0%, rgba(248,247,244,0) 100%);
}
.age-picker-sel {
  position: absolute;
  top: 44px; left: 3px; right: 3px;
  height: 44px;
  border-top: 1.5px solid var(--brand-primary);
  border-bottom: 1.5px solid var(--brand-primary);
  border-radius: 8px;
  background: rgba(96,155,220,0.08);
  pointer-events: none;
  z-index: 2;
}
.age-drum {
  height: 132px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.age-drum::-webkit-scrollbar { display: none; }
.age-drum-spacer {
  height: 44px;
  flex-shrink: 0;
}
.age-drum-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s, opacity 0.15s;
}
.age-drum-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Support card ── */
/* ── Profile: referral share card ── */
.profile-ref-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #FFF0FA 0%, #F3E8FF 100%);
  border: 1.5px solid rgba(192,132,232,0.28);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(192,132,232,0.12);
}
.profile-ref-left {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.profile-ref-ico { font-size: 28px; flex-shrink: 0; }
.profile-ref-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.profile-ref-sub {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
}
.profile-ref-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #C084E8 0%, #8858D0 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(136,88,208,0.35);
}
.profile-ref-btn:active { opacity: 0.85; transform: scale(0.97); }

.support-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.support-ico { font-size: 26px; flex-shrink: 0; }

/* ── Benefits redesign ── */

/* Hero */
.ben-hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFF3D6 100%);
  border: 1.5px solid rgba(245,185,50,0.25);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(245,185,50,0.12);
}
.ben-hero-left { flex: 1; }
.ben-hero-title {
  font-size: 20px; font-weight: 800;
  color: #2D2D2D; letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.ben-hero-sub {
  font-size: 13px; line-height: 1.5;
  color: #7A6A45; font-weight: 500;
}
.ben-hero-ico { font-size: 44px; margin-left: 12px; }

/* Search */
.ben-search-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 12px;
}
.ben-search-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  box-shadow: var(--shadow-sm);
}
.ben-search-icon { font-size: 16px; }
.ben-search-input {
  flex: 1; border: none; outline: none;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--text-dark);
  background: transparent;
  padding: 11px 0;
}
.ben-search-wrap:focus-within {
  border-color: #C8960A;
  box-shadow: 0 0 0 3px rgba(200,150,10,0.12);
}
.ben-search-input::placeholder { color: var(--text-muted); }
.ben-search-btn {
  white-space: nowrap; padding: 11px 18px;
  border-radius: var(--radius-pill) !important;
  background: linear-gradient(135deg, #F5C842 0%, #E8A820 50%, #D4890A 100%) !important;
  box-shadow: 0 4px 14px rgba(210,150,10,0.38) !important;
}
.ben-search-btn:active { opacity: 0.85; transform: scale(0.97); }

/* City chips — horizontal scroll */
.ben-chips-scroll {
  display: flex; gap: 7px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px;
  margin-bottom: 4px;
}
.ben-chips-scroll::-webkit-scrollbar { display: none; }

/* Chips */
.benefits-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 14px;
}
.benefits-chip {
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 13px; font-weight: 600;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-dark); cursor: pointer;
  transition: all 0.12s; -webkit-appearance: none;
  min-height: 36px; white-space: nowrap;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.benefits-chip.selected {
  background: linear-gradient(145deg, rgba(255,210,60,0.70) 0%, rgba(240,175,20,0.65) 100%);
  border-color: #C8960A;
  color: #7A5000;
  box-shadow: 0 3px 12px rgba(200,140,0,0.30), inset 0 1.5px 0 rgba(255,255,255,0.70);
}
.benefits-chip:active { opacity: 0.82; transform: scale(0.96); }

/* Info grid */
.ben-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.ben-info-card {
  background: rgba(255,252,240,0.92);
  border: 1.5px solid rgba(210,165,40,0.22);
  border-radius: var(--radius);
  padding: 14px 12px;
  box-shadow: 0 2px 8px rgba(210,150,10,0.08);
  text-align: center;
}
.ben-info-ico { font-size: 28px; margin-bottom: 6px; }
.ben-info-title { font-size: 13px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.ben-info-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Hint */
.ben-hint {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(220,170,40,0.10);
  border: 1px solid rgba(210,155,30,0.28);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px; line-height: 1.5;
  color: #7A5A00; font-weight: 500;
  margin-bottom: 8px;
}
.ben-hint span { flex-shrink: 0; font-size: 15px; margin-top: 1px; }

/* Loader */
.ben-loader-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 36px 0;
}
.ben-loader-text { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Result */
.ben-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.region-badge {
  display: inline-block;
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 700;
  background: rgba(215,160,30,0.14);
  border: 1px solid rgba(200,150,10,0.35);
  color: #8A6200;
}
.ben-reset-btn {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px; font-weight: 600;
  color: #9A7010; background: rgba(220,170,40,0.08);
  border: 1.5px solid rgba(200,150,10,0.30);
  border-radius: var(--radius-pill);
  padding: 5px 12px; cursor: pointer;
  -webkit-appearance: none;
}
.ben-reset-btn:active { transform: scale(0.96); opacity: 0.8; }

.ben-result-card {
  background: rgba(255,252,240,0.95);
  border: 1px solid rgba(210,165,40,0.22);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(210,150,10,0.10);
  margin-bottom: 16px;
}

/* Markdown-rendered benefit blocks */
.ben-block { margin-bottom: 16px; }
.ben-block:last-child { margin-bottom: 0; }
.ben-block-title {
  font-size: 14px; font-weight: 800;
  color: var(--text-dark); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.ben-block-body {
  font-size: 13px; line-height: 1.7;
  color: var(--text-secondary);
}
.ben-block-body ul { padding-left: 0; margin: 0; list-style: none; }
.ben-block-body li {
  padding: 3px 0 3px 18px; position: relative;
}
.ben-block-body li::before {
  content: '•'; position: absolute; left: 4px;
  color: #C8960A; font-weight: 900;
}
.ben-block-body strong { color: var(--text-dark); font-weight: 700; }

/* AI response block (generic, kept for other screens) */
.ai-response {
  font-size: 14px; line-height: 1.7;
  color: var(--text-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.benefits-result { margin-bottom: 12px; }

/* ── Neuro style buttons (2-col grid) ── */
.neuro-style-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 12px; font-weight: 700;
  color: var(--text-dark);
  cursor: pointer; text-align: center;
  transition: all 0.12s;
  box-shadow: var(--shadow-sm);
  -webkit-appearance: none;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.neuro-style-btn:active { transform: scale(0.95); }
.neuro-style-btn.selected {
  border-color: var(--brand-primary);
  background: rgba(107,186,216,0.08);
  box-shadow: 0 2px 8px rgba(107,186,216,0.20);
}

/* ── Diary child info (subtext) ── */
.diary-child-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.diary-child-age { font-size: 13px; color: var(--text-secondary); }

/* ── Sounds mini bar ── */
.sounds-mini-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
}
.sounds-mini-ico { font-size: 22px; flex-shrink: 0; }
.sounds-mini-name { font-size: 13px; font-weight: 700; color: var(--text-dark); flex: 1; }
.sounds-mini-stop {
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--brand-primary); color: #fff;
  border: none; font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; -webkit-appearance: none;
}

/* ══════════════════════════════════════════
   NEW IMAGE-BASED HOME SCREEN COMPONENTS
   ══════════════════════════════════════════ */

/* ── Hero Row (Дневник + AI) ── */
.hero-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 8px;
}

.hero-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  height: 175px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(28,25,23,0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.hero-card:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(28,25,23,0.08); }

.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,25,23,0.55) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px;
}

.hero-label {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.80);
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.hero-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #9B7FD4, #6BBAD8);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}

.hero-diary { background: #FEF0E8; }
.hero-ai    { background: #FDF5FF; }

/* ── Category Gallery (horizontal scroll) ── */
.cat-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-gallery::-webkit-scrollbar { display: none; }

.cat-card {
  position: relative;
  flex: 0 0 88px;
  height: 88px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(28,25,23,0.08);
  transition: transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.cat-card:active { transform: scale(0.95); }

.cat-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.cat-overlay {
  position: absolute;
  inset: 0;
  border-radius: 20px;
}

.cat-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 6px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0,0,0,0.55), 0 0 12px rgba(0,0,0,0.18);
  background: linear-gradient(to top, rgba(0,0,0,0.28), transparent);
  border-radius: 0 0 20px 20px;
}

/* ── Image Tiles Grid (Трекеры / Инструменты) ── */
.img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 20px;
}

.img-tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  box-shadow: 0 3px 14px rgba(28,25,23,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.img-tile:active { transform: scale(0.96); box-shadow: 0 1px 6px rgba(28,25,23,0.06); }
.img-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--tile-grad-dark, rgba(60,40,80,0.45)) 0%,
    var(--tile-grad-mid, rgba(60,40,80,0.14)) 48%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.img-tile-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.img-tile-pic img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.img-tile-camera-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  pointer-events: none;
  z-index: 3;
}
.img-tile-camera-icon svg {
  width: 17px;
  height: 17px;
  color: #1C1917;
}

.img-tile-camera-icon--center {
  top: 50%;
  left: 50%;
  bottom: auto;
  right: auto;
  opacity: 0.75;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
  border-radius: 50%;
}
.img-tile-camera-icon--center svg {
  width: 24px;
  height: 24px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}

.img-tile-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 12px 12px;
  background: none;
}
.img-tile-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 2px 12px rgba(0,0,0,0.40);
}
.img-tile-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.92);
  margin-top: 2px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.50), 0 2px 8px rgba(0,0,0,0.35);
}
.img-tile-stat {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  margin-top: 4px;
}

/* ── Wide Banners (Нейрофото, Колыбельные, Чат) ── */
.wide-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 10px;
  padding: 12px;
  border-radius: 20px;
  background: var(--banner-bg, var(--surface));
  border: 1px solid var(--banner-border, var(--border));
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(28,25,23,0.07);
  transition: transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.wide-banner:active { transform: scale(0.97); }

.wide-banner-img {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
}
.wide-banner-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.wide-banner-text { flex: 1; min-width: 0; }
.wide-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.3px;
}
.wide-banner-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.wide-banner-arr {
  font-size: 22px;
  color: var(--text-hint);
  flex-shrink: 0;
  margin-right: 2px;
}

/* ── Diary Hero Banner ── */
.diary-hero-banner {
  position: relative;
  margin: 16px 16px 12px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4.8 / 1;
  box-shadow:
    0 12px 38px rgba(28,25,23,0.14),
    0 4px 12px rgba(28,25,23,0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: flex-end;
}
.diary-hero-banner:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(28,25,23,0.10);
}
.diary-hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.diary-hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(180,60,100,0.32) 0%,
    rgba(210,80,120,0.14) 55%,
    rgba(230,100,140,0.04) 100%
  );
  pointer-events: none;
}
.diary-hero-banner-content {
  position: relative;
  z-index: 2;
  padding: 6px 12px 12px 14px;
  flex: 1;
  align-self: flex-end;
  margin-bottom: 0;
}
.diary-hero-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.3px;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.30);
}
.diary-hero-banner-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.82);
  margin-top: 2px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.diary-hero-banner-arr {
  position: relative;
  z-index: 2;
  font-size: 26px;
  color: rgba(255,255,255,0.70);
  padding-right: 16px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Mini Pair (Тарифы + Реферал) ── */
.mini-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 16px 20px;
}
.mini-pair .img-tile {
  aspect-ratio: 2 / 1;
}

/* ── Mini Triple (3 колонки) ── */
.mini-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 0 16px 20px;
}
.mini-triple .img-tile {
  aspect-ratio: 4 / 3;
}
.mini-triple .img-tile-name {
  font-size: 12px;
}
.mini-triple .img-tile-sub {
  font-size: 9px;
}
.mini-triple .img-tile-body {
  padding: 7px 8px 9px;
}


.mini-tile {
  position: relative;
  background: var(--mt-bg, var(--surface));
  border: 1px solid var(--mt-border, var(--border));
  border-radius: 20px;
  overflow: hidden;
  padding: 14px 14px 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(28,25,23,0.07);
  transition: transform 0.18s ease;
  min-height: 120px;
  -webkit-tap-highlight-color: transparent;
}
.mini-tile:active { transform: scale(0.96); }

.mini-tile-img {
  position: absolute;
  inset: 0;
  opacity: 0.15;
}

.mini-tile-ico {
  font-size: 26px;
  margin-bottom: 6px;
  position: relative;
}
.mini-tile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  position: relative;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.3px;
}
.mini-tile-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 3px;
  position: relative;
  line-height: 1.3;
}

/* ══════════════════════════════════════════
   GLASS DEPTH · BORDERS · SHADOWS · BLIKS
   ══════════════════════════════════════════

   Rules:
   - Solid-bg elements → visible outer border
     (rgba(255,255,255,0.60) outer +
      inset 0 1px 0 white highlight)
   - Photo cards → border only (no glass layer
     over the image)
   - All interactive → deep layered shadow
   - Blik = diagonal 135deg glare top-left,
     bright 0%→fade 40%, via ::after (or
     ::before when ::after is taken)
   ══════════════════════════════════════════ */

/* ── Tiles (solid frosted glass) ── */
.tile {
  background: rgba(255,255,255,0.76);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.62);
  box-shadow:
    0 12px 40px rgba(28,25,23,0.16),
    0 4px 12px rgba(28,25,23,0.09),
    0 1px 3px rgba(28,25,23,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.05);
}
.tile::after {
  height: 100%;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.88) 0%,
    rgba(255,255,255,0.42) 20%,
    rgba(255,255,255,0.08) 40%,
    rgba(255,255,255,0) 55%);
}
.tile:active {
  box-shadow:
    0 3px 10px rgba(28,25,23,0.10),
    inset 0 1px 0 rgba(255,255,255,0.90),
    inset 0 2px 6px rgba(28,25,23,0.06);
}

/* ── Category cards — photo-based, NO glass overlay ── */
.cat-card {
  border: 1.5px solid rgba(255,255,255,0.55);
  box-shadow:
    0 5px 16px rgba(28,25,23,0.13),
    0 2px 5px rgba(28,25,23,0.07),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ── Image tiles — shadow upgrade ── */
.img-tile {
  box-shadow:
    0 12px 38px rgba(28,25,23,0.14),
    0 4px 12px rgba(28,25,23,0.08),
    0 1px 3px rgba(28,25,23,0.05),
    inset 0 1.5px 0 rgba(255,255,255,0.55);
}
.img-tile-body {
  overflow: visible;
}

/* ── Hero cards — photo-based, NO glass overlay ── */
.hero-card {
  border: 1.5px solid rgba(255,255,255,0.48);
  box-shadow:
    0 12px 40px rgba(28,25,23,0.20),
    0 4px 12px rgba(28,25,23,0.12),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

/* ── Wide banners ── */
.wide-banner {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 10px 36px rgba(28,25,23,0.13),
    0 3px 10px rgba(28,25,23,0.07),
    0 1px 3px rgba(28,25,23,0.04),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.wide-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.34) 22%,
    rgba(255,255,255,0.05) 42%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* ── Mini tiles ── */
.mini-tile {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 10px 32px rgba(28,25,23,0.13),
    0 3px 9px rgba(28,25,23,0.08),
    0 1px 3px rgba(28,25,23,0.04),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.mini-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.38) 20%,
    rgba(255,255,255,0.06) 42%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Primary button ── */
.btn-pri {
  position: relative;
  overflow: hidden;
  background: var(--gradient-btn);
  border: 1.5px solid rgba(255,255,255,0.40);
  box-shadow:
    0 8px 28px rgba(107,130,235,0.45),
    0 3px 10px rgba(107,150,220,0.30),
    0 1px 3px rgba(107,130,235,0.20),
    inset 0 1.5px 0 rgba(255,255,255,0.50),
    inset 0 -2px 0 rgba(0,0,0,0.16);
}
.btn-pri::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0) 56%);
  pointer-events: none;
  border-radius: inherit;
}
.btn-pri:active {
  box-shadow:
    0 2px 8px rgba(107,186,216,0.28),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 2px 6px rgba(0,0,0,0.12);
}

/* ── Fridge / full-width liquid-glass button ── */
.btn-fridge {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.2px;
  color: #fff;
  cursor: pointer;
  /* Liquid glass base — blue-purple tint */
  background: linear-gradient(135deg,
    rgba(130,110,240,0.55) 0%,
    rgba(107,150,235,0.50) 50%,
    rgba(90,180,220,0.45) 100%);
  backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  -webkit-backdrop-filter: blur(36px) saturate(200%) brightness(1.12);
  border: 1.5px solid rgba(255,255,255,0.52);
  border-bottom-color: rgba(255,255,255,0.22);
  box-shadow:
    0 10px 32px rgba(107,130,235,0.40),
    0 4px 12px rgba(107,130,235,0.22),
    0 1px 3px rgba(80,100,200,0.18),
    inset 0 1.5px 0 rgba(255,255,255,0.70),
    inset 0 -2px 0 rgba(0,0,0,0.10);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
/* Specular top shimmer */
.btn-fridge::before {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.95) 30%,
    rgba(255,255,255,0.95) 70%,
    transparent 100%);
  border-radius: 100px;
  pointer-events: none;
}
/* Inner glass highlight */
.btn-fridge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.28) 0%,
    rgba(255,255,255,0.06) 48%,
    rgba(255,255,255,0.00) 100%);
  pointer-events: none;
}
.btn-fridge:active {
  transform: scale(0.98);
  opacity: 0.88;
  box-shadow:
    0 4px 12px rgba(107,130,235,0.28),
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 2px 8px rgba(0,0,0,0.10);
}
.btn-fridge-icon {
  font-size: 22px;
  line-height: 1;
  z-index: 1;
}
.btn-fridge-label {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}
.btn-fridge-label span:first-child {
  font-size: 16px;
  font-weight: 700;
}
.btn-fridge-label span:last-child {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.82;
  letter-spacing: 0.1px;
}

/* ── Outline button ── */
.btn-out {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.62);
  box-shadow:
    0 5px 18px rgba(28,25,23,0.10),
    0 2px 6px rgba(28,25,23,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.btn-out::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.36) 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Chips / quick-action pills ── */
.ai-cap, .chip {
  position: relative;
  overflow: visible;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 4px 16px rgba(28,25,23,0.11),
    0 1px 4px rgba(28,25,23,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.ai-cap::after, .chip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.38) 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0) 60%);
  pointer-events: none;
  border-radius: inherit;
}
.ai-cap:active, .chip:active {
  box-shadow:
    0 1px 5px rgba(28,25,23,0.08),
    inset 0 1px 0 rgba(255,255,255,0.80),
    inset 0 2px 5px rgba(28,25,23,0.08);
}

/* ── Child / timer / sounds pills ── */
.child-pill, .child-chip, .sounds-timer-chip, .diary-tab, .period-btn {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 3px 12px rgba(28,25,23,0.10),
    0 1px 3px rgba(28,25,23,0.05),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.child-pill::after, .child-chip::after,
.sounds-timer-chip::after, .diary-tab::after, .period-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.34) 0%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Benefits chips ── */
.benefits-chip {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,245,210,0.95) 0%, rgba(255,232,160,0.82) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(210,155,30,0.45);
  color: #7A5500;
  box-shadow:
    0 3px 12px rgba(180,120,0,0.15),
    0 1px 3px rgba(180,120,0,0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.80);
}
.benefits-chip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%,
    rgba(255,230,100,0.08) 50%,
    rgba(255,255,255,0) 70%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Sound cards ── */
.sound-card {
  position: relative;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 7px 24px rgba(28,25,23,0.13),
    0 2px 7px rgba(28,25,23,0.07),
    0 1px 3px rgba(28,25,23,0.04),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.sound-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.36) 22%,
    rgba(255,255,255,0.05) 44%,
    rgba(255,255,255,0) 60%);
  pointer-events: none;
  border-radius: var(--radius);
  z-index: 0;
}

/* ── Neuro / style cards ── */
.neuro-style-card, .style-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 6px 22px rgba(28,25,23,0.12),
    0 2px 7px rgba(28,25,23,0.07),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.neuro-style-card::after, .style-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.82) 0%,
    rgba(255,255,255,0.30) 22%,
    rgba(255,255,255,0.04) 46%,
    rgba(255,255,255,0) 60%);
  pointer-events: none;
  border-radius: inherit;
}
.neuro-style-btn {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 5px 18px rgba(28,25,23,0.11),
    0 2px 5px rgba(28,25,23,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.neuro-style-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.32) 0%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Doc items & doc cards ── */
.doc-item, .doc-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 5px 18px rgba(28,25,23,0.11),
    0 2px 6px rgba(28,25,23,0.06),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.doc-item::after, .doc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.80) 0%,
    rgba(255,255,255,0.26) 24%,
    rgba(255,255,255,0.04) 46%,
    rgba(255,255,255,0) 60%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Price cards ── */
.price-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 10px 36px rgba(28,25,23,0.13),
    0 3px 10px rgba(28,25,23,0.07),
    0 1px 3px rgba(28,25,23,0.04),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.34) 22%,
    rgba(255,255,255,0.05) 42%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* ── Pricing buttons ── */
.price-btn {
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.38);
  box-shadow:
    0 5px 18px rgba(28,25,23,0.12),
    0 2px 6px rgba(28,25,23,0.07),
    inset 0 1.5px 0 rgba(255,255,255,0.60),
    inset 0 -2px 0 rgba(0,0,0,0.08);
}
.price-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.26) 0%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0) 60%);
  pointer-events: none;
  border-radius: inherit;
}
.price-btn.starter-btn {
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    0 8px 26px rgba(107,186,216,0.48),
    0 3px 9px rgba(107,186,216,0.28),
    inset 0 1.5px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(0,0,0,0.14);
}
.price-btn.prem-btn {
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    0 8px 26px rgba(74,144,217,0.48),
    0 3px 9px rgba(74,144,217,0.28),
    inset 0 1.5px 0 rgba(255,255,255,0.45),
    inset 0 -2px 0 rgba(0,0,0,0.14);
}

/* ── Plan change button ── */
.plan-change-btn {
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,0.38);
  box-shadow:
    0 8px 26px rgba(107,186,216,0.48),
    0 3px 9px rgba(107,186,216,0.26),
    inset 0 1.5px 0 rgba(255,255,255,0.42),
    inset 0 -2px 0 rgba(0,0,0,0.14);
}
.plan-change-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.26) 0%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Tracker cards ── */
.tr-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255,255,255,0.90);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 8px 28px rgba(28,25,23,0.12),
    0 3px 9px rgba(28,25,23,0.07),
    0 1px 3px rgba(28,25,23,0.04),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.tr-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.82) 0%,
    rgba(255,255,255,0.28) 20%,
    rgba(255,255,255,0.04) 42%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── Form cards ── */
.form-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.88);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 6px 22px rgba(28,25,23,0.10),
    0 2px 6px rgba(28,25,23,0.05),
    inset 0 1.5px 0 rgba(255,255,255,1);
}
.form-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.72) 0%,
    rgba(255,255,255,0.22) 22%,
    rgba(255,255,255,0.04) 44%,
    rgba(255,255,255,0) 58%);
  pointer-events: none;
  border-radius: inherit;
}

/* ── AI / content banners ── */
.ai-banner, .neuro-banner, .moms-chat-banner,
.price-banner, .ref-home-banner, .sounds-home-banner {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.60);
  box-shadow:
    0 10px 36px rgba(28,25,23,0.14),
    0 3px 10px rgba(28,25,23,0.08),
    0 1px 3px rgba(28,25,23,0.05),
    inset 0 1.5px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(28,25,23,0.04);
}
.ai-banner::after, .neuro-banner::after, .moms-chat-banner::after,
.price-banner::after, .ref-home-banner::after, .sounds-home-banner::after {
  height: 100%;
  background: none;
  border-radius: inherit;
}

/* ── No shimmer modifier for specific banners/tiles ── */
.wide-banner--no-shimmer::after { background: none !important; }
.mini-tile--no-shimmer::after   { background: none !important; content: none !important; }
.mini-tile--no-shimmer {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
  border: none;
  box-shadow: 0 2px 12px rgba(28,25,23,0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 12px;
}
.mini-tile--no-shimmer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0.10) 55%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}
.mini-tile--no-shimmer .mini-tile-img {
  opacity: 1;
}
.mini-tile--no-shimmer .mini-tile-name {
  color: #fff;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  position: relative;
  width: fit-content;
  align-self: flex-start;
  margin: 0 0 0 12px;
  background: rgba(0,0,0,0.10);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 5px 10px 4px;
  border-radius: 8px 8px 0 0;
}
.mini-tile--no-shimmer .mini-tile-sub {
  color: rgba(255,255,255,0.90);
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.20);
  position: relative;
  width: fit-content;
  align-self: flex-start;
  margin: 0 0 0 12px;
  background: rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px 5px;
  border-radius: 0 0 8px 8px;
}

/* ── Remove all glare/blik overlays globally ── */
.tile::after,
.img-tile-body::after,
.mini-tile::after,
.btn-pri::after,
.btn-out::after,
.ai-cap::after, .chip::after,
.child-pill::after, .child-chip::after,
.sounds-timer-chip::after, .diary-tab::after, .period-btn::after,
.benefits-chip::after,
.sound-card::before,
.neuro-style-card::after, .style-card::after,
.neuro-style-btn::after,
.doc-item::after, .doc-card::after,
.price-card::before,
.price-btn::after,
.plan-change-btn::after,
.tr-card::after,
.form-card::after,
.ai-banner::after, .neuro-banner::after, .moms-chat-banner::after,
.price-banner::after, .ref-home-banner::after, .sounds-home-banner::after {
  background: none !important;
}

/* ══════════════════════════════════════════
   WORKOUT TABS
══════════════════════════════════════════ */
.workout-tabs {
  display: flex;
  gap: 0;
  background: #f5f4f2;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
}
.workout-tab-btn {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  letter-spacing: 0.1px;
}
.workout-tab-btn.active {
  color: #C084E8;
  border-bottom-color: #C084E8;
}

/* Tab content areas */
.workout-tab-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
#workout-tab-kbzhu {
  overflow-y: auto;
  padding: 14px 14px 100px;
  gap: 0;
}

/* ══════════════════════════════════════════
   КБЖУ — Сводка дня
══════════════════════════════════════════ */
.kbzhu-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.kbzhu-cal-card {
  background: linear-gradient(135deg, #fce8f5 0%, #ede8fc 100%);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(210,130,200,0.2);
}
.kbzhu-cal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.kbzhu-cal-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}
.kbzhu-cal-fraction {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-dark);
  font-family: 'Unbounded', sans-serif;
}

/* Macro cards row */
.kbzhu-macros-row {
  display: flex;
  gap: 8px;
}
.kbzhu-macro-card {
  flex: 1;
  border-radius: 14px;
  padding: 12px 10px 10px;
  border: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}
.kbzhu-prot { background: #edfaf4; border-color: rgba(40,180,120,0.18); }
.kbzhu-fat  { background: #fff8ec; border-color: rgba(245,170,60,0.22); }
.kbzhu-carb { background: #eef4ff; border-color: rgba(80,130,220,0.18); }

.kbzhu-macro-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  font-family: 'Unbounded', sans-serif;
  line-height: 1;
  margin-bottom: 6px;
}
.kbzhu-macro-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: inherit;
  margin-left: 1px;
}
.kbzhu-macro-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.kbzhu-macro-sub {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Progress bars */
.kbzhu-bar-bg {
  height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 4px 0 0;
}
.kbzhu-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
  max-width: 100%;
}
.kbzhu-bar-kcal { background: linear-gradient(90deg, #F4A0C0, #C084E8); }
.kbzhu-bar-p    { background: #34c77a; }
.kbzhu-bar-f    { background: #f5a830; }
.kbzhu-bar-c    { background: #4e8ced; }

/* 3-column form row */
.kbzhu-form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.kbzhu-form-col { flex: 1; }
.kbzhu-form-col-half { flex: 1; }

/* Recommendations box */
.kbzhu-rec {
  margin-top: 14px;
  background: #fdf6ff;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(200,140,230,0.2);
}
.kbzhu-rec-title {
  font-size: 12px;
  font-weight: 700;
  color: #a060c8;
  margin-bottom: 8px;
}
.kbzhu-rec-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.kbzhu-rec-grid strong { color: var(--text-dark); }

/* Meal list item */
.kbzhu-meal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-1);
  border-radius: 12px;
  margin-bottom: 6px;
}
.kbzhu-meal-ico {
  font-size: 22px;
  flex-shrink: 0;
}
.kbzhu-meal-body {
  flex: 1;
  min-width: 0;
}
.kbzhu-meal-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kbzhu-meal-macros {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kbzhu-meal-macros .km-kcal { font-weight: 700; color: #C084E8; }
.kbzhu-meal-macros .km-p    { color: #34c77a; font-weight: 600; }
.kbzhu-meal-macros .km-f    { color: #f5a830; font-weight: 600; }
.kbzhu-meal-macros .km-c    { color: #4e8ced; font-weight: 600; }
.kbzhu-meal-del {
  background: none;
  border: none;
  font-size: 18px;
  color: #ccc;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.kbzhu-meal-del:active { color: #e74c3c; }

/* Shimmer removed — no ::before shine on buttons */
.btn-pri::before,
.btn-out::before,
.price-btn::before,
.period-btn::before,
.child-pill::before, .child-chip::before,
.add-child-pill::before, .add-child-btn::before,
.plan-change-btn::before,
.neuro-style-btn::before,
.feed-quick-btn::before,
.sleep-wake-btn::before,
.ref-share-btn::before, .ref-copy-btn::before {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   КБЖУ — Параметры тела
   ═══════════════════════════════════════════════════════════════════════════ */
.kbzhu-params-card { border-top: 3px solid var(--brand-primary); }
.kbzhu-form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.kbzhu-form-col { flex: 1; min-width: 0; }
.kbzhu-form-col-half { flex: 1; }
.kbzhu-bf-row { margin-top: 10px; }
.kbzhu-bf-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 14px; color: var(--text-primary);
  padding: 10px; background: var(--surface-2); border-radius: 10px;
}
.kbzhu-bf-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.kbzhu-bf-hint { font-size: 12px; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════
   ТРЕКЕР ПРИКОРМА
   ═══════════════════════════════════════════════════════════════════════════ */
body.on-prikorм #screen-prikorм { --screen-accent: #FF8C00; }

/* ── Feed tabs ── */
.feed-tabs {
  display: flex; gap: 8px;
  margin: 0 16px 14px;
}
.feed-tab {
  flex: 1; padding: 9px 6px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.feed-tab.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(248,193,204,0.4);
}

/* ── Pregnancy home banner ── */
.pregnancy-home-banner-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #c06ad6 0%, #e896f0 50%, #f5c6fa 100%);
}
.pregnancy-home-banner-bg::after {
  content: '🤰';
  position: absolute; right: 52px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px; opacity: 0.35;
  pointer-events: none;
}

.prikorм-legend {
  display: flex; gap: 16px; align-items: center;
  padding: 10px 14px; background: var(--surface-2);
  border-radius: 12px; margin: 12px 0;
  font-size: 13px; font-weight: 600;
}
.prikorм-legend-item { display: flex; align-items: center; gap: 4px; }

.prikorм-category {
  background: var(--surface-1); border-radius: 16px;
  margin-bottom: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.prikorм-category-title {
  font-size: 15px; font-weight: 700;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.prikorм-age-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-secondary);
  padding: 8px 14px 4px;
}
.prikorм-foods-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 14px 12px;
}
.prikorм-food-item {
  font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.prikorм-food-item:active { transform: scale(0.95); }
.prikorм-food-item.prikorм-tried {
  background: #e8f5e9; border-color: #4caf50; color: #2e7d32;
}
.prikorм-food-item.prikorм-allergy {
  background: #fdecea; border-color: #e53935; color: #c62828;
}

/* ═══════════════════════════════════════════════════════════════════════════
   БЕРЕМЕННОСТЬ — экран
   ═══════════════════════════════════════════════════════════════════════════ */
body.on-pregnancy #screen-pregnancy { --screen-accent: #B44ABE; }

.pregnancy-setup-card {
  background: var(--surface-1); border-radius: 20px;
  padding: 24px; margin: 16px 0;
  box-shadow: 0 4px 20px rgba(180,74,190,0.12);
}

/* Week card */
.preg-week-card {
  background: linear-gradient(135deg, #f3e8ff, #fdf0ff);
  border-radius: 20px; padding: 18px;
  margin: 14px 0;
  box-shadow: 0 4px 20px rgba(180,74,190,0.15);
}
.preg-week-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 14px;
}
.preg-week-label { font-size: 11px; font-weight: 600; color: #9c27b0; text-transform: uppercase; letter-spacing: 0.5px; }
.preg-week-num { font-size: 24px; font-weight: 800; color: #6a1b9a; margin-top: 2px; }
.preg-week-controls { display: flex; gap: 8px; }
.preg-week-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #ce93d8; background: #fff;
  font-size: 20px; font-weight: 700; color: #7b1fa2;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.preg-week-btn:active { background: #f3e8ff; transform: scale(0.95); }
.preg-fruit-row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.6); border-radius: 12px;
  padding: 12px; margin-bottom: 12px;
}
.preg-fruit-emoji { font-size: 44px; line-height: 1; }
.preg-fruit-name { font-size: 14px; font-weight: 700; color: #4a148c; }
.preg-fruit-size { font-size: 13px; color: #7b1fa2; margin-top: 2px; }
.preg-dev-text { font-size: 14px; color: #4a148c; line-height: 1.5; }
.preg-trimester { font-size: 12px; color: #9c27b0; font-weight: 600; margin-top: 8px; }

/* Counter cards */
.preg-counter-card {
  background: var(--surface-1); border-radius: 18px;
  padding: 16px; margin: 10px 0;
  box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
.preg-counter-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.preg-counter-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.preg-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.preg-counter-btn {
  flex: 1; padding: 12px; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; border: none;
  transition: all 0.15s;
}
.preg-btn-main {
  background: linear-gradient(135deg, #B44ABE, #E87ADE);
  color: #fff; box-shadow: 0 4px 14px rgba(180,74,190,0.3);
}
.preg-btn-main:active { transform: scale(0.97); opacity: 0.88; }
.preg-btn-reset {
  background: var(--surface-2); color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

/* Contractions */
.preg-contractions-list { margin: 8px 0; max-height: 180px; overflow-y: auto; }
.preg-contraction-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; border-radius: 8px;
  background: var(--surface-2); margin-bottom: 4px;
  font-size: 13px; font-weight: 600;
}
.preg-cont-interval { font-size: 12px; color: var(--text-secondary); }

/* Kicks */
.preg-kicks-display {
  display: flex; align-items: baseline; gap: 8px; justify-content: center;
  padding: 10px 0 4px;
}
.preg-kicks-count { font-size: 52px; font-weight: 800; color: #B44ABE; line-height: 1; }
.preg-kicks-unit { font-size: 16px; color: var(--text-secondary); }
.preg-kicks-session { font-size: 12px; color: var(--text-secondary); text-align: center; margin-bottom: 4px; }

/* UZI photos */
.preg-uzi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px;
}
.preg-uzi-item { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.preg-uzi-img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.preg-uzi-week {
  position: absolute; bottom: 4px; left: 4px;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
}
.preg-uzi-empty { color: var(--text-secondary); font-size: 13px; padding: 10px 0; }

/* Onboarding pregnancy week badge */
.ob-preg-weeks-badge {
  background: linear-gradient(135deg, #f3e8ff, #fdf0ff);
  border: 2px solid #ce93d8;
  border-radius: 16px; padding: 16px;
  text-align: center; font-size: 18px;
  color: #4a148c; font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ПРИКОРМ — category image banners
   ═══════════════════════════════════════════════════════════════════════════ */
.prikorм-cat-banner {
  position: relative; height: 110px; overflow: hidden;
  border-radius: 0; /* inside .prikorм-category which has border-radius */
}
.prikorм-cat-img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.prikorм-cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.52) 100%);
}
.prikorм-cat-banner-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.prikorм-cat-banner-title {
  font-size: 16px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.prikorм-cat-banner-stats {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end;
}
.prikorм-stat-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.prikorм-stat-tried  { background: rgba(76,175,80,0.6); }
.prikorм-stat-allergy { background: rgba(229,57,53,0.6); }
.prikorм-stat-total  { background: rgba(255,255,255,0.25); }

/* ═══════════════════════════════════════════════════════════════════════════
   БЕРЕМЕННОСТЬ — hero image banner
   ═══════════════════════════════════════════════════════════════════════════ */
.preg-hero-banner {
  position: relative; height: 160px; overflow: hidden;
  border-radius: 18px; margin: 12px 0 6px;
  box-shadow: 0 6px 24px rgba(180,74,190,0.22);
}
.preg-hero-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.preg-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(180,74,190,0.25) 0%, rgba(100,20,160,0.45) 100%);
}
.preg-hero-text {
  position: absolute; bottom: 14px; left: 0; right: 0;
  text-align: center; color: #fff;
  font-size: 14px; font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
  letter-spacing: 0.2px;
}


/* Кнопка «Малыш родился» */
.preg-born-btn {
  width: 100%; margin: 10px 0 14px;
  padding: 14px;
  background: #fff0f0; color: #c62828;
  border: 2px solid #e53e3e;
  border-radius: 16px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.preg-born-btn:active { background: #fdecea; transform: scale(0.98); }
