/* =========================================================
   Mihira Seabream Studio — Novel Exhibition
   旧展示サイトのデザインを踏襲（色・背景演出・ボタン）
   ========================================================= */

:root {
    --bg: #5b6474;            /* 旧サイトの地色 */
    --bg-deep: #4a5261;
    --cyan: #00f3ff;          /* 基本の差し色 */
    --cyan-soft: rgba(0, 243, 255, 0.1);
    --cyan-line: rgba(0, 243, 255, 0.3);
    --magenta: #ff0099;       /* グリッチ演出のみ */
    --text: #e8f4f8;
    --muted: #8892b0;
    --muted-light: #b9c2d6;

    /* 本文の紙面（明） */
    --paper: #d8dee8;
    --paper-ink: #1b2130;
    --paper-sub: #4d566a;
    --paper-rule: rgba(27, 33, 48, 0.18);
    --paper-accent: #007c85;

    --font-display: "Audiowide", "M PLUS Rounded 1c", sans-serif;
    --font-ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
    --font-body: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

    --sidebar: 350px;
    --read-size: 17px;
}

/* 本文の紙面（暗）— 読書設定で切り替え */
body.paper-dark {
    --paper: rgba(24, 30, 42, 0.94);
    --paper-ink: #dbe4ec;
    --paper-sub: #93a0b8;
    --paper-rule: rgba(0, 243, 255, 0.18);
    --paper-accent: #00e1ec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    background: var(--bg); overflow-x: hidden; scroll-behavior: smooth;
    /* 短い話（序章・終章）でスクロールバーが消えて横幅が変わり、枠がずれるのを防ぐ */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- 背景演出（旧サイトと同じ） ---------- */
.cyber-bg {
    position: fixed; inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}
@keyframes gridMove { from { background-position: 0 0; } to { background-position: 50px 50px; } }

.cyber-bg::before, .cyber-bg::after {
    content: ''; position: absolute; filter: blur(60px);
}
.cyber-bg::before {
    width: 400px; height: 200px; top: 20%; left: 10%;
    background: linear-gradient(135deg, rgba(0,243,255,0.2), rgba(255,0,110,0.2));
    animation: colorBlock1 10s ease-in-out infinite;
}
.cyber-bg::after {
    width: 450px; height: 220px; bottom: 20%; right: 15%;
    background: linear-gradient(225deg, rgba(255,0,110,0.2), rgba(0,243,255,0.2));
    animation: colorBlock2 12s ease-in-out infinite;
}
@keyframes colorBlock1 { 0%,100% { transform: translate(0,0); opacity: .6; } 50% { transform: translate(180px,100px); opacity: .9; } }
@keyframes colorBlock2 { 0%,100% { transform: translate(0,0); opacity: .6; } 50% { transform: translate(-150px,-80px); opacity: .9; } }

.glitch-lines {
    position: fixed; inset: 0; pointer-events: none;
    z-index: 10001; opacity: 0.5; overflow: hidden;
    mix-blend-mode: color-dodge;
    transition: opacity .4s ease;
}
.glitch-line { position: absolute; width: 100%; height: 3px; }
.glitch-line:nth-child(1) { background: linear-gradient(90deg, transparent, #00d4ff, #00d4ff, transparent); animation: glitchScan 9s linear infinite; box-shadow: 0 0 15px #00d4ff; }
.glitch-line:nth-child(2) { background: linear-gradient(90deg, transparent, var(--magenta), var(--magenta), transparent); animation: glitchScan 14s linear infinite; box-shadow: 0 0 15px var(--magenta); }
.glitch-line:nth-child(3) { background: linear-gradient(90deg, transparent, #00d4ff, #00d4ff, transparent); animation: glitchScan 5s linear infinite; box-shadow: 0 0 15px #00d4ff; }
@keyframes glitchScan { 0% { top: -10%; opacity: 0; } 50% { opacity: .9; } 100% { top: 110%; opacity: 0; } }

.glitch-lines::before, .glitch-lines::after {
    content: ''; position: absolute; height: 3px; width: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(0,212,255,.9) 20%, rgba(255,0,153,.9) 40%, rgba(0,212,255,.9) 60%, transparent 100%);
    animation: horizontalGlitch 8s linear infinite;
    box-shadow: 0 0 25px rgba(0,212,255,.7);
}
.glitch-lines::before { top: 30%; animation-delay: 1s; }
.glitch-lines::after  { top: 70%; animation-delay: 5s; }
@keyframes horizontalGlitch {
    0%,100% { transform: translateX(-100%); opacity: 0; }
    5% { opacity: .8; } 10%,90% { opacity: 1; }
    50% { transform: translateX(100%); opacity: 1; }
}

/* 本文を読んでいる間はライン演出を消す */
body.reading .glitch-lines { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .cyber-bg, .cyber-bg::before, .cyber-bg::after,
    .glitch-line, .glitch-lines::before, .glitch-lines::after { animation: none !important; }
    .glitch-lines { display: none; }
    html { scroll-behavior: auto; }
}

/* ---------- サイドバー ---------- */
header.sidebar {
    position: fixed; left: 0; top: 0;
    width: var(--sidebar); height: 100vh;
    padding: 28px 30px;
    background: linear-gradient(to right, rgba(91,100,116,.95), rgba(91,100,116,.7));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0,243,255,.2);
    z-index: 1000;
    display: flex; flex-direction: column;
    /* 拡大表示で縦に収まらない時はスクロールできるが、バーは表示しない */
    overflow-x: hidden; overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
header.sidebar::-webkit-scrollbar { display: none; }
/* 中央寄せ（収まらない時は上から表示されるように margin で寄せる） */
.header-content { margin-block: auto; }
header.sidebar::before {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(0,243,255,.08) 1px, transparent 1px),
        linear-gradient(rgba(0,243,255,.08) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: sidebarGrid 15s linear infinite;
    pointer-events: none;
}
/* 模様だけを動かす（要素自体は動かさないのではみ出さない） */
@keyframes sidebarGrid { from { background-position: 0 0; } to { background-position: 30px 30px; } }
.header-content { position: relative; z-index: 1; }

.brand { display: block; text-decoration: none; }
.logo {
    width: 110px; height: 110px; margin-bottom: 20px;
    border: 5px solid var(--cyan); border-radius: 10px;
    background: rgba(0,243,255,.1);
    box-shadow: 0 0 20px rgba(0,243,255,.3);
    overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand h1 {
    font-family: var(--font-display); font-weight: 400;
    font-size: 2.5rem; letter-spacing: 3px; line-height: 1.2;
    background: linear-gradient(135deg, var(--cyan), #fff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand .subtitle {
    font-family: var(--font-display);
    font-size: 1.55rem; letter-spacing: 1px; margin-bottom: 14px;
    background: linear-gradient(135deg, var(--cyan), #fff);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.social-link {
    display: flex; align-items: center; gap: 10px;
    color: var(--muted); text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(136,146,176,.3); border-radius: 5px;
    background: rgba(91,100,116,.6);
    font-family: Arial, sans-serif; font-size: .9rem;
    transition: all .3s ease;
}
.social-link:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 20px rgba(0,243,255,.3); transform: translateY(-2px); }
.social-icon { width: 20px; height: 20px; flex: none; }
.social-link .icon-hover { display: none; }
.social-link:hover .icon-default { display: none; }
.social-link:hover .icon-hover { display: inline; }

nav.site-nav { display: flex; flex-direction: column; gap: 10px; }

/* 旧サイトのボタン。サイト全体のボタンはこれに統一 */
.nav-button, .btn {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: .5em;
    padding: 12px 24px;
    background: var(--cyan-soft);
    border: 2px solid var(--cyan); border-radius: 15px;
    color: var(--cyan);
    font-family: var(--font-display); font-size: 1rem; letter-spacing: 2px;
    text-decoration: none; text-align: center; cursor: pointer;
    transition: all .3s ease;
}
.nav-button::before, .btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,243,255,.3), transparent);
    transition: left .5s ease;
}
.nav-button:hover::before, .btn:hover::before { left: 100%; }
.nav-button:hover, .btn:hover {
    background: rgba(0,243,255,.2);
    box-shadow: 0 0 30px rgba(0,243,255,.4);
    transform: translateY(-3px); color: #e0f9ff;
}
.nav-button { opacity: .72; }
.nav-button.is-current { opacity: 1; background: rgba(0,243,255,.22); box-shadow: 0 0 18px rgba(0,243,255,.3); }
.nav-button .kicker { font-size: .68em; letter-spacing: 1px; opacity: .8; }
/* メニューの下に置く小さなテキストリンク（Staffページの「About ▶」と同じ大きさ） */
.nav-mini {
    align-self: center; margin-top: 4px;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 12px; border: 1px solid rgba(0,243,255,.35); border-radius: 999px;
    color: var(--muted-light); text-decoration: none;
    font-family: var(--font-display); font-size: .72rem; letter-spacing: 1px;
    transition: all .25s ease;
}
.nav-mini:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px rgba(0,243,255,.3); }
.nav-mini.is-current { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px rgba(0,243,255,.3); }
.nav-button.novel { letter-spacing: 1px; }
/* 日本語のメニュー名は丸ゴシックで（Audiowideだと日本語がギザつくため） */
.nav-button.jp { font-family: var(--font-ui); font-weight: 500; font-size: .95rem; letter-spacing: .08em; }
.nav-button.jp .kicker { font-family: var(--font-display); font-size: .62em; letter-spacing: 1px; }
.nav-button ruby rt { font-size: .5em; letter-spacing: 0; }

.btn-jp { font-family: var(--font-ui); font-weight: 700; letter-spacing: .12em; }
.btn-pdf .btn-sub { margin-top: 2px; }
.btn .btn-sub { display: block; font-size: .7rem; letter-spacing: 1px; opacity: .75; font-family: var(--font-display); font-weight: 400; }

.access-counter { display: flex; justify-content: center; margin-top: 20px; min-height: 40px; }
.access-counter iframe { border: none; background: transparent; }

/* ---------- メイン ---------- */
.container {
    position: relative; z-index: 2;
    margin-left: var(--sidebar);
    padding: 40px;
    min-height: 100vh;
}
.page { display: none; animation: fadeIn .5s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.copyright {
    text-align: center; padding: 28px 0 10px;
    font-size: .85rem; color: var(--muted); font-family: Arial, sans-serif;
}

.section-label {
    display: flex; align-items: baseline; gap: .8em;
    font-family: var(--font-display); color: var(--cyan);
    font-size: 1.5rem; letter-spacing: 3px;
    margin: 0 0 20px;
}
.section-label small { font-family: var(--font-ui); font-size: .85rem; letter-spacing: .2em; color: var(--muted-light); }

/* ---------- Home ---------- */
/* 画像はウィンドウに合わせて大きくなる。ただし「画像＋下の表紙カード」が
   1画面に収まる大きさを上限にする（画像の縦横比 1920:1373 ≒ 1.398） */
#page-home .section-label { margin-bottom: 12px; }
#page-home .volume-card { grid-template-columns: 96px 1fr; padding: 14px; }
#page-home .volume-card img { width: 96px; }
#page-home .copyright { padding-top: 18px; }
#page-home {
    --hero-w: max(440px, calc((100vh - 310px) * 1.398));
    width: min(100%, var(--hero-w));
    margin-inline: auto;
}
@media (max-width: 1024px) { #page-home { width: 100%; } }

.hero {
    position: relative; width: 100%;
    border: 1px solid var(--cyan-line);
    overflow: hidden;
    background: #222;
}
.hero img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.hero-half {
    position: absolute; top: 0; bottom: 0; width: 50%;
    display: flex; align-items: flex-end;
    text-decoration: none; color: #fff;
    transition: background .35s ease;
}
.hero-half.left { left: 0; justify-content: flex-start; }
.hero-half.left .hero-tag { left: 22px; }
.hero-half.right .hero-tag { right: 22px; }
.hero-half.right { right: 0; justify-content: flex-end; }
.hero-tag {
    /* 下段のタイトル文字（画像の下から約10〜17%）にかからないよう、高さ基準で上に置く */
    position: absolute; bottom: 21%;
    padding: 10px 18px;
    background: rgba(10, 16, 26, .7);
    border: 2px solid var(--cyan); border-radius: 12px;
    font-family: var(--font-display); color: var(--cyan);
    font-size: 1.15rem; letter-spacing: 2px; line-height: 1.25;
    box-shadow: 0 0 18px rgba(0,243,255,.25);
    opacity: .0; transform: translateY(8px);
    transition: all .35s ease;
}
.hero-tag small { display: block; font-family: var(--font-ui); font-size: .72rem; letter-spacing: .2em; color: var(--text); }
.hero:hover .hero-half:not(:hover) { background: rgba(20, 26, 38, .55); }
.hero-half:hover .hero-tag, .hero-half:focus-visible .hero-tag { opacity: 1; transform: none; }
/* PCとスマホで案内文を切り替え */
.hero-hint .hint-sp { display: none; }
.hero-hint {
    text-align: center; color: var(--muted-light); font-size: .85rem;
    margin: 10px 0 18px; letter-spacing: .1em;
}

.volume-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.volume-card {
    display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center;
    padding: 18px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    text-decoration: none; color: var(--text);
    transition: all .3s ease;
}
.volume-card:hover { border-color: var(--cyan); box-shadow: 0 10px 40px rgba(0,243,255,.25); transform: translateY(-4px); }
.volume-card img { width: 120px; aspect-ratio: 1512 / 2150; object-fit: cover; display: block; border: 1px solid var(--cyan-line); }
.volume-card .vc-title { font-family: var(--font-display); font-size: 1.6rem; color: var(--cyan); letter-spacing: 2px; line-height: 1.15; }
.volume-card .vc-sub { font-size: .85rem; color: var(--muted-light); margin: 6px 0 12px; }
.volume-card .vc-meta { font-size: .85rem; color: var(--text); }
.volume-card .vc-go { font-family: var(--font-display); color: var(--cyan); font-size: .85rem; letter-spacing: 2px; margin-top: 10px; }

/* ---------- 巻TOP ---------- */
.volume-head {
    display: grid; grid-template-columns: minmax(220px, 400px) 1fr; gap: 40px;
    align-items: start;
    max-width: 1200px; margin: 20px auto 56px;
}
.volume-cover img { display: block; width: 100%; border: 1px solid var(--cyan-line); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.volume-info h2 {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.05; letter-spacing: 2px;
    color: var(--cyan); text-shadow: 0 0 30px rgba(0,243,255,.4);
}
.volume-info .vol-sub { font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; margin-top: 14px; }
.volume-info .vol-en { font-family: var(--font-display); font-size: .78rem; letter-spacing: 1px; color: var(--muted-light); margin-top: 4px; }
.volume-info .vol-desc {
    /* 作品紹介：本文と同じ明朝体で、物語の一節のように */
    margin: 26px 0 0; max-width: 36em;
    font-family: var(--font-body);
    font-size: 1.02rem; line-height: 2.05; letter-spacing: .04em;
    color: var(--text);
    white-space: pre-line;
}
.volume-info .vol-note {
    /* 企画の説明：丸ゴシック・小さめ・シアンの線で区切り、紹介文と空気を変える */
    margin: 24px 0 28px; max-width: 36em;
    padding: 14px 18px;
    border-left: 3px solid var(--cyan);
    background: rgba(0, 243, 255, .07);
    border-radius: 0 8px 8px 0;
    font-family: var(--font-ui); font-weight: 500;
    font-size: .88rem; line-height: 1.9; letter-spacing: .03em;
    color: var(--muted-light);
    white-space: pre-line;
}
.vol-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--muted-light); margin-bottom: 28px; }
.vol-statline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 28px; }
.vol-statline .vol-stats { margin-bottom: 0; }
.share-vol { gap: 6px; }
.share-vol .share-btn { padding: 3px 11px; font-size: .74rem; }
.vol-stats b { color: var(--cyan); font-family: var(--font-display); font-weight: 400; margin-right: .3em; }
.volume-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.volume-actions .btn { min-width: 230px; }

.toc { max-width: 1200px; margin: 0 auto; }
.toc-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.toc-list li.wide { grid-column: 1 / -1; }
.toc-card {
    position: relative;
    display: grid; grid-template-columns: 6.2em 1fr auto; align-items: center; gap: 14px;
    padding: 16px 20px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    color: var(--text);
    transition: all .3s ease;
}
/* タイトルのリンクをカード全体に広げる */
.toc-item { color: inherit; text-decoration: none; }
.toc-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.toc-item:focus-visible { outline: none; }
.toc-card:has(.toc-item:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }
.toc-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
/* 持ち主リンク（キャラ名の位置）：カードのリンクより前面に */
.toc-owner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
/* リンク行の空白部分はカードのクリックを通す（ボタンの上だけリンク先へ） */
.toc-owner { pointer-events: none; }
.toc-owner .owner-link { pointer-events: auto; }
.owner-label { font-family: var(--font-display); font-size: .66rem; letter-spacing: 2px; color: var(--cyan); margin-right: 4px; }
.owner-link {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 11px; border: 1px solid rgba(0,243,255,.35); border-radius: 999px;
    color: var(--muted-light); text-decoration: none;
    font-family: var(--font-ui); font-size: .76rem; letter-spacing: .02em; line-height: 1.5;
    transition: all .25s ease;
}
.owner-link:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,243,255,.3); }
.owner-name { font-family: var(--font-ui); font-size: .8rem; letter-spacing: .06em; color: var(--muted-light); line-height: 1.5; padding: 3px 0; }
.chara-owner .owner-name { color: var(--paper-ink); font-size: .88rem; }
.owner-icon { width: 12px; height: 12px; flex: none; }
.owner-who { font-weight: 700; color: var(--text); margin-right: 2px; padding-right: 7px; border-right: 1px solid currentColor; line-height: 1; }
.chara-owner .owner-who { color: var(--paper-ink); }
/* 各話のキャラクター紹介の下（紙面の色に合わせる） */
.chara-owner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.chara-owner .owner-label { color: var(--paper-accent); margin: 0; }
.owner-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chara-owner .owner-link { color: var(--paper-ink); border-color: var(--paper-rule); background: rgba(255,255,255,.25); font-size: .8rem; padding: 4px 13px; }
.chara-owner .owner-link:hover { color: var(--paper-accent); border-color: var(--paper-accent); box-shadow: none; }
body.paper-dark .chara-owner .owner-link { background: rgba(0,0,0,.2); }
.toc-card:hover { border-color: var(--cyan); background: rgba(0,243,255,.12); box-shadow: 0 0 24px rgba(0,243,255,.25); }
.toc-no { font-family: var(--font-display); color: var(--cyan); font-size: .85rem; letter-spacing: 1px; white-space: nowrap; }
.toc-title { font-weight: 700; font-size: 1.1rem; letter-spacing: .06em; }
.toc-title small { font-weight: 500; font-size: .75rem; color: var(--muted-light); margin-left: .5em; letter-spacing: .05em; }
.toc-credit:empty { display: none; }
.toc-credit { font-size: .78rem; color: var(--muted-light); text-align: right; white-space: nowrap; }
/* リンクのある話：1段目にタイトルと作者名、2段目にリンク（作者名の列まで使う） */
.toc-card.has-owner { row-gap: 6px; }
.toc-card.has-owner .toc-no { grid-row: 1 / 3; }
.toc-card.has-owner .toc-main { grid-row: 1; }
.toc-card.has-owner .toc-credit { grid-row: 1; }
.toc-card.has-owner .toc-owner { grid-column: 2 / -1; grid-row: 2; }
/* 目次では、キャラ名付きのボタンはアイコンを省いて幅を詰める */
.toc-owner .owner-link { padding: 3px 9px; font-size: .72rem; gap: 4px; }
.toc-owner .owner-who { padding-right: 5px; margin-right: 1px; }
.toc-owner .owner-who + .owner-icon { display: none; }

/* ---------- 本文ページ ---------- */
.reader { max-width: 980px; margin: 0 auto; }

.crumbs { font-size: .85rem; color: var(--muted-light); margin-bottom: 14px; letter-spacing: .05em; }
.crumbs a { color: var(--cyan); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.chapter-tabs {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5em, 1fr)); gap: 8px;
    list-style: none; margin-bottom: 20px;
}
.chapter-tabs a {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 44px; height: 100%; padding: 6px 10px;
    border: 2px solid var(--cyan); border-radius: 10px;
    background: rgba(10,16,26,.25);
    color: var(--cyan); text-decoration: none;
    font-weight: 700; font-size: .92rem; letter-spacing: .06em; line-height: 1.3;
    transition: all .25s ease;
}
.chapter-tabs a:hover { background: rgba(0,243,255,.18); box-shadow: 0 0 16px rgba(0,243,255,.3); }
.chapter-tabs a[aria-current="page"] { background: var(--cyan); color: #0f1826; box-shadow: 0 0 22px rgba(0,243,255,.5); }
.chapter-tabs small { display: block; font-size: .68rem; font-weight: 500; letter-spacing: 0; }

.paper {
    background: var(--paper); color: var(--paper-ink);
    border-top: 5px solid var(--cyan);
    box-shadow: 0 16px 50px rgba(0,0,0,.3);
    padding: 36px 48px 44px;
    transition: background .3s ease, color .3s ease;
}

.story-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 26px; }
.story-kicker { font-family: var(--font-display); font-size: .78rem; letter-spacing: 2px; color: var(--paper-accent); }
.story-title { font-family: var(--font-ui); font-weight: 700; font-size: 1.9rem; letter-spacing: .08em; line-height: 1.35; margin-top: 4px; text-wrap: balance; }
.story-title small { font-size: .55em; font-weight: 500; letter-spacing: .05em; color: var(--paper-sub); margin-left: .4em; }
.story-credit { font-size: .85rem; color: var(--paper-sub); margin-top: 6px; }
/* 著者名の行（左：著者名／右端：シェア）。PCでは見出しと読書設定の下に1行で */
.story-titles { order: 1; }
.story-head .reading-tools { order: 2; }
.story-byline { order: 3; flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: -12px 0 -5px; }
.story-byline .story-credit { margin-top: 0; }
@media (max-width: 768px) {
    .story-byline { order: 2; }
    .story-head .reading-tools { order: 3; }
}

.reading-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .78rem; color: var(--paper-sub); }
.tool-group { display: inline-flex; border: 1px solid var(--paper-rule); border-radius: 8px; overflow: hidden; }
.tool-group button {
    background: transparent; border: 0; color: var(--paper-ink);
    font-family: var(--font-ui); font-size: .8rem; padding: 6px 11px; cursor: pointer;
}
.tool-group button + button { border-left: 1px solid var(--paper-rule); }
.tool-group button[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); }

.storyline {
    text-align: center; font-weight: 700; letter-spacing: .08em; font-size: 1rem;
    padding-top: 14px; border-top: 1px dashed var(--paper-rule);
}
.storyline a { color: var(--paper-accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.storyline a:hover { opacity: .75; }

/* キャラクター紹介 */
.characters {
    display: grid; grid-template-columns: clamp(260px, 40%, 380px) fit-content(540px); gap: 40px; align-items: center;
    justify-content: center; /* 画像と紹介文を中央に寄せる */
    padding-bottom: 30px; margin-bottom: 34px;
    border-bottom: 1px solid var(--paper-rule);
}
.chara-image {
    aspect-ratio: 5 / 7; width: 100%;
    background: repeating-linear-gradient(45deg, rgba(27,33,48,.06) 0 10px, rgba(27,33,48,.1) 10px 20px);
    border: 1px solid var(--paper-rule);
    display: flex; align-items: center; justify-content: center;
    color: var(--paper-sub); font-family: var(--font-display); font-size: .8rem; letter-spacing: 1px;
    overflow: hidden;
}
/* 画像がある時は縞模様を出さず、読み込み後にふわっと表示 */
.chara-image.has-img { background: rgba(27,33,48,.08); }
/* キャラクター画像：クリックで拡大 */
button.chara-image { padding: 0; font: inherit; cursor: zoom-in; position: relative; transition: box-shadow .25s ease, border-color .25s ease; }
button.chara-image:hover { border-color: var(--paper-accent); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.zoom-hint {
    position: absolute; right: 8px; bottom: 8px;
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(10,16,26,.7); color: var(--cyan); border: 1px solid var(--cyan);
    font-size: 1rem; line-height: 1; opacity: .8; transition: opacity .25s ease;
}
button.chara-image:hover .zoom-hint { opacity: 1; }
.chara-image img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.chara-image img.loaded { opacity: 1; }
/* 話を切り替えた時の紙面の入れ替え */
.paper.swap-in { animation: paperIn .22s ease-out; }
@keyframes paperIn { from { opacity: .35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .paper.swap-in { animation: none; } .chara-image img { transition: none; } }
.chara-list { min-width: 0; }
.chara-text {
    overflow-wrap: anywhere; letter-spacing: .04em;
    /* 本文と同じ明朝体（Noto Serif JP）で表示 */
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    color: var(--paper-ink);
    opacity: .85;
}
/* 1行ずつ扱い、折り返す時は左右均等に（1〜2文字だけ次の行に落ちるのを防ぐ） */
.chara-text .line { display: block; text-wrap: balance; }
.storyline { text-wrap: balance; }
.chara-list { display: grid; gap: 26px; }
.chara { text-align: center; }
.chara-name { font-weight: 700; font-size: 2.2rem; letter-spacing: .25em; line-height: 1.2; }
.chara-profile { font-weight: 700; font-size: 1.05rem; letter-spacing: .12em; margin: 4px 0 8px; }
.chara-text { line-height: 1.8; white-space: pre-line; }
.characters.duo .chara-name { font-size: 1.9rem; }
.characters.trio .chara-list { gap: 18px; }
.characters.trio .chara-name { font-size: 1.6rem; }
.characters.trio .chara-text { font-size: .92rem; line-height: 1.7; }
.characters.no-image { grid-template-columns: 1fr; }

/* 本文 */
.story-body {
    font-family: var(--font-body);
    font-size: var(--read-size);
    line-height: 2;
    max-width: 38em;
    margin: 0 auto;
    letter-spacing: .03em;
    font-feature-settings: "palt" 0;
    overflow-wrap: anywhere;
    line-break: strict;
}
.story-body p { margin: 0; }
/* ---------- English（Translated by Claude） ---------- */
.lang-en .story-body { font-family: "Noto Serif", "Noto Serif JP", Georgia, serif; overflow-wrap: break-word; letter-spacing: .005em; line-height: 1.85; hyphens: auto; -webkit-hyphens: auto; }
.lang-en .story-body p { text-indent: 1.6em; }
.lang-en .story-body .scene-break, .lang-en .story-body .continues { text-indent: 0; }
.lang-en .story-title, .lang-en .chara-name { letter-spacing: .02em; }
.lang-en .chara-text, .lang-en .chara-profile { letter-spacing: 0; font-family: "Noto Serif", "Noto Serif JP", Georgia, serif; }
.credit-tr { margin-left: .7em; font-size: .92em; }
.lang-group button { padding-inline: 10px; }
/* 巻TOPの言語切り替え（暗い背景用） */
.vol-lang { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.vol-lang .tool-group { border-color: var(--cyan-line); }
.vol-lang .tool-group button { background: transparent; color: var(--muted-light); font-size: .76rem; padding: 4px 12px; }
.vol-lang .tool-group button + button { border-left-color: var(--cyan-line); }
.vol-lang .tool-group button[aria-pressed="true"] { background: var(--cyan); color: #0f1826; }
.vol-desc[lang="en"], .vol-note[lang="en"] { letter-spacing: .01em; }
.vol-tr { font-size: .78rem; color: var(--muted-light); margin: -14px 0 18px; letter-spacing: .04em; }
.story-body .gap { height: 1em; }
.story-body .gap-lg { height: 3em; }
.story-body .center { text-align: center; }
.story-body .right { text-align: right; }
.story-body .scene-break {
    text-align: center; color: var(--paper-accent);
    letter-spacing: 1.5em; padding-left: 1.5em;
    margin: 2.4em 0;
}
.story-body .continues { text-align: right; margin-top: 3em; font-family: var(--font-ui); font-weight: 700; letter-spacing: .08em; }
.story-body .continues a { color: var(--paper-accent); text-decoration: none; border-bottom: 1px solid currentColor; }
.story-body .continues a:hover { opacity: .75; }

.story-end {
    text-align: center; font-family: var(--font-display); letter-spacing: 4px;
    color: var(--paper-sub); font-size: .8rem; margin: 3em 0 0;
}

.pager {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch;
    margin-top: 26px;
}
.pager .btn { font-family: var(--font-ui); font-weight: 700; letter-spacing: .06em; font-size: .95rem; padding: 12px 18px; }
.pager .prev { justify-content: flex-start; }
.pager .next { justify-content: flex-end; }
.pager .btn .dir { font-family: var(--font-display); font-weight: 400; font-size: .72rem; letter-spacing: 1px; display: block; opacity: .8; }
.pager .placeholder { visibility: hidden; }

.to-top {
    position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    width: 52px; height: 52px; border-radius: 50%;
    border: 2px solid var(--cyan); background: rgba(10,16,26,.8); color: var(--cyan);
    font-family: var(--font-display); font-size: .7rem; letter-spacing: 1px;
    cursor: pointer; z-index: 900;
    box-shadow: 0 0 20px rgba(0,243,255,.3);
    opacity: 0; pointer-events: none; transform: translateY(10px);
    transition: all .3s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: rgba(0,243,255,.2); }

/* ---------- 情報パネル（Wallpaper / Air Ske-b / Contact） ---------- */
.info-section {
    max-width: 800px; margin: 40px auto; padding: 40px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    line-height: 1.9;
}
.info-section h2 { font-family: var(--font-display); font-weight: 400; color: var(--cyan); margin-bottom: 16px; font-size: 1.8rem; letter-spacing: 2px; }
.info-section p { color: var(--muted-light); }

.contact-form { max-width: 900px; margin: 20px auto; padding: 50px; background: rgba(0,243,255,.05); border: 1px solid var(--cyan-line); border-radius: 10px; }
.contact-form h2 { font-family: var(--font-display); font-weight: 400; color: var(--cyan); text-align: center; margin-bottom: 30px; letter-spacing: 2px; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--cyan); letter-spacing: 1px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px;
    background: rgba(0,0,0,.5); border: 1px solid var(--cyan-line);
    color: #fff; font-size: 1rem; font-family: var(--font-ui);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 10px rgba(0,243,255,.3); }
.form-group textarea { min-height: 150px; resize: vertical; }
.submit-button { width: 100%; border-radius: 0; }

/* ---------- Staff（奥付風） ---------- */
.staff {
    max-width: 560px; margin: 24px auto 0;
    padding: 48px 32px 40px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 34px;
}
.staff-studio {
    font-family: var(--font-display); font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: 2px; color: var(--cyan);
    text-shadow: 0 0 24px rgba(0,243,255,.35);
}
.staff-role h3 {
    font-family: var(--font-display); font-weight: 400;
    font-size: .8rem; letter-spacing: 3px; color: var(--cyan);
    margin-bottom: 12px;
}
.staff-role ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.staff-role li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.staff-name { font-family: var(--font-body); font-weight: 600; font-size: 1.5rem; letter-spacing: .08em; color: var(--text); line-height: 1.3; }
.staff-x {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 12px; border: 1px solid rgba(0,243,255,.35); border-radius: 999px;
    color: var(--muted-light); text-decoration: none;
    font-family: var(--font-ui); font-size: .78rem; letter-spacing: .03em;
    transition: all .25s ease;
}
.staff-x:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px rgba(0,243,255,.3); }
.staff-org { font-size: .62em; font-weight: 400; letter-spacing: .04em; color: var(--muted-light); }
.staff-x-icon { width: 12px; height: 12px; flex: none; }
.staff-logo { margin-top: 6px; width: 76px; height: 76px; border: 3px solid var(--cyan); border-radius: 8px; background: rgba(0,243,255,.1); box-shadow: 0 0 16px rgba(0,243,255,.25); overflow: hidden; }
.staff-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- シェアボタン ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.share-label { font-family: var(--font-display); font-size: .7rem; letter-spacing: 2px; color: var(--cyan); margin-right: 4px; }
.share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border: 1px solid rgba(0,243,255,.4); border-radius: 999px;
    background: rgba(0,243,255,.06); color: var(--text);
    font-family: var(--font-ui); font-size: .78rem; letter-spacing: .04em; line-height: 1.5;
    text-decoration: none; cursor: pointer; transition: all .25s ease;
}
.share-btn:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,243,255,.3); }
.share-btn.done { color: #0f1826; background: var(--cyan); border-color: var(--cyan); }
.share-icon { width: 13px; height: 13px; flex: none; }
/* 各話：紙面の END の下（紙の色に合わせる） */
.share-story { margin: 0 0 0 auto; justify-content: flex-end; gap: 6px; }
.share-story .share-btn { padding: 3px 11px; font-size: .74rem; }
.share-story .share-label { color: var(--paper-accent); }
.share-story .share-btn { color: var(--paper-ink); border-color: var(--paper-rule); background: rgba(255,255,255,.25); }
.share-story .share-btn:hover { color: var(--paper-accent); border-color: var(--paper-accent); box-shadow: none; }
.share-story .share-btn.done { color: #fff; background: var(--paper-accent); border-color: var(--paper-accent); }
body.paper-dark .share-story .share-btn { background: rgba(0,0,0,.2); }
/* ギャラリー：タイトル行の右端 */
.share-gal { gap: 6px; margin-left: 10px; }
.share-gal .share-label { display: none; }
.share-gal .share-btn { padding: 4px 11px; font-size: .72rem; }

/* ---------- 読み切りの一枚絵 ---------- */
.story-art { margin: 0 0 26px; display: flex; justify-content: center; }
.art-zoom {
    position: relative; display: block; padding: 0; cursor: zoom-in;
    width: auto; max-width: min(100%, 620px); background: none;
    border: 1px solid var(--paper-rule); line-height: 0;
    -webkit-touch-callout: none; user-select: none;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.art-zoom img { width: auto; max-width: 100%; max-height: 62vh; display: block; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.art-zoom img.loaded { opacity: 1; }
.art-zoom:hover { border-color: var(--paper-accent); box-shadow: 0 0 22px rgba(0,0,0,.18); }
.pager.one { grid-template-columns: 1fr; justify-items: center; }
.pager.one .toc-link { min-width: 260px; }

/* ---------- Job Fan-art（準備中） ---------- */
#page-jobfanart .soon { text-align: center; margin: 34px 0 10px; }
#page-jobfanart .soon-main {
    font-family: var(--font-ui); font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: .3em; text-indent: .3em;
    color: var(--cyan); line-height: 1.2; text-shadow: 0 0 24px rgba(0,243,255,.45);
}
#page-jobfanart .soon-sub { margin-top: 10px; font-family: var(--font-display); font-size: clamp(.8rem, 1.6vw, 1rem); letter-spacing: 3px; color: var(--muted-light); }

/* ---------- Site Administrator（About） ---------- */
.staff-about { font-family: var(--font-display); font-size: .72rem; letter-spacing: 1px; }
.about {
    max-width: 640px; margin: 24px auto 0;
    padding: 46px 36px 40px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.about-role { font-family: var(--font-display); font-size: .78rem; letter-spacing: 3px; color: var(--cyan); }
.about-name {
    font-family: var(--font-body); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: .08em; color: var(--text); text-align: center; line-height: 1.3; margin-top: -10px;
}
.about-name small { display: block; font-size: .46em; font-family: var(--font-ui); font-weight: 500; color: var(--muted-light); letter-spacing: .1em; margin-top: 6px; }
.about-icon {
    width: 132px; height: 132px; margin-top: -4px;
    border: 2px solid var(--cyan); border-radius: 50%; overflow: hidden;
    box-shadow: 0 0 20px rgba(0,243,255,.28);
    -webkit-touch-callout: none; user-select: none;
}
.about-icon img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.about-bio { display: flex; flex-direction: column; gap: 10px; color: var(--text); font-size: .95rem; line-height: 1.95; letter-spacing: .02em; }
.about-car { font-size: .9rem; color: var(--muted-light); letter-spacing: .04em; }
.about-label { font-family: var(--font-display); font-size: .68rem; letter-spacing: 2px; color: var(--cyan); margin-right: .9em; }
.about-secret { font-size: .88rem; color: var(--muted-light); letter-spacing: .06em; }
.about-works { width: 100%; }
.about-works h3 {
    font-family: var(--font-ui); font-weight: 700; font-size: .95rem; letter-spacing: .12em; color: var(--cyan);
    padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px dashed rgba(0,243,255,.3);
}
.about-works ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.about-works li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; }
.work-title { font-size: .92rem; color: var(--text); line-height: 1.7; }
.work-title small { display: block; font-size: .86em; color: var(--muted-light); margin-top: 2px; }
.work-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.work-links a {
    display: inline-flex; align-items: center;
    padding: 2px 11px; border: 1px solid rgba(0,243,255,.35); border-radius: 999px;
    color: var(--muted-light); text-decoration: none;
    font-family: var(--font-ui); font-size: .72rem; letter-spacing: .04em; line-height: 1.6;
    transition: all .25s ease;
}
.work-links-note { align-self: center; font-size: .66rem; color: var(--muted-light); opacity: .6; letter-spacing: .02em; line-height: 1.5; }
.work-links a:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(0,243,255,.3); }
.work-role { font-size: .8rem; color: var(--cyan); letter-spacing: .06em; white-space: nowrap; }
@media (max-width: 640px) {
    .about { padding: 30px 18px 28px; gap: 18px; }
    .about-works li { flex-direction: column; }
    .work-role { align-self: flex-start; }
}

/* ---------- 壁紙 ---------- */
.wp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 8px; }
.wp-head .section-label { margin: 0; }
.wp-switch { display: inline-flex; border: 2px solid var(--cyan); border-radius: 15px; overflow: hidden; background: rgba(10,16,26,.25); }
.wp-switch button {
    background: transparent; border: 0; color: var(--cyan); cursor: pointer;
    font-family: var(--font-ui); font-weight: 700; font-size: .95rem; letter-spacing: .08em;
    padding: 9px 22px; line-height: 1.25; transition: background .25s ease;
}
.wp-switch button small { display: block; font-family: var(--font-display); font-weight: 400; font-size: .66rem; letter-spacing: 1px; opacity: .8; }
.wp-switch button + button { border-left: 2px solid var(--cyan); }
.wp-switch button:hover { background: rgba(0,243,255,.15); }
.wp-switch button[aria-pressed="true"] { background: var(--cyan); color: #0f1826; }
.wp-note { color: var(--muted-light); font-size: .88rem; margin: 10px 0 24px; }
.wp-hint { color: var(--muted-light); font-size: .88rem; margin: -10px 0 22px; }
.wp-link { background: none; border: 0; color: var(--cyan); font: inherit; cursor: pointer; margin-left: .6em; text-decoration: underline; }

.wp-grid { display: grid; gap: 22px; }
/* PCでは3列固定（タブレット2列・スマホ1列） */
.wp-grid.pc, .wp-grid.sp { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .wp-grid.pc, .wp-grid.sp { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .wp-grid.pc, .wp-grid.sp { grid-template-columns: 1fr; } }
.wp-card {
    padding: 18px 18px 20px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
}
.wp-feature-note { align-self: center; color: var(--muted-light); font-size: .85rem; line-height: 1.8; }
.wp-name { font-family: var(--font-display); font-weight: 400; color: var(--cyan); font-size: 1.05rem; letter-spacing: 2px; margin-bottom: 14px; }
.wp-name small { display: block; font-family: var(--font-ui); font-size: .72rem; letter-spacing: .1em; color: var(--muted-light); margin-top: 2px; }
.wp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wp-tiles.one { grid-template-columns: 1fr; }
.wp-tile { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wp-thumb {
    display: block; width: 100%; padding: 0; cursor: zoom-in;
    border: 1px solid var(--cyan-line); background: rgba(0,0,0,.25);
    overflow: hidden; transition: border-color .25s ease, box-shadow .25s ease;
}
.wp-thumb.pc { aspect-ratio: 16 / 9; }
.wp-thumb.sp { aspect-ratio: 9 / 16; }
.wp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; pointer-events: none; }
.wp-thumb:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(0,243,255,.3); }
.wp-thumb:hover img { transform: scale(1.04); }
.wp-tile figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.wp-grid .wp-card { padding: 14px 14px 16px; }
.wp-grid .wp-tiles { gap: 10px; }
.wp-grid .wp-meta { font-size: .62rem; }
.wp-label { font-weight: 700; font-size: .92rem; letter-spacing: .08em; }
.wp-meta { font-family: var(--font-display); font-size: .68rem; letter-spacing: .5px; color: var(--muted-light); }
.wp-dl { width: 100%; padding: 8px 12px; font-size: .82rem; letter-spacing: 2px; border-radius: 10px; }

/* ---------- Air Ske-b ---------- */
.skeb { margin: 0 auto; }
/* 画像は枠（パネル）の中に。最大1920pxまで広がる */
.skeb-kv {
    max-width: 1920px; margin: 0 auto;
    padding: clamp(14px, 3%, 58px) clamp(14px, 3%, 58px) clamp(14px, 2.6%, 50px);
    border: 1px solid var(--cyan-line); background: rgba(0,243,255,.04);
    line-height: 0; -webkit-touch-callout: none; user-select: none;
}
.skeb-kv img { width: 100%; height: auto; display: block; pointer-events: none; }
.skeb-body { max-width: 960px; margin: 0 auto; text-align: center; padding: 44px 16px 8px; display: flex; flex-direction: column; align-items: center; }
.skeb-title {
    font-family: var(--font-ui); font-weight: 700;
    font-size: clamp(1.25rem, 2.9vw, 2rem); letter-spacing: .06em;
    line-height: 1.5; color: var(--text); margin: 0 0 22px;
    text-shadow: 0 0 18px rgba(0,243,255,.28);
}
#page-airskeb .i18n-en .skeb-title { letter-spacing: .01em; }
.skeb-text { font-family: var(--font-ui); font-weight: 500; font-size: clamp(.95rem, 1.5vw, 1.1rem); letter-spacing: .05em; line-height: 1.85; color: var(--text); }
.skeb-date { font-family: var(--font-ui); font-weight: 500; font-size: clamp(.9rem, 1.4vw, 1.05rem); letter-spacing: .03em; color: var(--cyan); margin-top: 14px; }
.skeb-date .nw { display: inline-block; }
/* 日本語／English の切り替え */
.skeb-lang { align-self: flex-end; margin: -16px 0 18px; }
.skeb-lang .tool-group { border-color: var(--cyan-line); }
.skeb-lang .tool-group button { background: transparent; color: var(--muted-light); font-size: .76rem; padding: 4px 12px; }
.skeb-lang .tool-group button + button { border-left-color: var(--cyan-line); }
.skeb-lang .tool-group button[aria-pressed="true"] { background: var(--cyan); color: #0f1826; }
#page-airskeb .i18n-en { display: none; }
#page-airskeb.is-en .i18n-en { display: block; }
#page-airskeb.is-en .i18n-ja { display: none; }
#page-airskeb .i18n-en .skeb-text { letter-spacing: .01em; }
.skeb-note { font-size: .78rem; letter-spacing: .04em; color: var(--muted-light); opacity: .85; margin-top: 10px; }
.skeb-entry {
    flex-direction: column; gap: 4px;
    margin-top: 40px; min-width: 300px; padding: 18px 40px;
    border-radius: 10px; line-height: 1.2;
}
.skeb-entry-main { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 3px; }
.skeb-entry-sub { font-family: var(--font-display); font-size: .78rem; letter-spacing: 2px; opacity: .9; }
@media (max-width: 640px) {
    .skeb-body { padding: 28px 2px 4px; }
    .skeb-title { font-size: 1.2rem; margin-bottom: 18px; }
    .skeb-text br { display: none; }
    .skeb-text { font-size: .9rem; text-align: left; }
    .skeb-date { font-size: .85rem; }
    .skeb-note { font-size: .74rem; }
    .skeb-entry { min-width: 0; width: 100%; margin-top: 28px; }
}

/* ---------- Illust Gallery ---------- */
.gal-note { color: var(--muted-light); font-size: .88rem; line-height: 1.8; margin: 10px 0 22px; }
.gal-warn { font-size: .78rem; opacity: .85; }
.gal-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.gal-jump-btn {
    display: inline-flex; align-items: baseline; gap: 10px;
    padding: 8px 18px; border: 1px solid var(--cyan-line); border-radius: 999px;
    background: rgba(0,243,255,.05); color: var(--text); cursor: pointer;
    font-family: var(--font-display); font-size: .85rem; letter-spacing: 1px;
    transition: all .25s ease;
}
.gal-jump-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 16px rgba(0,243,255,.25); }
.gal-jump-year { color: var(--cyan); font-size: .75rem; }
.gal-book {
    padding: 22px 22px 24px; margin-bottom: 28px;
    background: rgba(0,243,255,.05);
    border: 1px solid var(--cyan-line); border-radius: 10px;
    scroll-margin-top: 16px;
}
.gal-book-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px dashed rgba(0,243,255,.25); }
.gal-year { font-family: var(--font-display); color: var(--cyan); font-size: 1rem; letter-spacing: 2px; }
.gal-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.25rem, 2.4vw, 1.7rem); letter-spacing: 2px; color: var(--text); text-shadow: 0 0 18px rgba(0,243,255,.25); }
.gal-dl { margin-left: 2px; padding: 8px 20px; border-radius: 10px; font-family: var(--font-display); font-size: .8rem; letter-spacing: 2px; line-height: 1.25; text-align: center; }
.gal-dl small { display: block; font-family: var(--font-ui); font-size: .68rem; letter-spacing: .06em; opacity: .85; margin-top: 2px; }
.gal-count { margin-left: auto; font-family: var(--font-display); font-size: .72rem; letter-spacing: 1px; color: var(--muted-light); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-flow: dense; gap: 8px; }
.gal-thumb {
    position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; cursor: zoom-in;
    border: 1px solid var(--cyan-line); background: rgba(0,0,0,.25); overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
    -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
/* 表紙は大きく（2×2マス） */
.gal-thumb.is-cover { grid-column: span 2; grid-row: span 2; border-color: rgba(0,243,255,.6); background: rgba(6,10,18,.55); }
.gal-thumb.is-cover img { object-fit: contain; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: transform .35s ease; }
.gal-thumb:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(0,243,255,.35); z-index: 1; }
.gal-thumb:hover img { transform: scale(1.06); }
.gal-cover-tag {
    position: absolute; left: 8px; top: 8px;
    padding: 2px 8px; border-radius: 4px;
    background: rgba(10,16,26,.75); border: 1px solid var(--cyan);
    font-family: var(--font-display); font-size: .62rem; letter-spacing: 2px; color: var(--cyan);
    pointer-events: none;
}
@media (max-width: 640px) {
    .gal-book { padding: 16px 12px 18px; }
    .gal-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
    .gal-dl { margin-left: 0; padding: 7px 14px; font-size: .72rem; }
    .share-gal { margin-left: 0; width: 100%; justify-content: flex-start; }
    #page-gallery .section-label { flex-wrap: wrap; gap: 4px .8em; }
    #page-gallery .section-label small { width: 100%; }
}

.lightbox {
    position: fixed; inset: 0; z-index: 20000;
    background: rgba(6, 10, 18, .92);
    display: flex; align-items: center; justify-content: center;
    padding: calc(56px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
}
.lightbox[hidden] { display: none; }
.lb-body { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lb-frame { position: relative; line-height: 0; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
/* 画像の上に透明な膜をかぶせて、右クリック・長押しで画像を取れないようにする */
.lb-shield { position: absolute; inset: 0; }
.lb-body img { pointer-events: none; -webkit-user-drag: none; display: block; max-width: min(92vw, 1600px); max-height: calc(100vh - 170px); object-fit: contain; border: 2px solid var(--cyan); box-shadow: 0 0 50px rgba(0,243,255,.3); user-select: none; }
.lb-body figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; color: var(--text); font-family: var(--font-display); letter-spacing: 1px; font-size: .9rem; }
.lb-dl { padding: 9px 26px; font-size: .9rem; }
.lb-dl[hidden] { display: none; }
.lb-close {
    position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px;
    width: 46px; height: 46px; border-radius: 50%;
    border: 2px solid var(--cyan); background: rgba(0,0,0,.6); color: var(--cyan);
    font-size: 1.6rem; line-height: 1; cursor: pointer; transition: all .3s ease;
}
.lb-close:hover { background: rgba(0,243,255,.2); transform: rotate(90deg); }
.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 50px; height: 50px; border-radius: 50%;
    border: 2px solid var(--cyan); background: rgba(0,0,0,.55); color: var(--cyan);
    font-size: 1.2rem; line-height: 1; cursor: pointer; transition: all .25s ease;
}
.lb-nav[hidden] { display: none; }
.lb-nav:hover { background: rgba(0,243,255,.2); box-shadow: 0 0 18px rgba(0,243,255,.4); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lightbox.is-gallery .lb-body img { max-width: min(84vw, 1600px); }
.lightbox.is-gallery figcaption { white-space: pre; font-size: .82rem; }
@media (max-width: 640px) {
    .lb-nav { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: none; width: 44px; height: 44px; }
    .lightbox.is-gallery .lb-body img { max-width: 92vw; max-height: calc(100vh - 200px); }
    .lightbox.is-gallery figcaption { white-space: normal; font-size: .75rem; }
}

/* =========================================================
   タブレット・スマホ
   ========================================================= */
@media (max-width: 1024px) {
    header.sidebar {
        position: relative; width: 100%; height: auto;
        padding: 20px 16px 22px;
        border-right: none; border-bottom: 1px solid rgba(0,243,255,.2);
        display: block;
    }
    .brand { display: flex; align-items: center; gap: 16px; }
    .logo { width: 72px; height: 72px; margin: 0; border-width: 4px; flex: none; }
    .brand h1 { font-size: 1.8rem; }
    .brand .subtitle { font-size: 1rem; margin: 0; }
    .social-links { flex-direction: row; justify-content: center; gap: 12px; margin: 18px 0; }
    .social-link { padding: 10px; }
    .social-link span { display: none; }
    nav.site-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .nav-button { padding: 11px 10px; font-size: .85rem; letter-spacing: 1px; border-radius: 12px; }
    .nav-button[data-page="home"] { grid-column: 1 / -1; }
    /* 長い日本語のメニューは1行分使う（Contactも揃えて全幅に） */
    .nav-button.jp, .nav-button[data-page="contact"] { grid-column: 1 / -1; }
    .nav-mini { grid-column: 1 / -1; justify-self: center; margin-top: 2px; }
    .access-counter { margin-top: 14px; }

    .container { margin-left: 0; padding: 24px 16px; }
    .volume-head { grid-template-columns: minmax(0, 300px) 1fr; gap: 28px; }
}

@media (max-width: 768px) {
    .volume-cards { grid-template-columns: 1fr; }
    .volume-card { grid-template-columns: 96px 1fr; }
    .volume-card img { width: 96px; }
    /* スマホではイラスト上のラベルを出さない（文字に重なるため）。下の表紙カードから移動 */
    .hero-tag { display: none; }
    .hero-hint .hint-pc { display: none; }
    .hero-hint .hint-sp { display: inline; }
    .hero-hint { font-size: .78rem; }

    .volume-head { grid-template-columns: 1fr; gap: 24px; margin-top: 4px; }
    .volume-cover { max-width: 320px; margin: 0 auto; width: 100%; }
    .volume-actions .btn { flex: 1 1 100%; min-width: 0; }

    .toc-list { grid-template-columns: 1fr; }
    .toc-card { grid-template-columns: 5.6em 1fr; padding: 14px 16px; }
    .toc-credit { grid-column: 2; text-align: left; }
    .toc-card.has-owner .toc-no { grid-row: 1 / 4; }
    .toc-card.has-owner .toc-owner { grid-column: 2; grid-row: 2; }
    .toc-card.has-owner .toc-credit { grid-row: 3; }

    /* スマホでは各話タブを横スクロール1列に */
    .chapter-tabs {
        display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity;
        margin: 0 -16px 16px; padding: 2px 16px 8px;
        scrollbar-width: thin;
    }
    .chapter-tabs li { flex: none; scroll-snap-align: start; }
    .chapter-tabs a { font-size: .82rem; min-height: 42px; border-radius: 8px; white-space: nowrap; padding: 6px 14px; }

    .paper { padding: 24px 18px 30px; margin: 0 -16px; border-top-width: 4px; }
    .story-title { font-size: 1.45rem; }
    .characters { grid-template-columns: 1fr; gap: 20px; }
    .chara-image { max-width: 320px; margin: 0 auto; }
    .chara-name, .characters.duo .chara-name, .characters.trio .chara-name { font-size: 1.6rem; }
    .chara-profile { font-size: .9rem; }
    .chara-text, .characters.trio .chara-text { font-size: .92rem; }
    .story-body { line-height: 1.95; }

    .pager { grid-template-columns: 1fr 1fr; }
    .pager .toc-link { grid-column: 1 / -1; order: 3; }
    .pager .btn { font-size: .85rem; padding: 10px 12px; }

    .info-section, .contact-form { padding: 24px 18px; margin: 10px 0; }
    .staff { padding: 36px 18px 32px; gap: 28px; margin-top: 8px; }
    .staff-name { font-size: 1.3rem; }
    .wp-card { padding: 14px 12px 16px; }
    .wp-tiles { gap: 10px; }
    .wp-switch button { padding: 8px 16px; font-size: .88rem; }
    .to-top { width: 46px; height: 46px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
