/* ==========================================================================
   AItimkiem — giao diện khách. Toàn bộ giá trị màu/kích thước giữ nguyên
   theo bộ thiết kế gốc (AItimkiem.dc.html).
   ========================================================================== */

:root {
  --ink: #0f2540;
  --ink-soft: #2a3f57;
  --muted: #5b7089;
  --faint: #8aa2ba;
  --line: #e3ecf5;
  --line-2: #dbe7f3;
  --line-3: #eef4fa;
  --page: #f6fafd;
  --surface: #fff;
  --soft: #f1f7fd;
  --soft-2: #f8fbfe;
  --brand: #1478f0;
  --brand-dark: #0d5fc4;
  --brand-tint: #eaf3fe;
  --brand-grad: linear-gradient(90deg, #1478f0, #22c0f5);
  --danger: #f43f5e;
  --success: #15803d;
  --container: 1140px;
  --radius-card: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--ink);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
input, textarea, select, button { font-family: 'Be Vietnam Pro', sans-serif; }
::selection { background: #c9e6fd; }
img { max-width: 100%; }

h1, h2, h3, .font-display { font-family: Quicksand, sans-serif; }

@keyframes om-ring { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); } 70% { box-shadow: 0 0 0 12px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes om-ring-blue { 0% { box-shadow: 0 0 0 0 rgba(0,104,255,.45); } 70% { box-shadow: 0 0 0 12px rgba(0,104,255,0); } 100% { box-shadow: 0 0 0 0 rgba(0,104,255,0); } }
@keyframes om-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 62px; display: flex; align-items: center; gap: 28px; }
.site-logo { height: 50px; display: block; }
.site-logo--text { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: -.3px; }
.site-logo--text span { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav { display: flex; gap: 22px; font-weight: 500; font-size: 14.5px; margin-left: auto; }
.site-nav a { color: var(--ink); }
.site-nav a:hover, .site-nav a.is-active { color: var(--brand); }

.search-box { position: relative; width: 300px; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-box input {
  width: 100%; height: 40px; border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: 0 16px 0 38px; font-size: 14px; outline: none; background: #fff; color: var(--ink);
}
.search-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20,120,240,.12); }

.burger {
  margin-left: auto; width: 42px; height: 42px; border-radius: 12px; display: none;
  align-items: center; justify-content: center; cursor: pointer; background: #eef4fb; color: var(--ink);
  border: 0;
}

/* ---------- Mobile drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(12,41,71,.45); z-index: 90; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 76%; max-width: 340px; background: #fff; z-index: 95;
  box-shadow: -20px 0 60px rgba(15,37,64,.25); display: flex; flex-direction: column;
  padding: 16px 20px 24px; overflow: auto;
}
.drawer[hidden], .drawer-backdrop[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-close { width: 36px; height: 36px; border-radius: 10px; background: #eef4fb; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); border: 0; }
.drawer-search { position: relative; margin-bottom: 14px; }
.drawer-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.drawer-search input { width: 100%; height: 42px; border: 1.5px solid var(--line-2); border-radius: 999px; padding: 0 14px 0 38px; font-size: 14px; outline: none; background: var(--soft-2); color: var(--ink); }
.drawer-search input:focus { border-color: var(--brand); background: #fff; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 15px; }
.drawer-nav a { padding: 11px 10px; border-radius: 12px; color: var(--ink); }
.drawer-nav a:hover { background: var(--soft); color: var(--brand); }
.drawer-sep { height: 1px; background: #e9f1f9; margin: 12px 0; }
.drawer-label { font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .6px; margin: 0 10px 8px; }
.drawer-cat { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--ink); }
.drawer-cat:hover { background: var(--soft); }
.drawer-cat .chip { width: 32px; height: 32px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.drawer-cat span:last-child { font-size: 13.5px; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(160deg, #eaf5ff 0%, #f6fbff 55%, #f6fafd 100%); border-bottom: 1px solid #e8f1fa; }
.hero-inner { padding: 52px 24px 44px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d7e9fb; color: var(--brand); font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-weight: 700; font-size: 42px; line-height: 1.18; margin: 0 0 14px; letter-spacing: -.5px; }
.hero h1 .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.hero-search { position: relative; max-width: 620px; margin: 26px auto 0; }
.hero-search form { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid #d7e9fb; border-radius: 999px; padding: 8px 8px 8px 22px; box-shadow: 0 14px 40px rgba(20,120,240,.13); }
.hero-search input { flex: 1; border: none; outline: none; font-size: 15.5px; background: transparent; color: var(--ink); min-width: 0; }
.hero-search button { flex: none; height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--brand-grad); color: #fff; font-weight: 600; font-size: 15px; display: flex; align-items: center; cursor: pointer; }
.hero-search button:hover { filter: brightness(1.08); }

/* ---------- Section ---------- */
.section { max-width: var(--container); margin: 0 auto; padding: 44px 24px 8px; width: 100%; }
.section--last { padding-bottom: 60px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 26px; font-weight: 700; margin: 0; }
.section-head .meta { font-size: 13.5px; color: var(--muted); }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 22px 10px; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink); transition: transform .18s; }
.cat-item:hover { transform: translateY(-3px); color: var(--ink); }
.cat-item .icon { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; padding: 5px}
.cat-item .name { font-weight: 600; font-size: 13px; line-height: 1.3; }

/* Ảnh icon riêng (thường là ảnh 3D có viền trong suốt) trông nhỏ hơn hẳn icon SVG
   cùng kích thước, nên trong các khung icon cố định cho ảnh lấp kín khung:
   lưới chuyên mục, đầu trang chuyên mục, bài liên quan, gợi ý tìm kiếm, menu. */
.icon > .cat-icon-img, .chip > .cat-icon-img { width: 100%; height: 100%; border-radius: inherit; }

/* ---------- Post cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden;
  display: flex; flex-direction: column; transition: all .18s; color: var(--ink);
}
.post-card:hover { box-shadow: 0 14px 34px rgba(15,37,64,.10); transform: translateY(-2px); color: var(--ink); }
.post-card .cover { height: 150px; position: relative; display: flex; align-items: center; justify-content: center; background-size: cover; background-position: center; }
.post-card .cover svg { color: rgba(255,255,255,.9); }
.post-card .cover .badge { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.post-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .body h3, .post-card .body h2 { font-size: 16.5px; font-weight: 700; line-height: 1.35; margin: 0; }
.post-card .body p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .foot { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); padding-top: 6px; flex-wrap: wrap; }
.post-card .tag-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; align-items: center; }
.post-card .tag-chips span { font-size: 11px; color: var(--muted); background: #f1f6fb; border-radius: 999px; padding: 3px 9px; }

/* ---------- Pagination ---------- */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 14px; border: 1.5px solid var(--line-2); background: #fff; color: var(--muted);
}
.pager a:hover { border-color: var(--brand); }
.pager .is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.pager .is-disabled { border-color: #e9f1f9; color: #c3d3e2; }

/* ---------- Location chips ---------- */
.loc-list { display: flex; flex-wrap: wrap; gap: 10px; }
.loc-chip { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px 10px 14px; font-weight: 600; font-size: 14px; color: var(--ink); transition: all .15s; }
.loc-chip:hover { border-color: var(--brand); color: var(--brand); }
.loc-chip svg { color: var(--brand); }

/* ---------- Archive header ---------- */
.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 22px; }
.breadcrumb a { color: var(--brand); }
.archive-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.archive-head .icon { width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.archive-head h1 { font-size: 30px; font-weight: 700; margin: 0; }
.archive-head .desc { color: var(--muted); font-size: 14px; margin-top: 2px; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.filter-tags a { font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--muted); }
.filter-tags a.is-active { color: #fff; }
.archive-desc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px 24px; margin: 0 0 26px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }
.empty-state { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* ---------- Single post ---------- */
.single { flex: 1; max-width: 820px; margin: 0 auto; padding: 28px 24px 60px; width: 100%; }
.single-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.single-chips a { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.single-chips .loc { background: #eef4fa; color: var(--muted); }
.single h1 { font-size: 34px; font-weight: 700; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.3px; }
.single-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); margin-bottom: 24px; flex-wrap: wrap; }
.single-cover { height: 220px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 30px; background-size: cover; background-position: center; }
.single-cover svg { color: rgba(255,255,255,.9); }
.prose { font-size: 16px; line-height: 1.75; color: var(--ink-soft); }
.prose h2 { font-size: 23px; font-weight: 700; color: var(--ink); margin: 34px 0 12px; }
.prose h3 { font-size: 19px; font-weight: 700; color: var(--ink); margin: 26px 0 10px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose img { border-radius: 14px; }
.prose a { text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; font-size: 14.5px; }
.prose th { background: var(--soft-2); }
.prose blockquote, .prose .post-tip {
  background: #eef7ff; border: 1px solid #cfe7fc; border-radius: 14px; padding: 16px 18px;
  margin: 0 0 16px; font-size: 15px; color: #164a86;
}
.prose blockquote strong, .prose .post-tip strong { color: var(--brand); }

/* ---------- Providers ---------- */
.providers { margin: 38px 0 8px; }
.providers h2 { font-size: 23px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.providers .note { margin: 0 0 18px; font-size: 14px; color: var(--faint); }
.providers .list { display: flex; flex-direction: column; gap: 14px; }
.provider {
  border: 1px solid #dbe9f7; border-radius: 16px; background: linear-gradient(180deg, #fbfdff, #fff);
  padding: 20px 22px; position: relative; box-shadow: 0 3px 14px rgba(20,120,240,.06);
}
.provider-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.provider-rank { width: 32px; height: 32px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: Quicksand, sans-serif; font-weight: 700; font-size: 15px; }
.provider h3 { font-size: 18.5px; font-weight: 700; margin: 0 0 3px; line-height: 1.3; }
.provider .sub { font-size: 13.5px; color: var(--muted); }
.provider .top-badge { flex: none; font-size: 11px; font-weight: 700; color: #b45309; background: #fef3e2; border: 1px solid #fbdcac; border-radius: 999px; padding: 4px 11px; }
.provider p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); }
.provider-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.btn-call { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px; }
.btn-call:hover { background: var(--brand-dark); color: #fff; }
.btn-zalo { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1.5px solid #cfe1f5; background: #fff; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.btn-zalo:hover { border-color: var(--brand); color: var(--brand); }
.btn-site { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.btn-site:hover { color: var(--brand); }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 30px 0 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-tags a { font-size: 12.5px; font-weight: 600; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 6px 14px; }
.post-tags a:hover { background: #d8eafd; }

.related h2 { font-size: 22px; font-weight: 700; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.related-item:hover { border-color: #bcd9f8; box-shadow: 0 8px 22px rgba(15,37,64,.08); color: var(--ink); }
.related-item .icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.related-item .title { font-weight: 600; font-size: 14px; line-height: 1.4; }
.related-item .meta { font-size: 12px; color: var(--faint); margin-top: 3px; }

/* ---------- Search / 404 ---------- */
.state-icon { width: 76px; height: 76px; border-radius: 22px; background: var(--brand-tint); color: var(--brand); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.state-title { font-family: Quicksand, sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.suggest-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 640px; margin: 0 auto; }
.suggest-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px 9px 12px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
.suggest-chip:hover { border-color: var(--brand); color: var(--brand); }
.suggest-chip .icon { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.nf { flex: 1; display: flex; align-items: center; justify-content: center; padding: 60px 24px; }
.nf-code { font-family: Quicksand, sans-serif; font-weight: 700; font-size: 110px; line-height: 1; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -4px; }
.btn-primary { background: linear-gradient(90deg, #1478f0, #22a5f5); color: #fff; font-weight: 600; font-size: 14.5px; padding: 12px 26px; border-radius: 999px; box-shadow: 0 8px 20px rgba(20,120,240,.25); display: inline-block; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(20,120,240,.38); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line-2); color: var(--ink); font-weight: 600; font-size: 14.5px; padding: 12px 26px; border-radius: 999px; display: inline-block; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Floating contact ---------- */
.floating { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.floating a { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: transform .15s; }
.floating a:hover { color: #fff; transform: scale(1.1); }
.floating .zalo { background: #0068ff; font-weight: 700; font-size: 13px; font-family: Quicksand, sans-serif; animation: om-ring-blue 2.4s ease-out infinite; animation-delay: 1.2s; }
.floating .messenger { background: linear-gradient(45deg, #0099ff, #a033ff); box-shadow: 0 8px 20px rgba(120,60,255,.35); }
.floating .phone { background: #22c55e; animation: om-ring 2.4s ease-out infinite; }
.floating .phone svg { animation: om-shake 2.4s ease-in-out infinite; }

/* ---------- Footer ---------- */
.site-footer { background: #0c2947; color: #bcd4ea; margin-top: auto; }
.site-footer .cols { max-width: var(--container); margin: 0 auto; padding: 44px 24px 30px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .brand-box { display: inline-block; background: #fff; border-radius: 10px; padding: 4px 8px; margin-bottom: 14px; }
.site-footer .brand-box img { height: 52px; display: block; }
.site-footer p { margin: 0; font-size: 13.5px; line-height: 1.65; max-width: 340px; }
.site-footer .col-title { font-weight: 600; color: #fff; font-size: 13.5px; margin-bottom: 12px; }
.site-footer .links { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.site-footer .links a { color: #bcd4ea; }
.site-footer .links a:hover { color: #fff; }
.site-footer .social-row { max-width: var(--container); margin: 0 auto; padding: 0 24px 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer .social-row a {
  font-size: 12.5px; font-weight: 600; color: #bcd4ea; border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 6px 16px;
}
.site-footer .social-row a:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.site-footer .copyright { border-top: 1px solid rgba(255,255,255,.10); text-align: center; padding: 16px; font-size: 12.5px; color: #7d9bbd; }

/* ---------- Responsive ---------- */
@media (max-width: 819px) {
  .site-nav, .search-box { display: none; }
  .burger { display: flex; }
  .hero h1 { font-size: 30px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .single h1 { font-size: 26px; }
}

/* ---------- Bình luận ---------- */
.comments { margin: 44px 0 48px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 22px; font-weight: 700; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.comments h2 .count { font-size: 12.5px; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 3px 11px; }
.comment-flash { background: #e8f8ee; border: 1px solid #b8e6c9; color: #14532d; border-radius: 12px; padding: 12px 16px; font-size: 13.5px; margin-bottom: 16px; }
.comment-flash.is-error { background: #fef1f3; border-color: #fbd5dc; color: #9f1239; }

.comment-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px 20px; margin-bottom: 22px; }
.comment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.comment-form input, .comment-form textarea {
  width: 100%; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 10px 13px;
  font-size: 14px; outline: none; color: var(--ink); background: #fff; font-family: inherit;
}
.comment-form textarea { line-height: 1.6; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--brand); }
.comment-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.comment-actions .note { font-size: 12.5px; color: var(--faint); }
.comment-actions .btn-primary { border: 0; cursor: pointer; font-family: inherit; }
.reply-hint { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); background: var(--brand-tint); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.reply-hint[hidden] { display: none; }
.reply-hint svg { color: var(--brand); }
.reply-hint button { border: 0; background: transparent; color: var(--danger); font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: inherit; padding: 0 0 0 4px; }

/* Một luồng = một card, các trả lời nằm chung card với bình luận gốc */
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.thread { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.thread-replies { margin: 14px 0 0 20px; padding-left: 20px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; }

.comment { display: flex; gap: 13px; }
.comment .avatar {
  width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--brand-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: Quicksand, sans-serif; font-weight: 700; font-size: 15px;
}
.comment.is-reply .avatar { width: 30px; height: 30px; font-size: 13px; }
.comment .body { min-width: 0; flex: 1; }
.comment .head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 5px; }
.comment .head b { font-size: 14px; font-weight: 600; }
.comment.is-reply .head b { font-size: 13.5px; }
.comment .head time { font-size: 12px; color: var(--faint); }
.comment .badge-staff { font-size: 10.5px; font-weight: 700; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 2px 9px; }
.comment p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); white-space: pre-line; }
.comment.is-reply p { font-size: 14px; }
.comment .body button {
  margin-top: 9px; border: 0; background: transparent; padding: 0; color: var(--brand);
  font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
}
.comment .body button:hover { color: var(--brand-dark); }
.comment-empty { color: var(--muted); font-size: 14.5px; }

@media (max-width: 819px) {
  .comment-row { grid-template-columns: 1fr; }
  .thread { padding: 16px; }
  .thread-replies { margin-left: 8px; padding-left: 14px; }
}
