/* ==========================================================================
   生活学堂 lifeschool.cn · 全站响应式精修样式表 v3.0
   覆盖页面：首页(index) / 学堂理念(about) / 往期共学(activities) / 生活志(journal) / 互动问卷(survey)
   设计语言参照 suyanglife.com：草木绿 #4A7C5E、暖白底 #F8FAF8、点缀金 #C99340
   ========================================================================== */

:root {
    --forest: #4A7C5E;
    --olive: #6B8F7D;
    --warm-oat: #F8FAF8;
    --linen: #FFFFFF;
    --gold: #C99340;
    --leaf: #7CBA9F;
    --dark: #2D3436;
    --muted: #6B7280;
    --border: #E6EBE7;
    --shadow-sm: 0 4px 20px rgba(74, 124, 94, .06);
    --shadow-md: 0 8px 36px rgba(74, 124, 94, .10);
    --shadow-lg: 0 16px 56px rgba(74, 124, 94, .14);
    --radius: 18px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --tr: all .3s cubic-bezier(.4, 0, .2, 1);
}

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

html { overflow-x: clip; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--warm-oat);
    color: var(--dark);
    line-height: 1.75;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

.serif { font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif; font-weight: 500; }

a { color: inherit; text-decoration: none; transition: var(--tr); }
img { display: block; max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* 顶部通栏 */
.top-notice {
    background: var(--forest);
    color: #F8FAF8;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    letter-spacing: 0.12em;
}

/* 头部导航 */
.site-header {
    position: fixed;
    top: 0;
    left: 0; right: 0;
    z-index: 999;
    background: rgba(248, 250, 248, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(230, 235, 231, 0.65);
    transition: var(--tr);
    transform: translateY(0);
}
.site-header.scrolled {
    background: rgba(248, 250, 248, 0.98);
    box-shadow: var(--shadow-sm);
}
.site-header.nav-hidden { transform: translateY(-110%); }

.nav-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo { display: flex; align-items: center; }
.brand-logo img { height: 38px; width: auto; display: block; }

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    font-size: 0.95rem;
    color: var(--dark);
}
.main-navigation a { padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.main-navigation a:hover, .main-navigation a.active,
.main-navigation .current-menu-item > a { color: var(--forest); border-color: var(--gold); }

.header-cta {
    background: var(--forest);
    color: #fff;
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.header-cta:hover { background: var(--olive); }

.nav-toggle {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--forest);
    cursor: pointer;
}

/* ===== 通用章节与内页页头 (.page-intro) ===== */
.ls-section { padding: 72px 0; }
.sec-head {
    text-align: center;
    margin-bottom: 44px;
}
.section-label {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}
.section-title {
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    font-size: 1.95rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 6px;
}
.section-en {
    font-size: 0.86rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}
.link-more {
    color: var(--forest);
    font-weight: 500;
    border-bottom: 1px solid rgba(74, 124, 94, 0.3);
    padding-bottom: 2px;
}
.link-more:hover { border-color: var(--forest); }

/* 二级内页顶部导语区（about / activities / journal / survey 共用） */
.page-intro {
    max-width: 1200px;
    margin: 0 auto;
    padding: 112px 28px 24px;
}
.page-intro h1 {
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    font-size: 2.15rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--dark);
    line-height: 1.35;
}
.page-intro p {
    color: var(--muted);
    font-size: 0.96rem;
    max-width: 680px;
}

/* ===== Hero 首屏 ===== */
.hero {
    position: relative;
    padding: 116px 0 76px;
    background: linear-gradient(160deg, #EEF3EE 0%, #F8FAF8 60%, #F2EFE7 100%);
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute;
    top: -80px; right: -80px;
    width: 340px; height: 340px;
    background: radial-gradient(circle, rgba(124,186,159,.22), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-box {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-eyebrow {
    font-size: 0.76rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--forest);
    margin-bottom: 14px;
    display: block;
    font-weight: 500;
}
.hero h1 {
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    font-size: 3rem;
    line-height: 1.28;
    font-weight: 500;
    margin-bottom: 18px;
    color: var(--dark);
}
.hero h1 .accent { color: var(--gold); }
.hero-sub {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 28px;
    max-width: 480px;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
    background: var(--forest);
    color: #fff;
    padding: 0.78rem 1.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
}
.btn-primary:hover { background: var(--olive); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--forest);
    border: 1.5px solid var(--forest);
    padding: 0.75rem 1.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
}
.btn-ghost:hover { background: var(--forest); color: #fff; }

.hero-quote-card {
    background: var(--linen);
    border-radius: var(--radius);
    padding: 30px 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.hero-quote-card h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.15rem;
    color: var(--forest);
    margin-bottom: 14px;
}
.hero-quote-card ul { list-style: none; }
.hero-quote-card li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.9rem;
    color: var(--muted);
}
.hero-quote-card li:last-child { border-bottom: none; padding-bottom: 0; }
.hero-quote-card strong { color: var(--dark); }

/* ===== 徽章体系 ===== */
.badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.badge-open {
    display: inline-block;
    background: rgba(74,124,94,.12);
    color: var(--forest);
    font-size: 0.78rem;
    padding: 0.25rem 0.85rem;
    border-radius: 100px;
    font-weight: 500;
}
.badge-soon {
    display: inline-block;
    background: rgba(201,147,64,.14);
    color: var(--gold);
    font-size: 0.75rem;
    padding: 0.22rem 0.75rem;
    border-radius: 100px;
    font-weight: 500;
}
.badge-city {
    display: inline-block;
    background: var(--warm-oat);
    color: var(--muted);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    padding: 0.2rem 0.65rem;
    border-radius: 6px;
}

/* ===== 当期报名模块 ===== */
.featured-signup {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 36px;
    box-shadow: var(--shadow-sm);
    align-items: start;
}
.featured-signup h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.6rem;
    margin-bottom: 14px;
    color: var(--dark);
    line-height: 1.35;
}
.meta-tags {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 18px;
    padding: 12px 16px;
    background: var(--warm-oat);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(230, 235, 231, 0.7);
}
.featured-signup .lead {
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 0.94rem;
    line-height: 1.75;
}

/* 39期餐品图网格 */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}
.dish-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--warm-oat);
    transition: var(--tr);
}
.dish-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: var(--tr);
}
.dish-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.dish-thumb span {
    display: block;
    padding: 6px 8px;
    font-size: 0.8rem;
    text-align: center;
    color: var(--dark);
    background: var(--linen);
}

/* 报名框侧栏 */
.signup-box {
    background: var(--warm-oat);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 兼容旧版 HTML：如果 .signup-box 内仍有直接放置的巨幅海报，将其自动限制为精致小横条高度 */
.signup-box > div > a.poster-link:not(.poster-mini-bar) {
    display: flex !important;
    align-items: center;
    gap: 12px;
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 16px !important;
}
.signup-box > div > a.poster-link:not(.poster-mini-bar) img.poster-img {
    width: 48px !important;
    height: 64px !important;
    object-fit: cover;
    border-radius: 6px;
}
.signup-box > div > a.poster-link:not(.poster-mini-bar)::after {
    content: "点击预览活动完整海报 ↗";
    font-size: 0.85rem;
    color: var(--forest);
    font-weight: 500;
}

/* 轻量级海报预览横条 */
.poster-mini-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 18px;
    transition: var(--tr);
}
.poster-mini-bar:hover {
    border-color: var(--forest);
    box-shadow: var(--shadow-sm);
}
.poster-mini-bar img {
    width: 48px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.poster-mini-text {
    flex: 1;
    min-width: 0;
}
.poster-mini-text strong {
    display: block;
    font-size: 0.88rem;
    color: var(--dark);
    margin-bottom: 2px;
}
.poster-mini-text span {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
}
.poster-mini-btn {
    font-size: 0.78rem;
    color: var(--forest);
    font-weight: 500;
    background: rgba(74, 124, 94, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.price-num { font-size: 1.75rem; color: var(--forest); font-weight: 600; }
.price-num small { font-size: 0.85rem; font-weight: normal; color: var(--muted); }

.form-mini input, .form-mini select, .form-mini textarea {
    width: 100%;
    padding: 0.75rem 0.95rem;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--dark);
    transition: var(--tr);
}
.form-mini input:focus, .form-mini select:focus, .form-mini textarea:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(74,124,94,.12);
}
.pay-methods {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 4px 0 16px;
}
.signup-note {
    font-size: 0.76rem;
    color: var(--muted);
    margin-top: 10px;
    text-align: center;
}

/* ===== 预告条（左海报缩略图 + 右文案，告别 1000px 超高卡片） ===== */
.upcoming-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.upcoming-card {
    background: var(--linen);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: block;
    transition: var(--tr);
}
.upcoming-card.has-poster {
    padding: 16px;
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 18px;
    align-items: center;
}
.upcoming-card:hover {
    border-color: var(--gold);
    border-style: solid;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.upcoming-card.has-poster .poster-wrap {
    width: 104px;
    height: 146px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--warm-oat);
    flex-shrink: 0;
}
.upcoming-card.has-poster .poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.upcoming-card.has-poster .card-body {
    padding: 0;
    min-width: 0;
}
.upcoming-card h4 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.12rem;
    margin-bottom: 6px;
    color: var(--dark);
    line-height: 1.4;
}
.upcoming-card p {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.card-link-hint {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 500;
}

/* ===== 往期共学筛选栏与无海报期次占位画框 (activities.html 关键缺失样式补齐) ===== */
.archive-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.filter-chip {
    background: var(--linen);
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.42rem 1.05rem;
    font-size: 0.84rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap;
}
.filter-chip:hover {
    border-color: var(--forest);
    color: var(--forest);
}
.filter-chip.active {
    background: var(--forest);
    color: #fff;
    border-color: var(--forest);
    font-weight: 500;
}

/* 无海报期次（01-28、32-36期）的东方极简宣纸序号画框 */
.poster-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    border-radius: 10px;
    background: linear-gradient(145deg, #EEF3EE 0%, #F7F5F0 100%);
    border: 1px dashed rgba(74, 124, 94, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.poster-placeholder::before {
    content: "LIFE · LOVE · LIGHT";
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    color: rgba(74, 124, 94, 0.45);
    margin-bottom: 4px;
}
.poster-placeholder .ph-no {
    font-family: 'Noto Serif SC', 'Songti SC', serif;
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--forest);
    opacity: 0.78;
    line-height: 1.1;
    letter-spacing: 0.06em;
}
.poster-placeholder::after {
    content: "生活学堂 · 往期共学档案";
    font-size: 0.72rem;
    color: var(--muted);
    opacity: 0.7;
    margin-top: 6px;
}

.demo-step-label {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}
.interact-card-cta {
    background: var(--warm-oat);
    border: 1.5px dashed var(--border);
}

/* ===== 往期档案卡片（首页与 activities.html 共用） ===== */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.archive-card {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--tr);
    box-shadow: var(--shadow-sm);
}
.archive-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--forest);
}
.archive-card.has-poster {
    padding: 0;
    overflow: hidden;
}
/* 电脑端优雅展示竖版海报：定高 240px 居中陈列，不裁切海报文字，也不撑爆高度 */
.archive-card.has-poster .poster-wrap {
    height: 240px;
    padding: 14px;
    background: var(--warm-oat);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}
.archive-card.has-poster .poster-img {
    max-height: 100%;
    width: auto;
    aspect-ratio: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    object-fit: contain;
}
.archive-card.has-poster .card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    min-width: 0;
}
.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.archive-card h4 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--dark);
    line-height: 1.35;
}
.archive-card p {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.65;
}
.archive-footer {
    font-size: 0.8rem;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.archive-footer a, .archive-footer .view-btn { color: var(--forest); font-weight: 500; }

/* ===== 往期共学总览表 (activities.html 专属) ===== */
.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 16px;
}
.legend .status { margin-right: 4px; }

.table-wrap {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}
table.issues { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.issues th, table.issues td { padding: 14px 18px; text-align: left; vertical-align: middle; }
table.issues thead th {
    background: rgba(74,124,94,.06);
    color: var(--forest);
    font-weight: 500;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.issues tbody tr { border-bottom: 1px solid #EEF1EE; transition: var(--tr); }
table.issues tbody tr:last-child { border-bottom: none; }
table.issues tbody tr:hover { background: rgba(124,186,159,.05); }
table.issues td.no { color: var(--gold); font-family: 'Noto Serif SC', serif; white-space: nowrap; font-weight: 500; }
table.issues td.date { color: var(--muted); white-space: nowrap; }
table.issues td.place { color: var(--muted); }
table.issues td a:hover { color: var(--forest); text-decoration: underline; }

.status { display: inline-block; font-size: 0.75rem; padding: 0.2rem 0.68rem; border-radius: 100px; white-space: nowrap; }
.status-open { background: rgba(74,124,94,.12); color: var(--forest); font-weight: 500; }
.status-soon { background: rgba(201,147,64,.12); color: var(--gold); font-weight: 500; }
.status-done { background: #EEF1EE; color: var(--muted); }

/* ===== 纯文本自动排版演示 (journal.html 专属) ===== */
.plain-text-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.raw-input-box, .rendered-output-box {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    min-height: 240px;
    box-shadow: var(--shadow-sm);
}
.raw-input-box {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--muted);
    white-space: pre-wrap;
    word-break: break-word;
    background: #F4F6F4;
}
.rendered-output-box h3, .rendered-output-box h4 {
    font-family: 'Noto Serif SC', serif;
    color: var(--forest);
    margin: 16px 0 8px;
    font-size: 1.12rem;
}
.rendered-output-box h3:first-child, .rendered-output-box h4:first-child {
    margin-top: 0;
}
.rendered-output-box .auto-quote {
    background: var(--warm-oat);
    border-left: 3px solid var(--gold);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
    color: var(--muted);
    margin: 12px 0;
}
.rendered-output-box p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.9rem; }

/* ===== 问卷互动与知识库卡片 (survey.html / about.html 共用) ===== */
.interact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.interact-card {
    background: var(--linen);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: var(--tr);
    box-shadow: var(--shadow-sm);
}
.interact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--forest); }
.interact-card h4 { font-family: 'Noto Serif SC', serif; font-size: 1.18rem; margin-bottom: 10px; color: var(--forest); }
.interact-card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; line-height: 1.7; }
.interact-card a { color: var(--forest); font-weight: 500; font-size: 0.9rem; }

/* ===== 海报通用样式与灯箱 Modal ===== */
.poster-img {
    width: 100%;
    border-radius: var(--radius-sm);
    display: block;
    box-shadow: var(--shadow-sm);
    transition: var(--tr);
}
.poster-link:hover .poster-img { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox-modal.active { display: flex; }
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 30, 28, 0.84);
    backdrop-filter: blur(4px);
}
.lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.lightbox-content img {
    max-height: 78vh;
    width: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.lightbox-close {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    cursor: pointer;
    margin-bottom: 10px;
}
.lightbox-tip {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    margin-top: 8px;
}

/* 手机底部悬浮报名栏（桌面端隐藏） */
.mobile-sticky-bar { display: none; }

/* ===== 页脚 ===== */
.site-footer {
    background: var(--forest);
    color: rgba(248,250,248,.9);
    padding: 48px 24px 36px;
    text-align: center;
    font-size: 0.86rem;
}
.footer-logo { display: inline-block; margin-bottom: 12px; }
.footer-logo img { height: 48px; width: auto; filter: brightness(0) invert(1); }
.site-footer .philosophy { margin-bottom: 12px; color: rgba(248,250,248,.8); }
.site-footer .copyright { font-size: 0.76rem; color: rgba(248,250,248,.55); margin-top: 16px; }

/* ===== 滚动渐入 ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   平板与手机端全站响应式重构（消除所有内页嵌套边距挤压 + 表格/卡片移动端适配）
   ========================================================================== */
@media (max-width: 860px) {
    .hero-box, .featured-signup, .upcoming-strip, .archive-grid, .interact-grid, .plain-text-demo {
        grid-template-columns: 1fr;
    }
    .nav-toggle { display: inline-flex; align-items: center; }
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(248, 250, 248, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .main-navigation ul.open { display: flex; }
    .main-navigation ul li { border-bottom: 1px dashed var(--border); }
    .main-navigation ul li:last-child { border-bottom: none; }
    .main-navigation ul a { display: block; padding: 12px 0; font-size: 0.95rem; }
}

@media (max-width: 768px) {
    /* 1. 统一外层容器单层留白（16px），严禁 section 与 container 双重叠加 padding */
    section, .ls-section {
        padding: 40px 0 !important;
        margin-bottom: 0 !important;
    }
    .container, .nav-wrap, .hero-box, .page-intro {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .brand-logo img { height: 32px; }

    /* 2. 内页顶部标题区 (.page-intro) 紧凑化，消除顶部巨幅空白 */
    .page-intro {
        padding-top: 78px !important;
        padding-bottom: 12px !important;
    }
    .page-intro h1 {
        font-size: 1.6rem !important;
        margin-bottom: 6px;
    }
    .page-intro p {
        font-size: 0.88rem;
    }

    /* 3. 首屏紧凑化：一屏尽览核心价值并露出下方活动 */
    .hero {
        padding: 80px 0 36px !important;
        margin-bottom: 0 !important;
    }
    .hero-box {
        gap: 20px !important;
    }
    .hero-eyebrow {
        font-size: 0.72rem;
        margin-bottom: 8px;
    }
    .hero h1 {
        font-size: 1.85rem !important;
        line-height: 1.3 !important;
        margin-bottom: 12px;
    }
    .hero-sub {
        font-size: 0.92rem;
        margin-bottom: 18px;
        line-height: 1.65;
    }
    .hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-ghost {
        padding: 0.68rem 0.5rem;
        font-size: 0.88rem;
        width: 100%;
    }
    .hero-quote-card {
        padding: 16px 18px !important;
        border-radius: 12px !important;
    }
    .hero-quote-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    .hero-quote-card li {
        padding: 6px 0;
        font-size: 0.84rem;
    }

    /* 4. 章节标题紧凑化 */
    .sec-head {
        margin-bottom: 22px;
    }
    .section-title {
        font-size: 1.42rem;
    }

    /* 5. 第39期主报名卡：适度内边距 + 2x2 菜品网格 */
    .featured-signup {
        padding: 18px 16px !important;
        gap: 20px !important;
        border-radius: 14px !important;
        margin-bottom: 20px;
    }
    .featured-signup h3 {
        font-size: 1.28rem;
        margin-bottom: 10px;
    }
    .meta-tags {
        padding: 10px 12px;
        font-size: 0.82rem;
        gap: 5px;
    }
    .featured-signup .lead {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }
    .dishes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-top: 14px;
    }
    .signup-box {
        padding: 16px !important;
        border-radius: 12px !important;
    }
    .price-num {
        font-size: 1.5rem;
    }
    input, select, textarea, button {
        font-size: 16px !important;
        min-height: 44px;
    }

    /* 6. 预告与往期卡片（首页与 activities.html 通用）：
          左海报缩略图 + 右文字横排布局，彻底清除 card-body 嵌套 padding */
    .upcoming-strip, .archive-grid, .interact-grid {
        gap: 14px;
    }
    .archive-card:not(.has-poster),
    .interact-card,
    .raw-input-box,
    .rendered-output-box {
        padding: 18px 16px !important;
        border-radius: 12px !important;
    }
    .upcoming-card.has-poster,
    .archive-card.has-poster {
        display: grid !important;
        grid-template-columns: 88px 1fr !important;
        gap: 14px !important;
        align-items: center !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }
    .upcoming-card.has-poster .poster-wrap,
    .archive-card.has-poster .poster-wrap {
        width: 88px !important;
        height: 124px !important;
        padding: 0 !important;
        border-radius: 8px !important;
        border-bottom: none !important;
        overflow: hidden;
    }
    .upcoming-card.has-poster .poster-img,
    .archive-card.has-poster .poster-img {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        aspect-ratio: auto !important;
    }
    .upcoming-card.has-poster .card-body,
    .archive-card.has-poster .card-body {
        padding: 0 !important;
        min-width: 0;
    }
    .archive-header {
        font-size: 0.72rem;
        margin-bottom: 4px;
    }
    .upcoming-card h4,
    .archive-card h4 {
        font-size: 1.02rem;
        margin-bottom: 4px;
    }
    .upcoming-card p,
    .archive-card p {
        font-size: 0.8rem;
        margin-bottom: 8px;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .archive-footer {
        padding-top: 6px;
        font-size: 0.75rem;
    }

    /* 6.5 往期共学无海报占位画框 (.poster-placeholder) 与筛选栏手机端适配 */
    .archive-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        margin-bottom: 16px;
        gap: 8px;
    }
    .archive-filter-bar::-webkit-scrollbar { display: none; }
    .filter-chip {
        padding: 0.38rem 0.85rem;
        font-size: 0.8rem;
        min-height: 34px !important;
    }
    .poster-placeholder {
        min-height: 100%;
        border-radius: 8px;
    }
    .poster-placeholder::before,
    .poster-placeholder::after {
        display: none;
    }
    .poster-placeholder .ph-no {
        font-size: 1.45rem;
    }

    /* 7. 往期共学总览表 (activities.html table.issues) 手机端紧凑化修复 */
    .table-wrap {
        border-radius: 12px;
    }
    table.issues {
        font-size: 0.82rem;
    }
    table.issues th, table.issues td {
        padding: 10px 8px;
    }
    /* 隐藏地点列，确保期数+日期+主题+状态四列在手机端一屏舒适展示 */
    table.issues td.place,
    table.issues th:nth-child(4) {
        display: none;
    }
    table.issues td.date {
        font-size: 0.76rem;
    }
    .status {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    /* 8. 生活志纯文本演示区 (journal.html) 手机端间距优化 */
    .plain-text-demo {
        gap: 18px;
    }
    .raw-input-box {
        font-size: 0.78rem;
        min-height: auto;
    }
    .rendered-output-box {
        min-height: auto;
    }

    /* 9. 手机端底部悬浮快捷报名栏 */
    body:has(.mobile-sticky-bar) {
        padding-bottom: 68px;
    }
    .mobile-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0; right: 0;
        z-index: 990;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .mobile-sticky-bar.hidden {
        transform: translateY(110%);
        opacity: 0;
        pointer-events: none;
    }
    .sticky-info {
        display: flex;
        flex-direction: column;
    }
    .sticky-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--dark);
    }
    .sticky-price {
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--forest);
    }
    .sticky-price small {
        font-size: 0.72rem;
        font-weight: normal;
        color: var(--muted);
    }
    .sticky-cta {
        padding: 0.6rem 1.25rem;
        font-size: 0.88rem;
        border-radius: 100px;
        white-space: nowrap;
        min-height: 38px;
    }
}
