:root {
  color-scheme: light;
  scrollbar-gutter: stable;
  --paper: #f7f3e9;
  --surface: #fffaf0;
  --ink: #252922;
  --body-text: #4d5147;
  --muted: #625e52;
  --line: #d8cebc;
  --rust: #9d4936;
  --rust-dark: #783425;
  --wash: #efe3cf;
  --sans: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: Georgia, "Songti SC", SimSun, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: clamp(22px, 6vw, 106px);
  --corner-width: clamp(104px, 11vw, 154px);
  --corner-height: clamp(76px, 8.2vw, 115px);
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='.085'/%3E%3C/svg%3E");
  background-color: var(--paper);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--grain), var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; }
::selection { background: #e5c9ad; color: var(--ink); }
section[id] { scroll-margin-top: 25px; }

.site-page { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.site-page > main, .tabletop-board > main { flex: 1; }
.tabletop-stage {
  position: relative;
  overflow: clip;
  perspective: 1600px;
  background: #e2d6c0;
}
.tabletop-board {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--grain), var(--paper);
  box-shadow: 0 12px 38px #4a321d38;
}
.tabletop-ball, .tabletop-star {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: clamp(30px, 3.5vw, 48px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
}
.tabletop-ball {
  border-radius: 50%;
  background: radial-gradient(circle at 33% 27%, #ffb09b 0, #f3523e 22%, #ce271e 52%, #801617 86%, #581416 100%);
  box-shadow: 1px 7px 11px #651f2652;
}
.tabletop-star {
  transform: translateX(72px);
  filter: drop-shadow(1px 5px 4px #7c4c333e);
}
.tabletop-star svg { display: block; width: 100%; height: 100%; }
.tabletop-ball--blue {
  background: radial-gradient(circle at 33% 27%, #c7eaff 0, #518fdf 22%, #2263bd 52%, #15427e 86%, #102c52 100%);
  box-shadow: 1px 7px 11px #17365c52;
}
.tabletop-flight {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-style: preserve-3d;
  pointer-events: none;
}
.tabletop-ball--falling { box-shadow: none; }
.frame { width: min(1112px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link {
  position: absolute;
  z-index: 8;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 8px 13px;
  border-radius: 6px;
  background: var(--rust-dark);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 760; line-height: 1.25; }
.brand:hover { color: var(--rust-dark); }
.brand-mark { width: 37px; height: 37px; flex: none; color: var(--rust); }
.language-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #cdbfa9;
  border-radius: 100px;
  background: #fffaf0aa;
  flex: none;
}
.language-switch a {
  min-width: 35px;
  padding: 4px 8px;
  border-radius: 100px;
  color: var(--body-text);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.language-switch a:hover { background: var(--wash); color: var(--rust-dark); }
.language-switch a[aria-current] { background: var(--ink); color: #fffaf1; }

.hero {
  display: grid;
  grid-template-columns: minmax(242px, .86fr) minmax(0, 1.34fr);
  align-items: center;
  gap: clamp(36px, 6.6vw, 94px);
  padding-block: clamp(55px, 6vw, 85px) clamp(56px, 6vw, 82px);
}
.portrait { width: min(100%, 372px); }
.portrait-face {
  padding: 9px 9px 10px;
  border: 1px solid #dbd0bd;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 16px 35px #4a38211c, 0 2px 4px #4a382114;
}
.portrait-back { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .portrait { perspective: 1200px; }
  .portrait-card {
    position: relative;
    pointer-events: none;
    transform-style: preserve-3d;
    transition: transform .32s cubic-bezier(.2, .8, .25, 1);
  }
  .portrait:hover .portrait-card {
    transform: rotateY(180deg);
    transition-duration: .42s;
  }
  .portrait-face { backface-visibility: hidden; }
  .portrait-back {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transform: rotateY(180deg);
    background: var(--grain), var(--wash);
    color: var(--rust-dark);
    font: 700 21px/1.4 var(--serif);
  }
  .portrait-back::before {
    content: "";
    position: absolute;
    inset: 15px;
    border: 1px solid #c7b59a;
    border-radius: 7px;
  }
}
.portrait-image {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: clamp(260px, 29vw, 377px);
  border-radius: 9px;
  background: #dfd6c4;
}
.portrait-image img { display: block; width: 100%; height: 100%; object-fit: scale-down; }
.portrait-image[data-photo-fit="fit"] img { object-fit: contain; }
.portrait-image[data-photo-fit="crop"] img { object-fit: cover; }
.portrait-image[data-photo-fit="fillbounds"] img { object-fit: fill; }
.portrait-image[data-photo-fit="none"] img { object-fit: none; }
.portrait-image:is([data-photo-fit="fillheight"], [data-photo-fit="fillwidth"]) img {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  object-fit: fill;
}
.portrait-image[data-photo-fit="fillheight"] img { width: auto; }
.portrait-image[data-photo-fit="fillwidth"] img { height: auto; }
.portrait-placeholder {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  background: var(--grain), radial-gradient(ellipse at 31% 24%, #f1e9d8 2%, #e2d8c2 53%, #c6b89d 100%);
  color: #786a52;
}
.portrait-placeholder::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid #9d8f7466;
  border-radius: 5px;
}
.portrait-orbits { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .46; }
.portrait-symbol { position: relative; width: clamp(68px, 25%, 100px); color: #67563e; }
.portrait-index {
  position: absolute;
  left: 23px;
  bottom: 20px;
  font: 700 10px/1.1 var(--mono);
  letter-spacing: .11em;
}
.portrait figcaption {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 5px 0;
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.portrait figcaption span { display: inline-block; flex: 0 0 5px; height: 5px; border-radius: 50%; background: var(--rust); }
.portrait-back p { max-width: 100%; padding: 26px; text-align: center; white-space: pre-line; overflow-wrap: anywhere; }

.hero-title {
  font: 650 italic clamp(58px, 7.45vw, 105px)/1 var(--serif);
  letter-spacing: -.084em;
  overflow-wrap: anywhere;
}
.hero-name { margin-top: 20px; font-size: clamp(23px, 2.8vw, 36px); font-weight: 820; line-height: 1.35; letter-spacing: -.04em; }
.hero-alias { margin-top: 5px; font-size: clamp(15px, 1.65vw, 20px); font-weight: 730; color: var(--body-text); }
.hero-intro { max-width: 34em; margin-top: 22px; color: var(--body-text); line-height: 1.85; white-space: pre-wrap; }
.hero-copy { min-width: 0; overflow-wrap: anywhere; }
.contacts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 21px; padding: 0; list-style: none; }
.contacts li { min-width: 0; max-width: 100%; }
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 39px;
  border: 1px solid #d4c6af;
  border-radius: 7px;
  padding: 5px 9px;
  background: #fffaf0aa;
  color: var(--rust-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
  max-width: 100%;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.contact-item :is(svg, img) { width: 17px; height: 17px; flex: none; object-fit: contain; }
.contact-item:hover { border-color: var(--rust); background: var(--wash); }
.contact-feedback { color: var(--muted); font-size: 13px; }
.contact-feedback:not(:empty) { margin-top: 6px; }

.home-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-bottom: 64px; }
.index-column { min-width: 0; padding-top: 34px; }
.index-column:first-child { padding-right: clamp(18px, 3vw, 40px); border-right: 1px solid var(--line); }
.index-column:last-child { padding-left: clamp(18px, 3vw, 40px); }
.index-heading { display: flex; align-items: end; justify-content: space-between; gap: 13px; margin-bottom: 19px; }
.eyebrow { color: var(--muted); font: 700 11px/1.45 var(--mono); letter-spacing: .105em; }
.eyebrow > span { color: var(--rust-dark); }
.index-heading h2 { margin-top: 4px; font-size: clamp(29px, 4vw, 43px); line-height: 1.2; font-weight: 800; letter-spacing: -.055em; }
.index-all { padding-bottom: 3px; color: var(--rust-dark); font-size: 13px; font-weight: 700; white-space: nowrap; }
.index-all:hover, .return-link:hover, .footer-inner a:hover { text-decoration: underline; text-underline-offset: 4px; }
.empty-state { color: var(--muted); font-size: 14px; }
.index-empty { padding-top: 14px; border-top: 1px solid var(--line); }
.index-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.index-list > li { border-bottom: 1px solid var(--line); }
.index-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 17px;
  align-items: baseline;
  gap: 9px;
  padding: 14px 3px;
  border-radius: 3px;
  transition: background-color .2s ease;
}
.index-item:hover { background: #ecdfca88; }
.index-number { color: var(--rust-dark); font: 700 11px/1 var(--mono); }
.index-item h3 { font-size: 16px; font-weight: 750; line-height: 1.4; }
.index-item p { margin-top: 4px; color: var(--body-text); font-size: 13px; line-height: 1.65; }
.item-arrow { justify-self: end; color: var(--rust-dark); transition: transform .2s ease; }
.index-item:hover .item-arrow { transform: translate(2px, -2px); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.footer-inner a { white-space: nowrap; }
.footer-inner a > span { color: var(--rust-dark); }

.archive, .detail { padding-block: 35px 65px; }
.return-link { display: inline-flex; align-items: center; gap: 6px; color: var(--rust-dark); font-size: 14px; font-weight: 700; }
.archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 27px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.archive-heading h1, .detail-heading h1 {
  margin-top: 6px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.13;
  letter-spacing: -.061em;
  font-weight: 820;
}
.archive-intro, .detail-intro { max-width: 44em; margin-top: 12px; color: var(--body-text); line-height: 1.8; }
.archive-count { color: var(--muted); padding-bottom: 2px; white-space: nowrap; font-size: 13px; }
.archive-empty { margin-top: 25px; }
.archive-tools:not([hidden]) { display: flex; align-items: end; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; }
.archive-search { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.archive-search input {
  width: min(280px, 100%);
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.archive-filter { display: flex; align-items: center; gap: 7px; min-height: 40px; font-size: 14px; cursor: pointer; }
.archive-filter input { accent-color: var(--rust); }
.masonry[hidden] { display: none; }
.masonry {
  --card-gap: 23px;
  --columns: min(var(--archive-columns, 2), var(--viewport-columns, 4));
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  align-items: start;
  gap: var(--card-gap);
  list-style: none;
  padding: 0;
  margin-top: 25px;
}
.masonry-item { min-width: 0; }
.masonry-item:nth-child(3n + 2) { --cover-height: 198px; }
.masonry-item:nth-child(3n + 3) { --cover-height: 148px; }
.masonry[data-layout="measured"] { height: var(--masonry-height); }
.masonry[data-layout="measured"] > .masonry-item {
  position: absolute;
  width: calc((100% - (var(--columns) - 1) * var(--card-gap)) / var(--columns));
  top: var(--card-top, 0px);
  left: var(--card-left, 0px);
}
@media (max-width: 1120px) { .masonry { --viewport-columns: 3; } }
@media (max-width: 820px) { .masonry { --viewport-columns: 2; } }
.archive-card {
  --archive-corner-right: 18px;
  --archive-star-bottom: 12px;
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid #d8cbb5;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 4px 11px #45301808;
  transition: transform .23s ease, border-color .23s ease, box-shadow .23s ease;
}
.archive-card:hover, .archive-card:focus-within {
  transform: translateY(-4px);
  border-color: #af8a6e;
  box-shadow: 0 12px 24px #45301820;
}
.archive-card-link { display: block; }
.archive-card:has(.archive-card-link:focus-visible) { outline: 3px solid var(--rust); outline-offset: 4px; }
.archive-card-external {
  position: absolute;
  right: calc(var(--archive-corner-right) + 26px);
  bottom: calc(var(--archive-star-bottom) - 4px);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d7c5ae;
  border-radius: 6px;
  color: var(--rust-dark);
  background: var(--surface);
}
.archive-card-external :is(img, svg) { width: 17px; height: 17px; object-fit: contain; }
.archive-card-external:hover { background: var(--wash); border-color: var(--rust); }
.archive-cover {
  position: relative;
  min-height: var(--cover-height, 166px);
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  color: var(--cover-ink, #694537);
  background: var(--grain), radial-gradient(ellipse at 14% 21%, #fff8e765, transparent 63%), var(--cover-color, #e7cdbb);
  border-bottom: 1px solid #6c51322d;
}
.cover-art { position: absolute; z-index: -1; right: -15px; bottom: -13px; width: min(61%, 290px); opacity: .32; transition: transform .3s ease; }
.cover-image {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: var(--cover-image-width, 58%);
  opacity: var(--cover-image-opacity, 82%);
  mask-image: linear-gradient(to right, transparent, black var(--cover-image-fade, 64%));
}
.cover-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.cover-image::after {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(var(--cover-image-blur, 7px));
  mask-image: linear-gradient(to right, black 28%, transparent 74%);
}
.archive-card:hover .cover-art, .archive-card:focus-within .cover-art { transform: translate(-5px, -4px) scale(1.07); }
.cover-type { display: flex; flex-direction: column; gap: 6px; }
.cover-type > span { font: 700 10px/1.5 var(--mono); letter-spacing: .115em; }
.cover-type > strong { font: 700 clamp(32px, 4.6vw, 62px)/1.1 var(--serif); letter-spacing: -.052em; overflow-wrap: anywhere; }
.archive-card-body { position: relative; padding: 18px 22px 37px; }
.archive-card:has(> .archive-card-external) .archive-card-body {
  padding-bottom: calc(var(--archive-star-bottom) + 32px);
}
.archive-card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; color: var(--muted); font-size: 12px; padding-right: 30px; }
.archive-card-body h2 { margin-top: 7px; padding-right: 21px; font-size: clamp(20px, 2.55vw, 29px); line-height: 1.25; letter-spacing: -.045em; }
.archive-card-body p { margin-top: 8px; color: var(--body-text); font-size: 14px; line-height: 1.75; }
.archive-card-body .tags { margin-top: 12px; }
.archive-card-arrow {
  position: absolute;
  top: 17px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--rust-dark);
  border: 1px solid #d7c5ae;
  border-radius: 50%;
  font-size: 15px;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.archive-card:hover .archive-card-arrow, .archive-card:focus-within .archive-card-arrow { transform: translate(2px, -2px); background: var(--rust-dark); border-color: var(--rust-dark); color: #fffaf0; }

.archive-star {
  position: absolute;
  right: var(--archive-corner-right);
  bottom: var(--archive-star-bottom);
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #926919;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.archive-star[data-featured="true"] { fill: #f5ca4f; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.tags li { padding: 2px 7px; border: 1px solid #e0d3bc; border-radius: 4px; background: #f5eee0; color: var(--body-text); font-size: 11px; white-space: nowrap; }

.detail-heading { margin-top: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.detail-heading h1 { max-width: 18em; font-size: clamp(33px, 5.45vw, 64px); text-wrap: balance; }
.detail-intro { font-size: 17px; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 14px; }
.note-byline { margin-top: 12px; color: var(--muted); font-size: 13px; }
.note-byline span { margin-inline: 4px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(204px, 260px); gap: clamp(26px, 7vw, 80px); padding-top: 29px; }
.detail-prose, .detail-aside { min-width: 0; }
.prose-section + .prose-section { margin-top: 30px; }
.prose-section h2 { font-size: clamp(21px, 3vw, 29px); font-weight: 800; line-height: 1.35; letter-spacing: -.035em; }
.prose-section p, .prose-section ul { color: var(--body-text); line-height: 1.86; }
.prose-section p { margin-top: 10px; }
.body-image { display: inline-block; width: fit-content; max-width: 100%; vertical-align: middle; }
.body-image--block { display: block; margin-block: 14px; }
.body-image--block[data-align="center"] { margin-inline: auto; }
.body-image--block[data-align="right"] { margin-inline: auto 0; }
.body-image img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.body-image[data-sized] img { width: 100%; }
.body-image-caption {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.image-zoom-link { display: block; border-radius: 8px; }
.image-zoom-link, img[data-image-zoom] { cursor: zoom-in; }
.image-zoom-dialog {
  width: fit-content;
  max-width: calc(100% - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.image-zoom-dialog::backdrop { background: #201b13bd; }
.image-zoom-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.image-zoom-actions :is(a, button) {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--rust-dark);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.image-zoom-dialog img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); height: auto; object-fit: contain; }
.image-zoom-dialog p { margin-top: 6px; color: var(--muted); font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.prose-section ul { margin-top: 9px; padding-left: 1.4em; }
.prose-section li + li { margin-top: 4px; }
.code-block {
  margin: 14px 0 0;
  border-radius: 8px;
  background: #1e1e1e;
  color: #d4d4d4;
  font: 13px/1.7 var(--mono);
}
.code-block figcaption {
  padding: 6px 16px;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid #303031;
  background: #252526;
  color: #ccc;
  font: 650 12px/1.5 var(--sans);
}
.code-block pre { margin: 0; padding: 12px 16px 15px; overflow: auto; border-radius: 0 0 8px 8px; font: inherit; }
.code-block code { font: inherit; }
.code-block :is(.hljs-keyword, .hljs-literal, .hljs-name) { color: #569cd6; }
.code-block :is(.hljs-string, .hljs-regexp, .hljs-deletion) { color: #ce9178; }
.code-block :is(.hljs-number, .hljs-addition) { color: #b5cea8; }
.code-block :is(.hljs-comment, .hljs-quote) { color: #6a9955; }
.code-block :is(.hljs-title, .hljs-built_in) { color: #dcdcaa; }
.code-block :is(.hljs-type, .hljs-title.class_) { color: #4ec9b0; }
.code-block :is(.hljs-variable, .hljs-attr, .hljs-attribute, .hljs-property, .hljs-params) { color: #9cdcfe; }
.code-block :is(.hljs-meta, .hljs-selector-tag, .hljs-selector-class, .hljs-selector-id) { color: #d7ba7d; }
.code-block :is(.hljs-symbol, .hljs-bullet, .hljs-operator) { color: #c586c0; }
.code-block .hljs-tag { color: #808080; }
.code-block .hljs-emphasis { font-style: italic; }
.code-block .hljs-strong { font-weight: 700; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.markdown-body { overflow-wrap: anywhere; }
.markdown-body :is(h2, h3, h4, h5, h6):not(:first-child) { margin-top: 24px; }
.markdown-body :is(ol, ul, blockquote, table) { margin-block: 10px; }
.markdown-body ol { padding-left: 1.4em; }
.markdown-body a { color: var(--rust-dark); text-decoration: underline; text-underline-offset: .15em; }
.markdown-body img { max-width: 100%; height: auto; }
.markdown-body blockquote { margin-inline: 0; padding-left: 12px; border-left: 1px solid var(--line); }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.markdown-body :is(th, td) { padding: 5px 9px; border: 1px solid var(--line); }
.facts-panel, .contents { border: 1px solid var(--line); padding: 15px 17px; border-radius: 9px; background: var(--surface); }
.facts-panel h2, .contents h2 { font-size: 15px; }
.facts-panel dl { margin-top: 6px; }
.facts-panel dl div { display: grid; gap: 2px; border-bottom: 1px solid #e3d7c5; padding-block: 7px; }
.facts-panel dl div:last-child { border: 0; padding-bottom: 1px; }
.facts-panel dt { font-size: 12px; color: var(--muted); }
.facts-panel dd { font-size: 14px; font-weight: 670; }
.facts-panel + .contents { margin-top: 13px; }
.contents ol { margin-top: 6px; padding-left: 0; list-style: none; font-size: 13px; color: var(--body-text); }
.contents li + li { margin-top: 5px; }
.contents a { overflow-wrap: anywhere; }
.contents a:hover { color: var(--rust-dark); text-decoration: underline; text-underline-offset: 3px; }
@media (width > 720px) {
  .detail-aside .contents {
    position: sticky;
    top: 24px;
    max-height: calc(100dvh - 48px);
    overflow: auto;
  }
}
.related-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: fit-content; margin-top: 27px; border: 1px solid #d9c5a9; border-radius: 7px; background: var(--wash); padding: 8px 12px; color: var(--rust-dark); font-size: 14px; font-weight: 700; }
.related-link:hover { border-color: var(--rust); }
.related-link > span:first-child { font-size: 11px; color: var(--muted); }

.paper-corners { position: absolute; inset: 0; pointer-events: none; }
.paper-corner {
  display: block;
  position: absolute;
  z-index: 5;
  bottom: 0;
  width: var(--corner-width);
  height: var(--corner-height);
  color: #523629;
  pointer-events: none;
  transition: color .15s ease;
}
.paper-corner[data-side="left"] { left: 0; }
.paper-corner[data-side="right"] { right: 0; }
.paper-corner:hover, .paper-corner:focus-visible { color: var(--rust-dark); }
.paper-corner:active { color: var(--ink); }
.corner-shape { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 -2px 5px #51391d37); }
.corner-shape path, .corner-label { pointer-events: auto; }
.paper-corner[data-side="right"] .corner-shape { transform: scaleX(-1); }
.corner-label {
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  font-size: clamp(12px, 1.14vw, 15px);
  font-weight: 800;
  white-space: nowrap;
}
.paper-corner[data-side="right"] .corner-label {
  left: auto;
  right: max(12px, env(safe-area-inset-right));
  flex-direction: row-reverse;
}
.corner-label > span { font-size: 1.04em; }

/* Peel the outgoing DOM away over the already rendered destination. */
.paper-turn-cover {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
  background: var(--grain), var(--paper);
  background-position: 0 var(--paper-turn-offset);
  animation: paper-turn-left .56s cubic-bezier(.42,.04,.38,1) both;
}
.paper-turn-cover > .site-page { position: relative; top: var(--paper-turn-offset); }
.paper-turn-cover[data-side="right"] {
  animation-name: paper-turn-right;
}
@keyframes paper-turn-left {
  from { clip-path: polygon(100% 0, -100% 0, 100% 200%); }
  to { clip-path: polygon(100% 0, 100% 0, 100% 0); }
}
@keyframes paper-turn-right {
  from { clip-path: polygon(0 0, 200% 0, 0 200%); }
  to { clip-path: polygon(0 0, 0 0, 0 0); }
}

@media (max-width: 960px) {
  .footer-inner { padding-block: 20px calc(var(--corner-height) + 11px); }
}

@media (max-width: 720px) {
  .header-inner { min-height: 64px; }
  .brand { gap: 8px; font-size: 14px; }
  .brand-mark { width: 32px; height: 32px; }
  .hero { grid-template-columns: 1fr; gap: 27px; padding-block: 30px 39px; }
  .portrait { width: min(100%, 322px); }
  .portrait-image { height: clamp(208px, 66vw, 303px); }
  .hero-title { font-size: clamp(46px, 10.9vw, 72px); }
  .hero-name { margin-top: 14px; }
  .hero-intro { margin-top: 13px; }
  .contacts { margin-top: 15px; }
  .home-index { grid-template-columns: 1fr; margin-bottom: 35px; }
  .index-column:first-child, .index-column:last-child { border-right: 0; padding-inline: 0; padding-top: 24px; }
  .index-column:last-child { margin-top: 10px; }
  .index-heading { margin-bottom: 13px; }
  .archive, .detail { padding-block: 24px 39px; }
  .archive-heading { margin-top: 20px; padding-bottom: 16px; align-items: start; flex-direction: column; gap: 5px; }
  .archive-empty { margin-top: 17px; }
  .masonry { --card-gap: 14px; margin-top: 17px; }
  .archive-cover { padding-inline: 16px; min-height: calc(var(--cover-height, 166px) - 27px); }
  .archive-card { --archive-corner-right: 12px; --archive-star-bottom: 10px; }
  .archive-card-body { padding: 13px 14px 34px; }
  .archive-card-arrow { top: 12px; right: 12px; }
  .detail-heading { margin-top: 21px; padding-bottom: 18px; }
  .detail-intro { font-size: 16px; }
  .detail-grid { grid-template-columns: 1fr; gap: 22px; padding-top: 20px; }
}

@media (max-width: 550px) {
  :root { --gutter: 18px; }
  .masonry { --viewport-columns: 1; }
  .archive-card-body h2 { font-size: 22px; }
  .corner-label { bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
  .paper-turn-cover { animation: none; }
}
