:root {
  color-scheme: light;
  --ground: #e9e4da;
  --paper: #f7f3eb;
  --fresh: #fffaf1;
  --surface: #eee8dc;
  --line: #bdb4a6;
  --rule: #29241f;
  --ink: #1b1816;
  --muted: #5b5148;
  --dim: #716454;
  --red: #ad251c;
  --red-vivid: #b82a20;
  --red-soft: #f2ded7;
  --label-ink: #fff9ed;
  --header: #211e1b;
  --header-ink: #fcf4e7;
  --header-muted: #d5c9b8;
  --shade: #7f6b4d20;
  --page-width: 1370px;
  --mast-height: 102px;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #201d19;
  --paper: #2b2722;
  --fresh: #322c26;
  --surface: #352e26;
  --line: #635445;
  --rule: #b8aa95;
  --ink: #f2e9dc;
  --muted: #d0c0ae;
  --dim: #bcae99;
  --red: #ffa090;
  --red-vivid: #aa3027;
  --red-soft: #462b25;
  --label-ink: #fff7e7;
  --header: #1b1915;
  --shade: #0003;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--ground);
  background-image: repeating-linear-gradient(0deg, #52412609 0, #52412609 1px, transparent 1px, transparent 8px);
  line-height: 1.68;
}
body, button, input, select { font-family: inherit; }
button, input, select { color: inherit; font-size: inherit; }
button { cursor: pointer; }
a { color: var(--red); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
p, ul, ol { margin: 0 0 1rem; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }
h1, h2, h3 { line-height: 1.24; margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; }
code, kbd, .mono {
  font-family: var(--mono);
  font-size: .89em;
  overflow-wrap: anywhere;
}
code { padding: .12em .3em; background: var(--surface); }
kbd { border: 1px solid var(--line); padding: .06em .38em; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red-vivid); color: var(--label-ink); }
article [id], .article-section[id], .mobile-reference details { scroll-margin-top: calc(var(--mast-height) + 19px); }

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 20;
  background: var(--paper);
  padding: 8px 13px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--header);
  color: var(--header-ink);
  border-top: 4px solid var(--red-vivid);
}
.mast-inner {
  max-width: var(--page-width);
  height: 56px;
  margin: auto;
  padding: 0 25px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--header-ink);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand strong { font-size: 1rem; letter-spacing: -.05em; }
.brand-symbol {
  width: 38px;
  height: 29px;
  display: grid;
  place-items: center;
  background: var(--red-vivid);
  color: var(--label-ink);
  border-right: 3px double #fbebd87a;
  font: 800 .9rem var(--mono);
  letter-spacing: .04em;
}
.brand:hover strong { text-decoration: underline; }
.search-trigger, .theme-button, .icon-button {
  min-height: 38px;
  background: #302a25;
  color: var(--header-muted);
  border: 1px solid #5f5347;
  line-height: 1.32;
}
.search-trigger:hover, .theme-button:hover, .icon-button:hover { color: var(--header-ink); border-color: var(--header-muted); }
.masthead :focus-visible { outline-color: #ffc6a9; }
.search-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 454px);
  min-width: 0;
  margin-left: auto;
  padding: 5px 11px;
  text-align: left;
  font-size: .89rem;
}
.search-trigger kbd { margin-left: auto; font-size: .72rem; border-color: #65584a; }
.search-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  margin: 0 4px 2px 1px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 6px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(46deg);
}
.theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: .84rem;
}
.theme-icon {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}
.menu-button { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 1.5px; background: currentColor; }
.menu-icon { position: relative; margin: auto; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; transform: translateY(-5px); }
.menu-icon::after { transform: translateY(5px); }

.wiki-nav {
  color: var(--ink);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.wiki-nav .nav-inner {
  max-width: var(--page-width);
  margin: auto;
  padding-inline: 25px;
  display: flex;
  gap: 0;
  align-items: stretch;
}
.wiki-nav a {
  padding: 8px clamp(11px, 1.35vw, 23px);
  min-height: 41px;
  display: flex;
  align-items: center;
  border-inline-start: 1px solid var(--line);
  color: var(--ink);
  font-size: .9rem;
  font-weight: 790;
  text-decoration: none;
  white-space: nowrap;
}
.wiki-nav a:last-child { border-inline-end: 1px solid var(--line); }
.wiki-nav a:hover { color: var(--red); background: var(--red-soft); }
.wiki-nav a[aria-current="page"] { color: var(--label-ink); background: var(--red-vivid); border-color: var(--red-vivid); }
.wiki-nav a:focus-visible { outline-color: var(--red); outline-offset: -3px; }

.wiki-layout {
  display: grid;
  grid-template: "side main" auto / 210px minmax(0, 1fr);
  align-items: start;
  gap: 25px;
  max-width: var(--page-width);
  min-height: calc(100vh - 151px);
  margin: auto;
  padding: 26px 25px 50px;
}
.wiki-main { grid-area: main; min-width: 0; }
.wiki-main:focus { outline: none; }
.context-rail { grid-area: side; min-width: 0; }
.wiki-layout:not(.home-layout) .context-rail {
  position: sticky;
  top: calc(var(--mast-height) + 25px);
  max-height: calc(100dvh - var(--mast-height) - 45px);
  overflow: auto;
  scrollbar-width: thin;
}
.home-layout { grid-template: "main side" auto / minmax(0, 1fr) minmax(265px, 330px); }
.home-layout .context-rail { display: grid; gap: 20px; }
.wide-main { grid-template: "main" auto / minmax(0, 1fr); }
.wide-main .context-rail { display: none; }

.ledger-heading {
  position: relative;
  min-width: 0;
  padding: 24px 29px 25px;
  border-block: 2px solid var(--rule);
  border-inline: 1px solid var(--line);
  border-left: 7px solid var(--red-vivid);
  background: var(--paper);
  isolation: isolate;
}
.ledger-heading::after {
  content: "";
  width: 22%;
  height: 25px;
  position: absolute;
  right: 19px;
  top: 21px;
  z-index: -1;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 4px, var(--line) 4px 6px, transparent 6px 10px, var(--line) 10px 13px, transparent 13px 16px);
  opacity: .6;
}
.edition-mark {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 0 11px;
  font: 700 .84rem var(--mono);
  color: var(--dim);
}
.edition-mark span {
  background: var(--red-soft);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 3px 6px;
  line-height: 1.15;
}
.ledger-heading h1 {
  font-size: clamp(2.55rem, 5.15vw, 4.9rem);
  font-weight: 900;
  letter-spacing: -.091em;
  line-height: 1.03;
}
.ledger-heading .action-row { margin-top: 18px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  background: var(--paper);
  color: var(--ink);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  font-weight: 800;
  font-size: .89rem;
  line-height: 1.38;
  text-decoration: none;
}
.button:hover { border-color: var(--red); color: var(--red); }
.button-primary { border-color: var(--red-vivid); background: var(--red-vivid); color: var(--label-ink); }
.button-primary:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.register {
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--rule);
  margin-top: 19px;
}
.register > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: var(--header);
  color: var(--header-ink);
  padding: 10px 14px;
}
.register > header h2 { font-size: 1rem; font-weight: 850; }
.register-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.register-list li { border-bottom: 1px solid var(--line); }
.register-list li:nth-child(n + 6) { border-left: 1px solid var(--line); background: var(--fresh); }
.register-list li:nth-child(5n) { border-bottom: 0; }
.register-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 13px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  word-break: keep-all;
}
.register-list a:hover { background: var(--red-soft); color: var(--red); text-decoration: underline; }
.register-list a:focus-visible { outline-offset: -2px; }

.receipt, .specimen-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 3px 3px 0 var(--shade);
}
.receipt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  background: var(--red-vivid);
  color: var(--label-ink);
}
.receipt-label h2 { font-size: 1.02rem; }
.receipt-label span { font-family: var(--mono); font-size: .85rem; }
.receipt dl { margin: 9px 0 3px; padding: 0 12px; }
.receipt dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dotted var(--line);
  padding: 5px 0;
  gap: 10px;
}
.receipt dt { color: var(--muted); font-weight: 750; font-size: .88rem; }
.receipt dt a { color: inherit; text-decoration: none; }
.receipt dt a:hover { color: var(--red); text-decoration: underline; }
.receipt dd { margin: 0; font: 800 1rem var(--mono); }
.receipt dl .receipt-total { border-bottom: 0; }
.receipt-total dt, .receipt-total dd { color: var(--red); }
.receipt-total dd { font-size: 1.55rem; }
.receipt-cut {
  border-top: 1px dashed var(--line);
  margin: 5px 0 0;
  padding: 7px 12px 10px;
  font-size: .85rem;
}
.receipt::after {
  content: "";
  position: absolute;
  height: 5px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: linear-gradient(135deg, transparent 65%, var(--ground) 66%) 0 0 / 9px 5px repeat-x,
    linear-gradient(225deg, transparent 65%, var(--ground) 66%) 0 0 / 9px 5px repeat-x;
}
.specimen-art {
  display: block;
  border-bottom: 1px solid var(--line);
  background: #f4f1ea;
}
.specimen-art img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; }
.specimen-copy { padding: 11px 12px 13px; }
.specimen-copy h2 { font-size: 1.14rem; }
.specimen-copy h2 a { color: var(--ink); text-decoration: none; }
.specimen-copy h2 a:hover { color: var(--red); text-decoration: underline; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; color: var(--dim); font-size: .85rem; }
.breadcrumb a { color: var(--red); }
.breadcrumb a + span::before { content: "/"; margin-right: 7px; color: var(--dim); }
.article-body {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rule);
  box-shadow: 4px 4px 0 var(--shade);
  padding: 19px clamp(16px, 4vw, 35px) 28px;
}
.article-head {
  border-bottom: 2px solid var(--rule);
  padding: 4px 0 13px;
  margin: 0 0 14px;
}
.article-head h1 {
  font-size: clamp(2rem, 4vw, 3.45rem);
  letter-spacing: -.075em;
  font-weight: 880;
}
.article-subtitle { color: var(--muted); font-size: .94rem; margin: 4px 0 0; overflow-wrap: anywhere; }
.article-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag {
  display: inline-block;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
  font-weight: 750;
  padding: 1px 5px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag-local { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.article-intro { margin-bottom: 18px; }
.article-intro.has-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 235px);
  align-items: start;
  gap: 18px;
}
.article-lead { max-width: 68ch; margin: 0 0 15px; font-size: 1.01rem; line-height: 1.78; }
.article-intro .article-lead { margin: 0; }
.meta-panel {
  border: 1px solid var(--line);
  background: var(--fresh);
  box-shadow: 2px 2px 0 var(--shade);
}
.meta-panel h2 {
  background: var(--red-vivid);
  color: var(--label-ink);
  font-size: .88rem;
  padding: 6px 8px;
}
.meta-panel dl { margin: 0; padding: 3px 8px 5px; }
.meta-panel dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--line);
  font-size: .83rem;
}
.meta-panel dl div:last-child { border-bottom: 0; }
.meta-panel dd { margin: 0; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.meta-panel dt { color: var(--muted); }
.article-section { margin: 0 0 22px; }
.article-section h2 {
  margin: 0 0 8px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 5px;
  font-size: 1.3rem;
  letter-spacing: -.035em;
}
.article-section h3 {
  margin: 15px 0 6px;
  font-size: 1.07rem;
  letter-spacing: -.02em;
}
.section-number, .toc-number { color: var(--red); font: 800 .84em var(--mono); }
.section-number { padding-right: .59em; }
.article-section p { line-height: 1.76; }
.article-section ul, .article-section ol { padding-left: 1.23rem; }
.article-section li + li { margin-top: 4px; }
.article-section .specimen-name { margin: 0 0 6px; color: var(--muted); font-size: .9rem; }
.specimen-figure {
  float: right;
  width: min(33%, 255px);
  margin: 2px 0 10px 14px;
  border: 1px solid var(--line);
  background: var(--fresh);
}
.specimen-figure img { width: 100%; height: auto; }
.specimen-figure figcaption { padding: 3px 6px; color: var(--muted); font-size: .79rem; }
.specimen-figure ~ h3 { clear: right; }
.article-section details {
  margin: 8px 0 13px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: var(--fresh);
}
.article-section details summary, .rail-panel summary { cursor: pointer; font-weight: 850; color: var(--red); }
.article-section details[open] summary { margin-bottom: 7px; }
.article-section details > :last-child { margin-bottom: 0; }
.article-section .moon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 3px 10px;
  padding-left: 0;
  list-style: none;
}
.article-section .moon-grid li { margin: 0; padding: 3px 0; }
.notice { margin: 0 0 1rem; padding: 7px 10px; border-left: 3px solid var(--red-vivid); background: var(--red-soft); }
.notice-spoiler { background: var(--red-soft) !important; }
.articles-foot li { overflow-wrap: anywhere; }
.ref-mark a { margin-inline: 2px; font: .78rem var(--mono); }
.rail-panel { padding: 9px 10px; border: 1px solid var(--line); background: var(--paper); }
.rail-panel + .rail-panel { margin-top: 12px; }
.rail-panel h2, .rail-panel > summary {
  font-size: .92rem;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.rail-panel ul, .rail-panel ol { list-style: none; padding: 0; margin: 6px 0 0; }
.rail-panel li { font-size: .88rem; line-height: 1.43; margin: 0; }
.rail-panel li > a {
  display: flex;
  gap: 6px;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 3px;
  border-left: 3px solid transparent;
}
.rail-panel li > a:hover { color: var(--red); background: var(--red-soft); }
.rail-panel li > a[aria-current="location"] {
  border-color: var(--red-vivid);
  color: var(--red);
  font-weight: 850;
  background: var(--red-soft);
}
.rail-panel ol.toc-children { margin: 0 0 2px 11px; padding-left: 5px; border-left: 1px dotted var(--line); }
.toc-children .toc-number { min-width: 2.25em; }
.rail-note { color: var(--muted); font-size: .86rem; }
.related-panel { margin: 0 0 16px; }
.related-panel ul { display: flex; flex-wrap: wrap; gap: 0 10px; }
.related-panel li > a { color: var(--red); text-decoration: underline; }
.mobile-reference, .toc-button { display: none; }
.relation-frame {
  width: 100%;
  height: min(74vh, 810px);
  min-height: 485px;
  display: block;
  border: 1px solid var(--rule);
  background: #10171c;
}

.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); margin-bottom: 1rem; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--fresh); margin: 0; }
.wiki-table th, .wiki-table td {
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
}
.wiki-table thead th { background: var(--surface); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.wiki-table tbody tr:last-child > * { border-bottom: 0; }
.wiki-table tbody tr:nth-child(even) { background: var(--paper); }
.wiki-table tbody tr:hover { background: var(--red-soft); }
.wiki-table caption { text-align: left; color: var(--muted); padding: 6px 8px; }
.empty-cell { padding: 17px !important; color: var(--muted); }
.catalog-form {
  margin: 0 0 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, auto) minmax(92px, auto);
  gap: 8px;
}
.catalog-form label, .creature-filter label { display: grid; align-content: start; gap: 3px; color: var(--muted); font-size: .88rem; }
.catalog-form input, .catalog-form select, .creature-filter input {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: var(--fresh);
  color: var(--ink);
  font-size: 1rem;
}
.catalog-form select { appearance: none; padding-right: 25px; }
.select-control { display: block; position: relative; }
.select-control::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 42%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}
.filter-status { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: 9px; font-size: .87rem; color: var(--muted); }
.reset-button { padding: 2px 0 2px 8px; border: 0; background: none; color: var(--red); font-size: .87rem; text-decoration: underline; }
.catalog-table td:first-child { width: 27%; overflow-wrap: anywhere; }
.catalog-table .alias { display: block; color: var(--muted); font-size: .83rem; }
.catalog-table .catalog-kind { white-space: nowrap; }
.catalog-table .version { white-space: nowrap; color: var(--muted); font: .81rem var(--mono); padding-top: 10px; }
.catalog-table .catalog-summary { min-width: 145px; }
.creature-filter { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 13px; max-width: 480px; margin: 0 0 8px; }
.creature-filter p { margin: 0 0 7px; color: var(--muted); font-family: var(--mono); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: calc(var(--page-width) - 50px);
  margin: 0 auto;
  padding: 10px 0 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.search-dialog {
  width: min(600px, calc(100% - 26px));
  max-height: min(700px, 85dvh);
  top: min(9vh, 70px);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid var(--rule);
  border-top: 5px solid var(--red-vivid);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 7px 7px 0 #15100d90;
}
.search-dialog::backdrop { background: #15100da8; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; font-weight: 850; }
.plain-button { background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 3px 7px; min-height: 32px; font-size: .87rem; }
.plain-button:hover { color: var(--red); border-color: var(--red); }
.query-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: var(--fresh);
  color: var(--muted);
}
.query-wrap:focus-within { border-color: var(--red); }
.query-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; min-height: 29px; }
.search-status { margin: 6px 0 3px; color: var(--muted); font-size: .84rem; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1px 8px;
  align-items: center;
  padding: 7px 5px;
  border-bottom: 1px dotted var(--line);
  color: var(--ink);
  text-decoration: none;
}
.search-results a:hover, .search-results a:focus { background: var(--red-soft); color: var(--red); }
.search-results .search-description { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; line-height: 1.4; }

@media (max-width: 1150px) {
  .wiki-layout { gap: 17px; grid-template-columns: 175px minmax(0, 1fr); }
  .wiki-layout.home-layout { grid-template-columns: minmax(0, 1fr) 252px; }
  .wiki-layout.wide-main { grid-template-columns: minmax(0, 1fr); }
  .catalog-table .catalog-kind { white-space: normal; }
  .site-footer { margin-inline: 25px; }
}
@media (max-width: 900px) {
  .wiki-layout:not(.home-layout) { display: block; padding-inline: clamp(13px, 3vw, 25px); }
  .wiki-layout:not(.home-layout) .context-rail { display: none; }
  .mobile-reference { display: block; margin: 0 0 16px; }
  .mobile-reference .rail-panel { max-width: 485px; }
  .mobile-reference .rail-panel:not([open]) > summary { border-bottom: 0; padding-bottom: 0; }
  .toc-button {
    display: inline-flex;
    position: fixed;
    z-index: 3;
    bottom: 13px;
    right: 13px;
    min-height: 38px;
    align-items: center;
    padding: 4px 11px;
    background: var(--red-vivid);
    color: var(--label-ink);
    border: 1px solid var(--red-vivid);
    box-shadow: 2px 2px 0 var(--shade);
    font-size: .86rem;
    font-weight: 850;
  }
}
@media (max-width: 740px) {
  :root { --mast-height: 58px; }
  .mast-inner { height: 53px; padding-inline: 11px; gap: 6px; }
  .brand { gap: 5px; }
  .brand-symbol { width: 30px; height: 26px; font-size: .8rem; }
  .brand strong { font-size: .85rem; }
  .menu-button { display: inline-block; width: 35px; flex: 0 0 35px; padding: 3px 4px; }
  .search-trigger { min-width: 35px; flex: 1 1 auto; justify-content: center; padding-inline: 4px; gap: 5px; }
  .search-trigger kbd, #theme-label { display: none; }
  .theme-button { width: 35px; padding-inline: 3px; }
  .wiki-nav { display: none; position: absolute; inset: 100% 0 auto; border-bottom: 2px solid var(--rule); box-shadow: 0 4px 0 var(--shade); }
  .wiki-nav.menu-open { display: block; }
  .wiki-nav .nav-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 0; }
  .wiki-nav a, .wiki-nav a:last-child { min-height: 43px; padding: 5px 10px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .wiki-nav a:nth-child(3n) { border-right: 0; }
  .wiki-layout.home-layout { display: flex; flex-direction: column; align-items: stretch; }
  .wiki-layout, .wiki-layout:not(.home-layout) { padding: 13px 11px 36px; }
  .home-layout .context-rail { gap: 14px; }
  .ledger-heading { padding: 17px 14px 16px; border-left-width: 5px; }
  .ledger-heading h1 { font-size: clamp(2.12rem, 9.8vw, 3.05rem); }
  .ledger-heading::after { height: 18px; width: 24%; top: 15px; right: 13px; }
  .ledger-heading .action-row { margin-top: 14px; }
  .register { margin-top: 13px; }
  .register-list a { padding: 6px 8px; }
  .article-body { padding: 12px 11px 18px; }
  .article-intro.has-facts { grid-template-columns: 1fr; gap: 8px; }
  .article-lead { font-size: .96rem; }
  .meta-panel { max-width: 400px; }
  .specimen-figure { float: none; width: min(100%, 225px); margin: 5px 0 9px; }
  .article-section p { overflow-wrap: anywhere; word-break: keep-all; }
  .relation-frame { height: 70dvh; min-height: 455px; }
  .site-footer { margin-inline: 11px; }
}
@media (max-width: 470px) {
  .catalog-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .catalog-query { grid-column: 1 / -1; }
  .catalog-table .catalog-summary { min-width: 0; }
  .catalog-table .catalog-kind { min-width: 64px; }
  .catalog-table .version { max-width: 70px; white-space: normal; overflow-wrap: anywhere; }
  .catalog-table th, .catalog-table td { padding-inline: 6px; }
  .catalog-table th:nth-child(4), .catalog-table td:nth-child(4) { display: none; }
}
@media (max-width: 365px) {
  .search-trigger > span:nth-child(2) { font-size: .71rem; }
  .ledger-heading h1 { font-size: 2.07rem; }
}

