:root{--wine:#7d0b16;--wine2:#a41221;--gold:#d3a64b;--bg:#f6f3f1;--ink:#211b1b;--muted:#71696a;--card:#fff;--line:#e6dedb;--ok:#eaf7ee}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.screen{display:none;min-height:100dvh;max-width:560px;margin:auto;background:var(--bg)}.screen.active{display:block}.hero{padding:46px 28px 26px;text-align:center;background:linear-gradient(180deg,#fff 0%,#f7efeb 100%)}.brand-logo{width:150px;max-height:160px;object-fit:contain}.hero h1{margin:12px 0 5px;font-size:30px}.lead{color:var(--muted);font-size:16px;line-height:1.45}.card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:0 8px 26px rgba(54,24,24,.08)}.access-card{margin:16px 18px}.primary,.secondary{width:100%;border:0;border-radius:14px;padding:15px 16px;font-size:16px;font-weight:750;cursor:pointer}.primary{background:var(--wine);color:#fff}.secondary{background:#fff;color:var(--wine);border:1px solid #cdbfc0;margin-top:10px}.privacy-note{font-size:12px;color:var(--muted);text-align:center;margin:14px 0 0}.topbar{height:64px;display:flex;align-items:center;gap:14px;padding:10px 16px;background:#fff;border-bottom:1px solid var(--line);font-weight:800}.icon-btn{border:0;background:transparent;font-size:31px;line-height:1;color:var(--wine);cursor:pointer}.content{padding:20px 18px 94px}.content h2{margin:4px 0 8px}.content>p{color:var(--muted);line-height:1.45}label{display:block;font-size:13px;font-weight:750;margin:17px 0;color:#443a3b}input,select{display:block;width:100%;margin-top:7px;padding:14px;border:1px solid #d8cccc;border-radius:12px;background:#fff;font:inherit;color:var(--ink)}.notice{margin-top:18px;border-radius:14px;background:#fff6dd;border:1px solid #ead59b;padding:13px;font-size:13px;line-height:1.45}.notice.lock{background:#f1eeee;border-color:#ddd2d2}.app-header{height:72px;background:#fff;display:flex;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line);gap:10px;position:sticky;top:0;z-index:10}.app-header img{width:48px;height:48px;object-fit:contain}.app-header div{display:flex;flex-direction:column;flex:1}.app-header small{color:var(--muted);margin-top:2px}.avatar{width:42px;height:42px;border-radius:50%;border:0;background:var(--wine);color:#fff;font-weight:800}.home-content{padding-top:16px}.welcome-card{background:linear-gradient(135deg,var(--wine),#b32031);color:#fff;border-radius:20px;padding:20px;margin-bottom:16px}.welcome-card span{opacity:.83;font-size:13px}.welcome-card h2{margin:4px 0}.welcome-card p{margin:0;color:#f6dddd}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.feature{min-height:130px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;text-align:left;display:flex;flex-direction:column;gap:6px;cursor:pointer}.feature span{font-size:26px}.feature strong{font-size:16px}.feature small{color:var(--muted);line-height:1.25}.feature.important{border:2px solid #b8757c;background:#fffafa}.message-card{background:#fff;border-radius:18px;border:1px solid var(--line);padding:17px;margin-top:14px}.message-card p{margin:6px 0 0;color:var(--muted);line-height:1.4}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(560px,100%);height:72px;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);padding-bottom:env(safe-area-inset-bottom)}.bottom-nav button{border:0;background:transparent;color:#746969;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.bottom-nav button span{font-size:11px}.bottom-nav .selected{color:var(--wine);font-weight:800}.topic-list{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.topic{min-height:112px;padding:10px 7px;border:1px solid var(--line);border-radius:14px;background:#fff;font-weight:700;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px}
.topic-emoji{font-size:25px;line-height:1}
.topic-label{font-size:11.5px;line-height:1.18}.chat-box{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}.bubble{max-width:88%;padding:11px 13px;border-radius:14px;margin:8px 0;line-height:1.4}.bubble.bot{background:#f0e9e7}.bubble.user{background:#e7f4e8;margin-left:auto}.case{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px;margin-bottom:10px}.case strong{display:block}.case small{color:var(--muted)}.pill{display:inline-block;margin-top:8px;padding:5px 9px;border-radius:999px;background:var(--ok);font-size:12px}.empty{background:#fff;border:1px dashed #cfbbbb;border-radius:16px;padding:24px;text-align:center;color:var(--muted)}


/* V0.3 · Aviso de privacidad */
.privacy-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:18px 0;
  font-size:14px;
  line-height:1.4;
}
.privacy-check input{
  width:20px;
  height:20px;
  margin-top:1px;
  flex:0 0 auto;
  accent-color:#7d0b16;
}
.privacy-check a{
  color:#7d0b16;
  font-weight:700;
}


/* V0.4 · Cerrar sesión + marca CAD */
.session-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.logout-btn{
  border:1px solid rgba(255,255,255,.55);
  background:transparent;
  color:inherit;
  border-radius:10px;
  padding:8px 10px;
  font:inherit;
  font-weight:700;
}
.cad-brand{
  display:flex;
  justify-content:center;
  margin:4px 0 14px;
}
.cad-brand img{
  display:block;
  max-width:150px;
  max-height:78px;
  object-fit:contain;
}

.cad-brand img{
  width:min(220px,75%);
  max-width:220px;
  max-height:none;
  height:auto;
}
.header-logout{
  border:0;
  background:transparent;
  color:var(--wine);
  font-size:11px;
  font-weight:800;
  padding:6px 2px;
  cursor:pointer;
  white-space:nowrap;
}
