:root {
  --paper: #f6f3ec;
  --paper-2: #ece8df;
  --ink: #171716;
  --text: #2c2b28;
  --muted: #77736b;
  --line: rgba(23, 23, 22, .14);
  --line-strong: rgba(23, 23, 22, .42);
  --max: 920px;
  --page: 760px;
  --research-max: 1120px;
  --measure: 700px;
  --selected-bg: #171716;
  --selected-fg: #fff;
  --serif: var(--font-serif);
  --sans: var(--font-sans);
  color-scheme: light;
}

:root[data-theme="white"] {
  --paper: #fff;
  --paper-2: #f1f1ef;
  --ink: #111;
  --text: #272725;
  --muted: #77736b;
  --line: rgba(17, 17, 17, .13);
  --line-strong: rgba(17, 17, 17, .4);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #171716;
  --paper-2: #222220;
  --ink: #f1eee7;
  --text: #d8d4cc;
  --muted: #96928a;
  --line: rgba(241, 238, 231, .14);
  --line-strong: rgba(241, 238, 231, .44);
  --selected-bg: #fff;
  --selected-fg: #111;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--paper);
  font: var(--type-body)/var(--leading-body) var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
::selection { color: var(--paper); background: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  width: min(calc(100% - 48px), var(--max));
  height: 56px;
  margin: auto;
  display: flex;
  align-items: center;
}
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3.2vw, 36px); }
.site-nav a {
  position: relative;
  padding: 18px 0 16px;
  color: var(--muted);
  font-size: var(--type-small);
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active { color: var(--ink); }
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}
.header-tools { margin-left: auto; display: flex; gap: 3px; }
.nav-rss { display: inline; }
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.icon-button:hover { background: var(--paper-2); }
.icon-button svg { width: 16px; height: 16px; }
.menu-button { display: none; }

.site-main { width: min(calc(100% - 48px), var(--max)); margin: auto; }
.page-main { width: min(calc(100% - 48px), var(--page)); margin: auto; padding: 48px 0 86px; }
.article-page { padding-top: 0; }
.page-heading { margin: 0 0 42px; color: var(--ink); font-size: var(--type-page-title); font-weight: 500; line-height: 1.15; }
.section-heading { margin: 0; color: var(--ink); font-size: var(--type-section); font-weight: 500; line-height: 1.3; }
.small-heading { margin: 0 0 24px; color: var(--ink); font-size: 20px; font-weight: 500; }
.muted { color: var(--muted); }

/* Article index: a quiet bibliography rather than a card/feed layout. */
.articles-main { width: min(calc(100% - 48px), 700px); padding-top: 30px; }
.category-nav { display: flex; justify-content: center; width: fit-content; margin: 0 auto 48px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.category-nav button {
  min-width: 58px;
  padding: 5px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: var(--type-caption)/1.45 var(--sans);
}
.category-nav button:hover,
.category-nav button.is-active { color: var(--selected-fg); background: var(--selected-bg); }
.year-group + .year-group { margin-top: 58px; }
.year-label {
  margin: 0 0 24px;
  color: var(--muted);
  font: 500 12px/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}
.entry-list { display: grid; gap: 21px; list-style: none; margin: 0; padding: 0; }
.entry {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  column-gap: 22px;
  row-gap: 3px;
  align-items: first baseline;
  padding: 0;
}
.entry + .entry { border-top: 0; }
.entry:hover { background: transparent; }
.entry__date { color: var(--muted); font: 11px/1.55 var(--sans); }
.entry__date {
  grid-column: 1;
  grid-row: 1;
  padding-top: .42em;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.entry__title { grid-column: 2; grid-row: 1; color: var(--ink); font-size: 19px; font-weight: 450; line-height: 1.52; }
.entry__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* Journals */
.issue-head { display: grid; grid-template-columns: minmax(210px, 280px) 1fr; gap: 54px; align-items: end; margin-bottom: 76px; }
.issue-head img { width: 100%; aspect-ratio: 3/4; object-fit: contain; }
.issue-head h1 { margin: 0 0 20px; color: var(--ink); font-size: clamp(38px, 5vw, 66px); font-weight: 450; line-height: 1.18; }
.issue-head p { max-width: 32em; margin: 0; color: var(--muted); }
.issue-meta { margin-top: 16px !important; font: var(--type-small)/1.6 var(--sans); }
.issue-entry-list .entry__date { font-size: 12px; }

/* General article */
.article-simple { width: min(100%, var(--measure)); margin: 0 auto; padding: 52px 0 96px; }
.article-header { margin-bottom: 46px; }
.article-header h1 { margin: 0 0 14px; color: var(--ink); font-size: var(--type-article-title); font-weight: 600; line-height: 1.45; letter-spacing: .01em; }
.article-meta { margin: 0; color: var(--muted); font: 13px/1.6 var(--sans); }
.article-deck { margin: 18px 0 0; color: var(--muted); font-size: var(--type-body); line-height: 1.8; }
.prose { color: var(--text); font-size: var(--type-body-reading); line-height: var(--leading-reading); }
.prose p { margin: 0 0 1.35em; }
.prose h2 { margin: 2.6em 0 1em; color: var(--ink); font-size: 28px; font-weight: 550; line-height: 1.5; }
.prose h3 { margin: 2.2em 0 .8em; color: var(--ink); font-size: 21px; font-weight: 550; line-height: 1.5; }
.prose ul,
.prose ol { margin: 1.2em 0 1.6em; padding-left: 1.6em; }
.prose li { margin: .45em 0; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose blockquote { margin: 2em 0; padding-left: 1.35em; color: var(--muted); border-left: 1px solid var(--line-strong); }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; height: auto; }
.prose figcaption { margin-top: 10px; color: var(--muted); font: 12px/1.6 var(--sans); }
.article-cover { margin: 34px 0 0; }
.article-cover img { width: min(100%, 520px); max-height: 560px; object-fit: contain; object-position: left center; }
.post-audio audio { width: 100%; }

/* Research: main text occupies the left side, notes use the natural outer margin. */
.research-page { width: min(calc(100% - 48px), var(--research-max)); margin: auto; padding: 56px 0 100px; display: flow-root; }
.research-head { width: 60%; margin: 0 0 54px; }
.research-head h1 { margin: 0 0 14px; color: var(--ink); font-size: 30px; font-weight: 600; line-height: 1.4; }
.research-head .article-deck { max-width: 38em; font-size: 16px; line-height: 1.85; }
.research-body { position: relative; width: 100%; }
.research-body > .article { width: 100%; display: flow-root; }
.research-body .article-section { position: relative; width: 60%; margin-bottom: 58px; scroll-margin-top: 72px; }
.research-body .section-index { display: none; }
.research-body .article-section h2 { margin: 0 0 24px; color: var(--ink); font-size: var(--type-section); font-weight: 540; line-height: 1.5; }
.research-body .article-section > p { margin: 0; font-size: var(--type-body-reading); line-height: var(--leading-reading); text-align: justify; text-justify: inter-ideograph; text-indent: 2em; }
.research-body .article-section blockquote { margin: 1.6em 0; padding-left: 1.3em; color: var(--muted); border-left: 1px solid var(--line-strong); }
.research-body .article-section blockquote p { margin: 0; font-size: var(--type-body-reading); line-height: var(--leading-reading); }
.research-body .article-section i { font-style: italic; }
.research-body .article-section > h2 + p { text-indent: 2em; }
.research-body .article-conclusion { margin: 70px 0; color: var(--ink); font-size: 22px; line-height: 1.9; }
.research-body .article-notes { display: none; }
.research-body .article-notes .note { position: relative; margin: 0 0 1em; padding-left: 38px; color: var(--muted); font: 13px/1.8 var(--sans); }
.research-body .note-number { position: absolute; left: 0; color: var(--ink); }
.research-body .note-source { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.note-ref { font: 11px/1 var(--sans); vertical-align: super; }
.note-ref:hover { text-decoration: none; }
.note-ref.is-highlighted {
  color: var(--selected-fg);
  background: var(--selected-bg);
  box-shadow: 0 0 0 3px var(--selected-bg);
  border-radius: 2px;
}
.marginnote {
  float: right;
  clear: right;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 0;
  align-items: start;
  width: 58%;
  margin-right: -61%;
  margin-top: .15em;
  margin-bottom: 1.2em;
  color: var(--muted);
  font: var(--type-caption)/1.72 var(--sans);
  text-align: left;
}
.marginnote .note-source { font-size: inherit; }
.marginnote-mark {
  display: block;
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.marginnote-body { min-width: 0; }
.marginnote.is-highlighted {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 2px;
}
.marginnote.is-highlighted .marginnote-mark {
  color: var(--selected-fg);
  background: var(--selected-bg);
  box-shadow: 0 0 0 3px var(--selected-bg);
}
.margin-note {
  position: absolute;
  left: calc(100% + clamp(54px, 7vw, 105px));
  width: min(30vw, 300px);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}
.margin-note strong { color: var(--ink); font-weight: 500; }
.research-figure { margin: 2.6em 0; }
.research-figure.margin-figure {
  float: right;
  clear: right;
  width: 58%;
  margin: .45em -61% 1.7em 0;
}
.research-figure img { width: 100%; max-height: 520px; object-fit: contain; object-position: left center; }
.research-figure figcaption { margin-top: 10px; color: var(--muted); font: 12px/1.65 var(--sans); }
.research-figure figcaption strong { color: var(--ink); font-weight: 600; }
.research-actions {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 24px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 12px/1.4 var(--sans);
}
.research-actions > a,
.research-actions > button,
.language-switch > summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  white-space: nowrap;
}
.research-actions > a:hover,
.research-actions > button:hover,
.language-switch > summary:hover { color: var(--ink); background: var(--paper-2); }
.language-switch { position: relative; }
.language-switch > summary { cursor: pointer; list-style: none; }
.language-switch > summary::-webkit-details-marker { display: none; }
.language-switch > summary::after { content: "⌄"; margin-left: 6px; font-size: 10px; }
.language-switch[open] > summary { color: var(--selected-fg); background: var(--selected-bg); }
.language-switch > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  min-width: 116px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(0,0,0,.1);
}
.language-switch > div > * { display: block; padding: 6px 9px; border-radius: 8px; }
.language-switch > div span { color: var(--muted); }
.language-switch > div a:hover { background: var(--paper-2); }
.research-action-status { min-height: 1.4em; margin: 8px 0 0; color: var(--muted); font: 11px/1.4 var(--sans); }
.guestbook-trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.floating-toc {
  position: fixed;
  z-index: 10;
  top: 132px;
  left: max(22px, calc((100vw - var(--max)) / 2 - 205px));
  width: 165px;
  display: none;
  color: var(--muted);
}
.floating-toc a { display: block; padding: 5px 0; font-size: 12px; line-height: 1.55; }
.floating-toc a:hover { color: var(--ink); }

/* Script */
.script-page { width: min(calc(100% - 48px), 1040px); margin: auto; padding: 86px 0 130px; }
.script-head { width: 70%; margin-bottom: 68px; }
.script-head h1 { margin: 0 0 16px; color: var(--ink); font-size: var(--type-article-title); font-weight: 600; line-height: 1.45; }
.script-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 36px; margin-top: 34px; color: var(--muted); font-size: 13px; }
.script-facts dt { color: var(--ink); }
.script-facts dd { margin: 4px 0 0; }
.script-layout { display: grid; grid-template-columns: minmax(0, 70%) minmax(0, 1fr); column-gap: clamp(38px, 5vw, 72px); align-items: start; }
.script-body { --script-label-width: 112px; --script-column-gap: 24px; grid-column: 1; width: auto; }
.script-side { grid-column: 2; position: sticky; top: 84px; min-width: 0; }
.migrated-script .script-cover { width: min(100%, 360px); margin: 42px 0 0; }
.migrated-script .script-cover img { width: 100%; max-height: 480px; object-fit: contain; object-position: left center; }
.script-frontmatter { width: 70%; }
.script-cast,
.script-contents { width: 100%; }
.script-frontmatter { margin: 0 0 62px; padding-top: 24px; border-top: 1px solid var(--line); }
.script-frontmatter.prose { font-size: 15px; line-height: 1.8; }
.script-frontmatter.prose h2,
.script-frontmatter.prose h3 { margin: 26px 0 12px; font-size: 17px; font-weight: 600; }
.script-frontmatter.prose h2:first-child,
.script-frontmatter.prose h3:first-child { margin-top: 0; }
.script-frontmatter.prose p { margin: 0 0 12px; }
.script-frontmatter.prose ol,
.script-frontmatter.prose ul { margin: 10px 0 16px 1.3em; }
.script-cast { margin: 0 0 30px; border-top: 1px solid var(--line); }
.script-cast summary { width: fit-content; padding: 17px 0 13px; color: var(--muted); cursor: pointer; font: 12px/1.4 var(--sans); list-style: none; }
.script-cast summary::-webkit-details-marker { display: none; }
.script-cast summary::after { content: "＋"; margin-left: 8px; color: var(--line-strong); }
.script-cast[open] summary::after { content: "－"; }
.script-cast__list { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0 0 18px; color: var(--text); font-size: 14px; line-height: 1.7; }
.script-contents { display: block; margin: 0 0 30px; padding-top: 17px; border-top: 1px solid var(--line); }
.script-contents__label { color: var(--muted); font: 12px/1.7 var(--sans); }
.script-contents__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin-top: 10px; }
.script-contents__links a { color: var(--muted); font: 12px/1.7 var(--sans); }
.script-contents__links a:hover { color: var(--ink); }
.script-section + .script-section { margin-top: 88px; }
.script-scene-heading { margin: 0 0 34px; color: var(--ink); font-size: 25px; font-weight: 520; line-height: 1.45; scroll-margin-top: 82px; }
.script-speech { display: grid; grid-template-columns: var(--script-label-width) minmax(0, 1fr); gap: var(--script-column-gap); margin: 0 0 22px; }
.script-speech__label { display: flex; flex-direction: column; align-items: flex-start; padding-top: 3px; color: var(--ink); font: 15px/1.45 var(--sans); text-align: left; }
.script-speaker { font-size: 16px; font-weight: 540; letter-spacing: .05em; }
.script-mode { margin-top: 1px; color: var(--muted); font-size: 13px; letter-spacing: .015em; white-space: nowrap; }
.script-speech__content p { margin: 0; font-size: var(--type-body-reading); line-height: 1.92; }
.script-speech--song { margin-bottom: 28px; }
.script-speech--song .script-mode { color: var(--ink); font-weight: 500; }
.script-speech--song .script-speech__content p { font-size: 19px; letter-spacing: .025em; }
.script-speech--song .script-speech__content p + p { margin-top: .14em; }
.script-direction { max-width: none; margin: 0 0 26px calc(var(--script-label-width) + var(--script-column-gap)); padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--muted); font: 14px/1.8 var(--sans); }
.script-cue { margin: 0 0 22px calc(var(--script-label-width) + var(--script-column-gap)); color: var(--text); font-size: var(--type-body-reading); line-height: 1.92; }
.script-inline-heading { margin: 30px 0 18px; color: var(--ink); font: 600 16px/1.5 var(--sans); }

/* Records and About */
.collection-page {
  width: min(calc(100% - 48px), var(--page));
  padding-top: 42px;
}
.collection-page .records-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px 24px;
}
.collection-page .record {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
}
.collection-item__cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-2);
}
.collection-page .collection-item__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}
.collection-item__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 0 0;
  text-align: center;
}
.collection-item__label,
.collection-item__meta {
  color: var(--muted);
  font: 10px/1.45 var(--sans);
  letter-spacing: .06em;
}
.collection-item__label { margin: 0 0 8px; }
.collection-item__title {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
}
.collection-item__meta {
  display: block;
  margin-top: 8px;
  padding-top: 0;
}
.collection-page .collection-item__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}
.collection-page .collection-item__label { margin-bottom: 8px; }
.collection-page .collection-item__meta { margin-top: 8px; }
.collection-page--records .collection-item__cover,
.collection-page--records .collection-item__body { max-width: 280px; }
.collection-item:hover .collection-item__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.collection-item:hover .collection-item__cover img { transform: scale(1.018); }
.records-list { display: grid; gap: 46px; }
.record { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 38px; align-items: center; }
.record img { width: 100%; aspect-ratio: 3/4; object-fit: contain; }
.record h2 { margin: 0 0 10px; color: var(--ink); font-size: 25px; font-weight: 500; line-height: 1.4; }
.record p { max-width: 34em; margin: 0; color: var(--muted); }
.about-copy { color: var(--text); font-size: var(--type-body-reading); line-height: var(--leading-reading); }
.about-copy p { margin: 0 0 1.6em; }
.about-copy img { margin-top: 52px; }
.record-detail-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px; align-items: center; margin-bottom: 64px; }
.record-detail-head img { width: 100%; aspect-ratio: 3/4; object-fit: contain; }
.record-detail-head h1 { margin: 0 0 12px; color: var(--ink); font-size: 24px; font-weight: 600; line-height: 1.45; }
.record-detail-head p:last-child { color: var(--muted); }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 42px 28px; }
.video-card__media { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.video-card__media img { width: 100%; height: 100%; object-fit: cover; }
.video-card__play { position: absolute; inset: 50% auto auto 50%; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(0,0,0,.72); transform: translate(-50%,-50%); font: 13px/1 var(--sans); }
.video-card h2 { margin: 13px 0 0; color: var(--ink); font-size: 18px; font-weight: 500; line-height: 1.55; }
.video-card p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* Guestbook */
.guestbook-panel { margin-top: 94px; }
.guestbook-panel h2 { margin: 0 0 34px; color: var(--ink); font-size: 24px; font-weight: 500; }
.guestbook-empty { margin: 0 0 40px; color: var(--muted); font-size: 14px; }
.guestbook-form { display: grid; gap: 24px; }
.guestbook-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.guestbook-form label { display: grid; gap: 8px; color: var(--muted); font: 12px/1.5 var(--sans); }
.guestbook-form input,
.guestbook-form textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line-strong); outline: 0; background: transparent; color: var(--text); font: 16px/1.7 var(--serif); }
.guestbook-form input { height: 38px; }
.guestbook-form textarea { min-height: 120px; resize: vertical; }
.guestbook-form input:focus,
.guestbook-form textarea:focus { border-color: var(--ink); }
.guestbook-actions { display: flex; align-items: center; gap: 18px; }
.guestbook-actions button { padding: 8px 22px; border: 0; border-radius: 999px; background: var(--selected-bg); color: var(--selected-fg); font: 12px/1.5 var(--sans); }
.guestbook-status { margin: 0; color: var(--muted); font: 12px/1.5 var(--sans); }
.guestbook-list { display: grid; gap: 20px; margin-bottom: 40px; }
.guestbook-empty { margin: 0; color: var(--muted); font-size: 14px; }
.guestbook-entry { padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.guestbook-entry__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.guestbook-entry__head strong { color: var(--ink); font-size: 14px; font-weight: 600; }
.guestbook-entry__head time { color: var(--muted); font: 11px/1.5 var(--sans); }
.guestbook-entry > p { margin: 0; white-space: pre-wrap; }
.guestbook-verification { color: var(--muted); font: 12px/1.5 var(--sans); }

/* Search */
.search-layer { position: fixed; inset: 0; z-index: 300; display: none; background: color-mix(in srgb, var(--paper) 97%, transparent); }
.search-layer.is-open { display: block; }
.search-panel { width: min(calc(100% - 48px), 720px); margin: 14vh auto 0; }
.search-top { display: flex; align-items: center; gap: 16px; }
.search-top input { flex: 1; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line-strong); outline: none; background: transparent; color: var(--ink); font-size: 26px; }
.search-results { margin-top: 30px; }
.search-result { display: block; padding: 15px 0; }
.search-result + .search-result { border-top: 1px solid var(--line); }
.search-result small { color: var(--muted); font: 12px/1.5 var(--sans); }

.site-footer { clear: both; width: min(calc(100% - 48px), var(--max)); margin: auto; padding: 24px 0 32px; color: var(--muted); font: 11px/1.6 var(--sans); text-align: center; }

@media (min-width: 1520px) { .floating-toc { display: block; } }

@media (max-width: 900px) {
  .site-header__inner { height: 54px; }
  .site-nav { gap: 22px; }
  .entry { grid-template-columns: 66px minmax(0, 1fr); }
  .research-head,
  .research-body .article-section { width: 67%; }
  .margin-note { left: calc(100% + 38px); width: calc(49% - 38px); }
  .script-layout { grid-template-columns: minmax(0, 67%) minmax(0, 1fr); column-gap: 38px; }
  .migrated-script .script-head,
  .migrated-script .script-frontmatter { width: 67%; }
}

@media (max-width: 720px) {
  .site-header__inner,
  .site-main,
  .page-main,
  .research-page,
  .script-page,
  .site-footer { width: min(calc(100% - 32px), var(--max)); }
  .site-header__inner { position: relative; }
  .site-nav {
    flex: 1;
    gap: clamp(13px, 4.2vw, 22px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 17px 0 15px; font-size: 12px; }
  .nav-rss { display: none; }
  .header-tools { flex: 0 0 auto; }
  .header-tools .icon-button { width: 30px; }
  .page-main { padding-top: 38px; }
  .article-page { padding-top: 0; }
  .page-heading { margin-bottom: 36px; }
  .articles-main { width: min(calc(100% - 40px), 700px); }
  .year-group + .year-group { margin-top: 52px; }
  .year-label { margin-bottom: 22px; }
  .entry-list { gap: 22px; }
  .entry { grid-template-columns: 50px 1fr; column-gap: 14px; padding: 0; }
  .entry__date { grid-column: 1; grid-row: 1; }
  .entry__title { grid-column: 2; grid-row: 1; font-size: 18px; }
  .category-nav { max-width: 100%; overflow-x: auto; }
  .category-nav button { min-width: 55px; padding-inline: 12px; }
  .issue-head { grid-template-columns: 1fr; gap: 42px; }
  .issue-head img { max-width: 280px; }
  .article-simple { padding: 64px 0 100px; }
  .research-page,
  .script-page { padding-top: 60px; }
  .research-head,
  .research-body .article-section,
  .script-body { width: 100%; }
  .script-layout { display: flex; flex-direction: column; }
  .script-side { order: -1; position: static; width: 100%; margin-bottom: 52px; }
  .migrated-script .script-head,
  .migrated-script .script-frontmatter,
  .migrated-script .script-cast,
  .migrated-script .script-contents,
  .migrated-script .script-prose { width: 100%; }
  .research-head { margin-bottom: 58px; }
  .research-actions { overflow: visible; }
  .research-actions > a,
  .research-actions > button,
  .language-switch > summary { padding-inline: 11px; }
  .research-head h1 { font-size: 26px; }
  .research-head .article-deck { font-size: 16px; line-height: 1.8; }
  .research-body .article-section { margin-bottom: 66px; }
  .research-body .article-section > p { text-align: justify; }
  .research-figure.margin-figure {
    float: none;
    clear: both;
    width: 100%;
    margin: 1.4em 0;
  }
  .note-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    padding: 0 .4em;
    margin: 0 .12em;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 10px;
    vertical-align: .2em;
  }
  .marginnote {
    display: none;
    float: none;
    clear: both;
    width: 100%;
    margin: .65em 0 1.25em;
    padding: .8em 0 .1em;
    border-top: 1px solid var(--line);
  }
  .marginnote.is-expanded {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
  }
  .marginnote.is-expanded .marginnote-mark {
    color: var(--selected-fg);
    background: var(--selected-bg);
    box-shadow: 0 0 0 3px var(--selected-bg);
  }
  .margin-note { position: static; width: auto; margin: 8px 0 26px; padding-left: 16px; border-left: 1px solid var(--line-strong); }
  .script-facts { grid-template-columns: repeat(2, auto); gap: 20px 36px; }
  .script-head { margin-bottom: 54px; }
  .script-frontmatter { margin-bottom: 48px; padding-top: 18px; }
  .script-frontmatter.prose { font-size: 14px; }
  .script-cast { margin-bottom: 24px; }
  .script-contents { display: block; margin-bottom: 52px; padding-top: 14px; }
  .script-contents__label { display: block; margin-bottom: 7px; }
  .script-contents__links { gap: 6px 14px; }
  .script-section + .script-section { margin-top: 64px; }
  .script-scene-heading { margin-bottom: 26px; font-size: 22px; }
  .script-body { --script-label-width: 76px; --script-column-gap: 14px; }
  .script-speech { margin-bottom: 20px; }
  .script-speech__label { font-size: 14px; }
  .script-speaker { font-size: 15px; }
  .script-mode { font-size: 12px; white-space: normal; }
  .script-speech__content p { font-size: var(--type-body); line-height: 1.92; }
  .script-speech--song .script-speech__content p { font-size: 17px; }
  .script-direction { margin-left: calc(var(--script-label-width) + var(--script-column-gap)); padding-left: 11px; font-size: 12px; }
  .script-cue { margin: 0 0 20px calc(var(--script-label-width) + var(--script-column-gap)); font-size: var(--type-body); }
  .records-list { gap: 34px; }
  .collection-page { padding-top: 28px; }
  .collection-page .records-list {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .collection-page .record {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 0;
    min-height: 0;
  }
  .collection-item__cover { grid-column: 1; }
  .collection-item__body {
    grid-column: 2;
    align-items: flex-start;
    padding-top: 1px;
    text-align: left;
  }
  .collection-item__label { margin-bottom: 14px; font-size: 10px; }
  .collection-item__title { font-size: 21px; line-height: 1.45; }
  .collection-item__meta { margin-top: 16px; font-size: 10px; }
  .collection-page--records .collection-item__cover,
  .collection-page--records .collection-item__body { max-width: none; }
  .record { grid-template-columns: 96px 1fr; gap: 22px; align-items: start; }
  .record h2 { font-size: 21px; }
  .record p { font-size: 13px; line-height: 1.65; }
  .record-detail-head { grid-template-columns: 1fr; gap: 30px; }
  .record-detail-head img { width: min(70vw, 280px); }
  .video-grid { grid-template-columns: 1fr; gap: 34px; }
  .guestbook-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
