:root {
  color-scheme: light;

  --paper: #F3E7CC;
  --paper-2: #EAD8B4;
  --paper-3: #E4CEA3;
  --ink: #182B57;
  --ink-soft: #4B5B7C;
  --ink-faint: #7A849C;
  --accent: #E7B84A;
  --accent-strong: #8A5A00;
  --line: rgba(24, 43, 87, 0.2);
  --line-strong: rgba(24, 43, 87, 0.5);
  --focus: #8A5A00;

  --cover-filter: saturate(0.55) contrast(1.06) sepia(0.18) brightness(1.02);
  --cover-overlay: linear-gradient(145deg, rgba(24, 43, 87, 0.28), rgba(231, 184, 74, 0.22));
  --cover-blend: soft-light;
  --cover-overlay-opacity: 0.9;

  --band-bg: #182B57;
  --band-ink: #F3E7CC;
  --band-muted: rgba(243, 231, 204, 0.62);

  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="night"] {
  color-scheme: dark;

  --paper: #081226;
  --paper-2: #0D1A36;
  --paper-3: #122344;
  --ink: #F6D77A;
  --ink-soft: #CBBE92;
  --ink-faint: #8E906F;
  --accent: #F2C14E;
  --accent-strong: #FFE08A;
  --line: rgba(246, 215, 122, 0.18);
  --line-strong: rgba(246, 215, 122, 0.5);
  --focus: #FFE08A;

  --cover-filter: saturate(1.05) contrast(1.02) brightness(0.9);
  --cover-overlay: linear-gradient(180deg, rgba(8, 18, 38, 0.05), rgba(8, 18, 38, 0.6));
  --cover-blend: normal;
  --cover-overlay-opacity: 0.95;

  --band-bg: #F6D77A;
  --band-ink: #081226;
  --band-muted: rgba(8, 18, 38, 0.62);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-blend-mode: multiply;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease);
}

[data-theme="night"] body {
  background-blend-mode: screen;
}

body:has(dialog[open]),
body.dialog-open {
  overflow: hidden;
}

::selection {
  background: var(--accent);
  color: #111111;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

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

.site-header__inner,
.hero,
.chapter,
.quote-band__inner,
.site-footer__inner {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.28s var(--ease), border-color 0.28s var(--ease);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand__mark {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.theme-toggle:hover {
  background: var(--paper-2);
}

.theme-toggle__icon {
  display: inline-flex;
}

.theme-toggle__icon svg {
  display: block;
}

.theme-toggle__label {
  min-width: 2.5em;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(3.5rem, 9vh, 7rem) clamp(4rem, 10vh, 8rem);
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.hero__kicker {
  margin: 0 0 1.4rem;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.hero__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 6.2vw, 5.8rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero__name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: clamp(1.8rem, 4vh, 2.8rem) 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.hero__name::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--accent-strong);
  flex: 0 0 auto;
}

.hero__note {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(2rem, 5vh, 3.5rem);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

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

.hero__scroll span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.hero__scroll:hover span {
  transform: translateY(3px);
}

.hero__cover {
  position: relative;
  margin: 0;
}

.hero__cover-plate {
  position: relative;
  height: clamp(520px, 86vh, 900px);
  padding: 0.55rem;
  border: 1px solid var(--line-strong);
  background: var(--paper-2);
  overflow: hidden;
  transition: border-color 0.28s var(--ease), background-color 0.28s var(--ease);
}

.hero__cover-plate picture {
  display: block;
  height: 100%;
  transform: translate3d(0, var(--cover-shift, 0px), 0) scale(1.05);
  transform-origin: 50% 55%;
}

.hero__cover-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  filter: var(--cover-filter);
  transition: filter 0.35s var(--ease);
}

.hero__cover-plate::after {
  content: "";
  position: absolute;
  inset: 0.55rem;
  background: var(--cover-overlay);
  mix-blend-mode: var(--cover-blend);
  opacity: var(--cover-overlay-opacity);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), background 0.35s var(--ease);
}

.hero__cover figcaption {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-align: right;
}

/* Chapters */

.chapter {
  display: grid;
  grid-template-columns: minmax(140px, 0.28fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 7vh, 6rem);
  border-top: 1px solid var(--line);
}

.chapter__no {
  margin: 0 0 0.8rem;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.chapter__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.chapter__body {
  max-width: 64ch;
}

.intro__text {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.5vw, 1.22rem);
  line-height: 1.95;
}

.intro__text::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 4.2em;
  line-height: 0.78;
}

/* Tags */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.tag-list li::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
  flex: 0 0 auto;
}

.tag-list li:nth-child(4) {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Quote band */

.quote-band {
  margin-top: clamp(3rem, 8vh, 6rem);
  padding-block: clamp(4rem, 10vh, 8rem);
  background: var(--band-bg);
  color: var(--band-ink);
  overflow: hidden;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease);
}

.quote-band__head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: clamp(2rem, 5vh, 4rem);
}

.quote-band .chapter__no {
  margin: 0;
  color: var(--band-muted);
}

.quote-band .chapter__title {
  color: var(--band-ink);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.quote {
  display: grid;
  gap: 2rem;
  margin: 0;
}

.quote p {
  max-width: 20ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.8vw, 5.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.quote cite {
  color: var(--band-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: normal;
  letter-spacing: 0.12em;
}

/* Footer */

.site-footer {
  padding-block: 2.2rem 3rem;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.site-footer__note {
  margin: 0;
  color: var(--ink);
}

.site-footer__meta {
  margin: 0;
}

.doro-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.doro-trigger:hover {
  background: var(--ink);
  color: var(--paper);
}

.doro-trigger__spark {
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
  transform: rotate(45deg);
}

/* Doro 番外 */

.doro-dialog {
  --modal-bg: #081226;
  --modal-panel: #0C1830;
  --modal-ink: #F4E7C3;
  --modal-muted: rgba(244, 231, 195, 0.62);
  --modal-accent: #F6D77A;
  --modal-line: rgba(246, 215, 122, 0.28);

  width: min(1100px, calc(100% - 2rem));
  max-height: min(94vh, 1000px);
  max-height: min(94dvh, 1000px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--modal-line);
  background: var(--modal-panel);
  color: var(--modal-ink);
  overflow: hidden;
}

.doro-dialog::backdrop {
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(6px);
}

.doro-dialog__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  max-width: 100%;
  max-height: min(94vh, 1000px);
  max-height: min(94dvh, 1000px);
  padding: clamp(1rem, 3vw, 2rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.doro-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--modal-line);
}

.doro-dialog__head > div {
  min-width: 0;
}

.doro-dialog__kicker {
  margin: 0 0 0.35rem;
  color: var(--modal-accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
}

.doro-dialog__title {
  margin: 0;
  color: var(--modal-ink);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.doro-dialog__close {
  flex: 0 0 auto;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--modal-line);
  background: transparent;
  color: var(--modal-ink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.doro-dialog__close:hover {
  background: var(--modal-accent);
  color: var(--modal-bg);
}

.doro-carousel {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}

.doro-slide {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

.doro-slide[hidden] {
  display: none;
}

.doro-slide__media {
  width: auto;
  height: auto;
  max-width: min(54vh, 100%);
  max-height: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--modal-line);
  border-radius: 50%;
  object-fit: cover;
}

.doro-slide figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.doro-slide__no {
  color: var(--modal-accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.doro-slide__title {
  color: var(--modal-ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.doro-slide__note {
  color: var(--modal-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.doro-slide--gif .doro-gif {
  position: relative;
  width: min(72vh, 100%);
  max-width: 900px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--modal-line);
  background: #030712;
}

.doro-gif__poster,
.doro-gif__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doro-gif__poster[hidden],
.doro-gif__media[hidden] {
  display: none;
}

.doro-gif__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.7rem 1rem;
  border: 1px solid var(--modal-line);
  background: rgba(3, 7, 18, 0.72);
  color: var(--modal-ink);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.doro-gif__play:hover {
  background: var(--modal-accent);
  color: var(--modal-bg);
}

.doro-gif__play[hidden] {
  display: none;
}

.doro-gif__status {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0.55rem;
  background: rgba(3, 7, 18, 0.6);
  color: var(--modal-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.doro-gif__status[hidden] {
  display: none;
}

.doro-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--modal-line);
}

.carousel-btn {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--modal-line);
  background: transparent;
  color: var(--modal-ink);
  font-size: 1rem;
  cursor: pointer;
}

.carousel-btn:hover {
  background: var(--modal-accent);
  color: var(--modal-bg);
}

.doro-count {
  margin: 0;
  color: var(--modal-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.doro-dialog__message {
  margin: 0;
  color: var(--modal-muted);
  font-size: 0.82rem;
  text-align: center;
}

.doro-dialog :focus-visible {
  outline-color: var(--modal-accent);
}

/* Light movement, only where it helps */

html.is-lighting .theme-toggle__icon {
  animation: lamp-flicker 0.32s var(--ease);
}

@keyframes lamp-flicker {
  0%,
  100% {
    opacity: 1;
  }
  30% {
    opacity: 0.35;
  }
  60% {
    opacity: 0.75;
  }
}

.hero__kicker,
.hero__title,
.hero__name,
.hero__note,
.hero__scroll,
.hero__cover {
  animation: hero-rise 0.8s var(--ease) both;
}

.hero__kicker {
  animation-delay: 0.05s;
}

.hero__title {
  animation-delay: 0.12s;
}

.hero__cover {
  animation-delay: 0.18s;
}

.hero__name {
  animation-delay: 0.22s;
}

.hero__note {
  animation-delay: 0.28s;
}

.hero__scroll {
  animation-delay: 0.36s;
}

.hero__cover-plate img {
  animation: cover-settle 1.1s var(--ease) both;
}

.hero__scroll span {
  animation: scroll-bob 2.8s var(--ease) infinite;
}

html.reveal-ready .chapter > *,
html.reveal-ready .site-footer__inner > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

html.reveal-ready .chapter.is-visible > *,
html.reveal-ready .site-footer.is-visible .site-footer__inner > * {
  opacity: 1;
  transform: translateY(0);
}

html.reveal-ready .chapter > :nth-child(2) {
  transition-delay: 80ms;
}

html.reveal-ready .site-footer__inner > :nth-child(2) {
  transition-delay: 80ms;
}

html.reveal-ready .site-footer__inner > :nth-child(3) {
  transition-delay: 140ms;
}

.quote-band {
  position: relative;
}

.quote-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease), background-color 0.28s var(--ease);
  pointer-events: none;
}

html.reveal-ready .quote-band:not(.is-visible)::before {
  transform: scaleX(1);
  transition: none;
}

.quote-band__inner {
  position: relative;
  z-index: 1;
}

html.reveal-ready .quote-band__head,
html.reveal-ready .quote {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

html.reveal-ready .quote-band.is-visible .quote-band__head,
html.reveal-ready .quote-band.is-visible .quote {
  opacity: 1;
  transform: translateY(0);
}

html.reveal-ready .quote-band .quote {
  transition-delay: 180ms;
}

.doro-dialog[open]::backdrop {
  animation: dialog-backdrop-in 0.28s var(--ease) both;
}

.doro-dialog[open] .doro-dialog__panel {
  animation: dialog-panel-in 0.32s var(--ease) both;
}

.doro-slide.is-entering {
  animation: doro-slide-in 0.32s var(--ease) both;
}

.tag-list li {
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.tag-list li:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.tag-list li::before {
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}

.tag-list li:hover::before {
  transform: rotate(45deg) scale(1.25);
  background: var(--accent);
}

.doro-trigger__spark {
  transition: transform 0.25s var(--ease);
}

.doro-trigger:hover .doro-trigger__spark {
  transform: rotate(45deg) scale(1.3);
  animation: spark-breathe 1.4s var(--ease) infinite;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cover-settle {
  from {
    transform: scale(1.035);
  }
  to {
    transform: scale(1);
  }
}

@keyframes scroll-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 3px;
  }
}

@keyframes dialog-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialog-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes doro-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spark-breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3rem 4rem;
  }

  .hero__title {
    font-size: clamp(3.2rem, 13vw, 6rem);
  }

  .hero__cover {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }

  .hero__cover-plate {
    height: auto;
    aspect-ratio: 2 / 3;
    max-height: 72vh;
  }

  .hero__cover-plate img {
    object-position: 50% 55%;
  }

  .chapter {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 3rem;
  }

  .chapter__head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
  }

  .chapter__no {
    margin: 0;
  }

  .chapter__body {
    max-width: none;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 1.25rem;
  }

  .site-header__inner {
    min-height: 3.8rem;
  }

  .brand {
    font-size: 0.68rem;
  }

  .theme-toggle {
    padding: 0.5rem 0.6rem;
  }

  .hero {
    padding-block: 2.5rem 3.5rem;
  }

  .hero__kicker {
    margin-bottom: 1rem;
  }

  .hero__title {
    font-size: clamp(2.9rem, 12.5vw, 5rem);
  }

  .hero__name {
    margin-top: 1.8rem;
  }

  .hero__cover-plate {
    aspect-ratio: 3 / 4;
    max-height: 68vh;
  }

  .intro__text::first-letter {
    font-size: 3.4em;
  }

  .quote-band {
    padding-block: 3.5rem;
  }

  .quote-band__head {
    margin-bottom: 2rem;
  }

  .quote p {
    font-size: clamp(2.2rem, 10vw, 3.6rem);
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .doro-dialog {
    width: calc(100% - 1rem);
    max-height: 94vh;
    max-height: 94dvh;
  }

  .doro-dialog__panel {
    gap: 0.8rem;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 1rem;
  }

  .doro-slide__media {
    max-width: min(48vh, 100%);
    max-height: min(48vh, 100%);
  }

  .doro-slide figcaption {
    flex-direction: column;
    gap: 0.25rem;
  }

  .doro-slide--gif .doro-gif {
    width: 100%;
  }

  .doro-dialog__title {
    font-size: 1.5rem;
  }

  .doro-dialog__message {
    font-size: 0.75rem;
  }
}

@media (max-width: 380px) {
  .hero__title {
    font-size: 2.8rem;
  }

  .tag-list li {
    padding: 0.5rem 0.7rem;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-delay: 0ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero__scroll span {
    transform: none !important;
  }
}
