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

/* CC0 subset from github.com/bosswnx/huiwenmincho-improved. */
@font-face {
  font-family: 'Huiwen Mincho Improved';
  src: url('/assets/huiwen-mincho-brand.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --paper: #f2eee7;
  --paper-deep: #e8e0d4;
  --ink: #17201d;
  --muted: #6f746d;
  --line: #c9c5bb;
  --red: #a7472c;
  --red-light: #c96c4b;
  --blue: #607b78;
  --white: #fbfaf6;
  --serif: 'Noto Serif SC', Georgia, serif;
  --mono: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); }
button, a { color: inherit; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.topbar { min-height: 76px; padding: 16px 4.8vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 20px; line-height: 1; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; font-weight: 700; letter-spacing: .08em; }
.brand small { margin-top: 2px; font-family: var(--mono); font-size: 8px; color: var(--muted); letter-spacing: .04em; }
.topbar-right { display: flex; align-items: center; gap: 24px; }
.source-status { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.source-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: block; }
.source-status.live i { background: #3e876d; }
.icon-button, .menu-button, .back-button { border: 0; background: transparent; }
.icon-button { font-size: 20px; line-height: 1; color: var(--muted); }
.menu-button { display: flex; gap: 5px; align-items: center; padding: 0; }
.menu-button span { width: 18px; height: 1px; background: var(--ink); display: block; }
.menu-button em { font-family: var(--mono); font-style: normal; font-size: 10px; margin-left: 3px; }

.hero-section { min-height: min(770px, calc(100vh - 76px)); padding: 8vh 10vw 7vh; display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: center; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero-section::after { content: '字里上海'; position: absolute; right: -3vw; bottom: -8vw; font-size: clamp(170px, 24vw, 350px); line-height: 1; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--line) 60%, transparent); pointer-events: none; writing-mode: vertical-rl; }
.hero-copy { position: relative; z-index: 1; max-width: 700px; }
.eyebrow { color: var(--red); font-family: var(--mono); font-size: 10px; letter-spacing: .13em; margin: 0 0 22px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-weight: 500; font-size: clamp(52px, 8vw, 108px); line-height: 1.08; letter-spacing: .01em; margin-bottom: 28px; }
h1 em, h2 em { font-style: normal; color: var(--red); }
.hero-description { max-width: 390px; font-size: 16px; line-height: 2; color: var(--muted); }
.hero-actions { display: flex; align-items: center; gap: 22px; margin-top: 40px; }
.primary-button { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); padding: 13px 17px; font-size: 13px; display: inline-flex; align-items: center; gap: 30px; transition: background .25s, transform .25s; }
.primary-button:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.primary-button span { font-family: var(--mono); font-size: 16px; }
.primary-button.compact { padding: 11px 14px; gap: 16px; font-size: 12px; }
.hero-note { font-family: var(--mono); color: var(--muted); font-size: 9px; letter-spacing: .03em; }
.hero-note strong { color: var(--ink); font-size: 12px; }
.hero-index { align-self: end; justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; position: relative; z-index: 1; color: var(--muted); }
.hero-index span:first-child, .hero-index small { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.hero-index strong { color: var(--ink); font-weight: 500; font-size: 27px; line-height: 1.4; text-align: right; }
.index-line { width: 50px; height: 1px; background: var(--red); display: block; }

.explore-section, .timeline-section { padding: 10vh 6vw 8vh; }
.section-heading, .timeline-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 58px; }
h2 { font-size: clamp(36px, 5.4vw, 76px); font-weight: 500; line-height: 1.23; margin-bottom: 0; }
.heading-side { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--mono); font-size: 10px; padding-bottom: 6px; }
.heading-side span:first-child { color: var(--ink); font-size: 16px; }
.heading-rule { width: 80px; height: 1px; background: var(--line); }
.explore-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); min-height: 650px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.architecture-stage { min-height: 650px; padding: 28px; position: relative; overflow: hidden; background: #e7dfd2; }
.architecture-stage::before { content: ''; position: absolute; inset: 0; opacity: .18; border: 1px solid rgba(23,32,29,.18); }
.architecture-stage::after { content: ''; position: absolute; width: 70%; aspect-ratio: 1; left: 12%; top: 8%; border: 1px solid rgba(23,32,29,.16); border-radius: 50%; transform: rotate(-18deg); }
.stage-meta, .stage-footer { position: relative; z-index: 3; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: .04em; }
.stage-meta span:first-child { color: var(--red); }
.stage-footer { position: absolute; bottom: 26px; left: 28px; right: 28px; }
.text-architecture { position: absolute; z-index: 2; inset: 96px 8% 80px; transition: transform .4s ease; }
.text-architecture:hover { transform: scale(1.025); }
.word { position: absolute; border: 0; background: transparent; padding: 0; font-family: var(--serif); color: var(--ink); font-size: clamp(14px, 1.65vw, 23px); line-height: 1.6; cursor: pointer; opacity: .72; transition: color .25s, opacity .25s, transform .4s; }
.word:hover, .word.active { color: var(--red); opacity: 1; transform: scale(1.14); }
.word.structure { font-weight: 700; font-size: clamp(20px, 3vw, 44px); }
.word.space { color: var(--blue); }
.word.emotion { font-size: clamp(13px, 1.45vw, 20px); writing-mode: vertical-rl; }
.word.time { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.arch-line { position: absolute; background: var(--ink); opacity: .18; transform-origin: left center; }
.arch-line.h { height: 1px; width: 100%; }
.arch-line.v { width: 1px; height: 100%; }
.arch-portal { position: absolute; border: 1px solid var(--ink); border-bottom: 0; border-radius: 100px 100px 0 0; opacity: .3; }
.building-panel { padding: 34px 34px 30px; background: var(--white); display: flex; flex-direction: column; }
.building-header .eyebrow { margin-bottom: 15px; }
h3 { font-size: clamp(26px, 3vw, 44px); line-height: 1.35; font-weight: 500; margin-bottom: 12px; }
.building-header p:not(.eyebrow) { font-size: 13px; color: var(--muted); line-height: 1.9; max-width: 260px; margin-bottom: 24px; }
.building-details { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.panel-divider { height: 1px; background: var(--line); margin: 25px 0 15px; }
.text-list { flex: 1; }
.text-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); cursor: pointer; transition: padding .25s; }
.text-item:hover { padding-left: 6px; }
.text-item .item-number { font-family: var(--mono); color: var(--red); font-size: 10px; padding-top: 4px; }
.text-item strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.text-item p { color: var(--muted); font-size: 11px; line-height: 1.75; margin-bottom: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 25px; }
.text-button { padding: 0; border: 0; background: transparent; font-size: 11px; text-align: left; }
.text-button span { color: var(--red); font-family: var(--mono); font-size: 15px; margin-left: 7px; }
.text-button:hover { color: var(--red); }
.next-button { width: 43px; height: 43px; border: 1px solid var(--ink); background: var(--paper); font-size: 0; transition: background .25s; }
.next-button span { font-family: var(--mono); font-size: 19px; }
.next-button:hover { background: var(--red); color: var(--white); border-color: var(--red); }
.building-rail { display: flex; gap: 8px; margin-top: 22px; overflow-x: auto; padding-bottom: 6px; }
.rail-item { flex: 0 0 auto; min-width: 115px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); padding: 11px 0; text-align: left; transition: color .25s, border-color .25s; }
.rail-item span { display: block; font-family: var(--mono); font-size: 9px; margin-bottom: 8px; }
.rail-item strong { font-size: 12px; font-weight: 500; }
.rail-item:hover, .rail-item.active { border-color: var(--red); color: var(--ink); }

.reading-section { padding: 7vh 10vw 10vh; background: var(--ink); color: var(--paper); }
.reading-topline { display: flex; justify-content: space-between; color: #aeb6aa; font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.back-button { padding: 0; color: inherit; font-family: var(--mono); font-size: 10px; }
.reading-layout { display: grid; grid-template-columns: 1fr 310px; gap: 14vw; max-width: 1180px; margin: 11vh auto 0; }
.reading-article h2 { color: var(--paper); font-size: clamp(42px, 6vw, 86px); margin-bottom: 40px; }
.reading-full { max-width: 670px; margin: 0; color: #c1c7bd; font-size: 16px; line-height: 2; white-space: pre-wrap; }
.reading-source { margin-top: 52px; padding-top: 14px; border-top: 1px solid #3c4740; display: flex; flex-direction: column; gap: 10px; max-width: 520px; font-family: var(--mono); font-size: 9px; color: #849087; }
.reading-source strong { color: #c1c7bd; font-weight: 400; }
.reading-keywords { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.reading-keywords span { border: 1px solid #536158; padding: 6px 9px; font-family: var(--mono); color: #aeb6aa; font-size: 9px; }
.reading-aside { border-left: 1px solid #3c4740; padding-left: 28px; align-self: start; }
.reading-aside .eyebrow { color: var(--red-light); }
.reading-aside h3 { font-size: 30px; }
.reading-aside p:not(.eyebrow) { color: #aeb6aa; font-size: 12px; line-height: 1.8; }
.mini-timeline { margin: 28px 0 34px; border-left: 1px solid #536158; }
.mini-node { padding: 0 0 24px 18px; position: relative; }
.mini-node::before { content: ''; position: absolute; width: 7px; height: 7px; background: var(--red-light); left: -4px; top: 4px; }
.mini-node span { font-family: var(--mono); font-size: 9px; color: var(--red-light); }
.mini-node strong { display: block; margin-top: 7px; color: var(--paper); font-size: 13px; font-weight: 500; }

.timeline-section { padding-bottom: 10vh; }
.timeline-heading { align-items: start; }
.timeline-heading .back-button { margin-top: 4px; }
.timeline-intro { display: flex; justify-content: space-between; gap: 30px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 9px; color: var(--muted); }
.timeline-track { position: relative; display: flex; gap: 0; padding: 90px 0 58px; overflow-x: auto; }
.timeline-track::before { content: ''; position: absolute; left: 0; right: 0; top: 126px; height: 1px; background: var(--ink); opacity: .45; }
.timeline-node { flex: 0 0 250px; position: relative; padding: 0 20px 0 0; }
.timeline-node:not(:first-child) { padding-left: 20px; }
.timeline-dot { position: absolute; top: 30px; left: -4px; width: 9px; height: 9px; background: var(--red); border-radius: 50%; z-index: 1; }
.timeline-node:first-child .timeline-dot { left: 0; }
.timeline-year { font-family: var(--mono); color: var(--red); font-size: 11px; }
.timeline-card { margin-top: 54px; padding: 18px; border-top: 1px solid var(--ink); min-height: 180px; background: color-mix(in srgb, var(--white) 48%, transparent); cursor: pointer; transition: transform .25s, background .25s; }
.timeline-card:hover { transform: translateY(-5px); background: var(--white); }
.timeline-card strong { display: block; font-size: 16px; margin-bottom: 13px; font-weight: 500; }
.timeline-card p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-bottom: 14px; }
.timeline-card small { color: var(--red); font-family: var(--mono); font-size: 9px; }
.footer { padding: 24px 6vw; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-family: var(--mono); font-size: 9px; border-top: 1px solid var(--line); }
.menu-drawer { position: fixed; z-index: 30; top: 44px; right: 4.8vw; width: 250px; padding: 16px 19px; background: var(--ink); color: var(--paper); box-shadow: 0 20px 50px rgba(23,32,29,.18); }
.menu-drawer button { display: block; width: 100%; padding: 11px 0; background: transparent; color: var(--paper); border: 0; border-bottom: 1px solid #3c4740; text-align: left; font-size: 13px; }
.menu-drawer button:hover { color: var(--red-light); }
.menu-drawer p { color: #aeb6aa; font-size: 10px; line-height: 1.7; margin: 18px 0 4px; }
[hidden] { display: none !important; }

@media (max-width: 800px) {
  .topbar { padding: 14px 5vw; }
  .topbar-right { gap: 14px; }
  .source-status { display: none; }
  .hero-section { min-height: 680px; padding: 9vh 8vw 7vh; display: block; }
  .hero-section::after { right: -15vw; bottom: 5vw; font-size: 180px; }
  .hero-index { margin-top: 90px; align-items: flex-start; }
  .hero-index strong { text-align: left; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .explore-section, .timeline-section { padding: 9vh 5vw 8vh; }
  .section-heading, .timeline-heading { margin-bottom: 38px; align-items: start; }
  .heading-side { padding-top: 9px; }
  .heading-rule { width: 28px; }
  .explore-layout { display: block; }
  .architecture-stage { min-height: 490px; }
  .building-panel { min-height: 590px; padding: 29px 24px; }
  .text-architecture { inset: 90px 5% 70px; }
  .word { font-size: 15px; }
  .word.structure { font-size: 28px; }
  .building-rail { margin-bottom: 8px; }
  .reading-section { padding: 6vh 7vw 9vh; }
  .reading-layout { display: block; margin-top: 8vh; }
  .reading-aside { border-left: 0; border-top: 1px solid #3c4740; margin-top: 70px; padding: 32px 0 0; }
  .timeline-intro { display: block; }
  .timeline-track { padding-top: 65px; }
  .timeline-track::before { top: 101px; }
  .timeline-card { margin-top: 40px; }
  .footer { display: block; line-height: 2; }
  .footer span { display: block; }
}

/* Immersive text-scene treatment inspired by Chinese-PhoenixCrown's dark scene and text curtain. */
:root {
  --paper: #081318;
  --paper-deep: #0e2025;
  --ink: #d8e2dc;
  --muted: #8c9c98;
  --line: #294047;
  --red: #cf795e;
  --red-light: #e39a78;
  --blue: #8ebfb8;
  --white: #102126;
}

body { background: var(--paper); color: var(--ink); }
.topbar { border-bottom-color: rgba(142,191,184,.2); background: rgba(8,19,24,.88); }
.brand-mark { background: var(--red); color: var(--paper); }
.brand small, .source-status, .hero-note, .hero-index, .heading-side, .stage-meta, .stage-footer { color: #8c9c98; }
.source-status i { background: var(--red-light); }
.source-status.live i { background: #8ebfb8; }
.menu-button span { background: var(--ink); }
.hero-section { min-height: calc(100vh - 76px); grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 5vw; padding: 6vh 6vw; background: var(--paper); }
.hero-section::after { color: transparent; -webkit-text-stroke-color: rgba(142,191,184,.12); }
.hero-visual { grid-column: 1; grid-row: 1 / span 2; min-height: 640px; height: min(76vh, 760px); position: relative; overflow: hidden; border: 1px solid rgba(142,191,184,.18); background: #0b1b20; }
.hero-visual::before { content: ''; position: absolute; inset: 8% 14% 18%; border: 1px solid rgba(142,191,184,.16); border-top: 0; transform: perspective(650px) rotateX(7deg); }
.hero-visual::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 17%; height: 1px; background: rgba(142,191,184,.25); box-shadow: 0 -94px 0 rgba(142,191,184,.1), 0 -188px 0 rgba(142,191,184,.07); }
#heroCurtainCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.hero-roof { position: absolute; z-index: 3; top: 18%; height: 22%; border: 1px solid rgba(195,168,117,.58); border-bottom: 0; transform: skewX(-15deg); pointer-events: none; }
.hero-roof-left { left: 17%; width: 32%; border-radius: 100% 0 0 0; }
.hero-roof-right { right: 17%; width: 32%; border-radius: 0 100% 0 0; transform: skewX(15deg); }
.hero-visual-caption { position: absolute; z-index: 4; left: 20px; right: 20px; bottom: 18px; display: flex; justify-content: space-between; color: #9bbdb5; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.hero-visual-caption span:first-child { color: var(--red-light); }
.hero-copy { grid-column: 2; grid-row: 1; align-self: center; z-index: 4; }
.hero-copy .eyebrow, .eyebrow { color: var(--red-light); }
h1 { color: var(--ink); font-size: clamp(50px, 6.8vw, 94px); }
.hero-description { color: #9bb0aa; }
.hero-index { grid-column: 2; grid-row: 2; align-self: end; justify-self: start; padding-bottom: 5px; }
.hero-index strong { color: var(--ink); }
.index-line { background: var(--red-light); }
.primary-button { background: var(--red); border-color: var(--red); color: var(--paper); }
.primary-button:hover { background: var(--red-light); border-color: var(--red-light); }
.explore-section, .timeline-section { background: var(--paper); }
.section-heading, .timeline-heading { border: 0; }
h2, h3 { color: var(--ink); }
.architecture-stage { background: #0b1b20; border: 1px solid rgba(142,191,184,.2); }
.architecture-stage::before { opacity: .28; border-color: rgba(142,191,184,.18); }
.architecture-stage::after { border-color: rgba(195,168,117,.18); }
#textCurtainCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.text-architecture { z-index: 2; }
.word { color: #c4d9d2; }
.word.space { color: #8ebfb8; }
.word.time { color: #c3a875; }
.word:hover, .word.active { color: var(--red-light); }
.arch-line { background: #8ebfb8; opacity: .22; }
.arch-portal { border-color: #c3a875; opacity: .38; }
.building-panel { background: #102126; border: 1px solid rgba(142,191,184,.18); border-left: 0; }
.building-header p:not(.eyebrow), .building-details, .text-item p, .timeline-intro, .timeline-card p { color: #9bb0aa; }
.panel-divider, .text-item { border-color: rgba(142,191,184,.2); }
.text-item:hover { background: rgba(142,191,184,.06); }
.text-item .item-number, .timeline-year { color: var(--red-light); }
.next-button, .rail-item { border-color: rgba(142,191,184,.35); color: #b8cec7; background: transparent; }
.next-button:hover { background: var(--red); border-color: var(--red); }
.rail-item:hover, .rail-item.active { color: var(--ink); border-color: var(--red-light); }
.reading-section { background: #061015; }
.timeline-track::before, .timeline-card { border-color: rgba(142,191,184,.25); }
.timeline-card { background: rgba(16,33,38,.75); }
.timeline-card:hover { background: #142b31; }
.footer { border-color: rgba(142,191,184,.2); color: #8c9c98; }
.menu-drawer { background: #10272c; border: 1px solid rgba(142,191,184,.22); }

@media (max-width: 800px) {
  .hero-section { display: block; min-height: 0; padding: 5vh 5vw 8vh; }
  .hero-visual { min-height: 500px; height: 68vh; }
  .hero-copy { margin-top: 50px; }
  .hero-index { margin-top: 58px; }
  .building-panel { border-left: 1px solid rgba(142,191,184,.18); }
}

/* Full-screen exhibition view: the building is the page, and its text is the facade. */
:root {
  --archive-paper: #f1ecdc;
  --archive-paper-light: #f7f2e4;
  --archive-ink: #685f50;
  --archive-soft: #a39a86;
  --archive-roof: #c39a6f;
  --archive-accent: #b57d4e;
}

body { background: var(--archive-paper); color: var(--archive-ink); overflow-x: hidden; }
.topbar { position: fixed; inset: 0 0 auto; z-index: 30; min-height: 44px; padding: 6px 18px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--archive-ink) 12%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--archive-paper-light) 94%, transparent), color-mix(in srgb, var(--archive-paper) 84%, transparent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--archive-ink) 6%, transparent); backdrop-filter: blur(14px) saturate(.82); -webkit-backdrop-filter: blur(14px) saturate(.82); }
.brand { flex: 0 0 auto; min-width: auto; gap: 0; color: color-mix(in srgb, var(--archive-ink) 92%, #171713); }
.brand strong { font-family: 'Huiwen Mincho Improved', 'Songti SC', serif; font-size: 16px; font-weight: 400; letter-spacing: .12em; }
.brand small { display: none; }
.primary-nav { margin-left: 26px; margin-right: auto; gap: 24px; }
.nav-item { min-width: auto; padding: 0; flex-direction: row; border: 0; color: color-mix(in srgb, var(--archive-ink) 70%, var(--archive-paper)); opacity: 1; gap: 0; }
.nav-item span { display: none; }
.nav-item strong { font-size: 12px; font-weight: 400; white-space: nowrap; }
.nav-item:hover, .nav-item.active { border: 0; color: color-mix(in srgb, var(--archive-ink) 94%, #171713); }
.nav-item.active strong { color: var(--archive-accent); }
.topbar-right { flex: 0 0 auto; gap: 16px; }
.source-status, .icon-button, .menu-button { color: var(--archive-soft); }
.source-status { display: none; }
.icon-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid color-mix(in srgb, var(--archive-soft) 42%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--archive-paper-light) 45%, transparent); color: var(--archive-soft); font-size: 15px; transition: color .25s, border-color .25s, background .25s, transform .25s; }
.icon-button:hover { color: var(--archive-accent); border-color: var(--archive-accent); transform: translateY(-1px); }
.icon-button[aria-pressed="true"] { color: var(--archive-accent); border-color: var(--archive-accent); background: color-mix(in srgb, var(--archive-accent) 12%, var(--archive-paper-light)); }
.menu-button { display: none; }

.archive-home { min-height: 100svh; height: 100svh; position: relative; overflow: hidden; background: linear-gradient(122deg, var(--card-deep, #d2c7b7) 0%, var(--card-paper, var(--archive-paper)) 43%, var(--card-wash, var(--archive-paper-light)) 76%, var(--card-glow, #eee2cf) 100%); color: var(--card-ink, var(--archive-ink)); user-select: none; touch-action: pan-y; transition: background .85s ease, color .45s ease; }
.archive-home::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(rgba(125, 102, 67, .12) .55px, transparent .65px); background-size: 5px 5px; mix-blend-mode: multiply; }
.archive-center { width: min(58vw, 780px); height: 100%; margin: 0 auto; position: relative; display: flex; align-items: center; justify-content: center; }
.archive-title { position: absolute; z-index: 8; top: 68px; left: 0; right: 0; text-align: center; }
.archive-title h1 { margin: 0; color: var(--card-accent, var(--archive-accent)); font-family: "汇文明朝体", "Huiwen-mincho", "Songti SC", serif; font-size: 42px; font-weight: 400; line-height: 1.15; letter-spacing: .12em; text-indent: .12em; }
.archive-title p { display: none; }
.archive-stage { width: 100%; height: min(78vh, 720px); margin-top: 56px; position: relative; overflow: visible; cursor: pointer; transform: translateY(16px); }
#textCurtainCanvas { position: absolute; inset: 105px 4% 52px; z-index: 0; width: 92%; height: auto; opacity: .56; pointer-events: none; }
.text-architecture { position: absolute; z-index: 3; inset: 24px 0 48px; transition: transform .4s ease; }
.canvas-building-wrap { position: absolute; inset: 0 2%; }
.building-source-image { position: absolute; z-index: 4; top: 0; left: 50%; width: 84%; height: 42%; transform: translateX(-50%); object-fit: contain; object-position: center top; mix-blend-mode: multiply; opacity: .96; pointer-events: none; filter: saturate(.82) contrast(.96); }
.building-text-canvas { position: absolute; z-index: 5; left: 0; right: 0; top: 40%; bottom: 1%; width: 100%; height: 59%; cursor: pointer; }
.building-canvas-hint { display: none; }
.text-building { position: absolute; inset: 0 10%; color: #968a74; }
.building-roof { position: absolute; z-index: 5; top: 0; left: 8%; right: 8%; height: 150px; }
.building-roof::before { content: ''; position: absolute; left: 7%; right: 7%; top: 31px; height: 58px; background: var(--archive-roof); opacity: .9; clip-path: polygon(0 30%, 8% 8%, 92% 8%, 100% 30%, 91% 57%, 9% 57%); box-shadow: 0 7px 0 rgba(139, 101, 61, .25); }
.building-roof::after { content: ''; position: absolute; left: 18%; right: 18%; top: 75px; height: 42px; background: #b7875b; clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%); opacity: .78; }
.building-roof span, .building-roof i, .building-roof b { position: absolute; display: block; z-index: 2; font-style: normal; }
.building-roof span { left: 0; right: 0; top: 48px; height: 4px; background: #ae7e52; box-shadow: 0 14px 0 rgba(111, 77, 46, .32), 0 28px 0 rgba(111, 77, 46, .22); }
.building-roof i { left: 4%; top: 21px; width: 18%; height: 30px; border-top: 3px solid #af7c50; border-radius: 90% 0 0 0; transform: skewX(-19deg); }
.building-roof b { right: 4%; top: 21px; width: 18%; height: 30px; border-top: 3px solid #af7c50; border-radius: 0 90% 0 0; transform: skewX(19deg); }
.text-building .building-source-image { position: absolute; z-index: 8; inset: 0; width: 100%; height: 130px; object-fit: contain; mix-blend-mode: multiply; opacity: .93; }
.building-facade { position: absolute; z-index: 4; left: 8%; right: 8%; top: 105px; bottom: 0; overflow: hidden; }
.building-facade::before { content: ''; position: absolute; inset: 0; border-top: 4px solid rgba(152, 112, 73, .38); border-left: 1px solid rgba(152, 112, 73, .24); border-right: 1px solid rgba(152, 112, 73, .24); pointer-events: none; }
.building-columns { position: absolute; inset: 17px 5px 0; display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; justify-content: center; }
.building-column { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; padding-top: calc((var(--column, 1) % 4) * 9px); color: rgba(105, 96, 79, .76); font-family: var(--serif); font-size: clamp(10px, 1.08vw, 15px); line-height: 1.05; writing-mode: vertical-rl; }
.building-column:nth-child(2n) { padding-top: 30px; }
.building-column:nth-child(3n) { padding-top: 9px; }
.building-column:nth-child(5n) { padding-top: 46px; }
.building-column:nth-child(8n) { padding-top: 22px; }
.building-glyph { width: 1.05em; height: 1.1em; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; writing-mode: vertical-rl; cursor: pointer; transition: color .2s, transform .2s; }
.building-glyph:hover, .building-glyph:focus-visible { color: var(--archive-accent); transform: scale(1.35); outline: 0; }
.building-arch { position: absolute; z-index: 6; left: 38%; right: 38%; top: 9%; bottom: -1px; border: 1px solid rgba(112, 87, 57, .38); border-bottom: 0; border-radius: 150px 150px 0 0; background: rgba(241, 236, 220, .8); pointer-events: none; }
.building-arch::after { content: ''; position: absolute; left: 18%; right: 18%; top: 14%; bottom: 0; border-left: 1px solid rgba(112, 87, 57, .18); border-right: 1px solid rgba(112, 87, 57, .18); }
.archive-stage-caption { position: absolute; z-index: 10; left: 9%; right: 9%; bottom: 8px; display: flex; justify-content: space-between; color: var(--card-ink, var(--archive-soft)); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.archive-side { position: absolute; z-index: 4; top: 34%; width: 19vw; height: 43vh; padding: 0; border: 0; background: transparent; color: rgba(122, 112, 94, .28); text-align: center; cursor: pointer; transition: color .35s, transform .35s, opacity .35s; }
.archive-side:hover { color: rgba(122, 112, 94, .52); }
.archive-side-prev { left: -5vw; transform: translateX(-7%); }
.archive-side-next { right: -5vw; transform: translateX(7%); }
.archive-side-prev:hover { transform: translateX(-3%); }
.archive-side-next:hover { transform: translateX(3%); }
.archive-side .peek-kicker, .archive-side strong { position: relative; z-index: 5; display: block; text-align: center; font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .08em; }
.archive-side strong { margin-top: 9px; font-family: var(--serif); font-size: 18px; letter-spacing: .12em; }
.peek-building-image-wrap { position: absolute; z-index: 2; top: 58px; left: 2%; right: 2%; height: 190px; display: grid; place-items: start center; overflow: hidden; pointer-events: none; }
.peek-building-image { width: 100%; height: 100%; object-fit: contain; object-position: center top; opacity: .48; mix-blend-mode: multiply; filter: saturate(.68) contrast(.9); transition: opacity .35s, transform .35s; }
.archive-side:hover .peek-building-image { opacity: .68; transform: scale(1.025); }
.archive-side .text-building { top: 60px; transform: scale(.72); transform-origin: top center; }
.text-building.is-mini .building-roof { height: 112px; }
.text-building.is-mini .building-facade { top: 76px; }
.text-building.is-mini .building-columns { grid-template-columns: repeat(7, 1fr); font-size: 10px; }
.text-building.is-mini .building-arch { left: 37%; right: 37%; }
.archive-bottom { position: absolute; z-index: 12; left: 24px; right: 24px; bottom: 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 18px; }
.archive-meta, .archive-instruction { display: flex; align-items: center; gap: 12px; color: var(--card-soft, var(--archive-soft)); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.archive-meta { flex-direction: column; align-items: flex-start; }
.archive-meta span:first-child { color: var(--card-accent, var(--archive-accent)); }
.archive-instruction { justify-content: flex-end; }
.archive-rule { width: 34px; height: 1px; background: rgba(140, 115, 82, .38); }
.archive-switcher { display: flex; align-items: center; justify-content: center; gap: 20px; }
.archive-arrow { padding: 3px 0; border: 0; background: transparent; color: var(--card-soft, var(--archive-soft)); font-family: var(--mono); font-size: 18px; transition: color .2s, transform .2s; }
.archive-arrow:hover { color: var(--card-accent, var(--archive-accent)); transform: scale(1.2); }
.archive-dots { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 110px; }
.archive-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(135, 119, 96, .3); }
.archive-dot:hover, .archive-dot.active { background: var(--card-accent, var(--archive-accent)); transform: scale(1.35); }
.archive-dot.active { box-shadow: 0 0 0 3px rgba(181, 125, 78, .12); }
.archive-data { display: none !important; }
.footer { display: none; }
@media (max-width: 800px) {
  .topbar { padding: 6px 17px; }
  .primary-nav { margin-left: 22px; gap: 17px; overflow: visible; }
  .topbar-right { display: none; }
  .archive-center { width: 100%; }
  .archive-title { top: 64px; padding: 0 24px; }
  .archive-title h1 { font-size: 30px; letter-spacing: .1em; }
  .archive-stage { width: 96%; height: 72vh; margin-top: 100px; transform: translateY(10px); }
  .text-architecture { inset: 34px -4% 55px; }
  .text-building { inset-inline: 5%; }
  .building-columns { gap: 1px; }
  .building-column { font-size: 10px; }
  .building-roof { left: 4%; right: 4%; }
  .building-facade { left: 4%; right: 4%; }
  .archive-side { display: none; }
  .archive-stage-caption { left: 5%; right: 5%; font-size: 8px; }
  .archive-bottom { left: 16px; right: 16px; bottom: 14px; display: block; }
  .archive-meta { display: none; }
  .archive-switcher { gap: 14px; }
  .archive-instruction { justify-content: center; margin-top: 14px; font-size: 8px; }
  .archive-dots { gap: 8px; }
}

/* Primary project navigation and the building switcher stay visible on the first page. */
.brand { flex: 1 1 0; min-width: 150px; }
.primary-nav { display: flex; align-items: stretch; gap: 24px; flex: 0 1 auto; }
.nav-item { min-width: 112px; padding: 9px 0 7px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; border: 0; border-top: 1px solid rgba(142,191,184,.3); background: transparent; color: color-mix(in srgb, var(--archive-ink) 96%, var(--archive-paper)); text-align: left; transition: color .25s, border-color .25s; }
.nav-item span { font-family: var(--mono); font-size: 9px; color: #b8cec7; }
.nav-item strong { font-family: var(--serif); font-size: 12px; font-weight: 500; white-space: nowrap; }
.nav-item:hover, .nav-item.active { color: var(--ink); border-top-color: var(--red-light); }
.nav-item.active strong { color: #7d3b28; }
.nav-item.is-upcoming { opacity: 1; }
.topbar-right { flex: 1 1 0; justify-content: flex-end; }
.switcher-caption { display: flex; justify-content: space-between; gap: 24px; margin: 42px 0 0; padding: 12px 0 10px; border-top: 1px solid rgba(142,191,184,.22); color: #8c9c98; font-family: var(--mono); font-size: 9px; }
.switcher-caption span:first-child { color: var(--red-light); }
.building-rail { margin-top: 0; padding-bottom: 0; gap: 16px; }
.rail-item { min-width: clamp(130px, 14vw, 195px); padding: 14px 0 13px; border-top-color: rgba(142,191,184,.3); }
.rail-item strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-item small { display: block; margin-top: 8px; color: #6e8580; font-family: var(--mono); font-size: 8px; }
.reading-reference-list { display: grid; border-top: 1px solid color-mix(in srgb, var(--page-ink) 14%, transparent); }
.reading-reference-list a { min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 11px 0; border-bottom: 1px solid color-mix(in srgb, var(--page-ink) 14%, transparent); color: var(--page-accent); text-decoration: none; }
.reading-reference-list a:hover { color: var(--page-ink); }
.reading-reference-list a > span { min-width: 0; display: grid; gap: 3px; }
.reading-reference-list b { overflow-wrap: anywhere; font-size: 10px; font-weight: 500; }
.reading-reference-list small { color: color-mix(in srgb, var(--page-ink) 62%, var(--page-paper)); font-size: 8px; line-height: 1.5; }
.reading-reference-list i { font-size: 14px; font-style: normal; }
.nav-notice { position: fixed; z-index: 40; top: 92px; right: 4.8vw; max-width: min(360px, 82vw); padding: 13px 16px; border: 1px solid rgba(227,154,120,.48); background: #10272c; color: #c4d9d2; box-shadow: 0 14px 38px rgba(0,0,0,.24); font-size: 12px; line-height: 1.7; }

@media (max-width: 1050px) {
  .topbar { flex-wrap: wrap; row-gap: 13px; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; gap: 18px; border-top: 1px solid rgba(142,191,184,.14); }
  .nav-item { flex: 0 0 125px; }
  .topbar-right { min-width: 180px; }
}

@media (max-width: 800px) {
  .topbar-right { min-width: auto; }
  .switcher-caption { display: block; line-height: 1.8; }
  .switcher-caption span { display: block; }
  .building-rail { gap: 14px; }
  .rail-item { min-width: 142px; }
  .nav-notice { top: 142px; right: 5vw; }
}

/* Keep the reference-style header above legacy component rules. */
.topbar { flex-wrap: nowrap; }
.brand { flex: 0 0 auto; min-width: auto; }
.primary-nav { order: 0; width: auto; margin-left: 26px; margin-right: auto; overflow: visible; gap: 24px; border-top: 0; }
.nav-item { min-width: auto; flex: 0 0 auto; padding: 0; flex-direction: row; align-items: center; gap: 0; border: 0; border-top: 0; }
.nav-item span { display: none; }
.nav-item strong { font-size: 12px; font-weight: 400; }
.nav-item:hover, .nav-item.active { border: 0; border-top: 0; }
.topbar-right { flex: 0 0 auto; min-width: 0; }

@media (max-width: 1050px) {
  .topbar { flex-wrap: nowrap; row-gap: 0; }
  .primary-nav { order: 0; width: auto; overflow: visible; border-top: 0; }
  .nav-item { flex: 0 0 auto; }
  .topbar-right { min-width: 0; }
}

@media (max-width: 800px) {
  .topbar { flex-wrap: nowrap; }
  .primary-nav { width: auto; margin-left: 20px; gap: 16px; }
  .nav-item { flex: 0 0 auto; }
}

/* Interior pages inherit a light palette sampled from the current building image. */
:root {
  --page-paper: #eee7d8;
  --page-wash: #f8f1e4;
  --page-accent: #a56d4b;
  --page-ink: #665a4b;
}

body[data-view="reading"],
body[data-view="timeline"] {
  background: var(--page-paper);
  color: var(--page-ink);
}

body[data-view="reading"] .topbar,
body[data-view="timeline"] .topbar {
  color: var(--page-ink);
  background: color-mix(in srgb, var(--page-paper) 82%, transparent);
  backdrop-filter: blur(12px);
}

body[data-view="reading"] .brand,
body[data-view="timeline"] .brand,
body[data-view="reading"] .nav-item,
body[data-view="timeline"] .nav-item {
  color: color-mix(in srgb, var(--page-ink) 72%, transparent);
}

.reading-section,
.timeline-section {
  min-height: 100svh;
  color: var(--page-ink);
  background: linear-gradient(135deg, var(--page-paper) 0%, var(--page-wash) 58%, color-mix(in srgb, var(--page-accent) 12%, var(--page-wash)) 100%);
}

.reading-section { padding-top: max(96px, 10vh); }
.timeline-section { padding-top: max(96px, 10vh); }
.reading-topline { position: relative; z-index: 2; }

.reading-topline,
.reading-full,
.reading-aside p:not(.eyebrow),
.timeline-intro,
.timeline-card p {
  color: color-mix(in srgb, var(--page-ink) 68%, var(--page-paper));
}

.reading-article h2,
.reading-aside h3,
.mini-node strong,
.timeline-section h2,
.timeline-section h3,
.timeline-card strong {
  color: var(--page-ink);
}

.reading-article h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.28;
}

.reading-full { font-size: 17px; }
.reading-source { font-size: 11px; line-height: 1.7; }
.reading-keywords span { font-size: 11px; padding: 7px 11px; }

.mini-node {
  padding: 18px 22px 24px;
  text-align: center;
}

.mini-node span {
  display: block;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1.6;
}

.mini-node strong {
  font-size: 14px;
  line-height: 1.6;
}

.timeline-card strong {
  font-size: 14px;
  line-height: 1.6;
}

.eyebrow,
.reading-aside .eyebrow,
.mini-node span,
.timeline-year,
.timeline-card small,
.reading-reference-list a {
  color: var(--page-accent);
}

.reading-source,
.reading-aside,
.mini-timeline,
.timeline-intro,
.timeline-track::before,
.timeline-card {
  border-color: color-mix(in srgb, var(--page-ink) 22%, transparent);
}

.reading-source,
.reading-source strong {
  color: color-mix(in srgb, var(--page-ink) 72%, var(--page-paper));
}

.reading-keywords span {
  color: var(--page-ink);
  border-color: color-mix(in srgb, var(--page-accent) 42%, transparent);
  background: color-mix(in srgb, var(--page-wash) 72%, transparent);
}

.mini-node::before,
.timeline-dot {
  background: var(--page-accent);
}

.timeline-card {
  background: color-mix(in srgb, var(--page-wash) 82%, transparent);
}

.timeline-card:hover {
  background: color-mix(in srgb, var(--page-paper) 45%, white);
}

.reading-section .primary-button,
.timeline-section .primary-button {
  color: #fffaf3;
  border-color: var(--page-accent);
  background: var(--page-accent);
}

@media (max-width: 800px) {
  .reading-section, .timeline-section { padding-top: 88px; }
  .reading-article h2 { font-size: 34px; }
  .reading-aside { border-top-color: color-mix(in srgb, var(--page-ink) 22%, transparent); }
}

/* Route map */
body[data-view="map"] {
  background: #e7ebe6;
  color: #202723;
  overflow: hidden;
}

body[data-view="map"] .topbar {
  color: #26302b;
  border-bottom-color: #b9c0b9;
  background: rgba(244, 246, 241, .94);
}

body[data-view="map"] .brand,
body[data-view="map"] .nav-item { color: #66706a; }
body[data-view="map"] .nav-item.active strong { color: #a84b34; }

.map-section {
  height: 100svh;
  min-height: 640px;
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(380px, .72fr);
  background: #dfe5df;
  color: #202723;
}

.map-stage {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #b6beb7;
}

.map-titlebar {
  position: absolute;
  z-index: 700;
  top: 0;
  left: 0;
  right: 0;
  min-height: 124px;
  padding: 22px 28px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
  border-bottom: 1px solid rgba(159, 169, 161, .72);
  background: rgba(244, 246, 241, .91);
  backdrop-filter: blur(8px);
}

.map-kicker {
  margin: 0 0 12px;
  color: #a84b34;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
}

.map-titlebar h2 {
  max-width: 540px;
  margin: 0;
  color: #25302a;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0;
}

.map-titlebar h2 em { color: #a84b34; }

.map-route-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: #65706a;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
}

.map-route-summary strong {
  color: #26302b;
  font-size: 16px;
  font-weight: 400;
}

.map-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#wukangMap {
  width: 100%;
  height: 100%;
  display: block;
  background: #dfe5df;
  font-family: var(--serif);
}
.map-loading {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  padding: 9px 12px;
  border: 1px solid rgba(116, 128, 119, .68);
  background: rgba(250, 250, 247, .88);
  color: #58655d;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease;
  pointer-events: none;
}
.map-loading span::after { content: "..."; display: inline-block; width: 16px; overflow: hidden; animation: map-loading-dots 1.2s steps(4, end) infinite; }
@keyframes map-loading-dots { 0%, 20% { width: 0; } 50% { width: 8px; } 80%, 100% { width: 16px; } }
.map-loading.is-hidden { opacity: 0; }

.maplibregl-map { color: #2e3933; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right { z-index: 650; }
.maplibregl-ctrl-attrib {
  color: #647068;
  background: rgba(247, 248, 244, .88) !important;
  font-family: var(--mono);
  font-size: 7px;
}
.maplibregl-ctrl-attrib a { color: #8f3f2d; }
.maplibregl-ctrl-logo { opacity: .72; transform: scale(.74); transform-origin: left bottom; }

.wukang-marker-icon {
  width: 24px;
  height: 24px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.wukang-label-marker {
  width: 0;
  height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.maplibre-building-dot {
  width: 12px;
  height: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(calc(-50% + var(--dot-x, 0px)), calc(-50% + var(--dot-y, 0px)));
  display: grid;
  place-items: center;
  border: 2px solid #f7f8f4;
  border-radius: 50%;
  background: #43574c;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(67, 87, 76, .12), 0 2px 7px rgba(34, 45, 39, .22);
  font-family: var(--mono);
  font-size: 0;
  line-height: 1;
  transition: transform .18s ease, background .18s ease;
}
.wukang-marker-icon.is-route .maplibre-building-dot {
  width: 22px;
  height: 22px;
  background: #b24f38;
  box-shadow: 0 0 0 5px rgba(178, 79, 56, .16), 0 3px 9px rgba(78, 35, 25, .24);
  font-size: 9px;
}
.wukang-marker-icon:hover .maplibre-building-dot,
.wukang-marker-icon:focus-visible .maplibre-building-dot {
  transform: translate(calc(-50% + var(--dot-x, 0px)), calc(-50% + var(--dot-y, 0px))) scale(1.2);
  background: #202723;
}
.wukang-label-marker:focus-visible { outline: 0; }
.wukang-label-marker:focus-visible .wukang-permanent-label {
  outline: 2px solid #a84b34;
  outline-offset: 2px;
}

.wukang-permanent-label {
  width: max-content;
  max-width: none;
  position: absolute;
  top: 50%;
  padding: 4px 6px;
  border: 1px solid rgba(116, 128, 119, .68);
  border-radius: 2px;
  background: rgba(250, 250, 247, .94);
  color: #26312b;
  box-shadow: 0 2px 8px rgba(33, 44, 38, .12);
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  --label-y: 0px;
}
.wukang-permanent-label.is-left {
  right: calc(100% + 7px);
  transform: translateY(calc(-50% + var(--label-y)));
}
.wukang-permanent-label.is-right {
  left: calc(100% + 7px);
  transform: translateY(calc(-50% + var(--label-y)));
}
.wukang-permanent-label::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  border-top: 1px solid rgba(116, 128, 119, .72);
}
.wukang-permanent-label.is-left::after { right: -8px; }
.wukang-permanent-label.is-right::after { left: -8px; }
.wukang-permanent-label::before {
  content: "";
  width: 0;
  height: var(--leader-height, 0px);
  position: absolute;
  border-left: 1px solid rgba(116, 128, 119, .72);
  pointer-events: none;
}
.wukang-permanent-label.is-left::before { right: -8px; }
.wukang-permanent-label.is-right::before { left: -8px; }
.wukang-permanent-label.is-offset-down::before { top: calc(50% - var(--leader-height)); }
.wukang-permanent-label.is-offset-up::before { top: 50%; }
.wukang-permanent-label.is-route {
  border-color: rgba(178, 79, 56, .8);
  color: #903c29;
  background: rgba(255, 250, 246, .97);
}
.map-load-error {
  position: absolute;
  inset: 46% 20px auto;
  color: #69736d;
  font-size: 12px;
  text-align: center;
}

.map-tools {
  position: absolute;
  z-index: 900;
  top: 140px;
  right: 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid #aeb7b0;
  background: rgba(246, 247, 243, .9);
}

.map-tools button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid #c2c9c3;
  background: transparent;
  color: #354139;
  font-family: var(--mono);
  font-size: 18px;
}

.map-tools button:last-child { border-bottom: 0; }
.map-tools button:hover { background: #fff; color: #a84b34; }

.map-legend {
  position: absolute;
  z-index: 700;
  left: 18px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #667169;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.map-legend span { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #52655b; }
.legend-route { width: 18px; height: 0; border-top: 2px dashed #b24f38; }

.map-building-card {
  position: absolute;
  z-index: 1100;
  left: 26px;
  bottom: 24px;
  width: min(440px, calc(100% - 126px));
  min-height: 180px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border: 1px solid #9fa9a1;
  border-radius: 2px;
  background: rgba(249, 249, 245, .97);
  box-shadow: 0 18px 44px rgba(42, 52, 46, .16);
  overflow: hidden;
}

.map-building-card > img {
  width: 150px;
  height: 100%;
  min-height: 180px;
  padding: 18px 10px 0;
  object-fit: contain;
  object-position: center bottom;
  background: #dfe5df;
  filter: saturate(.74);
}

.map-card-copy { min-width: 0; padding: 20px 34px 18px 20px; }
.map-card-copy > span {
  color: #a84b34;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}
.map-card-copy h3 {
  margin: 8px 0 5px;
  color: #26302b;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: 0;
}
.map-card-copy p { margin-bottom: 10px; color: #6b746e; font-size: 10px; line-height: 1.6; }
.map-card-features { display: flex; flex-wrap: wrap; gap: 5px; }
.map-card-features span {
  padding: 3px 6px;
  border: 1px solid #c0c8c1;
  border-radius: 2px;
  color: #59645d;
  font-size: 9px;
}
.map-card-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 9px;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6e7771;
  font-size: 18px;
}
.map-card-link {
  margin-top: 13px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9d422e;
  font-size: 10px;
}
.map-card-link span { margin-left: 5px; font-family: var(--mono); }

.route-planner {
  min-width: 0;
  height: 100%;
  padding: 28px 30px 0;
  overflow-y: auto;
  background: #f3f3ef;
  scrollbar-color: #aeb6af transparent;
}

.planner-heading {
  position: relative;
  padding-bottom: 23px;
  border-bottom: 1px solid #aeb7b0;
}
.planner-heading h2 {
  margin: 0;
  color: #27312c;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
}
.planner-heading > span {
  position: absolute;
  right: 0;
  bottom: 25px;
  color: #7c857f;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.planner-section { padding: 20px 0; border-bottom: 1px solid #c2c9c3; }
.planner-label { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.planner-label > span { color: #a84b34; font-family: var(--mono); font-size: 8px; }
.planner-label > strong { color: #303a34; font-size: 12px; font-weight: 600; }
.planner-label > button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7d867f;
  font-size: 9px;
}
.planner-label > button:hover { color: #a84b34; }
.planner-label > em { margin-left: auto; color: #69736c; font-family: var(--mono); font-size: 8px; font-style: normal; }

.route-duration {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #b6beb7;
}
.route-duration button {
  min-height: 38px;
  padding: 7px 6px;
  border: 0;
  border-right: 1px solid #b6beb7;
  background: transparent;
  color: #647068;
  font-size: 10px;
}
.route-duration button:last-child { border-right: 0; }
.route-duration button:hover { color: #9d422e; }
.route-duration button.active { background: #35463d; color: #fff; }

.keyword-library { display: flex; flex-direction: column; gap: 15px; }
.keyword-group h3 {
  margin: 0 0 8px;
  color: #7a847d;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
}
.keyword-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-group button {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid #b9c1ba;
  border-radius: 2px;
  background: #fafaf7;
  color: #58635c;
  font-size: 9px;
  line-height: 1.3;
}
.keyword-group button:hover { border-color: #a84b34; color: #9d422e; }
.keyword-group button.active { border-color: #a84b34; background: #a84b34; color: #fff; }

.route-stop-list { margin: 0; padding: 0; list-style: none; }
.route-stop-list li { border-top: 1px solid #d4d9d4; }
.route-stop-list li:first-child { border-top: 0; }
.route-stop-list button {
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: #2d3832;
  text-align: left;
}
.route-stop-list button:hover { color: #9d422e; }
.route-stop-list button > span { color: #a84b34; font-family: var(--mono); font-size: 9px; }
.route-stop-list button strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; line-height: 1.45; }
.route-stop-list button small { display: block; margin-top: 2px; color: #7e8781; font-size: 8px; line-height: 1.45; }
.route-stop-list button em { color: #7c867f; font-size: 8px; font-style: normal; white-space: nowrap; }
.route-empty { padding: 15px 0; color: #7b857e; font-size: 10px; line-height: 1.7; }

.ai-route-note {
  margin: 0 -30px;
  padding: 22px 30px 28px;
  background: #2e3f36;
  color: #edf0eb;
}
.ai-note-heading { display: flex; align-items: center; gap: 9px; }
.ai-note-heading span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #cf7258;
  color: #e2866a;
  font-family: var(--mono);
  font-size: 9px;
}
.ai-note-heading strong { font-size: 11px; font-weight: 500; }
.ai-route-note p { margin: 14px 0 15px; color: #e1e6e0; font-size: 12px; line-height: 1.85; }

@media (max-width: 1100px) {
  .map-section { grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); }
  .map-titlebar h2 { font-size: 29px; }
  .map-building-card { width: min(390px, calc(100% - 100px)); grid-template-columns: 120px minmax(0, 1fr); }
  .map-building-card > img { width: 120px; }
  .route-planner { padding-inline: 24px; }
  .ai-route-note { margin-inline: -24px; padding-inline: 24px; }
}

@media (max-width: 800px) {
  body[data-view="map"] { overflow: auto; }
  .map-section { height: auto; min-height: 0; padding-top: 44px; display: block; }
  .map-stage { height: 62svh; min-height: 470px; border-right: 0; border-bottom: 1px solid #b6beb7; }
  .map-titlebar { top: 0; left: 0; right: 0; min-height: 112px; padding: 16px 18px 14px; }
  .map-titlebar h2 { max-width: 270px; font-size: 23px; line-height: 1.28; }
  .map-route-summary { display: none; }
  .map-tools { top: 124px; right: 14px; }
  .map-legend { right: 14px; bottom: 12px; }
  .wukang-permanent-label {
    width: max-content;
    max-width: none;
    padding: 3px 4px;
    font-size: 7px;
    line-height: 1.28;
  }
  .map-building-card {
    left: 14px;
    bottom: 40px;
    width: calc(100% - 72px);
    min-height: 148px;
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .map-building-card > img { width: 96px; min-height: 148px; padding: 12px 6px 0; }
  .map-card-copy { padding: 15px 28px 14px 14px; }
  .map-card-copy h3 { font-size: 16px; }
  .map-card-features span:nth-child(n+3) { display: none; }
  .route-planner { height: auto; overflow: visible; padding: 28px 20px 0; }
  .planner-heading h2 { font-size: 28px; }
  .keyword-group button { min-height: 32px; }
  .route-stop-list button { grid-template-columns: 25px minmax(0, 1fr); }
  .route-stop-list button em { display: none; }
  .ai-route-note { margin-inline: -20px; padding-inline: 20px; }
}

/* Postcard journal studio */
body[data-view="journal"] {
  overflow: hidden;
  background: #e4e7e2;
  color: #28342f;
}

body[data-view="journal"] .topbar {
  color: #2d3a34;
  background: rgba(244, 245, 241, .94);
  border-bottom-color: #c8cec8;
  box-shadow: 0 4px 18px rgba(39, 50, 44, .07);
}

body[data-view="journal"] .brand,
body[data-view="journal"] .nav-item { color: #63706a; }
body[data-view="journal"] .nav-item.active strong { color: #b34f36; }

.journal-section {
  height: 100svh;
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  background: #e4e7e2;
}

.journal-workbench {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #bec5bf;
}

.journal-heading {
  min-height: 118px;
  padding: 22px 34px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid #c6ccc7;
  background: #eff1ed;
}

.journal-kicker {
  margin: 0 0 8px;
  color: #a9523c;
  font-family: var(--mono);
  font-size: 9px;
}

.journal-heading h2 {
  margin: 0;
  color: #2e3b35;
  font-size: 30px;
  line-height: 1.2;
}

.journal-heading h2 em { color: #a9523c; }

.journal-side-tabs {
  width: 188px;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #8c9992;
}

.journal-side-tabs button {
  border: 0;
  border-right: 1px solid #8c9992;
  background: transparent;
  color: #68756f;
  font-size: 11px;
}

.journal-side-tabs button:last-child { border-right: 0; }
.journal-side-tabs button.active { background: #34483e; color: #fff; }

.journal-canvas-zone {
  min-height: 0;
  padding: 18px 34px 14px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: 11px;
  overflow: hidden;
  background-color: #dfe3de;
  background-image: radial-gradient(rgba(54, 71, 62, .12) .6px, transparent .7px);
  background-size: 8px 8px;
}

.journal-card-shell {
  width: min(100%, 900px, calc((100svh - 303px) * 1.48));
  aspect-ratio: 148 / 100;
  position: relative;
  align-self: center;
  filter: drop-shadow(0 18px 24px rgba(45, 51, 46, .18));
}

.journal-postcard {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(66, 68, 61, .24);
  border-radius: 3px;
  background: #fbfaf6;
}

.journal-postcard[data-active="false"] { display: none; }
.journal-postcard > img { width: 100%; height: 100%; display: block; object-fit: cover; }

.journal-front {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.journal-front.is-panning { cursor: grabbing; }
.journal-front > img { pointer-events: none; }

.journal-front-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 56px;
  padding: 10px 16px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(247, 244, 235, .86);
  color: #403d35;
  backdrop-filter: blur(8px);
}

.journal-front-caption span {
  max-width: 42%;
  color: #363c37;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.journal-front-caption strong {
  max-width: 54%;
  color: #69645a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  text-align: right;
}

.journal-back {
  isolation: isolate;
  background-color: #fbfaf6;
  background-image: linear-gradient(rgba(116, 102, 78, .025) 1px, transparent 1px);
  background-size: 100% 5px;
}

.journal-back::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 45px rgba(109, 91, 62, .07);
}

.journal-back-landscape { position: absolute; z-index: 0; inset: 0; transition: opacity .25s; }

.journal-back-divider {
  position: absolute;
  z-index: 12;
  top: 13%;
  bottom: 13%;
  left: 53%;
  width: 1px;
  background: rgba(95, 82, 64, .46);
  pointer-events: none;
}

.journal-postal-code {
  position: absolute;
  z-index: 12;
  top: 9%;
  left: 8%;
  width: 31%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2.58%;
  pointer-events: none;
}

.journal-postal-code span {
  width: auto;
  aspect-ratio: 1;
  border: 1px solid rgba(95, 82, 64, .58);
}

.journal-address-lines {
  position: absolute;
  z-index: 12;
  left: 61%;
  right: 9%;
  bottom: 15%;
  display: grid;
  gap: clamp(20px, 3.1vh, 34px);
  pointer-events: none;
}

.journal-address-lines span { height: 1px; background: rgba(95, 82, 64, .56); }

.journal-sticker-layer { position: absolute; z-index: 5; inset: 0; }

.journal-placed-sticker {
  position: absolute;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 0;
  touch-action: none;
  cursor: grab;
  filter: drop-shadow(0 5px 4px rgba(61, 45, 29, .13));
}

.journal-placed-sticker:active { cursor: grabbing; }
.journal-placed-sticker img { width: 100%; height: auto; display: block; pointer-events: none; }
.journal-placed-sticker.is-selected { outline: 1px dashed #b34f36; outline-offset: 5px; }
.journal-placed-sticker.is-selected::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b34f36;
  box-shadow: 0 0 0 2px #fff;
}

.journal-drop-hint {
  position: absolute;
  z-index: 3;
  left: 19%;
  top: 43%;
  padding: 8px 11px;
  border: 1px dashed rgba(83, 92, 84, .42);
  color: rgba(83, 92, 84, .58);
  font-family: var(--mono);
  font-size: 9px;
  pointer-events: none;
}

.journal-back.is-drag-over { outline: 3px solid #b34f36; outline-offset: -3px; }

.journal-object-toolbar {
  width: min(100%, 900px, calc((100svh - 303px) * 1.48));
  min-height: 48px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #bdc5bf;
  background: rgba(246, 247, 243, .94);
}

.journal-history-tools,
.journal-front-tools,
.journal-selection-tools { display: flex; align-items: center; gap: 7px; }
.journal-front-tools { margin-left: auto; }
.journal-selection-tools { min-width: 0; justify-content: flex-end; }

.journal-icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #44534c;
}

.journal-icon-button svg { width: 16px; height: 16px; }
.journal-icon-button:hover:not(:disabled) { border-color: #8f9b94; background: #fff; }
.journal-icon-button:disabled { opacity: .28; cursor: not-allowed; }
.journal-icon-button.is-danger { color: #a34734; }
.journal-selection-empty { color: #78847e; font-family: var(--mono); font-size: 8px; }

.journal-selection-tools label {
  display: grid;
  grid-template-columns: auto 92px;
  align-items: center;
  gap: 7px;
  color: #68746e;
  font-size: 9px;
}

.journal-selection-tools input { width: 92px; accent-color: #a94e38; }
.journal-object-toolbar.is-front .journal-selection-tools { visibility: hidden; }

.journal-status {
  width: min(100%, 900px);
  min-height: 15px;
  margin: 0;
  color: #66736d;
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.journal-controls {
  height: calc(100svh - 44px);
  overflow-y: auto;
  padding: 27px 28px 0;
  background: #f5f3ed;
  scrollbar-width: thin;
  scrollbar-color: #aeb7b0 transparent;
}

.journal-control-heading {
  padding-bottom: 22px;
  border-bottom: 1px solid #bfc5bf;
  display: grid;
  gap: 5px;
}

.journal-control-heading > span,
.journal-export-panel > div span {
  color: #b04f38;
  font-family: var(--mono);
  font-size: 8px;
}

.journal-control-heading strong { color: #304037; font-size: 24px; font-weight: 500; }
.journal-control-heading small { color: #7e8781; font-size: 9px; }

.journal-control-section { padding: 19px 0 21px; border-bottom: 1px solid #d0d4cf; }
.journal-control-label { margin-bottom: 14px; display: flex; align-items: center; gap: 9px; }
.journal-control-label > span { color: #b04f38; font-family: var(--mono); font-size: 8px; }
.journal-control-label strong { color: #36463e; font-size: 11px; font-weight: 600; }
.journal-control-label em { margin-left: auto; color: #89918c; font-family: var(--mono); font-size: 7px; font-style: normal; }

.journal-field-label {
  margin-bottom: 7px;
  display: block;
  color: #7e8882;
  font-family: var(--mono);
  font-size: 8px;
}

.journal-select {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 10px;
  border: 1px solid #b8c0b9;
  border-radius: 0;
  background: #fbfaf6;
  color: #35443c;
  font-size: 11px;
}

.journal-scene-preview {
  width: 100%;
  height: 80px;
  margin-top: 10px;
  padding: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid #b8c0b9;
  background: #ebece7;
  text-align: left;
}

.journal-scene-preview img { width: 108px; height: 78px; object-fit: cover; }
.journal-scene-preview > span { min-width: 0; padding: 12px; display: grid; align-content: center; gap: 6px; }
.journal-scene-preview small { color: #a54c38; font-family: var(--mono); font-size: 7px; }
.journal-scene-preview strong { overflow: hidden; color: #34433b; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

.journal-segmented {
  height: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #aeb8b1;
}

.journal-segmented button { border: 0; border-right: 1px solid #aeb8b1; background: transparent; color: #66736d; font-size: 10px; }
.journal-segmented button:last-child { border-right: 0; }
.journal-segmented button.active { background: #384b41; color: #fff; }
.journal-background-settings { padding-top: 14px; }

.journal-opacity-label {
  margin: 13px 0 6px;
  display: flex;
  justify-content: space-between;
  color: #727d77;
  font-size: 9px;
}

.journal-opacity-label output { color: #a54c38; font-family: var(--mono); }
.journal-range { width: 100%; accent-color: #a54c38; }

.journal-sticker-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.journal-sticker-library button {
  min-width: 0;
  aspect-ratio: 1;
  padding: 5px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #c5cbc6;
  background: #fff;
}

.journal-sticker-library button:hover { border-color: #b04f38; }
.journal-sticker-library img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.journal-sticker-library button > span {
  position: absolute;
  right: 4px;
  bottom: 3px;
  color: #a34b37;
  font-family: var(--mono);
  font-size: 7px;
}

.journal-export-panel {
  margin: 0 -28px;
  padding: 19px 28px 23px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
  background: #34483e;
  color: #fff;
}

.journal-export-panel > div { display: grid; gap: 4px; }
.journal-export-panel > div span { color: #e08b72; }
.journal-export-panel > div strong { font-size: 11px; font-weight: 500; }

.journal-export-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #d7e0d8;
  background: #edf1eb;
  color: #314139;
  font-size: 11px;
}

.journal-export-button svg { width: 16px; height: 16px; }
.journal-export-button:hover:not(:disabled) { background: #e08b72; border-color: #e08b72; color: #27352e; }
.journal-export-button:disabled { opacity: .48; cursor: wait; }

@media (max-width: 1120px) {
  .journal-section { grid-template-columns: minmax(0, 1fr) 330px; }
  .journal-heading { padding-inline: 24px; }
  .journal-canvas-zone { padding-inline: 24px; }
  .journal-controls { padding-inline: 22px; }
  .journal-export-panel { margin-inline: -22px; padding-inline: 22px; }
  .journal-selection-tools label { grid-template-columns: auto 66px; }
  .journal-selection-tools input { width: 66px; }
}

@media (max-width: 800px) {
  body[data-view="journal"] { overflow: auto; }
  .journal-section { height: auto; min-height: 100svh; display: block; padding-top: 44px; }
  .journal-workbench { min-height: 610px; border-right: 0; border-bottom: 1px solid #bec5bf; }
  .journal-heading { min-height: 105px; padding: 18px; gap: 14px; }
  .journal-heading h2 { font-size: 23px; }
  .journal-kicker { font-size: 7px; }
  .journal-side-tabs { width: 132px; height: 36px; }
  .journal-canvas-zone { min-height: 500px; padding: 17px 14px 12px; overflow: visible; }
  .journal-card-shell { width: 100%; }
  .journal-object-toolbar { gap: 7px; overflow-x: auto; }
  .journal-selection-tools { flex: 0 0 auto; }
  .journal-selection-tools label { grid-template-columns: auto 55px; }
  .journal-selection-tools input { width: 55px; }
  .journal-selection-empty { display: none; }
  .journal-address-lines { gap: 19px; }
  .journal-controls { height: auto; overflow: visible; padding: 25px 20px 0; }
  .journal-export-panel { margin-inline: -20px; padding-inline: 20px; }
}

/* About project */
body[data-view="about"] {
  overflow-x: hidden;
  background: #e6ece6;
  color: #26372f;
}

body[data-view="about"] .topbar {
  color: #26372f;
  border-bottom-color: #b8c4bb;
  background: rgba(240, 244, 238, .92);
}

body[data-view="about"] .brand,
body[data-view="about"] .nav-item { color: #68756e; }
body[data-view="about"] .nav-item.active strong { color: #a84b34; }
body[data-view="about"] .source-status { color: #748079; }
body[data-view="about"] .icon-button { color: #526159; }

.about-section {
  min-height: calc(100svh - 44px);
  overflow: hidden;
  background: #e6ece6;
  color: #26372f;
}

.about-hero {
  min-height: calc(100svh - 44px);
  padding: 8vh 6vw 7vh;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
  align-items: center;
  gap: 7vw;
  border-bottom: 1px solid #b8c4bb;
  background: #e6ece6;
}

.about-heading { max-width: 650px; }
.about-kicker {
  margin: 0 0 28px;
  color: #a84b34;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0;
}

.about-heading h2 {
  margin: 0;
  color: #26372f;
  font-size: 58px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
}

.about-heading h2 em { color: #a84b34; }
.about-lead {
  max-width: 500px;
  margin: 38px 0 0;
  padding-left: 18px;
  border-left: 2px solid #a84b34;
  color: #5d6d64;
  font-size: 16px;
  line-height: 2;
}

.about-chime {
  width: 100%;
  height: 550px;
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-top: 1px solid #899b91;
  border-bottom: 1px solid #899b91;
}

.about-chime-label,
.about-chime figcaption {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #64746b;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.about-chime-label span:first-child { color: #a84b34; }
.about-chime figcaption {
  justify-content: flex-start;
  border-top: 1px solid #b8c4bb;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.7;
}

.about-chime-visual {
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(255,255,255,.22), rgba(205,219,209,.24));
}

.about-chime-visual::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 11%;
  right: 11%;
  bottom: -2%;
  height: 55%;
  opacity: .17;
  background: url('/assets/wukang-mansion-transparent-v1.png') center bottom / contain no-repeat;
  filter: saturate(.55) sepia(.12);
}

.about-chime-beam {
  height: 1px;
  position: absolute;
  z-index: 2;
  top: 17%;
  left: 5%;
  right: 5%;
  background: #6e8277;
  transform: rotate(-2.5deg);
  transform-origin: center;
}

.about-chime-string {
  width: 1px;
  height: var(--length);
  position: absolute;
  z-index: 3;
  top: 15%;
  left: var(--x);
  display: block;
  background: linear-gradient(to bottom, #7d9085, rgba(125,144,133,.25));
  transform-origin: top center;
  animation: about-chime-sway 6s ease-in-out var(--delay) infinite;
}

.about-chime-string::before {
  content: "";
  width: 5px;
  height: 5px;
  position: absolute;
  top: -3px;
  left: -2px;
  border-radius: 50%;
  background: #a84b34;
}

.about-chime-string b {
  position: absolute;
  left: 50%;
  bottom: 0;
  padding: 6px 7px;
  border: 1px solid rgba(88,109,98,.48);
  background: rgba(235,240,234,.84);
  color: #35483e;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, 50%);
}

@keyframes about-chime-sway {
  0%, 100% { transform: rotate(-1.25deg); }
  50% { transform: rotate(1.25deg); }
}

.about-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 12vh 6vw 15vh;
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  justify-content: space-between;
  gap: 9vw;
}

.about-margin {
  align-self: start;
  position: sticky;
  top: 116px;
  display: grid;
  gap: 11px;
  color: #64746b;
}

.about-margin span,
.about-margin small {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}
.about-margin span { color: #a84b34; }
.about-margin strong { color: #31443a; font-size: 20px; font-weight: 500; }
.about-margin i { width: 56px; height: 1px; margin: 8px 0; display: block; background: #a84b34; }

.about-copy {
  padding-left: 6vw;
  border-left: 1px solid #b8c4bb;
}

.about-copy p {
  margin: 0 0 30px;
  color: #53645b;
  font-size: 16px;
  line-height: 2.1;
}

.about-copy > p:first-child {
  color: #2d4036;
  font-size: 23px;
  line-height: 1.85;
}

.about-copy blockquote {
  margin: 60px 0;
  padding: 30px 0;
  border-top: 1px solid #899b91;
  border-bottom: 1px solid #899b91;
  color: #a84b34;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.65;
}

.about-path {
  margin: 68px 0 40px;
  padding: 23px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #899b91;
  border-bottom: 1px solid #899b91;
}

.about-path span { display: grid; gap: 7px; text-align: center; }
.about-path small { color: #a84b34; font-family: var(--mono); font-size: 8px; }
.about-path strong { color: #2d4036; font-size: 14px; font-weight: 500; }
.about-path i { color: #84958b; font-family: var(--mono); font-size: 11px; font-style: normal; }
.about-copy .about-closing {
  margin-bottom: 0;
  color: #2d4036;
  font-size: 23px;
  line-height: 1.8;
}

@media (max-width: 1120px) {
  .about-hero { grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: 5vw; }
  .about-heading h2 { font-size: 47px; }
  .about-chime { height: 500px; }
}

@media (max-width: 800px) {
  .about-section { min-height: calc(100svh - 44px); }
  .about-hero {
    min-height: auto;
    padding: 56px 20px 62px;
    display: block;
  }
  .about-heading h2 { font-size: 36px; line-height: 1.34; }
  .about-lead { margin-top: 30px; font-size: 14px; }
  .about-chime { height: 410px; margin-top: 52px; }
  .about-chime-label { gap: 12px; }
  .about-chime-label span:last-child { text-align: right; }
  .about-chime figcaption { font-size: 10px; }
  .about-chime-visual::after { left: 2%; right: 2%; height: 48%; }
  .about-chime-string b { padding: 5px; font-size: 11px; }
  .about-content { padding: 72px 20px 90px; display: block; }
  .about-margin {
    position: static;
    margin-bottom: 52px;
    padding-bottom: 22px;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    border-bottom: 1px solid #b8c4bb;
  }
  .about-margin strong { justify-self: end; font-size: 17px; }
  .about-margin i,
  .about-margin small { display: none; }
  .about-copy { padding-left: 0; border-left: 0; }
  .about-copy p { margin-bottom: 25px; font-size: 15px; line-height: 2; }
  .about-copy > p:first-child { font-size: 20px; }
  .about-copy blockquote { margin: 48px 0; padding: 25px 0; font-size: 24px; }
  .about-path { margin-top: 52px; gap: 5px; }
  .about-path strong { font-size: 12px; }
  .about-path i { font-size: 9px; }
  .about-copy .about-closing { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .about-chime-string { animation: none; }
}
