/* ═══════════════════════════════════════════════════════════════
   TIMELESS HARMONY — "VƯỜN KÍNH" · liquid glass
   Nguồn duy nhất cho màu, chữ và chất liệu kính của toàn site.
   File này nạp SAU <style> của từng trang nên biến ở đây luôn thắng.
   Hình nền: cảnh 3D dựng sẵn (docs/design/build_scene3d.py → post_scene3d.py → build_glass.js) → assets/bg/lake-*.webp.
   /liquid.js: kính dựng sẵn, vệt sáng theo con trỏ, bộ điều tiết độ mượt, nút ngắm cảnh và bắn pháo hoa.
   /fireworks.js: pháo hoa chuyển động trên cảnh nền (chỉ tải khi người dùng bấm nút).
   Quy chuẩn đầy đủ: docs/brand-guidelines.html
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. BẢNG MÀU GỐC ── */
:root {
  --th-ink:    #12261C;  /* Mực ngọc lục — chữ, logo */
  --th-emerald:#1E5A40;  /* Ngọc lục — nút chính */
  --th-gold:   #765225;  /* Vàng đồng — chữ nhấn, liên kết, icon (đủ tương phản) */
  --th-champagne: #C7A262; /* Vàng champagne — trang trí, viền mảnh */
  --th-blush:  #F4A9BC;  /* Hồng tulip — chỉ trong hình vẽ, logo */
  --th-sky:    #86BFF2;  /* Trời */
  --th-cream:  #F8E7D2;  /* Nắng sớm */
  --th-night:  #040A1A;  /* Trời đêm */
  --gold-grad: linear-gradient(100deg, #7A5A2B 0%, #C7A262 46%, #8A6534 100%);
  /* tên cũ, giữ để tài liệu/trang cũ không vỡ */
  --th-leaf: var(--th-emerald); --th-forest: var(--th-ink); --th-moss: var(--th-emerald); --th-tulip: var(--th-blush);
  --th-tulip-deep: var(--th-gold); --th-linen: #F1ECE4; --th-paper: #F7F4EE; --th-ivory: #FFFFFF; --th-sage: #9DBBA8;

  --font-display: 'Cormorant Garamond', 'Philosopher', Georgia, 'Times New Roman', serif;
  --font-body:    'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:   'Lora', Georgia, 'Times New Roman', serif;
  --serif: var(--font-display);
  --sans:  var(--font-body);
  --radius: 16px;
  --r: 24px;
  --blur: 26px;
  --spring: cubic-bezier(.2, 1.4, .4, 1);
}

/* ── 2. CHẾ ĐỘ TỐI — "Đêm vườn" (khi <body> không có class .light) ── */
:root {
  --sky: linear-gradient(180deg, #040A1A 0%, #0B1D3E 55%, #1A3A5E 100%);
  --bg-scene: url(/assets/bg/lake-night.webp);  --bg-glass: url(/assets/bg/lake-night-glass.webp);
  --backdrop: blur(var(--blur)) saturate(1.25) brightness(.72);
  --nav-backdrop: blur(14px) saturate(1.5) brightness(.8);
  --chip-special: linear-gradient(135deg, rgba(44,38,22,.9), rgba(26,24,16,.84));
  --drop-fx: blur(10px) saturate(1.6) brightness(.8);
  --pane: linear-gradient(135deg, rgba(16,32,46,.78), rgba(8,20,32,.66) 50%, rgba(14,28,42,.72));
  --pane-strong: linear-gradient(135deg, rgba(14,28,40,.86), rgba(10,22,32,.8));
  --edge: rgba(255,255,255,.16);  --edge-soft: rgba(255,255,255,.1);
  --rim: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1.5px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(255,255,255,.1),
         inset 0 16px 26px -18px rgba(255,255,255,.22), inset 0 -16px 26px -20px rgba(160,200,255,.14);
  --pane-shadow: 0 34px 70px -30px rgba(0,0,0,.7), 0 2px 6px rgba(0,0,0,.25), var(--rim);
  --card-shadow: 0 14px 30px -18px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.14);
  --shine: rgba(255,255,255,.12);
  --field: rgba(10,22,34,.7);  --chip: rgba(10,22,34,.72);  --menu: rgba(12,24,36,.95);
  --btn-grad: linear-gradient(180deg, #F6E9C6 0%, #D8BA7A 100%);  --btn-edge: rgba(255,255,255,.55);
  --btn-shadow: 0 14px 26px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.8), inset 0 -8px 14px -8px rgba(122,86,40,.5);
  --btn2: linear-gradient(135deg, rgba(20,38,54,.82), rgba(10,22,34,.72));

  --bg: rgba(10,22,32,.66);  --bg2: rgba(255,255,255,.07);  --bg3: rgba(255,255,255,.11);
  --nav-bg: linear-gradient(135deg, rgba(16,32,46,.82), rgba(8,20,32,.72));
  --line: rgba(255,255,255,.12);  --line2: rgba(255,255,255,.22);
  --text: #F3F5F1;  --text2: #D5DED8;  --text3: #AFC0B7;
  --ink-rgb: 243,245,241;
  --accent: #E7CF9B;  --accent-strong: #F6EBCB;  --accent-rgb: 231,207,155;
  --accent-bg: rgba(231,207,155,.12);  --accent-line: rgba(231,207,155,.32);  --accent-soft: rgba(231,207,155,.16);
  --tulip: #E7CF9B;  --tulip-bg: rgba(231,207,155,.14);  --em-grad: linear-gradient(100deg, #F6EBCB, #D8BA7A 50%, #F3E2B4);
  --icon: #E7CF9B;
  --card-bg: rgba(255,255,255,.07);  --card-border: rgba(255,255,255,.15);
  --search-bg: rgba(10,22,34,.72);
  --btn-primary-bg: #E7CF9B;  --btn-primary-text: #1B2A1F;
  --inverse-bg: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.07));  --inverse-text: #F6F8F4;  --inverse-tulip: #F6EBCB;
  --user-bubble: rgba(231,207,155,.2);  --user-border: rgba(231,207,155,.32);
  --ai-bubble: rgba(14,28,40,.6);  --ai-border: rgba(255,255,255,.16);
  --table-even: rgba(255,255,255,.04);
  --surface: rgba(255,255,255,.07);  --border: rgba(255,255,255,.18);  --muted: #AFC0B7;  --white: rgba(255,255,255,.08);
  --danger: #FF9A8A;  --success: #A9DDB8;
  --tint-plan: linear-gradient(135deg, rgba(231,207,155,.26), rgba(255,255,255,.04));
  --tint-photo: linear-gradient(135deg, rgba(140,196,180,.26), rgba(255,255,255,.04));
  --tint-flower: linear-gradient(135deg, rgba(244,169,188,.26), rgba(255,255,255,.04));
  --tint-beauty: linear-gradient(135deg, rgba(226,170,210,.24), rgba(255,255,255,.04));
  --tint-music: linear-gradient(135deg, rgba(160,160,232,.26), rgba(255,255,255,.04));
  --tint-food: linear-gradient(135deg, rgba(240,196,130,.24), rgba(255,255,255,.04));
  --tint-venue: linear-gradient(135deg, rgba(130,180,236,.26), rgba(255,255,255,.04));
  --tint-unique: linear-gradient(135deg, rgba(236,160,136,.24), rgba(255,255,255,.04));
  --tint-soon: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
}

/* ── 3. CHẾ ĐỘ SÁNG — mặc định: nắng sớm trên đồng hoa ── */
body.light {
  --sky: linear-gradient(180deg, #4C97E6 0%, #86BFF2 45%, #CDE6F9 100%);
  --bg-scene: url(/assets/bg/lake-day.webp);  --bg-glass: url(/assets/bg/lake-day-glass.webp);
  --backdrop: blur(var(--blur)) saturate(1.3) contrast(.62) brightness(1.24);   /* nén tương phản của cảnh sau kính: vùng tối (hàng bách) sáng lên, chữ luôn đọc được */
  --nav-backdrop: blur(14px) saturate(1.5) contrast(.62) brightness(1.24);
  --chip-special: linear-gradient(135deg, rgba(255,251,240,.94), rgba(250,238,210,.86));
  --drop-fx: blur(10px) saturate(1.6) contrast(.62) brightness(1.24);      /* giọt kính đứng trực tiếp trên cảnh */
  --pane: linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,255,255,.74) 48%, rgba(255,255,255,.78));
  --pane-strong: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  --edge: rgba(255,255,255,.8);  --edge-soft: rgba(255,255,255,.5);
  --rim: inset 0 0 0 1px rgba(255,255,255,.5), inset 0 1.5px 0 rgba(255,255,255,.98), inset 0 -1px 0 rgba(255,255,255,.55),
         inset 0 18px 28px -18px rgba(255,255,255,.95), inset 0 -18px 28px -20px rgba(255,255,255,.6),
         inset 16px 0 26px -22px rgba(255,255,255,.7), inset -16px 0 26px -22px rgba(255,255,255,.55);
  --pane-shadow: 0 36px 70px -32px rgba(18,44,66,.46), 0 3px 8px rgba(18,44,66,.06), var(--rim);
  --card-shadow: 0 14px 30px -18px rgba(18,44,66,.32), inset 0 1px 0 rgba(255,255,255,.95);
  --shine: rgba(255,255,255,.42);
  --field: rgba(255,255,255,.76);  --chip: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.76));  --menu: rgba(255,255,255,.95);
  --btn-grad: linear-gradient(180deg, rgba(40,104,76,.94) 0%, rgba(14,50,36,.96) 100%);  --btn-edge: rgba(231,207,155,.5);
  --btn-shadow: 0 16px 28px -14px rgba(12,46,32,.7), inset 0 1px 0 rgba(255,255,255,.45), inset 0 -10px 16px -10px rgba(0,0,0,.35), inset 0 10px 14px -10px rgba(255,255,255,.3);
  --btn2: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.74));

  --bg: rgba(255,255,255,.62);  --bg2: rgba(255,255,255,.42);  --bg3: rgba(255,255,255,.58);
  --nav-bg: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.76) 50%, rgba(255,255,255,.8));
  --line: rgba(18,38,28,.11);  --line2: rgba(18,38,28,.2);
  --text: var(--th-ink);  --text2: #2B4336;  --text3: #40574A;
  --ink-rgb: 18,38,28;
  --accent: var(--th-gold);  --accent-strong: var(--th-ink);  --accent-rgb: 122,86,40;
  --accent-bg: rgba(199,162,98,.16);  --accent-line: rgba(122,86,40,.32);  --accent-soft: rgba(199,162,98,.2);
  --tulip: var(--th-gold);  --tulip-bg: rgba(199,162,98,.16);  --em-grad: var(--gold-grad);
  --icon: var(--th-gold);
  --card-bg: linear-gradient(135deg, rgba(255,255,255,.58), rgba(255,255,255,.34));  --card-border: rgba(255,255,255,.78);
  --search-bg: rgba(255,255,255,.82);
  --btn-primary-bg: var(--th-emerald);  --btn-primary-text: #FBF7EE;
  --inverse-bg: linear-gradient(135deg, rgba(24,74,54,.84), rgba(10,40,30,.88));  --inverse-text: #FBF7EE;  --inverse-tulip: #EBD6A6;
  --user-bubble: linear-gradient(135deg, rgba(231,207,155,.62), rgba(246,235,203,.5));  --user-border: rgba(122,86,40,.24);
  --ai-bubble: linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.5));  --ai-border: rgba(255,255,255,.9);
  --table-even: rgba(18,38,28,.035);
  --surface: rgba(255,255,255,.5);  --border: rgba(18,38,28,.15);  --muted: #40574A;  --white: rgba(255,255,255,.55);
  --danger: #A8281F;  --success: var(--th-emerald);
  --tint-plan: linear-gradient(135deg, rgba(244,226,190,.78), rgba(255,255,255,.32));
  --tint-photo: linear-gradient(135deg, rgba(200,226,214,.78), rgba(255,255,255,.32));
  --tint-flower: linear-gradient(135deg, rgba(247,212,222,.8), rgba(255,255,255,.32));
  --tint-beauty: linear-gradient(135deg, rgba(238,214,232,.78), rgba(255,255,255,.32));
  --tint-music: linear-gradient(135deg, rgba(214,212,242,.8), rgba(255,255,255,.32));
  --tint-food: linear-gradient(135deg, rgba(248,222,196,.78), rgba(255,255,255,.32));
  --tint-venue: linear-gradient(135deg, rgba(200,220,242,.8), rgba(255,255,255,.32));
  --tint-unique: linear-gradient(135deg, rgba(244,208,196,.78), rgba(255,255,255,.32));
  --tint-soon: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.24));
}

/* ── 4. NỀN & KIỂU CHỮ ── */
html { background: var(--th-sky); }
html:has(body:not(.light)) { background: var(--th-night); }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: transparent !important;
  color: var(--text);
  text-rendering: optimizeLegibility;
}
/* Khung cảnh cố định phía sau mọi thứ: lễ cưới trong vườn biệt thự bên hồ. Ảnh WebP xuất từ docs/design (bản ngang
   cho máy tính, bản dọc cho điện thoại). Pháo hoa không nằm trong ảnh: fireworks.js vẽ nó thành chuyển động (mục 10). */
body::before {
  content: ''; position: fixed; z-index: -1; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh;
  pointer-events: none;
  background: var(--bg-scene) center bottom / cover no-repeat, var(--sky);
}
/* Tiêu đề: Cormorant Garamond (serif thanh mảnh). font-size-adjust bù chiều cao chữ thường thấp của phông. */
h1, h2, h3 { font-family: var(--font-display); font-size-adjust: .46; letter-spacing: -.005em; }
h1, h2 { font-weight: 600; }
h3, h4 { font-weight: 700; }
h1 em, h2 em, h3 em, [class*="title"] em { font-style: italic; font-weight: 500; color: var(--tulip); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  h1 em, h2 em, [class*="title"] em {
    background: var(--em-grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent; padding-right: .06em;
  }
}
::selection { background: var(--th-emerald); color: #fff; }

/* ── 5. ICON: nét vẽ cũ màu vàng → màu icon của thương hiệu ── */
[stroke="#c9a96e"] { stroke: var(--icon); }
[fill="#c9a96e"]   { fill: var(--icon); }

/* ── 6. LOGO ──
   Chữ "Timeless Harmony" trong HTML giữ lại cho trình đọc màn hình & SEO;
   hình hiển thị là logo vector vẽ lại từ artwork gốc (docs/logo/build_logo.py). */
.nav-logo, a.logo {
  display: inline-flex; align-items: center; gap: 0; /* chữ ẩn bên trong cũng là phần tử flex: dùng margin thay gap */
  font-size: 0 !important; letter-spacing: 0 !important; line-height: 0;
  color: var(--text); flex-shrink: 0;
}
.nav-logo::before, a.logo::before {
  content: ''; width: 34px; height: 34px;
  background: url(/assets/brand/logo-orb.svg) center / contain no-repeat;
  filter: drop-shadow(0 4px 8px rgba(30, 90, 140, .32));
}
.nav-logo::after, a.logo::after {
  content: ''; width: 140px; height: 11.4px; margin-left: 11px; background: currentColor;
  -webkit-mask: url(/assets/brand/logo-wordmark.svg) center / contain no-repeat;
          mask: url(/assets/brand/logo-wordmark.svg) center / contain no-repeat;
}
@media (max-width: 420px) {
  .nav-logo::after, a.logo::after { width: 112px; height: 9.1px; }
  .nav-logo::before, a.logo::before { width: 30px; height: 30px; }
}
.footer-logo {
  display: block; font-size: 0 !important; line-height: 0;
  width: 190px; height: 15.5px; background: var(--text);
  -webkit-mask: url(/assets/brand/logo-wordmark.svg) left center / contain no-repeat;
          mask: url(/assets/brand/logo-wordmark.svg) left center / contain no-repeat;
}

/* Tiện ích dùng lại: hình vẽ thương hiệu tô theo màu chữ hiện tại */
.th-art {
  display: block; background: currentColor; pointer-events: none;
  -webkit-mask: var(--art) center / contain no-repeat;
          mask: var(--art) center / contain no-repeat;
}
.th-art-mark      { --art: url(/assets/brand/logo-mark.svg);        aspect-ratio: 1 / 1; }
.th-art-mark-md   { --art: url(/assets/brand/logo-mark-medium.svg); aspect-ratio: 1 / 1; }
.th-art-compact   { --art: url(/assets/brand/logo-compact.svg);     aspect-ratio: 1 / 1; }
.th-art-infinity  { --art: url(/assets/brand/logo-infinity.svg);    aspect-ratio: 670 / 240; }
.th-art-lockup    { --art: url(/assets/brand/logo-lockup.svg);      aspect-ratio: 1242 / 1275; }
.th-art-horizontal{ --art: url(/assets/brand/logo-horizontal.svg);  aspect-ratio: 1726 / 406; }
.th-art-wordmark  { --art: url(/assets/brand/logo-wordmark.svg);    aspect-ratio: 1242 / 101; }
.th-art-tagline   { --art: url(/assets/brand/logo-tagline.svg);     aspect-ratio: 722 / 95; }
.th-art-tulip-tl  { --art: url(/assets/brand/tulip-top-left.svg);   aspect-ratio: 318 / 452; }
.th-art-tulip-r   { --art: url(/assets/brand/tulip-right.svg);      aspect-ratio: 213 / 240; }
.th-art-tulip-b   { --art: url(/assets/brand/tulip-bottom.svg);     aspect-ratio: 336 / 181; }
.th-art-tulip-bl  { --art: url(/assets/brand/tulip-bottom-left.svg); aspect-ratio: 228 / 194; }

/* Nền màu theo hạng mục (ảnh giữ chỗ cho tới khi có ảnh thật) */
.tint-plan   { background: var(--tint-plan); }
.tint-photo  { background: var(--tint-photo); }
.tint-flower { background: var(--tint-flower); }
.tint-beauty { background: var(--tint-beauty); }
.tint-music  { background: var(--tint-music); }
.tint-food   { background: var(--tint-food); }
.tint-venue  { background: var(--tint-venue); }
.tint-unique { background: var(--tint-unique); }
.tint-soon   { background: var(--tint-soon); }

/* ── 7. KÍNH LỎNG ──
   TẤM  : khối nội dung lớn — kính mờ sâu, viền bắt sáng, vệt sáng theo con trỏ.
   THẺ  : nằm trong tấm — kính mỏng, không làm mờ lần hai.
   GIỌT : thanh menu, nút, ô tìm kiếm, nhãn — kính trong hơn, dạng viên nang, đàn hồi khi chạm.
   Dùng lại bằng class .glass / .glass-strong / .liquid. */
.glass, .glass-strong, .hero-copy, body > .hero, #form-section > .hero, .page-header, .page-hero, .article-hero, body > .article-cover, #featuredWrap > .featured,
body > section:not(#hero):not(#planner):not(#cta),
.cats-section, .sup-section, #pageContent > .wrap, .articles, body > .article-body, body > .article-body ~ .related,
.page-hero + .content, .chat-inner > .welcome, #success-section, footer {
  background: radial-gradient(420px circle at var(--lx, -600px) var(--ly, -600px), var(--shine), transparent 65%), var(--pane);
  -webkit-backdrop-filter: var(--backdrop);
          backdrop-filter: var(--backdrop);
  border: 0;
  border-radius: 40px;
  box-shadow: var(--pane-shadow);
  --drop: none; --inner: none;  /* giọt kính và thẻ nổi bên trong tấm không làm mờ lần hai */
}
.glass-strong, body > .article-body, .page-hero + .content, body > .article-cover {
  background: radial-gradient(420px circle at var(--lx, -600px) var(--ly, -600px), var(--shine), transparent 65%), var(--pane-strong);
}

/* ── 7b. KÍNH DỰNG SẴN ──
   backdrop-filter buộc trình duyệt làm mờ lại nền ở mọi khung hình khi cuộn. Cảnh nền đứng yên, nên liquid.js chèn vào
   mỗi tấm kính lớn một lớp <i class="gl"><b></b></i>: ảnh nền ĐÃ làm mờ sẵn (assets/bg/*-glass.webp, sinh bằng
   docs/design/build_glass.js), ghim theo khung nhìn (position: fixed) và cắt theo hình tấm kính (clip-path). Tấm đó
   thôi dùng backdrop-filter; nhìn như cũ nhưng khi cuộn trình duyệt chỉ việc ghép lớp. Thanh menu, hộp thoại và giọt
   kính nhỏ vẫn làm mờ trực tiếp. Lớp ảnh vẽ ở 1/4 kích thước rồi phóng lên: ảnh đã mờ nên không mất gì, mà nhẹ bộ nhớ.
   LƯU Ý: tấm có lớp .gl và các phần tử bao ngoài nó không được có transform/filter, vì sẽ làm lệch ảnh ghim
   (liquid.js đo lại từng lớp; lớp nào lệch thì bị gỡ và tấm đó quay về backdrop-filter). */
.gl { display: none; }
html.pre .gl {
  display: block; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: inherit; clip-path: inset(0 round var(--gl-r, 40px));
}
html.pre .gl > b {
  position: fixed; left: 0; top: 0; width: 25%; height: 25vh; height: 25lvh;
  transform: scale(4); transform-origin: 0 0;
  background: var(--bg-glass) center bottom / cover no-repeat;
}
html.pre .gl::after { content: ''; position: absolute; inset: 0; background: inherit; }   /* lớp màu của tấm kính, phủ trên ảnh mờ */
html.pre :has(> .gl) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; isolation: isolate; transform: none !important; }
html.pre .gl-rel { position: relative; }
html.pre [data-r]:has(.gl) { transform: none !important; }
html.lite .gl { display: none !important; }

/* Tấm: khối ngang toàn trang → tấm kính nổi, có lề hai bên */
body > section:not(#hero):not(#planner):not(#cta), .cats-section, .sup-section, footer {
  width: min(1180px, calc(100% - 28px)); margin: 26px auto; max-width: none;
}
body > section:not(#hero):not(#planner):not(#cta) { padding-block: clamp(40px, 5.4vw, 68px); }
.cats-section, .sup-section { padding-block: 44px; }
body > section#planner, body > section#cta { padding-block: 10px; border: 0; }
footer { margin-bottom: 72px; padding-block: 36px 24px; }   /* chừa chỗ cho hai nút nổi ở góc dưới phải */
#pageContent > .wrap { margin: 88px auto 26px; width: min(var(--max, 1100px), calc(100% - 28px)); padding-bottom: 46px; }
.articles { margin: 28px 0; padding: 36px 32px 46px; }
body > .article-body { margin: 30px auto; width: min(var(--max-article, 760px), calc(100% - 24px)); padding-top: 42px; padding-bottom: 58px; }
body > .article-body ~ .related { margin: 0 auto 28px; width: min(var(--max, 1100px), calc(100% - 24px)); padding: 38px 32px 42px; }
.page-hero + .content { margin: 0 auto 28px; width: min(var(--max, 1100px), calc(100% - 24px)); padding-top: 4px; padding-bottom: 58px; }
.chat-inner > .welcome { border-radius: 34px; }
#success-section { margin-top: 40px; margin-bottom: 40px; }
/* Khối đầu trang cũng nằm trong kính (nền giờ là cảnh nhiều chi tiết, không đặt chữ trực tiếp lên) */
.hero-copy { padding: clamp(26px, 3.4vw, 46px); }
#featuredWrap > .featured { margin-top: 22px; padding: 30px 32px 34px !important; }
body > .hero { width: min(1180px, calc(100% - 28px)); margin: 86px auto 0; }
#form-section > .hero { margin-top: 28px; }
.page-header { margin-top: 86px; padding: 44px 40px 36px !important; }
.page-hero { width: min(var(--max, 1100px), calc(100% - 24px)); margin: 24px auto 22px !important; }
.article-hero { width: min(var(--max, 1100px), calc(100% - 24px)); margin: 86px auto 0 !important; padding-bottom: 36px !important; }
nav + section:not(#hero) { margin-top: 86px !important; }
body > .article-cover { width: min(var(--max, 1100px), calc(100% - 24px)); margin: 22px auto 0 !important; padding: 14px 14px 12px !important; border-radius: 32px; }
body > .article-cover img, body > .article-cover .cover-placeholder { border-radius: 22px; }
/* bỏ đường kẻ cũ dưới các khối tiêu đề */
.hero, .hero-grid, .page-header, .page-hero, .featured, .article-hero, .cat-pills { border-bottom-color: transparent !important; }
#hero { background: transparent; }

/* Chữ nhấn trên nền ngọc lục đậm (khối kêu gọi): dùng ánh champagne sáng */
.cta-box em, .glass-dark em { --em-grad: linear-gradient(100deg, #F6EBCB, #D8BA7A 50%, #F3E2B4); color: #EBD6A6; }

/* Thẻ nằm trong tấm */
.sup-card, .why-card, .step, .blog-card, .faq-item, .faq-q, .cat-card, .article-card, .pkg-card, .review-card,
.sidebar-card, .escrow-step, .trust-card, .toc, .stat-box, .insight-box, .references, .related-card, .love-type,
.triangle-card, .chem-card, .lesson-body, .principle-body, .q-body, .r-body, .t-body, .cover-placeholder, .featured-thumb {
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.sup-card, .blog-card, .article-card, .cat-card, .why-card, .pkg-card, .related-card {
  transition: transform .45s var(--spring), box-shadow .3s ease, border-color .3s ease;
}
.sup-card:hover, .blog-card:hover, .article-card:hover, .cat-card:hover, .related-card:hover {
  transform: translateY(-5px); border-color: var(--edge);
  box-shadow: 0 30px 50px -24px rgba(18,44,66,.5), inset 0 1px 0 rgba(255,255,255,.95);
}

/* Thẻ nổi: đứng riêng trên nền nên tự làm mờ */
.planner-box, .cta-box, .newsletter-box, .form-wrap .step, .msg-bubble, .sup-card-chat, .typing, .modal,
.featured-card, .featured-inner, .hint {
  -webkit-backdrop-filter: var(--inner, var(--backdrop));
          backdrop-filter: var(--inner, var(--backdrop));
  border: 0;
  box-shadow: var(--pane-shadow);
  --drop: none;
}
/* thẻ nổi lồng trong thẻ nổi (ví dụ ô gợi ý trong một bước của biểu mẫu) cũng không làm mờ lần hai */
:is(.planner-box, .cta-box, .newsletter-box, .form-wrap .step, .msg-bubble, .sup-card-chat, .typing, .modal, .featured-card, .featured-inner) > * { --inner: none; }
.planner-box, .newsletter-box {
  background: radial-gradient(420px circle at var(--lx, -600px) var(--ly, -600px), var(--shine), transparent 65%), var(--pane);
  border-radius: 36px;
}
.cta-box { border-radius: 40px; box-shadow: 0 40px 70px -34px rgba(8,36,26,.7), inset 0 0 0 1px rgba(231,207,155,.28), inset 0 1.5px 0 rgba(255,255,255,.4), inset 0 18px 30px -20px rgba(255,255,255,.3); }
.modal { background: var(--pane-strong); border-radius: 32px; }
.modal-overlay { -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2); background: rgba(8,24,30,.4); }
.msg-bubble, .sup-card-chat, .typing { box-shadow: var(--card-shadow), var(--rim); border-radius: 24px; }
.form-wrap .step { border-radius: 28px; }

/* GIỌT — thanh menu */
nav {
  background: var(--nav-bg);
  -webkit-backdrop-filter: var(--nav-backdrop);
          backdrop-filter: var(--nav-backdrop);
  --drop: none;
  border: 0 !important;
  border-radius: 999px;
  margin: 12px max(12px, calc(50% - 590px)) 0;
  box-shadow: 0 22px 44px -24px rgba(18,44,66,.55), 0 2px 6px rgba(18,44,66,.06), var(--rim);
}
nav:has(+ .page-hero), nav:has(+ #form-section) { top: 12px; }
.nav-dropdown { background: var(--menu) !important; border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--pane-shadow); }
nav a, nav button, .nav-badge { white-space: nowrap; }
.nav-right { flex-shrink: 0; }
.verified-badge { background: var(--pane-strong); color: var(--accent); border: 1px solid var(--edge); }

/* GIỌT — ô nhập & ô tìm kiếm */
.search-box, .search-select, .planner-input, .filter-select, .form-input, .newsletter-input,
.form-wrap input, .form-wrap select, .form-wrap textarea, .modal input, .modal select, .modal textarea {
  background: var(--field); border: 1px solid var(--edge);
  box-shadow: inset 0 2px 5px rgba(18,44,66,.1), inset 0 -1px 0 rgba(255,255,255,.6);
}
.search-box, .search-select {
  -webkit-backdrop-filter: var(--drop, var(--drop-fx)); backdrop-filter: var(--drop, var(--drop-fx));
  border: 0; border-radius: 999px;
  box-shadow: 0 16px 32px -20px rgba(18,44,66,.5), var(--rim);
}
.search-box:focus-within { box-shadow: 0 16px 32px -18px rgba(18,44,66,.55), 0 0 0 2px rgba(199,162,98,.6), var(--rim); }
.planner-input:focus, .form-input:focus, .newsletter-input:focus { border-color: var(--th-champagne); }
/* Khung nhập của Harmony AI: một giọt kính nổi ở đáy */
.input-bar { background: transparent !important; border-top: 0 !important; }
.input-inner {
  background: var(--pane-strong); border: 0; border-radius: 32px; padding: 8px 8px 8px 18px;
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.6); backdrop-filter: blur(var(--blur)) saturate(1.6);
  box-shadow: var(--pane-shadow);
}
.input-inner .input-box { background: transparent; border: 0; box-shadow: none; }

/* GIỌT — nút: nút chính là kính ngọc lục viền vàng, nút phụ là kính trong */
.btn-gold, .btn-line, .nav-cta, .planner-btn, .search-btn, .quick-btn, .newsletter-btn,
.pkg-btn, .btn-submit, .btn-send, .btn-plan, .btn-outline, .btn-load, .btn-home,
.btn-cta, .btn-contact, .btn-cancel, .send-btn {
  border-radius: 999px;
  transition: transform .45s var(--spring), filter .25s ease, box-shadow .3s ease, background .3s ease;
}
.btn-gold, .nav-cta, .btn-contact, .btn-submit, .btn-cta, .newsletter-btn, .search-btn, .btn-send, .send-btn,
.pkg-card.featured .pkg-btn {
  background: var(--btn-grad); color: var(--btn-primary-text);
  border: 1px solid var(--btn-edge); box-shadow: var(--btn-shadow);
  letter-spacing: .01em;
}
.btn-gold:hover, .nav-cta:hover, .btn-contact:hover, .btn-submit:hover, .btn-cta:hover, .newsletter-btn:hover,
.search-btn:hover, .btn-send:hover, .send-btn:hover {
  background: var(--btn-grad); filter: brightness(1.12); transform: translateY(-2px) scale(1.025);
}
.mode-toggle, .nav-menu-btn { border-radius: 999px !important; }
.btn-line, .btn-outline, .btn-plan, .btn-load, .btn-home, .btn-cancel, .pkg-btn, .quick-btn, .planner-btn, .mode-toggle, .nav-menu-btn {
  background: var(--btn2); border: 0; color: var(--text);
  -webkit-backdrop-filter: var(--drop, var(--drop-fx)); backdrop-filter: var(--drop, var(--drop-fx));
  box-shadow: 0 12px 24px -16px rgba(18,44,66,.45), var(--rim);
}
.btn-line:hover, .btn-outline:hover, .btn-load:hover, .pkg-btn:hover, .quick-btn:hover, .planner-btn:hover {
  background: var(--btn2); filter: brightness(1.08); transform: translateY(-2px) scale(1.025);
}
.btn-gold:active, .btn-line:active, .nav-cta:active, .search-btn:active, .btn-contact:active, .btn-submit:active,
.btn-cta:active, .pkg-btn:active, .quick-btn:active, .planner-btn:active, .pill:active, .cat-pill:active, .cat:active { transform: scale(.96); }
.cta-box .btn-gold { background: linear-gradient(180deg, #FBF3DC, #E3C88F); color: #17382A; border-color: rgba(255,255,255,.7); box-shadow: 0 16px 28px -14px rgba(0,0,0,.5), inset 0 1px 0 #fff; }
.cta-box .btn-line { background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), inset 0 1.5px 0 rgba(255,255,255,.6); }

/* GIỌT — nhãn lọc */
.pill, .cat-pill, .cat, .ptag, .style-tag {
  background: var(--chip); border: 0;
  -webkit-backdrop-filter: var(--drop, var(--drop-fx)); backdrop-filter: var(--drop, var(--drop-fx));
  box-shadow: 0 8px 18px -14px rgba(18,44,66,.5), inset 0 0 0 1px rgba(255,255,255,.45), inset 0 1.5px 0 rgba(255,255,255,.9);
  transition: transform .45s var(--spring), filter .25s ease;
}
/* nhãn "Độc đáo": kính ngả vàng, đủ đục để chữ vàng đồng đọc được trên mọi vùng của cảnh */
.pill.special:not(.active), .cat-pill.special:not(.active) { background: var(--chip-special); box-shadow: 0 8px 18px -14px rgba(18,44,66,.5), inset 0 0 0 1px var(--accent-line), inset 0 1.5px 0 rgba(255,255,255,.6); }
.pill:hover, .cat-pill:hover, .cat:hover { transform: translateY(-1px) scale(1.03); }
.pill.active, .pill.special.active, .cat-pill.active, .cat-pill.special.active, .cat.active {
  background: var(--btn-grad); border: 0; color: var(--btn-primary-text); box-shadow: var(--btn-shadow), inset 0 0 0 1px var(--btn-edge);
}
.tab-wrap { border: 0; border-radius: 999px; box-shadow: inset 0 2px 5px rgba(18,44,66,.1), inset 0 0 0 1px var(--edge-soft); }
.tab-btn { border-radius: 999px; }

/* Tiện ích: biến một phần tử bất kỳ thành giọt kính trong */
.liquid {
  background: var(--btn2);
  -webkit-backdrop-filter: var(--drop, var(--drop-fx)); backdrop-filter: var(--drop, var(--drop-fx));
  box-shadow: 0 20px 40px -22px rgba(18,44,66,.5), var(--rim);
}

/* Giá & số thứ tự dùng màu vàng đồng */
.sup-price, .pkg-price, .sup-card-price { color: var(--tulip); }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--th-champagne); outline-offset: 2px;
}

/* ── 8. THÍCH ỨNG ── */
@media (min-width: 901px) and (max-width: 1040px) {
  nav .wrap { padding-inline: 18px; }
  .nav-links { margin-left: 14px; }
  .nav-link { padding-inline: 7px; font-size: 12.5px; }
  .nav-logo::after, a.logo::after { width: 124px; height: 10.1px; }
}
@media (max-width: 640px) {
  /* giọt kính nhỏ (nhãn, ô tìm kiếm, nút phụ) không làm mờ nền trên điện thoại: ít lớp dựng hơn, cuộn nhẹ hơn */
  :root { --blur: 16px; --drop: none; --chip: rgba(10,22,34,.86); --btn2: rgba(12,26,38,.86); --search-bg: rgba(10,22,34,.86); --field: rgba(10,22,34,.86); }
  body.light { --chip: rgba(255,255,255,.9); --btn2: rgba(255,255,255,.9); --search-bg: rgba(255,255,255,.9); --field: rgba(255,255,255,.9); }
  body > section:not(#hero):not(#planner):not(#cta), .cats-section, .sup-section, footer {
    width: calc(100% - 16px); margin: 14px auto; border-radius: 30px;
  }
  body > .article-body, body > .article-body ~ .related, .page-hero + .content, #pageContent > .wrap { width: calc(100% - 16px); border-radius: 30px; }
  .articles { padding: 24px 16px 30px; border-radius: 30px; }
  body.light { --bg-scene: url(/assets/bg/lake-day-m.webp); --bg-glass: url(/assets/bg/lake-day-m-glass.webp); }
  :root { --bg-scene: url(/assets/bg/lake-night-m.webp); --bg-glass: url(/assets/bg/lake-night-m-glass.webp); }
  body > .hero, .page-hero, .article-hero { width: calc(100% - 16px); border-radius: 30px; }
  .hero-copy, .page-header { border-radius: 30px; }
  .page-header { padding: 30px 22px 26px !important; }
  nav { margin: 8px 8px 0; }
  nav { padding-inline: 12px !important; }
  nav .wrap { padding-inline: 4px; }
  .nav-right { gap: 8px; }
  /* trang con: chỉ giữ quả cầu logo, mũi tên quay lại và chấm trạng thái */
  nav:has(.nav-back) .nav-logo::after, nav:has(.nav-back) a.logo::after { display: none; }
  .nav-back { font-size: 0 !important; }
  .nav-back::before { content: '←'; font-size: 16px; }
  .nav-badge { font-size: 0 !important; padding: 6px !important; gap: 0 !important; }
  .nav-cta { padding: 8px 13px !important; }
  /* Điện thoại: các hàng nút được phép xuống dòng */
  .profile-actions, .cta-strip-btns, .hero-btns, .cta-btns { flex-wrap: wrap; }
  .profile-actions > * { flex: 1 1 auto; }
  .newsletter-form { flex-shrink: 1; min-width: 0; width: 100%; }
  .newsletter-input { min-width: 0; flex: 1 1 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-r] { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Tấm kính có hiệu ứng hiện dần thì chỉ đổi độ trong, không trượt (trượt = phải làm mờ lại nền ở từng khung hình) */
.planner-box[data-r], .cta-box[data-r], .newsletter-box[data-r], .glass[data-r], .glass-strong[data-r] { transform: none !important; }

/* ── 9. CHẾ ĐỘ NHẸ ──
   <html class="lite">: bỏ toàn bộ làm mờ nền, kính đục hơn để chữ vẫn rõ. Tự bật khi máy yếu, khi người dùng bật
   tiết kiệm dữ liệu, hoặc khi liquid.js đo thấy cuộn bị giật (ghi nhớ 7 ngày trong localStorage['th-lite']). */
html.lite *, html.lite *::before, html.lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite { --shine: transparent; --pane: rgba(12,26,36,.93); --pane-strong: rgba(12,26,36,.97); --nav-bg: rgba(12,26,36,.95); --chip: rgba(10,22,34,.9); --btn2: rgba(12,26,38,.9); --search-bg: rgba(10,22,34,.9); --field: rgba(10,22,34,.88); }
html.lite body.light { --shine: transparent; --pane: rgba(255,255,255,.92); --pane-strong: rgba(255,255,255,.97); --nav-bg: rgba(255,255,255,.95); --card-bg: rgba(255,255,255,.72); --field: rgba(255,255,255,.94); --btn2: rgba(255,255,255,.93); --chip: rgba(255,255,255,.93); --search-bg: rgba(255,255,255,.94); }
html.lite .orb-chip { animation: none !important; }

/* ── 10. SÂN KHẤU: ngắm cảnh và pháo hoa ──
   liquid.js gắn hai nút nổi (.th-stage) vào mọi trang; fireworks.js vẽ pháo lên <canvas class="th-sky"> nằm ngay trên
   ảnh nền. <html class="stage">: mọi nội dung mờ đi để lộ trọn cảnh; phần tử có class .th-keep thì ở lại. */
.th-sky { position: fixed; z-index: -1; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; pointer-events: none; }
.th-stage {
  position: fixed; z-index: 90; display: flex; align-items: center; gap: 8px;
  right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom));
}
.th-stage button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 13.5px/1 var(--font-body); letter-spacing: .01em; white-space: nowrap;
  transition: transform .45s var(--spring), filter .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.th-stage button:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.1); }
.th-stage button:active { transform: scale(.95); }
.th-fire { background: var(--btn-grad); color: var(--btn-primary-text); box-shadow: var(--btn-shadow), inset 0 0 0 1px var(--btn-edge); }
.th-fire svg { color: #F1DCA6; }
body:not(.light) .th-fire svg { color: #7A5628; }
.th-view {
  width: 46px; padding: 0 !important; background: var(--btn2); color: var(--text);
  -webkit-backdrop-filter: var(--drop, var(--drop-fx)); backdrop-filter: var(--drop, var(--drop-fx));
  box-shadow: 0 12px 24px -16px rgba(18,44,66,.45), var(--rim);
}
.th-stage.is-view .th-view { width: auto; padding: 0 17px 0 13px !important; }
/* vòng sáng gợi ý quanh nút pháo hoa cho tới lần bấm đầu tiên (ba nhịp rồi thôi) */
.th-fire::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(231,207,155,.9); opacity: 0;
  animation: th-ring 2.2s ease-out 1.4s 3;
}
.th-stage.fired .th-fire::after { animation: none; }
@keyframes th-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.32, 1.6); } }
.th-tip {
  position: absolute; right: 0; bottom: calc(100% + 10px); padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  font: 500 12.5px/1 var(--font-body); color: #fff; background: rgba(8,24,30,.62);
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; pointer-events: none;
}
html.stage .th-stage.is-view .th-tip { opacity: 1; transform: none; transition-delay: .5s; }
html.stage-anim body > *:not(.th-keep) { transition: opacity .5s ease !important; }
html.stage body > *:not(.th-keep) { opacity: 0 !important; pointer-events: none !important; }
html.stage-done body > *:not(.th-keep) { visibility: hidden !important; }
html.stage, html.stage body { cursor: crosshair; }
html.stage .th-stage, html.stage .th-stage * { cursor: pointer; }
@media (max-width: 640px) {
  .th-stage button { height: 44px; font-size: 13px; }
  .th-fire { padding: 0 15px 0 12px !important; }
  .th-view { width: 44px; }
  footer { margin-bottom: 70px; }
  /* trang Harmony AI: đáy màn hình là khung nhập, nên hai nút thu gọn và đứng ngay phía trên */
  body:has(.input-bar) .th-stage { bottom: 132px; }
  body:has(.input-bar) .th-fire { width: 44px; padding: 0 !important; }
  body:has(.input-bar) .th-fire span { display: none; }
}
@media print { .th-stage, .th-sky { display: none !important; } }

/* Trình duyệt không làm mờ được, hoặc người dùng tắt hiệu ứng trong suốt: dùng nền đặc hơn */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.light { --pane: rgba(255,255,255,.9); --nav-bg: rgba(255,255,255,.92); --card-bg: rgba(255,255,255,.7); --field: rgba(255,255,255,.92); --btn2: rgba(255,255,255,.9); --chip: rgba(255,255,255,.88); }
  :root { --pane: rgba(12,26,36,.92); --nav-bg: rgba(12,26,36,.94); }
}
@media (prefers-reduced-transparency: reduce) {
  body.light { --pane: rgba(255,255,255,.95); --pane-strong: #fff; --nav-bg: rgba(255,255,255,.96); --card-bg: rgba(255,255,255,.82); --field: #fff; --btn2: #fff; --chip: #fff; }
  :root { --pane: rgba(12,26,36,.96); --pane-strong: #0C1A24; --nav-bg: rgba(12,26,36,.97); }
}
