:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #142b43;
  background: #f3f6fa;
  --navy: #123252;
  --muted: #4c6176;
  --accent: #137c84;
  --line: #d7e1ec;
  --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: #0a6670; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #258eab;
  outline-offset: 3px;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
.shell { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 70px; }
.lockup { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 650; }
.mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 9px; color: white; background: var(--navy); font-weight: 700;
}
.brand-divider { display: inline-block; margin-inline: 10px; height: 13px; border-left: 1px solid #99adbd; vertical-align: middle; }
.quiet { min-height: 44px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 8px; background: white; white-space: nowrap; }
.content { padding-block: 34px 70px; }
.hero {
  min-height: 309px; isolation: isolate; position: relative; display: grid; align-items: center;
  overflow: hidden; border-radius: 15px; background: #142e49; color: #f8fbff;
}
.hero img { position: absolute; inset: 0 0 0 auto; width: 73%; height: 100%; z-index: -2; object-fit: cover; object-position: center 55%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #102c49 12%, #102c49f5 32%, #102c498a 62%, #102c492b 100%);
}
.hero-content { padding: 34px clamp(25px, 4vw, 60px); }
.hero-label { color: #9ae1de; font-size: 14px; font-weight: 650; margin-bottom: 11px; }
.hero h1 { font-size: clamp(30px, 4.1vw, 53px); letter-spacing: -.055em; line-height: 1.18; }
.hero h1 span { white-space: nowrap; }
.hero-description { color: #e0edf7; margin-top: 15px; line-height: 1.6; font-size: 15px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero-stats li { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: #e0edf7; }
.hero-stats strong { font-weight: 700; font-variant-numeric: tabular-nums; color: white; font-size: 18px; }
.view-nav { display: flex; border-bottom: 1px solid var(--line); gap: 28px; margin-top: 17px; }
.view-nav button {
  min-height: 56px; padding: 2px 3px 0; background: transparent; border: 0;
  border-bottom: 3px solid transparent; color: var(--muted); font-size: 16px; font-weight: 650;
}
.view-nav [aria-pressed="true"] { color: var(--navy); border-bottom-color: var(--accent); }
.catalog { margin-top: 28px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 23px; }
.catalog h2 { font-size: clamp(22px, 2.5vw, 30px); letter-spacing: -.04em; }
.result-info { margin-top: 4px; min-height: 1.5em; color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 10px; }
input, select { color: var(--navy); border: 1px solid #c7d6e4; border-radius: 8px; min-height: 44px; padding: 9px 12px; background: white; }
input[type="search"] { width: min(228px, 32vw); }
select { max-width: 210px; }
.categories, .asset-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.categories button, .asset-options button, .detail-tools :is(button, a) {
  min-height: 44px; background: white; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; text-decoration: none;
}
.categories [aria-pressed="true"], .asset-options [aria-pressed="true"], .detail-tools [aria-pressed="true"] {
  background: #dceff1; border-color: #6da8ad; color: #084e56; font-weight: 700;
}
.chapter { margin-bottom: 35px; }
.chapter-heading {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 13px;
  font-weight: 700; font-size: 18px;
}
.chapter-number { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.chapter-time { color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
  appearance: none; padding: 0; width: 100%; height: 100%; min-width: 0; display: block;
  overflow: hidden; border: 1px solid var(--line); border-radius: 11px;
  background: white; text-align: left;
}
.card:hover { border-color: #5d99a6; box-shadow: 0 4px 14px #193d601a; }
.card-picture { display: grid; place-items: center; background: #dfe9f1; aspect-ratio: 16 / 9; overflow: hidden; }
.card-picture img { width: 100%; height: 100%; object-fit: cover; }
.asset-grid .card-picture img { object-fit: contain; }
.card-placeholder { color: #3c566d; font-size: 13px; padding: 10px; text-align: center; }
.card-body { display: flex; flex-direction: column; gap: 5px; padding: 12px 12px 13px; }
.card-code { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.45; }
.card-summary { font-size: 12px; line-height: 1.4; color: var(--accent); }
.card-summary.is-old { color: #835818; }
.empty { border: 1px dashed #b1c1d2; border-radius: 10px; padding: 28px; color: var(--muted); }
.gate {
  min-height: 100vh; min-height: 100svh; display: grid; place-content: center; gap: 22px;
  padding: 22px;
  background: radial-gradient(ellipse at top right, #d5ebf1, transparent 55%), #eef4fa;
}
.gate .lockup { justify-self: start; }
.gate-panel { width: min(440px, calc(100vw - 44px)); padding: clamp(22px, 5vw, 38px); background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 20px 55px #162f4920; }
.gate h1 { font-size: clamp(27px, 7vw, 35px); letter-spacing: -.045em; }
.gate-panel > p { margin-block: 9px 26px; color: var(--muted); line-height: 1.55; }
.gate label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 650; }
.pass-field { display: flex; gap: 8px; margin-bottom: 14px; }
.pass-field input { flex: 1; min-width: 0; }
.pass-field button { background: white; border: 1px solid var(--line); border-radius: 8px; min-width: 56px; }
.primary { display: block; width: 100%; min-height: 46px; border: 0; border-radius: 8px; background: var(--navy); color: white; font-weight: 700; }
.primary:disabled { opacity: .65; cursor: wait; }
.gate-message { color: #903a25; font-size: 14px; }
.gate-message:not(:empty) { margin-top: 12px; }
dialog { border: 1px solid var(--line); border-radius: 15px; padding: 0; width: min(1000px, calc(100% - 34px)); max-height: 92dvh; color: var(--navy); }
dialog::backdrop { background: #0c2234b8; }
body:has(dialog[open]) { overflow: hidden; }
.detail-header { display: flex; align-items: start; gap: 12px; justify-content: space-between; padding: 20px 24px 15px; border-bottom: 1px solid var(--line); }
.detail-label { color: var(--accent); font-size: 12px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.detail-header h2 { font-size: clamp(20px, 3vw, 27px); }
.detail-body { padding: 18px 24px 24px; }
.asset-options { margin-bottom: 10px; }
.asset-options button { font-size: 13px; }
.detail-tools, .compare-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.detail-tools :is(button, a) { display: inline-flex; align-items: center; font-size: 13px; }
.detail-tools a:not([href]) { pointer-events: none; color: var(--muted); opacity: .75; }
.detail-tools button:disabled { cursor: default; opacity: .65; }
.compare-options select { max-width: min(430px, 100%); }
#share-status { color: var(--muted); font-size: 13px; }
#share-url { width: 100%; margin-block: 7px 10px; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.viewer.is-comparing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viewer figure { margin: 0; min-width: 0; }
.viewer-frame { display: grid; place-items: center; background: #e8eff5; min-height: 140px; border-radius: 8px; overflow: hidden; }
.viewer img { max-height: 57dvh; width: auto; object-fit: contain; }
.viewer.is-comparing .viewer-frame { aspect-ratio: 16 / 9; }
.viewer.is-comparing img { width: 100%; height: 100%; }
.viewer figcaption { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 6px 0 0; overflow-wrap: anywhere; }
.detail-notes { display: grid; gap: 10px; margin-top: 15px; font-size: 14px; line-height: 1.65; }
.detail-notes dl { margin: 0; }
.detail-notes dt { font-weight: 700; }
.detail-notes dd { margin: 2px 0 8px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 1020px) {
  .shell { width: calc(100% - 52px); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 30px); }
  .top-inner { min-height: 58px; }
  .content { padding-top: 16px; }
  .hero { min-height: 236px; }
  .hero img { width: 100%; }
  .hero::before { background: linear-gradient(95deg, #102c49f5 4%, #102c49ba 54%, #102c4952); }
  .catalog-heading { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .filters input { width: 0; min-width: 0; flex: 1 1 60%; }
  .filters select { min-width: 0; max-width: 47%; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding-inline: 9px; }
  .detail-header, .detail-body { padding-inline: 13px; }
  .viewer.is-comparing { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .filters { flex-direction: column; }
  .filters input, .filters select { width: 100%; max-width: none; }
  .card-body { padding: 8px; }
  .card-title { font-size: 14px; }
}
