/* Free photo upscaler (/upscale/) */

.lp-up-demo { margin: 0 0 22px; }
.lp-up-demo-stage { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: var(--lp-panel); user-select: none; box-shadow: var(--lp-shadow-card); }
.lp-up-demo-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.lp-up-demo-stage .lp-up-range { touch-action: pan-y; }
.lp-up-demo figcaption { margin-top: 8px; color: var(--lp-sec); font-size: 13px; }

.lp-up-wrap { max-width: 920px; }
.lp-up-head h1 { margin-bottom: 10px; }
.lp-up-lede { font-size: 17px; line-height: 1.6; color: var(--lp-sec); margin: 0 0 26px; max-width: 640px; }

.lp-up-tool { background: var(--lp-surface); border: 1px solid var(--lp-line); border-radius: var(--lp-r-card); padding: 18px; box-shadow: var(--lp-shadow-card); }

.lp-up-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 24px; border: 2px dashed var(--lp-line-2); border-radius: 16px; background: var(--lp-panel) center / cover no-repeat; color: var(--lp-sec); text-align: center; cursor: pointer; position: relative; overflow: hidden; transition: border-color .15s, background-color .15s; }
.lp-up-drop:hover, .lp-up-drop.is-over { border-color: var(--lp-accent); background-color: var(--lp-accent-tint); }
.lp-up-drop strong { color: var(--lp-ink); font-size: 17px; }
.lp-up-drop-icon { font-size: 30px; line-height: 1; color: var(--lp-accent); }
.lp-up-drop.has-photo { min-height: 260px; }
.lp-up-drop.has-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.05) 60%); }
.lp-up-drop.has-photo > * { position: relative; color: #fff; }
.lp-up-drop.has-photo .lp-up-drop-icon { display: none; }
.lp-up-drop.has-photo { justify-content: flex-end; }

.lp-up-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 16px; }
.lp-up-group { display: flex; align-items: center; gap: 6px; }
.lp-up-label { font-size: 13px; font-weight: 700; color: var(--lp-muted); text-transform: uppercase; letter-spacing: .5px; margin-right: 4px; }
.lp-up-group label { position: relative; }
.lp-up-group input { position: absolute; opacity: 0; pointer-events: none; }
.lp-up-group label { display: inline-flex; padding: 8px 14px; border-radius: var(--lp-r-pill); background: var(--lp-chip); color: var(--lp-ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.lp-up-group label:has(input:checked) { background: var(--lp-ink); color: var(--lp-bg); }
.lp-up-group label:has(input:focus-visible) { outline: 2px solid var(--lp-accent); outline-offset: 2px; }
.lp-up-controls .lp-btn { margin-left: auto; padding: 12px 24px; font-size: 15px; }
.lp-up-controls .lp-btn:disabled { opacity: .45; cursor: not-allowed; }

.lp-up-status { min-height: 22px; margin: 14px 2px 0; color: var(--lp-sec); font-size: 14px; }
.lp-up-bar { height: 6px; border-radius: 6px; background: var(--lp-chip); overflow: hidden; margin-top: 8px; }
.lp-up-bar i { display: block; height: 100%; width: 0; background: var(--lp-accent); transition: width .2s; }

.lp-up-compare { margin-top: 18px; }
.lp-up-stage { position: relative; border-radius: 14px; overflow: hidden; background: var(--lp-panel); user-select: none; }
.lp-up-stage { height: 60vh; }
.lp-up-inner { position: absolute; inset: 0; transition: transform .25s ease; }
.lp-up-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
/* Zoomed: no slider, tap to move, hold the button to see the original. */
.lp-up-stage.is-zoom { cursor: zoom-in; }
.lp-up-stage.is-zoom .lp-up-range, .lp-up-stage.is-zoom .lp-up-handle, .lp-up-stage.is-zoom .lp-up-tag { display: none; }
.lp-up-stage.is-zoom .lp-up-before-clip { clip-path: inset(0 100% 0 0) !important; }
.lp-up-stage.is-zoom.show-before .lp-up-before-clip { clip-path: none !important; }
.lp-up-stage.is-zoom .lp-up-after { image-rendering: auto; }
.lp-up-stage.is-zoom .lp-up-before { image-rendering: auto; }
.lp-up-hold { display: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.lp-up-compare:has(.is-zoom) .lp-up-hold { display: inline-flex; }
.lp-up-before-clip { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.lp-up-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.lp-up-handle::after { content: "\2194"; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: #fff; color: #101012; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.lp-up-tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: var(--lp-r-pill); background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.lp-up-tag-l { left: 12px; }
.lp-up-tag-r { right: 12px; }
.lp-up-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }

.lp-up-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.lp-up-result span { color: var(--lp-sec); font-family: var(--lp-mono); font-size: 13px; margin-right: auto; }

.lp-up-info { margin-top: 40px; }

@media (max-width: 600px) {
	.lp-up-tool { padding: 12px; }
	.lp-up-drop { min-height: 180px; }
	.lp-up-controls .lp-btn { margin-left: 0; width: 100%; justify-content: center; }
}
