* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; color: #e8ecf1; background: radial-gradient(1200px 600px at 15% -10%, #1b2230 0%, #0d0f12 55%) #0d0f12; font: 14px/1.6 system-ui, "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a:hover { color: #ffd479; }
button { min-height: 40px; border: 1px solid #2f3742; border-radius: 8px; padding: 8px 12px; color: #e8ecf1; background: #151a21; cursor: pointer; font-weight: 600; }
button:hover { border-color: #5a6675; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid #ffc85c; outline-offset: 3px; }
input { min-height: 40px; border: 1px solid #2f3742; border-radius: 8px; padding: 8px 12px; color: #e8ecf1; background: #151a21; min-width: 0; }
input::placeholder { color: #6d7787; }
.site-header, main, footer { width: min(1500px, calc(100% - 48px)); margin: auto; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 74px; padding: 0 4px; background: #0d0f12e6; backdrop-filter: blur(10px); border-bottom: 1px solid #232a33; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 780; font-size: 21px; letter-spacing: -.5px; }
.brand-mark { width: 32px; height: 36px; display: grid; place-items: center; border: 1px solid #7f8b9c; color: #ffd479; font-family: Georgia, serif; font-size: 27px; transform: skew(-8deg); }
.brand small { display: block; margin-top: 4px; font-size: 8px; letter-spacing: 2.4px; color: #8d99a8; font-weight: 550; }
.header-right { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #93a0b0; }
.freshness { white-space: nowrap; }
.hero { padding: 34px 0 22px; }
.eyebrow { margin: 0; color: #93a0b0; font-size: 9px; letter-spacing: 2px; font-weight: 650; }
h1 { margin: 8px 0 10px; font-size: clamp(25px, 2.6vw, 38px); font-weight: 680; letter-spacing: -1px; }
.hero-copy { margin: 0; max-width: 760px; color: #a4b0bf; font-size: 13px; }
.hero-copy strong { color: #e8ecf1; }
.hero-stats { display: flex; gap: 34px; margin-top: 20px; }
.hero-stats strong { display: block; font-size: 24px; font-weight: 700; }
.hero-stats span { color: #93a0b0; font-size: 11px; }
.toolbar { position: sticky; top: 74px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; background: #0d0f12e6; backdrop-filter: blur(10px); border-bottom: 1px solid #232a33; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; font-size: 13px; background: #12171d; }
.tabs button[aria-selected=true] { background: #ffd479; border-color: #ffd479; color: #17130a; }
.tabs button span { font-size: 10px; color: #93a0b0; }
.tabs button[aria-selected=true] span { color: #3a3020; }
.toolbar-tools { display: flex; align-items: center; gap: 10px; }
.search-label { display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid #2f3742; border-radius: 8px; background: #151a21; color: #6d7787; }
.search-label input { border: 0; background: transparent; width: 190px; }
#count { color: #93a0b0; font-size: 11px; white-space: nowrap; }
.notice { margin: 14px 0 0; padding: 11px 14px; border-radius: 8px; font-size: 12px; border: 1px solid #2f3742; }
.notice.error { border-color: #6d3230; background: #2a1614; color: #ffbdb5; }
.notice.stale { border-color: #6b5522; background: #241d0e; color: #ffdc9a; }
.notice.info { border-color: #274054; background: #101c26; color: #a8cfe6; }
.wall { padding: 22px 0 8px; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px 18px; margin: 0; padding: 0; list-style: none; }
.card { min-width: 0; }
.card-button { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; font-weight: 500; }
.card-button:hover .art { border-color: #7c889a; transform: translateY(-2px); }
.art { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid #262e38; border-radius: 9px; background: linear-gradient(160deg, #191f28, #10141a); transition: transform .18s ease, border-color .18s ease; }
.art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity .25s ease; }
.art.loaded img { opacity: 1; }
.art-badge { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 7px; border-radius: 999px; background: #0b0e12cc; color: #cfd8e3; font-size: 10px; }
.placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #5d6779; font-size: 12px; letter-spacing: 1px; background: repeating-linear-gradient(135deg, #141a22 0 12px, #11161d 12px 24px); }
.art.failed .placeholder { color: #8a7a5c; }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 9px; font-size: 13px; line-height: 1.45; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; color: #8d99a8; font-size: 10px; }
.card-poster { padding: 1px 6px; border: 1px solid #2f3742; border-radius: 999px; }
.card-poster.missing { border-style: dashed; color: #6d7787; }
.empty { padding: 60px 20px; text-align: center; color: #93a0b0; border: 1px dashed #2f3742; border-radius: 12px; }
.empty-mark { display: block; font-size: 34px; color: #4c5768; }
.empty strong { display: block; margin: 12px 0 6px; color: #e8ecf1; font-size: 16px; }
.empty p { margin: 0 auto; max-width: 460px; font-size: 12px; }
.method { margin: 34px 0; border: 1px solid #232a33; border-radius: 12px; background: #10141a; }
.method summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; font-weight: 650; }
.method-caption { color: #93a0b0; font-size: 11px; font-weight: 500; }
.method-caption b { color: #ffd479; }
.method-body { padding: 0 16px 16px; color: #a4b0bf; font-size: 12px; }
.method-body a { color: #ffd479; text-decoration: underline; }
.method-warn { color: #ffdc9a; }
.method-note strong { color: #e8ecf1; }
.source-reports { display: grid; gap: 8px; margin: 12px 0; }
.source-report { padding: 10px 12px; border: 1px solid #232a33; border-radius: 8px; background: #12171d; }
.source-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.source-name { color: #e8ecf1; font-weight: 600; }
.source-status { font-size: 10px; padding: 1px 8px; border-radius: 999px; border: 1px solid #2f3742; }
.source-status.fresh { color: #a8e6bd; border-color: #2c5340; }
.source-status.stale { color: #ffdc9a; border-color: #6b5522; }
.source-status.empty { color: #ffbdb5; border-color: #6d3230; }
.source-line { margin: 6px 0 0; font-size: 11px; }
.source-error { margin: 4px 0 0; color: #ffbdb5; font-size: 11px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 26px 0 46px; border-top: 1px solid #232a33; color: #8d99a8; font-size: 11px; }
footer a { color: #a4b0bf; text-decoration: underline; }
#detail { width: min(720px, calc(100% - 32px)); padding: 0; border: 1px solid #2f3742; border-radius: 14px; background: #10141a; color: #e8ecf1; }
#detail::backdrop { background: #05070ac9; }
.dialog-close { position: absolute; right: 10px; top: 10px; width: 34px; min-height: 34px; padding: 0; border-radius: 999px; font-size: 18px; line-height: 1; background: #0b0e12cc; }
.detail-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; padding: 24px; }
.detail-art { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid #262e38; background: #151a21; }
.detail-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-info h2 { margin: 6px 0 14px; font-size: 19px; line-height: 1.45; }
.detail-meta { display: grid; gap: 8px; margin: 0 0 16px; }
.detail-meta > div { display: grid; grid-template-columns: 68px 1fr; gap: 10px; font-size: 12px; }
.detail-meta dt { color: #8d99a8; }
.detail-meta dd { margin: 0; color: #cfd8e3; }
.detail-link { display: inline-block; padding: 9px 14px; border-radius: 8px; background: #ffd479; color: #17130a; font-weight: 650; font-size: 13px; }
.detail-link:hover { color: #17130a; background: #ffdf9c; }
.detail-note { margin: 14px 0 0; color: #8d99a8; font-size: 11px; }
@media (min-width: 1600px) { .site-header, main, footer { width: min(1620px, calc(100% - 72px)); } .grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 14px; } }
@media (max-width: 700px) {
  .site-header, main, footer { width: calc(100% - 28px); }
  .site-header { height: 62px; }
  .header-right { gap: 8px; font-size: 10px; }
  .reload-label { display: none; }
  #reload { min-height: 34px; padding: 6px 10px; }
  .hero { padding: 22px 0 14px; }
  .hero-copy { font-size: 12px; }
  .hero-stats { gap: 22px; margin-top: 14px; }
  .hero-stats strong { font-size: 19px; }
  .toolbar { top: 62px; }
  .tabs { gap: 5px; }
  .tabs button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
  .search-label input { width: 120px; }
  #count { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card-title { font-size: 12px; }
  .detail-layout { grid-template-columns: 1fr; padding: 18px; }
  .detail-art { max-width: 180px; }
}
/* Cinema palette and compact browsing layout. */
body { background: #101210; color: #f0f1e9; }
.site-header, main, footer { width: min(1440px, calc(100% - 64px)); }
.site-header { background: #101210ed; height: 76px; border-color: #30332d; }
.brand-mark { transform: none; border: 0; border-radius: 10px; width: 38px; height: 38px; background: #c4e78a; color: #20271b; font: 800 25px/1 Georgia, serif; }
.brand small { letter-spacing: 2px; color: #909889; }
.hero { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 32px; padding: 36px 0 30px; }
.hero .eyebrow { color: #c4e78a; grid-column: 1; }
h1 { grid-column: 1; font-size: clamp(28px, 3vw, 42px); letter-spacing: -1.4px; margin: 7px 0; }
.hero-copy { grid-column: 1; color: #a2aa9c; }
.hero-stats { grid-column: 2; grid-row: 1 / 4; gap: 26px; margin: 0; padding-left: 30px; border-left: 1px solid #30332d; }
.hero-stats strong { font-size: 25px; color: #e7eedb; font-variant-numeric: tabular-nums; }
.hero-stats span { color: #8e9987; }
.toolbar { top: 76px; background: #101210f2; border-color: #30332d; gap: 16px; padding: 14px 0; }
.tabs { gap: 4px; }
.tabs button { border-color: transparent; background: transparent; color: #a6af9e; border-radius: 999px; padding: 7px 14px; }
.tabs button:hover { color: #eef3e7; background: #23291e; }
.tabs button[aria-selected=true] { background: #c4e78a; color: #20271b; border-color: #c4e78a; }
.tabs button[aria-selected=true] span { color: #455b30; }
.search-label { border-radius: 999px; background: #1b2018; border-color: #343d2e; }
.search-label input { width: 180px; }
.view-switch { border-color: #30382a; background: #1b2018; border-radius: 999px; padding: 3px; }
.view-switch button { border-radius: 999px; }
.view-switch button[aria-selected=true] { background: #c4e78a; color: #20271b; }
.wall { padding-top: 25px; }
.grid { gap: 30px 20px; }
.art { border-radius: 12px; border-color: #34392f; background: #1d2319; box-shadow: 0 8px 22px #00000035; }
.card-button:hover .art { border-color: #a6c479; transform: translateY(-4px); }
.card-button:hover .card-title { color: #c4e78a; }
.art-badge { left: 10px; top: 10px; background: #101710d9; backdrop-filter: blur(8px); border: 1px solid #ffffff20; padding: 3px 9px; color: #eef3e7; }
.card-title { font-size: 14px; line-height: 1.6; margin-top: 12px; letter-spacing: .1px; color: #e3e9db; }
.card-meta { flex-wrap: wrap; justify-content: flex-start; gap: 5px 8px; color: #8f9a86; }
.card-date { margin-right: auto; }
.card-poster { display: none; }
.card-links { border: 0; padding: 0; color: #b2c99b; }
#poster-note { display: none; }
.method { background: #171b14; border-color: #30382a; }
#detail { width: min(960px, calc(100% - 32px)); max-height: 90dvh; border-radius: 20px; background: #171c14; border-color: #39462e; box-shadow: 0 28px 100px #0009; }
#detail::backdrop { background: #060906d9; backdrop-filter: blur(9px); }
.detail-layout { grid-template-columns: 260px minmax(0, 1fr); padding: 32px; gap: 28px; }
.detail-art { position: sticky; top: 0; align-self: start; box-shadow: 0 12px 36px #0005; }
.detail-info h2 { font-size: 24px; padding-right: 22px; }
.detail-meta { grid-template-columns: 1fr 1fr; padding-bottom: 18px; border-bottom: 1px solid #30382a; }
.detail-meta > div { grid-template-columns: 58px minmax(0,1fr); }
.detail-meta > div:last-child { display: none; }
.detail-block h3 { font-size: 14px; color: #c4e78a; margin: 18px 0 12px; }
.credit-list { grid-template-columns: 1fr; }
.summary { max-height: none; font-size: 13px; line-height: 1.9; }
.link-row { background: #1e2618; border-color: #34432b; padding: 10px 12px; }
.link-anchor { background: #2b3b22; border-color: #4b643b; color: #e0edce; }
.link-magnet .link-anchor { background: #314125; border-color: #587440; color: #e0edce; }
.link-copy { margin-left: auto; background: #21291c; border-color: #415334; }
.dialog-close { z-index: 2; width: 38px; min-height: 38px; border-color: #4b573f; color: #dfe9d3; }
footer { border-color: #30382a; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline-color: #c4e78a; }
@media (max-width: 1100px) { .hero-stats { gap: 16px; padding-left: 20px; } .hero-stats > div:nth-child(n+3) { display: none; } }
@media (max-width: 700px) {
  .site-header, main, footer { width: calc(100% - 32px); }
  .site-header { height: 66px; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand small { font-size: 7px; letter-spacing: 1px; }
  .brand-mark { width: 32px; height: 34px; }
  .header-right { gap: 6px; }
  .freshness { display: none; }
  .view-switch button { min-height: 32px; padding: 4px 9px; font-size: 11px; }
  .hero { display: block; padding: 25px 0 20px; }
  .hero-copy { max-width: 310px; }
  .hero-stats { display: flex; border: 0; padding: 0; margin-top: 16px; gap: 26px; }
  .hero-stats strong { font-size: 21px; }
  .toolbar { top: 66px; display: block; padding: 10px 0; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .tabs button { flex: 0 0 auto; padding: 6px 11px; }
  .toolbar-tools { margin-top: 9px; }
  .search-label { width: 100%; }
  .search-label input { width: 100%; }
  .grid { gap: 24px 14px; }
  .card-title { font-size: 13px; margin-top: 10px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 20px; }
  .detail-art { position: relative; width: 150px; justify-self: center; }
  .detail-info h2 { font-size: 21px; padding: 0; }
  .detail-meta { grid-template-columns: 1fr; }
  #detail { max-height: 92dvh; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

/* view switch: poster wall / embedded studio */
.view-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.03); }
.view-switch button { border: 0; border-radius: 6px; padding: 4px 10px; color: rgba(230,240,240,.62); background: transparent; font-size: 12px; cursor: pointer; }
.view-switch button[aria-selected="true"] { color: #20271b; background: #c4e78a; font-weight: 700; }
body.view-studio main > .hero,
body.view-studio main > .toolbar,
body.view-studio main > .wall,
body.view-studio main > .notice,
body.view-studio main > .method { display: none; }
.studio { display: flex; flex-direction: column; gap: 10px; }
.studio-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.03); color: rgba(226,238,238,.66); font-size: 12px; line-height: 1.6; }
.studio-bar .secondary { text-decoration: none; }
#studio-frame { width: 100%; height: calc(100vh - 190px); min-height: 420px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: #05080c; }

/* detail panel: credits, plot and the source page's public download links */
.detail-block { margin: 0 0 16px; }
.detail-block h3 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 12px; letter-spacing: .5px; color: #93a0b0; font-weight: 650; }
.block-count { font-size: 10px; color: #6d7787; font-weight: 500; }
.credit-list { display: grid; gap: 6px; margin: 0 0 10px; }
.credit-list > div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; font-size: 12px; }
.credit-list dt { color: #8d99a8; }
.credit-list dd { margin: 0; color: #cfd8e3; word-break: break-word; }
.summary { margin: 0; max-height: 190px; overflow: auto; white-space: pre-wrap; color: #b9c4d1; font-size: 12px; line-height: 1.7; }
.link-list { display: grid; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.link-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #262e38; border-radius: 8px; background: #12171d; }
.link-anchor { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 5px 10px; border: 1px solid #33507a; border-radius: 6px; background: #16233a; color: #cfe3ff; font-weight: 600; font-size: 12px; }
.link-anchor:hover { border-color: #5b83bd; color: #ffffff; }
.link-magnet .link-anchor { border-color: #4a3a6d; background: #221a33; color: #dcd0ff; }
.link-magnet .link-anchor:hover { border-color: #7a63ad; color: #ffffff; }
.link-quality { font-size: 10px; color: #8fa6c4; font-weight: 500; }
.link-magnet .link-quality { color: #a892d6; }
.link-copy { min-height: 30px; padding: 4px 10px; font-size: 11px; }
.link-code { font-size: 11px; color: #ffdc9a; }
.link-hint { margin: 0; color: #8d99a8; font-size: 11px; line-height: 1.7; }
.link-hint strong { color: #e8ecf1; }
.card-links { padding: 1px 6px; border: 1px solid #2f3742; border-radius: 999px; color: #9fc7c2; }
@media (max-width: 700px) {
  .credit-list > div { grid-template-columns: 62px 1fr; }
  .link-row { gap: 6px; }
  .link-anchor { flex: 1 1 auto; }
}
