/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* 微信浏览器优化 */
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* 微信浏览器优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* 微信浏览器特定优化 */
body.wechat-browser {
    /* 防止微信浏览器默认的橡皮筋效果 */
    overscroll-behavior: contain;
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
    /* 确保页面占满整个屏幕宽度 */
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

/* 微信浏览器中的容器优化 */
body.wechat-browser .container {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 防止微信浏览器默认的点击高亮 */
a, button, input, textarea, select {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 允许文本选择 */
p, h1, h2, h3, h4, h5, h6, span, div {
    -webkit-user-select: text;
    user-select: text;
}

header {
    background: linear-gradient(to right, #8B0000, #B22222);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.header-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

header h1 {
    font-size: 2em;
    margin: 0;
    flex-grow: 1;
    padding: 0 100px; /* 为左右两侧的logo和语言选择器留出空间 */
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-x: hidden;
    white-space: normal;
}

.container {
    max-width: 100%;
    width: 100%;
    min-width: 100%;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 200px;
    gap: 20px;
    height: calc(100vh - 180px);
    overflow-x: hidden;
    box-sizing: border-box;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

.map-container {
    grid-column: 1;
    grid-row: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

#map {
    width: 100%;
    height: 100%;
    /* 微信浏览器优化 */
    position: relative;
    z-index: 1;
}

/* 微信浏览器中的地图优化 */
body.wechat-browser #map {
    /* 防止微信浏览器中的地图触摸冲突 */
    touch-action: none;
    /* 优化地图渲染性能 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.book-info-container {
    grid-column: 2;
    grid-row: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto; /* 使用单一滚动条 */
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 100%; /* 确保填满整个高度 */
}

.timeline-container {
    grid-column: 1 / span 2;
    grid-row: 2;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 200px; /* 固定高度 */
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* 隐藏溢出内容 */
    box-sizing: border-box;
    /* 微信浏览器优化 */
    position: relative;
    z-index: 2;
}

/* 微信浏览器中的时间轴优化 */
body.wechat-browser .timeline-container {
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
    /* 防止触摸事件冲突 */
    touch-action: pan-y;
    /* 确保内容正确显示 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.timeline-stages {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    flex-shrink: 0; /* 防止在小屏幕上被压缩 */
    overflow-x: auto; /* 允许横向滚动 */
    scrollbar-width: none; /* 隐藏滚动条 */
    -ms-overflow-style: none; /* 隐藏IE滚动条 */
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.timeline-stages::-webkit-scrollbar {
    display: none; /* 隐藏WebKit浏览器滚动条 */
}

.stage-tab {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-weight: bold;
    color: #8B0000;
    white-space: nowrap; /* 防止文字换行 */
    font-size: 0.9em;
    flex-shrink: 0; /* 防止标签被压缩 */
}

.stage-tab:hover {
    background-color: #e0e0e0;
}

.stage-tab.active {
    background-color: #B22222;
    color: white;
    border-color: #B22222;
}

.stage-content {
    display: none;
    flex: 1;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.stage-content.active {
    display: flex;
    width: 100%;
    max-width: 100%;
}

.events-container-wrapper {
    position: relative;
    height: 120px; /* 固定高度 */
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.events-scroll-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    height: 100%;
    scroll-behavior: smooth;
    flex: 1;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    scrollbar-width: none; /* 隐藏滚动条 Firefox */
    -ms-overflow-style: none; /* 隐藏滚动条 IE/Edge */
    box-sizing: border-box;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* 优化iOS上的滚动性能 */
}

.events-scroll-container::-webkit-scrollbar {
    display: none; /* 隐藏WebKit浏览器滚动条 */
}

.event-card {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-right: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 240px;
    height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* 水平居中 */
    text-align: center; /* 文字居中 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: calc(100vw - 100px);
    word-wrap: break-word;
    scroll-snap-align: start; /* 对齐到滚动捕捉点 */
}

.event-card:hover {
    background: linear-gradient(to bottom, #e9ecef, #dae0e5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.event-card.active {
    background: #8B0000;
    color: white;
    border-color: #8B0000;
}

.event-card h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.event-card p {
    margin: 0;
    font-size: 1.0em;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
}

.event-card.active p {
    color: #f0f0f0;
}

#event-info, #book-info {
    flex: 1;
    margin-bottom: 0;
    overflow-y: visible; /* 确保内容可以完全显示 */
    flex-shrink: 0; /* 防止在空间不足时收缩 */
}

#event-info h3, #book-info h3 {
    color: #8B0000;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.4em;
}

.event-detail-item {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid #B22222;
    background-color: #f9f9f9;
    overflow-y: visible; /* 确保内容可以完全显示 */
}

.event-detail-item h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.event-detail-item h4 {
    color: #8B0000;
    margin-bottom: 5px;
}

.book-detail-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: visible; /* 确保内容可以完全显示 */
}

.book-cover-placeholder {
    flex: 0 0 120px;
    height: 160px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    max-width: 100%;
}

.book-cover {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.book-info-top {
    flex: 1 1 calc(100% - 135px);
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.book-title {
    font-weight: bold;
    color: #8B0000;
    font-size: 1.1em;
    margin-bottom: 5px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-author {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-publisher {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-callno {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-recommender {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-recommendation {
    color: #333;
    font-style: italic;
    margin: 10px 0;
    flex: 1 1 100%;
    padding: 8px;
    background-color: #f9f9f9;
    border-left: 3px solid #B22222;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-y: auto; /* 只在需要时显示滚动条 */
}

.book-qr-container {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    width: 100%;
    max-width: 100%;
}

.qr-code {
    width: 100px;
    height: 100px;
    border: 1px solid #eee;
    padding: 5px;
    max-width: 100%;
}

.instructions {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
}

.book-description {
    margin-bottom: 10px;
    text-align: justify;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-y: auto; /* 只在需要时显示滚动条 */
}

footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(to right, #8B0000, #B22222);
    color: white;
    font-size: 0.9em;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

footer p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    gap: 10px;
}

.footer-left, .footer-center, .footer-right {
    flex: 1;
    text-align: center;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

footer a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    word-wrap: break-word;
}

.marker-label {
    background-color: #8B0000;
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .event-card {
        min-width: 250px;
        padding: 20px;
        max-width: calc(100vw - 100px);
    }
    
    .qr-code {
        width: 120px;
        height: 120px;
    }
    
    .stage-tab {
        padding: 15px 25px;
    }
    
    .events-scroll-container {
        overflow-x: auto;
    }
    
    .event-card h4 {
        font-size: 1.2em;
    }
    
    .event-card p {
        font-size: 1em;
    }
    
    #event-info h3, #book-info h3 {
        font-size: 1.6em;
    }
    
    .event-detail-item h3 {
        font-size: 1.5em;
    }
    
    .book-title {
        font-size: 1.3em;
    }
    
    header h1 {
        font-size: 2.5em;
    }
}

/* 大屏优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        height: calc(100vh - 200px);
    }
    
    header h1 {
        font-size: 2.5em;
    }
    
    header h2 {
        font-size: 1.8em;
    }
    
    .event-card {
        min-width: 190px;
        height: 100px; /* 固定高度为100px */
    }
    
    .qr-code {
        width: 110px;
        height: 110px;
    }
}

/* 75寸大屏触摸优化 - 适配Android 14系统和167.5cm*95cm屏幕 */
@media (min-width: 1600px) and (hover: none) and (pointer: coarse) {
    .container {
        max-width: 95%;
        height: calc(100vh - 220px);
        gap: 25px;
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: 70vh 30vh; /* 固定高度比例 */
    }
    
    .map-container {
        height: 100%;
        grid-row: 1;
        grid-column: 1;
    }
    
    .book-info-container {
        height: 100%;
        grid-row: 1;
        grid-column: 2;
        padding: 25px;
        overflow-y: auto; /* 只在需要时显示滚动条 */
    }
    
    .timeline-container {
        height: 100%;
        grid-row: 2;
        grid-column: 1 / span 2;
        padding: 25px;
        display: flex;
        flex-direction: column;
    }
    
    .timeline-stages {
        flex-shrink: 0;
    }
    
    .stage-content {
        flex: 1;
        overflow: hidden;
    }
    
    .events-container-wrapper {
        height: 180px;
    }
    
    .event-card {
        min-width: 280px;
        height: 140px;
        padding: 15px;
        margin-right: 20px;
        font-size: 1.3em;
        border-radius: 12px;
    }
    
    .event-card h4 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .event-card p {
        font-size: 1em;
    }
    
    .stage-tab {
        padding: 15px 30px;
        font-size: 1.3em;
        border-radius: 8px 8px 0 0;
    }
    
    #event-info h3, #book-info h3 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .event-detail-item h3 {
        font-size: 1.6em;
    }
    
    .book-title {
        font-size: 1.4em;
    }
    
    .book-detail-item {
        padding: 20px;
        margin-bottom: 25px;
    }
    
    .book-cover-placeholder {
        flex: 0 0 150px;
        height: 200px;
    }
    
    .qr-code {
        width: 140px;
        height: 140px;
    }
    
    .instructions {
        font-size: 1em;
    }
    
    header {
        padding: 25px 0;
    }
    
    header h1 {
        font-size: 3em;
    }
    
    .header-logo {
        height: 100px;
    }
    
    /* 针对Android 14系统优化 */
    body {
        touch-action: manipulation;
    }
}

/* 桌面端优化 */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .container {
        max-width: 1600px;
        height: calc(100vh - 200px);
    }
    
    header h1 {
        font-size: 2.5em;
    }
    
    .event-card {
        min-width: 190px;
        height: 100px;
    }
    
    .qr-code {
        width: 110px;
        height: 110px;
    }
    
    /* 隐藏滚动条但仍保持滚动功能 */
    .events-scroll-container::-webkit-scrollbar {
        display: none;
    }
    
    .events-scroll-container {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    /* 图书信息区域滚动条样式 */
    .book-info-container::-webkit-scrollbar {
        width: 8px;
    }
    
    .book-info-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .book-info-container::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }
    
    .book-info-container::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        display: flex;
        flex-direction: column;
        padding: 10px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        margin: 10px auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    .map-container, .book-info-container, .timeline-container {
        grid-column: 1;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    
    .map-container {
        height: 400px;
    }
    
    .book-info-container {
        order: 3;
        overflow-y: auto; /* 只在需要时显示滚动条 */
    }
    
    .timeline-container {
        order: 4;
        height: auto;
        padding: 15px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .timeline-stages {
        margin-bottom: 15px;
        justify-content: flex-start; /* 改为flex-start确保标签左对齐 */
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        overflow-x: auto; /* 允许横向滚动 */
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
    }
    
    .stage-content {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .events-container-wrapper {
        height: auto;
        min-height: 120px;
        padding: 10px 0;
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .events-scroll-container {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch; /* 优化移动端滚动 */
    }
    
    header {
        height: 120px;
        overflow: hidden;
        display: flex;
        align-items: center;
    }
    
    .header-content {
        height: 100%;
        align-items: center;
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.4em;
        padding: 0 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        overflow: hidden;
    }
    
    .header-logo {
        height: 60px;
        left: 10px;
    }
    
    footer p {
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .footer-left, .footer-center, .footer-right {
        text-align: center;
        width: 100%;
        flex: 1 1 100%;
    }
    
    footer span {
        margin: 5px 0;
        width: 100%;
    }
    
    .footer-left {
        order: 1;
    }
    
    .footer-center {
        order: 3;
    }
    
    .footer-right {
        order: 2;
    }
    
    .footer-right a {
        display: inline-block;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .container {
        padding: 8px;
        gap: 12px;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 8px auto;
        overflow-x: hidden;
    }
    
    .map-container {
        height: 280px;
        min-height: 250px;
    }
    
    .book-info-container, .timeline-container {
        padding: 12px;
        overflow-y: auto; /* 只在需要时显示滚动条 */
    }
    
    header {
        height: 100px;
        padding: 10px 0;
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    .header-logo {
        height: 50px;
        left: 10px;
    }
    
    header h1 {
        font-size: 1.2em;
        line-height: 1.2;
        padding: 0 50px; /* 为logo留出空间 */
        white-space: normal;
        overflow-x: hidden;
    }
    
    .event-card {
        min-width: 140px;
        max-width: calc(100vw - 80px);
        height: 85px;
        padding: 8px;
        margin-right: 8px;
        font-size: 0.85em;
        scroll-snap-align: start;
        width: auto;
        word-wrap: break-word;
        overflow: hidden;
    }
    
    .stage-tab {
        padding: 8px 12px;
        font-size: 0.75em;
        border-radius: 15px;
        margin-bottom: 3px;
    }
    
    #event-info h3, #book-info h3 {
        font-size: 1.1em;
        margin-bottom: 8px;
    }
    
    .event-card h4 {
        font-size: 0.85em;
        margin-bottom: 4px;
        line-height: 1.2;
    }
    
    .event-card p {
        font-size: 0.75em;
        line-height: 1.2;
    }
    
    .events-container-wrapper {
        height: 120px;
        overflow: hidden;
        min-height: 100px;
    }
    
    .events-scroll-container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .event-detail-item h3 {
        font-size: 1.1em;
    }
    
    .book-cover-placeholder {
        flex: 0 0 70px;
        height: 95px;
    }
    
    .book-title {
        font-size: 0.95em;
    }
    
    .book-author, .book-publisher, .book-callno, .book-recommender {
        font-size: 0.8em;
    }
    
    .qr-code {
        width: 80px;
        height: 80px;
    }
    
    .instructions {
        font-size: 0.7em;
    }
    
    footer {
        padding: 12px 8px;
        font-size: 0.75em;
        line-height: 1.4;
    }
    
    .footer-right {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .footer-right a {
        margin: 2px 5px;
    }
}

@media (max-width: 320px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 6px;
        gap: 10px;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin: 6px auto;
        overflow-x: hidden;
    }
    
    .map-container {
        height: 240px;
        min-height: 220px;
    }
    
    .book-info-container, .timeline-container {
        padding: 10px;
        overflow-y: auto; /* 只在需要时显示滚动条 */
    }
    
    header {
        height: 90px;
        padding: 8px 0;
    }
    
    .header-content {
        padding: 0 8px;
    }
    
    header h1 {
        font-size: 1.1em;
        padding: 0 40px; /* 为logo留出空间 */
        white-space: normal;
        overflow-x: hidden;
    }
    
    .header-logo {
        height: 40px;
        left: 8px;
    }
    
    .event-card {
        min-width: 120px;
        max-width: calc(100vw - 70px);
        height: 75px;
        padding: 6px;
        margin-right: 6px;
        font-size: 0.8em;
        scroll-snap-align: start;
        width: auto;
        word-wrap: break-word;
        overflow: hidden;
    }
    
    .stage-tab {
        padding: 6px 10px;
        font-size: 0.75em;
        border-radius: 12px;
        margin-bottom: 2px;
    }
    
    .events-container-wrapper {
        height: 110px;
        overflow: hidden;
        min-height: 90px;
    }
    
    .events-scroll-container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    #event-info h3, #book-info h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .event-card h4 {
        font-size: 0.85em;
        margin-bottom: 3px;
    }
    
    .event-card p {
        font-size: 0.75em;
    }
    
    .book-cover-placeholder {
        flex: 0 0 60px;
        height: 85px;
    }
    
    .book-title {
        font-size: 0.9em;
    }
    
    .book-author, .book-publisher, .book-callno, .book-recommender {
        font-size: 0.8em;
    }
    
    .qr-code {
        width: 70px;
        height: 70px;
    }
    
    .instructions {
        font-size: 0.7em;
    }
    
    footer {
        padding: 10px 6px;
        font-size: 0.75em;
        line-height: 1.5;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-right a {
        margin: 2px 0;
    }
}
