/* ==========================================================================
   ПЧЁЛКА-НАПОМИНАЛКА — ANTI-AI EDITORIAL DESIGN SYSTEM
   Warm Honey, Cream Parchment, Botanical Sage & Charcoal Ink
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-app: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4EFE6;
  --bg-accent: #FEF3C7;
  --border-subtle: #E8E2D5;
  --border-card: #DFD8C9;
  
  --text-primary: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #8C877D;
  --text-inverse: #FFFFFF;
  
  --honey-primary: #D97706;
  --honey-hover: #B45309;
  --honey-light: #FDE68A;
  --honey-glow: rgba(217, 119, 6, 0.12);
  
  --sage-primary: #2E4A3E;
  --sage-light: #E6EDE8;
  --sage-accent: #3F6854;
  
  --alert-red: #DC2626;
  --alert-red-bg: #FEE2E2;
  --sky-blue: #0284C7;
  --sky-blue-bg: #E0F2FE;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-accent: 'Outfit', sans-serif;

  /* Radii & Elevation */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --shadow-subtle: 0 1px 3px rgba(28, 25, 23, 0.04), 0 2px 8px rgba(28, 25, 23, 0.02);
  --shadow-card: 0 4px 14px rgba(28, 25, 23, 0.05);
  --shadow-elevated: 0 10px 25px -4px rgba(28, 25, 23, 0.08);

  /* Transitions */
  --anim-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --anim-smooth: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

button {
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: 2px solid #EA580C;
  outline-offset: 2px;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* App Frame (Optimized for Mobile & Mini App Viewport) */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.03);
  padding-bottom: 80px;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   HEADER & MASCOT
   -------------------------------------------------------------------------- */
.app-header {
  padding: 14px 16px 12px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mascot-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bee-illustration {
  width: 48px;
  height: 48px;
  background: var(--bg-accent);
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.bee-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 1px);
}

.bee-svg {
  filter: drop-shadow(0 2px 4px rgba(217, 119, 6, 0.2));
}

.bee-body {
  fill: #FBBF24;
}

.bee-stripe {
  fill: #1C1917;
}

.bee-wing {
  fill: #FFFFFF;
  opacity: 0.85;
  stroke: #CBD5E1;
  stroke-width: 1.2;
  transform-origin: center bottom;
  animation: flapWings 0.6s ease-in-out infinite alternate;
}

.right-wing {
  animation-delay: 0.1s;
}

@keyframes flapWings {
  0% { transform: rotate(-25deg) scaleY(0.9); }
  100% { transform: rotate(15deg) scaleY(1.1); }
}

.bee-eye {
  fill: #1C1917;
}

.bee-smile {
  stroke: #1C1917;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.bee-blush {
  fill: #F87171;
  opacity: 0.6;
}

.bee-antenna {
  stroke: #1C1917;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

/* Fox SVG Styles & Animations */
.fox-svg {
  filter: drop-shadow(0 4px 8px rgba(234, 88, 12, 0.2));
  animation: petBreathe 3s ease-in-out infinite;
}

.fox-tail {
  transform-origin: 30% 85%;
  animation: wagTail 1.8s ease-in-out infinite alternate;
}

@keyframes wagTail {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(16deg); }
}

.fox-ear-left {
  transform-origin: 35% 30%;
  animation: twitchEar 3.5s ease-in-out infinite;
}

.fox-ear-right {
  transform-origin: 65% 30%;
  animation: twitchEar 3.5s ease-in-out infinite 0.4s;
}

@keyframes twitchEar {
  0%, 88% { transform: rotate(0deg); }
  92% { transform: rotate(-6deg); }
  96% { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}

@keyframes petBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.mascot-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--anim-fast);
}

.mascot-badge:hover {
  opacity: 0.9;
}

.mascot-illustration {
  width: 44px;
  height: 44px;
  background: var(--bg-accent);
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.12);
  transition: transform var(--anim-fast);
}

.mascot-badge:hover .mascot-illustration {
  transform: scale(1.06);
}

.header-mascot-emoji {
  display: inline-block;
  font-size: 1.5rem;
}

.mascot-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.mascot-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* User stats pills */
.stats-pills {
  display: flex;
  gap: 6px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.honey-pill {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: var(--honey-hover);
}

.nectar-pill {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0369A1;
}

.streak-pill {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #B91C1C;
}

/* --------------------------------------------------------------------------
   MEADOW / GARDEN PROGRESS CARD
   -------------------------------------------------------------------------- */
.meadow-banner {
  background: linear-gradient(135deg, #FBF8F2 0%, #F5EEDB 100%);
  border: 1px solid #E6DEC9;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.meadow-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.meadow-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sage-accent);
  background: rgba(46, 74, 62, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.meadow-headline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.meadow-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.35;
}

/* Honey Jar Visual */
.honey-jar-visual {
  flex-shrink: 0;
}

.jar-glass {
  width: 44px;
  height: 52px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #D97706;
  border-radius: 6px 6px 14px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.8), 0 2px 6px rgba(217, 119, 6, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jar-lid {
  position: absolute;
  top: 0;
  left: 3px;
  right: 3px;
  height: 6px;
  background: #B45309;
  border-radius: 3px 3px 0 0;
}

.jar-honey {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0 0 10px 10px;
}

.jar-honey-percent {
  position: relative;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  color: #1C1917;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.meadow-flowers {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 8px;
  border-top: 1px dashed rgba(217, 119, 6, 0.2);
  font-size: 1.25rem;
}

.flower-item {
  display: inline-block;
  transition: transform var(--anim-fast);
  cursor: default;
}

.flower-item:hover {
  transform: scale(1.25) rotate(8deg);
}

/* --------------------------------------------------------------------------
   NAVIGATION TABS
   -------------------------------------------------------------------------- */
.nav-tabs {
  display: flex;
  padding: 8px 12px;
  gap: 5px;
  background: var(--bg-app);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.nav-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 4px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all var(--anim-fast);
}

.nav-tab .tab-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.nav-tab.active {
  background: var(--sage-primary);
  border-color: var(--sage-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(46, 74, 62, 0.2);
}

/* --------------------------------------------------------------------------
   MAIN SECTIONS & PANES
   -------------------------------------------------------------------------- */
.main-content {
  padding: 12px 14px 24px 14px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tab-pane {
  display: none !important;
}

.tab-pane.active {
  display: block !important;
  animation: fadeIn 0.2s ease-out;
}

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

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   INTERACTIVE TAMAGOTCHI COMPANION CARD (TODAY TAB)
   -------------------------------------------------------------------------- */
.companion-card {
  background: var(--bg-card);
  border: 1px solid #EAE4D7;
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px 16px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(28, 25, 23, 0.04);
  position: relative;
  overflow: hidden;
  transition: border-color var(--anim-smooth);
}

.companion-pet-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.companion-stage {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 100%);
  border: 1.5px solid #FED7AA;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: transform var(--anim-fast);
  padding: 4px;
}

.companion-main-card.theme-bee .companion-stage {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #FDE68A;
}

.companion-stage:hover {
  transform: scale(1.03);
}

.companion-stage:active,
.companion-stage.is-petting {
  animation: petBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes petBounce {
  0% { transform: scale(1); }
  35% { transform: translateY(-10px) scale(1.12); }
  65% { transform: translateY(2px) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}

.pet-visual {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Storybook Pet Artwork & Animations */
.pet-img-wrap {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pet-img {
  grid-area: 1 / 1;
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(40, 20, 10, 0.10));
  pointer-events: none;
  user-select: none;
  transform-origin: 50% 90%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease-out;
  will-change: opacity, transform;
}

.companion-stage .pet-img {
  width: 86px;
  height: 86px;
}

.pet-img.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pet-img:not(.is-active) {
  animation-play-state: paused !important;
}

.pet-img-wrap.is-large .pet-img {
  width: 180px;
  height: 180px;
  filter: drop-shadow(0 10px 24px rgba(40, 20, 10, 0.12));
}

/* Pose specific animation behaviors */
.fox-pet-img.pose-idle,
.pet-img.pose-idle {
  animation: foxIdleFloat 3.8s ease-in-out infinite;
}

.fox-pet-img.pose-eating,
.pet-img.pose-eating {
  animation: foxEatingMunch 1.3s ease-in-out infinite;
}

.fox-pet-img.pose-happy,
.pet-img.pose-happy {
  animation: foxHappyDance 1.5s ease-in-out infinite;
}

.fox-pet-img.pose-sleep,
.pet-img.pose-sleep {
  animation: foxSleepBreathe 4.8s ease-in-out infinite;
}

/* Bee specific pose animations */
.bee-pet-img.pose-idle {
  animation: beeIdleHover 3.4s ease-in-out infinite;
}

.bee-pet-img.pose-happy {
  animation: beeHappyBuzz 1.35s ease-in-out infinite;
}

.bee-pet-img.pose-eating {
  animation: beeHoneySip 1.4s ease-in-out infinite;
}

.bee-pet-img.pose-sleep {
  animation: beePetalSleep 4.6s ease-in-out infinite;
}

/* Interactive Reactions on Tap & Care */
.companion-stage:active .fox-pet-img,
.companion-stage.is-petting .fox-pet-img,
.room-stage:active .fox-pet-img,
.room-stage.is-petting .fox-pet-img {
  animation: foxPetBounce 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.companion-stage:active .bee-pet-img,
.companion-stage.is-petting .bee-pet-img,
.room-stage:active .bee-pet-img,
.room-stage.is-petting .bee-pet-img {
  animation: beePetBuzz 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.room-stage.is-eating .fox-pet-img {
  animation: foxMunchTreat 0.8s ease-in-out infinite !important;
}

.room-stage.is-eating .bee-pet-img {
  animation: beeHoneyTreat 0.9s ease-in-out infinite !important;
}

/* Animated Zzz floating bubbles during sleep */
.pet-zzz-layer {
  position: absolute;
  top: 6%;
  right: 18%;
  pointer-events: none;
  z-index: 6;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-out;
}

.pet-zzz-layer.is-active {
  opacity: 1;
  visibility: visible;
}

.zzz-letter {
  font-family: var(--font-serif, 'Fraunces', serif);
  font-weight: 700;
  color: #7c3aed;
  opacity: 0;
  animation: floatZzz 3.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.zzz-letter.z1 {
  font-size: 0.85rem;
  animation-delay: 0s;
}

.zzz-letter.z2 {
  font-size: 1.15rem;
  animation-delay: 1.05s;
}

.zzz-letter.z3 {
  font-size: 1.45rem;
  animation-delay: 2.1s;
}

@keyframes floatZzz {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6) rotate(-10deg);
  }
  25% {
    opacity: 0.85;
  }
  80% {
    opacity: 0.6;
    transform: translate(16px, -26px) scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 0;
    transform: translate(26px, -48px) scale(1.35) rotate(18deg);
  }
}

/* Animated Berry Crumbs during eating */
.pet-eating-crumbs {
  position: absolute;
  top: 32%;
  left: 42%;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-out;
}

.pet-eating-crumbs.is-active {
  opacity: 1;
  visibility: visible;
}

.crumb {
  position: absolute;
  font-size: 1rem;
  animation: crumbPop 1.25s ease-out infinite;
}

.crumb.c1 {
  left: -12px;
  top: -4px;
  animation-delay: 0s;
}

.crumb.c2 {
  left: 12px;
  top: -10px;
  animation-delay: 0.4s;
}

.crumb.c3 {
  left: -2px;
  top: 10px;
  animation-delay: 0.8s;
}

@keyframes crumbPop {
  0% {
    opacity: 0;
    transform: scale(0.2) translateY(0);
  }
  30% {
    opacity: 1;
    transform: scale(1.15) translateY(-8px) rotate(-12deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(-24px) rotate(20deg);
  }
}

/* Joy Sparks Layer */
.pet-joy-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease-out;
}

.pet-joy-sparks.is-active {
  opacity: 1;
  visibility: visible;
}

.spark {
  position: absolute;
  animation: sparkTwinkle 1.6s ease-in-out infinite alternate;
}

.spark.s1 { top: 12%; left: 16%; font-size: 1.15rem; animation-delay: 0s; }
.spark.s2 { top: 8%; right: 18%; font-size: 1.35rem; animation-delay: 0.5s; }
.spark.s3 { bottom: 22%; left: 18%; font-size: 1.05rem; animation-delay: 1.1s; }

@keyframes sparkTwinkle {
  0% {
    opacity: 0.3;
    transform: scale(0.85) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1.18) rotate(15deg);
  }
}

/* Keyframes */
@keyframes foxIdleFloat {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  35% {
    transform: translateY(-4px) scale(1.025, 0.985) rotate(0.8deg);
  }
  70% {
    transform: translateY(1px) scale(0.99, 1.015) rotate(-0.6deg);
  }
}

@keyframes foxEatingMunch {
  0%, 100% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
  50% {
    transform: scale(1.04, 0.96) translateY(2px) rotate(-1deg);
  }
}

@keyframes foxHappyDance {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  22% {
    transform: translateY(-11px) scale(0.95, 1.06) rotate(3deg);
  }
  45% {
    transform: translateY(0) scale(1.05, 0.95) rotate(-2deg);
  }
  65% {
    transform: translateY(-4px) scale(0.98, 1.02) rotate(1deg);
  }
  80% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes foxSleepBreathe {
  0%, 100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 4px 12px rgba(40, 20, 10, 0.08));
  }
  50% {
    transform: scale(1.035, 1.025) translateY(-2.2px);
    filter: drop-shadow(0 8px 20px rgba(40, 20, 10, 0.13));
  }
}

@keyframes foxPetBounce {
  0% { transform: scale(1) translateY(0) rotate(0deg); }
  25% { transform: scale(1.14, 0.86) translateY(4px) rotate(-3deg); }
  55% { transform: scale(0.94, 1.12) translateY(-14px) rotate(3deg); }
  75% { transform: scale(1.04, 0.96) translateY(-2px) rotate(-1deg); }
  100% { transform: scale(1) translateY(0) rotate(0deg); }
}

@keyframes foxMunchTreat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.06, 0.94) translateY(2.5px) rotate(-1.5deg); }
  70% { transform: scale(0.97, 1.04) translateY(-2px) rotate(1.5deg); }
}

/* Bee Keyframes */
@keyframes beeIdleHover {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  35% {
    transform: translateY(-5px) scale(1.025, 0.975) rotate(1.2deg);
  }
  70% {
    transform: translateY(1.5px) scale(0.99, 1.01) rotate(-1deg);
  }
}

@keyframes beeHappyBuzz {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  20% {
    transform: translateY(-13px) scale(0.95, 1.06) rotate(3.5deg);
  }
  40% {
    transform: translateY(-3px) scale(1.04, 0.96) rotate(-2.5deg);
  }
  60% {
    transform: translateY(-11px) scale(0.97, 1.04) rotate(2.5deg);
  }
  80% {
    transform: translateY(-2px) scale(1.02, 0.98) rotate(-1deg);
  }
}

@keyframes beeHoneySip {
  0%, 100% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
  40% {
    transform: scale(1.06, 0.94) translateY(2.2px) rotate(1.5deg);
  }
  75% {
    transform: scale(0.96, 1.03) translateY(-1.5px) rotate(-1deg);
  }
}

@keyframes beePetalSleep {
  0%, 100% {
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 4px 12px rgba(40, 20, 10, 0.08));
  }
  50% {
    transform: scale(1.03, 1.02) translateY(-2px);
    filter: drop-shadow(0 8px 20px rgba(40, 20, 10, 0.12));
  }
}

@keyframes beePetBuzz {
  0% { transform: scale(1) translateY(0) rotate(0deg); }
  25% { transform: scale(1.12, 0.88) translateY(3px) rotate(-2deg); }
  50% { transform: scale(0.93, 1.10) translateY(-16px) rotate(3.5deg); }
  75% { transform: scale(1.04, 0.96) translateY(-3px) rotate(-1deg); }
  100% { transform: scale(1) translateY(0) rotate(0deg); }
}

@keyframes beeHoneyTreat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.07, 0.93) translateY(3px) rotate(2deg); }
  70% { transform: scale(0.96, 1.04) translateY(-2px) rotate(-1.5deg); }
}

/* ==========================================================================
   🦊 CODE-GENERATED VECTOR FOX (ANATOMY-ONLY ARTICULATED ANIMATIONS)
   Zero image lag, 100% vector, individual body parts animate naturally
   ========================================================================== */

.fox-svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 6px 16px rgba(45, 26, 14, 0.10));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  user-select: none;
}

.pet-img-wrap.is-large .fox-svg {
  filter: drop-shadow(0 8px 20px rgba(45, 26, 14, 0.12));
}

/* 1. Tail Swaying & Wagging (Flame plume tail rotating at base: 72px 156px) */
.fox-tail-anim {
  transform-origin: 72px 156px;
  animation: foxTailSway 3.6s cubic-bezier(0.44, 0.05, 0.55, 0.95) infinite alternate;
}

@keyframes foxTailSway {
  0% { transform: rotate(-7deg); }
  50% { transform: rotate(3deg); }
  100% { transform: rotate(13deg); }
}

.fox-tail-anim.fast,
.fox-eating-svg .fox-tail-anim,
.fox-happy-svg .fox-tail-anim,
.companion-stage.is-petting .fox-tail-anim,
.room-stage.is-petting .fox-tail-anim {
  animation: foxTailSwayFast 0.52s cubic-bezier(0.35, 0.1, 0.25, 1) infinite alternate !important;
}

@keyframes foxTailSwayFast {
  0% { transform: rotate(-12deg) scale(1.03); }
  100% { transform: rotate(16deg) scale(0.97); }
}

/* 2. Micro-Breathing: Gentle lifelike motion of Torso & Head */
.fox-body-breathe {
  transform-origin: 100px 150px;
  animation: foxBodyBreathe 4.6s ease-in-out infinite;
}

@keyframes foxBodyBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.018, 1.012) translateY(-0.8px); }
}

.fox-head-breathe {
  transform-origin: 106px 106px;
  animation: foxHeadBreathe 4.6s ease-in-out infinite;
}

@keyframes foxHeadBreathe {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  32% { transform: rotate(1.5deg) translateY(-0.8px); }
  70% { transform: rotate(-1deg) translateY(0.4px); }
}

/* 3. Natural Asymmetric Ear Twitching */
.fox-ear-l,
.fox-ear-left {
  transform-origin: 78px 65px;
  animation: foxEarTwitchL 5.4s ease-in-out infinite;
}

.fox-ear-r,
.fox-ear-right {
  transform-origin: 128px 58px;
  animation: foxEarTwitchR 6.2s ease-in-out infinite;
}

@keyframes foxEarTwitchL {
  0%, 84%, 100% { transform: rotate(0deg); }
  87% { transform: rotate(-8deg); }
  91% { transform: rotate(4deg); }
  94% { transform: rotate(-2deg); }
}

@keyframes foxEarTwitchR {
  0%, 82%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(8deg); }
  89% { transform: rotate(-4deg); }
  93% { transform: rotate(2deg); }
}

/* 4. Blinking Soulful Eyes */
.fox-blink,
.fox-blinking-eyes {
  transform-origin: 108px 80px;
  animation: foxEyeBlink 4.4s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes foxEyeBlink {
  0%, 93%, 97%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}

/* 5. Eating Strawberry: Chewing Mouth, Bobbing Berry, Flying Crumbs */
.fox-chew-mouth,
.fox-chewing-mouth {
  transform-origin: 108px 94px;
  animation: foxMouthChew 0.38s ease-in-out infinite;
}

@keyframes foxMouthChew {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.18, 0.72) translateY(1.4px); }
}

.fox-chew-props,
.fox-eating-props {
  transform-origin: 104px 103px;
  animation: foxBerryBob 0.38s ease-in-out infinite alternate;
}

@keyframes foxBerryBob {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-2px) rotate(2deg); }
}

.crumb-anim {
  animation: crumbFloat 0.9s ease-out infinite;
}

@keyframes crumbFloat {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(6px, -12px) scale(1.2); }
}

/* 6. Sleep Pose: Gentle breathing in nest & rising Zzz */
.fox-sleep-svg .fox-curled-body,
.fox-curled-body.fox-breathe {
  transform-origin: 120px 150px;
  animation: foxSleepBreatheDeep 4.4s ease-in-out infinite;
}

@keyframes foxSleepBreatheDeep {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.025, 1.02) translateY(-1.5px);
  }
}

.fox-night-sky circle:first-child {
  animation: moonGlowPulse 3.6s ease-in-out infinite alternate;
}

@keyframes moonGlowPulse {
  0% { opacity: 0.55; transform: scale(0.92); }
  100% { opacity: 0.95; transform: scale(1.08); }
}

.zzz-text,
.fox-sleep-zzz .zzz-letter {
  font-family: var(--font-serif, 'Fraunces', serif);
  font-weight: 700;
  fill: #8B5CF6;
  opacity: 0;
  animation: floatZzzSvg 3.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

@keyframes floatZzzSvg {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  30% { opacity: 0.9; }
  80% { opacity: 0.7; transform: translate(14px, -20px) scale(1.1); }
  100% { opacity: 0; transform: translate(22px, -36px) scale(1.3); }
}

/* 7. Idle Curious Paw & Blueberry */
.fox-curious-paw {
  transform-origin: 108px 136px;
  animation: pawCuriousSway 3.8s ease-in-out infinite alternate;
}

@keyframes pawCuriousSway {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-5deg) translateY(-2px); }
}

.fox-tossed-berry {
  animation: tossedBerryHover 3.2s ease-in-out infinite alternate;
}

@keyframes tossedBerryHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* 8. Happy pose: Cheerful gentle hop & celebration sparks */
.fox-happy-svg {
  animation: foxHappyHop 2.2s ease-in-out infinite;
}

@keyframes foxHappyHop {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px) scale(1.01, 0.99); }
  55% { transform: translateY(0) scale(0.99, 1.01); }
}

.fox-happy-sparks path {
  animation: foxSparkTwinkle 1.4s ease-in-out infinite alternate;
}
.fox-happy-sparks path:nth-child(2) { animation-delay: 0.45s; }
.fox-happy-sparks path:nth-child(3) { animation-delay: 0.9s; }

@keyframes foxSparkTwinkle {
  0% { opacity: 0.3; transform: scale(0.8) rotate(0deg); }
  100% { opacity: 1; transform: scale(1.25) rotate(15deg); }
}

/* 9. Petting / Tapping Interaction (Anatomical reaction, NOT whole card shaking!) */
.companion-stage:active .fox-head-group,
.companion-stage.is-petting .fox-head-group,
.room-stage:active .fox-head-group,
.room-stage.is-petting .fox-head-group,
.pet-card:active .fox-head-group {
  animation: foxPetPerk 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes foxPetPerk {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.07, 0.93) rotate(5deg) translateY(-2px); }
  55% { transform: scale(0.96, 1.04) rotate(-3deg); }
  80% { transform: scale(1.02, 0.98) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.room-stage.is-petting:has(.fox-svg),
.companion-stage.is-petting:has(.fox-svg) {
  animation: none;
}

/* Room Mood Bar & Pills */
.room-mood-bar {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(217, 119, 6, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.room-mood-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--stone-500);
}

.room-mood-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.mood-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--stone-600);
  border: 1px solid var(--stone-200);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all var(--anim-fast);
}

.mood-pill-btn:hover {
  border-color: var(--amber-400);
  color: var(--amber-900);
  background: var(--amber-50);
  transform: translateY(-1px);
}

.mood-pill-btn.active {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.18);
  font-weight: 700;
}

.mood-pill-icon {
  font-size: 0.95rem;
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 1px);
  mix-blend-mode: multiply;
}

.select-badge-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Floating Hearts / Berries Particles */
.pet-particles,
.room-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

.particle-item {
  position: absolute;
  pointer-events: none;
  font-size: 1.25rem;
  animation: floatParticle 0.85s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  z-index: 10;
}

@keyframes floatParticle {
  0% {
    opacity: 1;
    transform: translateY(0) scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-26px) scale(1.25) rotate(14deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-56px) scale(1) rotate(-14deg);
  }
}

/* Speech Bubble */
.companion-bubble {
  flex: 1;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 14px;
  position: relative;
  box-shadow: 0 2px 6px rgba(28, 25, 23, 0.02);
}

.companion-bubble::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--bg-app);
  border-left: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.companion-bubble p {
  font-size: 0.84rem;
  color: var(--text-primary);
  line-height: 1.35;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.bubble-pop {
  animation: popText 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popText {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Companion Actions Bar */
.companion-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.btn-pet-action {
  background: #EA580C;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  transition: all var(--anim-fast);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-pet-action:hover {
  background: #C2410C;
  transform: translateY(-1px);
}

.btn-pet-action:active {
  transform: scale(0.95);
  outline: none;
}

.btn-pet-action:focus {
  outline: none;
}

.pet-btn-heart {
  display: inline-block;
  animation: heartPulse 1.4s ease-in-out infinite alternate;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.3); }
}

.companion-toggle-pill {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.toggle-pet-btn {
  border: 1px solid transparent;
  background: transparent;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--anim-fast);
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.toggle-pet-btn:focus,
.toggle-pet-btn:active {
  outline: none !important;
  box-shadow: none;
}

.toggle-pet-btn.active {
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.08);
  border-color: rgba(28, 25, 23, 0.06);
  outline: none !important;
}

/* --------------------------------------------------------------------------
   TAB 4: COMPANION ROOM (ПОЛЯНКА ИЛИ УЛЕЙ)
   -------------------------------------------------------------------------- */
.companion-room-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.room-hero-card {
  background: linear-gradient(135deg, #FFF7ED 0%, #FEF2F2 100%);
  border: 1.5px solid #FED7AA;
  border-radius: var(--radius-lg);
  padding: 18px 16px 16px 16px;
  position: relative;
  text-align: center;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.06);
}

.room-hero-card.theme-bee {
  background: linear-gradient(135deg, #FFFBEB 0%, #F0FDF4 100%);
  border-color: #FDE68A;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.06);
}

.room-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.room-habitat-badge {
  background: rgba(234, 88, 12, 0.1);
  color: #C2410C;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.room-hero-card.theme-bee .room-habitat-badge {
  background: rgba(217, 119, 6, 0.12);
  color: #B45309;
}

.room-mood-badge {
  background: rgba(46, 74, 62, 0.08);
  color: var(--sage-accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.room-stage {
  width: 140px;
  height: 140px;
  margin: 6px auto 14px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform var(--anim-fast);
}

.room-stage:hover {
  transform: scale(1.04);
}

.room-stage:active,
.room-stage.is-petting {
  animation: petBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.room-pet-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-speech-bubble {
  background: #FFFFFF;
  border: 1px solid #FED7AA;
  border-radius: 14px;
  padding: 10px 16px;
  margin: 0 auto 14px auto;
  max-width: 320px;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
}

.room-hero-card.theme-bee .room-speech-bubble {
  border-color: #FDE68A;
}

.room-speech-bubble p {
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.4;
  font-weight: 500;
}

.room-care-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.room-care-btn {
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Room Cards (Settings, Teaser) */
.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
}

.room-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.room-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Companion Selector Cards */
.companion-selector-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.companion-select-card {
  flex: 1;
  background: var(--bg-app);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all var(--anim-fast);
}

.companion-select-card:hover {
  border-color: #FED7AA;
  transform: translateY(-2px);
}

.companion-select-card.active {
  border-color: #EA580C;
  background: #FFF7ED;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.12);
}

#select-card-bee.active {
  border-color: var(--honey-primary);
  background: #FFFBEB;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.12);
}

.select-card-badge {
  font-size: 2rem;
  margin-bottom: 6px;
}

.select-card-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.select-card-info p {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.select-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border-subtle);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all var(--anim-fast);
}

.companion-select-card.active .select-card-check {
  background: #EA580C;
}

#select-card-bee.active .select-card-check {
  background: var(--honey-primary);
}

/* Name Your Companion */
.companion-name-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.name-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.name-input-group {
  display: flex;
  gap: 8px;
}

.name-input {
  flex: 1;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.85rem;
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.name-input:focus {
  outline: none;
  border-color: #EA580C;
}

/* Teaser Grid (Coming Soon) */
.teaser-header {
  margin-bottom: 12px;
}

.teaser-tag {
  display: inline-block;
  background: rgba(46, 74, 62, 0.1);
  color: var(--sage-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.teaser-item {
  background: var(--bg-app);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.85;
}

.teaser-icon {
  font-size: 1.5rem;
}

.teaser-info h5 {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 2px;
}

.teaser-lock {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   TODAY'S TIMELINE CARDS
   -------------------------------------------------------------------------- */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all var(--anim-fast);
  box-shadow: var(--shadow-subtle);
}

.timeline-card:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-card);
}

.timeline-card.is-done {
  background: #F9F8F5;
  border-color: #E6E1D3;
  opacity: 0.82;
}

.timeline-card.is-ringing {
  background: #FFFBEB;
  border-color: #F59E0B;
  box-shadow: 0 0 0 1px #F59E0B, var(--shadow-card);
  animation: pulseCard 2s infinite ease-in-out;
}

@keyframes pulseCard {
  0%, 100% { box-shadow: 0 0 0 1px #F59E0B, 0 4px 12px rgba(245, 158, 11, 0.15); }
  50% { box-shadow: 0 0 0 2px #D97706, 0 6px 18px rgba(217, 119, 6, 0.25); }
}

.timeline-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.timeline-card.is-done .timeline-icon-box {
  background: var(--sage-light);
  border-color: #C2D6C9;
}

.timeline-card.is-ringing .timeline-icon-box {
  background: #FEF3C7;
  border-color: #FCD34D;
}

.timeline-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.timeline-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.timeline-card.is-done .timeline-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.timeline-dosage {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Action button for dose */
.btn-dose-check {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: #FFFFFF;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--anim-fast);
  flex-shrink: 0;
}

.btn-dose-check:hover {
  border-color: var(--honey-primary);
  background: var(--bg-accent);
  color: var(--honey-hover);
  transform: scale(1.05);
}

.btn-dose-check.checked {
  background: var(--sage-primary);
  border-color: var(--sage-primary);
  color: #FFFFFF;
  pointer-events: none;
}

.ringing-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #FDE68A;
}

/* --------------------------------------------------------------------------
   REMINDERS LIST CARDS
   -------------------------------------------------------------------------- */
.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reminder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-subtle);
}

.reminder-card.is-paused {
  opacity: 0.6;
  background: #FAF9F6;
}

.reminder-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reminder-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reminder-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.reminder-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reminder-card-dosage {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.reminder-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.meta-chip.nag-chip {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #B45309;
}

.reminder-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.action-links {
  display: flex;
  gap: 10px;
}

.btn-link {
  background: none;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all var(--anim-fast);
}

.btn-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.btn-link.btn-danger:hover {
  color: var(--alert-red);
  background: var(--alert-red-bg);
}

/* --------------------------------------------------------------------------
   SWITCH TOGGLE
   -------------------------------------------------------------------------- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #D1D5DB;
  transition: var(--anim-fast);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--anim-fast);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .toggle-slider {
  background-color: var(--sage-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   TEST LAB PANE
   -------------------------------------------------------------------------- */
.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
}

.test-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--honey-hover);
  background: #FEF3C7;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.test-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.test-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}

.test-actions-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.test-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.test-action-info h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.test-action-info p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.test-status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: #E5E7EB;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   👑 ADMIN PANEL (USERS, CURRENCIES, TELEGRAM DIRECT LINKS & BOT DIAGNOSTICS)
   -------------------------------------------------------------------------- */
.admin-panel-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-header-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #B45309;
  background: #FEF3C7;
  padding: 3px 8px;
  border-radius: 4px;
}

.admin-status-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #15803D;
  background: #DCFCE7;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.admin-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: -2px;
}

.admin-subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: -4px;
}

/* Platform Overview Metrics */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.admin-metric-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.admin-metric-card:hover {
  border-color: #E2D9CE;
  transform: translateY(-1px);
}

.admin-metric-card .metric-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.admin-metric-card .metric-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-metric-card .metric-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Subtabs Segmented Control */
.admin-subtabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-top: 6px;
  border: 1px solid var(--border-subtle);
}

.admin-subtab-btn {
  flex: 1;
  padding: 8px 12px;
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.admin-subtab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.08);
}

/* Section Header */
.admin-section-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 12px 0;
}

.admin-section-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-section-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-search-wrap {
  width: 100%;
}

.admin-search-input {
  width: 100%;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.admin-search-input:focus {
  border-color: var(--honey-accent);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

/* User Cards List */
.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-user-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-user-card:hover {
  border-color: #E2D9CE;
  box-shadow: 0 4px 16px rgba(45, 26, 14, 0.06);
}

.admin-user-card.is-current-admin {
  border-left: 3px solid #D97706;
}

.admin-user-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.admin-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-user-names {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-fullname {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-user-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.admin-user-username {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2563EB;
  background: #EFF6FF;
  padding: 1px 7px;
  border-radius: 4px;
}

.admin-user-id-badge {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.admin-user-id-badge:hover {
  color: var(--text-primary);
}

.admin-user-companion-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: #C2410C;
  background: #FFF7ED;
  padding: 1px 6px;
  border-radius: 4px;
}

/* User Currency and Stats Row */
.admin-user-currency-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.admin-curr-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-curr-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.admin-curr-val {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-honey-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.btn-honey-mini {
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.btn-honey-mini:hover {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #B45309;
}

/* User Action Buttons */
.admin-user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-telegram-chat {
  flex: 1;
  min-width: 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-accent);
  font-size: 0.84rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #0284C7;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-telegram-chat:hover {
  background: #0369A1;
  transform: translateY(-1px);
}

.btn-telegram-test {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-telegram-test:hover {
  background: #FDFBF7;
  border-color: #D97706;
  color: #B45309;
}

.admin-loading,
.admin-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

.rules-card {
  background: #FFFDF8;
  border: 1px dashed #D97706;
  border-radius: var(--radius-md);
  padding: 14px;
}

.rules-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--honey-hover);
  margin-bottom: 8px;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   BUTTONS & UI ELEMENTS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-accent);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--anim-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--honey-primary);
  color: #FFFFFF;
  border-color: #B45309;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}

.btn-primary:hover {
  background: var(--honey-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-secondary);
  border-color: var(--border-card);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

.btn-accent {
  background: var(--sage-light);
  color: var(--sage-primary);
  border: 1px solid #C2D6C9;
}

.btn-accent:hover {
  background: #D5E4DB;
}

/* Floating Action Button */
.fab-btn {
  position: fixed;
  bottom: 24px;
  right: calc(50% - 220px);
  width: 52px;
  height: 52px;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-pill);
  background: var(--honey-primary);
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--anim-fast);
  z-index: 30;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .fab-btn {
    right: 20px;
  }
}

.fab-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.fab-btn:hover {
  background: var(--honey-hover);
  transform: scale(1.08) rotate(90deg);
}

/* --------------------------------------------------------------------------
   MODAL / BOTTOM SHEET
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--anim-smooth);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: #FFFFFF;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 22px 30px 22px;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--anim-smooth);
  box-shadow: var(--shadow-elevated);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header-text {
  flex: 1;
  min-width: 0;
}

.modal-tag {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sage-accent);
  line-height: 1.2;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
  line-height: 1.25;
}

.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0;
  line-height: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--anim-fast);
  box-sizing: border-box;
}

.btn-close svg {
  display: block;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.btn-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: scale(1.05);
}

.btn-close:active {
  transform: scale(0.95);
  background: var(--bg-accent);
}

.presets-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.preset-chip {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--anim-fast);
}

.preset-chip:hover {
  background: var(--bg-accent);
  color: var(--honey-hover);
  border-color: #FCD34D;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--anim-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--honey-primary);
  box-shadow: 0 0 0 3px var(--honey-glow);
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Icon picker */
.icon-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.icon-radio,
.icon-label {
  cursor: pointer;
  flex-shrink: 0;
}

.icon-radio input,
.icon-label input {
  display: none;
}

.icon-radio span,
.icon-label span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 1.2rem;
  transition: all var(--anim-fast);
}

.icon-radio input:checked + span,
.icon-label input:checked + span {
  background: var(--bg-accent);
  border-color: #F59E0B;
  transform: scale(1.08);
}

/* Segmented control */
.segmented-control {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.segment-btn {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--anim-fast);
}

.segment-btn.active {
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.time-quick-pills {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.time-pill {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--text-secondary);
}

.time-pill:hover {
  background: var(--bg-accent);
  color: var(--honey-hover);
}

/* Days picker */
.days-selector {
  display: flex;
  gap: 6px;
}

.day-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--anim-fast);
}

.day-btn.active {
  background: var(--sage-primary);
  border-color: var(--sage-primary);
  color: #FFFFFF;
}

/* Nag Interval Selector */
.nag-group {
  background: #FFFDF9;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.nag-selector {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.nag-option {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn-save {
  flex: 1;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1C1917;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-elevated);
  z-index: 200;
  transition: transform var(--anim-smooth), opacity var(--anim-smooth);
  opacity: 0;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.hidden {
  display: none !important;
}

.empty-state {
  text-align: center;
  padding: 36px 16px;
  background: var(--bg-card);
  border: 1px dashed var(--border-card);
  border-radius: var(--radius-md);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto 16px auto;
}

/* --------------------------------------------------------------------------
   SNOOZE ACTION BUTTONS & GRID
   -------------------------------------------------------------------------- */
.timeline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-dose-snooze {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--anim-fast);
}

.btn-dose-snooze:hover {
  background: var(--bg-accent);
  border-color: #FCD34D;
  color: var(--honey-hover);
  transform: scale(1.05);
}

.snooze-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.snooze-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.snooze-opt-btn {
  padding: 12px 10px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--anim-fast);
  text-align: center;
}

.snooze-opt-btn:hover {
  background: var(--bg-accent);
  border-color: #F59E0B;
  color: var(--honey-hover);
  transform: translateY(-1px);
}

.snooze-opt-btn.highlight {
  background: #FFFDF9;
  border-color: #FDE68A;
  color: var(--honey-hover);
}

/* --------------------------------------------------------------------------
   HONEY SHOP & REWARDS
   -------------------------------------------------------------------------- */
.shop-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.shop-balance-banner {
  background: #FFFDF8;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.06);
  width: 100%;
  box-sizing: border-box;
}

.shop-balance-info {
  flex: 1;
  min-width: 180px;
}

.shop-balance-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #B45309;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.shop-balance-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.85rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin: 2px 0 4px 0;
}

.shop-balance-icon {
  font-size: 1.6rem;
  transform: translateY(2px);
}

.shop-balance-unit {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.shop-balance-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.shop-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all var(--anim-fast);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.shop-item-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.shop-item-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.shop-item-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #FEF3C7;
  border: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.shop-item-details {
  flex: 1;
  min-width: 0;
}

.shop-item-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.shop-item-tag.real {
  background: #FEF3C7;
  color: #B45309;
}

.shop-item-tag.digital {
  background: #E0E7FF;
  color: #4338CA;
}

.shop-item-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.shop-item-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.shop-item-stock {
  font-size: 0.75rem;
  color: #DC2626;
  font-weight: 600;
  margin-top: 4px;
}

.shop-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.shop-item-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 1.15rem;
  font-family: var(--font-heading);
  color: #B45309;
}

.shop-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-icon-action {
  background: transparent;
  border: 1px solid var(--border-subtle, #E5E7EB);
  border-radius: var(--radius-sm, 6px);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--anim-fast, 150ms ease);
  color: var(--text-secondary, #4B5563);
}

.btn-icon-action:hover {
  background: var(--bg-hover, #F3F4F6);
  border-color: var(--border-medium, #D1D5DB);
  transform: translateY(-1px);
}

.btn-icon-action:active {
  transform: translateY(0);
}

.shop-item-tag.target-user {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.shop-item-tag.public-user {
  background: #F3F4F6;
  color: #4B5563;
  border: 1px solid #E5E7EB;
}

.shop-item-tag.personal {
  background: #FFF1F2;
  color: #BE123C;
  border: 1px solid #FECDD3;
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

/* Quick Target Menu Dropdown on Card */
.shop-target-menu-container {
  position: relative;
  display: inline-block;
}

.shop-target-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle, #E5E7EB);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md, 8px);
  min-width: 210px;
  padding: 6px;
  z-index: 100;
  display: none;
  animation: popoverFadeIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.shop-target-popover.open {
  display: block;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.shop-target-popover-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary, #9CA3AF);
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border-subtle, #E5E7EB);
  margin-bottom: 4px;
}

.shop-target-option-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 7px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-primary, #18181B);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 150ms ease;
}

.shop-target-option-btn:hover {
  background: var(--bg-hover, #F4F4F5);
}

.shop-target-option-btn.active {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 600;
}

.badge-count {
  background: #2E4A3E;
  color: #FFFFFF;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Orders Modal & Cards */
.order-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all var(--anim-fast);
}

.order-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
}

.order-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.order-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.order-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.order-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.order-status-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.order-status-badge.pending {
  background: #FEF3C7;
  color: #B45309;
  border: 1px solid #FDE68A;
}

.order-status-badge.completed {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
}

.btn-xs {
  padding: 5px 9px;
  font-size: 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--anim-fast);
}

.btn-fulfill {
  background: var(--sage-primary);
  color: #FFFFFF;
  border: none;
}

.btn-fulfill:hover {
  background: var(--sage-hover);
}

