/* ============ 中世纪棕黄色卡（浅羊皮纸背景） ============ */
:root {
    --bg-void: #d6c8b1;
    --panel-bg: rgba(190, 166, 131, 0.45);
    --crimson: #7d5e3c;
    --crimson-bright: #743014;
    --crimson-dark: #402615;
    --dr-pink: #743014;
    --dr-pink-glow: rgba(116, 48, 20, 0.4);
    --blood-dark: #402615;
    --ink: #402615;
    --red-deep: #743014;
    --parchment: #d6c8b1;
    --font-title: 'Cinzel', 'Noto Serif SC', serif;
    --font-deco: 'Cinzel Decorative', 'Cinzel', serif;
    --font-body: 'Playfair Display', 'Noto Serif SC', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-void);
    color: #402615;
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(125, 94, 60, 0.25) 0%, transparent 55%),
        radial-gradient(circle at 90% 90%, rgba(116, 48, 20, 0.12) 0%, transparent 50%),
        repeating-linear-gradient(0deg, rgba(64, 38, 21, 0.04) 0px, rgba(64, 38, 21, 0.04) 1px, transparent 1px, transparent 2px);
    background-attachment: fixed;
}

/* ============ 子页面导航 ============ */
.sub-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
    background: rgba(208, 196, 173, 0.95);
    border-bottom: 1px solid var(--crimson-dark);
    backdrop-filter: blur(12px);
}
@media (max-width: 720px) {
    .sub-nav { padding: 1rem 1.2rem; }
}
.sub-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.sub-brand .seal-mini {
    width: 30px;
    height: 30px;
    border: 1px solid var(--dr-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dr-pink);
    font-family: var(--font-title);
    font-weight: 900;
    font-size: 0.75rem;
    box-shadow: 0 0 8px var(--dr-pink-glow);
    overflow: hidden;
}
.sub-brand .seal-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.3) translateY(8%);
}
.sub-brand .brand-text {
    font-family: var(--font-title);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--crimson-bright);
}
.back-link {
    color: #5a3a1a;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-family: var(--font-title);
    text-transform: uppercase;
    transition: color 0.3s, text-shadow 0.3s;
}
.back-link:hover {
    color: var(--crimson-bright);
    text-shadow: 0 0 10px rgba(125, 94, 60, 0.5);
}
.sub-nav-links {
    display: flex;
    gap: 1.4rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.sub-nav-links a {
    color: #8a6a2a;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    font-family: var(--font-title);
    transition: color 0.3s, text-shadow 0.3s;
}
.sub-nav-links a:hover {
    color: #c9a85c;
    text-shadow: 0 0 12px rgba(201, 168, 92, 0.7);
}
.sub-nav-links a.active {
    color: var(--crimson-bright);
    text-shadow: 0 0 10px rgba(116, 48, 20, 0.5);
}
.sub-nav-links a.back-link {
    margin-left: 0.6rem;
    padding: 0.42rem 1.1rem;
    border: 1px solid var(--crimson-dark);
    border-radius: 2px;
    color: var(--crimson-bright);
    font-weight: 700;
    background: rgba(116, 48, 20, 0.08);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.sub-nav-links a.back-link:hover {
    background: var(--crimson-bright);
    color: #d6c8b1;
    box-shadow: 0 0 14px rgba(116, 48, 20, 0.5);
}
@media (max-width: 720px) {
    .sub-nav-links { gap: 0.9rem; }
    .sub-nav-links a { font-size: 0.75rem; }
    .sub-nav-links a.back-link { padding: 0.34rem 0.8rem; }
}

/* 板块主区 */
.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 3.4rem 1.8rem 1.4rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2.3rem;
    padding-top: 0.5rem;
}
.page-header h1 {
    font-family: var(--font-title);
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(180deg, #7d5e3c 0%, #743014 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.65rem;
}
.page-header .page-sub {
    color: var(--crimson);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-family: var(--font-title);
}

/* 装饰边框 */
.vintage-border {
    position: relative;
    border: 1px solid var(--crimson-dark);
}
.vintage-border::before, .vintage-border::after {
    content: "❖";
    position: absolute;
    color: var(--crimson);
    font-size: 0.75rem;
}
.vintage-border::before { top: -6px; left: -6px; }
.vintage-border::after { bottom: -6px; right: -6px; }

/* 页脚 */
footer {
    border-top: 1px solid var(--crimson-dark);
    padding: 1.2rem 1rem 1.6rem;
    text-align: center;
    background: #bea683;
}
footer p {
    font-size: 0.78rem;
    letter-spacing: 2px;
    color: #5a3a1a;
    margin-bottom: 0.2rem;
}

/* ============ 占位区（待填充内容） ============ */
.placeholder {
    text-align: center;
    padding: 5rem 1.5rem;
    background: var(--panel-bg);
    border: 1px dashed var(--crimson-dark);
    max-width: 760px;
    margin: 0 auto;
}
.placeholder .ph-icon {
    font-size: 3rem;
    color: var(--crimson-dark);
    margin-bottom: 1.2rem;
    font-family: var(--font-deco);
}
.placeholder .ph-title {
    font-family: var(--font-title);
    color: var(--crimson);
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 0.8rem;
}
.placeholder .ph-text {
    color: #5a3a1a;
    font-size: 0.92rem;
    line-height: 1.9;
    max-width: 480px;
    margin: 0 auto;
}
.placeholder .ph-mark {
    display: inline-block;
    margin-top: 1.5rem;
    font-family: var(--font-title);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--crimson-dark);
    border: 1px solid var(--crimson-dark);
    padding: 0.35rem 1rem;
}

/* ============ 子板块（页面内分区） ============ */
.sub-section {
    margin-bottom: 3.5rem;
}
.sub-section:last-child { margin-bottom: 0; }
.sub-panel {
    background: var(--panel-bg);
    border: 1px solid var(--crimson);
    padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1.4rem, 4vw, 2.6rem) clamp(1.4rem, 3vw, 2.2rem);
    box-shadow: 0 12px 34px rgba(64, 38, 21, 0.18);
    position: relative;
}
.sub-panel::before,
.sub-panel::after {
    content: '❖';
    position: absolute;
    color: var(--crimson);
    font-size: 1rem;
    opacity: 0.6;
}
.sub-panel::before { top: 0.7rem; left: 0.9rem; }
.sub-panel::after { bottom: 0.7rem; right: 0.9rem; }
.sub-panel-head { text-align: center; margin-bottom: clamp(1.1rem, 2.5vw, 1.6rem); }
.sub-panel-head h2 {
    font-family: var(--font-deco);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    letter-spacing: 4px;
    color: var(--crimson-bright);
    margin: 0;
}
.sub-panel-head .sub-panel-sub {
    font-family: var(--font-title);
    font-size: clamp(0.66rem, 1.6vw, 0.78rem);
    letter-spacing: 3px;
    color: var(--crimson-dark);
    margin: 0.4rem 0 0;
    text-transform: uppercase;
}
.sub-panel-body { color: #402615; }
.sub-panel-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--crimson-dark);
    font-family: var(--font-title);
    font-size: 0.9rem;
    letter-spacing: 2px;
}
.sub-panel-empty .em-icon {
    display: block;
    font-size: 2.2rem;
    color: var(--crimson);
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

/* ============ 新闻布告墙 ============ */
.news-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 1rem;
}
.news-refresh-btn {
    appearance: none;
    border: 1px solid rgba(64, 38, 21, 0.8);
    background: rgba(116, 48, 20, 0.08);
    color: var(--crimson-bright);
    font-family: var(--font-title);
    letter-spacing: 2px;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.news-refresh-btn:hover {
    transform: translateY(-1px);
    background: rgba(116, 48, 20, 0.12);
    box-shadow: 0 8px 18px rgba(64, 38, 21, 0.12);
}

.news-board-shell {
    position: relative;
    min-height: 760px;
    background:
        linear-gradient(180deg, rgba(105, 82, 58, 0.18), rgba(70, 53, 39, 0.24)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(82, 57, 38, 0.12) 0, rgba(82, 57, 38, 0.12) 1px, transparent 1px, transparent 26px),
        linear-gradient(180deg, rgba(82, 57, 38, 0.12) 0, rgba(82, 57, 38, 0.12) 1px, transparent 1px, transparent 26px),
        #b49b77;
    box-shadow: inset 0 0 0 1px rgba(64,38,21,0.4), inset 0 18px 30px rgba(58,39,23,0.12), 0 18px 34px rgba(64, 38, 21, 0.18);
    overflow: hidden;
}
.news-board-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(90, 58, 26, 0.05),
            rgba(90, 58, 26, 0.05) 1px,
            rgba(255,255,255,0.02) 2px,
            rgba(255,255,255,0.02) 3px
        );
    mix-blend-mode: multiply;
    opacity: 0.85;
    pointer-events: none;
}
.news-board-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 58%, rgba(35, 24, 16, 0.12) 100%);
    pointer-events: none;
}
.news-board {
    position: relative;
    min-height: 760px;
    padding: 1.4rem;
}
.news-links {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.news-link {
    fill: none;
    stroke: #C20014;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 6 8;
    filter: drop-shadow(0 0 4px rgba(194, 0, 20, 0.25));
}
.news-card {
    position: absolute;
    width: var(--card-w, 220px);
    height: var(--card-h, 280px);
    left: 0;
    top: 0;
    transform: rotate(var(--rot, 0deg));
    background: rgba(244, 232, 201, 0.92);
    border: 1px solid rgba(64, 38, 21, 0.7);
    box-shadow: 0 10px 18px rgba(64, 38, 21, 0.18), 0 0 0 1px rgba(255,255,255,0.12) inset;
    padding: 0.9rem 0.9rem 0.8rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    overflow: hidden;
}
.news-card:hover {
    transform: rotate(var(--rot, 0deg)) translateY(-6px);
    box-shadow: 0 16px 22px rgba(64, 38, 21, 0.22), 0 0 0 1px rgba(255,255,255,0.2) inset;
}
.news-card:focus-visible {
    outline: 2px solid rgba(116, 48, 20, 0.7);
    outline-offset: 4px;
}
.news-card::before {
    content: "";
    position: absolute;
    inset: 0.5rem;
    border: 1px solid rgba(64, 38, 21, 0.22);
    pointer-events: none;
}
.news-card--big {
    --card-w: 300px;
    --card-h: 400px;
    --title-lines: 3;
    --excerpt-lines: 12;
}
.news-card--medium {
    --card-w: 220px;
    --card-h: 280px;
    --title-lines: 3;
    --excerpt-lines: 7;
}
.news-card--small {
    --card-w: 170px;
    --card-h: 220px;
    --title-lines: 3;
    --excerpt-lines: 5;
}
.news-card-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding-top: 0.6rem;
    overflow: hidden;
}
.news-pin {
    position: absolute;
    left: 18px;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d79a65, #a16942);
    border: 1px solid rgba(64, 38, 21, 0.6);
    box-shadow: 0 2px 8px rgba(64, 38, 21, 0.25);
    display: grid;
    place-items: center;
    z-index: 2;
}
.news-pin svg {
    width: 10px;
    height: 10px;
    fill: rgba(255, 247, 231, 0.9);
}
.news-tape {
    position: absolute;
    right: 18px;
    top: -10px;
    width: 58px;
    height: 22px;
    border: 1px solid rgba(64, 38, 21, 0.25);
    background: rgba(205, 176, 118, 0.35);
    transform: rotate(10deg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
    z-index: 2;
}
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    font-family: var(--font-title);
}
.news-tag {
    font-size: 0.62rem;
    letter-spacing: 2px;
    color: var(--crimson-bright);
    border: 1px solid rgba(116, 48, 20, 0.6);
    padding: 0.18rem 0.42rem;
    background: rgba(116, 48, 20, 0.06);
}
.news-date {
    font-size: 0.58rem;
    letter-spacing: 1.2px;
    color: rgba(64, 38, 21, 0.75);
}
.news-card h3 {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 2vw, 1.42rem);
    line-height: 1.3;
    letter-spacing: 1.5px;
    color: var(--crimson-dark);
    padding: 0 0.8rem;
    margin: 0;
    flex: 0 0 auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--title-lines, 3);
    line-clamp: var(--title-lines, 3);
    overflow: hidden;
    overflow-wrap: anywhere;
}
.news-card p {
    font-family: var(--font-body);
    font-size: 0.82rem;
    line-height: 1.7;
    letter-spacing: 0.5px;
    color: rgba(64, 38, 21, 0.88);
    padding: 0 0.8rem;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--excerpt-lines, 6);
    line-clamp: var(--excerpt-lines, 6);
    overflow: hidden;
    overflow-wrap: anywhere;
}
.news-card--small h3 {
    font-size: 1rem;
    letter-spacing: 1.1px;
}
.news-card--small p {
    font-size: 0.76rem;
    line-height: 1.6;
}
.news-card--small .news-meta {
    margin-top: 0.3rem;
}

.news-detail-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(36, 25, 19, 0.62);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1200;
}
.news-detail-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.news-detail-panel {
    position: relative;
    width: min(700px, calc(100vw - 32px));
    max-height: 82vh;
    overflow: auto;
    background: linear-gradient(180deg, #f3e7cf 0%, #e7d6b1 100%);
    border: 1px solid rgba(64, 38, 21, 0.8);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
    padding: 2rem 1.6rem 1.6rem;
}
.news-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(64, 38, 21, 0.8);
    background: rgba(116, 48, 20, 0.08);
    color: var(--crimson-bright);
    font-size: 1.1rem;
    cursor: pointer;
}
.news-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(64, 38, 21, 0.35);
    margin-bottom: 1rem;
}
.news-detail-tag {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 0.68rem;
    letter-spacing: 2px;
    color: var(--crimson-bright);
    border: 1px solid rgba(116, 48, 20, 0.6);
    padding: 0.25rem 0.5rem;
    background: rgba(116, 48, 20, 0.06);
}
.news-detail-date {
    font-family: var(--font-title);
    font-size: 0.74rem;
    letter-spacing: 2px;
    color: rgba(64, 38, 21, 0.8);
}
.news-detail-panel h2 {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    line-height: 1.3;
    letter-spacing: 2px;
    color: var(--crimson-dark);
    margin: 0 0 1rem;
}
.news-detail-body {
    color: rgba(64, 38, 21, 0.9);
    line-height: 1.9;
    font-size: 1rem;
}
.news-detail-body p {
    margin-bottom: 0.9rem;
}

/* ============ 访客存活情况表 ============ */
.roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem;
}
.roster-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0.8rem;
    border: 1px solid var(--crimson-dark);
    background: rgba(214, 200, 177, 0.4);
    transition: transform 0.25s, box-shadow 0.25s;
}
.roster-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(64, 38, 21, 0.2);
}
.roster-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--crimson);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-title);
    font-weight: 900;
    color: var(--crimson-bright);
    background: rgba(125, 94, 60, 0.12);
    margin-bottom: 0.5rem;
}
.roster-name {
    font-family: var(--font-title);
    font-size: 0.92rem;
    color: #402615;
    margin-bottom: 0.3rem;
}
.roster-status {
    font-family: var(--font-title);
    font-size: 0.72rem;
    letter-spacing: 2px;
    padding: 0.2rem 0.7rem;
    border: 1px solid;
}
.roster-status.alive {
    color: var(--crimson);
    border-color: var(--crimson);
}
.roster-status.dead {
    color: var(--crimson-dark);
    border-color: var(--crimson-dark);
    background: rgba(116, 48, 20, 0.12);
    text-decoration: line-through;
}
.roster-status.unknown {
    color: #8a6a2a;
    border-color: #8a6a2a;
}
@media (max-width: 720px) {
    .roster { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ============ 地图弹窗 ============ */
.map-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(64, 38, 21, 0.7);
    backdrop-filter: blur(6px);
    padding: 2rem 1rem;
}
.map-overlay.show { display: flex; }
.map-dialog {
    background: #d6c8b1;
    border: 1px solid var(--crimson);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    width: min(960px, 95vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.map-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--crimson-dark);
    background: rgba(125, 94, 60, 0.12);
}
.map-dialog-head h3 {
    font-family: var(--font-deco);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    letter-spacing: 4px;
    color: var(--crimson-bright);
    margin: 0;
}
.map-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--crimson-dark);
    background: transparent;
    color: var(--crimson-bright);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, color 0.25s;
}
.map-close:hover {
    background: var(--crimson-bright);
    color: #d6c8b1;
}
.map-dialog-body {
    display: flex;
    flex: 1;
    min-height: 0;
}
.map-view {
    flex: 1;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(214, 200, 177, 0.5);
    overflow: auto;
}
.map-view img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 1px solid var(--crimson-dark);
    box-shadow: 0 8px 24px rgba(64, 38, 21, 0.3);
}
.map-floors {
    width: 150px;
    flex-shrink: 0;
    border-left: 1px solid var(--crimson-dark);
    padding: 1.2rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    background: rgba(190, 166, 131, 0.4);
}
.map-floor-btn {
    padding: 0.7rem 0.5rem;
    border: 1px solid var(--crimson-dark);
    background: transparent;
    color: var(--crimson-bright);
    font-family: var(--font-title);
    font-size: 0.85rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
    text-align: center;
}
.map-floor-btn:hover {
    background: rgba(125, 94, 60, 0.2);
}
.map-floor-btn.active {
    background: var(--crimson-bright);
    color: #d6c8b1;
    border-color: var(--crimson-bright);
}
.map-floors-label {
    font-family: var(--font-title);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--crimson-dark);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}
@media (max-width: 640px) {
    .map-dialog-body { flex-direction: column; }
    .map-floors {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--crimson-dark);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .map-floor-btn { flex: 1; min-width: 80px; }
    .map-view img { max-height: 50vh; }
}

.main-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 480px;
    overflow: visible;
    margin-top: 0;
    padding: 0 0.5rem 2rem;
}

.panel-left {
    position: relative;
    width: 20%;
    min-width: 180px;
    min-height: 100%;
    padding: 0.8rem 0.7rem 0.8rem 0.2rem;
    box-sizing: border-box;
    overflow: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 1;
    align-self: flex-start;
}

.panel-left::-webkit-scrollbar,
.panel-center::-webkit-scrollbar {
    display: none;
}

.panel-center {
    position: relative;
    width: 58%;
    max-width: 760px;
    height: auto;
    overflow: visible;
    padding: 0.8rem 1.2rem;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    justify-content: center;
}

.panel-right {
    position: fixed;
    top: 36px;
    right: 0;
    width: 30%;
    height: calc(100vh - 200px);
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    z-index: 10;
}

.character-panel {
    min-width: 0;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.1rem 0 0;
    overflow: visible;
    gap: 0;
}

.character-render {
    width: min(310px, 88%);
    aspect-ratio: 9 / 16;
    min-height: 0;
    border: 1px solid rgba(64, 38, 21, 0.28);
    background: linear-gradient(180deg, rgba(125, 94, 60, 0.16), rgba(64, 38, 21, 0.02));
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 24px rgba(64, 38, 21, 0.13);
    transform: scale(1.3);
    transform-origin: top center;
    margin-bottom: 24px;
    display: block;
}

.character-render img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.character-info {
    width: 100%;
    padding: 0;
    text-align: center;
    margin-top: 116px;
    margin-bottom: 22px;

}

.character-info h1,
.character-info h2 {
    font-family: var(--font-title);
    color: var(--crimson-dark);
    margin: 0;
    text-align: center;
}

.character-info h1 {
    font-size: clamp(1.4rem, 2.1vw, 2.2rem);
    letter-spacing: 0.08em;
    font-weight: 800;
    border-top: 3px solid var(--crimson-dark);
    padding-top: 0.7rem;
    line-height: 1.2;
    margin-top: 0;
}

.character-info h2 {
    margin-top: 0.28rem;
    font-size: clamp(0.96rem, 1.4vw, 1.35rem);
    letter-spacing: 0.18em;
    font-weight: 600;
    line-height: 1.4;
}

.description {
    width: calc(100% - 6px);
    margin-top: 22px;
    transform: translateY(16px);
    min-height: 110px;
    border: 1px solid rgba(64, 38, 21, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(64,38,21,0.02));
    padding: 0.7rem 0.85rem;
    color: rgba(64, 38, 21, 0.8);
    font-family: var(--font-title);
    font-size: 0.84rem;
    letter-spacing: 0.05em;
    line-height: 1.7;
    text-align: center;
    border-radius: 6px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}

.sealed-block {
    width: 100%;
    max-width: 700px;
    padding: 1.3rem 1.45rem 1.6rem;
    border: 2px solid rgba(64, 38, 21, 0.5);
    background:
        linear-gradient(180deg, rgba(214, 200, 177, 0.7), rgba(190, 166, 131, 0.35)),
        repeating-linear-gradient(0deg, rgba(64, 38, 21, 0.035) 0px, rgba(64, 38, 21, 0.035) 1px, transparent 1px, transparent 3px);
    color: rgba(64, 38, 21, 0.9);
    line-height: 1.9;
    font-family: var(--font-title);
    letter-spacing: 0.07em;
    position: relative;
    box-shadow:
        inset 0 0 0 1px rgba(104, 78, 52, 0.18),
        inset 0 0 22px rgba(96, 68, 39, 0.09),
        0 14px 26px rgba(64, 38, 21, 0.12);
}

.sealed-block::before,
.sealed-block::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(64, 38, 21, 0.3);
    pointer-events: none;
}

.sealed-block::after {
    inset: 17px;
    border-color: rgba(64, 38, 21, 0.18);
}

.sealed-title {
    font-family: var(--font-deco);
    font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    letter-spacing: 0.2em;
    color: var(--crimson-bright);
    margin-bottom: 0.85rem;
    text-align: center;
}

.archive-status-lock {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: rgba(64, 38, 21, 0.75);
    padding: 1.2rem 1rem;
    border: 1px dashed rgba(64, 38, 21, 0.35);
    background: rgba(64, 38, 21, 0.04);
}

.archive-status-lock[hidden] {
    display: none;
}

.lock-placeholder {
    width: clamp(3.2rem, 6vw, 4.6rem);
    height: auto;
    display: block;
    margin: 0 auto 0.7rem;
    filter: drop-shadow(0 3px 8px rgba(64, 38, 21, 0.15));
}

.archive-status-lock p {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    color: rgba(64, 38, 21, 0.82);
}

.archive-status-lock span {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.archive-content {
    min-height: 200px;
    overflow: visible;
}

.sealed-block p {
    margin: 0.62rem 0;
    color: rgba(64, 38, 21, 0.9);
    text-indent: 0.08em;
}

.sealed-block {
    overflow: visible;
}

.tarot-fan {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 440px;
    border: none;
    background: transparent;
    overflow: visible;
}

.tarot-card {
    position: absolute;
    width: 180px;
    height: 320px;
    perspective: 800px;
    cursor: pointer;
    transform-origin: 100% 100%; /* 支点在卡牌右下角，右下角对齐锚点，逆时针向左上展开 */
    transition: transform 0.35s ease, filter 0.3s ease, z-index 0.2s ease;
    filter: drop-shadow(0 8px 18px rgba(64, 38, 21, 0.18));
    z-index: 1;
}

.tarot-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.tarot-card.flipped .tarot-card-inner {
    transform: rotateY(180deg);
}

.tarot-front,
.tarot-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(240, 223, 191, 0.6);
    font-family: var(--font-deco);
    color: #f0dfbf;
    background: linear-gradient(160deg, rgba(49, 27, 15, 0.96), rgba(101, 70, 38, 0.88));
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.08), 0 10px 16px rgba(64, 38, 21, 0.18);
    font-size: 1.85rem;
    letter-spacing: 0.12em;
}

.tarot-front {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 2rem;
    color: #6b4226;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.55), 0 0 8px rgba(255, 255, 255, 0.4);
    transform: rotateY(180deg);
    background:
        url('https://s41.ax1x.com/2026/09/17/pnKVhDJ.png') center / cover no-repeat,
        linear-gradient(160deg, rgba(190, 166, 131, 0.92), rgba(214, 200, 177, 0.9));
    border-color: rgba(64, 38, 21, 0.5);
    box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.35), 0 10px 16px rgba(64, 38, 21, 0.14);
}

.tarot-back {
    transform: rotateY(0deg);
    background:
        url('https://s41.ax1x.com/2026/09/17/pnKVIER.png') center / cover no-repeat,
        linear-gradient(160deg, rgba(31, 18, 14, 0.96), rgba(87, 59, 34, 0.88));
    font-size: 0;
    color: transparent;
}

.tarot-card.active {
    filter: drop-shadow(0 16px 24px rgba(64, 38, 21, 0.26));
}

.tarot-card:hover {
    transform: translateY(-20px) scale(1.05);
}

/* 中屏（平板/小笔记本）：三栏纵排，人物图片在上、中部详细信息在其下 */
@media (max-width: 1100px) {
    .main-container {
        flex-direction: column;
        align-items: center;
        min-height: 0;
    }
    .panel-left,
    .panel-center,
    .panel-right {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-width: 760px;
        height: auto;
        min-height: 0;
        margin: 0 auto;
    }
    .panel-right {
        margin-top: 1rem;
        min-height: 340px;
    }
    .character-render {
        width: min(300px, 70vw);
        transform: scale(1.18);
    }
    .character-info {
        margin-top: 96px;
    }
}
@media (max-width: 900px) {
    .main-container {
        height: auto;
        flex-direction: column;
        align-items: center;
    }
    .panel-left,
    .panel-right {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        height: auto;
    }
    .panel-center {
        margin-left: 0;
        width: 100%;
        height: auto;
    }
    .character-panel {
        overflow-y: visible;
    }
    .tarot-fan {
        min-height: 340px;
    }
}
/* 小屏手机：收窄人物图与细节区，确保中部详细信息紧贴人物图下方 */
@media (max-width: 560px) {
    .character-render {
        width: min(240px, 72vw);
        transform: scale(1.1);
    }
    .character-info {
        margin-top: 84px;
    }
    .panel-left,
    .panel-center,
    .panel-right {
        padding: 0.5rem 0.4rem;
    }
}
/* ============ NPC 档案卡片 ============ */
.npc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(0.8rem, 1.6vw, 1.2rem);
}
.npc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(1.1rem, 2.2vw, 1.6rem) 0.8rem 1.1rem;
    border: 1px solid var(--crimson-dark);
    background: rgba(214, 200, 177, 0.4);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
}
.npc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(64, 38, 21, 0.25);
}
.npc-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid var(--crimson);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--crimson-bright);
    background: rgba(125, 94, 60, 0.12);
    margin-bottom: 0.7rem;
    box-shadow: 0 0 10px rgba(116, 48, 20, 0.15);
    overflow: hidden;
}
.npc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.npc-name {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(0.98rem, 2vw, 1.12rem);
    letter-spacing: 3px;
    color: #402615;
    margin-bottom: 0.25rem;
}
.npc-role {
    font-family: var(--font-title);
    font-size: 0.68rem;
    letter-spacing: 2px;
    color: var(--crimson);
    text-transform: uppercase;
    margin-bottom: 0.7rem;
}
.npc-note {
    font-family: var(--font-title);
    font-size: 0.66rem;
    letter-spacing: 2px;
    color: var(--crimson-dark);
    border: 1px dashed var(--crimson-dark);
    padding: 0.22rem 0.7rem;
    opacity: 0.85;
}
@media (max-width: 992px) {
    .npc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .npc-avatar { width: 48px; height: 48px; font-size: 1.3rem; }
}

/* ============ 访客档案卡片 ============ */
.guest-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid var(--crimson);
    overflow: hidden;
    margin-bottom: 0.55rem;
    box-shadow: 0 0 12px rgba(116, 48, 20, 0.2);
    background: rgba(125, 94, 60, 0.12);
}
.guest-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.guest-no {
    font-family: var(--font-title);
    font-size: 0.64rem;
    letter-spacing: 2px;
    color: var(--crimson);
    margin-bottom: 0.18rem;
}
@media (max-width: 720px) {
    .guest-avatar { width: 60px; height: 60px; }
}

/* ============ 封存锁标 ============ */
.lock-note {
    position: relative;
    width: 24px;
    height: 18px;
    border: 2px solid var(--crimson-dark);
    border-radius: 4px;
    background: rgba(116, 48, 20, 0.06);
    margin: 0.95rem auto 0;
}
.lock-note::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 11px;
    border: 2px solid var(--crimson-dark);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}
.lock-note::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--crimson-dark);
}
.npc-dialog-body .lock-note {
    width: 30px;
    height: 23px;
    margin: 0.3rem auto 1rem;
}
.npc-dialog-body .lock-note::before {
    top: -13px;
    width: 15px;
    height: 13px;
}

/* ============ NPC 档案弹窗 ============ */
.npc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(64, 38, 21, 0.7);
    backdrop-filter: blur(6px);
    padding: 2rem 1rem;
}
.npc-overlay.show { display: flex; }
.npc-dialog {
    background: #d6c8b1;
    border: 1px solid var(--crimson);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: min(460px, 94vw);
    max-height: 88vh;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.npc-dialog::-webkit-scrollbar { display: none; }
.npc-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--crimson-dark);
    background: rgba(125, 94, 60, 0.12);
}
.npc-dialog-head h3 {
    font-family: var(--font-title);
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    letter-spacing: 4px;
    color: var(--crimson-bright);
    margin: 0;
}
.npc-dialog-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--crimson-dark);
    background: transparent;
    color: var(--crimson-bright);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, color 0.25s;
}
.npc-dialog-close:hover {
    background: var(--crimson-bright);
    color: #d6c8b1;
}
.npc-dialog-body {
    text-align: center;
    padding: clamp(1.4rem, 3vw, 2.2rem) 1.4rem;
}
.npc-dialog-body .npc-avatar {
    width: 76px;
    height: 76px;
    font-size: 2.1rem;
    margin: 0 auto 1rem;
    box-shadow: 0 0 16px rgba(116, 48, 20, 0.25);
}
.npc-dialog-name {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    letter-spacing: 6px;
    color: #402615;
    margin-bottom: 0.35rem;
}
.npc-dialog-role {
    font-family: var(--font-title);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--crimson);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
.npc-dialog-seal {
    display: inline-block;
    font-family: var(--font-title);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--crimson-dark);
    border: 1px dashed var(--crimson-dark);
    padding: 0.4rem 1.2rem;
    margin-bottom: 1.1rem;
    opacity: 0.9;
}
.npc-dialog-text {
    color: #5a3a1a;
    font-size: 0.86rem;
    line-height: 1.9;
    max-width: 300px;
    margin: 0 auto;
}
