@font-face {
  font-family: Smiley;
  src: url("assets/SmileySans-Oblique.ttf.woff2") format("woff2");
  font-display: swap;
}
:root {
  --sk-card: var(--sheet);
  --sk-ink: var(--ink);
  --sk-pri-ink: var(--ink);
  --sk-dim: var(--muted);
  --sk-soft: var(--card-shadow);
  --sk-pri: var(--pink);
  --sk-acc: #cb77a7;
  --sk-track: var(--soft);
  --paper: #fffafd;
  --sheet: #fff;
  --ink: #352c49;
  --line: #483b57;
  --muted: #6e5c71;
  --pink: #ffcee3;
  --soft: #fae6f1;
  --shadow: #d79fbf;
  --card-shadow: rgb(205 163 192 / 68%);
  --link: #7c3d6c;
  --edge: clamp(16px, 5vw, 64px);
  font-family: "Playfair Display", "LXGW WenKai", KaiTi, serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: light;
  scroll-padding-top: 90px;
}
:root[data-night] {
  --sk-acc: #eda4cf;
  --paper: #302835;
  --sheet: #382f40;
  --ink: #fff3fa;
  --line: #dcbed4;
  --muted: #e0cbd9;
  --pink: #603c58;
  --soft: #4a344b;
  --shadow: #74556e;
  --card-shadow: rgb(144 109 138 / 70%);
  --link: #ffc2df;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  isolation: isolate;
  overflow-x: clip;
}
button,
input {
  font: inherit;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
a,
sakuga-button {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #b85991;
  outline-offset: 4px;
}
::selection {
  background: #ffcbe3;
  color: #39293f;
}
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    center/cover no-repeat var(--journal-wallpaper, none),
    center/cover no-repeat url("assets/reading-background.webp");
  background-color: var(--paper);
}
.wrap {
  width: min(1056px, calc(100% - 2 * var(--edge)));
  margin-inline: auto;
}
#header {
  position: relative;
  z-index: 4;
  background: transparent;
}
body:has(.hero) #header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: none;
  border: 0;
}
.mast,
.brand,
.tools,
nav,
.query,
.socials {
  display: flex;
  align-items: center;
}
.mast {
  min-height: 64px;
  justify-content: space-between;
  gap: 16px;
}
.brand,
nav,
.tools {
  background: var(--sheet);
  border: 2px solid var(--line);
  box-shadow: 3px 4px 0 var(--shadow);
  border-radius: 18px;
}
.brand {
  text-decoration: none;
  gap: 6px;
  padding: 4px 12px;
  white-space: nowrap;
}
.brand img {
  object-fit: contain;
  width: 34px;
  height: 34px;
}
.brand span {
  font-size: 22px;
  font-weight: bold;
}
.brand i {
  font-size: 16px;
  color: var(--link);
}
nav {
  padding: 4px 8px;
  gap: 4px;
}
nav a,
.account,
.account-mobile {
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  padding: 8px;
  border-radius: 10px;
}
.mast a {
  position: relative;
  transform-origin: center bottom;
  transition: translate 150ms ease-out, background-color 150ms ease-out, box-shadow 150ms ease-out;
}
#main-nav a::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 3px;
  border-radius: 80% 30% 65% 25%;
  background: var(--link);
  transform: scaleX(0) rotate(-3deg);
  transform-origin: left;
  transition: transform 160ms ease-out;
}
.mast a:focus-visible {
  background-color: var(--soft);
}
@media (hover: hover) {
  .mast a:hover {
    translate: 0 -2px;
    background-color: var(--soft);
  }
  .mast .brand:hover, .mast .account:hover {
    box-shadow: 4px 6px 0 var(--shadow);
  }
  #main-nav a:hover::after {
    transform: scaleX(1) rotate(-3deg);
  }
}
#main-nav a:focus-visible::after {
  transform: scaleX(1) rotate(-3deg);
}
.tools {
  gap: 8px;
  border: 0;
  background: none;
  box-shadow: none;
}
.account {
  background: var(--sheet);
  border: 2px solid var(--line);
  box-shadow: 2px 3px 0 var(--shadow);
}
.tools sakuga-button::part(button),
.tiny::part(button),
.query sakuga-button::part(button) {
  padding: 9px 14px;
  font-size: 15px;
}
.tools sakuga-button,
.tiny {
  --sk-alt-sh: 3px 4px 0 var(--sk-soft);
  --sk-bw: 2px;
  --sk-r: 12px;
}
.tools #search-open {
  --sk-card: var(--pink);
}
.tools .account-mobile,
#nav-open,
.account-mobile {
  display: none;
}
.skip {
  position: absolute;
  transform: translateY(-300%);
  background: var(--sheet);
  padding: 8px;
  z-index: 9;
}
.skip:focus {
  transform: none;
}
.drop {
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--sheet);
  box-shadow: 4px 5px 0 var(--shadow);
  margin-bottom: 12px;
}
[hidden] {
  display: none !important;
}
.query {
  flex-wrap: wrap;
  gap: 16px;
}
.query sakuga-input {
  --sk-input-width: min(400px, 65vw);
}
.settings {
  display: flex;
  align-items: center;
  gap: 32px;
}
.settings > label {
  display: flex;
  align-items: center;
  gap: 16px;
}
.settings fieldset {
  min-width: 0;
  border: 0;
}
.settings legend {
  font-weight: bold;
  margin-bottom: 12px;
}
main {
  min-height: 68vh;
}
h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
p {
  overflow-wrap: anywhere;
}
body:has(.hero) {
  --forest-images: url("https://img.rainhollow.top/wallhaven-dgvpzm_3840x2400.png"), url("assets/forest.webp");
  --forest-tone: saturate(.62) brightness(.90);
}
.hero {
  position: relative;
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100svh;
  min-height: 480px;
  display: grid;
  place-items: center;
  background: #302934 center/contain no-repeat;
  background-image: var(--forest-images);
  overflow: hidden;
}
.hero::after {
  content: ""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:inherit; filter:var(--forest-tone);
}
/* Sakurairo 3.0.10 wave.css: the original tiles, offsets, track widths and periods. */
.banner-waves {
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
}
#banner_wave_1, #banner_wave_2 {
  position: absolute;
  bottom: 0;
  width: 400%;
  background-repeat: repeat-x;
  animation: sakurairo-wave 240s linear infinite backwards;
}
#banner_wave_1 {
  z-index: 4;
  left: -236px;
  height: 65px;
  background-image: url("assets/sakurairo-wave-1.png");
}
#banner_wave_2 {
  z-index: 3;
  left: 0;
  height: 80px;
  background-image: url("assets/sakurairo-wave-2.png");
  animation-duration: 160s;
}
@keyframes sakurairo-wave {
  to { background-position: -100% 0; }
}
:root[data-night] .banner-waves {
  filter: brightness(.42) saturate(.8);
}
.voice {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.voice .avatar {
  width: 120px;
  height: 120px;
  display: block;
  border-radius: 50%;
  border: 4px solid white;
}
.voice blockquote {
  position: relative;
  background: var(--sheet);
  padding: 16px 48px;
  min-width: min(440px, 80vw);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: 4px 5px 0 var(--shadow);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.5;
}
.voice blockquote:before {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  top: -9px;
  background: var(--sheet);
  height: 13px;
  width: 13px;
  transform: rotate(45deg);
  border-left: 2px solid var(--line);
  border-top: 2px solid var(--line);
}
.voice blockquote small {
  display: block;
  font-size: 0.75em;
  color: var(--muted);
}
.socials {
  gap: 12px;
}
.socials a,
.down {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: 3px 3px 0 #efc8de;
}
.socials img {
  object-fit: contain;
}
.down {
  position: absolute;
  bottom: 36px;
  left: calc(50% - 23px);
  background: #ffe1ef;
}
.down:before {
  content: "";
  width: 11px;
  height: 11px;
  border: solid #44344f;
  border-width: 0 3px 3px 0;
  transform: translateY(-3px) rotate(45deg);
}
.feedbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 32px 0 22px;
  padding: 16px 24px 18px 28px;
  border-radius: 18px;
  background: var(--sheet);
  border: 2px solid var(--line);
  box-shadow: 4px 5px 0 var(--shadow);
  scroll-margin-top: 16px;
}
.feedbar h1,
.page-title {
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.1;
}
.feedbar h1 {
  position: relative;
  isolation: isolate;
}
.feedbar h1:after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: 0;
  left: 2%;
  right: -3%;
  height: 25%;
  border-radius: 60% 15% 56% 8%;
  background: var(--pink);
  transform: rotate(-2deg);
}
.feedbar h1,
html[data-face="both"] .story-title {
  font-family: Smiley, "LXGW WenKai", serif;
}
html[data-face="original"] .feedbar h1 {
  font-family: inherit;
}
.stream {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}
.entry,
.reading,
.results {
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 4px 5px 0 var(--card-shadow);
}
.entry {
  position: relative;
  min-width: 0;
  grid-column: 1/-1;
}
.entry.lead {
  border-width: 3px;
  box-shadow: 6px 7px 0 var(--card-shadow);
}
.story-link {
  display: grid;
  text-decoration: none;
  color: var(--ink);
  border-radius: inherit;
  min-height: 140px;
}
.story-link.has-cover {
  grid-template-columns: minmax(0, 36%) 1fr;
}
.lead .story-link {
  grid-template-columns: minmax(0, 46%) 1fr;
}
.story-link > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px 0 0 15px;
  border-right: 2px solid var(--line);
}
.story-link > img {
  max-height: 220px;
}
.lead .story-link > img {
  max-height: 288px;
}
.story-copy {
  padding: 24px clamp(20px, 3vw, 40px);
  align-self: center;
}
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
}
.byline span {
  border-radius: 8px;
  background: var(--soft);
  color: var(--link);
  padding: 2px 10px;
  font-size: 13px;
}
.story-title {
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.3;
  margin: 12px 0;
}
.lead .story-title {
  font-size: clamp(36px, 4.3vw, 60px);
}
.summary {
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--link);
  font-weight: bold;
  margin-top: 18px;
}
.read-label:after {
  content: "";
  width: 8px;
  height: 8px;
  border-width: 2px 2px 0 0;
  border-style: solid;
  transform: rotate(45deg);
}
.entry:not(.note) {
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s;
}
.entry:not(.note):has(a:hover) {
  transform: translateY(-2px);
  box-shadow: 5px 7px 0 var(--card-shadow);
}
.entry:not(.note):has(a:active) {
  transform: translateY(2px);
  box-shadow: 1px 2px 0 var(--card-shadow);
}
time,
.meta {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.note {
  padding: 24px 28px;
}
.entry.pair {
  grid-column: span 1;
}
.note:not(.pair) {
  width: min(100%, 48rem);
}
.note-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.note-head h1,
.note-head h2 {
  font-size: 25px;
}
.note-head time {
  white-space: nowrap;
}
.note-head a {
  color: var(--link);
}
.note-copy {
  line-height: 1.9;
  margin: 16px 0;
  white-space: pre-line;
}
.note-copy.trim {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tiny {
  margin-right: 12px;
}
.note:after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 32px;
  width: 14px;
  height: 14px;
  transform: skew(-16deg) rotate(45deg);
  background: var(--sheet);
  border-bottom: 2px solid var(--line);
  border-right: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--card-shadow);
}
.end {
  display: flex;
  justify-content: center;
  margin: 32px calc(-1 * var(--edge));
  padding-block: 8px;
  overflow-x: clip;
}
.back,
.reading a {
  color: var(--link);
}
.back {
  display: inline-block;
  margin: 24px 0 16px;
  padding: 8px 16px;
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
}
.reading {
  max-width: 44em;
  margin: 32px auto;
  padding: clamp(20px, 4vw, 56px);
  font-size: 19px;
  line-height: 1.95;
}
.reading p + p,
.reading figure {
  margin-top: 1.2em;
}
.reading img {
  max-width: 100%;
  height: auto;
  max-height: 520px;
  display: block;
  margin: 0 auto 24px;
}
.results {
  padding: clamp(20px, 3vw, 32px);
  margin: 32px 0 24px;
}
.results h1 {
  margin-bottom: 20px;
}
.results p {
  margin-top: 20px;
  color: var(--muted);
}
.site-footer, .article-end {
  width: min(100%, 816px);
  margin-inline: auto;
}
.site-footer {
  width: min(calc(100% - 2 * var(--edge)), 816px);
  margin-block: 56px 32px;
  padding: 24px clamp(16px, 3vw, 32px) 16px;
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 4px 5px 0 var(--card-shadow);
}
.footer-imprint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 28px;
}
.daily-quote {
  flex: 1 1 280px;
  padding-left: 14px;
  border-left: 4px solid var(--shadow);
  font-size: 19px;
  line-height: 1.55;
}
.daily-quote cite, .copyright, .theme-credit {
  color: var(--muted);
  font-size: 14px;
}
.daily-quote cite { font-style: normal; }
.theme-credit {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.site-stats { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.theme-credit img { transition: transform 360ms ease-out; }
.theme-credit:is(:hover, :focus-within) img { transform: rotate(36deg); }
.theme-credit a { text-decoration: none; }
.theme-credit a:hover { text-decoration: underline; }
.article-end {
  margin-block-start: 28px;
}
.post-credits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.post-credits > * {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 14px;
  color: var(--ink);
  background: var(--sheet);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  box-shadow: 2px 3px 0 var(--card-shadow);
}
.post-credits a { text-decoration: none; }
.post-credits a:is(:hover,:focus-visible) { background: var(--soft); }
.post-credits .post-license { font-weight: bold; background: var(--soft); }
.post-author img { border-radius: 50%; }
.adjacent-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 288px), 1fr));
  gap: 16px;
}
.adjacent-panel {
  display: grid;
  grid-template-columns: 1fr 36%;
  min-height: 132px;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--card-shadow);
  background: var(--sheet);
  text-decoration: none;
}
.adjacent-copy {
  align-self: center;
  padding: 20px clamp(16px, 3vw, 28px);
}
.adjacent-copy small { display: block; color: var(--link); margin-bottom: 8px; }
.adjacent-copy strong { font-size: 20px; line-height: 1.45; }
.adjacent-panel img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  max-height: 200px;
  object-fit: cover;
  border-left: 2px solid var(--line);
}
.adjacent-panel:is(:hover,:focus-visible) strong { text-decoration: underline; text-decoration-color: var(--shadow); }
#comments { margin-top: 36px; }
.comments-title {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 16px;
  margin-bottom: 16px;
  background: var(--soft);
  border: 2px solid var(--line);
  border-radius: 12px 12px 12px 2px;
  box-shadow: 3px 4px 0 var(--card-shadow);
  font-size: 24px;
}
.comments-title small { color: var(--muted); font-size: 14px; font-weight: normal; }
.comment-form, .local-comment {
  background: var(--sheet);
  border: 2px solid var(--line);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--card-shadow);
  padding: clamp(16px, 3vw, 24px);
}
.comment-form textarea, #markdown-preview {
  display: block;
  width: 100%;
  min-height: 148px;
  resize: vertical;
  border: 0;
  border-bottom: 1px solid var(--shadow);
  padding: 4px 4px 16px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
}
.comment-form textarea::placeholder { color: var(--muted); opacity: 1; }
.comment-form textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.markdown-body { overflow-wrap: anywhere; line-height: 1.7; }
.markdown-body > * { margin-block: 0 0.6em; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body :is(ol, ul) { padding-inline-start: 1.5em; }
.markdown-body blockquote { border-inline-start: 3px solid var(--shadow); padding-inline-start: 12px; }
.markdown-body pre { overflow-x: auto; padding: 12px; background: var(--soft); }
.markdown-body img { max-width: 100%; height: auto; }
.local-comment { margin-bottom: 12px; }
.comment-actions { display: flex; align-items: center; justify-content: end; gap: 12px; flex-wrap: wrap; padding-top: 16px; }
.comment-actions small { color: var(--muted); margin-right: auto; }
.markdown-toggle { --sk-alt-sh: 2px 3px 0 var(--card-shadow); --sk-bw: 2px; }
.markdown-toggle[aria-pressed="true"] { --sk-card: var(--soft); }
.comment-actions sakuga-button::part(button) { padding: 10px 20px; }
.comment-form { overflow-x: clip; }
@media (max-width: 600px) {
  .comment-actions small { flex-basis: 100%; }
  .site-footer { margin-block: 36px 20px; }
  .daily-quote { flex-basis: 100%; }
  .copyright { padding-left: 18px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  #banner_wave_1, #banner_wave_2 { animation: none; }
  .mast a:hover, .theme-credit:is(:hover,:focus-within) img { translate: none; transform: none; }
  #main-nav a::after { transition: none; }
}
#toast {
  position: fixed;
  left: 16px;
  bottom: 20px;
  z-index: 5;
  pointer-events: none;
}
[data-cover] {
  view-transition-class: journal-cover;
}
::view-transition-group(.journal-cover) {
  animation-duration: 0.32s;
}
@view-transition {
  navigation: auto;
}
@media (max-width: 1000px) {
  .mast {
    gap: 8px;
  }
  .brand i {
    display: none;
  }
  nav {
    gap: 0;
  }
  nav a {
    padding: 6px;
  }
}
@media (max-width: 880px) {
  .mast {
    min-height: 64px;
    flex-wrap: wrap;
  }
  .tools {
    margin-left: auto;
  }
  nav {
    display: none;
    width: 100%;
    order: 3;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  nav.open {
    display: flex;
  }
  nav a {
    padding: 10px;
  }
  .account {
    display: none;
  }
  #nav-open,
  .account-mobile {
    display: inline-block;
  }
  #header {
    position: sticky;
    top: 0;
    transition: transform 0.16s;
  }
  body:has(.hero) #header { position:fixed; }
  #header.past-forest::before {
    content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
    background: #302934 center 0 / 100% 100svh no-repeat;
    background-image:var(--forest-images); filter:var(--forest-tone);
  }
  .offscreen:not(:focus-within) {
    transform: translateY(-100%);
  }
  .hero {
    height: calc(100svh - 64px);
  }
}
@media (max-width: 600px) {
  :root {
    --edge: 16px;
  }
  .brand {
    padding: 3px 7px;
    gap: 4px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .brand span {
    font-size: 20px;
  }
  .tools {
    gap: 6px;
  }
  .tools sakuga-button::part(button) {
    padding: 8px;
    font-size: 14px;
    min-height: 40px;
  }
  .hero {
    min-height: 400px;
  }
  .voice .avatar {
    width: 104px;
    height: 104px;
  }
  .voice blockquote {
    width: min(320px, 84vw);
  }
  .socials a {
    width: 44px;
    height: 44px;
  }
  .feedbar {
    margin-block: 20px 16px;
    padding: 14px 12px;
    gap: 10px;
  }
  .feedbar h1 {
    font-size: 32px;
  }
  .stream {
    gap: 16px;
  }
  .entry.pair {
    grid-column: 1/-1;
  }
  .story-link.has-cover {
    display: flex;
    flex-direction: column;
  }
  .story-link > img {
    order: 2;
    height: 195px;
    max-height: none;
    border-radius: 0 0 14px 14px;
    border-right: 0;
    border-top: 2px solid var(--line);
  }
  .story-copy {
    padding: 18px;
    align-self: stretch;
  }
  .story-title {
    margin: 6px 0;
  }
  .lead .story-title {
    font-size: 36px;
  }
  .note {
    padding: 18px;
  }
  .read-label {
    margin-top: 10px;
  }
  .note-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .settings {
    display: block;
  }
  .settings fieldset {
    padding: 8px 0;
  }
  .query {
    gap: 10px;
  }
  .query sakuga-input {
    --sk-input-width: min(50vw, 320px);
  }
  .reading {
    margin: 20px 0;
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.001ms !important;
    transition-duration: 0s !important;
  }
}
body:has(.reading) .wallpaper {
  inset: -12px;
  filter: blur(6px);
}
@media (max-width: 600px) {
  .wallpaper {
    background-size: auto;
  }
}
@media (min-width: 601px) {
  .story-link.has-cover {
    position: relative;
    min-height: 200px;
  }
  .lead .story-link.has-cover {
    min-height: 272px;
  }
  .story-link.has-cover > img {
    position: absolute;
    inset: 0 auto 0 0;
    width: 36%;
    height: 100%;
    max-height: none;
  }
  .lead .story-link.has-cover > img {
    width: 46%;
  }
  .story-link.has-cover .story-copy {
    grid-column: 2;
  }
}
.settings sakuga-radio {
  color: var(--ink);
}
/* Contain the primary button's oversized impact canvas within the search panel. */
.results,
#search-box {
  overflow-x: clip;
}
/* Local thickness study. Only the backing ink varies between treatments. */
:root[data-base-study="original"] #stream {
  --card-shadow: var(--shadow);
}
:root[data-base-study="sampled"] #stream {
  --card-shadow: color-mix(in oklab, #c899b6 45%, var(--wall-ink));
}
:root[data-night][data-base-study="sampled"] #stream {
  --card-shadow: color-mix(in oklab, #775770 50%, var(--wall-ink));
}
.base-study {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 0 0 20px;
  padding: 12px 20px;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.base-study label,
.base-choices {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.base-study select {
  font: inherit;
  padding: 6px 8px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
}
.base-study output:not(:empty) {
  flex-basis: 100%;
  color: var(--link);
}
@media (max-width: 600px) {
  .base-study {
    padding: 12px;
    gap: 8px;
  }
  .base-choices {
    width: 100%;
  }
  .base-study sakuga-tabs::part(tab) {
    padding-inline: 10px;
  }
}
/* Browse links and metadata share one ink edge, with a shallower base than a story. */
.catalog-links, .term-list { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.catalog-links { margin-block: 0 24px; }
.catalog-links a, .term-chip, .back, .ld-path-links a, .ld-support-actions a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--sheet);
  box-shadow: 2px 3px 0 var(--card-shadow); color: var(--ink); text-decoration: none;
}
.catalog-links [aria-current], .term-chip[aria-current] { background: var(--pink); }
.term-chip small { color: var(--muted); font: inherit; font-size: .82em; }
.catalog-heading .page-title { margin-block: 12px 20px; }
.catalog-heading .catalog-links { margin-bottom: 8px; }
.empty-catalog, .locked-entry { padding: 16px; background: var(--sheet); color: var(--muted); border-radius: 12px; }
.empty-catalog { grid-column: 1/-1; }
.note-title { color: var(--ink); text-decoration: none; }
.lead .story-link:not(.has-cover), .adjacent-panel:not(:has(img)) { grid-template-columns: 1fr; }
.reading { min-width: 0; }
.reading-layout { margin: 32px auto; }
.reading-layout .reading { margin: 0 auto; }
.reading-layout { margin-block-start: 16px; }
.reading-heading { margin-bottom: 1.25em; }
.reading-heading .story-title {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.reading-origin { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 14px; }
.reading-origin a { color: var(--muted); }
.reading .reading-toc { margin: 0 0 16px; }
.reading-layout.with-toc { display: grid; gap: 16px; }
.with-toc .reading { width: 100%; }
.reading :is(h2,h3) { line-height: 1.4; margin: 1.55em 0 .65em; }
.reading h2 { font-size: clamp(24px, 2.2vw, 32px); }
.reading h3 { font-size: 1.12em; }
.reading :is(figcaption,.ld-promo-caption) { color: var(--muted); font-size: .85em; line-height: 1.6; }
.reading figcaption { margin: 8px 0 20px; text-align: center; }
.reading figure img { border-radius: 8px; margin-bottom: 0; }
.reading [data-enlarge] { display: block; cursor: zoom-in; }
.reading iframe, .media-launch { display: grid; width: 100%; aspect-ratio: 16/9; border: 2px solid var(--line); border-radius: 12px; }
.media-launch { place-content: center; justify-items: center; gap: 12px; background: var(--soft); color: var(--ink); font: inherit; font-weight: bold; overflow: hidden; }
.ld-promo .media-launch { background: linear-gradient(0deg, #211d2bcf, #211d2b88), center/cover url("assets/lesson-desk-release.jpg"); color: white; }
.play-symbol { display: grid; width: 52px; height: 48px; place-items: center; padding-left: 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--pink); color: var(--ink); box-shadow: 3px 4px 0 var(--card-shadow); }
.reading .ld-support { padding: 16px 0; margin: 20px 0; border-block: 1px dashed var(--shadow); }
.ld-path-links, .ld-support-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.ld-path-links a, .ld-support-actions a { color: var(--link); font-size: 15px; }
.reading :is(blockquote,aside.ld-version-note) { margin-block: 20px; padding: 8px 16px; border-left: 4px solid var(--shadow); }
.ld-tutorial-table { overflow-x: auto; margin-block: 16px; }
.reading table { border-collapse: collapse; font-size: .88em; line-height: 1.55; width: 100%; }
.reading :is(th,td) { padding: 10px; border: 1px solid var(--line); vertical-align: top; text-align: start; }
.reading th { background: var(--soft); }
.reading code { overflow-wrap: anywhere; }
.reading-toc, .reading details { border: 2px solid var(--line); border-radius: 12px; padding: 10px 16px; background: var(--sheet); box-shadow: 2px 3px 0 var(--card-shadow); }
.reading details { margin: 16px 0; font-size: .92em; }
.reading details[open] > summary { margin-bottom: 12px; }
.reading-toc { align-self: start; }
.reading-toc ol { padding-left: 22px; margin-block: 12px 4px; }
.reading-toc li { padding-block: 3px; color: var(--muted); }
.reading-toc a { color: var(--link); font-size: 15px; text-decoration: none; }
summary { cursor: pointer; font-weight: 600; }
.reading [id], #article-end { scroll-margin-top: 20px; }
#image-viewer { width: min(92vw, 1040px); max-height: 92svh; overflow: auto; padding: 16px; text-align: center; color: var(--ink); background: var(--sheet); border: 2px solid var(--line); border-radius: 16px; box-shadow: 4px 5px 0 var(--card-shadow); }
#image-viewer::backdrop { background: rgb(21 15 27 / 78%); }
#image-viewer img { display: block; max-height: 70svh; max-width: 100%; margin-inline: auto; object-fit: contain; }
#image-viewer figcaption { margin: 12px 0; color: var(--muted); }
:where(a,summary,button,select,textarea):focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
:where(a,summary,button,select) { transform-origin: center bottom; }
@media (hover: hover) {
  :is(.catalog-links a,.term-chip,.back,.ld-path-links a,.ld-support-actions a,.socials a,.down):hover { background-color: var(--soft); }
  :is(.reading a,.note-title,.reading-toc a,.theme-credit a):hover { text-decoration: underline; text-underline-offset: 4px; }
  summary:hover { color: var(--link); }
  .media-launch:hover .play-symbol { translate: 0 -2px; }
}
:is(.catalog-links a,.term-chip,.back,.post-credits a,.adjacent-panel,.socials a,.down,.ld-path-links a,.ld-support-actions a):active { box-shadow: 1px 1px 0 var(--card-shadow); }
@media (min-width:960px) {
  .reading-layout.with-toc { grid-template-columns: minmax(160px, 204px) minmax(0, 1fr); gap: 24px; }
  .reading-toc { position: sticky; top: 16px; max-height: calc(100svh - 32px); overflow-y: auto; }
}
@media (max-width:600px) {
  .reading-layout { margin-block: 20px; }
  .reading-layout .reading { width: 100%; }
  .catalog-links { margin-bottom: 16px; }
}
.section-paper {
  max-width: 832px;
  margin: 16px auto 32px;
  padding: clamp(20px, 4.8vw, 56px);
  border: 2px solid var(--line);
  border-radius: 18px;
  box-shadow: 4px 5px 0 var(--card-shadow);
  background: var(--sheet);
  line-height: 1.8;
}
.section-heading { margin-bottom: 24px; }
.section-heading h1 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.2; }
.section-heading p { margin-top: 12px; }
.section-paper h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.4; margin-bottom: 12px; }
.month-links, .section-links, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.month-links a, .section-links a, .dialog-actions a {
  display: inline-block; padding: 5px 12px;
  color: var(--link); text-decoration: none; border: 1.5px solid var(--line);
  background: var(--soft); border-radius: 10px; box-shadow: 2px 3px 0 var(--card-shadow);
}
.section-paper a:any-link:not(.friend-card) { color: var(--link); }
.change-month { margin-top: 32px; scroll-margin-top: 24px; }
.change-list { list-style: none; padding: 0; margin: 0; }
.change-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px 24px; padding: 20px 0; border-top: 1px dashed var(--shadow); }
.change-meta { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.change-meta time { color: var(--ink); font-weight: 600; white-space: nowrap; }
.change-meta span { color: var(--link); font-size: 13px; }
.change-row h3 { font-size: 20px; line-height: 1.45; }
.change-row ul { padding-left: 1.15em; margin: 8px 0 0; }
.change-row li + li { margin-top: 6px; }
.source-note { margin-top: 24px; font-size: 14px; color: var(--muted); }
.friends-page section + section { margin-top: 32px; }
.friend-card {
  display: flex; align-items: center; gap: 16px; width: fit-content; max-width: 100%;
  padding: 12px 16px; border-left: 4px solid var(--shadow); border-radius: 4px 12px 12px 4px;
  background: var(--soft); color: var(--ink); text-decoration: none;
}
.friend-card img, .site-byline img, .author-heading img { object-fit: cover; border-radius: 50%; flex: none; }
.friend-card > span { min-width: 0; overflow-wrap: anywhere; }
.friend-card strong, .friend-card span span { display: block; }
.friend-card span span { font-size: 15px; color: var(--muted); }
.friend-card:is(:hover,:focus-visible) strong { text-decoration: underline; }
.page-fold { margin-top: 12px; padding-block: 8px; border-bottom: 1px dashed var(--shadow); }
.info-list { margin: 12px 0; }
.info-list > div { display: grid; grid-template-columns: 5em 1fr; gap: 12px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
#open-application, .section-links { margin-top: 20px; }
.site-byline, .author-heading { display: flex; align-items: center; gap: 16px; }
.site-byline { margin-bottom: 12px; font-size: 22px; }
.site-byline i { font-size: .85em; color: var(--link); }
.author-heading p { margin: 0; }
.section-dialog {
  width: min(92vw, 520px); max-height: 88svh; padding: clamp(16px, 3vw, 32px);
  background: var(--sheet); color: var(--ink); border: 2px solid var(--line); border-radius: 16px;
  box-shadow: 4px 5px 0 var(--card-shadow); overflow: auto;
}
.section-dialog::backdrop { background: rgb(27 18 33 / 62%); }
.section-dialog h2 { font-size: 28px; }
.section-dialog p { color: var(--muted); margin: 4px 0 16px; }
.section-dialog label { display: grid; gap: 4px; margin-top: 12px; }
.section-dialog :is(input,textarea) {
  width: 100%; font: inherit; color: var(--ink); padding: 8px 12px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--paper); box-shadow: 2px 3px 0 var(--card-shadow);
}
.section-dialog textarea { resize: vertical; }
.section-dialog .dialog-actions, #application-preview { margin-top: 20px; }
.section-dialog sakuga-button::part(button) { padding: 9px 14px; font-size: 15px; }
#main-nav [aria-current="page"] { background: var(--soft); }
.hero {
  height: min(100svh, 62.5vw);
  min-height: 0;
  padding: 64px 16px 44px;
}
.hero .voice { gap: 12px; position: relative; z-index: 1; }
.hero .avatar { height: 80px; width: 80px; box-shadow: 2px 4px 0 var(--line); }
.hero .voice blockquote {
  color: var(--ink); min-width: 0; width: min(392px, 82vw);
  padding: 8px 24px 10px; border-width: 3px;
  border-radius: 24px 16px 24px 12px; transform: rotate(-2deg);
  box-shadow: 4px 5px 0 var(--shadow), 6px 7px 0 var(--line);
  font-size: clamp(22px, 2.2vw, 32px); font-weight: 700;
}
.hero .voice blockquote small { font-size: 15px; font-weight: 400; }
.hero .voice blockquote::after {
  content: ""; position: absolute; width: 24px; height: 3px; right: -18px; top: 10px;
  background: var(--ink); transform: rotate(-20deg);
  box-shadow: -1px -7px 0 var(--pink), 3px 7px 0 var(--pink);
}
.hero .socials a { width: 40px; height: 40px; }
.hero .down { z-index: 2; left: auto; right: max(20px, calc((100% - 1056px) / 2)); bottom: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .hero .voice > a { animation: journal-portrait-in 460ms cubic-bezier(.2,.85,.25,1.18) both; }
  .hero .voice blockquote { animation: journal-caption-in 560ms 80ms both; }
  .hero .socials { animation: journal-portrait-in 340ms 220ms backwards; }
  .hero .voice:focus-within blockquote::after, .hero .voice:hover blockquote::after {
    animation: journal-ink-lines 400ms ease-out;
  }
}
@keyframes journal-portrait-in {
  from { opacity: 0; transform: translateY(10px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes journal-caption-in {
  0% { opacity: 0; transform: translateY(12px) rotate(-6deg) scale(.88); }
  60% { opacity: 1; transform: translateY(-2px) rotate(.5deg) scale(1.035); }
  100% { opacity: 1; transform: rotate(-2deg); }
}
@keyframes journal-ink-lines {
  45% { transform: translate(4px,-2px) rotate(-24deg) scaleX(1.2); }
}
@media (max-width:880px) {
  .hero { height:100svh; min-height:292px; padding:80px 12px 40px; }
  /* Extend the autumn colours into the portrait space around the complete, sharp landscape. */
  .hero::before, .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: inherit; background-position: center; background-repeat: no-repeat;
  }
  .hero::before { background-size: 100% 100%; filter: blur(2px) var(--forest-tone); transform: scale(1.012); }
  .hero::after {
    background-size: contain;
    /* Blend along the image edges themselves, including on short or rotated screens. */
    --half-photo: min(31.25vw, 50%);
    --photo-edge: min(8vw, 12%);
    --edge-blend: linear-gradient(to bottom, transparent calc(50% - var(--half-photo)),
      black calc(50% - var(--half-photo) + var(--photo-edge)),
      black calc(50% + var(--half-photo) - var(--photo-edge)),
      transparent calc(50% + var(--half-photo)));
    -webkit-mask-image: var(--edge-blend);
    mask-image: var(--edge-blend);
  }
  /* Counter the flex row gap and the border/padding while the panel folds shut. */
  #main-nav { transform-origin: center top; --nav-fold-offset: -20px; }
  #main-nav:focus-within:not([inert]) { display:flex; }
  #main-nav a:is(:active,.touch-pressed) { background-color: var(--soft); translate: 0 -2px; }
  #main-nav a:is(:active,.touch-pressed)::after { transform: scaleX(1) rotate(-3deg); }
  .hero .avatar { width: 68px; height: 68px; }
  .hero .down { width: 40px; height: 40px; bottom: 10px; }
}
@media (max-width: 600px) {
  .section-paper, .reading-layout { margin-block-start: 12px; }
  .change-row { grid-template-columns: minmax(0,1fr); }
  .change-meta { align-items: baseline; flex-direction: row; gap: 12px; }
}
