:root {
  color-scheme: dark;
  --background: #0c1117;
  --surface: #131b23;
  --surface-container: #18232d;
  --text: #e6edf3;
  --text-secondary: #a1b0ba;
  --primary: #8ee3c5;
  --primary-container: #183b36;
  --outline: #313e49;
  --detail-stage-height: min(56.25vw, 589.5px, 55dvh);
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background-image: linear-gradient(#ffffff04 1px, transparent 1px), linear-gradient(90deg, #ffffff04 1px, transparent 1px); background-size: 48px 48px; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: default; color: #697781; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
[hidden] { display: none !important; }
.view-detail .search-section, .view-detail .results-section { display: none; }
.view-sports .search-section, .view-sports .results-section { display: none; }
.view-detail .app-bar, .view-sports .app-bar { display: none; }
.view-detail .page, .view-sports .page { max-width: 1048px; padding: 0; }
html:has(body.view-detail), html:has(body.view-sports) { scroll-padding-top: calc(var(--detail-stage-height) + 12px); }
.media-section { padding: 0 0 56px; }
.media-section .text-button { margin-top: 0; }
.media-toolbar, .player-toolbar, .catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-media-stage { position: sticky; top: 0; z-index: 10; width: 100%; height: var(--detail-stage-height); overflow: hidden; background: #000; border-bottom: 1px solid var(--outline); isolation: isolate; }
.detail-media-stage video { display: none; width: 100%; height: 100%; object-fit: contain; background: #000; }
.detail-media-stage.has-video video { display: block; }
.detail-media-stage.has-video .detail-poster, .detail-media-stage.has-video .stage-play, .detail-media-stage.has-video .stage-placeholder { display: none; }
.stage-navigation { position: absolute; top: max(4px, env(safe-area-inset-top)); left: max(4px, env(safe-area-inset-left)); z-index: 2; margin: 0; }
.stage-navigation .stage-back { position: relative; width: 48px; height: 48px; min-width: 48px; padding: 0; border-radius: 50%; color: var(--text); background: transparent; }
.stage-back::before { content: ""; position: absolute; inset: 8px; z-index: -1; border-radius: inherit; background: #0c1117cc; }
.stage-navigation .stage-back:hover { background: #0c1117b3; }
.stage-navigation .stage-back:focus-visible { outline-offset: -4px; }
.stage-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; padding: 0 24px; }
.stage-play:disabled { color: var(--text-secondary); background: var(--surface-container); }
.stage-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px 64px; margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.8; text-align: center; }
.detail-body { padding: 20px 24px 0; }
.text-button { display: inline-flex; align-items: center; justify-content: center; }
.media-notice { color: var(--text-secondary); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.media-notice:empty { display: none; }
.detail-hero { padding-bottom: 16px; }
.detail-poster { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; color: var(--text-secondary); }
.detail-poster img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.detail-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0003, #0008); }
.detail-poster > span { align-self: end; padding-bottom: 20px; font-size: 13px; letter-spacing: 3px; }
.detail-eyebrow { color: var(--primary); font-size: 12px; letter-spacing: 1px; margin: 0 0 6px; }
.detail-heading h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 500; margin-bottom: 8px; overflow-wrap: anywhere; }
#detail-title:focus { outline: none; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 12px -12px 0; }
.detail-actions .text-button { padding: 0 12px; }
.player-section { padding-bottom: 20px; }
.player-toolbar { margin-top: 0; }
#now-playing { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
.episode-navigation { display: flex; flex-shrink: 0; }
.episode-navigation .text-button { padding: 0 12px; }
.player-actions { display: flex; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.cast-button { gap: 8px; padding: 0 14px; flex-shrink: 0; }
.cast-button[aria-pressed="true"] { background: var(--primary-container); }
.cast-status { color: var(--primary); }
.cast-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid var(--outline); border-radius: 12px; background: var(--surface); padding: 4px 8px; }
.cast-controls .text-button { padding: 0 12px; }
.cast-seek { flex: 1 1 100px; min-width: 0; accent-color: var(--primary); }
.cast-time { color: var(--text-secondary); font: 12px var(--mono); }
.cast-dialog h2 { margin: 0; font-size: 20px; font-weight: 500; }
.cast-dialog .auth-status { min-height: 0; }
.cast-options { display: grid; gap: 8px; margin: 20px 0; }
.cast-option { display: flex; flex-direction: column; gap: 6px; text-align: left; min-height: 68px; padding: 14px 16px; border: 1px solid var(--outline); border-radius: 12px; color: var(--text); background: var(--surface-container); }
.cast-option small { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.cast-option:hover:not(:disabled) { border-color: var(--primary); }
.cast-option:disabled { opacity: .55; }
.cast-url { width: 100%; min-width: 0; margin-top: 8px; padding: 12px; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface-container); color: var(--text-secondary); font: 12px var(--mono); }
.cast-url:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
.catalog-section { border-top: 1px solid var(--outline); padding-top: 20px; }
.catalog-head h2 { font-size: 18px; font-weight: 500; margin: 0; }
.playback-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(144px, 1fr)); gap: 8px; margin-top: 12px; }
.line-button, .episode-button { min-height: 44px; border: 1px solid var(--outline); background: var(--surface); color: var(--text-secondary); border-radius: 10px; padding: 10px 16px; transition: border-color .15s, background .15s; }
.line-button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; min-width: 0; min-height: 72px; border-radius: 12px; text-align: left; }
.line-name { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.line-source { font-size: 11px; line-height: 1.5; color: var(--text-secondary); overflow-wrap: anywhere; }
.line-button[aria-pressed="true"] .line-source { color: var(--primary); opacity: .8; }
.line-button:hover, .episode-button:hover { border-color: var(--primary); color: var(--text); }
.line-button[aria-pressed="true"], .episode-button[aria-pressed="true"] { background: var(--primary-container); color: var(--primary); border-color: #497d70; }
.line-warning { font-size: 11px; color: #efc584; }
.line-status { margin: 16px 0; font-size: 12px; line-height: 1.8; color: var(--text-secondary); }
.episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 420px; overflow: auto; padding: 4px; margin: -4px; }
.episode-button { font-size: 13px; overflow-wrap: anywhere; }
.synopsis { margin-top: 32px; border-top: 1px solid var(--outline); padding: 24px 0; }
.synopsis summary { cursor: pointer; font-size: 16px; }
.synopsis p { color: var(--text-secondary); font-size: 14px; line-height: 2; margin: 16px 0 0; }
@media (max-width: 560px) {
  .detail-heading h1 { font-size: 22px; }
  .detail-heading .result-actors { -webkit-line-clamp: 2; }
  .detail-actions { margin-top: 14px; }
  .detail-actions .text-button { font-size: 12px; padding: 0 8px; }
  .player-toolbar { flex-wrap: wrap; }
  .episodes { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}
.page { max-width: 848px; min-height: 100svh; padding: 0 24px; margin: 0 auto; }
.app-bar { display: flex; align-items: center; height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 48px; min-width: 0; font-size: 20px; line-height: 1.4; font-weight: 500; letter-spacing: .3px; border-radius: 12px; }
.brand-icon { flex-shrink: 0; color: var(--primary); }
.shortcut-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; margin-left: auto; border: 0; border-radius: 14px; background: transparent; color: var(--text-secondary); transition: background .15s, color .15s; }
.shortcut-button:hover { background: var(--surface-container); color: var(--primary); }
.shortcut-button:active { background: var(--primary-container); }
.shortcut-button kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 28px; border: 1px solid var(--outline); border-radius: 6px; background: var(--surface); font: 16px/1 var(--mono); }
.search-section { padding: 38px 0 32px; }
h1 { font-size: 28px; font-weight: 400; line-height: 1.4; margin: 0 0 24px; letter-spacing: 0; }
.search-box { display: flex; align-items: center; gap: 16px; min-height: 68px; border: 1px solid var(--outline); border-radius: 24px; background: var(--surface-container); padding: 7px 8px 7px 22px; transition: background .15s, border-color .15s, box-shadow .15s; }
.search-box:hover { background: #1b2934; border-color: #465662; }
.search-box:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px #8ee3c50d, 0 0 24px #8ee3c509; }
.search-icon { flex-shrink: 0; color: var(--text-secondary); }
.search-prefix { flex-shrink: 0; width: 24px; color: var(--primary); font: 22px/28px var(--mono); letter-spacing: -3px; user-select: none; }
#keyword { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; line-height: 28px; padding: 6px 0; }
#keyword::placeholder { color: var(--text-secondary); opacity: 1; }
#keyword::-webkit-search-cancel-button { cursor: pointer; }
.search-button { display: flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-width: 96px; min-height: 52px; border: 0; border-radius: 28px; color: #09231a; background: var(--primary); font-size: 14px; font-weight: 600; line-height: 20px; letter-spacing: .1px; transition: background .15s, box-shadow .15s; }
.search-button span { font: 16px/1 var(--mono); opacity: .75; }
.search-button:hover { background: #a5edd5; box-shadow: 0 2px 8px #8ee3c515; }
.search-button:active { background: #74d2b1; box-shadow: none; }
.results-section { padding-bottom: 32px; }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 48px; margin-bottom: 16px; }
.result-summary { font-family: var(--mono); font-size: 14px; line-height: 1.6; margin: 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.result-summary strong { font-weight: 500; color: var(--text); }
.sort-controls { display: flex; flex-shrink: 0; border: 1px solid var(--outline); border-radius: 26px; overflow: hidden; }
.sort-controls button { position: relative; min-width: 64px; min-height: 48px; border: 0; background: transparent; padding: 0 15px; color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: background .15s; }
.sort-controls button + button { border-left: 1px solid var(--outline); }
.sort-controls button:hover { background: #e6edf30a; }
.sort-controls button:active { background: #e6edf314; }
.sort-controls button[aria-pressed="true"] { color: var(--primary); background: var(--primary-container); }
.sort-controls button[aria-pressed="true"]:hover { background: #204c43; }
.sort-controls button:focus-visible { z-index: 1; outline-offset: -4px; border-radius: 24px; }
.partial-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 18px; margin: 0 0 16px; border: 1px solid #31534b; background: #132b27; color: #b4d9cd; border-radius: 16px; font-size: 13px; line-height: 1.6; }
.partial-notice p { margin: 0; overflow-wrap: anywhere; }
.partial-notice button, .text-button { flex-shrink: 0; min-width: 64px; min-height: 48px; border: 0; border-radius: 24px; padding: 0 20px; background: transparent; color: var(--primary); font-size: 14px; font-weight: 500; transition: background .15s; }
.partial-notice button:hover, .text-button:hover { background: #8ee3c50a; }
.partial-notice button:active, .text-button:active { background: #8ee3c514; }
.results { display: grid; gap: 12px; padding: 0; list-style: none; margin: 0; }
.result { border: 1px solid #283540; background: var(--surface); border-radius: 16px; }
.favorite-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 0; }
.favorite-button svg { flex-shrink: 0; fill: none; }
.favorite-button[aria-pressed="true"] svg { fill: currentColor; }
.favorite-status { color: #efc584; }
.result-link, .result-body { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 20px; padding: 16px; border-radius: 15px; }
.result-link:hover { background: var(--surface-container); }
.result-link:hover .result-title { color: var(--primary); }
.poster { position: relative; display: flex; align-items: center; justify-content: center; width: 80px; height: 112px; overflow: hidden; border-radius: 8px; background: var(--surface-container); color: var(--text-secondary); }
.poster-fallback { font-size: 13px; letter-spacing: 1px; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.result-content { min-width: 0; }
.result-title { font-size: 18px; font-weight: 500; line-height: 1.5; margin: 0 0 7px; overflow-wrap: anywhere; }
.result-meta, .result-actors { font-size: 13px; line-height: 1.75; color: var(--text-secondary); margin: 4px 0 0; overflow-wrap: anywhere; }
.result-actors { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-update { color: var(--text-secondary); }
.status { text-align: center; padding: 48px 24px; border: 1px solid #283540; background: var(--surface); border-radius: 16px; }
.status p { font-size: 16px; line-height: 1.7; margin: 10px 0 0; }
.status .status-detail { font-size: 14px; color: var(--text-secondary); max-width: 440px; margin: 8px auto 0; overflow-wrap: anywhere; }
.status-indicator { display: inline-block; width: 28px; height: 28px; margin-bottom: 8px; border: 3px solid var(--primary-container); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
.text-button { margin-top: 16px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px 0 0; font-size: 13px; color: var(--text-secondary); }
.pagination button { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 104px; min-height: 48px; background: transparent; border: 0; border-radius: 24px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--primary); transition: background .15s; }
.pagination button:disabled { color: #697781; }
.pagination button:not(:disabled):hover { background: #8ee3c50a; }
.pagination button:not(:disabled):active { background: #8ee3c514; }
#page-label { text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.search-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search-shortcuts a { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 0 18px; border: 1px solid var(--outline); border-radius: 22px; background: var(--surface); color: var(--text-secondary); font-size: 13px; }
.search-shortcuts a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-container); }
.sports-section { padding: 0 0 40px; }
.sports-section .text-button { margin-top: 0; }
.sports-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.sports-heading > div { min-width: 0; }
.sports-heading h1 { font-size: clamp(20px, 3vw, 24px); font-weight: 500; margin: 0 0 4px; overflow-wrap: anywhere; }
.sports-heading h1:focus { outline: none; }
.sports-heading .result-meta { margin: 0; font-size: 12px; }
.sports-heading .text-button { padding: 0 14px; min-width: 48px; }
.sports-status { margin-bottom: 18px; }
.sports-status .text-button { margin-top: 12px; }
.sports-match-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 8px; margin-bottom: 20px; }
.sports-match-option { min-width: 0; min-height: 64px; padding: 10px 14px; gap: 3px; }
.sports-match-option .line-name { font-size: 13px; }
.sports-match-option .line-source { font-variant-numeric: tabular-nums; }
.sports-match-option.is-live .line-source { color: var(--primary); }
.sports-catalog-head { padding-top: 20px; border-top: 1px solid var(--outline); }
.sports-catalog-head .result-meta { margin-top: 0; }
.sports-line-groups { display: grid; gap: 16px; margin-top: 16px; }
.sports-line-group { min-width: 0; }
.sports-source-head { display: flex; align-items: baseline; gap: 8px; }
.sports-source-title { margin: 0; font-size: 13px; font-weight: 500; color: var(--text); }
.sports-source-count { font: 11px var(--mono); color: var(--text-secondary); }
.sports-source-lines { margin-top: 8px; }
.sports-line:disabled { opacity: .55; }
.sports-line:disabled:hover { border-color: var(--outline); color: var(--text-secondary); }
#sports-now-playing { margin-top: 0; }
.sports-recovery { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sports-recovery .text-button, #sports-external-play { padding: 0 14px; }
.nba-result .poster { background: var(--primary-container); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) {
  .page { padding: 0 20px; }
  .detail-body { padding: 18px 20px 0; }
  .app-bar { height: 72px; }
  .search-section { padding: 28px 0; }
  h1 { font-size: 26px; margin-bottom: 20px; }
  .search-box { min-height: 64px; gap: 12px; padding: 5px 6px 5px 16px; }
  .search-icon { width: 22px; height: 22px; }
  .search-prefix { width: 22px; font-size: 20px; }
  .search-button { min-width: 80px; min-height: 50px; gap: 7px; }
  .results-toolbar { align-items: center; flex-wrap: wrap; gap: 12px; }
  .result-summary { font-size: 13px; flex: 1 1 120px; }
  .sort-controls button { min-width: 52px; padding: 0 10px; }
  .result-link, .result-body { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .poster { width: 64px; height: 94px; border-radius: 8px; }
  .result-title { font-size: 16px; margin-bottom: 4px; }
  .result-meta, .result-actors { font-size: 12px; line-height: 1.7; }
  .partial-notice { gap: 8px; padding-left: 14px; }
  .partial-notice button { padding: 0 14px; }
  .pagination { gap: 8px; }
  .pagination button { min-width: 92px; padding: 0 8px; font-size: 13px; }
  #page-label { font-size: 12px; }
  .status { padding: 40px 18px; }
  .sports-match-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sports-source-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
