/* =====================================================================
   壮贝 CMS · H5 前台样式
   设计原则：零外部依赖、零构建步骤。
   国内服务器访问 cdn.tailwindcss.com / unpkg 极不稳定，样式一旦时好时坏，
   排查成本远高于自己写这几百行 CSS。

   与后台共用同一套设计令牌（--brand / --ink / --line…），
   改一处两边一起变，不会出现「后台换品牌色了前台还是绿的」。
   ===================================================================== */

/* 颜色令牌统一由 skins.css 提供（前后台共用，含 6 套皮肤），
   这里只保留 H5 自己的布局令牌。
   改配色请去 assets/skins.css，不要在这里加颜色。 */
:root {
    --radius:     12px;
    --radius-sm:  8px;

    --page-w:     640px;
    --actionbar-h: 60px;

    --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    /* 微信 iOS 下横向滚动条会因为某个元素超宽而整页晃动 */
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* =====================================================================
   1. 页面骨架
   ===================================================================== */

.page {
    max-width: var(--page-w);
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    /* 给固定底栏留位置，否则最后一行永远被遮住 */
    padding-bottom: calc(var(--actionbar-h) + env(safe-area-inset-bottom, 0px));
}

.page--no-actionbar { padding-bottom: 0; }

.wrap { padding: 14px 14px 28px; }

/* =====================================================================
   2. 顶部品牌条 + 导航
   ===================================================================== */

.topbar {
    background: linear-gradient(135deg, var(--deep-from) 0%, var(--brand-600) 100%);
    color: #fff;
    padding: 16px 16px 14px;
}

.topbar__brand { display: flex; align-items: center; gap: 10px; }
.topbar__logo {
    width: 36px; height: 36px; border-radius: 9px;
    background: rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700; flex: 0 0 auto;
}
.topbar__name { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.topbar__desc { font-size: 12px; opacity: .8; margin-top: 1px; }

/* 一级导航：横向可滚动，栏目多了也不会换行挤成一团 */
.nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav__item {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .78);
    border-radius: 999px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav__item.is-active {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-weight: 600;
}

/* 二级导航：白底胶囊，和顶部深色区分开，家长一眼能分清层级 */
.subnav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--card);
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}
.subnav::-webkit-scrollbar { display: none; }

.subnav__item {
    flex: 0 0 auto;
    padding: 6px 13px;
    font-size: 13.5px;
    color: var(--ink-2);
    background: var(--line-soft);
    border-radius: 999px;
    white-space: nowrap;
}
.subnav__item.is-active {
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 600;
}

/* =====================================================================
   3. 轮播
   ===================================================================== */

.banner {
    position: relative;
    overflow: hidden;
    background: var(--deep-to);
    border-radius: 0;
}

.banner__track {
    display: flex;
    transition: transform .35s ease;
    will-change: transform;
}

.banner__slide { flex: 0 0 100%; }
.banner__slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.banner__dots {
    position: absolute;
    left: 0; right: 0; bottom: 10px;
    display: flex; justify-content: center; gap: 6px;
}
.banner__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    border: 0; padding: 0; cursor: pointer;
}
.banner__dot.is-active { background: #fff; width: 16px; border-radius: 3px; }

/* 轮播里只有一张图时不显示圆点，避免出现「一个孤零零的点」 */
.banner--single .banner__dots { display: none; }

/* =====================================================================
   4. 卡片与区块
   ===================================================================== */

.section { margin-bottom: 20px; }

.section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 10px;
    padding: 0 2px;
}
.section__title { font-size: 16px; font-weight: 600; margin: 0; }
.section__more { font-size: 13px; color: var(--brand-600); }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card + .card { margin-top: 12px; }
.card__body { padding: 14px; }
.card__title { font-size: 15.5px; font-weight: 600; margin: 0 0 6px; }
.card__meta { font-size: 12.5px; color: var(--muted); }

/* 首页三大入口 */
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.entry {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 8px 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.entry__icon {
    width: 44px; height: 44px; margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.entry__name { font-size: 14px; font-weight: 600; }
.entry__desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* =====================================================================
   5. 媒体卡片（列表项）
   ===================================================================== */

.media-list { display: flex; flex-direction: column; gap: 12px; }

.media {
    display: flex;
    gap: 12px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: var(--shadow-sm);
}
.media__thumb {
    flex: 0 0 112px;
    width: 112px; height: 78px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--line-soft);
}
.media__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.media__title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 4px;
    /* 两行截断。列表里标题长短不一会让卡片高度参差，看起来像没做完 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.media__desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.media__foot {
    margin-top: auto;
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--muted);
}

/* 通栏大图卡片（活动、家长课程） */
.cover-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cover-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--line-soft); }
.cover-card__body { padding: 12px 14px 14px; }
.cover-card__title { font-size: 15.5px; font-weight: 600; margin: 0 0 5px; line-height: 1.45; }

/* =====================================================================
   6. 标签
   ===================================================================== */

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 5px;
    font-size: 11.5px;
    line-height: 1.7;
    background: var(--brand-50);
    color: var(--brand-700);
}
.tag--accent { background: var(--accent-50); color: var(--accent-fg); }
.tag--info   { background: var(--info-50); color: var(--info-fg); }
.tag--muted  { background: var(--line-soft); color: var(--ink-2); }
.tag--top    { background: var(--danger-50); color: var(--danger-fg); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* =====================================================================
   7. 荣誉墙
   ===================================================================== */

.yearbar {
    display: flex; gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 12px;
}
.yearbar::-webkit-scrollbar { display: none; }

.yearbar__item {
    flex: 0 0 auto;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    background: var(--card);
    color: var(--ink-2);
    border: 1px solid var(--line);
}
.yearbar__item.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
}

.honor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.honor {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.honor__img {
    width: 100%;
    aspect-ratio: 3 / 4;      /* 证书基本都是竖版，固定比例比 max-height 稳 */
    object-fit: cover;
    background: var(--line-soft);
}
.honor__body { padding: 9px 10px 11px; }
.honor__name {
    font-size: 13.5px; font-weight: 600; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.honor__issuer { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* =====================================================================
   8. 时间轴
   ===================================================================== */

.timeline { position: relative; padding-left: 26px; }

.timeline::before {
    content: "";
    position: absolute;
    left: 7px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--brand-100);
}

.timeline__item { position: relative; padding-bottom: 20px; }
.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
    content: "";
    position: absolute;
    left: -23px; top: 5px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--card);
    border: 3px solid var(--brand);
}

.timeline__date {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-700);
    background: var(--brand-50);
    padding: 1px 9px;
    border-radius: 5px;
    margin-bottom: 6px;
}
.timeline__title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.timeline__text { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.timeline__img { margin-top: 8px; border-radius: var(--radius-sm); overflow: hidden; }

/* =====================================================================
   9. 服务项目
   ===================================================================== */

.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.service-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.service-card__icon {
    width: 48px; height: 48px; margin: 0 auto 9px;
    border-radius: 14px;
    background: var(--brand-50);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    overflow: hidden;
}
.service-card__icon img { width: 100%; height: 100%; object-fit: cover; }
.service-card__name { font-size: 14.5px; font-weight: 600; }
.service-card__desc {
    font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 服务流程步骤条 */
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.steps__item {
    display: flex; align-items: center; gap: 7px;
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: 999px;
    padding: 5px 13px 5px 5px;
    font-size: 13.5px;
}
.steps__no {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--brand);
    color: var(--on-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    flex: 0 0 auto;
}

/* =====================================================================
   10. 课程
   ===================================================================== */

.tabs {
    display: flex; gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 12px;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs__item {
    flex: 0 0 auto;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 13.5px;
    cursor: pointer;
}
.tabs__item.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--on-brand);
    font-weight: 600;
}

.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

.course-card {
    background: var(--card); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.course-card__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line-soft); }
.course-card__body { padding: 9px 10px 11px; }
.course-card__name { font-size: 14px; font-weight: 600; line-height: 1.45; }
.course-card__spec { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* =====================================================================
   11. 视频（三种源）
   ===================================================================== */

.video { border-radius: var(--radius); overflow: hidden; background: #000; }

/* 16:9 容器。用 padding-top 而不是 aspect-ratio，
   因为要兼容微信 iOS 里一堆老版本 WebView。 */
.video__frame { position: relative; width: 100%; padding-top: 56.25%; }
.video__frame iframe,
.video__frame video,
.video__frame > * {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}

/* 视频号只能跳转，这里做成一张明确的入口卡而不是假装能播 */
.video-link {
    display: block;
    background: linear-gradient(135deg, var(--ph-from), var(--ph-to));
    color: #fff;
    border-radius: var(--radius);
    padding: 26px 18px;
    text-align: center;
}
.video-link__icon {
    width: 56px; height: 56px; margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.video-link__title { font-size: 15.5px; font-weight: 600; }
.video-link__desc { font-size: 12.5px; opacity: .8; margin-top: 6px; line-height: 1.6; }
.video-link__btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 22px;
    border-radius: 999px;
    background: #fff;
    color: #1f2d3a;
    font-size: 14px;
    font-weight: 600;
}

/* =====================================================================
   12. 相册
   ===================================================================== */

.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.album-grid__item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--line-soft);
    cursor: zoom-in;
}
.album-grid__item img { width: 100%; height: 100%; object-fit: cover; }

/* 全屏看图。原生的「点开图片」在微信里会被手势干扰，
   自己做一个固定层最可控。 */
.viewer {
    position: fixed; inset: 0;
    background: var(--scrim);
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.viewer.is-open { display: flex; }
.viewer__img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.viewer__caption { color: #fff; font-size: 13.5px; margin-top: 12px; padding: 0 20px; text-align: center; }
.viewer__close {
    position: absolute; top: 14px; right: 16px;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff; border: 0; font-size: 19px; line-height: 1; cursor: pointer;
}

/* =====================================================================
   13. 联系信息
   ===================================================================== */

.kv-list { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }

.kv-row {
    display: flex;
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row__label { flex: 0 0 62px; color: var(--muted); font-size: 13.5px; }
.kv-row__value { flex: 1 1 auto; min-width: 0; word-break: break-all; }

.map-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--card); }
.map-box img { width: 100%; }

.qr-box { text-align: center; padding: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.qr-box img { width: 168px; height: 168px; margin: 0 auto; object-fit: contain; }
.qr-box__tip { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* =====================================================================
   14. 表单
   ===================================================================== */

.form { display: flex; flex-direction: column; gap: 15px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field__label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field__label .req { color: var(--danger); margin-left: 3px; }
.field__hint { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    /* 16px 是 iOS 的临界值：小于它，输入框获得焦点时 Safari 会自动放大页面 */
    font-size: 16px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-50);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.65; }

.select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238892a4' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 12px 8px;
    padding-right: 36px;
}

/* 两列并排的短字段（孩子姓名 + 年龄） */
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1 1 0; min-width: 0; }

.checkbox {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
}
.checkbox input {
    width: 18px; height: 18px; margin: 2px 0 0;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

/* 单选项做成胶囊（咨询类型「留言 / 报名 / 咨询」）
   用「透明 radio + label」而不是一排按钮：这样在微信里
   键盘/无障碍导航仍然可用，也不需要额外写 JS 维护选中态。 */
.chips { display: flex; gap: 8px; }

.chips input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}

.chips label {
    flex: 1 1 0;
    text-align: center;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink-2);
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.chips input:checked + label {
    background: var(--brand-50);
    border-color: var(--brand);
    color: var(--brand-700);
    font-weight: 600;
}
.chips input:focus-visible + label {
    box-shadow: 0 0 0 3px var(--brand-50);
}

/* =====================================================================
   15. 按钮
   ===================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--line-soft);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, background .15s;
}
.btn:active { opacity: .82; }

.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--block   { width: 100%; }
.btn--ghost   { background: var(--card); border-color: var(--line); }

.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* =====================================================================
   16. 提示条
   ===================================================================== */

.alert {
    display: flex; gap: 9px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    line-height: 1.6;
}
.alert--error { background: var(--danger-50); color: var(--danger-fg); }
.alert--warn  { background: var(--warn-50);   color: var(--warn-fg); }
.alert--info  { background: var(--brand-50);  color: var(--brand-700); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
    font-size: 14px;
}
.empty__icon { font-size: 36px; opacity: .45; margin-bottom: 10px; }

/* =====================================================================
   17. 富文本正文
   ===================================================================== */

.prose {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--ink-2);
    word-break: break-word;
}
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

/*
 * 运营从 Word / 公众号后台粘过来的内容常带着桌面字号和内联样式，
 * 直接渲染在手机上会变成一行五个字。这里用 !important 统一压回来，
 * 是少数几个「强制覆盖内联样式」确实合理的地方。
 */
.prose p  { margin: 0 0 14px; }
.prose h1, .prose h2 { font-size: 18px !important; margin: 20px 0 10px; font-weight: 600; }
.prose h3, .prose h4 { font-size: 16.5px !important; margin: 18px 0 8px; font-weight: 600; }
.prose h5, .prose h6 { font-size: 15px !important; margin: 16px 0 6px; font-weight: 600; }
.prose img { margin: 12px auto; border-radius: var(--radius-sm); height: auto !important; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose blockquote {
    margin: 14px 0;
    padding: 10px 14px;
    background: var(--line-soft);
    border-left: 3px solid var(--brand-100);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink-2);
    font-size: 14.5px;
}
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
.prose th { background: var(--line-soft); font-weight: 600; }
.prose a { color: var(--brand-600); text-decoration: underline; }
.prose video, .prose iframe { width: 100% !important; border-radius: var(--radius-sm); }
.prose pre { overflow-x: auto; background: var(--code-bg); padding: 12px; border-radius: var(--radius-sm); font-size: 13px; }

/* 正文里的超大字号一律压到配置的上限 */
.prose [style*="font-size"] { font-size: inherit !important; }
.prose span[style*="font-size"] { font-size: var(--prose-font, 15.5px) !important; }

/* =====================================================================
   18. 底部
   ===================================================================== */

.footer {
    padding: 24px 16px 26px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.9;
}
.footer a { color: var(--muted); text-decoration: underline; }

/* 纯净模式（?bare=1）的极简脚注：只挂备案号，留白压到最小，
   既满足公示要求，又看不出「套了个整站页脚」 */
.footer--mini { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); font-size: 11px; line-height: 1.6; }

/* 固定底栏 */
.actionbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 500;
    display: flex;
    gap: 10px;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.actionbar .btn { flex: 1 1 0; }
.actionbar .btn--tel {
    flex: 0 0 auto;
    padding-left: 16px; padding-right: 16px;
    background: var(--accent-50);
    color: var(--accent-fg);
}

/* =====================================================================
   19. 星标引导（W13）
   ===================================================================== */

.starguide {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 950;
    max-width: var(--page-w);
    margin: 0 auto;
    background: var(--card);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .22);
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    transform: translateY(102%);
    transition: transform .28s ease;
}
.starguide.is-open { transform: translateY(0); }

.starguide__title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.starguide__text { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; margin: 0 0 14px; }
.starguide__art {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--brand-50);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 15px;
}
.starguide__mock {
    width: 54px; height: 54px; border-radius: 13px;
    background: var(--brand); color: var(--on-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.starguide__star { font-size: 26px; color: var(--warn); }
.starguide__arrow { font-size: 20px; color: var(--brand-600); }

.starguide__actions { display: flex; gap: 10px; }
.starguide__actions .btn { flex: 1 1 0; }

/* =====================================================================
   20. 其他
   ===================================================================== */

.pager {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 20px 0 4px;
}
.pager__info { font-size: 13px; color: var(--muted); }
.pager .btn { padding: 8px 18px; font-size: 14px; }
.pager .btn[disabled] { background: var(--line-soft); color: var(--muted); }

.crumbs { font-size: 12.5px; color: var(--muted); padding: 10px 2px 12px; }
.crumbs a { color: var(--muted); }

.detail-title { font-size: 20px; font-weight: 700; line-height: 1.42; margin: 0 0 10px; }
.detail-meta {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-size: 12.5px; color: var(--muted);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 16px;
}

.article-head { margin-bottom: 4px; }
.article-head__sub { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }

.phone-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14.5px;
}
.phone-row:last-child { border-bottom: 0; }
.phone-row__label { flex: 1 1 auto; color: var(--ink-2); }
.phone-row__no { font-weight: 600; color: var(--brand-700); }
.phone-row__icon {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand-50); color: var(--brand-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex: 0 0 auto;
}

.hr { height: 1px; background: var(--line-soft); border: 0; margin: 16px 0; }

.text-c { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ==================================================================
   器具商城
   ================================================================== */

/* 必填星号。后台样式里有 .req，前台一直没用到所以没有 */
.req { color: var(--danger); margin-left: 2px; }

/* 列表：两列卡片。器具靠图片挑，卡片太小家长看不清材质和大小 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.product-card__img {
    position: relative;
    width: 100%;
    padding-top: 100%;          /* 正方形，图片不变形 */
    background: var(--surface-2);
    overflow: hidden;
}

.product-card__img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.product-card__flag {
    position: absolute; left: 8px; top: 8px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--muted); color: #fff;
    font-size: 11px; line-height: 18px;
}

.product-card__body { padding: 10px 12px 12px; }

.product-card__title {
    font-size: 14px; font-weight: 600; color: var(--ink);
    line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__desc {
    margin-top: 4px; font-size: 12px; color: var(--muted);
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--accent-fg);
}

/* 详情页 */
.pd-price {
    padding: 12px 0 4px;
    font-size: 22px; font-weight: 700; color: var(--accent-fg);
}

.pd-price small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }

.pd-section-title {
    margin: 18px 0 10px;
    font-size: 14px; font-weight: 600; color: var(--ink);
}

/* 规格选择：做成按钮组而不是下拉，手指点选比下拉方便 */
.sku-list { display: flex; flex-wrap: wrap; gap: 8px; }

.sku-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--card);
    font-size: 13px; color: var(--ink-2);
    cursor: pointer;
    transition: none;
}

.sku-tag.is-active {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 600;
}

.sku-tag.is-disabled { opacity: .45; cursor: not-allowed; }

.sku-tag__price { font-size: 12px; color: var(--muted); }
.sku-tag.is-active .sku-tag__price { color: var(--brand-600); }

/* 数量步进器 */
.qty {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty button {
    width: 38px; height: 36px;
    border: 0; background: var(--surface-2);
    font-size: 18px; color: var(--ink-2); cursor: pointer;
}

.qty input {
    width: 52px; height: 36px;
    border: 0; border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    text-align: center; font-size: 15px; color: var(--ink);
}

/* 底部结算条：固定在视口底部，和 .actionbar 高度错开 */
.pd-buybar {
    position: sticky; bottom: 0;
    display: flex; align-items: center; gap: 12px;
    margin-top: 20px; padding: 12px;
    background: var(--card);
    border-top: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
}

.pd-buybar__total { flex: 1; font-size: 13px; color: var(--muted); }
.pd-buybar__total b { display: block; font-size: 18px; color: var(--accent-fg); }

.btn--buy {
    padding: 0 22px; height: 42px;
    background: var(--accent); color: #fff;
    border: 0; border-radius: 999px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
}

.btn--buy:disabled { background: var(--muted-2); cursor: not-allowed; }

/* 下单表单 */
.order-summary {
    padding: 12px; margin-bottom: 14px;
    background: var(--surface-2); border-radius: var(--radius-sm);
    font-size: 14px;
}

.order-summary__row {
    display: flex; justify-content: space-between;
    padding: 4px 0; color: var(--ink-2);
}

.order-summary__row--total {
    margin-top: 6px; padding-top: 10px;
    border-top: 1px dashed var(--line-strong);
    color: var(--ink); font-weight: 600;
}

.pay-note {
    padding: 12px; margin-top: 14px;
    background: var(--warn-50); border: 1px solid var(--warn-line);
    border-radius: var(--radius-sm);
    font-size: 13px; color: var(--warn-fg); line-height: 1.7;
}

@media (min-width: 641px) {
    /* 桌面浏览器打开时给个边框，模拟手机视口，方便运营自己看效果 */
    body { background: var(--page-outer-bg); }
    .page { box-shadow: 0 0 0 1px var(--line); }
}
