/* ============================================
   站度网 · 图片超分放大 image-upscale
   依赖 public/vendor/life-calc/life-calc.css 提供的设计变量
   ============================================ */
#app .ups-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--card-bg);
    padding: 46px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
#app .ups-drop:hover,
#app .ups-drop.drag {
    border-color: var(--primary);
    background: var(--primary-light);
}
#app .ups-drop-inner { color: var(--text-secondary); }
#app .ups-drop-inner svg { color: var(--primary); margin-bottom: 12px; }
#app .ups-drop-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
#app .ups-drop-sub { font-size: 13px; margin: 0 0 14px; }

#app .ups-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
}
#app .ups-msg.err { background: var(--danger-bg); color: var(--danger); }
#app .ups-msg.ok { background: var(--success-bg); color: var(--success); }
#app .ups-msg.warn { background: var(--warning-bg); color: var(--warning); }

#app .ups-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}
#app .ups-pane { display: flex; flex-direction: column; gap: 18px; }

/* ---- 对比区 ---- */
#app .ups-compare {
    position: relative;
    width: 100%;
    max-height: 68vh;
    overflow: auto;
    border-radius: var(--radius);
    background:
        linear-gradient(45deg, #eeeeee 25%, transparent 25%, transparent 75%, #eeeeee 75%),
        linear-gradient(45deg, #eeeeee 25%, transparent 25%, transparent 75%, #eeeeee 75%);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
    background-color: #f8f8f8;
    border: 1px solid var(--border);
    user-select: none;
    touch-action: none;
}
#app .ups-inner {
    position: relative;
    width: 100%;
    line-height: 0;
}
#app .ups-compare img,
#app .ups-compare canvas {
    display: block;
    width: 100%;
    height: auto;
}
#app .ups-compare img#upsBefore {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    clip-path: inset(0 50% 0 0);
    pointer-events: none;
}
#app .ups-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
    cursor: ew-resize;
    transform: translateX(-1px);
}
#app .ups-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
#app .ups-tag {
    position: absolute;
    top: 10px;
    font-size: 12px;
    font-style: normal;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    line-height: 1.6;
    pointer-events: none;
}
#app .ups-tag-a { left: 10px; }
#app .ups-tag-b { right: 10px; }

#app .ups-viewbar {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}
#app .ups-zoom { width: auto; }
#app .ups-zoom button {
    padding: 6px 16px;
    font-size: 13px;
}
#app .ups-format button { padding: 7px 10px; font-size: 13px; }

#app .ups-hint {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 10px 0 0;
    text-align: center;
}

#app .ups-progress { margin-top: 12px; text-align: center; }
#app .ups-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
#app .ups-progress-bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width .15s linear;
}
#app .ups-progress span { font-size: 12.5px; color: var(--text-secondary); }

/* ---- 参数区 ---- */
#app .ups-chips { display: flex; gap: 8px; }
#app .ups-chip {
    flex: 1;
    padding: 9px 0;
    font-size: 14px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}
#app .ups-chip:hover { border-color: var(--primary); color: var(--primary); }
#app .ups-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

#app .ups-note {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    line-height: 1.7;
}

#app .ups-mode { margin-bottom: 8px; }
#app .ups-mode-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 10px 0 0;
    min-height: 54px;
}

#app .ups-slider { margin-bottom: 14px; }
#app .ups-slider:last-child { margin-bottom: 0; }
#app .ups-slider label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
#app .ups-slider label b { color: var(--primary); font-variant-numeric: tabular-nums; }
#app .ups-slider input[type="range"] { width: 100%; accent-color: var(--primary); }

#app .ups-actions { display: flex; flex-direction: column; gap: 8px; }
#app .ups-actions .btn { width: 100%; padding: 10px 12px; font-size: 14px; }
#app .ups-actions .btn svg { vertical-align: -2px; margin-right: 3px; }

#app .ups-stat {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    line-height: 1.7;
}

#app .ups-help { font-size: 14px; line-height: 1.85; color: var(--text-secondary); }
#app .ups-help p { margin: 0 0 10px; }
#app .ups-help p:last-child { margin-bottom: 0; }
#app .ups-help b { color: var(--text); }

@media (max-width: 900px) {
    #app .ups-body { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    #app .ups-drop { padding: 32px 14px; }
    #app .ups-chip { font-size: 13px; padding: 8px 0; }
}
