/*
Theme Name: Ondée
Description: 雨の窓と海 — 実時間 WebGL の雨粒屈折を背景に、すりガラスのカードを浮かべる iOS 風の簡素なテーマ。浅色＝マルディブの浅い海、深色＝タヒチの深い海と火山。
Author: mitsuki
Version: 1.0.2
Text Domain: ondee
*/

/* ========================================
   1. トークン（:root＝浅色マルディブ／[data-theme="dark"]＝深色タヒチ）
   UI の面には一切グラデーションを使わない — 半透明の単色＋backdrop-filter だけ
   ======================================== */
:root {
    --ink: #1E2B33;
    --ink-soft: #5B6A73;
    --glass: rgba(255, 255, 255, 0.74);           /* 任务书 0.68 → 0.74：手机上卡片压在蒂芙尼蓝海面时次要字只有 4.57:1，宁可多一点不透明 */
    --glass-strong: rgba(255, 255, 255, 0.86);
    --glass-edge: rgba(255, 255, 255, 0.55);
    --accent: #2E9C99;
    --hero-ink: #1E2B33;

    /* 補助（仕様外の派生値。上の値から決めた細部用） */
    --accent-ink: #196A67;                        /* 小さな字に使う時のアクセント（白ガラス上で 4.5:1 を確保） */
    --hairline: rgba(30, 43, 51, 0.12);
    --chip: rgba(255, 255, 255, 0.55);
    --chip-hover: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(24, 52, 60, 0.08), 0 1px 2px rgba(24, 52, 60, 0.05);
    --hero-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 1px 2px rgba(255, 255, 255, 0.5);
    --ground: #CFE2E5;                            /* 背景図すら無い瞬間の地色（最下層） */
    --overlay: rgba(214, 230, 233, 0.55);

    --font-latin: 'Cormorant Garamond', 'Noto Serif JP', Georgia, serif;
    --font-jp: 'Noto Serif JP', 'Noto Serif SC', 'Hiragino Mincho ProN', 'Yu Mincho', serif;

    --blur: blur(22px) saturate(1.3);
    --r-card: 20px;
    --r-nav: 18px;
    --feed: 760px;
    --wide: 1120px;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --ink: #E7ECEE;
    --ink-soft: #A2AFB6;
    --glass: rgba(24, 32, 38, 0.62);
    --glass-strong: rgba(22, 29, 34, 0.84);
    --glass-edge: rgba(255, 255, 255, 0.10);
    --accent: #6CC3C0;
    --hero-ink: #F2F5F6;

    --accent-ink: #6CC3C0;
    --hairline: rgba(255, 255, 255, 0.12);
    --chip: rgba(255, 255, 255, 0.07);
    --chip-hover: rgba(255, 255, 255, 0.14);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.2);
    --hero-shadow: 0 0 18px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.5);
    --ground: #172126;
    --overlay: rgba(12, 18, 22, 0.5);

    color-scheme: dark;
}

/* ========================================
   2. 基本
   ======================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
    background: var(--ground);
    font-variant-numeric: lining-nums;     /* Cormorant の既定は古体数字 — 日付・話数は揃った数字で */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    transition: background-color .8s ease;
}

body {
    margin: 0;
    min-height: 100vh;
    background: transparent;               /* 背景は fixed の雨窓層が担う */
    color: var(--ink);
    font-family: var(--font-jp);
    font-size: 15px;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.ondee-num { font-family: var(--font-latin); font-weight: 500; font-variant-numeric: lining-nums; letter-spacing: .04em; }

/* ========================================
   3. 雨窓（背景）— 下層：CSS 兜底のぼかし図（浅深二枚を不透明度で交叉）／上層：WebGL canvas
   ======================================== */
.ondee-backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    height: 100vh;
    height: 100lvh;
}
.ondee-backdrop-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 70% 50%;          /* シェーダーの FOCUS_X と揃える（縦長画面でタヒチの山を残す） */
    background-repeat: no-repeat;
    transition: opacity .8s ease;
}
.ondee-backdrop-layer--light { background-image: url('images/sea-light-blur.webp'); opacity: 1; }
.ondee-backdrop-layer--dark  { background-image: url('images/sea-dark-blur.webp');  opacity: 0; }
:root[data-theme="dark"] .ondee-backdrop-layer--dark { opacity: 1; }
/* 深色時、浅色層は深色層が不透明になってから消える（同時に半透明になると中間で地色が透ける） */
:root[data-theme="dark"] .ondee-backdrop-layer--light { opacity: 0; transition-delay: .8s; }

.ondee-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;                        /* iOS のアドレスバー伸縮で backing store を作り直さない */
    z-index: -1;
    pointer-events: none;
    display: block;
    opacity: 0;
    transition: opacity .7s ease;
}
.ondee-rain.is-live { opacity: 1; }

/* ========================================
   4. すりガラス（共通の面）
   ======================================== */
.ondee-glass {
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    border-radius: var(--r-card);
    box-shadow: var(--shadow);
    transition: background-color .8s ease, border-color .8s ease, box-shadow .8s ease;
}
.ondee-glass--strong { background: var(--glass-strong); }

/* backdrop-filter の無い環境では、背景が花やかでも字が糊にならないよう不透明度を上げる */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root { --glass: rgba(255, 255, 255, 0.9); --glass-strong: rgba(255, 255, 255, 0.95); }
    :root[data-theme="dark"] { --glass: rgba(24, 32, 38, 0.9); --glass-strong: rgba(22, 29, 34, 0.95); }
}

/* ========================================
   5. 浮遊ナビ長条
   ======================================== */
.ondee-nav {
    position: sticky;
    top: 12px;
    z-index: 50;
    width: min(var(--wide), calc(100% - 32px));
    margin: 12px auto 0;
    height: 60px;
    padding: 0 12px 0 26px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: var(--r-nav);
}
.ondee-nav.is-scrolled { background: var(--glass-strong); }

.ondee-nav-brand {
    font-family: var(--font-latin);
    font-size: 25px;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1;
    white-space: nowrap;
    color: var(--ink);
}
.ondee-nav-brand:hover { color: var(--ink); }

.ondee-nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ondee-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13.5px;
    letter-spacing: .08em;
    color: var(--ink);
    white-space: nowrap;
    border-radius: 10px;
    transition: color .2s ease, background-color .2s ease;
}
.ondee-nav-item:hover { color: var(--accent); background: var(--chip); }
.ondee-nav-item.is-current::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 1.5px;
    border-radius: 1px;
    background: var(--accent);
}

.ondee-nav-actions { display: flex; align-items: center; gap: 4px; }

.ondee-theme-toggle,
.ondee-nav-burger {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--ink);
    transition: background-color .2s ease, color .2s ease;
}
.ondee-theme-toggle:hover,
.ondee-nav-burger:hover { background: var(--chip); color: var(--accent); }
.ondee-theme-toggle svg { transition: transform .5s ease, opacity .3s ease; }
/* 浅色では「月」（押すと夜へ）、深色では「日」を出す */
.ondee-icon-sun { display: none; }
:root[data-theme="dark"] .ondee-icon-sun { display: block; }
:root[data-theme="dark"] .ondee-icon-moon { display: none; }

.ondee-nav-burger { display: none; }

@media (max-width: 899px) {
    .ondee-nav { height: 54px; padding: 0 6px 0 18px; gap: 8px; top: 10px; margin-top: 10px; }
    .ondee-nav-brand { font-size: 22px; }
    .ondee-nav-links { display: none; }
    .ondee-nav-actions { margin-left: auto; }
    .ondee-nav-burger { display: inline-grid; }
}

/* 沈潜ナビ（個別記事）— 小さな浮遊カプセル */
.ondee-mini-nav {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 6px;
    border-radius: 999px;
}
.ondee-mini-nav.is-scrolled { background: var(--glass-strong); }
.ondee-mini-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--ink);
}
.ondee-mini-home:hover { background: var(--chip); }
.ondee-mini-name { font-family: var(--font-latin); font-size: 17px; font-weight: 500; line-height: 1; white-space: nowrap; }
.ondee-mini-sep { width: 1px; height: 18px; background: var(--hairline); }
.ondee-mini-nav .ondee-theme-toggle { width: 36px; height: 36px; border-radius: 999px; }

/* モバイル全画面メニュー */
.ondee-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px 24px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    backdrop-filter: blur(28px) saturate(1.3);
}
.ondee-menu-open, .ondee-menu-open body { overflow: hidden; }
.ondee-mobile-menu-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
}
.ondee-mobile-menu-brand { font-family: var(--font-latin); font-size: 30px; font-weight: 500; }
.ondee-mobile-menu-list { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ondee-mobile-menu-list a { padding: 10px 20px; font-size: 17px; letter-spacing: .14em; }
.ondee-mobile-menu-search { width: min(320px, 100%); }

input[type="search"],
.ondee-comments input[type="text"],
.ondee-comments input[type="email"],
.ondee-comments input[type="url"],
.ondee-comments textarea {
    width: 100%;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: var(--chip);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 11px 14px;
    -webkit-appearance: none;
    appearance: none;
}
input[type="search"]::placeholder { color: var(--ink-soft); }
input[type="search"]:focus,
.ondee-comments input:focus,
.ondee-comments textarea:focus { outline: none; border-color: var(--accent); background: var(--chip-hover); }

/* 検索オーバーレイ */
.ondee-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 18vh 16px 0;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.ondee-search-inner {
    width: min(560px, 100%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px 10px 18px;
    background: var(--glass-strong);
    border-radius: 18px;
}
.ondee-search-inner form { flex: 1; }
.ondee-search-inner input[type="search"] { background: transparent; border: 0; padding: 8px 4px; font-size: 16px; }
.ondee-search-close { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.ondee-search-close:hover { background: var(--chip); }

/* ========================================
   6. 開場の海（ホーム hero）— カード無し。文字は海の上に直接、底板なし
   ======================================== */
.ondee-hero {
    position: relative;
    height: min(78vh, 760px);
    min-height: 460px;
    margin-top: -72px;                     /* sticky ナビの下まで海を伸ばす（ナビは海の上に浮かぶ） */
    display: flex;
    align-items: flex-end;
    color: var(--hero-ink);
}
.ondee-hero-inner {
    width: min(var(--wide), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 26px 9vh;
    text-shadow: var(--hero-shadow);
}
.ondee-hero-name {
    margin: 0;
    font-family: var(--font-latin);
    font-weight: 500;
    font-size: clamp(46px, 6.6vw, 92px);
    line-height: 1;
    letter-spacing: -.005em;
}
.ondee-hero-rule {
    display: block;
    width: 64px;
    height: 1px;
    margin: 22px 0 18px;
    background: currentColor;
    opacity: .55;
}
.ondee-hero-sub {
    margin: 0;
    font-size: clamp(15px, 1.4vw, 18px);
    font-weight: 500;
    letter-spacing: .24em;
}
.ondee-hero-welcome {
    margin: 18px 0 0;
    max-width: 36em;
    font-size: 14px;
    line-height: 2.05;
    letter-spacing: .06em;
}
.ondee-hero-cue {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    opacity: .6;
    animation: ondee-cue 2.8s ease-in-out infinite;
}
@keyframes ondee-cue { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }

@media (max-width: 899px) {
    .ondee-hero { height: 62vh; height: 62svh; min-height: 420px; margin-top: -64px; }
    .ondee-hero-inner { width: 100%; padding: 0 28px 7vh; }
    .ondee-hero-welcome { font-size: 13.5px; }
    .ondee-hero-cue { display: none; }
}

/* ========================================
   7. 一覧の頁頭（category / page / search / archive）— 海を短く見せて題を海の上に
   ======================================== */
.ondee-page-head {
    width: min(var(--feed), calc(100% - 32px));
    margin: 0 auto;
    min-height: 30vh;
    padding: 9vh 4px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--hero-ink);
    text-shadow: var(--hero-shadow);
}
.ondee-page-kicker {
    margin: 0 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-latin);
    font-size: 15px;
    font-style: italic;
    letter-spacing: .08em;
    color: var(--hero-ink);
}
a.ondee-page-back:hover { color: var(--hero-ink); text-decoration: underline; text-underline-offset: 4px; }
.ondee-page-title {
    margin: 0;
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .06em;
}
.ondee-page-head .ondee-hero-rule { margin: 18px 0 0; }
.ondee-page-desc { margin: 16px 0 0; font-size: 14px; letter-spacing: .05em; max-width: 34em; }

/* ========================================
   8. 文章カード
   ======================================== */
.ondee-main { padding-bottom: 24px; }
.ondee-feed {
    width: min(var(--feed), calc(100% - 32px));
    margin: 0 auto;
}
.ondee-main--home .ondee-feed { margin-top: 8px; }
.ondee-cards { display: flex; flex-direction: column; gap: 18px; }

.ondee-card {
    position: relative;
    padding: 28px 34px 26px;
    transition: transform .35s ease, background-color .3s ease, box-shadow .3s ease, opacity .6s ease;
}
.ondee-card:hover { transform: translateY(-2px); background: var(--glass-strong); }
.ondee-card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.ondee-card-link:focus-visible { outline-offset: -3px; }

.ondee-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.ondee-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 11px 3px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent-ink);
    font-family: var(--font-latin);
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: .06em;
}
.ondee-badge-label { font-style: italic; }
.ondee-badge-num { font-weight: 600; }
.ondee-badge--star { padding: 2px 10px 3px; font-size: 12px; }
.ondee-card-date { font-family: var(--font-latin); font-size: 15px; font-weight: 500; letter-spacing: .06em; color: var(--ink-soft); }
.ondee-card-cat { letter-spacing: .08em; }
.ondee-card-cat::before { content: ''; display: inline-block; width: 14px; height: 1px; margin-right: 10px; vertical-align: middle; background: currentColor; opacity: .6; }

.ondee-card-title {
    margin: 14px 0 10px;
    font-size: clamp(21px, 2.4vw, 25px);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .05em;
    color: var(--ink);
}
.ondee-card-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.95;
    color: var(--ink-soft);
}
.ondee-card-more {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 16px;
    letter-spacing: .03em;
    color: var(--accent-ink);
    transition: transform .3s ease;
}
.ondee-card:hover .ondee-card-more { transform: translateX(3px); }

@media (max-width: 599px) {
    .ondee-card { padding: 22px 22px 20px; }
    .ondee-card-title { font-size: 20px; }
}

/* フェードイン（動きを減らす設定では最初から見えている） */
@media (prefers-reduced-motion: no-preference) {
    .js .ondee-reveal:not(.is-visible) { opacity: 0; transform: translateY(14px); }
    .ondee-reveal { transition: opacity .7s ease, transform .7s ease, background-color .3s ease; }
}

/* 連載一覧へ（すりガラスのカプセル） */
.ondee-btn-wrap { display: flex; justify-content: center; margin: 34px 0 10px; }
.ondee-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 26px;
    font-size: 14px;
    letter-spacing: .14em;
    color: var(--ink);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.ondee-pill:hover { background: var(--glass-strong); color: var(--accent-ink); transform: translateY(-1px); }

/* ========================================
   9. 小さな三枚（プロフィール／瓶の中の手紙／タグ）
   ======================================== */
.ondee-trio {
    width: min(var(--feed), calc(100% - 32px));
    margin: 36px auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 広い画面のホーム：カード列（左）＋三枚の側欄（右・sticky）。外枠はナビと同じ --wide、
   カード列の左端＝ナビ／開場の海の文字の左端にそろえる */
@media (min-width: 1100px) {
    .ondee-home-grid {
        width: min(var(--wide), calc(100% - 32px));
        margin: 8px auto 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 28px;
        align-items: start;
    }
    .ondee-home-grid .ondee-feed { width: auto; margin: 0; }
    .ondee-home-grid .ondee-trio { width: auto; margin: 0; }
    .ondee-home-grid .ondee-quote-text { font-size: 16.5px; }   /* 醉舟の一行目（約 44 字）を側欄幅で折らずに収める */
    .ondee-hero-inner { padding-left: 34px; }   /* カード内の文字の左端（padding 34px）とそろえる */
}
/* 手机：欢迎语二行目（24 字）が「す。」だけ次行に落ちないよう、字距を詰めて一行に収める */
@media (max-width: 599px) {
    .ondee-hero-welcome { font-size: 13.5px; letter-spacing: .02em; }
}
@media (min-width: 1100px) and (min-height: 760px) {
    .ondee-home-grid .ondee-trio { position: sticky; top: 88px; }
}
.ondee-mini { padding: 22px 24px; font-size: 13.5px; }
.ondee-mini-label {
    display: block;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: .2em;
    color: var(--ink-soft);
}

.ondee-profile-head { display: flex; align-items: center; gap: 14px; }
.ondee-profile-avatar img { display: block; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--glass-edge); }
.ondee-profile-name { font-family: var(--font-latin); font-size: 20px; font-weight: 500; line-height: 1.2; }
.ondee-profile-greeting { font-size: 12.5px; color: var(--ink-soft); letter-spacing: .06em; }
.ondee-profile-bio { margin: 14px 0 0; line-height: 1.95; color: var(--ink); }
.ondee-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
    text-align: center;
}
.ondee-profile-stat { display: flex; flex-direction: column; font-size: 11.5px; color: var(--ink-soft); letter-spacing: .08em; }
.ondee-profile-stat .ondee-num { font-size: 22px; line-height: 1.2; color: var(--ink); }

.ondee-quote-text {
    margin: 0;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink);
}
.ondee-verse { display: block; padding-left: 1em; text-indent: -1em; }
.ondee-quote-cite {
    margin: 14px 0 0;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 14.5px;
    color: var(--ink-soft);
    text-align: right;
}

.ondee-tags-body { display: flex; flex-wrap: wrap; gap: 8px; }
.ondee-chip {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12.5px !important;          /* wp_tag_cloud が inline で入れる値に勝つ（style 属性は PHP 側でも外している） */
    letter-spacing: .05em;
    color: var(--ink);
    background: var(--chip);
    border: 1px solid var(--hairline);
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease;
}
.ondee-chip:hover { background: var(--chip-hover); color: var(--accent-ink); }

/* ========================================
   10. フッター（薄いすりガラス帯・最上段に小さな仏語の詩）
   ======================================== */
.ondee-footer {
    width: min(var(--wide), calc(100% - 32px));
    margin: 56px auto 16px;
    padding: 30px 24px 22px;
    text-align: center;
    border-radius: var(--r-card);
}
.ondee-footer-poem { margin: 0 auto; }
.ondee-footer-poem-text {
    margin: 0;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--ink-soft);
}
.ondee-footer-poem-cite {
    margin: 8px 0 0;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 13px;
    letter-spacing: .03em;
    color: var(--ink-soft);
}
.ondee-footer-rule { display: block; width: 40px; height: 1px; margin: 20px auto 18px; background: var(--hairline); }
.ondee-footer-name { font-family: var(--font-latin); font-size: 24px; font-weight: 500; line-height: 1.2; }
.ondee-footer-sub { margin-top: 4px; font-size: 12.5px; letter-spacing: .22em; color: var(--ink-soft); }
.ondee-footer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 20px;
    margin-top: 16px;
    font-size: 11.5px;
    letter-spacing: .05em;
    color: var(--ink-soft);
}
.ondee-footer-bar span { text-wrap: balance; }
.ondee-footer-bar span:first-child { font-family: var(--font-latin); font-size: 13px; }

/* ========================================
   11. 個別記事 — 一枚の大きなすりガラス板
   ======================================== */
.ondee-read { padding-top: 84px; }
.ondee-read-pane {
    width: min(92vw, 880px);
    margin: 0 auto;
    padding: 56px clamp(24px, 8%, 80px) 48px;
    border-radius: 24px;
}
.ondee-read-head { text-align: center; padding-bottom: 30px; border-bottom: 1px solid var(--hairline); }
.ondee-read-kicker { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.ondee-read-cat { font-size: 12.5px; letter-spacing: .12em; color: var(--ink-soft); }
.ondee-read-cat:hover { color: var(--accent-ink); }
.ondee-read-title {
    margin: 18px 0 14px;
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: .06em;
}
.ondee-read-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.ondee-read-meta .ondee-num { font-size: 15px; }
.ondee-read-meta-fr { font-family: var(--font-latin); font-style: italic; font-size: 14px; letter-spacing: .06em; }
.ondee-work-info { display: inline; }
.ondee-work-info a { color: var(--ink-soft); border-bottom: 1px solid var(--hairline); }
.ondee-work-info a:hover { color: var(--accent-ink); }
.ondee-info-sep { opacity: .5; margin: 0 4px; }

.ondee-font-size {
    display: inline-flex;
    gap: 2px;
    margin-top: 18px;
    padding: 3px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
}
.ondee-font-size button {
    width: 34px;
    height: 28px;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--ink-soft);
}
.ondee-font-size button:hover { color: var(--ink); }
.ondee-font-size button.active { background: var(--chip-hover); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* 本文 — 一行約 40 字（字号に追従する em 幅）・行高 2 */
#ondee-article-body {
    max-width: 40em;
    margin: 36px auto 0;
    font-size: 17px;
    line-height: 2;
    letter-spacing: .03em;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.post-content p { margin: 0 0 1em; }
.post-content h2, .post-content h3, .post-content h4 { font-weight: 500; line-height: 1.6; letter-spacing: .05em; margin: 2em 0 .8em; }
.post-content h2 { font-size: 1.3em; }
.post-content h3 { font-size: 1.15em; }
.post-content a { color: var(--accent-ink); border-bottom: 1px solid currentColor; }
.post-content a:hover { color: var(--accent); }
.post-content img, .post-content canvas { display: block; margin: 1.6em auto; border-radius: 12px; }
.post-content figure { margin: 1.6em 0; }
.post-content figcaption { font-size: .8em; color: var(--ink-soft); text-align: center; }
.post-content blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.2em; border-left: 2px solid var(--accent); color: var(--ink-soft); }
.post-content hr { border: 0; text-align: center; margin: 2.4em 0; }
.post-content hr::before { content: '✦  ✦  ✦'; color: var(--ink-soft); font-size: .8em; letter-spacing: .4em; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content pre { overflow-x: auto; padding: 1em; border-radius: 12px; background: var(--chip); font-size: .85em; }
.post-content table { width: 100%; border-collapse: collapse; font-size: .9em; display: block; overflow-x: auto; }
.post-content td, .post-content th { padding: .5em .8em; border-bottom: 1px solid var(--hairline); }

.ondee-farewell {
    max-width: 40em;
    margin: 36px auto 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.ondee-farewell-line { font-family: var(--font-latin); font-style: italic; font-size: 17px; color: var(--ink-soft); }
.ondee-farewell-sign { font-family: var(--font-latin); font-style: italic; font-size: 30px; font-weight: 500; line-height: 1.3; }
.ondee-farewell-star { font-style: normal; font-size: 15px; color: var(--accent); vertical-align: middle; }

/* 板の下：章節ナビ（一条三格）・全話一覧・戻る */
.ondee-read-after {
    width: min(92vw, 760px);
    margin: 22px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ondee-chapter-nav {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    border-radius: 18px;
    overflow: hidden;
}
.ondee-nav-cell { display: flex; align-items: center; font-size: 14px; letter-spacing: .12em; }
.ondee-nav-cell a, .ondee-nav-cell span, .ondee-nav-cell button { display: block; width: 100%; padding: 16px 20px; }
.ondee-nav-cell--prev { justify-content: flex-start; }
.ondee-nav-cell--next { justify-content: flex-end; text-align: right; }
.ondee-nav-cell--index { border-left: 1px solid var(--hairline); border-right: 1px solid var(--hairline); }
.ondee-nav-cell--index button { padding: 16px 26px; letter-spacing: .14em; }
.ondee-nav-cell a:hover, .ondee-nav-cell button:hover { background: var(--chip); color: var(--accent-ink); }
.ondee-nav-cell button[aria-expanded="true"] { color: var(--accent-ink); }
.ondee-nav-cell.is-empty span { color: var(--ink-soft); opacity: .55; }

.ondee-toc { width: 100%; }
.ondee-toc-list {
    margin-top: 10px;
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
    background: var(--glass-strong);
    border-radius: 18px;
}
.ondee-toc-item { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.ondee-toc-item:hover { background: var(--chip); }
.ondee-toc-item.is-current { color: var(--accent-ink); background: var(--chip); }
.ondee-toc-num { font-family: var(--font-latin); font-weight: 500; font-size: 15px; min-width: 1.6em; color: var(--ink-soft); }

.ondee-read-return {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding: 8px 18px;
    font-family: var(--font-latin);
    font-style: italic;
    font-size: 16px;
    color: var(--ink);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
}
.ondee-read-return:hover { color: var(--accent-ink); background: var(--glass-strong); }

@media (max-width: 599px) {
    .ondee-read { padding-top: 70px; }
    .ondee-read-pane { width: calc(100% - 20px); padding: 36px 20px 32px; border-radius: 20px; }
    #ondee-article-body { margin-top: 28px; }
    .ondee-read-meta-sep { display: none; }          /* 折り返すと行末に「·」だけ残るので */
    .ondee-work-info { flex-basis: 100%; }
    .ondee-read-after { width: calc(100% - 20px); }
    .ondee-nav-cell { font-size: 13px; letter-spacing: .06em; }
    .ondee-nav-cell a, .ondee-nav-cell span, .ondee-nav-cell button { padding: 14px 12px; }
    .ondee-nav-cell--index button { padding: 14px 14px; }
}

/* ========================================
   12. コメント
   ======================================== */
.ondee-comments-section {
    width: min(92vw, 880px);
    margin: 22px auto 0;
    padding: 34px clamp(20px, 6%, 60px);
}
.ondee-main .ondee-comments-section { width: min(var(--feed), calc(100% - 32px)); }
.ondee-comments-title { margin: 0 0 18px; font-size: 18px; font-weight: 500; letter-spacing: .1em; }
.ondee-comments-count { font-family: var(--font-latin); color: var(--ink-soft); }
.ondee-comment-list, .ondee-comment-list .children { list-style: none; margin: 0; padding: 0; }
.ondee-comment-list .children { padding-left: 24px; }
.ondee-comment-list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.ondee-comment-list .comment-author { display: flex; align-items: center; gap: 10px; }
.ondee-comment-list .avatar { border-radius: 50%; }
.ondee-comment-list .says { display: none; }
.ondee-comment-list .comment-metadata { font-size: 12px; color: var(--ink-soft); }
.ondee-comment-list .comment-metadata a { color: var(--ink-soft); }
.ondee-comment-list .reply a { font-size: 12.5px; color: var(--accent-ink); }
.ondee-comments .comment-respond { margin-top: 18px; }
.ondee-comments .comment-reply-title { font-size: 16px; font-weight: 500; letter-spacing: .08em; }
.ondee-comments .comment-form p { margin: 0 0 14px; }
.ondee-comments .comment-form label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--ink-soft); }
.ondee-comments .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; }
.ondee-comments .comment-form-cookies-consent label { display: inline; margin: 0; }
.ondee-comments .form-submit .submit { min-height: 44px; cursor: pointer; font: inherit; font-size: 14px; letter-spacing: .14em; }
.ondee-comments textarea { min-height: 140px; resize: vertical; line-height: 1.8; }

/* ========================================
   13. category / page / search / 404
   ======================================== */
.ondee-work-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.ondee-work-tab {
    padding: 8px 22px;
    font-size: 13.5px;
    letter-spacing: .14em;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
}
.ondee-work-tab.active { background: var(--glass-strong); color: var(--accent-ink); }
.ondee-tab-panel { display: none; }
.ondee-tab-panel.active { display: block; }

.ondee-chapter-list { padding: 8px; }
.ondee-chapter-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    position: relative;
    border-radius: 14px;
    transition: background-color .2s ease;
}
/* 行間の細線は角丸に沿って曲がらないよう、左右を詰めた疑似要素で引く */
.ondee-chapter-row + .ondee-chapter-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: var(--hairline);
}
.ondee-chapter-row:hover { background: var(--chip); color: var(--ink); }
.ondee-chapter-row:hover::before, .ondee-chapter-row:hover + .ondee-chapter-row::before { opacity: 0; }
.ondee-chapter-num { font-family: var(--font-latin); font-weight: 600; font-size: 17px; color: var(--accent-ink); letter-spacing: .04em; }
.ondee-chapter-title { font-size: 15.5px; letter-spacing: .05em; min-width: 0; }
.ondee-chapter-meta { font-family: var(--font-latin); font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.ondee-chapter-chev { color: var(--ink-soft); }
@media (max-width: 599px) {
    .ondee-chapter-row { grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 14px 12px; }
    .ondee-chapter-meta { grid-column: 2; grid-row: 2; font-size: 13px; }
    .ondee-chapter-chev { grid-column: 3; grid-row: 1 / span 2; }
}

.ondee-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ondee-gallery-item { display: block; overflow: hidden; }
.ondee-gallery-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.ondee-gallery-title { padding: 10px 14px; font-size: 13.5px; }

.ondee-page-pane {
    width: min(var(--feed), calc(100% - 32px));
    margin: 0 auto;
    padding: 40px clamp(22px, 7%, 64px);
    border-radius: 24px;
}
.ondee-page-pane .post-content { font-size: 15.5px; line-height: 2; }

.ondee-search-item { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.ondee-search-item:first-child { padding-top: 0; }
.ondee-search-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ondee-search-item time { font-size: 14px; color: var(--ink-soft); }
.ondee-search-item-title { margin: 4px 0 6px; font-size: 18px; font-weight: 500; letter-spacing: .05em; }
.ondee-search-item-excerpt { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.ondee-empty-text { margin: 0; text-align: center; color: var(--ink-soft); }

.ondee-empty { padding: 48px 24px; text-align: center; color: var(--ink-soft); }
.ondee-empty-star { font-size: 18px; color: var(--accent); }

.ondee-pagination { display: flex; justify-content: center; gap: 6px; margin: 30px 0 0; flex-wrap: wrap; }
.ondee-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    font-family: var(--font-latin);
    font-size: 16px;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
}
.ondee-pagination .page-numbers.current { background: var(--glass-strong); color: var(--accent-ink); }

.ondee-404-main { min-height: 72vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.ondee-404 { width: min(480px, 100%); padding: 44px 30px; text-align: center; }
.ondee-404-num { font-family: var(--font-latin); font-size: 72px; font-weight: 500; line-height: 1; }
.ondee-404-text { text-wrap: balance; margin: 16px 0 26px; font-size: 14.5px; letter-spacing: .06em; }
.ondee-404-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ========================================
   14. 動きを減らす設定
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
