/* tdedsoccer.com — สำนักข่าวฟุตบอล (8 ก.ย. 2026)
   โทน: สนามกลางคืน — พื้นเขียวเข้มอมดำ ตัวหนังสือขาวนวล เน้นด้วยเขียวสนามสด
   ไม่ใช้ขาวล้วน/ดำล้วน ทุกสีอมเขียวนิดหนึ่งให้เป็นชุดเดียวกัน */
:root {
  --bg: #0b1410;
  --bg-2: #101c16;
  --card: #14231c;
  --line: #1e3328;
  --ink: #eaf3ec;
  --ink-dim: #9fb3a6;
  --pitch: #4ade80;
  --pitch-deep: #16a34a;
  --live: #ff4d4f;
  --gold: #f5c518;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(120% 60% at 50% -10%, #16281e 0%, rgba(22,40,30,0) 60%), var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
header.top { position: sticky; top: 0; z-index: 40; background: rgb(11 20 16 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .row { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 19px; letter-spacing: -.3px; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--pitch); box-shadow: 0 0 12px var(--pitch); }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--ink-dim); white-space: nowrap; transition: background .15s, color .15s; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a.on { color: #06210f; background: var(--pitch); }

.grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 22px 0 60px; }
@media (min-width: 900px) { .grid { grid-template-columns: minmax(0,1fr) 340px; gap: 26px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14.5px; }
.card-h .more { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--pitch); }
.sec-title { font-size: 20px; font-weight: 900; letter-spacing: -.3px; margin: 26px 0 12px; }

.lg-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 800; color: var(--ink-dim); letter-spacing: .3px; }
.lg-head img { width: 16px; height: 16px; object-fit: contain; }
.m { display: grid; grid-template-columns: 52px minmax(0,1fr) 46px; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); transition: background .12s; }
.m:last-child { border-bottom: 0; }
.m:hover { background: #16261e; }
.m .t { font-size: 12px; font-weight: 700; color: var(--ink-dim); text-align: center; line-height: 1.25; }
.m .t.live { color: var(--live); }
.m .t.live::before { content: "●"; display: block; font-size: 9px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25 } }
.m .sides { min-width: 0; display: grid; gap: 3px; }
.m .side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.m .side img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.m .side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.m .side.win span { font-weight: 800; }
.m .sc { display: grid; gap: 3px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.m .sc div { font-size: 14.5px; }
.m .odds { grid-column: 1 / -1; display: flex; gap: 6px; padding-top: 8px; }
.m .odds a { flex: 1; text-align: center; padding: 5px 4px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.m .odds a b { display: block; font-size: 10.5px; font-weight: 700; color: var(--ink-dim); }
.m .odds a:hover { border-color: var(--pitch); color: var(--pitch); }

.hero { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero .body { padding: 16px 18px 18px; }
.hero h2 { font-size: clamp(20px, 3.4vw, 27px); line-height: 1.28; font-weight: 900; letter-spacing: -.4px; }
.hero p { margin-top: 8px; color: var(--ink-dim); font-size: 14.5px; }
.news-list { display: grid; gap: 14px; }
@media (min-width: 640px) { .news-list { grid-template-columns: 1fr 1fr; } }
.n { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; }
.n:hover { border-color: var(--pitch); transform: translateY(-1px); }
.n img { width: 104px; height: 100%; min-height: 88px; object-fit: cover; }
.n .txt { padding: 11px 12px 12px 0; min-width: 0; }
.n h3 { font-size: 14.5px; font-weight: 800; line-height: 1.4; }
.n .meta { margin-top: 6px; font-size: 11.5px; color: var(--ink-dim); display: flex; gap: 7px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgb(74 222 128 / .13); color: var(--pitch); font-size: 11px; font-weight: 800; }

table.standings { width: 100%; border-collapse: collapse; font-size: 13px; }
table.standings th { text-align: left; padding: 9px 8px; color: var(--ink-dim); font-size: 11.5px; font-weight: 700; border-bottom: 1px solid var(--line); }
table.standings td { padding: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.standings tr:last-child td { border-bottom: 0; }
table.standings .team { display: flex; align-items: center; gap: 8px; }
table.standings .team img { width: 18px; height: 18px; object-fit: contain; }
table.standings .pts { font-weight: 900; color: var(--pitch); }
table.standings tr.top td:first-child { box-shadow: inset 3px 0 0 var(--pitch); }

.follow-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; cursor: pointer; }
.chip img { width: 18px; height: 18px; object-fit: contain; }
.chip.on { border-color: var(--pitch); color: var(--pitch); background: rgb(74 222 128 / .1); }

article.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
article.post > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
article.post .inner { padding: 20px 22px 26px; }
article.post h1 { font-size: clamp(23px, 4vw, 33px); line-height: 1.25; font-weight: 900; letter-spacing: -.5px; }
article.post .lede { margin-top: 12px; font-size: 16px; color: var(--ink-dim); }
article.post .meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-dim); display: flex; gap: 10px; flex-wrap: wrap; }
article.post .content { margin-top: 18px; font-size: 16px; line-height: 1.85; }
article.post .content p + p { margin-top: 15px; }
.keypoints { margin-top: 18px; padding: 15px 17px; background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--pitch); border-radius: 10px; }
.keypoints b { font-size: 13px; }
.keypoints ul { margin: 9px 0 0 18px; }
.keypoints li { margin-top: 6px; font-size: 14.5px; }

.cta-odds { margin-top: 18px; padding: 18px; border-radius: var(--radius); background: linear-gradient(135deg, #143024, #0e211a); border: 1px solid var(--pitch-deep); }
.cta-odds h3 { font-size: 17px; font-weight: 900; }
.cta-odds p { margin-top: 6px; color: var(--ink-dim); font-size: 13.5px; }
.btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 20px; border-radius: 999px; font-weight: 900; font-size: 14.5px; background: var(--pitch); color: #06210f; }
.btn:hover { background: #6ee79b; }

footer.bot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--ink-dim); font-size: 12.5px; }
footer.bot a { color: var(--pitch); }
.skeleton { background: linear-gradient(90deg, #16261e, #1b2f24, #16261e); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0 } }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-dim); font-size: 13.5px; }

/* ลิงก์ทัศนะใต้คู่ที่มีบทวิเคราะห์ */
.m .pv { grid-column: 1 / -1; margin-top: 7px; padding: 6px 10px; border-radius: 8px;
  background: rgb(74 222 128 / .09); border: 1px solid rgb(74 222 128 / .28);
  color: var(--pitch); font-size: 12px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m .pv:hover { background: rgb(74 222 128 / .16); }

/* Compact home and complete team directory */
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--pitch); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero { display: block; }
.home-page { padding-top: 28px; padding-bottom: 40px; }
.home-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { color: var(--pitch); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.home-intro h1 { font-size: clamp(23px, 3vw, 32px); line-height: 1.35; margin-top: 5px; }
.home-intro p { color: var(--ink-dim); font-size: 14px; margin-top: 6px; }
.outline-link, .filter-btn { border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px; background: var(--bg-2); font-size: 13px; font-weight: 700; }
.outline-link { display: inline-flex; white-space: nowrap; }
.outline-link:hover, .filter-btn:hover { border-color: var(--pitch); }
.text-link, .section-heading a { color: var(--pitch); }
.section-nav { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 20px; }
.section-nav a { white-space: nowrap; padding: 7px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.section-nav a:first-child { color: var(--pitch); border-color: var(--pitch-deep); }
.home-page section { scroll-margin-top: 80px; min-width: 0; }
.home-columns { display: grid; grid-template-columns: minmax(0, 1fr) 350px; grid-template-areas: "news sidebar" "following sidebar"; grid-template-rows: auto 1fr; gap: 26px; align-items: start; }
#latest-news { grid-area: news; }
.home-sidebar { grid-area: sidebar; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { font-size: 20px; }
.section-heading a { font-size: 13px; white-space: nowrap; }
.home-news { margin-top: 14px; }
.home-news .meta { flex-wrap: wrap; }
.home-news h3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-page .hero img { max-height: 290px; }
.home-page .hero p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.section-link { display: block; padding: 12px; margin-top: 14px; text-align: center; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; color: var(--pitch); }
.home-sidebar .card-h h2 { font-size: 15px; }
.live-label { margin-left: auto; font-size: 10px; color: var(--pitch); white-space: nowrap; }
.score-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 12px 0; }
select, input[type=search] { min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); padding: 9px; }
.score-controls select { width: 100%; font-size: 12px; }
.score-summary { font-size: 11px; color: var(--ink-dim); padding: 8px 12px; }
.compact-fixture { border-top: 1px solid var(--line); }
.fixture-league { padding: 7px 14px 0; color: var(--ink-dim); font-size: 10px; }
.compact-fixture .m { padding: 6px 10px 10px; gap: 6px; grid-template-columns: 43px minmax(0,1fr) 28px; }
.score-actions { display: flex; justify-content: center; gap: 8px; padding: 10px; }
.table-picker { display: flex; align-items: center; gap: 12px; padding: 12px; font-size: 12px; }
.table-picker select { flex: 1; }
.table-content { padding: 0 6px 8px; }
.home-follow { grid-area: following; }
.home-follow #myfeed { padding: 14px; }
.team-tools { padding: 18px; display: grid; gap: 10px; }
.team-tools > label { font-weight: 700; }
.team-tools input { width: 100%; }
.team-tool-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.team-tool-row select { flex: 1; }
.team-tools p { color: var(--ink-dim); font-size: 13px; }
.filter-btn[aria-pressed=true] { color: var(--pitch); border-color: var(--pitch); }
.team-groups { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; margin-top: 20px; }
.team-group.card { margin: 0; }
.team-group summary { padding: 16px 18px; cursor: pointer; font-weight: 800; }
.team-group summary::marker { color: var(--pitch); }
.team-count { float: right; color: var(--ink-dim); font-size: 12px; font-weight: 400; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 14px; }
.team-grid .chip { border-radius: 10px; padding: 10px; text-align: left; min-height: 48px; min-width: 0; }
.team-grid .chip img { flex-shrink: 0; width: 24px; height: 24px; }
.team-grid .chip > span:first-of-type { overflow-wrap: anywhere; }
.follow-mark { margin-left: auto; color: var(--pitch); }
@media (max-width: 899px) {
  .home-columns { grid-template-columns: 1fr; grid-template-areas: "news" "sidebar" "following"; grid-template-rows: auto; gap: 24px; }
  .home-sidebar { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
  .home-sidebar .card + .card { margin-top: 0; }
  .top .row { height: auto; min-height: 58px; flex-wrap: wrap; gap: 4px; padding-top: 10px; padding-bottom: 8px; }
  .brand { flex-shrink: 0; }
  .nav { width: 100%; margin: 0; }
  .nav a { padding: 6px 11px; }
  .home-page section { scroll-margin-top: 120px; }
}
@media (max-width: 600px) {
  .home-page { padding-top: 18px; }
  .home-intro { align-items: flex-start; }
  .home-intro .outline-link { padding: 7px 9px; font-size: 11px; }
  .home-intro h1 { font-size: 23px; }
  .home-intro p { font-size: 12px; }
  .home-sidebar, .team-groups { grid-template-columns: 1fr; }
  .home-news { grid-template-columns: 1fr; gap: 10px; }
  .home-page .hero .body { padding: 14px; }
  .home-page .hero h2 { font-size: 22px; }
  .home-page .hero img { max-height: 210px; }
  .section-heading h2 { font-size: 18px; }
  .team-grid { gap: 6px; }
  .team-grid .chip { font-size: 12px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
