/* ==========================================================================
   证件照排版站 —— 自定义样式
   ========================================================================== */

/*
 * 必须放在最前面：浏览器默认样式里的 [hidden]{display:none} 属于 UA 样式表，
 * 会被本站任何带 display 的类规则盖掉（例如 .sp-preview-loading{display:flex}），
 * 结果就是"用 hidden 藏起来的元素其实一直显示着" —— 表现为预览区永远蒙着
 * 一层"正在生成预览…"，缩略图容器也一直空着占位。
 */
[hidden] {
    display: none !important;
}

body {
    background: #f5f6f8;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    margin: 0;
}

/* ---------- 顶栏 ----------
 * 不用 layui 的 layui-logo / layui-layout-right：
 * 那两个类在 layui.css 里写死了 position:absolute!important 的左右定位，
 * 普通选择器压不过，手机上会出现标题被导航压掉一半的叠字。
 * 这里用自成一体的 flex 结构，行为可预期。
 */

.sp-header {
    position: relative;
    background: #142e26;
}

.sp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 20px;
    /* 与内容列对齐（首页 .sp-page.has-aside.sp-maker 是 1240），不然顶栏比正文窄一截 */
    max-width: 1240px;
    min-height: 60px;
    margin: 0 auto;
    padding: 0 18px;
    box-sizing: border-box;
}

.sp-brand {
    flex: 0 0 auto;
    color: #fff;
    font-size: 16px;
    line-height: 60px;
    text-decoration: none;
    white-space: nowrap;
}

.sp-brand:hover {
    color: #fff;
}

.sp-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 22px;
}

.sp-nav a {
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 60px;
    text-decoration: none;
}

.sp-nav a:hover {
    color: #fff;
}

/* ---------- 页面主体 ---------- */

.sp-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 14px 40px;
    box-sizing: border-box;
}

.sp-intro {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.95;
    background: #fff;
}

.sp-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 16px;
    margin: 0 0 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}

.sp-step {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 600;
    color: #2f3542;
    margin: 0 0 14px;
    line-height: 1.4;
}

.sp-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f9d6a;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.sp-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ---------- 表单控件（移动端放大到适合手指点） ---------- */

.sp-select {
    display: block;
    width: 100%;
    height: 46px;
    line-height: 46px;
    padding: 0 34px 0 12px;
    font-size: 15px;
    color: #2f3542;
    background-color: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23949aa6' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}

.sp-select:focus {
    border-color: #0f9d6a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 157, 106, .12);
}

/* 规格下拉里「自定义尺寸」是个普通 option，而下面的分组标题是 optgroup
   （浏览器默认加粗）。把它也加粗，视觉上与分组标题统一。 */
#maker_spec option[value="custom"] {
    font-weight: 700;
}

.sp-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-radio {
    flex: 1 1 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 46px;
    padding: 0 10px;
    font-size: 15px;
    color: #555;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    cursor: pointer;
    box-sizing: border-box;
}

.sp-radio input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0f9d6a;
}

/* 选中态：支持 :has() 的现代浏览器会高亮，老浏览器退化为原生单选按钮 */
.sp-radio:has(input:checked) {
    border-color: #0f9d6a;
    color: #0f9d6a;
    background: #f2f4ff;
    font-weight: 600;
}

/* 抠图模式：括号提示跟在标题后（小字灰）；两个选项等宽两列，排整齐 */
.sp-label-hint {
    font-style: normal;
    font-size: 12.5px;
    line-height: 1.5;
    color: #8a8f99;
}

.sp-matting-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 640px) {
    .sp-matting-opts { grid-template-columns: 1fr; }
}

.sp-hint {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.85;
    color: #8b8f99;
}

.sp-hint b {
    color: #0f9d6a;
}

.sp-plan {
    padding: 9px 12px;
    font-size: 13.5px;
    color: #444;
    background: #f7f8fc;
    border-left: 3px solid #0f9d6a;
    border-radius: 0 6px 6px 0;
}

.sp-plan b {
    color: #0f9d6a;
    font-size: 15px;
}

/* ---------- 版面预览 ---------- */

.sp-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: #f0f1f5;
    border-radius: 8px;
    overflow: hidden;
}

.sp-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.sp-preview img:not([src]),
.sp-preview img[src=""] {
    display: none;
    min-height: 0;
}

.sp-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9aa0ab;
    background: #f0f1f5;
}

/* ---------- 选择照片 ---------- */

.sp-file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 14px;
    background: #fafbfe;
    border: 1.5px dashed #c3c8d4;
    border-radius: 10px;
    box-sizing: border-box;
}

.sp-file:hover {
    border-color: #0f9d6a;
}

/* 透明铺满整个区域：点哪儿都能唤起相册/相机 */
.sp-file input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sp-file-btn {
    flex: 0 0 auto;
    padding: 9px 16px;
    font-size: 14px;
    color: #fff;
    background: #0f9d6a;
    border-radius: 7px;
    pointer-events: none;
}

.sp-file-name {
    font-size: 13px;
    color: #8b8f99;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-thumb-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 10px;
    background: #f7f8fc;
    border-radius: 8px;
}

.sp-thumb-wrap img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    object-fit: cover;
    background: #fff;
    border-radius: 6px;
}

.sp-thumb-info {
    font-size: 12.5px;
    line-height: 1.8;
    color: #666;
}

/* ---------- 提交区 ---------- */

.sp-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.85;
    color: #c0392b;
    background: #fdecea;
    border: 1px solid #f7c1bb;
    border-radius: 8px;
    word-break: break-word;
}

.sp-alert-warn {
    color: #8a5b00;
    background: #fff8e6;
    border-color: #ffe1a8;
}

.sp-submit {
    display: block;
    width: 100%;
    height: 52px;
    line-height: 52px;
    padding: 0;
    font-size: 17px;
    border-radius: 10px;
}

.sp-submit.layui-btn-disabled,
.sp-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.sp-progress {
    margin-top: 14px;
}

.sp-progress-inner {
    height: 8px;
    background: #eceef4;
    border-radius: 4px;
    overflow: hidden;
}

.sp-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0f9d6a, #8b96ef);
    border-radius: 4px;
    transition: width .25s ease;
}

.sp-progress-text {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    color: #8b8f99;
    text-align: center;
}

/* ---------- 常见问题 ---------- */

.sp-help dl {
    margin: 0;
}

.sp-help dt {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #2f3542;
    line-height: 1.7;
}

.sp-help dt:first-child {
    margin-top: 0;
}

.sp-help dd {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.9;
    color: #667085;
}

.sp-help dd b {
    color: #0f9d6a;
}

/* ---------- 页脚 / 通用 ----------
 * 结构参考 calc.qtool.io：品牌块 + 三栏链接 + 底栏；配色照本站顶栏来（首尾呼应）。
 */

.footer {
    margin-top: 12px;
    background: #142e26;
    color: rgba(255, 255, 255, .45);
    font-size: 13px;
    line-height: 1.7;
}

.footer-inner {
    /* 同上：跟内容列对齐，不然页脚比正文窄一截 */
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 20px 20px;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 26px;
}

.footer-logo {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #f0f0f0;
}

.footer-brand p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .38);
}

.footer-col h4 {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.footer-col a {
    display: block;
    padding: 3px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .42);
    text-decoration: none;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .3);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }

    .footer-bottom { justify-content: center; }
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
}

.footer-legal a,
.sp-linkbtn {
    padding: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .42);
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
}

.footer-legal a:hover,
.sp-linkbtn:hover {
    color: #fff;
    text-decoration: underline;
}


/* ---------- Cookie 同意条 ---------- */

.sp-cookie {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #142e26;
    border-top: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .18);
}

.sp-cookie-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sp-cookie-text {
    flex: 1 1 340px;
    font-size: 12.5px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .6);
}

.sp-cookie-text b {
    color: #f0f0f0;
}

.sp-cookie-text a {
    color: #a9b3ff;
    text-decoration: underline;
}

.sp-cookie-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.sp-cookie-actions .layui-btn {
    margin: 0;
}

@media (max-width: 640px) {
    .sp-cookie-actions {
        width: 100%;
        margin-left: 0;
    }

    .sp-cookie-actions .layui-btn {
        flex: 1 1 0;
    }
}

a {
    color: #0f9d6a;
}

/* ---------- 顶栏：当前页高亮与语言切换 ---------- */

.sp-nav a.is-active {
    color: #fff;
    font-weight: 600;
}

.sp-nav a.sp-lang {
    padding: 0 10px;
    color: #cdd3ff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    line-height: 26px;
    align-self: center;
    font-size: 13px;
}

.sp-nav a.sp-lang:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}

/* ---------- 换底色：底色选择 ---------- */

.sp-colors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sp-color {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

/*
 * 视觉上隐藏但保留可聚焦性。
 * 不要用 width:0;height:0 —— 那样键盘 Tab 会跳过它，属于可访问性缺陷；
 * 1px + opacity:0 的写法仍然能被 Tab 聚焦，样式上完全看不见。
 */
.sp-color input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-color:has(input:focus-visible) {
    outline: 2px solid #0f9d6a;
    outline-offset: 2px;
}

.sp-color-chip {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
    position: relative;
    overflow: hidden;
}

.sp-color-custom .sp-color-chip input[type="color"] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0;
}

.sp-color-name {
    font-size: 13px;
    color: #2f3542;
    line-height: 1.4;
}

.sp-color-desc {
    font-size: 11px;
    color: #9aa0ab;
    line-height: 1.3;
}

.sp-color:has(input:checked) {
    border-color: #0f9d6a;
    background: #f2f4ff;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .12);
}

.sp-color:has(input:checked) .sp-color-name {
    color: #0f9d6a;
    font-weight: 600;
}

.sp-privacy {
    color: #2f8a4c;
}

/* ---------- 换底色：进度 / 结果 ---------- */

.sp-quick {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f7f8fc;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.85;
    color: #6b7280;
}

.sp-quick b {
    display: block;
    color: #2f3542;
    font-size: 13px;
    margin-bottom: 4px;
}

.sp-quick .layui-btn {
    margin: 8px 0 0;
}

.sp-alpha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 13px;
    color: #555;
}

.sp-alpha input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #0f9d6a;
}

.sp-compare {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sp-compare figure {
    flex: 1 1 180px;
    margin: 0;
    min-width: 0;
}

.sp-compare canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: repeating-conic-gradient(#e8e8e8 0 25%, #fff 0 50%) 50% / 16px 16px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}

.sp-compare figcaption {
    margin-top: 6px;
    font-size: 12px;
    color: #8b8f99;
    text-align: center;
}

.sp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.sp-actions .layui-btn {
    margin: 0;
    flex: 1 1 140px;
}

/* 裁剪页工具栏：旋转 / 翻转 / 人脸居中 / 校正倾斜 */
.sp-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.sp-tool {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    /* 字号/内距压小一档：7 个按钮（旋转×2 / 翻转×2 / 人脸居中 / 去背景 / 合规检查）
       要能在正文列宽度里排成完整一行，不折行 */
    padding: 0 9px;
    font-size: 12.5px;
    line-height: 1;
    white-space: nowrap;
    color: #2f3542;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}

.sp-tool:hover {
    border-color: #0f9d6a;
    color: #0f9d6a;
}

.sp-tool:active {
    background: #f2fbf7;
}

/* 裁剪页输出格式行 */
.sp-out-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.sp-out-row .sp-custom-lbl {
    font-size: 14px;
    color: #606266;
}

/* 工具栏里独占一行的「补背景」勾选项：
   做成朴素的小字勾选 + 说明，不去模仿按钮，免得跟上面那排按钮混淆 */
.sp-opt-row {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    cursor: pointer;
}

.sp-opt-row input {
    margin: 0;
    flex: 0 0 auto;
}

.sp-opt-row em {
    font-style: normal;
    color: #9aa0ab;
}

/* 裁剪页的合规检查面板 */
.sp-checkwrap {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f7f8fa;
    border: 1px solid #eceef2;
    border-radius: 10px;
}

/* 从换底色交接过来的图 */
.sp-from-bg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    margin-bottom: 12px;
    background: #f2f4ff;
    border: 1px solid #cbe9dc;
    border-radius: 10px;
}

.sp-from-bg img {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

.sp-from-bg-text {
    font-size: 12.5px;
    line-height: 1.8;
    color: #4b5464;
}

.sp-from-bg-text b {
    color: #0f9d6a;
}

/* ---------- 旧样式保留 ---------- */

.layui-carousel img {
    width: 100%;
    height: 300px;
}

.product-item {
    float: left;
    width: 25%;
    padding: 20px;
}

.product-item img {
    width: 100%;
}

/* ---------- 移动端适配 ---------- */

@media (max-width: 768px) {
    .sp-header-inner {
        flex-direction: column;
        min-height: 0;
        padding: 6px 12px 10px;
    }

    .sp-brand {
        line-height: 34px;
        font-size: 15px;
    }

    .sp-nav {
        justify-content: center;
        gap: 2px 14px;
    }

    .sp-nav a {
        line-height: 30px;
        font-size: 13px;
    }

    .sp-page {
        padding: 12px 10px 30px;
    }

    .sp-card {
        padding: 15px 13px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .sp-intro {
        font-size: 13px;
        line-height: 1.9;
        padding: 12px;
    }

    .sp-step {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .sp-radio {
        flex: 1 1 100%;
    }
}

/* ---------- 裁剪页 ---------- */

.sp-ratios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sp-ratio {
    position: relative;
    flex: 0 1 auto;
    padding: 9px 14px;
    font-size: 13.5px;
    color: #555;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 20px;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

/* 视觉隐藏但保留可聚焦（Tab 能到） */
.sp-ratio input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-ratio:has(input:checked) {
    color: #fff;
    background: #0f9d6a;
    border-color: #0f9d6a;
    font-weight: 600;
}

.sp-ratio:has(input:focus-visible) {
    outline: 2px solid #0f9d6a;
    outline-offset: 2px;
}

.sp-stage {
    margin-bottom: 10px;
    text-align: center;
    background: #2b2f38;
    border-radius: 10px;
    padding: 8px;
    /* 触屏拖动选框时不要让页面跟着滚 */
    touch-action: none;
}

.sp-stage canvas {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    cursor: crosshair;
}
/* ---------- 顶栏语言下拉 ---------- */

.sp-langmenu {
    position: relative;
    align-self: center;
}

.sp-langmenu > summary {
    list-style: none;
    cursor: pointer;
    padding: 0 12px;
    line-height: 26px;
    font-size: 13px;
    color: #cdd3ff;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 20px;
    white-space: nowrap;
}

.sp-langmenu > summary::-webkit-details-marker { display: none; }

.sp-langmenu[open] > summary {
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}

.sp-langlist {
    position: absolute;
    right: 0;
    top: 34px;
    z-index: 40;
    min-width: 140px;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

.sp-langlist a {
    display: block;
    padding: 9px 12px;
    line-height: 1.5;
    font-size: 13.5px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
}

.sp-langlist a:hover { background: #f2f4ff; color: #0f9d6a; }
.sp-langlist a.is-current { color: #0f9d6a; font-weight: 600; }
@media (max-width: 768px) {
    .sp-langlist {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
}
/* ---------- 尺寸对照表 ---------- */

.sp-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #eceef4;
}

.sp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.sp-table th,
.sp-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f1f5;
}

.sp-table thead th {
    position: sticky;
    top: 0;
    background: #f7f8fc;
    color: #4b5464;
    font-weight: 600;
    font-size: 12.5px;
}

.sp-table tbody tr:last-child td { border-bottom: none; }
.sp-table tbody tr:hover { background: #fafbff; }
.sp-cell-name { font-weight: 600; color: #2f3542; }
.sp-col-use { white-space: normal; min-width: 160px; color: #667085; }

@media (max-width: 640px) {
    .sp-table { font-size: 12.5px; }
    .sp-table th, .sp-table td { padding: 8px 10px; }
}

/* ---------- 手动修补画笔 ---------- */

.sp-retouch {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f7f8fc;
    border-radius: 10px;
    font-size: 13px;
}

.sp-retouch b { color: #2f3542; }
.sp-retouch .sp-hint { margin: 6px 0 10px; }

.sp-brush-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.sp-brush-mode {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    font-size: 13px;
    color: #555;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 18px;
    cursor: pointer;
}

.sp-brush-mode input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-brush-mode:has(input:checked) {
    color: #fff;
    background: #0f9d6a;
    border-color: #0f9d6a;
    font-weight: 600;
}

.sp-brush-size {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #555;
}

.sp-brush-size input[type="range"] { flex: 1; min-width: 0; accent-color: #0f9d6a; }
.sp-compare canvas.is-brushing { cursor: crosshair; }


/* ---------- 宽页（尺寸对照表等需要横向空间的页面） ---------- */

.sp-page.is-wide {
    max-width: 1120px;
}

/* ---------- 阿拉伯语（RTL）适配 ----------
 * 阿拉伯语从右往左书写。多数布局靠 dir="rtl" 自动镜像（flex 主轴方向、
 * 文本对齐都会反转），这里只补两件事：字体与个别需要显式处理的地方。
 */

html[dir="rtl"] body {
    font-family: "Tahoma", "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic",
                 "Microsoft YaHei", -apple-system, sans-serif;
}

/* 步骤序号：阿拉伯语里序号应该出现在文字右侧（dir=rtl 已自动反序，这里只加间距） */
html[dir="rtl"] .sp-step {
    gap: 10px;
}

/* 语言下拉：RTL 下绝对定位的 right 语义不变，但列表要向左展开留出空间 */
html[dir="rtl"] .sp-langlist {
    right: auto;
    left: 0;
}

/* 分节标题里的数字/字母与阿拉伯文混排时保持自然 */
html[dir="rtl"] .sp-step-no,
html[dir="rtl"] .sp-brand {
    unicode-bidi: plaintext;
}
/* ---------- 换衣服 ---------- */

.sp-clothes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.sp-cloth {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px 7px;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

/* 视觉隐藏但保留可聚焦（Tab 能到） */
.sp-cloth input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-cloth:has(input:checked) {
    border-color: #0f9d6a;
    background: #f2f4ff;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .12);
}

.sp-cloth:has(input:checked) span {
    color: #0f9d6a;
    font-weight: 600;
}

.sp-cloth:has(input:focus-visible) {
    outline: 2px solid #0f9d6a;
    outline-offset: 2px;
}

.sp-cloth img {
    display: block;
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 6px;
    background: repeating-conic-gradient(#e8e8e8 0 25%, #fff 0 50%) 50% / 14px 14px;
}

.sp-cloth span {
    font-size: 12px;
    line-height: 1.4;
    color: #555;
}

.sp-cloth-upload {
    align-items: center;
}

.sp-cloth-plus {
    font-size: 26px;
    color: #b9bec9;
    line-height: 1;
}

.sp-cloth-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 肩线控件：放在画布下方，不遮挡要拖动的区域 */
.sp-guide {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    background: rgba(30, 33, 40, .82);
    border-radius: 10px;
    padding: 8px 10px;
    color: #fff;
    font-size: 12px;
}

.sp-guide input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #ffb400;
}

.sp-dress-tune {
    margin-top: 14px;
    padding: 12px 14px;
    background: #f7f8fc;
    border-radius: 10px;
}

.sp-dress-tune-btns {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sp-dress-tune-btns .layui-btn {
    flex: 1 1 130px;
}

@media (max-width: 640px) {
    .sp-clothes { grid-template-columns: repeat(2, 1fr); }
    .sp-cloth img { height: 110px; }
}

/* 功能未开放提示 */

.sp-hidden-note {
    background: #fff4e5;
    border: 1px solid #ffd9a8;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.9;
    color: #8a5b00;
    margin-bottom: 16px;
}


/* ---------- 顶栏 LOGO ---------- */

.sp-brand img {
    display: inline-block;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    border-radius: 7px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .sp-brand img { width: 22px; height: 22px; margin-right: 6px; border-radius: 6px; }
}


/* ---------- 通用图片裁剪页 ---------- */

/* 自定义比例 / 输出尺寸这类「几个短控件一行」的排布 */
.sp-ratio-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13.5px;
    color: #555;
}

.sp-ratio-custom > span {
    color: #667085;
    white-space: nowrap;
}

.sp-ratio-custom input[type="number"] {
    width: 84px;
    padding: 6px 8px;
    font-size: 13.5px;
    color: #2f3542;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    box-sizing: border-box;
}

.sp-ratio-custom input[type="number"]:focus {
    border-color: #0f9d6a;
    outline: none;
}

.sp-rotate-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.sp-rotate-row .layui-btn {
    margin: 0;
}

/* 塞在文字行里的小下拉，不要抢整行宽度 */
.sp-select-inline {
    display: inline-block;
    width: auto;
    min-width: 92px;
    margin: 0;
}

.sp-ratio-custom input[type="range"] {
    flex: 1 1 140px;
    min-width: 0;
    max-width: 240px;
    accent-color: #0f9d6a;
}

@media (max-width: 640px) {
    .sp-ratio-custom input[type="number"] { width: 72px; }
}


/* ---------- 护照 / 签证照片页 ---------- */

/* 国家规格卡：一行一张，左边国家代码，右边规格名与尺寸 */
.sp-docs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.sp-doc {
    position: relative;
    /* 用 grid 而不是 flex：规格名有长有短（"US passport/visa 2x2 inch" 会折行），
       flex 行内排会让右边的尺寸文字压到名字上，grid 天然把尺寸放到第二行。 */
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 0;
}

.sp-doc input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.sp-doc-code {
    grid-row: 1 / span 2;
    justify-self: start;
    min-width: 34px;
    padding: 3px 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-align: center;
    color: #0f9d6a;
    background: #e9f7f1;
    border-radius: 6px;
}

.sp-doc-name {
    grid-column: 2;
    font-size: 13.5px;
    font-weight: 600;
    color: #2f3542;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.sp-doc-size {
    grid-column: 2;
    font-size: 12px;
    color: #8b8f99;
}

.sp-doc:has(input:checked) {
    border-color: #0f9d6a;
    background: #f4fbf7;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .18);
}

.sp-doc:has(input:checked) .sp-doc-code {
    color: #fff;
    background: #0f9d6a;
}

.sp-doc:has(input:focus-visible) {
    outline: 2px solid #0f9d6a;
    outline-offset: 2px;
}

/* 拍摄 / 上传注意事项 */
.sp-tips {
    margin-top: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.9;
    color: #555;
    background: #f7f8fa;
    border: 1px solid #eceef2;
    border-radius: 10px;
}

.sp-tips b {
    display: block;
    margin-bottom: 4px;
    color: #2f3542;
}

.sp-tips ul {
    margin: 0 0 6px;
    padding-left: 18px;
}

.sp-tips span {
    color: #8b8f99;
    font-size: 12.5px;
}

@media (max-width: 640px) {
    .sp-docs { grid-template-columns: 1fr; }
}

/* ---------- 分国家护照页卡片（护照主页 + 首页「各国护照照片」共用） ---------- */

.sp-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.sp-country-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    text-decoration: none;
    color: #2f3542;
    transition: border-color .15s, box-shadow .15s;
}

.sp-country-card:hover {
    border-color: #0f9d6a;
    box-shadow: 0 2px 10px rgba(15, 157, 106, .12);
}

/* 代码徽标跨两行，右侧上面是名称、下面是尺寸 */
.sp-country-card .sp-doc-code {
    grid-row: 1 / span 2;
    justify-self: start;
}

.sp-country-name {
    grid-column: 2;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    color: #2f3542;
}

.sp-country-mm {
    grid-column: 2;
    font-size: 12px;
    color: #8a8f99;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .sp-country-grid { grid-template-columns: 1fr 1fr; }
}


/* ---------- 拍照 / 自动找脸 / 合规自检 ---------- */

/* 「用摄像头」和「选照片」并排 */
.sp-getphoto {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sp-getphoto .layui-btn { margin: 0; }

.sp-getphoto .sp-file {
    flex: 1 1 260px;
    margin: 0;
}

/* 取景面板自己占一整行，不要挤在按钮旁边 */
.sp-getphoto .sp-camera {
    flex: 1 1 100%;
}

/* 国家护照页把「用摄像头」与「选择照片」并排放在 .sp-getphoto 里：
   摄像头块在首页带 10px 上边距（那时它是单独一块），并排时会让两块在
   align-items:center 下错开，这里归零让它与右边的「选择照片」居中对齐。 */
.sp-getphoto .sp-camera-box { margin-top: 0; }

/* 摄像头取景 */
.sp-camera {
    margin-top: 12px;
}

.sp-camera-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    overflow: hidden;
    background: #111;
    border-radius: 12px;
}

.sp-camera-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 椭圆取景提示：中间清晰、四周压暗 */
.sp-camera-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 40% 30% at 50% 38%,
                rgba(255, 255, 255, .06) 0 78%, rgba(0, 0, 0, .55) 100%);
}

.sp-camera-count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 76px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}

/* 自动找脸那一行 */
.sp-detectbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sp-detectbar .layui-btn { margin: 0; }

.sp-detect-note {
    font-size: 12.5px;
    color: #8b8f99;
}

/* 向导线说明 */
.sp-legend {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.9;
    color: #555;
    background: #f7f8fa;
    border: 1px solid #eceef2;
    border-radius: 10px;
}

.sp-legend b {
    display: block;
    margin-bottom: 4px;
    color: #2f3542;
}

.sp-legend span {
    display: block;
}

.sp-legend i {
    display: inline-block;
    width: 22px;
    height: 0;
    margin-right: 8px;
    vertical-align: middle;
    border-top-width: 2px;
    border-top-style: solid;
}

.sp-legend-h { border-top-color: #00d6be; }

.sp-legend-e {
    border-top-style: dashed !important;
    border-top-color: #0f9d6a;
}

/* 合规自检清单 */
.sp-check-summary {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
}

.sp-check-summary.is-ok { color: #17a673; }

.sp-check-summary.is-warn { color: #d9822b; }

.sp-checks {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sp-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed #eceef2;
    font-size: 13.5px;
}

.sp-check:last-child { border-bottom: 0; }

.sp-check-mark {
    flex: 0 0 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-style: normal;
    font-weight: 700;
    color: #fff;
    background: #b7bcc6;
    border-radius: 50%;
}

.sp-check.is-pass .sp-check-mark { background: #17a673; }

.sp-check.is-warn .sp-check-mark { background: #e8a33d; }

.sp-check.is-fail .sp-check-mark { background: #d9534f; }

.sp-check b {
    display: block;
    color: #2f3542;
}

.sp-check span {
    display: block;
    margin-top: 2px;
    font-size: 12.5px;
    color: #8b8f99;
}

.sp-check.is-pass span { display: none; }


/* ---------- 左主内容 + 右栏（引言 / FAQ / 将来的广告位） ---------- */

/*
 * 页面从「整宽一列」改成「左主内容 + 右栏」：
 * 引言与 FAQ 搬到右栏，右栏下面留空给广告；主内容顶部是该页的大标题。
 * 主内容列宽仍是 720px（跟原来一致），只是外面多了 300px 的右栏。
 */
.sp-page.has-aside {
    max-width: 1060px;
    display: grid;
    /* 窄窗口（≥700px）也保持两列，右栏先收窄到 240px —— 否则 700~900px 这段会堆成一列，
       在侧栏那种宽度的窗口里看起来就像"右栏跟着页面滚"，其实是根本没有右栏 */
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
    align-items: start;
}

/* 宽屏再把右栏放宽到 300px */
@media (min-width: 1000px) {
    .sp-page.has-aside {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 24px;
    }
}


.sp-main { min-width: 0; }

.sp-aside {
    min-width: 0;
    /* 右栏里有多张卡片（引言 / FAQ / 将来的广告位），用 flex + gap 统一留出间隔；
       之前用 margin-bottom 会被 .sp-intro 的 margin:0 覆盖掉，两张卡贴在一起 */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/*
 * 右栏跟随页面正常滚动，不做 sticky 钉住。
 * 之前用过 position: sticky + max-height 让右栏在视口里钉住，但用户反馈
 * 这样右栏看起来像"漂浮"在页面上、和左边主内容不同步，所以去掉钉住，
 * 让整个页面（主内容 + 右栏）一起正常滚动。
 */


/* 引言卡：与主内容卡片同一套外观；不要左边那条竖条（layui 的 quote 自带一条
   5px 的左边框，这里一并去掉），改成给整块加一层淡绿底色 */
.sp-aside .sp-intro {
    margin: 0;
    padding: 16px 15px;
    background: #eef8f3;
    border: 1px solid #c3e3d5;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
    font-size: 13.5px;
    line-height: 1.9;
    color: #40514a;
}

/* 右栏窄，FAQ 的字号与间距收一点 */
.sp-aside .sp-help { margin: 0; }

.sp-aside .sp-help dt { font-size: 13.5px; }

.sp-aside .sp-help dd {
    margin: 4px 0 12px;
    font-size: 13px;
    line-height: 1.8;
}

/* 右栏里的 FAQ 折叠面板（原生 <details>，不用 JS；样式参考 calc.qtool.io 的 FAQ） */
.sp-faq { border-bottom: 1px dashed #eceef2; }

.sp-faq:last-of-type { border-bottom: 0; }

.sp-faq > summary {
    position: relative;
    padding: 10px 22px 10px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: #2f3542;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}

.sp-faq > summary::-webkit-details-marker { display: none; }

.sp-faq > summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    font-size: 16px;
    line-height: 1;
    color: #0f9d6a;
    transition: transform .2s;
}

.sp-faq[open] > summary::after { transform: translateY(-50%) rotate(45deg); }

.sp-faq-a {
    padding: 0 4px 10px 0;
    font-size: 13px;
    line-height: 1.8;
    color: #8b8f99;
}

/* 页面主标题：带圆角边框的卡片，和下面的步骤卡同一套外观 */
.sp-title {
    margin: 0 0 14px;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .04);
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -.2px;
    color: #142e26;
}

/* 窄屏堆成一列：主内容在前、右栏在后 */
@media (max-width: 699px) {
    .sp-page.has-aside {
        max-width: 720px;
        grid-template-columns: minmax(0, 1fr);
    }

    .sp-title { font-size: 18px; }

}


/* ---------- 绿色主题的兜底覆盖 ---------- */

/* layui 的主按钮是紫色的（.layui-bg-purple 写死了 !important），
   整站换绿色系后必须在这里压回去，页面上就不用逐个改类名 */
.layui-bg-purple {
    background-color: #0f9d6a !important;
    color: #fff !important;
}

.layui-bg-purple:hover {
    background-color: #0b7f56 !important;
}

/* 主按钮的按下态 */
.layui-btn:active {
    opacity: .9;
}

/* 引言默认样式里那条左边框（layui quote 自带）整站去掉，保持卡片干净 */
.sp-intro {
    border-left: 0;
}

/* 700~999px：右栏只有 240px，文字会多折几行、把右栏顶高 ——
    把卡片内边距与行距收一点，让右栏不至于太高 */
@media (max-width: 999px) {
    .sp-aside .sp-intro {
        padding: 14px 12px;
        font-size: 12.5px;
        line-height: 1.75;
    }

    .sp-aside .sp-help { padding: 15px 13px; }

    .sp-faq > summary { font-size: 13px; }
}

/* =========================================================================
   换底色：导出设置面板 + 透明底棋格
   ========================================================================= */

.sp-export {
    margin-top: 14px;
    padding: 14px;
    background: #f7f8fa;
    border-radius: 10px;
}

.sp-export-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13.5px;
    color: #333;
}

.sp-export-row input[type="range"] { flex: 1; }

.sp-export-row select {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
}

.sp-export-actual {
    color: #1e8e3e;
    font-weight: 600;
}

.sp-chip-alpha {
    background-image: repeating-conic-gradient(#d5d5d5 0% 25%, #fff 0% 50%);
    background-size: 12px 12px;
}

/* =========================================================================
   排版附加选项：白边 / 裁切角标
   ========================================================================= */

.sp-extra-opts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 13.5px;
    color: #333;
}

.sp-inline-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sp-inline-opt select {
    padding: 3px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
}

.sp-matting-opt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 12px 0 4px;
    font-size: 13.5px;
    color: #333;
}
.sp-matting-opt .sp-label-inline {
    font-weight: 600;
    margin-right: 2px;
}
.sp-matting-opt .sp-hint {
    flex-basis: 100%;
    margin: 2px 0 0;
    color: #888;
    font-size: 12.5px;
}

/* =========================================================================
   首页「证件照制作」：左＝照片编辑区，右＝设置面板
   （参照 phototools 的证件照制作页：颜色与参数在右，照片在左）

   放在文件末尾是必须的 —— .sp-page.has-aside 的基础规则在前面，
   覆盖规则放前面会被它盖掉，白改。
   ========================================================================= */

.sp-page.has-aside.sp-maker {
    max-width: 1240px;
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "main aside" "help aside";
    gap: 22px;
}
.sp-page.has-aside.sp-maker .sp-main { grid-area: main; }
.sp-page.has-aside.sp-maker .sp-aside { grid-area: aside; }
.sp-page.has-aside.sp-maker .sp-help { grid-area: help; }
/* 首页左列下方的三块（使用说明 / 常见问题 / 各国护照照片）包在这个容器里，
   容器占 help 区，内部三块自然纵向排列 */
.sp-page.has-aside.sp-maker .sp-help-wrap { grid-area: help; }

@media (min-width: 1000px) {
    .sp-page.has-aside.sp-maker {
        grid-template-columns: minmax(0, 1fr) 400px;
    }
}

/* ---------- 换底色页（sp-editor）：使用说明已放进左列，网格只留 main + aside ----------
   原来「使用说明」挂在 help 网格区，而右列控件比编辑区高得多，网格把多余高度摊给了
   这一行 —— 使用说明和编辑区之间就空出一大段。现在说明跟着编辑区排，间距恢复正常。 */
.sp-page.has-aside.sp-editor {
    grid-template-areas: "main aside";
    align-content: start;
}

@media (max-width: 999px) {
    /* 窄屏：标题 → 编辑区 → 设置 → 使用说明（说明仍排最后，不挡操作） */
    .sp-page.has-aside.sp-editor {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 720px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "aside";
    }
    .sp-page.has-aside.sp-editor .sp-main { display: contents; }
    /* flex 子项默认不收缩到内容以下，会横向溢出 —— 显式允许收缩并占满整行 */
    .sp-page.has-aside.sp-editor .sp-title,
    .sp-page.has-aside.sp-editor .sp-stage-card,
    .sp-page.has-aside.sp-editor .sp-aside,
    .sp-page.has-aside.sp-editor .sp-help {
        min-width: 0;
        width: 100%;
        /* 这些块自带内边距，默认 content-box 下 width:100% 会把内边距再加一遍 → 窄屏横向溢出 */
        box-sizing: border-box;
    }
    .sp-page.has-aside.sp-editor .sp-title { order: 1; }
    .sp-page.has-aside.sp-editor .sp-stage-card { order: 2; }
    .sp-page.has-aside.sp-editor .sp-aside { order: 3; }
    .sp-page.has-aside.sp-editor .sp-help { order: 4; }
}

@media (max-width: 999px) {
    /* 窄屏堆成一列：编辑区在上、设置在下，使用说明排在整个页面最下面 */
    .sp-page.has-aside.sp-maker {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "aside" "help";
        max-width: 720px;
    }
}

/* 排版页：只加宽，不改网格结构（右侧栏保持 has-aside 的 240/300px） */
.sp-page.has-aside.sp-wide {
    max-width: 1240px;
}

@media (max-width: 699px) {
    .sp-page.has-aside.sp-wide {
        max-width: 720px;
    }
}

.sp-stage-card {
    display: flex;
    flex-direction: column;
}

.sp-stage-head {
    margin-bottom: 12px;
}

.sp-stage-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    border-radius: 10px;
    background: #f2f3f5;
    padding: 12px;
}

.sp-stage-empty {
    margin: 0;
    color: #8a8f99;
    font-size: 14.5px;
    line-height: 1.9;
    text-align: center;
    max-width: 320px;
}

/* 编辑区顶部的「这是示例照片」提示（首页默认照片） */
.sp-stage-note {
    margin: 0 0 12px;
    padding: 8px 14px;
    border-radius: 8px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #8a6a00;
    font-size: 13.5px;
    line-height: 1.7;
    text-align: center;
    max-width: 560px;
}

/* 舞台里的画布铺满可用宽度，别溢出 */
.sp-stage-wrap .sp-compare {
    width: 100%;
    margin: 0;
}

.sp-stage-wrap .sp-compare canvas {
    max-width: 100%;
    height: auto;
}

.sp-stage-wrap .sp-retouch {
    width: 100%;
    /* 面板自带左右内边距：默认 content-box 下 width:100% 会再撑出 28px，右侧溢出 */
    box-sizing: border-box;
    margin-top: 12px;
}

/* 右栏设置面板：卡片之间收紧一点 */
.sp-controls .sp-card {
    margin-bottom: 0;
}

.sp-controls .sp-step {
    margin-bottom: 10px;
}

/* ---------- 首页「证件照制作」：按规格裁好的预览 + 微调 ---------- */

/* 大标题卡片里的 h1：卡片已经有边距了，这里不再套一层卡 */
.sp-stage-head .sp-title {
    margin: 0 0 12px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    font-size: 19px;
    line-height: 1.45;
    /* 换成品牌绿，跟页面里的绿色强调色（步骤徽标、规格信息、链接）统一 ——
       原来是接近黑的墨绿 #142e26，看着偏闷；想更沉一点可换成 #0b7a56 */
    color: #0f9d6a;
}

/* 「示例」小标签 */
.sp-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #8a6a00;
    font-size: 12px;
    font-weight: 600;
    vertical-align: 2px;
}

/* 裁切预览 + 标尺：2×2 网格（左上角 mm 单位块 / 上标尺 / 左标尺 / 照片） */
.sp-shot {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    grid-template-rows: 20px auto;
    width: 100%;
    max-width: 484px;
    margin: 0 auto;
    direction: ltr;              /* 标尺是数字刻度，别被 RTL 镜像 */
}

/* 左上角那格：只写单位，不画刻度 */
.sp-ruler-unit {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f9;
    box-shadow: inset 0 0 0 1px #e6e8ee;
    border-top-left-radius: 8px;
    font-size: 9px;
    color: #8a8f99;
}

/*
 * 标尺画布：底色和描边交给 CSS，刻度由 JS 画。
 * 描边用 inset box-shadow 而不是 border —— border 会占宽度，
 * 尺子就比照片宽 2px、刻度跟照片对不齐了。
 * 也不写 width/height，让网格拉伸填满整列/整行，尺寸天然与照片一致。
 */
.sp-ruler {
    background: #fafbfc;
    box-shadow: inset 0 0 0 1px #e6e8ee;
}

.sp-ruler-h {
    grid-column: 2;
    grid-row: 1;
}

.sp-ruler-v {
    grid-column: 1;
    grid-row: 2;
}

/* 照片 + 裁剪框：画布显示整张原图（不再预先裁好），裁剪框浮在上面 */
.sp-shot-canvas {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 8px 0;
    background: #fff;
    line-height: 0;
}

.sp-shot-canvas > #makerPreview {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    touch-action: none;
}

/* 裁剪框：0 0 0 1px 那条白描边是框线，9999px 那条把框外压暗 */
.sp-crop-box {
    position: absolute;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .92), 0 0 0 9999px rgba(20, 46, 38, .38);
    cursor: move;
    touch-action: none;
}

.sp-crop-box[hidden] { display: none; }

/* 四角把手 */
.sp-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #0f9d6a;
    border-radius: 3px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.sp-handle-nw { left: -7px; top: -7px; cursor: nwse-resize; }
.sp-handle-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.sp-handle-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.sp-handle-se { right: -7px; bottom: -7px; cursor: nwse-resize; }

/* 头顶 / 眼位 / 肩部辅助线：虚线，位置按裁剪框高度的百分比。
   注意类名不能叫 .sp-guide —— 站内已有同名类（裁剪页的肩线控件，带深色底），
   撞上之后这些线会继承那个深色背景，渲染成一条条粗黑条。 */
.sp-crop-guide {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    padding: 0;
    background: none;
    border-top: 1px dashed rgba(255, 214, 0, .95);
    pointer-events: none;
}

.sp-crop-guide-top { top: 6%; }
.sp-crop-guide-eye { top: 40%; }
.sp-crop-guide-shoulder { top: 86%; }

/* 竖虚线：居中一条（横向三条之外），用来对准人中 / 鼻梁 */
.sp-crop-guide-center {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    width: 0;
    height: auto;
    border-top: 0;
    border-left: 1px dashed rgba(255, 214, 0, .95);
}

/* 取消勾选就收起来 */
.sp-guides-off .sp-crop-guide { display: none; }

/* 「显示头顶、眼位与肩部辅助线」勾选框 */
.sp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 8px;
    color: #555;
    font-size: 13.5px;
    cursor: pointer;
}

.sp-check input { accent-color: #0f9d6a; }
.sp-shot-hint { margin: 12px 0 0; text-align: center; }

/* 首页：微调人像 / 美颜微修并入编辑区（不做独立序号步骤），上面一条分隔线。
   宽度铺满卡片 —— 之前跟预览同宽(484)，标签会被挤到换行 */
.sp-tune-box {
    width: 100%;
    max-width: none;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #eef0f4;
}

/* 编辑区里的二级小标题：不带序号徽标 */
.sp-substep {
    margin: 0 0 10px;
    font-size: 14.5px;
    font-weight: 700;
    color: #142e26;
    letter-spacing: -.1px;
}

/* 规格信息行：名称 · 毫米 · 像素 */
.sp-specinfo {
    margin: 8px 0 0;
    color: #0f9d6a;
    font-weight: 600;
}

/* ---------- 首页「证件照制作」：自定义尺寸输入区 ---------- */
.sp-custom-size {
    margin: 10px 0 0;
}
.sp-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-custom-row + .sp-custom-row {
    margin-top: 8px;
}
.sp-custom-lbl {
    flex: 0 0 auto;
    min-width: 34px;
    font-size: 13px;
    color: #6b7280;
}
.sp-select-sm {
    padding: 6px 8px;
    font-size: 13px;
    color: #2f3542;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 6px;
    box-sizing: border-box;
}
.sp-select-sm:focus {
    outline: none;
    border-color: #0f9d6a;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .15);
}
.sp-input-sm {
    width: 62px;
    padding: 6px 6px;
    font-size: 13px;
    text-align: center;
    color: #2f3542;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 6px;
    box-sizing: border-box;
}
.sp-input-sm:focus {
    outline: none;
    border-color: #0f9d6a;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .15);
}
.sp-custom-x {
    color: #9aa0ab;
    font-weight: 600;
}
.sp-custom-unit {
    font-size: 12px;
    color: #9aa0ab;
}
.sp-custom-err {
    margin: 8px 0 0;
    padding-left: 42px;
    color: #d63b33;
    font-size: 12.5px;
}

/* 微调人像：人像大小 / 左右取景 / 上下取景 */
.sp-tune { margin: 4px 0 2px; }

.sp-tune-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    color: #555;
    font-size: 13.5px;
}

.sp-tune-row > span:first-child {
    /* 按内容宽度、不换行：英文/法文标签（Portrait size / Lissage de la peau）
       在固定 62px 里会被挤成两行。min-width 让各行滑杆起点大致对齐 */
    flex: 0 0 auto;
    min-width: 104px;
    white-space: nowrap;
    color: #2f3542;
}

.sp-tune-row input[type="range"] {
    flex: 1;
    min-width: 0;
    accent-color: #0f9d6a;
    direction: ltr;          /* 数值与滑块同向：右端恒为最大值 */
}

.sp-tune-val {
    flex: 0 0 44px;
    text-align: right;
    color: #8a8f99;
    font-variant-numeric: tabular-nums;
}
/* 说明段的小标题：每个页面的引言前面那行「使用说明」 */
.sp-intro-title {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #142e26;
}

/* 「How to use」块：导语 + 要点列表（粗体小标题 — 说明） */
.sp-intro-lead {
    margin: 0 0 8px;
}

.sp-howto {
    margin: 0;
    /* 全站把 li 的 list-style 重置掉了，这里显式写回圆点 */
    list-style: disc;
    padding-inline-start: 18px;
}

.sp-howto li {
    /* 全站某条规则把 li 的 list-style 设成 none 了（它比 ul 的继承值优先级高），
       所以 li 这里也要显式写回圆点，否则只缩进不显示圆点 */
    list-style: disc outside;
    margin: 5px 0;
    line-height: 1.65;
}

.sp-howto li:last-child {
    margin-bottom: 0;
}

.sp-howto li b {
    color: #142e26;
    font-weight: 700;
}

/* 「How to use」前面加个小灯泡图标（纯 SVG，跟随品牌绿，
   ::before 一处搞定，所有页面的 How to use 标题都会带上） */
.sp-intro-title::before,
.sp-eyebrow::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%230f9d6a'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%2018h6M10%2022h4M12%202a7%207%200%200%200-4%2012.7V17h8v-2.3A7%207%200%200%200%2012%202z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ---------- 人事（人力资源）照片采集页 ---------- */

/* 标准速览小格 */
.sp-std-chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.sp-std-chips li {
    list-style: none;
    padding: 9px 12px;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
}

.sp-std-chips b {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #0d6a8c;
}

.sp-std-chips span {
    font-size: 12px;
    color: #8a8f99;
}

/* 步骤标题后的小注 */
.sp-step-note {
    margin-left: 8px;
    font-size: 12.5px;
    font-weight: 400;
    color: #8a8f99;
}

/* 右侧设置里的分步小标题（2~5 步共用一张卡） */
.sp-step-sub {
    margin-top: 16px;
}

/* 人事照片页：编辑区 + 设置 两列。整页共用一个容器宽度，
   标题 / 标准速览 / 编辑区都在左列，上下同宽、左右对齐。 */
.sp-page.has-aside.sp-hr {
    max-width: 1120px;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
}

@media (max-width: 899px) {
    .sp-page.has-aside.sp-hr {
        max-width: 720px;
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 左右两列的首个卡片不要额外顶边距，跟标题列对齐 */
.sp-page.has-aside.sp-hr .sp-main > .sp-card:first-of-type {
    margin-top: 4px;
}

.sp-std-note {
    margin-bottom: 14px;
}

/* 背景底色选择（蓝白渐变 = 标准；纯白/纯蓝 = 备用） */
.sp-bg-opts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.sp-bg-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    font-size: 13.5px;
    color: #2f3542;
    cursor: pointer;
}

.sp-bg-opt:has(input:checked) {
    border-color: #0f9d6a;
    box-shadow: 0 0 0 2px rgba(15, 157, 106, .12);
}

.sp-bg-opt input {
    margin: 0;
    flex: 0 0 auto;
}

.sp-bg-swatch.is-white { background: #ffffff; }
.sp-bg-swatch.is-blue { background: #3492C4; }

.sp-bg-tag.is-alt {
    color: #8a8f99;
    background: #f1f2f5;
}

/* 「智能抠图」开关：跟底色选项拉开一点间距 */
.sp-smart-row {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e6e9ef;
}

/* 右侧「背景渐变底色」已按标准选中的展示 */
.sp-bg-picked {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    font-size: 13.5px;
    color: #2f3542;
}

.sp-bg-swatch {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid #e2e6ec;
    background: linear-gradient(180deg, #3492C4 0%, #3492C4 55%, #ffffff 100%);
}

.sp-bg-name {
    flex: 1 1 auto;
    font-weight: 600;
}

.sp-bg-tag {
    flex: 0 0 auto;
    padding: 2px 6px;
    font-size: 11.5px;
    color: #0f9d6a;
    background: #eaf7f1;
    border-radius: 5px;
}

/* 取景滑杆行 */
.sp-rows {
    margin-top: 12px;
}

.sp-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 8px 0;
}

.sp-slider-row .sp-custom-lbl {
    flex: 0 0 auto;
    min-width: 44px;
    font-size: 13.5px;
    color: #606266;
    white-space: nowrap;
}

.sp-slider-row input[type="range"] {
    flex: 1 1 auto;
    margin: 0;
}

/* ---------- 裁剪页 · 倾斜校正行 ---------- */
.sp-tilt-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 10px 0 2px;
}
.sp-tilt-row input[type="range"] {
    flex: 1 1 auto;
    min-width: 80px;
    margin: 0;
    accent-color: #0f9d6a;
}
.sp-tilt-val {
    flex: 0 0 auto;
    min-width: 48px;
    text-align: right;
    font-size: 13px;
    color: #606266;
    font-variant-numeric: tabular-nums;
}
.sp-tilt-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    font-size: 13px;
    line-height: 1.7;
    color: #3a4150;
    background: #fff;
    border: 1px solid #d7dbe3;
    border-radius: 6px;
    cursor: pointer;
}
.sp-tilt-btn:hover {
    border-color: #0f9d6a;
    color: #0f9d6a;
}

/* 照片采集质量标准页（旧类名保留兼容） */
.sp-lead {
    margin: 0 0 16px;
    color: #4a4f57;
    line-height: 1.8;
}

.sp-std-list {
    margin: 0;
    padding-inline-start: 22px;
    list-style: decimal outside;
}

.sp-std-list > li {
    /* 同 .sp-howto：全站把 li 的 list-style 重置掉了，这里也要显式写回 */
    list-style: decimal outside;
    margin: 12px 0;
    line-height: 1.9;
    color: #3a3f47;
}

.sp-std-list > li > b {
    display: block;
    margin-bottom: 3px;
    color: #142e26;
}

/* 关键数值：跟原始文档的黄色高亮呼应 */
.sp-std-list em {
    font-style: normal;
    font-weight: 700;
    color: #8a6d00;
    background: #fff6cf;
    padding: 0 3px;
    border-radius: 3px;
}

.sp-std-fig svg {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 4px auto 8px;
}

.sp-std-fig .sp-hint {
    text-align: center;
}
/* ---------- 首页左侧下方的「使用说明」区块（参照目标站：标签 + 标题 + 什么时候用 + 步骤） ---------- */

.sp-eyebrow {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef8f3;
    border: 1px solid #c3e3d5;
    color: #0f7a55;
    font-size: 12px;
    font-weight: 700;
}

.sp-help-title {
    margin: 10px 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #142e26;
    letter-spacing: -.2px;
}

.sp-help-lead {
    margin: 0 0 16px;
    color: #4a5751;
    font-size: 14px;
    line-height: 1.9;
}

.sp-help-steps {
    padding-top: 14px;
    border-top: 1px solid #eef0f4;
}

.sp-help-sub {
    margin: 10px 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #142e26;
}

.sp-help-steps ol {
    margin: 0;
    padding-inline-start: 20px;   /* RTL 下自动落到右边 */
    list-style: decimal outside;  /* 站内有把 li 设成 list-style:none 的规则，这里显式写回来 */
    color: #4a5751;
    font-size: 14px;
    line-height: 1.9;
}

.sp-help-steps li {
    list-style: decimal outside;
    margin-bottom: 6px;
}
.sp-help-steps li:last-child { margin-bottom: 0; }
/* ---------- 美颜微修 + 内联的「用示例照片试一下」 ---------- */

/* 内联在隐私提示那句后面 —— 就是句子里的一段绿字，不是按钮、也不加下划线 */
.sp-inline-link {
    margin-inline-start: 6px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0f9d6a;
    text-decoration: none;
    cursor: pointer;
}

.sp-inline-link:hover { color: #0b7f56; }

/* 微修那张卡片里的两个按钮 */
.sp-beauty-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
}

#spotToggle.is-on {
    background-color: #0f9d6a !important;
    border-color: #0f9d6a !important;
    color: #fff !important;
}

/* 去斑模式下，照片上的鼠标变成十字准星 */
.sp-shot.is-spot #makerPreview,
.sp-shot.is-spot .sp-crop-box { cursor: crosshair; }

.sp-spot-hint { margin: 8px 0 0; }
/* 透明底：给预览垫一层棋盘格，一眼看出「这里没有背景」 */
.sp-shot.is-alpha .sp-shot-canvas {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e2e6ec 25%, transparent 25%, transparent 75%, #e2e6ec 75%),
        linear-gradient(45deg, #e2e6ec 25%, transparent 25%, transparent 75%, #e2e6ec 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}
/* 微调 / 微修里的「标签 + 单选组」一行：单选组沿用站内 .sp-radio-group，只把尺寸收小 */
.sp-tune-field { margin-bottom: 10px; }

.sp-tune-label {
    display: block;
    margin-bottom: 6px;
    color: #2f3542;
    font-size: 13.5px;
}

.sp-tune-field .sp-radio-group { gap: 6px; }

.sp-tune-field .sp-radio {
    flex: 1 1 60px;
    min-height: 38px;
    padding: 0 6px;
    font-size: 13px;
    gap: 4px;
}

.sp-tune-field .sp-radio input { width: 14px; height: 14px; }
/* 桌面端：页脚三列保持各自的网格列位置不变，但列内文字统一左对齐。
   （曾用 text-align:right 让每列贴住自己那格的右边，结果是每列文字都飘到自己格的右侧、
   列与列之间忽远忽近；改成左对齐后每列从自己格的左边缘起排，读起来更整齐。） */
@media (min-width: 769px) {
    .footer-col {
        text-align: left;
    }
}
/* ---------- 「制作完成」结果区：按钮换蓝色系，跟前面几步的绿色操作区分开 ---------- */

/* 主按钮「下载照片」用的是 .layui-bg-purple → 实心蓝 */
#resultActions .layui-bg-purple {
    background-color: #2f6fd0 !important;
    border-color: #2f6fd0 !important;
    color: #fff !important;
}

#resultActions .layui-bg-purple:hover {
    background-color: #245bb0 !important;
    border-color: #245bb0 !important;
}

/* 其余动作（拿去排版 / 去裁剪 / 换一张照片）保持原来的「描边」观感，只换成蓝色系 */
#resultActions .layui-btn:not(.layui-bg-purple) {
    background-color: #fff !important;
    border: 1px solid #b9cdea !important;
    color: #2f6fd0 !important;
}

#resultActions .layui-btn:not(.layui-bg-purple):hover {
    background-color: #f2f7ff !important;
    border-color: #8fb2e0 !important;
    color: #245bb0 !important;
}

/* 禁用态（选透明底时「拿去排版/去裁剪」不可用）要一眼看出是灰的 */
#resultActions .layui-btn-disabled,
#resultActions .layui-btn[disabled] {
    background-color: #c9ced8 !important;
    border-color: #c9ced8 !important;
    color: #fff !important;
    cursor: not-allowed !important;
}

/* 「使用默认颜色」的色块：斜向渐变 + 一个淡淡的人像剪影，表示「保留原背景」 */
.sp-chip-original {
    position: relative;
    background: linear-gradient(135deg, #dfe7f2 0%, #c2cfe2 55%, #93a9c8 100%);
}

.sp-chip-original::after {
    content: "";
    position: absolute;
    left: 26%;
    right: 26%;
    top: 24%;
    bottom: 24%;
    border-radius: 50% 50% 42% 42%;
    background: rgba(255, 255, 255, .55);
}
/* 首页上传区的「用摄像头拍」：一个小虚框块，紧跟在「选择照片」下面。
   按钮与说明同一行、说明在右边且不换行 */
.sp-camera-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px dashed #c9d2dd;
    border-radius: 8px;
    background: #fafbfc;
}

/* 没摄像头（按钮被 JS 藏起来）时整块也不显示，别露一个空虚框 */
.sp-camera-box:not(:has(#camBtn:not([hidden]))) { display: none; }

.sp-camera-box #camBtn { margin: 0; }

.sp-camera-note {
    flex: 1 1 auto;
    margin: 0;
    font-size: 12.5px;
    white-space: nowrap;
    color: #8a8f99;
}

.sp-camera-tip {
    flex: 1 1 100%;
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: #9aa3b2;
}

/* 打开取景时，视频面板单独占一整行 */
.sp-camera-box .sp-camera { flex: 1 1 100%; }
/* 「用摄像头拍」按钮：粉色，圆角与「选择照片」一致（7px，不做胶囊） */
#camBtn,
.sp-camera-box #camBtn {
    border-radius: 7px !important;
    background-color: #f06292 !important;
    border-color: #f06292 !important;
    color: #fff !important;
}

#camBtn:hover,
#camBtn:focus {
    background-color: #e2497c !important;
    border-color: #e2497c !important;
}
/* 「已按人脸自动取景」这行提示：粉色，跟摄像头按钮同一支色 */
#frameHint {
    color: #f06292;
}