/* ==========================================================
   SS — Lotto App Theme (mobile-first, polished for PC & mobile)
   ========================================================== */

:root {
  --brand-1: #0d6efd;
  --brand-2: #6610f2;
  --brand-grad: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  --brand-grad-soft: linear-gradient(135deg, rgba(13,110,253,.08), rgba(102,16,242,.08));
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #1f2937;
  --ink-muted: #6b7280;
  --line: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.12);
  --radius-sm: .5rem;
  --radius-md: .75rem;
  --radius-lg: 1rem;
  /* สีตัวอักษรที่อ่านออกเมื่อวางบนพื้น --brand-1 (ธีมทองต้องใช้ตัวอักษรเข้ม ไม่ใช่ขาว) */
  --on-brand: #ffffff;
  /* ขอบช่องกรอก — แยกจาก --line เพราะ --line ใช้กับขอบการ์ด/ตารางด้วย
     ถ้าไปเข้ม --line ทั้งตัว การ์ดจะดูหนักไปหมด (เจ้าของขอให้ "ขอบ input เด่นขึ้น") */
  --input-border: #7d879a;        /* contrast 3.62 บนพื้นขาว — ผ่านเกณฑ์ขอบ UI (>=3.0) */
  --input-border-hover: #667085;
}

html, body {
  font-family: "Sarabun", "Segoe UI", system-ui, -apple-system, "Noto Sans Thai", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.bg-body-tertiary { background: var(--surface-2) !important; }

/* โหมดมืด (เฉพาะตอนไม่ได้ตั้งธีมแบรนด์) — ตัวแปรพื้นผิว/ตัวอักษรต้องมืดตามด้วย
   ไม่งั้นสวิตช์สลับโหมดจะเปลี่ยนแค่คอมโพเนนต์ของ Bootstrap แต่พื้นหน้ายังขาว
   (ธีมแบรนด์ red / red-dark มีชุดตัวแปรของตัวเองอยู่แล้วใน themes.css) */
html[data-bs-theme="dark"]:not([data-theme]) {
  --surface: #1e232a;
  --surface-2: #161a20;
  --ink: #e9ecef;
  --ink-muted: #adb5bd;
  --line: rgba(255, 255, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
  --input-border: rgba(255, 255, 255, .42);
  --input-border-hover: rgba(255, 255, 255, .66);
}

/* ============ Navbar ============ */
.navbar {
  background: var(--brand-grad) !important;
  box-shadow: 0 2px 12px rgba(13,110,253,.25);
  padding-top: .75rem; padding-bottom: .75rem;
}
.navbar-brand { letter-spacing: .3px; font-size: 1.15rem; }
.navbar .nav-link { font-weight: 500; border-radius: .5rem; padding: .4rem .75rem !important; transition: background .15s; }
.navbar .nav-link:hover { background: rgba(255,255,255,.12); }
.navbar-text { background: rgba(255,255,255,.12); border-radius: 999px; padding: .3rem .8rem; }
@media (max-width: 991.98px) {
  .navbar-collapse { padding-top: .75rem; }
  .navbar-text { display: inline-block; margin: .5rem 0; }
}

/* ============ Cards / Forms ============ */
.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card-header { background: var(--surface) !important; border-bottom: 1px solid var(--line); border-radius: var(--radius-md) var(--radius-md) 0 0 !important; font-weight: 600; }
.card-header.bg-primary { background: var(--brand-grad) !important; color: #fff; border-bottom: 0; }

.form-control, .form-select, .input-group-text {
  border-radius: .6rem;
  border-width: 2px;                   /* 1.5px ไม่ได้ผล — เบราว์เซอร์ปัดลงเป็น 1px ที่ DPR 1 */
  border-color: var(--input-border);
  transition: border-color .15s, box-shadow .15s;
}
/* ชี้ค้างแล้วเข้มขึ้นอีกขั้น — บอกว่าช่องนี้กรอกได้ */
.form-control:hover:not(:disabled):not([readonly]),
.form-select:hover:not(:disabled) { border-color: var(--input-border-hover); }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-1);
  border-width: 2px;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}
/* ช่องที่กรอกไม่ได้ ต้องดูจางกว่า ไม่งั้นเด่นเท่าช่องที่กรอกได้จนสับสน */
.form-control:disabled, .form-control[readonly], .form-select:disabled {
  border-color: var(--line);
}
/* ติ๊กถูก/วงกลมเลือก ก็ต้องเห็นขอบชัดเหมือนกัน */
.form-check-input {
  border-width: 2px;
  border-color: var(--input-border);
}
.form-check-input:checked { border-color: var(--brand-1); }
.form-control-lg { padding: .75rem 1rem; font-size: 1.05rem; }
.form-floating > label { color: var(--ink-muted); }

/* ============ Buttons ============ */
.btn { border-radius: .55rem; font-weight: 500; transition: transform .1s ease, box-shadow .15s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .7rem 1.1rem; font-size: 1.02rem; }
.btn-primary { background: var(--brand-grad); border: 0; box-shadow: 0 4px 12px rgba(13,110,253,.25); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-grad); filter: brightness(1.05); box-shadow: 0 6px 18px rgba(13,110,253,.35); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); border: 0; box-shadow: 0 4px 12px rgba(16,185,129,.25); }
.btn-success:hover, .btn-success:focus { filter: brightness(1.05); box-shadow: 0 6px 18px rgba(16,185,129,.35); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); border: 0; box-shadow: 0 4px 12px rgba(239,68,68,.22); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); border: 0; color: #fff; }
.btn-outline-primary { border-color: var(--brand-1); color: var(--brand-1); }
.btn-outline-primary:hover { background: var(--brand-grad); border-color: transparent; color: #fff; }
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-dark {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 3px 10px rgba(13,110,253,.3);
}
/* hover ปุ่มเลือกประเภทแทง (label ของ btn-check เช่น 3บน/3โต๊ด/2บน) —
   เติมพื้น + ตัวหนังสือขาว กันตัวอักษรกลืนสีปุ่มตอน hover */
.btn-check + .btn:hover {
  background: var(--brand-grad); border-color: transparent; color: #fff !important;
}

/* ============ Hero ============ */
.hero {
  background: var(--brand-grad);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: 0 12px 36px rgba(13,110,253,.25);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(1200px 300px at 10% -10%, rgba(255,255,255,.15), transparent 50%),
              radial-gradient(800px 260px at 110% 110%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.hero h1 { font-weight: 700; letter-spacing: .2px; }
.hero .btn-light { color: var(--brand-1); font-weight: 600; }

/* ============ Tables ============ */
.table { margin-bottom: 0; }
.table thead th { font-size: .85rem; color: var(--ink-muted); text-transform: none; font-weight: 600; background: #f9fafb !important; border-bottom: 1px solid var(--line); }
.table td, .table th { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--brand-grad-soft); }
.table-responsive { border-radius: var(--radius-md); }

/* ============ Badges ============ */
.badge { font-weight: 600; letter-spacing: .2px; padding: .38em .6em; border-radius: .4rem; }

/* ============ Alerts ============ */
.alert { border-radius: var(--radius-md); border: 0; box-shadow: var(--shadow-sm); }

/* ============ Auth pages ============ */
.card-auth { max-width: 460px; margin: 2rem auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.card-auth .card-body { padding: 2rem; }
@media (max-width: 575.98px) {
  .card-auth { margin: 1rem auto; }
  .card-auth .card-body { padding: 1.25rem; }
}

/* ============ Avatar ============ */
.avatar-lg {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--brand-grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 600;
  box-shadow: 0 6px 16px rgba(13,110,253,.3);
}

/* ============ Round page: digit boxes (OTP-style) ============ */
.digit-boxes {
  display: flex; gap: .6rem; justify-content: center; cursor: text;
  padding: .25rem 0;
}
.digit-boxes .digit-box {
  flex: 1 1 0; max-width: 84px; min-width: 52px; aspect-ratio: 4 / 5;
  border: 2px solid var(--line); border-radius: .7rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.25rem; font-weight: 700; color: #1f2937; background: #fff;
  transition: all .15s;
  box-shadow: var(--shadow-sm);
}
.digit-boxes .digit-box.filled { border-color: var(--brand-1); color: var(--brand-1); background: #f0f6ff; }
.digit-boxes .digit-box.cursor { border-color: var(--brand-1); box-shadow: 0 0 0 .25rem rgba(13,110,253,.2); }
.digit-boxes .digit-box.warn {
  background: #dc3545 !important; border-color: #dc3545 !important; color: #fff !important;
  box-shadow: 0 0 0 .25rem rgba(220,53,69,.25);
  animation: warnPulse 1.2s ease-in-out infinite;
}
@keyframes warnPulse {
  0%,100% { box-shadow: 0 0 0 .25rem rgba(220,53,69,.25); }
  50%     { box-shadow: 0 0 0 .4rem rgba(220,53,69,.45); }
}
.digit-input-hidden {
  position: absolute; opacity: 0; pointer-events: none;
  width: 1px; height: 1px; left: -9999px;
}

/* ============ Type picker ============ */
.type-picker .btn {
  border-radius: .6rem;
  padding: .6rem .3rem;
  font-weight: 600;
  transition: all .15s;
}
.type-picker .btn-check:checked + .btn {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13,110,253,.3);
  transform: translateY(-1px);
}

/* ============ Number grids (2-digit / 3-digit / run) ============ */
.num-grid .col { flex: 0 0 10%; max-width: 10%; }
.num-grid .btn {
  padding: .45rem .1rem; font-size: .85rem; font-weight: 600;
  border-radius: .45rem;
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.num-grid .btn:hover { border-color: var(--brand-1); color: var(--brand-1); }
.num-cell.selected {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important; border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(16,185,129,.35);
  transform: translateY(-1px);
}

/* #grid3 is col-2 based (000-099 per range view, 5 cols x 20 rows) */
#grid3 .col-2 { flex: 0 0 20%; max-width: 20%; }
#grid3 .btn { font-size: .85rem; font-weight: 600; padding: .5rem .1rem; }

/* ============ Numpad (key number helper) ============ */
.numpad .btn { min-height: 56px; font-weight: 600; border-radius: .6rem; box-shadow: var(--shadow-sm); }
.numpad .btn-light { background: #fff; border-color: var(--line); }
.numpad .btn-light:hover { background: var(--brand-grad-soft); border-color: var(--brand-1); color: var(--brand-1); }
@media (max-width: 575.98px) { .numpad .btn { min-height: 48px; font-size: 1.35rem; } }

/* ============ Nav pills ============ */
.nav-pills .nav-link {
  border-radius: .6rem; font-weight: 600; padding: .55rem .8rem;
  color: var(--ink-muted);
}
.nav-pills .nav-link:hover { background: var(--brand-grad-soft); color: var(--brand-1); }
.nav-pills .nav-link.active {
  background: var(--brand-grad) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(13,110,253,.3);
}

/* ============ Modals ============ */
.modal-content { border: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; }
.modal-header.bg-primary { background: var(--brand-grad) !important; }
.modal-header.bg-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }
.modal-footer { border-top: 1px solid var(--line); padding: 1rem 1.25rem; }
@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content { border-radius: 0; }
}

/* ============ Mobile floating bar on round.php ============ */
@media (max-width: 991.98px) {
  body { padding-bottom: 96px !important; }
  .sticky-lg-top { position: static !important; }
}
.fixed-bottom.bg-white {
  box-shadow: 0 -6px 20px rgba(0,0,0,.08);
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.96) !important;
}

/* ============ Small-screen typography & layout ============ */
@media (max-width: 575.98px) {
  .hero { padding: 1.75rem 1.25rem; border-radius: var(--radius-md); }
  .hero h1 { font-size: 1.6rem; }
  .container { padding-left: .75rem; padding-right: .75rem; }
  .card-body { padding: 1rem; }
  .table-responsive { font-size: .88rem; }
  h1, .h1 { font-size: 1.6rem; }
  h3, .h3 { font-size: 1.2rem; }
  .display-5 { font-size: 2rem; }
  .btn-lg { font-size: .98rem; padding: .6rem .85rem; width: 100%; }
  .form-control-lg { font-size: 1.05rem; }
  .digit-boxes .digit-box { font-size: 1.75rem; min-width: 44px; }
  .num-grid .btn { font-size: .75rem; padding: .35rem 0; }
  #grid3 .btn { font-size: .72rem; padding: .4rem 0; }
  .modal-dialog { margin: 0; }

  /* Mobile card improvements */
  .lotto-card { margin-bottom: .75rem; }
  .card { margin-bottom: .75rem; }

  /* Stack columns on mobile */
  .row > [class*="col-"] { margin-bottom: .5rem; }
}
@media (max-width: 359px) {
  .num-grid { overflow-x: auto; }
}

/* ============ Admin sidebar ============ */
@media (max-width: 767.98px) {
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1040; transition: left .25s; }
  body.sidebar-open .admin-sidebar { left: 0; }
  body.sidebar-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1039;
  }
}

/* ============ Result display ============ */
.alert-primary .h3 { color: var(--brand-1); font-variant-numeric: tabular-nums; }

/* ============ Scrollbar (on PC) ============ */
@media (min-width: 768px) {
  .table-responsive::-webkit-scrollbar,
  .modal-body::-webkit-scrollbar { width: 10px; height: 10px; }
  .table-responsive::-webkit-scrollbar-thumb,
  .modal-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
  .table-responsive::-webkit-scrollbar-thumb:hover,
  .modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
}

/* ============ Utility: gradient text ============ */
.text-gradient {
  background: var(--brand-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============ Animations ============ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card, .alert { animation: fadeInUp .25s ease-out; }

/* ============ Mobile-first responsive improvements ============ */
@media (max-width: 991.98px) {
  .container-fluid { padding: 0 .75rem; }

  /* Improve touch targets on mobile */
  .btn { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .nav-link { padding: .6rem .75rem !important; }

  /* Better spacing for mobile cards */
  .card { margin-bottom: 1rem; border-radius: .8rem; }

  /* Flexible grid on mobile */
  .row > * { margin-bottom: .75rem; }
}

/* ============ Extra small devices (< 360px) ============ */
@media (max-width: 359px) {
  .navbar-brand { font-size: 1rem; }
  .hero { padding: 1.25rem 1rem; }
  h1, .h1 { font-size: 1.4rem; }
  h3, .h3 { font-size: 1.1rem; }
  .btn { font-size: .9rem; padding: .5rem .75rem; }
  .display-5 { font-size: 1.75rem; }
  .badge { font-size: .75rem; }
  .table { font-size: .8rem; }
}

/* ============ Tablet landscape (> 992px) ============ */
@media (min-width: 992px) {
  .container { max-width: 1200px; }

  /* Grid optimization for medium screens */
  .row > [class*="col-md"] { display: flex; flex-direction: column; }
}

/* ============ Desktop enhancements ============ */
@media (min-width: 1200px) {
  .card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

  /* Improve hover states on desktop */
  .btn-outline-primary:hover { transform: translateY(-1px); }
  .nav-link:hover { transform: translateY(-1px); }
}

/* ============ Touch device improvements ============ */
@media (hover: none) and (pointer: coarse) {
  /* Reduce transitions on touch devices for better performance */
  * { transition-duration: .1s !important; }

  /* Improve touch feedback */
  .btn, .nav-link, .card { touch-action: manipulation; }

  /* Disable hover effects on touch devices */
  .btn:hover, .nav-link:hover { transform: none; }
}

/* ============ Form improvements for mobile ============ */
.form-group { margin-bottom: 1.25rem; }
.form-label { font-weight: 500; margin-bottom: .5rem; display: block; }

@media (max-width: 575.98px) {
  .form-control, .form-select {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: .75rem;
  }

  /* Stack form columns on mobile */
  .form-row > * { margin-bottom: .75rem; }
}

/* ============ List improvements ============ */
.list-group-item {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}

.list-group-item:hover {
  background: var(--brand-grad-soft);
}

@media (max-width: 575.98px) {
  .list-group-item { padding: .875rem; }
}

/* ============ Grid layout improvements ============ */
.g-3 { --bs-gutter-x: 1rem !important; --bs-gutter-y: 1rem !important; }

@media (max-width: 575.98px) {
  .g-3 { --bs-gutter-x: .75rem !important; --bs-gutter-y: .75rem !important; }
  .g-md-3 { --bs-gutter-x: .5rem !important; --bs-gutter-y: .5rem !important; }
}

/* ============ Typography improvements ============ */
p { line-height: 1.6; margin-bottom: 1rem; }
small { font-size: .875rem; }

/* ============ Safe area support (notch devices) ============ */
@supports (padding: max(0px)) {
  body { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
  .navbar { padding-left: max(.75rem, env(safe-area-inset-left)); padding-right: max(.75rem, env(safe-area-inset-right)); }
}

/* ============ Bottom nav — แทนเมนูแฮมเบอร์เกอร์บนจอเล็ก (เจ้าของสั่ง 2026-09-10) ============
   ต้นฉบับไม่มีของชิ้นนี้ · แสดงเฉพาะ < lg (จุดที่แฮมเบอร์เกอร์เคยอยู่)
   สีอ้างตัวแปร Bootstrap เพื่อให้สลับสว่าง/มืดตามได้เอง · ธีมแบรนด์ override ใน themes.css */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: flex; align-items: stretch;
  background: var(--bs-body-bg);
  border-top: 1px solid var(--bs-border-color);
  box-shadow: 0 -2px 14px rgba(16, 24, 40, .12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-item {
  position: relative;
  flex: 1 1 0; min-width: 0;                 /* min-width:0 = ยอมให้บีบได้ ไม่ดันจนล้นจอ */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: .45rem .1rem .4rem;
  color: var(--bs-secondary-color); text-decoration: none;
  font-size: .66rem; font-weight: 600; line-height: 1.15;
  transition: color .15s;
}
.bottom-nav-item i { font-size: 1.15rem; line-height: 1; }
.bottom-nav-item span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bottom-nav-item:hover { color: var(--brand-1); }
.bottom-nav-item.active { color: var(--brand-1); }
.bottom-nav-item.active::before {         /* ขีดบอกหน้าปัจจุบัน */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand-1);
}
.bottom-nav-item:focus-visible { outline: 2px solid var(--brand-1); outline-offset: -2px; }
/* กันแถบล่างบังท้ายหน้า — เผื่อความสูงแถบ + safe area ของเครื่องที่มีขอบมน */
/* NOTE: style.css ใช้ร่วมกับ layout admin/blank และมีกฎเก่า
   `body { padding-bottom: 96px !important }` (บล็อก "Mobile floating bar on round.php")
   ที่ทับกฎนี้ได้ จึงต้องผูกกับคลาสบน body + !important ให้ชนะด้วย specificity
   คลาส has-bottom-nav ใส่เฉพาะ layout ผู้เล่น = หน้าอื่นไม่ได้รับผลกระทบ */
@media (max-width: 991.98px) {
  body.has-bottom-nav {
    padding-bottom: calc(4.1rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ชื่อเว็บบน navbar: ยอมให้บีบ/ตัดท้ายได้ กันดันแถบจนล้นบนจอแคบ */
.brand-min { min-width: 0; max-width: 42vw; }
@media (min-width: 992px) { .brand-min { max-width: none; } }

/* ปุ่ม Leaderboard ใน footer (ย้ายมาจากเมนูหลักตามที่เจ้าของสั่ง)
   ผูกสีกับ --brand-1 เพื่อให้อ่านออกทั้งโหมดสว่าง/มืด และตามธีมแบรนด์ด้วย
   (btn-outline-secondary จางจนแทบมองไม่เห็นบนพื้นมืด) */
.footer-leaderboard {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem; border-radius: 999px;
  border: 2px solid var(--brand-1); color: var(--brand-1);
  font-weight: 700; font-size: .82rem; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.footer-leaderboard:hover,
.footer-leaderboard:focus-visible,
.footer-leaderboard.active { background: var(--brand-1); color: var(--on-brand); }

/* ============ สวิตช์สลับโหมดสว่าง/มืด — แทน dropdown เลือกธีมของเดิม ============ */
.theme-switch { display: inline-flex; align-items: center; gap: .3rem; }
.theme-switch i { color: rgba(255, 255, 255, .7); font-size: .82rem; line-height: 1; }
.theme-switch .form-check { min-height: 0; padding-left: 0; }
.theme-switch .form-check-input {
  width: 2.1rem; height: 1.1rem; margin: 0; cursor: pointer;
  background-color: rgba(255, 255, 255, .25); border-color: rgba(255, 255, 255, .45);
}
.theme-switch .form-check-input:checked {
  background-color: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .7);
}
.theme-switch .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .3); }
