/* Calculadora de precios 3D · CatSuii3D. Reutiliza ../style.css (paleta oficial, modo claro/oscuro). */
.calc-page main { padding-bottom: 8px; }

/* ---------- Cabecera de la página ---------- */
.calc-hero {
  width: calc(100% - 64px);
  max-width: var(--width);
  margin: 0 auto;
  padding: 44px 0 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
}
.calc-hero-copy > * { animation: rise .9s var(--ease-out) both; }
.calc-hero-copy > *:nth-child(2) { animation-delay: .08s; }
.calc-hero-copy > *:nth-child(3) { animation-delay: .16s; }
.calc-hero-copy > *:nth-child(4) { animation-delay: .24s; }
.calc-hero-copy > *:nth-child(5) { animation-delay: .32s; }
.calc-back { margin-bottom: 24px; color: var(--rose-dark); }
.calc-hero h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 650; margin: 0 0 16px; }
.calc-lead { color: var(--muted); max-width: 560px; font-size: 1.04rem; margin: 0; }
.calc-hero .hero-tags { margin-top: 24px; }

.calc-hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 300px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  animation: pop 1.1s .12s var(--ease-out) both;
}
.calc-orbit {
  position: absolute; left: 50%; top: 50%; width: 76%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--rose-dark) 48%, transparent);
  animation: spin 28s linear infinite;
}
.calc-orbit::after {
  content: ""; position: absolute; top: 7%; left: 16%; width: 11px; height: 11px; border-radius: 50%;
  background: var(--rose-dark); box-shadow: 0 0 14px var(--rose);
}
.calc-orbit-outer {
  width: 96%; aspect-ratio: 2.1; rotate: -14deg;
  border-style: solid; border-color: color-mix(in srgb, var(--pill-text) 26%, transparent);
  animation: orbit 8s ease-in-out infinite;
}
.calc-orbit-outer::after { display: none; }
.calc-hero-art .hero-spark.cs1 { top: 12%; left: 14%; }
.calc-hero-art .hero-spark.cs2 { top: 20%; right: 10%; width: 5px; height: 5px; animation-delay: .9s; }
.calc-hero-art .hero-spark.cs3 { bottom: 18%; left: 10%; width: 6px; height: 6px; animation-delay: 1.7s; }
.calc-hero-art .hero-spark.cs4 { bottom: 12%; right: 16%; animation-delay: 2.3s; }
.calc-logo-float { position: relative; z-index: 2; animation: float 6s ease-in-out infinite; }
.calc-logo-float img {
  display: block; width: 42%; min-width: 118px; max-width: 150px; height: auto; margin: 0 auto; border-radius: 50%;
  box-shadow: 0 24px 44px -16px color-mix(in srgb, var(--rose-dark) 50%, transparent), 0 0 0 6px color-mix(in srgb, var(--surface) 70%, transparent);
}

/* ---------- Maquetación principal ---------- */
.calc-layout {
  width: calc(100% - 64px);
  max-width: var(--width);
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}
.calc-form { display: grid; gap: 20px; min-width: 0; }

.calc-card {
  margin: 0;
  min-width: 0;
  padding: 26px 28px 28px;
  border: 1px solid color-mix(in srgb, var(--app-line) 55%, transparent);
  border-radius: var(--radius);
  background: linear-gradient(150deg, color-mix(in srgb, var(--app-surface) 88%, var(--paper)), color-mix(in srgb, var(--app-card) 82%, var(--app-surface)));
  box-shadow: 0 22px 54px -40px color-mix(in srgb, var(--ink) 22%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 60%, transparent);
  transition: border-color .3s, box-shadow .4s;
}
.calc-card:focus-within {
  border-color: color-mix(in srgb, var(--rose-dark) 45%, var(--app-line));
  box-shadow: 0 26px 56px -36px var(--glow), inset 0 1px 0 color-mix(in srgb, var(--surface) 60%, transparent);
}
.calc-card legend {
  display: flex; align-items: center; gap: 12px;
  float: left; width: 100%; padding: 0; margin: 0 0 18px;
  font-size: 1.12rem; font-weight: 650; letter-spacing: -.02em;
}
.calc-step {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--button); color: var(--button-text); font-size: .8rem; font-weight: 700;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--rose) 28%, transparent);
}

.calc-card::after { content: ""; display: table; clear: both; }
.calc-grid { clear: both; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 0; }
.calc-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.calc-field-wide { grid-column: 1 / -1; }
.calc-field > label, .calc-label { font-size: .82rem; font-weight: 650; }
.calc-opt { font-family: inherit; font-style: normal; font-weight: 500; color: var(--muted); font-size: .74rem; }
.calc-field small { color: var(--muted); font-size: .74rem; line-height: 1.45; }

.calc-field input[type="text"], .calc-input input {
  width: 100%; min-width: 0; padding: 12px 14px;
  background: var(--field); border: 1px solid var(--field-line); border-radius: 12px;
  color: var(--ink); font-size: .95rem; font-variant-numeric: tabular-nums;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.calc-input { position: relative; display: flex; align-items: center; }
.calc-input input { padding-right: 62px; }
.calc-input > span {
  position: absolute; right: 12px; pointer-events: none;
  font-size: .74rem; font-weight: 700; color: var(--pill-text);
  background: color-mix(in srgb, var(--pill) 55%, transparent); padding: 2px 9px; border-radius: 50px;
}
.calc-input input:hover, .calc-field input[type="text"]:hover { border-color: color-mix(in srgb, var(--rose-dark) 40%, var(--field-line)); }
.calc-input input:focus, .calc-field input[type="text"]:focus {
  outline: none; border-color: var(--rose-dark);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rose) 35%, transparent);
}
.calc-input input::-webkit-outer-spin-button, .calc-input input::-webkit-inner-spin-button { margin: 0; }
.calc-time { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-field-time { grid-column: 1 / -1; }

.calc-derived {
  grid-column: 1 / -1; margin: 0; padding: 11px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
  border: 1px dashed color-mix(in srgb, var(--rose-dark) 35%, transparent);
  color: var(--rose-dark); font-size: .82rem; font-weight: 600;
}

/* Nota de valores medios */
.calc-note {
  clear: both; margin: -6px 0 16px; display: flex; gap: 8px; align-items: flex-start;
  font-size: .8rem; color: var(--pill-text); font-weight: 600;
}
.calc-note::before { content: "✳"; color: var(--rose-dark); line-height: 1.5; }

/* Barrita de la tasa de fallos */
.calc-range-field { gap: 10px; }
.calc-range-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.calc-range-head label { font-size: .82rem; font-weight: 650; }
.calc-range-val {
  min-width: 64px; text-align: center; padding: 3px 12px; border-radius: 50px;
  background: var(--button); color: var(--button-text); font-size: .86rem; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 18px -10px var(--glow);
}
.calc-range {
  --fill: 10%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 2px 0 0; padding: 0;
  background: transparent; cursor: pointer;
}
.calc-range:focus { outline: none; }
.calc-range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 8px;
  background: linear-gradient(90deg, var(--rose-dark) 0 var(--fill), color-mix(in srgb, var(--field-line) 75%, transparent) var(--fill) 100%);
}
.calc-range::-moz-range-track { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--field-line) 75%, transparent); }
.calc-range::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--rose-dark); }
.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--rose-dark);
  box-shadow: 0 6px 14px -4px var(--glow), 0 0 0 0 color-mix(in srgb, var(--rose) 40%, transparent);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.calc-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--rose-dark);
  box-shadow: 0 6px 14px -4px var(--glow); transition: transform .3s var(--ease-out), box-shadow .3s;
}
.calc-range:hover::-webkit-slider-thumb, .calc-range:active::-webkit-slider-thumb { transform: scale(1.15); }
.calc-range:hover::-moz-range-thumb, .calc-range:active::-moz-range-thumb { transform: scale(1.15); }
.calc-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rose) 40%, transparent); }
.calc-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rose) 40%, transparent); }
.calc-range-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); font-weight: 600; margin-top: -4px; }

/* Interruptor IVA */
.calc-switch { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; cursor: pointer; font-size: .88rem; font-weight: 600; }
.calc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-switch-track {
  position: relative; width: 46px; height: 26px; flex-shrink: 0; border-radius: 50px;
  background: var(--field-line); transition: background .3s;
}
.calc-switch-track span {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 3px 8px -2px #0004; transition: transform .4s var(--ease-out);
}
.calc-switch input:checked + .calc-switch-track { background: var(--rose-dark); }
.calc-switch input:checked + .calc-switch-track span { transform: translateX(20px); }
.calc-switch input:focus-visible + .calc-switch-track { outline: 3px solid var(--rose-dark); outline-offset: 4px; }

/* ---------- Panel de resultado ---------- */
.calc-result { position: sticky; top: 104px; min-width: 0; }
.calc-result-inner {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 28px 26px 26px; border-radius: var(--radius);
  background: linear-gradient(155deg, color-mix(in srgb, var(--hero-panel) 92%, var(--paper)), color-mix(in srgb, var(--models-surface) 70%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--models-line) 70%, transparent);
  box-shadow: 0 30px 60px -38px var(--glow), inset 0 1px 0 color-mix(in srgb, var(--surface) 60%, transparent);
}
.calc-result-inner::before {
  content: ""; position: absolute; z-index: -1; right: -70px; top: -70px; width: 220px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-violet), transparent 68%); animation: orbit 6s ease-in-out infinite;
}
.calc-result .eyebrow { margin-bottom: 6px; }
.calc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }
.calc-piece { margin: 0 0 14px; font-size: .86rem; color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.calc-total { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.calc-total-num {
  font-size: clamp(2.5rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.05;
  color: var(--rose-dark); font-variant-numeric: tabular-nums;
}
.calc-total-note { font-size: .8rem; font-weight: 650; color: var(--pill-text); text-transform: uppercase; letter-spacing: .12em; }

.calc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.calc-kpis > div {
  padding: 11px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface) 55%, var(--models-line));
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.calc-kpis span { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.calc-kpis strong { font-size: 1rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Donut */
.calc-donut-wrap { position: relative; width: min(100%, 212px); margin: 0 auto 22px; aspect-ratio: 1; }
.calc-donut { width: 100%; height: 100%; rotate: -90deg; overflow: visible; animation: calc-donut-in 1.1s var(--ease-out) both; }
@keyframes calc-donut-in { from { opacity: 0; transform: scale(.8) rotate(-40deg); } to { opacity: 1; transform: none; } }
.calc-donut circle { fill: none; stroke-width: 15; }
.calc-donut-bg { stroke: color-mix(in srgb, var(--surface) 55%, transparent); }
.calc-seg { stroke-linecap: butt; transition: stroke-dasharray .7s var(--ease-out), stroke-dashoffset .7s var(--ease-out), opacity .4s; }
.calc-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
.calc-donut-center span { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.calc-donut-center strong { font-size: 1.7rem; letter-spacing: -.04em; color: var(--rose-dark); font-variant-numeric: tabular-nums; }
.calc-donut-center small { font-size: .7rem; color: var(--muted); }

/* Desglose */
.calc-breakdown { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 4px; }
.calc-row {
  position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px;
  padding: 8px 2px 12px; font-size: .86rem;
}
.calc-row[hidden] { display: none; }
.calc-dot { width: 10px; height: 10px; border-radius: 50%; }
.calc-row-name { font-weight: 600; min-width: 0; }
.calc-row-pct { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.calc-row-val { font-variant-numeric: tabular-nums; min-width: 70px; text-align: right; }
.calc-row-bar {
  grid-column: 2 / -1; display: block; height: 4px; border-radius: 4px; overflow: hidden;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.calc-row-bar i { display: block; height: 100%; border-radius: 4px; transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease-out); }
.calc-row.is-zero { opacity: .5; }
.calc-row-sum { grid-template-columns: minmax(0, 1fr) auto; padding: 7px 2px; }
.calc-row-sum .calc-row-name { color: var(--muted); font-weight: 600; }
.calc-row-sum.is-first { margin-top: 6px; border-top: 1px dashed color-mix(in srgb, var(--rose-dark) 35%, transparent); padding-top: 12px; }

.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.calc-actions .button { flex: 1 1 180px; gap: 12px; }
.calc-ghost {
  flex: 0 0 auto; padding: 13px 20px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--rose-dark) 45%, transparent);
  background: transparent; color: var(--rose-dark); font-weight: 650; font-size: .9rem;
  transition: background .25s, transform .3s var(--ease-out), color .25s;
}
.calc-ghost:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); transform: translateY(-2px); }
.calc-status {
  min-height: 1.4em; margin: 12px 0 0; font-size: .82rem; font-weight: 650; color: var(--pill-text);
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .4s var(--ease-out);
}
.calc-status.is-on { opacity: 1; transform: none; }

/* ---------- Cómo se calcula ---------- */
.calc-how { width: calc(100% - 64px); max-width: var(--width); margin: 28px auto 56px; }
.calc-how details {
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 80%, transparent); overflow: hidden;
}
.calc-how summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none;
  padding: 20px 26px; cursor: pointer; font-weight: 650; font-size: 1.02rem;
}
.calc-how summary::-webkit-details-marker { display: none; }
.calc-plus { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); flex-shrink: 0; transition: transform .45s var(--ease-out), background .25s; }
.calc-plus::before, .calc-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--rose-dark); translate: -50% -50%; }
.calc-plus::after { rotate: 90deg; transition: rotate .45s var(--ease-out); }
.calc-how details[open] .calc-plus { transform: rotate(180deg); }
.calc-how details[open] .calc-plus::after { rotate: 0deg; }
.calc-how summary:hover .calc-plus { background: var(--rose); }
.calc-how-body { padding: 0 26px 24px; color: var(--muted); font-size: .92rem; animation: rise .5s var(--ease-out) both; }
.calc-how-body ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; }
.calc-how-body strong { color: var(--ink); }
.calc-how-body p { margin: 0; font-size: .86rem; }

/* ---------- Botón flotante (móvil) ---------- */
.calc-float-total {
  position: fixed; z-index: 25; left: 50%; bottom: 18px; translate: -50% 0;
  display: none; align-items: center; gap: 12px; padding: 11px 20px; border-radius: 50px; text-decoration: none;
  background: var(--button); color: var(--button-text); font-size: .86rem; font-weight: 650;
  box-shadow: 0 18px 36px -14px var(--glow-violet);
  transition: opacity .35s, transform .45s var(--ease-out);
}
.calc-float-total strong { font-size: 1.05rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-float-total.is-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-result { position: static; }
  .calc-float-total { display: inline-flex; }
}
@media (max-width: 760px) {
  .calc-hero, .calc-layout, .calc-how { width: calc(100% - 40px); }
  .calc-hero { grid-template-columns: 1fr; padding: 28px 0 14px; gap: 18px; }
  .calc-hero-art { width: 170px; order: -1; justify-self: start; }
  .calc-logo-float img { width: 62%; min-width: 0; }
  .calc-card { padding: 22px 20px 24px; border-radius: 20px; }
  .calc-result-inner { padding: 24px 20px; }
}
@media (max-width: 520px) {
  .calc-hero, .calc-layout, .calc-how { width: calc(100% - 32px); }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
  .calc-kpis { grid-template-columns: 1fr 1fr; }
  .calc-kpis > div:last-child { grid-column: 1 / -1; }
  .calc-how summary { padding: 18px 20px; }
  .calc-how-body { padding: 0 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .calc-hero-copy > *, .calc-hero-art, .calc-orbit, .calc-orbit-outer, .calc-logo-float, .calc-donut, .calc-result-inner::before, .calc-how-body { animation: none !important; }
  .calc-range::-webkit-slider-thumb, .calc-range::-moz-range-thumb, .calc-seg, .calc-row-bar i, .calc-status, .calc-switch-track span, .calc-plus, .calc-plus::after, .calc-float-total { transition: none !important; }
}

/* ---------- Importar archivo laminado ---------- */
.calc-import { padding-bottom: 24px; }
.calc-import-title { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; font-size: 1.12rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.calc-step-icon svg { width: 16px; height: 16px; display: block; }
.calc-note-flat { margin: 6px 0 16px 0; }

.imp-drop {
  position: relative; display: flex; align-items: center; gap: 22px; isolation: isolate; overflow: hidden;
  padding: 22px 26px; border-radius: 20px; cursor: pointer;
  border: 2px dashed color-mix(in srgb, var(--rose-dark) 50%, transparent);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  transition: transform .4s var(--ease-out), border-color .3s, background .3s, box-shadow .4s;
}
.imp-drop::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7;
  background: radial-gradient(260px circle at 12% 50%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 70%);
  transition: transform .8s var(--ease-out), opacity .3s;
}
.imp-drop::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--ease-out);
}
.imp-drop:hover { transform: translateY(-3px); border-color: var(--rose-dark); box-shadow: 0 22px 40px -26px var(--glow); }
.imp-drop:hover::after { transform: translateX(120%); }
.imp-drop:hover::before { transform: translateX(8%); opacity: 1; }
.imp-drop input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 3; }
.imp-drop:has(input:focus-visible) { outline: 3px solid var(--rose-dark); outline-offset: 4px; }

.imp-zone { position: relative; flex: 0 0 auto; width: 92px; height: 92px; display: grid; place-items: center; }
.imp-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--rose-dark) 55%, transparent); animation: spin 22s linear infinite;
}
.imp-ring::after { content: ""; position: absolute; top: 6%; left: 18%; width: 9px; height: 9px; border-radius: 50%; background: var(--rose-dark); box-shadow: 0 0 12px var(--rose); }
.imp-icon {
  position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px;
  background: var(--surface); color: var(--rose-dark);
  border: 1px solid color-mix(in srgb, var(--rose) 45%, var(--line));
  box-shadow: 0 16px 28px -14px var(--glow-violet); animation: float 5.5s ease-in-out infinite;
}
.imp-icon svg { width: 28px; height: 28px; transition: transform .5s var(--ease-out); }
.imp-drop:hover .imp-icon svg { transform: translateY(-3px); }

.imp-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.imp-title-text { font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.25; }
.imp-sub { font-size: .86rem; color: var(--muted); }
.imp-sub u { text-decoration-color: var(--rose-dark); text-underline-offset: 3px; color: var(--rose-dark); font-weight: 650; }
.imp-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.imp-formats span {
  padding: 3px 11px; border-radius: 50px; font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  background: color-mix(in srgb, var(--pill) 60%, transparent); color: var(--pill-text);
}

.imp-drop.is-over {
  transform: scale(1.015); border-style: solid; border-color: var(--rose-dark);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--rose) 30%, transparent), 0 26px 46px -24px var(--glow);
}
.imp-drop.is-over .imp-icon { animation: imp-bounce .7s var(--ease-out) infinite alternate; }
.imp-drop.is-over .imp-title-text::after { content: " — suéltalo aquí"; color: var(--rose-dark); }
@keyframes imp-bounce { from { transform: translateY(0) scale(1); } to { transform: translateY(-8px) scale(1.08); } }
.imp-drop.is-busy { pointer-events: none; opacity: .85; }
.imp-drop.is-done { animation: imp-done 1s var(--ease-out); }
@keyframes imp-done { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rose-dark) 55%, transparent); } 100% { box-shadow: 0 0 0 22px transparent; } }

.imp-privacy { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: .78rem; color: var(--muted); font-weight: 600; }
.imp-privacy svg { width: 15px; height: 15px; color: var(--rose-dark); flex-shrink: 0; }

.imp-state { margin-top: 14px; padding: 14px 18px; border-radius: 14px; font-size: .86rem; line-height: 1.55; animation: rise .5s var(--ease-out) both; }
.imp-state[hidden], .imp-result[hidden] { display: none; }
.imp-state.is-loading { display: flex; align-items: center; gap: 12px; color: var(--pill-text); font-weight: 650; background: color-mix(in srgb, var(--pill) 40%, transparent); }
.imp-state.is-error { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); border: 1px dashed color-mix(in srgb, var(--rose-dark) 55%, transparent); }
.imp-state ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.imp-spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--pill-text) 25%, transparent); border-top-color: var(--pill-text); animation: spin .8s linear infinite; }

.imp-result { margin-top: 14px; display: grid; gap: 12px; animation: rise .55s var(--ease-out) both; }
.imp-chip {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--rose-dark) 38%, var(--line));
  font-weight: 650; font-size: .88rem; overflow-wrap: anywhere;
}
.imp-check { width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--button); color: var(--button-text); animation: imp-pop .6s var(--ease-out) both; }
.imp-check svg { width: 16px; height: 16px; }
@keyframes imp-pop { from { transform: scale(.3) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.imp-chip-text { flex: 1; min-width: 0; }
.imp-close { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: background .2s, color .2s; }
.imp-close:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--rose-dark); }
.imp-hint { margin: 2px 0 -4px; font-size: .82rem; font-weight: 650; color: var(--pill-text); }
.imp-plates { display: flex; flex-wrap: wrap; gap: 8px; }
.imp-notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.imp-notes b { color: var(--ink); }
.imp-cost {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--pill-text) 45%, transparent); font-size: .8rem; color: var(--muted);
}
.imp-cost span { flex: 1 1 260px; }
.imp-cost b { color: var(--ink); }
.imp-cost .calc-ghost { padding: 9px 16px; font-size: .82rem; }
.imp-cost .calc-ghost:disabled { opacity: .6; cursor: default; transform: none; }

.calc-chip-btn {
  padding: 8px 16px; border-radius: 50px; border: 1px solid var(--app-line);
  background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink);
  font-size: .82rem; font-weight: 650;
  transition: transform .3s var(--ease-out), background .25s, color .25s, border-color .25s, box-shadow .3s;
}
.calc-chip-btn:hover { transform: translateY(-2px); border-color: var(--rose-dark); }
.calc-chip-btn[aria-checked="true"] { background: var(--button); color: var(--button-text); border-color: transparent; box-shadow: 0 10px 22px -10px var(--glow); }

/* Campos rellenados desde el archivo */
.calc-fromfile {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 50px; vertical-align: 1px;
  background: var(--pill); color: var(--pill-text); font-size: .66rem; font-weight: 700; letter-spacing: .02em;
}
.calc-field.is-filled .calc-input input, .calc-field.is-filled input[type="text"] { animation: imp-flash 2s var(--ease-out); }
@keyframes imp-flash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rose-dark) 60%, transparent); background: color-mix(in srgb, var(--accent-soft) 70%, var(--field)); }
  35% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rose) 45%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; background: var(--field); }
}

/* Lista de formatos */
.imp-formats .imp-more-pill { background: transparent; color: var(--muted); font-weight: 650; padding-left: 4px; }
.imp-all { margin: 12px 0 0; border-radius: 14px; border: 1px solid var(--app-line); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.imp-all summary {
  cursor: pointer; list-style: none; padding: 11px 16px; font-size: .82rem; font-weight: 700; color: var(--rose-dark);
  display: flex; align-items: center; gap: 8px; border-radius: 14px;
}
.imp-all summary::-webkit-details-marker { display: none; }
.imp-all summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s var(--ease-out); }
.imp-all[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.imp-all summary:focus-visible { outline: 3px solid var(--rose-dark); outline-offset: 2px; }
.imp-all-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 2px 16px 4px; }
.imp-all-grid h3 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .02em; color: var(--pill-text); }
.imp-all-grid p, .imp-all-note { margin: 0; font-size: .78rem; line-height: 1.6; color: var(--muted); }
.imp-all-grid b { color: var(--ink); font-weight: 700; }
.imp-all-note { padding: 8px 16px 14px; }
.imp-all[open] .imp-all-grid { animation: rise .45s var(--ease-out) both; }
@media (max-width: 640px) { .imp-all-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .imp-all[open] .imp-all-grid { animation: none !important; } .imp-all summary::after { transition: none !important; } }

@media (max-width: 520px) {
  .imp-drop { flex-direction: column; text-align: center; padding: 22px 18px; gap: 12px; }
  .imp-copy { align-items: center; }
  .imp-formats { justify-content: center; }
  .imp-drop.is-over .imp-title-text::after { content: ""; }
}
@media (prefers-reduced-motion: reduce) {
  .imp-ring, .imp-icon, .imp-drop.is-over .imp-icon, .imp-drop.is-done, .imp-state, .imp-result, .imp-check, .imp-spinner,
  .calc-field.is-filled .calc-input input, .calc-field.is-filled input[type="text"] { animation: none !important; }
  .imp-spinner { border-top-color: var(--pill-text); }
  .imp-drop, .imp-drop::before, .imp-drop::after, .imp-icon svg, .calc-chip-btn { transition: none !important; }
  .imp-drop:hover, .imp-drop.is-over { transform: none; }
}

/* ---------- Tipo de impresión: filamento / resina ---------- */
.calc-mode-card { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 22px; padding: 20px 24px; }
.calc-mode-card .calc-mode-title { margin: 0; font-size: 1.12rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.calc-mode {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 50px; isolation: isolate;
  background: color-mix(in srgb, var(--pill) 45%, var(--field, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--app-line) 70%, transparent);
  box-shadow: inset 0 2px 6px -3px color-mix(in srgb, var(--ink) 25%, transparent);
  justify-self: end; width: min(100%, 360px);
}
.calc-mode-pill {
  position: absolute; z-index: -1; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 50px;
  background: var(--button); box-shadow: 0 10px 22px -10px var(--glow), 0 0 0 4px color-mix(in srgb, var(--rose) 22%, transparent);
  transition: transform .55s cubic-bezier(.34, 1.45, .55, 1), background .3s;
}
.calc-mode[data-active="resina"] .calc-mode-pill { transform: translateX(100%); }
.calc-mode-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 0; border-radius: 50px;
  background: transparent; color: var(--ink); font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer;
  transition: color .3s, transform .3s var(--ease-out);
}
.calc-mode-btn svg { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }
.calc-mode-btn:hover { transform: translateY(-1px); }
.calc-mode-btn:hover svg { transform: rotate(-12deg) scale(1.08); }
.calc-mode-btn[aria-checked="true"] { color: var(--button-text); }
.calc-mode-btn[aria-checked="true"] svg { animation: mode-pop .6s var(--ease-out); }
.calc-mode-btn:focus-visible { outline: 3px solid var(--rose-dark); outline-offset: 3px; }
@keyframes mode-pop { 0% { transform: scale(.6) rotate(-25deg); } 60% { transform: scale(1.18) rotate(6deg); } 100% { transform: none; } }
.calc-mode-help { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--muted); }

body[data-modo="resina"] .only-fdm, body:not([data-modo="resina"]) .only-resin { display: none !important; }
.calc-form.is-switching .calc-grid .calc-field { animation: mode-fade .45s var(--ease-out) both; }
@keyframes mode-fade { from { opacity: .35; } to { opacity: 1; } }

@media (max-width: 560px) {
  .calc-mode-card { grid-template-columns: 1fr; }
  .calc-mode { justify-self: stretch; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-mode-pill, .calc-mode-btn, .calc-mode-btn svg { transition: none !important; }
  .calc-mode-btn[aria-checked="true"] svg, .calc-form.is-switching .calc-grid .calc-field { animation: none !important; }
}
