/* 日程管理系统 - 前台 H5 样式（移动端适配） */
:root {
    --building-h: 13vh;          /* 底部建筑元素高度（新背景实测约12%+1vh余量），用于避让 */
    --blue: #0d6ef0;
    --blue-deep: #0b57a4;
    --card-light: #cdd9f2;
    --ink: #17325e;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #fff;
    min-height: 100vh;
    background: var(--blue-deep);
}

/* 背景层：固定铺满视口，保证顶部网格与底部建筑完整显示 */
.bg {
    position: fixed;
    inset: 0;
    background: url(../img/bg.png) center / 100% 100% no-repeat;
    z-index: -1;
}

/* 顶部标头图：左右留边距，按原图颜色显示 */
.page-header {
    display: block;
    width: 88%;
    margin: 3vh auto 0;
    user-select: none;
    pointer-events: none;
}

.svg-icon { width: 1em; height: 1em; vertical-align: -0.12em; }

/* ===== 列表页：日期页签 ===== */
.date-tabs {
    display: flex;
    gap: 14px;
    padding: 4vh 5vw 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.date-tab {
    flex: 0 0 auto;
    width: 74px;
    border: none;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.date-tab .m, .date-tab .d {
    display: block;
    text-align: center;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 600;
}
.date-tab .m { background: #f2f4f8; color: #8a94a6; }
.date-tab .d { background: #c4c8d0; color: #fff; }
.date-tab.active .m { background: #9cc4fb; color: #0b3f9e; }
.date-tab.active .d { background: var(--blue); color: #fff; }

/* ===== 列表页：日程卡片 ===== */
.cards {
    padding: 3vh 5vw calc(var(--building-h) + 3vh);
    display: flex;
    flex-direction: column;
    gap: 4vh;
}
.card {
    display: flex;
    gap: 4vw;
    align-items: stretch;
    cursor: pointer;
}
.card-loc {
    flex: 0 0 34%;
    background: var(--blue);
    border-radius: 6px;
    padding: 5vw 4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-size: 16px;
    line-height: 1.7;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.card-info {
    flex: 1;
    background: var(--card-light);
    border-radius: 6px;
    padding: 5vw 4vw;
    color: var(--ink);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2vw;
}
.card-time .svg-icon { font-size: 19px; }
.card-content {
    font-size: 16px;
    line-height: 1.7;
    word-break: break-all;
}
.cards-empty {
    text-align: center;
    color: rgba(255, 255, 255, .8);
    padding: 6vh 0;
    font-size: 15px;
}

/* ===== 详情页 ===== */
body.detail {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.back-btn {
    position: fixed;
    top: 2.4vh;
    left: 4vw;
    z-index: 6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .14);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}
/* 中间日程信息板块：可上下滚动，避开底部建筑 */
.detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2vh 5vw 0;
}
.detail-scroll img {
    display: block;
    width: 100%;
    height: auto;
}
.detail-fallback {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    padding: 4vw;
    margin-bottom: 3vh;
}
.detail-fallback .row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 2vw 0;
    font-size: 15px;
    line-height: 1.7;
}
.detail-fallback .row .svg-icon { margin-top: 4px; font-size: 17px; }
/* 底部建筑占位（避开建筑元素） */
.building-spacer {
    flex: 0 0 auto;
    height: var(--building-h);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    left: 50%;
    bottom: 12vh;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, .78);
    color: #fff;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
    z-index: 99;
    max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-success { background: rgba(24, 144, 78, .9); }
.toast-error { background: rgba(198, 60, 60, .9); }
