:root {
  --bg: #0f0d0b;
  --panel: #191613;
  --panel-2: #221e1a;
  --line: #2f2924;
  --text: #f1e9dc;
  --muted: #9d9385;
  --red: #e0322a;
  --red-deep: #9e1b16;
  --amber: #f0a429;
  --green: #74c27a;
  --radius: 18px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; color: var(--text); overflow-x: clip; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { max-width: 100%; font: 16px/1.4 var(--body); min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* El fondo con degradados va en una capa fija aparte: repintar el cuerpo al hacer scroll es lo que más pesa en móviles. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 60% at 100% 0%, rgba(224, 50, 42, .10), transparent 60%), radial-gradient(80% 50% at 0% 100%, rgba(240, 164, 41, .05), transparent 60%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: .01em; }
p { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }

.view { max-width: 640px; margin: 0 auto; padding: calc(var(--safe-t) + 18px) 16px calc(96px + var(--safe-b)); }
.v-bike { padding-top: 0; }

/* ---------- cabecera ---------- */
.top { display: flex; flex-wrap: wrap-reverse; align-items: flex-end; justify-content: space-between; gap: 10px 12px; margin: 8px 0 18px; }
.top h1 { white-space: nowrap; font-size: clamp(40px, 11vw, 56px); line-height: .9; font-weight: 800; text-transform: uppercase; }
.eyebrow { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); }
.net .ic { width: 15px; height: 15px; }
.net.off { color: var(--amber); border-color: rgba(240, 164, 41, .4); background: rgba(240, 164, 41, .08); }
.net.ok { color: var(--green); border-color: rgba(116, 194, 122, .35); }
.sync-status { font-weight: 600; }
.sync-status.s-ok { color: var(--green); }
.sync-status.s-error, .sync-status.s-auth, .sync-status.s-offline { color: var(--amber); }
.restoring { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--green); font-weight: 600; }
.restoring .ic { animation: blink 1.2s infinite; }

.install { display: flex; gap: 12px; align-items: center; width: 100%; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px dashed var(--line); margin-bottom: 14px; }
.install span { display: grid; }
.install small { color: var(--muted); }

/* ---------- cuadro de mandos ---------- */
.board { position: relative; overflow: hidden; border-radius: 24px; padding: 18px; background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); box-shadow: 0 20px 50px -30px #000; }
.board::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255, 255, 255, .012) 3px 4px); }
.board-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.board-head h2 { font-size: 30px; line-height: 1; text-transform: uppercase; font-weight: 800; }
.lamp { width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--green); box-shadow: 0 0 0 4px rgba(116, 194, 122, .15), 0 0 18px var(--green); }
.b-soon .lamp { background: var(--amber); box-shadow: 0 0 0 4px rgba(240, 164, 41, .15), 0 0 18px var(--amber); }
.b-over .lamp { background: var(--red); box-shadow: 0 0 0 4px rgba(224, 50, 42, .18), 0 0 22px var(--red); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .45; } }
.board .muted { padding: 4px 0; }
.link { display: inline-block; margin-top: 12px; color: var(--text); font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--red); }
.link.center { display: block; margin: 10px auto 0; color: var(--muted); border: 0; font-size: 13px; }

.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-left: 3px solid var(--green); }
.alert.wide { margin-top: 12px; }
.alert.a-soon { border-left-color: var(--amber); }
.alert.a-over { border-left-color: var(--red); background: rgba(224, 50, 42, .07); }
.alert-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--panel-2); flex: none; }
.a-over .alert-ic { color: var(--red); }
.a-soon .alert-ic { color: var(--amber); }
.alert-body { display: grid; flex: 1; min-width: 0; }
.alert-body strong { font-weight: 600; }
.alert-body small { color: var(--muted); font-size: 13px; }
.crit { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--red); border: 1px solid rgba(224, 50, 42, .5); border-radius: 4px; padding: 1px 4px; vertical-align: 2px; }
.pill { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 99px; flex: none; }
.p-ok { color: var(--green); background: rgba(116, 194, 122, .1); }
.p-soon { color: var(--amber); background: rgba(240, 164, 41, .12); }
.p-over { color: #fff; background: var(--red); }

/* ---------- puesta a punto ---------- */
.setup { margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.setup-head { display: flex; justify-content: space-between; align-items: baseline; }
.setup-head h3 { font-size: 20px; text-transform: uppercase; }
.setup-head span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 10px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--red)); border-radius: 6px; transition: width .4s; }
.bar i.i-ok { background: var(--green); }
.bar i.i-soon { background: var(--amber); }
.bar i.i-over { background: var(--red); }
.hint { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.hint .ic { color: var(--red); width: 18px; height: 18px; }

/* ---------- motos ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.sec-head h3 { font-size: 22px; text-transform: uppercase; font-weight: 800; letter-spacing: .03em; }
.bikes { display: grid; gap: 14px; }
@media (min-width: 560px) { .bikes { grid-template-columns: 1fr 1fr; } }
.bike-card { display: block; border-radius: 22px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform .15s; }
.bike-card:active { transform: scale(.98); }
.art { aspect-ratio: 16 / 9; background: center / cover no-repeat; }
.art-empty { display: grid; place-items: center; color: color-mix(in srgb, var(--bike) 80%, white); background: radial-gradient(90% 90% at 30% 20%, color-mix(in srgb, var(--bike) 45%, transparent), transparent 70%), linear-gradient(135deg, #1e1a16, #12100e); }
.art-empty svg { width: 58%; opacity: .9; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .5)); }
.bike-info { padding: 14px 16px 16px; }
.bike-title { display: flex; justify-content: space-between; align-items: center; }
.bike-title h4 { font-size: 26px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.bike-info > p { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.bike-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bike-alert { margin-top: 10px; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(240, 164, 41, .1); color: var(--amber); }
.bike-alert.a-over { background: rgba(224, 50, 42, .12); color: #ff8a83; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.d-soon { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.d-over { background: var(--red); box-shadow: 0 0 12px var(--red); }
.tag { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: rgba(241, 233, 220, .08); color: var(--text); }
.bike-add { display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 90px; border-radius: 22px; border: 1.5px dashed var(--line); color: var(--muted); font-weight: 600; }

/* odómetro */
.odo { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); font-weight: 700; font-size: 15px; }
.odo i { font-style: normal; display: inline-grid; place-items: center; width: 1.25em; height: 1.6em; border-radius: 3px; background: linear-gradient(#050505, #1c1c1c 50%, #050505); color: #f4efe6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.odo i.last { background: linear-gradient(#f4efe6, #fff 50%, #e0d8ca); color: #111; }
.odo b { font-family: var(--display); font-size: 12px; color: var(--muted); margin-left: 5px; text-transform: uppercase; }

/* ---------- ficha de moto ---------- */
.hero { position: relative; margin: 0 -16px; min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-art { position: absolute; inset: 0; aspect-ratio: auto; }
.hero-art.art-empty svg { width: 70%; transform: translateY(-14%); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 13, 11, .5) 0%, transparent 30%, rgba(15, 13, 11, .3) 55%, var(--bg) 100%); }
.hero-bar { position: absolute; top: calc(var(--safe-t) + 12px); left: 16px; right: 16px; display: flex; justify-content: space-between; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 13, 11, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .08); }
.hero-text { position: relative; padding: 0 16px 8px; }
.hero-text h1 { font-size: clamp(46px, 13vw, 68px); line-height: .88; font-weight: 800; text-transform: uppercase; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.quick button { display: grid; justify-items: center; gap: 6px; padding: 14px 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 600; text-align: center; line-height: 1.15; }
.quick button .ic { color: var(--red); width: 24px; height: 24px; }
.quick button:active { background: var(--panel-2); }
.quick .go-ride { background: linear-gradient(160deg, var(--red), var(--red-deep)); border-color: transparent; color: #fff; }
.quick .go-ride .ic { color: #fff; }
.quick .sos { border-color: rgba(240, 164, 41, .45); }
.quick .sos .ic { color: var(--amber); }

.mini { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; }
.mini .ic { width: 16px; height: 16px; }
.note { font-size: 12px; color: var(--muted); margin: -6px 0 10px; }

.cards { display: grid; gap: 8px; }
.dl { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.dl-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); flex: none; }
.dl.a-over .dl-ic { color: var(--red); }
.dl.a-soon .dl-ic { color: var(--amber); }
.dl-body { flex: 1; display: grid; min-width: 0; }
.dl-body small { color: var(--muted); font-size: 13px; }
.ins { display: grid; margin-top: 4px; }
.ins .bar { margin: 4px 0 2px; height: 4px; }
.count { display: grid; justify-items: end; font-family: var(--display); line-height: 1; }
.count b { font-size: 34px; font-weight: 800; }
.count small { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.c-over b { color: var(--red); }
.c-soon b { color: var(--amber); }

.gauges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.g-card { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.g-card strong { font-size: 14px; font-weight: 600; line-height: 1.2; }
.g-card small { font-size: 12px; color: var(--muted); }
.g-card.s-over { border-color: rgba(224, 50, 42, .5); }
.g-card .crit { position: absolute; top: 8px; right: 8px; }
.gauge { width: 76px; height: 76px; }
.gauge path { fill: none; stroke-linecap: round; }
.g-track { stroke: var(--line); stroke-width: 5; }
.g-red { stroke: var(--red-deep); stroke-width: 5; }
.g-fill { stroke: var(--green); stroke-width: 5; }
.g-soon .g-fill { stroke: var(--amber); }
.g-over .g-fill { stroke: var(--red); }
.g-unknown .g-needle { opacity: .3; }
.g-ticks line { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.g-needle { stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; }
.g-hub { fill: var(--text); }
.empty-btn { display: flex; gap: 8px; align-items: center; justify-content: center; grid-column: 1 / -1; padding: 18px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--text); font-weight: 600; }

.timeline { display: grid; border-left: 2px solid var(--line); margin-left: 8px; }
.tl { position: relative; display: grid; padding: 4px 0 18px 18px; width: 100%; }
.tl::before { content: ''; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--red); }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tl strong { font-size: 17px; }
.tl small { color: var(--muted); }
.tl p { font-size: 14px; margin-top: 4px; color: #cfc6b8; }

.docs { display: grid; gap: 8px; }
.doc { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.doc > .ic { color: var(--red); }
.doc span { flex: 1; display: grid; min-width: 0; }
.doc small { color: var(--muted); font-size: 13px; }
.doc strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.icon-btn .ic { width: 19px; height: 19px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); grid-column: 1 / -1; }
.notes { white-space: pre-wrap; color: #cfc6b8; }

/* ---------- resumen, datos a mano y diario ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stats.four { grid-template-columns: repeat(2, 1fr); margin: 0 0 12px; }
@media (min-width: 440px) { .stats.four { grid-template-columns: repeat(4, 1fr); } }
.stat { display: grid; gap: 2px; align-content: center; padding: 12px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.stat b { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: .01em; }
.stat small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.link .ic { width: 15px; height: 15px; vertical-align: -3px; color: #8ec5ff; }
.tag.cold { display: inline-flex; align-items: center; gap: 4px; background: rgba(110, 175, 255, .14); color: #8ec5ff; }
.tag.cold .ic { width: 13px; height: 13px; }
.alert.a-cold { border-left-color: #6eafff; background: rgba(110, 175, 255, .07); }
.a-cold .alert-ic { color: #8ec5ff; }
.spec { display: grid; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); padding: 2px 14px; }
.spec-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.spec-row:first-child { border-top: 0; }
.spec-row span { color: var(--muted); font-size: 13px; flex: none; }
.spec-row strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.spec-row .pill { font-style: normal; margin-left: 6px; }
.story { margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--amber); font-style: italic; }
.tl-date { display: flex; align-items: center; gap: 6px; }
.tl-date .ic { width: 14px; height: 14px; color: var(--red); }
.tl.t-fuel::before { border-color: var(--amber); }
.tl.t-ride::before { border-color: var(--green); }
.tl.t-expense::before { border-color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.seg-opt { display: block; position: relative; }
.seg-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.seg-opt span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 14px; font-weight: 600; }
.seg-opt span .ic { width: 18px; height: 18px; }
.seg-opt input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.checklist { display: grid; gap: 6px; }
.cl-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.cl-row input { width: 24px; height: 24px; flex: none; accent-color: var(--green); -webkit-appearance: checkbox; appearance: auto; }
.cl-row span { display: grid; gap: 1px; }
.cl-row small { color: var(--muted); font-size: 13px; margin: 0; }
.cl-row:has(input:checked) { border-color: rgba(116, 194, 122, .5); }
.cl-row:has(input:checked) strong { color: var(--green); }
.ride-check, .sos-sheet { display: grid; gap: 12px; }
.warns { display: grid; gap: 6px; }
.warns .bike-alert { margin: 0; }
.sos-call { background: var(--green); color: #0b1a0c; }
.sos-sheet .btn.wide, .ride-check .btn.wide { margin-top: 0; }

/* ---------- avisos ---------- */
.cal { display: flex; gap: 14px; padding: 18px; border-radius: 22px; background: linear-gradient(140deg, rgba(224, 50, 42, .16), var(--panel) 60%); border: 1px solid rgba(224, 50, 42, .3); }
.cal-ic { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--red); color: #fff; }
.cal strong { font-family: var(--display); font-size: 21px; text-transform: uppercase; line-height: 1.05; display: block; }
.cal p { color: #d4cabb; font-size: 14px; margin: 6px 0 12px; }
.cal small { display: block; margin-top: 8px; font-size: 12px; }

/* ---------- botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 14px; background: var(--red); color: #fff; font-weight: 600; cursor: pointer; text-align: center; }
.btn:active { background: var(--red-deep); }
.btn:disabled { opacity: .5; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: #ff8a83; border: 1px solid rgba(224, 50, 42, .4); }
.btn.go { background: var(--green); color: #0b1a0c; margin: 0 0 14px; }
.btn .ic { width: 19px; height: 19px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.panel { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); margin-bottom: 12px; }
.panel h3 { font-size: 20px; text-transform: uppercase; }
.panel .btn { justify-self: start; }
.gift { text-align: center; justify-items: center; background: linear-gradient(140deg, rgba(240, 164, 41, .1), var(--panel)); }

label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
label small { font-size: 12px; margin-top: -4px; }
input, select, textarea { width: 100%; padding: 12px 13px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { border-color: var(--red); }
input[type=color] { padding: 4px; height: 47px; }
input[type=date] { min-height: 47px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
label.check input { width: 22px; height: 22px; flex: none; accent-color: var(--red); -webkit-appearance: checkbox; appearance: auto; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
fieldset[hidden] { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.big-num { font-family: var(--mono); font-size: 40px; text-align: center; padding: 16px; margin: 10px 0; }

/* ---------- hoja inferior ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; max-width: 640px; margin: 0 auto; padding: 8px 16px calc(24px + var(--safe-b)); background: var(--panel); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line); transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
.sheet.open .sheet-panel { transform: none; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 14px; }
.sheet-panel form, .install-help { display: grid; gap: 12px; }
.sheet-panel h2 { font-size: 30px; text-transform: uppercase; line-height: 1; }
.sheet-panel h2 + .muted { margin-top: -8px; }
.photo-pick { display: grid; place-items: center; gap: 6px; aspect-ratio: 16 / 9; border-radius: 16px; border: 1.5px dashed var(--line); background: var(--bg); overflow: hidden; position: relative; color: var(--muted); }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick span { position: relative; z-index: 1; background: rgba(15, 13, 11, .7); padding: 4px 10px; border-radius: 99px; color: var(--text); }
.photo-pick .ic { width: 34px; height: 34px; }
.file-pick { padding: 18px; border-radius: 14px; border: 1.5px dashed var(--line); justify-items: center; color: var(--text); }
.file-pick input { font-size: 13px; color: var(--muted); border: 0; background: none; padding: 0; text-align: center; }
.task-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.task-picks > span { width: 100%; font-size: 13px; }
.pick { display: inline-flex; }
.pick input { display: none; }
.pick span { padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.pick input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.renew { margin-top: -4px; }
.install-help ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.install-help .ic { width: 18px; height: 18px; vertical-align: -3px; color: #3d8bff; }
.viewer { width: 100%; border-radius: 14px; }

/* ---------- taller IA ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px 14px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.sugg { flex-wrap: wrap; overflow: visible; }
.sugg .chip { white-space: normal; text-align: left; }
.chat { display: grid; gap: 10px; }
.chat-empty { text-align: center; padding: 26px 12px; display: grid; gap: 10px; justify-items: center; }
.chat-hero { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(140deg, var(--red), var(--red-deep)); box-shadow: 0 16px 40px -14px var(--red); }
.chat-hero .ic { width: 34px; height: 34px; color: #fff; }
.msg { max-width: 92%; padding: 12px 14px; border-radius: 18px; font-size: 15px; }
.msg.me { justify-self: end; background: var(--red); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { justify-self: start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 6px; display: grid; gap: 8px; }
.msg.ai.offline { border-color: rgba(240, 164, 41, .35); }
.msg-tag { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--muted); }
.msg-tag .ic { width: 14px; height: 14px; color: var(--red); }
.offline .msg-tag .ic { color: var(--amber); }
.msg ul, .msg ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.msg h4 { font-size: 17px; text-transform: uppercase; }
.cite { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(241, 233, 220, .08); color: var(--amber); margin-right: 4px; }
details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
blockquote { margin: 8px 0 0; padding: 8px 10px; border-left: 2px solid var(--amber); background: rgba(255, 255, 255, .02); font-size: 13px; color: #cfc6b8; display: grid; gap: 4px; }
.typing { display: flex; gap: 5px; padding: 16px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: .5; } }
.ask { position: sticky; bottom: calc(76px + var(--safe-b)); display: flex; gap: 8px; margin-top: 14px; padding: 6px; border-radius: 18px; background: rgba(25, 22, 19, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); z-index: 5; }
.ask input { border: 0; background: transparent; }
.send { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--red); color: #fff; display: grid; place-items: center; }
.progress { padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; font-size: 14px; }

/* ---------- primer arranque ---------- */
.onboard { display: grid; gap: 14px; padding: 24px 20px; border-radius: 26px; text-align: center; background: radial-gradient(90% 60% at 50% 0%, rgba(224, 50, 42, .18), transparent 70%), var(--panel); border: 1px solid var(--line); }
.onboard-art { width: 70%; max-width: 260px; margin: 0 auto; color: var(--red); filter: drop-shadow(0 14px 30px rgba(224, 50, 42, .35)); }
.onboard h2 { font-size: 34px; text-transform: uppercase; font-weight: 800; line-height: 1; }
.onboard > p { color: #d4cabb; }
.steps { list-style: none; counter-reset: s; margin: 6px 0; padding: 0; display: grid; gap: 10px; text-align: left; }
.steps li { counter-increment: s; position: relative; padding: 12px 12px 12px 50px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 15px; color: #d4cabb; }
.steps li strong { color: var(--text); }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--display); font-weight: 800; }
.steps .step-warn { border-color: rgba(240, 164, 41, .5); background: rgba(240, 164, 41, .08); }
.steps .step-warn::before { background: var(--amber); color: #1b1203; }
.steps .link { margin: 4px 0 0; font-size: 14px; }
.btn.big { padding: 16px; font-size: 17px; }

/* ---------- ficha técnica y manuales en internet ---------- */
.scan-pick, .find-manuals { display: flex; gap: 12px; align-items: center; width: 100%; padding: 14px; border-radius: 16px; text-align: left; cursor: pointer; color: var(--text); background: linear-gradient(140deg, rgba(224, 50, 42, .16), var(--panel-2) 70%); border: 1px solid rgba(224, 50, 42, .35); }
.scan-pick span:not(.fm-ic), .find-manuals span:not(.fm-ic) { display: grid; gap: 2px; }
.scan-pick small, .find-manuals small { color: var(--muted); font-size: 13px; font-weight: 400; }
.scan-pick strong, .find-manuals strong { font-size: 15px; }
.fm-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--red); color: #fff; }
.scan-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--green); padding: 10px 12px; border-radius: 12px; background: rgba(116, 194, 122, .08); }
.scan-ok .ic { width: 18px; height: 18px; margin-top: 1px; }
.bar i.indeterminate { width: 40%; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.manual-search { display: grid; gap: 10px; }
.manual-search h2 + .muted { margin-top: -6px; }
#ms-results { display: grid; gap: 10px; }
.searching { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 12px; border-radius: 16px; border: 1px dashed var(--line); }
.searching small { color: var(--muted); max-width: 280px; }
.radar { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line); margin-bottom: 6px; background: conic-gradient(from 0deg, rgba(224, 50, 42, .55), transparent 30%); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ms-item { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.ms-item small { color: var(--muted); font-size: 13px; }
.ms-item .row { margin-top: 4px; }
.ms-item .btn { padding: 10px 14px; font-size: 14px; }
.ms-top { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.tag.official { background: rgba(116, 194, 122, .15); color: var(--green); }
.sec-mini { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- login ---------- */
.login { max-width: 400px; min-height: 100dvh; margin: 0 auto; padding: calc(var(--safe-t) + 48px) 16px calc(32px + var(--safe-b)); display: grid; align-content: center; justify-items: center; gap: 6px; text-align: center; }
.login-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 20px 50px -18px rgba(224, 50, 42, .6); margin-bottom: 14px; }
.login h1 { font-size: 56px; font-weight: 800; text-transform: uppercase; line-height: .9; margin-bottom: 22px; }
.login form { width: 100%; text-align: left; }
.login-error { color: #ff8a83; font-size: 14px; min-height: 1em; }
.login-note { font-size: 13px; margin-top: 10px; }

/* ---------- barra de pestañas ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(8px + var(--safe-b)); background: rgba(15, 13, 11, .88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tab { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--text); }
.tab.on .ic { color: var(--red); }
.badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; }

/* ---------- avisos flotantes ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60; padding: 12px 18px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: up .25s ease-out; max-width: calc(100% - 32px); text-align: center; }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes up { from { transform: translate(-50%, 12px); opacity: 0; } }

/* ---------- bienvenida (el regalo) ---------- */
.welcome { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 32px 28px calc(32px + var(--safe-b)); background: radial-gradient(80% 50% at 50% 30%, rgba(224, 50, 42, .25), transparent 70%), var(--bg); transition: opacity .6s, transform .6s; }
.welcome.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.w-gauge { width: 190px; margin-bottom: 10px; }
.w-arc { stroke-dasharray: 100; stroke-dashoffset: 100; animation: sweep 2.2s cubic-bezier(.3, .7, .2, 1) .3s forwards; }
.w-needle { transform-origin: 100px 100px; transform: rotate(-135deg); animation: needle 2.2s cubic-bezier(.3, .7, .2, 1) .3s forwards; }
@keyframes sweep { 50% { stroke-dashoffset: 0; } to { stroke-dashoffset: 30; } }
@keyframes needle { 50% { transform: rotate(135deg); } to { transform: rotate(55deg); } }
.welcome h1 { font-size: clamp(56px, 18vw, 96px); line-height: .85; font-weight: 800; text-transform: uppercase; opacity: 0; animation: rise .8s ease-out 1.4s forwards; }
.welcome .eyebrow { opacity: 0; animation: rise .8s ease-out 1.2s forwards; }
.w-msg { max-width: 320px; font-size: 18px; color: #d9cfbf; margin-top: 10px; opacity: 0; animation: rise .8s ease-out 1.8s forwards; }
.w-from { font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; color: var(--amber); opacity: 0; animation: rise .8s ease-out 2.2s forwards; }
.welcome .btn { max-width: 300px; margin-top: 24px; font-size: 18px; padding: 16px; opacity: 0; animation: rise .8s ease-out 2.6s forwards; text-transform: uppercase; font-family: var(--display); letter-spacing: .12em; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
}

/* ---------- diálogos propios y cierre de hojas ---------- */
.dialog { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s; }
.dialog.in { opacity: 1; }
.dialog-card { width: min(100%, 380px); padding: 24px 22px 20px; border-radius: 26px; background: var(--panel-2); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px #000; transform: scale(.94) translateY(8px); transition: transform .22s cubic-bezier(.2, .9, .3, 1.2); }
.dialog.in .dialog-card { transform: none; }
.dialog-card h3 { font-size: 30px; line-height: 1; text-transform: uppercase; font-weight: 800; }
.dialog-card p { color: #d4cabb; margin-top: 10px; font-size: 15px; }
.dialog-btns { display: grid; gap: 8px; margin-top: 20px; }
.dialog-btns .btn { width: 100%; }
.sheet-x { position: sticky; top: 4px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; margin: 0 0 -34px auto; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.sheet-x .ic { width: 16px; height: 16px; }

/* ---------- asistente de alta de moto ---------- */
body.in-wiz { overflow: hidden; }
.wiz { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: radial-gradient(90% 38% at 50% 0%, color-mix(in srgb, var(--bike) 24%, transparent), transparent 70%), var(--bg); transition: background .4s; }
.wiz-top { display: flex; align-items: center; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; padding: calc(var(--safe-t) + 12px) 16px 8px; }
.wiz-prog { flex: 1; display: flex; gap: 5px; }
.wiz-prog i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; position: relative; }
.wiz-prog i.done { background: var(--text); }
.wiz-prog i.now::after { content: ''; position: absolute; inset: 0; background: var(--red); animation: fillbar .5s ease-out both; transform-origin: left; }
@keyframes fillbar { from { transform: scaleX(0); } }
.wiz-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.wiz-body { flex: 1; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 20px 28px; display: grid; grid-auto-rows: max-content; gap: 14px; align-content: start; }
.wiz-body.go-fwd { animation: stepIn .34s cubic-bezier(.2, .8, .3, 1) both; }
.wiz-body.go-back { animation: stepBack .34s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-28px); } }
.wiz-h { font-size: clamp(40px, 12vw, 58px); line-height: .92; font-weight: 800; text-transform: uppercase; }
.wiz-sub { color: #d4cabb; font-size: 15px; margin-top: -4px; }
.wiz-foot { display: flex; gap: 10px; width: 100%; max-width: 640px; margin: 0 auto; padding: 12px 16px calc(14px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 35%); }
.wiz-foot .btn { margin: 0; }
.wiz-next { flex: 1; padding: 16px; font-size: 17px; }
.wiz-next .ic { width: 20px; height: 20px; }
.wiz-next[aria-disabled=true] { opacity: .42; }
.wiz-back { width: 56px; padding: 0; flex: none; }
.btn.big .ic { width: 22px; height: 22px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wiz-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 14px; color: var(--amber); padding: 10px 12px; border-radius: 12px; background: rgba(240, 164, 41, .08); }
.wiz-resume .ic { width: 18px; height: 18px; }
.wiz-resume .link { margin: 0; color: var(--text); }
.wiz-field, .wiz-field.lbl { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.wiz-field .lbl { font-size: 13px; }
.wiz-scan { margin-top: 2px; }
.brand-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.brand-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 168px; padding: 16px; border-radius: 24px; color: #fff; background: linear-gradient(155deg, color-mix(in srgb, var(--c) 88%, #000), color-mix(in srgb, var(--c) 34%, #000)); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 22px 44px -24px var(--c); transition: transform .15s, box-shadow .2s; }
.brand-card::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 16px); pointer-events: none; }
.brand-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.brand-card:active { transform: scale(.97); }
.brand-card.on { outline: 3px solid var(--text); outline-offset: 2px; }
.bc-name { position: relative; font-family: var(--display); font-weight: 800; font-size: 38px; line-height: .95; text-transform: uppercase; letter-spacing: .03em; text-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.bc-tag { position: relative; font-size: 12px; opacity: .85; line-height: 1.25; }
.bc-check { position: absolute; top: 12px; left: 12px; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: #111; }
.bc-check .ic { width: 16px; height: 16px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chips.center { justify-content: center; }
.chip.model { padding: 9px 14px; }
.wiz-group { margin-bottom: 6px; }
.grp { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 6px 0 8px; font-weight: 700; }
.wiz-search { position: relative; display: block; }
.wiz-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.wiz-search input { padding-left: 42px; }
.year-box { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 0; }
.year-box .round { width: 52px; height: 52px; flex: none; background: var(--panel-2); }
.year-box .flip .ic { transform: scaleX(-1); }
.year-in { width: 190px; padding: 14px 10px; border-radius: 18px; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 54px; letter-spacing: .08em; color: #f4efe6; background: linear-gradient(#050505, #1c1c1c 50%, #050505); border: 1px solid #2a2a2a; }
.era { text-align: center; color: var(--amber); font-family: var(--display); font-size: 19px; min-height: 1.4em; font-weight: 600; letter-spacing: .02em; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--s); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35); overflow: hidden; transition: transform .15s; cursor: pointer; }
.swatch.on { border-color: var(--text); transform: scale(1.1); }
.swatch.custom { background: conic-gradient(#e0322a, #f0a429, #74c27a, #3d8bff, #b04bd6, #e0322a); }
.swatch.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; cursor: pointer; }
.plan-card { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.plan-card p { font-size: 14px; color: #d4cabb; }
.plan-card summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.plan-card ul { margin: 10px 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: #d4cabb; }
.plan-card details label { margin-top: 8px; }
.wiz-preview { display: block; }
.wiz .spec-row .link { margin: 0; font-size: 13px; color: var(--amber); border-color: transparent; flex: none; }
.wiz .spec-row strong { flex: 1; }
.wiz-done { position: fixed; inset: 0; z-index: 130; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 32px; background: radial-gradient(80% 50% at 50% 30%, color-mix(in srgb, var(--bike) 38%, transparent), transparent 70%), var(--bg); transition: opacity .6s; animation: fadein .3s both; }
.wiz-done.out { opacity: 0; pointer-events: none; }
@keyframes fadein { from { opacity: 0; } }
.wiz-done .w-arc { animation-duration: 1.5s; animation-delay: .1s; }
.wiz-done .w-needle { animation-duration: 1.5s; animation-delay: .1s; }
.wiz-done .eyebrow { opacity: 0; animation: rise .6s ease-out .8s forwards; }
.wiz-done h1 { font-size: clamp(48px, 15vw, 84px); line-height: .88; font-weight: 800; text-transform: uppercase; opacity: 0; animation: rise .6s ease-out .9s forwards; }
.wiz-done .w-msg { opacity: 0; animation: rise .6s ease-out 1.2s forwards; }

/* ---------- portada: huecos de motos, borrador y tiempo ---------- */
.resume-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 18px; text-align: left; color: var(--text); background: linear-gradient(140deg, rgba(240, 164, 41, .18), var(--panel) 70%); border: 1px solid rgba(240, 164, 41, .45); margin-bottom: 14px; }
.resume-card > .ic:first-child { color: var(--amber); }
.resume-card span { flex: 1; display: grid; }
.resume-card small { color: var(--muted); }
.onboard .resume-card { margin: 0; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot { display: grid; justify-items: center; gap: 2px; padding: 14px 8px 12px; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); text-align: center; transition: transform .15s, border-color .2s; }
.slot:active { transform: scale(.97); border-color: var(--red); }
.slot-art { width: 74px; color: var(--red); opacity: .9; margin-bottom: 4px; }
.slot strong { font-size: 15px; }
.slot small { color: var(--muted); font-size: 12px; }
.onboard .sec-mini { margin-top: 2px; }
.onboard-tip { font-size: 13px; }
.step-warn-card { text-align: left; padding: 12px 14px; border-radius: 14px; font-size: 14px; border: 1px solid rgba(240, 164, 41, .5); background: rgba(240, 164, 41, .08); color: #d4cabb; }
.step-warn-card strong { color: var(--text); }
.step-warn-card .link { margin: 0 0 0 4px; font-size: 14px; }
.weather { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px; border-radius: 20px; text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.weather.idle > .ic:first-child { color: var(--amber); width: 26px; height: 26px; }
.weather.idle span:not(.radar) { flex: 1; display: grid; }
.weather.idle small { color: var(--muted); font-size: 13px; }
.weather.idle > .ic:last-child { color: var(--muted); }
.radar.small { width: 26px; height: 26px; margin: 0; flex: none; border-width: 2px; }
.weather[class*=" v-"] { display: block; }
.weather.v-ok { border-color: rgba(116, 194, 122, .4); background: linear-gradient(140deg, rgba(116, 194, 122, .1), var(--panel) 70%); }
.weather.v-soon { border-color: rgba(240, 164, 41, .45); background: linear-gradient(140deg, rgba(240, 164, 41, .1), var(--panel) 70%); }
.weather.v-over { border-color: rgba(224, 50, 42, .5); background: linear-gradient(140deg, rgba(224, 50, 42, .13), var(--panel) 70%); }
.w-head { display: flex; align-items: center; gap: 12px; }
.w-head > div { flex: 1; }
.w-head h3 { font-size: 26px; text-transform: uppercase; font-weight: 800; line-height: 1; }
.w-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-2); flex: none; }
.v-ok .w-ic { color: var(--green); }
.v-soon .w-ic { color: var(--amber); }
.v-over .w-ic { color: var(--red); }
.w-tip { margin: 10px 0 12px; font-size: 14px; color: #d4cabb; }
.w-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.w-stats span { display: grid; gap: 1px; padding: 8px 4px; border-radius: 12px; background: rgba(255, 255, 255, .04); text-align: center; }
.w-stats b { font-family: var(--display); font-size: 19px; font-weight: 800; line-height: 1.1; }
.w-stats small { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Taller IA: fuentes de tus manuales y de internet ---------- */
button.cite { cursor: pointer; text-align: left; border: 1px solid rgba(240, 164, 41, .35); margin: 0 4px 2px 0; line-height: 1.35; }
button.cite:active { background: rgba(240, 164, 41, .2); }
.msg-tag.nosrc { color: var(--amber); }
.msg-tag.nosrc .ic { color: var(--amber); }
.web-ans { display: grid; gap: 8px; margin-top: 4px; padding: 12px; border-radius: 14px; border: 1px dashed rgba(110, 175, 255, .55); background: rgba(110, 175, 255, .07); }
.web-tag { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: #8ec5ff; }
.web-tag .ic { width: 15px; height: 15px; }
.web-warn { font-size: 12px; color: var(--amber); line-height: 1.35; }
.sources { display: grid; gap: 6px; margin-top: 2px; }
.sources .sec-mini { margin: 4px 0 0; }
.source { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.source .ic { width: 17px; height: 17px; color: #8ec5ff; }
.source span { display: grid; min-width: 0; }
.source strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source small { font-size: 12px; color: var(--muted); }
.msg .link { justify-self: start; margin-top: 2px; font-size: 13px; }
.msg .link .ic { width: 14px; height: 14px; vertical-align: -2px; color: #8ec5ff; }
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.switch-row input { width: 22px; height: 22px; flex: none; accent-color: #6eafff; -webkit-appearance: checkbox; appearance: auto; }
.switch-row small { display: block; color: var(--muted); font-size: 12px; margin: 0; }
.passage { white-space: pre-wrap; max-height: 42dvh; overflow: auto; font-size: 14px; line-height: 1.5; border-left-color: var(--amber); }
.cite-sheet { display: grid; gap: 10px; }
.cite-sheet h2 + .muted { margin-top: -6px; }
.cite-sheet .btn.wide { margin-top: 4px; }
.tag.pdf { background: rgba(116, 194, 122, .15); color: var(--green); }
.find-manuals.top-gap { margin-top: 12px; }
.manual-search .btn.go { margin-top: 0; }
.chip.add { display: inline-flex; align-items: center; gap: 4px; border-style: dashed; color: var(--muted); }
.chip.add .ic { width: 15px; height: 15px; }
.chip.other { border-color: rgba(110, 175, 255, .5); }
.chip.other.on { background: #8ec5ff; border-color: #8ec5ff; }

/* ---------- finura: fundido entre pantallas, ordenador, accesibilidad ---------- */
.view.enter { animation: viewIn .28s ease-out both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.mini { min-height: 36px; padding: 8px 13px; }
.icon-btn { width: 44px; height: 44px; }
.chip { min-height: 38px; }
.tab { min-height: 48px; }
/* La barra de pestañas se queda del ancho de la app, no de toda la pantalla del ordenador. */
.tabbar { padding-left: max(8px, calc((100% - 640px) / 2 + 8px)); padding-right: max(8px, calc((100% - 640px) / 2 + 8px)); }
@media (hover: hover) {
  .bike-card, .alert, .dl, .g-card, .doc, .slot, .brand-card, .quick button, .hint, .tl, .source { transition: transform .15s, border-color .15s, background-color .15s; }
  .bike-card:hover, .slot:hover, .g-card:hover, .dl:hover, .doc:hover { border-color: #4a4137; transform: translateY(-1px); }
  .quick button:hover, .alert:hover, .hint:hover, .source:hover { background-color: var(--panel-2); }
  .btn:hover { filter: brightness(1.1); }
  .btn.ghost:hover { background: #2a2520; }
  .chip:hover:not(.on) { border-color: #4a4137; }
  .tab:hover { color: var(--text); }
  .mini:hover, .round:hover, .icon-btn:hover { border-color: #4a4137; color: var(--text); }
  /* En el ordenador las filas de chips se pueden arrastrar con la rueda: se deja una barra fina. */
  .chips { scrollbar-width: thin; scrollbar-color: #3a332c transparent; }
  .chips::-webkit-scrollbar { display: block; height: 6px; }
  .chips::-webkit-scrollbar-thumb { background: #3a332c; border-radius: 6px; }
}
@media (min-width: 900px) {
  .view { max-width: 720px; }
  .sheet-panel { border-radius: 26px; bottom: 5vh; max-height: 90dvh; border: 1px solid var(--line); }
}
