/* ============ 公众号排版工具：wp-* ============ */

/* ---------- Hero ---------- */
.wp-hero {
    margin: 18px 0 26px;
    padding: 22px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f7fffb 55%, #fff7fb 100%);
    border: 1px solid #e2ebf6;
    border-radius: 18px;
}
.wp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.wp-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wp-logo {
    width: 46px;
    height: 46px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, .18);
}
.wp-title { font-size: 20px; font-weight: 800; color: #1f2b45; letter-spacing: .3px; }
.wp-tagline { font-size: 13px; color: #6b7a96; margin-top: 2px; }
.wp-privacy {
    font-size: 12px;
    color: #2f7d55;
    background: #e8f7ef;
    border: 1px solid #c6ead8;
    border-radius: 999px;
    padding: 6px 12px;
    white-space: nowrap;
}

/* ---------- 两栏 ---------- */
.wp-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 1040px) {
    .wp-grid { grid-template-columns: 1fr; }
}

/* ---------- 卡片 ---------- */
.wp-card {
    background: #fff;
    border: 1px solid #e3e8f1;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
}
.wp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.wp-card-head b { font-size: 14px; color: #1a2b4a; }
.wp-card-info { color: #6b7a96; font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- 输入 ---------- */
.wp-textarea {
    width: 100%;
    min-height: 260px;
    border: 1px solid #c5d1e3;
    border-radius: 10px;
    padding: 12px;
    font-size: 13.5px;
    line-height: 1.8;
    color: #1a2b4a;
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    resize: vertical;
    outline: none;
}
.wp-textarea:focus { border-color: #2b62d9; box-shadow: 0 0 0 3px rgba(43, 98, 217, .12); }
.wp-hint { color: #6b7a96; font-size: 12px; line-height: 1.7; margin: 6px 0 0; }

/* ---------- 主题 ---------- */
.wp-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wp-theme {
    border: 1px solid #dbe3f0;
    background: #fff;
    border-radius: 9px;
    padding: 6px 4px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.wp-theme:hover { border-color: #2b62d9; }
.wp-theme.active { border-color: #2b62d9; background: #eef3fc; }
.wp-sw {
    display: flex;
    height: 18px;
    border: 1px solid #e3e8f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.wp-sw i { flex: 1; }
.wp-tname { font-size: 11.5px; color: #4a587a; display: block; }

/* ---------- 字段 ---------- */
.wp-field { margin-bottom: 12px; }
.wp-field:last-child { margin-bottom: 0; }
.wp-label { display: block; color: #4a587a; font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.wp-slider { display: flex; align-items: center; gap: 10px; }
.wp-range { flex: 1; accent-color: #2b62d9; }
.wp-slider b {
    min-width: 46px;
    text-align: right;
    color: #2b62d9;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.wp-note { color: #6b7a96; font-size: 12px; margin: 4px 0 0; line-height: 1.7; }
.wp-input {
    width: 100%;
    border: 1px solid #c5d1e3;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 13px;
    color: #1a2b4a;
    outline: none;
}
.wp-input:focus { border-color: #2b62d9; }
.wp-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #4a587a;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.6;
}
.wp-check input { accent-color: #2b62d9; width: 15px; height: 15px; margin-top: 2px; }

/* ---------- 段控件 ---------- */
.wp-seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    background: #eef3fc;
    border-radius: 10px;
    padding: 4px;
}
.wp-seg.col2 { grid-template-columns: repeat(2, 1fr); }
.wp-seg.col3 { grid-template-columns: repeat(3, 1fr); }
.wp-seg-btn {
    border: 0;
    background: transparent;
    padding: 6px;
    font-size: 12.5px;
    color: #4a587a;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 500;
}
.wp-seg-btn:hover { color: #1a2b4a; }
.wp-seg-btn.active { background: #fff; color: #1a2b4a; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- 预览 ---------- */
.wp-stage {
    display: flex;
    justify-content: center;
    background: #f7f9fc;
    border: 1px solid #e3e8f1;
    border-radius: 12px;
    padding: 16px;
}
.wp-phone {
    width: 375px;
    max-width: 100%;
    height: 640px;
    border: 1px solid #dbe3f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20, 35, 70, .12);
    overflow: hidden;
}
.wp-preview { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- 按钮 ---------- */
.wp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.wp-btn {
    border: 1px solid #c5d1e3;
    background: #fff;
    color: #1a2b4a;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.wp-btn:hover { background: #f7faff; border-color: #2b62d9; }
.wp-btn.primary { background: #16a34a; color: #fff; border-color: #16a34a; }
.wp-btn.primary:hover { background: #12833c; border-color: #12833c; }
.wp-mini-btn {
    border: 1px solid #c5d1e3;
    background: #fff;
    color: #2b62d9;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.wp-mini-btn:hover { background: #eef3fc; border-color: #2b62d9; }

/* ---------- 状态 ---------- */
.wp-status { margin-top: 10px; color: #4a587a; font-size: 13px; }
.wp-status.is-ok { color: #2b62d9; }
.wp-status.is-warn { color: #c0392b; }

/* ---------- 简介块 / 免责 ---------- */
.wp-info-block { margin-bottom: 26px; }
.wp-info-block .detail-icon {
    --icon-bg: linear-gradient(135deg, #16a34a, #0ea5e9);
    --icon-shadow: rgba(22, 163, 74, .3);
}
.wp-disclaim {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff8ea;
    border: 1px solid #f3e2b8;
    font-size: 12.5px;
    line-height: 1.8;
    color: #8a6516;
}
