/* =========================================================
   สไตล์กลางของเว็บ — โหลดจาก render_navbar() ในทุกหน้า
   สีธีมมาจากหลังบ้าน: --brand-color / --brand-2 / --brand-ink (ตั้งใน layout.php)
   ========================================================= */

:root {
  --bo-bg: #edf0f3;
  --bo-surface: #ffffff;
  --bo-ink: #0f141b;
  --bo-muted: #566173;
  --bo-line: #d9dfe6;
  --bo-soft: #e7ebf0;
  --bo-night: #0a1017;
  --bo-night-2: #111a24;
  --bo-on-night: #ffffff;
  --bo-on-night-2: rgba(255, 255, 255, .72);
  --bo-line-night: rgba(255, 255, 255, .14);
  --brand-text: color-mix(in srgb, var(--brand-color, #ea580c) 62%, #000);
  --brand-soft: color-mix(in srgb, var(--brand-color, #ea580c) 13%, transparent);
  --bo-r: 10px;
  --bo-r-lg: 16px;
  --bo-shadow: 0 1px 2px #0b12200d, 0 12px 28px -14px #0b122038;
  --bo-font: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, sans-serif;
}
[data-theme="dark"] {
  --bo-bg: #080c11;
  --bo-surface: #121921;
  --bo-ink: #edf0f4;
  --bo-muted: #9fa9b8;
  --bo-line: #252d38;
  --bo-soft: #1a222c;
  --bo-night: #05080c;
  --bo-night-2: #0c131b;
  --brand-text: color-mix(in srgb, var(--brand-color, #ea580c) 78%, #fff);
  --brand-soft: color-mix(in srgb, var(--brand-color, #ea580c) 20%, transparent);
  --bo-shadow: 0 1px 2px #0006, 0 12px 28px -14px #000a;
}

/* ให้ DaisyUI ใช้โทนสีเดียวกับธีมของเว็บ */
html[data-theme="light"] { --b1: 100% 0 0; --b2: 95.6% .004 250; --b3: 90.5% .008 250; --bc: 20% .02 255; --rounded-btn: 10px; --rounded-box: 14px; --btn-focus-scale: 1; --animation-btn: 0s; }
html[data-theme="dark"]  { --b1: 20% .012 255; --b2: 15.5% .011 255; --b3: 25% .013 255; --bc: 94% .005 255; --rounded-btn: 10px; --rounded-box: 14px; --btn-focus-scale: 1; --animation-btn: 0s; }

html { scroll-behavior: smooth; }
body { font-family: var(--bo-font); background-color: var(--bo-bg); color: var(--bo-ink); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font-family: inherit; }
.swal2-popup { font-family: var(--bo-font) !important; }
html .input, html .select, html .textarea { border-radius: 10px; }
.btn { font-weight: 600; text-transform: none; }
.btn-primary { background-color: var(--brand-color); border-color: var(--brand-color); color: var(--brand-ink); }
.btn-primary:hover { background-color: var(--brand-color); border-color: var(--brand-color); filter: brightness(.93); }
.badge-primary, .bg-primary { background-color: var(--brand-color); border-color: var(--brand-color); color: var(--brand-ink); }
.text-primary { color: var(--brand-text); }
.border-primary { border-color: var(--brand-color); }
.modal-box { border-radius: var(--bo-r-lg); }
:where(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible { outline: 3px solid var(--brand-color); outline-offset: 2px; }

/* การ์ด/ช่องกรอกของ DaisyUI ให้ดูเป็นชุดเดียวกัน */
html .card { border-radius: var(--bo-r-lg); }
html .shadow-sm, html .shadow-md { box-shadow: var(--bo-shadow); }
html .shadow-lg, html .shadow-xl, html .shadow-2xl { box-shadow: var(--bo-shadow); }
html .table :where(th) { font-weight: 600; letter-spacing: 0; text-transform: none; }

/* ---------- ไอคอน / ปุ่ม ---------- */
.bo-i { flex: none; display: block; }
.bo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: var(--bo-r); border: 1px solid var(--bo-line); background: var(--bo-surface); color: var(--bo-ink); font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, filter .15s, transform .15s; white-space: nowrap; }
.bo-btn:hover { background: var(--bo-soft); }
.bo-btn-brand { background: var(--brand-color); border-color: var(--brand-color); color: var(--brand-ink); }
.bo-btn-brand:hover { background: var(--brand-color); filter: brightness(.92); }
.bo-btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .38); color: #fff; }
.bo-btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.bo-btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; border-radius: 12px; }
.bo-block { display: flex; width: 100%; }
.bo-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--bo-r); border: 0; background: transparent; color: var(--bo-on-night-2); cursor: pointer; transition: background-color .15s, color .15s; }
.bo-iconbtn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bo-iconbtn.swap input { appearance: none; position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bo-sheet .bo-iconbtn { color: var(--bo-muted); }
.bo-sheet .bo-iconbtn:hover { background: var(--bo-soft); color: var(--bo-ink); }
.bo-danger { color: #c4322b !important; }
[data-theme="dark"] .bo-danger { color: #ff8b84 !important; }

/* ---------- แถบบน (สีเข้มทุกโหมด) ---------- */
.bo-head { position: sticky; top: 0; z-index: 50; background: var(--bo-night); color: var(--bo-on-night); border-bottom: 1px solid var(--bo-line-night); }
.bo-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 120px; height: 3px; background: var(--brand-color); }
.bo-head-in { display: flex; align-items: center; gap: 8px; height: 66px; max-width: 1480px; margin: 0 auto; padding: 0 20px; }
.bo-logo { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; max-width: 260px; margin-right: 12px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; line-height: 1.25; }
.bo-logo img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--brand-color); flex: none; }
.bo-logo span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bo-nav { display: none; align-items: stretch; height: 100%; gap: 2px; flex: 1 1 auto; min-width: 0; }
.bo-nav .dropdown { display: flex; }
.bo-link { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 0 13px; height: 100%; color: var(--bo-on-night-2); font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color .15s; }
.bo-link:hover { color: #fff; }
.bo-link.is-on { color: #fff; font-weight: 600; }
.bo-link.is-on::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-color); }
.bo-tools { display: flex; align-items: center; flex: none; gap: 6px; margin-left: auto; }
.bo-menu-btn { display: none; }
.bo-account { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px 0 5px; border-radius: 999px; border: 1px solid var(--bo-line-night); background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; }
.bo-account:hover { background: rgba(255, 255, 255, .12); }
.bo-account-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.bo-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-color); color: var(--brand-ink); font-weight: 700; font-size: 15px; }
.bo-show-sm { display: none; }

/* เมนูป๊อปอัป */
.bo-pop { z-index: 60; min-width: 232px; margin-top: 10px; padding: 6px; list-style: none; background: var(--bo-surface); color: var(--bo-ink); border: 1px solid var(--bo-line); border-radius: 14px; box-shadow: 0 18px 44px #0b122040; max-height: min(70vh, 520px); overflow-y: auto; }
.bo-nav .bo-pop { margin-top: 0; top: 100%; }
.bo-pop li { list-style: none; }
.bo-pop a, .bo-pop-note { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 9px; color: inherit; font-size: 15px; text-decoration: none; }
.bo-pop a:hover { background: var(--bo-soft); }
.bo-pop a.is-on { background: var(--brand-soft); font-weight: 600; }
.bo-pop .bo-i { color: var(--bo-muted); }
.bo-pop-note { color: var(--bo-muted); }
.bo-pop-title { padding: 8px 12px 6px; color: var(--bo-muted); font-size: 13px; font-weight: 600; }
.bo-pop-empty { padding: 20px 12px 18px; text-align: center; color: var(--bo-muted); font-size: 14px; }
.bo-pop-sep { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--bo-line); }
.bo-pop-notif { width: 320px; }
.bo-pop-foot { justify-content: center; color: var(--brand-text) !important; font-weight: 600; border-top: 1px solid var(--bo-line); border-radius: 0 0 9px 9px !important; margin-top: 4px; }
.bo-notif { align-items: flex-start !important; line-height: 1.5; font-size: 14px !important; }
.bo-notif.is-new { background: var(--brand-soft); }
.bo-dot { flex: none; width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: #3b82f6; }
.bo-dot-success { background: #16a34a; } .bo-dot-warning { background: #d97706; } .bo-dot-error { background: #dc2626; }

/* ---------- หัวหน้าแบบแถบ (ทุกหน้าย่อย) ---------- */
.bo-pagehead { position: relative; overflow: hidden; background: var(--bo-night); color: #fff; }
.bo-pagehead-in { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 34px 20px 38px; }
.bo-pagehead h1 { margin: 0; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.25; font-weight: 700; letter-spacing: -.015em; color: #fff; overflow-wrap: anywhere; }
.bo-pagehead p { max-width: 38em; margin: 8px 0 0; color: var(--bo-on-night-2); font-size: 16px; line-height: 1.7; }
.bo-pagehead-court { position: absolute; z-index: 0; right: -40px; top: -30px; width: 560px; max-width: none; height: auto; color: var(--brand-color); opacity: .3; pointer-events: none; }
.bo-pagehead::after { content: ''; position: absolute; left: 0; bottom: 0; right: 0; height: 1px; background: var(--bo-line-night); }

/* ---------- แถบเมนูล่าง + แผ่นเมนู (มือถือ) ---------- */
.bo-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(6, 1fr); padding-bottom: env(safe-area-inset-bottom); background: var(--bo-night); border-top: 1px solid var(--bo-line-night); }
.bo-tabbar a, .bo-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; border: 0; background: transparent; color: var(--bo-on-night-2); font-size: 11.5px; font-weight: 500; text-decoration: none; cursor: pointer; }
.bo-tabbar a.is-on { color: var(--brand-color); font-weight: 700; }
.bo-tabbar a.is-on .bo-i { stroke-width: 2.3; }
body:has(.bo-tabbar) { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.bo-sheet { width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0; padding: 0; border: 0; background: transparent; color: var(--bo-ink); overflow: visible; }
.bo-sheet::backdrop { background: rgba(8, 12, 20, .6); }
.bo-sheet-box { max-height: 88vh; overflow-y: auto; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); background: var(--bo-surface); border-radius: 20px 20px 0 0; font-family: var(--bo-font); }
.bo-sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 8px 4px; font-size: 17px; }
.bo-sheet-group { margin: 18px 4px 4px; color: var(--bo-muted); font-size: 13px; font-weight: 600; }
.bo-row { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 8px; border-radius: 10px; color: var(--bo-ink); font-size: 16px; text-decoration: none; }
.bo-row .bo-i { color: var(--bo-muted); }
.bo-row:hover, .bo-row.is-on { background: var(--bo-soft); }
.bo-row.is-on { font-weight: 600; }
.bo-row-note { color: var(--bo-muted); }

/* ---------- ท้ายหน้า ---------- */
.bo-foot { margin-top: 64px; background: var(--bo-night); color: var(--bo-on-night-2); border-top: 3px solid var(--brand-color); }
.bo-foot-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.8fr); gap: 36px 48px; max-width: 1240px; margin: 0 auto; padding: 48px 20px 38px; }
.bo-foot-brand img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 2px solid var(--brand-color); background: #fff; }
.bo-foot-brand p { margin: 14px 0 0; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.bo-foot-col h6 { margin: 0 0 10px; color: #fff; font-size: 15px; font-weight: 700; }
.bo-foot-col > a { display: flex; align-items: center; min-height: 40px; color: var(--bo-on-night-2); font-size: 15px; text-decoration: none; overflow-wrap: anywhere; }
.bo-foot-col > a:hover { color: #fff; text-decoration: underline; }
.bo-sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.bo-sponsors img { width: 100%; height: 64px; padding: 8px; object-fit: contain; background: #fff; border-radius: 10px; }
.bo-copy { padding: 16px 20px; border-top: 1px solid var(--bo-line-night); text-align: center; font-size: 12.5px; color: var(--bo-on-night-2); }

@media (min-width: 1024px) {
  .bo-nav { display: flex; }
  .bo-tabbar { display: none; }
  body:has(.bo-tabbar) { padding-bottom: 0; }
  .bo-tools { margin-left: 0; }
  .bo-head-in { gap: 16px; }
}
@media (min-width: 1024px) {
  .bo-head.is-tight .bo-link { padding: 0 9px; font-size: 14px; }
  .bo-head.is-tight .bo-link.is-on::after { left: 9px; right: 9px; }
  .bo-head.is-tight .bo-account-name, .bo-head.is-compact .bo-account-name { display: none; }
  .bo-head.is-compact .bo-nav { display: none; }
  .bo-head.is-compact .bo-menu-btn { display: inline-flex; }
  .bo-head.is-compact .bo-logo { max-width: 340px; }
  .bo-head.is-compact .bo-tools { margin-left: auto; }
}
@media (min-width: 640px) {
  .bo-sheet { max-width: 460px; margin: auto; }
  .bo-sheet-box { border-radius: 20px; }
}
@media (min-width: 1024px) and (max-width: 1199px) { .bo-link { padding: 0 9px; font-size: 14px; } .bo-link.is-on::after { left: 9px; right: 9px; } .bo-account-name { display: none; } .bo-logo { max-width: 190px; } }
@media (max-width: 639px) {
  .bo-head-in { padding: 0 12px; gap: 4px; height: 60px; }
  .bo-logo { font-size: 16px; gap: 10px; }
  .bo-logo img { width: 34px; height: 34px; }
  .bo-hide-sm { display: none !important; }
  .bo-show-sm { display: block; }
  .bo-account { padding: 0 6px 0 4px; }
  .bo-head .bo-pop-notif { position: fixed; top: 66px; left: 12px; right: 12px; width: auto; margin-top: 0; }
  .bo-pagehead-in { padding: 24px 16px 26px; }
  .bo-pagehead p { font-size: 14.5px; }
  .bo-pagehead-court { width: 380px; right: -150px; top: -10px; opacity: .25; }
  .bo-foot-in { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 26px; }
}
@media (min-width: 640px) and (max-width: 1023px) { .bo-foot-in { grid-template-columns: 1fr 1fr; } .bo-foot-sp { grid-column: 1 / -1; } }

/* =========================================================
   หน้าแรก
   ========================================================= */
.bo-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ฮีโร: วิดีโอ/รูปพื้นหลังเต็มความกว้าง */
.bo-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--bo-night); color: #fff; min-height: min(78vh, 680px); display: flex; align-items: center; }
.bo-hero-bg, .bo-hero-bg video, .bo-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bo-hero-bg { z-index: -3; }
.bo-hero-bg video { opacity: 0; transition: opacity .8s; }
.bo-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(95deg, #060b11f2 0%, #060b11d9 38%, #060b1180 70%, #060b1140 100%), linear-gradient(to top, #060b11 0%, transparent 35%); }
.bo-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 1; background: linear-gradient(90deg, var(--brand-color) 0 220px, transparent 220px); }
.bo-court { position: absolute; z-index: -1; right: -90px; bottom: -70px; width: 860px; max-width: none; height: auto; color: #fff; opacity: .13; pointer-events: none; }
.bo-hero-in { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; padding: 64px 20px 110px; }
.bo-hero h1 { margin: 0; max-width: 11em; font-size: clamp(42px, 7.4vw, 92px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; color: #fff; overflow-wrap: anywhere; text-wrap: balance; }
.bo-hero h1 span { display: block; margin-bottom: 14px; font-size: clamp(17px, 1.7vw, 22px); line-height: 1.5; font-weight: 500; letter-spacing: 0; color: var(--bo-on-night-2); }
.bo-slogan { max-width: 30em; margin: 22px 0 0; font-size: 19px; line-height: 1.8; color: rgba(255, 255, 255, .82); white-space: pre-line; overflow-wrap: anywhere; }
.bo-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 26px 0 0; font-size: 15px; font-weight: 500; color: #fff; }
.bo-status > span { display: inline-flex; align-items: center; gap: 9px; }
.bo-status i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #22c55e38; }
.bo-status i.off { background: #ef4444; box-shadow: 0 0 0 4px #ef444438; }
.bo-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* แถบทางลัดที่ซ้อนทับขอบฮีโร */
.bo-tiles { position: relative; z-index: 2; display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 14px; margin-top: -62px; }
.bo-tile { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 164px; padding: 20px; border-radius: var(--bo-r-lg); background: var(--bo-surface); color: var(--bo-ink); border: 1px solid var(--bo-line); box-shadow: var(--bo-shadow); text-decoration: none; transition: transform .18s, box-shadow .18s; }
.bo-tile:hover { transform: translateY(-4px); box-shadow: 0 2px 4px #0b12200d, 0 22px 40px -16px #0b122055; }
.bo-tile .bo-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: auto; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); }
.bo-tile b { font-size: 19px; font-weight: 700; line-height: 1.35; }
.bo-tile small { color: var(--bo-muted); font-size: 14px; line-height: 1.55; }
.bo-tile .bo-go { position: absolute; top: 20px; right: 18px; color: var(--bo-muted); }
.bo-tile-main { background: var(--brand-color); border-color: var(--brand-color); color: var(--brand-ink); }
.bo-tile-main .bo-ico { background: color-mix(in srgb, var(--brand-ink) 16%, transparent); color: var(--brand-ink); }
.bo-tile-main small, .bo-tile-main .bo-go { color: color-mix(in srgb, var(--brand-ink) 78%, transparent); }

.bo-sec { padding-top: 56px; }
.bo-sec h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; }
.bo-sec-sub { margin: 0 0 22px; color: var(--bo-muted); font-size: 16px; }
.bo-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.bo-list { border-top: 1px solid var(--bo-line); }
.bo-item { display: flex; align-items: center; gap: 16px; min-height: 78px; padding: 12px 6px; border-bottom: 1px solid var(--bo-line); color: var(--bo-ink); text-decoration: none; transition: background-color .15s, padding .15s; }
.bo-item:hover { background: var(--bo-soft); padding-left: 12px; }
.bo-item .bo-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); }
.bo-item b { display: block; font-size: 17px; font-weight: 600; line-height: 1.4; }
.bo-item small { display: block; margin-top: 2px; color: var(--bo-muted); font-size: 14px; line-height: 1.5; }
.bo-item .bo-go { margin-left: auto; color: var(--bo-muted); }

.bo-mine { padding: 24px; border-radius: var(--bo-r-lg); background: var(--bo-night); color: #fff; }
.bo-mine h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.bo-mine p { margin: 0 0 18px; color: var(--bo-on-night-2); font-size: 15px; line-height: 1.7; }
.bo-mine .bo-list { border-top-color: var(--bo-line-night); }
.bo-mine .bo-item { min-height: 60px; padding: 8px 4px; border-bottom-color: var(--bo-line-night); color: #fff; }
.bo-mine .bo-item:hover { background: rgba(255, 255, 255, .07); }
.bo-mine .bo-item .bo-ico { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: var(--brand-color); }
.bo-mine .bo-item b { font-size: 16px; }
.bo-mine .bo-item .bo-go { color: var(--bo-on-night-2); }

.bo-news { column-count: 3; column-gap: 20px; }
.bo-news.n2 { column-count: 2; }
.bo-news.n1 { column-count: 1; max-width: 520px; }
.bo-news article { break-inside: avoid; margin: 0 0 20px; border: 1px solid var(--bo-line); border-radius: var(--bo-r-lg); background: var(--bo-surface); overflow: hidden; box-shadow: var(--bo-shadow); }
.bo-news img { display: block; width: 100%; height: auto; }
.bo-news article > div { padding: 16px 18px 18px; }
.bo-news h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5; }
.bo-news p { margin: 6px 0 0; color: var(--bo-muted); font-size: 15px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }

.bo-crew { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.bo-crew > div { padding: 18px 14px; text-align: center; border: 1px solid var(--bo-line); border-radius: var(--bo-r-lg); background: var(--bo-surface); box-shadow: var(--bo-shadow); }
.bo-crew img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--bo-soft); border: 3px solid var(--brand-color); padding: 2px; }
.bo-crew b { display: block; margin-top: 10px; font-size: 16px; line-height: 1.4; }
.bo-crew span { display: block; margin-top: 2px; color: var(--bo-muted); font-size: 14px; }

.effect-item { position: fixed; pointer-events: none; z-index: 5; top: 0; }

@media (max-width: 1023px) {
  .bo-hero { min-height: 0; }
  .bo-hero-in { padding: 48px 20px 96px; }
  .bo-court { width: 620px; right: -200px; bottom: -40px; }
  .bo-tiles { grid-template-columns: 1fr 1fr; margin-top: -56px; }
  .bo-tile-main { grid-column: 1 / -1; min-height: 130px; }
  .bo-split { grid-template-columns: 1fr; gap: 28px; }
  .bo-news, .bo-news.n3 { column-count: 2; }
}
@media (max-width: 639px) {
  .bo-wrap { padding: 0 16px; }
  .bo-hero-in { padding: 36px 16px 88px; }
  .bo-slogan { font-size: 16.5px; margin-top: 18px; }
  .bo-cta { flex-direction: column; }
  .bo-cta .bo-btn { width: 100%; }
  .bo-tiles { gap: 10px; margin-top: -50px; }
  .bo-tile { min-height: 138px; padding: 16px; }
  .bo-tile b { font-size: 16.5px; }
  .bo-tile small { font-size: 13px; }
  .bo-tile .bo-ico { width: 42px; height: 42px; }
  .bo-sec { padding-top: 40px; }
  .bo-news, .bo-news.n2, .bo-news.n3 { column-count: 1; }
  .bo-sec h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { .bo-head *, .bo-btn, .bo-item, .bo-tile { transition: none !important; } .bo-hero-bg video { display: none; } html { scroll-behavior: auto; } }

/* =========================================================
   ทำให้หน้าย่อยใช้โทนเดียวกับหน้าอื่น (สีพื้น/ตัวอักษร/เส้น/สีเน้นตามธีม)
   ========================================================= */
html[data-theme] .apply-page { --ap-surface: var(--bo-surface); --ap-soft: var(--bo-soft); --ap-ink: var(--bo-ink); --ap-muted: var(--bo-muted); --ap-line: var(--bo-line); --ap-bg: var(--bo-bg); --ap-accent: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .court-page { --ct-surface: var(--bo-surface); --ct-soft: var(--bo-soft); --ct-ink: var(--bo-ink); --ct-muted: var(--bo-muted); --ct-line: var(--bo-line); --ct-bg: var(--bo-bg); --ct-accent: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .coupons-page { --cp-surface: var(--bo-surface); --cp-soft: var(--bo-soft); --cp-ink: var(--bo-ink); --cp-muted: var(--bo-muted); --cp-line: var(--bo-line); --cp-bg: var(--bo-bg); --cp-gold: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .ms-page { --ms-surface: var(--bo-surface); --ms-soft: var(--bo-soft); --ms-ink: var(--bo-ink); --ms-muted: var(--bo-muted); --ms-line: var(--bo-line); --ms-bg: var(--bo-bg); --ms-gold: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .myteams-page { --mt-surface: var(--bo-surface); --mt-soft: var(--bo-soft); --mt-ink: var(--bo-ink); --mt-muted: var(--bo-muted); --mt-line: var(--bo-line); --mt-bg: var(--bo-bg); --mt-accent: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .protest-page { --pt-surface: var(--bo-surface); --pt-soft: var(--bo-soft); --pt-ink: var(--bo-ink); --pt-muted: var(--bo-muted); --pt-line: var(--bo-line); --pt-bg: var(--bo-bg); --pt-accent: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .results-page { --rs-surface: var(--bo-surface); --rs-soft: var(--bo-soft); --rs-ink: var(--bo-ink); --rs-muted: var(--bo-muted); --rs-line: var(--bo-line); --rs-bg: var(--bo-bg); --rs-gold: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }
html[data-theme] .players-page { --pc-surface: var(--bo-surface); --pc-soft: var(--bo-soft); --pc-ink: var(--bo-ink); --pc-muted: var(--bo-muted); --pc-line: var(--bo-line); --pc-bg: var(--bo-bg); --pc-accent: var(--brand-text); background-color: var(--bo-bg); color: var(--bo-ink); }

/* หน้าจองสนาม: หัวข้อเหลือแค่ป้ายวันที่ */
html[data-theme] .court-heading { padding: 0; border: 0; background: none; margin-bottom: 18px; text-align: left; }
html[data-theme] .court-heading::before, html[data-theme] .results-heading::before, html[data-theme] .pt-heading::before { content: none; }
html[data-theme] .court-heading p { display: inline-block; font-weight: 600; }
html[data-theme] .schedule-heading { justify-content: flex-end; }
html[data-theme] .ms-page .tabs { background: var(--bo-surface); }
html[data-theme] .ms-page .tabs .tab-active { background: var(--brand-color) !important; color: var(--brand-ink) !important; }

/* dialog ที่ปิดอยู่ต้องไม่กินหน่วยความจำ: DaisyUI ตั้ง .modal เป็น fixed เต็มจอตลอดเวลา
   หน้าที่มีหลายสิบทีม (เช่น ตารางคะแนน) จึงสร้างเลเยอร์เต็มจอเป็นร้อย แล้ว Chrome/Safari บน iPhone ค้างหรือเด้ง */
dialog.modal:not([open]), dialog.bo-sheet:not([open]) { display: none !important; }

/* มือถือ/แท็บเล็ต: ชื่อรายการยาวต้องย่อด้วย … ไม่ดันปุ่มฝั่งขวาจนหน้ากว้างเกินจอ */
@media (max-width: 1023px) {
  .bo-logo { flex: 0 1 auto; min-width: 0; margin-right: 4px; }
  .bo-head-in { min-width: 0; }
  .bo-tools { min-width: 0; }
}
@media (min-width: 1024px) { .bo-head.is-tight .bo-logo { max-width: 210px; font-size: 16px; gap: 10px; } .bo-head.is-tight .bo-link { padding: 0 8px; } .bo-head.is-tight .bo-link.is-on::after { left: 8px; right: 8px; } }
.bo-tabbar span { max-width: 100%; text-align: center; line-height: 1.15; overflow-wrap: break-word; }
.bo-tabbar a, .bo-tabbar button { min-width: 0; }
