@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Instrument+Serif&display=swap');

:root {
  --night: #151923;
  --frame: #222a39;
  --paper: #f2efe6;
  --linen: #e9e5d8;
  --white: #fffdf5;
  --ink: #212631;
  --muted: #575d66;
  --line: #d9d6cc;
  --amber: #f5c880;
  --blue: #294878;
  --sans: Geist, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --song: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.65 var(--sans); color: var(--ink); background: var(--paper); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; object-fit: cover; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.dark { background: var(--night); color: var(--white); }
.dark :focus-visible, .close:focus-visible, .dialog-media :focus-visible { outline-color: var(--amber); }
.skip { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 8px 16px; background: var(--amber); transform: translateY(-160%); }
.skip:focus { transform: none; }
.shell { width: min(1270px, calc(100% - 100px)); margin-inline: auto; }

.mast { min-height: 61px; display: flex; justify-content: space-between; align-items: center; gap: 14px; border-bottom: 1px solid #383d4b; }
.brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand img { width: 23px; height: 23px; }
.brand span { color: #a1aabc; margin-inline: 5px; }
.mast nav { display: flex; gap: clamp(14px, 3vw, 36px); color: #d6d8e0; font-size: 13px; }
.mast a:hover, .footer a:hover { color: var(--amber); }
.hero { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(27px, 5vw, 75px); align-items: center; padding-block: 38px 42px; }
.exhibition { background-image: radial-gradient(ellipse at 75% 0%, #2833459c, transparent 70%); }
.edition { display: flex; align-items: center; gap: 9px; font: 12px/1.4 var(--sans); letter-spacing: .12em; color: #e6d6ba; margin-bottom: 21px; }
.edition span { width: 7px; height: 7px; background: var(--amber); transform: rotate(45deg); }
.edition time { color: #d1c8b9; margin-left: 6px; padding-left: 12px; border-left: 1px solid #6a6b74; }
.hero-index { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 29px; color: #c8cbd4; font-size: 12px; font-variant-numeric: tabular-nums; }
.hero-index span + span { padding-left: 12px; border-left: 1px solid #676a74; }
.hero-link { color: #e3e4eb; padding: 10px 9px; font-size: 13px; font-weight: 600; }
.hero-link:hover { color: var(--amber); text-decoration: underline; text-underline-offset: 4px; }
.hero h1 { font: 400 clamp(70px, 8.6vw, 138px)/.85 var(--display); letter-spacing: -.046em; white-space: nowrap; }
.hero h1 > span { display: block; color: var(--amber); font: 700 .42em/1.15 var(--song); letter-spacing: -.045em; margin-block: .37em .27em; }
.intro { max-width: 28em; color: #d3d7e2; font-size: 15px; line-height: 1.85; text-wrap: pretty; }
.hero-actions, .spotlight-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.hero-actions { margin-top: 24px; }
.jump, .random { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 6px 13px; border: 1px solid #858a98; border-radius: 5px; font-size: 13px; font-weight: 700; }
.jump { background: var(--amber); color: var(--night); border-color: var(--amber); }
.jump:hover { background: #ffdc9f; }
.random { color: var(--white); background: #151923be; }
.random:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); }

.spotlight { min-width: 0; }
.spotlight-view { position: relative; isolation: isolate; width: 100%; min-height: 310px; aspect-ratio: 1.77; overflow: hidden; background: var(--frame); border-radius: 7px 7px 0 0; }
.spotlight-view img { position: absolute; inset: 0; height: 100%; }
.spotlight-view::after { content: ""; position: absolute; z-index: 0; inset: 36% 0 0; background: linear-gradient(transparent, #0d101ce8); pointer-events: none; }
.spotlight-caption { position: absolute; z-index: 1; inset: auto 23px 19px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.spotlight-caption h2 { font-size: clamp(21px, 2.5vw, 33px); line-height: 1.25; margin: 3px 0; }
.spotlight-caption small { color: #f6dcae; font-size: 12px; }
.spotlight-caption p { color: #ecedf3; font-size: 13px; }
.spotlight-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--frame); border-radius: 0 0 7px 7px; }
.spotlight-picks:empty { display: none; }
.spotlight-picks button { min-height: 44px; min-width: 0; border: 0; border-top: 2px solid transparent; background: none; color: #dfe3ed; padding: 6px 3px; font-size: 13px; }
.spotlight-picks button[aria-pressed=true] { background: #323b4b; border-top-color: var(--amber); color: var(--amber); font-weight: 700; }
.spotlight-picks button:last-child { border-bottom-right-radius: 7px; }
.spotlight-picks button:first-child { border-bottom-left-radius: 7px; }
.spotlight-picks button:hover { color: var(--amber); }

.guided { padding-block: 35px 49px; background: var(--linen); border-bottom: 1px solid #d8d1bf; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 28px; margin-bottom: 22px; }
.section-head > p { max-width: 24em; color: var(--muted); font-size: 14px; }
.eyebrow { color: #775725; font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.section-head h2, .archive h2 { font: 700 clamp(29px, 3.6vw, 44px)/1.25 var(--song); letter-spacing: -.037em; margin-top: 4px; }
.route-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid #c6bfae; }
.route-nav button { min-width: 0; display: flex; align-items: baseline; gap: 9px; text-align: left; min-height: 50px; padding: 10px 14px; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; }
.route-nav button + button { border-left: 1px solid #c6bfae; }
.route-nav button span { font: 400 21px/1 var(--display); color: #785b30; }
.route-nav button[aria-pressed=true] { background: var(--night); color: var(--white); outline-offset: 2px; }
.route-nav button[aria-pressed=true] span { color: var(--amber); }
.route-nav button:hover[aria-pressed=false] { background: #dfd9c8; }
.route-intro { display: grid; grid-template-columns: .95fr 1.05fr; align-items: baseline; gap: 6px 18px; padding-block: 18px 16px; }
.route-intro h3 { font: 700 clamp(20px, 2.45vw, 31px)/1.24 var(--song); }
.route-intro p { color: var(--muted); font-size: 13.5px; max-width: 42em; }
.route-stops { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; }
.route-stop { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid #d4cebd; border-radius: 4px; overflow: clip; }
.route-art { position: relative; aspect-ratio: 2.25; background: var(--frame); overflow: hidden; }
.route-art img { height: 100%; }
.route-number { position: absolute; top: 9px; left: 9px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--night); color: var(--amber); font: 400 23px/1 var(--display); }
.route-body { display: flex; align-items: start; flex-direction: column; flex: 1; padding: 11px 15px 12px; }
.route-label { font-size: 11px; font-weight: 700; letter-spacing: .075em; color: #775725; }
.route-body h4 { font-size: 17px; line-height: 1.3; margin-block: 3px 4px; }
.route-note { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.route-action, .text-action { border: 0; padding: 6px 0; min-height: 38px; background: none; color: var(--blue); font-size: 13px; font-weight: 700; text-align: left; }
.route-action { margin-top: auto; width: 100%; }
.route-action:hover, .text-action:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.archive { padding-block: 41px 64px; }
.archive-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.archive-head #result-count { color: var(--muted); margin-top: 5px; font-size: 13px; }
.search { display: flex; align-items: center; gap: 9px; padding-inline: 13px; width: min(320px, 100%); min-height: 44px; border: 1px solid #b6b7ae; background: var(--white); border-radius: 5px; }
.search:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.search svg { flex: none; color: var(--muted); }
.search input { min-width: 0; width: 100%; border: 0; padding-block: 9px; outline: none; background: transparent; color: var(--ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; border-block: 1px solid var(--line); margin-block: 18px 3px; padding-block: 8px; }
.categories { display: flex; flex-wrap: wrap; gap: 4px; }
.categories button { border: 1px solid transparent; padding: 6px 10px; min-height: 38px; background: transparent; color: var(--ink); border-radius: 4px; font-size: 13px; font-weight: 700; }
.categories button span { margin-left: 5px; opacity: .78; font-size: 11px; }
.categories button:hover { border-color: #a6a8aa; }
.categories button[aria-pressed=true] { color: var(--white); background: var(--night); }
.format-select { display: flex; align-items: center; gap: 8px; flex: none; font-size: 13px; color: var(--muted); }
.format-select select { min-height: 38px; color: var(--ink); background: var(--white); border: 1px solid #b6b7ae; border-radius: 4px; padding-inline: 7px; }
.archive-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 17px; margin-bottom: 10px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle input { accent-color: var(--night); }
.toggle span { color: #755725; font-size: 11px; font-variant-numeric: tabular-nums; }
.archive-controls .random-case { margin-left: auto; }
.empty { grid-column: 1 / -1; border: 1px dashed #b7ae9c; color: var(--muted); padding: 24px; }
.empty p { font-size: 18px; color: var(--ink); font-weight: 700; }
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 19px; }
.case { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); border-radius: 8px; }
.case:hover, .case:focus-within { border-color: #a29376; }
.case-media { position: relative; aspect-ratio: 1.81; overflow: hidden; width: 100%; background: var(--frame); border-radius: 7px 7px 0 0; }
.case-media img { height: 100%; }
.new-tag { position: absolute; top: 9px; right: 9px; background: var(--amber); color: var(--night); padding: 3px 7px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.format { position: absolute; top: 9px; left: 9px; padding: 3px 8px; color: var(--white); background: #182131; border: 1px solid #959eaa; border-radius: 4px; font-size: 11px; }
.text-case { border-top: 3px solid #657b9e; }
.text-case .case-media { aspect-ratio: auto; min-height: 43px; background: transparent; }
.text-case .format { color: var(--blue); background: #eceef2; border: 0; left: 16px; }
.case-body { padding: 12px 16px 14px; display: flex; flex: 1; flex-direction: column; }
.case-meta { font-size: 12px; color: var(--muted); }
.case-body h3 { font-size: 20px; line-height: 1.3; margin-top: 3px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.case-body p { color: var(--muted); font-size: 13px; margin-block: 6px 13px; text-wrap: pretty; }
.case-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.card-action, .card-open { min-height: 37px; display: inline-flex; align-items: center; border-radius: 4px; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.card-action { background: #e8edf5; color: var(--blue); border: 1px solid #c9d4e6; }
.card-action:hover { background: #dce6f5; }
.card-open { background: transparent; color: var(--ink); border: 1px solid transparent; }
.card-open:hover { border-color: var(--line); }
.more { display: block; margin: 28px auto 0; background: transparent; color: var(--ink); border: 1px solid #858b95; border-radius: 4px; padding: 9px 21px; font-weight: 700; }
.more:hover { color: var(--white); background: var(--night); }

.footer { padding-block: 35px 18px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px 56px; }
.footer .eyebrow { color: #e1c598; margin: 0 0 4px; }
.footer h2 { font: 700 27px/1.2 var(--song); }
.footer p { color: #c5cad7; margin-top: 7px; max-width: 42em; }
.footer ul { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 15px; font-size: 13px; }
.footer-end { display: flex; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 12px; border-top: 1px solid #454c5a; color: #c5cad7; font-size: 12px; }

dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid #969788; border-radius: 10px; color: var(--ink); background: var(--white); overscroll-behavior: contain; }
dialog::backdrop { background: #101521dc; }
dialog form { position: sticky; top: 0; z-index: 1; height: 0; text-align: right; }
.close { margin: 10px; background: var(--night); color: var(--white); border: 1px solid #a2a7b3; border-radius: 50%; width: 40px; height: 40px; font-size: 24px; line-height: 1; }
.dialog-media { aspect-ratio: 2.12; background: var(--frame); }
.dialog-media img { height: 100%; object-fit: contain; }
.preview-type { display: grid; place-items: center; text-align: center; width: 100%; height: 100%; padding: 42px 25px 18px; color: #f4e4c5; }
.preview-type span { max-width: 18ch; font: clamp(24px, 5vw, 51px)/.98 var(--display); }
.dialog-media:has(video) { aspect-ratio: 16 / 9; background: #090a0e; }
.dialog-media video { display: block; width: 100%; height: 100%; }
.video-error { display: grid; place-content: center; height: 100%; text-align: center; color: var(--white); }
.video-error a, .chapters a { text-decoration: underline; text-underline-offset: 3px; }
.dialog-copy { padding: 22px 29px 28px; }
.dialog-meta, .dialog-original { color: var(--muted); font-size: 13px; }
.dialog-copy h2 { font-size: clamp(24px, 5vw, 34px); line-height: 1.3; margin-block: 4px; }
.dialog-description { margin-top: 10px; }
.case-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.case-tags span { background: #ece8dd; color: #514a3e; padding: 3px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.dialog-fact { margin-top: 12px; border-left: 2px solid #8d96a9; padding-left: 11px; color: var(--muted); font-size: 14px; }
.dialog-fact h3 { color: var(--ink); font-size: 12px; margin-bottom: 2px; }
.dialog-access, .dialog-reading { border-left-color: #a66e27; }
.dialog-reading { background: #f2ebd9; padding: 9px 11px; }
.dialog-route { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 0 15px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 8px; color: var(--muted); font-size: 13px; }
.share-status { display: inline-flex; align-items: center; color: var(--muted); font-size: 12px; }
.share-status:empty { display: none; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dialog-actions a, .dialog-actions button { display: inline-flex; align-items: center; min-height: 40px; border: 1px solid #a0a2aa; border-radius: 4px; padding: 6px 11px; background: transparent; color: inherit; font-size: 13px; font-weight: 700; }
.dialog-actions a:hover, .dialog-actions button:hover { border-color: var(--blue); }
.dialog-actions .primary { background: var(--night); color: var(--white); border-color: var(--night); }
.dialog-actions button.primary { background: var(--amber); color: var(--night); border-color: var(--amber); }
.chapters { display: grid; gap: 5px; margin: 18px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; }
.chapters span { display: inline-block; width: 4.6ch; margin-right: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 56px); }
  .hero { gap: 25px; }
  .spotlight-caption { inset: auto 14px 12px; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-stops { gap: 12px; }
}
@media (max-width: 740px) {
  .shell { width: calc(100% - 36px); }
  .mast { min-height: 53px; }
  .mast nav { gap: 11px; }
  .hero { grid-template-columns: 1fr; padding-block: 28px 32px; gap: 23px; }
  .hero h1 { font-size: clamp(72px, 15vw, 106px); }
  .hero-actions { margin-top: 14px; }
  .hero-index { margin-top: 13px; }
  .guided { padding-block: 25px 32px; }
  .section-head { align-items: start; flex-direction: column; gap: 5px; margin-bottom: 14px; }
  .route-intro { grid-template-columns: 1fr; }
  .route-stops { grid-template-columns: 1fr; gap: 8px; }
  .route-stop { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .route-art { height: 100%; aspect-ratio: auto; min-height: 126px; }
  .route-art img { position: absolute; inset: 0; }
  .spotlight-view { min-height: 250px; }
  .archive { padding-block: 27px 43px; }
  .archive-head { align-items: start; flex-direction: column; gap: 11px; }
  .search { width: 100%; }
  .toolbar { flex-wrap: wrap; margin-block: 12px 15px; gap: 7px; }
  .categories button { padding-inline: 6px; }
  .case-grid { gap: 13px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand { font-size: 12px; gap: 3px; }
  .brand img { display: none; }
  .brand span { margin-inline: 3px; }
  .mast nav { gap: 9px; font-size: 12px; }
  .route-nav button { gap: 5px; padding-inline: 7px; font-size: 12px; }
  .route-nav button span { font-size: 17px; }
  .route-body { padding: 8px 9px 3px; }
  .case-grid { grid-template-columns: 1fr; }
  .spotlight-caption { align-items: start; flex-direction: column; gap: 8px; }
  .spotlight-actions .jump, .spotlight-actions .random { min-height: 38px; }
  .spotlight-picks button { font-size: 12px; }
  .dialog-copy { padding-inline: 17px; }
}

@media (max-width: 359px) {
  .shell { width: calc(100% - 24px); }
  .hero h1 { font-size: 65px; }
  .route-stop { grid-template-columns: 1fr; }
  .route-art { aspect-ratio: 2.4; height: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  button, a, .case { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
}
.dialog-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; aspect-ratio: auto; }
.dialog-gallery img { width: 100%; height: auto; aspect-ratio: 1.32; background: #10141e; }
.dialog-related { margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); }
.dialog-related h3 { font-size: 12px; }
