/* ==========================================================================
   昼雨暗夜 · Worldbuilding
   Structure: archive / station-heading / ticket cards / long-form reading
   Palette: rain-soaked ink blue, paper white, a trace of old gold
   ========================================================================== */

/* ---------- 1. tokens ---------- */
:root {
    --ink-0: #080b0f;
    --ink-1: #0c1117;
    --ink-2: #111821;
    --ink-3: #18222d;
    --paper: #eef3f8;
    --text: #c8d2dd;
    --text-dim: #94a3b3;
    --text-faint: #748496;
    --accent: #8fb9dc;
    --accent-strong: #b8d8f2;
    --gold: #c8a96b;
    --line: rgba(157, 183, 207, 0.14);
    --line-2: rgba(157, 183, 207, 0.28);
    --card: rgba(14, 20, 27, 0.72);
    --card-2: rgba(20, 28, 38, 0.86);

    --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, serif;
    --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    --latin: "Cormorant Garamond", Georgia, "Times New Roman", serif;

    --wrap: 1180px;
    --read: 760px;
    --header-h: 72px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2. reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-width: thin;
    scrollbar-color: #26313d #080b0f;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #080b0f;
}

::-webkit-scrollbar-thumb {
    background: #26313d;
    border: 2px solid #080b0f;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #35465a;
}

body {
    min-height: 100vh;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    background-color: var(--ink-0);
    overflow-x: hidden;
}

body.nav-open,
body.preview-open {
    overflow: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
    color: var(--accent-strong);
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

::selection {
    color: var(--ink-0);
    background: var(--accent-strong);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* ---------- 3. atmosphere ---------- */
body::before {
    content: "";
    position: fixed;
    inset: -24px;
    z-index: -2;
    background-image:
        linear-gradient(180deg, rgba(8, 11, 15, 0.84) 0%, rgba(8, 11, 15, 0.9) 60%, rgba(8, 11, 15, 0.97) 100%),
        radial-gradient(ellipse at 18% 0%, rgba(60, 100, 135, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 100%, rgba(35, 55, 75, 0.32) 0%, transparent 55%),
        url("../images/rain-flower-field.webp");
    background-size: cover;
    background-position: center;
    filter: blur(13px) saturate(0.55) brightness(0.5);
    transform: scale(1.05);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(143, 185, 220, 0.05) 0 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, rgba(143, 185, 220, 0.04) 0 1px, transparent 1px);
    background-size: 7px 7px, 11px 11px;
    mix-blend-mode: screen;
}

/* keep content above the rain canvas (rain.js uses z-index: 0) */
.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

/* ---------- 4. layout primitives ---------- */
.wrap {
    width: min(calc(100% - 48px), var(--wrap));
    margin-inline: auto;
}

.wrap--read {
    width: min(calc(100% - 48px), var(--read));
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 200;
    padding: 10px 16px;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--ink-0);
    background: var(--paper);
}

.skip-link:focus {
    top: 12px;
}

.section {
    padding: 104px 0;
    position: relative;
}

.section--tight {
    padding: 64px 0;
}

.section--flush {
    padding-top: 0;
}

.section + .section {
    border-top: 1px solid var(--line);
}

/* ---------- 5. header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(180deg, rgba(8, 11, 15, 0.92) 0%, rgba(8, 11, 15, 0.76) 100%);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    border-bottom: 1px solid var(--line);
    transition: opacity 0.4s var(--ease);
}

.site-header.is-scrolled::before {
    opacity: 1;
}

/* character pages start with artwork under the header: keep the bar legible */
body[data-page="character"] .site-header::before {
    opacity: 1;
}

.header__inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--paper);
    flex-shrink: 0;
}

.brand:hover {
    color: var(--paper);
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--accent-strong);
    border: 1px solid var(--line-2);
    background: rgba(143, 185, 220, 0.06);
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.brand:hover .brand__mark {
    border-color: var(--accent);
    background: rgba(143, 185, 220, 0.14);
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.2;
}

.brand__text em {
    font-family: var(--sans);
    font-style: normal;
    font-size: 0.54rem;
    font-weight: 400;
    letter-spacing: 0.32em;
    color: var(--text-faint);
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav__link {
    position: relative;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    padding: 6px 0;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--paper);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav__cta {
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: var(--ink-0);
    background: var(--paper);
    padding: 10px 18px;
    border: 1px solid var(--paper);
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.nav__cta:hover {
    color: var(--paper);
    background: transparent;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line-2);
    color: var(--paper);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 1px;
    background: currentColor;
    position: relative;
    transition: background 0.2s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- 5b. novel sub-navigation ---------- */
.subnav {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 11, 15, 0.55);
}

.subnav__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.subnav__inner::-webkit-scrollbar {
    display: none;
}

.subnav a {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    color: var(--text-faint);
    white-space: nowrap;
    border: 1px solid transparent;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.subnav a:hover {
    color: var(--paper);
}

.subnav a.is-active {
    color: var(--paper);
    border-color: var(--line-2);
    background: rgba(143, 185, 220, 0.06);
}

/* ---------- 6. hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
}

.hero__media,
.hero__media img,
.hero__scrim {
    position: absolute;
    inset: 0;
}

.hero__media {
    z-index: -2;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    filter: saturate(0.78) contrast(1) brightness(0.82);
    transform: scale(1.03);
    animation: hero-drift 24s var(--ease) infinite alternate;
}

.hero__scrim {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 11, 15, 0.58) 0%, rgba(8, 11, 15, 0.06) 34%, rgba(8, 11, 15, 0.48) 68%, rgba(8, 11, 15, 0.94) 100%),
        linear-gradient(90deg, rgba(8, 11, 15, 0.78) 0%, rgba(8, 11, 15, 0.1) 62%, transparent 100%);
}

@keyframes hero-drift {
    from { transform: scale(1.03) translate3d(0, 0, 0); }
    to { transform: scale(1.08) translate3d(-1.2%, -1%, 0); }
}

.hero__inner {
    width: min(calc(100% - 48px), var(--wrap));
    margin-inline: auto;
    padding: calc(var(--header-h) + 72px) 0 64px;
}

.hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.32em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 26px;
}

.hero__kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(143, 185, 220, 0.9);
}

.hero__title {
    font-size: clamp(3.4rem, 9.2vw, 7.4rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--paper);
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.hero__sub {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    max-width: 560px;
}

.hero__en {
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.34em;
    color: var(--text-dim);
    white-space: nowrap;
}

.rail {
    position: relative;
    flex: 1;
    max-width: 280px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(143, 185, 220, 0.2) 70%, transparent 100%);
}

.rail::before {
    content: "";
    position: absolute;
    left: 0;
    top: -3px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(143, 185, 220, 0.8);
}

.rail::after {
    content: "";
    position: absolute;
    right: 0;
    top: -2px;
    width: 44px;
    height: 5px;
    background: repeating-linear-gradient(90deg, var(--text-faint) 0 2px, transparent 2px 7px);
    opacity: 0.7;
}

.hero__lede {
    max-width: 560px;
    margin-top: 30px;
    font-size: 1.02rem;
    line-height: 1.95;
    color: var(--text);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 42px;
    margin-top: 52px;
    padding-top: 24px;
    border-top: 1px solid rgba(157, 183, 207, 0.2);
    max-width: 760px;
}

.hero__meta div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero__meta dt {
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.24em;
    color: var(--text-faint);
    text-transform: uppercase;
}

.hero__meta dd {
    font-family: var(--latin);
    font-size: 1.12rem;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.hero__scroll {
    position: absolute;
    right: max(24px, calc((100vw - var(--wrap)) / 2));
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.54rem;
    letter-spacing: 0.34em;
    color: var(--text-faint);
    writing-mode: vertical-rl;
}

.hero__scroll::after {
    content: "";
    width: 1px;
    height: 42px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

/* minimal homepage cover */
.hero--index {
    min-height: 88svh;
    align-items: center;
}

.hero--index .hero__inner {
    padding-bottom: 72px;
}

.hero__tagline {
    margin-top: 20px;
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    letter-spacing: 0.16em;
    color: var(--text);
}

.hero__tagline span {
    color: var(--accent);
    margin-right: 0.5em;
}

/* ---------- 7. buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--line-2);
    border-radius: 2px;
    color: var(--paper);
    background: transparent;
    transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn--primary {
    color: var(--ink-0);
    background: var(--paper);
    border-color: var(--paper);
}

.btn--primary:hover {
    color: var(--ink-0);
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.btn__arrow {
    font-family: var(--sans);
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.3s var(--ease);
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

/* ---------- 8. station heading ---------- */
.station {
    margin-bottom: 42px;
}

.station__title-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.station__no {
    font-family: var(--latin);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--gold);
}

.station__cn {
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.1em;
    color: var(--paper);
}

.station__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.station__bar {
    width: 3px;
    height: 13px;
    background: var(--accent);
    flex-shrink: 0;
}

.station__en {
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    white-space: nowrap;
}

.station__line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.station__dots {
    display: flex;
    gap: 6px;
}

.station__dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-faint);
    opacity: 0.6;
}

.station__dots i:first-child {
    opacity: 1;
    background: var(--accent);
}

.station__note {
    margin-top: 16px;
    max-width: 620px;
    font-size: 0.92rem;
    color: var(--text-dim);
}

/* ---------- 8b. homepage index ---------- */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.preview-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--ink-2);
    transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

.preview-card:hover {
    border-color: var(--line-2);
    transform: translateY(-3px);
}

.preview-card--wide {
    grid-column: 1 / -1;
}

.preview-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ink-3);
}

.preview-card--wide .preview-card__media {
    aspect-ratio: 21 / 9;
}

.preview-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.82) brightness(0.9);
    transition: transform 0.8s var(--ease-out), filter 0.4s var(--ease);
}

.preview-card:hover .preview-card__media img {
    transform: scale(1.03);
    filter: saturate(0.95) brightness(1);
}

.preview-card__no {
    position: absolute;
    top: 12px;
    left: 14px;
    z-index: 1;
    padding: 4px 8px;
    font-family: var(--latin);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    color: var(--gold);
    background: rgba(8, 11, 15, 0.58);
    backdrop-filter: blur(4px);
}

.preview-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 16px;
    padding: 15px 18px 17px;
}

.preview-card__head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.preview-card__title {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.1em;
    color: var(--paper);
}

.preview-card__en {
    font-family: var(--sans);
    font-size: 0.54rem;
    letter-spacing: 0.26em;
    color: var(--accent);
    white-space: nowrap;
}

.preview-card__meta {
    grid-column: 1;
    font-family: var(--sans);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}

.preview-card__arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 1rem;
    color: var(--accent);
    transition: transform 0.3s var(--ease);
}

.preview-card:hover .preview-card__arrow {
    transform: translateX(5px);
}

/* ---------- 9. archive entry cards ---------- */
.entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.entry-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.entry-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 30px 28px 26px;
    border: 1px solid var(--line);
    background:
        linear-gradient(160deg, rgba(143, 185, 220, 0.05) 0%, transparent 46%),
        linear-gradient(180deg, rgba(20, 28, 38, 0.78), rgba(11, 16, 22, 0.9));
    overflow: hidden;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), background 0.35s var(--ease);
}

.entry-card::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border: 1px solid rgba(143, 185, 220, 0.12);
    border-radius: 50%;
    transition: transform 0.6s var(--ease), border-color 0.4s var(--ease);
}

.entry-card:hover {
    transform: translateY(-6px);
    border-color: var(--line-2);
    background:
        linear-gradient(160deg, rgba(143, 185, 220, 0.09) 0%, transparent 46%),
        linear-gradient(180deg, rgba(24, 34, 45, 0.9), rgba(11, 16, 22, 0.95));
}

.entry-card:hover::after {
    transform: scale(1.08);
    border-color: rgba(143, 185, 220, 0.24);
}

.entry-card__no {
    font-family: var(--latin);
    font-size: 2.6rem;
    line-height: 1;
    color: rgba(200, 169, 107, 0.55);
}

.entry-card__en {
    margin-top: 10px;
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    color: var(--accent);
}

.entry-card__title {
    margin-top: 18px;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.entry-card__desc {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--text-dim);
}

.entry-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 22px;
    font-family: var(--sans);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    color: var(--text-faint);
}

.entry-card__foot .arrow {
    font-size: 1rem;
    color: var(--accent);
    transition: transform 0.3s var(--ease);
}

.entry-card:hover .entry-card__foot .arrow {
    transform: translateX(5px);
}

/* ---------- 10. ticket / archive cards ---------- */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.archive-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 28, 38, 0.82), rgba(11, 16, 22, 0.92));
    overflow: hidden;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.archive-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.archive-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--ink-2);
}

.archive-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(8, 11, 15, 0.55) 100%);
    pointer-events: none;
}

.archive-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.78) contrast(1.02) brightness(0.86);
    transition: transform 0.8s var(--ease-out), filter 0.5s var(--ease);
}

.archive-card:hover .archive-card__media img {
    transform: scale(1.05);
    filter: saturate(0.95) contrast(1.02) brightness(0.95);
}

.archive-card__tag {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    padding: 5px 9px;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--paper);
    background: rgba(8, 11, 15, 0.72);
    border: 1px solid rgba(157, 183, 207, 0.28);
    backdrop-filter: blur(6px);
}

.archive-card__body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 22px 22px 20px;
    border-top: 1px dashed rgba(157, 183, 207, 0.24);
}

.archive-card__body::before,
.archive-card__body::after {
    content: "";
    position: absolute;
    top: -6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ink-0);
    border: 1px solid var(--line);
}

.archive-card__body::before { left: -6px; }
.archive-card__body::after { right: -6px; }

.archive-card__route {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.54rem;
    letter-spacing: 0.22em;
    color: var(--text-faint);
}

.archive-card__route::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--accent);
}

.archive-card__route::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line-2), transparent);
}

.archive-card__title {
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.06em;
    color: var(--paper);
}

.archive-card__title a {
    color: inherit;
}

.archive-card__excerpt {
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-dim);
}

.archive-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.archive-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    color: var(--text-faint);
}

.archive-card__meta strong {
    font-weight: 400;
    color: var(--text-dim);
}

.archive-card__arrow {
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--accent);
    transition: transform 0.3s var(--ease);
}

.archive-card:hover .archive-card__arrow {
    transform: translateX(4px);
}

.barcode {
    width: 54px;
    height: 20px;
    opacity: 0.5;
    background: repeating-linear-gradient(
        90deg,
        var(--text-dim) 0 1px,
        transparent 1px 3px,
        var(--text-dim) 3px 5px,
        transparent 5px 6px,
        var(--text-dim) 6px 7px,
        transparent 7px 10px
    );
}

/* ---------- 11. feature card ---------- */
.feature {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 28, 38, 0.8), rgba(10, 15, 21, 0.94));
    overflow: hidden;
}

.feature__media {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

.feature__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    filter: saturate(0.72) brightness(0.78);
    transition: transform 1s var(--ease-out);
}

.feature:hover .feature__media img {
    transform: scale(1.04);
}

.feature__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 55%, rgba(10, 15, 21, 0.9) 100%);
}

.feature__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 44px 40px;
}

.feature__eyebrow {
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    color: var(--accent);
}

.feature__title {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.feature__lede {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.feature__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding-top: 8px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--text-faint);
}

.feature__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.feature__meta span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

.feature__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.feature + .entry-grid {
    margin-top: 20px;
}

/* ---------- 12. profile cards ---------- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.profile-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    min-height: 300px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 28, 38, 0.8), rgba(10, 15, 21, 0.94));
    overflow: hidden;
    transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-2);
}

.profile-card__media {
    position: relative;
    overflow: hidden;
    background: var(--ink-2);
}

.profile-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 11, 15, 0.04) 0%, rgba(8, 11, 15, 0.38) 100%);
    pointer-events: none;
}

.profile-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.66) brightness(0.82);
    transition: transform 0.8s var(--ease-out);
}

.profile-card:hover .profile-card__media img {
    transform: scale(1.04);
}

.profile-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px 24px;
}

.profile-card__role {
    align-self: flex-start;
    padding: 4px 9px;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--accent);
    border: 1px solid rgba(143, 185, 220, 0.3);
}

.profile-card__name {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.profile-card__sub {
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.profile-card__quote {
    margin-top: 4px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-dim);
}

.profile-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    font-family: var(--sans);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    color: var(--accent);
}

/* ---------- 13. chapter / manifest ---------- */
.chapter-group + .chapter-group {
    margin-top: 52px;
}

.chapter-group__head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.chapter-group__cn {
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    color: var(--paper);
}

.chapter-group__en {
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.24em;
    color: var(--accent);
}

.chapter-group__count {
    margin-left: auto;
    font-family: var(--latin);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.chapter-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

.chapter-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 18px;
    border: 1px solid var(--line);
    background: rgba(14, 20, 27, 0.5);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.chapter-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-2);
    background: rgba(24, 34, 45, 0.72);
}

.chapter-card__no {
    flex-shrink: 0;
    min-width: 34px;
    font-family: var(--latin);
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.chapter-card__body {
    display: block;
    min-width: 0;
}

.chapter-card__title {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--paper);
    line-height: 1.5;
}

.chapter-card__excerpt {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--text-faint);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chapter-card__arrow {
    margin-left: auto;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.chapter-card:hover .chapter-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- 14. reading guide ---------- */
.guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.guide__item {
    padding: 28px 26px;
    background: rgba(12, 17, 23, 0.92);
}

.guide__no {
    font-family: var(--latin);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    color: var(--gold);
}

.guide__title {
    margin-top: 12px;
    font-size: 1.08rem;
    letter-spacing: 0.06em;
    color: var(--paper);
}

.guide__text {
    margin-top: 8px;
    font-size: 0.86rem;
    line-height: 1.8;
    color: var(--text-dim);
}

/* ---------- 15. page hero (sub pages) ---------- */
.page-hero {
    position: relative;
    min-height: 48vh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--header-h) + 84px) 0 56px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(180deg, rgba(8, 11, 15, 0.72) 0%, rgba(8, 11, 15, 0.88) 60%, rgba(8, 11, 15, 0.98) 100%),
        linear-gradient(90deg, rgba(8, 11, 15, 0.9) 0%, rgba(8, 11, 15, 0.45) 65%, rgba(8, 11, 15, 0.7) 100%),
        var(--hero-img, url("../images/rain-flower-field.webp"));
    background-size: cover;
    background-position: var(--hero-pos, center 8%);
    filter: saturate(0.62) brightness(0.62);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at 15% 100%, rgba(143, 185, 220, 0.1) 0%, transparent 55%);
}

.page-hero__inner {
    width: min(calc(100% - 48px), var(--wrap));
    margin-inline: auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    color: var(--text-faint);
}

.breadcrumb a {
    color: var(--text-dim);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb em {
    font-style: normal;
    color: var(--text-faint);
}

.page-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.page-hero__kicker::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(143, 185, 220, 0.8);
}

.page-hero__title {
    font-size: clamp(2.6rem, 6.4vw, 5rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.page-hero__sub {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    max-width: 620px;
}

.page-hero__en {
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.32em;
    color: var(--text-dim);
    white-space: nowrap;
}

.page-hero__lede {
    max-width: 620px;
    margin-top: 20px;
    font-size: 0.96rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.page-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 28px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--text-faint);
}

.page-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.page-hero__meta span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.7;
}

/* ---------- 16. prose / article ---------- */
.prose {
    width: min(calc(100% - 48px), var(--read));
    margin: 0 auto;
    font-size: 1.04rem;
    line-height: 2.05;
    color: var(--text);
}

.prose--left {
    margin-left: 0;
    margin-right: 0;
}

.prose > * + * {
    margin-top: 1.35rem;
}

.prose h2 {
    margin-top: 3.2rem;
    margin-bottom: 1.2rem;
    font-size: 1.42rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 2.2rem;
    margin-bottom: 0.8rem;
    font-size: 1.12rem;
    letter-spacing: 0.06em;
    color: var(--accent-strong);
}

.prose p {
    margin-bottom: 1.35rem;
}

.prose strong {
    font-weight: 600;
    color: var(--paper);
}

.prose em {
    color: var(--text);
}

.prose ul,
.prose ol {
    margin: 1.2rem 0 1.6rem 1.4rem;
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    padding-left: 0.3rem;
}

.prose blockquote {
    margin: 2.4rem 0;
    padding: 22px 26px;
    border-left: 2px solid var(--accent);
    background: rgba(143, 185, 220, 0.05);
    font-size: 0.98rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

.prose figure {
    margin: 2.4rem 0;
}

.prose figure img {
    width: 100%;
    border: 1px solid var(--line);
}

.prose figcaption {
    margin-top: 10px;
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    text-align: center;
}

.prose a {
    border-bottom: 1px solid rgba(143, 185, 220, 0.35);
}

/* ---------- 17. lore layout ---------- */
.lore-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.lore-toc {
    position: sticky;
    top: calc(var(--header-h) + 34px);
    padding-top: 6px;
}

.lore-toc__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.24em;
    color: var(--text-faint);
}

.lore-toc__label::before {
    content: "";
    width: 3px;
    height: 11px;
    background: var(--accent);
}

.lore-toc a {
    display: block;
    padding: 7px 0;
    font-family: var(--sans);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    color: var(--text-faint);
    border-left: 1px solid var(--line);
    padding-left: 14px;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lore-toc a:hover,
.lore-toc a.is-active {
    color: var(--paper);
    border-left-color: var(--accent);
}

.lore-toc__mobile {
    display: none;
}

/* ---------- 18. chapter reading ---------- */
.reading-progress {
    position: fixed;
    top: var(--header-h);
    left: 0;
    z-index: 49;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    box-shadow: 0 0 12px rgba(143, 185, 220, 0.55);
    transition: width 0.08s linear;
}

.chapter-head {
    padding: calc(var(--header-h) + 72px) 0 46px;
    border-bottom: 1px solid var(--line);
}

.chapter-head__inner {
    width: min(calc(100% - 48px), var(--read));
    margin-inline: auto;
}

.chapter-head__label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    color: var(--accent);
}

.chapter-head__label::after {
    content: "";
    width: 54px;
    height: 1px;
    background: var(--line-2);
}

.chapter-head__title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.06em;
    color: var(--paper);
}

.chapter-head__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.chapter-content {
    width: min(calc(100% - 48px), var(--read));
    margin: 0 auto;
    padding: 48px 0 24px;
    font-size: 1.06rem;
    line-height: 2.1;
    color: var(--text);
}

.chapter-content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.chapter-content p:first-of-type {
    text-indent: 0;
}

.chapter-content p:first-of-type::first-letter {
    float: left;
    font-size: 3.2em;
    line-height: 0.9;
    margin: 0.08em 0.12em 0 0;
    color: var(--accent-strong);
    font-weight: 600;
}

.chapter-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: min(calc(100% - 48px), var(--read));
    margin: 24px auto 0;
}

.chapter-nav__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 92px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    background: rgba(14, 20, 27, 0.55);
    transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.chapter-nav__item:hover {
    border-color: var(--line-2);
    background: rgba(24, 34, 45, 0.7);
}

.chapter-nav__item--next {
    text-align: right;
    align-items: flex-end;
}

.chapter-nav__label {
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: var(--text-faint);
}

.chapter-nav__title {
    font-size: 0.98rem;
    color: var(--paper);
}

.chapter-nav__item--empty {
    border-style: dashed;
    opacity: 0.4;
    pointer-events: none;
}

.chapter-back {
    display: flex;
    justify-content: center;
    width: min(calc(100% - 48px), var(--read));
    margin: 40px auto 0;
}

/* ---------- 17b. faq ---------- */
.faq {
    border-top: 1px solid var(--line);
}

.faq details {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    list-style: none;
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    color: var(--paper);
    cursor: pointer;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex-shrink: 0;
    font-family: var(--latin);
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
    content: "−";
}

.faq__body {
    max-width: 720px;
    padding: 0 0 22px;
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--text-dim);
}

/* ---------- 17c. comments / guestbook ---------- */
.comments-shell {
    padding: 36px 34px 30px;
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 18% 0%, rgba(143, 185, 220, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, rgba(20, 28, 38, 0.8), rgba(10, 15, 21, 0.94));
}

.comments-head {
    max-width: 720px;
}

.comments-kicker {
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.28em;
    color: var(--accent);
}

.comments-title {
    margin-top: 10px;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.comments-text {
    margin-top: 12px;
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.comments-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.message-log {
    position: relative;
    min-height: 380px;
    border: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(143, 185, 220, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, rgba(20, 28, 38, 0.8), rgba(10, 15, 21, 0.94));
}

.message-log__fallback {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    max-width: 100%;
    padding: 30px 32px;
    overflow-y: auto;
    background: linear-gradient(180deg, #111821 0%, #0b1016 100%);
}

.message-log__fallback[hidden] {
    display: none;
}

.message-log__mark {
    font-family: var(--latin);
    font-size: 2rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.8;
}

.message-log__title {
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.message-log__text {
    font-size: 0.92rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.message-log__embed {
    width: 100%;
    padding: 30px 32px;
}

.message-log__embed iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
}

.comments-setup {
    margin-top: 24px;
    padding: 14px 16px;
    border-left: 2px solid rgba(143, 185, 220, 0.55);
    background: rgba(143, 185, 220, 0.05);
    font-family: var(--sans);
    font-size: 0.72rem;
    line-height: 1.85;
    color: var(--text-dim);
}

.comments-setup a {
    color: var(--accent);
    border-bottom: 1px solid rgba(143, 185, 220, 0.35);
}

.comments-box {
    min-height: 180px;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px dashed var(--line-2);
}

.comments-box .giscus,
.comments-box .giscus-frame {
    width: 100%;
}

.comments-note {
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 0.66rem;
    line-height: 1.85;
    color: var(--text-faint);
}

.comments-note a {
    color: var(--text-dim);
    border-bottom: 1px solid rgba(143, 185, 220, 0.3);
}

.comments-note a:hover {
    color: var(--accent);
}

.comments-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.comments-rules span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comments-rules span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.75;
}

/* ---------- 17d. novel strip / photo gallery ---------- */
.novel-strip {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(20, 28, 38, 0.8), rgba(10, 15, 21, 0.94));
    overflow: hidden;
}

.novel-strip__media {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    background: var(--ink-2);
}

.novel-strip__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.74) brightness(0.82);
}

.novel-strip__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 28px 34px;
}

.novel-strip__eyebrow {
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.28em;
    color: var(--accent);
}

.novel-strip__title {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.novel-strip__lede {
    max-width: 560px;
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--text-dim);
}

.novel-strip__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

.novel-strip__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.photo-preview a {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--ink-2);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.82) brightness(0.86);
    transition: transform 0.8s var(--ease-out), filter 0.4s var(--ease);
}

.photo-preview a:hover img {
    transform: scale(1.04);
    filter: saturate(0.95) brightness(0.96);
}

.photo-preview a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(8, 11, 15, 0.72) 100%);
    pointer-events: none;
}

.photo-preview span {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 1;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--paper);
}

.photo-grid {
    columns: 3;
    column-gap: 16px;
}

.photo-card {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    border: 1px solid var(--line);
    background: var(--ink-2);
    break-inside: avoid;
    overflow: hidden;
    cursor: zoom-in;
}

.photo-card img {
    display: block;
    width: 100%;
    height: auto;
    filter: saturate(0.9) brightness(0.92);
    transition: transform 0.7s var(--ease-out), filter 0.4s var(--ease);
}

.photo-card:hover img {
    transform: scale(1.02);
    filter: saturate(1) brightness(1);
}

.photo-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(8, 11, 15, 0.68) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    pointer-events: none;
}

.photo-card:hover::after {
    opacity: 1;
}

.photo-card__cap {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 1;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: var(--paper);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.photo-card:hover .photo-card__cap {
    opacity: 1;
}

.photo-dialog {
    position: fixed;
    inset: 0;
    width: fit-content;
    height: fit-content;
    margin: auto;
    max-width: min(94vw, 1400px);
    max-height: 94vh;
    padding: 0;
    border: 1px solid var(--line-2);
    background: #080b0f;
    color: var(--text);
}

.photo-dialog::backdrop {
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(7px);
}

.photo-dialog__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
}

.photo-dialog__bar button {
    font-size: 1.35rem;
    line-height: 1;
    color: var(--paper);
}

.photo-dialog img {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    margin: 0 auto;
    object-fit: contain;
}

/* ---------- 18b. placeholder / empty sections ---------- */
.placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.placeholder-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.placeholder-grid--poster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.placeholder-frame {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    border: 1px dashed var(--line-2);
    background:
        linear-gradient(160deg, rgba(143, 185, 220, 0.035), transparent 55%),
        rgba(10, 15, 21, 0.45);
}

.placeholder-grid--poster .placeholder-frame {
    aspect-ratio: 3 / 4;
}

.placeholder-frame::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(157, 183, 207, 0.07);
    pointer-events: none;
}

.placeholder-frame__mark {
    font-family: var(--latin);
    font-size: 1.6rem;
    line-height: 1;
    color: rgba(143, 185, 220, 0.35);
}

.placeholder-frame__text {
    position: absolute;
    bottom: 16px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--sans);
    font-size: 0.52rem;
    letter-spacing: 0.26em;
    color: var(--text-faint);
    opacity: 0.7;
}

.empty-state {
    padding: 84px 30px;
    border: 1px dashed var(--line-2);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(143, 185, 220, 0.07) 0%, transparent 60%),
        rgba(10, 15, 21, 0.45);
    text-align: center;
}

.empty-state__mark {
    font-family: var(--latin);
    font-size: 2.2rem;
    line-height: 1;
    color: rgba(143, 185, 220, 0.45);
}

.empty-state__title {
    margin-top: 18px;
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--paper);
}

.empty-state__text {
    max-width: 460px;
    margin: 12px auto 0;
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.empty-state__en {
    display: block;
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 0.56rem;
    letter-spacing: 0.3em;
    color: var(--text-faint);
}

.section-note {
    margin-top: 18px;
    font-family: var(--sans);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    color: var(--text-faint);
}

/* ---------- 19. profile detail ---------- */
.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0;
    margin-top: 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    isolation: isolate;
}

.profile-hero__media {
    position: relative;
    min-height: 520px;
    overflow: hidden;
}

.profile-hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(8, 11, 15, 0.62) 0%, rgba(8, 11, 15, 0) 30%, rgba(8, 11, 15, 0.18) 100%);
}

.profile-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(0.8) brightness(0.82);
}

.profile-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 55%, rgba(8, 11, 15, 0.92) 100%);
}

.profile-hero__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: calc(var(--header-h) + 46px) 56px 64px;
    background: linear-gradient(180deg, rgba(12, 17, 23, 0.6), rgba(8, 11, 15, 0.95));
}

.profile-hero__role {
    align-self: flex-start;
    padding: 5px 10px;
    font-family: var(--sans);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    border: 1px solid rgba(143, 185, 220, 0.3);
}

.profile-hero__name {
    font-size: clamp(2.2rem, 4.6vw, 3.6rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.profile-hero__sub {
    font-family: var(--sans);
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    color: var(--text-faint);
}

.profile-hero__quote {
    max-width: 460px;
    margin-top: 8px;
    padding-left: 18px;
    border-left: 1px solid var(--accent);
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-dim);
}

.profile-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 12px;
    background: var(--line);
    border: 1px solid var(--line);
}

.profile-facts div {
    padding: 14px 16px;
    background: rgba(12, 17, 23, 0.9);
}

.profile-facts dt {
    font-family: var(--sans);
    font-size: 0.54rem;
    letter-spacing: 0.2em;
    color: var(--text-faint);
}

.profile-facts dd {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--text);
}

/* ---------- 20. quote band / CTA ---------- */
.quote-band {
    padding: 96px 0;
    text-align: center;
    border-block: 1px solid var(--line);
    background:
        radial-gradient(ellipse at 50% 50%, rgba(143, 185, 220, 0.08) 0%, transparent 60%),
        rgba(8, 11, 15, 0.6);
}

.quote-band__text {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    line-height: 1.9;
    letter-spacing: 0.08em;
    color: var(--paper);
}

.quote-band__cite {
    display: block;
    margin-top: 22px;
    font-family: var(--sans);
    font-size: 0.6rem;
    letter-spacing: 0.26em;
    color: var(--text-faint);
}

/* ---------- 21. footer ---------- */
.site-footer {
    margin-top: 0;
    padding: 64px 0 26px;
    border-top: 1px solid var(--line);
    background: rgba(7, 10, 14, 0.82);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.55fr repeat(4, minmax(0, 1fr));
    gap: 30px;
    padding-bottom: 42px;
}

.footer__brand .brand {
    margin-bottom: 16px;
}

.footer__quote {
    max-width: 280px;
    font-size: 0.86rem;
    line-height: 1.9;
    color: var(--text-faint);
}

.footer__label {
    margin-bottom: 14px;
    font-family: var(--sans);
    font-size: 0.54rem;
    letter-spacing: 0.24em;
    color: var(--text-faint);
    text-transform: uppercase;
}

.footer__col a {
    display: block;
    padding: 5px 0;
    font-family: var(--sans);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.footer__col a:hover {
    color: var(--accent);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}

.footer__bottom a {
    color: var(--text-dim);
}

.to-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.to-top::before {
    content: "↑";
    color: var(--accent);
}

/* ---------- 22. motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    }

    .js .reveal.is-in {
        opacity: 1;
        transform: none;
    }

    .js .reveal[data-delay="1"] { transition-delay: 0.08s; }
    .js .reveal[data-delay="2"] { transition-delay: 0.16s; }
    .js .reveal[data-delay="3"] { transition-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------- 23. responsive ---------- */
@media (max-width: 1024px) {
    :root {
        --wrap: 920px;
    }

    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .entry-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .entry-card {
        min-height: 280px;
        padding: 24px 22px;
    }

    .profile-card {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .lore-layout {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 44px;
    }

    .entry-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    :root {
        --header-h: 64px;
    }

    .wrap,
    .wrap--read,
    .hero__inner,
    .page-hero__inner,
    .chapter-head__inner,
    .chapter-content,
    .chapter-nav,
    .chapter-back {
        width: min(calc(100% - 36px), var(--wrap));
    }

    .chapter-head__inner,
    .chapter-content,
    .chapter-nav,
    .chapter-back {
        width: min(calc(100% - 36px), var(--read));
    }

    .nav-toggle {
        display: grid;
    }

    .nav {
        position: fixed;
        inset: 0;
        z-index: 55;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
        padding: calc(var(--header-h) + 26px) 42px 40px;
        overflow-y: auto;
        background:
            radial-gradient(ellipse at 80% 20%, rgba(143, 185, 220, 0.12), transparent 55%),
            rgba(8, 11, 15, 0.995);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.5s var(--ease-out), opacity 0.35s var(--ease), visibility 0.35s;
    }

    .nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__link {
        font-family: var(--serif);
        font-size: 1.9rem;
        letter-spacing: 0.12em;
        color: var(--text-dim);
        padding: 10px 0;
    }

    .nav__link.is-active {
        color: var(--paper);
    }

    .nav__link::after {
        display: none;
    }

    .nav__cta {
        margin-top: 20px;
        font-size: 0.72rem;
        padding: 13px 22px;
    }

    .brand {
        position: relative;
        z-index: 60;
    }

    .nav-toggle {
        position: relative;
        z-index: 60;
    }

    .hero {
        min-height: 94svh;
    }

    .hero__inner {
        padding-bottom: 46px;
    }

    .hero__scroll {
        display: none;
    }

    .hero__title {
        font-size: clamp(3rem, 13vw, 5rem);
    }

    .hero__meta {
        gap: 16px 28px;
    }

    .section {
        padding: 78px 0;
    }

    .entry-grid,
    .guide {
        grid-template-columns: 1fr;
    }

    .entry-card {
        min-height: 0;
    }

    .feature {
        grid-template-columns: 1fr;
    }

    .feature__media {
        min-height: 260px;
    }

    .feature__media::after {
        background: linear-gradient(180deg, transparent 55%, rgba(10, 15, 21, 0.9) 100%);
    }

    .feature__body {
        padding: 30px 26px 34px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        grid-template-columns: 150px minmax(0, 1fr);
    }

    .chapter-grid {
        grid-template-columns: 1fr;
    }

    .novel-strip {
        grid-template-columns: 180px minmax(0, 1fr);
    }

    .photo-grid {
        columns: 2;
    }

    .photo-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lore-layout {
        display: block;
    }

    .lore-toc {
        display: none;
    }

    .lore-toc__mobile {
        display: block;
        margin-bottom: 30px;
        border: 1px solid var(--line);
        background: rgba(14, 20, 27, 0.6);
    }

    .lore-toc__mobile summary {
        padding: 14px 18px;
        font-family: var(--sans);
        font-size: 0.72rem;
        letter-spacing: 0.12em;
        color: var(--text-dim);
        cursor: pointer;
    }

    .lore-toc__mobile .lore-toc__list {
        padding: 0 18px 14px;
    }

    .lore-toc__mobile a {
        display: block;
        padding: 6px 0;
        font-family: var(--sans);
        font-size: 0.76rem;
        color: var(--text-dim);
    }

    .profile-hero {
        grid-template-columns: 1fr;
        margin-top: 0;
    }

    .profile-hero__media {
        min-height: 380px;
    }

    .profile-hero__media::after {
        background: linear-gradient(180deg, transparent 55%, rgba(8, 11, 15, 0.95) 100%);
    }

    .profile-hero__body {
        padding: calc(var(--header-h) + 22px) 24px 44px;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .comments-shell {
        padding: 24px 20px;
    }

    .novel-strip {
        grid-template-columns: 1fr;
    }

    .novel-strip__media {
        min-height: 220px;
        max-height: 280px;
    }

    .novel-strip__body {
        padding: 22px 20px;
    }

    .photo-grid {
        columns: 1;
    }

    .preview-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .preview-card--wide .preview-card__media {
        aspect-ratio: 16 / 10;
    }

    .preview-card__body {
        padding: 13px 15px 15px;
    }

    .preview-card__head {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .message-log {
        min-height: 460px;
    }

    .message-log__fallback,
    .message-log__embed {
        padding: 22px 18px;
    }

    .comments-actions .btn {
        flex: 1;
    }

    .profile-card {
        grid-template-columns: 1fr;
    }

    .profile-card__media {
        aspect-ratio: 16 / 10;
        max-height: 240px;
    }

    .hero__meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero__actions .btn {
        flex: 1;
    }

    .page-hero {
        min-height: 42vh;
        padding-top: calc(var(--header-h) + 60px);
    }

    .chapter-nav {
        grid-template-columns: 1fr;
    }

    .chapter-nav__item--next {
        text-align: left;
        align-items: flex-start;
    }

    .profile-facts {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .station__line {
        display: none;
    }
}

/* ---------- 24. print ---------- */
@media print {
    body::before,
    body::after,
    .site-header,
    .site-footer,
    .reading-progress,
    .hero__scroll,
    .chapter-nav,
    .chapter-back {
        display: none !important;
    }

    body {
        color: #111;
        background: #fff;
    }

    .chapter-head,
    .chapter-content,
    .prose {
        width: 100%;
        max-width: none;
    }

    .chapter-content p {
        color: #111;
    }
}
