/* 由 frontend/pages/doubao.php 拆分而来，改样式改这里。 */
/* ================= 无印解析 · 横向横幅（.wm- 隔离） ================= */
/* 变量必须挂到 .wm-app / .modal-overlay / .toast 三者上：
   弹窗和 toast 是 .wm-app 的兄弟节点，若只写在 .wm-app 里，
   它们的 var(--wm-card) 会取不到值，整条 background 声明失效 → 弹窗变全透明 */
.wm-app,
.modal-overlay,
.toast{
    /* 主色跟随站点主题色，取不到时沿用橙色 */
    --wm-brand: var(--theme-color, #f4a31f);
    --wm-brand-rgb: var(--theme-color-rgb, 244, 163, 31);

    --wm-text: var(--main-color, #1b1b26);
    --wm-sub: var(--muted-color2, #5c5d6e);
    --wm-muted: var(--muted-color, #8a8b9a);
    --wm-line: var(--muted-bg-color, #e9eaf2);
    --wm-card: var(--main-bg-color, #fff);
    --wm-cell: var(--muted-bg-color-l, #f7f8fc);
    --wm-lime: #C8F56B;
    --wm-shadow: 0 18px 46px -24px rgba(38, 26, 92, .28);
    --wm-shadow-sm: 0 6px 18px -12px rgba(38, 26, 92, .28);

    /* 主题色派生的渐变（不支持 color-mix 时退回主题色纯色） */
    --wm-grad: linear-gradient(135deg, var(--wm-brand), var(--wm-brand));
    --wm-grad-side: linear-gradient(158deg, var(--wm-brand) 0%, var(--wm-brand) 100%);
}
.wm-app{
    max-width: 1320px;
    margin: 26px auto;
    padding: 0 16px;
    color: var(--wm-text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
@supports (color: color-mix(in srgb, red, blue)){
    .wm-app,
    .modal-overlay,
    .toast{
        --wm-grad: linear-gradient(135deg, color-mix(in srgb, var(--wm-brand) 70%, #fff), var(--wm-brand));
        --wm-grad-side: linear-gradient(158deg,
            color-mix(in srgb, var(--wm-brand) 68%, #fff) 0%,
            var(--wm-brand) 45%,
            color-mix(in srgb, var(--wm-brand) 82%, #000) 100%);
    }
}
.wm-app *,
.wm-app *::before,
.wm-app *::after{ box-sizing: border-box; }

/* ---------- 主卡 ---------- */
.wm-card{
    background: var(--wm-card);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--wm-line);
    box-shadow: var(--wm-shadow);
}

/* ---------- 顶部横幅 ---------- */
.wm-banner{
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 26px 30px;
    background: var(--wm-grad-side);
    color: #fff;
}
.wm-banner::before{
    content: "";
    position: absolute;
    right: -40px; bottom: -80px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.2), transparent 70%);
    pointer-events: none;
}
.wm-banner::after{
    content: "";
    position: absolute;
    left: -50px; top: -60px;
    width: 0; height: 0;
    border-right: 70px solid rgba(255,255,255,.10);
    border-bottom: 70px solid transparent;
    transform: rotate(14deg);
    pointer-events: none;
}
.wm-btxt{ position: relative; z-index: 1; min-width: 0; }
.wm-btxt h1{
    margin: 0;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: .6px;
    line-height: 1.3;
    text-shadow: 0 3px 12px rgba(90, 50, 0, .24);
}
.wm-btxt p{
    margin: 8px 0 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: rgba(255,255,255,.92);
}
.wm-sp{ flex: 1; }
.wm-art{
    position: relative; z-index: 1;
    flex: none;
    width: 190px; height: 96px;
}
.wm-art svg{ width: 100%; height: 100%; display: block; }

/* ---------- 主体 ---------- */
.wm-body{ padding: 20px 26px 24px; }

/* tab（分段控件风格） */
.tab-buttons{
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 11px;
    background: var(--wm-cell);
    margin-bottom: 14px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tab-buttons::-webkit-scrollbar{ display: none; }
.tab-btn{
    flex: 0 0 auto;
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--wm-sub);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s, color .18s, box-shadow .18s;
}
.tab-btn:hover{ color: var(--wm-text); }
.tab-btn.active{
    background: var(--wm-card);
    color: var(--wm-brand);
    box-shadow: 0 2px 8px -4px rgba(0,0,0,.28);
}
.io-black-mode .tab-btn.active{ color: var(--wm-brand); }

/* 输入行 */
.input-section{ display: flex; gap: 10px; margin-bottom: 10px; }
.url-input{
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--wm-line);
    border-radius: 12px;
    background: var(--wm-cell);
    color: var(--wm-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.url-input::placeholder{ color: var(--wm-muted); }
.url-input:focus{
    border-color: var(--wm-brand);
    background: var(--wm-card);
    box-shadow: 0 0 0 4px rgba(var(--wm-brand-rgb), .12);
}
.parse-btn{
    flex: none;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 12px;
    background: var(--wm-grad);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s, filter .18s, opacity .18s;
    box-shadow: 0 10px 22px -12px rgba(var(--wm-brand-rgb), .95);
}
.parse-btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.parse-btn:disabled{ opacity: .55; cursor: not-allowed; transform: none; }

/* 提示条 */
.platform-hint{
    padding: 9px 13px;
    border-radius: 10px;
    background: rgba(var(--wm-brand-rgb), .09);
    color: var(--wm-brand);
    font-size: 12.5px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.platform-hint a{
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
}
.io-black-mode .platform-hint{
    background: rgba(var(--wm-brand-rgb), .16);
    color: var(--wm-brand);
}

/* ---------- 结果区 ---------- */
#resultArea{ min-height: 180px; }

.result-count{
    display: block;
    text-align: left;
    color: var(--wm-sub);
    font-size: 12.5px;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px dashed var(--wm-line);
}

.loading{
    text-align: center;
    padding: 56px 20px;
    color: var(--wm-muted);
    font-size: 13px;
}
.loading::after{
    content: '';
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--wm-line);
    border-top-color: var(--wm-brand);
    border-radius: 50%;
    animation: wm-spin .8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes wm-spin{ to{ transform: rotate(360deg); } }

.empty-state{
    text-align: center;
    padding: 56px 20px;
    color: var(--wm-muted);
    font-size: 13px;
    line-height: 1.8;
}
.empty-state p{ margin: 0; }

.error-msg{
    background: rgba(207, 19, 34, .08);
    border: 1px solid rgba(207, 19, 34, .3);
    color: #cf1322;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}
.io-black-mode .error-msg{
    background: rgba(255, 77, 79, .12);
    border-color: rgba(255, 77, 79, .35);
    color: #ff7875;
}

/* 缩略图墙：卡片宽度统一，图片按自身比例等比缩小 —— 不裁切、不放大。
   原来列数跟着图片数量动态算（applyGridCols），只有 1 张图时列数退化成 1，
   图片撑满整个容器（实测 1194px）—— 这才是「不像缩略图」的原因。
   现在列数固定，与图片数量无关；卡片再套 max-width，列很宽时也不会被拉大。
   仍然用多列而不是 grid：多列是纵向堆叠，不同高度的图能紧贴上一张；
   grid 会把整行拉到最高，矮图下面留一大块空白。 */
.image-grid{
    /* 用列宽而不是列数：屏幕越宽列越多，列宽稳定在 200-240 之间，
       不会像固定 5 列那样在 2K 屏上把卡片拉到 350px 宽 */
    column-width: 200px;
    column-gap: 14px;
}
.image-card{
    background: var(--wm-card);
    border: 1px solid var(--wm-line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--wm-shadow-sm);
    transition: transform .3s, box-shadow .3s, background .3s;
    break-inside: avoid;
    page-break-inside: avoid;
    width: 100%;
    max-width: 240px;
    margin: 0 auto 14px;
}
.image-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -16px rgba(38, 26, 92, .38);
}
.image-thumb{
    position: relative;
    display: block;
    background: var(--wm-cell);
    overflow: hidden;
}
.image-card img{
    width: 100%;
    height: auto;            /* 高度跟着原始比例走：完整显示，不裁切 */
    display: block;
}

/* 分辨率角标：桌面端鼠标悬浮到图片上才浮出 */
.res-badge{
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.image-thumb:hover .res-badge{ opacity: 1; }

.image-actions{
    display: flex;
    padding: 10px;
    gap: 6px;
}
.image-actions button{
    flex: 1;
    padding: 8px 4px;
    border: 1px solid var(--wm-line);
    background: var(--wm-card);
    color: var(--wm-sub);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-family: inherit;
    transition: background .2s, border-color .2s, color .2s;
}
.image-actions button:hover{
    background: rgba(var(--wm-brand-rgb), .07);
    border-color: rgba(var(--wm-brand-rgb), .42);
    color: var(--wm-brand);
}

/* 视频卡 */
.video-card{
    background: var(--wm-card);
    border: 1px solid var(--wm-line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--wm-shadow-sm);
    transition: background .3s;
}
.video-wrapper{ position: relative; }
.video-card video{ width: 100%; display: block; }
.video-info{
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}
.video-actions{
    display: flex;
    padding: 12px;
    gap: 8px;
}
.video-actions button{
    flex: 1;
    padding: 10px;
    border: 1px solid var(--wm-line);
    background: var(--wm-card);
    color: var(--wm-sub);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    font-family: inherit;
    transition: background .2s, border-color .2s, color .2s;
}
.video-actions button:hover{
    background: rgba(var(--wm-brand-rgb), .07);
    border-color: rgba(var(--wm-brand-rgb), .42);
    color: var(--wm-brand);
}
.video-card + .video-card{ margin-top: 16px; }

/* 复制 / 下载的结果直接反馈在按钮上 */
.image-actions button.copied,
.image-actions button.downloaded,
.video-actions button.copied,
.video-actions button.downloaded{
    color: var(--wm-brand);
    border-color: var(--wm-brand);
}
.image-actions button.copy-failed,
.image-actions button.download-failed,
.video-actions button.copy-failed,
.video-actions button.download-failed{
    color: #cf1322;
    border-color: rgba(207, 19, 34, .3);
}
.io-black-mode .image-actions button.copy-failed,
.io-black-mode .image-actions button.download-failed,
.io-black-mode .video-actions button.copy-failed,
.io-black-mode .video-actions button.download-failed{
    color: #ff7875;
    border-color: rgba(255, 77, 79, .35);
}

/* ---------- 特性卡 + 步骤条 ---------- */
.wm-featwrap{
    margin-top: 16px;
    padding: 16px;
    border-radius: 20px;
    background: var(--wm-card);
    border: 1px solid var(--wm-line);
    box-shadow: var(--wm-shadow-sm);
}
.wm-feats{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.wm-feat{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
}
/* 第一张固定紫色，不跟随主题色 */
.wm-feat.p{ background: #F3EFFF; }
.wm-feat.g{ background: #EDFBF2; }
.wm-feat.b{ background: #EAF3FF; }
.wm-feat .fi{
    width: 38px; height: 38px;
    border-radius: 11px;
    flex: none;
    display: grid;
    place-items: center;
    color: #fff;
}
.wm-feat.p .fi{ background: linear-gradient(135deg, #7C4DF8, #5A2BE0); }
.wm-feat.g .fi{ background: linear-gradient(135deg, #34D399, #16A34A); }
.wm-feat.b .fi{ background: linear-gradient(135deg, #60A5FA, #2563EB); }
.wm-feat .fi svg{ width: 19px; height: 19px; }
.wm-feat h3{
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 800;
    color: var(--wm-text);
}
.wm-feat p{
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--wm-sub);
}
.wm-feat .fl{
    display: block;
    width: 24px; height: 3px;
    border-radius: 3px;
    margin-top: 8px;
}
.wm-feat.p .fl{ background: #6C3BF4; }
.wm-feat.g .fl{ background: #22C55E; }
.wm-feat.b .fl{ background: #3B82F6; }

.io-black-mode .wm-feat.p{ background: #2A2340; }
.io-black-mode .wm-feat.g{ background: #1E3329; }
.io-black-mode .wm-feat.b{ background: #1E2C42; }

/* 步骤条：胶囊节点 + 渐隐连线 */
.wm-steps{
    display: flex;
    align-items: center;
    margin-top: 14px;
    padding: 14px 4px 2px;
    border-top: 1px dashed var(--wm-line);
}
.wm-sh{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    color: var(--wm-text);
}
.wm-sh svg{ width: 18px; height: 18px; color: var(--wm-brand); }
.wm-sl{
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    margin-left: 24px;
}
.wm-step{
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--wm-sub);
}
.wm-step em{
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--wm-grad);
    color: #fff;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 4px rgba(var(--wm-brand-rgb), .13), 0 4px 10px -6px rgba(var(--wm-brand-rgb), .95);
}
.wm-line{
    flex: 1 1 40px;
    height: 2px;
    border-radius: 2px;
    margin: 0 16px;
    position: relative;
    background: linear-gradient(90deg, rgba(var(--wm-brand-rgb), .5), rgba(var(--wm-brand-rgb), .1));
}
.wm-line::after{
    content: "";
    position: absolute;
    right: -1px; top: 50%;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(var(--wm-brand-rgb), .35);
    transform: translateY(-50%);
}

/* ---------- 弹窗 / Toast ---------- */
.toast{
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--wm-text, #1b1b26);
    color: var(--wm-card, #fff);
    padding: 11px 26px;
    border-radius: 12px;
    font-size: 13.5px;
    opacity: 0;
    transition: all .3s;
    z-index: 9999;
}
.toast.show{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.modal-overlay{
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active{ display: flex; }
.modal-box{
    background: var(--wm-card, #fff);
    border: 1px solid var(--wm-line, #e9eaf2);
    border-radius: 18px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--wm-shadow, 0 18px 46px -24px rgba(38, 26, 92, .28));
}
.modal-close{
    position: absolute;
    z-index: 1;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border: none;
    background: var(--wm-cell, #f7f8fc);
    color: var(--wm-text, #1b1b26);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-body{ padding: 26px; }
.modal-body h3{
    font-size: 17px;
    font-weight: 800;
    color: var(--wm-text, #1b1b26);
    margin: 0 0 16px;
}
.modal-body ol{
    padding-left: 20px;
    color: var(--wm-sub, #5c5d6e);
    line-height: 2;
    font-size: 13.5px;
    margin: 0;
}

/* ---------- 输入行：剪贴板按钮 ---------- */
.url-wrap{ flex: 1; min-width: 0; position: relative; display: flex; }
.url-wrap .url-input{ flex: 1; min-width: 0; padding-right: 66px; }
.paste-btn{
    position: absolute; right: 6px; top: 50%;
    transform: translateY(-50%);
    height: 34px; padding: 0 12px;
    border: 0; border-radius: 8px;
    background: var(--wm-cell); color: var(--wm-sub);
    font-size: 12.5px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background .16s, color .16s;
    white-space: nowrap;
}
.paste-btn:hover{ background: rgba(var(--wm-brand-rgb), .13); color: var(--wm-brand); }
.io-black-mode .paste-btn:hover{ color: var(--wm-brand); }

/* ---------- 解析历史 ---------- */
.hist{ margin-bottom: 14px; }
.hist-hd{
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; font-weight: 700; color: var(--wm-muted);
    margin-bottom: 8px;
}
.hist-hd button{
    border: 0; background: none; color: var(--wm-muted);
    font-size: 12px; font-family: inherit; cursor: pointer;
    padding: 2px 4px; transition: color .16s;
}
.hist-hd button:hover{ color: #ef4444; }
.hist-list{ display: flex; gap: 7px; flex-wrap: wrap; }
.hist-item{
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 100%; height: 30px; padding: 0 11px;
    border: 1px solid var(--wm-line); border-radius: 8px;
    background: var(--wm-cell); color: var(--wm-sub);
    font-size: 12px; font-family: inherit; cursor: pointer;
    transition: border-color .16s, color .16s;
}
.hist-item:hover{ border-color: rgba(var(--wm-brand-rgb), .45); color: var(--wm-brand); }
.io-black-mode .hist-item:hover{ color: var(--wm-brand); }
.hist-item span{
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 190px;
}
.hist-item em{
    font-style: normal; font-size: 10.5px;
    color: var(--wm-muted); flex: none;
}

/* ---------- 结果工具条 ---------- */
.result-tools{
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px dashed var(--wm-line);
}
.rt-count{
    font-size: 12.5px; font-weight: 700; color: var(--wm-sub);
    margin-right: auto;
}
.rt-btn{
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; padding: 0 14px;
    border: 1px solid var(--wm-line); border-radius: 9px;
    background: var(--wm-card); color: var(--wm-sub);
    font-size: 12.5px; font-weight: 700; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    transition: border-color .16s, color .16s, background .16s;
}
.rt-btn:hover{ border-color: rgba(var(--wm-brand-rgb), .5); color: var(--wm-brand); }
.rt-btn:disabled{ opacity: .6; cursor: not-allowed; }
.rt-btn.primary{
    background: var(--wm-grad); border-color: transparent; color: #fff;
    box-shadow: 0 8px 18px -12px rgba(var(--wm-brand-rgb), .9);
}
.rt-btn.primary:hover{ color: #fff; filter: brightness(1.05); }
.rt-btn svg{ width: 14px; height: 14px; flex: none; }

/* ---------- 灯箱 ---------- */
.lightbox{
    position: fixed; inset: 0; z-index: 10020;
    display: none; align-items: center; justify-content: center;
    background: rgba(8, 10, 16, .93);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.lightbox.active{ display: flex; }
.lb-img{
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
    -webkit-user-select: none; user-select: none;
    -webkit-touch-callout: default;
}
.lb-btn{
    position: absolute;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .12); color: #fff;
    cursor: pointer; display: grid; place-items: center;
    transition: background .18s;
    -webkit-tap-highlight-color: transparent;
}
.lb-btn:hover{ background: rgba(255, 255, 255, .24); }
.lb-close{ top: 18px; right: 18px; width: 40px; height: 40px; font-size: 22px; line-height: 1; }
.lb-prev{ left: 18px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; }
.lb-next{ right: 18px; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; }
.lb-prev[disabled], .lb-next[disabled]{ opacity: .25; cursor: default; }
.lb-bar{
    position: absolute; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex; align-items: center; gap: 14px;
    padding: 8px 16px; border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    color: #fff; font-size: 12.5px; white-space: nowrap;
}
.lb-bar b{ font-weight: 700; }
.lb-dl{
    border: 0; border-radius: 8px; padding: 6px 14px;
    background: #fff; color: #1b1b26;
    font-size: 12px; font-weight: 700; font-family: inherit;
    cursor: pointer;
}
.lb-hint{
    position: absolute; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .6); font-size: 12px;
    display: none;
}

/* ---------- FAQ ---------- */
.wm-faq{
    margin-top: 20px; padding: 24px 26px;
    background: var(--wm-card); border: 1px solid var(--wm-line);
    border-radius: 18px;
}
.wm-faq h2{
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 800; color: var(--wm-text);
    margin: 0 0 6px;
}
.wm-faq h2::before{
    content: ""; width: 3px; height: 14px;
    border-radius: 2px; background: var(--wm-brand);
}
.wm-faq details{ border-top: 1px solid var(--wm-line); }
.wm-faq details:first-of-type{ border-top: 0; }
.wm-faq summary{
    list-style: none; position: relative;
    padding: 14px 30px 14px 0;
    font-size: 13.5px; font-weight: 700; color: var(--wm-text);
    line-height: 1.7; cursor: pointer;
}
.wm-faq summary::-webkit-details-marker{ display: none; }
.wm-faq summary::after{
    content: ""; position: absolute; right: 8px; top: 50%;
    width: 7px; height: 7px;
    border-right: 2px solid var(--wm-muted);
    border-bottom: 2px solid var(--wm-muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s;
}
.wm-faq details[open] summary::after{ transform: translateY(-30%) rotate(-135deg); }
.wm-faq .faq-a{
    padding: 0 0 16px;
    font-size: 13px; line-height: 1.9; color: var(--wm-sub);
}
.wm-faq .faq-a code{
    background: var(--wm-cell); border-radius: 4px;
    padding: 1px 5px; font-size: 12px;
}
.wm-faq .faq-a a{ color: var(--wm-brand); text-decoration: underline; cursor: pointer; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px){
    .wm-banner{ padding: 22px; gap: 14px; }
    .wm-btxt h1{ font-size: 22px; }
    .wm-btxt p{ font-size: 12.5px; }
    .wm-art{ width: 132px; height: 68px; }
    .wm-feats{ grid-template-columns: 1fr; }
}

@media (max-width: 680px){
    .wm-app{ margin: 16px auto; padding: 0 12px; }
    .wm-card{ border-radius: 18px; }
    .wm-banner{ padding: 18px; gap: 10px; }
    .wm-btxt h1{ font-size: 20px; letter-spacing: .3px; }
    .wm-btxt p{ font-size: 12px; line-height: 1.7; margin-top: 6px; }
    .wm-art{ display: none; }
    .wm-body{ padding: 16px 16px 18px; }
    .input-section{ flex-direction: column; }
    .parse-btn{ width: 100%; }
    .platform-hint{ font-size: 12px; }
    .wm-featwrap{ padding: 12px; border-radius: 16px; }
    .wm-feat{ padding: 13px 14px; gap: 10px; }
    .wm-feat .fi{ width: 34px; height: 34px; border-radius: 10px; }
    .wm-feat .fi svg{ width: 17px; height: 17px; }

    /* 步骤条：紧凑一行 */
    .wm-steps{ flex-direction: column; align-items: stretch; padding: 12px 0 2px; }
    .wm-sl{ margin-left: 0; margin-top: 10px; justify-content: space-between; gap: 4px; }
    .wm-step{ flex: 1 1 0; min-width: 0; justify-content: center; gap: 5px; font-size: 11.5px; }
    .wm-step em{ width: 18px; height: 18px; font-size: 10px; box-shadow: 0 0 0 3px rgba(var(--wm-brand-rgb), .13); }
    .wm-line{ flex: none; width: auto; height: auto; margin: 0; background: none; }
    .wm-line::after{ display: none; }
    .wm-line::before{ content: "›"; color: var(--wm-muted); font-size: 13px; line-height: 1; }

    /* 缩略图墙双列。列宽要重置成 auto，否则会继承上面的 column-width:200px，
       375px 宽撑不开两列 200px，最后只排出一列。 */
    .image-grid{ column-count: 2; column-width: auto; column-gap: 10px; }
    .image-card{ max-width: none; margin: 0 0 10px; border-radius: 12px; }
    .image-card:hover{ transform: none; }
    /* 手机上角标常显（桌面是 hover 才浮出）。缩略图变小后 12px 字号会占掉半张图，缩一档 */
    .res-badge{ opacity: 1; font-size: 10px; padding: 2px 6px; top: 6px; right: 6px; }

    .image-actions{ padding: 8px 6px; gap: 4px; }
    .image-actions button,
    .video-actions button{
        min-height: 42px;
        font-size: 12.5px;
        padding: 8px 2px;
    }
    .result-count{ font-size: 12px; }
    .loading, .empty-state{ padding: 40px 16px; }
    .modal-body{ padding: 18px; }

    /* 新增区块的窄屏适配 */
    .url-wrap{ width: 100%; }
    .result-tools{ gap: 7px; }
    .rt-count{ flex: 1 1 100%; margin: 0 0 2px; }
    .rt-btn{ flex: 1 1 auto; height: 36px; }
    .hist-item span{ max-width: 130px; }
    .wm-faq{ padding: 20px 18px; border-radius: 16px; }
    .wm-faq summary{ font-size: 13px; padding: 13px 26px 13px 0; }

    .lb-img{ max-width: calc(100vw - 20px); max-height: calc(100vh - 160px); }
    .lb-close{ top: 12px; right: 12px; width: 36px; height: 36px; font-size: 20px; }
    .lb-prev{ left: 8px; width: 38px; height: 38px; }
    .lb-next{ right: 8px; width: 38px; height: 38px; }
    .lb-bar{ bottom: 14px; gap: 10px; padding: 7px 12px; font-size: 12px; }
}
