:root {
  --ink: #0b0b0c;
  --paper: #f6f6f4;
  --blood: #c8102e;
  --ink-soft: rgb(11 11 12 / 0.66);
  --paper-soft: rgb(246 246 244 / 0.7);
  --ink-line: rgb(11 11 12 / 0.14);
  --paper-line: rgb(246 246 244 / 0.16);
  --blood-tint: color-mix(in srgb, var(--blood) 14%, transparent);
  --sakura: #f4b3c6;
  --sakura-deep: #dc6f90;
  --paper-glow: rgb(246 246 244 / 0.14);
  --gutter: max(1.5rem, (100vw - 90rem) / 2);
  --mincho: "Shippori Mincho B1", serif;
  --brush: "Yuji Boku", "Shippori Mincho B1", serif;
  --gothic: "Zen Kaku Gothic New", system-ui, sans-serif;
  --snap: cubic-bezier(0.16, 1, 0.3, 1);
  --cut: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%)
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: rgb(11 11 12 / 0.4) var(--paper);
  scrollbar-width: thin
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 1.0625rem;
  line-height: 1.7;
  caret-color: var(--blood);
  -webkit-font-smoothing: antialiased
}

::selection { background: var(--blood); color: var(--paper) }

h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0 }
ol, ul { padding: 0; list-style: none }
img { display: block; max-width: 100%; height: auto }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px }
a:hover { text-decoration-color: var(--blood); text-decoration-thickness: 2px }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper)
}
.skip:focus { top: 1rem }

.heading {
  font-family: var(--mincho);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance
}

.chapter {
  margin-right: 0.35em;
  color: var(--blood);
  font-weight: 500;
  font-variant-numeric: tabular-nums
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap
}

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