.hero { display: grid; min-height: min(72vh, 720px); place-content: center; padding: 80px 24px; text-align: center; }
.hero h1 { max-width: 14ch; margin: 0 auto; font-size: clamp(2.3rem, 7vw, 5.6rem); font-weight: 700; line-height: 1.23; letter-spacing: 0.07em; text-wrap: balance; }
.hero-copy { max-width: 34rem; margin: 28px auto 34px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 2; }
.scroll-cue { color: var(--text); font: 0.82rem/1.2 var(--font-sans); letter-spacing: 0.08em; text-decoration: none; }
.story-page .site-header { min-height: 40px; padding: 3px clamp(14px, 4vw, 46px); }
.story-page .site-header .brand { gap: 7px; font-size: 0.88rem; }
.story-page .site-header .brand-mark { font-size: 1rem; }
.story-page .site-header .menu-toggle-button { width: 32px; height: 32px; flex-basis: 32px; }
.story-page .site-header .menu-icon,
.story-page .site-header .menu-icon::before,
.story-page .site-header .menu-icon::after { width: 17px; }
.story-page .site-header .menu-icon::before { top: -5px; }
.story-page .site-header .menu-icon::after { top: 5px; }
.story-page .menu-backdrop { top: 40px; }
.story-page .header-menu-panel { top: 40px; height: calc(100dvh - 40px); padding-top: 20px; }
.story-page.menu-is-open .site-header .menu-icon::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.story-page.menu-is-open .site-header .menu-icon::after { top: 0; transform: translateX(-50%) rotate(-45deg); }
.story-main { padding: clamp(30px, 6vw, 68px) 24px 0; }
.story-board, .records-section { max-width: 900px; margin: 0 auto 80px; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(145deg, rgba(26, 31, 61, 0.8), rgba(13, 16, 34, 0.88)); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 700; }
.posts { display: grid; gap: 30px; }
.post { position: relative; font-family: var(--font-serif); font-weight: var(--weight-normal); }
.post + .post::before { display: none; }
.narrative-text { padding: 0 8px; font-size: calc(1rem + 1px); font-kerning: none; font-variant-ligatures: none; font-feature-settings: "palt" 0, "pkna" 0; line-height: 1.7; letter-spacing: 0.1em; overflow-wrap: anywhere; }
.dialogue-wrapper { display: grid; gap: 8px; }
.character-name { padding-left: 8px; color: #d9ddf7; font-size: calc(1.15rem + 1px); font-weight: var(--weight-bold); line-height: 1.3; letter-spacing: 0.02em; }
.dialogue-box { display: inline-flex; width: fit-content; max-width: 100%; justify-self: start; align-items: flex-start; gap: 16px; padding: 16px; border: 1px solid rgba(195, 206, 255, 0.1); border-radius: 14px; background: rgba(110, 123, 118, 0.16); }
.character-icon { width: 60px; height: 60px; flex: 0 0 60px; border: 1px solid var(--line); border-radius: 10px; object-fit: cover; background: var(--panel-solid); }
.dialogue-text { display: flex; min-width: 0; align-self: stretch; align-items: center; flex: 0 1 auto; padding-top: 0; font-size: calc(1rem + 1px); font-kerning: none; font-variant-ligatures: none; font-feature-settings: "palt" 0, "pkna" 0; line-height: 1.7; letter-spacing: 0.1em; overflow-wrap: anywhere; }
.dialogue-text, .dialogue-text > div, .decor-serif-block { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.dialogue-box .dialogue-text { min-width: 2.2em; justify-content: center; }
.dialogue-text > div { width: fit-content; }
.decor-serif-block .dialogue-box { width: fit-content; max-width: 100%; }
.post-image { display: block; max-width: 100%; max-height: 700px; margin: 18px auto 0; border: 1px solid var(--line); border-radius: 14px; object-fit: contain; }
.post-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); font: 0.75rem/1.2 var(--font-sans); }
.draft-badge { padding: 3px 7px; border-radius: 999px; color: var(--warning); background: rgba(241, 202, 129, 0.11); }
ruby { max-width: 100%; ruby-align: center; }
rt { max-width: 30em; color: var(--muted); font-size: 0.58em; overflow-wrap: anywhere; white-space: normal; }
.decor-red { color: #ff7f8b; }
.decor-blue { color: #72bbef; }
.decor-big-level-1 { font-size: 1.25em; }
.decor-big-level-2 { font-size: 1.2em; }
.decor-big-level-3 { font-size: 1.2em; }
.decor-big2 { font-size: 2em; }
.decor-small-level-1 { font-size: 0.85em; }
.decor-small-level-2 { font-size: 0.82em; }
.decor-small-level-3 { font-size: 0.72em; }
.decor-small2 { font-size: 0.65em; }
.decor-system-block { display: block; margin: 0.4em 0; padding: clamp(18px,3vw,28px); border: 1px solid rgba(255,255,255,0.22); border-radius: 16px; color: var(--text); background: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.decor-document-heading { scroll-margin-top: 92px; margin: 1.35em 0 0.55em; color: var(--text); font-family: var(--font-serif); font-weight: 700; line-height: 1.4; letter-spacing: 0.04em; }
.decor-document-heading-2 { display: flex; align-items: center; gap: 9px; padding-bottom: 7px; border-bottom: 1px dashed rgba(174,188,255,0.34); font-size: clamp(1.3rem, 3vw, 1.75rem); }
.decor-document-heading-2::before { content: ""; width: 0.72em; height: 0.72em; flex: 0 0 0.72em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(174,188,255,0.35); }
.decor-document-heading-3 { margin: 1em 0 0.45em; padding: 7px 12px; border-left: 5px solid var(--warning); color: var(--text); background: rgba(255,255,255,0.07); font-size: clamp(1.02rem, 2.2vw, 1.2rem); }
.decor-toc { margin: 1.1em 0 1.8em; padding: clamp(18px, 3vw, 24px); border: 1px solid rgba(190,199,255,0.22); border-radius: 16px; background: rgba(255,255,255,0.08); font-family: var(--font-sans); }
.decor-toc-title { margin: 0 0 12px; color: var(--accent); font-weight: 700; letter-spacing: 0.16em; }
.decor-toc ol { display: grid; gap: 8px; margin: 0; padding-left: 1.25em; }
.decor-toc li { color: var(--muted); }
.decor-toc a { color: var(--text); text-decoration: none; }
.decor-toc a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 0.22em; }
.decor-toc-subitem { margin-left: 1em; font-size: 0.92em; }
.decor-toc.is-empty { color: var(--muted); }
.decor-toc.is-empty p { margin: 0; }
.decor-scroll-block { max-height: min(58vh, 520px); margin: 1em 0; padding: clamp(18px, 3vw, 26px); overflow: auto; border: 1px solid rgba(190,199,255,0.24); border-radius: 12px; color: var(--text); background: rgba(255,255,255,0.09); scrollbar-color: rgba(174,188,255,0.48) rgba(255,255,255,0.08); scrollbar-width: thin; }
/* 歌詞（折りたたみ＋すべてコピー。本文はスマホでもPCでも一部だけ選んでコピーできる） */
.decor-lyrics { margin: 0.9em 0; border: 1px solid rgba(174,188,255,.28); border-radius: 14px; background: rgba(255,255,255,.05); overflow: hidden; }
.decor-lyrics > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--text); font-weight: 700; line-height: 1.45; list-style: none; cursor: pointer; }
.decor-lyrics > summary::-webkit-details-marker { display: none; }
.decor-lyrics > summary::before { content: "♪"; flex: 0 0 auto; color: var(--accent); }
.decor-lyrics-title { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.decor-lyrics-copy { flex: 0 0 auto; min-height: 34px; padding: 5px 13px; border: 1px solid rgba(174,188,255,.4); border-radius: 999px; color: var(--text); background: rgba(131,152,255,.16); font: 700 .78rem/1.2 var(--font-sans, sans-serif); cursor: pointer; }
.decor-lyrics-copy:hover, .decor-lyrics-copy:focus-visible { background: rgba(131,152,255,.3); }
.decor-lyrics-body { padding: 4px 18px 18px 38px; border-top: 1px dashed rgba(174,188,255,.22); line-height: 1.9; white-space: normal; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; cursor: text; }
@media (max-width: 640px) {
  .decor-lyrics > summary { flex-wrap: wrap; }
  .decor-lyrics-copy { width: 100%; }
  .decor-lyrics-body { padding-left: 16px; }
}
.decor-fold { margin: 0.5em 0; }
.decor-fold > summary { display: flex; align-items: center; gap: 0.5em; width: fit-content; max-width: 100%; padding: 0.15em 0; color: var(--text); font-weight: 700; line-height: 1.45; list-style: none; cursor: pointer; }
.decor-fold > summary::-webkit-details-marker { display: none; }
.decor-fold > summary::before { content: "▶"; flex: 0 0 auto; color: var(--accent); font-size: 0.8em; transition: transform 0.18s ease; }
.decor-fold[open] > summary::before { transform: rotate(90deg); }
.decor-fold > summary:hover { color: var(--accent); }
.decor-fold-body { margin: 0.35em 0 0.6em 1.3em; padding: 0.4em 0 0.4em 1em; border-left: 2px solid rgba(174,188,255,0.28); line-height: 1.72; letter-spacing: 0.04em; }
.decor-code-block { display: block; width: 100%; max-width: 100%; margin: 0.8em 0; padding: 13px 15px; overflow-x: auto; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: #dbdee1; background: #1e1f22; box-shadow: inset 0 1px 0 rgba(255,255,255,0.04); font: 400 0.92em/1.6 Consolas, "Cascadia Code", "Noto Sans Mono", monospace; letter-spacing: 0.015em; text-align: left; tab-size: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.decor-code-block code { color: inherit; font: inherit; letter-spacing: inherit; white-space: inherit; }
.decor-narrative-block { margin: 0; padding: 0 0.35em; line-height: 1.7; }
.decor-dialogue-block { margin: 0; }
.decor-dialogue-name { margin: 0 0 5px 7px; color: #d9ddf7; font-size: calc(1.15rem + 1px); font-weight: var(--weight-bold); line-height: 1.3; letter-spacing: 0.02em; }
.decor-image-block { display: block; width: max-content; max-width: 100%; margin: 14px auto; line-height: 0; text-align: center; }
.decor-image-block img { display: block; width: auto; height: auto; max-width: min(100%, 800px); max-height: 300px; margin: 0 auto; border: 1px solid var(--line); border-radius: 12px; object-fit: contain; }
.decor-image-block.decor-image-large img { max-width: min(100%, 800px); max-height: 500px; }
.decor-image-error { color: var(--danger); font: 700 0.82rem/1.4 var(--font-sans); letter-spacing: normal; }
.content-image-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(88dvh, 780px); padding: clamp(20px, 4vw, 30px); overflow: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: var(--panel-solid); box-shadow: var(--shadow); }
.content-image-dialog::backdrop { background: rgba(2,3,12,0.72); backdrop-filter: blur(4px); }
.content-image-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.content-image-dialog-heading h2 { margin: 0; font-size: 1.45rem; }
.content-image-size-guide { display: grid; gap: 4px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgba(255,255,255,0.04); font: var(--weight-normal) 0.8rem/1.55 var(--font-sans); }
.content-image-size-guide strong { color: var(--text); font-weight: 700; }
.content-image-url-label { display: grid; gap: 7px; color: var(--text); font: 700 0.84rem/1.4 var(--font-sans); }
.content-image-url-label input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: rgba(2,4,14,0.22); font: var(--weight-normal) 0.88rem/1.4 var(--font-sans); }
.content-image-preview { display: grid; min-height: 210px; max-height: 280px; place-items: center; margin-top: 14px; padding: 12px; overflow: hidden; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.035) 75%), linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.035) 75%); background-position: 0 0, 10px 10px; background-size: 20px 20px; font: var(--weight-normal) 0.8rem/1.5 var(--font-sans); text-align: center; }
.content-image-preview img { display: block; width: auto; max-width: 100%; max-height: 254px; object-fit: contain; }
.content-image-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.secret-text { display: inline; padding: 0 0.08em; border: 0; border-radius: 3px; color: transparent; background: #2a2d48; cursor: pointer; font: inherit; line-height: inherit; transition: color 180ms ease, background 180ms ease, filter 180ms ease; }
.secret-text.is-blur { color: inherit; background: transparent; filter: blur(3px); }
.secret-text.is-revealed { color: inherit; background: transparent; filter: none; }
@media (hover: hover) and (pointer: fine) { .secret-text:hover { color: inherit; background: transparent; filter: none; } }
@media (max-width: 720px) {
  .story-main { padding: 20px 0 0; }
  .story-board, .records-section { margin-inline: 12px; border-radius: 20px; }
  .section-heading { align-items: flex-start; }
  .dialogue-box { gap: 12px; padding: 13px; }
  .character-icon { width: 60px; height: 60px; flex-basis: 60px; }
  .content-image-dialog { width: calc(100vw - 20px); padding: 16px; }
  .content-image-preview { min-height: 160px; }
  .content-image-dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .content-image-dialog-actions .button { width: 100%; }
}
@media (max-width: 640px) {
  .character-icon { width: 40px; height: 40px; flex-basis: 40px; }
}
