/*
Theme Name: AiMuztaba
Theme URI: https://aimuztaba.com
Author: Ahmad Muztaba Zaman
Author URI: https://aimuztaba.com
Description: Mobile-first bilingual (Bangla/English) theme for AiMuztaba — desi food calorie database, Routine Builder, Relax, YouTube & Facebook video galleries, blog with audio/video, community links. Polylang and Jetpack Social ready.
Version: 4.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aimuztaba
Tags: blog, food-and-drink, two-columns, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ============ TOKENS ============ */
:root {
  --bg: #FAFCFF;
  --surface: #FFFFFF;
  --surface-2: #F1F6FB;
  --text: #0F172A;
  --text-2: #475569;
  --muted: #64748B;
  --line: #E3EAF2;
  --brand: #0EA5E9;
  --brand-600: #0284C7;
  --brand-700: #0369A1;
  --brand-50: #F0F9FF;
  --brand-100: #E0F2FE;
  --leaf: #16A34A;
  --leaf-50: #ECFDF3;
  --danger: #DC2626;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
  --shadow: 0 10px 30px -12px rgba(2,132,199,.25);
  --radius: 20px;
  --radius-sm: 14px;
  --font: 'Plus Jakarta Sans', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --header-h: 64px;
  --bottom-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A111F; --surface: #101A2C; --surface-2: #162238; --text: #E7EEF8; --text-2: #A8B5C9; --muted: #8796AD; --line: #22314B;
    --brand: #38BDF8; --brand-600: #0EA5E9; --brand-700: #7DD3FC; --brand-50: #0F2338; --brand-100: #12304A; --leaf: #4ADE80; --leaf-50: #10261A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 30px -12px rgba(0,0,0,.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A111F; --surface: #101A2C; --surface-2: #162238; --text: #E7EEF8; --text-2: #A8B5C9; --muted: #8796AD; --line: #22314B;
  --brand: #38BDF8; --brand-600: #0EA5E9; --brand-700: #7DD3FC; --brand-50: #0F2338; --brand-100: #12304A; --leaf: #4ADE80; --leaf-50: #10261A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 12px 30px -12px rgba(0,0,0,.6); color-scheme: dark;
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
html.has-dialog { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
body.lang-bn { line-height: 1.8; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt { margin-top: 2.5rem; }
.pt-0 { padding-top: 0 !important; }
.icon { flex-shrink: 0; }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: .98rem; cursor: pointer; transition: transform .15s var(--ease), background .2s, box-shadow .2s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 8px 20px -8px rgba(2,132,199,.6); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
:root[data-theme="dark"] .btn-primary:hover { color: #0A111F; }
.btn-soft { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-soft:hover { border-color: var(--brand); color: var(--brand-600); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: .2s; }
.icon-btn:hover { color: var(--brand-600); border-color: var(--brand); }
.js-theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .js-theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .js-theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .js-theme-toggle .icon-sun { display: block; } :root:not([data-theme="light"]) .js-theme-toggle .icon-moon { display: none; } }

/* ============ HEADER ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-logo { height: 40px; width: auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--leaf)); color: #fff; }
.brand-text b { color: var(--brand-600); }
.desk-nav { display: none; }
.desk-menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.desk-menu a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .95rem; }
.desk-menu a:hover, .desk-menu a[aria-current="page"], .desk-menu .current-menu-item > a { color: var(--brand-600); background: var(--brand-50); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-cta { display: none; }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.lang-switch a.is-active { background: var(--brand-600); color: #fff; }
.lang-switch.is-large a { padding: 8px 16px; font-size: .95rem; }

/* ============ BOTTOM NAV (phone) ============ */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: .72rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bottom-nav .is-active { color: var(--brand-600); }
.bottom-nav .is-active .icon { stroke-width: 2.3; }

/* ============ DIALOGS ============ */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100dvh; }
dialog::backdrop { background: rgba(10,17,31,.55); backdrop-filter: blur(4px); }
.search-dialog { width: min(680px, calc(100vw - 24px)); margin: 12vh auto auto; }
.search-form { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); color: var(--muted); }
.search-form input { flex: 1; border: 0; outline: 0; background: none; font-size: 1.05rem; min-height: 44px; color: var(--text); }
.sheet { position: fixed; inset: auto 0 0 0; width: 100%; margin: 0; background: var(--surface); border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.18); max-height: 88dvh; overflow-y: auto; }
.sheet[open] { animation: sheet-up .28s var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .88rem; text-align: center; }
.sheet-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.sheet-community { display: grid; gap: 8px; margin-bottom: 14px; }
.video-dialog { width: min(1000px, 100vw); margin: auto; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 16px; overflow: hidden; }
.video-frame.is-vertical { aspect-ratio: 9/16; max-height: 86dvh; margin: 0 auto; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-close { position: absolute; top: -52px; right: 8px; background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.video-dialog[open] { overflow: visible; padding-top: 56px; }

/* ============ SHARED BITS ============ */
.section { padding: 44px 0; }
.section.is-tinted { background: var(--surface-2); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-title { font-size: clamp(1.4rem, 4.6vw, 2.1rem); margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 6px; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-sm); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .8rem; font-weight: 700; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 2px; margin-top: 14px; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; font-size: .9rem; }
.chips .chip.is-active, .chips .chip:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .82rem; font-weight: 700; }
.empty { padding: 32px 20px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: var(--surface); margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.media-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--brand-600); background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); }
.health-disclaimer { font-size: .84rem; color: var(--muted); background: var(--surface-2); border-radius: 14px; padding: 12px 16px; margin: 28px 0 0; }
.ad-slot { margin: 28px 0; text-align: center; min-height: 90px; }

/* ============ HERO ============ */
.hero { position: relative; overflow: hidden; padding: 28px 0 40px; }
.hero-glow { position: absolute; inset: -20% -10% auto; height: 520px; background: radial-gradient(40% 50% at 20% 30%, rgba(14,165,233,.22), transparent 70%), radial-gradient(35% 45% at 80% 20%, rgba(22,163,74,.16), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 28px; }
.hero-title { font-size: clamp(2.1rem, 9vw, 3.9rem); line-height: 1.12; margin: 16px 0 14px; font-weight: 800; letter-spacing: -.025em; }
.lang-bn .hero-title { line-height: 1.25; }
.grad { background: linear-gradient(90deg, var(--brand-600), var(--leaf)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.08rem; color: var(--text-2); max-width: 560px; }
.hero-actions { display: grid; gap: 10px; margin: 22px 0 14px; }
.hero-trust { display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); margin: 0; }
.hero-trust .icon { color: var(--leaf); }
.hero-visual { display: flex; justify-content: center; }
.phone-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 18px; box-shadow: var(--shadow); transform: rotate(-2deg); }
.phone-card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; margin-bottom: 10px; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); }
.phone-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phone-card li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: .92rem; }
.phone-card b { color: var(--brand-600); min-width: 46px; }

/* ============ BENTO / CARDS ============ */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bento-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .9rem; line-height: 1.5; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.bento-card strong { color: var(--text); font-size: 1.05rem; }
.bento-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); color: var(--text-2); }
.bento-card:last-child { grid-column: 1 / -1; }
.bento-card.is-big { grid-column: 1 / -1; background: linear-gradient(135deg, #0284C7, #0369A1); border-color: transparent; color: rgba(255,255,255,.88); }
.bento-card.is-big strong { color: #fff; font-size: 1.3rem; }
.bento-card.is-big .bento-icon { background: rgba(255,255,255,.18); color: #fff; }
.bento-card em { font-style: normal; font-weight: 800; color: #fff; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.bento-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); color: var(--brand-600); margin-bottom: 6px; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 14px; margin: 0 -16px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; }
.scroller.is-videos { grid-auto-columns: 82%; }

.food-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s; }
.food-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.food-card-media { position: relative; display: block; aspect-ratio: 4/3; background: var(--surface-2); }
.food-card-media img { width: 100%; height: 100%; object-fit: cover; }
.kcal-pill { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(15,23,42,.78); color: #fff; font-weight: 800; font-size: .9rem; backdrop-filter: blur(4px); }
.kcal-pill small { font-weight: 600; opacity: .8; }
.food-card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 16px; font-size: .9rem; }
.food-card-body strong { font-size: 1rem; }
.food-card-meta { color: var(--muted); font-size: .84rem; }

.video-card { display: flex; flex-direction: column; gap: 8px; }
.video-card-media { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: #0B1220; cursor: pointer; }
.video-card.is-vertical .video-card-media { aspect-ratio: 9/14; }
.video-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.video-card-media:hover img { transform: scale(1.04); }
.play-dot { position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.95); color: var(--brand-700); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.play-dot svg { margin-left: 3px; }
.platform-tag { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.pt-youtube { background: #FF0000; }
.pt-facebook { background: #1877F2; }
.duration { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: .78rem; font-weight: 700; }
.video-card-title { font-size: 1rem; margin: 0; line-height: 1.4; }
.video-card-title a { color: var(--text); }
.video-card .date, .post-card .date { font-size: .8rem; color: var(--muted); }
.video-grid { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 24px; }

.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card-media { position: relative; display: block; aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.media-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(15,23,42,.78); color: #fff; font-size: .76rem; font-weight: 700; }
.post-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.post-card .meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.post-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-card-title { font-size: 1.08rem; line-height: 1.4; margin: 0; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--brand-600); }
.post-card-excerpt { color: var(--text-2); font-size: .93rem; margin: 0; }
.post-card.is-row { flex-direction: row; align-items: stretch; }
.post-card.is-row .post-card-media { width: 34%; flex-shrink: 0; aspect-ratio: auto; min-height: 104px; }
.post-card.is-row .post-card-body { padding: 12px 14px; }
.post-card.is-row .post-card-title { font-size: .98rem; }
.post-card.is-featured .post-card-title { font-size: 1.3rem; }
.blog-home { display: grid; gap: 14px; }
.post-grid { display: grid; gap: 18px; }

/* ============ COMMUNITY ============ */
.community-block { display: grid; gap: 18px; padding: 24px; border-radius: 26px; background: linear-gradient(135deg, var(--brand-50), var(--leaf-50)); border: 1px solid var(--line); margin: 32px 0 0; }
.community-block .section-title { font-size: clamp(1.25rem, 4vw, 1.7rem); }
.community-block p { color: var(--text-2); margin: 8px 0 0; }
.community-block.is-compact { padding: 20px; }
.community-links { display: grid; gap: 10px; }
.community-btn { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; transition: transform .15s, border-color .2s; }
.community-btn:hover { transform: translateY(-2px); color: var(--text); }
.community-btn span { flex: 1; }
.community-btn em { font-style: normal; font-size: .85rem; color: var(--brand-600); }
.cb-whatsapp .bicon { color: #25D366; }
.cb-telegram .bicon { color: #229ED9; }
.cb-facebook .bicon { color: #1877F2; }
.community-btn:hover.cb-whatsapp { border-color: #25D366; }
.community-btn:hover.cb-telegram { border-color: #229ED9; }
.community-btn:hover.cb-facebook { border-color: #1877F2; }
.community-btn.is-big { padding: 20px; font-size: 1.1rem; border-radius: 20px; }
.community-big { display: grid; gap: 12px; margin-bottom: 28px; }

/* ============ FORMS ============ */
.email-form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; }
.email-form input[type="email"] { width: 100%; min-height: 50px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 1rem; }
.email-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.form-msg { margin: 8px 0 0; font-weight: 700; font-size: .9rem; }
.form-msg.is-ok { color: var(--leaf); }
.form-msg.is-err { color: var(--danger); }
.email-form.is-on-dark input { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.email-form.is-on-dark input::placeholder { color: rgba(255,255,255,.7); }
.email-form.is-on-dark .btn { background: #fff; color: var(--brand-700); }
.newsletter .form-msg.is-ok { color: #BBF7D0; }
.newsletter .form-msg.is-err { color: #FECACA; }

.soon-grid { display: grid; gap: 14px; }
.soon-card { padding: 22px; border-radius: var(--radius); border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--surface); }
.soon-card h3 { font-size: 1.15rem; }
.soon-card p { color: var(--text-2); font-size: .95rem; }
.newsletter { padding: 48px 0; background: linear-gradient(135deg, #0284C7, #0369A1 55%, #065F46); color: #fff; }
.newsletter-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.newsletter h2 { color: #fff; font-size: clamp(1.4rem, 5vw, 2.2rem); }
.newsletter p { color: rgba(255,255,255,.85); max-width: 560px; }

/* ============ PAGE HEAD / BREADCRUMBS ============ */
.page-head { padding: 22px 0 26px; }
.page-head.center { text-align: center; }
.page-title { font-size: clamp(1.75rem, 6.5vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; }
.page-lead { font-size: 1.05rem; color: var(--text-2); max-width: 680px; margin: 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 10px; font-size: .82rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .5; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand-600); }
.inline-search { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 0 16px; min-height: 52px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); max-width: 560px; }
.inline-search input { flex: 1; border: 0; outline: 0; background: none; min-height: 50px; font-size: 1rem; color: var(--text); }
.inline-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.page-head.center .inline-search { margin-left: auto; margin-right: auto; }
.big-404 { font-size: 5rem; font-weight: 800; color: var(--brand-600); margin: 0; line-height: 1; }

/* ============ ARTICLE ============ */
.article-head { padding-top: 18px; padding-bottom: 18px; }
.article-title { font-size: clamp(1.8rem, 7vw, 3rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 12px 0; }
.lang-bn .article-title { line-height: 1.3; }
.article-lead { font-size: 1.15rem; color: var(--text-2); }
.byline { display: flex; gap: 12px; align-items: center; font-size: .86rem; color: var(--muted); margin-top: 16px; }
.byline a { color: var(--text); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--brand), var(--leaf)); color: #fff; font-weight: 800; font-size: .9rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.is-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.avatar.is-xl { width: 120px; height: 120px; font-size: 2.2rem; border: 4px solid var(--surface); box-shadow: var(--shadow); }
.article-media { margin-bottom: 28px; }
.article-cover { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; }
.lite-video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; cursor: pointer; }
.lite-video.is-vertical { aspect-ratio: 9/16; max-width: 420px; margin: 0 auto; }
.lite-video img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.lite-video-empty { display: grid; place-items: center; height: 100%; color: #fff; }
.lite-video-btn { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--brand-700); display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s; }
.lite-video:hover .lite-video-btn { transform: scale(1.08); }
.lite-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.audio-card { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.audio-card > div { flex: 1; min-width: 0; }
.audio-card audio { width: 100%; margin-top: 6px; }
.audio-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; margin: 0 0 28px; }
.toc summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.toc summary::after { content: "▾"; color: var(--muted); }
.toc[open] summary::after { content: "▴"; }
.toc ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.toc li { position: relative; padding-left: 16px; }
.toc li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.toc .toc-l3 { margin-left: 18px; }
.toc .toc-l3::before { background: var(--line); }
.toc a { color: var(--text-2); }
.toc a.is-current { color: var(--brand-600); font-weight: 700; }

.entry-content { font-size: 1.06rem; line-height: 1.85; color: var(--text); overflow-wrap: anywhere; }
.lang-bn .entry-content { font-size: 1.1rem; line-height: 1.95; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content p { margin: 0; }
.entry-content h2 { font-size: clamp(1.35rem, 4.5vw, 1.75rem); margin-top: 2em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .4em; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.entry-content img, .entry-content figure img { border-radius: 16px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .86rem; color: var(--muted); text-align: center; margin-top: 8px; }
.entry-content blockquote { margin: 1.6em 0; padding: 16px 20px; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 16px 16px 0; font-size: 1.1rem; }
.entry-content blockquote p { margin: 0; }
.entry-content .wp-block-gallery { gap: 10px; }
.entry-content .wp-block-audio audio { width: 100%; }
.entry-content .wp-block-embed iframe, .entry-content .wp-block-video video { width: 100%; border-radius: 16px; }
.entry-content .wp-block-embed__wrapper { position: relative; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content pre { overflow-x: auto; padding: 16px; border-radius: 14px; background: var(--surface-2); font-size: .9rem; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.tags { margin-top: 28px; }

.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-label { font-weight: 800; font-size: .9rem; margin-right: 4px; }
.share-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: .2s; }
.share-btn:hover { color: #fff; border-color: transparent; }
.share-facebook:hover { background: #1877F2; }
.share-whatsapp:hover { background: #25D366; }
.share-telegram:hover { background: #229ED9; }
.share-twitter:hover { background: #111; }
.share-linkedin:hover { background: #0A66C2; }
.share-copy:hover, .share-native:hover { background: var(--brand-600); }
.share-copy.is-done { background: var(--leaf); color: #fff; }
.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-top: 28px; }
.author-box strong { display: block; font-size: 1.1rem; }
.author-box p { color: var(--text-2); margin: 6px 0 0; font-size: .95rem; }
.comments-wrap { padding-bottom: 40px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--leaf)); transform: scaleX(0); transform-origin: 0 50%; z-index: 100; }
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; }
.pagination .current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* ============ FOOD DATABASE ============ */
.db-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.db-toolbar .inline-search { flex: 1 1 280px; margin-top: 18px; }
.db-toolbar .btn { margin-top: 18px; }
.table-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.data-table th[data-sort] { cursor: pointer; }
.data-table th[data-sort]::after { content: " ↕"; opacity: .5; }
.data-table th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; color: var(--brand-600); }
.data-table th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; color: var(--brand-600); }
.data-table td a { font-weight: 700; color: var(--text); }
.data-table td small { display: block; color: var(--muted); font-size: .8rem; }
.data-table tbody tr:hover { background: var(--brand-50); }
.hide-sm { display: none; }
.info-grid { display: grid; gap: 14px; margin-top: 28px; }
.info-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-top: 24px; }
.info-grid .info-card { margin-top: 0; }
.info-card h2 { font-size: 1.15rem; }
.info-card p:last-child { margin-bottom: 0; }
.cite { font-size: .86rem; color: var(--muted); background: var(--surface-2); padding: 8px 12px; border-radius: 10px; display: inline-block; }
.answer { font-size: 1.12rem; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); margin: 14px 0 10px; }
.macro-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
.macro { display: flex; flex-direction: column; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.macro span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.macro strong { font-size: 1.6rem; line-height: 1.2; }
.macro small { color: var(--muted); }
.macro.is-main { grid-column: 1 / -1; background: linear-gradient(135deg, #0284C7, #0369A1); border-color: transparent; color: #fff; }
.macro.is-main span, .macro.is-main small { color: rgba(255,255,255,.85); }
.macro.is-main strong { font-size: 2.4rem; color: #fff; }
.walk-note { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--leaf-50); color: var(--text); font-weight: 600; font-size: .95rem; margin: 18px 0; }
.walk-note .icon { color: var(--leaf); }
.cta-card { display: grid; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--brand-50); border: 1px solid var(--line); margin-top: 28px; }
.cta-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.cta-card p { color: var(--text-2); margin: 0; }

/* ============ ROUTINE BUILDER ============ */
.rb-form fieldset { margin: 0 0 14px; border: 1px solid var(--line); }
.rb-form legend { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; padding: 0 6px; margin-left: -6px; }
.step { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-600); color: #fff; font-size: .85rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.rb-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--text-2); }
.rb-form input[type="number"], .rb-form input[type="time"], .rb-form select { width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 1.05rem; outline: none; -webkit-appearance: none; appearance: none; }
.rb-form select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.rb-form input:focus, .rb-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); background-color: var(--surface); }
.rb-form .check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 600; margin-top: 14px; line-height: 1.5; }
.rb-form .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-600); flex-shrink: 0; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.choice-chips label { cursor: pointer; }
.choice-chips input { position: absolute; opacity: 0; pointer-events: none; }
.choice-chips span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; color: var(--text-2); transition: .15s; }
.choice-chips input:checked + span { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.choice-chips input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.form-error { color: var(--danger); font-weight: 700; margin-top: 12px; }
.rb-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.rb-head h2 { margin: 0; font-size: 1.5rem; }
.rb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rb-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 28px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.stat strong { font-size: 1.3rem; line-height: 1.3; }
.stat small { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.rb-cards:not(:has(.is-main)) .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stat.is-main { grid-column: 1 / -1; background: linear-gradient(135deg, #0284C7, #0369A1); border-color: transparent; color: #fff; }
.stat.is-main span, .stat.is-main small { color: rgba(255,255,255,.85); }
.stat.is-main strong { font-size: 2rem; color: #fff; }
.rb-result h3 { font-size: 1.2rem; margin: 28px 0 12px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; gap: 2px; padding: 8px 0 12px 30px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 13px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline li.is-meal::before { border-color: var(--leaf); }
.tl-time { font-weight: 800; font-size: .88rem; color: var(--brand-600); }
.timeline strong { font-size: 1rem; }
.timeline p { margin: 0; color: var(--text-2); font-size: .92rem; }
.check-list, .x-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li, .x-list li { position: relative; padding-left: 30px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--leaf-50); color: var(--leaf); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.x-list li::before { content: "✕"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: #FEE2E2; color: var(--danger); display: grid; place-items: center; font-size: .75rem; font-weight: 800; }

/* ============ RELAX ============ */
.breath { text-align: center; padding: 28px 18px; }
.breath-stage { position: relative; width: min(260px, 70vw); aspect-ratio: 1; margin: 0 auto 20px; display: grid; place-items: center; }
.breath-circle { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #7DD3FC, var(--brand-600) 60%, var(--brand-700)); transform: scale(.55); transition: transform 4s ease-in-out; box-shadow: 0 20px 60px -20px rgba(2,132,199,.7); }
.breath-circle.grow, .breath-circle.hold-big { transform: scale(1); }
.breath-text { position: relative; color: #fff; font-weight: 800; font-size: 1.15rem; padding: 0 22px; text-shadow: 0 1px 8px rgba(3,105,161,.6); }
.breath-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; }
.breath-controls label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.breath-controls select { min-height: 46px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.habit-grid { display: grid; gap: 12px; }
.habit h3 { font-size: 1.05rem; margin: 4px 0; }
.habit p { color: var(--text-2); font-size: .94rem; margin-bottom: 12px; }

/* ============ VIDEOS PAGE ============ */
.tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-top: 18px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: none; font-weight: 800; color: var(--text-2); cursor: pointer; }
.tab[aria-selected="true"].tab-youtube { background: #FF0000; color: #fff; }
.tab[aria-selected="true"].tab-facebook { background: #1877F2; color: #fff; }

/* ============ COMING SOON / ABOUT ============ */
.soon-hero { position: relative; overflow: hidden; padding: 56px 0 64px; text-align: center; }
.soon-hero .page-title { margin-top: 16px; }
.soon-hero .entry-content { color: var(--text-2); margin: 10px auto 24px; }
.soon-hero .email-form { margin: 0 auto 10px; }
.about-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.about-head .breadcrumbs ol { justify-content: center; }

/* ============ FOOTER ============ */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 20px; margin-top: 20px; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand p { color: var(--text-2); font-size: .95rem; margin: 12px 0; max-width: 340px; }
.social-row { display: flex; gap: 8px; flex-wrap: wrap; }
.social-row a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); color: var(--text-2); }
.social-row a:hover { color: #fff; background: var(--brand-600); border-color: var(--brand-600); }
.footer-col h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--text); font-weight: 600; font-size: .95rem; }
.footer-col a:hover { color: var(--brand-600); }
.footer-news p { color: var(--text-2); font-size: .92rem; }
.footer-bottom { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; margin-top: 22px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: var(--muted); }

/* ============ TABLET ============ */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .hero-actions { display: flex; flex-wrap: wrap; }
  .email-form { flex-direction: row; }
  .email-form .btn { flex-shrink: 0; }
  .email-form.is-stacked { flex-direction: column; }
  .header-cta { display: inline-flex; }
  .scroller { grid-auto-columns: 42%; margin: 0 -24px; padding: 4px 24px 14px; }
  .scroller.is-videos { grid-auto-columns: 46%; }
  .post-grid, .video-grid { grid-template-columns: repeat(2, 1fr); }
  .habit-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid, .soon-grid { grid-template-columns: repeat(2, 1fr); }
  .macro-grid { grid-template-columns: repeat(5, 1fr); }
  .macro.is-main { grid-column: auto; }
  .macro.is-main strong { font-size: 1.6rem; }
  .rb-cards { grid-template-columns: repeat(3, 1fr); }
  .stat.is-main { grid-column: span 2; }
  .timeline li { grid-template-columns: 140px 1fr; gap: 14px; align-items: baseline; }
  .hide-sm { display: table-cell; }
  .cta-card { grid-template-columns: 1fr auto; align-items: center; }
  .cta-card .email-form { min-width: 340px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .about-head { flex-direction: row; text-align: left; }
  .about-head .breadcrumbs ol { justify-content: flex-start; }
  .community-links { grid-template-columns: repeat(2, 1fr); }
  .community-big { grid-template-columns: repeat(2, 1fr); }
  .post-card.is-row .post-card-media { width: 38%; }
}

/* ============ DESKTOP ============ */
@media (min-width: 960px) {
  body { padding-bottom: 0; font-size: 17px; }
  .bottom-nav { display: none; }
  .desk-nav { display: block; margin: 0 auto; }
  .brand { margin-right: 0; }
  .header-actions { margin-left: auto; }
  .section { padding: 80px 0; }
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }
  .bento { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .bento-card.is-big { grid-column: span 2; grid-row: span 2; padding: 28px; justify-content: flex-end; }
  .bento-card.is-big strong { font-size: 1.7rem; }
  .bento-card:not(.is-big) { grid-column: span 2; }
  .bento-card:nth-child(n+3) { grid-column: span 1; }
  .scroller { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; }
  .scroller.is-videos { grid-template-columns: repeat(3, 1fr); }
  .scroller > :nth-child(n+9) { display: none; }
  .post-grid, .video-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .post-grid .post-card.is-featured { grid-column: 1 / -1; flex-direction: row; }
  .post-grid .post-card.is-featured .post-card-media { width: 58%; aspect-ratio: 16/10; }
  .post-grid .post-card.is-featured .post-card-body { padding: 32px; justify-content: center; }
  .post-card.is-featured .post-card-title { font-size: 1.7rem; }
  .blog-home { grid-template-columns: 1.3fr 1fr; grid-template-rows: repeat(3, auto); gap: 16px; }
  .blog-home .is-featured { grid-row: span 3; }
  .habit-grid { grid-template-columns: repeat(3, 1fr); }
  .habit-grid.is-3 { grid-template-columns: repeat(3, 1fr); }
  .community-block { grid-template-columns: 1fr 1.2fr; align-items: center; padding: 40px; }
  .community-block.is-compact { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; }
  .article-head { padding-top: 36px; }
  .newsletter { padding: 72px 0; }
  .video-close { top: -52px; right: 0; }
}

/* ============ MOTION / PRINT ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .bottom-nav, .page-head, .no-print, .rb-form, .community-block, dialog { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .rb-result { display: block !important; }
  .stat, .timeline li { break-inside: avoid; }
}

/* ===== v4: guides, height-weight, personas, food explorer ===== */
.guide-box { margin-top: 28px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.guide-box h2 { font-size: 1.2rem; margin-bottom: 10px; }
.guide-box ul { padding-left: 20px; margin: 0 0 12px; }
.guide-box .check-list { padding-left: 0; }
.doctor-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #FEF3C7; color: #78350F; font-size: .92rem; }
[data-theme="dark"] .doctor-note { background: #3B2F0B; color: #FDE68A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doctor-note { background: #3B2F0B; color: #FDE68A; } }
.hw-result { margin: 24px 0 8px; }
.hw-note { margin: 14px 0 0; font-weight: 600; }
.hw-note a { color: var(--brand-600); }
.hw-gauge { margin-top: 16px; }
.hw-bar { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: visible; }
.hw-bar i { display: block; height: 100%; }
.hw-bar i:first-child { border-radius: 999px 0 0 999px; }
.hw-bar i:nth-child(4) { border-radius: 0 999px 999px 0; }
.b-under { width: 20.5%; background: #38BDF8; }
.b-ok { width: 20.5%; background: #22C55E; }
.b-over { width: 9%; background: #F59E0B; }
.b-high { width: 50%; background: #F97316; }
.hw-pin { position: absolute; top: -6px; width: 6px; height: 26px; margin-left: -3px; border-radius: 3px; background: var(--text); border: 2px solid var(--surface); left: 50%; }
.hw-scale { position: relative; height: 18px; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.hw-scale span { position: absolute; transform: translateX(-50%); }
.hw-scale span:nth-child(1) { left: 20.5%; } .hw-scale span:nth-child(2) { left: 41%; } .hw-scale span:nth-child(3) { left: 50%; }
.hw-table tr.is-you td { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.pill-ok { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--leaf-50); color: var(--leaf); font-weight: 700; }
.persona-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.persona { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .15s var(--ease), border-color .2s; }
.persona:hover { transform: translateY(-2px); border-color: var(--brand); }
.persona .emo { font-size: 1.8rem; line-height: 1; }
.persona strong { font-size: 1rem; }
.persona small { color: var(--muted); font-size: .8rem; line-height: 1.4; }
@media (min-width: 640px) { .persona-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .persona-grid { grid-template-columns: repeat(6, 1fr); } }
.tool-links { display: grid; gap: 10px; margin-top: 28px; }
@media (min-width: 640px) { .tool-links { grid-template-columns: repeat(3, 1fr); } }
.guide-page .entry-content h2 { margin-top: 1.6em; }
.pb-0 { padding-bottom: 0; }

/* ---- Food explorer ---- */
.fx-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 14px 0; color: var(--text-2); font-size: .9rem; }
.fx-stats b { color: var(--brand-700); font-size: 1.1rem; }
.fx-stats span { display: inline-flex; align-items: center; gap: 4px; }
.db-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.db-toolbar .inline-search { flex: 1 1 220px; }
.fx-select { min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; }
.fx-filters { display: grid; gap: 8px; margin-bottom: 6px; }
.fx-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.fx-row::-webkit-scrollbar { display: none; }
.fx-chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; transition: .15s; }
.fx-chip.is-soft { background: var(--surface-2); }
.fx-chip.is-on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.fx-count { margin: 10px 0 14px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.fx-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .fx-grid { grid-template-columns: repeat(3, 1fr); } }
.fx-card { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.fx-card[hidden] { display: none; }
.fx-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(2, 132, 199, .1); }
.fx-card.in-plate { border-color: var(--leaf); box-shadow: 0 0 0 2px color-mix(in srgb, var(--leaf) 30%, transparent); }
.fx-main { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 8px; color: inherit; text-decoration: none; flex: 1; }
.fx-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fx-names strong { display: block; font-size: 1.05rem; line-height: 1.3; }
.fx-names small { color: var(--muted); font-size: .82rem; }
.fx-kcal { flex: none; text-align: right; line-height: 1.1; }
.fx-kcal b { display: block; font-size: 1.5rem; font-family: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif; color: var(--brand-700); }
.fx-kcal small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.fx-portion { color: var(--text-2); font-size: .85rem; }
.fx-est { font-style: normal; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: #FEF3C7; color: #78350F; font-size: .7rem; font-weight: 700; }
.fx-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); gap: 2px; }
.fx-bar i, .fx-macros i { display: block; }
.m-p { background: #22C55E; } .m-c { background: #F59E0B; } .m-f { background: #F43F5E; }
.fx-macros { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--text-2); }
.fx-macros span { display: inline-flex; align-items: center; gap: 5px; }
.fx-macros i { width: 8px; height: 8px; border-radius: 50%; }
.fx-macros b { color: var(--text); }
.fx-why { font-size: .84rem; color: var(--text-2); line-height: 1.5; border-top: 1px dashed var(--line); padding-top: 8px; }
.fx-add { margin: 0 16px 14px; align-self: flex-start; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--leaf); background: var(--leaf-50); color: var(--leaf); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.fx-card.in-plate .fx-add { background: var(--leaf); color: #fff; }
.plate { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 40; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.15); }
.plate[hidden] { display: none; }
@media (min-width: 960px) { .plate { bottom: 0; right: 24px; left: auto; width: 380px; } }
.plate-bar { display: flex; justify-content: space-between; width: 100%; padding: 14px 18px; border: 0; background: var(--brand-600); color: #fff; border-radius: 18px 18px 0 0; font: inherit; font-weight: 700; cursor: pointer; }
.plate-body { padding: 12px 16px 16px; max-height: 50vh; overflow: auto; }
.plate-body ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.plate-body li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: .9rem; }
.pl-q { display: inline-flex; align-items: center; gap: 6px; }
.pl-q button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 1rem; cursor: pointer; }
.pl-k { color: var(--muted); min-width: 64px; text-align: right; font-size: .8rem; }
.plate-total { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin: 8px 0; }
.plate-total div { padding: 8px 4px; border-radius: 12px; background: var(--brand-50); }
.plate-total b { display: block; font-size: 1.05rem; color: var(--brand-700); }
.plate-total small { color: var(--muted); font-size: .7rem; }
.plate-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.food-why { margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--leaf-50); color: var(--text); border: 1px solid color-mix(in srgb, var(--leaf) 25%, transparent); }
.est-note { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: #FEF3C7; color: #78350F; font-size: .9rem; }
[data-theme="dark"] .est-note, [data-theme="dark"] .fx-est { background: #3B2F0B; color: #FDE68A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .est-note, :root:not([data-theme="light"]) .fx-est { background: #3B2F0B; color: #FDE68A; } }
.related-foods { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 12px; }
@media (min-width: 640px) { .related-foods { grid-template-columns: repeat(4, 1fr); } }

/* ---- Smart Pick wizard ---- */
.pick-banner { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 26px; border-radius: 20px; background: linear-gradient(135deg, #0284C7, #0369A1); color: #fff; text-decoration: none; box-shadow: 0 10px 28px rgba(2,132,199,.25); transition: transform .15s var(--ease); }
.pick-banner:active { transform: scale(.99); }
.pick-banner strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.pick-banner small { display: block; opacity: .9; margin-top: 2px; font-size: .85rem; }
.pick-banner .pick-emo { font-size: 2.2rem; }
.pick-banner > span:nth-child(2) { flex: 1; }
.wiz { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 18px; min-height: 340px; }
.wiz-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; min-height: 32px; }
.wiz-back { border: 0; background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.wiz-progress { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wiz-progress i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .3s var(--ease); }
.wz-in { animation: wzIn .28s var(--ease); }
@keyframes wzIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wz-q { font-size: 1.35rem; margin: 6px 0 16px; line-height: 1.35; }
.wz-tiles { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.wz-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; min-height: 108px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s var(--ease), background .15s; }
.wz-tile:hover, .wz-tile:focus-visible { border-color: var(--brand); background: var(--brand-50); }
.wz-tile:active { transform: scale(.97); }
.wz-tile .emo { font-size: 2rem; line-height: 1; }
.wz-tile strong { font-size: .98rem; line-height: 1.35; }
.wz-card { padding: 16px; margin: 12px 0; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.wz-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .8rem; font-weight: 800; }
.wz-meal-head { display: flex; justify-content: space-between; align-items: center; }
.wz-swap { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 700; font-size: .82rem; cursor: pointer; }
.wz-items { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.wz-items li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .95rem; }
.wz-items b { color: var(--brand-700); margin-right: 4px; }
.wz-items a { font-weight: 700; color: var(--text); text-decoration: none; border-bottom: 1px dashed var(--line); }
.wz-items small { color: var(--muted); }
.wz-items em { font-style: normal; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.wz-tot { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; margin: 10px 0; }
.wz-tot div { padding: 8px 2px; border-radius: 12px; background: var(--brand-50); }
.wz-tot b { display: block; font-size: .98rem; color: var(--brand-700); }
.wz-tot small { color: var(--muted); font-size: .68rem; }
.wz-day-total { padding: 14px; border-radius: 18px; background: var(--leaf-50); }
.wz-foot { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.wz-add[disabled], .wz-add-day[disabled] { opacity: .8; cursor: default; }
@media (min-width: 640px) { .wz-tiles { grid-template-columns: repeat(4, 1fr); } .wiz { padding: 28px; } }
.wz-tile.is-on { border-color: var(--brand); background: var(--brand-50); }
.age-panel { margin-top: 18px; scroll-margin-top: 80px; }
.age-panel[hidden] { display: none; }
#age-tiles { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { #age-tiles { grid-template-columns: repeat(4, 1fr); } }

/* ---- Walk it off ---- */
.burn-card { padding: 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.burn-weight { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--brand-50); margin-bottom: 8px; }
.burn-weight label { font-weight: 700; }
.burn-weight input { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1.1rem; font-weight: 700; max-width: 160px; }
.burn-h { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin: 20px 0 10px; }
.burn-presets { margin-bottom: 6px; }
.burn-list { display: grid; gap: 6px; max-height: 330px; overflow: auto; margin-top: 8px; padding-right: 2px; }
.burn-item { display: grid; grid-template-columns: 1fr auto 30px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.burn-item:hover { border-color: var(--brand); }
.burn-item.is-sel { border-color: var(--leaf); background: var(--leaf-50); }
.burn-item b { display: block; font-size: .95rem; }
.burn-item small { color: var(--muted); font-size: .78rem; }
.burn-item em { font-style: normal; font-weight: 700; color: var(--brand-700); font-size: .88rem; }
.burn-item .plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-600); color: #fff; font-weight: 800; }
.burn-item.is-sel .plus { background: var(--leaf); }
.burn-sel-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.burn-sel-list li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; font-size: .92rem; }
.burn-sel-list li > i { width: 10px; height: 10px; border-radius: 50%; }
.burn-stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 6px 0 14px; }
.burn-stack i { display: block; }
.burn-hero { display: grid; gap: 4px; padding: 20px; border-radius: 20px; color: #fff; text-align: center; }
.burn-hero strong { font-size: 2rem; line-height: 1.2; font-family: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif; }
.burn-hero small, .burn-hero span { opacity: .92; }
.burn-tip { margin: 12px 0; font-weight: 600; }
.burn-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 640px) { .burn-acts { grid-template-columns: repeat(3, 1fr); } }
.burn-act { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--ac) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); }
.burn-act .emo { font-size: 1.6rem; }
.burn-act strong { font-size: 1.15rem; color: var(--ac); }
.burn-act small { color: var(--text-2); }
.burn-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--text-2); margin: 8px 0; }
.burn-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.burn-chart { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.burn-chart li { display: grid; grid-template-columns: 1fr 120px; grid-template-areas: "name time" "bar bar"; gap: 6px 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); align-items: center; }
.burn-chart li[hidden] { display: none; }
.bc-name { grid-area: name; }
.bc-name a { font-weight: 700; color: var(--text); text-decoration: none; }
.bc-name small { display: block; color: var(--muted); font-size: .78rem; }
.bc-bar { grid-area: bar; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bc-bar i { display: block; height: 100%; border-radius: 999px; }
.bc-time { grid-area: time; text-align: right; font-weight: 800; font-size: .9rem; }
.mt-lg { margin-top: 36px; }

/* ---- Nutrient explorer ---- */
.nut-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .nut-tiles { grid-template-columns: repeat(5, 1fr); } }
.nut-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--nc) 35%, transparent); background: color-mix(in srgb, var(--nc) 10%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s; }
.nut-tile:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--nc) 30%, transparent); }
.nut-tile:active { transform: scale(.97); }
.nut-tile.is-on { background: var(--nc); color: #fff; border-color: var(--nc); }
.nut-tile.is-on small { color: rgba(255,255,255,.9); }
.nut-tile strong { font-size: .95rem; line-height: 1.3; }
.nut-tile small { color: var(--muted); font-size: .75rem; }
.nut-big { font-size: 2rem; line-height: 1; }
.nut-panel { margin-top: 18px; padding: 20px; border-radius: 22px; border: 1.5px solid color-mix(in srgb, var(--nc) 40%, transparent); background: color-mix(in srgb, var(--nc) 7%, var(--surface)); scroll-margin-top: 80px; }
.nut-panel[hidden] { display: none; }
.nut-head { display: flex; gap: 14px; align-items: center; }
.nut-head .nut-big { font-size: 2.6rem; }
.nut-head h2 { margin: 0 0 2px; color: var(--nc); font-size: 1.4rem; }
.nut-head p { margin: 0; color: var(--text-2); }
.nut-tip { margin: 14px 0; padding: 10px 14px; border-radius: 12px; background: var(--surface); font-size: .92rem; }
.nut-panel h3 { margin: 12px 0 8px; font-size: 1rem; }
.nut-foods { display: flex; flex-wrap: wrap; gap: 8px; }
.nut-food { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.nut-food:hover { border-color: var(--nc); }
.nut-food strong { font-size: .92rem; }
.nut-food small { color: var(--muted); font-size: .75rem; }
.nut-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nut-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--nc) 40%, transparent); background: color-mix(in srgb, var(--nc) 12%, var(--surface)); color: var(--text); font: inherit; font-size: .78rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.nut-emo { font-size: .95rem; }
.nut-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.nut-list li { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.nut-list li[hidden] { display: none; }
.nl-name { text-decoration: none; color: var(--text); }
.nl-name small { display: block; color: var(--muted); font-size: .78rem; }
.fx-nut { display: flex; gap: 4px; font-size: 1rem; margin-top: 2px; }
.food-nut { margin: 14px 0; }
.food-nut h2 { font-size: 1.05rem; margin: 0 0 8px; }

/* ---------- Workout planner (v4.1) ---------- */
.ex-grid { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 14px 0; }
@media (min-width: 720px) { .ex-grid { grid-template-columns: 1fr 1fr; } }
.ex-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 0 14px; }
.ex-card[open] { border-color: var(--brand); }
.ex-card[hidden] { display: none; }
.ex-card summary { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; min-height: 56px; }
.ex-card summary::-webkit-details-marker { display: none; }
.ex-emo { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-50); font-size: 1.4rem; }
.ex-name { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ex-name small { color: var(--muted); font-size: .8rem; }
.ex-tags { display: flex; gap: 4px; font-style: normal; }
.ex-tags i { font-style: normal; }
.ex-card ol { margin: 0 0 8px; padding-left: 22px; display: grid; gap: 4px; font-size: .94rem; }
.ex-tip { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--leaf-50); font-size: .88rem; }
.wk-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.wk-w { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-weight: 700; }
.wk-w input { width: 90px; min-height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; }
.wk-dialog { border: 0; padding: 0; width: min(100%, 520px); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 auto; background: var(--brand-50); color: var(--text); display: none; flex-direction: column; }
.wk-dialog[open] { display: flex; }
.wk-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.wk-dialog.is-rest { background: var(--leaf-50); }
.wk-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.wk-count { margin-left: auto; font-weight: 800; color: var(--muted); }
.wk-main { flex: 1; overflow-y: auto; padding: 8px 20px; text-align: center; }
.wk-emo { font-size: 3.4rem; line-height: 1.1; }
.wk-main h2 { margin: 6px 0; font-size: 1.5rem; }
.wk-time { font-size: 5rem; font-weight: 800; line-height: 1.1; color: var(--brand-700); margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.wk-steps { text-align: left; max-width: 380px; margin: 16px auto 8px; padding-left: 22px; display: grid; gap: 6px; font-size: .95rem; }
.wk-ctrl { display: flex; gap: 10px; justify-content: center; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
@media print { .wk-dialog, #lib-types, #lib-grid, .wiz-top { display: none !important; } }

/* ---------- Food swap finder ---------- */
.sw-search { width: 100%; min-height: 48px; margin: 14px 0 6px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.sw-search:focus { outline: 0; border-color: var(--brand); }
.sw-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 720px) { .sw-grid { grid-template-columns: 1fr 1fr; } }
.sw-card { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.sw-card[hidden] { display: none; }
.sw-card header { display: flex; gap: 12px; align-items: center; }
.sw-card h3 { margin: 0; font-size: 1.05rem; }
.sw-lbl { margin: 12px 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; color: var(--brand-700); }
.sw-alts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sw-alts li { padding: 5px 12px; border-radius: 999px; background: var(--leaf-50); font-weight: 700; font-size: .88rem; }
.sw-why { margin: 10px 0 0; font-size: .9rem; color: var(--text-2); }

/* ---------- Gradient covers for posts without images ---------- */
.media-cover { display: grid; place-items: center; width: 100%; height: 100%; min-height: 120px; font-size: 3.2rem; background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.media-cover.c1 { background: linear-gradient(135deg, #dcfce7, #86efac); }
.media-cover.c2 { background: linear-gradient(135deg, #fef3c7, #fcd34d); }
.media-cover.c3 { background: linear-gradient(135deg, #fce7f3, #f9a8d4); }
.media-cover.c4 { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
.media-cover.c5 { background: linear-gradient(135deg, #ffedd5, #fdba74); }

/* ---------- Home v4.1 ---------- */
.hx { padding: 24px 0 28px; }
.hx-mesh { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hx-mesh i { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hx-mesh i:nth-child(1) { background: #7dd3fc; top: -120px; left: -80px; }
.hx-mesh i:nth-child(2) { background: #86efac; top: 40px; right: -120px; }
.hx-mesh i:nth-child(3) { background: #fde68a; bottom: -160px; left: 30%; }
.hx-in { position: relative; display: grid; gap: 14px; max-width: 760px; }
.hx-title { font-size: clamp(2rem, 8.4vw, 3.6rem); line-height: 1.15; margin: 8px 0 0; font-weight: 800; }
.hx-sub { font-size: 1.05rem; color: var(--text-2); margin: 0; max-width: 600px; }
.hx-actions { display: grid; gap: 10px; margin: 6px 0; }
@media (min-width: 560px) { .hx-actions { display: flex; } }
.hx-tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px); max-width: 560px; }
.hx-tip-emo { font-size: 1.5rem; }
.hx-tip small { font-weight: 800; color: var(--brand-700); }
.hx-tip p { margin: 2px 0 0; font-size: .95rem; }
.app-row { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.app-row::-webkit-scrollbar { display: none; }
.app-ico { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--text); scroll-snap-align: start; }
.app-ico span { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 6px 16px rgba(2, 40, 80, .12); transition: transform .15s var(--ease); }
.app-ico:active span { transform: scale(.93); }
.app-ico b { font-size: .78rem; line-height: 1.25; text-align: center; font-weight: 700; }
.a1 span { background: linear-gradient(135deg, #fde68a, #f59e0b); } .a2 span { background: linear-gradient(135deg, #bbf7d0, #22c55e); }
.a3 span { background: linear-gradient(135deg, #fecaca, #ef4444); } .a4 span { background: linear-gradient(135deg, #bae6fd, #0ea5e9); }
.a5 span { background: linear-gradient(135deg, #d9f99d, #84cc16); } .a6 span { background: linear-gradient(135deg, #ddd6fe, #8b5cf6); }
.a7 span { background: linear-gradient(135deg, #fbcfe8, #ec4899); } .a8 span { background: linear-gradient(135deg, #fed7aa, #f97316); }
.a9 span { background: linear-gradient(135deg, #a7f3d0, #14b8a6); }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; padding: 14px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stat-strip b { display: block; font-size: 1.25rem; color: var(--brand-700); }
.stat-strip small { color: var(--muted); font-size: .7rem; line-height: 1.2; display: block; }
.tool-bento { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tb { display: flex; flex-direction: column; gap: 6px; padding: 18px; min-height: 160px; border-radius: 22px; color: #fff; text-decoration: none; transition: transform .15s var(--ease); }
.tb:hover { transform: translateY(-3px); color: #fff; }
.tb-emo { font-size: 2.2rem; line-height: 1; }
.tb strong { font-size: 1.02rem; line-height: 1.3; color: #fff; }
.tb small { font-size: .82rem; opacity: .92; line-height: 1.35; }
.tb-1 { background: linear-gradient(135deg, #16a34a, #15803d); } .tb-2 { background: linear-gradient(135deg, #ef4444, #c2410c); }
.tb-3 { background: linear-gradient(135deg, #0ea5e9, #0369a1); } .tb-4 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
@media (min-width: 900px) { .tool-bento { grid-template-columns: repeat(4, 1fr); } .hx-in { max-width: 820px; } }
.nut-strip { display: flex; gap: 10px; overflow-x: auto; padding: 16px 2px 4px; scrollbar-width: none; }
.nut-strip::-webkit-scrollbar { display: none; }
.nut-strip a { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 40%, transparent); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 700; }
.desk-menu a { white-space: nowrap; padding: 8px 9px; font-size: .9rem; }
.hx-in > .pill { justify-self: start; }
.hx-in { max-width: none; }
.hx-in > * { max-width: 780px; }

/* ---------- Vegetarian guide ---------- */
.vg-box { padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.vg-diet { grid-template-columns: 1fr 1fr 1fr; }
.vg-diet .wz-tile { min-height: 96px; padding: 12px; } .vg-diet .wz-tile strong { font-size: .85rem; }
.vg-target { margin: 14px 0; padding: 14px; border-radius: 16px; background: var(--leaf-50); }
.vg-target small { display: block; color: var(--text-2); font-weight: 700; } .vg-target b { font-size: 2.2rem; color: var(--brand-700); }
.vg-meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 8px 0; } .vg-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .25s; }
.vg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vg-list li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; }
.vg-name { flex: 1; display: flex; flex-direction: column; min-width: 0; } .vg-name small { color: var(--muted); font-size: .78rem; }
.vg-step { display: flex; align-items: center; gap: 8px; } .vg-step b { min-width: 18px; text-align: center; }
.vg-step button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.vg-nut { display: grid; gap: 10px; } .vg-n { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); } .vg-n p { margin: 4px 0 0; font-size: .9rem; color: var(--text-2); }
.vg-rec { display: grid; gap: 8px; margin: 12px 0; grid-template-columns: 1fr; } @media (min-width: 720px) { .vg-rec { grid-template-columns: 1fr 1fr; } }
.vg-r { position: relative; padding: 12px 40px 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.vg-r[hidden] { display: none; } .vg-r small { color: var(--muted); } .vg-b { position: absolute; right: 12px; top: 12px; font-size: 1.2rem; }
.a10 span { background: linear-gradient(135deg, #bbf7d0, #16a34a); }

/* ---------- Human body explorer ---------- */
.bd { --bd-skin1: #fde7d6; --bd-skin2: #f7cdb0; }
:root[data-theme="dark"] .bd, .dark .bd { --bd-skin1: #3b3040; --bd-skin2: #2a2230; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bd { --bd-skin1: #3b3040; --bd-skin2: #2a2230; } }
.bd-stage { display: flex; flex-direction: column; align-items: center; padding: 10px 0; border-radius: 24px; background: linear-gradient(180deg, var(--brand-50), var(--surface)); border: 1px solid var(--line); }
.bd-svg { width: min(100%, 300px); height: auto; overflow: visible; }
.bd-body * { fill: url(#bdskin); stroke: color-mix(in srgb, var(--text) 25%, transparent); stroke-width: 1.2; }
.bd-fat ellipse { fill: #fbbf24; fill-opacity: .35; stroke: #f59e0b; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; transform: scale(var(--fs, 1)); transition: transform .8s var(--ease); cursor: pointer; }
.bd-fat .in { fill-opacity: .25; }
.bd-muscle path { fill: #f87171; fill-opacity: .22; stroke: #ef4444; stroke-width: 1; cursor: pointer; }
.bd-o { cursor: pointer; }
.bd-o ellipse, .bd-o path, .bd-o rect { stroke: rgba(0,0,0,.35); stroke-width: 1; transition: filter .3s, fill-opacity .3s; }
.bd-o .ln { fill: none; stroke: rgba(0,0,0,.3); }
.o-brain ellipse { fill: #f9a8d4; } .o-lungs ellipse { fill: #93c5fd; } .o-heart path { fill: #ef4444; } .o-liver path { fill: #b45309; }
.o-stomach path { fill: #fb923c; } .o-pancreas ellipse { fill: #fde047; } .o-kidney ellipse { fill: #a16207; } .o-gut rect { fill: #fdba74; }
.bd-svg [data-o]:focus-visible { outline: 0; filter: drop-shadow(0 0 4px var(--brand)); }
.bd-svg .is-hi { filter: drop-shadow(0 0 7px #0ea5e9) drop-shadow(0 0 3px #fff); }
.bd-fat.is-hi ellipse { stroke: #0ea5e9; stroke-width: 2.2; } .bd-muscle.is-hi path { stroke: #0ea5e9; stroke-width: 2.2; }
.beat { transform-box: fill-box; transform-origin: center; animation: bdBeat 1.1s infinite; }
.lung { transform-box: fill-box; transform-origin: center; animation: bdBreath 4s ease-in-out infinite; }
@keyframes bdBeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.16); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
@keyframes bdBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.bd-svg[data-sc="walk"] .beat { animation-duration: .6s; } .bd-svg[data-sc="walk"] .lung { animation-duration: 2s; }
.bd-svg[data-sc="stress"] .beat { animation-duration: .7s; }
.bd-flow .dot { fill: #38bdf8; opacity: 0; transform: translate(var(--fx, 120px), var(--fy, 160px)); }
.bd-svg.is-live .bd-flow .dot { animation: bdDot 2s infinite; }
.bd-flow .d2 { animation-delay: .6s !important; } .bd-flow .d3 { animation-delay: 1.2s !important; }
@keyframes bdDot { 0% { opacity: 0; transform: translate(var(--fx), calc(var(--fy) - 14px)); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--fx), calc(var(--fy) + 14px)); } }
.bd-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: .78rem; color: var(--muted); padding: 4px 8px; }
.bd-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; } .lg-heart { background: #ef4444; } .lg-fat { background: #fbbf24; } .lg-gl { background: #38bdf8; }
.bd-chips { margin: 14px 0 6px; flex-wrap: wrap; }
.bd-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.bd-tabs button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.bd-tabs button.is-on { background: var(--brand-600); color: #fff; }
.bd-pane[hidden] { display: none; }
.bd-card { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.bd-h { display: flex; gap: 12px; align-items: center; } .bd-h h2 { margin: 0; font-size: 1.2rem; }
.bd-card h3 { margin: 14px 0 4px; font-size: .92rem; color: var(--brand-700); } .bd-card p { margin: 0; }
.bd-scen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.bd-sc { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.bd-sc span { font-size: 1.6rem; } .bd-sc b { font-size: .86rem; line-height: 1.3; } .bd-sc.is-on { border-color: var(--brand); background: var(--brand-50); }
.bd-meters { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface-2); margin: 10px 0; }
.bd-m { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; }
.bd-m div { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; } .bd-m i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .8s var(--ease); }
.m0 { background: #38bdf8; } .m1 { background: #a78bfa; } .m2 { background: #22c55e; } .m3 { background: #f59e0b; } .m4 { background: #ef4444; }
.bd-cell { display: flex; align-items: center; gap: 10px; } .bd-cell svg { width: 56px; height: 56px; } #bd-cell { fill: #fde68a; stroke: #f59e0b; stroke-width: 2; transition: r .8s var(--ease); } .bd-cell .nuc { fill: #f59e0b; }
.bd-steps { margin: 10px 0; padding-left: 22px; display: grid; gap: 8px; }
.bd-steps li { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); opacity: .55; cursor: pointer; transition: .3s; }
.bd-steps li.is-done { opacity: .85; } .bd-steps li.is-now { opacity: 1; border-color: var(--brand); background: var(--brand-50); transform: translateX(3px); }
.bd-note { padding: 12px; border-radius: 14px; background: var(--leaf-50); font-size: .9rem; margin: 10px 0; }
.bd-acc { display: grid; gap: 10px; } .bd-acc p { margin: 0 0 12px; }
@media (prefers-reduced-motion: reduce) { .beat, .lung, .bd-svg.is-live .bd-flow .dot { animation: none; } }
.a11 span { background: linear-gradient(135deg, #fecdd3, #f43f5e); }

/* ---------- Compare, tracker, quiz ---------- */
.cmp, .trk { padding: 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.cmp-pick { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 10px; } .cmp-pick label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .85rem; }
.cmp-pick select { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; padding: 0 8px; width: 100%; }
.cmp-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; text-align: center; } .cmp-head small { display: block; color: var(--muted); }
.cmp-row { padding: 8px 0; border-top: 1px solid var(--line); } .cmp-l { font-weight: 800; font-size: .85rem; margin-bottom: 4px; }
.cmp-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-b { position: relative; height: 30px; border-radius: 10px; background: var(--surface-2); overflow: hidden; } .cmp-b i { position: absolute; inset: 0 auto 0 0; background: var(--brand-100); } .cmp-b span { position: relative; z-index: 1; display: block; line-height: 30px; padding: 0 10px; font-size: .82rem; font-weight: 800; }
.cmp-b.is-win i { background: #86efac; } .cmp-b.is-win span::after { content: " ✓"; color: #15803d; }
.trk-top { display: flex; gap: 12px; } .trk-top > div { flex: 1; padding: 12px; border-radius: 16px; background: var(--leaf-50); text-align: center; } .trk-top small { display: block; color: var(--text-2); font-weight: 700; } .trk-top b { font-size: 1.8rem; color: var(--brand-700); }
.trk-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; } .trk-d { text-align: center; padding: 6px 2px; border-radius: 12px; background: var(--surface-2); } .trk-d small { display: block; font-size: .68rem; color: var(--muted); } .trk-d.is-some { background: #fef3c7; } .trk-d.is-good { background: #bbf7d0; }
.trk-water h2 { font-size: 1.1rem; margin: 10px 0 6px; } .trk-glasses { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trk-g { width: 38px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 1.2rem; opacity: .4; cursor: pointer; } .trk-g.is-on { opacity: 1; background: #e0f2fe; border-color: #38bdf8; } .trk-wc { margin-left: 6px; font-weight: 800; }
.trk-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.trk-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; } .trk-h span { font-size: 1.4rem; } .trk-h b { flex: 1; font-size: .92rem; } .trk-h i { font-style: normal; font-weight: 800; color: #15803d; } .trk-h.is-on { background: var(--leaf-50); border-color: #22c55e; }
.qz-list { display: grid; gap: 10px; margin: 12px 0; } .qz-it { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; } .qz-it:hover { border-color: var(--brand); } .qz-it small { display: block; color: var(--muted); } .qz-n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.a12 span { background: linear-gradient(135deg, #e9d5ff, #a855f7); } .a13 span { background: linear-gradient(135deg, #bae6fd, #3b82f6); } .a14 span { background: linear-gradient(135deg, #fef08a, #eab308); }

/* ---------- Home remedies ---------- */
.rm-warn { margin-top: 0; } .rm-emerg { padding: 12px 14px; border-radius: 14px; background: #fee2e2; color: #7f1d1d; font-size: .92rem; margin: 10px 0; }
:root[data-theme="dark"] .rm-emerg { background: #3b1414; color: #fecaca; } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rm-emerg { background: #3b1414; color: #fecaca; } }
.rm-list { display: grid; gap: 10px; margin: 12px 0; } .rm-card[hidden] { display: none; }
.rm-h { font-size: .92rem; color: var(--brand-700); margin: 10px 0 6px; }
.rm-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .rm-ul li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; } .rm-lv { flex: none; width: 24px; text-align: center; }
.rm-see { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid #ef4444; } .rm-see ul { margin: 6px 0 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 4px; }
.a15 span { background: linear-gradient(135deg, #d9f99d, #65a30d); }

/* 30-day challenge */
.ch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ch-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.ch-stats small { display: block; color: var(--muted); font-size: .8rem; } .ch-stats b { font-size: 1.4rem; }
.ch-card { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, #ecfdf5, #eff6ff); border: 1px solid var(--line); border-radius: 20px; padding: 18px; color: #0f172a; }
.ch-card.is-done { background: linear-gradient(135deg, #dcfce7, #f0fdf4); }
.ch-card h2 { margin: 2px 0 6px; font-size: 1.25rem; } .ch-card p { margin: 0 0 12px; } .ch-card .btn { margin: 0 6px 6px 0; }
.ch-emo { font-size: 2.4rem; line-height: 1; }
.ch-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 16px 0; }
.ch-d { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; cursor: pointer; min-height: 40px; }
.ch-d.is-done { background: #16a34a; color: #fff; border-color: #16a34a; } .ch-d.is-today { outline: 2px solid #f59e0b; } .ch-d.is-view { box-shadow: 0 0 0 3px rgba(14,165,233,.35); }
.ch-d.is-locked { opacity: .4; cursor: not-allowed; }
.ch-badges { display: flex; gap: 10px; justify-content: center; margin: 8px 0 16px; }
.ch-b { text-align: center; font-size: 1.8rem; filter: grayscale(1); opacity: .35; } .ch-b.on { filter: none; opacity: 1; } .ch-b small { display: block; font-size: .75rem; color: var(--muted); }
.ch-start { text-align: center; padding: 24px 0; }
@media (max-width: 480px) { .ch-grid { grid-template-columns: repeat(5, 1fr); } }

/* subscribe card (tool pages) */
.sub-card { display: flex; gap: 14px; align-items: flex-start; margin: 28px 0 10px; padding: 18px; border-radius: 20px; background: linear-gradient(135deg, #ecfeff, #f0fdf4); border: 1px solid var(--line); color: #0f172a; }
.sub-emo { font-size: 2.2rem; line-height: 1; }
.sub-body { flex: 1; min-width: 0; } .sub-body h2 { margin: 0 0 4px; font-size: 1.15rem; } .sub-body p { margin: 0 0 10px; }
.sub-or { font-size: .9rem; margin: 10px 0 0 !important; } .sub-or a { margin-left: 8px; font-weight: 700; text-decoration: underline; }
@media (max-width: 480px) { .sub-card { flex-direction: column; } }

/* tip card */
.tipc canvas { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); display: block; }
.tipc-nav { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }

/* helper buttons */
.az-fab { position: fixed; right: 12px; bottom: 86px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.az-fab-b { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--text); }
.az-mic { border: 0; background: none; font-size: 1.3rem; cursor: pointer; padding: 6px; }
@media (min-width: 900px) { .az-fab { bottom: 24px; } }

/* tdee / fasting / meal plan */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stats .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; text-align: center; }
.stats .stat span, .stats .stat small { display: block; color: var(--muted); font-size: .8rem; } .stats .stat strong { font-size: 1.3rem; }
.warn-box { background: #fffbeb; border-color: #fde68a; color: #78350f; margin-bottom: 14px; }
.fs-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fs-ring { position: relative; width: 220px; margin: 12px auto; } .fs-ring svg { transform: rotate(-90deg); width: 100%; }
.fs-bg { fill: none; stroke: var(--line); stroke-width: 9; } .fs-fg { fill: none; stroke: #16a34a; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.fs-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; } .fs-center b { font-size: 2rem; }
.mp-day { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; background: var(--surface); } .mp-day summary { cursor: pointer; }
.mp-day ul, .mp-shop { padding-left: 18px; } .mp-shop { columns: 2; list-style: none; padding: 0; }
@media print { .az-fab, .site-header, .site-footer, .bottom-nav, .sub-card { display: none !important; } }

/* ===== New home (hm-*) ===== */
.hm-hero { position: relative; overflow: hidden; padding: 44px 0 36px; background: radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, #0ea5e9 14%, transparent), transparent), radial-gradient(700px 360px at 100% 20%, color-mix(in srgb, #16a34a 14%, transparent), transparent); }
.hm-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; pointer-events: none; }
.hm-blob.b1 { width: 260px; height: 260px; background: #22c55e; left: -80px; top: 40px; } .hm-blob.b2 { width: 240px; height: 240px; background: #0ea5e9; right: -70px; bottom: -40px; }
.hm-hero-in { position: relative; text-align: center; max-width: 760px; }
.hm-title { font-size: clamp(2.2rem, 7vw, 3.6rem); line-height: 1.15; margin: 14px 0 10px; letter-spacing: -.01em; }
.hm-title .grad { background: linear-gradient(90deg, #0ea5e9, #16a34a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-sub { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto 22px; }
.hm-find { position: relative; max-width: 620px; margin: 0 auto; }
.hm-find input { width: 100%; min-height: 58px; padding: 0 20px 0 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.05rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); outline: none; }
.hm-find input:focus { border-color: #0ea5e9; box-shadow: 0 10px 30px rgba(14, 165, 233, .25); }
.hm-find-ico { position: absolute; left: 20px; top: 17px; font-size: 1.2rem; }
.hm-res { position: absolute; left: 0; right: 0; top: 66px; z-index: 20; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 6px; text-align: left; }
.hm-res a { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; padding: 10px; border-radius: 12px; color: var(--text); } .hm-res a:hover { background: color-mix(in srgb, #0ea5e9 10%, var(--surface)); }
.hm-res a span { grid-row: span 2; font-size: 1.5rem; } .hm-res a small { color: var(--muted); } .hm-res p { padding: 12px; margin: 0; color: var(--muted); }
.hm-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.hm-quick a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; color: var(--text); }
.hm-quick a:hover { border-color: #16a34a; }
.hm-sec { padding: 30px 0; }
.hm-today { padding-top: 8px; }
.hm-today-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .hm-today-grid { grid-template-columns: 1fr 1fr; } }
.hm-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.hm-ch { background: linear-gradient(135deg, color-mix(in srgb, #f97316 14%, var(--surface)), var(--surface)); }
.hm-tip { background: linear-gradient(135deg, color-mix(in srgb, #0ea5e9 14%, var(--surface)), var(--surface)); }
.hm-card-emo { font-size: 2rem; line-height: 1; } .hm-card small { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .02em; }
.hm-card strong { display: block; font-size: 1.08rem; margin: 2px 0 4px; } .hm-card span:not(.hm-card-emo), .hm-card a { font-size: .92rem; color: var(--muted); }
.hm-tip a { color: #0369a1; font-weight: 600; }
.hm-goals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .hm-goals { grid-template-columns: repeat(4, 1fr); } }
.hm-goal { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; border-radius: 22px; background: color-mix(in srgb, var(--c) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line)); color: var(--text); transition: transform .15s, box-shadow .15s; min-height: 108px; }
.hm-goal:hover { transform: translateY(-3px); box-shadow: 0 12px 28px color-mix(in srgb, var(--c) 25%, transparent); }
.hm-goal span { font-size: 2rem; line-height: 1; } .hm-goal b { font-size: 1rem; }
.hm-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; } .hm-tabs::-webkit-scrollbar { display: none; }
.hm-tabs .chip { white-space: nowrap; }
.hm-tools { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .hm-tools { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1000px) { .hm-tools { grid-template-columns: repeat(3, 1fr); } }
.hm-tool { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s; }
.hm-tool:hover { border-color: var(--c); transform: translateY(-2px); } .hm-tool[hidden] { display: none; }
.hm-tool-ico { flex: none; width: 48px; height: 48px; display: grid; place-items: center; font-size: 1.5rem; border-radius: 14px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.hm-tool strong { display: block; font-size: 1rem; } .hm-tool small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.hm-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-top: 22px; color: var(--muted); font-size: .95rem; } .hm-stats b { color: var(--text); font-size: 1.1rem; }

/* desktop mega menu */
.has-mega { position: relative; } .mega summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; color: var(--text-2); white-space: nowrap; } .mega summary::-webkit-details-marker { display: none; }
.mega summary:hover, .mega[open] summary { color: var(--brand-600); background: var(--brand-50); }
.mega-panel { position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 10px); width: min(760px, 92vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); z-index: 60; }
.mega-panel a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--text); font-size: .93rem; } .mega-panel a:hover { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.mega-ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); font-size: 1.15rem; }

/* ===== Home: compact version ===== */
.hm-hero { padding: 26px 0 18px; }
.hm-title { font-size: clamp(1.9rem, 6vw, 2.8rem); margin: 0 0 16px; }
.hm-quick { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 14px -16px 0; padding: 2px 16px; }
.hm-quick::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .hm-quick { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 14px 0 0; } }
.hm-quick a { flex: none; white-space: nowrap; border-color: color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 9%, var(--surface)); }
.hm-resume { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; padding: 9px 16px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .92rem; }
.hm-resume[hidden] { display: none; }
.hm-sec { padding: 16px 0; }
.hm-today-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(270px, 84vw); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; scroll-padding-left: 16px; }
.hm-today-grid::-webkit-scrollbar { display: none; } .hm-today-grid > * { scroll-snap-align: start; }
@media (min-width: 760px) { .hm-today-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0; padding: 0; } }
.hm-card { padding: 14px 16px; border-radius: 20px; } .hm-card strong { font-size: 1rem; }
.hm-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
@media (min-width: 700px) { .hm-apps { grid-template-columns: repeat(6, 1fr); } } @media (min-width: 1000px) { .hm-apps { grid-template-columns: repeat(8, 1fr); } }
.hm-app { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--text); padding: 6px 2px; border-radius: 14px; }
.hm-app:hover { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.hm-app-ico { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem; border-radius: 18px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); }
.hm-app b { font-size: .8rem; line-height: 1.25; font-weight: 600; }
.hm-app.is-extra { display: none; } .hm-apps.is-open .hm-app.is-extra { display: flex; }
.hm-more { display: block; margin: 14px auto 0; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; }
.hm-more[aria-expanded="true"] span { display: inline-block; transform: rotate(180deg); }
.section { padding-top: 22px; padding-bottom: 22px; }
.footer-grid .footer-col:nth-child(2) ul { columns: 2; column-gap: 18px; } .footer-grid .footer-col:nth-child(2) li { break-inside: avoid; }
@media (min-width: 900px) { .footer-grid .footer-col:nth-child(2) ul { columns: 2; } }

/* built-in logo */
.brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, #0ea5e9, #16a34a); box-shadow: 0 6px 14px rgba(14, 165, 233, .35); }
.brand-text { font-size: 1.25rem; line-height: 1; } .brand-text small { font-size: .62em; font-weight: 700; color: var(--muted); margin-left: 1px; }
.brand-text b { background: linear-gradient(90deg, #0ea5e9, #16a34a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-light .brand-text b { background: none; color: #7dd3fc; -webkit-text-fill-color: #7dd3fc; } .brand-light small { color: rgba(255,255,255,.7); }

/* food card placeholder: category emoji on a soft colour */
.media-empty .fe-emo { font-size: 3rem; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,.12)); }
.media-empty.fe-0 { background: linear-gradient(135deg, #dcfce7, #bbf7d0); } .media-empty.fe-1 { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.media-empty.fe-2 { background: linear-gradient(135deg, #fef3c7, #fde68a); } .media-empty.fe-3 { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.media-empty.fe-4 { background: linear-gradient(135deg, #ede9fe, #ddd6fe); } .media-empty.fe-5 { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.food-card-media { aspect-ratio: 16/10; }
@media (min-width: 900px) { .hm-app-ico { width: 68px; height: 68px; font-size: 2rem; border-radius: 20px; } .hm-app b { font-size: .9rem; } .hm-sec { padding: 24px 0; } }

/* inner pages: softer header, next tools, reveal */
.page-head { background: radial-gradient(700px 220px at 20% 0%, color-mix(in srgb, #0ea5e9 9%, transparent), transparent), radial-gradient(600px 200px at 90% 10%, color-mix(in srgb, #16a34a 9%, transparent), transparent); }
.next-tools { margin: 28px 0 8px; } .next-tools h2 { font-size: 1.15rem; margin: 0 0 10px; }
.next-grid { display: grid; gap: 10px; } @media (min-width: 700px) { .next-grid { grid-template-columns: repeat(3, 1fr); } }
.next-grid a { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .15s, border-color .15s; }
.next-grid a:hover { transform: translateY(-2px); border-color: var(--c); } .next-grid small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; } .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }
@media (max-width: 899px) { .footer-grid .footer-col:nth-child(2) { display: none; } }

/* forms used by calculator pages */
.tool-form { display: grid; gap: 14px; padding: 18px; }
.tool-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-form label { display: block; font-weight: 600; font-size: .92rem; color: var(--text); }
.tool-form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.tool-form label.check input { width: auto; margin-top: 5px; }
.tool-form input:not([type=checkbox]), .tool-form select { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-weight: 500; }
.tool-form input:focus, .tool-form select:focus, .fs input:focus { outline: 2px solid #0ea5e9; outline-offset: 1px; }
.tool-form .btn { justify-self: start; }
.form-error { color: #b91c1c; margin: 0; font-weight: 600; }
.fs label { display: block; font-weight: 600; font-size: .92rem; } .fs input[type=datetime-local] { display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; }
.fs .chip input { margin-left: 6px; min-height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-align: center; }
.fs-presets .chip { display: inline-flex; align-items: center; cursor: pointer; }
.tips { padding-left: 18px; color: var(--muted); }
.fs-presets .chip { padding: 9px 16px; font-size: .95rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-family: inherit; }
.fs-presets .chip.is-on { background: linear-gradient(135deg, #0ea5e9, #16a34a); color: #fff; border-color: transparent; }
.fs-presets label.chip { font-weight: 600; }
