/* RefriGuía — diseño. Todo en rem para que "Tamaño de letra" escale la app completa. */
:root {
  --bg: #edf2f8;
  --surface: #ffffff;
  --surface-2: #f5f8fc;
  --text: #0e1a2b;
  --muted: #5a6a7e;
  --line: #dce4ee;
  --brand: #0a66d8;
  --brand-ink: #ffffff;
  --brand-soft: #e4effd;
  --frost: #19a7c4;
  --hero-1: #0a2342;
  --hero-2: #0f4c81;
  --ok: #17803d; --ok-soft: #e3f5e9;
  --warn: #a35a00; --warn-soft: #fff2d9;
  --bad: #c0271d; --bad-soft: #fde8e6;
  --r22: #2f9e55; --r410a: #d6457f; --r32: #1f7fd1; --r290: #d9480f;
  --sombra: 0 1px 2px rgba(14, 32, 56, .06), 0 6px 18px rgba(14, 32, 56, .06);
  --radius: 1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a121c; --surface: #121e2c; --surface-2: #0f1925; --text: #e8eff7; --muted: #95a6ba; --line: #22344a;
    --brand: #4d9cf5; --brand-ink: #04111f; --brand-soft: #15314f; --frost: #3cc3dc;
    --hero-1: #0b2238; --hero-2: #103a63;
    --ok: #5fd08a; --ok-soft: #13301f; --warn: #f2b24d; --warn-soft: #36280d; --bad: #ff8b80; --bad-soft: #3a1714;
    --sombra: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a121c; --surface: #121e2c; --surface-2: #0f1925; --text: #e8eff7; --muted: #95a6ba; --line: #22344a;
  --brand: #4d9cf5; --brand-ink: #04111f; --brand-soft: #15314f; --frost: #3cc3dc;
  --hero-1: #0b2238; --hero-2: #103a63;
  --ok: #5fd08a; --ok-soft: #13301f; --warn: #f2b24d; --warn-soft: #36280d; --bad: #ff8b80; --bad-soft: #3a1714;
  --sombra: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }

/* Encabezado */
header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 0.25rem;
  background: linear-gradient(120deg, var(--hero-1), var(--hero-2)); color: #fff;
  padding: 0.5rem 0.5rem 0.5rem 1rem; min-height: 3.625rem; box-shadow: 0 2px 10px rgba(5, 20, 40, .25);
}
header h1 { font-size: 1.1875rem; font-weight: 750; letter-spacing: -0.01em; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header button { display: grid; place-items: center; background: transparent; border: 0; color: inherit; width: 2.75rem; height: 2.75rem; border-radius: 50%; padding: 0; font-size: 1.25rem; }
header button:active { background: rgba(255,255,255,.18); }
#atras { margin-left: -0.5rem; }
main { padding: 1rem; max-width: 45rem; margin: 0 auto; }

/* Navegación inferior */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex;
  background: var(--surface); border-top: 1px solid var(--line); padding: 0.375rem 0.25rem calc(0.375rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(14, 32, 56, .06);
}
nav.tabs a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.125rem; padding: 0.125rem 0;
  color: var(--muted); text-decoration: none; font-size: 0.75rem; font-weight: 650; min-width: 0;
}
nav.tabs a .pastilla { display: grid; place-items: center; width: 3.5rem; height: 2rem; border-radius: 1rem; transition: background .2s; }
nav.tabs a .ic { font-size: 1.25rem; }
nav.tabs a.on { color: var(--brand); }
nav.tabs a.on .pastilla { background: var(--brand-soft); }

/* Tipografía */
h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; margin: 1.25rem 0 0.625rem; }
h3 { font-size: 1.0625rem; font-weight: 750; margin: 1.125rem 0 0.375rem; }
p, li { margin: 0.375rem 0; }
ol, ul { padding-left: 1.375rem; }
.muted { color: var(--muted); font-size: 0.9375rem; }
.seccion { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--muted); margin: 1.5rem 0.25rem 0.625rem; }
.seccion:first-child { margin-top: 0.25rem; }
a { color: var(--brand); }

/* Portada */
.hero {
  position: relative; overflow: hidden; border-radius: 1.25rem; padding: 1.25rem 1.125rem 1.125rem; margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2) 70%, #1680b8); color: #fff; box-shadow: var(--sombra);
}
.hero .copo { position: absolute; right: -1.75rem; top: -1.5rem; width: 9rem; height: 9rem; opacity: .12; }
.hero h2 { margin: 0; font-size: 1.5rem; color: #fff; }
.hero p { margin: 0.125rem 0 0.875rem; color: rgba(255,255,255,.8); font-size: 0.9375rem; }
.hero-buscar {
  display: flex; align-items: center; gap: 0.625rem; width: 100%; font: inherit; text-align: left; color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); border-radius: 0.875rem; padding: 0.75rem 0.875rem; min-height: 3rem;
}
.rapidos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.rapidos a {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.625rem 0.25rem; border-radius: 0.875rem;
  background: rgba(255,255,255,.12); color: #fff; text-decoration: none; font-size: 0.8125rem; font-weight: 700; text-align: center; line-height: 1.2;
}
.rapidos a .ic { font-size: 1.375rem; }
.estado-vacio { display: flex; align-items: center; gap: 0.75rem; }

/* Tarjetas de gas */
.gases-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
.gas-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.125rem; min-height: 5.75rem;
  border-radius: var(--radius); padding: 0.875rem; color: #fff; text-decoration: none; box-shadow: var(--sombra);
  background: var(--c);
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
}
.gas-card b { font-size: 1.5rem; font-weight: 850; letter-spacing: -0.02em; }
.gas-card span { font-size: 0.8125rem; opacity: .9; }
.gas-card .clase { position: absolute; top: 0.625rem; right: 0.625rem; font-size: 0.75rem; font-weight: 800; background: rgba(255,255,255,.22); padding: 0.125rem 0.5rem; border-radius: 999px; opacity: 1; }
.c-R22 { --c: var(--r22); } .c-R410A { --c: var(--r410a); } .c-R32 { --c: var(--r32); } .c-R290 { --c: var(--r290); }

/* Mosaico de herramientas */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.625rem; min-height: 6.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sombra);
  padding: 0.875rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.9875rem; line-height: 1.25;
  hyphens: auto; overflow-wrap: anywhere;
}
.tile:active, .item:active, .gas-card:active, .rapidos a:active { transform: scale(.97); }
.badge { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; flex: none; background: var(--brand-soft); color: var(--brand); }
.badge .ic { font-size: 1.25rem; }
.t-azul { --t: #0a66d8; } .t-cian { --t: #0891b2; } .t-verde { --t: #16a34a; } .t-naranja { --t: #ea580c; }
.t-rojo { --t: #dc2626; } .t-morado { --t: #7c3aed; } .t-ambar { --t: #d97706; } .t-rosa { --t: #db2777; } .t-gris { --t: #475569; }
[class*="t-"] > .badge, .badge[class*="t-"] { background: color-mix(in srgb, var(--t) 13%, transparent); color: var(--t); }
:root[data-theme="dark"] [class*="t-"] > .badge { color: color-mix(in srgb, var(--t) 60%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [class*="t-"] > .badge { color: color-mix(in srgb, var(--t) 60%, #fff); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0.75rem 0; box-shadow: var(--sombra); }
.card h3:first-child { margin-top: 0; }
.item {
  display: flex; align-items: center; gap: 0.75rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sombra);
  border-radius: var(--radius); padding: 0.75rem 0.875rem; margin: 0.5rem 0; color: var(--text); text-decoration: none; font-weight: 650;
}
.item .grow { flex: 1; min-width: 0; }
.item .sub { display: block; font-weight: 400; color: var(--muted); font-size: 0.875rem; }
.item .chev { color: var(--muted); font-size: 1.125rem; }

/* Formularios */
label { display: block; font-weight: 650; font-size: 0.9375rem; margin: 0.875rem 0 0.3125rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 0.875rem; padding: 0.75rem 0.875rem; min-height: 3.25rem;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { min-height: 6rem; resize: vertical; }
.row { display: flex; gap: 0.625rem; }
.row > * { flex: 1; min-width: 0; }
.con-signo { display: flex; gap: 0.375rem; }
.con-signo input { flex: 1; min-width: 0; }
.signo { flex: none; width: 3.25rem; font: inherit; font-weight: 800; border-radius: 0.875rem; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); }

/* Control segmentado */
.seg { display: flex; gap: 0.25rem; flex-wrap: wrap; margin: 0.375rem 0; padding: 0.25rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 0.875rem; }
.seg button {
  flex: 1; min-height: 2.75rem; font: inherit; font-size: 0.9375rem; font-weight: 700; border-radius: 0.625rem; min-width: 3.75rem;
  padding: 0.375rem 0.5rem; overflow-wrap: anywhere; border: 0; background: transparent; color: var(--muted);
}
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(14,32,56,.15); }
.seg button.gas-R22.on { background: var(--r22); color: #fff; }
.seg button.gas-R410A.on { background: var(--r410a); color: #fff; }
.seg button.gas-R32.on { background: var(--r32); color: #fff; }
.seg button.gas-R290.on { background: var(--r290); color: #fff; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%;
  min-height: 3.25rem; font: inherit; font-weight: 750; border-radius: 0.875rem; border: 0; margin: 0.5rem 0;
  background: var(--brand); color: var(--brand-ink); text-decoration: none; padding: 0.5rem 0.875rem; text-align: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent);
}
.btn.sec { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn.bad { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: none; }
.btn.chico { min-height: 2.625rem; margin: 0; font-size: 0.9375rem; width: auto; }
.btn:active { filter: brightness(.95); }
.acciones { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.acciones .btn { flex: 1; }

/* Resultados */
.result { border-radius: var(--radius); padding: 1rem; margin: 0.875rem 0; background: var(--brand-soft); border-left: 0.3125rem solid var(--brand); }
.result .big { font-size: 2.125rem; font-weight: 850; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 0.25rem; }
.result.ok { background: var(--ok-soft); border-color: var(--ok); } .result.ok .big { color: var(--ok); }
.result.warn { background: var(--warn-soft); border-color: var(--warn); } .result.warn .big { color: var(--warn); }
.result.bad { background: var(--bad-soft); border-color: var(--bad); } .result.bad .big { color: var(--bad); }

/* Escala de colores con marcador */
.escala { position: relative; margin: 0.75rem 0 1.5rem; }
.escala .zonas { display: flex; height: 0.625rem; border-radius: 999px; overflow: hidden; }
.escala .zonas i { display: block; }
.escala .z-ok { background: var(--ok); } .escala .z-warn { background: var(--warn); } .escala .z-bad { background: var(--bad); }
.escala .marca { position: absolute; top: -0.3125rem; width: 1.25rem; height: 1.25rem; margin-left: -0.625rem; border-radius: 50%; background: var(--surface); border: 0.25rem solid var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.escala .etq { position: absolute; top: 0.875rem; font-size: 0.75rem; color: var(--muted); transform: translateX(-50%); }

.nota, .alerta, .formula { border-radius: 0.875rem; padding: 0.75rem 0.875rem; margin: 0.75rem 0; }
.nota { background: var(--warn-soft); }
.alerta { background: var(--bad-soft); border-left: 0.3125rem solid var(--bad); }
.formula { background: var(--brand-soft); font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 0.5625rem 0.375rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tabla-pt { font-size: 0.9375rem; }
.tabla-pt td:first-child { font-weight: 800; }
.tabla-pt tr.hl td { background: var(--brand-soft); }
.num { text-align: right; white-space: nowrap; }

.estado { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 999px; font-weight: 750; font-size: 0.875rem; }
.estado.ok { background: var(--ok-soft); color: var(--ok); }
.estado.warn { background: var(--warn-soft); color: var(--warn); }
.estado.bad { background: var(--bad-soft); color: var(--bad); }

.chk { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.75rem 0.25rem; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; margin: 0; }
.chk input { width: 1.625rem; height: 1.625rem; min-height: 1.625rem; flex: none; margin: 0; accent-color: var(--ok); box-shadow: none; }
.chk.done span { color: var(--muted); text-decoration: line-through; }

.quiz-op { display: block; width: 100%; text-align: left; font: inherit; padding: 0.875rem 1rem; margin: 0.5rem 0; border-radius: 0.875rem; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); box-shadow: var(--sombra); }
.quiz-op.ok { border-color: var(--ok); background: var(--ok-soft); }
.quiz-op.no { border-color: var(--bad); background: var(--bad-soft); }
.bar { height: 0.5rem; background: var(--line); border-radius: 0.5rem; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--frost)); border-radius: 0.5rem; }

.pill { display: inline-block; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 750; background: var(--brand-soft); white-space: nowrap; }
.pill.R22 { background: var(--r22); color: #fff; }
.pill.R410A { background: var(--r410a); color: #fff; }
.pill.R32 { background: var(--r32); color: #fff; }
.pill.R290 { background: var(--r290); color: #fff; }
.pill.vence { background: var(--warn-soft); color: var(--warn); }
.pill.vencido { background: var(--bad-soft); color: var(--bad); }
.timer { font-size: 3.5rem; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hidden { display: none !important; }

.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.5rem 0; }
.chip { font: inherit; font-size: 0.875rem; font-weight: 650; padding: 0.375rem 0.75rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); min-height: 2.5rem; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.875rem; margin: 0.625rem 0; }
summary { font-weight: 700; cursor: pointer; }

/* Ficha de gas */
.ficha-top {
  border-radius: 1.25rem; padding: 1.25rem 1.125rem; color: #fff; box-shadow: var(--sombra); position: relative; overflow: hidden;
  background: var(--c);
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 60%, #000));
}
.ficha-top h2 { margin: 0; font-size: 2.25rem; font-weight: 900; color: #fff; letter-spacing: -0.02em; }
.ficha-top p { margin: 0.125rem 0 0.625rem; opacity: .92; }
.ficha-top .pill { background: rgba(255,255,255,.22); color: #fff; margin: 0 0.25rem 0.25rem 0; }
.ficha-top .copo { position: absolute; right: -1.5rem; bottom: -1.5rem; width: 8rem; height: 8rem; opacity: .15; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.75rem 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 0.875rem; padding: 0.625rem 0.75rem; box-shadow: var(--sombra); }
.stat small { display: block; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.stat b { font-size: 1rem; }
.stat.ancho { grid-column: 1 / -1; }
.claves { list-style: none; padding: 0; }
.claves li { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.375rem 0; }
.claves li .ic { color: var(--ok); margin-top: 0.125rem; }
.comparar td, .comparar th { font-size: 0.875rem; padding: 0.5rem 0.25rem; }

/* Conceptos de cobro */
.concepto { display: flex; gap: 0.375rem; align-items: center; margin: 0.375rem 0; }
.concepto input:first-child { flex: 1; min-width: 0; }
.concepto input.precio { width: 6.5rem; flex: none; }
.concepto button { flex: none; width: 2.75rem; height: 3.25rem; border-radius: 0.875rem; border: 0; background: var(--bad-soft); color: var(--bad); font: inherit; font-weight: 800; }
.total { display: flex; justify-content: space-between; font-weight: 850; font-size: 1.25rem; padding: 0.625rem 0.25rem; border-top: 2px solid var(--line); margin-top: 0.5rem; }

/* Fotos */
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.375rem; margin: 0.5rem 0; }
.foto { position: relative; border: 0; padding: 0; background: var(--line); border-radius: 0.75rem; overflow: hidden; aspect-ratio: 1; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .quitar { position: absolute; top: 0.25rem; right: 0.25rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 1.125rem; }
.visor { position: fixed; inset: 0; z-index: 20; background: #000; display: flex; flex-direction: column; }
.visor img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.visor .acciones { padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom)); margin: 0; }

/* Aviso inferior */
.aviso {
  position: fixed; left: 0.75rem; right: 0.75rem; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 15;
  display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.625rem 0.625rem 1rem; border-radius: var(--radius);
  background: var(--hero-1); color: #fff; box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.3); max-width: 43rem; margin: 0 auto;
}
.aviso span { flex: 1; font-weight: 650; }
.aviso button { font: inherit; font-weight: 750; border: 0; border-radius: 0.75rem; min-height: 2.75rem; padding: 0 1rem; background: #fff; color: var(--hero-1); }
.aviso button.x { background: transparent; color: inherit; padding: 0 0.5rem; }
.aviso-borrador { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.aviso-borrador span { flex: 1; min-width: 10rem; }

/* Nivel */
.nivel-giro { width: min(18rem, 100%); aspect-ratio: 1; margin: 0.25rem auto; display: flex; flex-direction: column; justify-content: center; text-align: center; transition: transform .3s; }
.nivel-valor { font-size: 3.25rem; font-weight: 850; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 0.75rem 0 0.25rem; }
.nivel-valor.ok { color: var(--ok); }
.nivel-tubo { position: relative; height: 3.5rem; width: 100%; border-radius: 999px; border: 3px solid var(--line); background: var(--brand-soft); margin: 0.5rem 0; }
.nivel-tubo::before, .nivel-tubo::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--muted); }
.nivel-tubo::before { left: calc(50% - 1.9rem); }
.nivel-tubo::after { left: calc(50% + 1.8rem); }
.nivel-circulo { position: relative; width: 12rem; height: 12rem; border-radius: 50%; border: 3px solid var(--line); background: var(--brand-soft); margin: 1rem auto; }
.nivel-circulo::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4rem; height: 4rem; margin: -2rem 0 0 -2rem; border-radius: 50%; border: 2px solid var(--muted); }
.burbuja { position: absolute; left: 50%; top: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; background: var(--r22); box-shadow: inset 0 -0.25rem 0.5rem rgba(0,0,0,.25); }

.glosa { padding: 0.625rem 0.25rem; border-bottom: 1px solid var(--line); }
mark { background: var(--warn-soft); color: inherit; padding: 0 0.125rem; border-radius: 0.25rem; }

/* Diagramas, piezas, manómetros y códigos */
.diagrama { width: 100%; height: auto; color: var(--text); margin: 0.25rem 0 0.5rem; }
.diagrama .caja, .dib .caja, .mano .caja { fill: var(--surface-2); stroke: var(--muted); stroke-width: 2; }
.diagrama .borne, .dib .borne { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.diagrama .tx, .mano .tx { font: 700 13px system-ui, sans-serif; fill: var(--text); }
.diagrama .tx2 { font: 600 11px system-ui, sans-serif; fill: var(--muted); }
.mano .tx3 { font: 600 9px system-ui, sans-serif; fill: var(--muted); }
.pieza { display: flex; gap: 0.875rem; align-items: center; }
.dib { width: 4.5rem; height: 4.5rem; flex: none; color: var(--text); background: var(--surface-2); border-radius: 0.875rem; }
.dib .tx2 { font: 700 12px system-ui, sans-serif; fill: var(--text); }
.manos { display: flex; gap: 0.5rem; justify-content: center; margin: 0.75rem 0; }
.mano { flex: 1; max-width: 11rem; margin: 0; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem; box-shadow: var(--sombra); color: var(--text); }
.mano svg { width: 100%; height: auto; }
.codigo { display: flex; gap: 0.875rem; align-items: flex-start; }
.codigo .cod { flex: none; min-width: 3.5rem; text-align: center; font-weight: 850; font-size: 1.125rem; padding: 0.375rem 0.5rem; border-radius: 0.625rem; background: var(--bad-soft); color: var(--bad); }
