/* ============================================================
   i.Encyclopedia — フロントエンドスタイル
   i_encyclopedia.html から完全移植 + WordPress対応
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@200;300;400;500;600;700;900&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700&family=Crimson+Pro:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap');

:root {
    --bg: #f5f2ec;
    --bg-warm: #eee9e0;
    --surface: #faf8f4;
    --surface-hover: #f7f4ed;
    --ink: #1a1715;
    --text: #2e2a25;
    --text-mid: #6b6358;
    --text-light: #9b9285;
    --sumi: #2c2825;
    --shu: #8b3a3a;
    --shu-soft: rgba(139, 58, 58, 0.08);
    --border: #d8d0c4;
    --border-light: #e5dfd5;
    --border-subtle: #ede8e0;
    --px: clamp(20px, 5vw, 80px);
}

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

html {
    scroll-behavior: smooth;
}

body.enc-page {
    background: var(--bg);
    color: var(--text);
    font-family: 'Noto Serif JP', serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   VERTICAL BANNER
   ============================ */
.enc-vertical-banner {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 52px;
    background: var(--sumi);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    animation: encSlideRight 0.8s ease 0.2s forwards;
}

.enc-vertical-banner .v-text {
    writing-mode: vertical-rl;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.enc-vertical-banner .v-accent {
    position: absolute;
    top: 20px;
    width: 16px;
    height: 2px;
    background: var(--shu);
}

.enc-vertical-banner .v-bottom {
    position: absolute;
    bottom: 24px;
    writing-mode: vertical-rl;
    font-family: 'Noto Serif JP', serif;
    font-size: 8px;
    font-weight: 300;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.2);
}

.enc-page-inner {
    margin-left: 52px;
}

/* ============================
   HEADER
   ============================ */
.enc-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 64px var(--px) 48px;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 0.4s forwards;
    flex-wrap: wrap;
    gap: 24px;
}

.enc-header h1 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: clamp(44px, 7vw, 80px);
    letter-spacing: 4px;
    color: var(--ink);
    line-height: 1.1;
}

.enc-header h1 .i-dot {
    color: var(--shu);
}

.enc-header-subtitle {
    font-weight: 300;
    font-size: clamp(14px, 2vw, 20px);
    letter-spacing: 4px;
    color: var(--text-mid);
    margin-top: 10px;
}

.enc-header-tagline {
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 26px);
    letter-spacing: 5px;
    color: var(--ink);
    margin-top: 28px;
}

.enc-header-desc {
    font-weight: 300;
    font-size: clamp(12px, 1.5vw, 15px);
    letter-spacing: 2px;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.8;
}

.enc-header-nav {
    display: flex;
    gap: 28px;
    flex-shrink: 0;
}

.enc-header-nav a {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-mid);
    text-decoration: none;
    transition: color 0.3s;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}

.enc-header-nav a:hover {
    color: var(--shu);
    border-bottom-color: var(--shu);
}

.enc-index-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 28px;
    font-size: 14px;
    letter-spacing: 3px;
    font-weight: 500;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    font-family: 'Noto Serif JP', serif;
    transition: all 0.2s;
}

.enc-index-btn:hover {
    background: var(--ink);
    color: var(--bg);
}

/* ============================
   SEARCH
   ============================ */
.enc-search-area {
    padding: 40px var(--px);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 0.6s forwards;
    position: relative;
    z-index: 300;
}

.enc-search-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 5px;
    color: var(--text-light);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.enc-search-field {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 720px;
}

.enc-search-field input {
    flex: 1;
    min-width: 0;
    padding: 14px 0;
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(16px, 3vw, 24px);
    font-weight: 300;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--sumi);
    outline: none;
    letter-spacing: 3px;
    transition: border-color 0.3s;
}

.enc-search-field input:focus {
    border-bottom-color: var(--shu);
}

.enc-search-field input::placeholder {
    color: var(--border);
    font-weight: 200;
}

.enc-search-btn {
    font-family: 'Noto Serif JP', serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 3px;
    color: #fff;
    background: var(--sumi);
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-end;
}

.enc-search-btn:hover {
    background: var(--shu);
}

/* Search Dropdown */
.enc-search-dropdown {
    position: absolute;
    left: var(--px);
    right: var(--px);
    max-width: 720px;
    top: calc(100% - 1px);
    background: #ffffff;
    border: 1px solid var(--border);
    border-top: 2px solid var(--sumi);
    z-index: 500;
    display: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.enc-search-dropdown.active {
    display: block;
}

.enc-sdi {
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s;
}

.enc-sdi:last-child {
    border-bottom: none;
}

.enc-sdi:hover {
    background: var(--bg);
}

.enc-sdi h4 {
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 2px;
    color: var(--ink);
    margin-bottom: 2px;
}

.enc-sdi .sdi-en {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-style: italic;
    color: var(--text-mid);
    margin-bottom: 4px;
}

.enc-sdi .sdi-field {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--shu);
}

.enc-search-no-result {
    padding: 20px 24px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ============================
   五十音 INDEX
   ============================ */
.enc-gojuon {
    padding: 20px var(--px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 0.75s forwards;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.enc-index-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.enc-gojuon-row {
    display: flex;
    gap: 2px;
    flex-wrap: nowrap;
    align-items: center;
}

.enc-gojuon-char {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.enc-gojuon-char:hover {
    color: var(--shu);
    background: var(--shu-soft);
}

.enc-gojuon-char.active {
    background: var(--sumi);
    color: #fff;
    border-color: var(--sumi);
}

.enc-gojuon-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 6px;
    flex-shrink: 0;
}

.enc-alpha-char {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 14px;
}

/* ============================
   CATEGORY TABS
   ============================ */
.enc-category-tabs {
    padding: 0 var(--px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 0.85s forwards;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.enc-tab-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    margin-right: 12px;
    flex-shrink: 0;
    align-self: center;
}

.enc-tab-toggle-btn {
    font-family: 'Noto Serif JP', serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.enc-tab-toggle-btn:first-child {
    border-radius: 3px 0 0 3px;
    border-right: none;
}

.enc-tab-toggle-btn:last-child {
    border-radius: 0 3px 3px 0;
}

.enc-tab-toggle-btn.active {
    background: var(--sumi);
    color: #fff;
    border-color: var(--sumi);
}

.enc-tab-toggle-btn:not(.active):hover {
    border-color: var(--text-mid);
    color: var(--text-mid);
}

.enc-cat-tab {
    padding: 18px 24px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-mid);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.enc-cat-tab:hover {
    color: var(--ink);
}

.enc-cat-tab.active {
    color: var(--ink);
    border-bottom-color: var(--shu);
    font-weight: 500;
}

.enc-cat-tab .tab-count {
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-style: italic;
    color: var(--text-light);
    margin-left: 6px;
}

/* ============================
   TWO COLUMNS（最近の追加 + 注目）
   ============================ */
.enc-two-col {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 1s forwards;
}

.enc-col {
    padding: 52px var(--px) 60px;
}

.enc-col:first-child {
    border-right: 1px solid var(--border);
}

.enc-col-label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.enc-col-label .line {
    width: 24px;
    height: 2px;
    background: var(--shu);
    flex-shrink: 0;
}

.enc-col-label span {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 5px;
    color: var(--text-light);
}

/* Entry List（最近の追加） */
.enc-entry-li {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.enc-entry-li::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--shu);
    transition: width 0.3s;
}

.enc-entry-li:hover {
    padding-left: 16px;
}

.enc-entry-li:hover::before {
    width: 12px;
}

.enc-entry-li:last-child {
    border-bottom: none;
}

.enc-entry-li h3 {
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 22px);
    letter-spacing: 3px;
    color: var(--ink);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.enc-entry-li h3 .reading {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 1px;
}

.enc-entry-li .field-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-left: auto;
}

.enc-entry-li .field-tag {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 2px;
    padding: 2px 8px;
    border-radius: 2px;
}

.enc-entry-li .en {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.enc-entry-li p {
    font-size: 14px;
    font-weight: 300;
    line-height: 2;
    color: var(--text-mid);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Featured */
.enc-featured-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--shu);
    border: 1.5px solid var(--shu);
    padding: 5px 16px;
    margin-bottom: 28px;
}

.enc-featured h2 {
    font-weight: 900;
    font-size: clamp(30px, 5vw, 52px);
    letter-spacing: 6px;
    color: var(--ink);
    margin-bottom: 4px;
    line-height: 1.2;
    cursor: pointer;
}

.enc-featured .en {
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 2vw, 20px);
    font-style: italic;
    color: var(--text-mid);
    margin-bottom: 28px;
    letter-spacing: 2px;
}

.enc-featured-body {
    font-weight: 300;
    font-size: clamp(15px, 1.8vw, 17px);
    line-height: 2.3;
    color: var(--text);
    text-align: justify;
}

.enc-featured-body .first-char {
    font-size: clamp(52px, 8vw, 76px);
    font-weight: 900;
    float: left;
    line-height: 0.85;
    padding: 6px 14px 0 0;
    color: var(--shu);
}

.enc-featured-formula {
    text-align: center;
    padding: 32px 16px;
    margin: 28px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-family: 'Crimson Pro', serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 300;
    letter-spacing: 8px;
    color: var(--sumi);
    font-style: italic;
}

.enc-featured-related {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.enc-featured-related-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.enc-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.enc-related-tag {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-mid);
    padding: 7px 18px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.enc-related-tag:hover {
    border-color: var(--shu);
    color: var(--shu);
    background: var(--shu-soft);
}

/* ============================
   RESULTS AREA
   ============================ */
.enc-results-area {
    padding: 56px var(--px);
    border-bottom: 1px solid var(--border);
    display: none;
}

.enc-results-area.active {
    display: block;
}

.enc-results-area .enc-col-label {
    margin-bottom: 24px;
}

.enc-result-count {
    font-size: 13px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 28px;
}

.enc-results-empty {
    text-align: center;
    padding: 48px 24px;
    font-size: 16px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 2px;
}

/* ============================
   ENTRY CARDS（共通）
   ============================ */
.enc-entries-full {
    padding: 56px var(--px);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 1.15s forwards;
}

.enc-entries-full .enc-col-label {
    margin-bottom: 36px;
}

.enc-entries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.enc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.enc-card {
    background: var(--surface);
    padding: 36px 28px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

.enc-card-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.enc-card:hover {
    background: var(--surface-hover);
}

.enc-card-num {
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 14px;
}

.enc-card h3 {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--ink);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.enc-card h3 .reading {
    font-size: 11px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 1px;
}

.enc-card .en {
    font-family: 'Playfair Display', serif;
    font-size: 12px;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 14px;
}

.enc-card p {
    font-size: 13px;
    font-weight: 300;
    line-height: 2;
    color: var(--text-mid);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.enc-card-fields {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.enc-card-field-tag {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 3px;
    padding: 2px 8px;
    border-radius: 2px;
}

/* ============================
   BOTTOM STATS
   ============================ */
.enc-bottom-band {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: encFadeUp 0.8s ease 1.3s forwards;
}

.enc-band-item {
    padding: 44px 16px;
    text-align: center;
    border-right: 1px solid var(--border);
    transition: background 0.3s;
}

.enc-band-item:last-child {
    border-right: none;
}

.enc-band-item:hover {
    background: var(--bg-warm);
}

.enc-band-item .num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.enc-band-item .label {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-light);
}

/* ============================
   ï LINK
   ============================ */
.enc-i-link-section {
    padding: 56px var(--px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-bottom: 1px solid var(--border);
}

.enc-i-link-rule {
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: var(--border);
}

.enc-i-link-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s;
}

.enc-i-link-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--border);
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-style: italic;
    color: var(--ink);
    transition: all 0.3s;
}

.enc-i-link-center:hover .enc-i-link-box {
    background: var(--sumi);
    color: #fff;
    border-color: var(--sumi);
}

.enc-i-link-label {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--text-light);
    transition: color 0.3s;
}

.enc-i-link-center:hover .enc-i-link-label {
    color: var(--shu);
}

/* ============================
   FOOTER
   ============================ */
.enc-footer {
    padding: 36px var(--px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.enc-footer-jp {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--text-light);
}

.enc-footer-en {
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-style: italic;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ============================
   MODAL
   ============================ */
.enc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 23, 21, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.enc-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.enc-modal {
    background: var(--surface);
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 48px 44px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    border-top: 3px solid var(--shu);
}

.enc-modal-overlay.active .enc-modal {
    transform: translateY(0);
}

.enc-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.2s;
    line-height: 1;
    padding: 4px;
}

.enc-modal-close:hover {
    color: var(--shu);
}

.enc-modal-no {
    font-family: 'Playfair Display', serif;
    font-size: 11px;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 6px;
}

.enc-modal-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.enc-modal-field-tag {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 3px;
    padding: 4px 12px;
    border-radius: 3px;
}

.enc-modal h2 {
    font-weight: 900;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: 5px;
    color: var(--ink);
    margin-bottom: 4px;
    line-height: 1.25;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.enc-modal h2 .modal-reading {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-light);
    letter-spacing: 1px;
}

.enc-modal .modal-en {
    font-family: 'Playfair Display', serif;
    font-size: clamp(14px, 2vw, 18px);
    font-style: italic;
    color: var(--text-mid);
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.enc-modal .modal-formula {
    text-align: center;
    padding: 24px 16px;
    margin: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    font-family: 'Crimson Pro', serif;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 300;
    letter-spacing: 6px;
    color: var(--sumi);
    font-style: italic;
}

.enc-modal .modal-body {
    font-weight: 300;
    font-size: 15px;
    line-height: 2.2;
    color: var(--text);
    text-align: justify;
    margin-bottom: 24px;
}

.enc-modal .modal-related {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.enc-modal .modal-related-label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.enc-modal .modal-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.enc-modal .modal-related-tag {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text-mid);
    padding: 6px 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
}

.enc-modal .modal-related-tag:hover {
    border-color: var(--shu);
    color: var(--shu);
    background: var(--shu-soft);
}

/* モーダル: 更に深掘る（カード型） */
.enc-modal .modal-dig-deeper {
    margin-top: 24px;
    padding: 18px 22px;
    border-radius: 10px;
    background: var(--shu-soft);
    border-left: 3px solid var(--shu);
}

.enc-modal .modal-dig-deeper-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--shu);
    margin-bottom: 10px;
}

.enc-modal .modal-dig-deeper-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.enc-modal .modal-dig-deeper-link,
.enc-modal .modal-dig-deeper-text {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

.enc-modal .modal-dig-deeper-link {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, color 0.3s;
    width: fit-content;
}

.enc-modal .modal-dig-deeper-link:hover {
    color: var(--shu);
    border-bottom-color: var(--shu);
}

/* ============================
   目次オーバーレイ
   ============================ */
.enc-index-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
}

.enc-index-overlay.show {
    display: block;
}

.enc-index-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px var(--px) 80px;
}

.enc-index-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.enc-index-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    margin: 0 0 8px;
    letter-spacing: 3px;
    color: var(--ink);
}

.enc-index-sub {
    font-size: 15px;
    color: var(--text-light);
}

.enc-index-close {
    padding: 10px 24px;
    font-size: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'Noto Serif JP', serif;
    letter-spacing: 2px;
    transition: all 0.2s;
}

.enc-index-close:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.enc-index-section-title {
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 12px;
    letter-spacing: 1px;
    color: var(--ink);
}

.enc-index-section {
    margin-bottom: 40px;
}

.enc-index-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.enc-index-item:hover {
    background: var(--surface-hover);
}

.enc-index-item-no {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    min-width: 32px;
}

.enc-index-item-name {
    font-size: 17px;
    color: var(--ink);
    font-weight: 500;
}

.enc-index-item-yomi {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 400;
}

.enc-index-footer {
    text-align: center;
    padding: 40px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.enc-index-footer-text {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 3px;
}

/* ============================
   目次オーバーレイ
   ============================ */
.enc-index-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 2000;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    display: none;
}

.enc-index-overlay.show {
    display: block;
}

.enc-index-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px var(--px) 80px;
}

.enc-index-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.enc-index-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    margin: 0 0 8px;
    letter-spacing: 3px;
    font-family: 'Playfair Display', serif;
    color: var(--ink);
}

.enc-index-sub {
    font-size: 15px;
    color: var(--text-light);
}

.enc-index-close {
    padding: 10px 24px;
    font-size: 14px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-mid);
    cursor: pointer;
    font-family: 'Noto Serif JP', serif;
    letter-spacing: 2px;
    transition: all 0.2s;
}

.enc-index-close:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.enc-index-section-title {
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.enc-index-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}

.enc-index-item:hover {
    background: var(--surface-hover);
}

.enc-index-item-no {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    min-width: 32px;
}

.enc-index-item-name {
    font-size: 17px;
    color: var(--ink);
    font-weight: 500;
}

.enc-index-item-yomi {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 400;
}

.enc-index-footer {
    text-align: center;
    padding: 40px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

.enc-index-footer-text {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 3px;
}

/* ローディング */
.enc-loading {
    text-align: center;
    padding: 80px;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--text-light);
}

/* ============================
   ANIMATIONS
   ============================ */
@keyframes encFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes encSlideRight {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================
   MOBILE
   ============================ */
@media (max-width: 900px) {
    .enc-vertical-banner {
        display: none;
    }

    .enc-page-inner {
        margin-left: 0;
    }

    .enc-two-col {
        grid-template-columns: 1fr;
    }

    .enc-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .enc-header-nav {
        gap: 20px;
    }

    .enc-modal {
        padding: 36px 24px;
    }

    .enc-bottom-band {
        grid-template-columns: 1fr;
    }

    .enc-band-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ============================
   MOBILE (< 640px)
   ============================ */
@media (max-width: 640px) {
    .enc-header { padding: 40px 20px 32px; }
    .enc-header h1 { font-size: 38px; letter-spacing: 2px; }
    .enc-header-subtitle { font-size: 15px; letter-spacing: 2px; }
    .enc-header-tagline { font-size: 18px; max-width: 100%; margin-top: 20px; }
    .enc-header-desc { font-size: 13px; }
    
    .enc-search-field input { font-size: 18px; }
    
    .enc-category-tabs, .enc-gojuon { padding: 0 16px; }
    .enc-cat-tab { padding: 14px 16px; font-size: 15px; }
    
    .enc-col { padding: 32px 20px; }
    .enc-entry-li h3 { font-size: 18px; }
    
    .enc-featured h2 { font-size: 26px; }
    .enc-featured-body { font-size: 16px; }
    
    .enc-entries-full, .enc-search-area { padding: 32px 16px 60px; }
    .enc-entries-grid, .enc-results-grid { grid-template-columns: 1fr; gap: 1px; }
    .enc-card { padding: 24px 20px; }
    
    .enc-modal-overlay { padding: 0; align-items: flex-end; }
    .enc-modal { border-radius: 16px 16px 0 0; max-height: 92vh; padding: 32px 20px 48px; border: none; }
    
    .enc-single-wrap { padding: 0 20px 60px; margin: 40px auto; }
    .enc-single-title { font-size: 28px; }
    .enc-single-body { font-size: 16px; }
    
    .enc-index-inner { padding: 48px 20px 80px; }
    .enc-index-header { margin-bottom: 32px; }
    .enc-index-title { font-size: 32px; }
    .enc-index-sub { font-size: 14px; }
    .enc-index-footer { padding: 40px 0 0; }
}