/* CubeX – ⚙️ Cài đặt (settings.js) */
.set-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.set-btn[aria-expanded="true"] svg { transform: rotate(60deg); transition: transform .3s; }
.cx-set { position: fixed; top: 64px; right: max(12px, env(safe-area-inset-right)); z-index: 2147482500; width: min(360px, calc(100vw - 24px));
  max-height: calc(100vh - 80px); overflow: auto; padding: 14px 16px 16px; border-radius: 16px;
  background: var(--surface, #fff); color: var(--text, #14161c); border: 1px solid var(--border, #e1e4eb);
  box-shadow: 0 18px 50px rgba(15, 12, 40, .25); animation: cxIn .18s ease-out; }
.cx-set[hidden] { display: none; }
@keyframes cxIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cx-set-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 1.05rem; }
.cx-set-x { border: 0; background: transparent; color: var(--muted, #5f6573); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.cx-set-x:hover { background: var(--border, #e1e4eb); }
.cx-sec { border-top: 1px solid var(--border, #e1e4eb); padding-top: 10px; }
.cx-sec h4 { margin: 0 0 2px; font-size: .95rem; }
.cx-sec h4 span { font-weight: 500; color: var(--muted, #5f6573); font-size: .8rem; }
.cx-hint { margin: 0 0 8px; color: var(--muted, #5f6573); font-size: .8rem; }
.cx-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.cx-opt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 6px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--border, #e1e4eb); transition: border-color .15s, background .15s; }
.cx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cx-opt b { font-size: .92rem; }
.cx-opt small { font-size: .68rem; color: var(--muted, #5f6573); line-height: 1.2; }
.cx-opt.on { border-color: var(--accent, #5b3df5); background: var(--accent-soft, #ece8ff); }
.cx-opt:focus-within { outline: 2px solid var(--accent, #5b3df5); outline-offset: 1px; }
.cx-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; cursor: pointer; }
.cx-check input { width: 18px; height: 18px; accent-color: var(--accent, #5b3df5); }
.cx-sec + .cx-sec { margin-top: 12px; }
.cx-sec .cx-check + .cx-check, .cx-sec .cx-check + .cx-range, .cx-sec .cx-range + .cx-check, .cx-sec .cx-row + .cx-row, .cx-sec .cx-check + .cx-row { margin-top: 8px; }
.cx-sub { margin: 2px 0 6px 26px; }
.cx-range { display: grid; grid-template-columns: auto 1fr 3.2em; align-items: center; gap: 8px; font-size: .84rem; padding-left: 26px; }
.cx-range input { width: 100%; accent-color: var(--accent, #5b3df5); }
.cx-range input:disabled { opacity: .4; }
.cx-range b { text-align: right; font-variant-numeric: tabular-nums; }
.cx-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 600; }
.cx-row select { max-width: 55%; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border, #e1e4eb); background: var(--surface, #fff); color: inherit; font: inherit; font-weight: 600; font-size: .82rem; }
/* ♟️ Tắt chấm ô đi được / toạ độ (bàn 2D; bàn 3D đọc cùng nhãn trong gfx-chess.js). Các ô vẫn giữ lớp tgt/cap để bấm đúng */
body.cx-nodots .cb-sq.tgt::after, body.cx-nodots .cb-sq.cap::after { display: none !important; }
body.cx-nocoord .cb-rank, body.cx-nocoord .cb-file { display: none !important; }
/* Ô hiện FPS ở góc dưới bên trái */
.cx-fps { position: fixed; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 2147483000;
  display: flex; align-items: baseline; gap: 4px; padding: 5px 10px; border-radius: 10px; pointer-events: none;
  background: rgba(10, 10, 20, .78); color: #fff; font: 600 12px/1.1 ui-monospace, Consolas, monospace; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.cx-fps b { font-size: 16px; min-width: 2ch; text-align: right; }
.cx-fps small { opacity: .7; font-size: 10px; }
.cx-fps.good b { color: #4ade80; } .cx-fps.ok b { color: #facc15; } .cx-fps.bad b { color: #f87171; }
/* Điện thoại: thanh trên cùng chật (thêm nút ⚙️) → thu gọn khoảng cách / nút; ô FPS nằm trên thanh menu dưới cùng */
@media (max-width: 480px) {
  .nav-actions { gap: 4px !important; }
  .nav-actions .icon-btn { width: 34px !important; min-width: 34px !important; height: 34px !important; padding: 0 !important; }
  .nav-actions #btnInstall { padding: 0 8px !important; font-size: .78rem !important; }
  .nav-actions #langBtn { padding: 0 7px !important; }
  .cx-fps { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .cx-set { top: 56px; }
}
@media (max-width: 380px) { .brand .brand-name { display: none !important; } } /* máy rất hẹp: chỉ giữ logo cho đủ chỗ các nút */
