﻿/* ========================================
   跨时空文学地图 - 样式文件
   ======================================== */
:root {
    --bg-primary: #faf8f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0ebe3;
    --bg-panel: rgba(255, 255, 255, 0.95);
    --text-primary: #2c2825;
    --text-secondary: #5a544e;
    --text-muted: #8a847d;
    --accent-primary: #c0392b;
    --accent-secondary: #e67e22;
    --accent-gold: #d4a843;
    --accent-teal: #16a085;
    --border-color: #e8e2da;
    --shadow-sm: 0 2px 8px rgba(44, 40, 37, 0.08);
    --shadow-md: 0 8px 24px rgba(44, 40, 37, 0.12);
    --shadow-lg: 0 16px 48px rgba(44, 40, 37, 0.16);
    --shadow-glow: 0 0 32px rgba(192, 57, 43, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
    --font-serif: 'Noto Serif SC', serif;
    --font-mono: 'Space Grotesk', sans-serif;
}
[data-theme="dark"] {
    --bg-primary: #1a1614;
    --bg-secondary: #231e1b;
    --bg-tertiary: #2d2622;
    --bg-panel: rgba(35, 30, 27, 0.95);
    --text-primary: #f5f0eb;
    --text-secondary: #c8bfb7;
    --text-muted: #8a847d;
    --accent-primary: #e74c3c;
    --accent-secondary: #f39c12;
    --accent-gold: #f1c40f;
    --accent-teal: #2ecc71;
    --border-color: #3d342e;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 32px rgba(231, 76, 60, 0.4);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; }
body {
    font-family: var(--font-serif);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
    transition: background var(--transition-normal), color var(--transition-normal);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
::selection { background: var(--accent-primary); color: white; }
a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; font-family: var(--font-mono); font-size: 0.875rem; font-weight: 500;
    border: none; border-radius: var(--radius-md); cursor: pointer;
    transition: all var(--transition-fast); white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover:not(:disabled) { background: #a93226; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover:not(:disabled) { background: var(--border-color); }
.btn-large { padding: 14px 32px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); }
input, select {
    font-family: var(--font-serif); font-size: 0.875rem;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-primary); padding: 8px 12px;
    transition: all var(--transition-fast);
}
input:focus, select:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15); }
input::placeholder { color: var(--text-muted); }
.app-container { display: flex; flex-direction: column; height: 100vh; min-height: 0; position: relative; }
.bg-decoration { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floating-particle {
    position: absolute; width: 4px; height: 4px; background: var(--accent-gold);
    border-radius: 50%; opacity: 0.3; animation: float 20s infinite ease-in-out;
}
.floating-particle:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.floating-particle:nth-child(2) { top: 20%; right: 10%; animation-delay: -4s; }
.floating-particle:nth-child(3) { bottom: 30%; left: 15%; animation-delay: -8s; }
.floating-particle:nth-child(4) { bottom: 10%; right: 5%; animation-delay: -12s; }
.floating-particle:nth-child(5) { top: 50%; left: 50%; animation-delay: -16s; }
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    25% { transform: translate(30px, -20px) scale(1.2); opacity: 0.5; }
    50% { transform: translate(-20px, 30px) scale(0.8); opacity: 0.2; }
    75% { transform: translate(25px, 25px) scale(1.1); opacity: 0.4; }
}
.header { position: sticky; top: 0; z-index: 100; background: var(--bg-panel); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); padding: 0 24px; }
.header-content { max-width: 1920px; margin: 0 auto; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { width: 32px; height: 32px; color: var(--accent-primary); animation: logoSpin 8s infinite linear; }
@keyframes logoSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.logo-text { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--text-primary); letter-spacing: -0.02em; }
.nav-tabs { display: flex; gap: 4px; background: var(--bg-tertiary); padding: 4px; border-radius: var(--radius-md); }
.nav-tab { padding: 8px 16px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); background: transparent; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); white-space: nowrap; }
.nav-tab:hover { color: var(--text-primary); }
.nav-tab.active { background: var(--bg-secondary); color: var(--accent-primary); box-shadow: var(--shadow-sm); }
.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.search-box { position: relative; width: 280px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-box input { width: 100%; padding-left: 40px; padding-right: 12px; height: 40px; }
.search-suggestions { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 50; }
.search-suggestions.active { display: block; animation: slideDown 200ms ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.suggestion-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background var(--transition-fast); }
.suggestion-item:hover, .suggestion-item.highlighted { background: var(--bg-tertiary); }
.suggestion-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-title { font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-meta { font-size: 0.75rem; color: var(--text-muted); }
.btn-theme-toggle { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); }
.btn-theme-toggle:hover { background: var(--border-color); transform: rotate(15deg); }
.btn-theme-toggle svg { width: 20px; height: 20px; color: var(--text-secondary); transition: opacity var(--transition-fast), transform var(--transition-fast); }
[data-theme="light"] .icon-moon, [data-theme="dark"] .icon-sun { display: none; }
.main-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 1; }
.tab-panel { display: none; flex: 1; overflow: hidden; }
.tab-panel.active { display: flex; flex-direction: column; }
.explore-layout { display: grid; grid-template-columns: 340px 1fr 380px; height: 100%; gap: 0; }
.sidebar { display: flex; flex-direction: column; background: var(--bg-panel); border-right: 1px solid var(--border-color); overflow: hidden; }
.sidebar-left { border-right: 1px solid var(--border-color); }
.sidebar-right { border-left: 1px solid var(--border-color); border-right: none; }
.panel-header { padding: 20px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.panel-header h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; }
.panel-controls { display: flex; flex-direction: column; gap: 8px; }
.filter-select { width: 100%; height: 36px; font-size: 0.8rem; }
.locations-list { flex: 1; overflow-y: auto; padding: 12px; }
.location-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all var(--transition-fast); position: relative; overflow: hidden; }
.location-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--marker-color, var(--accent-primary)); transform: scaleY(0); transform-origin: top; transition: transform var(--transition-normal); }
.location-card:hover { border-color: var(--accent-primary); box-shadow: var(--shadow-md); transform: translateX(4px); }
.location-card:hover::before { transform: scaleY(1); }
.location-card.selected { border-color: var(--accent-primary); box-shadow: var(--shadow-md); }
.location-card.selected::before { transform: scaleY(1); }
.location-card-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.location-marker { width: 12px; height: 12px; border-radius: 50%; background: var(--marker-color, var(--accent-primary)); flex-shrink: 0; margin-top: 4px; box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--marker-color, var(--accent-primary)); }
.location-info { flex: 1; min-width: 0; }
.location-name { font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.location-book { font-size: 0.8rem; color: var(--accent-primary); font-style: italic; }
.location-author { font-size: 0.75rem; color: var(--text-muted); }
.location-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.location-tag { font-size: 0.7rem; padding: 3px 8px; border-radius: 100px; background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
.location-tag.type-scene { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border-color: rgba(231, 76, 60, 0.2); }
.location-tag.type-author { background: rgba(52, 152, 219, 0.1); color: #3498db; border-color: rgba(52, 152, 219, 0.2); }
.location-tag.type-historic { background: rgba(243, 156, 18, 0.1); color: #f39c12; border-color: rgba(243, 156, 18, 0.2); }
.location-tag.type-landmark { background: rgba(46, 204, 113, 0.1); color: #2ecc71; border-color: rgba(46, 204, 113, 0.2); }
.panel-footer { padding: 16px 20px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
.location-count { font-size: 0.8rem; color: var(--text-muted); }
.map-container { position: relative; height: 100%; min-height: 0; background: #e8e2da; }
.map { width: 100%; height: 100%; z-index: 1; }
.map-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 10; padding: 20px; }
.map-legend { position: absolute; bottom: 20px; left: 20px; background: var(--bg-panel); backdrop-filter: blur(10px); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 12px 16px; box-shadow: var(--shadow-md); pointer-events: auto; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-secondary); padding: 4px 0; }
.legend-marker { width: 10px; height: 10px; border-radius: 50%; background: var(--marker-color); box-shadow: 0 0 0 2px var(--bg-panel); }
.map-controls { position: absolute; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.map-btn { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--bg-panel); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 1.125rem; cursor: pointer; transition: all var(--transition-fast); box-shadow: var(--shadow-sm); }
.map-btn:hover { background: var(--bg-secondary); transform: scale(1.05); box-shadow: var(--shadow-md); }
.map-status { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 100px; box-shadow: var(--shadow-md); pointer-events: auto; z-index: 20; }
.status-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-teal); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
#statusText { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.custom-marker { background: transparent !important; border: none !important; }
.marker-icon { width: 36px; height: 48px; background: var(--marker-color); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); border: 3px solid white; transition: transform var(--transition-fast); cursor: pointer; }
.marker-icon:hover { transform: rotate(-45deg) scale(1.2); z-index: 1000; }
.marker-icon svg { width: 18px; height: 18px; color: white; transform: rotate(45deg); }
.marker-icon.pulse::before { content: ''; position: absolute; inset: -8px; border-radius: 50% 50% 50% 0; background: var(--marker-color); opacity: 0.4; animation: markerPulse 2s infinite; transform: rotate(-45deg); z-index: -1; }
@keyframes markerPulse { 0% { transform: rotate(-45deg) scale(1); opacity: 0.4; } 100% { transform: rotate(-45deg) scale(1.5); opacity: 0; } }
.marker-popup .leaflet-popup-content-wrapper { border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-family: var(--font-serif); }
.marker-popup .leaflet-popup-content { margin: 12px 16px; line-height: 1.5; }
.marker-popup .leaflet-popup-tip { background: white; }
.detail-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.panel-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; color: var(--text-muted); }
.placeholder-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.panel-placeholder h3 { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 8px; }
.panel-placeholder p { font-size: 0.875rem; max-width: 280px; line-height: 1.6; }
.placeholder-hint { margin-top: 24px; padding: 8px 16px; background: var(--bg-tertiary); border-radius: var(--radius-sm); font-size: 0.75rem; color: var(--text-muted); }
.placeholder-hint kbd { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 4px; padding: 2px 6px; margin: 0 4px; font-family: var(--font-mono); font-size: 0.7rem; }
.detail-content { flex: 1; overflow-y: auto; padding: 20px; }
.detail-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.detail-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-marker { width: 14px; height: 14px; border-radius: 50%; background: var(--marker-color); }
.detail-title { font-size: 1.375rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.detail-book { font-size: 0.9375rem; color: var(--accent-primary); font-style: italic; }
.detail-author { font-size: 0.875rem; color: var(--text-secondary); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.detail-section h3::before { content: ''; width: 4px; height: 16px; background: var(--accent-primary); border-radius: 2px; }
.detail-text { font-size: 0.875rem; line-height: 1.7; color: var(--text-secondary); }
.detail-text p { margin-bottom: 12px; }
.detail-quote { border-left: 3px solid var(--accent-gold); padding-left: 16px; margin: 16px 0; font-style: italic; color: var(--text-secondary); background: rgba(212, 168, 67, 0.05); padding: 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.detail-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 0.8rem; color: var(--text-muted); text-align: right; }
.detail-gallery { margin-top: 12px; }
.gallery-container { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/10; background: var(--bg-tertiary); }
.gallery-slide { position: absolute; inset: 0; opacity: 0; transition: opacity var(--transition-normal); }
.gallery-slide.active { opacity: 1; z-index: 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.9); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); z-index: 2; }
.gallery-nav:hover { background: white; transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all var(--transition-fast); }
.gallery-dot.active { background: white; transform: scale(1.2); }
.time-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.compare-card { background: var(--bg-tertiary); border-radius: var(--radius-md); padding: 16px; }
.compare-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 8px; }
.compare-value { font-size: 0.875rem; color: var(--text-primary); line-height: 1.6; }
.related-locations { display: flex; flex-direction: column; gap: 8px; }
.related-item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg-tertiary); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); }
.related-item:hover { background: var(--border-color); transform: translateX(4px); }
.related-marker { width: 10px; height: 10px; border-radius: 50%; background: var(--marker-color); flex-shrink: 0; }
.related-info { flex: 1; min-width: 0; }
.related-name { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-distance { font-size: 0.75rem; color: var(--text-muted); }
.detail-actions { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border-color); margin-top: 8px; }
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 24px; overflow-y: auto; }
.book-card { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 24px; transition: all var(--transition-normal); cursor: pointer; position: relative; overflow: hidden; }
.book-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--book-color, var(--accent-primary)); transform: scaleX(0); transform-origin: left; transition: transform var(--transition-normal); }
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--book-color, var(--accent-primary)); }
.book-card:hover::before { transform: scaleX(1); }
.book-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.book-cover { width: 60px; height: 84px; border-radius: var(--radius-sm); background: linear-gradient(135deg, var(--book-color, var(--accent-primary)), var(--accent-secondary)); display: flex; align-items: center; justify-content: center; color: white; font-family: var(--font-mono); font-weight: 600; font-size: 0.75rem; text-align: center; padding: 8px; flex-shrink: 0; box-shadow: var(--shadow-md); }
.book-info { flex: 1; min-width: 0; }
.book-title { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; line-height: 1.3; }
.book-author { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 8px; }
.book-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.7rem; }
.book-tag { padding: 3px 8px; border-radius: 100px; background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
.book-locations { display: flex; flex-wrap: wrap; gap: 8px; }
.location-chip { font-size: 0.75rem; padding: 5px 10px; border-radius: var(--radius-sm); background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); cursor: pointer; transition: all var(--transition-fast); }
.location-chip:hover { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }
.timeline-container { display: flex; flex-direction: column; height: 100%; padding: 24px; background: var(--bg-primary); }
.timeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-shrink: 0; }
.timeline-header h2 { font-size: 1.5rem; font-weight: 600; }
.timeline-controls { display: flex; align-items: center; gap: 16px; }
#timelineYear { flex: 1; max-width: 300px; accent-color: var(--accent-primary); }
.year-display { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; color: var(--accent-primary); min-width: 80px; text-align: right; }
.timeline-track { flex: 1; position: relative; overflow-y: auto; padding: 20px 0; }
.timeline-track::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border-color); transform: translateX(-50%); }
.timeline-event { position: relative; display: flex; margin-bottom: 32px; opacity: 0.4; transition: opacity var(--transition-normal); }
.timeline-event.active, .timeline-event:hover { opacity: 1; }
.timeline-event:nth-child(odd) { flex-direction: row; }
.timeline-event:nth-child(even) { flex-direction: row-reverse; }
.timeline-event-content { width: 45%; padding: 0 40px; position: relative; }
.timeline-event:nth-child(odd) .timeline-event-content { text-align: right; }
.timeline-event-marker { position: absolute; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--event-color); border: 3px solid var(--bg-primary); box-shadow: 0 0 0 2px var(--event-color); z-index: 2; }
.timeline-event:nth-child(odd) .timeline-event-marker { left: 50%; transform: translateX(-50%); }
.timeline-event:nth-child(even) .timeline-event-marker { left: 50%; transform: translateX(-50%); }
.timeline-event-year { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--accent-primary); margin-bottom: 8px; }
.timeline-event-card { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); transition: all var(--transition-fast); cursor: pointer; }
.timeline-event-card:hover { border-color: var(--event-color); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.timeline-event-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.timeline-event-book { font-size: 0.8rem; color: var(--accent-primary); font-style: italic; margin-bottom: 4px; }
.timeline-event-location { font-size: 0.75rem; color: var(--text-muted); }
.timeline-detail { flex-shrink: 0; padding: 20px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-top: 16px; }
.timeline-hint { text-align: center; color: var(--text-muted); padding: 40px; }
.random-container { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 24px; height: 100%; }
.random-card { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 400px; position: relative; overflow: hidden; }
.random-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, var(--accent-primary) 0%, transparent 70%); opacity: 0.03; }
.random-content, .random-result { position: relative; z-index: 1; text-align: center; width: 100%; max-width: 400px; }
.random-icon { font-size: 4rem; margin-bottom: 20px; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.random-content h2 { font-size: 1.5rem; margin-bottom: 8px; }
.random-content p { color: var(--text-secondary); margin-bottom: 24px; }
.random-result .result-content { text-align: left; margin-bottom: 20px; }
.btn-random-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; color: var(--text-secondary); transition: all var(--transition-fast); }
.btn-random-close:hover { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }
.random-history { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; height: fit-content; max-height: 100%; }
.random-history h3 { font-size: 1rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color); }
.history-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--bg-tertiary); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); font-size: 0.8rem; }
.history-item:hover { background: var(--border-color); }
.history-marker { width: 8px; height: 8px; border-radius: 50%; background: var(--marker-color); flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-name { font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-time { color: var(--text-muted); font-size: 0.7rem; }
.footer { background: var(--bg-panel); border-top: 1px solid var(--border-color); padding: 16px 24px; flex-shrink: 0; }
.footer-content { max-width: 1920px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); }
.footer-info { display: flex; align-items: center; gap: 8px; }
.footer-links { display: flex; gap: 16px; }
.footer-link:hover { color: var(--accent-primary); }
.time-travel-overlay { position: fixed; inset: 0; background: #0a0806; z-index: 1000; display: none; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.time-travel-overlay.active { display: flex; }
.travel-tunnel { position: absolute; inset: 0; }
.tunnel-ring { position: absolute; top: 50%; left: 50%; border: 2px solid var(--accent-gold); border-radius: 50%; transform: translate(-50%, -50%) scale(0); opacity: 0; animation: tunnelExpand 2s infinite ease-out; }
.tunnel-ring:nth-child(1) { animation-delay: 0s; width: 100px; height: 100px; }
.tunnel-ring:nth-child(2) { animation-delay: 0.3s; width: 150px; height: 150px; }
.tunnel-ring:nth-child(3) { animation-delay: 0.6s; width: 200px; height: 200px; }
.tunnel-ring:nth-child(4) { animation-delay: 0.9s; width: 250px; height: 250px; }
@keyframes tunnelExpand { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; } 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; } }
.travel-text { position: relative; z-index: 1; text-align: center; }
.travel-chinese { display: block; font-family: var(--font-serif); font-size: 2.5rem; font-weight: 500; color: var(--accent-gold); margin-bottom: 8px; text-shadow: 0 0 30px rgba(212, 168, 67, 0.5); }
.travel-english { display: block; font-family: var(--font-mono); font-size: 1rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.3em; text-transform: uppercase; }
.travel-progress { position: relative; z-index: 1; width: 300px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 32px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold), var(--accent-teal)); border-radius: 2px; width: 0%; transition: width 0.3s ease; }
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.active { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); animation: fadeIn 200ms ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { position: relative; background: var(--bg-panel); border-radius: var(--radius-lg); max-width: 600px; width: 100%; max-height: 90vh; overflow: hidden; box-shadow: var(--shadow-lg); animation: slideUp 300ms ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; color: var(--text-secondary); transition: all var(--transition-fast); z-index: 10; }
.modal-close:hover { background: var(--accent-primary); color: white; border-color: var(--accent-primary); }
.modal-back { position: absolute; top: 16px; left: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; color: var(--text-secondary); transition: all var(--transition-fast); z-index: 10; }
.modal-back:hover { background: var(--bg-secondary); color: var(--text-primary); }
.modal-title { margin: 0; padding: 20px 64px; border-bottom: 1px solid var(--border-color); font-size: 1.125rem; font-weight: 600; color: var(--text-primary); text-align: center; }
.modal-body { padding: 24px; max-height: 70vh; overflow-y: auto; }
@media (max-width: 1200px) { .explore-layout { grid-template-columns: 300px 1fr 340px; } .search-box { width: 220px; } }
@media (max-width: 1024px) { .explore-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; } .sidebar { border: none; border-top: 1px solid var(--border-color); max-height: 300px; } .sidebar-left { order: 2; } .map-container { order: 1; min-height: 400px; } .sidebar-right { order: 3; border-left: none; border-top: 1px solid var(--border-color); max-height: 400px; } .panel-header { padding: 16px; } .locations-list { padding: 12px 16px; } .map-overlay { padding: 12px; } .random-container { grid-template-columns: 1fr; } .random-history { order: -1; } }
@media (max-width: 768px) { .header-content { padding: 0 16px; height: 56px; } .logo-text { display: none; } .nav-tabs { gap: 2px; } .nav-tab { padding: 6px 10px; font-size: 0.7rem; } .search-box { display: none; } .books-grid { padding: 16px; grid-template-columns: 1fr; } .timeline-header { flex-direction: column; gap: 16px; align-items: stretch; } .timeline-controls { flex-direction: column; gap: 8px; } .year-display { text-align: left; } .timeline-event-content { width: 100%; padding: 0 20px; text-align: left !important; } .timeline-event:nth-child(odd) .timeline-event-marker, .timeline-event:nth-child(even) .timeline-event-marker { left: 50%; transform: translateX(-50%); top: -8px; } .timeline-track::before { left: 50%; } .time-compare { grid-template-columns: 1fr; } }
@media print { .header, .map-controls, .map-legend, .map-status, .footer, .time-travel-overlay, .modal { display: none !important; } .explore-layout { grid-template-columns: 1fr !important; } .sidebar { max-height: none !important; border: none !important; } }
.leaflet-container { font-family: var(--font-serif) !important; }
.leaflet-popup-content-wrapper { border-radius: var(--radius-md) !important; box-shadow: var(--shadow-lg) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-tip { background: white !important; }

/* ---------- 运行时补充样式 ---------- */
.books-grid { flex: 1; min-height: 0; align-content: start; }
.map-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 100%; padding: 32px; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.map-fallback-icon { font-size: 2.5rem; margin-bottom: 4px; }
.map-fallback p { margin: 0; }
.list-empty { padding: 32px 12px; text-align: center; color: var(--text-muted); font-size: 0.8rem; line-height: 1.7; }
.suggestion-empty { padding: 14px 16px; font-size: 0.8rem; color: var(--text-muted); }
.marker-icon { position: relative; }
.detail-tag { font-size: 0.72rem; padding: 3px 9px; border-radius: 100px; background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); }
.detail-tag.type-scene, .detail-tag.type-反乌托邦 { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border-color: rgba(231, 76, 60, 0.2); }
.detail-tag.type-historic { background: rgba(243, 156, 18, 0.1); color: #f39c12; border-color: rgba(243, 156, 18, 0.2); }
.detail-tag.type-landmark { background: rgba(46, 204, 113, 0.1); color: #2ecc71; border-color: rgba(46, 204, 113, 0.2); }
.modal-section-title { font-size: 0.9375rem; font-weight: 600; margin: 20px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent-primary); }
.random-result { flex-direction: column; align-items: stretch; text-align: left; }
.random-result-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.random-result-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 600; flex-shrink: 0; }
.random-result-head h3 { font-size: 1.25rem; margin-bottom: 2px; }
.random-result-meta { font-size: 0.8rem; color: var(--text-muted); }
.random-result-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.random-result-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.timeline-detail-inner { display: flex; flex-direction: column; gap: 6px; }
.timeline-detail-year { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--accent-primary); }
.timeline-detail-inner h3 { font-size: 1.125rem; }
.timeline-detail-meta { font-size: 0.8rem; color: var(--text-muted); }
.timeline-detail-inner .detail-text { margin-top: 8px; }

/* ---------- 在线书目检索 ---------- */
.btn-small { padding: 7px 14px; font-size: 0.78rem; }
.books-toolbar {
    flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; padding: 16px 24px;
    background: var(--bg-panel); border-bottom: 1px solid var(--border-color);
}
.books-toolbar-info { display: flex; flex-direction: column; gap: 2px; }
.books-toolbar-title { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); }
.books-toolbar-hint { font-size: 0.75rem; color: var(--text-muted); }
.online-search { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.online-search input { width: 280px; height: 38px; }
.online-results { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px; }
.online-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 16px; }
.online-results-hint { font-size: 0.72rem; color: var(--text-muted); }
.online-results-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.online-result-card { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.online-result-cover { width: 52px; height: 74px; object-fit: cover; border-radius: 6px; background: var(--bg-tertiary); flex-shrink: 0; }
.online-result-cover-text { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; color: var(--accent-primary); font-size: 1.1rem; }
.online-result-info { flex: 1; min-width: 0; }
.online-result-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); line-height: 1.4; margin-bottom: 2px; }
.online-result-author { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.online-result-meta { font-size: 0.72rem; color: var(--text-muted); margin: 2px 0 6px; }
.online-result-link { font-size: 0.72rem; }
.online-result-actions { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; }
.online-no-local { font-size: 0.72rem; color: var(--text-muted); text-align: right; max-width: 90px; line-height: 1.5; }
.online-loading, .online-empty { padding: 40px 20px; text-align: center; font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; }
.book-card-footer { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border-color); }
.book-plan-btn {
    width: 100%; padding: 9px 14px; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
    background: transparent; color: var(--accent-primary); border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast);
}
.book-plan-btn:hover { background: var(--accent-primary); color: #fff; }

/* ---------- 旅行计划弹窗 ---------- */
.plan-modal-content { max-width: 880px; max-height: 92vh; display: flex; flex-direction: column; }
.plan-modal-header {
    flex-shrink: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 64px 16px 24px; border-bottom: 1px solid var(--border-color);
}
.plan-modal-heading { min-width: 0; }
.plan-title { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.plan-subtitle { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.plan-modal-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.plan-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 28px; scroll-behavior: smooth; }
.plan-loading { padding: 24px 4px; }
.plan-loading-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.plan-progress-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.plan-progress-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--text-secondary); }
.plan-progress-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.plan-progress-item.is-running .plan-progress-dot { background: var(--accent-secondary); animation: pulse 1.4s infinite; }
.plan-progress-item.is-ok .plan-progress-dot { background: var(--accent-teal); }
.plan-progress-item.is-fail .plan-progress-dot { background: var(--accent-primary); }
.plan-progress-label { flex: 1; min-width: 0; }
.plan-progress-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.plan-progress-item.is-ok .plan-progress-status { color: var(--accent-teal); }
.plan-progress-item.is-fail .plan-progress-status { color: var(--accent-primary); }
.plan-loading-note { margin-top: 14px; font-size: 0.75rem; color: var(--text-muted); line-height: 1.7; }
.plan-hero { display: flex; gap: 18px; padding: 16px; background: var(--bg-tertiary); border-radius: var(--radius-md); margin-bottom: 16px; }
.plan-hero-cover { width: 78px; height: 112px; object-fit: cover; border-radius: 8px; flex-shrink: 0; box-shadow: var(--shadow-md); background: var(--bg-secondary); }
.plan-hero-cover-text { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 600; color: var(--accent-primary); }
.plan-hero-info { flex: 1; min-width: 0; }
.plan-hero-title { font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.plan-hero-meta { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 8px; }
.plan-hero-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.7; }
.plan-online { margin-top: 8px; font-size: 0.72rem; color: var(--accent-teal); }
.plan-online.is-muted { color: var(--text-muted); }
.plan-notice { padding: 12px 14px; margin-bottom: 16px; border-left: 3px solid var(--accent-secondary); background: rgba(230, 126, 34, 0.08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.7; }
.plan-summary { margin-bottom: 18px; padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.plan-summary-label { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-primary); margin-bottom: 6px; }
.plan-summary p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.75; }
.plan-section-title { font-size: 0.9rem; font-weight: 600; margin: 22px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent-primary); color: var(--text-primary); }
.plan-prep { margin-bottom: 6px; }
.plan-weather-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan-weather-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.plan-weather-day { font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent-primary); }
.plan-weather-date { font-size: 0.72rem; color: var(--text-muted); }
.plan-weather-value { font-size: 0.78rem; color: var(--text-primary); line-height: 1.5; }
.plan-prep-list { margin: 12px 0 0; padding-left: 20px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.8; }
.plan-days { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.plan-day { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-secondary); overflow: hidden; }
.plan-day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-color); }
.plan-day-num { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; color: #fff; background: var(--accent-primary); padding: 3px 9px; border-radius: 100px; }
.plan-day-title { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.plan-day-weather { font-size: 0.72rem; color: var(--text-secondary); background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 3px 10px; border-radius: 100px; }
.plan-day-weather.is-muted { color: var(--text-muted); }
.plan-day-body { padding: 14px 16px 16px; }
.plan-day-narrative { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.75; margin-bottom: 12px; }
.plan-day-ai { margin-bottom: 12px; padding: 12px 14px; background: rgba(22, 160, 133, 0.07); border-radius: var(--radius-sm); border-left: 3px solid var(--accent-teal); font-size: 0.8rem; color: var(--text-secondary); line-height: 1.75; }
.plan-ai-label { display: block; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--accent-teal); margin-bottom: 6px; }
.plan-day-ai p { margin-bottom: 6px; }
.plan-md-heading { font-weight: 600; color: var(--text-primary); }
.plan-md-list { margin: 6px 0 8px; padding-left: 18px; }
.plan-stops { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan-stop { display: flex; gap: 12px; }
.plan-stop-time { flex-shrink: 0; width: 46px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-primary); padding-top: 2px; }
.plan-stop-body { flex: 1; min-width: 0; border-left: 1px dashed var(--border-color); padding-left: 12px; }
.plan-stop-title { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.plan-stop-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.7; }
.plan-day-tips { list-style: none; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-color); display: flex; flex-direction: column; gap: 4px; }
.plan-day-tips li { font-size: 0.74rem; color: var(--text-muted); line-height: 1.7; }
.plan-day-tips li::before { content: '· '; color: var(--accent-gold); }
.plan-extensions { margin-top: 4px; }
.plan-extension { padding: 12px 14px; background: var(--bg-tertiary); border-radius: var(--radius-sm); margin-bottom: 8px; }
.plan-extension-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 3px; }
.plan-extension p { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.7; }
.plan-sources { margin-top: 4px; }
.plan-sources-scroll { overflow-x: auto; }
.plan-sources-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.plan-sources-table th, .plan-sources-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.plan-sources-table th { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; color: var(--text-muted); background: var(--bg-tertiary); }
.plan-sources-table td { color: var(--text-secondary); }
.plan-source-badge { display: inline-block; padding: 1px 8px; border-radius: 100px; font-size: 0.68rem; }
.plan-source-badge.is-ok { background: rgba(22, 160, 133, 0.12); color: var(--accent-teal); }
.plan-source-badge.is-fail { background: rgba(192, 57, 43, 0.12); color: var(--accent-primary); }
.plan-disclaimer { margin-top: 12px; font-size: 0.72rem; color: var(--text-muted); line-height: 1.8; }
.plan-generated { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 0.72rem; color: var(--text-muted); }
.plan-empty { padding: 40px 16px; text-align: center; }
.plan-empty h3 { font-size: 1.05rem; margin-bottom: 10px; }
.plan-empty p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 6px; }

/* ---------- LLM 设置 ---------- */
.llm-modal-content { max-width: 520px; }
.llm-form { display: flex; flex-direction: column; gap: 14px; }
.llm-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.llm-field input, .llm-field select { width: 100%; height: 38px; }
.llm-hint { font-size: 0.72rem; color: var(--text-muted); line-height: 1.75; }
.llm-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.llm-status { font-size: 0.75rem; color: var(--text-muted); line-height: 1.6; }
.llm-status.is-ok { color: var(--accent-teal); }
.llm-status.is-fail { color: var(--accent-primary); }
.llm-status.is-running { color: var(--accent-secondary); }

@media (max-width: 768px) {
    .books-toolbar { padding: 12px 16px; }
    .online-search { width: 100%; }
    .online-search input { width: 100%; flex: 1 1 160px; }
    .online-results { padding: 14px 16px; }
    .online-results-list { grid-template-columns: 1fr; }
    .plan-modal-header { flex-direction: column; padding: 16px 60px 14px 16px; }
    .plan-modal-actions { justify-content: flex-start; }
    .plan-body { padding: 16px; }
    .plan-hero { flex-direction: column; }
    .plan-hero-cover { width: 64px; height: 92px; }
    .plan-weather-row { grid-template-columns: 1fr; }
    .plan-day-head { align-items: flex-start; }
    .plan-day-weather { margin-left: 0; }
    .plan-stop { flex-direction: column; gap: 2px; }
    .plan-stop-time { width: auto; }
    .plan-stop-body { border-left: none; padding-left: 0; }
}

/* 窄屏时页面整体滚动，避免固定高度裁切内容 */
@media (max-width: 1024px) {
    body { overflow: auto; }
    .app-container { height: auto; min-height: 100vh; }
    .main-content { overflow: visible; min-height: 0; }
    .tab-panel { overflow: visible; }
    .explore-layout { height: auto; grid-template-rows: auto auto auto; }
    .map-container { height: 420px; }
    .sidebar { max-height: 420px; }
}
