:root{
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:#1e1e1e;background:#fff;
  --line:#e2e2e2;--soft:#f6f8fa;--soft2:#f7f7f7;--blue:#e0eeff;--green:#e9f4ec;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#fff;height:100%;overscroll-behavior:none}
body{min-height:100dvh}
button,input,textarea{font:inherit}
button{cursor:pointer}
.app{height:100dvh;display:flex;flex-direction:column;background:#fff}
.header{
  flex:0 0 auto;padding:calc(10px + env(safe-area-inset-top)) 16px 9px;
  border-bottom:1px solid var(--line);background:#fff;z-index:3
}
.title{font-size:18px;font-weight:800;line-height:1.2}
.subtitle{font-size:12px;color:#555;margin-top:3px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.status-dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:#1a9c48}
.status-dot.offline{background:#c87900}
.header-actions{display:flex;gap:8px;margin-top:8px}
.small-btn{
  border:1px solid #d6d6d6;background:#fff;border-radius:10px;padding:7px 10px;font-size:12px
}
.chat{
  flex:1 1 auto;overflow:auto;padding:10px 12px 18px;
  -webkit-overflow-scrolling:touch;scroll-behavior:smooth
}
.card{
  background:var(--soft2);border-radius:18px;padding:14px;margin:6px 0;
  box-shadow:0 1px 1px rgba(0,0,0,.02)
}
.welcome{background:var(--soft)}
.advisor-label{font-size:17px;font-weight:800;margin-bottom:10px}
.welcome .advisor-label{font-size:20px}
.welcome p{margin:6px 0;line-height:1.35}
.example{font-size:13px;margin-top:10px;white-space:pre-line}
.user-row{display:flex;justify-content:flex-end;margin:6px 0}
.user-bubble{
  max-width:84%;background:var(--blue);border-radius:17px;padding:11px 14px;
  font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere
}
.product-img-wrap{
  width:100%;height:220px;background:#fff;border-radius:12px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;margin-bottom:10px
}
.product-img{width:100%;height:100%;object-fit:contain;background:#fff}
.img-placeholder{font-size:13px;color:#777;text-align:center;padding:14px}
.product-name{font-size:19px;font-weight:800;margin:2px 0 6px;line-height:1.25}
.line{font-size:14px;margin:3px 0;overflow-wrap:anywhere}
.sku{font-size:16px;font-weight:800}
.relation{
  margin-top:10px;padding:10px 11px;background:var(--green);border-radius:12px;font-size:14px;line-height:1.35
}
.relation strong{display:block;margin-bottom:3px}
.description{font-size:14px;line-height:1.4;white-space:pre-wrap;margin-top:12px}
.attributes{font-size:13px;line-height:1.4;white-space:pre-wrap;margin-top:4px}
.section-title{font-size:14px;font-weight:800;margin-top:10px}
.actions{display:grid;grid-template-columns:1fr;gap:8px;margin-top:14px}
.action-btn{
  display:block;width:100%;border:0;border-radius:11px;padding:12px 13px;
  background:#eeeeee;color:#111;text-align:center;text-decoration:none;font-weight:600
}
.commercial-tip{
  margin-top:12px;padding:10px 11px;background:#fff;border-radius:12px;font-size:13px;line-height:1.4
}
.commercial-tip strong{font-size:14px;display:block;margin-bottom:3px}
.no-result{font-size:15px;line-height:1.4}
.no-result strong{display:block;margin-top:8px;font-size:14px}
.composer{
  flex:0 0 auto;display:flex;align-items:flex-end;gap:8px;padding:8px 10px;
  padding-bottom:calc(8px + env(safe-area-inset-bottom));background:#f7f7f7;border-top:1px solid #eee
}
#query{
  flex:1;resize:none;max-height:120px;min-height:50px;border:1px solid #ddd;border-radius:14px;
  padding:13px 12px;background:#fff;outline:none;font-size:16px;line-height:1.3
}
#send{min-height:50px;border:0;border-radius:12px;padding:0 16px;background:#ededed;font-weight:700}
.install-sheet{
  position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;align-items:flex-end;z-index:20
}
.install-sheet.show{display:flex}
.sheet{
  width:100%;background:#fff;border-radius:18px 18px 0 0;padding:18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height:70dvh;overflow:auto
}
.sheet h2{font-size:18px;margin:0 0 8px}
.sheet p{font-size:14px;line-height:1.4;margin:7px 0}
.sheet button{width:100%;padding:12px;border:0;border-radius:11px;margin-top:10px}
.version{font-size:11px;color:#777;margin-top:8px}
@media(min-width:720px){
  .app{max-width:760px;margin:0 auto;border-left:1px solid #eee;border-right:1px solid #eee}
  .actions{grid-template-columns:1fr 1fr}
}
