/* ===== Bản điện thoại (2026-10-18): đơn giản, dễ bấm, không gì bị che hay tràn ngang. Nạp CUỐI CÙNG trên mọi trang. =====
   App (≤900px): thanh trên cùng (logo + tài khoản gọn), thanh tab cố định dưới đáy với 6 mục chia đều và nhãn ngắn (menu.js .sl-short),
   bóng chat nằm trên thanh tab. Trang công khai (≤760px): nút ☰ mở menu xổ xuống thay cho hàng nút tràn ngang. */

.sl-short{display:none;}
.nav-burger{display:none;}

@media (max-width:900px){
  html,body{overflow-x:hidden;}

  /* ---------- App: thanh tab dưới đáy ---------- */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll{position:fixed !important;left:0 !important;right:0 !important;bottom:0 !important;top:auto !important;width:100% !important;max-width:100% !important;height:auto !important;display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;justify-content:space-between !important;gap:0 !important;overflow:hidden !important;padding:6px 4px calc(6px + env(safe-area-inset-bottom)) !important;margin:0 !important;background-color:#fff !important;background-image:none !important;border-top:1px solid rgba(35,33,44,.1) !important;box-shadow:0 -6px 20px rgba(35,33,44,.06) !important;z-index:900 !important;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link:not([style*="display:none"]):not([style*="display: none"]){flex:1 1 0 !important;min-width:0 !important;width:auto !important;max-width:none !important;display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;gap:3px !important;padding:4px 0 !important;margin:0 !important;border:0 !important;border-radius:12px !important;background:transparent !important;box-shadow:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link::after{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link > span{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link .sl-short{display:block !important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;font-size:10px;font-weight:600;letter-spacing:-.01em;line-height:1.2;color:#6b6878 !important;-webkit-text-fill-color:#6b6878 !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link i{display:flex !important;align-items:center;justify-content:center;width:44px !important;height:28px;border-radius:999px;font-size:20px !important;color:#6b6878 !important;-webkit-text-fill-color:#6b6878 !important;background:transparent !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link.active i{background-color:#23212C !important;color:#fff !important;-webkit-text-fill-color:#fff !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link.active i::before{color:#fff !important;-webkit-text-fill-color:#fff !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-scroll a.sidebar-link.active .sl-short{color:#23212C !important;-webkit-text-fill-color:#23212C !important;font-weight:700;}
  /* nội dung không bị thanh tab che */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .app-main{padding-bottom:calc(92px + env(safe-area-inset-bottom)) !important;}

  /* ---------- App: tài khoản gọn ở góc trên phải ---------- */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-footer{left:auto !important;right:8px !important;width:auto !important;max-width:calc(100% - 130px) !important;padding:0 !important;border:0 !important;overflow:visible !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-footer .auth-widget{overflow:visible !important;width:auto !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .acct-card{width:auto !important;max-width:100% !important;display:flex !important;align-items:center !important;gap:8px !important;padding:5px 10px 5px 5px !important;border-radius:999px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .acct-card .auth-avatar{width:30px !important;height:30px !important;flex:none;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .acct-card .acct-info,html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .acct-card .acct-chev{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .acct-card .plan-chip{position:static !important;max-width:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) .app-sidebar .sidebar-footer .acct-menu{top:calc(100% + 8px) !important;bottom:auto !important;left:auto !important;right:0 !important;min-width:210px !important;}

  /* ---------- Bóng chat hỗ trợ: nhỏ hơn, không đè nội dung ---------- */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lsw-root{right:12px !important;bottom:calc(16px + env(safe-area-inset-bottom)) !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) body:has(.app-sidebar) .lsw-root{bottom:calc(86px + env(safe-area-inset-bottom)) !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lsw-fab{width:46px !important;height:46px !important;box-shadow:0 6px 18px rgba(35,33,44,.22) !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lsw-fab .lsw-cat{width:32px !important;height:32px !important;}
}

@media (max-width:760px){
  /* ---------- Trang công khai: đầu trang gọn + nút ☰ ---------- */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header{position:sticky !important;top:0;z-index:950;margin:0 !important;border-radius:0 !important;width:100% !important;max-width:100% !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav{display:flex !important;flex-wrap:nowrap !important;align-items:center !important;gap:8px !important;padding:10px 14px !important;position:relative;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .logo{margin-right:auto !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .nav-actions{order:2 !important;display:flex !important;flex-direction:row !important;flex-wrap:nowrap !important;align-items:center;gap:10px;margin:0 !important;width:auto !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .nav-actions .auth-widget{display:flex !important;flex-wrap:nowrap !important;white-space:nowrap;font-size:14px;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .logo{order:1 !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .nav-cta{padding:9px 14px !important;font-size:14px !important;white-space:nowrap;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-burger{order:3 !important;display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:12px;border:1px solid rgba(35,33,44,.14) !important;background-color:#fff !important;font-size:20px;cursor:pointer;color:#23212C !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-burger i::before{color:#23212C !important;-webkit-text-fill-color:#23212C !important;}
  /* menu ẩn, bấm ☰ thì xổ xuống thành danh sách dọc */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"]{display:none !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"]{display:flex !important;flex-direction:column !important;align-items:stretch !important;gap:2px !important;position:absolute !important;top:100% !important;left:10px !important;right:10px !important;width:auto !important;margin:6px 0 0 !important;padding:8px !important;overflow:visible !important;border:1px solid rgba(35,33,44,.1) !important;border-radius:16px !important;background-color:#fff !important;box-shadow:0 18px 40px rgba(35,33,44,.18) !important;z-index:960;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"] a{display:flex !important;align-items:center;gap:10px;width:100% !important;padding:12px 14px !important;border:0 !important;border-radius:10px !important;background:transparent !important;box-shadow:none !important;font-size:15px !important;color:#23212C !important;-webkit-text-fill-color:#23212C !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"] a:hover{background-color:#f3f2f7 !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"] .nav-more-toggle{display:none !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"] .nav-more-list{display:block !important;max-height:none !important;opacity:1 !important;visibility:visible !important;overflow:visible !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e) body > header .nav-links[data-menu="public"] .nav-more-inner{display:flex !important;flex-direction:column !important;gap:2px;padding:4px 0 0 !important;border-top:1px solid rgba(35,33,44,.08);margin-top:4px;}

  /* ---------- Trang chủ ---------- */
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .hx-cards{gap:10px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .hx-card{display:grid !important;grid-template-columns:auto 1fr;column-gap:12px;align-items:center;padding:16px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .hx-card .hx-ic{grid-row:1;margin:0 !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .hx-card h3{grid-row:1;grid-column:2;margin:0 !important;font-size:17px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .hx-card p{grid-column:1 / -1;margin:8px 0 0 !important;font-size:14px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) #pricing .section-head > p{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .fw-show{margin-top:40px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .fw-show-head p{font-size:15px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) .fw-show .scope-bar span{display:none;}
}

/* Chân trang: link xuống dòng gọn, không bị cắt hai bên */
@media (max-width:760px){
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) footer .footer-links{display:flex !important;flex-wrap:wrap !important;justify-content:center !important;gap:6px 16px !important;padding:0 16px !important;max-width:100% !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) footer .footer-links a{white-space:nowrap !important;font-size:13px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d) footer p{padding:0 16px !important;font-size:12.5px !important;}
}
@media (max-width:760px){
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .auth-widget *{white-space:nowrap !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .auth-widget a,html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body > header nav .auth-widget button{padding:6px 4px !important;font-size:14px !important;}
}
@media (max-width:760px){
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header .nav-links[data-menu="public"]{width:calc(100% - 20px) !important;min-width:0 !important;max-width:none !important;}
  html.theme-clean.nav-open:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header .nav-links[data-menu="public"] *{visibility:visible !important;opacity:1 !important;}
}
/* Nút tạm dừng video: góc dưới trái trên điện thoại, tránh trùng bóng chat ở góc phải */
@media (max-width:760px){html.theme-clean:not(#a):not(#b):not(#c):not(#d) .scope-toggle{right:auto !important;left:10px !important;bottom:10px !important;}}

/* Community trên điện thoại: danh sách phòng là lưới 2 cột hiện đủ mọi phòng (không phải hàng vuốt ngang mà khách mới không biết),
   mỗi ô chỉ có biểu tượng và tên; ô hồ sơ chiếm cả hàng. */
@media (max-width:900px){
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-rooms{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:6px !important;overflow:visible !important;padding:8px !important;flex-direction:initial !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room{width:auto !important;min-width:0 !important;flex:none !important;display:flex !important;align-items:center !important;gap:8px !important;padding:10px !important;white-space:normal !important;border-radius:12px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room > i{flex:none;font-size:18px !important;width:30px !important;height:30px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room .cm-room-name{min-width:0;flex:1;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room .cm-room-name b{display:block;font-size:13.5px !important;line-height:1.25;white-space:normal;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room .cm-room-name small{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room .cm-pro{flex:none;font-size:10px !important;padding:2px 6px !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-rooms .cm-meb{grid-column:1 / -1 !important;width:auto !important;margin:2px 0 0 !important;}
}
@media (max-width:900px){
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room{position:relative !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) #communityApp .cm-room .cm-pro{position:absolute !important;top:-6px !important;right:6px !important;font-size:9.5px !important;padding:1px 6px !important;line-height:1.4 !important;}
}

/* 2026-10-19: trang công khai trên điện thoại, đã đăng nhập: tên dài + nhãn gói đẩy nút ☰ ra ngoài màn hình. Ẩn tên (giữ ảnh và nhãn gói), cho phần tài khoản co lại. */
@media (max-width:760px){
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header nav .nav-actions{min-width:0 !important;flex:0 1 auto !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header nav .nav-actions .auth-widget,html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header nav .nav-actions .auth-account{min-width:0 !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header nav .nav-actions .auth-name{display:none !important;}
  html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e):not(#f) body > header nav .logo{flex:none;}
}

/* 2026-10-19: trong Community nút chat nằm cao hơn ô soạn tin để không che nút gửi */
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body:has(#community:not([style*="none"])) .lsw-root{bottom:110px !important;}
@media (max-width:760px){ html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) body:has(#community:not([style*="none"])) .lsw-root{bottom:calc(150px + env(safe-area-inset-bottom)) !important;} }

/* 2026-10-19: toast (ui.js showToast) luôn có khung rõ ràng. Giao diện trắng từng xoá nền của nó nên chữ nằm trơ trọi trên trang.
   Viên thuốc tối ở giữa phía trên, chữ trắng, có chấm màu theo loại (thông tin tím, thành công xanh, lỗi đỏ). */
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast-container{position:fixed !important;top:calc(14px + env(safe-area-inset-top,0px)) !important;bottom:auto !important;left:0 !important;right:0 !important;transform:none !important;width:auto !important;padding:0 12px !important;z-index:10050 !important;display:flex !important;flex-direction:column !important;align-items:center !important;gap:8px !important;pointer-events:none;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast{display:flex !important;align-items:center !important;gap:10px !important;max-width:min(92vw,460px) !important;padding:12px 18px !important;border:1px solid rgba(255,255,255,.12) !important;border-radius:14px !important;background-color:#23212C !important;background-image:none !important;box-shadow:0 14px 40px rgba(20,18,30,.35) !important;font-size:14px !important;font-weight:600 !important;line-height:1.45 !important;color:#fff !important;-webkit-text-fill-color:#fff !important;pointer-events:auto;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast::before{content:'';flex:none;width:9px;height:9px;border-radius:50%;background-color:#a5a2e6;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast.toast-success::before{background-color:#4ade80;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast.toast-error{background-color:#b4233a !important;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d):not(#e) .toast.toast-error::before{background-color:#fff;}

/* Nút dừng video nhỏ hơn trên điện thoại để không che ảnh chụp app (2026-10-21) */
@media (max-width:760px){html.theme-clean:not(#a):not(#b):not(#c):not(#d) .scope-toggle{width:28px !important;height:28px !important;font-size:13px !important;left:8px !important;bottom:8px !important;opacity:.7 !important;}}

/* Hộp trạng thái có mèo (không tìm thấy, lỗi): trên điện thoại mèo nằm trên, chữ rộng hết hộp (2026-10-21) */
@media (max-width:760px){html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lynx-state:not(.lynx-state-compact){flex-direction:column !important;align-items:center !important;text-align:center !important;gap:10px !important;padding:22px 18px !important;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lynx-state:not(.lynx-state-compact) .lynx-state-title{font-size:17px !important;line-height:1.35 !important;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lynx-state:not(.lynx-state-compact) .lynx-state-sub{font-size:14px !important;line-height:1.55 !important;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lsw-fab{width:42px !important;height:42px !important;}
html.theme-clean:not(#a):not(#b):not(#c):not(#d) .lsw-fab .lsw-cat{width:28px !important;height:28px !important;}}

/* 2026-10-23 (chủ dự án): trang Features trên điện thoại: 11 thẻ tính năng thành hàng lướt ngang (thấy mép thẻ kế tiếp) thay vì 11 ô xếp chồng dài khoảng 6.000px */
@media (max-width:760px){
  html:not(#a):not(#b):not(#c):not(#d):not(#e) .bento{display:flex !important;grid-template-columns:none !important;gap:12px !important;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin-left:-16px !important;margin-right:-16px !important;padding:4px 16px 14px !important;align-items:stretch}
  html:not(#a):not(#b):not(#c):not(#d):not(#e) .bento::-webkit-scrollbar{display:none}
  html:not(#a):not(#b):not(#c):not(#d):not(#e) .bento > .feature-card{flex:0 0 86% !important;scroll-snap-align:start;min-width:0 !important;grid-column:auto !important;margin:0 !important}
}
.f-swipe{display:none}
@media (max-width:760px){ .f-swipe{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#6b6880;margin:0 0 8px} }
