/* ============================================================
 * 乐活文艺云 · H5 样式（品牌设计令牌 + 适老化）
 * 活力橙 #FF7800 / 健康绿 #7BB450 / 温暖黄 #FFC850 / 智慧蓝 #0078C8
 * ============================================================ */
:root {
  --brand: #FF7800;
  --brand-d: #E56A00;
  --green: #7BB450;
  --green-d: #5E9440;
  --yellow: #FFC850;
  --yellow-d: #E0A93A;
  --blue: #0078C8;
  --blue-d: #005F9E;
  --ink: #1A1A1A;
  --ink-2: #555;
  --ink-3: #8A8A8A;
  --bg: #FFFAF2;
  --card: #FFFFFF;
  --line: #F0E6DA;
  --radius: 24rpx;
  --shadow: 0 6rpx 24rpx rgba(255,120,0,.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "OPPO Sans", "Source Han Sans SC", sans-serif;
  background: #eceff3;
  color: var(--ink);
  font-size: 16px;            /* 适老化：基础字号 ≥16px */
  line-height: 1.6;
}

/* 手机容器：桌面端居中显示手机宽度 */
.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--brand);
  color: #fff;
  padding: 14px 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 700;
}
.topbar .tb-back {
  font-size: 22px; cursor: pointer; width: 28px; display: flex; align-items: center;
}
.topbar .tb-title { flex: 1; text-align: center; }
.topbar .tb-action { font-size: 14px; font-weight: 500; opacity: .95; cursor: pointer; min-width: 28px; text-align: right; }
.topbar.sub { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }

/* 滚动区 */
.scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 84px;
}
.scroll.nopad { padding-bottom: 0; }

/* 通用容器 */
.container { padding: 16px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.section-title { font-size: 18px; font-weight: 800; margin: 18px 16px 10px; display: flex; align-items: center; gap: 8px; }
.section-title .bar { width: 6px; height: 18px; border-radius: 3px; background: var(--brand); display: inline-block; }

/* 卡片 */
.card {
  background: var(--card); border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow); margin: 12px 16px;
}

/* 按钮 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 999px; font-size: 17px; font-weight: 700;
  border: none; cursor: pointer; width: 100%;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), #FF9A3D); color: #fff; box-shadow: 0 8px 20px rgba(255,120,0,.28); }
.btn-ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn-green { background: var(--green); color: #fff; }
.btn[disabled] { opacity: .5; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.tag--brand { background: #FFF1E0; color: var(--brand); }
.tag--green { background: #EEF6E4; color: var(--green-d); }
.tag--yellow { background: #FFF8E0; color: var(--yellow-d); }
.tag--blue { background: #E5F1FA; color: var(--blue-d); }
.tag--hot { background: var(--brand); color: #fff; }

/* 图片 */
.img { width: 100%; height: 100%; object-fit: cover; display: block; }
.round { border-radius: 16px; overflow: hidden; }

/* ============ 首页 ============ */
.brand-head { background: var(--brand); color: #fff; padding: 18px 16px 16px; display: flex; align-items: center; gap: 12px; }
.brand-head .logo { width: 52px; height: 52px; border-radius: 14px; background: #fff; padding: 4px; }
.brand-head .bh-name { font-size: 20px; font-weight: 800; }
.brand-head .bh-sub { font-size: 13px; opacity: .92; margin-top: 2px; }

.points-hero {
  margin: 0 16px; transform: translateY(-14px);
  background: linear-gradient(135deg, var(--brand), #FF9A3D);
  border-radius: 18px; color: #fff; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 12px 28px rgba(255,120,0,.30);
}
.points-hero .ph-num { font-size: 38px; font-weight: 900; line-height: 1; }
.points-hero .ph-label { font-size: 14px; opacity: .95; }
.points-hero .ph-lv { background: rgba(255,255,255,.22); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }

.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 16px 4px; }
.m-item { background: #fff; border-radius: 16px; padding: 14px 8px; text-align: center; box-shadow: var(--shadow); cursor: pointer; position: relative; }
.m-item .m-ico { font-size: 30px; }
.m-item .m-name { font-size: 15px; font-weight: 700; margin-top: 6px; }
.m-item .m-tag { position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: #fff; }

.rec-card { display: flex; gap: 12px; align-items: center; }
.rec-card .rec-cover { width: 92px; height: 92px; border-radius: 12px; flex: none; }
.rec-card .rec-body { flex: 1; min-width: 0; }
.rec-card .rec-title { font-size: 16px; font-weight: 700; }
.rec-card .rec-meta { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

.about-strip { display: flex; gap: 12px; align-items: center; background: #fff8ef; border: 1px solid var(--line); }

/* ============ 列表 / 搜索 ============ */
.search { display: flex; gap: 10px; padding: 12px 16px; align-items: center; }
.search input {
  flex: 1; height: 42px; border-radius: 999px; border: none; background: #fff;
  padding: 0 16px; font-size: 15px; box-shadow: var(--shadow); outline: none;
}
.search .s-town {
  height: 42px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--ink-2);
  font-size: 14px; border: none; cursor: pointer; box-shadow: var(--shadow); display: flex; align-items: center; gap: 4px;
}
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 8px 16px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); cursor: pointer; }
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.act-card { display: flex; gap: 12px; margin: 12px 16px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; }
.act-card .ac-cover { width: 110px; height: 84px; border-radius: 12px; flex: none; position: relative; overflow: hidden; }
.act-card .ac-corner { position: absolute; top: 0; left: 0; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-bottom-right-radius: 10px; }
.act-card .ac-corner.green { background: var(--green); }
.act-card .ac-corner.blue { background: var(--blue); }
.act-card .ac-corner.yellow { background: var(--yellow); color: #6b4e00; }
.act-card .ac-body { flex: 1; min-width: 0; }
.act-card .ac-title { font-size: 16px; font-weight: 700; line-height: 1.35; }
.act-card .ac-meta { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.act-card .ac-prog { height: 6px; border-radius: 999px; background: #f0e6da; margin-top: 8px; overflow: hidden; }
.act-card .ac-prog > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.act-card .ac-free { color: var(--green-d); font-weight: 700; }

/* team card (grid in project) */
.team-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; margin-bottom: 12px; }
.team-card .tc-cover { height: 120px; }
.team-card .tc-body { padding: 12px 14px; }
.team-card .tc-name { font-size: 16px; font-weight: 800; }
.team-card .tc-meta { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

/* course card */
.course-card { display: flex; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--shadow); margin: 12px 16px; cursor: pointer; }
.course-card .cc-cover { width: 110px; height: 84px; border-radius: 12px; flex: none; position: relative; overflow: hidden; }
.course-card .cc-fee { position: absolute; top: 0; right: 0; font-size: 12px; font-weight: 700; padding: 2px 8px; border-bottom-left-radius: 10px; }
.course-card .cc-fee.free { background: var(--green); color: #fff; }
.course-card .cc-fee.pay { background: #333; color: #fff; }
.course-card .cc-body { flex: 1; min-width: 0; }
.course-card .cc-title { font-size: 16px; font-weight: 700; }
.course-card .cc-meta { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* ============ 详情页 ============ */
.cover { width: 100%; height: 220px; position: relative; }
.cover .c-img { width: 100%; height: 100%; object-fit: cover; }
.cover .c-back { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; }
.cover .c-cat { position: absolute; left: 14px; bottom: 14px; }

.info { background: #fff; border-radius: 16px; margin: -16px 16px 0; padding: 16px; position: relative; box-shadow: var(--shadow); }
.info .i-title { font-size: 20px; font-weight: 800; }
.info-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 15px; }
.info-row .ir-ico { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.info-row .ir-ico.brand { background: #FFF1E0; }
.info-row .ir-ico.green { background: #EEF6E4; }
.info-row .ir-ico.blue { background: #E5F1FA; }
.info-row .ir-ico.yellow { background: #FFF8E0; }
.info-row .ir-text { color: var(--ink-2); }

/* 地图块 */
.mapbox { margin: 12px 16px; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #eaf3ea; position: relative; }
.mapbox .map-canvas { height: 180px; background:
    repeating-linear-gradient(0deg, #dfeede 0 38px, #e7f2e7 38px 40px),
    repeating-linear-gradient(90deg, #dfeede 0 38px, #e7f2e7 38px 40px);
  position: relative; }
.mapbox .road { position: absolute; background: #fff; opacity: .9; }
.mapbox .road.h { left: 0; right: 0; height: 12px; top: 70px; }
.mapbox .road.v { top: 0; bottom: 0; width: 12px; left: 120px; }
.mapbox .pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-100%); font-size: 30px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.mapbox .map-info { background: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mapbox .map-addr { font-size: 14px; color: var(--ink-2); }
.mapbox .map-btns { display: flex; align-items: center; gap: 8px; flex: none; }
.mapbox .map-nav { background: var(--brand); color: #fff; border: none; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }
.mapbox .map-near { background: #FFF3E2; color: var(--brand); border: 1px solid #FFD9B0; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }

/* 进度条 */
.progress { margin: 14px 16px; }
.progress .p-bar { height: 10px; border-radius: 999px; background: #f0e6da; overflow: hidden; }
.progress .p-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #FF9A3D); border-radius: 999px; }
.progress .p-text { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

.desc { background: #fff; border-radius: 16px; margin: 12px 16px; padding: 16px; box-shadow: var(--shadow); }
.desc .d-h { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.desc .d-p { font-size: 15px; color: var(--ink-2); }

.block-list { background: #fff; border-radius: 16px; margin: 12px 16px; padding: 6px 16px; box-shadow: var(--shadow); }
.block-item { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.block-item:last-child { border-bottom: none; }

/* 认证徽章 */
.cert { display: inline-flex; align-items: center; gap: 4px; background: #EEF6E4; color: var(--green-d); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-left: 8px; }

/* 详情底部操作栏 */
.actionbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.actionbar .ab-ico { width: 48px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.actionbar .ab-ico .e { font-size: 18px; }

/* ============ 打卡 ============ */
.sign-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 24px 16px; }
.ring { width: 200px; height: 200px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--brand) 0turn, #f0e6da 0turn); position: relative; transition: background .8s; }
.ring .ring-in { width: 160px; height: 160px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.ring .ring-num { font-size: 40px; font-weight: 900; color: var(--brand); }
.ring .ring-sub { font-size: 14px; color: var(--ink-3); }
.reward { margin-top: 18px; background: linear-gradient(135deg, var(--green), #9FD06F); color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 16px; opacity: 0; transform: scale(.8); transition: all .5s; }
.reward.show { opacity: 1; transform: scale(1); }

/* ============ 会员风采 ============ */
.show-grid { column-count: 2; column-gap: 12px; padding: 12px 16px; }
.show-item { break-inside: avoid; margin-bottom: 12px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; position: relative; }
.show-item .si-cover { width: 100%; display: block; }
.show-item .si-play { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.show-item .si-body { padding: 8px 10px 10px; }
.show-item .si-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.show-item .si-meta { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; justify-content: space-between; }

.fab { position: fixed; right: max(16px, calc(50% - 224px + 16px)); bottom: 80px; width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #FF9A3D); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(255,120,0,.4); cursor: pointer; z-index: 50; border: none; }

/* ============ 我的 ============ */
.profile-head { background: linear-gradient(135deg, var(--brand), #FF9A3D); color: #fff; padding: 24px 16px 30px; }
.profile-head .ph-top { display: flex; align-items: center; gap: 14px; }
.profile-head .ph-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.profile-head .ph-name { font-size: 20px; font-weight: 800; }
.profile-head .ph-lv { display: inline-block; background: rgba(255,255,255,.25); padding: 2px 10px; border-radius: 999px; font-size: 12px; margin-top: 6px; }
.profile-points { margin: 16px 16px 0; transform: translateY(-18px); background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; }
.profile-points .pp-num { font-size: 30px; font-weight: 900; color: var(--brand); }
.profile-stats { display: flex; margin: 12px 16px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.profile-stats .ps { flex: 1; text-align: center; padding: 14px 0; }
.profile-stats .ps + .ps { border-left: 1px solid var(--line); }
.profile-stats .ps-num { font-size: 20px; font-weight: 800; }
.profile-stats .ps-label { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.menu-card { background: #fff; border-radius: 16px; margin: 12px 16px; box-shadow: var(--shadow); overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.menu-item .mi-name { font-size: 16px; font-weight: 600; flex: 1; }
.menu-item .mi-tag { font-size: 12px; color: var(--ink-3); }
.menu-item .mi-arrow { color: var(--ink-3); font-size: 18px; }

.leader-card { margin: 12px 16px; background: linear-gradient(135deg, #FFF8E0, #FFF1E0); border: 1px solid #FFE2B8; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.leader-card .lc-name { font-size: 16px; font-weight: 800; }
.leader-card .lc-sub { font-size: 13px; color: var(--yellow-d); margin-top: 2px; }
.leader-card .lc-arrow { color: var(--brand); font-size: 20px; }

/* ============ 表单（导师认证 / 发活动） ============ */
.form { margin: 12px 16px; background: #fff; border-radius: 16px; padding: 4px 16px; box-shadow: var(--shadow); }
.field { padding: 14px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: none; }
.field .f-label { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.field .f-label .req { color: var(--brand); }
.field input, .field textarea, .field select {
  width: 100%; border: none; outline: none; font-size: 16px; color: var(--ink); background: transparent; font-family: inherit;
}
.field textarea { resize: none; min-height: 72px; }
.field select { appearance: none; }
.upload-box { border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--ink-3); cursor: pointer; }
.upload-box .ub-ico { font-size: 30px; }
.upload-box.has-img { border-style: solid; border-color: #4F7C2E; padding: 10px; }
.upload-box .ub-img { max-width: 100%; max-height: 160px; border-radius: 8px; display: block; margin: 0 auto; }
.upload-box .ub-ok { margin-top: 8px; color: #4F7C2E; font-size: 13px; }

/* 乐活文艺云页 - 活动风采画廊 */
.about-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px; }
.about-gallery .ag-item { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 10px; background: #f3f3f3; display: block; }
.row2 { display: flex; gap: 12px; }
.row2 .field { flex: 1; }

/* 状态页 / 提交成功 */
.done-page { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; }
.done-page .dp-ico { font-size: 64px; }
.done-page .dp-title { font-size: 22px; font-weight: 800; margin-top: 12px; }
.done-page .dp-sub { font-size: 15px; color: var(--ink-3); margin-top: 8px; }

/* 遮罩 / 选择器 */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; display: flex; align-items: flex-end; }
.sheet { background: #fff; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 18px 18px 0 0; padding: 8px 0 16px; max-height: 60vh; overflow-y: auto; }
.sheet .sh-item { padding: 16px; text-align: center; font-size: 17px; border-bottom: 1px solid var(--line); cursor: pointer; }
.sheet .sh-item.on { color: var(--brand); font-weight: 700; }
.sheet .sh-cancel { padding: 16px; text-align: center; font-size: 17px; color: var(--ink-3); margin-top: 6px; background: #f7f7f7; cursor: pointer; }

.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.82); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 15px; z-index: 99; max-width: 80%; text-align: center; }
.toast.fade { animation: toastfade 1.8s forwards; }
@keyframes toastfade { 0%{opacity:0} 10%{opacity:1} 80%{opacity:1} 100%{opacity:0} }

/* 底部 tab */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 45; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.tabbar .tb { flex: 1; text-align: center; padding: 8px 0 6px; cursor: pointer; color: var(--ink-3); font-size: 11px; }
.tabbar .tb .t-ico { font-size: 22px; line-height: 1; }
.tabbar .tb.on { color: var(--brand); font-weight: 700; }

.hidden { display: none !important; }
