:root {
  --bg: #0A1222;
  --surface: #101B33;
  --surface-2: #16244A;
  --line: #22335C;
  --text: #E8F1FF;
  --muted: #8FA3C7;
  --accent: #5AB4FF;
  --accent-strong: #2E8BEA;
  --accent-soft: rgba(90, 180, 255, 0.12);
  --chart: #4AA3F5;
  --good: #34D399;
  --ok: #FBBF24;
  --bad: #F87171;
  --radius: 14px;
  --tabbar-h: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #12224A 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);
}
h1, h2 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 24px; text-wrap: balance; }
h2 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--bad); min-height: 1.2em; margin: 0; }
.num, .hero-num, dd, .metric b { font-variant-numeric: tabular-nums; }

main { max-width: 980px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) 16px 0; }
.view { display: flex; flex-direction: column; gap: 16px; }
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cards2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 720px) { .cards3, .cards2 { grid-template-columns: 1fr; } }

/* ---------- Cabina ---------- */
.cockpit {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: linear-gradient(160deg, #13244C 0%, #0C1730 70%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px 20px 8px 8px;
  overflow: hidden;
  min-height: 280px;
}
.car { width: 100%; min-width: 0; overflow: hidden; height: 280px; touch-action: pan-y; cursor: grab; }
.car canvas { display: block; width: 100% !important; height: 100% !important; }
.car-caption { position: absolute; left: 20px; bottom: 12px; margin: 0; font-size: 12px; color: var(--muted); }
.cockpit-stats .label, .label { font-size: 12px; color: var(--muted); text-transform: none; margin: 0; }
.hero-num { font-size: 44px; font-weight: 700; margin: 2px 0 8px; letter-spacing: -0.02em; line-height: 1; }
.hero-num.neg { color: var(--bad); }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.6s cubic-bezier(.2,.8,.2,1); }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 8px; }
.mini div { background: rgba(255,255,255,0.03); border-radius: 10px; padding: 8px; }
.mini dt { font-size: 11px; color: var(--muted); }
.mini dd { margin: 0; font-size: 17px; font-weight: 650; }
@media (max-width: 720px) {
  .cockpit { grid-template-columns: minmax(0, 1fr); padding: 0 16px 36px; }
  .car { height: 220px; }
}

/* ---------- Métricas ---------- */
.metric-head { display: flex; justify-content: space-between; align-items: baseline; }
.metric-head .big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-top: 10px; font-size: 13px; }
.metric-grid span { color: var(--muted); }
.metric-grid b { font-weight: 600; text-align: right; white-space: nowrap; }
.chart-wrap { position: relative; height: 200px; }
.table-toggle { margin-top: 8px; font-size: 13px; color: var(--muted); }
.table-toggle table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table-toggle td, .table-toggle th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.table-toggle td:first-child, .table-toggle th:first-child { text-align: left; }

.pill-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill-list li { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 4px 10px; font-size: 13px; }
.insight-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.insight-row span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }

.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-list li:last-child { border-bottom: 0; }
.order-list .grow { flex: 1; min-width: 0; }
.order-list .net { font-weight: 650; font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }

/* ---------- Botones e inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.primary:hover { background: #3A97F2; }
.btn.ghost { background: transparent; }
.btn.chip { padding: 7px 12px; font-size: 13px; border-radius: 99px; white-space: nowrap; }
.btn.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.big { width: 100%; padding: 16px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 8px; margin: 4px 0 12px; }
.row .btn { flex: 1; }

input, select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font: inherit; font-size: 16px; /* 16px evita el zoom en iPhone */
}
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

/* ---------- Evaluar ---------- */
.where { display: flex; align-items: center; gap: 8px; }
.where select { flex: 1; }
.scan {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; text-align: center;
  border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 16px;
}
.scan.busy { opacity: .6; pointer-events: none; }
.order-card { position: relative; margin-bottom: 12px; }
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .letter { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.oc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.oc-grid .wide { grid-column: 1 / -1; }
.remove { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 8px; cursor: pointer; }

.summary { border-radius: 14px; padding: 14px 16px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); }
.result { border-left: 4px solid var(--line); margin-bottom: 12px; }
.result.TOMALA { border-left-color: var(--good); }
.result.PUEDES { border-left-color: var(--ok); }
.result.NO { border-left-color: var(--bad); }
.result.best { box-shadow: 0 0 0 1px var(--good), 0 8px 30px rgba(52, 211, 153, 0.12); }
.verdict { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.verdict .badge { font-weight: 800; font-size: 17px; letter-spacing: .01em; }
.TOMALA .badge { color: var(--good); }
.PUEDES .badge { color: var(--ok); }
.NO .badge { color: var(--bad); }
.verdict .best-tag { margin-left: auto; font-size: 12px; background: rgba(52,211,153,.15); color: var(--good); padding: 3px 8px; border-radius: 99px; font-weight: 700; }
.result .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.result .nums div { background: rgba(255,255,255,.03); border-radius: 8px; padding: 6px 8px; }
.result .nums span { display: block; font-size: 11px; color: var(--muted); }
.result .nums b { font-variant-numeric: tabular-nums; }
.result ul { margin: 6px 0 10px; padding-left: 18px; color: var(--muted); font-size: 13px; }
.result .took { width: 100%; }

/* ---------- Chat ---------- */
.chat-view { min-height: calc(100dvh - var(--tabbar-h) - 40px); }
.suggestions { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--accent-strong); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.thinking { color: var(--muted); }
.chat-form { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); display: flex; gap: 8px; background: var(--bg); padding-top: 8px; }

/* ---------- Ajustes ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.settings-grid h3 { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; color: var(--accent); font-weight: 650; }
.settings-grid .btn { grid-column: 1 / -1; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 18, 34, 0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { color: var(--accent); }

/* ---------- PIN y toast ---------- */
.lock { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--bg); padding: 24px; }
.lock-card { width: min(340px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.brand-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: linear-gradient(140deg, var(--accent), var(--accent-strong)); color: #fff; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; z-index: 20; max-width: 90vw;
}
[hidden] { display: none !important; }

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

/* ---------- Evaluar: estructura ---------- */
.eval-grid, .eval-left, .eval-right { display: flex; flex-direction: column; gap: 16px; }
.eval-empty { display: none; }
.side-brand { display: none; }

/* ---------- Escritorio (Mac) ---------- */
@media (min-width: 960px) {
  :root { --sidebar-w: 220px; }
  body { padding-bottom: 32px; }
  main { max-width: 1240px; margin-left: var(--sidebar-w); margin-right: auto; padding: 32px 40px 0; }
  @media (min-width: 1500px) { main { margin-left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w) - 1240px) / 2); } }

  .tabbar {
    top: 0; right: auto; width: var(--sidebar-w); height: 100vh; padding: 24px 12px;
    display: flex; flex-direction: column; gap: 4px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .side-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; padding: 0 12px 20px; }
  .small-mark { width: 32px; height: 32px; margin: 0; border-radius: 10px; font-size: 17px; }
  .tabbar button {
    flex-direction: row; justify-content: flex-start; gap: 12px; height: 44px; padding: 0 12px;
    border-radius: 10px; font-size: 14px;
  }
  .tabbar button:hover { background: var(--surface); color: var(--text); }
  .tabbar button[aria-current="page"] { background: var(--accent-soft); }
  .tabbar svg { width: 20px; height: 20px; }

  .cockpit { min-height: 340px; padding: 12px 32px 12px 12px; }
  .car { height: 320px; }
  .hero-num { font-size: 56px; }

  /* Evaluar: formulario a la izquierda, resultados a la derecha */
  .eval-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .eval-right { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding-bottom: 8px; }
  .eval-empty { display: block; padding: 28px; text-align: center; }
  .eval-empty[hidden] { display: none !important; }

  /* Chat centrado y con ancho de lectura */
  .chat-view { max-width: 760px; min-height: calc(100vh - 64px); }
  .chat-form { bottom: 16px; }
  .toast { bottom: 24px; left: calc(50% + var(--sidebar-w) / 2); }

  .settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #view-settings { max-width: 980px; }
}

/* ---------- Interruptor "Voy para casa" ---------- */
.home-toggle { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); font: inherit; cursor: pointer; }
.home-toggle small { display: block; font-size: 12px; margin-top: 2px; }
.home-toggle .switch { flex: none; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .2s; }
.home-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted, #8aa0bf); transition: transform .2s, background .2s; }
.home-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.home-toggle[aria-pressed="true"] .switch { background: var(--accent); border-color: var(--accent); }
.home-toggle[aria-pressed="true"] .switch::after { transform: translateX(18px); background: #fff; }
@media (prefers-reduced-motion: reduce) { .home-toggle .switch, .home-toggle .switch::after { transition: none; } }

/* ---------- Aviso de datos faltantes ---------- */
.missing { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); border-radius: 16px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.missing p { margin: 0; flex: 1 1 260px; font-size: 14px; }
.missing .row-inline { display: flex; gap: 8px; }
.missing a.btn { text-decoration: none; }

/* ---------- Tabla de bolsillo ---------- */
.pocket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pocket-head h2 { margin-bottom: 2px; }
.pocket-head p { margin: 0; }
.pocket { width: 100%; border-collapse: separate; border-spacing: 0 4px; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.pocket th, .pocket td { text-align: left; padding: 8px 10px; font-size: 15px; }
.pocket thead th { font-size: 12px; font-weight: 600; color: var(--muted); padding-bottom: 2px; }
.pocket thead th.TOMALA { color: var(--good); }
.pocket thead th.PUEDES { color: var(--ok); }
.pocket tbody tr { background: rgba(255,255,255,.03); }
.pocket tbody th { font-weight: 600; border-radius: 8px 0 0 8px; }
.pocket tbody td:last-child { border-radius: 0 8px 8px 0; }
.pocket tbody td:nth-child(2) { color: var(--good); font-weight: 700; }
.pocket tbody td:nth-child(3) { color: var(--ok); font-weight: 600; }

/* ---------- ¿La tomo? simplificada ---------- */
.sr-only-btn { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; padding: 0; }
.oc-verdict:empty { display: none; }
.oc-verdict { border-left: 4px solid transparent; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.oc-verdict b { font-size: 18px; font-weight: 800; }
.oc-verdict span { font-variant-numeric: tabular-nums; color: var(--text); }
.oc-verdict em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--good); }
.oc-verdict.TOMALA { background: rgba(52,211,153,.14); border-left-color: var(--good); } .oc-verdict.TOMALA b { color: var(--good); }
.oc-verdict.PUEDES { background: rgba(251,191,36,.14); border-left-color: var(--ok); } .oc-verdict.PUEDES b { color: var(--ok); }
.oc-verdict.NO { background: rgba(248,113,113,.14); border-left-color: var(--bad); } .oc-verdict.NO b { color: var(--bad); }
.result .big-net { margin: 8px 0 4px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.result .big-net span { font-size: 14px; font-weight: 500; color: var(--muted); }
.why { margin: 4px 0 10px; }
.why summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 6px 0; }

/* ---------- Teclado abierto (iPhone) ---------- */
body.typing .tabbar { display: none; }
body.typing { padding-bottom: 24px; }
body.typing .chat-form { bottom: 8px; }
body.typing .toast { bottom: 16px; }
/* Al enfocar un campo, que no quede pegado al borde */
input, select { scroll-margin: 96px 0 120px; }
.order-card { scroll-margin: 16px 0 calc(var(--tabbar-h) + 24px); }
/* La franja del veredicto siempre ocupa lo mismo: los botones de abajo no saltan */
.oc-verdict:empty { display: flex; }
.oc-verdict { min-height: 76px; box-sizing: border-box; align-content: center; align-items: center; }
.oc-verdict > .muted { font-size: 14px; }

/* ---------- Pantalla del PIN: arranque del turno ---------- */
.lock { overflow: hidden; background: radial-gradient(120% 70% at 80% 20%, #13264A 0%, var(--bg) 60%); padding: calc(env(safe-area-inset-top) + 20px) 20px calc(env(safe-area-inset-bottom) + 16px); }
.lock-map { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lock-map .streets path { stroke: rgba(143, 163, 199, .09); stroke-width: 6; fill: none; stroke-linecap: round; }
.lock-map .streets .major { stroke: rgba(143, 163, 199, .14); stroke-width: 10; }
.lock-map .route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 900; stroke-dashoffset: 900; filter: drop-shadow(0 0 6px rgba(90, 180, 255, .55)); opacity: .75;
  animation: route-draw 2.6s cubic-bezier(.4, 0, .2, 1) .3s forwards; }
.lock-map .home-dot { fill: #E8F0FF; stroke: var(--accent); stroke-width: 3; }
.lock-map .dest-pin circle { fill: var(--good); }
.lock-map .dest-pin .ring { fill: none; stroke: var(--good); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: pin-pulse 2.4s ease-out 2.9s infinite; }
@keyframes route-draw { to { stroke-dashoffset: 0; } }
@keyframes pin-pulse { 0% { opacity: .7; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.6); } }

.lock-card { position: relative; width: min(360px, 100%); height: 100%; max-height: 760px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; text-align: left; }
.lock-head { margin-bottom: auto; padding-top: 8px; }
.lock-brand { display: flex; align-items: center; gap: 8px; margin: 0 0 28px; font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand-mark.sm { width: 28px; height: 28px; margin: 0; border-radius: 8px; font-size: 15px; }
.lock-head h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
.lock-head p { margin: 0; max-width: 30ch; }

.lock-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lock-dots { display: flex; justify-content: center; gap: 14px; min-height: 16px; }
.lock-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(143, 163, 199, .5); transition: background .15s, border-color .15s, transform .15s; }
.lock-dots span.on { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.lock-dots.shake { animation: shake .4s; }
.lock-dots.shake span.on { background: var(--bad); border-color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.lock-error { min-height: 20px; margin: 0; text-align: center; color: var(--bad); font-size: 14px; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 64px; border-radius: 18px; border: 1px solid var(--line); background: rgba(19, 32, 58, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--text); font: inherit; font-size: 26px; font-weight: 600;
  font-variant-numeric: tabular-nums; display: grid; place-items: center; cursor: pointer; transition: transform .08s, background .15s; touch-action: manipulation; }
.keypad button:active { transform: scale(.96); background: var(--surface-2); }
.keypad button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.keypad svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.keypad .key-alt { background: transparent; border-color: transparent; color: var(--muted); -webkit-backdrop-filter: none; backdrop-filter: none; }
.keypad .key-go { background: linear-gradient(160deg, var(--accent), var(--accent-strong)); border: 0; color: #fff; font-size: 12px; font-weight: 700;
  grid-auto-flow: row; gap: 2px; align-content: center; box-shadow: 0 8px 24px rgba(46, 140, 235, .35); }
.keypad .key-go svg { width: 22px; height: 22px; stroke-width: 2.2; }
.keypad .key-go.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-height: 700px) { .keypad button { height: 54px; } .lock-brand { margin-bottom: 14px; } .lock-head h1 { font-size: 26px; } }
@media (min-width: 960px) { .lock-card { max-height: 720px; } }
@media (prefers-reduced-motion: reduce) {
  .lock-map .route { animation: none; stroke-dashoffset: 0; }
  .lock-map .dest-pin .ring, .lock-dots.shake, .keypad .key-go.busy svg { animation: none; }
}
.lock-map path, .lock-map circle { vector-effect: non-scaling-stroke; }
/* En pantallas anchas el mapa ocupa una columna centrada (como el teléfono) y se desvanece hacia los lados */
@media (min-width: 700px) {
  .lock-map { left: 50%; width: 600px; transform: translateX(-50%);
    -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent); mask-image: radial-gradient(closest-side, #000 82%, transparent); }
  .lock-card { max-height: 820px; }
}
