/* ═══════ Empty State (Home + Health) ═══════ */
#home-empty,
#health-empty {
  flex-direction: column;
  position: relative;
  flex: 1;
}

#health-main {
  flex-direction: column;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.es-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0 32px 80px;
  text-align: center;
  min-height: 0;
}

/* Illustrazione: ~40% altezza viewport */
.es-illustration {
  position: relative;
  width: 60vw;
  max-width: 260px;
  height: 40vh;
  max-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.es-hero-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 32px rgba(255, 107, 107, 0.25));
}

/* Cerchi decorativi sfumati */
.es-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.es-bg-circle-1 {
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, rgba(255, 133, 133, 0.08) 0%, transparent 65%);
}

.es-bg-circle-2 {
  width: 80px;
  height: 80px;
  top: 5%;
  right: -20%;
  background: radial-gradient(circle, rgba(255, 193, 112, 0.10) 0%, transparent 70%);
  animation: es-orbit 6s ease-in-out infinite;
}

.es-bg-circle-3 {
  width: 60px;
  height: 60px;
  bottom: 10%;
  left: -15%;
  background: radial-gradient(circle, rgba(102, 187, 106, 0.10) 0%, transparent 70%);
  animation: es-orbit 8s ease-in-out infinite reverse;
}

@keyframes es-orbit {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(6px, -8px) scale(1.15);
  }
}

/* Animazioni elementi SVG fluttuanti */
.es-paw-main {
  animation: es-paw-pulse 3s ease-in-out infinite;
}

@keyframes es-paw-pulse {

  0%,
  100% {
    transform: translate(120px, 115px) scale(1);
  }

  50% {
    transform: translate(120px, 115px) scale(1.06);
  }
}

.es-float-heart {
  animation: es-float-a 4s ease-in-out infinite;
}

.es-float-star {
  animation: es-float-b 5s ease-in-out infinite;
}

.es-float-cross {
  animation: es-float-c 4.5s ease-in-out infinite;
}

@keyframes es-float-a {

  0%,
  100% {
    transform: translate(175px, 55px) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translate(175px, 42px) scale(1.15);
    opacity: 1;
  }
}

@keyframes es-float-b {

  0%,
  100% {
    transform: translate(55px, 50px) rotate(0deg);
    opacity: 0.6;
  }

  50% {
    transform: translate(55px, 38px) rotate(15deg);
    opacity: 0.9;
  }
}

@keyframes es-float-c {

  0%,
  100% {
    transform: translate(185px, 165px) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(185px, 155px) scale(1.2);
    opacity: 0.8;
  }
}

/* Titolo */
.es-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.es-title span {
  color: var(--primary);
}

/* Sottotitolo */
.es-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  line-height: 1.6;
  max-width: 300px;
}

/* Freccia animata bounce — punta verso il FAB in basso a destra */
.es-arrow-wrap {
  position: absolute;
  bottom: 88px;
  right: 30px;
  animation: es-arrow-bounce 1.6s ease-in-out infinite;
}

.es-arrow {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 12px rgba(255, 142, 83, 0.5));
}

@keyframes es-arrow-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(14px);
  }
}

/* FAB specifico per empty state (posizione fissa in basso a destra) */
.es-fab {
  color: white;
  font-weight: 900;
}


/* ═══════ Onboarding ═══════ */
.onb-container {
  padding: 20px;
  text-align: center;
}

.onb-header {
  margin-bottom: 24px;
}

.onb-emoji {
  font-size: 48px;
  margin-bottom: 8px;
  animation: onb-bounce 2s ease infinite;
}

@keyframes onb-bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

.onb-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.3;
}

.onb-title span {
  color: var(--primary);
}

.onb-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 8px;
  line-height: 1.5;
}

/* Pet type selector */
.onb-type-selector {
  display: flex;
  gap: 10px;
  margin: 16px 0 20px;
}

.onb-type {
  flex: 1;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--card);
  border: 2px solid var(--border-color);
  font-size: 15px;
  font-weight: 800;
  color: var(--brown2);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.onb-type span {
  font-size: 22px;
}

.onb-type.active {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(135deg, #FFF0F0, #FFE8E0);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.15);
  transform: scale(1.03);
}

.onb-type:active {
  transform: scale(0.96);
}

[data-theme="dark"] .onb-type {
  background: #252525;
  border-color: rgba(212, 165, 116, 0.1);
}

[data-theme="dark"] .onb-type.active {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.4);
}

/* Camera area */
.onb-camera {
  margin: 20px auto;
  cursor: pointer;
}

.onb-camera-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(var(--primary), var(--accent), var(--primary));
  padding: 5px;
  margin: 0 auto;
  animation: onb-ring-spin 4s linear infinite;
}

@keyframes onb-ring-spin {
  from {
    transform: rotate(0)
  }

  to {
    transform: rotate(360deg)
  }
}

.onb-camera-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: inset 0 0 20px rgba(255, 107, 107, 0.1);
}

.onb-camera-icon {
  font-size: 42px;
}

.onb-camera-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

[data-theme="dark"] .onb-camera-inner {
  background: #252525;
}

/* Skip / Configura Manualmente — glass button premium 2026 */
.onb-skip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px auto 0;
  padding: 16px 32px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 179, 71, 0.10), rgba(255, 107, 107, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 107, 107, 0.30);
  border-radius: 60px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 4px 24px rgba(255, 107, 107, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.onb-skip-btn:active {
  transform: scale(0.96);
  box-shadow:
    0 2px 12px rgba(255, 107, 107, 0.20),
    0 0 0 3px rgba(255, 107, 107, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 107, 107, 0.50);
}

/* Shimmer sweep */
.onb-skip-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(105deg,
      transparent 30%,
      rgba(255, 255, 255, 0.12) 45%,
      rgba(255, 255, 255, 0.20) 50%,
      rgba(255, 255, 255, 0.12) 55%,
      transparent 70%);
  animation: onb-shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes onb-shimmer {
  0% {
    left: -100%;
  }

  60% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

/* Content layout */
.onb-skip-content {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.onb-skip-icon {
  color: var(--primary);
  opacity: 0.85;
  flex-shrink: 0;
}

.onb-skip-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.onb-skip-chevron {
  color: var(--primary);
  opacity: 0.6;
  flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onb-skip-btn:active .onb-skip-chevron {
  transform: translateX(4px);
  opacity: 1;
}

/* Dark theme */
[data-theme="dark"] .onb-skip-btn {
  background: linear-gradient(135deg, rgba(255, 133, 133, 0.12), rgba(255, 193, 112, 0.06), rgba(255, 133, 133, 0.08));
  border-color: rgba(255, 133, 133, 0.28);
  box-shadow:
    0 4px 24px rgba(255, 107, 107, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .onb-skip-text {
  color: var(--brown);
}

[data-theme="dark"] .onb-skip-btn:active {
  border-color: rgba(255, 133, 133, 0.50);
  box-shadow:
    0 2px 12px rgba(255, 133, 133, 0.16),
    0 0 0 3px rgba(255, 133, 133, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Preview foto */
.onb-preview-img-wrap {
  width: 180px;
  height: 180px;
  margin: 10px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.25);
}

.onb-preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.onb-change-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  transition: background 0.2s;
}

.onb-change-btn:hover {
  background: rgba(255, 107, 107, 0.08);
}

/* AI analyzing */
.onb-ai-box {
  padding: 30px 20px;
}

.onb-ai-spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid rgba(255, 107, 107, 0.2);
  border-top-color: var(--primary);
  animation: onb-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes onb-spin {
  to {
    transform: rotate(360deg)
  }
}

.onb-ai-text {
  font-size: 18px;
  font-weight: 900;
  color: var(--brown);
}

.onb-ai-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 4px;
}

.onb-ai-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.onb-ai-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: onb-dot-bounce 1.4s ease-in-out infinite;
}

.onb-ai-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.onb-ai-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes onb-dot-bounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4
  }

  40% {
    transform: scale(1);
    opacity: 1
  }
}

/* Risultato AI */
.onb-result-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  text-align: left;
  border: 2px solid rgba(255, 107, 107, 0.15);
  animation: slideUp 0.4s ease;
}

.onb-result-header {
  margin-bottom: 12px;
}

.onb-result-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.onb-result-breed {
  font-size: 22px;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: 8px;
}

.onb-result-details {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown2);
  line-height: 1.7;
}

.onb-result-confidence {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
}

/* Nome pet */
.onb-name-section {
  margin: 16px 0;
  text-align: left;
}

.onb-confirm-btn {
  margin-top: 16px;
  animation: onb-bounce 2s ease infinite;
}

/* Errore */
.onb-error-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

/* Home states layout */
#home-onboarding {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

#home-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Dark mode onboarding extras */
[data-theme="dark"] .onb-result-card {
  background: #252525;
  border-color: rgba(212, 165, 116, 0.15);
}

[data-theme="dark"] .onb-error-card {
  background: #252525;
}

[data-theme="dark"] .onb-ai-spinner {
  border-color: rgba(212, 165, 116, 0.2);
  border-top-color: #D4A574;
}

/* Carousel 3D */
.carousel-section {
  margin-top: 14px;
  position: relative;
  perspective: 900px;
  height: 210px;
  overflow: visible;
  touch-action: pan-y;
}

.carousel-card {
  position: absolute;
  width: 78%;
  left: 11%;
  height: 190px;
  border-radius: 22px;
  padding: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  transform-style: preserve-3d;
  touch-action: manipulation;
}

.carousel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 0;
}

.carousel-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 1;
}

.carousel-card>* {
  position: relative;
  z-index: 2;
}

.carousel-card.active {
  transform: translateX(0) rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 10;
  box-shadow: 0 12px 40px rgba(61, 43, 31, 0.15), 0 2px 10px rgba(255, 255, 255, 0.2) inset;
  pointer-events: auto;
}

.carousel-card.c-left {
  transform: translateX(-62%) rotateY(35deg) scale(0.82);
  opacity: 0.5;
  z-index: 4;
  pointer-events: none;
  filter: blur(1.5px);
}

.carousel-card.c-right {
  transform: translateX(62%) rotateY(-35deg) scale(0.82);
  opacity: 0.5;
  z-index: 4;
  pointer-events: none;
  filter: blur(1.5px);
}

.carousel-card.c-back {
  transform: translateX(0) rotateY(180deg) scale(0.7);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

.cc-cuore {
  background: linear-gradient(145deg,
      rgba(200, 240, 200, 0.35) 0%,
      rgba(165, 214, 167, 0.3) 50%,
      rgba(129, 199, 132, 0.25) 100%);
}

.cc-latob {
  background: linear-gradient(145deg,
      rgba(255, 248, 225, 0.4) 0%,
      rgba(255, 224, 130, 0.3) 50%,
      rgba(255, 183, 77, 0.25) 100%);
}

.cc-salute {
  background: linear-gradient(145deg,
      rgba(255, 235, 238, 0.4) 0%,
      rgba(255, 205, 210, 0.3) 50%,
      rgba(255, 138, 128, 0.2) 100%);
}

.carousel-card .glass-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.cc-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown3);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-dot.active {
  width: 26px;
  border-radius: 4px;
  background: linear-gradient(90deg, #FF6B6B, #FFB347);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.35);
}

/* ═══════════════════════════════════════
   HERO COMPATTO — stat chips + avatar-sm
   ═══════════════════════════════════════ */
.avatar-frame.avatar-sm {
  width: 82px;
  height: 82px;
}

/* ═══════════════════════════════════════
   GLASS-COPPER HERO PILLS
   ═══════════════════════════════════════ */
.hero-stats {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 30px;
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  color: white;
  border: 1px solid rgba(212, 165, 116, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 0.5px rgba(212, 165, 116, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-chip::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(105deg,
      transparent 35%,
      rgba(212, 165, 116, 0.08) 45%,
      rgba(212, 165, 116, 0.12) 50%,
      rgba(212, 165, 116, 0.08) 55%,
      transparent 65%);
  animation: chip-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes chip-shimmer {
  0% {
    transform: translateX(-30%);
  }

  50% {
    transform: translateX(30%);
  }

  100% {
    transform: translateX(-30%);
  }
}

.hero-chip svg {
  flex-shrink: 0;
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.hero-chip>span:not([class]) {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hc-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(212, 165, 116, 0.9);
}

.hc-val {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ═══════════════════════════════════════
   HEALTH LED INDICATOR
   ═══════════════════════════════════════ */
.avatar-led-wrap {
  position: relative;
  flex-shrink: 0;
}

.health-led {
  position: absolute;
  bottom: 6px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  z-index: 5;
  border: 2.5px solid white;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.health-led.led-healthy {
  background: #4CAF50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5), 0 0 12px rgba(76, 175, 80, 0.25);
  animation: led-glow 2.5s ease-in-out infinite;
}

.health-led.led-warn {
  background: #FF9800;
  box-shadow: 0 0 6px rgba(255, 152, 0, 0.5);
  animation: none;
}

.health-led.led-alert {
  background: #F44336;
  box-shadow: 0 0 6px rgba(244, 67, 54, 0.5);
  animation: led-blink 1.2s ease-in-out infinite;
}

[data-theme="dark"] .health-led {
  border-color: #252525;
}

@keyframes led-glow {

  0%,
  100% {
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.4), 0 0 10px rgba(76, 175, 80, 0.15);
  }

  50% {
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.7), 0 0 20px rgba(76, 175, 80, 0.35), 0 0 30px rgba(76, 175, 80, 0.1);
  }
}

@keyframes led-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ══════════════════════════════════════════
   FOCUS MODE — Premium keyboard UX
   ══════════════════════════════════════════ */
#focus-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 200;
  pointer-events: none;
  transition: background 350ms cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 350ms cubic-bezier(0.4, 0, 0.2, 1),
    -webkit-backdrop-filter 350ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background, backdrop-filter;
}

#focus-overlay.visible {
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

/* Input confirm toolbar (Accessory Bar) */
#focus-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(180deg, #1E1A17, #161310);
  border-top: 1px solid rgba(212, 165, 116, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 20px;
  z-index: 202;
  transform: translateY(100%);
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1), bottom 180ms ease;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.45);
}

#focus-toolbar.visible {
  transform: translateY(0);
}

[data-theme="dark"] #focus-toolbar {
  background: linear-gradient(180deg, #161310, #0E0C0A);
  border-top-color: rgba(212, 165, 116, 0.2);
}

.ft-hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(212, 165, 116, 0.6);
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.ft-confirm {
  background: linear-gradient(135deg, #D4A574, #C78D5D);
  color: #1A1A1A;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 900;
  font-family: 'Nunito', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.35);
  transition: transform 150ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 150ms;
  -webkit-tap-highlight-color: transparent;
}

.ft-confirm:active {
  transform: scale(0.93);
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.25);
}

/* Elevated active input — centered & enlarged */
.focus-active {
  position: relative !important;
  z-index: 201 !important;
  caret-color: #D4A574 !important;
  border-color: rgba(212, 165, 116, 0.6) !important;
  box-shadow:
    0 0 0 3px rgba(212, 165, 116, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(212, 165, 116, 0.1) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  background: var(--card) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="dark"] .focus-active {
  background: #252525 !important;
}

/* Map */
.map-wrap {
  height: 200px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9 40%, #A5D6A7);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.map-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(187, 222, 179, 0.4) 1px, transparent 1px), linear-gradient(90deg, rgba(187, 222, 179, 0.4) 1px, transparent 1px);
  background-size: 28px 28px;
}

.mpin {
  position: absolute;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
}

.mpin:hover {
  transform: scale(1.2) translateY(-4px);
}

.you-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #2196F3;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
  top: 48%;
  left: 50%;
  animation: youPulse 2s infinite;
}

@keyframes youPulse {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2)
  }

  50% {
    box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.1)
  }
}

/* Masonry */
.masonry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-tile {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s;
}

.photo-tile:active {
  transform: scale(0.96);
}

.photo-tile:nth-child(odd) {
  height: 155px;
}

.photo-tile:nth-child(even) {
  height: 120px;
}

.photo-tile:nth-child(3) {
  height: 170px;
}

.pt-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  position: relative;
}

.pt-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
}

.pt-meta {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 1;
}

.pt-date {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.pt-age {
  font-size: 10px;
  font-weight: 800;
  color: white;
  background: rgba(255, 107, 107, 0.7);
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  margin-top: 2px;
}

.c1 {
  background: linear-gradient(135deg, #FFB347, #FF6B6B);
}

.c2 {
  background: linear-gradient(135deg, #81D4FA, #4FC3F7);
}

.c3 {
  background: linear-gradient(135deg, #A5D6A7, #66BB6A);
}

.c4 {
  background: linear-gradient(135deg, #FFCC02, #FFB347);
}

.c5 {
  background: linear-gradient(135deg, #F48FB1, #EC407A);
}

.c6 {
  background: linear-gradient(135deg, #CE93D8, #AB47BC);
}

/* OCR */
.ocr-box {
  background: #1A1A1A;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ocr-vf {
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.ocr-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #FF6B6B;
  border-style: solid;
}

.ocr-corner.tl {
  top: 14px;
  left: 14px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.ocr-corner.tr {
  top: 14px;
  right: 14px;
  border-width: 3px 3px 0 0;
  border-radius: 0 4px 0 0;
}

.ocr-corner.bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 4px;
}

.ocr-corner.br {
  bottom: 14px;
  right: 14px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.ocr-line {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF6B6B, transparent);
  animation: scan 1.8s ease-in-out infinite;
}

@keyframes scan {

  0%,
  100% {
    top: 18px
  }

  50% {
    top: calc(100% - 18px)
  }
}

.ocr-hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 700;
}

.ocr-result {
  padding: 12px;
}

.ocr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 107, 107, 0.12);
  border-radius: 8px;
  margin-bottom: 6px;
}

.ocr-key {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  width: 70px;
}

.ocr-val {
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex: 1;
}

.ocr-auto {
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

/* Profile hero */
.profile-hero {
  background: linear-gradient(160deg, #FF6B6B, #FF8E53);
  padding: 24px 20px 28px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.profile-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -30px;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.ph-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
  cursor: pointer;
  z-index: 2;
}

.ph-avatar-wrap:active {
  transform: scale(0.95);
}

.ph-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  border: 3.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.15), 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.2s;
}

.ph-camera-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2.5px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 3;
  transition: transform 0.2s;
}

.ph-avatar-wrap:active .ph-camera-badge {
  transform: scale(1.15);
}

.ph-name {
  font-size: 26px;
  font-weight: 900;
  color: white;
  text-align: center;
  position: relative;
  z-index: 1;
}

.ph-breed {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.ph-stats {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.ph-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.ph-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: white;
}

.ph-stat-key {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

/* Profile info grid */
.profile-info-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.profile-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pii-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.pii-text {
  flex: 1;
}

.pii-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.pii-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
  margin-top: 1px;
}

/* Profile edit card */
.profile-edit-card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pe-row {
  padding: 8px 0;
}

.pe-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--brown2);
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.pe-chips {
  display: flex;
  gap: 8px;
}

.pe-chip {
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  background: var(--bg);
  border: 2px solid var(--border-color);
  font-size: 14px;
  font-weight: 700;
  color: var(--brown2);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.pe-chip span {
  font-size: 16px;
}

.pe-chip.on {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 179, 71, 0.06));
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.12);
}

.pe-input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.pe-input:focus {
  border-color: var(--primary);
}

.pe-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.pe-save-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  color: white;
  font-size: 15px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.pe-save-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

/* Profile breed card */
.profile-breed-card {
  background: linear-gradient(145deg, #FFF8E1, #FFF3CC);
  border-radius: 18px;
  padding: 18px;
  border: 1.5px solid rgba(255, 179, 71, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pbc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pbc-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFB347, #FF8E53);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(255, 179, 71, 0.3);
}

.pbc-title {
  font-size: 15px;
  font-weight: 900;
  color: #BF360C;
}

.pbc-risks {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 179, 71, 0.2);
}

.pbc-risks-title {
  font-size: 12px;
  font-weight: 800;
  color: #E65100;
  margin-bottom: 6px;
}

.pbc-risks-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  line-height: 1.6;
}

/* Profile nutrition card */
.profile-nutrition-card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.pnc-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pnc-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFCDD2, #EF9A9A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.pnc-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pnc-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  margin-top: 1px;
  line-height: 1.3;
}

.pnc-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.pnc-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--brown3);
  line-height: 1.5;
}

/* Place hero */
.place-hero-img {
  height: 180px;
  background: linear-gradient(135deg, #A5D6A7, #66BB6A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  position: relative;
  flex-shrink: 0;
}

.place-hero-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, rgba(61, 43, 31, 0.6));
}

.place-hero-name {
  position: absolute;
  bottom: 16px;
  left: 20px;
  right: 20px;
  z-index: 1;
}

.phn-name {
  font-size: 20px;
  font-weight: 900;
  color: white;
}

.phn-addr {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3px;
}

/* Detail hero */
.detail-hero {
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  margin: 16px 20px 0;
}

.dh-icon {
  font-size: 52px;
  margin-bottom: 10px;
}

.dh-title {
  font-size: 22px;
  font-weight: 900;
  color: white;
}

.dh-sub {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

/* AI triage */

/* Mic pill button (below textarea) */
.ai-mic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(212, 165, 116, 0.10);
  border: 1px solid rgba(212, 165, 116, 0.22);
  border-radius: 20px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ai-mic-pill:active { transform: scale(0.95); background: rgba(212, 165, 116, 0.20); }
.ai-mic-pill.recording {
  background: rgba(239, 83, 80, 0.12);
  border-color: rgba(239, 83, 80, 0.35);
  color: var(--red);
  animation: ai-mic-pulse 1.4s ease-in-out infinite;
}
@keyframes ai-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
  50% { box-shadow: 0 0 0 6px rgba(239, 83, 80, 0.15); }
}

/* Warning card (dark-mode safe) */
.ai-warn-card {
  background: rgba(255, 152, 0, 0.10);
  border: 1px solid rgba(255, 152, 0, 0.25);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.ai-warn-text {
  font-size: 13px;
  font-weight: 700;
  color: #FFA726;
  line-height: 1.5;
}
[data-theme="dark"] .ai-warn-card {
  background: rgba(255, 152, 0, 0.08);
  border-color: rgba(255, 152, 0, 0.18);
}

.ai-triage {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 2px solid rgba(255, 152, 0, 0.25);
}

.ai-triage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ai-badge {
  background: var(--orange);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}

.ai-urgency {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.ai-level {
  width: 24px;
  height: 8px;
  border-radius: 4px;
  background: rgba(61, 43, 31, 0.1);
}

.ai-level.on {
  background: var(--orange);
}

.ai-level.on.red {
  background: var(--red);
}

.ai-level.on.green {
  background: var(--green);
}

/* Memory banner */
.memory-banner {
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s;
}

.memory-banner:active {
  transform: scale(0.98);
}

.mb-thumb {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.mb-txt {
  color: white;
}

.mb-title {
  font-size: 14px;
  font-weight: 900;
}

.mb-sub {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 2px;
}

/* Breed traits */
.trait-legend {
  font-size: 10px;
  font-weight: 700;
  color: var(--brown3);
  text-align: right;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.trait-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.trait-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown2);
  min-width: 90px;
  max-width: 110px;
  flex-shrink: 0;
  line-height: 1.3;
}

.trait-sub {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--brown3);
  letter-spacing: 0.2px;
  margin-top: 1px;
}

.trait-bar {
  flex: 1;
  height: 7px;
  background: rgba(61, 43, 31, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.trait-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #FFB347, #FF6B6B);
}

.trait-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  min-width: 38px;
  text-align: right;
  flex-shrink: 0;
}

/* Settings */
.settings-header-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

/* Photo full */
.photo-full {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.photo-full-bg {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
}

.photo-full-meta {
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
}

.pfm-date {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Nunito', sans-serif;
}

.pfm-title {
  font-size: 18px;
  font-weight: 800;
  color: white;
  margin-top: 4px;
  font-family: 'Nunito', sans-serif;
}

.pf-close {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: white;
  z-index: 501;
}

@keyframes petRing {

  0%,
  100% {
    box-shadow: 0 0 0 4px #FFB347, 0 0 0 7px white, 0 0 0 10px #FFB34730
  }

  50% {
    box-shadow: 0 0 0 4px #FFB347, 0 0 0 7px white, 0 0 0 14px #FFB34710
  }
}

/* ═══════ Food — Empty State ═══════ */

.food-empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 40px;
  text-align: center;
  gap: 8px;
}

.food-empty-bowl {
  margin-bottom: 8px;
}

.food-empty-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.35;
}

.food-empty-title span {
  color: var(--primary);
}

.food-empty-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  margin-bottom: 8px;
  line-height: 1.5;
}

.food-empty-noweight {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF8E1;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brown2);
  margin: 4px 0 8px;
}

[data-theme="dark"] .food-empty-noweight {
  background: rgba(255, 152, 0, 0.15);
}

.food-empty-btn {
  margin-top: 8px;
  max-width: 280px;
}

/* ═══════ Food — Hero grafico 3 anelli ═══════ */

.food-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 24px;
  background: radial-gradient(ellipse at 50% 40%, #FFE8D6 0%, #FDF6EE 70%);
}

[data-theme="dark"] .food-hero {
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 107, 107, 0.12) 0%, rgba(61, 43, 31, 0.15) 70%);
}

.food-chart-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 12px;
  filter: drop-shadow(0 8px 20px rgba(255, 107, 107, 0.20)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.food-chart-svg {
  display: block;
}

.food-ring {
  transform-origin: center;
  /* removing will-change to prevent Chrome hardware-accel bugs on strokes */
}

.food-chart-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.food-kcal-num {
  font-size: 42px;
  font-weight: 900;
  color: #3D2B1F;
  line-height: 1;
}

.food-kcal-label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(61, 43, 31, 0.6);
  margin-top: 2px;
}

/* Activity pill */
.food-activity-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-size: 13px;
  font-weight: 700;
  color: #7A5C4A;
}

.food-activity-pill:active {
  transform: scale(0.96);
}

[data-theme="dark"] .food-activity-pill {
  background: var(--card);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.food-pill-arrow {
  font-size: 14px;
  color: var(--primary);
  font-weight: 800;
  margin-left: 2px;
}

/* ═══════ Food — Macro strip ═══════ */

.food-macros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.food-macro-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 10px 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .food-macro-card {
  background: #252525;
}

.food-macro-num {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.food-macro-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown2);
  margin-top: 4px;
}

.food-macro-bar {
  height: 4px;
  background: rgba(61, 43, 31, 0.08);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

[data-theme="dark"] .food-macro-bar {
  background: rgba(255, 255, 255, 0.1);
}

.food-macro-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════ Food — Meal Cards ═══════ */

.food-meal-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

[data-theme="dark"] .food-meal-card {
  background: #252525;
}

.food-meal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}

.food-meal-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .food-meal-header-icon {
  background: rgba(255, 255, 255, 0.1);
}

.food-meal-header-title {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
}

.food-meal-header-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown3);
}

.food-meal-body {
  padding: 4px 16px 14px;
}

.food-meal-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.food-meal-item-sep {
  border-top: 1px solid var(--border-color);
}

.food-meal-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(61, 43, 31, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brown2);
  margin-top: 2px;
}

[data-theme="dark"] .food-meal-item-icon {
  background: rgba(255, 255, 255, 0.06);
}

.food-meal-item-info {
  flex: 1;
}

.food-meal-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
}

.food-meal-item-grams {
  font-size: 28px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.2;
  margin-top: 2px;
}

.food-meal-item-kcal {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown3);
  margin-top: 1px;
}

/* ═══════ Food — Snack Pill ═══════ */

.food-snack-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border-radius: 16px;
  padding: 14px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #2E7D32;
  margin-top: 4px;
  transition: opacity 200ms, transform 200ms;
}

[data-theme="dark"] .food-snack-pill {
  background: rgba(76, 175, 80, 0.15);
  color: #81C784;
}

.food-snack-pill svg {
  flex-shrink: 0;
  color: #2E7D32;
}

[data-theme="dark"] .food-snack-pill svg {
  color: #81C784;
}

/* ═══════ Food — Week Dots ═══════ */

.food-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
  cursor: pointer;
}

.food-week-chevron {
  font-size: 16px;
  font-weight: 800;
  color: var(--brown3);
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.food-week-dots {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 16px;
  gap: 4px;
}

.food-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.food-week-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(61, 43, 31, 0.12);
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .food-week-dot {
  background: rgba(255, 255, 255, 0.12);
}

.food-week-dot.past {
  background: var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.food-week-dot.today {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border: 2.5px solid var(--card);
  box-shadow: 0 0 0 2px var(--primary);
}

.food-week-dot.future {
  opacity: 0.4;
}

.food-week-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--brown3);
}

/* ═══════ Food Setup ═══════ */

.food-setup-step {
  padding-bottom: 24px;
}

.food-setup-header {
  padding: 24px 20px 16px;
  text-align: center;
}

.food-setup-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FF6B6B, #FFB347);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.food-setup-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.3;
}

.food-setup-title span {
  color: var(--primary);
}

.food-setup-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 6px;
  line-height: 1.5;
}

/* Activity grid */
.food-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 20px;
}

.food-activity-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 14px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.food-activity-card:active {
  transform: scale(0.96);
}

.food-activity-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #FFF0F0, #FFE8E0);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.15);
}

[data-theme="dark"] .food-activity-card {
  background: #252525;
  border-color: rgba(212, 165, 116, 0.08);
}

[data-theme="dark"] .food-activity-card.selected {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.35);
}

.fac-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.fac-bar {
  width: 20px;
  height: 6px;
  border-radius: 3px;
  background: rgba(61, 43, 31, 0.1);
  transition: background 0.25s;
}

.fac-bar.on {
  background: var(--primary);
}

[data-theme="dark"] .fac-bar {
  background: rgba(255, 255, 255, 0.1);
}

.food-activity-card.selected .fac-bar.on {
  background: var(--primary);
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.3);
}

.fac-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: 4px;
}

.fac-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  line-height: 1.4;
}

/* Food search */
.food-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.food-search-wrap:focus-within {
  border-color: var(--primary);
}

[data-theme="dark"] .food-search-wrap {
  background: #252525;
  border-color: rgba(212, 165, 116, 0.1);
}

.food-search-icon {
  flex-shrink: 0;
}

.food-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 13px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  font-family: 'Nunito', sans-serif;
  outline: none;
}

.food-search-input::placeholder {
  color: var(--brown3);
  font-weight: 600;
}

[data-theme="dark"] .food-search-input {
  color: var(--brown);
}

/* ═══════ FS2 — Step 2 Bottom Sheet UX ═══════ */
.fs2-layout {
  display: block;
}

.fs2-top {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 20px;
  background: var(--bg);
}

.fs2-header {
  margin-bottom: 12px;
}

.fs2-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 4px;
}

.food-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 16px;
  padding: 0 16px;
  height: 52px;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 16px rgba(61, 43, 31, 0.10);
  transition: border-color 200ms, box-shadow 200ms;
}

.food-search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 2px 20px rgba(255, 107, 107, 0.15);
}

[data-theme="dark"] .food-search-bar {
  background: var(--card);
}

.fs2-search-icon {
  flex-shrink: 0;
}

.fs2-search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  font-family: 'Nunito', sans-serif;
  outline: none;
}

.fs2-search-input::placeholder {
  color: var(--brown3);
}

.fs2-camera-btn,
.fs2-clear-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  margin: -6px -6px -6px 0;
}

.fs2-clear-btn {
  margin: -6px 0 -6px -6px;
}

.fs2-save-btn {
  width: 100%;
  margin-top: 12px;
}

.fs2-bottom {
  padding: 0 20px 24px;
  padding-bottom: env(keyboard-inset-height, 24px);
}

.fs2-state {
  padding-top: 8px;
}

.fs2-chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fs2-chips-scroll::-webkit-scrollbar {
  display: none;
}

.fs2-chip {
  flex-shrink: 0;
  background: white;
  border: 1.5px solid rgba(61, 43, 31, 0.10);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms, background 150ms, border-color 150ms;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.fs2-chip:active {
  transform: scale(0.93);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

[data-theme="dark"] .fs2-chip {
  background: var(--card);
  border-color: rgba(212, 165, 116, 0.1);
}

.fs2-manual-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 2px dashed rgba(61, 43, 31, 0.15);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown2);
  cursor: pointer;
  background: rgba(255, 107, 107, 0.04);
  transition: transform 150ms, border-color 200ms;
  -webkit-tap-highlight-color: transparent;
  margin-top: 4px;
}

.fs2-manual-card:active {
  transform: scale(0.97);
  border-color: var(--primary);
}

/* Legacy — kept for compat */
.fs2-skeleton {
  height: 72px;
  background: linear-gradient(90deg, rgba(61, 43, 31, 0.06) 25%, rgba(61, 43, 31, 0.12) 50%, rgba(61, 43, 31, 0.06) 75%);
  background-size: 200% 100%;
  animation: fs2-shimmer 1.2s infinite;
  border-radius: 12px;
  margin-bottom: 8px;
}

@keyframes fs2-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Paw Spinner ── */
.fs2-paw-loader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 14px;
}

.fs2-paw-svg {
  animation: paw-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes paw-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.fs2-paw-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown2);
  animation: fs2-label-fade 2.4s ease-in-out infinite;
}

@keyframes fs2-label-fade {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ── Structured Skeleton Cards ── */
.fs2-skeleton-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  animation: sk-appear 0.3s ease both;
}

@keyframes sk-appear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fs2-sk-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(90deg, rgba(61, 43, 31, 0.07) 25%, rgba(61, 43, 31, 0.13) 50%, rgba(61, 43, 31, 0.07) 75%);
  background-size: 200% 100%;
  animation: fs2-shimmer 1.4s infinite;
}

.fs2-sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fs2-sk-line {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(61, 43, 31, 0.07) 25%, rgba(61, 43, 31, 0.13) 50%, rgba(61, 43, 31, 0.07) 75%);
  background-size: 200% 100%;
  animation: fs2-shimmer 1.4s infinite;
}

.fs2-sk-line-lg {
  width: 70%;
}

.fs2-sk-line-sm {
  width: 45%;
}

.fs2-sk-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(90deg, rgba(61, 43, 31, 0.07) 25%, rgba(61, 43, 31, 0.13) 50%, rgba(61, 43, 31, 0.07) 75%);
  background-size: 200% 100%;
  animation: fs2-shimmer 1.4s infinite;
}

[data-theme="dark"] .fs2-skeleton-card {
  background: var(--card);
}

[data-theme="dark"] .fs2-sk-icon,
[data-theme="dark"] .fs2-sk-line,
[data-theme="dark"] .fs2-sk-add {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 75%);
  background-size: 200% 100%;
  animation: fs2-shimmer 1.4s infinite;
}

.fs2-result-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 150ms, box-shadow 150ms;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .fs2-result-card {
  background: var(--card);
}

.fs2-result-card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 12px rgba(255, 107, 107, 0.15);
}

.fs2-result-card.fs2-result-selected {
  transform: scale(0.97);
  border: 2px solid var(--green);
  box-shadow: 0 2px 12px rgba(76, 175, 80, 0.2);
}

.fs2-result-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--brown3);
}

.fs2-result-info {
  flex: 1;
  min-width: 0;
}

.fs2-result-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
}

.fs2-result-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 2px;
}

.fs2-result-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fs2-result-selected .fs2-result-add {
  background: var(--green);
}

.fs2-empty-icon {
  display: block;
  margin: 24px auto 12px;
}

.fs2-empty-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--brown2);
  text-align: center;
}

.fs2-empty-cta {
  display: block;
  margin: 20px auto 0;
  padding: 12px 28px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: white;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms;
}

.fs2-empty-cta:active {
  transform: scale(0.96);
}

.fs2-manual-form-wrap {
  padding-top: 12px;
  padding-bottom: 80px;
}

.fs2-manual-form-inner {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 16px;
}

.fs2-manual-form-inner .form-group {
  margin-bottom: 14px;
}

.fs2-manual-form-inner .form-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brown2);
  margin-bottom: 6px;
  display: block;
}

.fs2-form-input {
  height: 48px;
  border-radius: 12px;
  border: 1.5px solid rgba(61, 43, 31, 0.12);
  padding: 0 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  outline: none;
  background: var(--bg);
  color: var(--brown);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.fs2-form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.12);
}

.fs2-form-input {
  scroll-margin-top: 140px;
  scroll-margin-bottom: 40px;
}

.fs2-macros-toggle {
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  padding: 8px 0;
}

.fs2-macros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.fs2-form-input-sm {
  height: 44px;
  font-size: 15px;
}

.fs2-confirm-manual {
  width: 100%;
  margin-top: 18px;
}

.fs2-optional {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown3);
  margin-left: 4px;
}

.fs2-selected-card {
  margin-bottom: 16px;
}

/* Barcode scanner overlay */
.fs2-barcode-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  animation: fs2-overlay-in 200ms ease-out;
}

.fs2-barcode-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
  -webkit-mask-image:
    linear-gradient(#fff 0 0),
    linear-gradient(#fff 0 0);
  -webkit-mask-size: 280px 180px, 100% 100%;
  -webkit-mask-position: center, center;
  -webkit-mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: xor;
  mask-image:
    linear-gradient(#fff 0 0),
    linear-gradient(#fff 0 0);
  mask-size: 280px 180px, 100% 100%;
  mask-position: center, center;
  mask-repeat: no-repeat, no-repeat;
  mask-composite: exclude;
}

@keyframes fs2-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fs2-barcode-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.fs2-barcode-mirror {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 180px;
  z-index: 2;
  background: transparent;
  border-radius: 12px;
}

.fs2-barcode-corners {
  position: absolute;
  inset: 0;
}

.fs2-barcode-corners::before,
.fs2-barcode-corners::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: white;
  border-style: solid;
}

.fs2-barcode-corners::before {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
}

.fs2-barcode-corners::after {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
}

.fs2-barcode-mirror::before,
.fs2-barcode-mirror::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: white;
  border-style: solid;
}

.fs2-barcode-mirror::before {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
}

.fs2-barcode-mirror::after {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
}

.fs2-barcode-laser {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #ff4444;
  box-shadow: 0 0 12px #ff4444, 0 0 4px #ff4444;
  border-radius: 2px;
  animation: fs2-scan 2s ease-in-out infinite alternate;
}

@keyframes fs2-scan {
  0% {
    top: 0;
  }

  100% {
    top: 176px;
  }
}

.fs2-barcode-hint {
  position: absolute;
  top: calc(50% + 110px);
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 15px;
  font-weight: 700;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.fs2-barcode-close {
  position: absolute;
  top: max(env(safe-area-inset-top, 8px), 12px);
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
}

/* AI Capture Button */
.fs2-ai-capture-btn {
  position: absolute;
  bottom: max(calc(env(safe-area-inset-bottom, 20px) + 20px), 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(255, 107, 107, 0.5);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.fs2-ai-capture-btn:active {
  transform: translateX(-50%) scale(0.94);
}

/* AI Loading State */
.fs2-ai-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.fs2-ai-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: fs2-spin 0.8s linear infinite;
}

@keyframes fs2-spin {
  to {
    transform: rotate(360deg);
  }
}

.fs2-ai-loading-text {
  color: white;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Search results */
.food-search-results {
  margin-bottom: 4px;
}

.food-search-result {
  padding: 12px 14px;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.food-search-result:active {
  transform: scale(0.98);
}

[data-theme="dark"] .food-search-result {
  background: #252525;
}

.fsr-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
}

.fsr-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 2px;
}

/* Toggle rows */
.food-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.food-toggle-row:active {
  opacity: 0.7;
}

/* Manual form */
.food-manual-form {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .food-manual-form {
  background: #252525;
}

/* Selected food card */
.food-selected-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  border: 2px solid rgba(76, 175, 80, 0.25);
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .food-selected-card {
  background: #252525;
  border-color: rgba(76, 175, 80, 0.2);
}

.food-selected-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-selected-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
}

.food-selected-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 4px;
}

.food-selected-change {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 8px;
  cursor: pointer;
}

.food-selected-change:active {
  opacity: 0.7;
}

/* Meal presets */
.food-meals-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.food-meal-preset {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg);
  border: 2px solid var(--border-color);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown2);
  cursor: pointer;
  transition: all 0.25s;
}

.food-meal-preset.on {
  border-color: var(--primary);
  color: var(--primary);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.08), rgba(255, 179, 71, 0.06));
  box-shadow: 0 2px 10px rgba(255, 107, 107, 0.12);
}

[data-theme="dark"] .food-meal-preset {
  background: #1A1A1A;
  border-color: rgba(212, 165, 116, 0.1);
}

[data-theme="dark"] .food-meal-preset.on {
  background: rgba(212, 165, 116, 0.12);
  border-color: rgba(212, 165, 116, 0.35);
}

/* Meal edit rows */
.food-meals-edit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.food-meal-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .food-meal-edit-row {
  background: #252525;
}

.fmer-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(61, 43, 31, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .fmer-icon {
  background: rgba(255, 255, 255, 0.06);
}

.fmer-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
}

.fmer-detail {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown3);
  margin-top: 1px;
}

/* Dark mode for meal card headers */
[data-theme="dark"] .food-meal-header[style*="FFF3E0"],
[data-theme="dark"] .food-meal-header[style*="E8F5E9"],
[data-theme="dark"] .food-meal-header[style*="EDE7F6"] {
  opacity: 0.85;
}

/* ── Places (Luoghi vicini) ─────────────────────────────── */

.plc-cats-wrap {
  padding: 0 16px 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}

.plc-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.plc-cats::-webkit-scrollbar {
  display: none;
}

.plc-cat {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border-radius: 22px;
  border: 2px solid;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  opacity: 0.6;
}

.plc-cat.active {
  opacity: 1;
  color: #fff !important;
}

/* Colori individuali per categoria */
.plc-cat[data-cat="vet"] {
  border-color: #FF6B6B;
  color: #FF6B6B;
}

.plc-cat[data-cat="hotel"] {
  border-color: #FF9800;
  color: #FF9800;
}

.plc-cat[data-cat="restaurant"] {
  border-color: #9C27B0;
  color: #9C27B0;
}

.plc-cat[data-cat="park"] {
  border-color: #4CAF50;
  color: #4CAF50;
}

.plc-cat[data-cat="beach"] {
  border-color: #2196F3;
  color: #2196F3;
}

/* Active — darker backgrounds for WCAG AA contrast with white text */
.plc-cat[data-cat="vet"].active {
  background: #D32F2F;
  border-color: #D32F2F;
}

.plc-cat[data-cat="hotel"].active {
  background: #E65100;
  border-color: #E65100;
}

.plc-cat[data-cat="restaurant"].active {
  background: #6A1B9A;
  border-color: #6A1B9A;
}

.plc-cat[data-cat="park"].active {
  background: #2E7D32;
  border-color: #2E7D32;
}

.plc-cat[data-cat="beach"].active {
  background: #1565C0;
  border-color: #1565C0;
}

/* Local-only category chip colors */
.plc-cat[data-cat="all"] {
  border-color: #D4A574;
  color: #8B5E2E;
}

.plc-cat[data-cat="shop"] {
  border-color: #C2185B;
  color: #C2185B;
}

.plc-cat[data-cat="museum"] {
  border-color: #546E7A;
  color: #546E7A;
}

.plc-cat[data-cat="agriturismo"] {
  border-color: #558B2F;
  color: #558B2F;
}

.plc-cat[data-cat="all"].active {
  background: #8B5E2E;
  border-color: #8B5E2E;
}

.plc-cat[data-cat="shop"].active {
  background: #C2185B;
  border-color: #C2185B;
}

.plc-cat[data-cat="museum"].active {
  background: #37474F;
  border-color: #37474F;
}

.plc-cat[data-cat="agriturismo"].active {
  background: #558B2F;
  border-color: #558B2F;
}

/* Slider raggio di ricerca */
.plc-radius-wrap {
  padding: 10px 4px 2px;
}

.plc-radius-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plc-radius-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
}

.plc-radius-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

.plc-radius-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--brown3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.plc-radius-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.plc-radius-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Map */
.plc-map {
  width: 100%;
  height: 240px;
  background: #e8e0d8;
  flex-shrink: 0;
}

/* User position dot */
.plc-user-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.35);
}

/* Place markers */
.plc-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.plc-marker-bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.plc-marker-tail {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid transparent;
  margin-top: -1px;
}

/* Card active state */
.plc-card-active {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Card content */
.plc-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plc-card-addr {
  font-size: 12px;
  color: var(--brown2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plc-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  padding-left: 8px;
}

.plc-card-dist {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown2);
  white-space: nowrap;
}

.plc-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.plc-tel-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.plc-google-link {
  color: var(--brown2);
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.plc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Loading state */
.plc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 20px;
}

.plc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--brown3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: plc-spin 0.8s linear infinite;
}

@keyframes plc-spin {
  to {
    transform: rotate(360deg);
  }
}

.plc-loading-text {
  color: var(--brown2);
  font-size: 14px;
  text-align: center;
}

/* Empty state */
.plc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
}

.plc-empty-icon {
  font-size: 36px;
}

.plc-empty-text {
  font-size: 14px;
  color: var(--brown2);
  text-align: center;
}

/* Dark mode */
[data-theme="dark"] .plc-cats-wrap {
  background: var(--bg);
}

[data-theme="dark"] .plc-map {
  filter: brightness(0.85);
}

/* ═══════════════════════════════════════
   MAP BOTTOM SHEET — Card pin pet-friendly
   ═══════════════════════════════════════ */
#mbs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mbs-overlay.mbs-visible {
  opacity: 1;
  visibility: visible;
}

.mbs-card {
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

#mbs-overlay.mbs-visible .mbs-card {
  transform: translateY(0);
}

.mbs-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.mbs-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}

.mbs-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mbs-thumb-placeholder {
  display: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.2);
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.mbs-thumb-placeholder.visible {
  display: flex;
}

.mbs-header-text {
  flex: 1;
  min-width: 0;
}

.mbs-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.mbs-sub {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

.mbs-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.mbs-address {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.mbs-contact-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.mbs-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.mbs-icon-btn:hover,
.mbs-icon-btn:focus {
  background: rgba(212, 165, 116, 0.2);
  color: #D4A574;
}

.mbs-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mbs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.mbs-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #D4A574, #C78D5D);
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(199, 141, 93, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.mbs-nav-btn:hover,
.mbs-nav-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(199, 141, 93, 0.45);
}

.mbs-nav-btn:active {
  transform: translateY(0);
}

.mbs-nav-btn svg {
  flex-shrink: 0;
}

/* Light theme override per bottom sheet (opzionale, mantiene dark) */
:root:not([data-theme="dark"]) #mbs-overlay .mbs-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f4f0 100%);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-name {
  color: #1a1a1a;
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-sub {
  color: rgba(61, 43, 31, 0.55);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-address {
  color: rgba(61, 43, 31, 0.70);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-contact-row {
  border-bottom-color: rgba(61, 43, 31, 0.08);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-icon-btn {
  background: rgba(61, 43, 31, 0.06);
  border-color: rgba(61, 43, 31, 0.10);
  color: #3D2B1F;
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-pill {
  background: rgba(61, 43, 31, 0.06);
  border-color: rgba(61, 43, 31, 0.10);
  color: #3D2B1F;
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-handle-bar {
  background: rgba(61, 43, 31, 0.15);
}

/* ═══════════════════════════════════════
   CAROUSEL — hint doppio tap
   ═══════════════════════════════════════ */
.cc-hint {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.3px;
  pointer-events: none;
}

/* Overlay dettaglio carousel */
.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 8000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.cc-overlay-box {
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 28px 24px 36px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(.22, .68, 0, 1.2);
}

.cc-overlay-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 12px;
}

.cc-overlay-title {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  text-align: center;
  margin-bottom: 16px;
}

.cc-overlay-body {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.7;
  text-align: left;
}

.cc-ov-line {
  padding: 2px 0;
  color: var(--brown);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.cc-ov-bullet {
  padding: 3px 0 3px 2px;
  color: var(--brown);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.cc-ov-gap {
  height: 10px;
}

.cc-overlay-close {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* ═══════════════════════════════════════
   STORIA A PAGINE (SFOGLIABILE)
   ═══════════════════════════════════════ */
.storia-card {
  overflow: visible;
}

.storia-text-wrap {
  min-height: 140px;
  max-height: none;
  overflow: visible;
  position: relative;
  margin-bottom: 12px;
}

#home-storia {
  white-space: pre-line;
  overflow: visible;
  max-height: none;
}

.storia-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.storia-pag-prev,
.storia-pag-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color, rgba(0,0,0,0.08));
  background: var(--card);
  color: var(--brown);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.storia-pag-prev:active,
.storia-pag-next:active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.storia-pag-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.storia-pag-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: rgba(255, 107, 107, 0.1);
  color: var(--brown2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.storia-pag-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.storia-pag-btn:not(.active):active {
  background: rgba(255, 107, 107, 0.2);
}

/* ═══════════════════════════════════════
   DATE PICKER CUSTOM
   ═══════════════════════════════════════ */
.datepicker-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border: 1.5px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.datepicker-trigger:active {
  border-color: var(--primary);
}

.datepicker-trigger-sm {
  padding: 8px 12px;
  border-radius: 10px;
}

.datepicker-trigger-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.datepicker-trigger-val {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
}

.datepicker-trigger-arrow {
  font-size: 18px;
  color: var(--brown3);
}

[data-theme="dark"] .datepicker-trigger {
  border-color: rgba(212, 165, 116, 0.1);
  background: #252525;
}

/* Bottom sheet */
.dp-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
  z-index: 9001;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.1);
}

.dp-sheet.dp-open {
  transform: translateY(0);
}

.dp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.dp-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.07);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--brown);
}

.dp-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
}

.dp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dp-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: var(--brown);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dp-month-year {
  font-size: 16px;
  font-weight: 800;
  color: var(--brown);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}

.dp-month-year:active {
  background: rgba(0, 0, 0, 0.06);
}

.dp-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.dp-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
  padding: 4px 0;
}

.dp-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
  transition: background 0.15s;
}

.dp-day:active {
  background: rgba(255, 107, 107, 0.15);
}

.dp-day.dp-sel {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.dp-confirm-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 15px;
  border: none;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* Year picker */
.dp-years-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 4px 0;
}

.dp-year-item {
  padding: 10px 4px;
  text-align: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
  cursor: pointer;
  transition: background 0.15s;
}

.dp-year-item:active {
  background: rgba(255, 107, 107, 0.15);
}

.dp-year-item.dp-sel {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

[data-theme="dark"] .dp-sheet {
  background: #252525;
}

[data-theme="dark"] .dp-nav-btn {
  background: rgba(212, 165, 116, 0.08);
}

[data-theme="dark"] .dp-close {
  background: rgba(212, 165, 116, 0.1);
}

[data-theme="dark"] .dp-month-year:active {
  background: rgba(212, 165, 116, 0.08);
}

[data-theme="dark"] .dp-day:active {
  background: rgba(212, 165, 116, 0.15);
}

[data-theme="dark"] .cc-overlay-box {
  background: #252525;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ═══════════════════════════════════════
   SMART ALBUM — Milestone Timeline
   ═══════════════════════════════════════ */
.album-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--copper, #C78D5D);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.album-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.3), transparent);
}

.milestone-timeline {
  position: relative;
  padding-left: 30px;
}

.milestone-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg,
      rgba(212, 165, 116, 0.5),
      rgba(212, 165, 116, 0.15),
      rgba(212, 165, 116, 0.05));
  border-radius: 1px;
}

.milestone-card {
  position: relative;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.milestone-card.milestone-pending {
  background: var(--card);
  opacity: 0.3;
  border: 1.5px dashed rgba(212, 165, 116, 0.3);
}

.milestone-card.milestone-pending:active {
  opacity: 0.5;
  transform: scale(0.98);
}

.milestone-card.milestone-done {
  background: var(--card);
  opacity: 1;
  border: 1.5px solid rgba(212, 165, 116, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.milestone-card.milestone-done:active {
  transform: scale(0.97);
}

.milestone-dot {
  position: absolute;
  left: -26px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.milestone-pending .milestone-dot {
  background: rgba(212, 165, 116, 0.2);
  border: 2px solid rgba(212, 165, 116, 0.4);
}

.milestone-done .milestone-dot {
  background: var(--copper, #C78D5D);
  border: 2px solid var(--copper, #C78D5D);
  box-shadow: 0 0 8px rgba(212, 165, 116, 0.4);
}

.milestone-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.milestone-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.milestone-done .milestone-icon {
  background: rgba(212, 165, 116, 0.2);
  border-color: rgba(212, 165, 116, 0.3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.milestone-info {
  flex: 1;
  min-width: 0;
}

.milestone-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
}

.milestone-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown3);
  margin-top: 2px;
}

.milestone-done .milestone-sub {
  color: var(--copper, #C78D5D);
}

.milestone-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.milestone-pending .milestone-check {
  background: rgba(212, 165, 116, 0.1);
  border: 1.5px dashed rgba(212, 165, 116, 0.3);
  color: transparent;
}

.milestone-done .milestone-check {
  background: var(--copper, #C78D5D);
  color: white;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

.milestone-photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(212, 165, 116, 0.2);
}

/* ═══════════════════════════════════════
   ALBUM — Gallery Scan Suggestion
   ═══════════════════════════════════════ */
.album-scan-box {
  background: linear-gradient(135deg,
      rgba(212, 165, 116, 0.10),
      rgba(199, 141, 93, 0.06));
  border: 1.5px solid rgba(212, 165, 116, 0.25);
  border-radius: 18px;
  padding: 18px 16px;
  margin-top: 20px;
  cursor: pointer;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.album-scan-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.08), transparent 70%);
  pointer-events: none;
}

.album-scan-box:active {
  transform: scale(0.98);
  border-color: rgba(212, 165, 116, 0.45);
}

[data-theme="dark"] .album-scan-box {
  background: linear-gradient(135deg,
      rgba(212, 165, 116, 0.06),
      rgba(199, 141, 93, 0.03));
}

.album-scan-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.album-scan-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(199, 141, 93, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  color: var(--copper, #C78D5D);
}

.album-scan-text {
  flex: 1;
}

.album-scan-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
}

.album-scan-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 2px;
  line-height: 1.4;
}

.album-scan-arrow {
  font-size: 18px;
  color: var(--copper, #C78D5D);
  font-weight: 700;
  flex-shrink: 0;
}

.album-scan-found {
  background: linear-gradient(135deg,
      rgba(76, 175, 80, 0.10),
      rgba(76, 175, 80, 0.05));
  border-color: rgba(76, 175, 80, 0.25);
  margin-top: 12px;
}

.album-scan-found .album-scan-icon {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.15));
}

/* ── Scanning state ── */
.album-scan-scanning {
  background: linear-gradient(135deg,
      rgba(212, 165, 116, 0.08),
      rgba(199, 141, 93, 0.04));
  border-color: rgba(212, 165, 116, 0.3);
  cursor: default;
}

.scan-spinner-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--copper, #C78D5D);
}

.scan-spinner-svg {
  animation: scan-spin 1.4s linear infinite;
}

@keyframes scan-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.scan-title-pulse {
  animation: scan-pulse 1.6s ease-in-out infinite;
}

@keyframes scan-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* ── Found result thumbnails strip ── */
.scan-result-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow: hidden;
}

.scan-result-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(76, 175, 80, 0.2);
  animation: thumb-pop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.scan-result-thumb:nth-child(2) {
  animation-delay: 60ms;
}

.scan-result-thumb:nth-child(3) {
  animation-delay: 120ms;
}

.scan-result-thumb:nth-child(4) {
  animation-delay: 180ms;
}

.scan-result-thumb:nth-child(5) {
  animation-delay: 240ms;
}

@keyframes thumb-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scan-result-extra {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(76, 175, 80, 0.12);
  border: 1.5px solid rgba(76, 175, 80, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

.scan-continue-row {
  margin-top: 12px;
  border-top: 1px solid rgba(212, 165, 116, 0.15);
  padding-top: 12px;
}

.scan-continue-btn {
  background: none;
  border: 1.5px solid rgba(212, 165, 116, 0.35);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--copper, #C78D5D);
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.scan-continue-btn:active {
  background: rgba(212, 165, 116, 0.1);
  transform: scale(0.98);
}

.album-scan-progress {
  margin-top: 10px;
  height: 4px;
  background: rgba(212, 165, 116, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.album-scan-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--copper, #C78D5D), var(--accent));
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Album empty state */
.album-empty-hero {
  text-align: center;
  padding: 40px 20px 24px;
}

.album-empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.album-empty-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.3;
}

.album-empty-title span {
  color: var(--copper, #C78D5D);
}

.album-empty-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 6px;
  line-height: 1.5;
}

/* Album photos grid (populated state) */
.album-photos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 10px;
}

.album-photos-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--brown3);
}

/* ═══════════════════════════════════════
   ALBUM — Photo Gallery (new design)
   ═══════════════════════════════════════ */

/* Stats bar */
.alb-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 20px 8px;
}

.alb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.alb-stat-n {
  font-size: 22px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.5px;
  line-height: 1;
}

.alb-stat-l {
  font-size: 10px;
  font-weight: 700;
  color: var(--brown3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.alb-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* Month group */
.alb-group {
  padding: 18px 0 4px;
}

.alb-month-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 10px;
}

.alb-month-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.3px;
  text-transform: capitalize;
}

.alb-month-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
  background: var(--bg);
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 2px 10px;
}

[data-theme="dark"] .alb-month-count {
  background: rgba(255, 255, 255, 0.05);
}

/* ── MASONRY GRID & HERO ── */
.alb-masonry-grid {
  column-count: 2;
  column-gap: 12px;
  padding-bottom: 8px;
}

.alb-hero-view {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 4px;
}

.alb-hero-view .alb-tile {
  width: 100%;
  margin-bottom: 16px;
}

.alb-hero-view .alb-tile img {
  max-height: 60vh;
}

.alb-tile {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  break-inside: avoid-column;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  transform: translateZ(0);
  border: 1px solid rgba(212, 165, 116, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .alb-tile {
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.alb-tile img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.alb-tile:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alb-tile:active img {
  opacity: 0.85;
}

[data-theme="dark"] .alb-tile:active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Empty state */
.alb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 28px 40px;
  gap: 14px;
  text-align: center;
}

/* Pet illustration */
.alb-dog-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.alb-pet-icon {
  animation: alb-pet-float 2.4s ease-in-out infinite;
}

.alb-pet-img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(255, 140, 0, 0.55));
}

.alb-paws-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.alb-paw {
  position: absolute;
  font-size: 16px;
  animation: alb-paw-float 2.5s ease-in-out infinite;
  opacity: 0;
}

.alb-paw-a {
  left: 10%;
  bottom: 10%;
  animation-delay: 0s;
}

.alb-paw-b {
  right: 10%;
  bottom: 25%;
  animation-delay: 0.95s;
}

.alb-paw-c {
  left: 42%;
  bottom: 2%;
  animation-delay: 1.8s;
}

.alb-empty-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.3px;
}

.alb-empty-sub {
  font-size: 13px;
  color: var(--brown2);
  line-height: 1.55;
  font-weight: 500;
}

.alb-empty-hint {
  font-size: 11.5px;
  color: var(--brown3);
  font-weight: 500;
  opacity: 0.72;
  margin-top: -4px;
}

.alb-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 13px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 14px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  border: none;
  outline: none;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.alb-empty-cta:active {
  transform: scale(0.96);
}

@keyframes alb-pet-float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-9px) scale(1.03);
  }
}

@keyframes alb-paw-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6) rotate(-10deg);
  }

  20% {
    opacity: 0.7;
  }

  80% {
    opacity: 0.4;
    transform: translateY(-38px) scale(1) rotate(10deg);
  }

  100% {
    opacity: 0;
    transform: translateY(-58px) scale(0.8) rotate(-5deg);
  }
}

@keyframes alb-glow {

  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.35));
  }

  50% {
    filter: drop-shadow(0 0 16px rgba(255, 200, 0, 0.8));
  }
}

/* ── Fullscreen viewer ────────────────────────────────────── */
#album-viewer {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: #000;
}

.alb-viewer {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

/* Viewer top bar */
.alb-v-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.alb-v-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}

.alb-v-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.alb-v-del-btn {
  color: rgba(255, 120, 120, 0.85);
}

.alb-v-meta {
  flex: 1;
  text-align: center;
  padding: 0 10px;
}

.alb-v-date {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.alb-v-counter {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

/* Viewer image */
.alb-v-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
}

.alb-v-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

/* Viewer nav */
.alb-v-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  background: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.alb-v-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.alb-v-nav-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

.alb-v-nav-btn.dis {
  opacity: 0.25;
  cursor: default;
}

.alb-v-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.alb-v-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.alb-v-dot.on {
  background: var(--primary, #FF6B6B);
  width: 16px;
  border-radius: 3px;
}

/* Dark mode tweaks */
[data-theme="dark"] .alb-stat-n {
  color: var(--brown);
}

[data-theme="dark"] .alb-month-name {
  color: var(--brown);
}

[data-theme="dark"] .alb-empty-title {
  color: var(--brown);
}

[data-theme="dark"] .alb-empty-sub {
  color: var(--brown2);
}

/* ═══════════════════════════════════════
   PET MAP — Mappa Strutture Pet-Friendly
   ═══════════════════════════════════════ */

/* --- Full-screen immersive view (covers app header) --- */
#v-petmap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 210;
}

#v-petmap.hidden,
#v-petmap.behind {
  z-index: 5;
}

.pm-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* --- Floating header bar --- */
.pm-header {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(26, 26, 26, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.pm-header .back {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.9);
  transition: background 0.15s;
}
/* petmap header: paw always orange (dark glassy overlay) */
.pm-header .back::after {
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23FF9800' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='9' cy='5.5' rx='2.2' ry='2.8'/%3E%3Cellipse cx='15' cy='5.5' rx='2.2' ry='2.8'/%3E%3Cellipse cx='5' cy='10.5' rx='1.8' ry='2.3'/%3E%3Cellipse cx='19' cy='10.5' rx='1.8' ry='2.3'/%3E%3Cpath d='M12 9c-3.2 0-6 2.2-6 5.2 0 1.8.8 3 2.2 3.8.8.5 1.8.8 2.5 1.4.3.3.8.6 1.3.6s1-.3 1.3-.6c.7-.6 1.7-.9 2.5-1.4 1.4-.8 2.2-2 2.2-3.8C18 11.2 15.2 9 12 9z'/%3E%3C/svg%3E") !important;
}
:root:not([data-theme="dark"]) .pm-header .back::after {
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%23FF9800' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='9' cy='5.5' rx='2.2' ry='2.8'/%3E%3Cellipse cx='15' cy='5.5' rx='2.2' ry='2.8'/%3E%3Cellipse cx='5' cy='10.5' rx='1.8' ry='2.3'/%3E%3Cellipse cx='19' cy='10.5' rx='1.8' ry='2.3'/%3E%3Cpath d='M12 9c-3.2 0-6 2.2-6 5.2 0 1.8.8 3 2.2 3.8.8.5 1.8.8 2.5 1.4.3.3.8.6 1.3.6s1-.3 1.3-.6c.7-.6 1.7-.9 2.5-1.4 1.4-.8 2.2-2 2.2-3.8C18 11.2 15.2 9 12 9z'/%3E%3C/svg%3E") !important;
}

.pm-header .back:active {
  background: rgba(255, 255, 255, 0.15);
}

.pm-title {
  flex: 1;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}

.pm-locate-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 165, 116, 0.2);
  border: 1px solid rgba(212, 165, 116, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #D4A574;
  transition: background 0.15s, transform 0.15s;
}

.pm-locate-btn:active {
  background: rgba(212, 165, 116, 0.35);
  transform: scale(0.92);
}

/* --- Country selector tabs --- */
.pm-country-tabs {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 4px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pm-country-tabs::-webkit-scrollbar {
  display: none;
}

.pm-country-tab {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.pm-country-tab.active {
  background: var(--brown2, #D4A574);
  color: #1a1a1a;
  border-color: var(--brown2, #D4A574);
}

[data-theme="light"] .pm-country-tab {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(61, 43, 31, 0.12);
  color: var(--brown, #5D4037);
}

[data-theme="light"] .pm-country-tab.active {
  background: var(--brown, #5D4037);
  color: #fff;
  border-color: var(--brown, #5D4037);
}

/* --- Category filter chips (horizontal scroll) --- */
.pm-filters {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 100px);
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, transparent 0px, #000 12px, #000 calc(100% - 12px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0px, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.pm-filters::-webkit-scrollbar {
  display: none;
}

.pm-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 26, 26, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pm-chip:active {
  transform: scale(0.95);
}

.pm-chip.active {
  background: linear-gradient(135deg, #D4A574, #C78D5D);
  border-color: transparent;
  color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(212, 165, 116, 0.35);
}

/* --- Loading overlay --- */
.pm-loading {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
}

.pm-loading-text {
  color: var(--brown2, #998877);
  font-size: 14px;
  font-weight: 600;
}

/* --- Source badge (🇮🇹 locale / 🌍 API) --- */
.pm-source-badge {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
  left: 12px;
  z-index: 100;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.pm-source-local {
  background: rgba(34, 80, 34, 0.7);
  color: #7ddf7d;
}

.pm-source-api {
  background: rgba(30, 60, 90, 0.7);
  color: #7dbbf0;
}

/* --- Count badge --- */
.pm-count {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
  right: 12px;
  z-index: 100;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: none;
}

/* --- API markers (international) --- */
.pm-api-marker {
  font-size: 26px;
  cursor: pointer;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.15s;
}

.pm-api-marker:active {
  transform: scale(1.2);
}

/* --- PetMap bottom sheet overlay --- */
#pm-mbs-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

#pm-mbs-overlay.mbs-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#pm-mbs-overlay .mbs-card {
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

#pm-mbs-overlay.mbs-visible .mbs-card {
  transform: translateY(0);
}

/* --- Light theme adjustments for PetMap --- */
:root:not([data-theme="dark"]) .pm-header {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

:root:not([data-theme="dark"]) .pm-header .back {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}

:root:not([data-theme="dark"]) .pm-title {
  color: #1a1a1a;
}

:root:not([data-theme="dark"]) .pm-locate-btn {
  background: rgba(199, 141, 93, 0.12);
  border-color: rgba(199, 141, 93, 0.25);
  color: #8B5E2E;
}

:root:not([data-theme="dark"]) .pm-chip {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(0, 0, 0, 0.08);
  color: #555;
}

:root:not([data-theme="dark"]) .pm-chip.active {
  background: linear-gradient(135deg, #D4A574, #C78D5D);
  border-color: transparent;
  color: #3D1F00;
}

:root:not([data-theme="dark"]) .pm-source-badge {
  border-color: rgba(0, 0, 0, 0.08);
}

:root:not([data-theme="dark"]) .pm-source-local {
  background: rgba(200, 240, 200, 0.85);
  color: #2a6e2a;
}

:root:not([data-theme="dark"]) .pm-source-api {
  background: rgba(200, 220, 245, 0.85);
  color: #2a5090;
}

:root:not([data-theme="dark"]) .pm-count {
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  border-color: rgba(0, 0, 0, 0.08);
}

/* MapLibre attribution compact */
#pm-map .maplibregl-ctrl-attrib {
  font-size: 10px;
}

#pm-map .maplibregl-ctrl-bottom-right {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  right: 8px;
}

/* ═══════════════════════════════════════
   PET TAG PILLS — Icone servizi struttura
   Colori diversi per tipo di servizio
   ═══════════════════════════════════════ */
.plc-pet-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.2);
  font-size: 11px;
  font-weight: 700;
  color: #8B6914;
  white-space: nowrap;
  line-height: 1.2;
}

[data-theme="dark"] .plc-pet-pill {
  background: rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.25);
  color: #D4A574;
}

/* Animali ammessi (cani, gatti) — azzurro */
.pet-pill--animals {
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.25);
  color: #1565C0;
}

[data-theme="dark"] .pet-pill--animals {
  background: rgba(33, 150, 243, 0.18);
  border-color: rgba(33, 150, 243, 0.3);
  color: #64B5F6;
}

/* Taglia — viola */
.pet-pill--size {
  background: rgba(156, 39, 176, 0.1);
  border-color: rgba(156, 39, 176, 0.2);
  color: #7B1FA2;
}

[data-theme="dark"] .pet-pill--size {
  background: rgba(156, 39, 176, 0.18);
  border-color: rgba(156, 39, 176, 0.3);
  color: #CE93D8;
}

/* Gratis — verde */
.pet-pill--free {
  background: rgba(76, 175, 80, 0.12);
  border-color: rgba(76, 175, 80, 0.25);
  color: #2E7D32;
}

[data-theme="dark"] .pet-pill--free {
  background: rgba(76, 175, 80, 0.18);
  border-color: rgba(76, 175, 80, 0.3);
  color: #81C784;
}

/* A pagamento — arancione */
.pet-pill--paid {
  background: rgba(255, 152, 0, 0.12);
  border-color: rgba(255, 152, 0, 0.25);
  color: #E65100;
}

[data-theme="dark"] .pet-pill--paid {
  background: rgba(255, 152, 0, 0.18);
  border-color: rgba(255, 152, 0, 0.3);
  color: #FFB74D;
}

/* Servizi (ciotole, cuccia, ristorante) — ambra/dorato */
.pet-pill--service {
  background: rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.25);
  color: #8B6914;
}

[data-theme="dark"] .pet-pill--service {
  background: rgba(212, 165, 116, 0.2);
  border-color: rgba(212, 165, 116, 0.3);
  color: #D4A574;
}

/* Natura (giardino, parco) — verde scuro */
.pet-pill--nature {
  background: rgba(56, 142, 60, 0.12);
  border-color: rgba(56, 142, 60, 0.25);
  color: #1B5E20;
}

[data-theme="dark"] .pet-pill--nature {
  background: rgba(56, 142, 60, 0.18);
  border-color: rgba(56, 142, 60, 0.3);
  color: #A5D6A7;
}

/* ═══════════════════════════════════════
   LUOGHI — Source Badge
   ═══════════════════════════════════════ */
.plc-source-badge {
  margin: 8px 20px 0;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.plc-source-local {
  background: rgba(200, 240, 200, 0.6);
  color: #2a6e2a;
  border: 1px solid rgba(42, 110, 42, 0.15);
}

.plc-source-api {
  background: rgba(200, 220, 245, 0.6);
  color: #2a5090;
  border: 1px solid rgba(42, 80, 144, 0.15);
}

[data-theme="dark"] .plc-source-local {
  background: rgba(42, 110, 42, 0.2);
  color: #7dcc7d;
  border-color: rgba(42, 110, 42, 0.3);
}

[data-theme="dark"] .plc-source-api {
  background: rgba(42, 80, 144, 0.2);
  color: #8db8f0;
  border-color: rgba(42, 80, 144, 0.3);
}

/* ═══════════════════════════════════════
   LUOGHI — Result Count
   ═══════════════════════════════════════ */
.plc-result-count {
  padding: 6px 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
  text-align: center;
}

/* ═══════════════════════════════════════
   PETMAP — Nearby Cards Panel
   ═══════════════════════════════════════ */
.pm-cards-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 45%;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 20;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.22, .68, 0, 1.1);
  display: flex;
  flex-direction: column;
}

.pm-cards-panel.pm-panel-visible {
  transform: translateY(0);
}

.pm-cards-panel.pm-panel-collapsed {
  transform: translateY(calc(100% - 44px));
}

.pm-panel-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.pm-panel-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .pm-panel-handle-bar {
  background: rgba(255, 255, 255, 0.2);
}

.pm-panel-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
}

.pm-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

/* Individual nearby card */
.pm-nearby-card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.pm-nearby-card:active {
  transform: scale(0.98);
}

[data-theme="dark"] .pm-nearby-card {
  border-color: rgba(255, 255, 255, 0.06);
}

.pm-nc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pm-nc-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-nc-dist {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.pm-nc-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--brown3);
  margin-top: 2px;
}

.pm-nc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.pm-nc-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.pm-nc-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 12px;
  font-weight: 600;
  color: var(--brown);
  text-decoration: none;
  transition: background 0.15s;
}

.pm-nc-action:active {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .pm-nc-action {
  background: rgba(255, 255, 255, 0.06);
}

.pm-nc-nav {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(199, 141, 93, 0.15));
  color: var(--primary);
  font-weight: 700;
}

[data-theme="dark"] .pm-nc-nav {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(199, 141, 93, 0.2));
}

/* ═══════════════════════════════════════════════════════════
   PETMAP v2 — Design System Upgrade
   - Compact card (Stato 1)
   - Bottom sheet drag handle + light mode fix
   - Locate btn rotation animation
   - Pill stagger animation
   - Distance badge in card
   - Beach tag color
   - SVG icon sizing in pills
   ═══════════════════════════════════════════════════════════ */

/* ── Locate btn spin animation ─────────────────────────── */
@keyframes pm-locate-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pm-locate-spinning svg {
  animation: pm-locate-spin 0.7s linear infinite;
}

/* ── MBS drag handle bar ───────────────────────────────── */
.mbs-handle-bar {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.20);
  margin: 0 auto 18px;
  flex-shrink: 0;
}

:root:not([data-theme="dark"]) .mbs-handle-bar {
  background: rgba(61, 43, 31, 0.15);
}

/* ── MBS distance badge ────────────────────────────────── */
.mbs-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary, #FF8585);
  margin-top: 5px;
}

:root:not([data-theme="dark"]) .mbs-distance {
  color: var(--primary, #FF6B6B);
}

/* ── MBS pill semantic colors (replicate plc-pet-pill logic) */
.mbs-pill.pet-pill--animals {
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.25);
  color: #1565C0;
}

[data-theme="dark"] .mbs-pill.pet-pill--animals {
  background: rgba(33, 150, 243, 0.18);
  border-color: rgba(33, 150, 243, 0.30);
  color: #64B5F6;
}

.mbs-pill.pet-pill--size {
  background: rgba(156, 39, 176, 0.10);
  border-color: rgba(156, 39, 176, 0.20);
  color: #7B1FA2;
}

[data-theme="dark"] .mbs-pill.pet-pill--size {
  background: rgba(156, 39, 176, 0.18);
  border-color: rgba(156, 39, 176, 0.30);
  color: #CE93D8;
}

.mbs-pill.pet-pill--free {
  background: rgba(76, 175, 80, 0.12);
  border-color: rgba(76, 175, 80, 0.25);
  color: #2E7D32;
}

[data-theme="dark"] .mbs-pill.pet-pill--free {
  background: rgba(76, 175, 80, 0.18);
  border-color: rgba(76, 175, 80, 0.30);
  color: #81C784;
}

.mbs-pill.pet-pill--paid {
  background: rgba(255, 152, 0, 0.12);
  border-color: rgba(255, 152, 0, 0.25);
  color: #E65100;
}

[data-theme="dark"] .mbs-pill.pet-pill--paid {
  background: rgba(255, 152, 0, 0.18);
  border-color: rgba(255, 152, 0, 0.30);
  color: #FFB74D;
}

.mbs-pill.pet-pill--service {
  background: rgba(212, 165, 116, 0.15);
  border-color: rgba(212, 165, 116, 0.25);
  color: #8B6914;
}

[data-theme="dark"] .mbs-pill.pet-pill--service {
  background: rgba(212, 165, 116, 0.20);
  border-color: rgba(212, 165, 116, 0.30);
  color: #D4A574;
}

.mbs-pill.pet-pill--nature {
  background: rgba(56, 142, 60, 0.12);
  border-color: rgba(56, 142, 60, 0.25);
  color: #1B5E20;
}

[data-theme="dark"] .mbs-pill.pet-pill--nature {
  background: rgba(56, 142, 60, 0.18);
  border-color: rgba(56, 142, 60, 0.30);
  color: #A5D6A7;
}

.mbs-pill.pet-pill--beach,
.plc-pet-pill.pet-pill--beach {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.25);
  color: #0369A1;
}

[data-theme="dark"] .mbs-pill.pet-pill--beach,
[data-theme="dark"] .plc-pet-pill.pet-pill--beach {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.30);
  color: #7DD3FC;
}

/* ── SVG icon size inside pills ───────────────────────── */
.mbs-pill svg,
.plc-pet-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Pill stagger animation ───────────────────────────── */
@keyframes mbs-pill-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mbs-pills--animated .mbs-pill {
  opacity: 0;
  animation: mbs-pill-in 0.28s ease forwards;
  animation-delay: calc(var(--pill-i, 0) * 40ms + 80ms);
}

/* ── Compact Card (Stato 1) ───────────────────────────── */
.pm-compact-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 0 0 env(safe-area-inset-bottom, 0);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.30s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease,
    visibility 0s linear 0.30s;
  pointer-events: none;
}

.pm-compact-card.pm-cc-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.30s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease,
    visibility 0s linear 0s;
}

:root:not([data-theme="dark"]) .pm-compact-card {
  background: rgba(255, 255, 255, 0.93);
  border-top-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.10);
}

.pm-cc-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  margin: 10px auto 0;
}

:root:not([data-theme="dark"]) .pm-cc-handle-bar {
  background: rgba(61, 43, 31, 0.14);
}

.pm-cc-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 16px;
  cursor: pointer;
}

.pm-cc-thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

:root:not([data-theme="dark"]) .pm-cc-thumb {
  background: rgba(212, 165, 116, 0.10);
}

.pm-cc-info {
  flex: 1;
  min-width: 0;
}

.pm-cc-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

:root:not([data-theme="dark"]) .pm-cc-name {
  color: #1a1a1a;
}

.pm-cc-sub {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.50);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

:root:not([data-theme="dark"]) .pm-cc-sub {
  color: rgba(61, 43, 31, 0.50);
}

.pm-cc-dist {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary, #FF8585);
  margin-top: 3px;
}

:root:not([data-theme="dark"]) .pm-cc-dist {
  color: var(--primary, #FF6B6B);
}

.pm-cc-pills {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-top: 6px;
}

.pm-cc-pills .plc-pet-pill {
  font-size: 10px;
  padding: 3px 8px;
  gap: 3px;
}

.pm-cc-pills .plc-pet-pill svg {
  width: 11px;
  height: 11px;
}

.pm-cc-expand {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4A574;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

:root:not([data-theme="dark"]) .pm-cc-expand {
  background: rgba(199, 141, 93, 0.10);
  border-color: rgba(199, 141, 93, 0.20);
  color: #8B5E2E;
}

.pm-cc-expand:active {
  transform: scale(0.90);
}

/* ── Plc-pet-pill "more" badge ────────────────────────── */
.plc-pet-pill--more {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

[data-theme="dark"] .plc-pet-pill--more {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
}

:root:not([data-theme="dark"]) .plc-pet-pill--more {
  background: rgba(61, 43, 31, 0.06);
  border-color: rgba(61, 43, 31, 0.10);
  color: rgba(61, 43, 31, 0.50);
}

/* ── Luoghi — pill row + stagger animation ─────────────────── */
.plc-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

@keyframes plc-pill-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.plc-pills-row .plc-pet-pill {
  animation: plc-pill-in 0.22s ease both;
  animation-delay: calc(60ms + var(--pill-i, 0) * 35ms);
}

/* ── Luoghi — card clickable indicator (has pet_tags → shows bottom sheet) ── */
.plc-card:has(.plc-pills-row) {
  cursor: pointer;
}

.plc-card:has(.plc-pills-row):active {
  transform: scale(0.985);
  transition: transform 0.1s ease;
}

/* ── Luoghi — source badge light mode ───────────────────────── */
.plc-source-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 16px 8px;
  display: inline-block;
}

.plc-source-local {
  background: rgba(76, 175, 80, 0.12);
  color: #2E7D32;
  border: 1px solid rgba(76, 175, 80, 0.25);
}

.plc-source-api {
  background: rgba(33, 150, 243, 0.10);
  color: #1565C0;
  border: 1px solid rgba(33, 150, 243, 0.2);
}

[data-theme="dark"] .plc-source-local {
  background: rgba(76, 175, 80, 0.15);
  color: #81C784;
  border-color: rgba(76, 175, 80, 0.3);
}

[data-theme="dark"] .plc-source-api {
  background: rgba(33, 150, 243, 0.15);
  color: #64B5F6;
  border-color: rgba(33, 150, 243, 0.3);
}

/* ── Luoghi — places mbs light mode fix ─────────────────────── */
:root:not([data-theme="dark"]) #mbs-overlay .mbs-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f4f0 100%);
  color: var(--brown);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-name {
  color: var(--brown);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-sub {
  color: var(--brown2);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-address {
  color: var(--brown2);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-distance {
  color: var(--primary);
}

:root:not([data-theme="dark"]) #mbs-overlay .mbs-handle-bar {
  background: rgba(61, 43, 31, 0.15);
}

/* ═══════════════════════════════════════════
   v55 — PREMIUM CARD UI: unified pills,
   badge-verified, phone action btn, flex fix
   ═══════════════════════════════════════════ */

/* 1. Unified glassmorphic pet tags — neutral, icon provides color context */
.plc-pet-pill,
.plc-pet-pill.pet-pill--animals,
.plc-pet-pill.pet-pill--size,
.plc-pet-pill.pet-pill--free,
.plc-pet-pill.pet-pill--paid,
.plc-pet-pill.pet-pill--service,
.plc-pet-pill.pet-pill--nature,
.plc-pet-pill.pet-pill--beach {
  background: rgba(61, 43, 31, 0.07);
  border: 1px solid rgba(61, 43, 31, 0.12);
  color: var(--brown);
  flex-shrink: 0;
  width: auto;
}

[data-theme="dark"] .plc-pet-pill,
[data-theme="dark"] .plc-pet-pill.pet-pill--animals,
[data-theme="dark"] .plc-pet-pill.pet-pill--size,
[data-theme="dark"] .plc-pet-pill.pet-pill--free,
[data-theme="dark"] .plc-pet-pill.pet-pill--paid,
[data-theme="dark"] .plc-pet-pill.pet-pill--service,
[data-theme="dark"] .plc-pet-pill.pet-pill--nature,
[data-theme="dark"] .plc-pet-pill.pet-pill--beach {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--brown2);
}

/* 1b. Unified MBS pills — reset all color variants (dark + light) to glassmorphic neutral */
[data-theme="dark"] .mbs-pill.pet-pill--animals,
[data-theme="dark"] .mbs-pill.pet-pill--size,
[data-theme="dark"] .mbs-pill.pet-pill--free,
[data-theme="dark"] .mbs-pill.pet-pill--paid,
[data-theme="dark"] .mbs-pill.pet-pill--service,
[data-theme="dark"] .mbs-pill.pet-pill--nature,
[data-theme="dark"] .mbs-pill.pet-pill--beach,
.mbs-pill.pet-pill--animals,
.mbs-pill.pet-pill--size,
.mbs-pill.pet-pill--free,
.mbs-pill.pet-pill--paid,
.mbs-pill.pet-pill--service,
.mbs-pill.pet-pill--nature,
.mbs-pill.pet-pill--beach {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

:root:not([data-theme="dark"]) .mbs-pill.pet-pill--animals,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--size,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--free,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--paid,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--service,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--nature,
:root:not([data-theme="dark"]) .mbs-pill.pet-pill--beach {
  background: rgba(61, 43, 31, 0.06);
  border-color: rgba(61, 43, 31, 0.10);
  color: var(--brown);
}

/* 2. Horizontal wrap fix — prevent vertical stacking */
.plc-pills-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 5px;
  margin-top: 7px;
}

/* 3. Premium "Verificato" badge pill */
.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(76, 175, 80, 0.10);
  border: 1px solid rgba(76, 175, 80, 0.28);
  color: #2E7D32;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

[data-theme="dark"] .badge-verified {
  background: rgba(76, 175, 80, 0.14);
  border-color: rgba(76, 175, 80, 0.30);
  color: #81C784;
}

/* 4. Phone/Web action icon button in card right column */
.plc-card-action-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: 4px;
}

.plc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(61, 43, 31, 0.07);
  border: 1px solid rgba(61, 43, 31, 0.12);
  color: var(--brown);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

.plc-icon-btn:active {
  transform: scale(0.90);
}

[data-theme="dark"] .plc-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--brown2);
}

.plc-icon-btn svg {
  pointer-events: none;
}
/* -- Album content wrapper -- */
.alb-content {
  padding: 16px 20px 100px;
}

/* -- Ricordo di oggi (Card in evidenza) -- */
.alb-ricordo-oggi {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #92400E, #F59E0B);
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  box-shadow: 0 8px 24px rgba(180, 83, 9, 0.30);
  color: white;
}
.alb-ricordo-oggi:active { transform: scale(0.98); }
.alb-ricordo-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alb-ricordo-body { flex: 1; min-width: 0; }
.alb-ricordo-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.alb-ricordo-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.alb-ricordo-arrow {
  font-size: 18px;
  font-weight: 700;
  opacity: 0.9;
}

/* -- Tutti i ricordi header -- */
.alb-tutti-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.alb-tutti-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: -0.3px;
}
.alb-tutti-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--brown2);
}
[data-theme="dark"] .alb-tutti-title { color: #E0D6CC; }
[data-theme="dark"] .alb-tutti-count { color: #B0A79E; }

/* -- TAB ANNI (Scorrevole) -- */
.alb-years-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 4px 16px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.alb-years-scroll::-webkit-scrollbar { display: none; }

.alb-year-tab {
  background: transparent;
  color: var(--brown2);
  font-size: 15px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}
.alb-year-tab.active {
  background: var(--card);
  color: var(--primary);
  border-color: rgba(255,107,107,0.3);
  box-shadow: 0 4px 12px rgba(255,107,107,0.1);
}
[data-theme="dark"] .alb-year-tab.active {
  background: #252525;
  color: #FF8585;
  border-color: rgba(255,133,133,0.3);
}

/* -- GRIGLIA CARTELLE MENSILI (Bento Style) -- */
/* ── Album folder cards — shaped icon + label ── */
.alb-folders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 16px;
  padding-bottom: 28px;
}
.alb-folder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  gap: 10px;
}
.alb-folder-card:active .alb-folder-ico { transform: scale(0.88); }

/* Shaped gradient icon area */
.alb-folder-ico {
  width: 100%;
  aspect-ratio: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* background and clip-path set inline per-month */
}

/* Shimmer sweep inside the shape */
.alb-folder-ico.has-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.13) 50%, transparent 80%);
  background-size: 300% 100%;
  animation: alb-shimmer 4s ease-in-out 1s infinite;
  pointer-events: none;
}
@keyframes alb-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Month SVG icon — floating */
.alb-folder-svg {
  position: absolute;
  width: 52%;
  height: 52%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.22));
  pointer-events: none;
  animation: alb-icon-float 3.2s ease-in-out 0.6s infinite;
}
.alb-folder-svg svg { width: 100%; height: 100%; }
.alb-folders-grid > :nth-child(even) .alb-folder-svg { animation-delay: 2.2s; }
@keyframes alb-icon-float {
  0%, 100% { transform: translate(-50%, -50%); }
  50%       { transform: translate(-50%, calc(-50% - 7px)); }
}

/* Text label below shaped icon */
.alb-folder-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.alb-folder-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.2px;
  line-height: 1.2;
}
.alb-folder-year {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown3);
}
.alb-folder-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--brown3);
  margin-top: 1px;
}

.alb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  color: var(--brown);
  border: none;
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .alb-back-btn {
  background: #252525;
  color: #E0D6CC;
}

/* alb-folder-card::after removed — shimmer now on .alb-folder-ico::after */

/* Emozioni Colori (Gradients) */
.g-blue   { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.g-green  { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.g-yellow { background: linear-gradient(135deg, #f6d365, #fda085); }
.g-purple { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.g-red    { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.g-orange { background: linear-gradient(135deg, #ffb347, #ffcc33); }

/* Album v60+ animations now in shaped-icon block above */


/* Medication delete button */
.med-del-btn { background:none; border:none; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; color:var(--brown3); cursor:pointer; transition:all 0.18s; flex-shrink:0; }
.med-del-btn:active { background:rgba(244,67,54,0.12); color:var(--red); transform:scale(0.9); }
[data-theme="dark"] .med-del-btn { color:rgba(176,167,158,0.5); }
[data-theme="dark"] .med-del-btn:active { background:rgba(239,83,80,0.15); color:var(--red); }

/* ═══════════════════════════════════════════════════
   HEALTH DASHBOARD — iOS-quality redesign
   ═══════════════════════════════════════════════════ */

/* ── Hero banner ── */
.health-hero {
  background: linear-gradient(160deg, #3A2518 0%, #2B1D13 55%, #1E1510 100%);
  padding: 18px 20px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(212, 165, 116, 0.15);
}
[data-theme="dark"] .health-hero {
  background: linear-gradient(160deg, #282220 0%, #1E1A18 55%, #141210 100%);
  border-bottom-color: rgba(212, 165, 116, 0.10);
}
/* Light mode health hero */
:root:not([data-theme="dark"]) .health-hero {
  background: linear-gradient(160deg, #F2E3D5 0%, #EDD8C5 55%, #E8D0BB 100%);
  border-bottom-color: rgba(61,43,31,0.10);
}
:root:not([data-theme="dark"]) .health-hero-name { color: #3D2B1F; }
:root:not([data-theme="dark"]) .health-hero-add {
  color: #7A4F2C;
  background: rgba(61,43,31,0.08);
  border-color: rgba(61,43,31,0.20);
}
:root:not([data-theme="dark"]) .health-hero-add:active { background: rgba(61,43,31,0.14); }
:root:not([data-theme="dark"]) .health-stat-chip {
  background: rgba(255,255,255,0.55);
  border-color: rgba(61,43,31,0.13);
}
:root:not([data-theme="dark"]) .health-stat-chip-val { color: #3D2B1F; }
:root:not([data-theme="dark"]) .health-stat-chip-lbl { color: rgba(61,43,31,0.52); }
.health-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.health-hero-name {
  font-size: 22px;
  font-weight: 900;
  color: #F0E6DB;
  letter-spacing: -0.3px;
}
.health-hero-add {
  font-size: 13px;
  font-weight: 800;
  color: #D4A574;
  cursor: pointer;
  padding: 6px 14px;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.25);
  border-radius: 20px;
  letter-spacing: 0.2px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.health-hero-add:active { background: rgba(212, 165, 116, 0.22); }

/* Stat chips row */
.health-hero-stats {
  display: flex;
  gap: 8px;
}
.health-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-radius: 14px;
  padding: 10px 0 8px;
  flex: 1;
}
.health-stat-chip-icon { font-size: 18px; line-height: 1; }
.health-stat-chip-val  { font-size: 20px; font-weight: 900; color: #F0E6DB; line-height: 1.1; }
.health-stat-chip-lbl  { font-size: 10px; font-weight: 700; color: rgba(240, 230, 219, 0.5); letter-spacing: 0.4px; text-transform: uppercase; }

/* ── Section headers ── */
.health-sect-hdr {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brown2);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 22px 0 8px;
  opacity: 0.75;
}
.health-sect-hdr span:first-child { font-size: 14px; opacity: 1; }

/* ── Mini empty states ── */
.health-empty-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 14px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown3);
  border: 1px solid var(--border-color);
}
.health-empty-mini span:first-child { font-size: 18px; }

/* ── AI triage card — dark mode ── */
[data-theme="dark"] .ai-triage {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.09) 0%, rgba(212, 165, 116, 0.04) 100%);
  border-color: rgba(212, 165, 116, 0.22);
}
.ai-triage {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
/* Shine sweep animation */
.ai-triage::after {
  content: '';
  position: absolute;
  top: -30%;
  left: -80%;
  width: 45%;
  height: 160%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0)    0%,
    rgba(255,255,255,0.38) 50%,
    rgba(255,255,255,0)    100%
  );
  transform: skewX(-20deg);
  animation: ai-triage-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ai-triage-shine {
  0%   { left: -80%; opacity: 1; }
  40%  { left: 130%; opacity: 1; }
  100% { left: 130%; opacity: 0; }
}
.ai-triage-ico    { font-size: 28px; flex-shrink: 0; }
.ai-triage-ttl    { font-size: 15px; font-weight: 900; color: var(--brown); }
.ai-triage-sub    { font-size: 12px; font-weight: 600; color: var(--brown2); margin-top: 3px; }
.ai-triage-chevron {
  font-size: 24px;
  font-weight: 700;
  color: var(--brown3);
  padding-left: 8px;
  flex-shrink: 0;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════
   VET FINDER — Trova vicino a te (health page)
   ═══════════════════════════════════════════════════ */
.vf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vf-card {
  background: var(--card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 13px 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vf-card:active {
  transform: scale(0.96);
  box-shadow: none;
}

/* Wide card (5th — full width) */
.vf-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
}
.vf-wide-body { flex: 1; }

/* Card head row (icon + external link) */
.vf-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* Icon circle */
.vf-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.vf-ico--green  { background: rgba(76,175,80,0.12);   color: #2E7D32; }
.vf-ico--red    { background: rgba(244,67,54,0.12);   color: #C62828; }
.vf-ico--purple { background: rgba(156,39,176,0.12);  color: #7B1FA2; }
.vf-ico--blue   { background: rgba(33,150,243,0.12);  color: #1565C0; }
.vf-ico--orange { background: rgba(255,152,0,0.12);   color: #E65100; }

/* Text */
.vf-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1.2;
}
.vf-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--brown3);
  margin-top: 3px;
  line-height: 1.3;
}

/* External link icon */
.vf-ext-ico {
  color: var(--brown3);
  opacity: 0.45;
  flex-shrink: 0;
}

/* Loading state */
.vf-card.vf-loading {
  pointer-events: none;
  animation: vf-pulse 0.65s ease-in-out infinite;
}
@keyframes vf-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* Dark mode */
[data-theme="dark"] .vf-ico--green  { background: rgba(76,175,80,0.15);   color: #66BB6A; }
[data-theme="dark"] .vf-ico--red    { background: rgba(244,67,54,0.15);   color: #EF5350; }
[data-theme="dark"] .vf-ico--purple { background: rgba(156,39,176,0.15);  color: #CE93D8; }
[data-theme="dark"] .vf-ico--blue   { background: rgba(33,150,243,0.15);  color: #64B5F6; }
[data-theme="dark"] .vf-ico--orange { background: rgba(255,152,0,0.15);   color: #FFA726; }

/* ═══════════════════════════════════════════════════
   APPUNTAMENTI — Appointment cards
   ═══════════════════════════════════════════════════ */
.appt-card {
  background: var(--card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.appt-card:active { transform: scale(0.985); }

/* Today highlight */
.appt-card.appt-today {
  border-color: rgba(255,107,107,0.35);
  background: linear-gradient(135deg, rgba(255,107,107,0.04) 0%, rgba(255,179,71,0.04) 100%);
}

/* Past / done — muted */
.appt-card.appt-past {
  opacity: 0.55;
}

/* Date column */
.appt-date-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 34px;
}
.appt-dd {
  font-size: 22px;
  font-weight: 900;
  color: var(--brown);
  line-height: 1;
}
.appt-mon {
  font-size: 9px;
  font-weight: 800;
  color: var(--brown3);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Thin vertical divider */
.appt-divider-v {
  width: 1px;
  height: 38px;
  background: var(--border-color);
  flex-shrink: 0;
  border-radius: 1px;
}

/* Icon circle */
.appt-ico {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.appt-ico--vet   { background: rgba(76,175,80,0.12);   color: #2E7D32; }
.appt-ico--grm   { background: rgba(156,39,176,0.12);  color: #7B1FA2; }
.appt-ico--phar  { background: rgba(33,150,243,0.12);  color: #1565C0; }
.appt-ico--other { background: rgba(255,152,0,0.12);   color: #E65100; }

/* Body */
.appt-body { flex: 1; min-width: 0; }
.appt-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.appt-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time chip */
.appt-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,107,107,0.08);
  color: var(--primary);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
}
[data-theme="dark"] .appt-time-chip {
  background: rgba(255,133,133,0.12);
  color: var(--primary);
}

/* Today badge */
.appt-today-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Done badge */
.appt-done-badge {
  display: inline-block;
  background: rgba(76,175,80,0.10);
  color: #2E7D32;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 5px;
  margin-left: 4px;
  vertical-align: middle;
}
[data-theme="dark"] .appt-done-badge { background: rgba(76,175,80,0.15); color: #66BB6A; }

/* Actions */
.appt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.appt-check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(76,175,80,0.4);
  background: rgba(76,175,80,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--green);
  flex-shrink: 0;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.appt-check-btn:active { transform: scale(0.88); background: rgba(76,175,80,0.18); }

/* Dark mode icon circles */
[data-theme="dark"] .appt-ico--vet   { background: rgba(76,175,80,0.15);   color: #66BB6A; }
[data-theme="dark"] .appt-ico--grm   { background: rgba(156,39,176,0.15);  color: #CE93D8; }
[data-theme="dark"] .appt-ico--phar  { background: rgba(33,150,243,0.15);  color: #64B5F6; }
[data-theme="dark"] .appt-ico--other { background: rgba(255,152,0,0.15);   color: #FFA726; }

/* ── Shine button effect ─────────────────────────────────── */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.45) 50%,
    transparent 100%
  );
  animation: btn-shine-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-shine-sweep {
  0%   { left: -75%; opacity: 0; }
  10%  { opacity: 1; }
  50%  { left: 130%; opacity: 1; }
  51%  { opacity: 0; }
  100% { left: 130%; opacity: 0; }
}

/* ── PROFILO PET v2 — WOW UI Redesign (Phase 1) ────────────────────── */

.profile-hero-v2 {
  position: relative;
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  background: var(--card);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}

/* Sfondo gradiente sottile nella hero */
.phv2-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,107,107,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Avatar ring gradiente */
.phv2-avatar-wrap {
  position: relative;
  cursor: pointer;
  margin-bottom: 14px;
  z-index: 1;
}
.phv2-avatar-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #FF6B6B, #FFB347, #FF8E53);
  box-shadow: 0 8px 28px rgba(255,107,107,0.35);
}
.phv2-avatar-ring .ph-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--card);
}
.phv2-camera-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary, #FF6B6B);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Nome e razza */
.phv2-name {
  font-size: 26px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.5px;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 4px;
}
.phv2-breed {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 18px;
}

/* Stats row glassmorphic */
.phv2-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255,107,107,0.06);
  border: 1.5px solid rgba(255,107,107,0.14);
  border-radius: 18px;
  padding: 12px 20px;
  width: 100%;
  max-width: 320px;
  position: relative;
  z-index: 1;
}
.phv2-stat-card {
  flex: 1;
  text-align: center;
}
.phv2-stat-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.3px;
  line-height: 1.15;
}
.phv2-stat-key {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown2);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.phv2-stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(0,0,0,0.09);
  flex-shrink: 0;
}

/* Dark mode */
[data-theme="dark"] .profile-hero-v2 {
  background: var(--card);
  border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .phv2-bg {
  background: linear-gradient(180deg, rgba(255,107,107,0.12) 0%, transparent 60%);
}
[data-theme="dark"] .phv2-stats {
  background: rgba(255,107,107,0.08);
  border-color: rgba(255,107,107,0.18);
}
[data-theme="dark"] .phv2-stat-divider {
  background: rgba(255,255,255,0.1);
}
[data-theme="dark"] .phv2-avatar-ring {
  box-shadow: 0 8px 28px rgba(255,107,107,0.25);
}

/* Miglioramenti spaziatura sezioni profilo */
.profile-edit-card {
  border-radius: 18px !important;
}
.pe-save-btn {
  background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
  color: #fff !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 14px !important;
  width: 100% !important;
  margin-top: 16px !important;
  font-size: 15px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(255,107,107,0.3) !important;
  transition: transform 0.15s, box-shadow 0.15s !important;
}
.pe-save-btn:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 8px rgba(255,107,107,0.2) !important;
}

/* Trait bars — più premium */
.trait-bar {
  height: 6px !important;
  border-radius: 4px !important;
  background: rgba(0,0,0,0.07) !important;
}
[data-theme="dark"] .trait-bar {
  background: rgba(255,255,255,0.1) !important;
}
.trait-fill {
  background: linear-gradient(90deg, #FF6B6B, #FFB347) !important;
  border-radius: 4px !important;
  height: 100% !important;
  transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1) !important;
}

/* ── ALBUM v2 — WOW UI Redesign (Phase 1) ────────────────────────────── */

/* KPI glassmorphic row */
.alb-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 16px 8px;
}
.alb-kpi-card {
  background: var(--card);
  border: 1px solid rgba(255,107,107,0.14);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.alb-kpi-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,107,107,0.06);
  pointer-events: none;
}
.alb-kpi-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary, #FF6B6B);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.alb-kpi-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--brown2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 3px;
}

/* Empty state v2 */
.alb-empty-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 32px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
}
.alb-empty-orb {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,107,0.06) 0%, transparent 70%);
  top: -60px;
  pointer-events: none;
}
.alb-empty-icon {
  width: 100px;
  height: 100px;
  border-radius: 30px;
  background: rgba(255,107,107,0.08);
  border: 1.5px solid rgba(255,107,107,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.alb-empty-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--brown);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.alb-empty-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown2);
  line-height: 1.6;
  margin-bottom: 28px;
}
.alb-empty-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  border: none;
  border-radius: 16px;
  padding: 14px 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255,107,107,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.alb-empty-cta:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(255,107,107,0.25);
}

/* Month header v2 */
.alb-month-hdr-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}
.alb-month-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--brown);
  letter-spacing: -0.2px;
}
.alb-month-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--brown2);
  background: rgba(0,0,0,0.05);
  border-radius: 20px;
  padding: 3px 10px;
}

/* Photo grid v2 */
.alb-photo-v2 {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  background: rgba(0,0,0,0.05);
}
.alb-photo-v2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.alb-photo-v2:active {
  transform: scale(0.95);
  opacity: 0.85;
}

/* Override stili griglia esistente per usare border-radius premium */
.alb-photo {
  border-radius: 12px !important;
  overflow: hidden !important;
  transition: transform 0.15s !important;
}
.alb-photo:active { transform: scale(0.95) !important; }

/* Dark mode */
[data-theme="dark"] .alb-kpi-card {
  background: var(--card);
  border-color: rgba(255,107,107,0.18);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
[data-theme="dark"] .alb-month-count {
  background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .alb-empty-icon {
  background: rgba(255,107,107,0.12);
  border-color: rgba(255,107,107,0.2);
}

/* ── HOME HERO v2 — WOW UI Redesign (Phase 1) ──────────────────────── */

.home-hero-v2 {
  background: linear-gradient(155deg, #FF6B6B 0%, #FF8E53 55%, #FFB347 100%);
  padding: 20px 16px 22px;
  position: relative;
  overflow: hidden;
  /* Nessun body overflow — evita il bug scroll petmap */
}

/* Sfere decorative glassmorphic */
.home-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.home-hero-orb-1 {
  width: 220px; height: 220px;
  top: -90px; right: -70px;
  background: rgba(255,255,255,0.12);
}
.home-hero-orb-2 {
  width: 120px; height: 120px;
  bottom: -40px; left: -30px;
  background: rgba(255,255,255,0.07);
}

/* Greeting row */
.home-hero-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}
.home-hero-greeting-text {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.2px;
}
.home-hero-day-badge {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0.3px;
}

/* Nome pet — pezzo forte */
.home-hero-pet-name {
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.8px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* Card glassmorphic */
.home-hero-card {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform 0.18s cubic-bezier(0.32,0.72,0,1), box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.home-hero-card:active {
  transform: scale(0.975);
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.home-hero-card-info {
  flex: 1;
  min-width: 0;
}
.home-hero-card-breed {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-hero-card-chevron {
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Dark mode: mantengo il gradiente coral */
[data-theme="dark"] .home-hero-v2 {
  background: linear-gradient(155deg, #c0392b 0%, #d35400 55%, #e67e22 100%);
}
[data-theme="dark"] .home-hero-card {
  background: rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.18);
}

/* ── AUDIT SPAZIATURE GLOBALI (UI-01) ───────────────────────────────── */
/* Correzioni padding/gap inconsistenti nelle sezioni home esistenti */

.storia-card {
  margin-top: 16px !important;
}
.carousel-section {
  margin-top: 12px !important;
}
/* Fun fact card — piu aria interna */
.home-hero-v2 ~ .scroll .card[style*="FFF8E1"] {
  padding: 16px !important;
}

/* Stats chip nella hero card — testo bianco su glassmorphic */
.home-hero-card .hero-stats .stat-chip,
.home-hero-card .hero-stats > * {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

/* ── CIBO v2 — WOW UI Redesign (Phase 1) ─────────────────────────────── */

/* Hero food: padding aumentato, grafico più prominente */
.food-hero {
  padding-bottom: 20px !important;
}

/* Testo centrale nel grafico: kcal più grande */
.food-kcal-num {
  font-size: 36px !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
  line-height: 1 !important;
}
.food-kcal-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  opacity: 0.65 !important;
  margin-top: 2px !important;
}

/* Pill attività — più premium */
.food-activity-pill {
  border-radius: 24px !important;
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08) !important;
  margin-top: 8px !important;
}

/* Legend colori macro */
.food-macro-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 4px;
}
.food-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.food-legend-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--brown2);
  vertical-align: middle;
}

/* Macro grid v2 — glassmorphic */
.food-macros-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px;
  margin-bottom: 4px;
}
.food-macro-card-v2 {
  background: var(--card);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 18px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.fmv2-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.fmv2-icon--protein { background: rgba(255,107,107,0.1); color: #E53935; }
.fmv2-icon--fat     { background: rgba(255,179,71,0.12); color: #F57F17; }
.fmv2-icon--carbs   { background: rgba(76,175,80,0.1);  color: #2E7D32; }
.fmv2-val {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1.1;
}
.fmv2-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--brown2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

/* Barre macro — più sottili e arrotondate */
.food-macro-bar {
  height: 4px !important;
  border-radius: 4px !important;
  background: rgba(0,0,0,0.07) !important;
  width: 100% !important;
  overflow: hidden !important;
}
.food-macro-fill {
  height: 100% !important;
  border-radius: 4px !important;
  transition: width 0.7s cubic-bezier(0.34,1.56,0.64,1) !important;
}

/* Titolo sezione piano giornaliero */
.food-plan-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 0 8px;
}
.food-plan-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
}
.food-plan-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
}

/* Dark mode food */
[data-theme="dark"] .food-macro-card-v2 {
  background: var(--card);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .fmv2-icon--protein { background: rgba(255,107,107,0.15); }
[data-theme="dark"] .fmv2-icon--fat     { background: rgba(255,179,71,0.15); }
[data-theme="dark"] .fmv2-icon--carbs   { background: rgba(76,175,80,0.15); }
[data-theme="dark"] .food-macro-bar {
  background: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .food-legend-lbl { color: var(--brown2); }

/* ── SALUTE v2 — WOW UI Redesign (Phase 1) ──────────────────────────── */

/* Hero salute v2 */
.health-hero-v2 {
  background: linear-gradient(135deg, #43A047 0%, #2E7D32 100%);
  padding: 18px 16px 20px;
  position: relative;
  overflow: hidden;
}
.hhv2-orb {
  position: absolute;
  width: 180px; height: 180px;
  top: -70px; right: -50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.hhv2-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.hhv2-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}
.hhv2-add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s;
}
.hhv2-add-btn:active { background: rgba(255,255,255,0.3); }

/* Stats row nella hero salute */
.hhv2-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 12px 8px;
  position: relative;
  z-index: 1;
}
.hhv2-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hhv2-stat-ico {
  color: rgba(255,255,255,0.8);
  margin-bottom: 2px;
}
.hhv2-stat-val {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}
.hhv2-stat-lbl {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.hhv2-stat-sep {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* Card salute premium */
.hlth-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: var(--card);
  border: 1px solid var(--border, rgba(0,0,0,0.06));
  border-radius: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.hlth-card:active { transform: scale(0.98); box-shadow: 0 1px 4px rgba(0,0,0,0.04); }

.hlth-card-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hlth-ico--vacc { background: rgba(255,107,107,0.1); color: #E53935; }
.hlth-ico--med  { background: rgba(103,58,183,0.1);  color: #673AB7; }
.hlth-ico--appt { background: rgba(25,118,210,0.1);  color: #1976D2; }

.hlth-card-body { flex: 1; min-width: 0; }
.hlth-card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hlth-card-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown2);
  margin-top: 2px;
}

/* Status pills */
.hlth-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hlth-status--active   { background: rgba(67,160,71,0.12);  color: #2E7D32; }
.hlth-status--done     { background: rgba(0,0,0,0.06);       color: var(--brown2); }
.hlth-status--pending  { background: rgba(255,179,0,0.12);   color: #F57F17; }
.hlth-status--upcoming { background: rgba(25,118,210,0.12);  color: #1565C0; }

/* Dark mode card salute */
[data-theme="dark"] .hlth-card {
  background: var(--card);
  border-color: rgba(255,255,255,0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
[data-theme="dark"] .hlth-ico--vacc { background: rgba(255,107,107,0.15); }
[data-theme="dark"] .hlth-ico--med  { background: rgba(103,58,183,0.15); }
[data-theme="dark"] .hlth-ico--appt { background: rgba(25,118,210,0.15); }
[data-theme="dark"] .hlth-status--active   { background: rgba(67,160,71,0.18); }
[data-theme="dark"] .hlth-status--done     { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .hlth-status--pending  { background: rgba(255,179,0,0.15); }
[data-theme="dark"] .hlth-status--upcoming { background: rgba(25,118,210,0.18); }

/* ── HOTFIX: Home hero compatta ─────────────────────────── */
.home-hero-v2 {
  padding: 14px 16px 16px !important;
}
.home-hero-pet-name {
  font-size: 26px !important;
  margin-bottom: 8px !important;
}
.home-hero-card {
  margin-top: 8px !important;
}

/* ── HOTFIX: Health hero — rimuovi verde, usa coral ────── */
.health-hero-v2 {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
  padding: 14px 16px 16px !important;
}
[data-theme="dark"] .health-hero-v2 {
  background: linear-gradient(135deg, #FF8585 0%, #FFC170 100%) !important;
}

/* ── HOTFIX: Health cards più premium ───────────────────── */
.hlth-card {
  border-radius: 18px !important;
  padding: 12px 14px !important;
  border-left: 3px solid transparent !important;
}
.hlth-card--vacc { border-left-color: var(--primary) !important; }
.hlth-card--med  { border-left-color: #9C27B0 !important; }
.hlth-card--appt { border-left-color: var(--accent) !important; }

/* ── HOTFIX: Appointment card — icona calendario a blocco ── */
.appt-cal-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,179,0,0.12);
  border: 1.5px solid rgba(255,179,0,0.2);
  flex-shrink: 0;
  gap: 0;
}
.appt-cal-month {
  font-size: 8px;
  font-weight: 900;
  color: #E65100;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  padding-top: 3px;
}
.appt-cal-day {
  font-size: 18px;
  font-weight: 900;
  color: #E65100;
  line-height: 1;
}
[data-theme="dark"] .appt-cal-block {
  background: rgba(255,193,112,0.12) !important;
  border-color: rgba(255,193,112,0.2) !important;
}
[data-theme="dark"] .appt-cal-month,
[data-theme="dark"] .appt-cal-day {
  color: var(--accent) !important;
}

/* ── ACCOUNT PAGE PREMIUM ────────────────────────────────── */
.acct-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.acct-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.acct-user-info { flex: 1; min-width: 0; }
.acct-user-name {
  font-size: 15px; font-weight: 900; color: var(--brown);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-user-email {
  font-size: 11px; font-weight: 600; color: var(--brown2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-plan-badge {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
  background: rgba(255,179,0,0.15); color: #E65100;
  letter-spacing: 0.5px;
}
.acct-plan-badge.premium { background: rgba(255,107,107,0.15); color: var(--primary); }
.acct-plan-badge.expired { background: rgba(244,67,54,0.12); color: var(--red); }

/* Premium card */
.acct-premium-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 60%, #0F3460 100%);
  border-radius: 24px;
  padding: 22px 20px 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.acct-premium-orb {
  position: absolute; width: 200px; height: 200px;
  top: -80px; right: -60px; border-radius: 50%;
  background: rgba(255,107,107,0.15); pointer-events: none;
}
.acct-premium-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.acct-premium-icon { font-size: 20px; }
.acct-premium-label {
  font-size: 16px; font-weight: 900; color: #fff; letter-spacing: -0.3px;
}
.acct-premium-perks { margin-bottom: 16px; }
.acct-perk {
  font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.85);
  margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.acct-premium-price {
  display: flex; align-items: baseline; gap: 4px; margin-bottom: 14px;
}
.acct-price-num {
  font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.5px;
}
.acct-price-period { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.6); }

.acct-buy-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: #fff; font-size: 15px; font-weight: 900;
  border: none; border-radius: 16px; padding: 14px;
  cursor: pointer; letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(255,107,107,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.acct-buy-btn:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(255,107,107,0.3); }

.acct-trial-note {
  text-align: center; font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.5); margin-top: 10px; letter-spacing: 0.2px;
}
.acct-status-val { font-weight: 800; color: var(--primary) !important; }

/* Pagine legali */
.legal-section { margin-bottom: 20px; }
.legal-title {
  font-size: 14px; font-weight: 900; color: var(--brown);
  margin-bottom: 6px;
}
.legal-body {
  font-size: 13px; font-weight: 600; color: var(--brown2);
  line-height: 1.6;
}
[data-theme="dark"] .acct-premium-card {
  background: linear-gradient(135deg, #0D0D1A 0%, #111827 60%, #0A2040 100%) !important;
}
[data-theme="dark"] .acct-user-card { background: var(--card); }

/* ═══════════════════════════════════════════════════════════════
   HEALTH PREMIUM REDESIGN v107
   ─────────────────────────────────────────────────────────────── */

/* ── 1. HEALTH HERO — Teal/Emerald medicale (no piu' coral) ──── */
.health-hero-v2 {
  background: linear-gradient(145deg, #003D33 0%, #00574B 40%, #006B5C 75%, #00796B 100%) !important;
  padding: 20px 16px 22px !important;
  position: relative;
  overflow: hidden;
}
.health-hero-v2::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  top: -80px; right: -60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
  z-index: 0;
}
.health-hero-v2::after {
  content: '';
  position: absolute;
  width: 130px; height: 130px;
  bottom: -55px; left: -25px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .health-hero-v2 {
  background: linear-gradient(145deg, #001A16 0%, #002921 40%, #003D33 80%, #004D40 100%) !important;
}
/* Assicura che il contenuto stia sopra gli pseudo-elementi */
.health-hero-v2 .hhv2-orb,
.health-hero-v2 .hhv2-top,
.health-hero-v2 .hhv2-stats {
  position: relative;
  z-index: 1;
}
.health-hero-v2 .hhv2-stats {
  background: rgba(255,255,255,0.11) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
[data-theme="dark"] .health-hero-v2 .hhv2-stats {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
}

/* ── 2. FORM TYPE — blocchi 2x2 premium ─────────────────────── */
.hr-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.hr-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 16px 10px 14px;
  background: var(--card);
  border: 2px solid var(--border-color, rgba(0,0,0,0.08));
  border-radius: 18px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--brown2);
  letter-spacing: 0.1px;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hr-type-btn:active { transform: scale(0.95); }
.hr-type-btn.on.htb-vacc  { border-color: #E53935; background: rgba(229,57,53,0.06);   color: #C62828; }
.hr-type-btn.on.htb-med   { border-color: #7B1FA2; background: rgba(123,31,162,0.06);  color: #6A1B9A; }
.hr-type-btn.on.htb-visit { border-color: #00796B; background: rgba(0,121,107,0.07);   color: #004D40; }
.hr-type-btn.on.htb-appt  { border-color: #E65100; background: rgba(230,81,0,0.06);    color: #BF360C; }
[data-theme="dark"] .hr-type-btn { border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .hr-type-btn.on.htb-vacc  { border-color: #EF5350; background: rgba(239,83,80,0.10);   color: #EF9A9A; }
[data-theme="dark"] .hr-type-btn.on.htb-med   { border-color: #AB47BC; background: rgba(171,71,188,0.10);  color: #CE93D8; }
[data-theme="dark"] .hr-type-btn.on.htb-visit { border-color: #26A69A; background: rgba(38,166,154,0.10);  color: #80CBC4; }
[data-theme="dark"] .hr-type-btn.on.htb-appt  { border-color: #FFA726; background: rgba(255,167,38,0.10);  color: #FFCC80; }
.hr-type-ico {
  width: 46px; height: 46px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.hr-type-btn.on .hr-type-ico { transform: scale(1.1); }
.htb-vacc  .hr-type-ico { background: rgba(229,57,53,0.10);  color: #E53935; }
.htb-med   .hr-type-ico { background: rgba(123,31,162,0.10); color: #7B1FA2; }
.htb-visit .hr-type-ico { background: rgba(0,121,107,0.12);  color: #00796B; }
.htb-appt  .hr-type-ico { background: rgba(230,81,0,0.10);   color: #E65100; }
[data-theme="dark"] .htb-vacc  .hr-type-ico { background: rgba(239,83,80,0.14);   color: #EF5350; }
[data-theme="dark"] .htb-med   .hr-type-ico { background: rgba(171,71,188,0.14);  color: #AB47BC; }
[data-theme="dark"] .htb-visit .hr-type-ico { background: rgba(38,166,154,0.14);  color: #26A69A; }
[data-theme="dark"] .htb-appt  .hr-type-ico { background: rgba(255,167,38,0.14);  color: #FFA726; }

/* ── 3. SECTION HEADER nel form ─────────────────────────────── */
.hr-sect-hdr {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 800;
  color: var(--brown);
  letter-spacing: 0.1px;
  margin-bottom: 14px;
  margin-top: 4px;
  padding-bottom: 11px;
  border-bottom: 1.5px solid var(--border-color, rgba(0,0,0,0.07));
}
.hr-sect-ico {
  width: 30px; height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hrsi-vacc  { background: rgba(229,57,53,0.10);  color: #E53935; }
.hrsi-med   { background: rgba(123,31,162,0.10); color: #7B1FA2; }
.hrsi-visit { background: rgba(0,121,107,0.12);  color: #00796B; }
.hrsi-appt  { background: rgba(230,81,0,0.10);   color: #E65100; }
[data-theme="dark"] .hrsi-vacc  { background: rgba(239,83,80,0.14);  color: #EF5350; }
[data-theme="dark"] .hrsi-med   { background: rgba(171,71,188,0.14); color: #AB47BC; }
[data-theme="dark"] .hrsi-visit { background: rgba(38,166,154,0.14); color: #26A69A; }
[data-theme="dark"] .hrsi-appt  { background: rgba(255,167,38,0.14); color: #FFA726; }

/* ── 4. APPOINTMENT TYPE — griglia 2x2 ──────────────────────── */
.hr-appt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.hr-appt-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 13px;
  background: var(--card);
  border: 1.5px solid var(--border-color, rgba(0,0,0,0.08));
  border-radius: 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--brown2);
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.hr-appt-btn:active { transform: scale(0.95); }
.hr-appt-btn.on {
  border-color: var(--primary);
  background: rgba(255,107,107,0.06);
  color: var(--primary);
  font-weight: 800;
}
[data-theme="dark"] .hr-appt-btn { border-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .hr-appt-btn.on { border-color: #FF8585; background: rgba(255,133,133,0.08); color: #FF8585; }
.hr-appt-ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.hr-appt-btn.on .hr-appt-ico { transform: scale(1.08); }
.hrai-vet  { background: rgba(76,175,80,0.12);  color: #2E7D32; }
.hrai-grm  { background: rgba(123,31,162,0.10); color: #7B1FA2; }
.hrai-phar { background: rgba(33,150,243,0.10); color: #1565C0; }
.hrai-oth  { background: rgba(255,152,0,0.10);  color: #E65100; }
[data-theme="dark"] .hrai-vet  { background: rgba(76,175,80,0.15);   color: #66BB6A; }
[data-theme="dark"] .hrai-grm  { background: rgba(171,71,188,0.14);  color: #CE93D8; }
[data-theme="dark"] .hrai-phar { background: rgba(33,150,243,0.14);  color: #64B5F6; }
[data-theme="dark"] .hrai-oth  { background: rgba(255,167,38,0.14);  color: #FFA726; }

/* ── 5. FORM INPUTS premium ─────────────────────────────────── */
#v-add-vacc .form-input {
  border-radius: 14px !important;
  border: 1.5px solid var(--border-color, rgba(0,0,0,0.09)) !important;
  background: var(--card) !important;
  padding: 13px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: border-color 0.18s, box-shadow 0.18s !important;
}
#v-add-vacc .form-input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(255,107,107,0.10) !important;
  outline: none !important;
}
#v-add-vacc .form-label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--brown2) !important;
  letter-spacing: 0.4px !important;
  margin-bottom: 6px !important;
  text-transform: uppercase !important;
}

/* ── 6. SAVE BUTTON con shine animation ──────────────────────── */
.hr-save-btn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 6px 24px rgba(255,107,107,0.38);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 10px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.hr-save-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  animation: hr-btn-shine 3.5s infinite 2s;
}
@keyframes hr-btn-shine {
  0%   { left: -75%; }
  30%  { left: 125%; }
  100% { left: 125%; }
}
.hr-save-btn:active {
  transform: scale(0.97);
  box-shadow: 0 3px 12px rgba(255,107,107,0.22);
}

/* ── HEALTH HERO — MINIMAL: solo titolo+bottone, niente orb ─ */
.health-hero-v2 {
  padding: 14px 16px 14px !important;
  min-height: 0 !important;
}
.health-hero-v2 .hhv2-orb { display: none !important; }
.health-hero-v2::before   { content: none !important; }
.health-hero-v2::after    { content: none !important; }
/* Nascondi stats panel — troppo spazio, resta solo titolo */
.health-hero-v2 .hhv2-stats { display: none !important; }
.hhv2-top   { margin-bottom: 0 !important; }
.hhv2-title { font-size: 18px !important; }
