/* =========================================================
   PCEC 羽毛球教培打卡 · 学员端 H5 全局样式
   风格：运动竞技感 / 深墨绿 + 荧光青绿 + 活力黄绿
   移动端优先，桌面端居中成卡片式
   ========================================================= */

:root {
    --ink: #06201C;
    --ink-2: #0B332B;
    --ink-3: #14453A;
    --brand: #12D9A0;
    --brand-deep: #0AA47A;
    --lime: #C9F73B;
    --orange: #FF8A3D;
    --bg: #F2F7F4;
    --card: #FFFFFF;
    --line: #E4EFE9;
    --text: #10231E;
    --muted: #6E8B82;
    --shadow: 0 12px 28px rgba(6, 32, 28, .10);
    --shadow-sm: 0 4px 14px rgba(6, 32, 28, .07);
    --radius: 20px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body { font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------------- 壳与页面 ---------------- */
.app-shell {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.page { padding: 0 18px 104px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    position: relative;
    z-index: 5;
}

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--lime));
    display: grid;
    place-items: center;
    color: var(--ink);
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 6px 14px rgba(18, 217, 160, .35);
    flex: 0 0 auto;
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.topbar-act { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    background: #E7F6EF;
    color: var(--brand-deep);
    font-size: 12px;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pill-ghost { background: var(--ink); color: #DFFBEF; }
.pill-lime { background: rgba(201, 247, 59, .18); color: #6C8C00; }

/* ---------------- 顶部提示 ---------------- */
.alert {
    margin: 0 0 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.alert-error { background: #FFF1F0; color: #C0392B; border: 1px solid #FFDAD6; }
.alert-success { background: #E9FBF3; color: #0A7D5C; border: 1px solid #C7F2E0; }

/* ---------------- Hero（活动主视觉） ---------------- */
.hero {
    position: relative;
    margin: 2px 0 0;
    border-radius: 26px;
    overflow: hidden;
    padding: 26px 22px 104px;
    color: #EAFBF4;
    background:
        radial-gradient(120% 100% at 10% 0%, #12664F 0%, #0A3B31 45%, #06201C 100%);
    box-shadow: 0 18px 40px rgba(6, 32, 28, .22);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 40% at 88% 8%, rgba(201, 247, 59, .28), transparent 70%),
        radial-gradient(50% 35% at 70% 92%, rgba(18, 217, 160, .22), transparent 72%);
    pointer-events: none;
}

.hero-court {
    position: absolute;
    right: -34px;
    top: -20px;
    width: 190px;
    height: 190px;
    opacity: .5;
    pointer-events: none;
}

.hero-shuttle {
    position: absolute;
    right: 26px;
    bottom: 78px;
    width: 86px;
    height: 86px;
    opacity: .85;
    pointer-events: none;
    transform: rotate(-14deg);
}

.hero-body { position: relative; z-index: 2; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(201, 247, 59, .38);
    color: var(--lime);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .5px;
}

.hero-badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px rgba(201, 247, 59, .18);
}

.hero-title {
    margin: 14px 0 6px;
    font-size: 32px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: -.5px;
    color: #FFFFFF;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}

.hero-sub {
    font-size: 14px;
    font-weight: 600;
    color: rgba(234, 251, 244, .82);
}

.hero-slogan {
    margin-top: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--lime);
    letter-spacing: .5px;
}

.hero-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12.5px;
    color: rgba(234, 251, 244, .78);
}

.hero-meta span { display: flex; align-items: center; gap: 7px; }
.hero-meta .ico { opacity: .9; font-size: 13px; }

.hero-stat {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(6px);
}

.hero-stat > div { text-align: center; }
.hero-stat b {
    display: block;
    font-size: 21px;
    font-weight: 800;
    color: var(--lime);
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.hero-stat small { font-size: 11px; color: rgba(234, 251, 244, .66); }

/* 悬浮打卡卡（压住 hero 底部） */
.cta-card {
    margin: -72px 14px 0;
    position: relative;
    z-index: 3;
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid #EAF4EF;
}

.cta-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cta-title { font-size: 15px; font-weight: 800; color: var(--ink); }
.cta-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.btn-checkin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: 52px;
    margin-top: 13px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(120deg, var(--brand) 0%, #45E9B4 45%, var(--lime) 100%);
    color: #04231C;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .5px;
    box-shadow: 0 12px 26px rgba(18, 217, 160, .34);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.btn-checkin:active { transform: scale(.975); box-shadow: 0 6px 16px rgba(18, 217, 160, .3); }
.btn-checkin[disabled] { background: #E9F3EE; color: #7C9A90; box-shadow: none; }

.btn-ghost-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin-top: 12px;
    border-radius: 15px;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    font-weight: 700;
    background: transparent;
}

/* ---------------- 统计卡 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 10px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat b {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat.dark b { color: var(--brand-deep); }
.stat span { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }

/* ---------------- 通用区块 ---------------- */
.section { margin-top: 22px; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 11px;
}

.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .bar {
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--brand), var(--lime));
}

.section-more { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

/* ---------------- 排行榜 ---------------- */
.rank-list { display: flex; flex-direction: column; gap: 8px; }

.rank-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line);
}

.rank-row.me { border-color: rgba(18, 217, 160, .55); background: #F2FFFA; }

.rank-no {
    width: 24px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

.rank-no.top1 { color: #D99A00; }
.rank-no.top2 { color: #8C8C8C; }
.rank-no.top3 { color: #B87333; }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    color: #04322A;
    background: linear-gradient(135deg, #D7FFF2, var(--brand));
    flex: 0 0 auto;
    overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.rank-name { flex: 1; font-weight: 700; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-days { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.rank-days b { color: var(--brand-deep); font-size: 16px; margin-right: 2px; font-variant-numeric: tabular-nums; }

/* ---------------- 相册横滑 ---------------- */
.photo-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.photo-strip::-webkit-scrollbar { display: none; }

.strip-item {
    position: relative;
    flex: 0 0 132px;
    height: 132px;
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start;
    background: #DFEDE7;
    box-shadow: var(--shadow-sm);
}

.strip-item img { width: 100%; height: 100%; object-fit: cover; }

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

.grid-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #DFEDE7;
    box-shadow: var(--shadow-sm);
}

.grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.grid-item:active img { transform: scale(1.04); }

.grid-item .tag-s {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    background: rgba(6, 32, 28, .62);
    color: #EAFBF4;
    backdrop-filter: blur(4px);
}

/* ---------------- 工作人员 ---------------- */
.staff-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--line);
    margin-bottom: 8px;
}

.staff-main { flex: 1; min-width: 0; }
.staff-name { font-weight: 800; font-size: 14.5px; }
.staff-pos { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
/* 联系工作人员顶部介绍卡（底色由主题覆盖） */
.staff-hero {
    padding: 18px;
    border-radius: 20px;
    background: radial-gradient(120% 120% at 0% 0%, #0F5C49 0%, #082A24 75%);
    color: #EAFBF4;
}

.staff-intro { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.staff-acts { display: flex; gap: 8px; flex: 0 0 auto; }

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #F7FBF9;
    color: var(--ink);
    cursor: pointer;
}

.icon-btn.wx { background: #EFFBF3; color: #169B62; }

/* ---------------- 打卡页 ---------------- */
.checkin-hero {
    margin-top: 4px;
    border-radius: 26px;
    padding: 22px 20px 24px;
    background: radial-gradient(120% 100% at 20% 0%, #12664F 0%, #0A3B31 55%, #06201C 100%);
    color: #EAFBF4;
    box-shadow: 0 16px 34px rgba(6, 32, 28, .2);
    position: relative;
    overflow: hidden;
}

.checkin-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(55% 40% at 88% 6%, rgba(201, 247, 59, .26), transparent 72%);
    pointer-events: none;
}

.ring-wrap { position: relative; width: 168px; height: 168px; margin: 4px auto 0; }

.ring {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    background: conic-gradient(var(--lime) 0deg, var(--lime) var(--deg, 0deg), rgba(255, 255, 255, .14) var(--deg, 0deg));
    display: grid;
    place-items: center;
    position: relative;
}

.ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #07251F;
}

.ring-inner { position: relative; z-index: 2; text-align: center; }
.ring-inner b { display: block; font-size: 38px; font-weight: 800; color: var(--lime); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring-inner span { font-size: 12px; color: rgba(234, 251, 244, .7); }

.checkin-hero .hero-meta { margin-top: 14px; text-align: center; justify-content: center; }

.btn-checkin-lg {
    width: 100%;
    height: 56px;
    margin-top: 18px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(120deg, var(--lime), #E8FF8A);
    color: #06251D;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    box-shadow: 0 14px 30px rgba(201, 247, 59, .28);
    cursor: pointer;
}

.btn-checkin-lg[disabled] { background: rgba(255, 255, 255, .12); color: rgba(234, 251, 244, .6); box-shadow: none; }

/* 日历 */
.calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-month { font-size: 14px; font-weight: 800; color: var(--ink); }
.calendar-legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); display: inline-block; margin-right: 3px; }

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
}

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.cal-cell {
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    font-size: 12.5px;
    border-radius: 10px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    background: #F7FBF9;
}

.cal-cell.empty { background: transparent; }
.cal-cell.future { color: #C3D6CE; background: #FAFDFB; }
.cal-cell.today { border: 1.5px dashed var(--brand); color: var(--brand-deep); font-weight: 800; background: #FFFFFF; }
.cal-cell.checked {
    background: linear-gradient(135deg, var(--brand), #66EEBF);
    color: #04322A;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(18, 217, 160, .28);
}

/* 打卡记录 */
.timeline { position: relative; padding-left: 22px; }

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--brand), rgba(18, 217, 160, .15));
    border-radius: 2px;
}

.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
    position: absolute;
    left: -22px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 4px rgba(18, 217, 160, .16);
}

.tl-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-date { font-size: 14px; font-weight: 800; color: var(--ink); }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-remark { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ---------------- 个人中心头部 ---------------- */
.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: radial-gradient(120% 120% at 0% 0%, #0F5C49 0%, #082A24 70%);
    color: #EAFBF4;
    box-shadow: 0 14px 30px rgba(6, 32, 28, .18);
}

.profile .avatar-lg {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 800;
    color: #04322A;
    background: linear-gradient(135deg, var(--lime), #8CF0C8);
    overflow: hidden;
    flex: 0 0 auto;
}

.profile .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.profile-meta { font-size: 12px; color: rgba(234, 251, 244, .7); margin-top: 3px; }

.profile-links { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.profile-links a {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #DFF9EE;
}

/* ---------------- 表单 ---------------- */
.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #FAFDFB;
    border-radius: 13px;
    padding: 12px 14px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(18, 217, 160, .12);
    background: #FFFFFF;
}

.field textarea { min-height: 88px; resize: vertical; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }

.btn-submit {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(120deg, var(--brand), #6BF0C0);
    color: #04231C;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(18, 217, 160, .28);
}

.btn-submit[disabled] { opacity: .6; }

.btn-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}

.btn-mini.brand { background: #EAFBF3; border-color: #C7F2E0; color: var(--brand-deep); }
.btn-mini.danger { background: #FFF3F1; border-color: #FFDAD2; color: #C0392B; }

/* ---------------- 上传 ---------------- */
.upload-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1.5px dashed #BFE3D5;
    background: linear-gradient(180deg, #F7FFFB, #EFFDF7);
}

.upload-ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--lime));
    color: #04322A;
    font-size: 20px;
    font-weight: 800;
    flex: 0 0 auto;
}

.upload-main { flex: 1; min-width: 0; }
.upload-title { font-size: 14px; font-weight: 800; }
.upload-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.file-input { display: none; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}

.tabbar-inner {
    max-width: 520px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--muted);
    padding: 4px 0;
}

.tab-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tab-item.active { color: var(--brand-deep); font-weight: 800; }
.tab-item.active svg { stroke: var(--brand-deep); }

/* ---------------- 空态 / 页脚 ---------------- */
.empty {
    text-align: center;
    padding: 34px 16px;
    color: var(--muted);
    font-size: 13px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ---------------- Toast ---------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%) translateY(12px);
    background: rgba(6, 32, 28, .92);
    color: #EAFBF4;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 40;
    max-width: 80vw;
    text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(150, 34, 24, .94); }

/* ---------------- 弹窗（公告） ---------------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 17, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 50;
}

.modal-mask.show { display: flex; }

.modal {
    width: 100%;
    max-width: 420px;
    background: #FFFFFF;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}

.modal-head {
    padding: 18px 18px 12px;
    background: linear-gradient(135deg, #0F5C49, #06201C);
    color: #EAFBF4;
}

.modal-title { font-size: 17px; font-weight: 800; }
.modal-meta { font-size: 11.5px; color: rgba(234, 251, 244, .7); margin-top: 3px; }
.modal-body {
    padding: 16px 18px;
    max-height: 46vh;
    overflow-y: auto;
    font-size: 13.5px;
    color: var(--text);
    line-height: 1.75;
}

.modal-body img { border-radius: 12px; margin: 8px 0; }
.modal-foot { padding: 0 18px 18px; }

/* ---------------- 富文本 ---------------- */
.rich { font-size: 13.5px; line-height: 1.85; color: #274A41; }
.rich p { margin: 0 0 10px; }
.rich h2, .rich h3 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 14px 0 8px; }
.rich ul { padding-left: 18px; margin: 0 0 10px; }
.rich img { border-radius: 12px; margin: 10px 0; }

/* ---------------- 界面风格切换（个人中心） ---------------- */
.theme-picker { display: flex; flex-direction: column; gap: 9px; }

.theme-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1.5px solid var(--line);
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.theme-opt.active {
    border-color: var(--brand-deep);
    box-shadow: 0 0 0 3px rgba(18, 217, 160, .16);
}

.theme-swatch {
    width: 46px;
    height: 34px;
    border-radius: 9px;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}

.sw-default { background: linear-gradient(135deg, #0A3B31, #0AA47A 52%, #C9F73B); }
.sw-a { background: linear-gradient(135deg, #0D3B31, #15E6A8 48%, #D4FF3F 76%, #E2402B); }
.sw-j { background: linear-gradient(135deg, #1E2A6D, #48DFFF 52%, #FF6FD8); }

.theme-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.theme-text b { font-size: 13.5px; font-weight: 800; }
.theme-text small { font-size: 11.5px; color: var(--muted); }
.theme-opt.active .theme-text b { color: var(--brand-deep); }

/* ---------------- 桌面端 ---------------- */
/* ---------------- 打卡时间窗 / 定位状态 ---------------- */
.window-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding: 10px 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .14);
}

.window-time { font-size: 14px; font-weight: 800; color: var(--lime); letter-spacing: .3px; }
.window-tip { font-size: 11.5px; color: rgba(234, 251, 244, .72); }

.window-chip.state-open { border-color: rgba(201, 247, 59, .5); background: rgba(201, 247, 59, .10); }
.window-chip.state-before { border-color: rgba(255, 255, 255, .2); }
.window-chip.state-closed { border-color: rgba(255, 138, 61, .4); background: rgba(255, 138, 61, .10); }
.window-chip.state-closed .window-time { color: #FFB37A; }
.window-chip.state-not_start { border-color: rgba(255, 255, 255, .22); }
.window-chip.state-ended { border-color: rgba(255, 138, 61, .4); background: rgba(255, 138, 61, .10); }
.window-chip.state-ended .window-time { color: #FFB37A; }
.window-range { font-size: 11.5px; color: rgba(234, 251, 244, .78); }

.hero-badge.state-open { border-color: rgba(201, 247, 59, .55); }
.hero-badge.state-not_start { border-color: rgba(255, 255, 255, .26); }
.hero-badge.state-closed { border-color: rgba(255, 138, 61, .5); color: #FFB37A; }
.hero-badge.state-closed .dot { background: #FFB37A; box-shadow: 0 0 0 4px rgba(255, 138, 61, .18); }
.hero-badge.state-ended { border-color: rgba(255, 138, 61, .5); color: #FFB37A; }
.hero-badge.state-ended .dot { background: #FFB37A; box-shadow: 0 0 0 4px rgba(255, 138, 61, .18); }

/* 不在打卡时段（含活动未开始/已结束）时按钮置灰不可点 */
.btn-checkin:disabled,
.btn-checkin-lg:disabled {
    opacity: .62;
    cursor: not-allowed;
    box-shadow: none;
    filter: saturate(.55);
}

.geo-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 12px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    color: rgba(234, 251, 244, .82);
}

.geo-line .geo-ico { font-size: 13px; opacity: .9; flex: 0 0 auto; }
.geo-line.geo-ok { background: rgba(201, 247, 59, .12); border-color: rgba(201, 247, 59, .42); color: #EAFFC2; }
.geo-line.geo-bad { background: rgba(255, 138, 61, .12); border-color: rgba(255, 138, 61, .38); color: #FFD3B8; }
.geo-line.geo-off { opacity: .75; }

/* 后台活动设置里的一键采集按钮 */
.geo-pick-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.geo-pick-hint { font-size: 12px; color: #8a93a1; line-height: 1.6; }

/* ---------------- 开屏海报 ---------------- */
.splash-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #06201C;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity .45s ease;
}

.splash-layer.hide {
    opacity: 0;
    pointer-events: none;
}

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

.splash-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.splash-count {
    font-size: 12px;
    color: rgba(255, 255, 255, .88);
    background: rgba(6, 32, 28, .55);
    padding: 5px 13px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.splash-enter {
    padding: 11px 32px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #C9F73B, #12D9A0);
    color: #06201C;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(18, 217, 160, .35);
    cursor: pointer;
}

.splash-enter:active {
    transform: translateY(1px);
}

@media (min-width: 560px) {
    body { background: #E7F1EC; }
    .app-shell {
        box-shadow: 0 0 60px rgba(6, 32, 28, .12);
        border-left: 1px solid #DCEAE4;
        border-right: 1px solid #DCEAE4;
    }
    .tabbar { max-width: 520px; left: 50%; transform: translateX(-50%); border-radius: 18px 18px 0 0; }
}

/* =========================================================
   主题扩展元素：默认主题保持原样，仅为主题 CSS 预留挂载点
   ========================================================= */
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-sub { display: none; }

/* 打卡时段提示（原为内联样式，改为可被主题覆盖的类） */
.notice-card {
    margin: 12px 14px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #E4EFE9;
    font-size: 12px;
    color: #6E8B82;
    line-height: 1.7;
}

.notice-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-window { font-size: 13px; font-weight: 800; color: #0AA47A; }
.notice-sub { margin-top: 5px; }

/* 页脚 */
.site-foot {
    padding: 0 18px 108px;
    text-align: center;
    color: #93ADA4;
    font-size: 11.5px;
    line-height: 1.8;
}

.foot-links { margin-bottom: 6px; }
.foot-staff { color: #0AA47A; font-weight: 700; }
.foot-dot { color: #D3E2DB; }
.foot-agreement { color: #6E8B82; }
.foot-tech { margin-top: 2px; color: #93ADA4; font-size: 11px; }

/* 底部导航的中间占位与凸起按钮（仅部分主题使用） */
.tab-gap { display: none; }
.tab-fab { display: none; }

/* 首页内容容器：供主题做整页布局（其他页面不受影响） */
.home-wrap { display: block; }
