/* ==========================================================================
   CAT ID — MY LITTLE FAMILY (Mobile Web Stylesheet)
   Matches Mockup-KAIROS, Mockup-SHUVA, Mockup-HARVI
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Oooh Baby', 'Caveat', cursive;

  /* Default (Kairos Warm Mocha) */
  --outer-bg: radial-gradient(circle at 20% 15%, #faf5ef 0%, #efe6dc 55%, #e6dcd0 100%);
  --page-bg: #f9f5f0;
  --sheet-bg: #fcfaf7;
  --tile-bg: #f3eee8;
  --tile-border: rgba(142, 109, 93, 0.08);
  --tile-icon: #7e5e4f;
  --bento-bg: linear-gradient(165deg, #f9f5f0 0%, #f1eae2 100%);
  --bento-border: rgba(142, 109, 93, 0.14);
  --bento-icon-bg: linear-gradient(145deg, #ffffff 0%, #efe6dc 100%);
  --bento-chip-bg: rgba(255, 255, 255, 0.84);
  --bento-chip-border: rgba(142, 109, 93, 0.16);
  --bento-age-bg: rgba(142, 109, 93, 0.13);
  --bento-age-text: #6e4f40;
  --accent: #8e6d5d;
  --accent-2: #7b5b4c;
  --accent-soft: #ede3da;
  --accent-ring: rgba(142, 109, 93, 0.18);
  --accent-glow: rgba(142, 109, 93, 0.34);
  --heart-color: #dc6058;
  --brand-paw: #ffffff;
  --brand-text: #ffffff;
  --brand-sub: rgba(255, 255, 255, 0.86);
  --brand-shadow: 0 1px 8px rgba(0, 0, 0, 0.32);
  --text-main: #1d1a18;
  --text-secondary: #5e6368;
  --text-muted: #787d82;
  --paw-watermark: rgba(142, 109, 93, 0.14);

  /* Chat Tab */
  --avatar-ring-bg: #ece1d6;
  --avatar-ring-2: rgba(142, 109, 93, 0.11);
  --notice-bg: #f5efe9;
  --notice-border: #ebe1d7;
  --notice-icon: #7e5e4f;
  --fast-bg: #eff9f4;
  --fast-border: #dcf1e6;
  --shield-bg: #dbf4e7;
  --shield-icon: #0fa960;
  --shield-title: #116c40;

  /* Lokasi Tab */
  --loc-card-bg: #f5f1ec;
  --loc-card-border: #ece5dd;
  --loc-icon-bg: #ebe0d6;
  --loc-icon-color: #7d5d4e;
  --warn-bg: #fbf1e1;
  --warn-border: #f3e0c0;
  --warn-icon: #e59413;

  /* Bottom Nav (Liquid Frosted Glass) */
  --nav-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.54) 0%,
    rgba(255, 255, 255, 0.32) 50%,
    rgba(255, 255, 255, 0.46) 100%
  );
  --nav-active-text: #2a211d;
  --nav-indicator: #8e6d5d;
  --nav-inactive: #5e5048;
  --nav-inactive-hover: #3c3029;
  --nav-slot-hover: rgba(142, 109, 93, 0.12);
}

/* SHUVA THEME — Soft Lavender & Violet */
[data-theme="shuva"] {
  --outer-bg: radial-gradient(circle at 20% 15%, #f7f4ff 0%, #ebe4fc 55%, #dfd6fa 100%);
  --page-bg: #f7f5ff;
  --sheet-bg: #fcfbff;
  --tile-bg: #f2eefc;
  --tile-border: rgba(127, 82, 255, 0.08);
  --tile-icon: #7142f0;
  --bento-bg: linear-gradient(165deg, #f8f6ff 0%, #eee8fc 100%);
  --bento-border: rgba(127, 82, 255, 0.14);
  --bento-icon-bg: linear-gradient(145deg, #ffffff 0%, #eae2ff 100%);
  --bento-chip-bg: rgba(255, 255, 255, 0.86);
  --bento-chip-border: rgba(127, 82, 255, 0.16);
  --bento-age-bg: rgba(127, 82, 255, 0.12);
  --bento-age-text: #6236df;
  --accent: #7f52ff;
  --accent-2: #683be4;
  --accent-soft: #eae3ff;
  --accent-ring: rgba(127, 82, 255, 0.20);
  --accent-glow: rgba(127, 82, 255, 0.36);
  --heart-color: #7b4dff;
  --brand-paw: #ffffff;
  --brand-text: #ffffff;
  --brand-sub: rgba(255, 255, 255, 0.88);
  --brand-shadow: 0 1px 8px rgba(0, 0, 0, 0.36);
  --text-main: #181721;
  --text-secondary: #585b6e;
  --text-muted: #74778a;
  --paw-watermark: rgba(139, 104, 246, 0.24);

  --avatar-ring-bg: #cfc2fb;
  --avatar-ring-2: rgba(127, 82, 255, 0.12);
  --notice-bg: #f1ecfe;
  --notice-border: #e4dcFC;
  --notice-icon: #7546f2;
  --fast-bg: #eff9f4;
  --fast-border: #dcf1e6;
  --shield-bg: #dbf4e7;
  --shield-icon: #0fa960;
  --shield-title: #116c40;

  --loc-card-bg: #f3f0fc;
  --loc-card-border: #e6e0fa;
  --loc-icon-bg: #e7dfff;
  --loc-icon-color: #794bf7;
  --warn-bg: #fbf2e4;
  --warn-border: #f3e2c6;
  --warn-icon: #ea910c;

  --nav-active-text: #693ce3;
  --nav-indicator: #7f52ff;
  --nav-inactive: #595372;
  --nav-inactive-hover: #3b3358;
  --nav-slot-hover: rgba(127, 82, 255, 0.12);
}

/* HARVI THEME — Warm Cream & Amber Orange */
[data-theme="harvi"] {
  --outer-bg: radial-gradient(circle at 20% 15%, #fcf8f2 0%, #f5ecde 55%, #eee1cd 100%);
  --page-bg: #faf7f2;
  --sheet-bg: #fdfbf8;
  --tile-bg: #f4efe7;
  --tile-border: rgba(217, 119, 36, 0.08);
  --tile-icon: #b96b27;
  --bento-bg: linear-gradient(165deg, #fbf7f0 0%, #f3eadc 100%);
  --bento-border: rgba(230, 126, 34, 0.15);
  --bento-icon-bg: linear-gradient(145deg, #ffffff 0%, #fdebd6 100%);
  --bento-chip-bg: rgba(255, 255, 255, 0.86);
  --bento-chip-border: rgba(230, 126, 34, 0.17);
  --bento-age-bg: rgba(246, 121, 22, 0.13);
  --bento-age-text: #c75a06;
  --accent: #f67916;
  --accent-2: #e06106;
  --accent-soft: #fdebd8;
  --accent-ring: rgba(246, 121, 22, 0.20);
  --accent-glow: rgba(246, 121, 22, 0.36);
  --heart-color: #f56707;
  --brand-paw: #ff8c1a;
  --brand-text: #ffffff;
  --brand-sub: rgba(255, 255, 255, 0.88);
  --brand-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
  --text-main: #1d1a17;
  --text-secondary: #5d6065;
  --text-muted: #777b80;
  --paw-watermark: rgba(185, 145, 110, 0.18);

  --avatar-ring-bg: #fbe0b7;
  --avatar-ring-2: rgba(246, 152, 55, 0.16);
  --notice-bg: #f8f0e4;
  --notice-border: #efe2ce;
  --notice-icon: #f08c1d;
  --fast-bg: #eff9f4;
  --fast-border: #dcf1e6;
  --shield-bg: #dbf4e7;
  --shield-icon: #0fa960;
  --shield-title: #116c40;

  --loc-card-bg: #f6f3ee;
  --loc-card-border: #ece6dd;
  --loc-icon-bg: #fde7d2;
  --loc-icon-color: #f46810;
  --warn-bg: #fcf1de;
  --warn-border: #f4dfb9;
  --warn-icon: #ee9209;

  --nav-active-text: #ea6908;
  --nav-indicator: #f67916;
  --nav-inactive: #5f554b;
  --nav-inactive-hover: #3d342b;
  --nav-slot-hover: rgba(246, 121, 22, 0.12);
}

/* ==========================================================================
   BASE RESET & SHELL
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background: var(--outer-bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  font-family: var(--font-sans);
  background: var(--sheet-bg);
  color: var(--text-main);
  overflow-x: clip;
  overscroll-behavior-y: none;
}

@media (min-width: 481px) {
  body {
    background: var(--outer-bg);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

/* Desktop Wrapper centers the mobile app cleanly */
.app-stage {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  position: relative;
}

.mobile-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100svh;
  background: var(--sheet-bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Fixed Zero-Scroll Lock when Home Tab is Active
   (Mobile keeps .mobile-shell overflow:visible so fixed .bottom-nav glass blur works) */
@media (max-width: 480px) {
  html[data-active-tab="home"],
  html[data-active-tab="home"] body {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  html[data-active-tab="home"] .app-stage,
  html[data-active-tab="home"] .mobile-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }

  html[data-active-tab="home"] .tabs-viewport {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #view-home {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

@media (min-width: 481px) {
  html[data-active-tab="home"],
  html[data-active-tab="home"] body {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .app-stage {
    min-height: 100dvh;
    padding: 20px 16px;
    align-items: center;
  }

  html[data-active-tab="home"] .app-stage {
    height: 100vh;
    height: 100dvh;
  }

  .mobile-shell {
    min-height: min(852px, calc(100dvh - 40px));
    max-height: 900px;
    height: calc(100dvh - 40px);
    border-radius: 44px;
    box-shadow:
      0 26px 70px rgba(28, 22, 18, 0.16),
      0 0 0 8px rgba(255, 255, 255, 0.65);
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-shell::-webkit-scrollbar {
    display: none;
  }

  html[data-active-tab="home"] .mobile-shell {
    overflow-y: hidden;
  }

  html[data-active-tab="home"] .tabs-viewport {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #view-home {
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }
}

/* ==========================================================================
   TAB VIEWS & DIRECTIONAL SMOOTH PAGE TRANSITIONS
   ========================================================================== */
.tabs-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

.tab-view {
  display: none;
  flex: 1;
  flex-direction: column;
}

#view-home {
  background: var(--sheet-bg);
}

#view-chat,
#view-lokasi {
  background: var(--page-bg);
}

.tab-view.is-entering-right,
.tab-view.is-entering-left,
.tab-view.is-leaving-left,
.tab-view.is-leaving-right {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tab-view.is-active {
  display: flex;
  position: relative;
  z-index: 2;
}

.tab-view.is-entering-right {
  animation: pageEnterFromRight 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-view.is-entering-left {
  animation: pageEnterFromLeft 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-view.is-leaving-left {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  animation: pageLeaveToLeft 0.26s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.tab-view.is-leaving-right {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1;
  pointer-events: none;
  animation: pageLeaveToRight 0.26s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

@keyframes pageEnterFromRight {
  from {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes pageEnterFromLeft {
  from {
    opacity: 0;
    transform: translate3d(-20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes pageLeaveToLeft {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(-18px, 0, 0);
  }
}

@keyframes pageLeaveToRight {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
  }
}

/* ==========================================================================
   COMMON TOP ICON BUTTONS (Petite & Elegant)
   ========================================================================== */
.circle-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(255, 255, 255, 0.38) 100%
  );
  backdrop-filter: blur(8px) saturate(175%);
  -webkit-backdrop-filter: blur(8px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #242424;
  box-shadow:
    0 4px 12px rgba(20, 16, 28, 0.07),
    0 0 0 0.5px rgba(24, 20, 32, 0.05),
    inset 0 1px 0.8px rgba(255, 255, 255, 0.90);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, background 0.18s ease;
  flex-shrink: 0;
}

.home-topbar .circle-icon-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.18) 100%
  );
  border-color: rgba(255, 255, 255, 0.46);
  color: #ffffff;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.15),
    inset 0 1px 0.8px rgba(255, 255, 255, 0.52);
}

.circle-icon-btn svg {
  width: 16px;
  height: 16px;
}

.circle-icon-btn:active {
  transform: scale(0.91);
}

/* ==========================================================================
   TAB 1: HOME (FIXED ZERO-SCROLL VIEWPORT & NATURAL 3:4 PORTRAIT HERO)
   ========================================================================== */
.hero-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 0%;
  min-height: 180px;
  max-height: calc(100vw * 1.32);
  overflow: hidden;
  background: #d9d2ca;
}

@media (min-width: 481px) {
  .hero-wrap {
    max-height: 555px;
  }
}

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

.hero-top-scrim {
  position: absolute;
  inset: 0 0 auto 0;
  height: 108px;
  background: linear-gradient(
    180deg,
    rgba(16, 14, 12, 0.44) 0%,
    rgba(16, 14, 12, 0.16) 58%,
    rgba(16, 14, 12, 0) 100%
  );
  pointer-events: none;
}

.hero-bottom-scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 68px;
  background: linear-gradient(
    0deg,
    rgba(16, 14, 12, 0.08) 0%,
    rgba(16, 14, 12, 0) 100%
  );
  pointer-events: none;
}

.home-topbar {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 12px));
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-paw-icon {
  width: 28px;
  height: 28px;
  color: var(--brand-paw);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.16;
  text-shadow: var(--brand-shadow);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-text);
}

.brand-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-sub);
}

/* Illustrated Cute Doodles on Hero Portrait */
.hero-doodles {
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.hero-doodles svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-doodles--kairos {
  left: 3.5%;
  bottom: 62px;
  width: clamp(114px, 34%, 150px);
  transform-origin: left bottom;
}

.hero-doodles--shuva {
  left: 4%;
  bottom: 62px;
  width: clamp(114px, 34%, 148px);
  transform-origin: left bottom;
}

.hero-doodles--harvi {
  inset: 0;
}

.harvi-doodle-crown {
  position: absolute;
  top: 8.5%;
  left: 35%;
  width: clamp(64px, 19%, 82px) !important;
}

.harvi-doodle-ticks {
  position: absolute;
  top: 29%;
  left: 3.5%;
  width: clamp(26px, 8.5%, 36px) !important;
}

.harvi-doodle-puff {
  position: absolute;
  bottom: 62px;
  left: 3.5%;
  width: clamp(76px, 23%, 100px) !important;
  transform-origin: left bottom;
}

.harvi-doodle-right {
  position: absolute;
  bottom: 78px;
  right: 23%;
  width: clamp(50px, 15.5%, 68px) !important;
  transform-origin: right bottom;
}

/* Organic Curved Sheet overlapping Hero */
.home-sheet {
  position: relative;
  background: var(--sheet-bg);
  margin-top: -22px;
  padding: 5px 18px calc(76px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.sheet-wave {
  position: absolute;
  top: -36px;
  left: 0;
  width: 100%;
  height: 37px;
  display: block;
  color: var(--sheet-bg);
  pointer-events: none;
}

/* Floating Heart Button on the right dip of the wave (Frosted Glass) */
.fav-heart-btn {
  position: absolute;
  right: 18px;
  top: -17px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.68) 0%,
    rgba(255, 255, 255, 0.42) 100%
  );
  backdrop-filter: blur(8px) saturate(175%);
  -webkit-backdrop-filter: blur(8px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 6px 18px rgba(25, 20, 16, 0.11),
    0 0 0 0.5px rgba(24, 20, 32, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--heart-color);
  z-index: 6;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fav-heart-btn svg {
  width: 18px;
  height: 18px;
}

.fav-heart-btn:active {
  transform: scale(0.88);
}

.fav-heart-btn.is-popping {
  animation: heartPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.24); }
  100% { transform: scale(1); }
}

.cat-header-block {
  position: relative;
  margin-bottom: 10px;
}

.cat-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.cat-name {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-main);
  line-height: 1.1;
}

.cat-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(1px);
}

.cat-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.cat-bio-wrap {
  position: relative;
}

.cat-bio {
  font-size: 12.4px;
  line-height: 1.44;
  color: var(--text-secondary);
  font-weight: 500;
}

.bio-heart {
  display: inline-block;
  vertical-align: -1px;
  margin-left: 1px;
  color: var(--text-secondary);
}

.bio-paw-watermark {
  float: right;
  width: 28px;
  height: 28px;
  margin: -1px 0 2px 10px;
  color: var(--paw-watermark);
  transform: rotate(16deg);
  pointer-events: none;
  shape-outside: circle(50%);
}

/* ==========================================================================
   REDESIGNED PET BENTO CARDS (Ras, Warna, Lahir + Karakter Pills)
   ========================================================================== */
.pet-bento {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-top-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bento-card {
  position: relative;
  background: var(--bento-bg);
  border: 1px solid var(--bento-border);
  border-radius: 18px;
  padding: 10px 10px 11px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  box-shadow:
    0 4px 14px rgba(24, 20, 18, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

@media (hover: hover) {
  .bento-card:hover {
    border-color: var(--accent-ring);
    box-shadow:
      0 6px 18px rgba(24, 20, 18, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.94);
    transform: translateY(-1px);
  }
}

.bento-card:active {
  transform: scale(0.96);
  border-color: var(--accent-ring);
}

.bento-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 8px;
}

.bento-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--bento-icon-bg);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 2px 6px rgba(24, 20, 18, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--tile-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento-icon-box svg {
  width: 16px;
  height: 16px;
}

.bento-icon-box.is-sm {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.bento-icon-box.is-sm svg {
  width: 13.5px;
  height: 13.5px;
}

/* Realistic Fur Swatch Indicator inside Warna Card */
.coat-swatch {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow:
    0 2px 6px rgba(18, 15, 14, 0.16),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.42);
  flex-shrink: 0;
}

/* Dynamic Calculated Age Badge inside Lahir Card */
.age-pill {
  font-size: 9.8px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 4px 6.5px;
  border-radius: 99px;
  background: var(--bento-age-bg);
  color: var(--bento-age-text);
  white-space: nowrap;
}

.bento-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  margin-bottom: 2px;
  line-height: 1.2;
}

.bento-val {
  font-size: 11.8px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
  line-height: 1.22;
  overflow-wrap: break-word;
}

/* Full-width Interactive Karakter Bento Card */
.bento-trait-card {
  width: 100%;
  background: var(--bento-bg);
  border: 1px solid var(--bento-border);
  border-radius: 18px;
  padding: 9.5px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow:
    0 4px 14px rgba(24, 20, 18, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

@media (hover: hover) {
  .bento-trait-card:hover {
    border-color: var(--accent-ring);
    box-shadow:
      0 6px 18px rgba(24, 20, 18, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.94);
    transform: translateY(-1px);
  }
}

.bento-trait-card:active {
  transform: scale(0.98);
  border-color: var(--accent-ring);
}

.bento-trait-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.bento-trait-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5px;
}

.bento-trait-copy .bento-label {
  margin-bottom: 0;
}

.bento-trait-desc {
  font-size: 11.8px;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.32;
  color: var(--text-main);
}

/* Compact Height Adaptation (Medium-Short Mobile Browsers <= 760px tall) */
@media (max-height: 760px) {
  .hero-doodles--kairos,
  .hero-doodles--shuva {
    bottom: 56px;
    transform: scale(0.88);
  }
  .harvi-doodle-crown {
    top: 8%;
    width: clamp(56px, 16.5%, 70px) !important;
  }
  .harvi-doodle-puff {
    bottom: 56px;
    transform: scale(0.88);
  }
  .harvi-doodle-right {
    bottom: 68px;
    transform: scale(0.88);
  }
  .home-sheet {
    margin-top: -20px;
    padding: 3px 16px calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .cat-header-block {
    margin-bottom: 8px;
  }
  .cat-name {
    font-size: 24px;
  }
  .cat-meta {
    font-size: 12px;
    margin-bottom: 5px;
  }
  .cat-bio {
    font-size: 11.7px;
    line-height: 1.37;
  }
  .bio-paw-watermark {
    width: 24px;
    height: 24px;
    margin-left: 8px;
  }
  .pet-bento {
    gap: 6px;
  }
  .bento-top-row {
    gap: 6px;
  }
  .bento-card {
    padding: 8px 9px 8.5px;
    border-radius: 15px;
  }
  .bento-card-head {
    margin-bottom: 5px;
  }
  .bento-icon-box {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }
  .bento-icon-box svg {
    width: 14.5px;
    height: 14.5px;
  }
  .bento-val {
    font-size: 11.2px;
  }
  .bento-trait-card {
    padding: 8px 10px;
    gap: 9px;
    border-radius: 15px;
  }
  .bento-trait-icon {
    width: 27px;
    height: 27px;
  }
  .bento-trait-desc {
    font-size: 11.2px;
    line-height: 1.28;
  }
}

/* Ultra-Short Mobile Viewports (<= 660px tall, e.g. 360x640) */
@media (max-height: 660px) {
  .hero-doodles--kairos,
  .hero-doodles--shuva {
    bottom: 52px;
    transform: scale(0.8);
  }
  .harvi-doodle-crown {
    top: 7%;
    width: 52px !important;
  }
  .harvi-doodle-puff {
    bottom: 52px;
    transform: scale(0.8);
  }
  .harvi-doodle-right {
    bottom: 62px;
    transform: scale(0.78);
  }
  .home-sheet {
    margin-top: -19px;
    padding: 2px 15px calc(70px + env(safe-area-inset-bottom, 0px));
  }
  .cat-header-block {
    margin-bottom: 6px;
  }
  .cat-name {
    font-size: 22px;
  }
  .cat-meta {
    font-size: 11.4px;
    margin-bottom: 4px;
  }
  .cat-bio {
    font-size: 11.1px;
    line-height: 1.33;
  }
  .bento-card {
    padding: 7px 8px 7.5px;
    border-radius: 14px;
  }
  .bento-card-head {
    margin-bottom: 4px;
  }
  .bento-icon-box {
    width: 23px;
    height: 23px;
    border-radius: 7px;
  }
  .bento-label {
    font-size: 9.8px;
  }
  .bento-val {
    font-size: 10.7px;
  }
  .bento-trait-card {
    padding: 7px 9px;
    border-radius: 14px;
  }
  .bento-trait-desc {
    font-size: 10.7px;
    line-height: 1.25;
  }
}

/* ==========================================================================
   SUBPAGE HEADER (CHAT & LOKASI)
   ========================================================================== */
.subpage-topbar {
  padding: max(16px, env(safe-area-inset-top, 14px)) 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subpage-heading {
  text-align: center;
  flex: 1;
}

.subpage-title {
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-main);
  line-height: 1.25;
}

.subpage-subtitle {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   TAB 2: CHAT (HUBUNGI PEMILIK)
   ========================================================================== */
.chat-body {
  padding: 8px 22px calc(88px + env(safe-area-inset-bottom, 0px));
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-stage {
  position: relative;
  width: 236px;
  height: 214px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 10px;
}

.avatar-backdrop-blob {
  position: absolute;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: var(--avatar-ring-bg);
  box-shadow: 0 0 0 8px var(--avatar-ring-2);
}

[data-theme="harvi"] .avatar-backdrop-blob {
  width: 204px;
  height: 190px;
  border-radius: 48% 52% 47% 53% / 53% 47% 53% 47%;
  transform: rotate(-14deg);
}

.avatar-frame {
  position: relative;
  width: 182px;
  height: 182px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(24, 20, 18, 0.12);
  z-index: 2;
  background: #e8e2dc;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.22);
}

.avatar-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.chat-cat-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 3px;
}

.chat-cat-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.chat-cat-meta {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.notice-card {
  width: 100%;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 20px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 15px;
}

.notice-icon {
  width: 28px;
  height: 28px;
  color: var(--notice-icon);
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text {
  font-size: 13px;
  line-height: 1.54;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Primary WhatsApp CTA Button (Consistent Shuva Emerald Green across all cats) */
.wa-cta-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 17px;
  padding: 9px 16px 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #16be72 0%, #099f5b 100%);
  box-shadow:
    0 8px 20px rgba(12, 166, 96, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-bottom: 14px;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.wa-cta-btn.style-green,
.wa-cta-btn.style-mocha {
  background: linear-gradient(135deg, #16be72 0%, #099f5b 100%);
  box-shadow:
    0 8px 20px rgba(12, 166, 96, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.wa-cta-btn:active {
  transform: scale(0.98);
}

.wa-btn-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-btn-icon-wrap svg {
  width: 20px;
  height: 20px;
  display: block;
}

.wa-btn-label {
  flex: 1;
  text-align: center;
  padding-right: 8px;
}

.wa-btn-arrow {
  opacity: 0.92;
  display: flex;
  align-items: center;
}

/* Fast Response Card */
.fast-reply-card {
  width: 100%;
  background: var(--fast-bg);
  border: 1px solid var(--fast-border);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.shield-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--shield-bg);
  color: var(--shield-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fast-reply-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--shield-title);
  margin-bottom: 3px;
}

.fast-reply-desc {
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   TAB 3: LOKASI (LOKASI TEMPAT TINGGAL)
   ========================================================================== */
.lokasi-body {
  padding: 6px 18px calc(88px + env(safe-area-inset-bottom, 0px));
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-card-shell {
  position: relative;
  width: 100%;
  height: 312px;
  border-radius: 24px;
  overflow: hidden;
  background: #e9f0e6;
  box-shadow: 0 8px 24px rgba(24, 20, 18, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cat-leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Soft pastel street map tone matching mockup */
.cat-leaflet-map .leaflet-tile-pane {
  filter: saturate(0.78) brightness(1.04) contrast(0.95);
}

/* Hide default Leaflet attribution clutter cleanly while keeping minimal credit */
.cat-leaflet-map .leaflet-control-attribution {
  font-size: 8.5px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  padding: 1px 5px;
  margin: 0 70px 6px 0;
  color: #777;
}

/* Top Floating Area Card inside Map */
.map-top-banner {
  position: absolute;
  top: 11px;
  left: 11px;
  right: 11px;
  z-index: 400;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.07);
  transition: transform 0.16s ease;
}

.map-top-banner:active {
  transform: scale(0.985);
}

.map-banner-icon {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--loc-icon-bg);
  color: var(--loc-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-banner-icon svg {
  width: 16px;
  height: 16px;
}

.map-banner-copy {
  flex: 1;
  min-width: 0;
}

.map-banner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-banner-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 1px;
}

.map-banner-chevron {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* Bottom-left Radius Pill */
.map-radius-pill {
  position: absolute;
  left: 11px;
  bottom: 11px;
  z-index: 400;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 5.5px 11px 5.5px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.07);
}

.radius-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  flex-shrink: 0;
}

.radius-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.radius-label {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text-muted);
}

.radius-val {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
}

/* Bottom-right Recenter Button */
.map-recenter-btn {
  position: absolute;
  right: 11px;
  bottom: 11px;
  z-index: 400;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(20, 20, 20, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #202124;
  transition: transform 0.16s ease;
}

.map-recenter-btn svg {
  width: 15px;
  height: 15px;
}

.map-recenter-btn:active {
  transform: scale(0.92);
}

/* Custom Leaflet Markers */
.custom-home-pin {
  position: relative;
  width: 46px;
  height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

.custom-cat-bubble {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
  background: #fff;
}

.custom-cat-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.65);
}

/* Location Info Cards below Map */
.loc-info-card {
  background: var(--loc-card-bg);
  border: 1px solid var(--loc-card-border);
  border-radius: 20px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.loc-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--loc-icon-bg);
  color: var(--loc-icon-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.loc-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.loc-card-desc {
  font-size: 12.5px;
  line-height: 1.52;
  color: var(--text-secondary);
  font-weight: 500;
}

.loc-warn-card {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.loc-warn-icon {
  width: 34px;
  height: 34px;
  color: var(--warn-icon);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ==========================================================================
   BOTTOM FLOATING NAVIGATION BAR (Expandable 1->3 Liquid Frosted Glass)
   ========================================================================== */
.bottom-nav-scrim {
  display: none;
}

.bottom-nav-wrap {
  display: contents;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto;
  width: 50px;
  height: 50px;
  z-index: 600;
  background: var(--nav-bg);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border-radius: 999px;
  padding: 6px;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(20, 16, 28, 0.13),
    0 2px 6px rgba(20, 16, 28, 0.05),
    0 0 0 0.5px rgba(24, 20, 32, 0.06),
    inset 0 1.2px 1.2px rgba(255, 255, 255, 0.90),
    inset 0 -1px 1px rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.74);
  transition:
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease,
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.bottom-nav.is-expanded {
  width: 176px;
  cursor: default;
  box-shadow:
    0 14px 34px rgba(20, 16, 28, 0.15),
    0 3px 8px rgba(20, 16, 28, 0.06),
    0 0 0 0.5px rgba(24, 20, 32, 0.07),
    inset 0 1.2px 1.2px rgba(255, 255, 255, 0.92),
    inset 0 -1px 1px rgba(255, 255, 255, 0.42);
}

.bottom-nav:not(.is-expanded):active {
  transform: scale(0.91);
}

@media (min-width: 481px) {
  .bottom-nav {
    position: sticky;
    bottom: 16px;
    margin: -66px auto 16px;
  }
}

.bottom-nav-inner {
  position: relative;
  width: 100%;
  height: 36px;
}

/* Sliding Active Glider (Centered at 0px when collapsed; +/-63px when expanded) */
.nav-active-glider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(0px, 0, 0);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.bottom-nav.is-expanded .nav-active-glider {
  transform: translate3d(calc((var(--active-index, 0) - 1) * 63px), 0, 0);
}

@property --orb-start {
  syntax: '<color>';
  inherits: false;
  initial-value: #8e6d5d;
}

@property --orb-end {
  syntax: '<color>';
  inherits: false;
  initial-value: #7b5b4c;
}

.nav-glider-orb {
  --orb-start: color-mix(in srgb, var(--accent) 88%, #ffffff);
  --orb-end: var(--accent-2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--orb-start) 0%, var(--orb-end) 100%);
  box-shadow:
    0 5px 14px var(--accent-glow),
    0 0 0 2px var(--accent-ring),
    inset 0 1.4px 1.6px rgba(255, 255, 255, 0.50),
    inset 0 -1px 1.5px rgba(0, 0, 0, 0.12);
  transition:
    --orb-start 0.32s ease,
    --orb-end 0.32s ease,
    box-shadow 0.32s ease,
    transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Consistent WhatsApp Emerald Green orb when Chat/WhatsApp tab is active */
html[data-active-tab="chat"] .nav-glider-orb {
  --orb-start: #18c477;
  --orb-end: #099f5b;
  background: linear-gradient(145deg, #18c477 0%, #099f5b 100%);
  box-shadow:
    0 5px 14px rgba(12, 166, 96, 0.36),
    0 0 0 2px rgba(22, 190, 114, 0.22),
    inset 0 1.4px 1.6px rgba(255, 255, 255, 0.50),
    inset 0 -1px 1.5px rgba(0, 0, 0, 0.12);
}

.nav-tab-btn {
  --slot-x: 0px;
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

.nav-tab-btn[data-index="0"] {
  --slot-x: -63px;
}

.nav-tab-btn[data-index="1"] {
  --slot-x: 0px;
}

.nav-tab-btn[data-index="2"] {
  --slot-x: 63px;
}

/* Collapsed state: ONLY the active icon is shown dead-center */
.bottom-nav:not(.is-expanded) .nav-tab-btn.is-active {
  transform: translate3d(0px, 0, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.bottom-nav:not(.is-expanded) .nav-tab-btn:not(.is-active) {
  transform: translate3d(0px, 0, 0) scale(0.45);
  opacity: 0;
  pointer-events: none;
}

/* Expanded state: all 3 icons fan out concentrically across the 176px capsule */
.bottom-nav.is-expanded .nav-tab-btn {
  transform: translate3d(var(--slot-x), 0, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Seamless full-capsule touch target per tab when expanded */
.nav-tab-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
}

.bottom-nav.is-expanded .nav-tab-btn::before {
  inset: -6px -11px;
}

.bottom-nav.is-expanded .nav-tab-btn:active {
  transform: translate3d(var(--slot-x), 0, 0) scale(0.90);
}

/* Fixed 36x36 optical slot centered 1:1 with the 36x36 orb */
.nav-icon-slot {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-inactive);
  transition:
    color 0.24s ease,
    background-color 0.22s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) {
  .nav-tab-btn:not(.is-active):hover .nav-icon-slot {
    color: var(--nav-inactive-hover);
    background-color: var(--nav-slot-hover);
    transform: translateY(-0.5px);
  }
}

.nav-tab-btn:not(.is-active):active .nav-icon-slot {
  color: var(--nav-inactive-hover);
  background-color: var(--nav-slot-hover);
}

.nav-icon-slot svg {
  position: absolute;
  width: 19.5px;
  height: 19.5px;
  display: block;
  transition:
    opacity 0.24s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-icon-slot .icon-outline {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.52));
}

.nav-icon-slot .icon-solid {
  opacity: 0;
  transform: scale(0.86);
}

.nav-tab-btn.is-active .nav-icon-slot {
  color: #ffffff;
  background-color: transparent;
}

.nav-tab-btn.is-active .nav-icon-slot .icon-outline {
  opacity: 0;
  transform: scale(0.86);
}

.nav-tab-btn.is-active .nav-icon-slot .icon-solid {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   MORE MENU SHEET (••• Action Drawer & QR Modal)
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 16, 15, 0.46);
  backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.action-drawer {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 28px 28px 0 0;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom, 12px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-backdrop.is-open .action-drawer {
  transform: translateY(0);
}

.drawer-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: #dcd8d4;
  margin: 0 auto 16px;
}

.drawer-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
  text-align: center;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-item {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
  background: #f7f5f3;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  text-align: left;
  transition: background 0.15s ease;
}

.drawer-item:active {
  background: #ece8e4;
}

.drawer-family-strip {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

.drawer-family-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.family-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.family-pill {
  padding: 10px 8px;
  border-radius: 14px;
  background: #f7f5f3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  border: 2px solid transparent;
}

.family-pill.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.family-pill img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.qr-preview-box {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 6px;
}

.qr-preview-box.is-visible {
  display: flex;
}

.qr-preview-box img {
  width: 190px;
  height: 190px;
  border-radius: 16px;
  border: 1px solid #eee;
  padding: 8px;
  background: #fff;
}

.qr-shortlink {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

/* Toast notification */
.app-toast {
  position: fixed;
  top: max(56px, calc(env(safe-area-inset-top, 14px) + 42px));
  left: 50%;
  transform: translateX(-50%) translateY(-14px) scale(0.96);
  max-width: min(350px, calc(100vw - 32px));
  width: max-content;
  text-align: center;
  background: rgba(24, 21, 19, 0.84);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12.2px;
  font-weight: 600;
  line-height: 1.35;
  padding: 8.5px 15px;
  border-radius: 99px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.20);
}

.app-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
