/* Giao diện "EWC" (2026-10-03): phong cách sáng kiểu esportsworldcup.com —
   nền xám nhạt, thẻ trắng bo lớn, menu dọc bên trái (desktop) / thanh dưới
   (mobile), hero tối chữ lớn, số liệu vàng gradient, nút đen. Chỉ là 1 lớp
   phủ lên CSS sẵn có: kích hoạt khi <html> có class "ewc"; bỏ class là về
   giao diện cũ. Mọi selector bắt đầu bằng html.ewc để thắng các luật
   "html body .x !important" của lớp liquid-glass. */

/* Chakra Petch (bản Việt hoá, file trong fonts/) thay cho font "Gear" thương
   mại của EWC — 1 họ font cho mọi thứ như EWC: Bold 700 cho tiêu đề/nút/nhãn
   nhỏ, Regular 400 cho đoạn văn, Medium 500 hiếm khi dùng. */
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-light.ttf') format('truetype'); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-lightitalic.ttf') format('truetype'); font-weight:300; font-style:italic; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-italic.ttf') format('truetype'); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-semibold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Chakra Petch'; src:url('/fonts/chakra-petch-bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
html.ewc {
  --ewc-bg:#f5f5f5; --ewc-surface:#ffffff; --ewc-dark:#151515; --ewc-dark-2:#1e1e1e;
  --ewc-line:#e8e8e8; --ewc-muted:#6f6f6f; --ewc-gold:#987c4b; --ewc-gold-2:#d1b26e;
  --ewc-gold-deep:#683c13; --ewc-side-w:92px; --ewc-bottom-h:64px;
  --ink:var(--ewc-bg); --panel:var(--ewc-surface); --panel-2:#f5f5f5; --panel2:#f5f5f5;
  --hairline:var(--ewc-line); --line:var(--ewc-line);
  --text:var(--ewc-dark); --text-dim:var(--ewc-muted); --muted:var(--ewc-muted);
  --gold:#987c4b; --gold-bright:#8a6a35;
  --buy:#0a9d5a; --sell:#e0263f; --green:#0a9d5a; --red:#e0263f;
  --buy-bg:rgba(10,157,90,.10); --sell-bg:rgba(224,38,63,.09); --warn-bg:rgba(152,124,75,.12);
  --info:#2f6fd6; --info-bg:rgba(47,111,214,.10); --violet:#7a52d1; --violet-bg:rgba(122,82,209,.10);
  --cyan:#0e8fa3; --cyan-bg:rgba(14,143,163,.10); --pink:#c2457d; --pink-bg:rgba(194,69,125,.10);
  --shadow:0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --content-bg:#ffffff; --content-bg-2:#f5f5f5; --content-line:transparent; --content-filter:none;
  --lg-tint:#ffffff; --lg-tint-strong:#ffffff; --lg-filter:none; --lg-sheen:linear-gradient(transparent,transparent);
  --lg-rim:linear-gradient(transparent,transparent); --lg-shadow:none;
  background:var(--ewc-bg) !important; background-image:none !important; color-scheme:light;
}
html.ewc body {
  background:var(--ewc-bg) !important; background-image:none !important; color:var(--ewc-dark) !important;
  font-family:'Chakra Petch','IBM Plex Sans',sans-serif !important;
  padding-left:var(--ewc-side-w); min-height:100vh;
}
html.ewc body::before { display:none !important; }
html.ewc body, html.ewc p, html.ewc li, html.ewc td, html.ewc input, html.ewc button { -webkit-font-smoothing:antialiased; }

/* ---------- chữ ---------- */
html.ewc h1, html.ewc h2, html.ewc .section-title, html.ewc .briefing-greet, html.ewc .gauge .headline, html.ewc .ls-title {
  font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; letter-spacing:0 !important;
  color:var(--ewc-dark) !important; text-transform:none;
}
html.ewc h3, html.ewc .topnav-link, html.ewc .btn, html.ewc .btn-ghost, html.ewc .dash-tab, html.ewc .sigtab {
  font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; letter-spacing:0 !important;
}
html.ewc .eyebrow, html.ewc .badge, html.ewc .cal-day {
  font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; letter-spacing:.02em !important; color:var(--ewc-muted);
}
html.ewc .section-title {
  font-size:clamp(1.35rem, 2.2vw, 2rem) !important; line-height:1.05 !important; text-transform:uppercase;
  border-bottom:none !important; padding-bottom:0 !important; margin:8px 0 22px !important;
}
html.ewc .section-title::after { display:none !important; }
html.ewc .section-title .ic { background:var(--ewc-surface) !important; box-shadow:var(--shadow) !important; border-radius:12px !important; }
html.ewc .page-lede { color:var(--ewc-muted) !important; }
html.ewc .grad-num, html.ewc .ticker-price, html.ewc .price-main .px, html.ewc .stat-box .num, html.ewc .ring-label, html.ewc .ls-stat b {
  font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; letter-spacing:0 !important;
  background:linear-gradient(100deg, var(--ewc-gold-deep) 0%, var(--ewc-gold) 45%, var(--ewc-gold-2) 100%) !important;
  -webkit-background-clip:text !important; background-clip:text !important; -webkit-text-fill-color:transparent !important; text-shadow:none !important;
}
/* EWC dùng 1 họ font cho mọi chữ, kể cả số — đè cả font-family viết inline
   (IBM Plex Mono/Sans, font PS) trong HTML cũ. Chừa icon Material Symbols. */
html.ewc body *:not(.material-symbols-outlined) { font-family:'Chakra Petch',sans-serif !important; }
html.ewc body { font-variant-numeric:tabular-nums; }
html.ewc p, html.ewc .page-lede, html.ewc .ls-body, html.ewc .briefing-card p { font-weight:400; line-height:1.55; }
html.ewc .mono { font-weight:500; }
html.ewc .ewc-hero .ewc-hero-sub { font-weight:700; line-height:1.45; }
html.ewc a { color:inherit; }
html.ewc .up { color:var(--buy) !important; }
html.ewc .down { color:var(--sell) !important; }

/* ---------- ẩn header cũ, thay bằng menu dọc / thanh dưới ---------- */
html.ewc .topbar, html.ewc .topnav { display:none !important; }

.ewc-side {
  position:fixed; left:0; top:0; bottom:0; width:var(--ewc-side-w); z-index:90; background:#fff;
  box-shadow:4px 0 24px rgba(0,0,0,.06); display:flex; flex-direction:column; justify-content:space-between; align-items:stretch;
}
.ewc-logo { display:flex; flex-direction:column; align-items:center; gap:4px; padding:22px 6px 10px; text-decoration:none; color:var(--ewc-dark); }
.ewc-logo .m {
  width:46px; height:46px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--ewc-gold-deep), var(--ewc-gold) 55%, var(--ewc-gold-2));
  color:#fff; font:700 1.05rem/1 'Chakra Petch',sans-serif; letter-spacing:0;
}
.ewc-logo .t { font:700 .62rem/1.1 'Chakra Petch',sans-serif; letter-spacing:.02em; text-align:center; text-transform:uppercase; }
.ewc-side-mid { display:flex; flex-direction:column; overflow-y:auto; scrollbar-width:none; }
.ewc-side-mid::-webkit-scrollbar { display:none; }
.ewc-item {
  display:flex; flex-direction:column; align-items:center; gap:4px; padding:11px 4px; text-decoration:none;
  color:var(--ewc-dark); text-align:center; transition:background .15s ease;
}
.ewc-item .material-symbols-outlined { font-size:26px; transition:color .15s ease; }
.ewc-item .l { font:700 10px/1.25 'Chakra Petch',sans-serif; }
.ewc-item:hover { background:var(--ewc-bg); }
.ewc-item:hover .material-symbols-outlined, .ewc-item.active .material-symbols-outlined { color:var(--ewc-gold); }
.ewc-item.active { background:var(--ewc-bg); }
.ewc-item.active .material-symbols-outlined { font-variation-settings:'FILL' 1; }
.ewc-side-foot .ewc-item { border-top:1px solid var(--ewc-line); }
.ewc-side-foot .ewc-login { background:var(--ewc-dark); color:#fff; border-top:none; }
.ewc-side-foot .ewc-login:hover { background:#000; }
.ewc-side-foot .ewc-login:hover .material-symbols-outlined { color:var(--ewc-gold-2); }

.ewc-bottom { display:none; }
.ewc-sheet { display:none; }

/* ---------- hero ---------- */
.ewc-hero {
  position:relative; overflow:hidden; color:#fff; isolation:isolate;
  background:#0d0b08 url('/static/xau-gold3d-16x9.jpg') center 40% / cover no-repeat;
  min-height:clamp(300px, 46vw, 560px); display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:56px 20px 64px;
}
.ewc-hero.sm { min-height:clamp(200px, 22vw, 280px); padding:40px 20px 44px; }
.ewc-hero::before {
  content:""; position:absolute; inset:0; z-index:-1;
  background:radial-gradient(ellipse 80% 70% at 50% 45%, rgba(0,0,0,.25), rgba(0,0,0,.72) 80%), linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
}
.ewc-pill {
  display:inline-flex; align-items:center; gap:7px; padding:6px 13px; border-radius:8px; margin-bottom:18px;
  background:linear-gradient(90deg, #d4741f, #f0a43a); color:#fff; font:700 .78rem/1 'Chakra Petch',sans-serif; letter-spacing:.02em; text-transform:uppercase;
}
.ewc-pill .dot { width:7px; height:7px; border-radius:50%; background:#fff; animation:ewcPulse 1.6s ease-in-out infinite; }
@keyframes ewcPulse { 50% { opacity:.3; } }
.ewc-hero h1.ewc-hero-title {
  font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; text-transform:uppercase;
  font-size:clamp(2.6rem, 9vw, 7.4rem) !important; line-height:.88 !important; letter-spacing:0 !important; margin:0 !important;
  color:#fff !important;
}
.ewc-hero h1.ewc-hero-title.sm { font-size:clamp(2rem, 5.6vw, 4.2rem) !important; line-height:1 !important; }
.ewc-hero h1 .g {
  background:linear-gradient(100deg, #b9893f, #f2d48d 50%, #c99a4b); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.ewc-ribbon {
  display:inline-block; margin-top:14px; padding:5px 26px; background:#fff; color:var(--ewc-dark);
  font:700 clamp(.85rem, 2vw, 1.3rem)/1 'Chakra Petch',sans-serif; letter-spacing:.02em; text-transform:uppercase;
  clip-path:polygon(4% 0, 100% 0, 96% 100%, 0 100%);
}
.ewc-hero-sub { margin:22px auto 0; max-width:720px; font:700 clamp(.8rem, 1.5vw, 1.05rem)/1.45 'Chakra Petch',sans-serif; text-transform:uppercase; letter-spacing:.02em; opacity:.95; }
.ewc-hero-cta { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:26px; }
.ewc-btn {
  display:inline-flex; align-items:center; gap:10px; padding:13px 20px; border-radius:12px; border:none; cursor:pointer; text-decoration:none;
  font:700 .74rem/1 'Chakra Petch',sans-serif; letter-spacing:.02em; text-transform:uppercase; background:var(--ewc-dark); color:#fff !important;
  transition:transform .15s ease, background .15s ease;
}
.ewc-btn:hover { transform:translateY(-1px); background:#000; }
.ewc-btn.glass { background:rgba(20,20,20,.55); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.ewc-btn.glass:hover { background:rgba(20,20,20,.75); }
.ewc-btn.gold { background:linear-gradient(100deg, var(--ewc-gold-deep), var(--ewc-gold) 50%, var(--ewc-gold-2)); }
.ewc-btn .material-symbols-outlined { font-size:18px; }

/* Hero trang chủ = video vàng 3D. Trong video: 3 thỏi vàng ở ~11–72% chiều
   cao, chữ "XTREME ALGO UNION" ở ~86–92%, phần còn lại là nền đen — khung 2:1
   cắt bỏ phần đen trên/dưới, lệch xuống 60% để chữ không sát mép. Điện thoại
   dọc dùng bản 9x16: thỏi vàng ~25–62%, chữ ~85–90% → khung 0.78 lệch xuống
   76%. Nội dung đè lên (nhãn Live, logo, mô tả, 2 nút) gom trong 1 cột giữa
   như EWC, chừa đáy 15–19% cho chữ trong video. */
html.ewc .bg-video { display:none !important; }
.ewc-hero.video { display:block; min-height:0; padding:0; aspect-ratio:2 / 1; background:#000; }
.ewc-hero.video::before { background:radial-gradient(ellipse 55% 45% at 50% 44%, rgba(0,0,0,.32), rgba(0,0,0,0) 75%), linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,0) 22%); }
.ewc-hero-video { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 60%; z-index:-2; display:block; }
.ewc-hero-center {
  position:absolute; inset:0 0 15% 0; padding:0 24px; z-index:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:clamp(10px, 1.6vw, 22px); text-align:center;
}
.ewc-hero-center .ewc-pill { margin:0; }
/* Logo XSG 26: KHÔNG căn giữa bằng translate(-50%) — translate theo % hay rơi
   vào nửa pixel → ảnh bị vẽ nhoè; ở đây flex căn giữa. Rộng tối đa 860px
   (< 910px gốc) để không bị phóng to trên màn 100%; bóng gọn để chữ trắng nổi
   trên thỏi vàng sáng mà không thành quầng mờ. */
.ewc-hero-logo {
  display:block; width:min(58%, 860px); height:auto; pointer-events:none;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.55));
  animation:ewcLogoIn .8s cubic-bezier(.2,.8,.2,1) both .15s;
}
@keyframes ewcLogoIn { from { opacity:0; transform:scale(.95); } }
@media (prefers-reduced-motion: reduce) { .ewc-hero-logo { animation:none; } }
.ewc-hero-center .ewc-hero-sub { margin:0; max-width:760px; text-shadow:0 1px 3px rgba(0,0,0,.85), 0 2px 14px rgba(0,0,0,.6); }
.ewc-hero-center .ewc-hero-cta { margin-top:clamp(0px, .6vw, 8px); }
.ewc-sr { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:1023px) and (orientation:portrait) {
  .ewc-hero.video { aspect-ratio:0.78; }
  .ewc-hero-video { object-position:50% 76%; }
  .ewc-hero-center { inset:0 0 19% 0; padding:0 14px; gap:10px; }
  .ewc-hero-center .ewc-pill { font-size:.66rem; padding:5px 10px; }
  .ewc-hero-logo { width:86%; }
  .ewc-hero-center .ewc-hero-sub { font-size:.7rem; line-height:1.4; }
  .ewc-hero-center .ewc-hero-cta { gap:8px; flex-wrap:nowrap; }
  .ewc-hero-center .ewc-btn { padding:11px 13px; font-size:.64rem; gap:6px; }
  .ewc-hero-center .ewc-btn .material-symbols-outlined { font-size:15px; }
}
/* Hero trang con (2026-10-23): cùng video vàng như trang chủ, khung thấp hơn. Máy tính: khung
   2.6:1, lệch 35% → thấy 11–80% chiều cao video (đủ 3 thỏi vàng, cắt chữ "XTREME ALGO UNION" ở
   86–92%). Điện thoại dọc (bản 9x16): khung 1.1, lệch 37% → thấy ~18–69% (thỏi vàng ở 25–62%).
   Tiêu đề trang đè giữa video: trắng + phần vàng gradient như logo XSG 26, bóng đổ để nổi trên vàng. */
.ewc-hero.video.sub { aspect-ratio:2.6 / 1; }
.ewc-hero.video.sub .ewc-hero-video { object-position:50% 35%; }
.ewc-hero.video.sub::before {
  background:radial-gradient(ellipse 60% 55% at 50% 50%, rgba(0,0,0,.42), rgba(0,0,0,.08) 78%), linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 75%, rgba(0,0,0,.35));
}
.ewc-hero.video.sub .ewc-hero-center { inset:0; gap:clamp(10px, 1.4vw, 18px); }
.ewc-hero h1.ewc-hero-title.sub {
  font-size:clamp(2.4rem, 6.6vw, 6rem) !important; line-height:.95 !important; letter-spacing:.01em !important;
  filter:drop-shadow(0 3px 10px rgba(0,0,0,.65)); animation:ewcLogoIn .8s cubic-bezier(.2,.8,.2,1) both .1s;
}
.ewc-hero h1.ewc-hero-title.sub.long { font-size:clamp(1.8rem, 4.2vw, 3.6rem) !important; max-width:1000px; }
.ewc-hero h1.ewc-hero-title.sub .g { background:linear-gradient(100deg, #c0832d, #ddb460 30%, #d69c50 52%, #d06f30 76%, #be4c18); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
.ewc-hero.video.sub .ewc-hero-sub { margin:0; max-width:760px; text-shadow:0 1px 3px rgba(0,0,0,.85), 0 2px 14px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .ewc-hero h1.ewc-hero-title.sub { animation:none; } }
@media (max-width:1023px) and (orientation:portrait) {
  .ewc-hero.video.sub { aspect-ratio:1.1; }
  .ewc-hero.video.sub .ewc-hero-video { object-position:50% 37%; }
  .ewc-hero.video.sub .ewc-hero-center { inset:0; }
  .ewc-hero.video.sub .ewc-hero-sub { font-size:.72rem; }
}
/* thẻ số liệu lớn kiểu "850 million / VIEWERS" */
.ewc-stats { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; max-width:1396px; margin:24px auto 8px; padding:0 32px; position:relative; z-index:2; }
.ewc-stat { background:#fff; border-radius:24px; padding:26px 30px; box-shadow:var(--shadow); }
.ewc-stat .n {
  font:700 clamp(1.9rem, 4vw, 3.1rem)/1 'Chakra Petch',sans-serif; letter-spacing:0;
  background:linear-gradient(100deg, var(--ewc-gold-deep), var(--ewc-gold) 45%, var(--ewc-gold-2)); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.ewc-stat .k { margin-top:10px; font:700 .95rem/1.2 'Chakra Petch',sans-serif; text-transform:uppercase; color:#8c8c8c; letter-spacing:.01em; }
.ewc-stat .n.up { background:none; -webkit-text-fill-color:currentColor; }
.ewc-stat .n.down { background:none; -webkit-text-fill-color:currentColor; }

/* ---------- vùng nội dung ---------- */
html.ewc .wrap { max-width:1396px !important; padding-left:32px !important; padding-right:32px !important; padding-top:36px !important; }
/* trang chủ: cột "Phân tích A.I" và "Tin tức" dạt ra 2 mép, chart ở giữa rộng ra */
html.ewc .wrap:has(> .shell) { max-width:none !important; padding-left:16px !important; padding-right:16px !important; }
html.ewc .wrap > .shell { max-width:none; padding-left:0; padding-right:0; }
html.ewc .mini-ticker {
  background:var(--ewc-dark) !important; color:#fff !important; border:none !important; border-radius:0 !important; box-shadow:none !important;
}
html.ewc .mini-ticker * { color:#fff; }
html.ewc .mini-ticker .up { color:#3ddc8f !important; }
html.ewc .mini-ticker .down { color:#ff6b7a !important; }
html.ewc .mini-ticker .dot { background:var(--ewc-gold-2) !important; }

/* thẻ */
html.ewc body .card, html.ewc body .gauge, html.ewc body .ledger-scroll {
  background:#fff !important; border:none !important; border-radius:24px !important; box-shadow:var(--shadow) !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important; color:var(--ewc-dark);
}
html.ewc body .card:hover, html.ewc body .gauge:hover { box-shadow:0 2px 4px rgba(0,0,0,.04), 0 14px 34px rgba(0,0,0,.08) !important; }
html.ewc body .card .card, html.ewc body .stat-box, html.ewc body .news-item, html.ewc body .sig-level,
html.ewc body .briefing-stat, html.ewc body .briefing-section, html.ewc body .ai-analysis-out {
  background:var(--ewc-bg) !important; border:none !important; border-radius:16px !important; box-shadow:none !important; color:var(--ewc-dark);
}
html.ewc body .news-item:hover, html.ewc body .stat-box:hover, html.ewc body .card .card:hover, html.ewc body .sig-level:hover { background:#efefef !important; }
html.ewc body .ai-analysis-out { background:rgba(152,124,75,.08) !important; }

/* nút */
html.ewc body .btn-ghost, html.ewc body .risk-btn, html.ewc body .tf-btn, html.ewc body .btn.buy, html.ewc body .btn.sell {
  background:#fff !important; color:var(--ewc-dark) !important; border:1px solid #dcdcdc !important; border-radius:12px !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important; box-shadow:none !important; text-shadow:none !important;
}
html.ewc body .btn-ghost::after, html.ewc body .risk-btn::after, html.ewc body .btn.buy::after, html.ewc body .btn.sell::after,
html.ewc body .tf-btn::after, html.ewc body .sigtab-row::after, html.ewc body .dash-tabs::after { display:none !important; }
html.ewc body .btn-ghost:hover, html.ewc body .risk-btn:hover, html.ewc body .tf-btn:hover { background:var(--ewc-bg) !important; border-color:#c9c9c9 !important; }
html.ewc body .btn.buy { color:var(--buy) !important; }
html.ewc body .btn.sell { color:var(--sell) !important; }
html.ewc body .btn-ghost.active, html.ewc body .risk-btn.active, html.ewc body .tf-btn.active, html.ewc body .btn.gold, html.ewc body .briefing-cta {
  background:var(--ewc-dark) !important; color:#fff !important; border-color:var(--ewc-dark) !important; box-shadow:none !important;
  font-family:'Chakra Petch',sans-serif !important; text-transform:uppercase; letter-spacing:.02em !important; border-radius:12px !important;
}
html.ewc body .sigtab-row, html.ewc body .dash-tabs, html.ewc body .ls-levels {
  background:#fff !important; border:1px solid var(--ewc-line) !important; box-shadow:none !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important; border-radius:14px !important; padding:4px !important;
}
html.ewc body .sigtab, html.ewc body .dash-tab { color:var(--ewc-muted) !important; border-radius:10px !important; }
html.ewc body .sigtab.active, html.ewc body .dash-tab.active { background:var(--ewc-dark) !important; color:#fff !important; box-shadow:none !important; }
html.ewc .nav-lens { display:none !important; }

/* chip, badge */
html.ewc .badge.mid { color:var(--ewc-gold) !important; border-color:rgba(152,124,75,.45) !important; }
html.ewc .badge.lo { background:var(--ewc-bg) !important; border-color:var(--ewc-line) !important; }
html.ewc .live-chip, html.ewc .bias-pill { border-radius:999px !important; }
html.ewc .bias-pill { font-family:'Chakra Petch',sans-serif !important; font-weight:700 !important; }

/* bảng, ô nhập */
html.ewc body table.ledger thead th { background:var(--ewc-bg) !important; color:var(--ewc-muted) !important; border-bottom:none !important; }
html.ewc body table.ledger tbody td { border-bottom:1px solid #f0f0f0 !important; color:var(--ewc-dark); }
html.ewc body table.ledger tbody tr:hover td { background:#fafafa !important; }
html.ewc input[type=number], html.ewc input[type=text], html.ewc input[type=email], html.ewc input[type=password], html.ewc select, html.ewc textarea {
  background:var(--ewc-bg) !important; border:1px solid transparent !important; color:var(--ewc-dark) !important; border-radius:12px !important;
  backdrop-filter:none !important; -webkit-backdrop-filter:none !important;
}
html.ewc input:focus, html.ewc select:focus, html.ewc textarea:focus { border-color:var(--ewc-gold) !important; box-shadow:0 0 0 3px rgba(152,124,75,.15) !important; outline:none; }
html.ewc select option { background:#fff; color:var(--ewc-dark); }

/* bản tin popup */
html.ewc .briefing-overlay { background:rgba(21,21,21,.45) !important; backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
html.ewc body .briefing-card { background:#fff !important; border:none !important; border-radius:24px !important; box-shadow:0 30px 80px rgba(0,0,0,.25) !important; color:var(--ewc-dark) !important; }
html.ewc .briefing-card p, html.ewc .briefing-meta, html.ewc .briefing-foot { color:#4a4a4a !important; }
html.ewc .briefing-tag { color:var(--ewc-gold) !important; }
html.ewc .briefing-close { color:var(--ewc-dark) !important; background:var(--ewc-bg) !important; border:none !important; }
html.ewc .briefing-quote { color:var(--ewc-dark) !important; border-left-color:var(--ewc-gold) !important; }
html.ewc .briefing-xau-tag { background:var(--ewc-bg) !important; color:var(--ewc-dark) !important; border-color:var(--ewc-line) !important; }
html.ewc .briefing-countdown { background:rgba(152,124,75,.12) !important; color:var(--ewc-gold) !important; }

/* mục Học */
html.ewc .ls-card, html.ewc .ls-nav a { background:#fff !important; border:1px solid var(--ewc-line) !important; color:var(--ewc-dark) !important; border-radius:18px !important; }
html.ewc .ls-card:hover, html.ewc .ls-nav a:hover { border-color:var(--ewc-gold) !important; background:#fff !important; box-shadow:var(--shadow); }
html.ewc .card .ls-card { background:var(--ewc-bg) !important; border-color:transparent !important; }
html.ewc .card .ls-card:hover { background:#fff !important; border-color:var(--ewc-gold) !important; }
html.ewc .ls-card .t { font-family:'Chakra Petch',sans-serif; font-weight:700; font-size:1.02rem; }
html.ewc .ls-card.done { border-color:rgba(10,157,90,.45) !important; }
html.ewc .ls-stat { background:#fff !important; border:none !important; box-shadow:var(--shadow); color:var(--ewc-muted) !important; }
html.ewc .ls-progress { background:#e9e9e9 !important; }
html.ewc .ls-progress > div { background:linear-gradient(90deg, var(--ewc-gold-deep), var(--ewc-gold-2)) !important; }
html.ewc .ls-jump a { border-color:#dcdcdc !important; color:var(--ewc-dark) !important; background:#fff; }
html.ewc .ls-jump a:hover { border-color:var(--ewc-gold) !important; color:var(--ewc-gold) !important; }
html.ewc .ls-body { color:#2b2b2b !important; }
html.ewc .ls-body b, html.ewc .ls-body h3 { color:var(--ewc-dark) !important; }
html.ewc .ls-box.tip { background:rgba(152,124,75,.08) !important; border-color:rgba(152,124,75,.35) !important; }
html.ewc .ls-box.warn { background:rgba(224,38,63,.06) !important; border-color:rgba(224,38,63,.3) !important; }
html.ewc .ls-fig { background:var(--ewc-dark) !important; border:none !important; }
html.ewc .ls-fig figcaption { color:#b5b5b5 !important; }
html.ewc .ls-apply { background:var(--ewc-dark) !important; border:none !important; color:#fff !important; }
html.ewc .ls-apply .eyebrow, html.ewc .ls-apply a { color:var(--ewc-gold-2) !important; }
html.ewc .ls-crumb a:hover { color:var(--ewc-gold) !important; }
html.ewc .ls-lede { border-left-color:var(--ewc-gold) !important; }
html.ewc .ls-donebtn.active { background:var(--buy) !important; color:#fff !important; border-color:var(--buy) !important; }

/* chân trang */
.ewc-foot { background:var(--ewc-dark); color:#cfcfcf; margin-top:56px; padding:44px 32px 36px; }
.ewc-foot-in { max-width:1396px; margin:0 auto; display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:28px; }
.ewc-foot h4 { margin:0 0 12px; color:#fff; font:700 .82rem/1 'Chakra Petch',sans-serif; letter-spacing:.02em; text-transform:uppercase; }
.ewc-foot a { display:block; color:#cfcfcf; text-decoration:none; font-size:.86rem; padding:5px 0; }
.ewc-foot a:hover { color:var(--ewc-gold-2); }
.ewc-foot .brand-l { display:block; width:220px; max-width:100%; height:auto; }
.ewc-foot p { font-size:.82rem; line-height:1.6; color:#9a9a9a; margin:10px 0 0; max-width:420px; }
.ewc-foot-copy { max-width:1396px; margin:28px auto 0; padding-top:18px; border-top:1px solid #2c2c2c; font-size:.76rem; color:#7d7d7d; }

/* ---------- điện thoại / tablet ---------- */
@media (max-width:1023px) {
  html.ewc body { padding-left:0; padding-bottom:calc(var(--ewc-bottom-h) + env(safe-area-inset-bottom)); }
  .ewc-side { display:none; }
  .ewc-bottom {
    display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); position:fixed; left:0; right:0; bottom:0; z-index:90;
    height:calc(var(--ewc-bottom-h) + env(safe-area-inset-bottom)); padding:0 6px env(safe-area-inset-bottom);
    background:rgba(255,255,255,.82); backdrop-filter:blur(30px); -webkit-backdrop-filter:blur(30px);
    box-shadow:0 -6px 24px rgba(0,0,0,.08);
  }
  .ewc-bottom .ewc-item { padding:9px 2px 6px; background:none !important; cursor:pointer; border:none; font:inherit; color:var(--ewc-dark); }
  .ewc-bottom .ewc-item .material-symbols-outlined { font-size:24px; }
  .ewc-bottom .ewc-item .l { font-weight:500; }
  .ewc-bottom .ewc-item.active .l { font-weight:700; }
  .ewc-sheet { display:block; position:fixed; inset:0; z-index:95; pointer-events:none; }
  .ewc-sheet .bg { position:absolute; inset:0; background:rgba(0,0,0,.35); opacity:0; transition:opacity .2s ease; }
  .ewc-sheet .panel {
    position:absolute; left:0; right:0; bottom:0; background:#fff; border-radius:24px 24px 0 0; padding:10px 16px calc(18px + var(--ewc-bottom-h) + env(safe-area-inset-bottom));
    transform:translateY(100%); transition:transform .25s ease; display:grid; grid-template-columns:repeat(3, 1fr); gap:8px;
  }
  .ewc-sheet .grab { grid-column:1/-1; width:40px; height:4px; border-radius:2px; background:#ddd; margin:2px auto 8px; }
  .ewc-sheet .ewc-item { background:var(--ewc-bg); border-radius:16px; padding:14px 6px; }
  .ewc-sheet.open { pointer-events:auto; }
  .ewc-sheet.open .bg { opacity:1; }
  .ewc-sheet.open .panel { transform:none; }
  html.ewc .wrap { padding-left:16px !important; padding-right:16px !important; padding-top:24px !important; }
  .ewc-stats { padding:0 16px; gap:10px; margin-top:16px; }
  .ewc-stat { padding:18px 18px; border-radius:18px; }
  .ewc-stat .k { font-size:.74rem; }
  .ewc-foot { padding:32px 16px 28px; margin-top:40px; }
  .ewc-foot-in { grid-template-columns:1fr 1fr; }
  .ewc-foot-in > :first-child { grid-column:1/-1; }
  .ewc-mtop {
    display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 16px; background:#fff;
    position:sticky; top:0; z-index:80; box-shadow:0 1px 0 var(--ewc-line);
  }
  .ewc-mtop .ewc-logo { flex-direction:row; padding:0; gap:8px; }
  .ewc-mtop .ewc-logo .m { width:34px; height:34px; border-radius:10px; font-size:.85rem; }
  .ewc-mtop .ewc-logo .t { font-size:.78rem; text-align:left; }
  .ewc-mtop .ewc-btn { padding:10px 14px; font-size:.66rem; }
  html.ewc body .card { border-radius:20px !important; }
}
@media (min-width:1024px) { .ewc-mtop { display:none; } }
@media (max-width:560px) {
  .ewc-hero { padding:44px 16px 56px; }
  .ewc-hero-sub { margin-top:16px; }
}

/* Nút đổi giao diện. .ewc-switch-new hiện ở giao diện CŨ (không có html.ewc)
   nên viết không phụ thuộc biến/font của theme. */
.ewc-theme-btn { width:100%; border:none; background:none; cursor:pointer; font:inherit; }
.ewc-side-foot .ewc-theme-btn { border-top:1px solid var(--ewc-line); }
.ewc-switch-new {
  position:fixed; right:16px; bottom:16px; z-index:9999; padding:11px 16px; border-radius:12px; border:none; cursor:pointer;
  background:#151515; color:#fff; font:700 13px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing:.02em;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}
.ewc-switch-new:hover { background:#000; }