@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f7fb;
  --bg-2: #eef0f6;
  --card: #ffffff;
  --card-2: #f8f9fc;
  --line: #e4e7ef;
  --text: #12141c;
  --text-2: #4a5065;
  --muted: #858ba0;
  --accent: #6d4dff;
  --accent-2: #22b8d6;
  --accent-soft: #efeaff;
  --accent-text: #5133e6;
  --ok: #16a34a;
  --ok-soft: #e6f6ec;
  --warn: #c27803;
  --warn-soft: #fdf3dc;
  --err: #dc2626;
  --err-soft: #fde8e8;
  --shadow: 0 1px 2px rgb(16 20 40 / .05), 0 8px 24px -12px rgb(16 20 40 / .12);
  --radius: 18px;
  --radius-sm: 12px;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4f8bff 55%, #22d3ee 100%);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --card: #151821;
  --card-2: #1a1e29;
  --line: #262b38;
  --text: #eef0f6;
  --text-2: #b4b9c9;
  --muted: #7d8396;
  --accent: #8b72ff;
  --accent-soft: #231d45;
  --accent-text: #b3a3ff;
  --ok: #34d399;
  --ok-soft: #10291f;
  --warn: #fbbf24;
  --warn-soft: #2b2312;
  --err: #f87171;
  --err-soft: #2c1517;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -16px rgb(0 0 0 / .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'tnum';
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed; inset: -20vh -10vw auto -10vw; height: 60vh; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 20% 0%, rgb(124 92 255 / .16), transparent 70%), radial-gradient(50% 50% at 90% 10%, rgb(34 211 238 / .12), transparent 70%);
}
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: .92em; letter-spacing: -.01em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; box-shadow: 0 6px 16px -6px rgb(109 77 255 / .6); }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { color: var(--text-2); padding: 7px 12px; border-radius: 999px; font-weight: 520; font-size: 14px; }
.topnav a.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
@media (max-width: 560px) {
  .brand-name { display: none; }
  .topnav { margin-left: 0; }
}

/* ---------- layout ---------- */
.app { width: 100%; max-width: 1080px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-left)) 140px; }
.boot { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -.035em; line-height: 1.1; margin: 6px 0 6px; font-weight: 720; }
h2 { font-size: 18px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 660; }
h3 { font-size: 15px; margin: 0; font-weight: 620; letter-spacing: -.01em; }
.lead { color: var(--text-2); margin: 0 0 22px; font-size: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 650; color: var(--accent-text); }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.pad-lg { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .icon { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.card-head .icon svg { width: 18px; height: 18px; }

/* ---------- home ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool { display: flex; flex-direction: column; gap: 14px; color: var(--text); transition: transform .15s ease, border-color .15s ease; position: relative; overflow: hidden; }
.tool:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tool .art { height: 120px; margin: -18px -18px 0; background: var(--grad); position: relative; overflow: hidden; }
.tool .art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 120% at 100% 0%, rgb(255 255 255 / .35), transparent 60%); }
.tool .art svg { position: absolute; right: 18px; bottom: -14px; width: 120px; height: 120px; color: rgb(255 255 255 / .9); }
.tool p { margin: 0; color: var(--text-2); font-size: 14px; }
.tool .go { display: flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 600; font-size: 14px; }
.tool.soon { box-shadow: none; background: transparent; border-style: dashed; color: var(--muted); justify-content: center; align-items: center; min-height: 180px; text-align: center; }

/* ---------- botones e inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .1s ease, background .15s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 24px -12px rgb(109 77 255 / .9); }
.btn.primary:disabled { filter: grayscale(.7); opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.small { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; }
.btn.danger { color: var(--err); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--text-2); font-weight: 560; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px; /* 16px: iOS no hace zoom */
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea.input { min-height: 160px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; min-height: 36px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---------- subir ---------- */
.drop {
  border: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: var(--radius); padding: 38px 20px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, transparent), transparent); transition: background .2s, border-color .2s;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .big-icon { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 12px 30px -14px rgb(109 77 255 / .9); }
.drop .big-icon svg { width: 28px; height: 28px; }
.drop strong { font-size: 17px; display: block; margin-bottom: 4px; }
.formats { display: flex; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.err { background: var(--err-soft); color: var(--err); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: -.01em; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; min-height: 36px; }
.filter.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter .n { opacity: .6; margin-left: 4px; font-weight: 500; }

/* ---------- progreso ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); background: var(--grad); border-radius: 99px; transition: width .4s ease; }
.progress.indeterminate > i { width: 35%; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ---------- stepper ---------- */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.step { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.step::before { content: ''; height: 4px; border-radius: 99px; background: var(--line); }
.step.on { color: var(--text); }
.step.on::before, .step.done::before { background: var(--grad); }
.step.done { color: var(--text-2); }

/* ---------- resumen de la compra ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 560; }
.stat .v { font-size: 22px; font-weight: 720; letter-spacing: -.03em; margin-top: 2px; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 3px; }
.stat.ok .v { color: var(--ok); }
.stat.err .v { color: var(--err); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 13px; font-size: 13.5px; background: var(--bg-2); color: var(--text-2); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.err { background: var(--err-soft); color: var(--err); }

/* ---------- slider de margen ---------- */
.margin { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y;
  --fill: 26.6%;
}
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) 0, var(--accent-2) var(--fill), var(--line) var(--fill)); }
.range::-moz-range-track { height: 8px; border-radius: 99px; background: var(--line); }
.range::-moz-range-progress { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 4px 12px rgb(20 20 50 / .25), inset 0 0 0 7px var(--accent); transition: transform .1s; }
.range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 4px 12px rgb(20 20 50 / .25), inset 0 0 0 7px var(--accent); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 0 0 7px var(--accent); }
.pct { position: relative; width: 92px; }
.pct input { width: 100%; min-height: 42px; padding: 8px 26px 8px 12px; text-align: right; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); font-weight: 700; font-size: 16px; outline: none; }
.pct input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.pct::after { content: '%'; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; pointer-events: none; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 0 4px; margin-top: -4px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.preset { border: 1px solid var(--line); background: var(--card-2); border-radius: 10px; padding: 5px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2); min-height: 32px; }
.preset.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* ---------- artículos ---------- */
.list { display: grid; gap: 12px; }
.art-card { padding: 14px; display: grid; gap: 12px; transition: opacity .2s, border-color .2s; }
.art-card.off { opacity: .5; }
.art-card.flag-err { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); }
.art-top { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: start; }
.thumb { width: 76px; height: 76px; border-radius: 14px; background: var(--bg-2); overflow: hidden; position: relative; flex: none; display: grid; place-items: center; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .count { position: absolute; right: 4px; bottom: 4px; background: rgb(0 0 0 / .6); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 99px; }
.thumb svg { width: 26px; height: 26px; }
.art-title { width: 100%; border: 0; background: transparent; font-weight: 650; font-size: 16px; letter-spacing: -.015em; padding: 4px 6px; margin: -4px -6px 2px; border-radius: 8px; outline: none; }
.art-title:hover { background: var(--bg-2); }
.art-title:focus { background: var(--card-2); box-shadow: 0 0 0 2px var(--accent); }
.art-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.art-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transition: transform .2s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.pricing { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.money .k { font-size: 11.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.money .v { font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.money.sale .v { font-size: 19px; color: var(--accent-text); }
.price-input { width: 104px; border: 0; background: transparent; font-weight: 750; font-size: 19px; letter-spacing: -.02em; color: var(--accent-text); padding: 2px 4px; margin: -2px -4px; border-radius: 8px; outline: none; text-align: right; }
.price-input:focus { background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.money.sale { text-align: right; }
.money.sale .k { justify-content: flex-end; }
.margin-mini { display: grid; gap: 2px; }
.margin-mini .row { gap: 8px; }
.margin-mini .pct { width: 78px; }
.margin-mini .pct input { min-height: 36px; font-size: 15px; }
.reset { border: 0; background: var(--accent-soft); color: var(--accent-text); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; cursor: pointer; }
@media (max-width: 640px) {
  .pricing { grid-template-columns: 1fr 1fr; }
  .pricing .margin-mini { grid-column: 1 / -1; order: 3; }
}
.art-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.disclosure { border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 4px; cursor: pointer; border-radius: 8px; min-height: 34px; }
.disclosure svg { width: 16px; height: 16px; transition: transform .2s; }
.disclosure[aria-expanded='true'] svg { transform: rotate(90deg); }
.variants { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.vcolor { display: grid; gap: 7px; }
.vcolor-name { display: flex; align-items: center; gap: 8px; font-weight: 620; font-size: 13.5px; }
.vcolor-name .n { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); flex: none; }
.sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.size { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 650; }
.size b { font-weight: 800; color: var(--accent-text); }
.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; flex: none; background: var(--bg-2); }
.result { font-size: 12.5px; }

/* ---------- barra inferior ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.dock-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.dock .sum { display: grid; line-height: 1.2; min-width: 0; }
.dock .sum b { font-size: 17px; letter-spacing: -.02em; }
.dock .sum span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock .btn { margin-left: auto; }

/* ---------- carga ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(5 6 12 / .5); z-index: 40; display: grid; align-items: end; justify-items: center; animation: fade .2s ease; }
@media (min-width: 720px) { .sheet-backdrop { align-items: center; } }
.sheet { width: min(560px, 100%); max-height: 88dvh; overflow: auto; background: var(--card); border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px rgb(0 0 0 / .5); animation: up .25s ease; }
@media (min-width: 720px) { .sheet { border-radius: 24px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.result-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.result-item { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.result-item:last-child { border-bottom: 0; }
.result-item .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ---------- historial ---------- */
.hist { display: grid; gap: 10px; }
.hist-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; color: var(--text); }
.hist-item .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.hist-item .ic svg { width: 20px; height: 20px; }
.hist-item .t { font-weight: 640; }
.hist-item .s { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 560; font-size: 14px; box-shadow: 0 16px 40px -16px rgb(0 0 0 / .5); animation: up .2s ease; }
.toast.err { background: var(--err); color: #fff; }

.login { max-width: 420px; margin: 10vh auto 0; text-align: center; }
.login .brand-mark { width: 56px; height: 56px; border-radius: 18px; font-size: 26px; margin: 0 auto 14px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- que nada desborde en el celular ---------- */
.stack > *, .card-head > div, .art-main, .dock .sum { min-width: 0; }
h1, h2, .art-title { overflow-wrap: anywhere; }
.card-head h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.i { width: 1.15em; height: 1.15em; flex: none; }
.tool .art svg.i { width: 120px; height: 120px; }
.go svg.i { width: 18px; height: 18px; }
.thumb svg.i { width: 26px; height: 26px; }
.hist-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
.hist-item .t, .hist-item .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
textarea.art-title { resize: none; overflow: hidden; line-height: 1.3; display: block; font-family: inherit; }
.dock .btn { margin-left: 0; }
.dock .sum { margin-right: auto; }
.hist-item .s { white-space: normal; }
.ticks { margin-right: 104px; padding: 0 2px; }
