/* ===== SỮA ÁNH NGÂN — APP THEME (Hồng MoMo #FF3D8F · Navy #1B2F7A) ===== */
:root {
  --brand: #C2185B;          /* hồng MoMo đậm — chữ/nút trên nền trắng (đạt AA) */
  --brand-2: #FF3D8F;        /* hồng tươi — nút, badge, điểm nhấn */
  --brand-3: #FF7AB8;        /* hồng sáng — gradient */
  --brand-4: #E3F0FC;        /* xanh baby boy — nền icon phụ */
  --accent: #D6116A;         /* hồng tươi đủ đậm cho chữ nhấn/liên kết */
  --on-brand: #FFE3EF;       /* hồng rất nhạt — viền/nhạt trên nền hồng đậm */
  --accent-soft: #FFEFF6;    /* hồng -2 — nền nhạt */
  --navy: #1B2F7A;           /* navy — tiêu đề, chữ đậm */
  --navy-2: #2E4AA8;
  --sky: #EAF3FC;            /* xanh trời rất nhạt — nền header & banner */
  --cream: #FFF0F6;
  --bg: #FDF3F7;
  --card: #FFFFFF;
  --ink: #23233B;
  --mut: #6F7A93;
  --line: #F0DCE7;
  --red: #C2185B;            /* badge nổi bật (đếm giỏ/huy hiệu) — chữ trắng đạt AA */
  --red-text: #D62839;       /* chữ đỏ trên nền trắng */
  --green: #157A43;          /* xanh lá +2 — trạng thái thành công */
  --star: #A85E00;           /* Vàng +2 tối — sao đánh giá, đạt AA trên nền trắng */
  --radius: 14px;
  --shadow: 0 1px 3px rgba(27, 47, 122, .10), 0 4px 14px rgba(27, 47, 122, .08);
  --font-head: 'Montserrat', 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body); background: #F3DCE7; color: var(--ink);
  font-size: 14.5px; line-height: 1.5;
}
button { font-family: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }

/* ---- Khung app dạng điện thoại ---- */
#app {
  max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg);
  position: relative; box-shadow: 0 0 40px rgba(165,0,100,.22);
  display: flex; flex-direction: column;
}
#view { flex: 1; padding-bottom: 76px; }

/* ---- Header ---- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(165deg, #E9F3FE 0%, #F4FAFF 45%, #FFEFF7 100%);
  padding: 12px 12px 10px; color: var(--navy);
  overflow: hidden;
}
/* vân tim trang trí ở góc phải header */
.hdr::after {
  content: '♥'; position: absolute; right: -6px; top: 14px;
  font-size: 84px; color: rgba(255, 122, 184, .16); transform: rotate(12deg);
  pointer-events: none; line-height: 1;
}
.hdr > * { position: relative; z-index: 1; }
.hdr .row { display: flex; align-items: center; gap: 10px; }
.hdr.sub { display: flex; align-items: center; gap: 10px; background: linear-gradient(165deg, #E9F3FE 0%, #FFEFF7 100%); }
.hdr .ttl { font-family: var(--font-head); font-weight: 700; font-size: 16.5px; flex: 1; text-align: center; color: var(--navy); }
.hdr .spacer { width: 34px; }
.brandline { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.brandline .bname {
  font-family: var(--font-head); font-weight: 800; font-size: 16.5px; letter-spacing: .2px;
  background: linear-gradient(90deg, #FF3D8F 0%, #F0518F 45%, #E8455F 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brandline .bsub { font-size: 11px; font-weight: 600; color: #D6116A; margin-top: 1px; }
.iconbtn {
  width: 34px; height: 34px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(27,47,122,.12);
  display: flex; align-items: center; justify-content: center; flex: none; position: relative;
}
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: var(--navy); stroke-width: 1.8; }
.iconbtn .dot {
  position: absolute; top: 2px; right: 2px; width: 9px; height: 9px;
  background: #FF3D8F; border-radius: 50%; border: 1.5px solid #fff;
}
.searchpill {
  flex: 1; background: #fff; border-radius: 999px; height: 40px;
  box-shadow: 0 2px 8px rgba(27,47,122,.10);
  display: flex; align-items: center; padding: 0 6px 0 13px; gap: 8px; color: var(--mut);
  overflow: hidden;
}
.searchpill svg { width: 16px; height: 16px; stroke: #FF3D8F; stroke-width: 2; fill: none; flex: none; }
.searchpill .hint { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchpill .cam {
  width: 28px; height: 28px; border-radius: 50%; background: #FFEFF6;
  display: flex; align-items: center; justify-content: center;
}
.searchpill .cam svg { stroke: #FF3D8F; width: 15px; height: 15px; }

/* ---- Bottom nav ---- */
.bnav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); z-index: 50;
  padding: 6px 0 max(8px, env(safe-area-inset-bottom));
}
.bnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: #7A8AA6; position: relative; }
.bnav button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.bnav button.on { color: #FF3D8F; font-weight: 700; }
.bnav button.on svg { stroke-width: 2.2; }
.bnav button.on svg .fillpart { fill: currentColor; stroke: none; }
.bnav .cartn { position: absolute; top: -3px; right: calc(50% - 20px); background: var(--red); color: #fff; font-size: 9.5px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---- Thành phần chung ---- */
.sec { margin: 12px 10px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.sechead { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px; }
.sechead h3 { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--navy); }
.sechead .more { font-size: 12.5px; color: #FF3D8F; font-weight: 700; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(100deg, #FF3D8F, #F0518F); color: #fff; font-weight: 700; font-size: 14.5px;
  border-radius: 999px; padding: 12px 18px; width: 100%;
  box-shadow: 0 4px 14px rgba(255, 61, 143, .28);
}
.btn.accent { background: linear-gradient(100deg, #FFE3EF, #FFD1E4); color: #C2185B; box-shadow: none; }
.btn.line { background: #fff; color: #D6116A; border: 1.5px solid #FF9BC4; box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn:disabled { opacity: .45; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink); white-space: nowrap;
}
.chip.on { background: #FF3D8F; border-color: #FF3D8F; color: #fff; font-weight: 600; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 6px; padding: 2px 6px; font-size: 10px; font-weight: 700; }
.badge.gift { background: #FFEFF6; color: #C2185B; }
.badge.top { background: var(--accent-soft); color: #C2185B; }
.badge.u24 { background: #F7E7EE; color: var(--mut); font-weight: 600; }
.note { font-size: 11.5px; color: var(--mut); }
.toast {
  position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%);
  background: rgba(27,47,122,.94); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 99; max-width: 86%; text-align: center; box-shadow: var(--shadow);
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

/* ---- Banner carousel ---- */
.banners { position: relative; margin: 10px 10px 0; }
.banners .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; border-radius: var(--radius); }
.banner { flex: 0 0 100%; scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; }
.banner svg { display: block; width: 100%; height: auto; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 7px; }
.dots i { width: 5px; height: 5px; border-radius: 3px; background: #CFE0F5; transition: .2s; }
.dots i.on { width: 14px; background: #FF3D8F; }

/* ---- Dải thành viên ---- */
.memberstrip {
  margin: 10px 10px 0; background: linear-gradient(100deg, #FFF3F8 0%, #FFE9F2 100%);
  border-radius: var(--radius); padding: 10px 10px; display: flex; align-items: center; gap: 8px;
  border: 1px solid #FBDCEB;
}
.memberstrip .col { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 7px; }
.memberstrip .mic {
  flex: none; width: 28px; height: 28px; border-radius: 9px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  box-shadow: 0 1px 4px rgba(255,61,143,.18);
}
.memberstrip .mtx { min-width: 0; flex: 1; }
.memberstrip .t { font-size: 10px; color: #C2185B; line-height: 1.3; overflow-wrap: anywhere; }
.memberstrip .v { font-size: 11.5px; font-weight: 700; color: var(--navy); line-height: 1.3; overflow-wrap: anywhere; }
.memberstrip .v .ar { color: #FF3D8F; }
.memberstrip .sep { width: 1px; align-self: stretch; background: #F6D2E3; }

/* ---- Ô chức năng nhanh ---- */
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 13px 6px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10.5px; color: var(--navy); text-align: center; line-height: 1.25; font-weight: 600; min-width: 0; }
.quick .qic {
  width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: #FFEFF6; position: relative;
}
.quick .qic.b1 { background: #E3F0FC; }
.quick .qic.b2 { background: #FFEDF4; }
.quick .qic.b3 { background: #EAF6EE; }
.quick .qic.b4 { background: #E9F1FD; }
.quick .qic.b5 { background: #FDF1E6; }
.quick .qic .mini { position: absolute; top: -5px; right: -8px; background: #FF3D8F; color: #fff; font-size: 8.5px; font-weight: 800; border-radius: 7px; padding: 1px 5px; }

/* ---- Voucher: lưới 2 cột (trang chủ) ---- */
.vstrip { padding-bottom: 12px; }
.vgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.vcard {
  display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff;
  min-width: 0; align-items: stretch;
}
.vcard .l {
  flex: none; width: 62px; background: #F2F8FE; border-right: 1px dashed #CFE3F5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 3px; text-align: center;
}
.vcard.blue .l { background: #F2F8FE; border-right-color: #CFE3F5; }
.vcard.pink .l { background: #FFF0F6; border-right-color: #F9D2E6; }
.vcard .l .ic { font-size: 19px; line-height: 1; }
.vcard .l .t { font-size: 8.5px; color: var(--mut); line-height: 1.25; }
.vcard .r { flex: 1; padding: 8px 8px 9px; min-width: 0; display: flex; flex-direction: column; }
.vcard .r .tt { font-weight: 800; font-size: 12px; color: var(--navy); line-height: 1.25; }
.vcard .r .d {
  font-size: 9.5px; color: var(--mut); line-height: 1.35; margin: 4px 0 6px;
  height: 26px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.vcard .r .act { font-size: 11px; color: #FF3D8F; font-weight: 700; text-align: left; margin-top: auto; }
.vcard .r .act.got { color: var(--green); }

/* ---- Lưới sản phẩm ---- */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px; }
.pcard { background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.pcard .ph { position: relative; }
.pcard .ph svg { width: 100%; height: auto; display: block; }
.pcard .ph img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.pd-gallery img { width: 100%; max-height: 360px; object-fit: contain; display: block; margin: 0 auto; }
.pcard .off {
  position: absolute; top: 8px; left: 8px;
}
.pcard .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .nm { font-size: 12.5px; line-height: 1.35; height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--mut); flex-wrap: wrap; }
.pcard .meta .st { color: var(--star); font-weight: 700; }
.pcard .rowp { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pcard .pr { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--brand); }
.pcard .pr small { font-size: 10px; font-weight: 600; color: var(--mut); }
.pcard .addbtn {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.pcard .addbtn svg { width: 16px; height: 16px; stroke: var(--brand); stroke-width: 2; fill: none; }
.pcard .unit { font-size: 10px; color: var(--mut); }

/* ---- Card nội dung xen kẽ ---- */
.artcard { background: linear-gradient(160deg, #FFEAF3, #FFF9FC); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.artcard .top { padding: 12px 12px 0; }
.artcard .tag { font-size: 9.5px; font-weight: 800; color: #C2185B; background: #fff; border-radius: 6px; padding: 3px 7px; display: inline-block; }
.artcard h4 { font-size: 13px; line-height: 1.35; color: var(--navy); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.artcard .foot { padding: 10px 12px 12px; display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.artcard .eye { font-size: 10.5px; color: var(--mut); }
.artcard .go { width: 26px; height: 26px; border-radius: 50%; background: #FF3D8F; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* ---- Trang danh mục ---- */
.cattabs { display: flex; overflow-x: auto; gap: 2px; background: #fff; padding: 4px 8px 0; position: sticky; top: 58px; z-index: 30; border-bottom: 1px solid var(--line); }
.cattabs button { flex: none; padding: 9px 10px 10px; font-size: 13px; color: var(--mut); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.cattabs button.on { color: var(--navy); font-weight: 800; border-color: #FF3D8F; }
.brandgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
.brandgrid button { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.brandgrid .bl { font-family: var(--font-head); font-weight: 800; font-size: 11px; color: var(--navy); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brandgrid .bc { font-size: 9.5px; color: var(--mut); }
.seggrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 12px 12px; }
.seggrid button { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink); }
.seggrid .ic { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bg); border: 1.5px solid var(--line); }
.seggrid button.on .ic { border-color: #FF9BC4; background: var(--accent-soft); }
.seggrid button.on { font-weight: 700; color: var(--navy); }
.sortbar {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  position: sticky; top: 101px; z-index: 29; background: var(--bg); overflow-x: auto;
}
.sortbar .chip { font-size: 12px; flex: none; }
.sortbar .note { flex: none; white-space: nowrap; }

/* ---- Trang sản phẩm ---- */
.pd-gallery { background: #fff; }
.pd-gallery svg { width: 100%; height: auto; }
.pd-gmain img { width: 100%; max-height: 380px; object-fit: contain; display: block; margin: 0 auto; }
.pd-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; }
.pd-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 2px solid var(--line); flex: none; cursor: pointer; opacity: .75; }
.pd-thumbs img.on { border-color: var(--accent); opacity: 1; }
.pd-main { background: #fff; padding: 12px 14px; }
.pd-price { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--brand); }
.pd-price small { font-size: 12px; color: var(--mut); font-weight: 600; }
.pd-name { font-size: 15.5px; line-height: 1.4; font-weight: 600; margin-top: 4px; }
.pd-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--mut); flex-wrap: wrap; }
.pd-sec { background: #fff; margin-top: 8px; padding: 12px 14px; }
.pd-sec h4 { font-family: var(--font-head); font-size: 13.5px; color: var(--navy); margin-bottom: 8px; }
.polrow { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; font-size: 12.5px; }
.polrow .ic { flex: none; font-size: 15px; }
.pd-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 8px; padding: 10px 12px max(10px, env(safe-area-inset-bottom)); z-index: 60;
}
.pd-bar .ghost { flex: none; width: 46px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; color: var(--mut); gap: 1px; }
.pd-bar .ghost svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.8; }
.pd-bar .btn { padding: 12px 10px; font-size: 13.5px; white-space: nowrap; }
@media (max-width: 380px) {
  .pd-bar { gap: 6px; padding: 10px 8px max(10px, env(safe-area-inset-bottom)); }
  .pd-bar .ghost { width: 40px; }
  .pd-bar .btn { font-size: 12.5px; padding: 12px 6px; }
}
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; height: 34px; font-size: 17px; font-weight: 700; color: var(--brand); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }

/* ---- Cảnh báo pháp lý ---- */
.lawnote {
  margin-top: 8px; background: #FDF3F7; border: 1px solid #F7DEE9; border-radius: 10px;
  padding: 9px 11px; font-size: 11.5px; color: var(--mut); line-height: 1.5;
}

/* ---- Giỏ hàng ---- */
.carttabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.carttabs button { flex: 1; padding: 11px; font-size: 13.5px; color: var(--mut); border-bottom: 2.5px solid transparent; }
.carttabs button.on { color: var(--navy); font-weight: 800; border-color: #FF3D8F; }
.promoline {
  margin: 10px 10px 0; background: linear-gradient(100deg, #FF3D8F, #F0518F);
  color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 12px; display: flex; gap: 8px; align-items: center;
}
.promoline b { color: #fff; }
.citem { display: flex; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.citem .th { flex: none; width: 64px; }
.citem .th svg { border-radius: 8px; width: 64px; height: 64px; }
.citem .inf { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.citem .nm { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.citem .pr { font-weight: 800; color: var(--brand); font-size: 14px; font-family: var(--font-head); }
.citem .rm { color: var(--mut); font-size: 11px; align-self: flex-start; }
.progressbox { background: #fff; margin: 10px 10px 0; border-radius: var(--radius); padding: 11px 13px; box-shadow: var(--shadow); }
.progressbox .t { font-size: 12px; display: flex; justify-content: space-between; margin-bottom: 6px; }
.pbar { height: 7px; border-radius: 4px; background: #F6E3EE; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #FF3D8F, #FF7AB8); transition: width .3s; }
.sumrow { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.sumrow.b { font-weight: 800; font-size: 15px; color: var(--brand); }
.cart-bar {
  position: fixed; bottom: 62px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; z-index: 45;
}
.cart-bar .tot { flex: 1; }
.cart-bar .tot .l { font-size: 10.5px; color: var(--mut); }
.cart-bar .tot .v { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--brand); }

/* ---- Form ---- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.radiorow { display: flex; gap: 9px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; font-size: 13px; }
.radiorow.on { border-color: var(--accent); background: var(--accent-soft); }
.radiorow .rd { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #E3B9CD; flex: none; }
.radiorow.on .rd { border: 5px solid var(--accent); }
.radiorow .fee { margin-left: auto; font-weight: 700; color: var(--brand); font-size: 12.5px; white-space: nowrap; }

/* ---- Tài khoản ---- */
.acc-hero { background: linear-gradient(150deg, #FF3D8F, #F0518F); color: #fff; padding: 16px 14px 42px; }
.acc-hero .row { display: flex; align-items: center; gap: 11px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 25px; flex: none; border: 2px solid #FFE3EF; }
.acc-hero .nm { font-family: var(--font-head); font-weight: 800; font-size: 16px; }
.acc-hero .ph { font-size: 12px; color: #FFE3EF; }
.acc-card { margin: -30px 10px 0; position: relative; z-index: 2; }
.ordstrip { display: grid; grid-template-columns: repeat(5, 1fr); padding: 12px 4px; }
.ordstrip button { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: var(--ink); position: relative; }
.ordstrip .ic { font-size: 20px; }
.ordstrip .n { position: absolute; top: -4px; right: 16%; background: var(--red); color: #fff; border-radius: 8px; min-width: 15px; height: 15px; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.menugrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 10px 6px; }
.menugrid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; font-size: 10.5px; text-align: center; color: var(--ink); line-height: 1.25; }
.menugrid .ic { font-size: 22px; }
.listrow { display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: #fff; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.listrow .ic { font-size: 17px; width: 24px; text-align: center; }
.listrow .ar { margin-left: auto; color: #E3B9CD; }
.ordcard { background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin: 0 10px 10px; padding: 12px; }
.ordcard .top { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; }
.stt { font-weight: 700; }
.stt.cho { color: #A82E14; } .stt.giao { color: #1C66BB; } .stt.xong { color: var(--green); } .stt.huy { color: var(--mut); }

/* ---- Live & Video ---- */
.livetabs { display: flex; justify-content: center; gap: 22px; background: linear-gradient(120deg, #FF3D8F, #F0518F); color: #FFDDEA; padding: 12px 0 10px; position: sticky; top: 0; z-index: 40; }
.livetabs button { font-size: 15px; font-weight: 600; color: inherit; padding-bottom: 4px; border-bottom: 2.5px solid transparent; }
.livetabs button.on { color: #fff; font-weight: 800; border-color: #fff; }
.livecard { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); margin: 0 10px 12px; }
.livecard .poster { position: relative; }
.livecard .when { background: linear-gradient(100deg, #FF3D8F, #F0518F); color: #fff; display: flex; justify-content: space-between; padding: 9px 12px; font-size: 12.5px; }
.livecard .foot { padding: 10px 12px; display: flex; gap: 8px; }

/* Card live nhỏ 2 cột ở trang chủ */
.lvgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 12px 12px; }
.lvcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.lvcard .thumb { position: relative; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.lvcard .thumb svg { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; display: block; }
.lvcard .thumb .lvic { position: absolute; left: 10px; bottom: 8px; font-size: 26px; line-height: 1; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); }
.lvcard .lvbadge {
  position: absolute; top: 6px; left: 6px; background: #FF3D8F; color: #fff;
  font-size: 9.5px; font-weight: 800; border-radius: 999px; padding: 2px 7px 2px 6px;
  display: inline-flex; align-items: center; gap: 4px; letter-spacing: .3px;
}
.lvcard .lvbadge i { width: 5px; height: 5px; border-radius: 50%; background: #fff; display: block; }
.lvcard .lvplay {
  position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%;
  background: #FF3D8F; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(255,61,143,.45);
}
.lvcard .lvplay svg { width: 15px; height: 15px; fill: #fff; stroke: none; }
.lvcard .b { padding: 8px 9px 10px; }
.lvcard .t { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.3; height: 31px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lvcard .w { font-size: 10px; color: #FF3D8F; font-weight: 700; margin-top: 5px; display: flex; align-items: center; gap: 4px; line-height: 1.3; height: 13px; overflow: hidden; white-space: nowrap; }
.lvcard .d { font-size: 10px; color: var(--mut); margin-top: 3px; line-height: 1.35; height: 27px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.vcell { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.vcell .t { padding: 8px 10px 10px; font-size: 12px; line-height: 1.35; }
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; margin: 10px; }
.player iframe { width: 100%; aspect-ratio: 9/14; border: 0; display: block; }

/* ---- Chat Bé Mầm ---- */
.chatwrap { display: flex; flex-direction: column; min-height: calc(100dvh - 130px); }
.chatlog { flex: 1; padding: 12px 12px 4px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; white-space: pre-line; }
.msg.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; box-shadow: var(--shadow); }
.msg.me { background: #FF3D8F; color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.chatopts { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 12px 14px; }
.chatopts .chip { border-color: var(--accent); color: var(--brand); background: #fff; font-weight: 600; }

/* ---- Sheet / modal ---- */
.sheetbg { position: fixed; inset: 0; background: rgba(43,16,32,.55); z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 480px; background: var(--bg); border-radius: 18px 18px 0 0;
  max-height: 82dvh; overflow-y: auto; animation: up .22s ease;
}
@keyframes up { from { transform: translateY(40px); opacity: .6; } }
.sheet .shead { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; padding: 14px 14px 10px; z-index: 2; }
.sheet .shead h3 { flex: 1; text-align: center; font-family: var(--font-head); font-size: 15.5px; color: var(--navy); }
.sheet .shead .x { width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 15px; display: flex; align-items: center; justify-content: center; }
.sheet .sbody { padding: 0 14px 20px; }

/* ---- Trang giới thiệu / timeline ---- */
.tl { padding: 4px 0 4px 6px; }
.tlrow { display: flex; gap: 12px; padding: 0 0 18px; position: relative; }
.tlrow::before { content: ''; position: absolute; left: 26px; top: 24px; bottom: -2px; width: 2px; background: var(--accent-soft); }
.tlrow:last-child::before { display: none; }
.tlrow .y { flex: none; width: 52px; height: 24px; border-radius: 8px; background: #FF3D8F; color: #fff; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); z-index: 1; }
.tlrow .tx { font-size: 13px; padding-top: 2px; }

.empty { text-align: center; padding: 42px 24px; color: var(--mut); }
.empty .big { font-size: 46px; margin-bottom: 10px; }
.empty b { color: var(--brand); }

.footco { padding: 18px 16px 26px; font-size: 11.5px; color: var(--mut); line-height: 1.65; }
.footco b { color: var(--brand); font-size: 12.5px; }

@media (min-width: 520px) {
  body { padding: 0; }
}
