/**
 * Convertidor HEIC — diseño editorial de RÜM (oct 2026), igual que las
 * herramientas PDF (assets/css/rum_pdf_tools.css) y Criterios: fondo blanco,
 * Syne en títulos, Inter en texto, etiquetas y botones en versalitas, filetes
 * cálidos en vez de sombras y primario durazno en píldora. Tokens --rx-* de
 * assets/css/rum_shell_editorial.css (los carga navbar.php), con respaldo.
 * Ya no usa rum_operations_shell.css; .rum-ops-btn sólo queda porque
 * heic_converter_app.js lo pone en el botón «Descargar» de cada foto.
 */

@font-face { font-family: "Syne"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/home/fonts/syne-var.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/home/fonts/inter-var.woff2) format("woff2"); }

html { background: #fff; }

body.rum-heic-ops {
  margin: 0;
  background: #fff;
  color: var(--rx-ink, #1C1F26);
  font-family: var(--rx-f-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.rum-heic-ops {
  --ink: var(--rx-ink, #1C1F26);
  --ink-2: var(--rx-ink-2, #4A4F5A);
  --muted: #6B7079;
  --label: var(--rx-muted, #8A8F98);
  --rule: var(--rx-rule, #ECE4DA);
  --rule-strong: var(--rx-rule-strong, #DDD1C3);
  --paper-2: var(--rx-paper-2, #FAF7F3);
  --peach: var(--rx-peach, #F3D2B2);
  --peach-2: var(--rx-peach-2, #EEBF95);
  --peach-ink: var(--rx-peach-ink, #5C3A21);
  --terra: var(--rx-terracotta, #B8784C);
  --f-display: var(--rx-f-display, "Syne", "Inter", system-ui, sans-serif);
  --f-sans: var(--rx-f-sans, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  --ok: #3E7A4F;
  --ok-bg: rgba(62, 122, 79, .1);
  --mid: #9A6417;
  --bad: #B4483C;
  --bad-bg: rgba(180, 72, 60, .09);
}

.heic {
  box-sizing: border-box;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(20px, 2.6vw, 40px) clamp(16px, 2.4vw, 36px) 64px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

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

/* ---------- Encabezado ---------- */

.heic-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label);
  text-decoration: none;
  transition: color .2s ease;
}

.heic-back:hover,
.heic-back:focus-visible {
  color: var(--ink);
}

.heic .ed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.heic .ed-head__text {
  flex: 1 1 460px;
  min-width: 0;
}

.heic .ed-kicker {
  display: block;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terra);
}

.heic .ed-head h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.heic .ed-lede {
  margin: 14px 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.heic .ed-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 100%;
}

.heic .ed-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------- Cifras: filetes entre celdas, números en Syne ---------- */

.heic-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
}

.heic-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 16px 18px 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--rule);
}

.heic-stat span {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label);
}

.heic-stat b {
  display: block;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.heic-stat b i {
  font-style: normal;
}

.heic-stat b small {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--label);
}

body.is-converting .heic-stat--done b {
  color: var(--ok);
}

/* ---------- Botones: píldora Inter en versalitas ---------- */

body.rum-heic-ops :where(.heic-btn, .rum-ops-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--peach);
  background: var(--peach);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: background .25s ease, border-color .25s ease, color .25s ease, opacity .2s ease;
}

body.rum-heic-ops :where(.heic-btn, .rum-ops-btn):hover,
body.rum-heic-ops :where(.heic-btn, .rum-ops-btn):focus-visible {
  background: var(--peach-2);
  border-color: var(--peach-2);
}

body.rum-heic-ops :where(.heic-btn, .rum-ops-btn):focus-visible,
body.rum-heic-ops .heic-btn:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

body.rum-heic-ops :where(.heic-btn--quiet, .rum-ops-btn--secondary) {
  background: transparent;
  border-color: var(--rule-strong);
}

body.rum-heic-ops :where(.heic-btn--quiet, .rum-ops-btn--secondary):hover,
body.rum-heic-ops :where(.heic-btn--quiet, .rum-ops-btn--secondary):focus-visible {
  background: transparent;
  border-color: var(--ink);
}

body.rum-heic-ops :where(.heic-btn--sm, .rum-ops-btn--sm) {
  min-height: 30px;
  padding: 0 12px;
  font-size: 10.5px;
}

body.rum-heic-ops .heic-btn--lg {
  min-height: 42px;
  padding-inline: 22px;
  font-size: 11.5px;
}

body.rum-heic-ops :where(.heic-btn, .rum-ops-btn):disabled,
body.rum-heic-ops :where(.heic-btn, .rum-ops-btn):disabled:hover {
  opacity: .45;
  cursor: not-allowed;
}

body.rum-heic-ops :where(.heic-btn--quiet, .rum-ops-btn--secondary):disabled:hover {
  border-color: var(--rule-strong);
}

body.rum-heic-ops :where(.heic-btn:not(.heic-btn--quiet)):disabled:hover {
  background: var(--peach);
  border-color: var(--peach);
}

body.rum-heic-ops .is-busy {
  gap: 8px;
  opacity: 1;
}

/* ---------- Mesa de trabajo ---------- */

.heic-workspace {
  position: relative;
}

.heic-dropzone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 28px 16px;
  border: 1px dashed var(--rule-strong);
  border-radius: 10px;
  background: var(--paper-2);
  cursor: pointer;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}

.heic-dropzone:hover,
.heic-dropzone:focus-visible,
.heic-dropzone.is-hot {
  border-color: var(--ink);
  outline: none;
}

.heic-dropzone.is-hot {
  background: #fff;
}

.heic-dropzone strong {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--ink);
}

.heic-dropzone p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.heic-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
}

.heic-toolbar input[type="file"] {
  display: none;
}

body.rum-heic-ops .heic-toolbar__clear {
  margin-left: auto;
}

/* Opciones: píldoras (activa en tinta) y control de calidad */

.heic-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 32px;
  margin: 22px 0 0;
}

.heic-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.heic-choice legend,
.heic-quality__label {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--label);
}

.heic-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.heic-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.heic-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.heic-chip:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.heic-chip:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.heic-quality {
  min-width: 0;
}

.heic-quality .quality-val {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.heic-quality input[type="range"] {
  display: block;
  width: min(220px, 100%);
  height: 32px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

/* Acciones principales */

.heic-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 16px;
}

.heic-busy[hidden] {
  display: none !important;
}

.heic-busy {
  display: none;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
}

body.is-converting,
body.is-zipping {
  cursor: progress;
}

body.is-converting .heic-dropzone,
body.is-zipping .heic-dropzone {
  pointer-events: none;
  opacity: .6;
}

body.is-converting .heic-busy,
body.is-zipping .heic-busy {
  display: flex;
}

.heic-busy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}

.heic-busy p {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.heic-spinner {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: heic-spin .7s linear infinite;
}

.heic-spinner--sm {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.heic-status {
  min-height: 1.4em;
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-2);
}

.heic-status.err {
  color: var(--bad);
  font-weight: 600;
}

.heic-progress {
  height: 2px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}

.heic-progress > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ink);
  transition: width .25s ease;
}

.heic-progress.is-active > span {
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink-2) 45%, var(--peach-2) 70%, var(--ink) 100%);
  background-size: 220% 100%;
  animation: heic-progress-slide 1.1s linear infinite;
}

/* Barra de selección */

.heic-select-bar[hidden] {
  display: none !important;
}

.heic-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin: 0;
  padding: 4px 0;
  border-top: 1px solid var(--rule);
}

.heic-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.heic-select-all input,
.heic-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.heic-select-all input:focus-visible,
.heic-check input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Lista: filas con filete, sin cajas ---------- */

.heic-file-list {
  display: grid;
  border-top: 1px solid var(--rule);
}

.heic-file-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 6px 10px 0;
  border-bottom: 1px solid var(--rule);
  background: #fff;
  overflow: hidden;
  transition: background .2s ease;
}

.heic-file-card.is-selected,
.heic-file-card.is-previewing {
  background: var(--paper-2);
}

.heic-check {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
}

.heic-thumb-btn {
  appearance: none;
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--paper-2);
  touch-action: manipulation;
}

.heic-thumb-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.heic-thumb-btn:hover .heic-thumb,
.heic-thumb-btn:focus-visible .heic-thumb {
  transform: scale(1.05);
}

.heic-thumb-btn::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(28, 31, 38, .72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='20' y1='20' x2='16.2' y2='16.2'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
  pointer-events: none;
}

.heic-thumb,
.heic-thumb-ph {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: transform .18s ease;
}

.heic-thumb-btn .heic-thumb {
  width: 100%;
  height: 100%;
}

.heic-thumb-ph {
  position: relative;
  overflow: hidden;
}

.heic-file-card.is-queued .heic-thumb-ph::after,
.heic-file-card.is-converting .heic-thumb-ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent);
  transform: translateX(-100%);
  animation: heic-shimmer 1.15s ease-in-out infinite;
}

.heic-file-card.is-converting .heic-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--peach-2);
  animation: heic-scan 1.1s ease-in-out infinite;
  pointer-events: none;
}

.heic-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}

.heic-file-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.heic-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.heic-badge.converting {
  border-color: var(--peach-2);
  background: rgba(243, 210, 178, .35);
  color: var(--peach-ink);
}

.heic-badge.done {
  border-color: transparent;
  background: var(--ok-bg);
  color: var(--ok);
}

.heic-badge.error {
  border-color: transparent;
  background: var(--bad-bg);
  color: var(--bad);
}

.heic-badge.skipped {
  color: var(--label);
}

.heic-empty {
  margin: 0;
  padding: 28px 12px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Pie ---------- */

.heic-privacy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 13px;
}

.heic-privacy::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  transform: translateY(-1px);
}

.heic-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Vista ampliada ---------- */

.heic-lightbox[hidden] {
  display: none !important;
}

.heic-lightbox {
  position: fixed;
  inset: 0;
  z-index: 12040;
  display: flex;
  align-items: stretch;
  justify-content: center;
  font-family: var(--rx-f-sans, "Inter", system-ui, sans-serif);
}

.heic-lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 31, 38, .9);
  backdrop-filter: blur(6px);
}

.heic-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(100%, 1680px);
  height: 100%;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.heic-lightbox-close,
.heic-lightbox-nav {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .18s ease;
  touch-action: manipulation;
}

.heic-lightbox-close:hover,
.heic-lightbox-nav:hover {
  background: #F3D2B2;
  border-color: #F3D2B2;
  color: #1C1F26;
}

.heic-lightbox-close:focus-visible,
.heic-lightbox-nav:focus-visible,
.heic-strip-thumb:focus-visible {
  outline: 2px solid #EEBF95;
  outline-offset: 2px;
}

.heic-lightbox-close:active,
.heic-lightbox-nav:active,
.heic-thumb-btn:active {
  transform: scale(.96);
}

.heic-lightbox-close .rum-ico,
.heic-lightbox-nav .rum-ico {
  width: 18px;
  height: 18px;
}

.heic-lightbox-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
}

.heic-lightbox-prev {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.heic-lightbox-next {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}

.heic-lightbox-nav[hidden] {
  visibility: hidden;
}

.heic-lightbox-figure {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  margin: 0;
}

.heic-lightbox-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72dvh, calc(100dvh - 168px));
  object-fit: contain;
  border-radius: 8px;
  background: #1C1F26;
}

.heic-lightbox-figure figcaption {
  max-width: min(72ch, 92vw);
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  word-break: break-word;
}

.heic-lightbox-strip {
  grid-column: 1 / -1;
  grid-row: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px 8px;
  scrollbar-width: thin;
}

.heic-strip-thumb {
  appearance: none;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, .08);
  opacity: .7;
  transition: opacity .2s ease, border-color .2s ease;
  touch-action: manipulation;
}

.heic-strip-thumb:hover {
  opacity: 1;
}

.heic-strip-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heic-strip-thumb.is-current {
  border-color: #F3D2B2;
  box-shadow: 0 0 0 1px #F3D2B2;
  opacity: 1;
}

body.heic-lightbox-open {
  overflow: hidden;
}

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

@keyframes heic-shimmer {
  100% { transform: translateX(100%); }
}

@keyframes heic-progress-slide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@keyframes heic-scan {
  0% { top: 8px; opacity: .2; }
  50% { opacity: 1; }
  100% { top: calc(100% - 10px); opacity: .2; }
}

@media (max-width: 900px) {
  .heic-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .heic-file-card {
    grid-template-columns: 36px 56px minmax(0, 1fr);
    gap: 12px;
    padding-right: 0;
  }
  .heic-file-card .rum-ops-btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .heic-thumb-btn,
  .heic-thumb,
  .heic-thumb-ph {
    width: 56px;
    height: 56px;
  }
  .heic-lightbox-dialog {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .heic-lightbox-close {
    grid-column: 1;
    grid-row: 1;
  }
  .heic-lightbox-figure {
    grid-column: 1;
    grid-row: 2;
    padding: 0 48px;
  }
  .heic-lightbox-figure img {
    max-width: 100%;
    max-height: min(68dvh, calc(100dvh - 180px));
  }
  .heic-lightbox-prev,
  .heic-lightbox-next {
    position: absolute;
    grid-column: 1;
    grid-row: 2;
    top: 46%;
    transform: translateY(-50%);
    background: rgba(28, 31, 38, .55);
  }
  .heic-lightbox-prev {
    left: max(8px, env(safe-area-inset-left));
  }
  .heic-lightbox-next {
    right: max(8px, env(safe-area-inset-right));
  }
  .heic-lightbox-prev:active,
  .heic-lightbox-next:active {
    transform: translateY(-50%) scale(.96);
  }
}

@media (max-width: 640px) {
  .heic .ed-pill {
    display: none;
  }
  .heic-stats {
    margin-bottom: 22px;
  }
  .heic-stat {
    padding: 12px 14px 14px;
  }
  .heic-toolbar .heic-btn:not(.heic-toolbar__clear) {
    flex: 1 1 140px;
  }
  body.rum-heic-ops .heic-toolbar__clear {
    margin-left: 0;
  }
  .heic-bar .heic-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heic-spinner,
  .heic-progress.is-active > span,
  .heic-file-card.is-queued .heic-thumb-ph::after,
  .heic-file-card.is-converting .heic-thumb-ph::after,
  .heic-file-card.is-converting .heic-scan,
  .heic-thumb,
  .heic-lightbox-close,
  .heic-lightbox-nav {
    animation: none;
    transition: none;
  }
}
