/* Upscale image: the site's workspace layout, a light stage with zoom and a before/after divider, the controls in tidy blocks on the side */
.up-stage { padding: 0; background: #ecebe9; cursor: grab; overflow: hidden; touch-action: none; min-height: 240px; justify-self: center; max-width: 100%; }
.up-stage.is-panning { cursor: grabbing; }
.up-stage.is-split-hover { cursor: col-resize; }
.up-stage canvas { display: block; width: 100%; height: 100%; max-height: none; }

/* the divider between the plain enlargement and the result */
.up-split { position: absolute; top: 0; bottom: 0; width: 0; z-index: 1; pointer-events: none; }
.up-split::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(14, 8, 7, 0.25); }
.up-split-grip { position: absolute; top: 50%; left: -17px; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(14, 8, 7, 0.22), 0 0 0 1px rgba(14, 8, 7, 0.08); transform: translateY(-50%); }
.up-split-grip::before, .up-split-grip::after { content: ''; position: absolute; top: 50%; width: 6px; height: 6px; border: solid var(--ink); border-width: 2px 0 0 2px; transform: translateY(-50%) rotate(-45deg); }
.up-split-grip::before { left: 9px; }
.up-split-grip::after { right: 9px; transform: translateY(-50%) rotate(135deg); }
.up-split-tag { position: absolute; bottom: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(14, 8, 7, 0.72); color: #fff; font: 600 11px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.up-split-before { right: 10px; }
.up-split-after { left: 10px; }

/* floating bits on the stage: zoom, original, progress, hint */
.up-float { position: absolute; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(14, 8, 7, 0.14), 0 0 0 1px rgba(14, 8, 7, 0.06); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.up-float-zoom { left: 12px; }
.up-icon, .up-zoom-val { display: inline-flex; align-items: center; justify-content: center; height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 12.5px/1 var(--sans); cursor: pointer; transition: background var(--t-fast) var(--ease); }
.up-icon { width: 30px; padding: 0; }
.up-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.up-zoom-val { min-width: 54px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.up-icon:hover, .up-zoom-val:hover { background: rgba(14, 8, 7, 0.08); }
.up-float-right { right: 12px; }
.up-editor.is-done .up-float-right { display: inline-flex; }
.up-pill { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 12.5px/1 var(--sans); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.up-pill:hover { background: rgba(14, 8, 7, 0.08); }
.up-original.is-on, .up-original:active { background: var(--ink); color: #fff; }
.up-progress { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; gap: 7px; min-width: 240px; padding: 11px 14px; border-radius: 12px; background: rgba(14, 8, 7, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font: 500 13px/1.3 var(--sans); pointer-events: none; box-shadow: 0 10px 30px rgba(14, 8, 7, 0.25); }
.up-bar-track { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.up-bar-track i { display: block; height: 100%; width: 0; background: #fff; transition: width var(--t) var(--ease); }
.up-hint-float { position: absolute; left: 12px; bottom: 12px; z-index: 2; margin: 0; max-width: 70%; padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.85); color: var(--muted); font: 400 12px/1.4 var(--sans); pointer-events: none; transition: opacity var(--t-slow) var(--ease); }
.up-stage.is-busy .up-hint-float, .up-hint-float:empty, .up-editor.is-done .up-hint-float { opacity: 0; }

/* the side panel, in blocks */
.up-panel { display: grid; gap: 14px; align-content: start; }
.up-block { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.up-block h3 { margin: 0; font: 600 12px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.up-hint { margin: 0; font: 400 12.5px/1.45 var(--sans); color: var(--muted); }
.up-hint:empty { display: none; }
.up-engine, .up-scale { display: grid; grid-template-columns: 1fr 1fr; }
.up-check { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; cursor: pointer; }
.up-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); grid-row: span 2; }
.up-check span { font: 500 13.5px/1.3 var(--sans); }
.up-check small { font: 400 12px/1.4 var(--sans); color: var(--muted); }
.up-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.up-panel .btn { width: 100%; }
.up-editor:not(.is-done) .up-after { display: none; }
.up-link { padding: 0; border: 0; background: none; font: 600 12.5px/1 var(--sans); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* the Pro card: live in the app, a blurred preview behind a sign-in card on the site */
.up-pro-block { position: relative; overflow: hidden; }
.up-pro-inner { display: grid; gap: 8px; }
.up-pro-lede { margin: 0; font: 500 13.5px/1.4 var(--sans); }
.up-pro-list { margin: 0; padding-left: 18px; font: 400 12.5px/1.5 var(--sans); color: var(--muted); }
.up-pro-list li + li { margin-top: 4px; }
.up-pro-block.is-locked .up-pro-inner { filter: blur(5px); opacity: 0.55; pointer-events: none; user-select: none; -webkit-user-select: none; }
.up-pro-block.is-locked { min-height: 200px; }
.up-lock { display: none; }
.up-pro-block.is-locked .up-lock { position: absolute; inset: 0; display: grid; gap: 8px; align-content: center; padding: 14px; text-align: center; background: rgba(255, 255, 255, 0.6); }
.up-lock b, .up-gate b { font: 600 14.5px/1.25 var(--sans); }
.up-lock p, .up-gate p { margin: 0; font: 400 12.5px/1.45 var(--sans); color: var(--muted); }
.up-lock .btn, .up-gate .btn { width: 100%; text-align: center; }
.up-lock .up-link, .up-gate .up-link { justify-self: center; }
/* the sign-up card that takes the download button's place after the day's free downloads */
.up-gate { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--paper-2); text-align: center; }
#up-credits:empty, #up-stats:empty, #up-size-note:empty { display: none; }
.tool-note:empty { display: none; }

@media (max-width: 860px) {
  /* phone: the stage first, full width, shaped like the photo but never taller than most of the screen, the controls stacked below */
  .up-editor { gap: 12px; }
  .up-stage { justify-self: stretch; width: 100% !important; border-radius: 14px; }
  .up-stage canvas { max-height: none; }
  .up-hint-float { max-width: 80%; font-size: 11.5px; }
  .up-float-zoom { left: 8px; top: 8px; }
  .up-float-right { right: 8px; top: 8px; }
  .up-split-tag { bottom: 8px; font-size: 10px; }
  .up-panel { gap: 10px; }
  .up-block { padding: 12px; border-radius: 12px; }
}
