/* CONVERT4US — página mínima: blanco o negro total, una frase, un botón y la nube de puntos oculta bajo el cursor.
   Sin estilos inline (CSP style-src 'self'): todo vive aquí; el JS solo cambia clases, atributos y variables CSSOM. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/ui-fonts/geist/geist-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/ui-fonts/geist/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #0a0a0a;
  --muted: #666666;
  --line: #eaeaea;
  --edge: #8f8f8f;
  --hover: #f3f3f3;
  --panel: #ffffff;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 18px 44px -10px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05);
  --accent: #d4348a;
  --err: #b3261e;
  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --ink: #ededed;
    --muted: #a1a1a1;
    --line: #242424;
    --edge: #6e6e6e;
    --hover: #191919;
    --panel: #0a0a0a;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 44px -10px rgba(0, 0, 0, 0.9);
    --accent: #fb83bc;
    --err: #ff8a80;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --ink: #ededed;
  --muted: #a1a1a1;
  --line: #242424;
  --edge: #6e6e6e;
  --hover: #191919;
  --panel: #0a0a0a;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 44px -10px rgba(0, 0, 0, 0.9);
  --accent: #fb83bc;
  --err: #ff8a80;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Una sola pantalla: la página no se desplaza. Cabecera y pie fijos en su sitio y, entre ambos, el escenario; si en una
   ventana muy baja el contenido no cabe, solo se desplaza esa franja central (nunca se recorta un control). */
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h2, h3, p, ul, ol, fieldset { margin: 0; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.ico {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico .fill { fill: currentColor; stroke: none; }

/* ---- nube de puntos oculta (src/cloud.ts): la zona visible se calcula dentro del canvas, sin máscaras CSS ---- */
.reveal {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* Cambio de tema (src/main.ts): el tema nuevo avanza desde el botón con el radio que publica la onda (--wr). */
html.theme-wave::view-transition-old(root),
html.theme-wave::view-transition-new(root) { animation: theme-hold 0.7s linear both; mix-blend-mode: normal; }
/* El tema nuevo entra por una máscara muy difuminada (500 px de transición, con caída suave) centrada en el frente de
   la onda: no hay línea entre los dos colores. */
html.theme-wave::view-transition-new(root) {
  --soft: radial-gradient(circle at var(--wx, 50%) var(--wy, 50%),
    #000 calc(var(--wr, 0px) - 250px),
    rgb(0 0 0 / 0.9) calc(var(--wr, 0px) - 160px),
    rgb(0 0 0 / 0.7) calc(var(--wr, 0px) - 80px),
    rgb(0 0 0 / 0.5) var(--wr, 0px),
    rgb(0 0 0 / 0.3) calc(var(--wr, 0px) + 80px),
    rgb(0 0 0 / 0.1) calc(var(--wr, 0px) + 160px),
    transparent calc(var(--wr, 0px) + 250px));
  -webkit-mask-image: var(--soft);
  mask-image: var(--soft);
}
/* Durante el cambio la nube va en su propia capa, por encima de las dos vistas: sus puntos de color se ven a ambos
   lados del frente y empiezan a encenderse antes de que llegue el color nuevo (src/cloud.ts). */
html.theme-wave .reveal { view-transition-name: c4u-cloud; }
html.theme-wave::view-transition-group(c4u-cloud) { animation: none; }
html.theme-wave::view-transition-old(c4u-cloud) { display: none; }
html.theme-wave::view-transition-new(c4u-cloud) { animation: none; mix-blend-mode: normal; }
@keyframes theme-hold {
  from { opacity: 1; }
  to { opacity: 1; }
}
/* Navegadores sin View Transitions: los colores se funden durante el mismo tiempo. */
html.theme-fade body,
html.theme-fade body * { transition: background-color 0.7s linear, color 0.7s linear, box-shadow 0.7s linear !important; }
.cloud { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---- cabecera ---- */
.top {
  position: relative;
  z-index: 3; /* por encima del escenario: el panel de idiomas cae sobre él */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 16px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.03em; text-transform: lowercase; }
.top-actions { display: flex; align-items: center; gap: 4px; }
/* Selector de idioma (src/lang-menu.ts): botón con el icono de traducir y panel con los idiomas. */
.lang { position: relative; }
.lang-btn { gap: 8px; }
.lang-btn .ico { width: 18px; height: 18px; }
.lang-btn .chev { width: 10px; height: 10px; transition: transform 0.2s; }
.lang-btn[aria-expanded="true"] { background: var(--hover); color: var(--ink); }
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-code { font-family: var(--mono); font-size: 12px; }
.lang-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 96px));
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: lang-pop 0.14s ease-out;
}
@keyframes lang-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; text-align: start; cursor: pointer; }
.lang-item > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-item:hover,
.lang-item[aria-pressed="true"] { background: var(--hover); }
.lang-item .ico { width: 16px; height: 16px; }
.lang-item-code { flex: none; color: var(--muted); font-family: var(--mono); font-size: 11px; }

.quiet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.quiet:hover { background: var(--hover); color: var(--ink); }

/* ---- escenario: la frase centrada ---- */
.page { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.stage {
  flex: none;
  margin-block: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.6vh, 18px);
  padding: 8px 16px;
  text-align: center;
}
.sentence-wrap { position: relative; width: 100%; max-width: 1180px; display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(6px, 2.2vh, 20px); }
.sentence {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2em 0.26em;
  font-size: clamp(36px, min(6.4vw, 11vh), 92px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.pick {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  max-width: 100%;
  padding: 0.07em 0.28em 0.11em 0.34em;
  border: 0;
  border-radius: 0.22em;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--edge);
  letter-spacing: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
}
.pick:hover,
.pick[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--hover); }
.pick[data-empty="true"] .pick-val { color: var(--muted); }
.pick-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .ico { width: 0.4em; height: 0.4em; color: var(--muted); transition: transform 0.2s; }
.pick[aria-expanded="true"] .ico { transform: rotate(180deg); }

.detected { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; color: var(--muted); font-size: 14px; }
.detected:empty { display: none; }
.detected h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* El archivo «aparece» con un pequeño salto (solo escala: el contraste del texto no cambia durante la animación). */
.detected-name { max-width: 100%; padding: 6px 14px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--edge); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-family: var(--mono); font-size: 13px; animation: file-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.detected-name::before { content: ""; display: inline-block; width: 9px; height: 12px; margin-right: 8px; border: 1.5px solid currentColor; border-radius: 2px; vertical-align: -2px; }
@keyframes file-pop {
  0% { transform: scale(0.3); }
  60% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.detected .warnings { flex-basis: 100%; padding: 0; list-style: none; color: var(--err); }
.detected .warnings:empty { display: none; }
.note { max-width: 520px; color: var(--muted); font-size: 14px; }

.opts { min-width: 0; max-width: 760px; padding: 0; border: 0; text-align: left; }
.opts:not(:has(.option)) { display: none; }
.opts legend { padding: 0; margin: 0 auto 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
/* Opciones en fila (bajan de línea si no caben): ocupan poco alto para que todo quepa en una pantalla. */
#options { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 24px; }
#options .option { min-height: 40px; }
#options .option label { flex: none; }
#options .option .note { flex-basis: auto; font-size: 12px; }
#options .option:has(textarea) { flex-basis: 100%; }
.option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; font-size: 14px; }
.option label { flex: 1; min-width: 0; }
.option .note { flex-basis: 100%; font-size: 13px; }
input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--ink); }
input[type="text"],
input[type="number"],
select,
textarea {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--bg);
  font-size: 14px;
}
textarea { width: 100%; padding: 10px 12px; }
input[type="number"] { width: 110px; }
.loss { max-width: 760px; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; color: var(--muted); font-size: 12px; }
.loss:empty { display: none; }
.loss h3 { margin: 0; font-size: 12px; font-weight: 500; color: var(--ink); }
.loss ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 10px; padding: 0; list-style: none; }

.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.cta,
.result button:first-of-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  /* Sin transición de color: al pasar de deshabilitado a habilitado el contraste no debe pasar por valores intermedios. */
  transition: transform 0.15s;
}
.cta:active:not(:disabled) { transform: scale(0.98); }
.cta:disabled { background: var(--hover); color: var(--muted); cursor: not-allowed; }
.ghost,
.result button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--edge);
  font-size: 14px;
  cursor: pointer;
}
.ghost:hover,
.result button:not(:first-of-type):hover { box-shadow: inset 0 0 0 1px var(--ink); background: var(--hover); }
.result button:first-of-type { box-shadow: none; }

.hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; color: var(--muted); font-size: 14px; }
.link { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.stage:has(#file-input:focus-visible) .link { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.status { min-height: 0; color: var(--muted); font-size: 14px; }
.status:empty { display: none; }
#stage { font-family: var(--mono); font-size: 13px; }
.error { max-width: 520px; color: var(--err); font-size: 14px; }
.result { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.result:empty { display: none; }
.result p { color: var(--muted); font-size: 14px; }

.batch { width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.batch h2 { font-size: 16px; font-weight: 500; }
.batch ol { width: 100%; max-height: 22vh; overflow-y: auto; padding: 0; list-style: none; color: var(--muted); font-family: var(--mono); font-size: 13px; text-align: left; }
.batch li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.batch li[data-status="succeeded"] { color: var(--ink); }
.batch li[data-status="failed"] { color: var(--err); }
.batch-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; font-size: 14px; }

/* arrastrar un archivo sobre la página */
body.dragging::after {
  content: "";
  position: fixed;
  inset: 12px;
  z-index: 30;
  border: 2px dashed var(--accent);
  border-radius: 16px;
  pointer-events: none;
}

/* ---- menú de formatos ---- */
/* Fijo respecto a la ventana (no lo recorta la franja central); `top` y `max-height` los pone format-menu.ts al abrir. */
.menu {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  max-height: max(280px, min(440px, calc(50vh - 24px)));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  animation: menu-pop 0.16s ease-out;
}
@keyframes menu-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.menu-search { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.menu-search:focus-within { box-shadow: inset 0 -1px 0 var(--ink); }
.menu-search .ico { width: 16px; height: 16px; }
.menu-search input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 15px; outline: none; }
.menu-search input::placeholder { color: var(--muted); opacity: 1; }
.kbd { min-height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 11px; cursor: pointer; }
.kbd:hover { color: var(--ink); border-color: var(--edge); }
.menu-panes { display: flex; flex: 1; min-height: 0; }
.menu-rail { width: 196px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-right: 1px solid var(--line); overflow-y: auto; }
.menu-cat { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; text-align: left; white-space: nowrap; cursor: pointer; }
.menu-cat:hover,
.menu-cat[aria-pressed="true"] { background: var(--hover); color: var(--ink); }
.menu-cat span:last-child { font-family: var(--mono); font-size: 12px; }
.menu-list { flex: 1; min-width: 0; overflow-y: auto; padding: 4px 12px 12px; }
.menu-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.menu-action:hover { background: var(--hover); }
.menu-action .ico { width: 16px; height: 16px; }
.menu-group h2 { margin: 12px 10px 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.menu-grid-wide { grid-template-columns: minmax(0, 1fr); }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-family: var(--mono); font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.menu-item > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item:hover,
.menu-item[aria-pressed="true"] { background: var(--hover); }
.menu-item:disabled { background: transparent; color: var(--muted); font-weight: 400; cursor: default; }
.menu-item .ico { width: 16px; height: 16px; }
.menu-tag { flex: none; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 400; }
.menu-empty { margin: 28px 10px; color: var(--muted); }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; min-height: 40px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* ---- pie: badge de modo (centro) y tema (derecha) ---- */
.foot {
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  padding: 8px 24px 14px;
  color: var(--muted);
  font-size: 13px;
}
.foot .by { grid-column: 1; justify-self: start; }
.foot .badge { grid-column: 2; }
.foot .icon-btn { grid-column: 3; justify-self: end; }
.by { display: inline-flex; align-items: center; max-width: 100%; min-height: 32px; overflow: hidden; color: var(--muted); font-size: 12px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; transition: color 0.15s; }
.by:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.badge {
  position: relative;
  width: fit-content;
  padding: 6px 14px 6px 28px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}
.badge::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--accent);
}
.badge[data-mode="cloud"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* El badge muestra solo «LOCAL»; el resto del texto se despliega al pasar el cursor o enfocarlo. La columna de la
   rejilla pasa de 0fr a 1fr, así que el ancho crece hasta su medida exacta sin saltos, mientras el texto entra
   deslizándose y enfocándose. */
.badge { display: inline-flex; align-items: center; cursor: default; }
.badge-rest { display: grid; grid-template-columns: 0fr; transition: grid-template-columns 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.badge-rest > span {
  min-width: 0;
  overflow: hidden;
  white-space: pre;
  opacity: 0;
  filter: blur(6px);
  transform: translateX(-10px);
  transition: opacity 0.45s ease, filter 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.badge:hover .badge-rest,
.badge:focus-visible .badge-rest,
.badge[data-mode="cloud"] .badge-rest { grid-template-columns: 1fr; }
.badge:hover .badge-rest > span,
.badge:focus-visible .badge-rest > span,
.badge[data-mode="cloud"] .badge-rest > span { opacity: 1; filter: blur(0); transform: none; }

.icon-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background 0.15s; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .ico { width: 18px; height: 18px; }

/* ---- diálogo de consentimiento CLOUD ---- */
dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog h2 { margin-bottom: 10px; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
dialog p { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
dialog ul { padding-left: 18px; margin-bottom: 20px; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
dialog .actions { justify-content: flex-end; }
dialog .cta { min-height: 44px; padding: 0 20px; font-size: 14px; }

@media (max-width: 640px) {
  .top { padding: 8px 12px; }
  .lang-btn .chev { display: none; }
  .lang-item { min-height: 44px; }
  .sentence { font-size: clamp(28px, 8.6vw, 40px); }
  .link { min-height: 44px; }
  /* En móvil el formato detectado ya se lee en la frase; solo se muestra aparte cuando no se pudo identificar. */
  #detected-format[data-format]:not([data-format=""]) { display: none; }
  .result p { flex-basis: 100%; }
  #options { justify-content: flex-start; }
  #options .option { min-height: 44px; }
  .badge { padding: 5px 10px 5px 24px; font-size: 10px; }
  .badge::before { left: 10px; }
  .quiet { padding: 0 8px; font-size: 13px; }
  .menu-panes { flex-direction: column; }
  .menu-rail { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu-cat { flex: none; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { padding: 6px 12px 10px; }
  .by { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu, .lang-menu, .detected-name { animation: none; }
  .cta, .pick, .pick .ico, .quiet, .icon-btn, .by, .badge-rest, .badge-rest > span { transition: none; }
}
