/* ==========================================================================
   tinyimg — one stylesheet for both themes.
   Every colour is a custom property on :root; `html.dark` swaps the set.
   ========================================================================== */

:root {
  --bg: #f3f4f8;
  --bg-2: #ffffff;
  --bg-3: #eef0f5;
  --text: #14171c;
  --text-2: #5b6372;
  --text-3: #6a7384;
  --line: #e2e5ec;

  --accent: #5b4be8;
  --accent-2: #0e8fd6;
  --accent-3: #7c3aed;
  --accent-soft: rgba(91, 75, 232, 0.14);
  --on-accent: #ffffff;

  --ok: #15803d;
  --ok-fill: #22c55e;
  --ok-soft: rgba(34, 197, 94, 0.16);
  --err: #d33036;
  --err-fill: #ef4444;
  --err-soft: rgba(239, 68, 68, 0.14);

  --shadow-sm: 0 1px 2px rgba(20, 23, 28, 0.06), 0 0 0 0.5px rgba(20, 23, 28, 0.05);
  --shadow-md: 0 2px 4px rgba(20, 23, 28, 0.05), 0 14px 34px -14px rgba(20, 23, 28, 0.28);
  --shadow-accent: 0 8px 20px -8px rgba(91, 75, 232, 0.7);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light;
}

html.dark {
  --bg: #0b0d11;
  --bg-2: #15181e;
  --bg-3: #1e222b;
  --text: #edeff3;
  --text-2: #a4acbb;
  --text-3: #7f8899;
  --line: #272c37;

  --accent: #a596ff;
  --accent-2: #4cc9ff;
  --accent-3: #b48cff;
  --accent-soft: rgba(165, 150, 255, 0.18);
  --on-accent: #0d0f14;

  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, 0.16);
  --err: #ff7b7f;
  --err-fill: #f87171;
  --err-soft: rgba(248, 113, 113, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  --shadow-accent: 0 8px 22px -8px rgba(165, 150, 255, 0.55);
  color-scheme: dark;
}

/* ───────────────────────────── base ───────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-soft);
}

/* Visually hidden but still available to assistive technology. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Smoothly blend between themes when the toggle is used (the class is only
   present for a moment around the switch, see app.js). */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    fill 0.35s ease,
    stroke 0.35s ease,
    box-shadow 0.35s ease !important;
}

/* ────────────────────────── backdrop ────────────────────────── */

/* Absolute (not fixed) so it scrolls with the page: a fixed full-viewport
   blurred layer jitters on phones and can lag behind smooth scrolling. */
.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 48vmax;
  height: 48vmax;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}

.b1 {
  top: -18vmax;
  left: -12vmax;
  background: radial-gradient(circle, rgba(91, 75, 232, 0.5), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}

.b2 {
  right: -14vmax;
  bottom: -22vmax;
  background: radial-gradient(circle, rgba(14, 143, 214, 0.42), transparent 65%);
  animation: drift-b 31s ease-in-out infinite alternate;
}

html.dark .blob {
  opacity: 0.3;
}

/* ─────────────────────────── layout ─────────────────────────── */

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100% - 32px, 800px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  padding-block: 14px calc(36px + env(safe-area-inset-bottom));
}

main {
  flex: 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  animation: rise 0.6s var(--ease) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: var(--shadow-accent);
  transition: transform 0.45s var(--ease);
}

.brand:hover .logo {
  transform: rotate(-10deg) scale(1.08);
}

.hero {
  padding: clamp(24px, 7vw, 56px) 0 clamp(20px, 4vw, 36px);
  text-align: center;
}

.rise {
  animation: rise 0.7s var(--ease) both;
}

.d1 {
  animation-delay: 0.07s;
}

.d2 {
  animation-delay: 0.14s;
}

.d3 {
  animation-delay: 0.21s;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok-fill);
  animation: ping 2.4s ease-out infinite;
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 7vw, 3.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(92deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--text-2);
  font-size: clamp(1rem, 2.7vw, 1.15rem);
  line-height: 1.65;
  text-wrap: pretty;
}

.foot {
  margin-top: auto;
  padding-top: 48px;
  color: var(--text-3);
  font-size: 0.8rem;
  text-align: center;
}

/* ────────────────────────── drop zone ───────────────────────── */

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(28px, 7vw, 48px) 20px;
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    border-color 0.25s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.35s var(--ease);
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
}

.dropzone.dragover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--bg-2);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--bg-2));
  box-shadow: 0 0 0 6px var(--accent-soft), var(--shadow-md);
  transform: scale(1.015);
}

.dz-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 10px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: var(--shadow-accent);
  color: var(--on-accent);
  animation: float 3.6s ease-in-out infinite;
  transition: transform 0.35s var(--ease);
}

.dz-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone.dragover .dz-icon {
  animation: none;
  transform: scale(1.12);
}

.dropzone.dragover .dz-icon svg {
  animation: nudge 0.55s ease-in-out infinite alternate;
}

.dz-title {
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dz-sub {
  color: var(--text-2);
  font-size: 0.98rem;
}

.dz-browse {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.dz-hint {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 0.8rem;
}

/* ─────────────────────────── cards ──────────────────────────── */

.queue {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  animation: pop-in 0.5s var(--ease) both;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

/* `pop-in` keeps its name in every state below so the entrance never restarts. */
.card.working {
  border-color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  animation: pop-in 0.5s var(--ease) both, breathe 2.6s ease-in-out infinite;
}

.card.done {
  border-color: var(--ok-fill);
  border-color: color-mix(in srgb, var(--ok-fill) 40%, var(--line));
  animation: pop-in 0.5s var(--ease) both, settle 0.7s var(--ease);
}

.card.error {
  border-color: var(--err-fill);
  border-color: color-mix(in srgb, var(--err-fill) 45%, var(--line));
  animation: pop-in 0.5s var(--ease) both, shake 0.45s ease-in-out both;
}

.card.waiting {
  opacity: 0.9;
}

.card.leaving {
  pointer-events: none;
  animation: card-out 0.22s ease-in both;
}

.thumb-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-3);
}

/* Shown until the preview has decoded (or for files that can't be previewed). */
.thumb-ph {
  position: absolute;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.thumb {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.5s ease, transform 0.8s var(--ease);
}

.thumb.loaded {
  opacity: 1;
  transform: none;
}

.thumb-wrap.noimg .thumb {
  display: none;
}

.info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.line1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.name {
  overflow: hidden;
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Percentage and check mark share one cell so the row never shifts. */
.status {
  display: grid;
  place-items: center end;
  flex: none;
}

.status > * {
  grid-area: 1 / 1;
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}

.pct {
  color: var(--accent);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.card.queued .pct,
.card.waiting .pct {
  color: var(--text-3);
}

.card.error .pct {
  color: var(--err);
}

.check {
  color: var(--ok);
  opacity: 0;
  transform: scale(0.4);
}

.check svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card.done .pct {
  opacity: 0;
  transform: scale(0.6);
}

.card.done .check {
  opacity: 1;
  transform: none;
  animation: pop 0.5s var(--ease);
}

.card.done .check path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw 0.45s 0.2s ease-out forwards;
}

.line2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 10px;
  min-width: 0;
  min-height: 22px;
  color: var(--text-2);
  font-size: 0.82rem;
}

.left {
  display: grid;
  align-items: center;
  justify-items: start;
  min-width: 0;
  overflow: hidden;
}

.left > * {
  grid-area: 1 / 1;
}

.phase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.phase-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.error .left {
  overflow: visible;
}

.card.error .phase-text {
  overflow: visible;
  color: var(--err);
  text-overflow: clip;
  white-space: normal;
}

.card.done .phase {
  display: none;
}

.spinner {
  flex: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
  transition: opacity 0.2s ease;
}

.card.error .spinner {
  display: none;
}

.spinner.on {
  opacity: 1;
}

.badge {
  display: none;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.card.done .badge {
  display: inline-flex;
  animation: badge-in 0.45s 0.15s var(--ease) both;
}

.sizes {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bar {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-3);
  transition: height 0.4s var(--ease), opacity 0.4s ease;
}

.fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  transition: background 0.5s ease, opacity 0.3s ease;
}

/* A soft highlight sweeping across while there is work going on. */
.fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.45) 50%, transparent 80%);
  opacity: 0;
  transform: translateX(-100%);
}

.card.working .fill::after {
  opacity: 1;
  animation: sheen 1.6s ease-in-out infinite;
}

.card.queued .fill,
.card.waiting .fill {
  opacity: 0.5;
}

.card.done .fill {
  background: linear-gradient(90deg, var(--ok-fill), var(--accent-2));
}

/* A failed upload drains back to empty instead of freezing at "half done". */
.card.error .fill {
  background: var(--err-fill);
  transition: transform 0.45s var(--ease), background 0.5s ease;
}

.card.done .bar,
.card.error .bar {
  height: 4px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.actions:empty {
  display: none;
}

.card.done .actions > *,
.card.error .actions > * {
  animation: rise 0.45s var(--ease) both;
}

.card.done .actions > :nth-child(2) {
  animation-delay: 0.07s;
}

.card.done .actions > :nth-child(3) {
  animation-delay: 0.14s;
}

/* ─────────────────────────── buttons ────────────────────────── */

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.25s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: var(--shadow-accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  box-shadow: 0 12px 26px -8px var(--accent);
  transform: translateY(-1px);
}

.btn-primary:hover .icon {
  transform: translateY(2px);
}

.btn-primary:active {
  box-shadow: var(--shadow-accent);
  transform: translateY(0) scale(0.97);
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--ease);
}

.btn-ghost {
  background: var(--bg-3);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost:active {
  transform: scale(0.97);
}

.icon-btn {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
}

.card .icon-btn {
  background: var(--bg-3);
  box-shadow: none;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle {
  width: 44px;
  border-radius: 999px;
}

.theme-toggle svg {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: transform 0.5s var(--ease), opacity 0.25s ease;
}

.theme-toggle .sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon {
  opacity: 1;
}

html.dark .theme-toggle .sun {
  opacity: 1;
  transform: none;
}

html.dark .theme-toggle .moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ─────────────────────────── summary ────────────────────────── */

/* A plain block after the list (never sticky: nothing may cover a result). */
.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  box-shadow: var(--shadow-md);
  animation: rise 0.5s var(--ease);
}

.summary[hidden] {
  display: none;
}

.summary-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--text-2);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.summary-text strong {
  color: var(--text);
}

.summary-text .badge {
  display: inline-flex;
}

.summary-actions {
  display: flex;
  flex: none;
  gap: 8px;
}

/* ─────────────────────────── toast ──────────────────────────── */

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 20;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  box-shadow: var(--shadow-md);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity 0.25s ease, transform 0.4s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ────────────────────────── keyframes ───────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-out {
  to {
    opacity: 0;
    transform: scale(0.97) translate3d(0, 6px, 0);
  }
}

@keyframes settle {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    box-shadow: 0 0 0 6px var(--ok-soft), var(--shadow-sm);
    transform: scale(1.012);
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-3px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(3px, 0, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: var(--shadow-sm), 0 0 0 0 var(--accent-soft);
  }
  50% {
    box-shadow: var(--shadow-sm), 0 0 0 6px transparent;
  }
}

@keyframes sheen {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes nudge {
  from {
    transform: translateY(-30%);
  }
  to {
    transform: translateY(10%);
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 var(--ok-soft);
  }
  70%,
  100% {
    box-shadow: 0 0 0 7px transparent;
  }
}

@keyframes drift-a {
  to {
    transform: translate3d(14vmax, 10vmax, 0) scale(1.15);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-12vmax, -8vmax, 0) scale(1.2);
  }
}

/* ─────────────────────────── phone ──────────────────────────── */

@media (max-width: 600px) {
  .page {
    width: min(100% - 24px, 800px);
  }

  .card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .thumb-wrap {
    width: 48px;
    height: 48px;
  }

  .actions {
    grid-column: 1 / -1;
  }

  .actions .btn {
    flex: 1;
  }

  .summary {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .summary-text {
    justify-content: center;
  }

  .summary-actions .btn {
    flex: 1;
  }

  .dz-hint {
    font-size: 0.75rem;
  }

  .blob {
    width: 80vmax;
    height: 80vmax;
  }
}

@media (hover: none) {
  .dropzone:hover {
    border-color: var(--line);
  }
}

/* ─────────────────────── reduced motion ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
