:root {
  --blue: #001b87;
  --blue-dark: #001361;
  --paper: #f6f6f3;
  --soft: #c0c9eb;
  --rule: rgba(235, 239, 255, .44);
  --light-rule: rgba(235, 239, 255, .22);
  --page-inset: clamp(18px, 3.3vw, 64px);
  font: 16px/1.5 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--blue); scroll-behavior: smooth; }
body { margin: 0; color: var(--paper); }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { background: transparent; cursor: pointer; border: 0; padding: 0; }
a { text-decoration: none; }
button:focus-visible, a:focus-visible, video:focus-visible { outline: 3px solid #ffdf80; outline-offset: -3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -5rem; background: var(--paper); color: var(--blue); padding: .7rem 1rem; z-index: 5; }
.skip-link:focus { top: 1rem; }
.masthead, .collection, footer { max-width: 1820px; margin-inline: auto; padding-inline: var(--page-inset); }
.masthead { height: clamp(80px, 8vw, 112px); display: flex; align-items: center; justify-content: space-between; }
.wordmark, nav, .window-actions, .steps { display: flex; align-items: center; }
.wordmark { gap: 11px; font-size: 19px; font-weight: 700; letter-spacing: .08em; }
.mark { position: relative; width: 27px; height: 24px; border: 1.5px solid currentColor; border-radius: 2px; box-shadow: -3px 3px var(--blue), -4px 4px currentColor; }
.mark::after { content: ""; position: absolute; top: 6px; left: 9px; border: 5px solid transparent; border-left: 8px solid var(--paper); }
nav { gap: clamp(18px, 3vw, 44px); font-size: 14px; }
nav a, nav button { padding: 6px 0; }
.active-nav { border-bottom: 1px solid var(--paper); }
nav button span { margin-left: 2px; }
.grid-caption, .card-details, .film-info, .window-bar, .index-link, footer { display: flex; align-items: center; justify-content: space-between; }
.grid-caption { gap: 14px; min-height: 42px; padding: 0 0 15px; font-size: 12px; color: var(--soft); }
.grid-caption > span, .intro-label, .window-bar > span, .work-number, .running-time, .film-meta { font-family: Arial, "Microsoft YaHei", sans-serif; font-variant-numeric: tabular-nums; }
.grid-caption > span, .intro-label, .window-bar > span { font-size: 10px; letter-spacing: .14em; }
.slash { margin: 0 .6em; }
.grid-caption p { margin: 0; text-align: right; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.intro, .card { min-width: 0; border: 1px solid var(--rule); margin: 0 -1px -1px 0; }
.intro { padding: clamp(18px, 2vw, 36px); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; }
.intro-label { color: var(--soft); }
h1 { font-size: clamp(44px, 4.75vw, 88px); font-weight: 600; letter-spacing: -.09em; line-height: 1.02; margin: 18px 0; }
.title-dot { display: inline-block; width: .14em; height: .14em; margin-left: .09em; background: var(--paper); border-radius: 50%; }
.index-link { font-size: 13px; gap: 1.7em; border-bottom: 1px solid var(--rule); padding-bottom: .35em; }
.index-link:hover { border-color: var(--paper); }
.card { position: relative; display: block; text-align: left; background: var(--blue); perspective: 1400px; }
.flip { display: grid; transform-style: preserve-3d; transition: transform .52s cubic-bezier(.2,.68,.19,1); }
.card.previewing .flip { transform: rotateY(180deg); }
.front, .back { grid-area: 1 / 1; min-width: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--blue); }
.front { display: grid; grid-template-rows: auto 1fr; }
.art { display: block; background: var(--blue-dark); aspect-ratio: 16 / 9; overflow: hidden; }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-details { min-height: 67px; gap: 10px; padding: 11px clamp(12px,1.45vw,26px); border-top: 1px solid var(--light-rule); }
.caption { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.caption strong { display: block; font-size: clamp(15px,1.42vw,23px); line-height: 1.36; font-weight: 600; }
.work-number { color: var(--soft); font-size: 10px; }
.running-time { font-size: 12px; color: var(--soft); letter-spacing: .055em; white-space: nowrap; }
.card:hover .card-details { background: #0c2a9b; }
.back { border: 0; position: relative; display: block; overflow: hidden; transform: rotateY(180deg); background: #080e24; }
.back video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.preview-label { position: absolute; bottom: 12px; left: 12px; padding: 5px 10px; border-radius: 2px; background: rgba(10,12,30,.83); font-size: 12px; }
@media (min-width: 701px) {
  .card:last-child:nth-child(3n+1) { grid-column: 2; }
}
footer { justify-content: flex-end; padding-block: 28px 48px; color: var(--soft); font-size: 12px; }
dialog { position: fixed; color: var(--paper); border: 1px solid var(--rule); background: var(--blue); border-radius: 10px; width: min(1040px, 90vw); max-width: 100%; padding: 0; max-height: 91dvh; overflow: auto; box-shadow: 0 25px 90px #000a; }
dialog[open] { animation: appear .18s ease-out; }
dialog::backdrop { background: rgba(0,8,43,.77); }
body.has-modal { overflow: hidden; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.window-bar { position: sticky; top: 0; z-index: 1; min-height: 46px; padding: 5px 14px 5px 22px; border-bottom: 1px solid var(--rule); background: var(--blue); }
.window-bar b { color: var(--soft); margin-left: 8px; font-weight: 400; }
.window-bar button { font: 24px/1 Arial, sans-serif; width: 36px; height: 36px; border-radius: 3px; }
.window-bar button:hover, .steps button:enabled:hover, .window-bar button[aria-pressed="true"] { background: rgba(255,255,255,.13); }
.screen { background: #06070c; position: relative; display: grid; place-items: center; }
.screen video { width: 100%; max-height: 63dvh; display: block; aspect-ratio: 16 / 9; object-fit: contain; }
.screen p { position: absolute; max-width: 90%; padding: 12px 16px; background: rgba(0,0,0,.8); }
.film-info { padding: 20px 24px; gap: 18px; }
.film-info h2, .directory-content h2 { margin: 0; font-size: clamp(22px,2.25vw,36px); line-height: 1.4; letter-spacing: -.04em; }
.film-meta { font-size: 12px; margin: 0 0 4px; color: var(--soft); }
.steps { flex-shrink: 0; gap: 8px; }
.steps select { border: 1px solid var(--rule); border-radius: 3px; padding: 6px 4px; background: var(--blue); color: var(--paper); font: inherit; font-size: 13px; cursor: pointer; }
.steps button { border: 1px solid var(--rule); padding: 7px 11px; border-radius: 3px; font-size: 13px; }
.steps button:disabled { opacity: .36; cursor: default; }
#viewer.expanded { width: min(1450px,97vw); max-height: 96dvh; }
#viewer.expanded video { max-height: 74dvh; }
#directory { width: min(630px,90vw); }
.directory-content { padding: 24px; }
.directory-content h2 { margin-bottom: 15px; }
.directory-content ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.directory-content li button { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 8px; align-items: baseline; text-align: left; width: 100%; padding: 13px 4px; border-bottom: 1px solid var(--light-rule); }
.directory-content li button:hover { background: rgba(255,255,255,.07); }
@media (max-width: 700px) {
  .masthead { height: 75px; }
  .wordmark { font-size: 16px; gap: 9px; }
  .mark { width: 23px; height: 20px; }
  .mark::after { top: 4px; left: 7px; }
  nav { gap: 17px; font-size: 13px; }
  .grid-caption { min-height: 38px; padding-bottom: 12px; font-size: 11px; }
  .grid-caption > span { font-size: 9px; letter-spacing: .08em; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .intro { grid-column: 1 / -1; min-height: 154px; padding: 18px 20px; position: relative; }
  h1 { font-size: clamp(39px,9vw,58px); margin: 10px 0 1px; line-height: 1.08; }
  .index-link { position: absolute; right: 18px; bottom: 18px; font-size: 12px; gap: 12px; }
  .card-details { min-height: 64px; align-items: flex-start; flex-direction: column; gap: 3px; justify-content: center; padding: 8px 10px; }
  .caption { gap: 6px; }
  .caption strong { font-size: clamp(13px,3.4vw,18px); }
  .running-time, .work-number { font-size: 10px; }
  .card-details > .running-time { padding-left: 18px; }
  footer { padding-block: 24px 34px; }
  dialog, #directory { width: calc(100vw - 20px); }
  .window-bar { padding-left: 14px; }
  .film-info { align-items: flex-start; flex-direction: column; gap: 15px; padding: 16px; }
  .directory-content { padding: 18px; }
}
@media (max-width: 370px) { nav { gap: 10px; } .card-details { padding-inline: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }


.template-sections .identity-art .studio-still {
  display: block;
  width: 100%;
  height: auto;
}
.template-sections .footer-logo.studio-short-name {
  width: auto;
  height: auto;
  white-space: nowrap;
  font-weight: 700;
}
