:root {
    --bg-darker: #020617;
    --primary: #10b981; /* Emerald for Yuanzhu */
    --primary-glow: rgba(16, 185, 129, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --wangzhe: #f59e0b;
    --wangzhe-glow: rgba(245, 158, 11, 0.24);
    --transition: all 0.3s ease;
    
    --serif: 'Noto Serif SC', serif;
    --sans: 'Noto Sans SC', sans-serif;
}

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

body {
    font-family: var(--sans);
    background-color: var(--bg-darker);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Animated Blobs */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.2;
    animation: float 20s infinite alternate ease-in-out;
}
.shape1 { width: 600px; height: 600px; background: #047857; top: -100px; left: -100px; }
.shape2 { width: 500px; height: 500px; background: #059669; bottom: -100px; right: 10%; animation-delay: -5s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 1.5rem; }
.header-right { display: flex; align-items: center; gap: 1rem; }

.back-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: var(--transition);
}
.back-btn:hover { color: white; background: rgba(255,255,255,0.1); }

.view-toggle-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    border: 1px solid rgba(167, 243, 208, 0.35);
    color: white;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.22);
    transition: var(--transition);
    white-space: nowrap;
}
.view-toggle-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(16, 185, 129, 0.32); }

h1 { font-size: 1.4rem; font-weight: 700; color: #fff; }
h1 span { color: var(--text-muted); margin: 0 0.5rem; font-weight: 300; }

/* Search Box */
.search-box { position: relative; }
.search-box input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    width: 300px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 0.5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.search-result-item {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(16, 185, 129, 0.2); }
.item-category { font-size: 0.75rem; color: var(--primary); background: rgba(16,185,129,0.1); padding: 0.2rem 0.5rem; border-radius: 4px; }

/* Main App Container */
.app-container {
    flex: 1;
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    height: calc(100vh - 70px); /* subtract header */
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pane-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}
.pane-header h2 { font-size: 1.1rem; font-weight: 500; color: var(--primary); }
.icon-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.icon-btn:hover { color: white; }

/* Reader Pane */
.reader-pane { flex: 6; }
.reader-content { display: flex; flex: 1; overflow: hidden; }

.catalog-sidebar {
    width: 250px;
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    background: rgba(0,0,0,0.1);
    transition: width 0.3s;
}
.catalog-sidebar.collapsed { width: 0; border-right: none; }

#chapterList { list-style: none; }
#chapterList li {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    transition: var(--transition);
}
#chapterList li:hover { background: rgba(255,255,255,0.05); color: var(--primary); }
#chapterList li.active { background: rgba(16, 185, 129, 0.15); color: var(--primary); border-left: 3px solid var(--primary); }

.text-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 2;
    color: #e2e8f0;
}
.text-content h3 { text-align: center; margin-bottom: 2rem; font-size: 1.6rem; color: var(--primary); }
.text-content p { margin-bottom: 1rem; text-indent: 2em; }
.reader-entity {
    display: inline;
    border: none;
    border-bottom: 1px solid rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.1);
    color: #d1fae5;
    padding: 0 0.12em;
    border-radius: 4px;
    font: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.reader-entity:hover {
    color: #fff;
    background: rgba(16, 185, 129, 0.24);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.12);
}
.reader-entity-wangzhe {
    border-bottom-color: rgba(245, 158, 11, 0.72);
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
}
.reader-entity-wangzhe:hover {
    background: rgba(245, 158, 11, 0.28);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14);
}

/* Knowledge Pane */
.knowledge-pane { flex: 10; min-width: 0; }
.entity-content { padding: 2rem; flex: 1; overflow-y: auto; }

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.error-text { color: #fca5a5; }
.muted { color: var(--text-muted); }

/* Entity Overview */
.entity-browser { display: flex; flex-direction: column; gap: 1rem; }
.overview-summary {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: stretch;
    padding: 1.25rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
}
.overview-summary .eyebrow {
    color: var(--primary);
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.overview-summary h2 {
    font-size: 1.7rem;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}
.overview-summary p:last-child {
    color: #cbd5e1;
    line-height: 1.6;
}
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 0.6rem;
    min-width: 330px;
}
.metric-row div {
    padding: 0.9rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255,255,255,0.07);
}
.metric-row strong {
    display: block;
    color: #d1fae5;
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}
.metric-row span { color: var(--text-muted); font-size: 0.8rem; }

.category-tabs,
.letter-nav,
.sort-group,
.top-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.category-tabs {
    padding: 0.35rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.06);
}
.category-tabs button,
.letter-nav button,
.sort-group button,
.top-strip button {
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.category-tabs button {
    border: 1px solid transparent;
    color: #cbd5e1;
    background: transparent;
    border-radius: 6px;
    padding: 0.55rem 0.85rem;
    font-weight: 700;
}
.category-tabs button span { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.25rem; }
.category-tabs button:hover,
.category-tabs button.active {
    color: #fff;
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.14);
}

.entity-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.sort-group button {
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
}
.sort-group button:hover,
.sort-group button.active {
    color: #fff;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.16);
}
.entity-hint { color: var(--text-muted); font-size: 0.86rem; }

.letter-nav {
    position: sticky;
    top: -2rem;
    z-index: 5;
    padding: 0.65rem;
    border-radius: 8px;
    background: rgba(7, 18, 32, 0.92);
    border: 1px solid rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
}
.letter-nav button {
    width: 2.1rem;
    height: 2rem;
    border: 1px solid rgba(255,255,255,0.08);
    color: #cbd5e1;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    font-weight: 700;
}
.letter-nav button:first-child { width: auto; padding: 0 0.7rem; }
.letter-nav button:hover,
.letter-nav button.active {
    color: #fff;
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.18);
}
.letter-nav button:disabled {
    cursor: not-allowed;
    color: rgba(148, 163, 184, 0.32);
    border-color: rgba(255,255,255,0.04);
    background: rgba(255,255,255,0.015);
}

.top-strip {
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.07);
    border: 1px solid rgba(16, 185, 129, 0.14);
}
.top-strip > span {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    margin-right: 0.25rem;
}
.top-strip button {
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #d1fae5;
    background: rgba(15, 23, 42, 0.62);
    border-radius: 999px;
    padding: 0.4rem 0.65rem;
}
.top-strip button:hover { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.45); }
.top-strip em {
    color: var(--primary);
    font-style: normal;
    margin-left: 0.35rem;
}

.featured-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.featured-entity,
.entity-chip,
.back-overview-btn {
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.featured-entity {
    text-align: left;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
}
.featured-entity span {
    display: block;
    color: var(--primary);
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
}
.featured-entity strong { font-size: 1.1rem; }
.featured-entity:hover,
.entity-chip:hover {
    border-color: rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.14);
    transform: translateY(-2px);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.category-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.1rem;
    background: rgba(255,255,255,0.035);
}
.category-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.category-card-header h3 {
    color: var(--primary);
    font-size: 1.15rem;
}
.category-card-header span {
    color: var(--text-muted);
    font-size: 0.86rem;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.entity-chip {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(15, 23, 42, 0.72);
    color: #d1fae5;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
}

.entity-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.entity-row {
    display: grid;
    grid-template-columns: 2.3rem minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    width: 100%;
    min-height: 4.5rem;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.035);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}
.entity-row:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 185, 129, 0.42);
    background: rgba(16, 185, 129, 0.1);
}
.entity-row.has-wangzhe {
    grid-template-columns: 2.3rem minmax(0, 1fr) auto auto;
    border-color: rgba(245, 158, 11, 0.22);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(255,255,255,0.035) 58%);
}
.entity-row.has-wangzhe:hover {
    border-color: rgba(245, 158, 11, 0.48);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(16, 185, 129, 0.08) 64%);
}
.entity-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-weight: 900;
}
.entity-main { min-width: 0; }
.entity-main strong {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.wangzhe-inline-mark {
    flex: 0 0 auto;
    color: #451a03;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: 1px solid rgba(253, 230, 138, 0.5);
    border-radius: 999px;
    padding: 0.08rem 0.38rem;
    font-size: 0.68rem;
    font-weight: 900;
}
.entity-main span,
.entity-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.entity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    white-space: nowrap;
}
.entity-meta > span:first-child {
    color: #d1fae5;
    font-weight: 700;
}
.chapter-mini-list {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.chapter-mini-list em {
    position: relative;
    z-index: 1;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    font-style: normal;
    cursor: pointer;
}
.chapter-mini-list em:hover { color: #fff; background: rgba(16, 185, 129, 0.28); }
.wangzhe-row-action {
    border: 1px solid rgba(245, 158, 11, 0.38);
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 999px;
    padding: 0.42rem 0.68rem;
    font-family: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}
.wangzhe-row-action:hover {
    color: #fff7ed;
    border-color: rgba(245, 158, 11, 0.7);
    background: rgba(245, 158, 11, 0.22);
}

/* Entity Card Styles */
.entity-title { font-size: 2.2rem; font-weight: 700; margin-bottom: 1rem; }
.entity-summary { font-size: 1rem; line-height: 1.7; color: #cbd5e1; margin-bottom: 2rem; background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 12px; border-left: 4px solid var(--primary); }
.back-overview-btn {
    float: right;
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
}
.back-overview-btn:hover { background: rgba(16, 185, 129, 0.2); color: white; }
.wangzhe-callout {
    display: grid;
    grid-template-columns: 4.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.68));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.wangzhe-callout img {
    width: 4.4rem;
    height: 4.4rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.wangzhe-callout .eyebrow {
    color: var(--wangzhe);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}
.wangzhe-callout h3 {
    font-size: 1.18rem;
    margin-bottom: 0.25rem;
}
.wangzhe-callout h3 span {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    margin-left: 0.35rem;
}
.wangzhe-callout p:last-child {
    color: #cbd5e1;
    font-size: 0.9rem;
}
.wangzhe-callout button,
.wangzhe-official-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 158, 11, 0.42);
    color: #451a03;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    font-family: inherit;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.wangzhe-callout button:hover,
.wangzhe-official-link:hover {
    filter: brightness(1.08);
}
.alias-box,
.chapter-strip {
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.6rem; }
.tag-row span,
.mini-tag,
.chapter-strip span,
.chapter-strip button {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    color: #d1fae5;
    margin: 0 0.35rem 0.35rem 0;
    font-size: 0.88rem;
}
.chapter-strip button {
    border: 1px solid rgba(16, 185, 129, 0.14);
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
.chapter-strip button:hover { color: #fff; background: rgba(16, 185, 129, 0.22); border-color: rgba(16, 185, 129, 0.45); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.info-item {
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.info-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.info-value { font-size: 1rem; font-weight: 500; line-height: 1.65; overflow-wrap: anywhere; }
.history-list div,
.kv-list div { margin-bottom: 0.35rem; }
.kv-list span { color: var(--text-muted); }
.empty-inline {
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.events-list { margin-top: 2rem; }
.events-list h3 { margin-bottom: 1rem; color: var(--primary); font-size: 1.2rem; border-bottom: 1px solid var(--glass-border); padding-bottom: 0.5rem; }
.event-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.event-chapter { font-size: 0.85rem; color: var(--primary); margin-bottom: 0.3rem; }
.event-desc { font-size: 0.95rem; line-height: 1.6; color: #e2e8f0; margin-bottom: 0.5rem; }

.entity-link {
    display: inline-block;
    border: none;
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.entity-link:hover { background: var(--primary); color: white; }

.hidden { display: none !important; }
body.modal-open { overflow: hidden; }

.wangzhe-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(12px);
}
.wangzhe-modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1180px, 100%);
    max-height: min(88vh, 900px);
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 24px 70px rgba(0,0,0,0.56);
}
.wangzhe-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.wangzhe-modal-close:hover { border-color: rgba(245, 158, 11, 0.6); color: #fde68a; }
.wangzhe-hero-stage {
    position: relative;
    flex: 0 0 auto;
    aspect-ratio: 16 / 7;
    min-height: 280px;
    max-height: 520px;
    background: #050814;
}
.wangzhe-hero-stage > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}
.wangzhe-stage-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3.5rem 1.25rem 1.2rem;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0));
}
.wangzhe-stage-caption span {
    color: #fde68a;
    font-size: 1.25rem;
    font-weight: 900;
}
.wangzhe-hero-detail {
    overflow: visible;
    padding: 1.5rem;
}
.wangzhe-hero-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 3rem;
    margin-bottom: 1rem;
}
.wangzhe-hero-heading > img {
    width: 4.6rem;
    height: 4.6rem;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.wangzhe-hero-heading .eyebrow {
    color: var(--wangzhe);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}
.wangzhe-hero-heading h2 {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.32rem;
}
.wangzhe-hero-heading p:last-child { color: var(--text-muted); }
.wangzhe-detail-section {
    margin-top: 1.35rem;
}
.wangzhe-detail-section h3 {
    color: var(--wangzhe);
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
}
.wangzhe-detail-section > p {
    max-height: 11rem;
    overflow-y: auto;
    color: #dbe4ef;
    line-height: 1.7;
    padding: 0.9rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
}
.wangzhe-skill-list {
    display: grid;
    gap: 0.75rem;
}
.wangzhe-skill-item {
    display: grid;
    grid-template-columns: 3.1rem minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.07);
}
.wangzhe-skill-item img {
    width: 3.1rem;
    height: 3.1rem;
    object-fit: cover;
    border-radius: 8px;
}
.wangzhe-skill-item h4 { margin-bottom: 0.18rem; }
.wangzhe-skill-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}
.wangzhe-skill-item p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.55;
}
.wangzhe-skin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.wangzhe-skin-grid button {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.035);
    color: #e2e8f0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}
.wangzhe-skin-grid button:hover,
.wangzhe-skin-grid button.active {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.12);
}
.wangzhe-skin-grid img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}
.wangzhe-skin-grid span {
    display: block;
    padding: 0.55rem 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wangzhe-official-link {
    margin-top: 1.25rem;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

@media (max-width: 1100px) {
    body { height: auto; min-height: 100vh; overflow: auto; }
    .glass-header { flex-direction: column; align-items: stretch; gap: 1rem; }
    .header-left,
    .header-right { flex-wrap: wrap; }
    .search-box,
    .search-box input { width: 100%; }
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 70px);
        padding: 1rem;
    }
    .reader-pane,
    .knowledge-pane { flex: none; min-height: 70vh; }
    .reader-content { min-height: 70vh; }
    .featured-row,
    .category-grid,
    .entity-list { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .overview-summary,
    .entity-toolbar { flex-direction: column; align-items: stretch; }
    .metric-row { min-width: 0; }
    .letter-nav { top: -1rem; }
    .entity-row.has-wangzhe { grid-template-columns: 2.3rem minmax(0, 1fr); }
    .entity-row.has-wangzhe .entity-meta,
    .entity-row.has-wangzhe .wangzhe-row-action { grid-column: 2; justify-self: start; }
    .wangzhe-callout {
        grid-template-columns: 4rem minmax(0, 1fr);
    }
    .wangzhe-callout button {
        grid-column: 1 / -1;
        width: 100%;
    }
    .wangzhe-modal {
        align-items: stretch;
        padding: 0.75rem;
    }
    .wangzhe-modal-panel {
        max-height: none;
    }
    .wangzhe-hero-stage,
    .wangzhe-hero-stage > img {
        min-height: 220px;
        max-height: 44vh;
    }
    .wangzhe-skin-grid { grid-template-columns: 1fr; }
}
