/* N9BAR — Thiết kế tool 9minecraft (01/12/2026): thanh icon cố định ĐÁY sát mép + cửa sổ tính năng (bottom sheet).
   Chỉ có hiệu lực khi n9bar.js gắn lớp html.n9bar-on (≤640px + data-n9k="tat"). PC không đổi. */
html.n9bar-on body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
.n9bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; display: flex; align-items: stretch; justify-content: space-around;
  height: calc(56px + env(safe-area-inset-bottom, 0px)); padding: 0 0 env(safe-area-inset-bottom, 0px); margin: 0;
  background: var(--surface, #fff); border-top: 1px solid var(--line, #e2e8f0); box-shadow: 0 -2px 10px rgba(15, 23, 42, .06); }
.n9bar .n9bar__nut, .n9bar-tren .n9bar__nut { box-shadow: none; border-radius: 0; }
.n9bar__nut { flex: 1 1 0; min-width: 44px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 0 2px; margin: 0; border: 0; background: transparent; color: var(--fg-muted, #475569); font: 600 11px/1.1 inherit;
  -webkit-tap-highlight-color: transparent; cursor: pointer; }
.n9bar__nut svg { width: 24px; height: 24px; flex: none; }
.n9bar__nut span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n9bar__nut[aria-expanded="true"] { color: var(--nhan, #0e7c66); }
.n9bar__nut--chinh { flex: 0 0 auto; padding: 0 6px; }
.n9bar__nut--chinh { gap: 2px; }
.n9bar__nut--chinh .n9bar__o { display: flex; align-items: center; justify-content: center; min-width: 52px; height: 28px; padding: 0 12px;
  border-radius: 10px; background: var(--nhan, #0e7c66); color: #fff; font: 700 13px/1 inherit; gap: 6px; }
.n9bar__nut--chinh .n9bar__o svg { width: 20px; height: 20px; }
.n9bar-tren { position: sticky; top: 0; z-index: 8990; display: flex; overflow-x: auto; gap: 4px; padding: 4px 6px; margin: 0 -12px 8px;
  background: var(--surface, #fff); border-bottom: 1px solid var(--line, #e2e8f0); scrollbar-width: none; }
.n9bar-tren::-webkit-scrollbar { display: none; }
.n9bar-tren .n9bar__nut { flex: 0 0 auto; flex-direction: row; height: 44px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: 10px; }
.n9bar-tren .n9bar__nut svg { width: 20px; height: 20px; }
.n9bar-tren .n9bar__nut[aria-expanded="true"] { background: color-mix(in srgb, var(--nhan, #0e7c66) 12%, transparent); }

/* Cửa sổ tính năng */
.n9bar-sheet { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 8995; display: none;
  flex-direction: column; max-height: 75svh; margin: 0; background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0);
  border-bottom: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 28px rgba(15, 23, 42, .16); }
.n9bar-sheet.mo { display: flex; animation: n9bar-len .18s ease-out; }
@keyframes n9bar-len { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.n9bar-sheet__dau { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 4px 0 16px; border-bottom: 1px solid var(--line, #e2e8f0);
  touch-action: none; cursor: grab; }
.n9bar-sheet__dau b { flex: 1; font: 700 16px/1.2 inherit; color: var(--fg, #0f172a); }
.n9bar-sheet .n9bar-sheet__dau button { width: 44px !important; height: 44px !important; min-width: 0 !important; display: flex; align-items: center;
  justify-content: center; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 10px !important; box-shadow: none !important;
  background: transparent !important; color: var(--fg-muted, #475569) !important; cursor: pointer; }
.n9bar-sheet__dau button svg { width: 22px; height: 22px; }
.n9bar-sheet__than { overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 16px; -webkit-overflow-scrolling: touch; }
.n9bar-sheet__ngan[hidden] { display: none !important; }
.n9bar-sheet.gon .n9bar-sheet__than { display: none; }
.n9bar-sheet.gon { border-radius: 12px 12px 0 0; }
.n9bar-sheet.gon .n9bar-sheet__thu svg { transform: rotate(180deg); }
:root[data-theme="dark"] .n9bar, :root[data-theme="dark"] .n9bar-sheet, :root[data-theme="dark"] .n9bar-tren { background: var(--surface, #12171b); border-color: var(--line, #2a343a); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .n9bar, :root:not([data-theme="light"]) .n9bar-sheet,
  :root:not([data-theme="light"]) .n9bar-tren { background: var(--surface, #12171b); border-color: var(--line, #2a343a); } }
@media (min-width: 641px) { .n9bar, .n9bar-sheet, .n9bar-tren { display: none !important; } }
