:root {
  --background: #fff;
  --text: #111827;
  --muted: #7b8595;
  --line: #e5e9ef;
  --accent: #0868ff;
  --accent-tint: #edf4ff;
  --gutter: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Noto Sans TC", "PingFang TC", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, main { max-width: 1600px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.header-inner { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 23px; font-weight: 750; letter-spacing: -.04em; }
.brand svg { width: 26px; height: 28px; }
nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
nav a { padding: 7px 0; }
nav button { border: 0; padding: 7px 0; background: transparent; color: var(--muted); }
nav [aria-pressed="true"] { color: var(--accent); border-bottom: 2px solid var(--accent); }
main { padding-top: 17px; padding-bottom: 40px; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1 { margin: 0; font-size: 40px; line-height: 1.3; font-weight: 780; letter-spacing: -.045em; }
.intro p { margin: 5px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.intro .updated { font-size: 12px; white-space: nowrap; letter-spacing: .01em; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 13px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 14px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.tabs button { flex-shrink: 0; white-space: nowrap; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 19px 27px 15px; color: var(--muted); font-size: 15px; font-weight: 650; }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.search { height: 36px; width: 295px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; padding: 0 12px; }
.search svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.7; flex-shrink: 0; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 14px; outline: none; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.source-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.source-filters button { min-height: 34px; padding: 5px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #5e6879; font-size: 14px; }
.source-filters button[aria-pressed="true"] { border-color: #6b9cff; color: var(--accent); background: var(--accent-tint); font-weight: 600; }
.media-section { margin-top: 24px; }
.section-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 13px; min-width: 0; }
.section-heading h2 { margin: 0; flex-shrink: 0; font-size: 25px; line-height: 1.3; font-weight: 750; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.section-heading::after { content: ""; height: 1px; background: #dce2e9; flex: 1; }
.poster-rail { display: flex; gap: 18px; overflow-x: auto; padding: 0 0 9px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #d5dce6 transparent; }
.media-card { display: block; flex: 0 0 calc((100% - 108px) / 7); min-width: 0; border: 0; background: transparent; text-align: left; padding: 0; scroll-snap-align: start; }
.poster { width: 100%; aspect-ratio: 4 / 5; border-radius: 6px; overflow: hidden; position: relative; background: #f0f3f7; }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 160ms ease; }
.media-card:hover .poster img { transform: scale(1.025); }
.poster-missing { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: #7b8595; font-size: 12px; text-align: center; }
.card-title { margin: 8px 0 3px; min-height: 20px; line-height: 1.4; font-size: 14px; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-meta { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.weekdays { display: flex; gap: 20px; margin: -2px 0 13px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.weekdays button { flex-shrink: 0; padding: 4px 12px 8px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; }
.weekdays button[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.message { padding: 60px 0; color: var(--muted); text-align: center; }
.error { text-align: left; color: #b42318; }
footer { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 15px; color: var(--muted); font-size: 12px; line-height: 1.6; }
footer p { margin: 3px 0; }
dialog { width: min(800px, calc(100% - 40px)); max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 14px; padding: 36px; color: var(--text); overflow-y: auto; }
dialog::backdrop { background: rgb(15 23 42 / 35%); }
.close-dialog { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; }
.close-dialog svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.7; }
.detail-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; }
.detail-layout .poster { aspect-ratio: 2 / 3; }
.detail-layout .poster img { object-fit: contain; }
.detail-title { margin: 0 0 8px; font-size: 27px; line-height: 1.35; letter-spacing: -.03em; }
.original-title { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0; }
.facts { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; font-size: 13px; margin: 20px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.overview { font-size: 14px; line-height: 1.85; white-space: pre-line; }
.source-link { display: inline-flex; align-items: center; margin-top: 12px; color: var(--accent); font-size: 14px; }
.cross-references { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 17px; }
.cross-references h3 { margin: 0 0 6px; font-size: 16px; }
.cross-references p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.candidate { display: block; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 10px 12px; margin-top: 8px; width: 100%; text-align: left; font-size: 13px; }
.candidate span { color: var(--muted); margin-left: 8px; font-size: 12px; }
.explorer-top { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 30px; }
.catalog-label { display: grid; gap: 8px; font-size: 12px; color: var(--muted); min-width: 280px; }
select { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); padding: 10px 34px 10px 12px; max-width: 100%; }
.catalog-label select { font-size: 16px; font-weight: 650; }
.breadcrumb { font-size: 12px; color: var(--accent); margin: 22px 0 16px; }
.native-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 20px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.native-filter { min-width: 0; }
.filter-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: #616c7f; }
.native-filter > select { display: block; width: 100%; height: 42px; font-size: 13px; }
select:disabled { color: var(--muted); background: #f0f3f7; }
.range-inputs { display: flex; align-items: center; gap: 6px; height: 42px; }
.range-inputs input { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px; font-size: 13px; background: #fff; }
.range-inputs span { color: var(--muted); }
.multi-picker { position: relative; }
.multi-picker > summary { display: block; cursor: pointer; list-style: none; height: 42px; padding: 11px 28px 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.multi-picker > summary::after { content: "⌄"; position: absolute; right: 12px; top: 9px; color: var(--muted); }
.multi-picker > summary::-webkit-details-marker { display: none; }
.multi-picker[open] > summary { border-color: #8ab3ff; color: var(--accent); }
.multi-panel { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; min-width: 250px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgb(15 23 42 / 12%); }
.multi-panel select, .multi-panel > input { display: block; width: 100%; font-size: 12px; margin-bottom: 10px; padding: 8px; }
.multi-panel > input { border: 1px solid var(--line); border-radius: 5px; }
.multi-panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 12px; }
.multi-panel-top button { border: 0; border-radius: 4px; color: var(--accent); background: var(--accent-tint); padding: 5px 10px; font-size: 12px; }
.multi-rule { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.multi-options { max-height: 280px; overflow-y: auto; }
.multi-option { display: flex; align-items: center; gap: 9px; padding: 8px 3px; cursor: pointer; font-size: 13px; }
.multi-option input { accent-color: var(--accent); }
.multi-option small { margin-left: auto; color: var(--muted); font-size: 11px; }
.selection-bar { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 14px 0 28px; }
.selected-filters { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; }
.filter-chip { border: 1px solid #d4e3ff; border-radius: 6px; padding: 5px 9px; color: var(--accent); background: var(--accent-tint); text-align: left; overflow-wrap: anywhere; }
.clear-filters { flex-shrink: 0; border: 0; background: transparent; color: var(--muted); padding: 4px 0; font-size: 12px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.results-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.03em; }
.sort-label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.sort-label select { font-size: 12px; padding-top: 8px; padding-bottom: 8px; }
.coverage { margin: 11px 0 22px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.source-cards { margin: -8px 0 24px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.source-cards summary { cursor: pointer; color: #58657a; }
.source-cards p { color: var(--muted); }
#native-source-card-list { display: flex; flex-wrap: wrap; gap: 12px 20px; }
#native-source-card-list a { color: var(--accent); }
.catalog-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 18px; row-gap: 28px; }
.catalog-grid .media-card { width: 100%; }
.native-detail { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.native-detail summary { cursor: pointer; color: var(--muted); }
.native-detail .facts { margin: 14px 0; grid-template-columns: 70px minmax(0, 1fr); }
.native-detail dd { font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  h1 { font-size: 35px; }
  .media-card { flex-basis: calc((100% - 72px) / 5); }
  .tabs button { padding-left: 20px; padding-right: 20px; }
  .native-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  :root { --gutter: 20px; }
  .header-inner { height: 58px; }
  .brand { font-size: 21px; }
  .brand svg { width: 23px; }
  nav { font-size: 12px; gap: 17px; }
  main { padding-top: 24px; }
  .intro { display: block; }
  h1 { font-size: 30px; letter-spacing: -.045em; }
  .intro p { font-size: 13px; margin-top: 8px; }
  .intro .updated { font-size: 11px; margin-top: 13px; }
  .controls { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 4px; margin-top: 18px; }
  .search { width: 100%; height: 39px; }
  .tabs { justify-content: space-between; gap: 0; }
  .tabs button { flex: 0 0 auto; padding: 16px 8px 12px; font-size: 14px; }
  .source-filters { gap: 7px; margin-top: 14px; }
  .source-filters button { padding: 5px 12px; font-size: 12px; min-height: 32px; }
  .media-section { margin-top: 26px; }
  .section-heading { gap: 12px; align-items: baseline; margin-bottom: 12px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { font-size: 10px; }
  .poster-rail { gap: 13px; }
  .media-card { flex-basis: 132px; }
  .card-title { font-size: 13px; }
  .card-meta { font-size: 11px; }
  .weekdays { gap: 2px; }
  .weekdays button { padding-left: 9px; padding-right: 9px; font-size: 12px; }
  dialog { padding: 34px 20px 24px; width: calc(100% - 24px); }
  .detail-layout { grid-template-columns: 105px minmax(0, 1fr); gap: 17px; }
  .detail-title { font-size: 21px; }
  .facts { grid-template-columns: 38px minmax(0, 1fr); font-size: 12px; margin: 15px 0; }
  .overview, .cross-references { grid-column: 1 / -1; }
  .explorer-top { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
  .catalog-label { min-width: 0; }
  .catalog-label select { width: 100%; }
  .breadcrumb { margin-top: 18px; }
  .native-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; padding: 15px; }
  .multi-panel { position: fixed; top: 30%; left: 20px; right: 20px; min-width: 0; box-shadow: 0 0 0 100vmax rgb(15 23 42 / 30%); }
  .multi-options { max-height: 35dvh; }
  .selection-bar { gap: 10px; margin-bottom: 22px; }
  .results-heading { align-items: start; flex-direction: column; gap: 12px; }
  .results-heading h2 { font-size: 21px; }
  .coverage { font-size: 11px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
