:root {
    --brand-from: #ff4d3a;
    --brand-mid: #ff6b35;
    --brand-to: #ff9a2e;
    --brand: linear-gradient(135deg, var(--brand-from), var(--brand-to));
    --page: #f3f4f8;
    --card: #ffffff;
    --text: #1c1c1e;
    --text-2: #6e6e73;
    --text-3: #8e8e93;
    --line: #eeeef2;
    --pad: 10px;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(31, 31, 46, 0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    background: #e8eaef;
    min-height: 100%;
    /* 锁定根字号，避免系统「大字体 / 显示大小」撑破布局 */
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background: var(--page);
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    /* 减少双击缩放 */
    touch-action: manipulation;
}

/* 弹层打开时锁定背景页滚动（防空白处拖动手势穿透） */
html.wm-scroll-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
}
body.wm-scroll-lock {
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 430px;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
    overscroll-behavior: none;
}
.wm-scroll-allow {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button, input, textarea, select {
    font-family: inherit;
    font-size: 16px; /* ≥16px，避免 iOS 聚焦时自动放大页面 */
    touch-action: manipulation;
}

.page { padding: calc(12px + env(safe-area-inset-top, 0px)) var(--pad) 0; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 12px;
    margin-bottom: 12px;
}
.card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title::before {
    content: '';
    width: 3px;
    height: 13px;
    border-radius: 3px;
    background: var(--brand);
}

.hero-stat {
    background: linear-gradient(145deg, #ff3d30 0%, #ff6b35 52%, #ff9a2e 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px 18px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.28);
}
.hero-stat .k { font-size: 13px; opacity: 0.88; }
.hero-stat .v { font-size: 30px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -0.5px; }
.hero-stat .d { font-size: 13px; opacity: 0.86; }

.field { margin-bottom: 12px; }
.field label {
    display: block;
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 6px;
}
.field input, .field textarea, .field select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fafafa;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 16px;
    color: var(--text);
    outline: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: #ffb08a; background: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 9px 16px;
    border-radius: 999px;
    background: #f4f4f6;
    color: var(--text-2);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.chip.on {
    background: #fff4ec;
    color: var(--brand-mid);
}

.btn-primary, .btn-ghost {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 13px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.28);
}
.btn-primary:disabled { opacity: 0.55; }
.btn-ghost {
    background: #fff4ec;
    color: var(--brand-mid);
    margin-top: 8px;
}

.tabs {
    display: flex;
    gap: 6px;
    background: #fff;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.tab {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 10px 8px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-3);
    cursor: pointer;
    white-space: nowrap;
}
.tab.on { background: var(--brand); color: #fff; }
a.tab { color: inherit; }

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.avatar-sm {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}
.list-main { flex: 1; min-width: 0; }
.list-main b { display: block; font-size: 16px; }
.list-main span { display: block; font-size: 13px; color: var(--text-3); margin-top: 3px; }
.tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff4ec;
    color: var(--brand-mid);
    flex-shrink: 0;
}
.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.work-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.work-thumb {
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    overflow: hidden;
    background: #eef0f5;
}
.work-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.work-info { padding: 10px 10px 12px; }
.work-info b { display: block; font-size: 15px; }
.work-info span { display: block; font-size: 13px; color: var(--text-3); margin-top: 4px; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 650;
    color: var(--text);
    cursor: pointer;
}
.faq-a { display: none; font-size: 15px; color: var(--text-2); line-height: 1.6; padding-bottom: 12px; }
.faq-item.open .faq-a { display: block; }

.preview-box {
    min-height: 140px;
    border-radius: 14px;
    background: #f7f7f9;
    border: 1px dashed #e4e4ea;
    padding: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
}
.preview-box.ready { background: #fffaf4; border-style: solid; border-color: #ffd7b8; color: var(--text); }

.site-footer {
    text-align: center;
    padding: 28px 16px 12px;
    color: #b5b5be;
    letter-spacing: 0.3px;
}
.site-footer-copy {
    font-size: 12px;
    line-height: 1.4;
}
.site-footer-slogan {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #c4c4cc;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 56px;
    transform: translateX(-50%) translateY(12px);
    max-width: min(86vw, 320px);
    background: rgba(28, 28, 30, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    padding: 12px 18px;
    border-radius: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 10050;
    white-space: normal;
    text-align: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    word-break: break-word;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.plan {
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}
.plan.on { border-color: #ff8a4a; background: #fff8f2; }
.plan b { font-size: 16px; }
.plan em { font-style: normal; color: var(--brand-mid); font-size: 20px; font-weight: 800; }
.plan span { display: block; font-size: 12px; color: var(--text-3); margin-top: 4px; }

.empty {
    text-align: center;
    color: var(--text-3);
    font-size: 15px;
    padding: 28px 10px;
}

.row-between { display: flex; justify-content: space-between; align-items: center; }
.muted { color: var(--text-3); font-size: 14px; }
.danger { color: #e5484d; }
.btn-primary { display: block; text-align: center; }
.btn-ghost { display: block; text-align: center; }

.share-card {
    background: linear-gradient(145deg, #ff3d30 0%, #ff6b35 52%, #ff9a2e 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    margin-bottom: 12px;
}
.share-card .code {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 10px 0 6px;
}
.qr-box {
    width: 148px;
    height: 148px;
    margin: 12px auto 0;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4c4c8;
    font-size: 13px;
}

.poster-frame {
    aspect-ratio: 3/4;
    border-radius: 16px;
    background: linear-gradient(160deg, #ff6b35, #ff9a2e 48%, #ffe7c2);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}
.poster-frame h3 { font-size: 22px; line-height: 1.35; }
.poster-frame p { font-size: 13px; opacity: 0.92; margin-top: 8px; }

.video-frame {
    aspect-ratio: 9/16;
    max-height: 360px;
    margin: 0 auto;
    border-radius: 16px;
    background: linear-gradient(180deg, #2b1a14, #7a3a22);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
}
.play-dot {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.h5-frame {
    min-height: 220px;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.h5-cover {
    height: 120px;
    background: linear-gradient(135deg, #ff6b35, #ffb14a);
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    font-weight: 700;
}
.h5-body { padding: 14px; font-size: 15px; color: var(--text-2); line-height: 1.7; }

/* 客服二维码弹窗 */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 16, 16, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    padding: 24px;
}
.qr-modal.show {
    opacity: 1;
    visibility: visible;
}
.qr-modal-content {
    background: #fff;
    border-radius: 18px;
    width: min(320px, 100%);
    overflow: hidden;
    transform: translateY(10px) scale(0.96);
    transition: transform 0.28s ease;
}
.qr-modal.show .qr-modal-content { transform: none; }
.qr-modal-header {
    padding: 16px 44px 14px;
    font-size: 16px;
    font-weight: 650;
    color: var(--text);
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--line);
}
.qr-modal-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #b0b0b8;
    cursor: pointer;
    line-height: 1;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    padding: 0;
}
.qr-modal-body {
    padding: 24px 20px 16px;
    text-align: center;
}
.qr-code-box {
    display: inline-block;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 12px;
    line-height: 0;
}
.qr-code-box img {
    display: block;
    width: 180px;
    height: 180px;
    object-fit: contain;
    background: #fff;
}
.qr-modal-tip {
    font-size: 13px;
    color: var(--text-2);
    margin: 0;
}
.qr-modal-footer { padding: 0 20px 18px; }
.qr-close-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
}

@media (max-width: 360px) {
    :root { --pad: 8px; }
}
