:root {
  color-scheme: dark;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --ink: #f7efe6;
  --muted: #c9bbae;
  --accent: #ff982e;
  --accent-hover: #ffb15e;
  --accent-ink: #211409;
  --accent-wash: #352417;
  --paper: #151311;
  --deep: #0d0c0b;
  --card: #201b16;
  --surface: #191613;
  --line: #443a31;
  --outline: #aa825d;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, textarea, input { font: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.frame { width: min(calc(100% - 4rem), 68rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; inset: 1rem auto auto 1rem; padding: .75rem 1rem; background: var(--paper); transform: translateY(-160%); opacity: 0; }
.skip-link:focus { transform: none; opacity: 1; }
.masthead { color: var(--ink); background: var(--deep); }
.masthead-home { position: relative; isolation: isolate; }
.masthead-photo, .masthead-home::after {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.masthead-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 51%;
  filter: grayscale(1) sepia(.85) saturate(2.6);
}
.masthead-home::after { content: ""; background: linear-gradient(90deg, #100d0be8 8%, #100d0ba0 47%, #100d0b42); }
.masthead-inner { display: grid; min-height: 5rem; place-items: center; padding-block: .5rem; }
.masthead-home .masthead-inner { min-height: clamp(12rem, 24vw, 19.5rem); }
.wordmark { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .25rem .85rem; font-family: var(--serif); font-size: 1.55rem; font-weight: 800; letter-spacing: .08em; text-shadow: 0 1px 10px var(--deep); }
.wordmark span { margin-left: .85rem; color: var(--accent); font-size: .8rem; font-weight: 650; letter-spacing: .14em; }
.masthead-home .wordmark { font-size: clamp(1.55rem, 4vw, 2.7rem); }
.site-nav { background: var(--paper); border-bottom: 1px solid var(--line); }
.primary-nav { display: flex; justify-content: center; align-items: center; gap: clamp(1rem, 5vw, 4rem); }
.primary-nav a { display: inline-grid; place-items: center; min-height: 3.25rem; padding: .3rem .85rem; font-size: .94rem; font-weight: 700; }
.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: .3em; }
main { padding-top: 1.5rem; }
section[id], .home-video-links a { scroll-margin-top: 1rem; }
.creator-card { width: min(100%, 44rem); margin: 0 auto; padding: 1rem; background: var(--card); border: 1px solid var(--line); border-top-color: var(--accent); }
.creator-details { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.creator-details img { flex: 0 0 auto; border-radius: 100%; }
.creator-details a { display: inline-block; font-size: 1.02rem; font-weight: 800; }
.creator-details a:hover { color: var(--accent); }
.creator-details span { display: block; margin-top: .15rem; color: var(--muted); font-size: .875rem; }
.fan-cta { display: grid; place-items: center; min-height: 3.65rem; padding: .75rem 1.1rem; border-radius: .36rem; background: var(--accent); color: var(--accent-ink); font-size: 1.13rem; font-weight: 800; text-align: center; }
.fan-cta:hover { background: var(--accent-hover); }
.home-diary { display: grid; grid-template-columns: minmax(8rem, .45fr) minmax(0, 1.55fr); gap: clamp(1.2rem, 6vw, 5rem); margin-top: 3.4rem; }
.diary-heading { display: flex; flex-direction: column; align-items: start; }
.diary-heading h2 { margin-top: .2rem; font-family: var(--serif); font-size: 1.8rem; }
.diary-actions { display: flex; flex-wrap: wrap; gap: 0 .85rem; }
.section-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
.diary-list { border-top: 1px solid var(--line); }
.entry { border-bottom: 1px solid var(--line); }
.entry-link { display: flex; gap: 1.1rem; align-items: start; padding: 1.35rem .15rem; }
.entry-photo { width: clamp(5.5rem, 15vw, 10rem); height: auto; aspect-ratio: 4 / 3; object-fit: cover; flex: none; border-radius: .28rem; }
.entry-copy { min-width: 0; }
.entry h3 { font-size: clamp(1.075rem, 2.1vw, 1.26rem); font-weight: 800; line-height: 1.5; text-underline-offset: .2em; text-wrap: balance; }
.entry-link:hover h3 { color: var(--accent); text-decoration: underline; }
.entry-meta, .article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .65rem; margin-top: .35rem; color: var(--muted); font-size: .875rem; }
.entry-meta time, .article-meta time { font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.entry-meta span { color: var(--accent); }
.entry p { margin-top: .45rem; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.home-video-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem 1.4rem; margin-top: 1.2rem; }
.home-video-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; }
.final-cta { width: min(100%, 44rem); margin: 1rem auto 3rem; }
.button { display: inline-grid; place-items: center; width: fit-content; min-height: 3rem; padding: .65rem 1.12rem; border: 1px solid transparent; cursor: pointer; font-size: .94rem; font-weight: 750; text-align: center; }
.button-primary { color: var(--accent-ink); background: var(--accent); }
.button-primary:hover { background: var(--accent-hover); }
.button-secondary { color: var(--accent); border-color: var(--outline); background: transparent; }
.button-secondary:hover { background: var(--accent-wash); }
.button:disabled { cursor: wait; opacity: .75; }
.reading-page { width: min(100%, 45rem); margin: .5rem auto 3.5rem; }
.reading-page .back-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-bottom: .45rem; color: var(--accent); font-size: .9rem; text-decoration: underline; text-underline-offset: .18em; }
.reading-page header { border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; }
.reading-page h1 { font-family: var(--serif); font-size: clamp(1.7rem, 5.5vw, 3rem); line-height: 1.35; text-wrap: balance; }
.reading-page h2 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: .65rem; }
.reading-page p { color: var(--muted); line-height: 1.85; }
.reading-page header + p, .reading-page section { margin-top: 1.4rem; }
.reading-page .diary-list { border-top: 0; }
.article-meta a, .article-neighbors a:hover { color: var(--accent); }
.article-meta a { display: inline-flex; align-items: center; min-height: 2rem; text-decoration: underline; text-underline-offset: .18em; }
.article-photo { display: block; width: 100%; height: auto; max-height: 29rem; aspect-ratio: 4 / 3; object-fit: cover; margin-top: 1.25rem; border-radius: .28rem; }
.article-body { margin-block: 1.45rem 1.2rem; }
.article-body p { font-size: 1.065rem; }
.article-body p + p { margin-top: 1.1rem; }
.reading-links { display: flex; flex-wrap: wrap; gap: .6rem .7rem; margin-top: .9rem; }
.article-neighbors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .65rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.article-neighbors a { display: flex; flex-direction: column; gap: .32rem; padding: .75rem 1rem; border: 1px solid var(--line); background: var(--card); }
.article-neighbors span { font-size: .875rem; color: var(--muted); }
.aliases { margin: 1.3rem 0 0; }
.aliases > div { display: grid; grid-template-columns: minmax(5rem, .45fr) 1fr; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.aliases dt { color: var(--muted); }
.aliases dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.release-panel { background: var(--card); border: 1px solid var(--line); padding: 1rem; }
.video-list { list-style: none; margin: 0; padding: 0; }
.video-entry + .video-entry { margin-top: .9rem; }
.video-entry h3 { margin-bottom: .55rem; }
.video-entry video { display: block; width: 100%; max-height: 27rem; background: var(--deep); }
#x-link:not(:empty) { margin-top: .65rem; }
.comments-section { border-top: 1px solid var(--line); padding-top: 1.15rem; }
.comments-section fieldset { display: grid; gap: .45rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.comments-section label { font-size: .94rem; font-weight: 700; }
.comments-section label span { font-weight: 400; color: var(--muted); }
.comments-section textarea, .comments-section input { width: 100%; padding: .65rem .75rem; border: 1px solid var(--outline); border-radius: .2rem; background: var(--surface); color: var(--ink); min-height: 2.8rem; }
.comments-section textarea { resize: vertical; margin-bottom: .35rem; }
.comments-section button { margin-top: .4rem; }
.comments-section [data-form-status]:not(:empty) { margin-top: .7rem; }
.comments-status { margin-top: 1rem; font-size: .94rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { padding: .85rem 0; border-top: 1px solid var(--line); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; }
.comment-meta time { color: var(--muted); font-size: .875rem; }
.comment-list p { white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-page .final-cta { margin: 2rem 0 0; }
.video-library { width: min(100%, 61rem); }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 1rem 0 0; padding: 0; }
.video-card { display: grid; gap: .45rem; }
.video-card:hover strong { color: var(--accent); text-decoration: underline; }
.video-card img, .video-preview img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--card); }
.video-card strong { overflow-wrap: anywhere; line-height: 1.5; }
.video-player { scroll-margin-top: 1rem; margin-block: 1.25rem; }
.video-preview { display: grid; width: 100%; place-items: center; border: 0; padding: 0; position: relative; cursor: pointer; background: var(--deep); color: var(--ink); }
.video-preview span { position: absolute; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: .3rem; font-weight: 750; }
.video-player video { display: block; width: 100%; max-height: min(70vh, 42rem); background: var(--deep); }
footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.8rem; color: var(--muted); font-size: .875rem; }
.footer-inner small { font-size: inherit; }
dialog { width: min(calc(100% - 2rem), 25rem); margin: auto; padding: 1.45rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #0a0807be; }
dialog p { margin-block: .7rem 1.2rem; line-height: 1.65; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: end; }
@media (max-width: 42rem) {
  html { scroll-padding-top: 3.25rem; }
  .frame { width: calc(100% - 2rem); }
  .site-nav { position: sticky; top: 0; z-index: 2; }
  .masthead-inner { min-height: 3.75rem; }
  .masthead-home .masthead-inner { min-height: clamp(7rem, 33vw, 10rem); }
  .wordmark { font-size: 1.15rem; letter-spacing: .04em; }
  .wordmark span { margin-left: .5rem; font-size: .73rem; }
  .primary-nav { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3,minmax(0,1fr)); gap: .3rem; }
  .primary-nav a { min-height: 2.95rem; padding-inline: .2rem; font-size: .9rem; }
  main { padding-top: .9rem; }
  .creator-card { padding: .8rem; }
  .fan-cta { min-height: 3.35rem; font-size: 1.08rem; }
  .home-diary { display: block; margin-top: 1.7rem; }
  .diary-heading { flex-direction: row; justify-content: space-between; align-items: center; padding-bottom: .2rem; }
  .diary-heading h2 { font-size: 1.45rem; }
  .entry-link { padding: 1rem 0; gap: .7rem; }
  .entry-photo { width: clamp(5.25rem, 25vw, 7rem); }
  .entry p { font-size: .95rem; }
  .final-cta { margin-bottom: 1.8rem; }
  .home-video-links { margin-top: .6rem; }
  .reading-page { margin-top: 0; }
  .reading-page .article-meta { margin-top: .5rem; }
  .reading-links, .article-neighbors { display: grid; grid-template-columns: 1fr; }
  .reading-links .button, .comments-section button, .video-entry .button, #x-link .button { width: 100%; }
  .comments-section textarea, .comments-section input { font-size: 1rem; }
  .article-meta a[href="#comments"] { min-height: 2.75rem; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem .65rem; }
  .video-card strong { font-size: .94rem; }
  .footer-inner a { display: inline-flex; align-items: center; min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
