/* thucdon.blog — giao diện kiểu app, ưu tiên điện thoại */
:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --white: #fffefa;
  --ink: #25352a;
  --muted: #6f786f;
  --soft-ink: #4d5a4f;
  --green: #2f6848;
  --green-dark: #244e37;
  --green-soft: #e8efe7;
  --orange: #e48a5c;
  --amber: #b9741f;
  --amber-soft: #fbf0dc;
  --red: #b4483c;
  --red-soft: #fae8e4;
  --line: #e6e6dc;
  /* Bộ nhận diện: 1 họ chữ, 1 thang cỡ chữ, 1 bộ icon (xem /nhan-dien.html) */
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading: var(--font);
  --t-2xs: 11px;   /* nhãn menu dưới, chữ kicker */
  --t-xs: 12px;    /* nhãn nhỏ, tag */
  --t-sm: 13px;    /* chú thích, thông tin phụ */
  --t-md: 14px;    /* nút, chữ phụ */
  --t-base: 15px;  /* chữ thường */
  --t-lg: 16px;    /* ô nhập trên điện thoại, chữ đọc dài */
  --t-xl: 18px;    /* tiêu đề thẻ */
  --t-2xl: 20px;   /* tiêu đề mục */
  --t-3xl: 24px;   /* tiêu đề lớn */
  --t-4xl: 28px;
  --t-5xl: 32px;   /* tiêu đề trang */
  --icon: 20px;
  --radius: 16px;
  --nav-h: 64px;
  --bar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: var(--t-base)/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--heading); letter-spacing: -.01em; line-height: 1.25; }
:focus-visible { outline: 3px solid #84a18b; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Icon (icons/ui.svg) ---------- */
.i { width: var(--icon); height: var(--icon); flex: none; display: inline-block; vertical-align: middle; }
.recipe-meta .i, .dialog-meta .i, .related-copy .i, .post-recipe .i, .card-title .i, .list-heading h2 .i { width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.primary-button .i, .secondary-button .i, .meal-add .i, .see-all .i { width: 18px; height: 18px; }
.icon-button .i, .app-bar-button .i, .remove-button .i, .dialog-close .i { width: 22px; height: 22px; }
.stepper button, .meal-chip-remove { display: grid; place-items: center; }
.stepper .i { width: 20px; height: 20px; stroke-width: 2.2; }
.meal-chip-remove .i { width: 16px; height: 16px; }
.fit-icon .i, .picker-plus .i { width: 16px; height: 16px; }
.favorite-button .i { width: 21px; height: 21px; }
.quick-link > span .i { width: 24px; height: 24px; color: var(--green); }
.breadcrumb .i, .related-arrow .i { width: 16px; height: 16px; }
.video-play .i { width: 26px; height: 26px; }
.video-count .i { width: 12px; height: 12px; vertical-align: -1px; }
.search-box > .i { width: 20px; height: 20px; color: #808981; }

/* ---------- Nút ---------- */
.primary-button, .secondary-button {
  min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 12px; font-size: var(--t-base); font-weight: 700; cursor: pointer; transition: background .2s, transform .1s;
}
.primary-button { border: 0; background: var(--green); color: #fff; }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { border: 1px solid #d5e1d5; background: var(--green-soft); color: var(--green); }
.secondary-button:hover { background: #dce9dc; }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.full-width { width: 100%; }
.text-button { min-height: 40px; padding: 6px 2px; border: 0; background: none; color: var(--green); font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button.danger { color: var(--red); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: var(--t-3xl); line-height: 1; cursor: pointer; }
.remove-button { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #9a9f96; font-size: var(--t-3xl); line-height: 1; cursor: pointer; }
.remove-button:hover { background: var(--red-soft); color: var(--red); }

/* ---------- Thanh trên ---------- */
.topbar {
  position: sticky; z-index: 20; top: 0; height: calc(64px + var(--safe-t)); padding: var(--safe-t) max(20px, calc((100% - 1200px) / 2)) 0;
  display: flex; align-items: center; gap: 16px; background: #f8f7f2e6; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent;
}
.brand { display: inline-flex; gap: 10px; align-items: center; font: 800 var(--t-xl) var(--heading); letter-spacing: -.01em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--green); color: #fff; font: 800 var(--t-2xl) var(--heading); letter-spacing: -.06em; padding-right: 2px; }
.topbar-title { display: none; font: 800 var(--t-2xl) var(--heading); letter-spacing: -.01em; }
.desktop-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link { padding: 8px 14px; border-radius: 999px; color: #6f776f; font-size: var(--t-base); font-weight: 600; transition: background .2s, color .2s; }
.nav-link:hover { color: var(--green); }
.nav-link.active { background: var(--green-soft); color: var(--green); }

/* ---------- Menu dưới (điện thoại) ---------- */
.mobile-nav { display: none; }
.mobile-nav-item { flex: 1; min-width: 0; white-space: nowrap; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8a918a; font-size: var(--t-2xs); font-weight: 600; }
.mobile-nav-item svg { width: 24px; height: 24px; padding: 0; border-radius: 999px; transition: background .2s; box-sizing: content-box; }
.mobile-nav-item.active { color: var(--green); }
.mobile-nav-item, .nav-link { position: relative; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #fffefa; border-radius: 99px; background: var(--red); color: #fff; font-size: var(--t-2xs); font-weight: 800; line-height: 1; box-sizing: content-box; }
.nav-link .nav-badge { top: -2px; left: auto; right: -4px; }
.mobile-nav-item.active svg { padding: 3px 12px; margin: -3px 0; background: var(--green-soft); }

/* ---------- Khung trang ---------- */
.page-main, .detail-main { max-width: 1200px; margin: 0 auto; padding: 8px 20px 40px; }
.page-head { margin: 18px 0 20px; }
.page-title { margin: 6px 0 6px; font-size: var(--t-5xl); font-weight: 800; letter-spacing: -.02em; }
.page-lead { max-width: 620px; margin: 0; color: var(--muted); font-size: var(--t-base); }
.page-lead a, .muted-note a, .list-empty a, .fit-empty a { color: var(--green); font-weight: 700; text-decoration: underline; }
.section-kicker, .eyebrow { color: var(--green); font-size: var(--t-2xs); line-height: 1.4; font-weight: 800; letter-spacing: 1.4px; }
.panel-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.panel-card + .panel-card, .panel-card + .saved-section, .saved-section + .panel-card { margin-top: 16px; }
.card-title { margin: 0; font-size: var(--t-2xl); }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.list-heading > span { color: var(--muted); font-size: var(--t-sm); }
.list-empty { margin: 0; padding: 14px; border-radius: 12px; background: #f3f3ec; color: var(--muted); font-size: var(--t-md); line-height: 1.6; list-style: none; }
.muted-note { margin: 0 0 12px; color: var(--muted); font-size: var(--t-md); }
.footer { max-width: 1200px; margin: 0 auto; padding: 22px 20px 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; border-top: 1px solid var(--line); color: #8a9189; font-size: var(--t-sm); }
.footer-brand { color: var(--ink); font-size: var(--t-base); }
.footer-brand .brand-mark { width: 28px; height: 28px; border-radius: 9px; font-size: var(--t-lg); }
.footer-link { text-decoration: underline; text-underline-offset: 2px; }
.footer-small { margin-left: auto; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: var(--t-md); text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Khám phá ---------- */
.hero { position: relative; min-height: 300px; margin-top: 8px; padding: 50px 60px; display: flex; align-items: center; overflow: hidden; border-radius: 24px; background: #e9eee5; }
.hero-copy { position: relative; z-index: 1; width: 55%; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.hero h1 { margin-bottom: 12px; font-size: clamp(40px, 5vw, 58px); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy p { max-width: 380px; margin: 0; color: #5d6a60; font-size: var(--t-lg); line-height: 1.65; }
.hero-art { position: absolute; right: 6%; top: -34px; width: 390px; height: 390px; }
.art-sun { position: absolute; width: 205px; height: 205px; top: 50px; left: 91px; border-radius: 50%; background: #f5d6a5; }
.art-plate { position: absolute; width: 220px; height: 220px; top: 90px; left: 85px; display: grid; place-items: center; border-radius: 50%; background: #fffdf6; box-shadow: 0 15px 40px #5b65451c, inset 0 0 0 12px #f7eee1; transform: rotate(-9deg); }
.art-plate span { font-size: 105px; }
.art-note { position: absolute; top: 235px; right: 1px; padding: 12px 16px; border-radius: 13px; background: var(--green); color: #fff; font: 700 var(--t-sm)/1.5 var(--heading); transform: rotate(6deg); }
.art-leaf { position: absolute; color: var(--green); font-size: var(--t-4xl); }
.leaf-one { top: 77px; right: 38px; }
.leaf-two { top: 305px; left: 41px; color: #de9263; }

.quick-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.quick-link { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .2s; }
.quick-link:hover { border-color: #b9cdb9; }
.quick-link > span { grid-row: span 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); font-size: var(--t-3xl); }
.quick-link strong { font: 800 var(--t-base) var(--heading); }
.quick-link small { color: var(--muted); font-size: var(--t-sm); }

.ingredient-panel { margin-top: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
.ingredient-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 6px; }
.ingredient-heading h2 { margin: 0; font-size: var(--t-3xl); }
.step-note, .selection-hint { color: var(--muted); font-size: var(--t-md); }
.ingredient-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.ingredient-chip { min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid #e3e4dc; border-radius: 999px; background: #fff; color: #4f5c51; font-size: var(--t-base); cursor: pointer; transition: all .15s; }
.ingredient-chip:hover { border-color: #9db7a1; }
.ingredient-chip.selected { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.ingredient-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.selection-hint { margin-right: auto; }

.community-teaser { margin-top: 16px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 20px; background: linear-gradient(120deg, #fbefe3, #f6e5d6); }
.community-teaser h2 { margin: 6px 0 4px; font-size: var(--t-2xl); }
.community-teaser p { margin: 0; color: #6c5f52; font-size: var(--t-md); }
.community-teaser .section-kicker { color: #b0612f; }
.community-art { font-size: 44px; }

.recipes-section { padding-top: 40px; }
.section-topline { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.section-topline h2 { margin: 6px 0 0; font-size: var(--t-4xl); }
.recipe-controls { display: flex; gap: 10px; }
.search-box { min-width: 0; width: 240px; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: #808981; }
.search-box:focus-within { border-color: #84a18b; box-shadow: 0 0 0 3px var(--green-soft); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: var(--t-lg); }
.sort-select select { height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--soft-ink); font-size: var(--t-base); }
.filter-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.category-tabs { min-width: 0; flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab { flex: 0 0 auto; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 999px; background: #eeeee7; color: #6b7369; font-size: var(--t-md); font-weight: 600; cursor: pointer; }
.category-tab.selected { background: var(--green); color: #fff; }
.switch { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-md); font-weight: 700; color: var(--soft-ink); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #d9dcd3; transition: background .2s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .2s; }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid #84a18b; outline-offset: 2px; }

.recipe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.recipe-card { position: relative; min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid #ebebe3; border-radius: var(--radius); background: var(--white); transition: transform .2s, box-shadow .2s; }
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px #263e2714; }
.recipe-visual { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; background: var(--card-bg, #f3eadc); cursor: pointer; }
.recipe-visual::before, .recipe-visual::after { position: absolute; content: ""; border: 1px solid #fff9; border-radius: 50%; }
.recipe-visual::before { width: 165px; height: 165px; }
.recipe-visual::after { width: 132px; height: 132px; }
.recipe-emoji { z-index: 1; font-size: 68px; filter: drop-shadow(0 9px 5px #39260d1b); transition: transform .25s; }
.recipe-card:hover .recipe-emoji { transform: scale(1.06) rotate(-4deg); }
.recipe-badge { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: #fffefaeb; color: #576157; font-size: var(--t-xs); font-weight: 700; }
.favorite-button { position: absolute; z-index: 2; top: 8px; right: 8px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fffefaeb; color: #727b72; font-size: var(--t-2xl); cursor: pointer; }
.favorite-button.saved { color: #cf5d4a; }
.recipe-info { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; }
.recipe-info h3 { margin: 0 0 6px; font-size: var(--t-lg); }
.recipe-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-title:hover { color: var(--green); }
.recipe-description { margin: 0 0 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
.recipe-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid #f0f0ea; color: var(--muted); font-size: var(--t-sm); }
.recipe-meta span:first-child { color: #ad7449; }
.recipe-meta strong { color: var(--soft-ink); font-weight: 600; }
.fit-badge { align-self: flex-start; margin-bottom: 10px; padding: 3px 9px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; }
.fit-badge.ok { background: var(--green-soft); color: var(--green); }
.fit-badge.adjust { background: var(--amber-soft); color: var(--amber); }
.fit-badge.avoid { background: var(--red-soft); color: var(--red); }
.empty-state { padding: 50px 20px; text-align: center; }
.empty-state > span { font-size: 36px; }
.empty-state h3 { margin: 8px 0 5px; font-size: var(--t-xl); }
.empty-state p { margin-bottom: 10px; color: var(--muted); }
.see-all { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; padding: 14px; border: 1px dashed #c9d6c9; border-radius: var(--radius); color: var(--green); font-weight: 700; }

/* ---------- Thực đơn tuần ---------- */
.week-toolbar { position: sticky; z-index: 10; top: calc(64px + var(--safe-t)); margin: 0 -20px 16px; padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #f8f7f2f2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.week-nav { display: flex; align-items: center; gap: 10px; }
.week-nav strong { min-width: 110px; text-align: center; font: 800 var(--t-xl) var(--heading); }
.week-actions { display: flex; align-items: center; gap: 12px; }
.week-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.week-days { display: grid; gap: 12px; }
.day-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.day-card.is-today { border-color: #9fbea6; box-shadow: 0 0 0 3px var(--green-soft); }
.day-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.day-head strong { font: 800 var(--t-xl) var(--heading); }
.day-head span { color: var(--muted); font-size: var(--t-md); }
.is-today .day-head span { color: var(--green); font-weight: 700; }
.meal-row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid #f0f0ea; }
.meal-label { padding-top: 9px; color: var(--muted); font-size: var(--t-sm); font-weight: 700; }
.meal-items { display: flex; flex-wrap: wrap; gap: 8px; }
.meal-chip { min-width: 0; max-width: 100%; display: flex; align-items: center; border: 1px solid #e2e6dc; border-radius: 12px; background: #fbfbf6; }
.meal-chip.adjust { border-color: #efd7ad; background: #fffaf0; }
.meal-chip.avoid { border-color: #efc2ba; background: #fff6f4; }
.meal-chip-open { min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 10px; border: 0; background: none; cursor: pointer; text-align: left; }
.meal-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-md); font-weight: 700; }
.meal-chip-servings { flex: 0 0 auto; color: var(--muted); font-size: var(--t-xs); }
.meal-chip-remove { width: 34px; height: 40px; flex: 0 0 auto; border: 0; background: none; color: #9a9f96; font-size: var(--t-2xl); cursor: pointer; }
.meal-add { min-height: 40px; padding: 0 12px; border: 1px dashed #c6d3c6; border-radius: 12px; background: none; color: var(--green); font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.shopping-card { position: sticky; top: calc(140px + var(--safe-t)); padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.shopping-card h2 { margin: 0; font-size: var(--t-xl); }
.shopping-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 2px; }
.shopping-list li { padding: 8px 0; border-bottom: 1px solid #f0f0ea; }
.shopping-list label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.shopping-list input { width: 20px; height: 20px; accent-color: var(--green); }
.shop-name { flex: 1; font-weight: 600; }
.shopping-list .done .shop-name, .shopping-list .done strong { color: #a2a89f; text-decoration: line-through; }
.shop-fridge { display: block; margin: 2px 0 0 30px; color: var(--green); font-size: var(--t-sm); }
.shopping-card .secondary-button { width: 100%; }

/* ---------- Tủ lạnh ---------- */
.fridge-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: start; }
.fridge-layout .panel-card + .panel-card { margin-top: 0; }
.fridge-form, .member-form { display: grid; gap: 14px; }
.fridge-form .card-title { margin-bottom: 4px; }
.fridge-form label, .member-form label { min-width: 0; display: grid; gap: 6px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.member-form small { color: var(--muted); font-weight: 400; }
.fridge-form input, .fridge-form select, .member-form input, .member-form select {
  width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: #fff; font-size: var(--t-lg);
}
.fridge-form input:focus, .fridge-form select:focus, .member-form input:focus, .member-form select:focus { border-color: #84a18b; box-shadow: 0 0 0 3px var(--green-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quantity-input { display: flex; gap: 6px; }
.quantity-input input { flex: 1; }
.quantity-input select { width: 96px; }
.fridge-alert { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: #8a5717; font-size: var(--t-md); font-weight: 600; }
.fridge-list { display: grid; gap: 8px; }
.fridge-item { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eeefe9; border-radius: 12px; background: #fff; }
.fridge-item-icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: #eaf0e8; font-size: var(--t-2xl); }
.fridge-item-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.fridge-item-copy strong { overflow: hidden; font-size: var(--t-base); text-overflow: ellipsis; white-space: nowrap; }
.fridge-item-copy > span { color: var(--muted); font-size: var(--t-sm); }
.fridge-item-copy .expired { color: var(--red); font-weight: 700; }
.fridge-item-copy .expiring { color: var(--amber); font-weight: 700; }
.fridge-item-actions { display: flex; align-items: center; gap: 4px; }
.fridge-item-actions button:not(.remove-button) { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #f1f3ed; color: var(--soft-ink); font-size: var(--t-xl); cursor: pointer; }
.fridge-suggest { width: 100%; margin-top: 14px; }

/* ---------- Cá nhân ---------- */
.family-list { display: grid; gap: 10px; margin-bottom: 14px; }
.member-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid #eeefe9; border-radius: 14px; background: #fff; }
.member-avatar { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); font-size: var(--t-3xl); }
.member-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.member-copy strong { font: 800 var(--t-lg) var(--heading); }
.member-copy > span { color: var(--muted); font-size: var(--t-md); }
.member-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: var(--t-xs); font-weight: 700; }
.tag.warn { background: var(--red-soft); color: var(--red); }
.tag.muted { background: #f0f0ea; color: var(--muted); }
.tag.soft { background: var(--amber-soft); color: var(--amber); }
.family-empty p { margin: 0; }
.saved-section { margin-top: 24px; }
.saved-section .recipe-grid { margin-top: 0; }
.data-card { margin-top: 24px; }
.member-form fieldset { margin: 0; padding: 0; border: 0; }
.member-form legend { margin-bottom: 8px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; display: inline-flex !important; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-chip span { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid #e0e3da; border-radius: 999px; background: #fff; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.check-chip input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.check-chip input:checked + span::before { content: "✓ "; white-space: pre; }
.check-chip input:focus-visible + span { outline: 3px solid #84a18b; outline-offset: 2px; }
.fit-disclaimer { margin: 12px 0 0; color: #8b928a; font-size: var(--t-xs); }

/* ---------- Hộp công thức / hộp trượt ---------- */
.recipe-dialog { width: min(640px, calc(100% - 28px)); max-height: min(88vh, 800px); padding: 0; overflow-y: auto; overscroll-behavior: contain; border: 0; border-radius: 22px; background: var(--white); color: var(--ink); box-shadow: 0 25px 80px #10201540; }
.recipe-dialog::backdrop { background: #17241bb0; backdrop-filter: blur(3px); }
.recipe-dialog[open] { animation: dialog-in .22s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-handle { display: none; }
.dialog-close { position: sticky; z-index: 3; top: 12px; float: right; width: 38px; height: 38px; margin: 12px 12px -50px 0; border: 0; border-radius: 50%; background: #fffefaeb; box-shadow: 0 2px 8px #0000001a; font-size: var(--t-3xl); line-height: 1; cursor: pointer; }
.dialog-hero { height: 200px; display: grid; place-items: center; background: var(--card-bg, #f3eadc); }
.dialog-hero span { font-size: 90px; filter: drop-shadow(0 10px 8px #39260d1b); }
.dialog-body { padding: 22px 26px 26px; }
.dialog-body h2 { margin: 6px 0 6px; font-size: var(--t-3xl); }
.dialog-intro { margin: 0; color: var(--muted); font-size: var(--t-base); }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.dialog-meta span { padding: 7px 11px; border-radius: 10px; background: #f1f3ed; color: var(--soft-ink); font-size: var(--t-sm); }
.dialog-columns { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; margin-top: 16px; }
.dialog-columns h3 { margin: 0 0 10px; font-size: var(--t-xl); }
.dialog-actions { display: flex; gap: 10px; margin-top: 20px; }
.dialog-actions > * { flex: 1; }
.dialog-actions .text-button { flex: 0 0 auto; }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: #f0f2ec; }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--white); box-shadow: 0 1px 2px #0000000f; color: var(--green); font-size: var(--t-2xl); font-weight: 700; cursor: pointer; }
.stepper output { min-width: 78px; text-align: center; font-weight: 800; }
.ingredient-rows { margin: 0; padding: 0; list-style: none; }
.ingredient-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e4e6dd; }
.ingredient-rows strong { color: var(--green-dark); white-space: nowrap; }
.step-rows { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.step-rows li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; scroll-margin-top: 80px; }
.step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: var(--t-md); }
.step-rows p { margin: 3px 0 0; color: #445046; font-size: var(--t-base); line-height: 1.65; }

.fit-section { margin-top: 22px; padding: 16px; border-radius: 14px; background: #f5f6f0; }
.fit-section h3 { margin: 0 0 10px; font-size: var(--t-xl); }
.fit-empty { margin: 0; color: var(--muted); font-size: var(--t-md); }
.fit-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.fit-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px; border-radius: 12px; background: var(--white); }
.fit-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.fit-row.adjust .fit-icon { background: var(--amber-soft); color: var(--amber); }
.fit-row.avoid .fit-icon { background: var(--red-soft); color: var(--red); }
.fit-row strong { font-size: var(--t-base); }
.fit-label { margin-left: 6px; font-size: var(--t-xs); font-weight: 700; color: var(--green); }
.adjust .fit-label { color: var(--amber); }
.avoid .fit-label { color: var(--red); }
.fit-row ul { margin: 4px 0 0; padding-left: 18px; color: var(--soft-ink); font-size: var(--t-md); }
.fit-row p { margin: 2px 0 0; color: var(--muted); font-size: var(--t-md); }

.picker-dialog .dialog-body { padding-top: 26px; }
.picker-controls { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.picker-controls .search-box { flex: 1; width: auto; }
.picker-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.picker-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #eeefe9; border-radius: 14px; background: #fff; text-align: left; cursor: pointer; }
.picker-item:hover { border-color: #b9cdb9; }
.picker-item .fit-badge, .related-copy .fit-badge { justify-self: start; margin: 4px 0 0; }
.picker-plus { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: var(--t-xl); font-weight: 800; }

/* ---------- Trang chi tiết (món, đồ bếp) ---------- */
.app-bar { display: none; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 14px; color: var(--muted); font-size: var(--t-md); }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 600; }
.detail-main { max-width: 820px; }
.detail-hero { height: 300px; display: grid; place-items: center; border-radius: 24px; background: var(--card-bg, #f3eadc); }
.detail-hero span { font-size: 130px; filter: drop-shadow(0 14px 10px #39260d1f); }
.detail-sheet { position: relative; margin-top: -40px; padding: 26px 28px 30px; border-radius: 24px; background: var(--white); box-shadow: 0 -2px 20px #263e270d; }
.detail-sheet.flat { margin-top: 0; }
.detail-sheet h1 { margin: 6px 0 8px; font-size: var(--t-5xl); font-weight: 800; letter-spacing: -.02em; }
.detail-lead { margin: 0; color: var(--muted); font-size: var(--t-lg); }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.detail-stats div { padding: 12px; border-radius: 14px; background: #f3f4ee; text-align: center; }
.detail-stats dt { color: var(--muted); font-size: var(--t-xs); }
.detail-stats dd { margin: 2px 0 0; font: 800 var(--t-lg) var(--heading); }
.detail-block { margin-top: 28px; }
.detail-block:empty { display: none; }
.detail-block-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-block-heading h2 { margin: 0; font-size: var(--t-2xl); }
.serving-caption { color: var(--muted); font-size: var(--t-md); }
.related-list { display: grid; gap: 8px; }
.related-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #eeefe9; border-radius: 14px; background: #fff; transition: border-color .2s; }
.related-item:hover { border-color: #b9cdb9; }
.related-emoji { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: var(--card-bg, #f3eadc); font-size: var(--t-4xl); }
.related-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.related-copy strong { font: 700 var(--t-base) var(--heading); }
.related-copy > span { color: var(--muted); font-size: var(--t-sm); }
.related-arrow { color: #a3aaa1; font-size: var(--t-3xl); }
.action-bar { position: sticky; z-index: 15; bottom: 0; max-width: 820px; margin: 0 auto; padding: 12px 20px calc(12px + var(--safe-b)); display: flex; align-items: center; gap: 12px; background: #fffefaf2; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.action-bar > .primary-button, .action-bar > .secondary-button { flex: 1; }
.save-button.is-saved { background: #cf5d4a; }
.affiliate-note { margin: 26px 0 0; color: #8a9389; font-size: var(--t-sm); }
.page-note { margin-top: 18px; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.video-card { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #1d2620; }
.video-frame.vertical { aspect-ratio: 9 / 16; max-height: 560px; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; width: 100%; display: grid; place-items: center; border: 0; background: #2a352d center / cover no-repeat; color: #fff; cursor: pointer; }
.video-facade.link-only { cursor: default; }
.video-play { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #ffffffe6; color: var(--ink); font-size: var(--t-3xl); padding-left: 4px; box-shadow: 0 6px 20px #0004; }
.video-platform { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: #000a; color: #fff; font-size: var(--t-xs); font-weight: 700; }
.video-card figcaption { display: grid; gap: 2px; margin-top: 8px; font-size: var(--t-md); }
.video-card figcaption a { color: var(--green); font-weight: 700; font-size: var(--t-sm); }
.review-text { margin: 0; color: #445046; font-size: var(--t-lg); line-height: 1.7; white-space: pre-line; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pros, .cons { padding: 14px 16px; border-radius: 14px; background: var(--green-soft); }
.cons { background: var(--red-soft); }
.pros h3, .cons h3 { margin: 0 0 6px; font-size: var(--t-lg); }
.pros ul, .cons ul { margin: 0; padding-left: 18px; }
.tip-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tip-list li { position: relative; padding: 12px 14px 12px 40px; border-radius: 12px; background: #f5f6f0; font-size: var(--t-base); }
.tip-list li::before { content: "✓"; position: absolute; left: 14px; top: 12px; color: var(--green); font-weight: 800; }
.rating-line { margin: 10px 0 0; }
.stars { color: #e0a43a; letter-spacing: 1px; }
.buy-button { text-align: center; }

/* Danh sách đồ bếp: tìm, nhóm, bộ lọc, thẻ sản phẩm */
.gear-toolbar { position: sticky; z-index: 10; top: calc(64px + var(--safe-t)); margin: 0 -20px; padding: 10px 20px 8px; display: grid; gap: 10px; background: #f8f7f2f2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gear-toolbar-row { display: flex; gap: 10px; }
.gear-toolbar .search-box { flex: 1; width: auto; }
.filter-button { position: relative; flex: 0 0 auto; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--soft-ink); font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.filter-button .i { width: 20px; height: 20px; }
.filter-badge { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: var(--green); color: #fff; font-size: var(--t-2xs); font-weight: 800; }
.category-tab .i { width: 15px; height: 15px; vertical-align: -2px; }
.tab-count { margin-left: 2px; opacity: .7; font-size: var(--t-xs); font-weight: 600; }
.gear-result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 8px; }
.gear-result-count { margin: 0; color: var(--muted); font-size: var(--t-md); font-weight: 600; }
.gear-sort select { height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.active-filter { min-height: 34px; padding: 0 8px 0 12px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid #cfe0d0; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); font-size: var(--t-sm); font-weight: 700; cursor: pointer; }
.active-filter .i { width: 15px; height: 15px; }

.shopee-search { margin-bottom: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #f6c9b4; border-radius: 16px; background: #fff4ee; color: #8f3d1c; }
.shopee-search:hover { background: #ffece2; }
.shopee-search-mark { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: #ee4d2d; color: #fff; }
.shopee-search-mark .i { width: 22px; height: 22px; }
.shopee-search-copy { min-width: 0; flex: 1; display: grid; }
.shopee-search-copy strong { overflow: hidden; font-size: var(--t-base); white-space: nowrap; text-overflow: ellipsis; }
.shopee-search-copy > span { color: #a7684b; font-size: var(--t-sm); }
.shopee-search > .i { width: 18px; height: 18px; }
.gear-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
/* Điện thoại: luôn 2 sản phẩm mỗi hàng, thẻ gọn lại */
@media (max-width: 680px) {
  .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .gear-card { border-radius: 14px; }
  .gear-card:hover { transform: none; box-shadow: none; }
  .gear-card-visual { height: auto; aspect-ratio: 1; font-size: 52px; }
  .gear-card-visual .video-count { bottom: 6px; left: 6px; padding: 3px 7px; font-size: var(--t-2xs); }
  .gear-card-body { gap: 2px; padding: 9px 10px 10px; }
  .gear-card-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: .3px; }
  .gear-card-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--t-md); }
  .gear-card-summary { display: none; }
  .gear-card-foot { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 6px; }
  .gear-need { max-width: 100%; }
  .gear-save { top: 6px; right: 6px; width: 32px; height: 32px; }
  .gear-save .i { width: 17px; height: 17px; }
}
.gear-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--white); transition: transform .2s, box-shadow .2s; }
.gear-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px #263e2714; }
.gear-card-link { height: 100%; display: flex; flex-direction: column; }
.gear-card-visual { position: relative; height: 150px; display: grid; place-items: center; overflow: hidden; background: var(--card-bg); font-size: 64px; }
.gear-card-visual img, .detail-hero.has-image img { width: 100%; height: 100%; object-fit: cover; }
.gear-card-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.gear-card-meta { color: #8b9387; font-size: var(--t-2xs); font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.gear-card-name { font-size: var(--t-lg); font-weight: 800; line-height: 1.3; }
.gear-card-summary { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--muted); font-size: var(--t-sm); }
.gear-card .rating-line { margin: 2px 0 0; font-size: var(--t-sm); }
.gear-card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gear-price { color: var(--orange); font-size: var(--t-base); font-weight: 800; }
.gear-price.muted { color: var(--green); font-size: var(--t-sm); font-weight: 700; }
.gear-need { overflow: hidden; padding: 3px 8px; border-radius: 8px; background: #f1f3ed; color: var(--soft-ink); font-size: var(--t-2xs); font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.gear-save { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fffefae6; color: var(--soft-ink); box-shadow: 0 2px 8px #0000001a; cursor: pointer; }
.gear-save .i { width: 20px; height: 20px; }
.gear-save.is-saved, .gear-save-detail.is-saved { color: var(--red); }
.gear-save-detail { flex: 0 0 auto; }
.gear-empty { padding: 40px 20px; display: grid; justify-items: center; gap: 6px; border: 1px dashed #d8dacf; border-radius: 18px; text-align: center; }
.gear-empty-art { font-size: 44px; }
.gear-empty strong { font-size: var(--t-xl); }
.gear-empty p { margin: 0 0 8px; color: var(--muted); font-size: var(--t-md); }

.filter-sheet { width: min(520px, calc(100% - 28px)); }
.filter-sheet-body { padding: 18px 22px 0; }
.filter-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.filter-sheet-head h2 { margin: 0; font-size: var(--t-2xl); }
.filter-sheet-head .dialog-close { position: static; float: none; margin: 0; display: grid; place-items: center; }
.filter-group { margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group legend { padding: 0; margin-bottom: 10px; font-size: var(--t-base); font-weight: 800; }
.filter-switch { width: 100%; min-height: 44px; justify-content: space-between; }
.filter-sheet-actions { position: sticky; bottom: 0; margin: 0 -22px; padding: 12px 22px calc(12px + var(--safe-b)); display: grid; grid-template-columns: auto 1fr; gap: 10px; background: var(--white); border-top: 1px solid var(--line); }

.gear-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.gear-fact { padding: 6px 11px; border-radius: 10px; background: #f1f3ed; color: var(--soft-ink); font-size: var(--t-sm); font-weight: 600; }
a.gear-fact:hover { background: var(--green-soft); color: var(--green-dark); }
.gear-fact.price { background: #fdf0e8; color: #b3592c; font-weight: 800; }
.gear-fact.need { background: var(--green-soft); color: var(--green-dark); }

/* ---------- Máy tính bảng ---------- */
@media (max-width: 1000px) {
  .recipe-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .week-layout { grid-template-columns: 1fr; }
  .shopping-card { position: static; }
}

/* ---------- Điện thoại: giao diện app ---------- */
@media (max-width: 680px) {
  html { scroll-padding-top: 70px; }
  .topbar { height: calc(56px + var(--safe-t)); padding-left: 16px; padding-right: 16px; }
  .desktop-nav { display: none; }
  .brand-mark { width: 32px; height: 32px; font-size: var(--t-xl); }
  .topbar-title { display: block; }
  .topbar-title ~ .desktop-nav { display: none; }
  .tab-page .topbar:has(.topbar-title) .brand-name { display: none; }

  .mobile-nav {
    position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; height: calc(var(--nav-h) + var(--safe-b)); padding: 0 4px var(--safe-b);
    display: flex; border-top: 1px solid #e6e7df; background: #fffefaf0; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .tab-page { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
  .tab-page .toast { bottom: calc(var(--nav-h) + 14px + var(--safe-b)); }
  .footer { padding: 18px 16px 24px; font-size: var(--t-xs); }
  .footer-small { margin-left: 0; }

  .page-main, .detail-main { padding: 4px 16px 28px; }
  .page-head { margin: 8px 0 14px; }
  /* tiêu đề đã hiện trên thanh trên; vẫn giữ cho trình đọc màn hình */
  .page-head .page-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .page-lead { font-size: var(--t-md); }

  .hero { min-height: 200px; margin-top: 4px; padding: 26px 20px; border-radius: 20px; }
  .hero-copy { width: 70%; }
  .eyebrow { margin-bottom: 10px; font-size: var(--t-2xs); }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); letter-spacing: -.02em; }
  .hero-copy p { max-width: 220px; font-size: var(--t-md); line-height: 1.55; }
  .hero-art { top: 0; right: -120px; transform: scale(.62); transform-origin: center; }
  .quick-links { grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
  .quick-link { grid-template-columns: 1fr; justify-items: center; padding: 10px 2px; text-align: center; row-gap: 4px; }
  .quick-link > span { width: 40px; height: 40px; }
  .quick-link strong { line-height: 1.25; }
  .quick-link > span { grid-row: auto; }
  .quick-link strong { font-size: var(--t-sm); }
  .quick-link small { display: none; }
  .ingredient-panel { padding: 18px 16px; border-radius: 18px; }
  .ingredient-heading { display: block; }
  .ingredient-heading h2 { font-size: var(--t-2xl); }
  .ingredient-chips { gap: 8px; }
  .ingredient-actions { flex-wrap: wrap; gap: 8px; }
  .selection-hint { flex: 1 1 100%; }
  .ingredient-actions .primary-button { flex: 1; }
  .community-teaser { padding: 18px; border-radius: 18px; }
  .community-teaser h2 { font-size: var(--t-xl); }
  .community-art { font-size: var(--t-5xl); }

  .recipes-section { padding-top: 28px; }
  .section-topline { display: block; }
  .section-topline h2 { font-size: var(--t-3xl); }
  .recipe-controls { margin-top: 12px; }
  .search-box { flex: 1; width: auto; }
  .sort-select select { width: 140px; }
  .filter-row { flex-wrap: wrap; }
  .category-tabs { flex: 1 1 100%; margin-right: -16px; padding-right: 16px; }
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .recipe-visual { height: 118px; }
  .recipe-visual::before { width: 132px; height: 132px; }
  .recipe-visual::after { width: 106px; height: 106px; }
  .recipe-emoji { font-size: 54px; }
  .recipe-badge { font-size: var(--t-2xs); }
  .recipe-info { padding: 10px 11px 12px; }
  .recipe-info h3 { font-size: var(--t-base); }
  .recipe-description { font-size: var(--t-sm); }
  .recipe-meta { font-size: var(--t-xs); }
  .fit-badge { font-size: var(--t-2xs); }

  .week-toolbar { top: calc(56px + var(--safe-t)); margin: 0 -16px 12px; padding: 8px 16px; }
  .week-actions { flex: 1 1 100%; }
  .week-actions .primary-button { flex: 1; }
  .day-card { padding: 12px; }
  .meal-row { grid-template-columns: 44px 1fr; gap: 6px; }
  .meal-chip { flex: 1 1 100%; }
  .meal-chip-open { flex: 1; }
  .meal-add { flex: 1 1 100%; }

  .fridge-layout { grid-template-columns: 1fr; }
  .panel-card { padding: 16px; }

  /* Hộp trượt từ dưới lên */
  .recipe-dialog { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); }
  .recipe-dialog[open] { animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  .sheet-handle { position: sticky; z-index: 4; top: 0; display: block; height: 0; }
  .sheet-handle::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 99px; background: #0003; }
  .dialog-hero { height: 160px; }
  .dialog-hero span { font-size: 72px; }
  .dialog-body { padding: 18px 18px 22px; }
  .dialog-body h2 { font-size: var(--t-3xl); }
  .dialog-columns { grid-template-columns: 1fr; gap: 18px; }
  .picker-controls { flex-wrap: wrap; }
  .picker-controls .search-box { flex: 1 1 100%; }

  /* Trang chi tiết: ảnh tràn màn hình, thanh trên có nút quay lại */
  .detail-page .topbar { display: none; }
  .app-bar {
    position: fixed; z-index: 25; top: 0; right: 0; left: 0; height: calc(var(--bar-h) + var(--safe-t)); padding: var(--safe-t) 8px 0;
    display: flex; align-items: center; gap: 6px; transition: background .2s, box-shadow .2s;
  }
  .app-bar.is-scrolled, .app-bar.is-solid { background: #fffefaf2; box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .app-bar-button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fffefae6; box-shadow: 0 2px 10px #0000001a; font-size: var(--t-3xl); line-height: 1; cursor: pointer; }
  .app-bar.is-scrolled .app-bar-button { box-shadow: none; background: transparent; }
  .app-bar-spacer { width: 42px; flex: 0 0 auto; }
  .app-bar-title { min-width: 0; flex: 1; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font: 800 var(--t-xl) var(--heading); opacity: 0; transition: opacity .2s; }
  .app-bar.is-scrolled .app-bar-title { opacity: 1; }
  .detail-main { padding: 0 0 20px; }
  .detail-main > .breadcrumb { display: none; }
  .detail-hero { height: calc(280px + var(--safe-t)); padding-top: var(--safe-t); border-radius: 0; }
  .detail-hero span { font-size: 110px; }
  .detail-sheet { margin-top: -28px; padding: 22px 18px 24px; border-radius: 24px 24px 0 0; box-shadow: none; }
  .detail-sheet.flat { margin-top: 0; padding-top: calc(var(--bar-h) + var(--safe-t) + 8px); border-radius: 0; }
  .detail-sheet h1 { font-size: var(--t-4xl); }
  .detail-lead { font-size: var(--t-base); }
  .detail-stats div { padding: 10px 6px; }
  .detail-stats dd { font-size: var(--t-base); }
  .detail-block-heading h2 { font-size: var(--t-2xl); }
  .action-bar { position: fixed; right: 0; bottom: 0; left: 0; max-width: none; padding: 10px 16px calc(10px + var(--safe-b)); }
  .detail-page:has(.action-bar) { padding-bottom: calc(70px + var(--safe-b)); }
  .detail-page:has(.action-bar) .toast { bottom: calc(80px + var(--safe-b)); }
  .detail-page .footer { display: none; }
  .pros-cons { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .video-frame.vertical { max-height: 72vh; margin: 0 auto; }
}

/* Mở dạng app đã cài: ẩn chân trang trên điện thoại cho gọn */
@media (display-mode: standalone) and (max-width: 680px) {
  .tab-page .footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  @view-transition { navigation: none; }
}

/* ---------- Cộng đồng: Bếp nhà mọi người ---------- */
.community-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.community-art { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 20px; background: #fffaf3; color: #b0612f; }
.community-art .i { width: 32px; height: 32px; }
.community-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.community-cta .secondary-button { background: #fffaf3; border-color: #efd9c4; color: #8a4a22; }
.post-strip { display: flex; gap: 10px; margin: 12px -20px 0; padding: 0 20px 4px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.post-strip::-webkit-scrollbar { display: none; }
.strip-card { position: relative; flex: 0 0 150px; height: 190px; overflow: hidden; border-radius: var(--radius); background: #eee8dc; scroll-snap-align: start; }
.strip-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-copy { position: absolute; inset: auto 0 0; padding: 26px 10px 10px; display: grid; background: linear-gradient(transparent, #000b); color: #fff; }
.strip-copy strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--t-sm); line-height: 1.35; }
.strip-copy small { opacity: .85; font-size: var(--t-xs); }
.strip-more { display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: var(--t-md); }

.account-strip { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: var(--t-md); color: var(--soft-ink); }
.account-strip > span:not(.avatar) { flex: 1; min-width: 0; }
.account-strip .secondary-button { min-height: 40px; }
.avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f1e3d3; color: #8a4a22; font-weight: 800; font-size: var(--t-base); object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: var(--t-sm); }

.segmented { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 14px; background: #eeeee7; }
.segment { flex: 1; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.segment .i { width: 16px; height: 16px; }
.segment[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }

.feed { display: grid; gap: 14px; max-width: 640px; }
.community-app { max-width: 640px; }
.feed-loading { padding: 24px; color: var(--muted); text-align: center; font-size: var(--t-md); }
.empty-state > .i { width: 36px; height: 36px; color: var(--green); }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; }
.post-author { flex: 1; min-width: 0; display: grid; }
.post-author strong { font-size: var(--t-base); }
.post-author small { color: var(--muted); font-size: var(--t-xs); }
.icon-button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.icon-button.small { width: 32px; height: 32px; }
.icon-button.small .i { width: 18px; height: 18px; }
.post-image { display: block; aspect-ratio: 4 / 3; background: #eee8dc; }
.post-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.post-body { padding: 12px 14px 4px; }
.post-body h3 { margin: 6px 0 4px; font-size: var(--t-xl); }
.post-body h3 a:hover { color: var(--green); }
.post-text { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; color: var(--soft-ink); font-size: var(--t-md); white-space: pre-line; }
.post-full-text { margin: 8px 0 0; color: var(--soft-ink); font-size: var(--t-base); white-space: pre-line; overflow-wrap: anywhere; }
.post-recipe { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: var(--t-sm); font-weight: 700; }
.post-actions { display: flex; gap: 4px; padding: 6px 8px 8px; }
.post-action { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; cursor: pointer; }
.post-action:hover { background: #f3f3ec; }
.post-action.liked { color: #cf5d4a; }
.post-action:last-child { margin-left: auto; }

.fab { position: fixed; z-index: 30; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); width: 56px; height: 56px; display: none; place-items: center; border: 0; border-radius: 18px; background: var(--green); color: #fff; box-shadow: 0 8px 24px #2f684866; cursor: pointer; }
.fab .i { width: 26px; height: 26px; }

/* Hộp trượt dùng chung cho đăng nhập, đăng món, xem bài, báo cáo */
.sheet .dialog-body { padding-top: 26px; }
.sheet-title { margin: 0 0 12px; font-size: var(--t-xl); }
.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 6px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.stack-form small { color: var(--muted); font-weight: 400; }
.stack-form input:not([type=radio]):not([type=file]), .stack-form select, .stack-form textarea, .comment-form textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: var(--t-lg); resize: vertical;
}
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus, .comment-form textarea:focus { outline: 0; border-color: #84a18b; box-shadow: 0 0 0 3px var(--green-soft); }
.fine-print { margin: 4px 0 0; color: var(--muted); font-size: var(--t-sm); }
.fine-print a { color: var(--green); text-decoration: underline; }
.google-button { width: 100%; min-height: 48px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #dadce0; border-radius: 12px; background: #fff; color: #1f1f1f; font-size: var(--t-base); font-weight: 600; cursor: pointer; }
.google-button:hover { background: #f8f9fa; }
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--muted); font-size: var(--t-sm); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-button:disabled, .quick-join .primary-button:disabled { opacity: .6; cursor: wait; }
/* Vào nhanh 1 bấm (hộp đăng nhập, trang /dang-nhap/) */
.quick-join { display: grid; gap: 10px; padding: 14px; border-radius: 14px; background: var(--green-soft); }
.quick-join-head { display: flex; gap: 10px; align-items: flex-start; }
.quick-join-head .i { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 2px; }
.quick-join-head > div { display: grid; gap: 2px; }
.quick-join-head strong { font-size: var(--t-base); }
.quick-join-head small { color: var(--soft-ink); font-size: var(--t-sm); }
.quick-join input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: var(--t-lg); }
.email-login { margin: 14px 0 10px; }
.email-login > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: var(--green); font-size: var(--t-md); font-weight: 700; cursor: pointer; list-style: none; }
.email-login > summary::-webkit-details-marker { display: none; }
.email-login > summary .i { width: 18px; height: 18px; }
.email-login[open] > summary { margin-bottom: 10px; }
.keep-account { margin: 16px 0; padding: 14px; border: 1px dashed var(--green); border-radius: 14px; }
.keep-account > strong { display: flex; align-items: center; gap: 8px; font-size: var(--t-base); }
.keep-account > strong .i { width: 20px; height: 20px; color: var(--green); }
.keep-account .muted-note { margin: 6px 0 0; }
.keep-account .google-button { margin-top: 12px; }
/* Trang /dang-nhap/ */
.login-page { max-width: 440px; margin: 0 auto; padding: 24px 0 24px; }
.login-hero { text-align: center; margin-bottom: 18px; }
.login-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; font-size: var(--t-4xl); }
.login-hero .page-lead { margin-left: auto; margin-right: auto; }
.login-card .google-button { margin-top: 0; }
.login-card .account-row { margin-top: 0; }
.login-perks { display: grid; gap: 10px; margin: 20px 0 8px; padding: 0; list-style: none; }
.login-perks li { display: flex; align-items: center; gap: 10px; color: var(--soft-ink); font-size: var(--t-md); }
.login-perks .i { width: 20px; height: 20px; color: var(--green); }
.login-note { text-align: center; }
.action-list { display: grid; gap: 4px; }
.action-item { min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 12px; background: none; font-size: var(--t-base); font-weight: 600; text-align: left; cursor: pointer; }
.action-item:hover { background: #f3f3ec; }
.action-item.danger { color: var(--red); }
.radio-list { display: grid; gap: 6px; }
.radio-item { display: flex !important; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font-weight: 500 !important; cursor: pointer; }
.radio-item:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.radio-item input { accent-color: var(--green); width: 18px; height: 18px; }
.secondary-button.danger { border-color: #f0d3cd; background: var(--red-soft); color: var(--red); }

.photo-picker { position: relative; min-height: 180px; display: grid !important; place-items: center; overflow: hidden; border: 2px dashed #cdd9cd; border-radius: var(--radius); background: #f6f8f3; }
.photo-picker:focus-within { border-color: var(--green); }
.photo-empty { display: grid; justify-items: center; gap: 4px; padding: 20px; text-align: center; color: var(--green); }
.photo-empty .i { width: 36px; height: 36px; }
.photo-empty small { max-width: 300px; color: var(--muted); font-size: var(--t-sm); }
.photo-picker img { width: 100%; max-height: 320px; object-fit: cover; }
.photo-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.stack-form .photo-buttons label, .stack-form .photo-tools label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.stack-form .photo-buttons .primary-button { color: #fff; font-weight: 700; }
.stack-form .photo-buttons .secondary-button, .stack-form .photo-tools .text-button { color: var(--green); font-weight: 700; }
.stack-form .photo-buttons label:focus-within, .stack-form .photo-tools label:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.photo-buttons .i { width: 18px !important; height: 18px !important; }
.photo-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: -6px; }
.photo-tools .i { width: 16px; height: 16px; }
.photo-tools .text-button { display: inline-flex; align-items: center; gap: 5px; }

/* Bảng tin cộng đồng: 3–4 tab vẫn nằm trên một dòng */
.community-app .segmented { overflow-x: auto; scrollbar-width: none; }
.community-app .segment { flex: 1 0 auto; padding: 0 10px; white-space: nowrap; font-size: var(--t-sm); }

/* Chấm sao, lưu món */
.post-action.saved { color: var(--amber); }
.post-rating { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 2px; color: var(--soft-ink); font-size: var(--t-sm); }
.post-rating .i { width: 16px; height: 16px; color: #e0a21b; }
.post-rating strong { color: var(--ink); }
.post-rating small { color: var(--muted); font-size: var(--t-sm); }
.rating-box { display: grid; gap: 6px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); }
.rating-box > strong { font-size: var(--t-md); }
.rating-box.mine { background: var(--green-soft); }
.rating-avg { display: inline-flex; align-items: center; gap: 5px; color: var(--soft-ink); font-size: var(--t-sm); }
.rating-avg .i { width: 16px; height: 16px; color: #e0a21b; }
.star-input { display: flex; align-items: center; gap: 2px; }
.star-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: none; color: #c9b68f; cursor: pointer; transition: transform .12s; }
.star-button .i { width: 30px; height: 30px; }
.star-button.on { color: #e0a21b; }
.star-button:hover { transform: scale(1.12); }
.star-button:active { transform: scale(.92); }
.star-input .text-button { margin-left: 8px; font-size: var(--t-sm); }

/* Câu khen nhanh dưới bình luận */
.praise-chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 4px; padding: 2px; scrollbar-width: none; }
.praise-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid #efd7ad; border-radius: 999px; background: #fffaf0; color: var(--amber); font: 600 var(--t-sm) var(--font); cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--amber-soft); }

/* Ô "Món của bạn đã nhận" ở tab Bài của tôi */
.pride-card { display: grid; gap: 12px; margin-bottom: 14px; padding: 16px; border-radius: var(--radius); background: linear-gradient(135deg, #fff3dd, #fde6dc); }
.pride-card[hidden] { display: none; }
.pride-head { display: flex; align-items: center; gap: 10px; }
.pride-head > .i { width: 28px; height: 28px; color: var(--orange); }
.pride-head > div { display: grid; }
.pride-head strong { font-size: var(--t-xl); }
.pride-head small { color: var(--muted); font-size: var(--t-sm); }
.pride-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pride-grid > span { display: grid; justify-items: center; gap: 1px; padding: 10px 4px; border-radius: 12px; background: #fffefacc; text-align: center; }
.pride-grid .i { width: 20px; height: 20px; color: #cf5d4a; }
.pride-grid > span:nth-child(2) .i { color: #e0a21b; }
.pride-grid > span:nth-child(3) .i { color: var(--amber); }
.pride-grid > span:nth-child(4) .i { color: var(--green); }
.pride-grid strong { font-size: var(--t-2xl); line-height: 1.2; }
.pride-grid small { color: var(--muted); font-size: var(--t-xs); }
.pride-card p { margin: 0; color: var(--soft-ink); font-size: var(--t-md); }

/* Chuông thông báo */
.bell-button { position: relative; flex: none; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--white); border-radius: 99px; background: var(--red); color: #fff; font-size: var(--t-2xs); font-weight: 800; line-height: 1; }
.bell-count[hidden] { display: none; }

/* Cá nhân: hàng cài đặt nhanh (tài khoản, thông báo, cài app) */
.quick-settings { padding: 6px 16px; margin-bottom: 16px; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--line); }
.setting-row[hidden] { display: none; }
.setting-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.setting-icon .i { width: 22px; height: 22px; }
.setting-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.setting-copy strong { font-size: var(--t-base); }
.setting-copy small { color: var(--muted); font-size: var(--t-sm); line-height: 1.4; }
.setting-row.is-on .setting-copy small { color: var(--green); font-weight: 600; }
.setting-action { flex: none; min-height: 38px; padding: 8px 16px; }
.setting-action[hidden] { display: none; }

/* Chuông thông báo góc phải thanh trên */
.topbar-bell { position: relative; flex: none; width: 40px; height: 40px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; transition: background .2s; }
.topbar-bell .i { width: 24px; height: 24px; }
.topbar-bell:hover, .topbar-bell.is-open { background: var(--green-soft); color: var(--green); }
.topbar-bell .bell-count { top: 2px; right: 2px; }
@media (min-width: 681px) { .desktop-nav + .topbar-bell { margin-left: 4px; } }
.notify-pop { position: absolute; z-index: 40; top: calc(100% - 4px); right: max(20px, calc((100% - 1200px) / 2)); width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 480px); overflow-y: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 14px 40px #0000002a; }
.notify-pop[hidden] { display: none; }
.notify-pop-head { padding: 8px 10px 6px; }
.notify-pop-head h2 { margin: 0; font: 800 var(--t-xl) var(--heading); }
.notify-pop-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.notify-pop-item:hover { background: var(--paper); }
.notify-pop-item > .i { width: 18px; height: 18px; flex: none; color: var(--muted); }
.notify-pop-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; }
.notify-pop-icon .i { width: 22px; height: 22px; }
.notify-pop-icon.is-red { background: var(--red-soft); color: var(--red); }
.notify-pop-icon.is-amber { background: var(--amber-soft); color: var(--amber); }
.notify-pop-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.notify-pop-copy strong { font-size: var(--t-base); }
.notify-pop-copy small { color: var(--muted); font-size: var(--t-sm); line-height: 1.4; }
.notify-pop-empty { padding: 18px 12px 20px; display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: var(--t-md); }
.notify-pop-empty .i { width: 32px; height: 32px; }
.notify-pop-empty p { margin: 0; }
@media (max-width: 680px) {
  .notify-pop { right: 12px; left: 12px; width: auto; }
}
.notify-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.notify-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--ink); }
.notify-item:hover { background: #f3f3ec; }
.notify-item.unread { background: var(--amber-soft); }
.notify-avatar { position: relative; flex: none; }
.notify-kind { position: absolute; right: -6px; bottom: -6px; width: 20px; height: 20px; display: grid; place-items: center; border: 2px solid var(--white); border-radius: 99px; background: #cf5d4a; color: #fff; }
.notify-kind .i { width: 11px; height: 11px; }
.notify-kind.rate { background: #e0a21b; }
.notify-kind.save { background: var(--amber); }
.notify-kind.comment { background: var(--green); }
.notify-copy { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: var(--t-md); overflow-wrap: anywhere; }
.notify-copy small { color: var(--muted); font-size: var(--t-xs); }
.notify-stars { display: inline-flex; align-items: center; gap: 2px; color: #b07a0c; font-weight: 800; }
.notify-stars .i { width: 14px; height: 14px; color: #e0a21b; }
.notify-item img { width: 48px; height: 48px; flex: none; border-radius: 10px; object-fit: cover; }

/* Chúc mừng sau khi đăng */
.cheer { display: grid; justify-items: center; gap: 10px; text-align: center; }
.cheer h2 { margin: 6px 0 0; font-size: var(--t-3xl); }
.cheer p { margin: 0; color: var(--soft-ink); }
.cheer-image { width: 100%; max-height: 240px; border-radius: var(--radius); object-fit: cover; animation: cheer-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.cheer-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 24px; background: var(--amber-soft); color: var(--orange); animation: cheer-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.cheer-icon .i { width: 40px; height: 40px; }
.cheer-tip { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: var(--green-dark) !important; font-size: var(--t-md); text-align: left; }
.cheer-tip .i { flex: none; width: 20px; height: 20px; }
@keyframes cheer-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cheer-image, .cheer-icon { animation: none; } .star-button { transition: none; } }

.post-sheet-image { width: 100%; max-height: 60vh; display: block; object-fit: cover; background: #eee8dc; }
.post-sheet .post-head { padding: 0 0 10px; }
.post-sheet h2 { margin: 4px 0 0; font-size: var(--t-3xl); }
.post-sheet .post-actions { padding: 10px 0 0; margin-top: 12px; border-top: 1px solid var(--line); }
.comments-section { padding-top: 6px !important; }
.comments-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: var(--t-xl); }
.comments-section h3 .i { width: 20px; height: 20px; }
.comment-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 12px; }
.comment { display: flex; align-items: flex-start; gap: 8px; }
.comment-bubble { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 4px 16px 16px 16px; background: #f3f3ec; }
.comment-bubble strong { font-size: var(--t-sm); }
.comment-bubble p { margin: 2px 0; font-size: var(--t-base); white-space: pre-line; overflow-wrap: anywhere; }
.comment-bubble small { color: var(--muted); font-size: var(--t-xs); }
.comment-form { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 0 4px; background: var(--white); }
.comment-form textarea { min-height: 46px; max-height: 140px; resize: none; }
.comment-form .primary-button { flex: none; }

.mod-item { display: grid; gap: 10px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.mod-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-md); }
.mod-reasons { margin: 0; padding-left: 20px; color: var(--soft-ink); font-size: var(--t-md); }
.mod-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.account-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.account-row > div { display: grid; }
.account-row small { color: var(--muted); font-size: var(--t-sm); }
.inline-form { grid-template-columns: 1fr auto; align-items: end; }
.sub-title { margin: 18px 0 8px; font-size: var(--t-base); }
.blocked-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.blocked-list li { display: flex; align-items: center; gap: 10px; }
.blocked-list li > span:not(.avatar) { flex: 1; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.account-card .card-title { display: flex; align-items: center; gap: 8px; }

@media (max-width: 680px) {
  .community-head { display: block; }
  .community-head > .primary-button { display: none; }
  .fab { display: grid; }
  .fab[hidden] { display: none !important; }
  .community-art { width: 52px; height: 52px; border-radius: 16px; }
  .community-art .i { width: 26px; height: 26px; }
  .post-strip { margin: 12px -16px 0; padding: 0 16px 4px; scroll-padding-inline: 16px; }
  .community-home .community-teaser:has(.community-cta:not([hidden])) .community-art { display: none; }
  .community-cta > * { flex: 1; }
  .feed { gap: 12px; }
  .post-card { margin: 0 -16px; border-left: 0; border-right: 0; border-radius: 0; }
  .inline-form { grid-template-columns: 1fr; }
}

/* ---------- Trang bộ nhận diện ---------- */
.brand-page .page-main { max-width: 900px; }
.brand-block { margin-top: 16px; }
.brand-block .card-title { margin-bottom: 14px; }
.brand-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-bottom: 12px; }
.brand-large { font-size: var(--t-4xl); }
.brand-large .brand-mark { width: 56px; height: 56px; border-radius: 18px; font-size: var(--t-4xl); }
.brand-specimen { margin: 0 0 12px; font-size: var(--t-3xl); font-weight: 800; line-height: 1.3; }
.brand-weights { display: grid; gap: 4px; margin-bottom: 12px; font-size: var(--t-lg); }
.brand-scale > div { display: grid; grid-template-columns: 90px 50px 1fr; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.brand-scale code, .brand-icons code { color: var(--muted); font-size: var(--t-xs); }
.brand-scale small { grid-column: 3; color: var(--muted); font-size: var(--t-xs); }
.brand-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.brand-colors > div { display: grid; gap: 2px; font-size: var(--t-sm); }
.brand-colors small { color: var(--muted); }
.swatch { height: 56px; border: 1px solid var(--line); border-radius: 12px; }
.brand-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.brand-icons > div { display: grid; justify-items: center; gap: 6px; padding: 14px 4px 10px; border-radius: 12px; background: #f6f6f0; }
.brand-icons .i { width: 26px; height: 26px; }

/* ---------- Tủ lạnh: quản lý đồ trong tủ ---------- */
.fridge-reminder { margin: 0 0 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #f0d9b5; border-radius: var(--radius); background: var(--amber-soft); color: #7a4c12; }
.fridge-reminder[hidden] { display: none; }
.fridge-reminder > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 2px; }
.fridge-reminder strong { font-size: var(--t-base); }
.fridge-reminder small { overflow: hidden; font-size: var(--t-sm); text-overflow: ellipsis; white-space: nowrap; }
.fridge-reminder-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff7e8; }
.fridge-reminder > .i:last-child { width: 18px; height: 18px; }

.fridge-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fridge-stat { min-width: 0; padding: 12px 8px; display: grid; gap: 2px; justify-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--soft-ink); cursor: pointer; }
.fridge-stat strong { color: var(--ink); font-size: var(--t-3xl); font-weight: 800; line-height: 1.1; }
.fridge-stat span { font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.fridge-stat.active { border-color: #9fbaa6; background: var(--green-soft); }
.fridge-stat.is-warn strong { color: var(--amber); }
.fridge-filter .segment { font-size: var(--t-sm); }
.fridge-place { margin: 0; }
.fridge-place .segment[aria-checked="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }
.fridge-hint { margin: -4px 0 0; color: var(--muted); font-size: var(--t-sm); line-height: 1.55; }
.fridge-hint b { color: var(--soft-ink); }
.fridge-quick-label { margin: 0 0 8px; color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.fridge-quick { margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.fridge-chip { min-height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; cursor: pointer; }
.fridge-chip:active { background: var(--green-soft); }
.fridge-item { position: relative; flex-wrap: wrap; }
.fridge-item.is-expired { border-color: #efc9c3; background: #fdf4f2; }
.fridge-item.is-urgent, .fridge-item.is-soon { border-color: #f0dcb9; background: #fffaf1; }
.fridge-status { font-weight: 700; }
.is-ok .fridge-status, .is-none .fridge-status { font-weight: 600; }
.is-expired .fridge-status { color: var(--red); }
.is-urgent .fridge-status, .is-soon .fridge-status { color: var(--amber); }
.fridge-bar { height: 4px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: #ecede6; }
.fridge-bar i { display: block; height: 100%; border-radius: inherit; background: #6d9a78; }
.is-soon .fridge-bar i, .is-urgent .fridge-bar i { background: var(--amber); }
.is-expired .fridge-bar i { background: var(--red); }
.fridge-freeze { width: 100%; min-height: 36px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: #eaf2f7; color: #2f6c8f; font-size: var(--t-sm); font-weight: 700; text-align: left; cursor: pointer; }
.fridge-freeze .i { width: 16px; height: 16px; flex: 0 0 auto; }
.fridge-item-actions button:not(.remove-button) { width: 34px; height: 34px; }
.fridge-item-copy > span:not(.fridge-bar) { line-height: 1.45; }
.fridge-item-menu { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.fridge-item-menu[hidden] { display: none; }
.fridge-item-menu button { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--soft-ink); font-size: var(--t-sm); font-weight: 700; cursor: pointer; }
.fridge-item-menu button .i { width: 16px; height: 16px; }
.fridge-item-menu [data-used] { border-color: #cfe0d2; background: var(--green-soft); color: var(--green); }
.fridge-item-menu [data-wasted] { color: var(--red); }
.fridge-waste { margin: 12px 0 0; color: var(--muted); font-size: var(--t-sm); text-align: center; }
.fridge-notify { margin-top: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 12px; background: #f3f3ec; font-size: var(--t-sm); font-weight: 600; }
.fridge-notify[hidden] { display: none; }
.fridge-notify > span { display: inline-flex; align-items: center; gap: 6px; }
.fridge-notify .secondary-button { min-height: 36px; padding: 0 14px; }
.fridge-cook { margin-top: 16px; }
.fridge-cook-list { display: grid; gap: 8px; }
.fridge-cook-item { padding: 10px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.fridge-cook-item > span:first-child { font-size: var(--t-3xl); }
.fridge-cook-item > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 2px; }
.fridge-cook-item small { color: var(--muted); font-size: var(--t-sm); }
.fridge-cook-item > .i { width: 18px; height: 18px; color: var(--muted); }
@media (max-width: 760px) {
  .fridge-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .fridge-stat { padding: 10px 2px; border-radius: 12px; }
  .fridge-stat strong { font-size: var(--t-2xl); }
  .fridge-stat span { font-size: var(--t-2xs); }
  .fridge-list-card { order: -1; }
}

/* ---------- Tính calo ---------- */
.calo-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.calo-main { min-width: 0; display: grid; gap: 16px; }
.calo-main .panel-card + .panel-card { margin-top: 0; }
.calo-setup-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 12px; }
.calo-field { min-width: 0; display: grid; gap: 6px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.calo-field select { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: var(--t-lg); }
.calo-list { display: grid; gap: 8px; margin-bottom: 8px; }
.calo-list:empty { display: none; }
.calo-row { min-width: 0; display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #eeefe9; border-radius: 12px; background: #fff; }
.calo-row-name { min-width: 0; display: grid; gap: 2px; }
.calo-row-name strong { overflow: hidden; font-size: var(--t-base); text-overflow: ellipsis; white-space: nowrap; }
.calo-row-name small { color: var(--muted); font-size: var(--t-xs); }
.calo-row-qty { display: flex; gap: 4px; }
.calo-row-qty input, .calo-row-qty select { height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: var(--t-lg); }
.calo-row-qty input { width: 68px; }
.calo-row-qty select { max-width: 116px; }
.calo-row-kcal { min-width: 56px; text-align: right; font-size: var(--t-lg); font-weight: 800; }
.calo-row-kcal small { display: block; color: var(--muted); font-size: var(--t-2xs); font-weight: 600; }
.calo-form { margin-top: 4px; }
.calo-list { gap: 12px; }
.calo-dish { display: grid; gap: 8px; }
.calo-dish-head { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.calo-dish-title { min-width: 0; flex: 1; overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.calo-dish-head > strong { color: var(--green); font-size: var(--t-md); }
.calo-dish-head .text-button { min-height: 32px; padding: 0 6px; color: var(--muted); font-size: var(--t-sm); }
.calo-dish-empty { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.calo-groups-title { margin: 0 0 2px; color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.calo-result { position: sticky; top: 80px; }
.calo-total { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.calo-total strong { color: var(--green); font-size: var(--t-5xl); font-weight: 800; line-height: 1.1; }
.calo-total span, .calo-per span { color: var(--muted); font-size: var(--t-md); }
.calo-per { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.calo-per strong { font-size: var(--t-xl); }
.calo-meter { height: 8px; margin-top: 12px; border-radius: 99px; background: #eef0e9; overflow: hidden; }
.calo-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--orange); transition: width .3s; }
.calo-daily { margin: 8px 0 0; color: var(--soft-ink); font-size: var(--t-md); }
.calo-daily:empty { display: none; }
.calo-groups { display: grid; gap: 6px; margin-top: 14px; }
.calo-groups:empty { display: none; }
.calo-group { display: grid; grid-template-columns: 1fr auto 44px; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f7f2; font-size: var(--t-md); }
.calo-group em { color: var(--muted); font-style: normal; text-align: right; }
.calo-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); color: #8a5717; font-size: var(--t-sm); }
.calo-note .i { width: 16px; height: 16px; vertical-align: -3px; }
.calo-note.muted { padding: 0; background: none; color: var(--muted); }

@media (max-width: 760px) {
  .calo-layout { grid-template-columns: 1fr; }
  .calo-result { position: static; order: -1; }
  .calo-setup-row { grid-template-columns: 1fr; }
  .calo-row { grid-template-columns: auto 1fr auto; }
  .calo-row-qty { grid-column: 2; }
  .calo-row-kcal { grid-column: 3; grid-row: 2; }
  .calo-row .remove-button { grid-column: 3; grid-row: 1; }
}

/* ---------- Thực đơn: chuyển Thực đơn / Sổ đi chợ, các cách xem ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section-switch { display: flex; gap: 4px; max-width: 420px; margin: 0 0 18px; padding: 4px; border-radius: 14px; background: #eeeee7; }
.section-switch-item { flex: 1; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; color: #6b7369; font-size: var(--t-md); font-weight: 700; }
.section-switch-item .i { width: 18px; height: 18px; }
.section-switch-item.active { background: var(--white); color: var(--green); box-shadow: 0 1px 4px #25352a1f; }
.view-tabs { margin: 16px 0 6px; }
.mode-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.mode-switch button { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.mode-switch button .i { width: 16px; height: 16px; }
.mode-switch button[aria-pressed="true"] { background: var(--green-soft); color: var(--green-dark); }
.mode-switch button:disabled { opacity: .45; cursor: default; }
.editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shopping-actions { display: grid; gap: 6px; justify-items: start; }
.shopping-actions .secondary-button { width: 100%; }
.shopping-actions .text-button { display: inline-flex; align-items: center; gap: 4px; }
.shopping-actions .text-button .i { width: 16px; height: 16px; }

/* Bảng thực đơn dễ nhìn */
.menu-board { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: 0 10px 30px #25352a0d; }
.board-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.board-head .brand-mark { position: relative; flex: none; }
.board-title { min-width: 0; flex: 1; display: grid; }
.board-title small { color: var(--green); font-size: var(--t-2xs); font-weight: 800; letter-spacing: 1.2px; }
.board-title strong { font: 800 var(--t-3xl)/1.2 var(--heading); }
.board-count { flex: none; padding: 5px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: var(--t-xs); font-weight: 700; }
.board-grid { display: grid; gap: 8px; }
.board-row { display: grid; grid-template-columns: 64px repeat(3, minmax(0, 1fr)); gap: 8px; border-radius: 16px; }
.board-row-head > span { padding: 0 4px; color: var(--muted); font-size: var(--t-xs); font-weight: 800; text-align: center; letter-spacing: .5px; }
.board-date { display: grid; place-content: center; gap: 0; padding: 6px 2px; border-radius: 14px; background: #f3f3ec; text-align: center; }
.board-date strong { font: 800 var(--t-xl)/1.2 var(--heading); }
.board-date span { color: var(--muted); font-size: var(--t-xs); }
.board-row.is-today .board-date { background: var(--green); color: #fff; }
.board-row.is-today .board-date span { color: #e8efe7; }
.board-row.is-past { opacity: .72; }
.board-row.is-focus { animation: board-focus 1.6s ease-out; }
@keyframes board-focus { 0%, 40% { box-shadow: 0 0 0 3px var(--orange); } }
.board-cell { position: relative; min-width: 0; min-height: 92px; display: grid; align-content: center; gap: 2px; padding: 6px; border-radius: 14px; background: var(--card-bg, #f3eadc); }
.board-cell.is-empty { border: 2px dashed #dfe4da; background: none; }
.board-dish { min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: center; cursor: pointer; }
.board-dish:hover { background: #ffffff66; }
.board-emoji { font-size: var(--t-5xl); line-height: 1.1; }
.board-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--t-sm); font-weight: 700; line-height: 1.3; }
.board-by { padding: 1px 7px; border-radius: 999px; background: #fffefacc; color: #9a4f27; font-size: var(--t-2xs); font-weight: 700; }
.board-cell.is-multi { align-content: start; }
.board-cell.is-multi .board-dish { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; gap: 6px; }
.board-cell.is-multi .board-emoji { font-size: var(--t-2xl); }
.board-cell.is-multi .board-by { grid-column: 2; }
.board-remove { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fffefae6; color: var(--red); cursor: pointer; }
.board-cell.is-multi .board-remove { position: static; justify-self: end; margin-top: -4px; }
.board-remove .i { width: 14px; height: 14px; }
.board-add { min-height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #fffefa99; color: var(--green); cursor: pointer; }
.board-cell.is-empty .board-add { height: 100%; background: none; }
.board-add .i { width: 22px; height: 22px; }
.board-foot { margin-top: 12px; color: #8a9189; font-size: var(--t-xs); text-align: center; }

/* Tháng */
.month-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.month-stats > .list-empty { grid-column: 1 / -1; }
.stat-tile { min-width: 0; display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.stat-tile strong { overflow: hidden; font: 800 var(--t-2xl)/1.25 var(--heading); text-overflow: ellipsis; white-space: nowrap; }
.stat-tile span { color: var(--muted); font-size: var(--t-sm); }
.stat-tile .text-button { min-height: 0; padding: 0; font-size: var(--t-sm); }
.stat-wide { grid-column: 1 / -1; }
.stat-wide p { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.stat-dish { min-height: 36px; padding: 0 12px; border: 1px solid #e2e6dc; border-radius: 999px; background: #fbfbf6; font-size: var(--t-md); font-weight: 700; cursor: pointer; }
.stat-dish small { color: var(--muted); font-weight: 600; }
.month-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.month-weekday { padding-bottom: 2px; color: var(--muted); font-size: var(--t-xs); font-weight: 800; text-align: center; }
.month-day { min-width: 0; min-height: 84px; display: grid; align-content: start; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; }
.month-day:hover { border-color: #b9cdb9; }
.month-day.is-outside { opacity: .4; }
.month-day.has-meals { background: #fbfaf3; }
.month-day.is-today { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.month-date { font-size: var(--t-sm); font-weight: 800; }
.month-day.is-today .month-date { color: var(--green); }
.month-emojis { display: flex; flex-wrap: wrap; gap: 1px; font-size: var(--t-lg); line-height: 1.2; }
.month-emojis small { align-self: center; color: var(--muted); font-size: var(--t-2xs); font-weight: 700; }
.month-hint { margin-top: 10px; }

/* Các tuần đã lập */
.history-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.history-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.history-item.is-current { border-color: #9fbea6; }
.history-open { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.history-copy { display: grid; }
.history-copy small { color: var(--green); font-size: var(--t-xs); font-weight: 800; }
.history-copy strong { font: 800 var(--t-xl) var(--heading); }
.history-copy > span { color: var(--muted); font-size: var(--t-sm); }
.history-emojis { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 55%; }
.history-emojis span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--card-bg); font-size: var(--t-lg); }
.history-actions { display: flex; gap: 16px; padding: 0 16px 6px; }
.history-actions .text-button { display: inline-flex; align-items: center; gap: 6px; }
.history-actions .i { width: 16px; height: 16px; }

/* Hộp chia sẻ, trang xem link */
.share-kinds { margin: 0; padding: 0; border: 0; }
.share-kinds .radio-item { align-items: flex-start; min-height: 0; padding: 12px; }
.share-kinds .radio-item input { margin-top: 3px; flex: none; }
.share-kinds .radio-item span { display: grid; gap: 2px; }
.share-kinds .radio-item small { color: var(--muted); font-size: var(--t-sm); font-weight: 400; }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shared-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.order-bar { position: sticky; z-index: 10; top: calc(64px + var(--safe-t)); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; padding: 12px 16px; border-radius: 14px; background: var(--amber-soft); color: #6f4a14; }
.shared-page .week-layout { grid-template-columns: 1fr; }
.shared-page .shopping-card { position: static; }
.mode-switch button, .week-actions .primary-button { white-space: nowrap; }
.order-bar p { margin: 0; flex: 1 1 260px; font-size: var(--t-md); }
.order-bar-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Sổ đi chợ ---------- */
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; margin-top: 18px; }
.market-main { min-width: 0; display: grid; gap: 16px; }
.market-main .panel-card + .panel-card { margin-top: 0; }
.market-summary .week-nav { justify-content: space-between; }
.market-total { display: grid; justify-items: center; margin: 14px 0 10px; text-align: center; }
.market-total span { color: var(--muted); font-size: var(--t-md); }
.market-total strong { font: 800 var(--t-5xl)/1.2 var(--heading); letter-spacing: -.02em; }
.market-total small { color: var(--muted); font-size: var(--t-sm); }
.budget { margin-bottom: 14px; text-align: center; }
.budget-line { display: flex; align-items: center; justify-content: space-between; font-size: var(--t-md); font-weight: 600; }
.budget-bar { height: 10px; margin: 4px 0 6px; overflow: hidden; border-radius: 99px; background: #eeeee7; }
.budget-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.budget-bar.near span { background: var(--amber); }
.budget-bar.over span { background: var(--red); }
.budget-note { display: block; color: var(--muted); font-size: var(--t-sm); text-align: left; }
.budget-note.over { color: var(--red); font-weight: 700; }
.market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-stats .stat-tile { background: #fbfbf6; }
.split-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 8px; }
.split-list li:not(.list-empty) { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 12px; background: #fbfbf6; }
.split-list span { color: var(--muted); font-size: var(--t-sm); text-align: right; }
.split-list em { grid-column: 1 / -1; font-size: var(--t-md); font-style: normal; font-weight: 700; }
.split-list em.get { color: var(--green); }
.split-list em.owe { color: #9a4f27; }
.split-list .text-button, .muted-note .text-button { min-height: 0; padding: 0; }
.trip-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.trip-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid #eeefe9; border-radius: 14px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.trip-item:hover { border-color: #b9cdb9; }
.trip-date { width: 46px; height: 46px; flex: none; display: grid; place-content: center; border-radius: 12px; background: var(--green-soft); color: var(--green-dark); text-align: center; line-height: 1.1; }
.trip-date strong { font-size: var(--t-xl); font-weight: 800; }
.trip-date small { font-size: var(--t-2xs); font-weight: 700; }
.trip-copy { min-width: 0; flex: 1; display: grid; }
.trip-copy strong { font-size: var(--t-base); }
.trip-copy span { overflow: hidden; color: var(--muted); font-size: var(--t-sm); text-overflow: ellipsis; white-space: nowrap; }
.trip-thumb { width: 40px; height: 40px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #f1f3ed; color: var(--muted); }
.trip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trip-thumb .i { width: 18px; height: 18px; }
.trip-amount { flex: none; font-size: var(--t-base); font-weight: 800; }
.market-todo { position: sticky; top: calc(80px + var(--safe-t)); }
.todo-form { display: flex; gap: 8px; margin: 12px 0; }
.todo-form input { min-width: 0; flex: 1; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: var(--t-lg); }
.todo-form input:focus { outline: 0; border-color: #84a18b; box-shadow: 0 0 0 3px var(--green-soft); }
.todo-form .icon-button { width: 44px; height: 44px; background: var(--green); border-color: var(--green); color: #fff; }
.market-todo .shopping-list li { display: flex; align-items: center; gap: 6px; }
.market-todo .shopping-list label { flex: 1; min-width: 0; }
.market-todo .shop-name { flex: 1; min-width: 0; }
.todo-tag { padding: 1px 6px; border-radius: 99px; background: var(--green-soft); color: var(--green); font-size: var(--t-2xs); font-weight: 700; }
.chip-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.chip-choices legend { margin-bottom: 6px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.choice-chip { display: inline-flex !important; cursor: pointer; }
.choice-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-chip span { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.choice-chip input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.choice-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--green-soft); }
.money-preview { min-height: 1em; margin: -8px 0 0; color: var(--green); font-size: var(--t-md); font-weight: 700; }
.bill-picker { min-height: 140px; }
.bill-picker img { max-height: 420px; object-fit: contain; background: #f1f3ed; cursor: zoom-in; }

@media (max-width: 1000px) {
  .market-layout { grid-template-columns: 1fr; }
  .market-todo { position: static; }
}
@media (max-width: 680px) {
  .section-switch { max-width: none; margin-bottom: 12px; }
  .week-actions { justify-content: space-between; }
  .week-actions .primary-button { flex: 0 1 auto; }
  .menu-board { margin: 0 -8px; padding: 12px 10px; border-radius: 18px; }
  .board-title strong { font-size: var(--t-2xl); }
  .board-row { grid-template-columns: 44px repeat(3, minmax(0, 1fr)); gap: 5px; }
  .board-grid { gap: 5px; }
  .board-date strong { font-size: var(--t-base); }
  .board-date span { font-size: var(--t-2xs); }
  .board-cell { min-height: 82px; padding: 4px 3px; border-radius: 12px; }
  .board-emoji { font-size: var(--t-4xl); }
  .board-name { font-size: var(--t-xs); }
  .board-cell.is-multi .board-dish { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 0; }
  .board-cell.is-multi .board-by { grid-column: 1; }
  .board-cell.is-multi .board-emoji { font-size: var(--t-xl); }
  .board-cell.is-multi .board-name { -webkit-line-clamp: 1; }
  .month-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .stat-tile { padding: 10px; }
  .stat-tile strong { font-size: var(--t-xl); }
  .stat-tile span { font-size: var(--t-xs); }
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month-calendar { gap: 3px; }
  .month-day { min-height: 64px; padding: 4px 3px; border-radius: 9px; }
  .month-emojis { font-size: var(--t-xs); }
  .history-open { flex-direction: column; align-items: flex-start; }
  .history-emojis { max-width: none; justify-content: flex-start; }
  .shared-actions > * { flex: 1 1 100%; }
  .order-bar { top: calc(56px + var(--safe-t)); }
  .shared-page { padding: calc(var(--bar-h) + var(--safe-t) + 4px) 16px 0; }
  .shared-page .page-head .page-title { position: static; width: auto; height: auto; margin: 4px 0; overflow: visible; clip: auto; white-space: normal; font-size: var(--t-4xl); }
  .week-actions { flex-wrap: nowrap; gap: 8px; }
  .mode-switch button { padding: 0 10px; }
  .week-actions .primary-button { min-height: 44px; padding: 0 14px; }
  .market-total strong { font-size: var(--t-4xl); }
}

/* ---------- Mâm cơm: mỗi bữa ăn mấy món ---------- */
.shape-bar { width: 100%; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #d5e1d5; border-radius: 14px; background: var(--green-soft); color: var(--ink); text-align: left; cursor: pointer; }
.shape-bar-copy { min-width: 0; flex: 1; display: grid; }
.shape-bar-copy strong { font-size: var(--t-md); }
.shape-bar-copy span { color: var(--soft-ink); font-size: var(--t-sm); }
.shape-bar-action { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: var(--t-md); font-weight: 700; }
.shape-bar-action .i { width: 16px; height: 16px; }
.meal-add.is-missing { border-style: solid; border-color: #efd7ad; background: var(--amber-soft); color: #8a5717; }
.picker-courses { margin: 4px 0 0; }
.shape-meal { padding: 14px 0; border-top: 1px solid var(--line); }
.shape-meal:first-child { border-top: 0; padding-top: 4px; }
.shape-meal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.shape-meal-head h3 { margin: 0; font-size: var(--t-lg); }
.shape-meal-head span { color: var(--green); font-size: var(--t-sm); font-weight: 700; text-align: right; }
.shape-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.shape-presets .category-tab { min-height: 36px; padding: 0 12px; font-size: var(--t-sm); }
.shape-steppers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shape-stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.shape-stepper > span { min-width: 0; display: grid; }
.shape-stepper strong { font-size: var(--t-sm); }
.shape-stepper small { color: var(--muted); font-size: var(--t-2xs); }
.shape-stepper .stepper button:disabled { opacity: .35; cursor: default; }
.shape-sheet .primary-button { margin-top: 8px; }
@media (max-width: 680px) {
  .shape-steppers { grid-template-columns: 1fr; }
}
.shape-stepper .stepper output { min-width: 26px; }
.shape-stepper .stepper button { width: 34px; height: 34px; }
.shape-subtitle { margin-top: 20px; }
.who-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.who-kind { min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--soft-ink); cursor: pointer; }
.who-kind .i { width: 24px; height: 24px; color: var(--green); }
.who-kind strong { font-size: var(--t-sm); text-align: center; }
.who-kind small { color: var(--muted); font-size: var(--t-xs); }
.who-kind.selected { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green); }
.who-people { margin-bottom: 4px; }
@media (max-width: 680px) {
  .who-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-cell.is-multi .board-name { -webkit-line-clamp: 2; font-size: var(--t-2xs); }
}

/* ---------- Trang quản trị (/quan-tri/) ---------- */
#adminPage .detail-main { max-width: 1180px; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.admin-me { display: flex; align-items: center; gap: 10px; }
.admin-me > span { display: grid; line-height: 1.3; }
.admin-me small { color: var(--muted); font-size: var(--t-sm); }
.admin-gate { padding: 10px 0 40px; }
.admin-app { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-tabs { position: sticky; top: 80px; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.admin-tab { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; text-align: left; cursor: pointer; }
.admin-tab .i { width: 18px; height: 18px; color: var(--muted); }
.admin-tab:hover { background: #f3f3ec; }
.admin-tab[aria-selected="true"] { background: var(--green-soft); color: var(--green); font-weight: 700; }
.admin-tab[aria-selected="true"] .i { color: var(--green); }
.admin-badge { min-width: 22px; margin-left: auto; padding: 1px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: var(--t-2xs); font-weight: 700; text-align: center; }
.admin-panel { display: grid; gap: 14px; min-width: 0; }
.admin-panel .muted-note { margin: 0; }
#overview { display: grid; gap: 14px; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-panel-head .card-title { margin: 0; font-size: var(--t-2xl); }
.admin-panel-head .text-button .i { width: 16px; height: 16px; vertical-align: -3px; }
.admin-count { color: var(--muted); font-size: var(--t-sm); }

.admin-alert { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #f0d3cd; border-radius: var(--radius); background: var(--red-soft); color: var(--red); }
.admin-alert > span { flex: 1; display: grid; }
.admin-alert small { color: var(--soft-ink); font-size: var(--t-sm); }
.admin-alert.ok { border-color: #d5e1d5; background: var(--green-soft); color: var(--green); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.admin-stats .stat-tile small { color: var(--green); font-size: var(--t-xs); font-weight: 600; }
.admin-grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.admin-grid-2 .panel-card + .panel-card { margin-top: 0; }
.admin-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-xs); }
.admin-legend i { width: 10px; height: 10px; margin-left: 4px; border-radius: 3px; }
.lg-posts, .b-posts { background: var(--green); }
.lg-comments, .b-comments { background: #9cc3a6; }
.lg-users, .b-users { background: var(--orange); }
.admin-chart { height: 180px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; }
.admin-bar { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 4px; min-width: 0; }
.admin-bar-stack { display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line); }
.admin-bar-stack span { width: 30%; max-width: 10px; min-height: 2px; border-radius: 3px 3px 0 0; }
.admin-bar small { overflow: hidden; color: var(--muted); font-size: var(--t-2xs); text-align: center; white-space: nowrap; }
.admin-kv { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.admin-kv li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: var(--t-md); }
.admin-kv li:last-child { border-bottom: 0; }
.admin-kv a { color: var(--green); font-weight: 700; text-decoration: underline; }

.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-toolbar .search-box { flex: 1 1 240px; width: auto; }
.admin-toolbar select { height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: var(--t-md); }
.admin-filter-user { display: inline-flex; align-items: center; gap: 4px; padding-left: 12px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: var(--t-md); }
.admin-list { display: grid; gap: 10px; }
.admin-list .sub-title { margin: 8px 0 0; }
.admin-row { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.admin-row-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.admin-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.admin-row-title a:hover { text-decoration: underline; }
.admin-row-text { display: -webkit-box; margin: 0; overflow: hidden; color: var(--soft-ink); font-size: var(--t-md); white-space: pre-line; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.admin-row-text.full { display: block; }
.admin-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--muted); font-size: var(--t-sm); }
.admin-row-meta .i { width: 14px; height: 14px; vertical-align: -2px; }
.admin-row-meta a { color: var(--green); }
.admin-row .mod-actions { margin-top: 4px; }
.admin-row .text-button .i, .admin-row .secondary-button .i { width: 16px; height: 16px; vertical-align: -3px; }
.secondary-button.small { min-height: 36px; padding: 0 12px; gap: 6px; font-size: var(--t-md); }
.admin-thumb { width: 88px; height: 88px; flex: none; border-radius: 12px; object-fit: cover; background: #f1efe6; }
.admin-thumb.empty { display: grid; place-items: center; color: var(--muted); }
.admin-link { padding: 0; border: 0; background: none; color: var(--green); font-size: inherit; font-weight: 600; cursor: pointer; }
.admin-link:hover { text-decoration: underline; }
.admin-link.strong { color: var(--ink); font-weight: 700; }
.admin-reasons { padding: 8px 12px; border-radius: 10px; background: #fbfaf4; font-size: var(--t-md); }
.admin-reasons summary { color: var(--red); font-weight: 700; cursor: pointer; }
.admin-reasons ul { margin: 6px 0 0; padding-left: 18px; color: var(--soft-ink); }
.admin-reasons small { color: var(--muted); }

.admin-log { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.admin-log li { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--t-md); }
.admin-log li:last-child { border-bottom: 0; }
.admin-log li > .i { width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
.admin-log li > div { display: grid; }
.admin-log a { color: var(--green); text-decoration: underline; }
.admin-log small { color: var(--muted); font-size: var(--t-sm); }

.admin-checks { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.admin-checks li { display: flex; align-items: flex-start; gap: 10px; color: var(--amber); }
.admin-checks li.ok { color: var(--green); }
.admin-checks li > span { display: grid; color: var(--ink); font-size: var(--t-md); }
.admin-checks small { color: var(--muted); font-size: var(--t-sm); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--t-md); }
.admin-table th { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--t-xs); font-weight: 700; text-align: left; text-transform: uppercase; white-space: nowrap; }
.admin-table td { padding: 9px 10px; border-bottom: 1px dashed var(--line); white-space: nowrap; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a:hover { color: var(--green); text-decoration: underline; }
.admin-yes { color: var(--green); }
.admin-yes .i { width: 18px; height: 18px; }
.admin-no { color: #b8bdb5; }
.admin-entry { margin-top: 12px; }

@media (max-width: 900px) {
  .admin-app { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-tabs { position: sticky; top: 72px; z-index: 5; min-width: 0; display: flex; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: none; min-height: 40px; }
  .admin-badge { margin-left: 2px; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  #adminPage .detail-main { padding: calc(var(--bar-h) + var(--safe-t) + 6px) 14px 28px; }
  #adminPage .app-bar { background: #fffefaf2; box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #adminPage .app-bar-button { box-shadow: none; background: transparent; }
  #adminPage .app-bar-title { opacity: 1; }
  .admin-tabs { top: calc(var(--bar-h) + var(--safe-t) + 6px); }
  .admin-head { margin: 4px 0 12px; }
  .admin-head > div:first-child { display: none; }
  .admin-row-main { gap: 4px; }
  .admin-row .mod-actions { gap: 4px 8px; }
  .admin-row { padding: 12px; gap: 10px; }
  .admin-thumb { width: 64px; height: 64px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-toolbar .search-box { flex-basis: 100%; }
  .admin-toolbar select { flex: 1; }
}

/* ---------- Nguyên liệu (cẩm nang) ---------- */
.food-search { width: 100%; margin-top: 16px; }
.food-groups { margin: 14px 0 4px; padding-bottom: 2px; }
.food-groups .category-tab { display: inline-flex; align-items: center; text-decoration: none; }
.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.food-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.food-card:hover { border-color: #b9cdb9; }
.food-card[hidden], .food-group[hidden] { display: none; }
.food-card-emoji { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--card-bg, var(--green-soft)); font-size: var(--t-2xl); }
.food-card-name { font-weight: 700; font-size: var(--t-md); line-height: 1.3; }
.food-card small { color: var(--muted); font-size: var(--t-xs); }
.ingredient-rows a { color: inherit; text-decoration: underline; text-decoration-color: #b9cdb9; text-underline-offset: 3px; }
.ingredient-rows a:hover { color: var(--green); }
@media (max-width: 640px) {
  .food-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-link small { display: none; }
}

/* ---------- Banner trang chủ (soạn ở /quan-tri/ → Banner) ---------- */
.banner-carousel { position: relative; margin-top: 8px; }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 24px; scrollbar-width: none; overscroll-behavior-x: contain; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { position: relative; flex: 0 0 100%; min-height: 300px; display: flex; align-items: center; padding: 44px 56px; overflow: hidden; background: var(--banner-bg, #e9eee5); color: var(--ink); scroll-snap-align: start; scroll-snap-stop: always; }
.banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-slide.has-image::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #000000a6 0%, #00000059 45%, #0000 75%); }
.banner-copy { position: relative; z-index: 2; max-width: 520px; display: grid; justify-items: start; gap: 10px; }
.banner-copy strong { font: 800 clamp(28px, 4vw, 44px)/1.12 var(--heading); letter-spacing: -.02em; }
.banner-copy small { color: var(--soft-ink); font-size: var(--t-lg); line-height: 1.55; }
.banner-slide.has-image .banner-copy { color: #fff; }
.banner-slide.has-image .banner-copy small { color: #ffffffe0; }
.banner-button { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 0 18px; border-radius: 12px; background: var(--green); color: #fff; font-size: var(--t-base); font-weight: 700; }
.banner-button .i { width: 18px; height: 18px; }
a.banner-slide:hover .banner-button { background: var(--green-dark); }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.banner-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #ffffff99; box-shadow: 0 0 0 1px #0000001a; cursor: pointer; pointer-events: auto; transition: width .2s, background .2s; }
.banner-dots button[aria-current] { width: 22px; background: #fff; }

/* ---------- Bài viết: hàng trên trang chủ, danh sách, trang bài ---------- */
.article-home { margin-top: 28px; }
.article-home .section-topline h2 { font-size: var(--t-3xl); }
.article-home .see-all { margin: 0; padding: 0; border: 0; font-size: var(--t-md); }
.article-home .see-all .i { width: 16px; height: 16px; }
.article-row { display: flex; gap: 14px; margin: 14px -20px 0; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.article-row::-webkit-scrollbar { display: none; }
.article-row .article-card { flex: 0 0 280px; scroll-snap-align: start; }
.article-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .2s, transform .2s; }
.article-card:hover { border-color: #b9cdb9; transform: translateY(-2px); }
.article-cover { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: var(--green-soft); color: var(--green); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-cover .i { width: 36px; height: 36px; opacity: .6; }
.article-copy { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.article-copy strong { display: -webkit-box; overflow: hidden; font: 800 var(--t-lg)/1.35 var(--heading); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-copy small { display: -webkit-box; overflow: hidden; color: var(--soft-ink); font-size: var(--t-md); line-height: 1.5; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-meta { margin-top: auto; color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.article-page { max-width: 720px; margin: 0 auto; }
.article-head { margin: 18px 0 18px; }
.article-head h1 { margin: 8px 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.18; letter-spacing: -.02em; }
.article-lead { margin: 0; color: var(--soft-ink); font-size: var(--t-xl); line-height: 1.6; }
.article-hero { width: 100%; aspect-ratio: 16 / 9; margin-bottom: 20px; border-radius: var(--radius); object-fit: cover; display: block; background: var(--green-soft); }
.article-toc { margin-bottom: 22px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: var(--t-md); }
.article-toc ol { margin: 6px 0 0; padding-left: 20px; }
.article-toc a { color: var(--green); font-weight: 600; }
.article-body { color: #2f3d33; font-size: var(--t-lg); line-height: 1.75; }
.article-body h2 { margin: 30px 0 10px; font-size: var(--t-3xl); scroll-margin-top: 80px; }
.article-body h3 { margin: 22px 0 8px; font-size: var(--t-xl); scroll-margin-top: 80px; }
.article-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--green); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.article-body blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0; background: var(--amber-soft); }
.article-body blockquote p { margin: 0; }
.article-body figure { margin: 0 0 18px; }
.article-body figure img { width: 100%; border-radius: 14px; display: block; }
.article-body figcaption { margin-top: 6px; color: var(--muted); font-size: var(--t-sm); text-align: center; }
.article-more { max-width: 720px; margin: 36px auto 0; }
.article-more h2 { font-size: var(--t-2xl); }
.article-more .article-row { margin-inline: 0; padding-inline: 0; }

/* ---------- Trình soạn bài viết, banner (/quan-tri/) ---------- */
.editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.editor-bar .text-button .i { width: 18px; height: 18px; vertical-align: -4px; }
.editor-state { color: var(--muted); font-size: var(--t-sm); font-weight: 600; }
.editor-state.unsaved { color: var(--amber); }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.editor-main { display: grid; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.editor-side { position: sticky; top: 80px; display: grid; gap: 12px; }
.editor-side .panel-card { padding: 16px; }
.editor-side .panel-card + .panel-card { margin-top: 0; }
.editor-side .card-title { margin-bottom: 8px; font-size: var(--t-lg); }
.editor-title textarea { width: 100%; padding: 0; overflow: hidden; border: 0; outline: 0; background: none; resize: none; font: 800 var(--t-4xl)/1.2 var(--heading); letter-spacing: -.02em; }
.editor-slug { display: flex; align-items: center; gap: 2px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfbf6; color: var(--muted); font-size: var(--t-sm); }
.editor-slug input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; background: none; color: var(--ink); font-size: var(--t-sm); font-weight: 600; }
.editor-field { display: grid; gap: 6px; color: var(--soft-ink); font-size: var(--t-md); font-weight: 600; }
.editor-field small { color: var(--muted); font-weight: 400; }
.editor-field small.over { color: var(--red); font-weight: 700; }
.editor-field input:not([type=color]), .editor-field textarea, .editor-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: var(--t-base); font-weight: 400; color: var(--ink); }
.editor-field input:focus, .editor-field textarea:focus, .editor-textarea:focus { outline: 0; border-color: #84a18b; box-shadow: 0 0 0 3px var(--green-soft); }
.editor-field input[type=color] { width: 100%; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.editor-body { display: grid; gap: 8px; }
.editor-tools { position: sticky; top: 72px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbf6; }
.editor-tools > button, .editor-tool-file { min-height: 34px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--soft-ink); font-size: var(--t-sm); font-weight: 700; cursor: pointer; }
.editor-tools > button:hover, .editor-tool-file:hover { background: var(--green-soft); color: var(--green); }
.editor-tool-file .i { width: 16px; height: 16px; }
.editor-tabs { display: flex; gap: 2px; margin-left: auto; padding: 2px; border-radius: 10px; background: #eeeee7; }
.editor-tabs button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: var(--t-sm); font-weight: 700; cursor: pointer; }
.editor-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px #0000001a; }
.editor-textarea { min-height: 420px; resize: vertical; font-size: var(--t-lg); line-height: 1.7; }
.editor-preview { min-height: 420px; padding: 4px 2px; }
.editor-help { margin: 0; color: var(--muted); font-size: var(--t-xs); }
.editor-actions { display: grid; gap: 8px; }
.editor-actions > .primary-button, .editor-actions > .secondary-button { width: 100%; }
.editor-actions .text-button { justify-self: start; }
.editor-actions .text-button .i { width: 16px; height: 16px; vertical-align: -3px; }
.editor-switch { margin-top: 12px; }
.cover-picker { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border: 1.5px dashed #c9d6c9; border-radius: 12px; background: #fbfbf6; color: var(--muted); text-align: center; cursor: pointer; }
.cover-picker img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-picker span { display: grid; justify-items: center; gap: 2px; font-size: var(--t-sm); }
.cover-picker span .i { width: 28px; height: 28px; color: var(--green); }
.cover-picker strong { color: var(--ink); }
.busy { opacity: .55; pointer-events: none; }
.cover-picker.busy::after, .editor-tool-file.busy::after { content: "Đang tải ảnh…"; position: absolute; inset: 0; display: grid; place-items: center; background: #fffefacc; color: var(--ink); font-size: var(--t-sm); font-weight: 700; }
.editor-tool-file { position: relative; }
.serp { display: grid; gap: 2px; margin-top: 10px; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.serp small { color: #4d5156; font-size: var(--t-xs); }
.serp strong { color: #1a0dab; font-size: var(--t-lg); font-weight: 500; line-height: 1.3; }
.serp span { color: #4d5156; font-size: var(--t-sm); line-height: 1.45; }
.banner-editor { display: grid; gap: 14px; }
.banner-preview .banner-slide { min-height: 240px; }
.banner-fields { display: grid; gap: 12px; }
.banner-fields .panel-card + .panel-card { margin-top: 0; }
.banner-image-actions { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.banner-image-actions label { position: relative; cursor: pointer; }
.banner-mini { position: relative; width: 120px; height: 56px; flex: none; overflow: hidden; border-radius: 10px; background: var(--banner-bg, #e9eee5); }
.banner-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-row .icon-button.small:disabled { opacity: .35; cursor: default; }
.i.rot-up { transform: rotate(-90deg); }
.i.rot-down { transform: rotate(90deg); }

@media (max-width: 900px) {
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; }
}
@media (max-width: 680px) {
  .banner-carousel { margin-top: 4px; }
  .banner-track { border-radius: 20px; }
  .banner-slide { min-height: 200px; padding: 26px 20px 34px; }
  .banner-copy { max-width: 85%; gap: 6px; }
  .banner-copy small { font-size: var(--t-md); }
  .banner-button { min-height: 38px; padding: 0 14px; font-size: var(--t-md); }
  .banner-slide.has-image::before { background: linear-gradient(90deg, #000000b3 0%, #00000066 60%, #0000001a 100%); }
  .article-home { margin-top: 22px; }
  .article-home .section-topline { display: flex; flex-direction: row; align-items: flex-end; gap: 10px; }
  .article-home .see-all { flex: none; padding-bottom: 4px; }
  .article-home .section-topline h2 { font-size: var(--t-2xl); }
  .article-row { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; gap: 10px; }
  .article-row .article-card { flex-basis: 240px; }
  .article-grid { grid-template-columns: 1fr; gap: 12px; }
  #articleView, .article-page { padding: 0 16px; }
  .article-page .article-head { margin-top: calc(var(--bar-h) + var(--safe-t) + 4px); }
  .article-more { padding: 0 16px; }
  .article-index-head { margin-top: calc(var(--bar-h) + var(--safe-t) + 4px); padding: 0 16px; }
  .article-grid { padding: 0 16px; }
  .editor-main { padding: 14px; }
  .editor-title textarea { font-size: var(--t-3xl); }
  .editor-tools { top: calc(var(--bar-h) + var(--safe-t) + 60px); }
  .editor-tabs { margin-left: 0; }
  .banner-mini { width: 72px; height: 44px; }
}

/* Nguyên liệu: món thường nấu */
.dish-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.dish-chips li { padding: 7px 12px; border-radius: 999px; background: #f5f6f0; font-size: var(--t-sm); font-weight: 600; }

/* Cộng đồng: 2 phần "Bài của mọi người" | "Video hay" */
.community-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.community-part { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--soft-ink); font: 700 var(--t-md) var(--font); cursor: pointer; }
.community-part .i { width: 18px; height: 18px; }
.community-part[aria-selected="true"] { border-color: var(--green); background: var(--green); color: #fff; }
.video-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.video-toolbar .secondary-button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.video-toolbar .secondary-button .i { width: 16px; height: 16px; }
.video-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.video-tile { min-width: 0; }
.video-tile-cover { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: linear-gradient(160deg, #3a4a3e, #1d2620); color: #fff; }
.video-tile-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-tile-fallback { position: absolute; inset: 0; display: grid; place-items: center; opacity: .35; }
.video-tile-fallback .i { width: 40px; height: 40px; }
.video-tile-play { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #ffffffe6; color: var(--ink); padding-left: 2px; }
.video-tile-play .i { width: 18px; height: 18px; }
.video-pin { position: absolute; top: 10px; right: 10px; padding: 4px 9px; border-radius: 999px; background: var(--amber); color: #fff; font-size: var(--t-2xs); font-weight: 700; }
.video-tile-body { display: grid; gap: 2px; margin-top: 8px; }
.video-tile-body h3 { margin: 0; font-size: var(--t-md); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-tile-body h3 a { color: var(--ink); text-decoration: none; }
.video-tile-body small { color: var(--muted); font-size: var(--t-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-facade .video-play { position: relative; }
.video-facade.link-only { text-decoration: none; cursor: pointer; }
.video-sheet .video-frame { border-radius: 0; }
.video-sheet .video-frame.vertical { height: min(68vh, 640px); max-height: none; width: auto; margin: 0 auto; }
.video-detail { display: grid; gap: 10px; justify-items: start; }
.video-detail h2 { margin: 0; font-size: var(--t-2xl); }
.video-credit { margin: 0; color: var(--soft-ink); font-size: var(--t-md); }
.video-credit a { color: var(--green); font-weight: 700; }
.video-suggester { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--soft-ink); font-size: var(--t-sm); }
.video-detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.video-detail-actions .primary-button, .video-detail-actions .secondary-button { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.video-detail-actions .i { width: 16px; height: 16px; }
.video-lookup { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: #f5f6f0; }
.video-lookup img, .video-lookup-icon { width: 72px; height: 54px; flex: none; border-radius: 8px; object-fit: cover; background: #2a352d; }
.video-lookup-icon { display: grid; place-items: center; color: #fff; }
.video-lookup > span:last-child { display: grid; gap: 2px; min-width: 0; font-size: var(--t-md); }
.video-lookup small { color: var(--muted); font-size: var(--t-sm); }
.my-suggestions { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.my-suggestions li { display: flex; align-items: center; gap: 8px; font-size: var(--t-md); }
.my-suggestions li > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-videos .video-grid { margin-top: 4px; }
@media (max-width: 680px) {
  .video-toolbar { flex-wrap: wrap; }
  .video-toolbar .category-tabs { flex: 1 1 100%; order: 2; }
  .video-toolbar .secondary-button { margin-left: auto; }
  .video-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .community-part { font-size: var(--t-sm); }
}
/* Quản trị: Video hay */
.video-admin-form { display: grid; gap: 12px; margin-bottom: 14px; }
.video-admin-thumb { position: relative; flex: none; width: 96px; height: 128px; overflow: hidden; border-radius: 12px; background: linear-gradient(160deg, #3a4a3e, #1d2620); }
.video-admin-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-admin-thumb .video-platform { top: 6px; left: 6px; padding: 2px 7px; font-size: var(--t-2xs); }
@media (max-width: 680px) { .video-admin-thumb { width: 72px; height: 96px; } }

/* Nguyên liệu: ảnh thật */
.detail-hero.has-image { overflow: hidden; }
.related-emoji img, .food-card-emoji img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.related-emoji:has(img), .food-card-emoji:has(img) { overflow: hidden; }
.photo-credit { margin: 18px 0 0; color: var(--soft-ink); font-size: var(--t-2xs); }
.photo-credit a { color: inherit; }

/* Ảnh món thành phẩm (data/recipe-images.js); món chưa có ảnh vẫn hiện emoji */
.recipe-visual.has-image::before, .recipe-visual.has-image::after { display: none; }
.recipe-visual .recipe-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.recipe-card:hover .recipe-photo { transform: scale(1.04); }
.recipe-visual.has-image .recipe-badge { z-index: 2; }
.dialog-hero.has-image { overflow: hidden; }
.dialog-hero .recipe-photo { width: 100%; height: 100%; object-fit: cover; }
.board-emoji img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; }
.board-cell.is-multi .board-emoji img { width: 26px; height: 26px; border-radius: 7px; }
.meal-chip-art, .fridge-cook-art { display: inline-grid; place-items: center; flex: 0 0 auto; }
.meal-chip-art img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; display: block; }
.fridge-cook-art img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: block; }

/* ---------- Mâm cơm mẫu (trang chủ, /mam-com/) ---------- */
.mam-home { margin-top: 28px; }
.mam-tabs { margin-top: 12px; }
.mam-row { display: flex; gap: 14px; margin: 14px -20px 0; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.mam-row::-webkit-scrollbar { display: none; }
.mam-row.is-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 12px 0 0; padding: 0; overflow: visible; }
.mam-card { flex: 0 0 220px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); scroll-snap-align: start; transition: border-color .2s; }
.mam-card:hover { border-color: #b9cbb9; }
.mam-card[hidden] { display: none; }
.mam-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; aspect-ratio: 4 / 3; background: var(--card-bg, #f3eadc); }
.mam-mosaic > span { min-width: 0; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #ffffffa6; font-size: var(--t-4xl); line-height: 1; }
.mam-mosaic > span:only-child, .mam-mosaic > span:first-child:nth-last-child(3) { grid-row: span 2; }
.mam-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.mam-mosaic.is-large { width: min(420px, 86%); grid-template-columns: repeat(3, 1fr); aspect-ratio: auto; height: 78%; padding: 0; background: none; }
.mam-mosaic.is-large > span { grid-row: auto; font-size: var(--t-5xl); }
.detail-hero .mam-mosaic.is-large > span { filter: none; font-size: var(--t-5xl); }
.mam-copy { display: grid; gap: 2px; padding: 12px 14px 14px; }
.mam-copy strong { font: 800 var(--t-base)/1.35 var(--heading); }
.mam-tag { color: var(--green); font-size: var(--t-2xs); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.mam-meta { color: var(--muted); font-size: var(--t-sm); }
.mam-group { margin-top: 26px; }
.mam-group h2 { margin: 0 0 4px; font-size: var(--t-2xl); }
.mam-extras { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mam-extras li { padding: 12px 14px; border-radius: 12px; background: #f3f4ee; }
.mam-extras p { margin: 2px 0 0; color: var(--muted); font-size: var(--t-md); }
.mam-extra-tag { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-size: var(--t-2xs); font-weight: 800; }
.mam-tips { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.shop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.shop-chip { padding: 8px 12px; border: 1px solid #f1c9b8; border-radius: 999px; background: #fff4ee; color: #b4492a; font-size: var(--t-md); font-weight: 700; }
.shop-chip:hover { background: #ffe8dc; }
.aff-note { margin: 12px 0 0; color: #8a9189; font-size: var(--t-xs); }
.mam-form label { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 700; font-size: var(--t-md); }
.mam-form input, .mam-form select { height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font: inherit; font-size: var(--t-lg); font-weight: 400; }
