/* ============================================================
   ธีมหน้าเว็บสาธารณะ — ดำ + ทอง ตัวอักษร Prompt
   ============================================================ */
:root{
  --ink:#08080b; --ink-2:#0f0f16; --surface:#14141d; --surface-2:#191922;
  --line:#2a2a3a; --line-soft:#22222e;
  /* --dim เคยเป็น #6f6f7d ซึ่งได้อัตราส่วนความต่างสีแค่ 3.53:1 บนพื้นที่สว่างสุด
     ต่ำกว่าเกณฑ์ WCAG AA (4.5:1) — Lighthouse ฟ้องที่เวลาแข่ง จำนวนคู่ และชื่อสนาม
     #81818f ได้ 4.55:1 ซึ่งเป็นค่าที่อ่อนที่สุดที่ยังผ่านเกณฑ์ โทนสีจึงแทบไม่เปลี่ยน */
  --fg:#e9e9ee; --muted:#9a9aa8; --dim:#81818f;
  --gold:#f5c542; --gold-2:#d4af37; --gold-soft:#ffe082;
  /* --win เคยเป็น #0a8a3c ตัวอักษรขาวบนพื้นนั้นได้ 4.46:1 ขาดไปนิดเดียวจากเกณฑ์ 4.5:1
     #0a7f36 ได้ 5.12:1 เขียวเข้มขึ้นเล็กน้อยจนแทบดูไม่ออก แต่ผ่านแบบมีระยะเผื่อ */
  --live:#ff5a5f; --win:#0a7f36; --draw:#5a5a68; --lose:#c0261c;
  --r:12px; --r-lg:16px; --wrap:84rem;
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{
  margin:0;color:var(--fg);
  background:
    radial-gradient(1100px 600px at 12% -10%, #1a1508 0%, transparent 60%),
    radial-gradient(900px 500px at 88% 8%, #17130a 0%, transparent 55%),
    var(--ink);
  background-attachment:fixed;
  font-family:"Prompt",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:15px;line-height:1.65;
}
img{max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:4px}

.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:16px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px}
.skip:focus{left:8px;top:8px;background:var(--gold);color:#000;padding:.5rem 1rem;z-index:99;border-radius:6px}
.center{text-align:center}
.muted,.empty{color:var(--muted)}

/* ---------------- header ---------------- */
.site-header{
  position:sticky;top:0;z-index:30;
  background:linear-gradient(180deg,#0a0a0e 0%,#08080b 100%);
  border-bottom:1px solid #1c1c26;
  box-shadow:0 1px 0 #ffffff08 inset;
}
.header-inner{display:flex;align-items:center;gap:1.5rem;min-height:66px}

.logo{flex:none;display:flex;align-items:center}
.logo img{display:block;height:44px;width:auto;object-fit:contain}
.logo-text{color:var(--gold);font-size:1.45rem;font-weight:700;letter-spacing:-.03em}

/* เมนูหลัก — ไอคอน Tabler outline ชุดเดียวกับต้นฉบับ */
/* nowrap: เมนูต้องอยู่บรรทัดเดียวเสมอ ถ้าแคบเกินไปให้ยุบเป็นปุ่มแฮมเบอร์เกอร์แทน */
.main-nav{display:flex;align-items:center;gap:1.6rem;flex:1;justify-content:center;flex-wrap:nowrap}
.main-nav a{
  display:inline-flex;align-items:center;gap:.45rem;
  font-size:.925rem;font-weight:400;color:var(--fg);
  padding-block:.35rem;transition:color .15s;white-space:nowrap;
}
.main-nav a .ic{flex:none;opacity:.9;transition:color .15s,opacity .15s}
.main-nav a:hover{color:var(--gold-soft)}
.main-nav a:hover .ic{opacity:1}
.main-nav a[aria-current]{color:var(--gold);font-weight:500}
.main-nav a[aria-current] .ic{color:var(--gold);opacity:1}

.header-cta{flex:none;display:flex;align-items:center;gap:.6rem}

/* ปุ่ม CTA — ทองแบบไล่เฉดเหมือนต้นฉบับ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:9px;font-weight:600;font-size:.9rem;
  padding:.55rem 1.4rem;border:1px solid transparent;cursor:pointer;
  transition:filter .15s,box-shadow .15s;white-space:nowrap;
}
.btn.sm{padding:.5rem 1.25rem;font-size:.875rem}
.btn.gold{
  background:linear-gradient(180deg,#f8d868 0%,#e0b63c 45%,#b98c14 100%);
  color:#1a1300;border-color:#ffe9a3;
  box-shadow:0 1px 3px #0006,0 0 0 1px #00000033 inset;
}
.btn.ghost{
  background:#0c0c11;color:var(--gold);border-color:var(--gold-2);
  box-shadow:0 0 0 1px #00000044 inset;
}
.btn:hover{filter:brightness(1.1)}

/* ปุ่มเปิดเมนูบนจอเล็ก */
.nav-toggle{
  display:none;background:none;border:1px solid var(--line);border-radius:8px;
  color:var(--fg);padding:.35rem .5rem;cursor:pointer;line-height:0;
}

/* จอคอมทุกขนาดต้องเห็นเมนูครบทุกหน้า — ค่อย ๆ บีบระยะแทนการซ่อน */
@media(max-width:1340px){
  .header-inner{gap:1rem}
  .main-nav{gap:1.05rem}
  .main-nav a{font-size:.875rem}
  .btn.sm{padding:.45rem 1rem;font-size:.8125rem}
  .logo img{height:40px}
}
@media(max-width:1180px){
  .header-inner{gap:.8rem}
  .main-nav{gap:.75rem}
  .main-nav a{font-size:.8125rem;gap:.35rem}
  .main-nav a .ic{width:17px;height:17px}
  .logo img{height:36px}
  .logo-text{font-size:1.25rem}
}
@media(max-width:1024px){
  .header-inner{gap:.6rem}
  .main-nav{gap:.5rem}
  .main-nav a{font-size:.7875rem;gap:.3rem}
  .main-nav a .ic{width:16px;height:16px}
  .btn.sm{padding:.4rem .7rem;font-size:.75rem}
  .logo img{height:32px}
  .logo-text{font-size:1.1rem}
}
/* 881-1279px: เมนู 8 รายการพร้อมไอคอนล้นหัวเว็บ (ปุ่มสมัครสมาชิกโดนตัด) — เหลือแค่ตัวหนังสือ */
@media(min-width:881px) and (max-width:1279px){
  .main-nav a .ic{display:none}
}
/* มือถือ/แท็บเล็ตเล็ก — ยุบเป็นเมนู 3 ขีดตามเดิม */
@media(max-width:880px){
  .header-inner{flex-wrap:wrap;gap:.75rem;padding-block:.6rem}
  .nav-toggle{display:inline-flex;order:2;margin-left:auto}
  .header-cta{order:3}
  .main-nav{
    order:4;flex-basis:100%;justify-content:flex-start;gap:.35rem;
    flex-direction:column;align-items:stretch;
    max-height:0;overflow:hidden;transition:max-height .25s ease;
  }
  .main-nav.open{max-height:24rem;padding-top:.4rem;border-top:1px solid var(--line-soft)}
  .main-nav a{padding:.6rem .35rem;border-radius:8px}
  .main-nav a:hover{background:#ffffff0a}
}

.search input{background:var(--surface);border:1px solid var(--line);color:var(--fg);border-radius:999px;padding:.4rem .95rem;font:inherit;font-size:.8125rem;min-width:0}

.ic{display:inline-block;vertical-align:middle;flex:none}

/* ---------------- breadcrumb ---------------- */
.breadcrumb ol{display:flex;flex-wrap:wrap;gap:.45rem;list-style:none;padding:0;margin:.9rem 0 0;font-size:.8125rem;color:var(--dim)}
.breadcrumb li+li::before{content:"›";margin-right:.45rem;color:var(--line)}
.breadcrumb a:hover{color:var(--gold)}

/* ---------------- 3-column layout ----------------
   ลำดับใน DOM คือ main -> sidebar ซ้าย -> sidebar ขวา (เพื่อให้ h1 มาก่อน h2)
   ส่วนการแสดงผลสลับตำแหน่งด้วย order ให้ sidebar ซ้ายไปอยู่ซ้ายจริง       */
.page-grid{display:grid;gap:1.25rem;grid-template-columns:minmax(0,1fr);align-items:start;padding-block:1.25rem 2rem}
.page-grid > main{order:2}
.side-left{order:1}
.side-right{order:3}
@media(min-width:1000px){.page-grid{grid-template-columns:250px minmax(0,1fr)}}
@media(min-width:1320px){.page-grid{grid-template-columns:250px minmax(0,1fr) 290px}}
.page-grid.no-side{grid-template-columns:minmax(0,1fr)!important;max-width:52rem}
.side{display:grid;gap:1rem;align-content:start}
/* จอเล็ก: เนื้อหาหลักมาก่อน แล้วค่อยตามด้วย sidebar */
@media(max-width:999px){.page-grid > main{order:1}.side-left{order:2}.side-right{order:3}}
@media(min-width:1000px) and (max-width:1319px){.side-right{display:none}}

/* ---------------- cards ---------------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.card.pad{padding:.9rem}
.card.pad h2{margin:0 0 .65rem;font-size:.9375rem;font-weight:600}
.more{display:inline-block;color:var(--gold);font-size:.8125rem;margin-top:.7rem}
.more:hover{color:var(--gold-soft)}

h1{font-size:clamp(1.35rem,3.2vw,1.9rem);line-height:1.3;margin:1rem 0 .3rem;font-weight:700}
h2{font-size:1.125rem;margin:0;font-weight:600}
h3{font-size:1rem;margin:0;font-weight:600}
.lead{color:var(--muted);margin:.25rem 0 0;font-size:.9rem}

.sec{margin-top:1.75rem}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.7rem}
.sec-note{color:var(--dim);font-size:.8125rem;white-space:nowrap}
.sec-sub{color:var(--dim);font-size:.8125rem;margin:-.4rem 0 .7rem}

/* ---------------- banner ---------------- */
.banner{position:relative;border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--line);margin-top:1rem}
.bslides{position:relative;aspect-ratio:1218/340;background:var(--ink-2)}
.bslide{position:absolute;inset:0;opacity:0;transition:opacity .5s ease}
.bslide.on{opacity:1}
.bslide img{width:100%;height:100%;object-fit:cover;display:block}
.bnav{position:absolute;top:50%;translate:0 -50%;z-index:2;background:rgba(0,0,0,.5);border:1px solid var(--line);color:var(--fg);width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:1.1rem;line-height:1;display:grid;place-items:center}
.bnav.prev{left:8px}.bnav.next{right:8px}
.bdots{position:absolute;bottom:10px;left:50%;translate:-50% 0;z-index:2;display:flex;gap:6px}
/* จุดเลื่อนแบนเนอร์
   ตัวปุ่มต้องกว้างยาวจริง 24x24 ไม่ใช่ใช้ ::after ขยายพื้นที่กดเอา
   เพราะเครื่องมือตรวจวัดจากกล่องของปุ่มเอง และยังดูระยะห่างระหว่างปุ่มด้วย
   จุดที่มองเห็นวาดด้วย ::before ขนาดเท่าเดิม หน้าตาจึงไม่เปลี่ยน */
.bdots button{width:24px;height:24px;border:0;background:none;padding:0;cursor:pointer;display:grid;place-items:center}
.bdots button::before{content:"";width:7px;height:7px;border-radius:999px;background:#ffffff55;transition:width .2s}
.bdots button.on::before{background:var(--gold);width:18px}

/* ---------------- ลีกยอดนิยม ---------------- */
.league-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.league-list a{display:flex;align-items:center;gap:.6rem;padding:.6rem .55rem;border-radius:9px;font-size:.875rem;transition:background .15s}
.league-list a:hover{background:#ffffff0a}
.league-list img{flex:none;object-fit:contain}
.league-list span:first-of-type{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chev-right{color:var(--dim);font-size:1.05rem;line-height:1}

/* ---------------- แมตช์ที่น่าสนใจ ---------------- */
.interest-list{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}
.interest-list a{display:grid;gap:.6rem;padding:.75rem;border:1px solid var(--line-soft);border-radius:10px;background:var(--surface-2)}
.interest-list a:hover{border-color:var(--gold-2)}
.ilg{display:flex;align-items:center;gap:.4rem;font-size:.75rem;color:var(--muted)}
.ilg em{margin-left:auto;font-style:normal;color:var(--dim)}
.iteams{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.5rem;text-align:center}
.it{display:grid;justify-items:center;gap:.3rem}
.it small{font-size:.7rem;color:var(--muted);line-height:1.2}
.iteams strong{font-size:1rem;color:var(--gold);font-variant-numeric:tabular-nums}
.ivenue{font-size:.7rem;color:var(--dim);text-align:center}

/* ---------------- กำลังแข่งตอนนี้ ---------------- */
.live-grid{display:grid;gap:.65rem;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.live-card{padding:.7rem .8rem;display:grid;gap:.45rem;border-color:#3a2a2a}
.live-card:hover{border-color:var(--live)}
.lc-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.72rem}
.lc-min{display:inline-flex;align-items:center;gap:.35rem;color:var(--live);font-weight:600;font-variant-numeric:tabular-nums}
.dot{width:6px;height:6px;border-radius:50%;background:var(--live);animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.lc-lg{display:inline-flex;align-items:center;gap:.3rem;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc-row{display:flex;align-items:center;gap:.5rem;font-size:.85rem}
.lc-team{display:flex;align-items:center;gap:.45rem;flex:1;min-width:0}
.lc-team span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lc-row b{font-variant-numeric:tabular-nums;font-size:.95rem}

/* ---------------- แมตช์เด่น ---------------- */
.feat{padding:1rem}
.feat-lg{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--muted);margin-bottom:1rem}
.feat-body{display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:1rem}
.feat-side{display:grid;justify-items:center;gap:.5rem;text-align:center}
.feat-side a{display:grid;justify-items:center;gap:.6rem}
.crest{width:72px;height:72px;object-fit:contain}
@media(max-width:600px){.crest{width:52px;height:52px}}
.fname{font-size:.95rem;font-weight:500}
.feat-mid{display:grid;justify-items:center;gap:.2rem;padding-top:1.2rem}
.feat-mid strong{font-size:2rem;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.feat-mid small{color:var(--dim);font-size:.72rem}
.form-chips{display:flex;gap:.25rem}
.f{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;font-size:10px;font-weight:700;color:#fff}
.f-W{background:var(--win)}.f-D{background:var(--draw)}.f-L{background:var(--lose)}
.feat-venue{text-align:center;color:var(--dim);font-size:.8rem;margin:1rem 0 .5rem}
.feat-cta{display:block;text-align:center;color:var(--gold);font-size:.875rem;border-top:1px solid var(--line-soft);padding-top:.8rem;margin-top:.3rem}

/* ---------------- auto refresh ---------------- */
.autorefresh{display:inline-flex;align-items:center;gap:.4rem;font-size:.75rem;color:var(--dim)}
/* ปุ่มหยุด/เล่นการอัปเดตอัตโนมัติ เดิม 22px ต่ำกว่าเกณฑ์พื้นที่กด 24x24 */
.ar-btn{width:26px;height:26px;border-radius:50%;border:1px solid var(--line);background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center;padding:0}
.ar-pause{width:8px;height:9px;border-left:3px solid currentColor;border-right:3px solid currentColor}
.ar-btn[aria-pressed="false"] .ar-pause{border:0;width:0;height:0;border-left:7px solid currentColor;border-top:4.5px solid transparent;border-bottom:4.5px solid transparent;margin-left:2px}

/* ---------------- รายการแมตช์ ---------------- */
.match-block{display:grid;gap:.6rem}
.toolbar{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:2px}
.seg button{background:none;border:0;color:var(--muted);font:inherit;font-size:.8125rem;padding:.3rem .95rem;border-radius:999px;cursor:pointer}
.seg button.active{background:var(--gold);color:#181200;font-weight:600}
.toolbar input[type=search]{flex:1;min-width:10rem;background:var(--surface);border:1px solid var(--line);color:var(--fg);border-radius:999px;padding:.45rem 1rem;font:inherit;font-size:.8125rem}
.icon-btn{background:none;border:1px solid var(--line);color:var(--muted);border-radius:999px;padding:.4rem .95rem;font:inherit;font-size:.8125rem;cursor:pointer}
.filter-note{color:var(--dim);font-size:.8rem;margin:.2rem 0 0}

.match-groups{display:grid;gap:.6rem}
.league-group summary{display:flex;align-items:center;gap:.55rem;cursor:pointer;background:var(--ink-2);padding:.6rem .8rem;list-style:none}
.league-group summary::-webkit-details-marker{display:none}
.league-group summary h2,.league-group summary h3{flex:1;font-size:.875rem;font-weight:600}
/* ชื่อลีกในหัวกล่องเป็นลิงก์ไปหน้าตารางคะแนน ซ้อนอยู่ในพื้นที่กดของ summary
   ที่ใช้พับ/กางรายการ ถ้าลิงก์เตี้ยกว่า 24px เครื่องมือตรวจจะนับว่าเป็นเป้ากด
   สองอันที่เบียดกันจนกดพลาดได้ ขยายความสูงลิงก์ให้ถึงเกณฑ์ หน้าตาไม่เปลี่ยน */
.league-group summary h2 a,.league-group summary h3 a{display:inline-flex;align-items:center;min-height:24px}
.league-group .count{color:var(--dim);font-size:.75rem}
.chev{width:8px;height:8px;border-right:1.6px solid var(--dim);border-bottom:1.6px solid var(--dim);rotate:-135deg;transition:rotate .2s;margin-top:3px}
.league-group:not([open]) .chev{rotate:45deg;margin-top:-3px}

.matches{list-style:none;margin:0;padding:0}
.matches li+li{border-top:1px solid var(--line-soft)}
.matches a{display:flex;align-items:center;gap:.6rem;padding:.55rem .8rem;font-size:.825rem;transition:background .12s}
.matches a:hover{background:#ffffff08}
.matches .time{width:3.1rem;flex:none;color:var(--dim);font-variant-numeric:tabular-nums;font-size:.78rem}
.matches .time.live{color:var(--live);font-weight:600}
.matches .row-league{width:8rem;flex:none;color:var(--dim);font-size:.72rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.matches .row-league{display:none}}
.matches .team{display:flex;align-items:center;gap:.45rem;flex:1;min-width:0}
.matches .team.home{justify-content:flex-end;text-align:right}
.matches .team img{flex:none;object-fit:contain}
.matches .tname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.matches .score{width:3.2rem;flex:none;text-align:center;font-weight:600;font-variant-numeric:tabular-nums}
.matches .score.live{color:var(--gold)}

/* ---------------- date strip ---------------- */
.date-strip{display:flex;gap:.45rem;overflow-x:auto;padding-bottom:.5rem;margin:1rem 0;scrollbar-width:thin}
.date-strip a{flex:none;border:1px solid var(--line);border-radius:999px;padding:.35rem 1rem;font-size:.8125rem;color:var(--muted)}
.date-strip a.active{background:var(--gold);color:#181200;border-color:var(--gold);font-weight:600}

/* ---------------- tables ---------------- */
.table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r)}
.table{width:100%;border-collapse:collapse;font-size:.825rem}
.table th,.table td{padding:.5rem .55rem;text-align:center;border-bottom:1px solid var(--line-soft)}
.table thead th{background:var(--ink-2);color:var(--dim);font-weight:500;font-size:.72rem;white-space:nowrap}
.table tbody tr:last-child td{border-bottom:0}
.table td{font-variant-numeric:tabular-nums}
.table .tcell,.table td:nth-child(2),.table th:nth-child(2){text-align:left}
.tcell{display:flex;align-items:center;gap:.45rem}
.tcell img{flex:none;object-fit:contain}
.tcell a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table.mini th,.table.mini td{padding:.42rem .3rem;font-size:.78rem}
.form{white-space:nowrap}
.form .f{margin-right:.15rem}

/* ---------------- ดาวซัลโว ---------------- */
.scorer-list{list-style:none;counter-reset:s;padding:0;margin:0}
.scorer-list li{counter-increment:s;display:flex;align-items:center;gap:.55rem;padding:.5rem .15rem;border-bottom:1px solid var(--line-soft);font-size:.85rem}
.scorer-list li:last-child{border-bottom:0}
.scorer-list li::before{content:counter(s);color:var(--dim);width:1.1rem;font-size:.75rem;flex:none}
.scorer-list img{flex:none;object-fit:contain}
.scorer-list .pn{flex:1;min-width:0;display:grid;line-height:1.3}
.scorer-list .pn em{font-style:normal;font-size:.72rem;color:var(--dim)}
.scorer-list strong{color:var(--gold);font-variant-numeric:tabular-nums}

/* ---------------- match history ---------------- */
.match-history{list-style:none;padding:0;margin:0}
.match-history li{border-bottom:1px solid var(--line-soft)}
.match-history li:last-child{border-bottom:0}
.match-history a{display:flex;gap:.7rem;align-items:center;padding:.5rem .2rem;font-size:.825rem}
.match-history a:hover{color:var(--gold)}
.match-history span{color:var(--dim);font-size:.75rem;min-width:7.5rem;flex:none}
.match-history strong{font-variant-numeric:tabular-nums}

.two-col{display:grid;gap:1.25rem;grid-template-columns:1fr}
@media(min-width:720px){.two-col{grid-template-columns:1fr 1fr}}

.link-grid{list-style:none;padding:0;margin:0;display:grid;gap:.5rem;grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.link-grid a{display:block;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:.6rem .85rem;font-size:.85rem}
.link-grid a:hover{border-color:var(--gold-2);color:var(--gold)}

/* ---------------- หน้าแมตช์ / ทีม ---------------- */
.scoreboard{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;padding:1.5rem 1rem;text-align:center;margin:1rem 0}
.scoreboard .side{font-weight:500}
.scoreboard .mid strong{font-size:1.9rem;color:var(--gold);font-variant-numeric:tabular-nums;display:block}
.scoreboard .mid small{color:var(--dim);font-size:.72rem}
.venue{color:var(--dim);font-size:.825rem;text-align:center}
.meta-chips{list-style:none;display:flex;flex-wrap:wrap;gap:.45rem;padding:0;margin:1rem 0}
.meta-chips li{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:.3rem .9rem;font-size:.78rem}
.meta-chips span{color:var(--dim)}

/* ---------------- แถบเต็มความกว้าง ---------------- */
.band{padding-block:3rem;border-top:1px solid var(--line-soft)}
.band.alt{background:#0b0b10}
.band h2{font-size:1.35rem;margin-bottom:.4rem}
.narrow-text{max-width:44rem;margin-inline:auto}

.marquee{overflow:hidden;margin-block:1rem;mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.marquee-track{display:flex;gap:.6rem;width:max-content;animation:slide 48s linear infinite}
.marquee-track.rev{animation-direction:reverse}
.marquee:hover .marquee-track{animation-play-state:paused}
@keyframes slide{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(prefers-reduced-motion:reduce){.marquee-track{animation:none}.marquee{mask-image:none;overflow-x:auto}}
.lchip{display:inline-flex;align-items:center;gap:.45rem;background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:.45rem 1.1rem;font-size:.825rem;white-space:nowrap}
.lchip:hover{border-color:var(--gold-2);color:var(--gold)}

.stat-box{display:grid;grid-template-columns:1fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-top:1.5rem}
@media(min-width:640px){.stat-box{grid-template-columns:repeat(3,1fr)}}
.stat-box>div{background:var(--surface);padding:1.4rem 1rem;display:grid;gap:.25rem}
.stat-box strong{color:var(--gold);font-size:1.75rem;font-weight:700}
.stat-box span{font-size:.875rem;font-weight:500}
.stat-box small{color:var(--dim);font-size:.75rem;line-height:1.5}

.feature-grid{display:grid;gap:.85rem;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));margin-top:1.5rem;text-align:left}
.fcard{position:relative;padding:1.1rem}
.fcard:hover{border-color:var(--gold-2)}
.fico{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#f5c5421f;color:var(--gold);font-size:1rem;margin-bottom:.8rem}
.farrow{position:absolute;top:1.1rem;right:1.1rem;color:var(--dim)}
.fcard h3{margin-bottom:.3rem;font-size:.95rem}
.fcard p{color:var(--muted);font-size:.8rem;margin:0;line-height:1.55}

.know-list{list-style:none;padding:0;margin:1.5rem auto 0;max-width:34rem;display:grid;gap:2px;text-align:left}
.know-list a{display:flex;align-items:center;justify-content:space-between;gap:.75rem;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:.7rem 1rem;font-size:.85rem}
.know-list a:hover{border-color:var(--gold-2);color:var(--gold)}

.band.member .wrap{max-width:60rem}
.band.member h2{margin-bottom:.4rem}
.band.member p{color:var(--muted);font-size:.875rem}
.cta-row{display:flex;gap:.6rem;flex-wrap:wrap;margin:1.1rem 0}
.disclaimer{color:var(--dim)!important;font-size:.75rem!important;line-height:1.7;border-top:1px solid var(--line-soft);padding-top:1rem;margin-top:1.25rem}

/* ---------------- บทความ ---------------- */
.card-grid{list-style:none;padding:0;margin:0;display:grid;gap:.85rem;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.article-card img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block}
.article-card .body{padding:.85rem}
.article-card h3{margin:.4rem 0 .3rem;font-size:.95rem;line-height:1.45}
.article-card p{color:var(--muted);font-size:.8rem;margin:0 0 .5rem;line-height:1.55}
.article-card small{color:var(--dim);font-size:.72rem}
.chip{display:inline-block;background:var(--ink-2);border:1px solid var(--line);border-radius:999px;padding:.12rem .65rem;font-size:.72rem;color:var(--muted)}
.chips{display:flex;flex-wrap:wrap;gap:.45rem;margin:1rem 0}
.chips a{border:1px solid var(--line);border-radius:999px;padding:.3rem .9rem;font-size:.8125rem;color:var(--muted)}
.chips a.active{background:var(--gold);color:#181200;border-color:var(--gold);font-weight:600}

.post{max-width:46rem}
.post-meta{color:var(--dim);font-size:.8125rem}
.post .cover{border-radius:var(--r);margin:1rem 0;aspect-ratio:16/9;object-fit:cover;width:100%}
.post-body{font-size:1rem;line-height:1.85}
.post-body h2{margin:2rem 0 .6rem;font-size:1.15rem}
.post-body h3{margin:1.5rem 0 .4rem}
.post-body img,.post-body figure{border-radius:10px;margin-block:1.25rem}
.post-body figcaption{color:var(--dim);font-size:.8rem;text-align:center;margin-top:.5rem}
.post-body a{color:var(--gold);text-decoration:underline;text-underline-offset:3px}
.post-body blockquote{border-left:3px solid var(--gold);margin-inline:0;padding-left:1rem;color:var(--muted)}
.post-body table{width:100%;border-collapse:collapse;font-size:.875rem}
.post-body th,.post-body td{border:1px solid var(--line);padding:.5rem}
.post-body ul,.post-body ol{padding-left:1.35rem}
.post-body li{margin-block:.35rem}
.post-body .table-wrap{overflow-x:auto;margin:.75rem 0}
.post-body .ana-table th,.post-body .ana-table td{text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.post-body .ana-table tbody th{text-align:left;font-weight:500}
.post-body .ana-table.compact td:nth-child(2){text-align:right}
.post-body .ana-table.compact td:nth-child(4){text-align:left}
@media(max-width:600px){
  .post-body .ana-table{font-size:.78rem}
  .post-body .ana-table th,.post-body .ana-table td{padding:.4rem .3rem}
  .post-body .ana-table tbody th,.post-body .ana-table.compact td{white-space:normal}
  .post-body .ana-table .f{width:15px;height:15px;font-size:9px}
}
.post-body .ana-meta{color:var(--dim);font-size:.85rem;margin:.1rem 0 .6rem}
.post-body .ana-match{border-top:1px solid var(--line-soft);margin-top:1.5rem}
.post-body .ana-toc{border:1px solid var(--line);border-radius:10px;padding:.5rem 1rem;margin:1.25rem 0;background:var(--surface)}
.post-body .ana-toc ul{columns:2;column-gap:1.5rem;margin:0}
@media(max-width:600px){.post-body .ana-toc ul{columns:1}}
.post-body .ana-note{color:var(--dim);font-size:.85rem;border-top:1px solid var(--line);padding-top:1rem;margin-top:2rem}
.post-body .f{text-decoration:none}

/* ---------------- วิเคราะห์บอล ---------------- */
.ana-cta{display:flex;align-items:center;gap:.55rem;margin:.9rem 0;padding:.7rem 1rem;border:1px solid var(--gold);border-radius:var(--r);
  color:var(--gold);background:var(--surface);font-size:.9rem;font-weight:500}
.ana-cta span:nth-of-type(1){flex:1}
.ana-cta:hover{color:var(--gold-soft);border-color:var(--gold-soft)}
.ana-feature{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(18rem,1fr));gap:1rem}
.ana-feature a{display:block;color:inherit}
.ana-feature img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:var(--r) var(--r) 0 0}
.ana-feature .body{padding:.8rem 1rem 1rem}
.ana-feature h3{margin:0 0 .4rem;font-size:1.05rem}
.ana-feature p{color:var(--muted);font-size:.85rem;margin:0}
.ana-archive{columns:2;column-gap:2rem;padding-left:1.2rem}
.ana-archive li{margin-block:.3rem;break-inside:avoid}
@media(max-width:600px){.ana-archive{columns:1}}
/* ไฮไลท์ฟุตบอล */
.hl-grid{list-style:none;padding:0;margin:1rem 0;display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:1rem}
.hl-card{padding:0;overflow:hidden}
.hl-card>a{display:block;color:inherit}
.hl-card .body{display:block;padding:.65rem .8rem .8rem}
.hl-card h2,.hl-card h3{font-size:.95rem;line-height:1.45;margin:0 0 .3rem}
.hl-card small{color:var(--dim);font-size:.78rem}
.hl-thumb{position:relative;display:block;aspect-ratio:16/9;background:#0b0b10}
.hl-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.hl-btn{position:absolute;inset:0;margin:auto;width:46px;height:46px;border-radius:50%;background:#f5c542e6;box-shadow:0 2px 10px #0008}
.hl-btn::after{content:"";position:absolute;left:18px;top:13px;border-style:solid;border-width:10px 0 10px 16px;border-color:transparent transparent transparent #161620}
.hl-btn.big{width:76px;height:76px}
.hl-btn.big::after{left:30px;top:22px;border-width:16px 0 16px 26px}
.hl-card:hover .hl-btn,.hl-play:hover .hl-btn{background:#ffd86b}
.hl-page{max-width:60rem}
.hl-embed{position:relative;aspect-ratio:16/9;background:#000;border-radius:var(--r);overflow:hidden;margin:1rem 0 .4rem}
.hl-embed iframe,.hl-play,.hl-play img{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
.hl-play img{object-fit:cover}
.hl-credit{color:var(--dim);font-size:.8rem;margin:.3rem 0 1.2rem}
.hl-credit a{color:var(--muted);text-decoration:underline}
/* บทวิเคราะห์รายคู่ */
.post-body .ana-result{border-left:3px solid var(--gold);background:var(--surface);padding:.7rem 1rem;border-radius:0 10px 10px 0}
.post-body .ana-table.info th{text-align:left;width:34%;white-space:normal;font-weight:500;color:var(--muted)}
.post-body .ana-table.info td{text-align:left;white-space:normal}
.post-body .ana-method{color:var(--dim);font-size:.85rem}
.post-body .ana-table.compact td:first-child{white-space:nowrap}
.pbar{display:flex;height:2.1rem;border-radius:10px;overflow:hidden;margin:1rem 0 .3rem;font-size:.85rem;font-weight:600;color:#fff}
.pbar span{display:flex;align-items:center;justify-content:center;min-width:2.4rem;white-space:nowrap}
.pbar .pb-h{background:var(--win)}.pbar .pb-d{background:var(--draw)}.pbar .pb-a{background:#1f5fa8}
.pbar-legend{display:flex;justify-content:space-between;gap:.5rem;color:var(--muted);font-size:.8rem;margin:0 0 1rem}
.ana-league{font-size:.95rem;margin:1.1rem 0 .4rem;color:var(--muted)}
.ana-pairs{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(19rem,1fr));gap:.4rem}
.ana-pairs a{display:flex;gap:.6rem;align-items:baseline;padding:.55rem .75rem;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:inherit}
.ana-pairs a:hover{border-color:var(--gold)}
.ana-pairs .ap-time{flex:none;color:var(--gold);font-size:.8rem;font-variant-numeric:tabular-nums;min-width:3.6rem}
.ana-pairs .ap-name{min-width:0}
.ana-pairs em{font-style:normal;color:var(--dim);font-size:.8rem}
.tags{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:2rem}
.faq{max-width:46rem}
.faq details{border:1px solid var(--line);border-radius:10px;padding:.75rem 1rem;margin-bottom:.5rem;background:var(--surface)}
.faq summary{cursor:pointer;list-style:none}
.faq summary::-webkit-details-marker{display:none}
.faq summary h3{display:inline;font-size:.95rem}
.faq p{color:var(--muted);font-size:.875rem;margin:.6rem 0 0}

.pager{display:flex;gap:.35rem;flex-wrap:wrap;margin:2rem 0}
.pager a{border:1px solid var(--line);border-radius:8px;padding:.35rem .8rem;font-size:.8125rem;color:var(--muted)}
.pager a.active{background:var(--gold);color:#181200;border-color:var(--gold);font-weight:600}
.pager .gap{align-self:center;color:var(--dim);padding:0 .1rem}
/* คลังผลบอลย้อนหลัง */
.arch-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.6rem}
.arch-grid a{display:flex;flex-direction:column;gap:.15rem;padding:.7rem .85rem;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.arch-grid a:hover{border-color:var(--gold)}
.arch-grid strong{font-weight:500;font-size:.9rem}
.arch-grid span{font-size:.78rem;color:var(--dim)}
.arch-days{list-style:none;padding:0;margin:0;columns:2 260px;column-gap:1.6rem}
.arch-days li{break-inside:avoid;padding:.4rem 0;border-bottom:1px solid var(--line-soft);font-size:.85rem;display:flex;gap:.6rem;flex-wrap:wrap;align-items:baseline}
.arch-days li span{color:var(--dim);font-size:.78rem}
.arch-days .sub{margin-left:auto;font-size:.78rem;color:var(--gold-soft)}
.month-nav{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin:1.6rem 0;font-size:.875rem}


/* ---------------- footer ---------------- */
.site-footer{border-top:1px solid var(--line-soft);background:#07070a;padding-block:2.5rem;font-size:.825rem}
.footer-grid{display:grid;gap:1.75rem;grid-template-columns:1fr}
@media(min-width:800px){.footer-grid{grid-template-columns:2.2fr 1fr 1fr 1fr}}
.fbrand strong{color:var(--gold);font-size:1.2rem}
.fbrand p{color:var(--muted);margin:.5rem 0 0;line-height:1.7}
.fnote{color:var(--dim)!important;font-size:.75rem!important}
.site-footer h2{font-size:.875rem;margin:0 0 .6rem;color:var(--fg)}
.site-footer ul{list-style:none;padding:0;margin:0;display:grid;gap:.4rem}
.site-footer a{color:var(--muted)}
.site-footer a:hover{color:var(--gold)}
.copyright{color:var(--dim);font-size:.75rem;margin-top:2rem;padding-top:1.1rem;border-top:1px solid var(--line-soft)}

/* ---------------- LINE ลอย ---------------- */
.line-float{position:fixed;right:14px;bottom:14px;z-index:40;display:grid;gap:4px;justify-items:center}
.line-float a{display:block;border-radius:12px;overflow:hidden;box-shadow:0 8px 24px #0009}
.line-float .close{align-self:end;width:26px;height:26px;border-radius:50%;border:1px solid var(--line);background:var(--ink-2);color:var(--muted);font-size:.7rem;cursor:pointer;line-height:1}
@media(max-width:600px){.line-float{right:8px;bottom:8px;max-width:110px}}

/* ---------------- รายการแมตช์จัดกลุ่มตามวัน ---------------- */
.day-block{margin-bottom:.9rem}
.day-head{font-size:.8125rem;font-weight:500;color:var(--dim);margin:0 0 .35rem;padding-left:.15rem}
.day-block .matches{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.scoreboard .side a{display:grid;justify-items:center;gap:.5rem}
.scoreboard .crest{width:56px;height:56px;object-fit:contain}
@media(max-width:600px){.scoreboard .crest{width:42px;height:42px}}

/* ---------------- แถบเมนูล่างสำหรับมือถือ ----------------
   ติดขอบล่างจอทุกหน้า เลื่อนตามผู้ใช้ไปตลอด แสดงเฉพาะจอไม่เกิน 880px
   ซึ่งเป็นจุดเดียวกับที่หัวเว็บยุบเป็นเมนู 3 ขีด จอคอมจึงไม่เห็นแถบนี้    */
.mobile-bar{display:none}
@media(max-width:880px){
  :root{--mbar-h:3.6rem}
  .mobile-bar{
    display:grid;grid-template-columns:repeat(4,1fr);
    position:fixed;inset:auto 0 0 0;z-index:60;
    background:var(--ink-2);border-top:1px solid var(--line);
    box-shadow:0 -6px 20px #0009;
    padding-bottom:env(safe-area-inset-bottom,0px);
  }
  .mobile-bar a{
    display:grid;justify-items:center;align-content:center;gap:.15rem;
    min-height:var(--mbar-h);padding:.4rem .2rem;
    color:var(--muted);font-size:.6875rem;line-height:1.2;text-align:center;
  }
  .mobile-bar a+a{border-left:1px solid var(--line-soft)}
  .mobile-bar a:active{background:#ffffff0d}
  /* สมัครสมาชิกเป็นปุ่มหลัก จึงเน้นสีทองให้ต่างจากปุ่มอื่น */
  .mobile-bar .mb-register{color:var(--gold-soft)}
  .mobile-bar a[aria-current]{color:var(--gold);font-weight:500}

  /* กันแถบบังเนื้อหาท้ายหน้า และดันป้าย LINE ขึ้นมาให้พ้นแถบ */
  body{padding-bottom:calc(var(--mbar-h) + env(safe-area-inset-bottom,0px))}
  .line-float{bottom:calc(var(--mbar-h) + env(safe-area-inset-bottom,0px) + 10px)}
}
@media(max-width:600px){
  .line-float{bottom:calc(var(--mbar-h) + env(safe-area-inset-bottom,0px) + 8px)}
}

/* ---------------- ตารางไทล์โลโก้ลีก ----------------
   หน้าตารางคะแนนและหน้าดาวซัลโวใช้ร่วมกัน 5 ช่องต่อแถวบนจอกว้างตามต้นฉบับ  */
.league-tiles{
  list-style:none;padding:0;margin:1rem 0 1.4rem;
  display:grid;gap:.6rem;grid-template-columns:repeat(5,1fr);
}
.league-tiles a{
  display:grid;place-items:center;min-height:76px;padding:.7rem;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  transition:border-color .15s,background .15s;
}
.league-tiles a:hover{border-color:var(--gold-2);background:var(--surface-2)}
.league-tiles img{width:46px;height:46px;object-fit:contain}
.league-tiles .tile-fallback{font-weight:600;color:var(--muted)}
@media(max-width:900px){.league-tiles{grid-template-columns:repeat(4,1fr)}}
@media(max-width:620px){
  .league-tiles{grid-template-columns:repeat(3,1fr);gap:.5rem}
  .league-tiles a{min-height:64px;padding:.5rem}
  .league-tiles img{width:38px;height:38px}
}

/* ---------------- ตารางคะแนน: โซน โลโก้ นัดถัดไป ---------------- */
/* จัดชิดซ้ายเฉย ๆ ห้ามใช้ .tcell ซ้ำ เพราะ .tcell เป็น display:flex
   ถ้าใส่กับ td สองช่องในแถวเดียวกัน ช่องจะหลุดจาก layout ตารางแล้วซ้อนกันลงมา */
.table .lcell{text-align:left}
.table .lcell a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table .tlink{display:inline-flex;align-items:center;gap:.45rem;min-width:0}
.table .tlink img{width:20px;height:20px;object-fit:contain;flex:none}
.table .tlink:hover{color:var(--gold)}
.table .pos{position:relative;color:var(--muted);padding-left:.75rem}
/* แถบสีโซนวางเป็น ::before เพื่อไม่ให้ไปดัน layout ของเซลล์ */
.table .pos::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:3px;border-radius:2px}
.z-ucl::before,.dot.z-ucl{background:#2f6fe0}
.z-uel::before,.dot.z-uel{background:#e08a1e}
.z-ucfl::before,.dot.z-ucfl{background:#12a05a}
.z-promo::before,.dot.z-promo{background:#12a05a}
.z-rel::before,.dot.z-rel{background:var(--lose)}
.z-out::before,.dot.z-out{background:var(--draw)}
.z-other::before,.dot.z-other{background:var(--gold-2)}
.standings .nextcell img{width:20px;height:20px;object-fit:contain}
.standings .nextcell .dash{color:var(--dim)}
.scorers .pname{font-weight:500}
.scorers .goals{color:var(--gold)}

.zone-legend{
  list-style:none;padding:0;margin:.7rem 0 0;
  display:flex;flex-wrap:wrap;gap:.35rem 1.1rem;font-size:.75rem;color:var(--muted);
}
.zone-legend li{display:inline-flex;align-items:center;gap:.4rem}
.zone-legend .dot{width:8px;height:8px;border-radius:50%;flex:none}

.note{color:var(--muted);font-size:.85rem;margin:.6rem 0}
.lead.sm{font-size:.8125rem;color:var(--dim);margin-top:-.35rem}
.match-history .lg{margin-left:auto;font-style:normal;font-size:.72rem;color:var(--dim)}
.tag-entity{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;font-size:.85rem;margin:.6rem 0 1rem}
.tag-entity a{color:var(--gold-soft);text-decoration:underline;text-underline-offset:3px}
.chips-inline{display:flex;flex-wrap:wrap;gap:.45rem}
.page-title{display:flex;align-items:center;gap:.9rem;margin:.2rem 0 .4rem}
.page-title h1{margin:0}
.crest.sm{width:48px;height:48px}
