
:root {
            /* 亮色模式变量 */
            --primary-color: #ff6b6b;
            --follow-color: #4da6ff;
            --bg-color: #f5f6f8;
            --card-bg: #ffffff;
            --text-main: #333333;
            --text-sub: #888888;
            --focus-border: #4da6ff;
            --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
            --section-bg: #ffffff;
        }

        /* 暗黑模式变量 */
        [data-theme="dark"] {
            --primary-color: #ff6b6b;
            --follow-color: #4da6ff;
            --bg-color: #1a1a1a;
            --card-bg: #2d2d2d;
            --text-main: #e0e0e0;
            --text-sub: #aaaaaa;
            --focus-border: #4da6ff;
            --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
            --section-bg: #2d2d2d;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            -webkit-user-drag: none;
        }
		#schedule,#coupon,#column,#camp,#checkin,#singleCourse,#product,#community{ display: none;}
/* ✅ 锁死滚动，但保留回弹 */
html, body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}



        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
			  background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.6;
            max-width: 480px;
            margin: 0 auto;
            padding-bottom: 30px;
            position: relative;
            transition: all 0.3s ease;
        }

body::after {
    content: '';
    display: block;
    height: 1px;
}
        a, img { 
            -webkit-user-drag: none; 
            user-drag: none; 
        }

        a {
            text-decoration: none;
            color: inherit;
        }
a .ico{ color: #333333;}
        .container { padding: 15px; }

        /* 头部 */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .logo-container { 
            display: flex; 
            align-items: center; 
            gap: 10px; 
        }
        .logo-img { 
            width: 44px; 
            height: 44px; 
            border-radius: 50%; 
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
        }
.logo-img img{ width: 100%;border-radius: 50%; }
        .shop-name { 
            font-size: 18px; 
            font-weight: 600; 
        }
        .follow-btn {
            background: linear-gradient(to right, #ff7e5f, #feb47b);
            color: white; 
            border: none; 
            padding: 6px 15px;
            border-radius: 20px; 
            font-size: 14px; 
            font-weight: 500;
            cursor: pointer; 
            box-shadow: 0 2px 5px rgba(255, 126, 95, 0.3);
            transition: all 0.3s ease; display: none;
        }
        .follow-btn.followed {
            background: linear-gradient(to right, var(--follow-color), #80bfff);
        }

        /* 店铺ID - 可点击复制 */
        .shop-id { 
            font-size: 12px; 
            color: var(--text-sub); 
            margin-bottom: 15px; 
            padding-left: 5px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .shop-id:active {
            color: var(--primary-color);
            transform: scale(1.05);
        }
.shop-id {
    display: flex;
    align-items: center;
}

.shop-id-right {
    margin-left: auto;
}



        /* 搜索框 - 聚焦边框变蓝 */
        .search-box { 
            position: relative; 
            margin-bottom: 15px; 
        }
        .search-box input {
            width: 100%; 
            padding: 10px 15px 10px 40px;
            border-radius: 25px;
            border: 1px solid #e0e0e0; 
            background-color: var(--card-bg); 
            color: var(--text-main);
            font-size: 14px;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }
        .search-box input:focus {
            border-color: var(--focus-border);
            box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.1);
            outline: none;
        }
        .search-box i { 
            position: absolute; 
            left: 15px; 
            top: 50%; 
            transform: translateY(-50%); 
            color: var(--text-sub); 
        }

        /* 导航 - 无链接，仅切换active */
        .nav-tabs {
            display: flex;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 15px;
            width: 100%;
        }
        .nav-tab {
            flex: 1;
            text-align: center;
            padding: 8px 4px;
            border-radius: 20px; 
            font-size: 14px;
            cursor: pointer; 
            background: var(--card-bg); 
            color: var(--text-sub); 
            font-weight: 500;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
            min-height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .nav-tab.active { 
            background: var(--primary-color); 
            color: white; 
            font-size: 15px; 
            font-weight: 600;
        }

        /* 轮播图 */
        .banner { 
            width: 100%; 
            height: 100px; 
            border-radius: 12px; 
            overflow: hidden; 
            margin-bottom: 15px; 
            background: linear-gradient(90deg, #43cea2, #185a9d);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 18px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            cursor: pointer;
        }

        /* 功能入口 */
        .function-buttons {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }
        .func-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            background: var(--card-bg);
            padding: 10px 5px;
            border-radius: 12px;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }
        .func-btn:active {
            transform: translateY(2px);
        }
        .func-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 8px;
            font-size: 18px;
            color: white;
        }
        .func-btn:nth-child(1) .func-icon { background: linear-gradient(135deg, #ff9a9e, #fad0c4); }
        .func-btn:nth-child(2) .func-icon { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
        .func-btn:nth-child(3) .func-icon { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
        .func-btn:nth-child(4) .func-icon { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
        .func-text { 
            font-size: 12px; 
            color: var(--text-main); 
            font-weight: 600;
        }

        /* 领券中心 */
        .coupon-banner {
            width: 100%; 
            height: 80px; 
            background: linear-gradient(90deg, #ff9a9e, #fecfef);
            border-radius: 12px; 
            display: flex; 
            align-items: center; 
            justify-content: center;
            color: white; 
            font-size: 18px; 
            font-weight: 600; 
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(255, 154, 158, 0.3);
            cursor: pointer;
        }

        /* 通用区块 */
        .section { 
            margin-bottom: 20px; 

            background: var(--section-bg);
            border-radius: 12px;
            padding: 15px;
            box-shadow: var(--shadow);
            transition: all 0.3s ease;
        }
        .section-header {
            display: flex; 
            justify-content: space-between; 
            align-items: center; 
            margin-bottom: 12px;
        }
        .section-title { 
            font-size: 17px; 
            font-weight: 600; 
            color: var(--text-main);
        }
        .section-more { 
            font-size: 13px; 
            color: var(--text-sub); 
            display: flex; 
            align-items: center; 
            gap: 2px;
        }

        /* 分类Tab */
        .category-tabs { 
            display: flex; 
            justify-content: space-between;
            gap: 8px; 
            margin-bottom: 15px; 
        }
        .category-tab {
            flex: 1;
            text-align: center;
            padding: 6px 8px;
            border-radius: 15px; 
            font-size: 13px; 
            cursor: pointer;
            background: var(--card-bg); 
            color: var(--text-sub);
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .category-tab.active { 
            background: var(--primary-color); 
            color: white; 
        }

        /* 专栏列表 */
        .column-list { 
            display: flex; 
            flex-direction: column; 
            gap: 15px; 
        }
        .column-card {
            display: flex; 
            gap: 12px; 
            background: var(--card-bg); 
            padding: 12px;
            border-radius: 10px; 
            box-shadow: var(--shadow);
            text-decoration: none;
            transition: all 0.3s ease;
        }
        .column-card:active {
            transform: translateX(3px);
        }
        .column-img { 
            width: 100px; 
            height: 66px;
            border-radius: 8px; 
            background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            text-align: center;
            font-weight: 600;
        }
        .column-info { 
            flex: 1; 
            display: flex; 
            flex-direction: column; 
            justify-content: space-between; 
			 min-width: 0;
        }
        .column-name { 
            font-weight: 600; 
            font-size: 14px; 
            color: var(--text-main);
			  display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .column-meta { 
            font-size: 12px; 
            color: var(--text-sub); 
            margin: 3px 0; 
        }
        .column-price { 
            font-size: 15px; 
            color: var(--primary-color); 
            font-weight: 600; 
        }
        
        .view-all-btn {
            display: block; 
            width: 100%; 
            text-align: center; 
            padding: 10px; 
            margin-top: 15px;
            background: var(--card-bg); 
            border-radius: 8px; 
            font-size: 14px; 
            color: var(--text-sub); 
            font-weight: 500;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        .view-all-btn:active {
            background: #3a3a3a;
        }

        /* 两列网格 */
        .two-col-grid { 
            display: grid; 
            grid-template-columns: repeat(2, 1fr); 
            gap: 15px; 
        }
        .grid-card { 
            background: var(--card-bg); 
            border-radius: 10px; 
            overflow: hidden; 
            box-shadow: var(--shadow);
            text-decoration: none;
            transition: all 0.3s ease;
        }
        .grid-card:active {
            transform: translateY(3px);
        }
        .grid-card-img-container {
            position: relative;
            width: 100%;
            padding-bottom: 66.66%;
            background: linear-gradient(45deg, #ffecd2, #fcb69f);
        }
        .grid-card-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            text-align: center;
            font-weight: 600;
        }
        .grid-card-content {
            padding: 10px;
        }
        .grid-card-title { 
            font-size: 13px; 
            font-weight: 500; 
            margin-bottom: 3px;
            color: var(--text-main);
        }
        .grid-card-price {
            font-size: 14px;
            color: var(--primary-color);
            font-weight: 600;
        }

        /* 打卡 - 修复光明模式背景颜色问题 */
        .punch-grid { 
            display: grid; 
            grid-template-columns: repeat(2, 1fr); 
            gap: 15px; 
        }
        .punch-card { 
            /* 光明模式：使用更浅的渐变背景，确保文字清晰 */
            background: linear-gradient(135deg, #f0f4ff, #e6f0ff);
            padding: 20px 15px; 
            border-radius: 12px; 
            text-align: center; 
            text-decoration: none;
            border: 1px solid #d0e0ff;
            transition: all 0.3s ease;
        }
        /* 暗黑模式：保持深色背景 */
        [data-theme="dark"] .punch-card { 
            background: linear-gradient(135deg, #2d3748, #4a5568); 
            border: 1px solid #4a5568;
        }
        .punch-card:active {
            transform: scale(0.97);
        }
        .punch-icon { 
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            font-size: 22px;
            color: white;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        .punch-card:nth-child(1) .punch-icon {
            background: linear-gradient(135deg, #ff9a9e, #fad0c4);
        }
        .punch-card:nth-child(2) .punch-icon {
            background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
        }
        .punch-title { 
            font-size: 14px; 
            font-weight: 500; 
            color: var(--text-main);
        }

        /* 产品栏 - 背景改为淡蓝色渐变 */
        .product-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        .product-card {
            background: var(--card-bg);
            border-radius: 10px;
            overflow: hidden;
            box-shadow: var(--shadow);
            text-decoration: none;
            transition: all 0.3s ease;
        }
        .product-card:active {
            transform: translateY(3px);
        }
        /* 产品图片背景改为淡蓝色渐变 */
        .product-img {
            width: 100%;
            aspect-ratio: 1/1;
            background: linear-gradient(135deg, #a1c4fd, #c2e9fb); /* 淡蓝色渐变 */
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            font-weight: 600;
        }
        .product-info {
            padding: 10px;
        }
        .product-name {
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 3px;
            color: var(--text-main);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        .product-price {
            font-size: 14px;
            color: var(--primary-color);
            font-weight: 600;
        }

        /* 我的社群 - 图标增大 */
        .community-list { 
            display: flex; 
            flex-direction: column; 
            gap: 15px; 
        }
        .community-card {
            display: flex; 
            gap: 12px; 
            background: var(--card-bg); 
            padding: 12px;
            border-radius: 10px; 
            box-shadow: var(--shadow);
            align-items: stretch;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        .community-card:active {
            transform: translateX(3px);
        }
        .community-avatar {
            width: 80px;
            height: 80px;
            border-radius: 8px; 
            background: linear-gradient(45deg, #ff9a9e, #fad0c4);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 12px;
            text-align: center;
            font-weight: 600;
        }
        .community-info { 
            flex: 1; 
            display: flex; 
            flex-direction: column; 
            justify-content: space-between; 
        }
        .community-name { 
            font-weight: 600; 
            font-size: 15px; 
            color: var(--text-main);
        }
        .community-desc { 
            font-size: 12px; 
            color: var(--text-sub); 
            margin-top: 4px; 
            line-height: 1.4;
        }
        .community-action { 
            margin-top: 8px; 
        }
        .join-btn {
            display: inline-block; 
            padding: 4px 12px; 
            background: var(--primary-color);
            color: white; 
            border-radius: 15px; 
            font-size: 12px; 
            font-weight: 500;
        }

        /* 返回顶部按钮 */
        .back-to-top {
            position: fixed;
            bottom: 60px;
            right: 20px;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            background: var(--primary-color);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 999;
        }
        .back-to-top.show {
            opacity: 1;
            visibility: visible;
        }
        .back-to-top:active {
            transform: scale(0.9);
        }

        /* Toast提示 */
        .toast {
            position: fixed; 
            bottom: 80px; 
            left: 50%; 
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.85); 
            color: white; 
            padding: 10px 20px;
            border-radius: 25px; 
            font-size: 14px; 
            z-index: 1000;
            animation: fadeInOut 2.5s ease forwards;
            white-space: nowrap;
        }
        @keyframes fadeInOut {
            0% { opacity: 0; bottom: 60px; }
            15% { opacity: 1; bottom: 80px; }
            85% { opacity: 1; bottom: 80px; }
            100% { opacity: 0; bottom: 60px; }
        }


/* ===== 活动卡片 - 图片 3:2 比例 ===== */
/* ===== 活动卡片：图片左 / 内容右，图片 3:2 圆角 ===== */

#community-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* 整张卡片：横排 flex */
.activity-card {
    display: flex;
    flex-direction: row;          /* ✅ 图左 内容右 */
    align-items: stretch;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    padding: 8px;                 /* 卡片内边距，图片不贴边 */
    gap: 10px;
}

/* 3:2 图片容器：宽占 42%，高 = 宽*2/3 */
.activity-cover {
    position: relative;
    flex: 0 0 42%;
    width: 42%;
    padding-top: 28%;             /* ✅ 42% * 2/3 ≈ 28% */
    border-radius: 8px;           /* ✅ 图片圆角 */
    overflow: hidden;
    background: #f0f0f0;
}

.activity-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;             /* 裁剪填充，不变形 */
    object-position: center;
}

/* 右侧内容区 */
.activity-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    min-width: 0;                 /* 允许 ellipsis 生效 */
}

.activity-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-desc {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-meta {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.activity-action { margin-top: 8px; }

.join-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f4ff;
    color: #4a6cf7;
    font-size: 12px;
}

/* 小屏适配 */
@media (max-width: 380px) {
    .activity-cover {
        flex: 0 0 46%;
        width: 46%;
        padding-top: 30.66%;      /* 46%*2/3 */
    }
    .activity-name { font-size: 14px; }
}