/* ==========================================================================
   Nấu Ăn Cùng Mèo — Studio Ghibli × Storybook Handcrafted Design System
   Đồng bộ tokens từ mobile_app/theme.js và mobile_app/design.md
   ========================================================================== */

:root {
  /* Palette chính (theme.js) */
  --primary: #8B5E3C;
  --wood-light: #A67C52;
  --wood-dark: #5C3A21;
  --bg: #F5EDDC;
  --parchment-light: #FFF8EA;
  --parchment-dark: #E6DCC3;
  --surface: #FFFFFF;
  --surface-alt: #FDFBFA;

  /* Text */
  --text: #3E2723;
  --text-mid: #5D4037;
  --text-soft: #6B4F44;
  --text-light: #8D6E63;

  /* Sổ tay & trạng thái */
  --paper-stroke: #C8A96E;
  --border: #D7CCC8;
  --chip-bg: #FFFDF7;
  --chip-border: #E2D4B8;
  --sky-bg: #DCEBF5;
  --sky-border: #7FAFCF;
  --sky-text: #1F4A66;
  --fresh-bg: #E3F4EA;
  --fresh-text: #24563F;
  --season-bg: #FDEBC8;
  --season-text: #8A4B0B;
  --amber: #F59E0B;
  --danger-bg: #FDECEB;
  --danger-text: #9A2E25;

  /* Nút 3D Ghibli (Gỗ / Mây / Trời) */
  --btn-wood-top: #A46F45;
  --btn-wood-bottom: #83532F;
  --btn-wood-lip: #5E3A22;
  --btn-wood-text: #FFF8EA;

  --btn-cloud-top: #FFFDF7;
  --btn-cloud-bottom: #F6EEDD;
  --btn-cloud-lip: #E2D4B8;
  --btn-cloud-text: #5D4037;

  --btn-sky-top: #CFE6F4;
  --btn-sky-bottom: #AFD3EA;
  --btn-sky-lip: #7FAFCF;
  --btn-sky-text: #1F4A66;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;

  /* Radii & Shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-wood: 0 8px 24px rgba(92, 58, 33, 0.13);
  --shadow-soft: 0 4px 14px rgba(92, 58, 33, 0.09);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 248, 234, 0.75) 0%, transparent 45%),
    radial-gradient(circle at 88% 72%, rgba(200, 169, 110, 0.16) 0%, transparent 40%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--sky-border);
  outline-offset: 2px;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

/* ==========================================================================
   Core Handcrafted Surfaces & Tactile Buttons
   ========================================================================== */
.parchment-card {
  position: relative;
  background-color: var(--parchment-light);
  background-image:
    linear-gradient(180deg, rgba(255, 253, 247, 0.88), rgba(245, 237, 220, 0.92)),
    url('../assets/textures/paper_cream.png');
  background-size: cover;
  border: 1.5px solid var(--paper-stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-wood);
}

.notebook-bg {
  background-image:
    linear-gradient(180deg, rgba(255, 250, 238, 0.92), rgba(248, 240, 222, 0.94)),
    url('../assets/textures/notebook_lines.png');
  background-size: 100% auto;
}

.wood-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid #9A7040;
  background-color: #EAD8B8;
  background-image:
    linear-gradient(180deg, rgba(255, 248, 234, 0.58), rgba(232, 206, 165, 0.65)),
    url('../assets/textures/wood_light.png');
  background-size: cover;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Tactile 3D Lip Buttons (BTN.wood / BTN.cloud / BTN.sky) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.86rem;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 0.98rem;
}

.btn-wood {
  background: linear-gradient(180deg, var(--btn-wood-top), var(--btn-wood-bottom));
  border-color: #7A4E2E;
  color: var(--btn-wood-text);
  box-shadow: 0 4px 0 var(--btn-wood-lip), 0 8px 16px rgba(92, 58, 33, 0.22);
}

.btn-wood:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--btn-wood-lip), 0 10px 20px rgba(92, 58, 33, 0.24);
}

.btn-wood:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--btn-wood-lip);
}

.btn-cloud {
  background: linear-gradient(180deg, var(--btn-cloud-top), var(--btn-cloud-bottom));
  border-color: var(--btn-cloud-lip);
  color: var(--btn-cloud-text);
  box-shadow: 0 4px 0 var(--btn-cloud-lip), 0 6px 14px rgba(92, 58, 33, 0.1);
}

.btn-cloud:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--btn-cloud-lip), 0 8px 16px rgba(92, 58, 33, 0.13);
}

.btn-cloud:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--btn-cloud-lip);
}

.btn-sky {
  background: linear-gradient(180deg, var(--btn-sky-top), var(--btn-sky-bottom));
  border-color: #8DB8D6;
  color: var(--btn-sky-text);
  box-shadow: 0 4px 0 var(--btn-sky-lip), 0 6px 14px rgba(31, 74, 102, 0.15);
}

.btn-sky:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--btn-sky-lip), 0 8px 16px rgba(31, 74, 102, 0.18);
}

.btn-sky:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--btn-sky-lip);
}

.icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 237, 220, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid rgba(200, 169, 110, 0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

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

.brand-logo {
  border-radius: 12px;
  border: 1.5px solid var(--paper-stroke);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--text);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-mid);
  padding: 6px 2px;
  position: relative;
  transition: color 0.15s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 11px;
  border: 1.5px solid var(--paper-stroke);
  background: var(--parchment-light);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px 20px;
  background: var(--parchment-light);
  border-top: 1px solid rgba(200, 169, 110, 0.45);
}

.mobile-drawer[hidden] {
  display: none;
}

.drawer-link {
  padding: 10px 6px;
  font-weight: 600;
  color: var(--text-mid);
  border-bottom: 1px dashed rgba(200, 169, 110, 0.45);
}

.drawer-cta {
  margin-top: 6px;
  width: 100%;
  padding: 12px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 46px 0 96px;
  overflow: hidden;
}

.hero-sky-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(242, 179, 76, 0.14) 0%, rgba(245, 237, 220, 0.72) 72%, #F5EDDC 100%),
    url('../assets/textures/sky_watercolor.png');
  background-size: cover;
  background-position: center top;
  opacity: 0.88;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 247, 0.9);
  border: 1.5px solid var(--paper-stroke);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.dot-warm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.1vw, 3.15rem);
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--text);
  letter-spacing: -0.015em;
}

.title-accent {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.title-accent::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 10px;
  background: rgba(245, 158, 11, 0.28);
  border-radius: 6px;
  z-index: -1;
}

.hero-lead {
  font-size: 1.03rem;
  color: var(--text-mid);
  margin: 0 0 26px;
  max-width: 560px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-item {
  background: rgba(255, 253, 247, 0.86);
  border: 1px solid rgba(200, 169, 110, 0.55);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-soft);
  line-height: 1.3;
  margin-top: 2px;
}

/* Hero Visual Card */
.hero-notebook-card {
  padding: 20px;
}

.wiggly-svg {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  pointer-events: none;
}

.hero-art-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at center, #FFFDF8 0%, #EFE4CC 100%);
  border: 1px solid rgba(200, 169, 110, 0.45);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bowl-img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(92, 58, 33, 0.16));
  transition: transform 0.35s ease;
}

.hero-notebook-card:hover .hero-bowl-img {
  transform: scale(1.03);
}

.floating-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--paper-stroke);
  box-shadow: var(--shadow-soft);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
}

.tag-top-left {
  top: 12px;
  left: 12px;
}

.tag-top-right {
  bottom: 12px;
  right: 12px;
}

/* Mascot Row (đồng bộ design.md) */
.mascot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.mascot-row:hover {
  background: rgba(230, 220, 195, 0.35);
}

.mascot-lottie {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.mascot-bubble {
  position: relative;
  flex: 1;
  background: #FFFDF7;
  border: 1.5px solid var(--paper-stroke);
  border-radius: 16px;
  padding: 11px 14px;
  box-shadow: var(--shadow-soft);
}

.mascot-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #FFFDF7;
  border-left: 1.5px solid var(--paper-stroke);
  border-bottom: 1.5px solid var(--paper-stroke);
}

.mascot-speaker {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.mascot-quote {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}

.mascot-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-light);
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 60px;
}

/* ==========================================================================
   Sections Common
   ========================================================================== */
.section {
  padding: 68px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(230, 220, 195, 0.35), rgba(245, 237, 220, 0.45));
  border-top: 1px dashed rgba(200, 169, 110, 0.5);
  border-bottom: 1px dashed rgba(200, 169, 110, 0.5);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 38px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--parchment-light);
  border: 1.5px solid var(--paper-stroke);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.mini-lottie {
  width: 26px;
  height: 26px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--text);
}

.section-desc {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

/* ==========================================================================
   Section 2: Health & Nutrition Guide (6 groups)
   ========================================================================== */
.health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.health-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--chip-border);
  background: var(--chip-bg);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--chip-border), var(--shadow-soft);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.health-tab:hover {
  transform: translateY(-2px);
  border-color: var(--paper-stroke);
}

.health-tab.active {
  background: var(--sky-bg);
  border-color: var(--sky-border);
  box-shadow: 0 4px 0 var(--sky-border), 0 8px 18px rgba(31, 74, 102, 0.14);
}

.health-tab-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid rgba(200, 169, 110, 0.6);
  background: #FFFDF7;
  flex-shrink: 0;
}

.health-tab-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 3px;
}

.health-tab.active .health-tab-title {
  color: var(--sky-text);
}

.health-tab-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-soft);
  line-height: 1.35;
}

/* Health Detail Notebook Panel */
.health-detail-panel {
  padding: 28px;
}

.hd-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1.5px dashed rgba(200, 169, 110, 0.65);
  margin-bottom: 22px;
}

.hd-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hd-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: 2px solid var(--paper-stroke);
  background: #FFFDF7;
}

.hd-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 4px;
  color: var(--text);
}

.hd-summary {
  margin: 0;
  color: var(--text-mid);
  font-size: 0.94rem;
  max-width: 620px;
}

.hd-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.hd-box {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1.5px solid transparent;
}

.hd-box-eat {
  background: rgba(227, 244, 234, 0.72);
  border-color: rgba(56, 176, 122, 0.45);
}

.hd-box-limit {
  background: rgba(253, 236, 235, 0.72);
  border-color: rgba(231, 76, 60, 0.35);
}

.hd-box h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-box-eat h4 { color: var(--fresh-text); }
.hd-box-limit h4 { color: var(--danger-text); }

.hd-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
}

.hd-footer-notes {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.hd-tip, .hd-disclaimer {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.87rem;
}

.hd-tip {
  background: var(--season-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--season-text);
}

.hd-disclaimer {
  background: rgba(255, 253, 247, 0.85);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

/* ==========================================================================
   Section 3: Dishes Showcase & Filters
   ========================================================================== */
.filter-panel {
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 13px;
  border: 1.5px solid var(--paper-stroke);
  background: #FFFDF7;
  color: var(--text);
  font-size: 0.93rem;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.filter-mascot-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-pill);
  background: #FFFDF7;
  border: 1px solid var(--paper-stroke);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.filter-cat-lottie {
  width: 36px;
  height: 36px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-split-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px dashed rgba(200, 169, 110, 0.5);
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  min-width: 82px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* CHIP (mây khi tắt, trời khi bật — theme.js) */
.chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--text-mid);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: var(--paper-stroke);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--sky-bg);
  border-color: var(--sky-border);
  color: var(--sky-text);
  font-weight: 700;
}

/* Dishes Grid */
.dishes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.dish-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(92, 58, 33, 0.16);
}

.dish-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.dish-type-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--season-bg);
  color: var(--season-text);
}

.dish-title {
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.32;
  margin: 0 0 8px;
  color: var(--text);
}

.dish-summary {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-soft);
  flex: 1;
}

.dish-health-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.health-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--fresh-bg);
  color: var(--fresh-text);
}

.dish-nutrition-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(200, 169, 110, 0.45);
  margin-bottom: 14px;
  text-align: center;
}

.nutri-val {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
}

.nutri-lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
}

.dish-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed rgba(200, 169, 110, 0.55);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.dish-open-link {
  font-weight: 700;
  color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 40px 24px;
  max-width: 520px;
  margin: 0 auto;
}

.empty-state[hidden] {
  display: none;
}

.empty-lottie {
  width: 140px;
  height: 140px;
  margin: 0 auto 8px;
}

.empty-state h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--text-soft);
}

/* ==========================================================================
   Section 4: Family Personas
   ========================================================================== */
.family-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.family-card {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: transform 0.2s ease;
}

.family-card:hover {
  transform: translateY(-4px);
}

.family-lottie {
  width: 112px;
  height: 112px;
}

.family-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  margin: 0;
  color: var(--text);
}

.family-role {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--season-bg);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.family-tip {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
  flex: 1;
}

/* ==========================================================================
   Section 5: Allergy Guide
   ========================================================================== */
.allergy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.allergy-card {
  padding: 20px;
}

.allergy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.allergy-emoji {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: #FFFDF7;
  border: 1.5px solid var(--paper-stroke);
}

.allergy-head h3 {
  font-family: var(--font-display);
  font-size: 1.04rem;
  margin: 0;
}

.allergy-examples {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 6px;
}

.allergy-note {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 0;
}

/* ==========================================================================
   Section 6: Fanpage CTA Banner & Footer
   ========================================================================== */
.cta-banner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
  border-width: 2px;
}

.cta-lottie {
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  margin: 12px 0 10px;
  color: var(--text);
}

.cta-desc {
  margin: 0 0 22px;
  color: var(--text-mid);
  max-width: 620px;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer {
  background: #EFE4CC;
  border-top: 2px solid var(--paper-stroke);
  padding-top: 44px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr 0.9fr;
  gap: 28px;
  padding-bottom: 34px;
}

.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-tagline {
  margin: 2px 0 0;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.disclaimer-box {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-soft);
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(200, 169, 110, 0.55);
  border-radius: 12px;
  padding: 12px 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links h4 {
  font-family: var(--font-display);
  margin: 0 0 4px;
  font-size: 1rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-mid);
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-mascot {
  text-align: center;
}

.footer-cat-lottie {
  width: 116px;
  height: 116px;
  margin: 0 auto 6px;
}

.footer-signoff {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-mid);
}

.footer-bottom {
  border-top: 1px solid rgba(200, 169, 110, 0.55);
  padding: 14px 0;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.back-to-top {
  font-weight: 700;
  color: var(--primary);
}

/* ==========================================================================
   Recipe Detail Modal
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(62, 39, 35, 0.58);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(740px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-stroke);
  background: #FFFDF7;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

.modal-close:hover {
  background: var(--season-bg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 6px 40px 10px 0;
  color: var(--text);
}

.modal-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-section {
  margin-top: 18px;
}

.modal-section h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: var(--primary);
}

.modal-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
}

.modal-cat-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--season-bg);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  color: var(--season-text);
  font-size: 0.9rem;
}

.modal-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Mobile / Facebook In-App Browser)
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .health-grid,
  .dishes-grid,
  .allergy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hd-footer-notes,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .header-actions .btn-sm {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-section {
    padding: 28px 0 74px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-grid,
  .dishes-grid,
  .family-grid,
  .allergy-grid,
  .hd-columns {
    grid-template-columns: 1fr;
  }

  .health-detail-panel,
  .modal-card,
  .cta-banner {
    padding: 20px 16px;
  }

  .mascot-lottie {
    width: 72px;
    height: 72px;
  }

  .hero-cta-row .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Kidney Specialty Page (benh-than.html) — Đồng bộ Ghibli Storybook
   ========================================================================== */
.kidney-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meal-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.qa-card {
  padding: 24px;
}

.qa-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  background: var(--season-bg);
  border: 1px solid rgba(200, 169, 110, 0.7);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  margin-bottom: 10px;
}

.qa-question {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin: 0 0 8px;
  color: var(--text);
}

.qa-answer {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-mid);
}

.habits-showcase {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  padding: 22px;
  margin-bottom: 24px;
  align-items: center;
}

.habits-img {
  width: 100%;
  border-radius: 16px;
  border: 1.5px solid var(--paper-stroke);
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.habits-prep-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 10px 0 14px;
  color: var(--text);
}

.prep-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prep-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 253, 247, 0.88);
  border: 1px solid rgba(200, 169, 110, 0.55);
  border-radius: 14px;
  padding: 11px 14px;
}

.prep-step-badge {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--sky-bg);
  color: var(--sky-text);
  border: 1px solid var(--sky-border);
}

.prep-step-item strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 2px;
}

.prep-step-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.action-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--paper-stroke);
  background: #FFFDF7;
  flex-shrink: 0;
  object-fit: cover;
}

.action-title {
  font-family: var(--font-display);
  font-size: 1.03rem;
  margin: 0 0 6px;
  color: var(--text);
}

.action-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.food-tab-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.food-table-note {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.food-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.food-metric-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.food-metric-card.metric-limit {
  border-color: rgba(231, 76, 60, 0.4);
}

.food-metric-card.metric-prefer {
  border-color: rgba(56, 176, 122, 0.45);
}

.food-metric-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.food-metric-name {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0;
  color: var(--text);
}

.food-metric-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.tag-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.tag-fresh {
  background: var(--fresh-bg);
  color: var(--fresh-text);
}

.food-metric-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.food-metric-tip {
  margin: 0;
  font-size: 0.83rem;
  color: var(--text-soft);
}

/* Notebook Sample Menu Table (chuẩn TR-VDD-0013) */
.menu-sheet-card {
  padding: 26px;
  margin-bottom: 42px;
}

.table-scroll {
  overflow-x: auto;
}

.notebook-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 253, 247, 0.88);
  border: 1.5px solid var(--paper-stroke);
  border-radius: 14px;
  overflow: hidden;
}

.notebook-table th {
  text-align: left;
  padding: 14px 16px;
  background: #EAD8B8;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.98rem;
  border-bottom: 1.5px solid var(--paper-stroke);
}

.notebook-table td {
  padding: 11px 16px;
  border-bottom: 1px dashed rgba(200, 169, 110, 0.55);
  font-size: 0.9rem;
  color: var(--text-mid);
}

.notebook-table tr.meal-group-row td {
  background: var(--season-bg);
  color: var(--season-text);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(200, 169, 110, 0.7);
}

.stage-callout {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--danger-bg);
  border: 1.5px solid rgba(231, 76, 60, 0.35);
  color: var(--danger-text);
  font-size: 0.88rem;
}

.sub-section-head {
  text-align: center;
  margin-bottom: 24px;
}

.sub-section-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 6px;
  color: var(--text);
}

.sub-section-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.kidney-dishes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nav-link-accent {
  color: var(--primary);
  font-weight: 700;
}

.kidney-spotlight-bar {
  margin-top: 22px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.kidney-spotlight-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-mid);
}

@media (max-width: 980px) {
  .habits-showcase,
  .qa-grid,
  .action-grid,
  .food-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .habits-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .qa-grid,
  .action-grid,
  .food-metric-grid,
  .kidney-dishes-grid {
    grid-template-columns: 1fr;
  }

  .menu-sheet-card {
    padding: 18px 14px;
  }
}

/* ==========================================================================
   Multi-Page Hub Grid, Related Guides & Meal Trays (bua-an.html)
   ========================================================================== */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(92, 58, 33, 0.16);
}

.hub-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
  border: 1.5px solid rgba(200, 169, 110, 0.65);
  background: #FFFDF7;
}

.hub-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0;
  color: var(--text);
}

.hub-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
  flex: 1;
}

.hub-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--primary);
  padding-top: 8px;
  border-top: 1px dashed rgba(200, 169, 110, 0.55);
}

/* Related Guides Switcher Strip */
.related-guides-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.related-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1.5px solid var(--chip-border);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  transition: all 0.15s ease;
}

.related-pill:hover {
  border-color: var(--paper-stroke);
  background: var(--season-bg);
  color: var(--season-text);
  transform: translateY(-1px);
}

.related-pill.current {
  background: var(--sky-bg);
  border-color: var(--sky-border);
  color: var(--sky-text);
}

/* Meals Page Trays & Shopping Checklist */
.trays-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tray-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.tray-courses {
  list-style: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.88);
  border: 1px solid rgba(200, 169, 110, 0.5);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
}

.course-role {
  font-weight: 700;
  color: var(--primary);
  margin-right: 4px;
}

.tray-why {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  flex: 1;
}

.checklist-box {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(200, 169, 110, 0.55);
  cursor: pointer;
  font-size: 0.92rem;
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.check-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: var(--text-light);
}

@media (max-width: 980px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hub-grid,
  .trays-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BMI & Calorie Calculator (tinh-bmi-calo.html), App Page & Privacy Page
   ========================================================================== */
.bmi-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 24px;
  align-items: start;
}

.bmi-form-card,
.bmi-result-card {
  padding: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
}

.form-field input[type="number"],
.form-field select {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--paper-stroke);
  background: #FFFDF7;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--chip-border);
  background: var(--chip-bg);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.gender-opt:has(input:checked) {
  background: var(--sky-bg);
  border-color: var(--sky-border);
  color: var(--sky-text);
}

.gender-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bmi-big-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
}

.bmi-big-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.bmi-badge {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.tag-sky { background: var(--sky-bg); color: var(--sky-text); }
.tag-warn { background: var(--season-bg); color: var(--season-text); }

.bmi-ideal-note {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.bmi-bar-wrap {
  margin-bottom: 20px;
}

.bmi-bar-track {
  position: relative;
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: visible;
  background: #EAD8B8;
}

.bmi-seg { height: 100%; }
.seg-under { width: 24%; background: #8DB8D6; border-radius: 999px 0 0 999px; }
.seg-normal { width: 30%; background: #38B07A; }
.seg-over { width: 20%; background: #F59E0B; }
.seg-obese { width: 26%; background: #E74C3C; border-radius: 0 999px 999px 0; }

.bmi-marker {
  position: absolute;
  top: -5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFDF7;
  border: 4px solid var(--text);
  transform: translateX(-50%);
  box-shadow: var(--shadow-soft);
  transition: left 0.25s ease;
}

.bmi-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 8px;
}

.tdee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tdee-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.9);
  border: 1.5px solid rgba(200, 169, 110, 0.55);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tdee-card-main {
  background: var(--fresh-bg);
  border-color: rgba(56, 176, 122, 0.5);
}

.tdee-lbl { font-size: 0.78rem; font-weight: 700; color: var(--text-soft); }
.tdee-val { font-family: var(--font-display); font-size: 1.25rem; color: var(--text); }
.tdee-sub { font-size: 0.74rem; color: var(--text-light); }

/* App Showcase & Legal Document */
.app-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-feature-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-sheet {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px 36px;
}

.legal-sheet h2 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  color: var(--primary);
  margin: 26px 0 10px;
  padding-top: 14px;
  border-top: 1px dashed rgba(200, 169, 110, 0.6);
}

.legal-sheet h2:first-of-type {
  margin-top: 12px;
  border-top: none;
}

.legal-sheet p,
.legal-sheet li {
  font-size: 0.94rem;
  color: var(--text-mid);
}

.legal-sheet ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 980px) {
  .bmi-layout,
  .app-feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .form-grid,
  .tdee-grid {
    grid-template-columns: 1fr;
  }

  .legal-sheet {
    padding: 22px 18px;
  }
}

/* ==========================================================================
   Language Switcher (VI | EN) — Ghibli Tactile Pill
   ========================================================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--paper-stroke);
  background: var(--chip-bg);
  box-shadow: 0 2px 0 var(--chip-border);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-mid);
  transition: transform 0.14s ease, border-color 0.14s ease;
  user-select: none;
}

.lang-switch:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.lang-switch [data-lang-opt] {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  transition: background-color 0.14s ease, color 0.14s ease;
}

.lang-switch [data-lang-opt].is-active {
  background: var(--sky-bg);
  color: var(--sky-text);
  box-shadow: inset 0 0 0 1px var(--sky-border);
}

.drawer-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  border-bottom: 1px dashed rgba(200, 169, 110, 0.45);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-mid);
}
