/* KIRU V3 · Componentes de aplicación. Extiende kiru.css (tokens originales intactos). Sin estilos en línea (CSP estricta). */
:root{--ok:#12873b;--ok-bg:#e8ffd5;--warn:#8a5a00;--warn-bg:#fff3cc;--danger:#b3261e;--danger-bg:#ffe5e2;--info:#0b65cc;--info-bg:#e3f3ff;--touch:48px}
body{-webkit-text-size-adjust:100%}
h1,h2,h3{text-wrap:balance}
select,textarea{font:inherit}
.topbar .avatar{text-decoration:none}
.header-pill.bell{position:relative;padding:10px 13px}
.header-pill .dot{position:absolute;top:-6px;right:-6px;background:var(--gold);color:#102c3b;border-radius:20px;font-size:11px;padding:2px 6px;border:2px solid #fff}
.nav-form{margin:0}.nav-button{width:100%;background:none;border:0;text-align:left;font:inherit;font-weight:900;cursor:pointer}
.link-button{background:none;border:0;color:#0b65cc;font:inherit;font-weight:800;text-decoration:underline;cursor:pointer;padding:8px 0;min-height:var(--touch)}
.link{color:#0b65cc;font-weight:800;text-decoration:underline}
.head-action{display:flex;gap:8px;flex-wrap:wrap}
.pageheading{flex-wrap:wrap}
/* Mensajes */
.flash,.banner{border-radius:16px;padding:13px 16px;margin:0 0 16px;font-weight:800;border:2px solid;line-height:1.45}
.flash-ok{background:var(--ok-bg);border-color:#a5ed6e;color:#14532d}.flash-error{background:var(--danger-bg);border-color:#f3a6a0;color:#7a1610}.flash-aviso,.flash-info{background:var(--info-bg);border-color:#a8d5fb;color:#0b3f78}
.banner-coord{background:#fff9e0;border-color:#ffd338;color:#5c4300;font-weight:700}
.banner-urgent{background:var(--danger-bg);border-color:#e0443a;color:#7a1610}
.banner-info{background:var(--info-bg);border-color:#a8d5fb;color:#0b3f78;font-weight:700}
.banner-warn{background:var(--warn-bg);border-color:#ffd338;color:#5c4300;font-weight:700}
/* Formularios */
.form{display:grid;gap:14px}.field{display:grid;gap:6px;font-weight:800}.field>span{font-size:14px;color:#22406b}
.field small,.hint{font-weight:600;color:#5b6b80;font-size:13px;line-height:1.45}
input[type=text],input[type=password],input[type=email],input[type=date],input[type=datetime-local],input[type=number],input[type=search],input[type=month],input[type=time],input[type=tel],input[type=file],input:not([type]),select,textarea{width:100%;min-height:var(--touch);padding:11px 13px;border:2px solid #c9dcee;border-bottom-width:4px;border-radius:14px;background:#fff;color:var(--text);font-weight:700;font-size:16px}
textarea{min-height:120px;line-height:1.5;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--blue);outline:3px solid #ffbd12;outline-offset:2px}
.checks{display:grid;gap:8px}.check{display:flex;gap:11px;align-items:flex-start;border:2px solid #dce8f3;border-bottom-width:4px;border-radius:14px;padding:12px 14px;font-weight:700;cursor:pointer;min-height:var(--touch)}
.check input{width:22px;height:22px;accent-color:#58cc02;flex:none;margin-top:1px}.check:has(input:checked){border-color:#66d448;background:#f2ffe9}
.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{border:2px solid #c9e0f0;border-bottom-width:4px;background:#fff;border-radius:40px;padding:9px 14px;font-weight:800;cursor:pointer;min-height:var(--touch);display:inline-flex;align-items:center;gap:6px;color:#20598c}
.chip:has(input:checked),.chip.on{background:#f2ffe9;border-color:#58cc02;color:#14532d}.chip input{position:absolute;opacity:0;width:1px;height:1px}
.chip:has(input:focus-visible){outline:3px solid #ffbd12;outline-offset:2px}
.btn{cursor:pointer;text-decoration:none;min-height:var(--touch)}.btn[disabled],.btn.is-busy{opacity:.55;cursor:not-allowed;transform:none;filter:none}
.btn-block{width:100%}.btn-small{min-height:40px;padding:7px 12px;font-size:13px}
.btn-danger{background:#fff;color:var(--danger);border-color:#f3a6a0;border-bottom:4px solid #e0847c}
.btn-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.btn-row.end{justify-content:flex-end}.btn-row.between{justify-content:space-between}
.inline-form{display:inline}
.center{text-align:center}.lead{font-size:17px;line-height:1.5;color:#22406b}
/* Paneles y rejillas */
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.stack{display:grid;gap:18px}.panel+.panel,.panel+.grid-2,.grid-2+.panel,.grid-3+.panel,.panel+.grid-3,.grid-4+.panel,.panel+.grid-4,.hero+.panel,.cards-six+.panel{margin-top:18px}
.panel.narrow{max-width:620px}.panel h3{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}.panel-head h3{margin:0}
.dl{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:7px 16px;margin:0 0 14px}.dl dt{color:#5b6b80;font-weight:800}.dl dd{margin:0;font-weight:700;overflow-wrap:anywhere}
/* Estados */
.badge{display:inline-flex;align-items:center;border-radius:30px;padding:4px 11px;font-size:12px;font-weight:900;border:2px solid;white-space:nowrap}
.badge-ok{background:var(--ok-bg);border-color:#a5ed6e;color:#14532d}.badge-warn{background:var(--warn-bg);border-color:#ffd338;color:#5c4300}.badge-danger{background:var(--danger-bg);border-color:#f3a6a0;color:#7a1610}.badge-info{background:var(--info-bg);border-color:#a8d5fb;color:#0b3f78}.badge-neutral{background:#f1f5f9;border-color:#cbd5e1;color:#334155}
/* Progreso real */
progress{appearance:none;-webkit-appearance:none;flex:1;height:22px;border:0;border-radius:50px;overflow:hidden;background:#d6f6c3;min-width:80px;width:100%}
progress::-webkit-progress-bar{background:#d6f6c3;border-radius:50px}progress::-webkit-progress-value{background:linear-gradient(90deg,#54d600,#20b800);border-radius:50px}progress::-moz-progress-bar{background:linear-gradient(90deg,#54d600,#20b800);border-radius:50px}
.progress-row strong{font-size:22px;min-width:64px;text-align:right}.nodata{color:#64748b;font-weight:700;font-style:italic}
.progress-note{font-size:12px;color:#5b6b80;font-weight:700;margin:6px 0 0}
/* Listas (sustituyen tablas anchas en móvil) */
.list{list-style:none;margin:0;padding:0;display:grid;gap:9px}.list>li,.list>a{display:flex;justify-content:space-between;align-items:center;gap:12px;border:2px solid #dce8f3;border-bottom-width:4px;border-radius:16px;padding:12px 14px;background:#fff;min-height:var(--touch)}
.list>a:hover{background:#f4fbff;border-color:#a8d5fb}.list strong{display:block;overflow-wrap:anywhere}.list small{display:block;color:#5b6b80;font-weight:700;font-size:13px;margin-top:2px;overflow-wrap:anywhere}.list .meta{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:flex-end;flex:none;max-width:45%}
.table-wrap{overflow-x:auto;border-radius:14px;border:2px solid #dce8f3}table.table{width:100%;border-collapse:collapse;background:#fff;font-size:14px}.table th,.table td{padding:10px 12px;text-align:left;border-bottom:1px solid #e3edf6;vertical-align:top}.table th{background:#f1f8ff;font-weight:900;color:#22406b;white-space:nowrap}.table td.num,.table th.num{text-align:right;font-variant-numeric:tabular-nums}
.empty{text-align:center;padding:34px 20px}.empty-kiru{width:120px;height:130px;object-fit:contain}.empty p{max-width:520px;margin:8px auto 16px}
/* KPI */
.kpi{border:2px solid #d5e5f4;border-bottom:4px solid #bfdaed;border-radius:20px;background:#fff;padding:16px}.kpi h4{margin:0 0 6px;font-size:14px;color:#22406b;font-weight:900}.kpi .value{font-size:34px;font-weight:1000;letter-spacing:-1px;color:#0b3f78;line-height:1.1}.kpi .frac{font-size:13px;color:#5b6b80;font-weight:800}.kpi .def{font-size:12px;color:#64748b;font-weight:700;margin-top:6px;line-height:1.4}
.kpi.suppressed .value{color:#94a3b8;font-size:22px}
.chart{width:100%;height:auto;display:block}.chart text{font-family:var(--font);font-weight:800;fill:#22406b}.chart .grid{stroke:#e3edf6}.chart .axis{stroke:#9db4cb}
.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:13px;font-weight:800;margin:8px 0}.legend i{display:inline-block;width:14px;height:14px;border-radius:4px;margin-right:5px;vertical-align:-2px}
.sw-a{background:#1cb0f6}.sw-b{background:#58cc02}.sw-c{background:#ffd338}.sw-d{background:#042c60}.sw-e{background:#ff8a4c}
.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:16px}.filters .field{min-width:150px;flex:1}.filters .btn{flex:none}
.cutoff{font-size:12px;font-weight:800;color:#5b6b80}
/* Asistente paso a paso */
.stepper{display:flex;gap:6px;list-style:none;padding:0;margin:0 0 6px}.stepper li{flex:1;height:10px;border-radius:10px;background:#d9e7f4}.stepper li.done{background:#58cc02}.stepper li.current{background:#1cb0f6}
.step-label{font-size:13px;font-weight:900;color:#188d8b;margin:0 0 14px}
.wizard-actions{display:flex;justify-content:space-between;gap:10px;margin-top:18px;flex-wrap:wrap}
.autosave{font-size:12px;color:#5b6b80;font-weight:800;min-height:18px}
/* Línea de tiempo */
.timeline{list-style:none;margin:0;padding:0 0 0 18px;border-left:3px solid #c9e0f0;display:grid;gap:14px}.timeline li{position:relative;padding-left:14px}.timeline li::before{content:'';position:absolute;left:-27px;top:4px;width:14px;height:14px;border-radius:50%;background:#58cc02;border:3px solid #fff;box-shadow:0 0 0 2px #58cc02}
.timeline time{font-size:12px;color:#5b6b80;font-weight:800;display:block}.timeline p{margin:2px 0 0}
/* Ayuda de KIRU */
.kiru-tip{display:flex;gap:12px;align-items:flex-start;background:linear-gradient(110deg,#fff,#e6fff4);border:2px solid #b5ea92;border-radius:18px;padding:12px 14px;margin:0 0 16px}.kiru-tip img{width:54px;height:58px;flex:none}.kiru-tip p{margin:0;color:#234d2c;font-weight:700;line-height:1.45}
.no-mascot .kiru-tip img,.no-mascot .hero-kiru,.no-mascot .empty-kiru{display:none}
.sensitive .hero-kiru{animation:none}
details.help{border:2px solid #dce8f3;border-radius:14px;padding:10px 14px;background:#f8fbff}details.help summary{cursor:pointer;font-weight:900;color:#0b65cc;min-height:32px}details.help p{margin:8px 0 2px}
/* Hoja inferior / diálogo */
dialog.sheet{border:0;border-radius:24px;padding:22px;max-width:480px;width:calc(100% - 28px);box-shadow:0 20px 60px #0a2a5055}dialog.sheet::backdrop{background:#04204699}dialog.sheet h2{margin:0 0 8px;font-size:21px}.sheet-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px;flex-wrap:wrap}
/* Invitados */
.guest-main{min-height:calc(100vh - 88px);background:linear-gradient(#d6edffcc,#f2f8ff 60%),url('../img/paisaje-peru.svg') center top/cover;padding:26px 16px 40px}
.guest-card{max-width:880px;margin:0 auto;display:flex;align-items:flex-end;gap:10px}.guest-kiru{width:240px;flex:none;animation:float 4s ease-in-out infinite}.guest-panel{flex:1;min-width:0}.guest-panel h1{font-size:28px;margin:0 0 12px;font-weight:1000}
.guest-foot{text-align:center;font-size:12px;color:#51667f;margin-top:22px;font-weight:700}
.steps-list{padding-left:20px;line-height:1.6;font-weight:700}.secret{display:inline-block;font-size:18px;letter-spacing:1px;background:#f1f8ff;border:2px dashed #a8d5fb;border-radius:10px;padding:8px 12px;margin:6px 8px 6px 0;font-family:ui-monospace,monospace;overflow-wrap:anywhere}
.choice-form{margin:0 0 10px}.choice{width:100%;text-align:left;background:#fff;border:2px solid #82e75a;border-bottom:5px solid #47b50d;border-radius:18px;padding:14px 16px;font:inherit;cursor:pointer;display:grid;gap:3px;min-height:var(--touch)}.choice strong{font-weight:1000;font-size:16px}.choice span{color:#526982;font-weight:700}
/* Barra inferior móvil */
.bottomnav{display:none}
/* Documento */
.doc-paper{background:#fff;border:2px solid #d5e5f4;border-radius:14px;padding:26px;line-height:1.6;font-weight:500;overflow-wrap:anywhere}.doc-paper h1{font-size:22px}.doc-paper h2{font-size:18px}.doc-paper h3{font-size:16px}.doc-paper table{border-collapse:collapse;width:100%}.doc-paper td,.doc-paper th{border:1px solid #9db4cb;padding:6px}
.editor{min-height:340px;border:2px solid #c9dcee;border-bottom-width:4px;border-radius:14px;padding:16px;background:#fff;line-height:1.6;font-weight:500;overflow-wrap:anywhere}.editor:focus{outline:3px solid #ffbd12;outline-offset:2px}
.toolbar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.toolbar button{min-width:44px;min-height:44px;border:2px solid #c9e0f0;border-bottom-width:4px;border-radius:12px;background:#fff;font-weight:900;cursor:pointer}
.hash{font-family:ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere;color:#475569}
/* Chat */
.chat{display:grid;gap:12px;margin-bottom:14px}.msg{border-radius:18px;padding:13px 16px;max-width:760px;line-height:1.55;font-weight:600;overflow-wrap:anywhere}.msg-user{background:#042c60;color:#fff;justify-self:end}.msg-kiru{background:#fff;border:2px solid #b5ea92;border-bottom-width:4px}.msg-kiru .cites{font-size:12px;font-weight:800;color:#0b65cc;margin-top:8px}.msg-kiru .source{font-size:11px;font-weight:900;color:#5b6b80;margin-top:6px;text-transform:uppercase;letter-spacing:.5px}
.msg-kiru p{margin:0 0 8px}.skeleton{background:linear-gradient(90deg,#eef4fa,#dbe8f5,#eef4fa);background-size:200% 100%;animation:sk 1.2s linear infinite;border-radius:10px;min-height:18px}@keyframes sk{to{background-position:-200% 0}}
.tag-row{display:flex;gap:6px;flex-wrap:wrap}.muted{color:#64748b}.mt{margin-top:14px}.mb0{margin-bottom:0}.nowrap{white-space:nowrap}
.toast{max-width:calc(100% - 30px);font-weight:800;box-shadow:0 8px 24px #0a2a5055;bottom:90px}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.grid-2{grid-template-columns:1fr}.bottomnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:18;background:#fff;border-top:3px solid var(--lime);padding:6px 4px calc(6px + env(safe-area-inset-bottom));justify-content:space-around;gap:2px}
.bottomnav a{flex:1;display:grid;justify-items:center;gap:1px;font-size:11px;font-weight:900;color:#29436d;padding:6px 2px;border-radius:12px;min-height:52px;text-align:center}.bottomnav a span{font-size:22px;line-height:1.1}.bottomnav a.active{background:#effde5;color:#14532d}
.content-wrap{padding-bottom:96px}.header-pill.guide{display:none}}
@media(max-width:620px){.grid-3,.grid-4{grid-template-columns:1fr}.grid-4.keep-2{grid-template-columns:repeat(2,minmax(0,1fr))}.guest-card{flex-direction:column;align-items:center}.guest-kiru{width:130px;margin-bottom:-16px;position:relative;z-index:2}.guest-panel{width:100%}.guest-main{min-height:calc(100vh - 70px)}
.dl{grid-template-columns:1fr;gap:2px 0}.dl dd{margin-bottom:8px}.list>li,.list>a{flex-direction:column;align-items:flex-start}.list .meta{max-width:100%;justify-content:flex-start}.doc-paper{padding:16px}.wizard-actions .btn{flex:1}.header-pill.role{display:none}.kpi .value{font-size:28px}.pageheading{margin-bottom:16px}.pageheading h1{font-size:25px}.msg{max-width:100%}}
@media(max-width:340px){.brand-name{font-size:24px}.content-wrap{padding-left:10px;padding-right:10px}.panel{padding:14px}.bottomnav a{font-size:10px}}
@media print{.topbar,.sidebar,.bottomnav,.footer,.btn,.flash,.banner{display:none!important}.shell{display:block}.main::before{display:none}}
.sw-f{background:#8e5bd6}.chart-donut{max-width:240px;margin:0 auto}

.skip:focus{top:10px;z-index:1000;box-shadow:0 0 0 3px #ffbd12}
input[type=month],input[type=date],input[type=datetime-local]{min-height:var(--touch);appearance:auto}
fieldset{border:0;padding:0;margin:0;min-width:0}fieldset>legend{padding:0;margin-bottom:8px}

/* ═══════════ KIRU V3.1 · Mascota oficial + fondos panorámicos + acompañante ═══════════ */
/* Fondos: se sobrescribe el paisaje del prototipo (kiru.css queda intacto). Escritorio: panorámica; teléfono: recorte vertical. */
.hero{background:linear-gradient(180deg,#0a2a5214,#0a2a5200 40%),url('../img/fondo-panorama-1200.webp') center 38%/cover;background-color:#6cc0f5;min-height:380px}
.hero::after{display:none}
@media(min-width:1300px){.hero{background-image:linear-gradient(180deg,#0a2a5214,#0a2a5200 40%),url('../img/fondo-panorama-1672.webp')}}
.main::before{height:420px;opacity:.5;background:linear-gradient(#d6edff00,var(--background) 94%),url('../img/fondo-panorama-1200.webp') center 22%/cover}
.hero-kiru{filter:drop-shadow(0 10px 10px #00406a55);min-width:210px;max-height:360px}
.brand img{width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 2px 2px #002c54)}
.kiru-tip img{width:56px;height:56px;border-radius:50%;background:#fff;border:3px solid #b5ea92;padding:1px;object-fit:contain;flex:none}
.empty-kiru{width:150px;height:150px;filter:drop-shadow(0 6px 6px #0a2a5230)}
.lesson-title img,.route-head img,.guide-panel>img{width:130px;height:auto;max-height:none;object-fit:contain}
/* Invitados: pantalla completa con paisaje (en teléfono, recorte vertical) */
.guest-main{background:linear-gradient(180deg,#0a2a5230 0,#f2f8ff00 30%,#f2f8ffd9 92%),url('../img/fondo-panorama-1200.webp') center top/cover;background-color:#6cc0f5}
@media(min-width:1300px){.guest-main{background-image:linear-gradient(180deg,#0a2a5230 0,#f2f8ff00 30%,#f2f8ffd9 92%),url('../img/fondo-panorama-1672.webp')}}
.guest-kiru{width:min(300px,34vw);height:auto;filter:drop-shadow(0 10px 12px #00305a66)}
.guest-panel{background:#ffffffee;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
@media(max-width:620px){
  .hero{background:linear-gradient(180deg,#0a2a5200 55%,#0a2a5233),url('../img/fondo-movil-900.webp') center 40%/cover;background-color:#4aa8ee;min-height:0}
  .hero-kiru{width:190px;height:190px;min-width:0;max-height:none;margin-bottom:-16px}
  .main::before{background:linear-gradient(#d6edff00,var(--background) 92%),url('../img/fondo-movil-600.webp') center 30%/cover;height:340px;opacity:.55}
  .brand img{width:44px;height:44px}
  .guest-main{background:linear-gradient(180deg,#0a2a5240 0,#f2f8ff00 26%,#f2f8ffe6 100%),url('../img/fondo-movil-900.webp') center top/cover;background-color:#4aa8ee;padding-top:14px}
  .guest-kiru{width:170px;margin-bottom:-26px}
  .empty-kiru{width:130px;height:130px}
  .content-wrap{padding-bottom:160px}
}
/* Botón flotante de KIRU: acompaña en TODAS las pantallas */
.kiru-fab{position:fixed;right:14px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:17;width:64px;height:64px;border-radius:50%;border:3px solid #fff;background:radial-gradient(circle at 35% 30%,#fff,#d9fbea 70%);box-shadow:0 5px 0 #2ea36a55,0 10px 24px #04204a55;padding:0;display:grid;place-items:center;cursor:pointer;transition:transform .28s ease,opacity .2s}
.kiru-fab:hover{transform:translateY(-2px) scale(1.04)}.kiru-fab:active{transform:translateY(2px) scale(.98)}
.kiru-fab>img{width:54px;height:54px;object-fit:contain;animation:kiruHop 7s ease-in-out infinite}
.kiru-fab>b{position:absolute;right:-3px;bottom:-3px;width:24px;height:24px;border-radius:50%;background:#ffd338;color:#102c3b;border:2px solid #fff;display:grid;place-items:center;font-size:14px;font-weight:1000}
.kiru-fab.is-peek{transform:translateX(34px);opacity:.92}.kiru-fab.is-hidden{transform:translateY(120px);opacity:0;pointer-events:none}
@keyframes kiruHop{0%,88%,100%{transform:none}92%{transform:translateY(-7px) rotate(-6deg)}96%{transform:translateY(0) rotate(4deg)}}
@media(min-width:901px){.kiru-fab{right:28px;bottom:28px;width:72px;height:72px}.kiru-fab>img{width:60px;height:60px}.kiru-fab.is-peek{transform:none;opacity:1}}
.no-mascot .kiru-fab>img{display:none}.no-mascot .kiru-fab::before{content:'🐦';font-size:30px}
.sensitive .kiru-fab{width:50px;height:50px;opacity:.95}.sensitive .kiru-fab>img{width:40px;height:40px;animation:none}.sensitive .kiru-fab>b{width:20px;height:20px;font-size:12px}
/* Burbuja de consejo: etiqueta pequeña a la izquierda del botón de KIRU (no tapa el contenido) */
.kiru-bubble{position:fixed;right:calc(14px + 64px + 8px);bottom:calc(84px + 8px + env(safe-area-inset-bottom));z-index:17;background:#fff;border:2px solid #b5ea92;border-bottom-width:4px;border-radius:16px 4px 16px 16px;padding:0 34px 0 0;box-shadow:0 8px 22px #04204a40;animation:bubbleIn .3s ease-out;white-space:nowrap}
.kiru-bubble[hidden]{display:none}
.bubble-open{display:block;text-align:left;background:none;border:0;font:inherit;font-weight:800;font-size:13.5px;line-height:1.2;color:#234d2c;padding:0 4px 0 12px;cursor:pointer;min-height:44px}.bubble-open u{color:#0b65cc}
.kiru-bubble-close{position:absolute;top:0;right:0;width:36px;height:44px;border:0;background:none;font-size:13px;color:#64748b;cursor:pointer}
@media(min-width:901px){.kiru-bubble{right:calc(28px + 72px + 10px);bottom:calc(28px + 12px)}}
@keyframes bubbleIn{from{transform:translateX(10px) scale(.96);opacity:0}}
/* Hojas (guía y confirmación) con KIRU */
dialog.sheet{padding:0;overflow:hidden}
dialog.sheet[open]{animation:sheetIn .24s ease-out}@keyframes sheetIn{from{transform:translateY(26px);opacity:0}}
.sheet-head{display:flex;gap:12px;align-items:center;padding:14px 16px;background:linear-gradient(110deg,#083c71,#052653);color:#fff;border-bottom:3px solid var(--lime)}
.sheet-kiru{width:58px;height:58px;border-radius:50%;background:#fff;border:3px solid var(--lime);object-fit:contain;flex:none}
.sheet-head-text{flex:1;min-width:0}.sheet-head h2{margin:0;font-size:20px;color:#fff}.sheet-head p{margin:2px 0 0;font-size:13px;color:#cfe9ff;font-weight:700}.sheet-head strong{color:#fff}
.sheet-close{width:44px;height:44px;border-radius:50%;border:2px solid #77c9ff;background:transparent;color:#fff;font-size:18px;cursor:pointer;flex:none}
.sheet-body{padding:16px 18px 20px;display:grid;gap:14px;max-height:calc(88dvh - 92px);overflow:auto;overscroll-behavior:contain}
.sheet-confirm form{padding:18px}.sheet-title{display:flex;gap:12px;align-items:center;margin-bottom:6px}.sheet-title h2{margin:0}
.guide-tips{margin:0;padding:0;list-style:none;display:grid;gap:9px}.guide-tips li{position:relative;padding:10px 12px 10px 38px;background:#f4fbff;border:2px solid #dce8f3;border-radius:14px;line-height:1.5;font-weight:700;font-size:14.5px}
.guide-tips li::before{content:'✔';position:absolute;left:12px;top:9px;color:#43a900;font-weight:1000}
.guide-links{display:flex;gap:8px;flex-wrap:wrap}
.guide-chat{display:grid;gap:10px;max-height:34dvh;overflow:auto;padding:2px}.guide-chat:empty{display:none}
.guide-input{display:flex;gap:8px}.guide-input input{flex:1}.guide-input .btn{width:56px;padding:0;font-size:20px}
@media(max-width:900px){dialog.sheet-guide{margin:auto 0 0 0;width:100%;max-width:100%;border-radius:26px 26px 0 0}dialog.sheet-guide[open]{animation:sheetUp .28s ease-out}.sheet-body{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}
@keyframes sheetUp{from{transform:translateY(100%)}}
@media(min-width:901px){dialog.sheet-guide{margin:auto 28px 112px auto;max-width:440px;width:440px;border-radius:26px}}
/* Chat con avatar */
.msg-row{display:flex;gap:9px;align-items:flex-end;max-width:100%}.msg-row.user{justify-content:flex-end}
.msg-avatar{width:40px;height:40px;border-radius:50%;background:#fff;border:2px solid #b5ea92;flex:none;object-fit:contain}
.msg-row .msg{max-width:calc(100% - 52px)}
.typing{display:inline-flex;gap:5px;padding:6px 2px}.typing i{width:9px;height:9px;border-radius:50%;background:#58cc02;animation:typingDot 1s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes typingDot{0%,60%,100%{transform:none;opacity:.5}30%{transform:translateY(-5px);opacity:1}}
/* Aviso con KIRU */
.toast{align-items:center;gap:10px;padding:10px 20px 10px 12px}.toast.show{display:flex}.toast img{width:34px;height:34px;border-radius:50%;background:#fff;flex:none}.toast img[hidden]{display:none}
.no-mascot .sheet-kiru,.no-mascot .msg-avatar,.no-mascot .toast img{display:none}
.sensitive .sheet-kiru{width:44px;height:44px}.sensitive dialog.sheet[open]{animation:none}
@media print{.kiru-fab,.kiru-bubble,dialog{display:none!important}}

/* Invitados: en móvil el botón va arriba a la derecha (no pisa el formulario); en escritorio, abajo */
.guest-foot{background:#ffffffd9;border-radius:12px;padding:8px 14px;max-width:640px;margin:22px auto 0}
.guest-main{padding-bottom:40px}
@media(max-width:900px){.guest .kiru-fab{top:calc(80px + env(safe-area-inset-top));bottom:auto;right:12px;width:54px;height:54px}.guest .kiru-fab>img{width:44px;height:44px}.guest .kiru-bubble{top:calc(86px + env(safe-area-inset-top));bottom:auto;right:74px}.guest .kiru-fab.is-peek{transform:none}}
@media(max-width:620px){.guest .kiru-fab{top:calc(76px + env(safe-area-inset-top))}.guest .kiru-bubble{top:calc(82px + env(safe-area-inset-top))}}
.guest-main{background-image:linear-gradient(180deg,#0a2a5230 0,#f2f8ff00 30%,#f2f8ff80 100%),url('../img/fondo-panorama-1200.webp')}
@media(min-width:1300px){.guest-main{background-image:linear-gradient(180deg,#0a2a5230 0,#f2f8ff00 30%,#f2f8ff80 100%),url('../img/fondo-panorama-1672.webp')}}
@media(max-width:620px){.guest-main{background-image:linear-gradient(180deg,#0a2a5240 0,#f2f8ff00 26%,#f2f8ffb3 100%),url('../img/fondo-movil-900.webp')}}

/* ═══════════ KIRU V3.2 · Diseño: iconografía SVG homogénea, mascota protagonista, tarjetas y botones consistentes ═══════════ */
.ic{width:1.18em;height:1.18em;flex:none;vertical-align:-.2em;stroke:currentColor}
.nav-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;background:#eaf4ff;color:#1a63b8;font-size:0}
.nav-icon .ic{width:21px;height:21px;vertical-align:0}
.nav-link:hover .nav-icon{background:#d9ecff}
.nav-link.active .nav-icon{background:#ffffff33;color:#fff}
.sidebar-foot strong .ic,.panel h3 .ic,.hero-kicker .ic{color:#1a63b8}.hero-kicker .ic{color:#ffdb42}
.panel h3 .ic{width:24px;height:24px;padding:4px;border-radius:9px;background:#eaf4ff;box-sizing:content-box;vertical-align:-.3em}
.header-pill .ic{width:19px;height:19px;vertical-align:-.3em}.header-pill.guide .ic{color:#c6ff9a}
.menu-toggle .ic{width:26px;height:26px}
.bottomnav a span .ic{width:24px;height:24px}
.btn .ic{width:20px;height:20px;vertical-align:-.28em}.btn-small .ic{width:17px;height:17px}
.flash .ic,.banner .ic{width:20px;height:20px;vertical-align:-.3em}
.badge .ic,.tag .ic{width:14px;height:14px;vertical-align:-.15em}
/* Botones: una sola familia (alto, radio, relieve) */
.btn{border-radius:15px;min-height:48px;letter-spacing:.1px;box-shadow:0 1px 0 #ffffff80 inset}
.btn-primary{background:linear-gradient(180deg,#6fdc1b,#58cc02);border-color:#8de64a;border-bottom:5px solid #3a9600;color:#0d2a12}
.btn-primary:hover{background:linear-gradient(180deg,#7ee82c,#5fd406)}
.btn-outline{border-color:#bcd6ee;border-bottom:4px solid #a6c0d8;color:#1a4f86}
.btn-outline:hover{background:#f2f9ff}
.btn:focus-visible,.nav-link:focus-visible,.shortcut:focus-visible{outline:3px solid #1cb0f6;outline-offset:2px}
/* Tarjetas de acceso: icono SVG grande, color propio por tarjeta */
.shortcut{border-radius:24px;box-shadow:0 6px 14px #0b57901a,0 1px 0 #fff inset;background:linear-gradient(160deg,#fff 40%,#f1ffe6)}
.shortcut:hover{box-shadow:0 12px 22px #0b579024}
.shortcut-icon{display:inline-flex;align-items:center;justify-content:center;width:68px;height:68px;border-radius:22px;background:#fff;box-shadow:0 3px 0 #cfe9bd,0 0 0 2px #dff6cf inset;font-size:0}
.shortcut-icon .ic{width:40px;height:40px;vertical-align:0;stroke-width:1.9}
.cards-six .shortcut:nth-child(6n+1) .ic{color:#1a63b8}.cards-six .shortcut:nth-child(6n+2) .ic{color:#2fa000}.cards-six .shortcut:nth-child(6n+3) .ic{color:#e08a00}
.cards-six .shortcut:nth-child(6n+4) .ic{color:#d9467a}.cards-six .shortcut:nth-child(6n+5) .ic{color:#7a4fd6}.cards-six .shortcut:nth-child(6n) .ic{color:#0f9aa8}
/* Hero: KIRU protagonista (sobresale del marco), sello «KIRU» y métricas en pastillas */
.hero{overflow:visible;margin-top:54px;border-radius:34px}
.hero-kiru{width:36%;min-width:250px;max-height:470px;margin-top:-84px;margin-bottom:-6px;filter:drop-shadow(0 14px 14px #00406a66)}
.hero-message{border-radius:30px;box-shadow:0 14px 30px #00305f55,0 0 0 1px #8fd8ff33 inset}
.hero-mark{display:block;right:34px;top:-34px;font-size:40px;letter-spacing:-1px;transform:rotate(5deg);color:#0a3a78;text-shadow:0 2px 0 #fff,0 4px 0 #ffffffaa}
.hero-mark small{width:190px;margin:4px auto 0;font-size:11px;line-height:1.25;padding:6px 9px;border-radius:10px;box-shadow:0 3px 0 #c9a100;font-weight:1000}
.metrics .metric{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border:2px solid #cfeeff;box-shadow:0 2px 0 #b6d8ee}
.metric b{display:inline-flex;align-items:center;gap:5px;color:#0b3f78}.metric b .ic{color:#1a63b8;width:18px;height:18px}
.hero-message .btn-primary{font-size:17px;padding:13px 24px;box-shadow:0 8px 0 #2f8200 inset,0 6px 14px #0a3a0f55;border-bottom-width:5px}
/* Paneles: jerarquía y respiración */
.panel{box-shadow:0 8px 20px #0b57900f;border-radius:26px}.panel h3{font-size:20px;letter-spacing:-.3px}
.kpi{border-radius:22px;box-shadow:0 5px 12px #0b579010}.kpi .value{color:#0a3a78}
.pageheading h1{letter-spacing:-.8px}
progress{height:20px;box-shadow:0 2px 0 #b7e59a inset}progress::-webkit-progress-value{box-shadow:0 -4px 0 #ffffff45 inset}progress::-moz-progress-bar{background:linear-gradient(90deg,#54d600,#20b800);border-radius:50px}
.progress-row strong{color:#2b9a00;font-size:24px}
@media(max-width:920px){.hero{margin-top:40px}.hero-kiru{margin-top:-64px;width:210px;min-width:0}.hero-mark{display:block;font-size:28px;right:14px;top:-26px}.hero-mark small{width:150px;font-size:9px}}
@media(max-width:620px){.hero{margin-top:46px;padding-top:0}.hero-kiru{width:210px;height:210px;margin:-74px auto -22px}.hero-mark{right:8px;top:-20px;font-size:25px}.hero-mark small{width:128px;padding:4px 6px}
  .shortcut-icon{width:58px;height:58px;border-radius:18px}.shortcut-icon .ic{width:34px;height:34px}.nav-icon{width:32px;height:32px}.metrics .metric{padding:6px 9px}.hero-message .btn-primary{width:100%}}
@media(prefers-reduced-motion:reduce){.hero-kiru{animation:none}.shortcut,.btn{transition:none}}

.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}
.hero-mark small{letter-spacing:0;text-shadow:none;word-spacing:normal;text-align:center}
@media(max-width:620px){.hero-kiru{align-self:flex-start;margin:-74px 0 -22px -4px;width:200px;height:200px}.hero-mark{right:6px;top:-30px;font-size:26px}.hero-mark small{width:132px;font-size:9.5px}}
@media(max-width:620px){.hero{margin-top:72px}}


/* KIRU V4: chat flotante con prioridad en la conversación, CSS aislado */
dialog.sheet-guide{height:min(92dvh,820px);max-height:92dvh;display:none;flex-direction:column}
dialog.sheet-guide[open]{display:flex}
dialog.sheet-guide .sheet-head{flex:0 0 auto;min-height:62px;padding:8px 12px;gap:9px}
dialog.sheet-guide .sheet-kiru{width:40px;height:40px}
dialog.sheet-guide .sheet-head h2{font-size:17px;line-height:1.2}
dialog.sheet-guide .sheet-head p{font-size:11px;margin-top:1px}
dialog.sheet-guide .sheet-close{width:38px;height:38px}
dialog.sheet-guide .sheet-chat-body{flex:1;min-height:0;max-height:none;overflow:hidden;display:flex;flex-direction:column;gap:10px;padding:10px 12px 12px}
dialog.sheet-guide .kiru-help-details{flex:0 0 auto;border:1px solid #d2e1ee;background:#f5faff;border-radius:12px;overflow:auto;max-height:38%;font-size:13px}
dialog.sheet-guide .kiru-help-details summary{cursor:pointer;list-style:revert;padding:10px 12px;font-weight:800;color:#164577}
dialog.sheet-guide .kiru-help-details[open]{padding-bottom:9px}
dialog.sheet-guide .kiru-help-details .guide-tips{margin:0 10px 8px}
dialog.sheet-guide .kiru-help-details .guide-links{margin:0 10px}
dialog.sheet-guide .guide-chat{display:flex;flex-direction:column;flex:1;min-height:90px;max-height:none;overflow:auto;overscroll-behavior:contain;gap:12px;padding:7px 2px 12px}
dialog.sheet-guide .guide-chat:empty{display:flex}
dialog.sheet-guide .guide-chat:empty::before{content:'¡Hola! Soy KIRU. Cuéntame qué sucede en tu aula o qué te gustaría conversar.';align-self:flex-start;border:1px solid #c8e8ba;background:#f5fff2;border-radius:16px;padding:14px;color:#153d2b;max-width:88%;line-height:1.5}
dialog.sheet-guide .chips{flex:0 0 auto;display:flex;overflow-x:auto;flex-wrap:nowrap;padding:0 0 4px;gap:6px;max-height:52px}
dialog.sheet-guide .chips .chip{white-space:nowrap;flex:0 0 auto;padding:7px 10px;font-size:12px}
dialog.sheet-guide .guide-form{flex:0 0 auto;margin:0;padding:6px 0 0;border-top:1px solid #dde7f2;background:#fff}
dialog.sheet-guide .guide-form .field{margin:0}
dialog.sheet-guide .guide-form .field>span{font-size:12px;line-height:1.3;margin:0 0 5px}
dialog.sheet-guide .guide-input input{min-width:0;font-size:16px}
dialog.sheet-guide .guide-input .btn{width:48px;min-height:46px}
dialog.sheet-guide .msg-row{min-width:0}
dialog.sheet-guide .msg-row .msg{font-size:14px;line-height:1.55;font-weight:500;padding:10px 12px;max-width:calc(100% - 46px)}
dialog.sheet-guide .msg-avatar{width:32px;height:32px}
.kiru-case-cta{display:inline-flex;align-items:center;justify-content:center;gap:6px;margin-top:12px;padding:9px 14px;border-radius:12px;background:#0b5fb1;color:#fff!important;font-size:13px;font-weight:800;text-decoration:none!important;min-height:38px}
.kiru-case-cta:hover,.kiru-case-cta:focus-visible{background:#06457f;color:#fff!important}
@media(max-width:900px){dialog.sheet-guide{height:94dvh;max-height:94dvh}dialog.sheet-guide .sheet-chat-body{padding-bottom:calc(12px + env(safe-area-inset-bottom))}}
@media(min-width:901px){dialog.sheet-guide{height:min(80dvh,740px);max-height:80dvh;width:min(480px,calc(100vw - 48px));max-width:480px}}
