:root {
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --paper: #f7f3ec;
  --sheet: #fffdf8;
  --rule: #d9d0c2;
  --accent: #c4302b;
  --accent-deep: #8f1f1c;
  --olive: #3d5a45;
  --card: #fffdf8;
  --shadow: 0 10px 28px rgba(26, 26, 26, 0.08);
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "Source Sans 3", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.mag-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(196,48,43,0.06), transparent 42%),
    radial-gradient(ellipse at 88% 18%, rgba(61,90,69,0.07), transparent 40%),
    linear-gradient(180deg, #f3eee4 0%, #f7f3ec 48%, #efe8db 100%);
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0 10px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand img {
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: var(--sheet);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 700; color: var(--ink);
  letter-spacing: 0.04em;
}
.brand-text em {
  font-style: normal; font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.18em; text-transform: uppercase;
}

.nav-toggle {
  display: none; border: 1px solid var(--ink); background: var(--sheet);
  color: var(--ink); border-radius: 2px; padding: 8px 14px; cursor: pointer;
  font-family: var(--font-body); font-weight: 600;
}
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--ink); padding: 8px 12px; border-radius: 2px;
  border-bottom: 2px solid transparent; font-weight: 600;
  letter-spacing: 0.02em;
}
.main-nav a:hover, .main-nav a.on {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
}

.league-strip { border-top: 1px solid var(--rule); }
.league-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 12px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.home-leagues { padding: 0; overflow: visible; flex-wrap: wrap; }
.league-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 2px; background: var(--sheet);
  border: 1px solid var(--rule); color: var(--ink); font-size: 0.88rem;
}
.league-chip.on, .league-chip:hover {
  border-color: var(--accent); color: var(--accent-deep);
}
.league-chip img { border-radius: 2px; }

.site-main { padding: 28px 0 48px; }

.hero {
  position: relative; overflow: hidden;
  padding: 40px 32px 36px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.hero-art { position: absolute; right: 28px; top: 24px; width: 160px; height: 120px; opacity: 0.9; }
.hero-art .float {
  position: absolute;
  animation: bob 3.4s ease-in-out infinite;
}
.hero-art .f1 { right: 10px; top: 8px; }
.hero-art .f2 { right: 70px; top: 48px; animation-delay: .4s; }
.hero-art .f3 { right: 20px; top: 72px; animation-delay: .8s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero .issue {
  margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.22em;
  color: var(--muted); text-transform: uppercase; position: relative; z-index: 1;
}
.hero h1 {
  margin: 0 0 10px; font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.2rem); font-weight: 700; color: var(--ink);
  position: relative; z-index: 1; letter-spacing: 0.02em;
}
.hero .kw {
  display: inline-block; margin-bottom: 14px; padding: 3px 0;
  border-bottom: 2px solid var(--accent); color: var(--accent);
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em;
  position: relative; z-index: 1;
}
.hero p { margin: 0; max-width: 34em; color: var(--muted); position: relative; z-index: 1; font-size: 1.05rem; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 2px; color: #fff; font-weight: 700;
  background: var(--accent); border: 1px solid var(--accent);
  letter-spacing: 0.04em;
}
.btn:hover { color: #fff; background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn img { display: inline-block; }

.sec { margin-bottom: 34px; }
.sec-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding-bottom: 8px;
  font-family: var(--font-display); font-size: 1.55rem; font-weight: 700;
  border-bottom: 2px solid var(--ink);
}
.sec-title small { font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.sec-title img { width: 22px; height: 22px; }

.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--rule); background: var(--sheet); }
.match-item {
  border-bottom: 1px solid var(--rule);
  transition: background .2s ease;
}
.match-item:last-child { border-bottom: 0; }
.match-item:hover { background: #faf6ef; }
.match-link { display: block; padding: 14px 16px; color: inherit; }
.match-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 10px; font-size: 0.82rem; color: var(--muted);
}
.league-ico { border-radius: 2px; }
.league-name { color: var(--olive); font-weight: 700; }
.st {
  margin-left: auto; padding: 2px 10px; border-radius: 2px;
  background: #eee8dc; color: var(--muted); font-size: 0.75rem; font-weight: 700;
}
.st-live { background: #f8e4e2; color: var(--accent); }
.st-finished { background: #ececec; color: var(--muted); }
.match-teams {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
}
.team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team.away { flex-direction: row-reverse; text-align: right; }
.team img {
  width: 36px; height: 36px; border-radius: 2px; background: #fff;
  flex-shrink: 0; border: 1px solid var(--rule);
}
.team span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score {
  min-width: 64px; text-align: center; font-family: var(--font-display);
  font-size: 1.35rem; color: var(--accent); font-weight: 700;
}

.news-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0;
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.news-card {
  display: block; padding: 18px 16px; color: inherit;
  background: var(--sheet);
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: background .2s;
}
.news-card:hover { background: #faf6ef; color: inherit; }
.news-card h3 {
  margin: 0 0 8px; font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 700; line-height: 1.45;
}
.news-card .sum { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.news-card time, .news-card .cat { font-size: 0.8rem; color: var(--muted); }
.news-card .cat {
  display: inline-block; margin-bottom: 8px; padding: 0;
  color: var(--accent); font-weight: 700; letter-spacing: 0.06em;
}

.about, .faq, .page-head, .article, .play-box {
  background: var(--sheet); border: 1px solid var(--rule);
  border-top: 3px solid var(--ink); padding: 24px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.about h2, .faq h2, .page-head h1, .article h1, .play-box h1 {
  margin-top: 0; font-family: var(--font-display); font-weight: 700;
}
.about h3 { color: var(--olive); font-size: 1.05rem; margin: 18px 0 8px; font-family: var(--font-display); }
.about p, .faq p { color: var(--muted); }
.inline-ico {
  display: inline; vertical-align: middle; border-radius: 2px;
  margin-right: 8px; border: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 12px 0; margin-bottom: 0; background: transparent;
}
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.faq details[open] summary { color: var(--accent); }

.crumb { margin-bottom: 16px; font-size: 0.88rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb span { margin: 0 6px; }

.article-meta {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.article-body { color: var(--ink); font-size: 1.05rem; }
.article-body p { margin: 0 0 1.1em; }
.article-body p:first-child { color: var(--muted); font-size: 0.95rem; }
.pager-nav {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule);
}
.pager-nav a {
  flex: 1 1 220px; padding: 12px 14px;
  background: #faf6ef; border: 1px solid var(--rule); color: var(--ink);
}
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pager a, .pager span {
  min-width: 36px; text-align: center; padding: 8px 12px;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink);
}
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }

.play-box .play-sub {
  text-align: center; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.play-box .play-sub img { display: inline-block; border-radius: 2px; }
.play-box .teams {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 20px 0; flex-wrap: wrap;
}
.play-box .teams .side { text-align: center; }
.play-box .teams img {
  width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 2px;
  border: 1px solid var(--rule); background: #fff;
}
.play-box .vs { font-family: var(--font-display); font-size: 1.7rem; color: var(--accent); font-weight: 700; }
.play-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.play-tip { margin-top: 18px; color: var(--muted); font-size: .9rem; text-align: center; }
.empty {
  text-align: center; padding: 28px; color: var(--muted);
  background: var(--sheet); border: 1px dashed var(--rule);
}

.friends {
  border-top: 1px solid var(--rule);
  background: rgba(255,253,248,0.7);
  padding: 14px 0;
}
.friends .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.friends .lab { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.friends a { color: var(--muted); font-size: 0.9rem; }
.friends a:hover { color: var(--accent); }

.site-footer {
  padding: 24px 0 36px; color: var(--muted); font-size: 0.85rem; text-align: center;
  border-top: 1px solid var(--rule);
}
.site-footer p { margin: 0 0 8px; }

@media (max-width: 860px) {
  .wrap { width: calc(100% - 24px); }
  .nav-toggle { display: inline-flex; }
  .site-header { position: relative; }
  .main-nav {
    display: none; position: absolute; left: 12px; right: 12px; top: 72px;
    flex-direction: column; background: var(--sheet); border: 1px solid var(--rule);
    padding: 10px; z-index: 60; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  body.nav-open { overflow: hidden; }
  .match-teams { grid-template-columns: 1fr; gap: 8px; }
  .team.away { flex-direction: row; text-align: left; }
  .score { order: -1; justify-self: start; }
  .hero { padding: 26px 18px; }
  .hero h1 { font-size: 1.9rem; }
  .hero-art { display: none; }
  .st { margin-left: 0; }
  .about, .faq, .page-head, .article, .play-box { padding: 18px; }
  .news-grid { grid-template-columns: 1fr; }
  .article-meta { gap: 6px 12px; }
  .pager-nav a { flex-basis: 100%; }
}

@media (max-width: 480px) {
  .brand-text strong { font-size: 1.25rem; }
  .match-link { padding: 12px; }
  .team span { font-size: 0.95rem; }
  .friends .wrap { gap: 8px 12px; }
  .btn { width: 100%; justify-content: center; }
  .hero-cta { flex-direction: column; }
}
