:root {
  color-scheme: light;
  --paper: #f0eadb;
  --paper-light: #faf6ea;
  --paper-deep: #dfd5be;
  --ink: #17211d;
  --ink-soft: #536057;
  --red: #b53a28;
  --blue: #315b73;
  --green: #48624b;
  --ochre: #aa762c;
  --line: rgba(23, 33, 29, 0.18);
  --line-dark: rgba(23, 33, 29, 0.38);
  --side-width: 232px;
  --top-height: 68px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.side-nav {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--side-width);
  flex-direction: column;
  border-right: 1px solid var(--line-dark);
  background: #e6decc;
  overflow-y: auto;
}

.brand {
  display: flex;
  height: var(--top-height);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-dark);
  padding: 0 22px;
}

.brand-bird,
.mobile-brand span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: 18px;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand strong {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.1em;
}

.brand small {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line-dark);
}

.primary-nav a {
  position: relative;
  display: grid;
  min-height: 64px;
  grid-template-columns: 40px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  transition: background-color 160ms ease, color 160ms ease;
}

.primary-nav a::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
  content: "";
}

.primary-nav a:hover {
  background: rgba(250, 246, 234, 0.55);
}

.primary-nav a.is-active {
  background: var(--paper-light);
}

.primary-nav a.is-active::after {
  background: var(--red);
}

.primary-nav span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.primary-nav strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.secondary-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  padding: 22px;
}

.secondary-nav p {
  grid-column: 1 / -1;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.secondary-nav a {
  border-bottom: 1px solid transparent;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.secondary-nav a:hover,
.secondary-nav a.is-active {
  border-color: var(--red);
  color: var(--ink);
}

.record-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 16px 22px;
}

.record-nav p {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.record-nav a {
  border: 1px solid var(--line);
  padding: 8px;
  font-size: 11px;
  text-align: center;
}

.record-nav a:hover,
.record-nav a.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
}

.workspace-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  border-top: 1px solid var(--line);
  padding: 14px 22px;
}

.workspace-nav p {
  grid-column: 1 / -1;
  margin: 0 0 3px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.workspace-nav a {
  border-bottom: 1px solid transparent;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.workspace-nav a:hover,
.workspace-nav a.is-active {
  border-color: var(--red);
  color: var(--ink);
}

.side-nav footer {
  margin-top: auto;
  border-top: 1px solid var(--line-dark);
  padding: 20px 22px 24px;
}

.side-nav footer span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.side-nav footer p {
  margin: 9px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--side-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: var(--top-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-dark);
  padding: 0 clamp(24px, 4vw, 58px);
  background: rgba(240, 234, 219, 0.94);
  backdrop-filter: blur(12px);
}

.mobile-brand {
  display: none;
}

.runtime-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.runtime-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ochre);
}

.runtime-status.is-live i {
  background: #2e7d4a;
}

.runtime-status.is-blocked i {
  background: var(--red);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-label {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.account-chip span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--serif);
}

.login-link,
.login-pending {
  border: 1px solid var(--line-dark);
  padding: 8px 12px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.login-link:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.main-content {
  min-height: calc(100vh - var(--top-height));
  padding: clamp(30px, 5vw, 72px) clamp(24px, 5vw, 80px) 96px;
}

.main-content > section {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.bottom-nav {
  display: none;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  padding: 0 18px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.button-primary {
  background: var(--ink);
  color: var(--paper-light);
}

.button-primary:hover {
  background: var(--red);
  border-color: var(--red);
}

.button-quiet:hover {
  background: var(--paper-light);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.text-link:hover {
  color: var(--red);
}

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 820px) auto;
  gap: 40px;
  align-items: end;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 34px;
  margin-bottom: 42px;
}

.page-heading h1,
.discover-hero h1,
.reader-title h1,
.profile-header h1,
.error-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
}

.page-heading h1 {
  font-size: clamp(38px, 5vw, 68px);
  letter-spacing: -0.04em;
}

.page-intro {
  max-width: 690px;
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.8;
}

.heading-action {
  margin-bottom: 4px;
}

.heading-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.discover-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  min-height: min(670px, calc(100vh - 170px));
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 56px;
}

.hero-copy {
  display: flex;
  max-width: 820px;
  flex-direction: column;
  justify-content: center;
  padding: 40px 8vw 40px 0;
}

.discover-hero h1 {
  max-width: 790px;
  font-size: clamp(48px, 7vw, 98px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.feature-card {
  position: relative;
  display: flex;
  min-height: 540px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(24px, 4vw, 52px);
  color: var(--paper-light);
  transition: transform 180ms ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.feature-symbol {
  position: absolute;
  top: 18%;
  right: -0.07em;
  color: rgba(250, 246, 234, 0.08);
  font-family: var(--serif);
  font-size: clamp(180px, 22vw, 360px);
  line-height: 1;
}

.feature-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.feature-card h2 {
  max-width: 540px;
  margin: 13px 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 500;
  line-height: 1.18;
}

.feature-card p:last-child {
  max-width: 480px;
  margin: 0;
  color: rgba(250, 246, 234, 0.78);
  line-height: 1.7;
}

.tone-red {
  --tone: var(--red);
}

.tone-blue {
  --tone: var(--blue);
}

.tone-green {
  --tone: var(--green);
}

.tone-ochre {
  --tone: var(--ochre);
}

.tone-ink {
  --tone: var(--ink);
}

.feature-card,
.module-card {
  background: var(--tone, var(--ink));
}

.stream-section,
.nearby-section {
  padding-top: 58px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.content-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--paper-light);
  transition: background-color 160ms ease, transform 160ms ease;
}

a.content-card:hover {
  z-index: 1;
  background: #fffaf0;
  transform: translateY(-3px);
}

.card-visual {
  position: relative;
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--tone);
  color: var(--paper-light);
}

.visual-index,
.visual-label {
  position: absolute;
  top: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.visual-index {
  left: 16px;
}

.visual-label {
  right: 16px;
}

.visual-glyph {
  font-family: var(--serif);
  font-size: 78px;
  opacity: 0.86;
}

.content-card-copy {
  display: flex;
  min-height: 270px;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.content-card h3 {
  margin: 18px 0 10px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.content-card-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.content-card-copy > .item-meta {
  margin: -2px 0 12px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
}

.content-card .text-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 20px;
}

.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-grid .content-card {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) 1fr;
}

.compact-grid .card-visual {
  min-height: 100%;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.module-card {
  display: flex;
  min-height: 350px;
  flex-direction: column;
  border-right: 1px solid var(--paper);
  padding: 26px;
  color: var(--paper-light);
  transition: transform 180ms ease;
}

.module-card:nth-child(1),
.module-card:nth-child(2) {
  grid-column: span 3;
}

.module-card:nth-child(n + 3) {
  grid-column: span 2;
}

.module-card:hover {
  z-index: 2;
  transform: translateY(-5px);
}

.module-number {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.65;
}

.module-card .eyebrow {
  margin-top: auto;
  color: rgba(250, 246, 234, 0.7);
}

.module-card h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 500;
}

.module-card p:not(.eyebrow) {
  max-width: 500px;
  margin: 0;
  color: rgba(250, 246, 234, 0.78);
  font-size: 13px;
  line-height: 1.7;
}

.module-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(250, 246, 234, 0.28);
  margin-top: 24px;
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 9px;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.create-card {
  position: relative;
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-right: 1px solid var(--paper);
  padding: clamp(24px, 3vw, 40px);
  background: var(--tone);
  color: var(--paper-light);
}

.create-card-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.create-card-mark {
  position: absolute;
  top: 14%;
  right: -0.08em;
  color: rgba(250, 246, 234, 0.09);
  font-family: var(--serif);
  font-size: clamp(170px, 20vw, 320px);
  line-height: 1;
}

.create-card > div:last-child {
  position: relative;
  z-index: 1;
}

.create-card h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(29px, 3.4vw, 48px);
  font-weight: 500;
}

.create-card p {
  margin: 0;
  color: rgba(250, 246, 234, 0.78);
  font-size: 13px;
  line-height: 1.75;
}

.create-card ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid rgba(250, 246, 234, 0.24);
  padding: 18px 0 0;
  margin: 25px 0;
  list-style: none;
}

.create-card li {
  font-size: 10px;
}

.create-card li::before {
  margin-right: 6px;
  content: "—";
  opacity: 0.55;
}

.create-card button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(250, 246, 234, 0.7);
  background: transparent;
  color: var(--paper-light);
  font-size: 11px;
  font-weight: 700;
}

.create-boundary {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  border-bottom: 1px solid var(--line-dark);
  padding: 26px 0;
}

.create-boundary strong {
  color: var(--red);
  font-family: var(--serif);
}

.create-boundary p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.issue-stamp {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  text-align: center;
  transform: rotate(6deg);
}

.issue-stamp strong {
  display: block;
  font-size: 20px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
  gap: 32px;
  align-items: end;
  margin-bottom: 22px;
}

.search-field {
  display: flex;
  border-bottom: 1px solid var(--ink);
}

.search-field input {
  min-width: 0;
  height: 46px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-field button {
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.category-tabs button {
  min-height: 38px;
  border: 1px solid var(--line-dark);
  padding: 0 14px;
  background: transparent;
  font-size: 11px;
}

.category-tabs button:hover,
.category-tabs button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
}

.catalog-result-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.archive-entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 30px 0 34px;
}

.archive-entry {
  position: relative;
  display: grid;
  min-height: 180px;
  grid-template-columns: 1fr auto;
  align-items: end;
  overflow: hidden;
  padding: 26px;
  background: var(--tone);
  color: var(--paper-light);
  transition: transform 180ms ease;
}

.archive-entry:hover {
  transform: translateY(-4px);
}

.archive-entry .eyebrow {
  color: rgba(250, 246, 234, 0.68);
}

.archive-entry h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 500;
}

.archive-entry div > span {
  font-size: 10px;
  opacity: 0.75;
}

.archive-entry > strong {
  font-size: 26px;
}

.archive-entry-mark {
  position: absolute;
  top: -0.2em;
  right: 12%;
  color: rgba(250, 246, 234, 0.08);
  font-family: var(--serif);
  font-size: 190px;
  line-height: 1;
}

.archive-model-note {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line-dark);
  margin-bottom: 28px;
  padding: 18px 22px;
  background: var(--paper-light);
}

.archive-model-note span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.archive-model-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.heritage-tools {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.heritage-tools .category-tabs {
  justify-content: flex-start;
}

.heritage-tools > label {
  display: grid;
  gap: 6px;
}

.heritage-tools label > span {
  color: var(--ink-soft);
  font-size: 9px;
}

.heritage-tools select {
  height: 39px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.archive-result-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line-dark);
  padding: 12px 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.heritage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.heritage-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  grid-template-rows: auto 1fr;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--paper-light);
}

.heritage-card-head {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.heritage-card-mark {
  display: grid;
  min-height: 270px;
  place-items: center;
  background: var(--tone);
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: 64px;
}

.heritage-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 22px;
}

.heritage-card-copy h2 {
  margin: 19px 0 10px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 33px);
  font-weight: 600;
  line-height: 1.3;
}

.heritage-card-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.heritage-card-copy .heritage-location {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 12px;
  color: var(--ink);
  font-size: 10px;
}

.heritage-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  padding-top: 18px;
}

.heritage-card footer span {
  border: 1px solid var(--line);
  padding: 4px 7px;
  font-size: 8px;
}

.festival-status-tabs {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.festival-list {
  border-top: 1px solid var(--line-dark);
}

.festival-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.32fr) 1fr;
  gap: clamp(24px, 4vw, 58px);
  border-bottom: 1px solid var(--line-dark);
  padding: 28px 0;
}

.festival-date {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background: var(--tone);
  color: var(--paper-light);
}

.festival-date span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.festival-date strong {
  max-width: 200px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.25;
}

.festival-copy {
  align-self: center;
  padding-right: 60px;
}

.festival-copy h2 {
  margin: 16px 0 10px;
  font-family: var(--serif);
  font-size: clamp(29px, 4vw, 52px);
  font-weight: 600;
}

.festival-copy > p {
  max-width: 780px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.festival-copy dl {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 20px;
  border-top: 1px solid var(--line);
  margin: 20px 0 0;
  padding-top: 15px;
}

.festival-copy dl div {
  display: grid;
  gap: 5px;
}

.festival-copy dt {
  color: var(--ink-soft);
  font-size: 9px;
}

.festival-copy dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.5;
}

.festival-index {
  position: absolute;
  top: 30px;
  right: 0;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.play-list {
  border-top: 1px solid var(--line-dark);
}

.play-row {
  display: grid;
  grid-template-columns: 52px 220px minmax(0, 1fr) 150px;
  gap: 26px;
  align-items: stretch;
  border-bottom: 1px solid var(--line-dark);
  padding: 22px 0;
}

.play-sequence {
  padding-top: 8px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.play-row .card-visual {
  min-height: 160px;
}

.play-copy {
  align-self: center;
}

.play-copy h2 {
  margin: 14px 0 9px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 600;
}

.play-copy > p {
  max-width: 690px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.play-time {
  align-self: center;
  border-left: 1px solid var(--line);
  padding-left: 22px;
  font-family: var(--serif);
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 17px;
}

.tag-list span,
.profile-level {
  border: 1px solid var(--line-dark);
  padding: 4px 8px;
  font-size: 9px;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line-dark);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  font-family: var(--serif);
}

.empty-state h2 {
  margin: 20px 0 8px;
  font-family: var(--serif);
}

.empty-state p {
  margin: 0;
  color: var(--ink-soft);
}

.zine-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 64px);
}

.zine-book {
  min-width: 0;
}

.zine-book > a:first-child {
  display: block;
  padding-right: 7%;
  transition: transform 180ms ease;
}

.zine-book > a:first-child:hover {
  transform: translateY(-6px) rotate(-0.6deg);
}

.zine-cover {
  position: relative;
  display: flex;
  aspect-ratio: 0.74;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 9% 9% 8% 14%;
  background: var(--cover);
  box-shadow: 12px 13px 0 rgba(23, 33, 29, 0.12);
  color: var(--cover-text);
}

.zine-spine {
  position: absolute;
  inset: 0 auto 0 7%;
  border-left: 1px solid rgba(250, 246, 234, 0.22);
}

.zine-cover::after {
  position: absolute;
  width: 42%;
  aspect-ratio: 1;
  right: -8%;
  bottom: 12%;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.22;
  content: "";
}

.zine-cover-index,
.zine-cover-mark {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.zine-cover strong {
  position: relative;
  z-index: 1;
  max-width: 90%;
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 46px);
  font-weight: 500;
  line-height: 1.18;
}

.zine-book-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 13px;
}

.zine-book-meta h2 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 22px;
}

.zine-book-meta p,
.zine-book-meta > span {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.capability-note {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(280px, 0.6fr);
  gap: 30px;
  align-items: center;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  margin-top: 72px;
  padding: 34px 0;
}

.note-index {
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 12px;
}

.capability-note h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 27px;
}

.capability-note p {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.capability-note dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.capability-note dl div {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.capability-note dt {
  color: var(--ink-soft);
  font-size: 9px;
}

.capability-note dd {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-size: 24px;
}

.reader-toolbar,
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 20px;
}

.reader-toolbar > div,
.editor-toolbar > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reader-toolbar span,
.revision-label {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.reader-title {
  max-width: 850px;
  margin: 80px auto 60px;
  text-align: center;
}

.reader-title h1 {
  font-size: clamp(42px, 7vw, 88px);
  letter-spacing: -0.05em;
}

.reader-title > p:last-child {
  max-width: 650px;
  margin: 20px auto 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.8;
}

.page-spreads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.zine-page {
  position: relative;
  display: flex;
  aspect-ratio: 1.35;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  padding: 28px;
  background: var(--paper-light);
}

.zine-page:first-child {
  background: var(--ink);
  color: var(--paper-light);
}

.page-art {
  position: absolute;
  inset: 20% 12% auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.28;
}

.page-art span {
  padding: 20px 0;
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 82px);
  text-align: center;
}

.page-art span + span {
  border-left: 1px solid currentColor;
}

.zine-page p {
  position: relative;
  z-index: 1;
  max-width: 65%;
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
}

.page-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--mono);
  font-size: 9px;
}

.editor-page {
  width: 100%;
}

.editor-toolbar {
  margin-bottom: 18px;
}

.editor-save-group {
  gap: 18px !important;
}

.editor-history-tools {
  padding: 0 18px;
}

.editor-history-tools button {
  border: 1px solid var(--line);
  padding: 7px 9px;
  background: transparent;
  font-size: 10px;
}

.editor-history-tools span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.save-message {
  border: 1px solid var(--line-dark);
  margin-bottom: 14px;
  padding: 12px 16px;
  font-size: 12px;
}

.save-success {
  border-color: var(--green);
  background: rgba(72, 98, 75, 0.08);
}

.save-conflict,
.save-error {
  border-color: var(--red);
  background: rgba(181, 58, 40, 0.08);
}

.editor-layout {
  display: grid;
  min-height: 680px;
  grid-template-columns: minmax(220px, 280px) minmax(500px, 1fr) 90px;
  border: 1px solid var(--line-dark);
  background: #d8cfba;
}

.editor-panel {
  border-right: 1px solid var(--line-dark);
  padding: 28px 24px;
  background: var(--paper-light);
}

.editor-panel > label {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
}

.editor-panel label > span,
.editor-panel legend {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.editor-panel input:not([type="radio"]),
.editor-panel textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  outline: 0;
  padding: 10px 0;
  resize: vertical;
  background: transparent;
  font-family: var(--serif);
}

.editor-panel input[type="color"] {
  height: 42px;
  padding: 3px !important;
}

.editor-panel fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.asset-library {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}

.asset-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.asset-library-head p,
.asset-library-head strong {
  margin: 0;
}

.asset-library-head button {
  border: 1px solid var(--line);
  padding: 5px 8px;
  background: transparent;
  font-size: 9px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.asset-grid button {
  display: grid;
  min-width: 0;
  aspect-ratio: 0.78;
  align-content: space-between;
  border: 1px solid var(--line);
  padding: 7px;
  background: #ddd3bc;
  text-align: left;
}

.asset-grid span,
.asset-grid small {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.layout-options label {
  position: relative;
}

.layout-options input {
  position: absolute;
  opacity: 0;
}

.layout-options span {
  display: block;
  border: 1px solid var(--line);
  padding: 8px;
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.layout-options input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
}

.editor-boundary {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
}

.editor-boundary strong {
  color: var(--red);
  font-size: 11px;
}

.editor-boundary p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.editor-canvas {
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
}

.editor-canvas-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 9px;
}

.editor-canvas-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.canvas-zoom button {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  background: transparent;
}

.canvas-ruler {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-dark);
  padding-top: 5px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 7px;
}

.spread-preview {
  display: grid;
  grid-template-columns: 0.74fr 1fr;
  align-items: center;
  gap: 26px;
  max-width: 900px;
  margin: 30px auto;
}

.spread-preview .zine-cover {
  box-shadow: 9px 10px 0 rgba(23, 33, 29, 0.12);
}

.spread-preview .zine-cover strong {
  font-size: clamp(22px, 3vw, 40px);
}

.preview-page {
  position: relative;
  display: grid;
  aspect-ratio: 1.42;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  border: 1px solid var(--line-dark);
  padding: 7%;
  background: var(--paper-light);
}

.preview-photo {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: rgba(250, 246, 234, 0.7);
  font-family: var(--mono);
  font-size: 9px;
}

.photo-a {
  grid-row: 1 / 3;
}

.photo-b {
  background: var(--ochre);
}

.preview-page p {
  align-self: end;
  margin: 0;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
}

.editor-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.page-strip-head {
  margin-bottom: 10px;
}

.page-strip-head p,
.page-strip-head strong {
  margin: 0;
}

.revision-history {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
}

.revision-history p,
.revision-history strong {
  margin: 0;
}

.revision-history ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.revision-history li {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 7px;
}

.revision-history small {
  color: var(--ink-soft);
}

.layout-gallery {
  grid-template-columns: 1fr 1fr;
}

.layout-contrast .photo-a {
  grid-column: 1 / 3;
  grid-row: 1;
}

.layout-contrast .photo-b {
  grid-column: 1;
  grid-row: 2;
}

.layout-cinema {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr auto;
}

.layout-cinema .photo-a,
.layout-cinema .photo-b {
  grid-column: 1;
  grid-row: auto;
}

.page-strip {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line-dark);
  padding: 12px;
  background: #c8bea8;
}

.page-strip button {
  display: grid;
  aspect-ratio: 0.8;
  grid-template-rows: auto 1fr;
  border: 1px solid transparent;
  margin-bottom: 8px;
  padding: 6px;
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
}

.page-strip button i {
  display: block;
  margin-top: 4px;
  background: var(--paper-light);
}

.page-strip button.is-active {
  border-color: var(--red);
}

.page-strip .add-page {
  display: block;
  aspect-ratio: auto;
  border: 1px dashed var(--line-dark);
  margin-top: auto;
  padding: 10px;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 40px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 30px;
}

.avatar {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: 48px;
}

.profile-header h1 {
  font-size: clamp(40px, 6vw, 70px);
}

.profile-header .profile-main p:not(.eyebrow) {
  margin: 8px 0 13px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 18px;
}

.profile-actions {
  display: flex;
  gap: 8px;
}

.profile-actions button {
  min-height: 42px;
  border: 1px solid var(--line-dark);
  padding: 0 14px;
  background: transparent;
  font-size: 11px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-dark);
  margin: 0;
}

.profile-stats div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-right: 1px solid var(--line-dark);
  padding: 24px 0;
}

.profile-stats div + div {
  padding-left: 28px;
}

.profile-stats div:last-child {
  border-right: 0;
}

.profile-stats dt {
  color: var(--ink-soft);
  font-size: 10px;
}

.profile-stats dd {
  order: -1;
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--line-dark);
  margin: 44px 0 32px;
}

.profile-tabs button {
  display: flex;
  min-width: 140px;
  gap: 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 4px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.profile-tabs button span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.profile-tabs button.is-active {
  border-color: var(--red);
}

.my-zines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 260px));
  gap: 40px;
}

.my-zines a {
  display: grid;
  gap: 18px;
}

.my-zines strong {
  font-family: var(--serif);
  font-size: 18px;
}

.trace-list {
  max-width: 800px;
  border-top: 1px solid var(--line-dark);
  padding: 0;
  margin: 0;
  list-style: none;
}

.trace-list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  border-bottom: 1px solid var(--line-dark);
  padding: 22px 0;
}

.trace-list > li > span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.trace-list strong {
  font-family: var(--serif);
  font-size: 18px;
}

.trace-list p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 640px;
  border: 1px solid var(--line-dark);
}

.map-board {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  background: #d8d1bc;
}

.map-north {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  font-family: var(--mono);
  font-size: 10px;
}

.map-contour {
  position: absolute;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 48% 52% 64% 36%;
  transform: rotate(-12deg);
}

.contour-a {
  inset: 12% 8% 20% 13%;
}

.contour-b {
  inset: 24% 20% 8% 29%;
  transform: rotate(19deg);
}

.map-point {
  position: absolute;
  z-index: 3;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px solid var(--paper-light);
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 3px 0 rgba(23, 33, 29, 0.18);
  color: var(--paper-light);
  transform: translate(-50%, -50%);
}

.map-point strong {
  position: absolute;
  top: 44px;
  left: 50%;
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.map-point span {
  font-family: var(--mono);
  font-size: 10px;
}

.map-caption {
  position: absolute;
  bottom: 18px;
  left: 20px;
  color: var(--ink-soft);
  font-size: 9px;
}

.map-legend {
  border-left: 1px solid var(--line-dark);
  padding: 28px;
  background: var(--paper-light);
}

.map-legend h2 {
  margin: 0 0 30px;
  font-family: var(--serif);
  font-size: 27px;
}

.map-legend a {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.map-legend a:hover strong {
  color: var(--red);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tone);
}

.map-legend strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
}

.map-legend small {
  color: var(--ink-soft);
  font-size: 9px;
}

.loading-page,
.error-page {
  display: grid;
  min-height: calc(100vh - 240px);
  place-items: center;
  align-content: center;
  text-align: center;
}

.loading-page {
  grid-template-columns: auto auto;
  gap: 24px;
}

.loading-bird,
.boot-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: 26px;
  animation: bird-pulse 1.2s ease-in-out infinite alternate;
}

.loading-page h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
}

.error-code {
  color: var(--red);
  font-family: var(--mono);
  font-size: 64px;
}

.error-page h1 {
  margin-top: 5px;
  font-size: clamp(36px, 5vw, 62px);
}

.error-page > p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px auto 28px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.boot-screen p {
  font-family: var(--serif);
}

.parity-heading {
  align-items: end;
}

.core-gate {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  border: 1px solid var(--red);
  margin-top: 24px;
  padding: 18px 20px;
  background: rgba(181, 58, 40, 0.05);
}

.core-gate > span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.core-gate strong {
  font-size: 12px;
}

.core-gate p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.detail-meta-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -22px 0 34px;
}

.detail-meta-rail span,
.status-chip {
  border: 1px solid var(--line);
  padding: 7px 10px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  border: 1px solid var(--line-dark);
}

.detail-story {
  background: var(--paper-light);
}

.detail-story > section {
  display: grid;
  min-height: 190px;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 34px;
}

.detail-story > section:last-child {
  border-bottom: 0;
}

.section-number {
  color: var(--red);
  font-family: var(--mono);
  font-size: 11px;
}

.detail-story h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 27px;
}

.detail-story p,
.detail-story li {
  color: var(--ink-soft);
  font-family: var(--serif);
  line-height: 1.8;
}

.detail-story ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.detail-context {
  border-left: 1px solid var(--line-dark);
  padding: 30px 24px;
  background: #e5dcc8;
}

.context-link {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
}

.context-link::after {
  content: "→";
}

.detail-context .core-gate {
  display: block;
  margin-top: 32px;
  padding: 15px;
}

.detail-context .core-gate > span {
  display: block;
  margin-bottom: 10px;
}

.workbench-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line-dark);
  margin: 0 0 26px;
}

.workbench-metrics > div {
  border-right: 1px solid var(--line);
  padding: 20px 24px;
}

.workbench-metrics > div:last-child {
  border-right: 0;
}

.workbench-metrics dt {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.workbench-metrics dd {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 31px;
}

.workspace-frame {
  display: grid;
  min-height: 520px;
  grid-template-columns: 190px minmax(360px, 1fr) 270px;
  border: 1px solid var(--line-dark);
  background: var(--paper-light);
}

.workspace-filter,
.workspace-inspector {
  padding: 24px 20px;
  background: #e5dcc8;
}

.workspace-filter {
  border-right: 1px solid var(--line-dark);
}

.workspace-inspector {
  border-left: 1px solid var(--line-dark);
}

.workbench-tabs {
  display: grid;
  gap: 5px;
}

.workbench-tabs button {
  border: 0;
  border-left: 2px solid transparent;
  padding: 10px 12px;
  background: transparent;
  text-align: left;
}

.workbench-tabs button.is-active {
  border-left-color: var(--red);
  background: var(--paper-light);
}

.workspace-shortcuts {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}

.workspace-main {
  min-width: 0;
}

.workspace-main-head {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
}

.workspace-main-head span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.workspace-row {
  display: grid;
  min-height: 92px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 22px;
}

a.workspace-row:hover {
  background: rgba(181, 58, 40, 0.05);
}

.workspace-row-index {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.workspace-row strong {
  font-family: var(--serif);
  font-size: 17px;
}

.workspace-row p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.workspace-inspector h2 {
  margin: 30px 0 10px;
  font-family: var(--serif);
  font-size: 25px;
}

.workspace-inspector > p:not(.eyebrow) {
  color: var(--ink-soft);
  line-height: 1.65;
}

.workspace-inspector button {
  width: 100%;
  border: 1px solid var(--line-dark);
  margin-top: 20px;
  padding: 11px;
  background: transparent;
}

.desktop-form-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(380px, 1.05fr);
  border: 1px solid var(--line-dark);
}

.desktop-form {
  border-right: 1px solid var(--line-dark);
  padding: 28px;
  background: var(--paper-light);
}

.form-progress {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
  padding-bottom: 15px;
}

.form-progress span {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.form-progress .is-active {
  color: var(--red);
}

.desktop-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.desktop-form label > span {
  font-size: 11px;
  font-weight: 700;
}

.desktop-form input,
.desktop-form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  padding: 11px 0;
  resize: vertical;
  background: transparent;
  font-family: var(--serif);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 22px;
}

.form-preview {
  padding: clamp(26px, 4vw, 52px);
  background: #d8cfba;
}

.preview-window {
  min-height: 410px;
  border: 1px solid var(--line-dark);
  padding: 28px;
  background: var(--paper-light);
}

.preview-window > span {
  font-family: var(--mono);
  font-size: 8px;
}

.preview-visual {
  display: grid;
  width: 100%;
  aspect-ratio: 1.9;
  place-items: center;
  margin: 30px 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 80px;
}

.preview-window h2 {
  font-family: var(--serif);
  font-size: 30px;
}

.preview-window p,
.form-checklist p {
  color: var(--ink-soft);
  line-height: 1.65;
}

.form-checklist {
  border-top: 1px solid var(--line-dark);
  margin-top: 24px;
  padding-top: 18px;
}

.form-checklist p {
  display: flex;
  gap: 8px;
  margin: 9px 0;
  font-size: 11px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-dark);
  border-bottom: 0;
  padding: 14px 18px;
  background: #e5dcc8;
}

.table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.table-filters button {
  border: 1px solid var(--line);
  padding: 7px 10px;
  background: transparent;
  font-size: 10px;
}

.table-filters button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
  opacity: 1;
}

.table-toolbar input {
  width: 210px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--paper-light);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-dark);
  background: var(--paper-light);
}

.admin-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.admin-table th {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.admin-table td {
  font-size: 12px;
}

.admin-table tbody tr:hover {
  background: rgba(181, 58, 40, 0.04);
}

.table-note {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.document-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: clamp(32px, 6vw, 90px);
  justify-content: center;
}

.document-layout > aside {
  position: sticky;
  top: calc(var(--top-height) + 24px);
  align-self: start;
  border-top: 1px solid var(--line-dark);
  padding-top: 18px;
}

.document-layout > aside a {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 11px;
}

.document-layout article section {
  border-top: 1px solid var(--line-dark);
  padding: 30px 0 50px;
}

.document-layout article span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
}

.document-layout article h2 {
  margin: 12px 0 18px;
  font-family: var(--serif);
  font-size: 32px;
}

.document-layout article p {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.web-exhibition {
  margin: calc(-1 * clamp(30px, 6vw, 76px));
  background: #121815;
  color: var(--paper-light);
}

.web-exhibition > header {
  display: grid;
  min-height: 72vh;
  place-content: center;
  padding: 70px;
  text-align: center;
}

.web-exhibition > header h1 {
  margin: 15px 0;
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 170px);
  letter-spacing: -0.08em;
}

.web-exhibition > header > p:last-child {
  max-width: 680px;
  color: rgba(250, 246, 234, 0.62);
  line-height: 1.8;
}

.exhibition-chapters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.exhibition-chapters article {
  min-height: 640px;
  border-top: 1px solid rgba(250, 246, 234, 0.25);
  border-right: 1px solid rgba(250, 246, 234, 0.25);
  padding: 30px;
}

.exhibition-chapters article > span {
  font-family: var(--mono);
  font-size: 9px;
}

.exhibition-art {
  display: grid;
  aspect-ratio: 0.9;
  place-items: center;
  margin: 40px 0 30px;
  background: #263e36;
  font-family: var(--serif);
  font-size: 110px;
}

.exhibition-chapters article:nth-child(2) .exhibition-art {
  background: #552f28;
}

.exhibition-chapters article:nth-child(3) .exhibition-art {
  background: #273b4a;
}

.exhibition-chapters h2 {
  font-family: var(--serif);
  font-size: 31px;
}

.exhibition-chapters p {
  color: rgba(250, 246, 234, 0.58);
  line-height: 1.7;
}

.booking-layout {
  display: grid;
  grid-template-columns: 220px minmax(300px, 1fr) 300px;
  border: 1px solid var(--line-dark);
  background: var(--paper-light);
}

.booking-calendar,
.booking-summary {
  padding: 24px;
  background: #e5dcc8;
}

.booking-calendar {
  border-right: 1px solid var(--line-dark);
}

.booking-calendar > div {
  display: grid;
  gap: 8px;
}

.booking-calendar button {
  border: 1px solid var(--line);
  padding: 12px;
  background: transparent;
  text-align: left;
}

.booking-calendar button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-light);
  opacity: 1;
}

.booking-summary {
  border-left: 1px solid var(--line-dark);
}

.booking-summary h2 {
  margin-top: 30px;
  font-family: var(--serif);
  font-size: 29px;
}

.booking-summary > p:not(.eyebrow) {
  color: var(--ink-soft);
  line-height: 1.7;
}

@keyframes bird-pulse {
  from {
    transform: scale(0.96);
  }
  to {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  :root {
    --side-width: 204px;
  }

  .side-nav .primary-nav a {
    padding: 0 17px;
  }

  .secondary-nav {
    padding: 18px;
  }

  .record-nav {
    padding: 14px 18px;
  }

  .workspace-nav {
    padding: 14px 18px;
  }

  .discover-hero {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .play-row {
    grid-template-columns: 42px 170px minmax(0, 1fr);
  }

  .play-time {
    grid-column: 3;
    border-left: 0;
    padding: 0 0 8px;
  }

  .editor-layout {
    grid-template-columns: 240px minmax(420px, 1fr) 74px;
  }

  .spread-preview {
    grid-template-columns: 0.66fr 1fr;
  }

  .workspace-frame {
    grid-template-columns: 170px minmax(340px, 1fr);
  }

  .workspace-inspector {
    display: none;
  }

  .booking-layout {
    grid-template-columns: 190px minmax(300px, 1fr);
  }

  .booking-summary {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }
}

@media (max-width: 900px) {
  :root {
    --top-height: 60px;
  }

  .side-nav {
    display: none;
  }

  .workspace {
    margin-left: 0;
  }

  .topbar {
    padding: 0 18px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--serif);
  }

  .mobile-brand span {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }

  .runtime-status {
    position: absolute;
    top: var(--top-height);
    right: 0;
    left: 0;
    min-height: 28px;
    justify-content: center;
    border-bottom: 1px solid var(--line);
    background: #e6decc;
    font-size: 8px;
  }

  .date-label {
    display: none;
  }

  .main-content {
    padding: 54px 18px 102px;
  }

  .bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line-dark);
    background: rgba(240, 234, 219, 0.97);
    backdrop-filter: blur(12px);
  }

  .bottom-nav a {
    display: grid;
    min-height: 66px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border-right: 1px solid var(--line);
  }

  .bottom-nav a.is-active {
    background: var(--ink);
    color: var(--paper-light);
  }

  .bottom-nav span {
    font-family: var(--mono);
    font-size: 7px;
  }

  .bottom-nav strong {
    font-size: 10px;
  }

  .page-heading {
    grid-template-columns: 1fr auto;
  }

  .discover-hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 42px 0 48px;
  }

  .feature-card {
    min-height: 450px;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .create-card {
    min-height: 500px;
  }

  .heritage-tools {
    grid-template-columns: 1fr 150px 150px;
  }

  .heritage-card {
    grid-template-columns: 120px 1fr;
  }

  .category-tabs {
    justify-content: flex-start;
  }

  .zine-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-note {
    grid-template-columns: 100px 1fr;
  }

  .capability-note dl {
    grid-column: 2;
  }

  .editor-layout {
    grid-template-columns: 230px minmax(430px, 1fr) 72px;
    overflow-x: auto;
  }

  .detail-layout,
  .desktop-form-layout {
    grid-template-columns: 1fr;
  }

  .detail-context {
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .desktop-form {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .exhibition-chapters {
    grid-template-columns: 1fr;
  }

  .exhibition-chapters article {
    min-height: 0;
    border-right: 0;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-legend {
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .account-chip span {
    width: 30px;
    height: 30px;
  }

  .account-chip strong {
    display: none;
  }

  .login-link,
  .login-pending {
    padding: 7px 8px;
    font-size: 9px;
  }

  .main-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .page-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 24px;
  }

  .page-heading h1 {
    font-size: 40px;
  }

  .heading-action {
    justify-self: start;
  }

  .discover-hero h1 {
    font-size: 50px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 18px;
  }

  .feature-card {
    min-height: 390px;
    padding: 24px;
  }

  .section-heading {
    align-items: start;
  }

  .content-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .compact-grid .content-card {
    display: flex;
  }

  .content-card-copy {
    min-height: 230px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card,
  .module-card:nth-child(n) {
    min-height: 300px;
    grid-column: span 1;
  }

  .heading-buttons {
    justify-content: flex-start;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .create-card {
    min-height: 430px;
    border-bottom: 1px solid var(--paper);
  }

  .create-card-mark {
    font-size: 210px;
  }

  .create-boundary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .catalog-result-meta span:last-child {
    display: none;
  }

  .archive-entries {
    grid-template-columns: 1fr;
  }

  .archive-model-note {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .heritage-tools {
    grid-template-columns: 1fr 1fr;
  }

  .heritage-tools .category-tabs {
    grid-column: 1 / -1;
  }

  .archive-result-line span:last-child {
    max-width: 70%;
    text-align: right;
  }

  .heritage-grid {
    grid-template-columns: 1fr;
  }

  .heritage-card {
    grid-template-columns: 104px 1fr;
  }

  .heritage-card-mark {
    min-height: 250px;
  }

  .festival-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .festival-date {
    min-height: 160px;
  }

  .festival-copy {
    padding-right: 0;
  }

  .festival-copy dl {
    grid-template-columns: 1fr;
  }

  .play-row {
    grid-template-columns: 34px 1fr;
    gap: 16px;
  }

  .play-row .card-visual {
    grid-column: 2;
    min-height: 170px;
  }

  .play-copy,
  .play-time {
    grid-column: 2;
  }

  .play-time {
    padding: 0;
  }

  .zine-shelf {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .zine-book {
    max-width: 380px;
  }

  .capability-note {
    grid-template-columns: 1fr;
  }

  .note-index {
    width: 76px;
    height: 76px;
  }

  .capability-note dl {
    grid-column: 1;
  }

  .reader-toolbar {
    align-items: flex-start;
    gap: 12px;
  }

  .reader-toolbar > div {
    flex-direction: column;
    align-items: flex-end;
  }

  .reader-title {
    margin: 52px auto 36px;
  }

  .page-spreads {
    grid-template-columns: 1fr;
  }

  .zine-page {
    padding: 20px;
  }

  .editor-toolbar {
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }

  .editor-toolbar > div:first-child {
    display: grid;
    gap: 2px;
  }

  .editor-history-tools {
    display: none !important;
  }

  .editor-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
    overflow: visible;
  }

  .editor-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .editor-canvas {
    padding: 22px 14px;
  }

  .spread-preview {
    grid-template-columns: 0.8fr 1fr;
    gap: 10px;
    margin: 10px auto;
  }

  .spread-preview .zine-cover {
    padding-left: 17%;
  }

  .spread-preview .zine-cover strong {
    font-size: 18px;
  }

  .preview-page {
    gap: 5px;
    padding: 7%;
  }

  .preview-page p {
    font-size: 8px;
  }

  .page-strip {
    flex-direction: row;
    overflow-x: auto;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .page-strip button {
    width: 58px;
    flex: 0 0 58px;
    margin: 0 6px 0 0;
  }

  .page-strip .add-page {
    margin-top: 0;
  }

  .page-strip-head,
  .revision-history {
    display: none;
  }

  .profile-header {
    align-items: flex-start;
  }

  .profile-main {
    align-items: flex-start;
    gap: 18px;
  }

  .avatar {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }

  .profile-header h1 {
    font-size: 40px;
  }

  .profile-actions {
    display: none;
  }

  .profile-stats div {
    display: block;
  }

  .profile-stats div + div {
    padding-left: 14px;
  }

  .profile-stats dd {
    font-size: 26px;
  }

  .profile-tabs button {
    min-width: 0;
    flex: 1;
    justify-content: center;
  }

  .my-zines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .map-board {
    min-height: 480px;
  }

  .core-gate {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .detail-story > section {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 24px 18px;
  }

  .detail-meta-rail {
    margin-top: 0;
  }

  .workbench-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .workbench-metrics > div {
    padding: 15px 12px;
  }

  .workspace-frame {
    display: block;
    min-height: 0;
  }

  .workspace-filter {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .workbench-tabs {
    display: flex;
    overflow-x: auto;
  }

  .workspace-shortcuts {
    display: none;
  }

  .workspace-row {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 14px;
  }

  .workspace-row .status-chip {
    grid-column: 2;
    justify-self: start;
  }

  .desktop-form,
  .form-preview {
    padding: 20px 16px;
  }

  .preview-window {
    min-height: 0;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .table-toolbar input {
    width: 100%;
  }

  .document-layout {
    display: block;
  }

  .document-layout > aside {
    position: static;
    margin-bottom: 30px;
  }

  .web-exhibition {
    margin: -54px -14px -102px;
  }

  .web-exhibition > header {
    min-height: 70vh;
    padding: 36px 18px;
  }

  .exhibition-chapters article {
    padding: 20px;
  }

  .booking-layout {
    display: block;
  }

  .booking-calendar,
  .booking-summary {
    border: 0;
    border-bottom: 1px solid var(--line-dark);
  }
}
