/* 烟灰：移动端应用风格 */
:root { --k: #4a4a48; --ink: #232321; --t: #5a5a57; --m: #a09f9b; --l: #e7e5e1; --bg: #f2f1ef; --ok: #2e8b57; --live: #d9483b; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--t); font: 14px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
[hidden], .yh-hide { display: none !important; }
.yh { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

.yh-bar { position: sticky; top: 0; z-index: 5; padding: 12px 16px; background: rgba(242,241,239,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); }
.yh-main { padding: 4px 12px 10px; }
.yh-h1 { margin: 18px 0 4px; font-size: 12px; font-weight: 400; color: var(--m); text-align: center; }
.yh-title { margin: 6px 4px 0; font-size: 22px; color: var(--ink); }
.yh-title small { margin-left: 8px; font-size: 13px; font-weight: 400; color: var(--m); }
.yh-sub { margin: 0 4px 12px; color: var(--m); font-size: 13px; }
.yh-day { margin: 16px 4px 8px; font-size: 13px; font-weight: 600; color: var(--m); }

.yh-seg { display: flex; padding: 3px; margin: 4px 0 12px; background: #e4e2de; border-radius: 9px; }
.yh-seg button { flex: 1; padding: 6px; border: 0; border-radius: 7px; background: none; font: inherit; color: var(--t); cursor: pointer; }
.yh-seg button.yh-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.yh-list { display: flex; flex-direction: column; gap: 8px; }
.it { display: block; padding: 10px 14px 12px; background: #fff; border-radius: 12px; }
.it:active { background: #fafaf9; }
.it-hd { display: flex; gap: 8px; font-size: 12px; color: var(--m); }
.it-hd span:first-child { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.it-st { color: var(--m); }
.it-st-live { color: var(--live) !important; font-weight: 600; }
.it-bd { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; margin-top: 6px; }
.it-team { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; min-width: 0; }
.it-team span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.it-team--r { justify-content: flex-end; text-align: right; }
.it-team img { flex: none; object-fit: contain; }
.it-team i, .yh-head__vs i { flex: none; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg); font-style: normal; font-size: 11px; color: var(--t); }
.it-sc { text-align: center; font-size: 16px; color: var(--m); font-variant-numeric: tabular-nums; }
.it-live .it-sc { color: var(--live); }
.blink { animation: yhb 2s; }
@keyframes yhb { 0%, 50% { color: #fff; background: var(--live); border-radius: 4px; } }

.yh-more { display: block; margin-top: 10px; padding: 11px; border-radius: 12px; background: var(--k); color: #fff; text-align: center; }
.yh-empty { margin: 0; padding: 30px 10px; background: #fff; border-radius: 12px; text-align: center; color: var(--m); }
.yh-empty--end { color: var(--live); }
.yh-pg { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.yh-pg a { padding: 7px 16px; border-radius: 18px; background: #fff; color: var(--ink); }
.yh-pg span { color: var(--m); font-size: 13px; }

.yh-card { margin-bottom: 10px; padding: 14px; background: #fff; border-radius: 12px; }
.yh-head { text-align: center; }
.yh-head__lg { margin: 0; font-size: 12px; color: var(--m); }
.yh-head__vs { display: grid; grid-template-columns: 1fr 110px 1fr; align-items: center; margin: 12px 0 6px; }
.yh-head__vs > div { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); min-width: 0; }
.yh-head__vs > div span { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.yh-head__vs img { object-fit: contain; }
.yh-head__vs i { width: 44px; height: 44px; font-size: 18px; }
.yh-head__c b { font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums; }
.yh-head__c em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--m); }
.yh-head__t { margin: 0; font-size: 12px; color: var(--m); }
.yh-head + .yh-h1 { margin: 0 0 10px; }

.yh-tv { position: relative; aspect-ratio: 16/9; margin: -14px -14px 0; background: #111; border-radius: 12px 12px 0 0; overflow: hidden; }
.yh-tv video, .yh-tv iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yh-tv-tip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--m); }
.yh-chs { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; }
.yh-ch { flex: none; padding: 7px 16px; border: 0; border-radius: 18px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.yh-ch-on { background: var(--k); color: #fff; }
.yh-ch--ext::after { content: " ↗"; }
.yh-cells { list-style: none; margin: 0; padding: 0; }
.yh-cells li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--l); color: var(--ink); }
.yh-cells li:last-child { border-bottom: 0; }
.yh-cells span { color: var(--m); }
.yh-cells em { font-style: normal; }
.yh-404 { margin-top: 30px; padding: 40px 20px; text-align: center; }

.yh-foot { padding: 20px 16px 6px; text-align: center; font-size: 11px; color: var(--m); }
.yh-foot p { margin: 3px 0; }

.yh-tab { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 6; width: 100%; max-width: 640px; display: flex; padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--l); }
.yh-tab a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; color: var(--m); }
.yh-tab a.yh-on { color: var(--ink); font-weight: 600; }
.yh-i { width: 22px; height: 22px; border: 2px solid currentColor; }
.yh-i--home { border-radius: 4px 4px 6px 6px; clip-path: polygon(50% 0, 100% 40%, 100% 100%, 0 100%, 0 40%); }
.yh-i--fb { border-radius: 50%; }
.yh-i--bb { border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.yh-seg a { flex: 1; padding: 6px; border-radius: 7px; text-align: center; color: var(--t); }
.yh-seg a.yh-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.yh-more--alt { background: #fff; color: var(--ink); }
.it-ns { margin-left: auto; padding: 0 6px; border-radius: 4px; background: var(--bg); color: var(--m); font-size: 11px; }
.yh-link { display: inline-block; margin-top: 8px; color: var(--ink); font-size: 13px; }
/* 比分列表：紧凑行，和直播卡片区分 */
.sr-list { background: #fff; border-radius: 12px; overflow: hidden; }
.sr { display: flex; gap: 12px; padding: 10px 14px; color: var(--ink); }
.sr + .sr { border-top: 1px solid var(--l); }
.sr-t { flex: none; width: 46px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; border-right: 1px solid var(--l); padding-right: 10px; }
.sr-t b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sr-t em { font-style: normal; font-size: 11px; color: var(--m); }
.sr-t em.sr-hot { color: var(--live); font-weight: 600; }
.sr-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sr-lg { font-size: 11px; color: var(--m); }
.sr-lg i { margin-left: 6px; padding: 0 5px; border-radius: 3px; background: var(--bg); font-style: normal; }
.sr-r { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--t); }
.sr-n { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sr-n img, .sr-n i { flex: none; width: 18px; height: 18px; border-radius: 50%; }
.sr-n i { display: inline-flex; align-items: center; justify-content: center; background: var(--bg); font-style: normal; font-size: 10px; color: var(--t); }
.sr-r b { flex: none; min-width: 22px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ink); }
.sr-win { color: var(--ink); font-weight: 600; }
.sr-live .sr-r b { color: var(--live); }
.sr-ex { font-size: 11px; color: var(--m); }
.sr-ex em { font-style: normal; font-variant-numeric: tabular-nums; }

/* 手机端：长队名不截断，换行完整显示 */
@media (max-width: 480px) {
  .it-team span, .yh-head__vs > div span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.3; }
}

/* 热门比赛标记（后台设为热门或属于热门联赛），手机上只显示火苗 */
.yh-fire { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; padding: 0 6px 0 4px; border-radius: 9px; background: linear-gradient(90deg, #ff8a1f, #ff3b30); color: #fff; font: normal 700 11px/17px -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; vertical-align: middle; white-space: nowrap; text-transform: none; animation: yh-fire-glow 1.8s ease-in-out infinite; }
.yh-fire::before { content: "🔥"; font-size: 11px; line-height: 1; }
@keyframes yh-fire-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 80, 30, .35); } 50% { box-shadow: 0 0 0 4px rgba(255, 80, 30, 0); } }
@media (max-width: 480px) {
  .yh-fire { padding: 0 3px; font-size: 0; gap: 0; margin-left: 2px; }
  .yh-fire::before { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .yh-fire { animation: none; } }

/* 热门比赛：火苗跳动；整行左侧一抹淡淡的火光缓慢明暗，叠在原有背景上，不改变原样式 */
.yh-fire::before { display: inline-block; transform-origin: 50% 85%; animation: yh-flicker 1.3s ease-in-out infinite; }
@keyframes yh-flicker {
  0%, 100% { transform: scale(1) rotate(-4deg); filter: brightness(1); }
  25% { transform: scale(1.1, 1.2) rotate(3deg); filter: brightness(1.2); }
  50% { transform: scale(.95, 1.04) rotate(-2deg); filter: brightness(.95); }
  75% { transform: scale(1.06, 1.14) rotate(4deg); filter: brightness(1.15); }
}
.yh-hotrow { animation: yh-ember 3.2s ease-in-out infinite; }
@keyframes yh-ember {
  0%, 100% { box-shadow: inset 3px 0 0 rgba(255, 98, 40, .7), inset 90px 0 70px -52px rgba(255, 140, 50, .16); }
  50% { box-shadow: inset 3px 0 0 rgba(255, 64, 30, .9), inset 130px 0 90px -60px rgba(255, 112, 40, .26); }
}
tr.yh-hotrow { animation: none; }
tr.yh-hotrow > td { animation: yh-ember-td 3.2s ease-in-out infinite; }
tr.yh-hotrow > td:first-child { box-shadow: inset 3px 0 0 rgba(255, 80, 30, .8); }
@keyframes yh-ember-td { 0%, 100% { background-color: rgba(255, 150, 60, .05); } 50% { background-color: rgba(255, 120, 40, .11); } }
@media (prefers-reduced-motion: reduce) {
  .yh-fire::before, .yh-hotrow, tr.yh-hotrow > td { animation: none; }
  .yh-hotrow { box-shadow: inset 3px 0 0 rgba(255, 98, 40, .7), inset 90px 0 70px -52px rgba(255, 140, 50, .16); }
}

/* 播放页球队名链接到球队搜索页 */
.yh-tlink { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.yh-tlink:hover { opacity: .8; border-bottom-style: solid; }
.sr-nolink { cursor: default; }
.sr-md { font-style: normal; font-size: 10px; line-height: 1.2; color: var(--m); }

/* 首页：日期选择 + 热门直播 + 赛事直播 */
.yh-main > .hd-dates { margin: 4px 0 6px; }
.yh-scope-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-right: 4px; }
.yh-scope-hd .yh-day { margin-right: 0; }
.it-hd .hd-lg:hover { color: var(--ink); }
.yh-crumb { margin: 4px 4px 10px; font-size: 12px; color: var(--m); }
/* 底部导航 5 项 */
.yh-tab a { min-width: 0; white-space: nowrap; }
.yh-i--sc { border-radius: 3px; background: linear-gradient(currentColor, currentColor) center / 2px 60% no-repeat; }

/* 热门标记：本模板专属样式（♨ 热门），覆盖上面通用的 🔥 热门；手机上只显示图标 */
.yh-fire { --yh-hot-lb: 11px; gap: 2px; font-size: 0; background: #5c4d43; color: #ffe8d6; border: 0; border-radius: 9px; animation: yh-hot-glow 1.8s ease-in-out infinite; }
.yh-fire::before { content: "♨"; display: inline-block; transform-origin: 50% 50%; animation: yh-hot-ic 1.6s ease-in-out infinite; }
.yh-fire::after { content: "热门"; font-size: var(--yh-hot-lb); line-height: 1; }
@keyframes yh-hot-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(92,77,67, .35); } 50% { box-shadow: 0 0 0 4px rgba(92,77,67, 0); } }
@keyframes yh-hot-ic { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@media (max-width: 480px) { .yh-fire { --yh-hot-lb: 0; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .yh-fire, .yh-fire::before { animation: none; } }

/* 比分列表用内置紧凑表格，配色跟主题 */
:root { --sc-ink: #232321; --sc-muted: #a09f9b; --sc-line: #e7e5e1; --sc-live: #d9483b; --sc-accent: #232321; --sc-on: #fff; --sc-chip: #f2f1ef; --sc-radius: 10px; }

/* 日期条吸顶：点日期跳转后仍能看到选中的是哪天 */
.hd-dates { position: sticky; top: 50px; z-index: 5; background: var(--bg); padding: 8px 0; }
[data-dgrp] { scroll-margin-top: 140px; }
