/* PixelResize – styles. No frameworks, no external fonts. */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e2e5ef;
  --text: #171a26;
  --muted: #5f6680;
  --accent: #5b5bf7;
  --accent-2: #8b5cf6;
  --accent-contrast: #ffffff;
  --accent-soft: #ecebff;
  --danger: #d93a4a;
  --ok: #129a68;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 8px 24px -8px rgb(16 24 40 / .12);
  --checker-a: #e9ebf2;
  --checker-b: #f7f8fb;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1117; --surface: #171a23; --surface-2: #1f2330; --border: #2a2f3d; --text: #e9ecf5; --muted: #9aa3bd;
    --accent: #7b7bff; --accent-soft: #25264a; --checker-a: #1c1f2a; --checker-b: #232736;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -10px rgb(0 0 0 / .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1117; --surface: #171a23; --surface-2: #1f2330; --border: #2a2f3d; --text: #e9ecf5; --muted: #9aa3bd;
  --accent: #7b7bff; --accent-soft: #25264a; --checker-a: #1c1f2a; --checker-b: #232736;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -10px rgb(0 0 0 / .6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; }
img, canvas, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
kbd { font: 600 .78em var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; }
.container { width: min(1240px, 100% - 2rem); margin-inline: auto; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: .5rem; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: .75rem; min-height: 60px; height: auto; padding: .35rem 0; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-size: 1.2rem; letter-spacing: -.02em; }
.brand b { color: var(--accent); }
.brand-mark { color: var(--accent); }
.site-nav { display: flex; gap: .25rem; margin-left: .5rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: .4rem .7rem; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover { background: var(--surface-2); color: var(--text); }
.header-actions { margin-left: auto; display: flex; gap: .25rem; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text); font-size: 1.2rem; line-height: 1; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; } :root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: none; } :root:not([data-theme="light"]) .i-moon { display: block; } }

/* Hero */
.hero { text-align: center; padding: 2.2rem 0 1.2rem; }
.hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin: 0 0 .6rem; background: linear-gradient(90deg, var(--text), var(--accent) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 1.06rem; }
body.has-image .hero { padding: 1rem 0 .4rem; }
body.has-image .hero .lead { display: none; }
body.has-image .hero h1 { font-size: 1.35rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.05rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: .95rem; transition: background .15s, border-color .15s, transform .05s; text-decoration: none; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--accent-contrast); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { padding: .8rem 1.4rem; font-size: 1.02rem; }
.btn-sm { padding: .35rem .65rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Dropzone */
.app { margin-bottom: 2.5rem; }
.dropzone { border: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 22px; background: var(--surface); padding: clamp(2rem, 6vw, 4rem) 1.25rem; text-align: center; box-shadow: var(--shadow); transition: border-color .2s, background .2s; }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { color: var(--accent); display: grid; place-items: center; margin-bottom: .5rem; }
.dz-title { font-size: 1.35rem; font-weight: 700; margin: .25rem 0 0; }
.dz-sub { color: var(--muted); margin: .2rem 0 .9rem; }
.dz-actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.dz-hint { color: var(--muted); font-size: .9rem; margin: 1.1rem 0 0; }
.trust { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; gap: .6rem 1.4rem; justify-content: center; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }

/* Editor layout */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.stage-col { min-width: 0; display: flex; flex-direction: column; gap: .6rem; position: sticky; top: 72px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .35rem .5rem; box-shadow: var(--shadow); }
.tb-group { display: flex; align-items: center; gap: .15rem; min-width: 0; }
.file-name { font-weight: 600; font-size: .92rem; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: .25rem; }
.zoom-label { min-width: 64px; font-variant-numeric: tabular-nums; }
.stage { position: relative; border-radius: var(--radius); border: 1px solid var(--border); height: min(68vh, 720px); min-height: 320px; overflow: hidden; box-shadow: var(--shadow); touch-action: pan-x pan-y; overscroll-behavior: contain; }
.checker { background-color: var(--checker-b); background-image: linear-gradient(45deg, var(--checker-a) 25%, transparent 25%), linear-gradient(-45deg, var(--checker-a) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--checker-a) 75%), linear-gradient(-45deg, transparent 75%, var(--checker-a) 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.stage-inner { position: absolute; left: 0; top: 0; line-height: 0; transform-origin: 0 0; will-change: transform; }
.stage-inner.animate { transition: transform .22s ease-out, width .22s ease-out, height .22s ease-out; }
.stage-inner canvas { width: 100%; height: 100%; box-shadow: 0 4px 22px rgb(0 0 0 / .18); image-rendering: auto; }
.stage-inner.pixelated canvas { image-rendering: pixelated; }
.compare-badge { position: absolute; top: .6rem; left: .6rem; background: rgb(0 0 0 / .7); color: #fff; font: 600 .78rem/1 var(--font); padding: .4rem .6rem; border-radius: 999px; }
.busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .6rem; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(2px); font-weight: 600; z-index: 5; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.stats { display: grid; grid-template-columns: 1fr auto 1fr 1fr; gap: .5rem; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .9rem; box-shadow: var(--shadow); align-items: center; }
.stats dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stats dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; font-size: .93rem; }
.stats .arrow { color: var(--muted); font-size: 1.2rem; }
.delta-good { color: var(--ok); } .delta-bad { color: var(--danger); }

/* Crop overlay */
.crop-layer { position: absolute; inset: 0; z-index: 3; touch-action: none; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px rgb(0 0 0 / .55); outline: 1.5px solid #fff; cursor: move; touch-action: none; }
.crop-box:focus-visible { outline: 3px solid var(--accent); }
.crop-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, rgb(255 255 255 / .45) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / .45) 1px, transparent 1px); background-size: 33.333% 33.333%; background-position: -1px -1px; pointer-events: none; opacity: .8; }
.crop-dim { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); background: rgb(0 0 0 / .75); color: #fff; font: 600 12px/1 var(--font); padding: 5px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.crop-box .h { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgb(0 0 0 / .4); }
@media (pointer: coarse) { .crop-box .h { width: 28px; height: 28px; } }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }

/* Panel */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tabs [role="tab"] { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .65rem .2rem .55rem; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: .8rem; font-weight: 600; border-bottom: 2px solid transparent; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--accent); background: var(--surface); border-bottom-color: var(--accent); }
.tabpanel { padding: 1rem 1.1rem 1.2rem; display: grid; gap: 1rem; }
.panel-title { font-size: 1.05rem; margin: 0; }
.field { display: grid; gap: .4rem; margin: 0; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { font-size: .85rem; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; align-items: center; padding: 0; }
.field output { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.help { margin: 0; color: var(--muted); font-size: .8rem; }
.error { margin: 0; color: var(--danger); font-size: .85rem; min-height: 1em; }
input[type="number"], input[type="text"], input[type="url"], .select { width: 100%; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); min-width: 0; }
input[type="number"]:focus, input[type="text"]:focus, input[type="url"]:focus, .select:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
input[type="color"] { width: 38px; height: 30px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); cursor: pointer; }
.input-suffix { display: flex; align-items: center; position: relative; }
.input-suffix i { position: absolute; right: .7rem; font-style: normal; color: var(--muted); font-size: .85rem; pointer-events: none; }
.input-suffix input { padding-right: 2.6rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-4 legend { grid-column: 1 / -1; margin-bottom: .4rem; }
.grid-4 label { font-size: .75rem; color: var(--muted); display: grid; gap: .2rem; }
.dims { grid-template-columns: 1fr auto 1fr; align-items: end; }
.dims label { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.lock { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.lock[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.lock .i-unlock { display: none; } .lock[aria-pressed="false"] .i-lock { display: none; } .lock[aria-pressed="false"] .i-unlock { display: block; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.custom-ratio input { width: 70px; }
.custom-ratio label { display: flex; gap: .3rem; align-items: center; font-size: .85rem; }
label.inline { display: inline-flex; gap: .45rem; align-items: center; font-size: .88rem; font-weight: 500; color: var(--text); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1px solid var(--border); background: var(--surface); padding: .35rem .7rem; border-radius: 999px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text); }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 3px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; text-align: center; padding: .42rem .3rem; border-radius: 8px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent-soft); }
.segmented input:disabled + span { opacity: .4; }
.range { width: 100%; accent-color: var(--accent); height: 24px; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.btn-tile { flex-direction: column; padding: .8rem .4rem; font-size: .85rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions.end { justify-content: flex-end; }
.result-line { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.estimate { background: var(--surface-2); border-radius: 10px; padding: .7rem .8rem; font-weight: 650; font-variant-numeric: tabular-nums; font-size: .93rem; }

/* Content sections */
.section { padding: 2.4rem 0 .5rem; }
.section h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin: 0 0 1.1rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.steps h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.features article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.features h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.features p { margin: 0; color: var(--muted); }
.sizes { columns: 3 280px; column-gap: 1rem; }
.size-card { break-inside: avoid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.size-card h3 { margin: 0 0 .5rem; font-size: 1rem; }
.size-card table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.size-card td { padding: .3rem 0; border-top: 1px solid var(--border); }
.size-card tr:first-child td { border-top: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.faq { display: grid; gap: .6rem; max-width: 900px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq p { color: var(--muted); margin: .6rem 0 0; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }

/* Footer */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--surface); padding: 2rem 0 1rem; font-size: .92rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .4rem 1rem; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-convert { grid-column: 1 / -1; padding-top: .4rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .85rem; }
.footer-bottom a { color: inherit; }

/* Dialogs, toasts, overlay */
.dialog { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); padding: 1.3rem 1.4rem; width: min(480px, 100% - 2rem); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .45); }
.dialog::backdrop { background: rgb(10 12 20 / .55); backdrop-filter: blur(3px); }
.dialog h2 { margin: 0 0 .8rem; font-size: 1.2rem; }
.dialog form { display: grid; gap: .6rem; }
.dialog label { font-weight: 600; font-size: .9rem; }
.kbd-table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.kbd-table td { padding: .4rem .2rem; border-top: 1px solid var(--border); }
.kbd-table td:first-child { white-space: nowrap; padding-right: 1rem; }
.toast-region { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 50; width: min(420px, 100% - 2rem); }
.toast { background: #1c1f2b; color: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5); font-size: .92rem; animation: toastIn .2s ease-out; }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.drop-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 25%, rgb(10 12 20 / .55)); color: #fff; font-size: 1.6rem; font-weight: 800; pointer-events: none; }
.drop-overlay div { border: 3px dashed #fff; border-radius: 24px; padding: 3rem 4rem; }

/* Responsive */
@media (max-width: 1000px) {
  .editor { grid-template-columns: 1fr; }
  .stage-col { position: static; }
  .stage { height: min(56vh, 560px); }
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .hide-sm { display: none; }
  .site-nav { margin-left: 0; }
  .site-nav a { padding: .4rem .45rem; font-size: .88rem; }
  .brand span { font-size: 1.05rem; }
  .steps, .features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .arrow { display: none; }
  .stats > div:last-child { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: 1fr; }
  .file-name { max-width: 14ch; }
  .stage { height: 48vh; min-height: 260px; }
  .tabs [role="tab"] { font-size: .72rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) { .site-nav { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition: none !important; } }

/* Pan / hand tool */
.tb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 .3rem; }
.pan-switch { display: inline-flex; align-items: center; gap: .4rem; height: 38px; padding: 0 .55rem 0 .5rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-weight: 650; font-size: .86rem; }
.pan-switch:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.pan-switch[aria-checked="true"] { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.switch-track { position: relative; width: 30px; height: 18px; border-radius: 999px; background: var(--border); transition: background .15s; flex: none; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .15s; }
.pan-switch[aria-checked="true"] .switch-track { background: var(--accent); }
.pan-switch[aria-checked="true"] .switch-thumb { transform: translateX(12px); }
.stage.pan-mode { cursor: grab; touch-action: none; }
.stage.pan-mode.is-panning { cursor: grabbing; }
.stage.pan-mode .crop-box, .stage.pan-mode .crop-box .h { cursor: inherit; }
.stage.pan-mode .stage-inner { user-select: none; -webkit-user-select: none; }
.pan-hint { position: absolute; right: .6rem; bottom: .6rem; z-index: 4; background: rgb(0 0 0 / .65); color: #fff; font: 600 .75rem/1 var(--font); padding: .4rem .6rem; border-radius: 999px; pointer-events: none; }
@media (max-width: 680px) { .pan-label { display: none; } .pan-switch { padding: 0 .45rem; } .tb-sep { display: none; } }

/* Export file size */
.estimate .hint { font-weight: 500; font-size: .8rem; margin-top: .35rem; }
.estimate .calculating { color: var(--muted); animation: pxrPulse 1.1s ease-in-out infinite; }
@keyframes pxrPulse { 50% { opacity: .45; } }
