/* Shared shell and homepage, adapted from the current mini-program artwork. */
.ui-icon { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; vertical-align: middle; }
.nav-icon { width: 27px; height: 27px; object-fit: contain; flex-shrink: 0; }
.brand { font-weight: 800; letter-spacing: .2px; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; }
.nav-item { gap: 12px; border-radius: 11px; min-height: 44px; }
.nav-item.active { background: rgba(249,115,22,.12); color: var(--brand); }
.nav-group-title { font-weight: 700; letter-spacing: 1px; }
.app-footer { color: var(--text-2); }
.footer-brand-name { font-size: 15px; font-weight: 750; color: var(--text); margin-top: 8px; }
.footer-mark { display: inline-flex; width: 34px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg-soft); color: var(--text-2); font-weight: 900; font-size: 13px; }
.footer-ver { display: block; margin: 6px 0 12px; color: var(--text-2); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.footer-disclaimer { max-width: 430px; margin: 0 auto; font-size: 11px; color: var(--text-2); line-height: 1.8; }
.footer-anti-addiction { max-width: 430px; margin: 4px auto 0; font-size: 10px; color: var(--text-2); line-height: 1.8; }
.footer-beian a { color: var(--text-2); }
.recent-setting-switch { appearance: none; position: relative; width: 46px; height: 26px; border-radius: 20px; background: var(--text-3); cursor: pointer; flex-shrink: 0; transition: background .15s; }
.recent-setting-switch:before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; transition: transform .15s; }
.recent-setting-switch:checked { background: var(--brand); }
.recent-setting-switch:checked:before { transform: translateX(20px); }
.recent-setting-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

#homePage { padding-top: 8px; }
.home-hero { position: relative; overflow: hidden; border-radius: 24px; color: #fff; background: radial-gradient(ellipse at 100% 0,rgba(249,115,22,.26),transparent 55%),linear-gradient(135deg,#171820,#24212a 60%,#3a251c); box-shadow: 0 12px 36px rgba(15,23,42,.16); }
.home-hero-grid { position: absolute; inset: 0 -5% 0 42%; transform: skewX(-14deg); opacity: .12; background: repeating-linear-gradient(90deg,transparent 0,transparent 40px,rgba(255,255,255,.3) 41px,transparent 42px); }
.home-hero-content { position: relative; padding: 34px 38px; }
.home-hero-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 23px; font-size: 11px; font-weight: 700; letter-spacing: 2.6px; color: #bbb7ba; }
.home-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: #f97316; color: #fff; font-weight: 900; font-size: 12px; letter-spacing: -1px; transform: skewX(-7deg); box-shadow: 0 4px 16px #f9731633; }
.home-hero h1 { font-size: clamp(25px,3.2vw,38px); line-height: 1.3; letter-spacing: .4px; font-weight: 850; }
.home-hero h1 span { color: #fb923c; }
.home-hero p { color: #c0b8bc; font-size: 14px; margin-top: 12px; }
.home-hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 27px; }
.home-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #ffffff22; background: #ffffff0d; border-radius: 11px; min-height: 42px; color: white; padding: 8px 16px; font-size: 13px; font-weight: 650; transition: background .15s; }
.home-action:hover { background: #ffffff22; }
.home-support { border-color: #f9731666; background: #f973161c; }
.home-action-square { width: 42px; padding: 8px; }
.home-build { margin-left: auto; text-align: right; }
.home-build span { display: block; font-size: 9px; letter-spacing: 1.5px; color: #b8acb4; }
.home-build strong { font: 700 13px ui-monospace,Consolas,monospace; letter-spacing: .5px; color: #e1d8df; }
.home-section { margin-top: 28px; }
.home-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.home-eyebrow { display: block; color: var(--text-3); font-size: 9px; font-weight: 800; letter-spacing: 2px; line-height: 1.4; margin-bottom: 4px; }
.home-section-heading h2 { font-size: 19px; line-height: 1.3; font-weight: 800; letter-spacing: .2px; }
.home-section-heading a,.home-section-count { font-size: 11px; color: var(--text-2); }
.home-section-heading a:hover { color: var(--brand); }
.home-status-panel { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow); }
.home-status-row { display: flex; align-items: center; width: 100%; gap: 14px; padding: 18px 20px; border: 0; background: transparent; color: var(--text); text-align: left; }
.home-status-row + .home-status-row { border-top: 1px solid var(--line); }
button.home-status-row:hover,a.home-status-row:hover { background: var(--bg-soft); }
.home-status-copy { flex: 1; min-width: 0; }
.home-status-copy strong { display: block; font-size: 14px; font-weight: 750; }
.home-status-copy > span { display: block; color: var(--text-2); margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.home-status-row .status-dot,.home-patch-accent,.home-stream-accent { width: 3px; height: 26px; flex-shrink: 0; border-radius: 8px; box-shadow: none; background: #f97316; }
#compDot { background: #a78bfa; }
.home-patch-accent { background: #34b399; }
.home-stream-accent { background: #f43f5e; }
.home-status-chevron { color: var(--text-3); font-size: 22px; line-height: 1; }
.home-status-row .banner-tag { flex-shrink: 0; padding: 5px 10px; font-size: 10px; color: #b45309; background: #f9731614; border-radius: 20px; }
#compBanner .banner-tag { color: #8b5cf6; background: #8b5cf614; }
#patchBanner .banner-tag { color: #15805d; background: #10b98114; }
.home-match-subhead { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 12px; color: var(--brand); }
.home-match-subhead h3 { font-size: 13px; font-weight: 700; }
.home-match-subhead .status-dot { background: var(--brand); }
#homePage #liveList,#homePage #upcomingList { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#homePage .match-card { margin: 0; border-color: #f9731629; box-shadow: none; padding: 15px; border-radius: 14px; }
#homePage .match-card:only-child { grid-column: 1 / -1; }
#homePage .match-card.live { border-color: #ef44444d; }
#homePage .match-meta { justify-content: space-between; font-size: 11px; }
#homePage .team-name { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
#homePage .match-center { min-width: 46px; }
#homePage .match-team.right { flex-direction: row-reverse; }
#homePage .countdown-tag { margin-left: auto; }
.home-expand { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px; border-radius: 10px; border: 1px solid #f9731629; color: var(--brand); background: #f9731608; font-size: 12px; }
.home-tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.home-tool-card { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 102px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-card); box-shadow: 0 3px 12px #0f172a0b; color: var(--text); transition: transform .15s,box-shadow .15s,border-color .15s; }
.home-tool-card:hover { transform: translateY(-2px); border-color: #f9731655; box-shadow: 0 6px 18px #0f172a12; }
.home-tool-card:active { transform: scale(.985); }
.home-tool-icon { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.home-tool-copy { min-width: 0; flex: 1; }
.home-tool-name { display: flex; align-items: center; gap: 4px; font-weight: 750; font-size: 15px; line-height: 1.35; }
.home-tool-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.6; margin-top: 5px; color: var(--text-2); }
.home-tool-badge { font-size: 8px; color: #fff; background: #f97316; padding: 2px 4px; border-radius: 4px; flex-shrink: 0; }
.home-tool-arrow { flex-shrink: 0; color: var(--text-3); font-size: 22px; font-weight: 300; }
.home-recent-actions { display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--text-2); }
.home-close { display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; padding: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; }
.home-close .ui-icon { width: 15px; height: 15px; }
.home-recent-grid { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; }
.home-recent-item { display: flex; flex-direction: column; align-items: center; gap: 9px; color: var(--text-2); font-size: 11px; padding: 14px 4px; border: 1px solid var(--line); background: var(--bg-card); border-radius: 13px; text-align: center; }
.home-recent-item:hover { border-color: #f9731677; }
.home-recent-icon { width: 36px; height: 36px; object-fit: contain; }
.home-modal-heading { display: flex; align-items: center; gap: 12px; margin: 4px 24px 20px 0; }
.home-modal-heading h2 { font-size: 19px; font-weight: 800; }
.home-modal-heading .ui-icon { width: 30px; height: 30px; }
.home-announcement-icon { width: 30px; height: 26px; overflow: hidden; flex-shrink: 0; }
.home-support-copy { color: var(--text-2); font-size: 13px; line-height: 1.8; }
.home-support-qr { width: 200px; height: 200px; object-fit: contain; display: block; margin: 20px auto; border-radius: 14px; }
html[data-theme=dark] .home-tool-card { box-shadow: 0 4px 16px #0004; }
html[data-theme=dark] .home-status-row .banner-tag { color: #fdba74; }
html[data-theme=dark] #compBanner .banner-tag { color: #c4b5fd; }
html[data-theme=dark] #patchBanner .banner-tag { color: #6ee7b7; }

@media(min-width:1024px) {
  .main-content,.app-footer { width: calc(100% - 220px); max-width: 1160px; margin-left: max(220px,calc((100vw + 220px - 1160px) / 2)); margin-right: auto; }
  .main-content { padding-top: calc(var(--topbar-h) + 20px); }
}
@media(max-width:1023px) {
  .home-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-tool-wide { grid-column: 1 / -1; }
  .home-recent-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media(max-width:560px) {
  .home-hero { border-radius: 19px; }
  .home-hero-content { padding: 23px 21px; }
  .home-hero-meta { font-size: 9px; gap: 9px; margin-bottom: 20px; letter-spacing: 2px; }
  .home-mark { width: 27px; height: 27px; font-size: 11px; }
  .home-hero h1 { font-size: clamp(22px,6vw,27px); }
  .home-hero p { font-size: 11px; line-height: 1.8; }
  .home-hero-actions { gap: 8px; margin-top: 22px; }
  .home-action { min-height: 36px; padding: 7px 10px; font-size: 11px; gap: 6px; }
  .home-action-square { width: 36px; padding: 7px; }
  .home-action .ui-icon { width: 20px; height: 20px; }
  .home-build span { font-size: 8px; letter-spacing: .8px; }
  .home-build strong { font-size: 11px; }
  .home-section { margin-top: 24px; }
  .home-section-heading h2 { font-size: 17px; }
  .home-status-row { padding: 16px 13px; gap: 10px; }
  .home-status-copy strong { font-size: 12px; }
  .home-status-copy > span { font-size: 10px; }
  .home-status-row .banner-tag { padding: 4px 7px; font-size: 9px; }
  .home-tool-grid { gap: 9px; }
  .home-tool-card { gap: 8px; min-height: 94px; padding: 13px 10px; border-radius: 12px; }
  .home-tool-icon { width: 30px; height: 36px; }
  .home-tool-name { font-size: 13px; }
  .home-tool-description { font-size: 10px; line-height: 1.55; }
  .home-tool-arrow { font-size: 18px; }
  .home-tool-badge { display: none; }
  .home-recent-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .home-recent-item { font-size: 10px; padding: 12px 3px; }
  #homePage #upcomingList,#homePage #liveList { gap: 9px; }
  #homePage .match-card { padding: 11px 9px; }
  #homePage .match-row { gap: 6px; }
  #homePage .match-team,#homePage .match-team.right { flex-direction: column; gap: 6px; text-align: center; }
  #homePage .match-team.right img { order: -1; }
  #homePage .team-name { font-size: 11px; }
  #homePage .team-logo { width: 26px; height: 26px; }
  #homePage .match-meta { flex-wrap: wrap; row-gap: 5px; font-size: 9px; }
  #homePage .countdown-tag { font-size: 9px; }
}
@media(prefers-reduced-motion:reduce) {
  .home-tool-card,.home-action,.recent-setting-switch:before { transition: none; }
}
