:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#d8e1ee;
  --accent:#5b6df8;
  --accent-dark:#4656d3;
  --accent-soft:#eef1ff;
  --success:#eaf8ef;
  --warning:#fff5df;
  --user:#e9f3ff;
  --bot:#f8fafc;
  --shadow:0 12px 30px rgba(32, 52, 89, 0.08);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:linear-gradient(180deg,#eef3f9 0%, #f8fbff 100%);
  color:var(--text);
}
.app-shell{
  max-width:900px;
  margin:0 auto;
  padding:32px 18px 40px;
}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow);
}
.welcome-card{
  padding:28px;
}
.chat-card{
  padding:0;
  overflow:hidden;
}
.hidden{display:none}
.badge{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent-dark);
  font-size:13px;
  font-weight:700;
  margin-bottom:14px;
}
h1,h2{margin:0 0 10px}
.lead{
  font-size:18px;
  line-height:1.6;
  color:#374151;
  margin:0 0 18px;
}
.info-panel{
  border:1px solid var(--border);
  background:#fafcff;
  border-radius:16px;
  padding:18px;
  margin:16px 0;
}
.info-panel h2{
  font-size:18px;
}
.info-panel p{
  margin:8px 0 0;
  color:#374151;
  line-height:1.55;
}
.notice{
  border-radius:14px;
  padding:14px 16px;
  line-height:1.5;
  margin:16px 0 20px;
}
.notice.warning{
  background:var(--warning);
  border:1px solid #f0e0aa;
}
.checkbox-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin:18px 0 24px;
  line-height:1.5;
}
.checkbox-row input{
  margin-top:4px;
  transform:scale(1.15);
}
.welcome-actions,
.input-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.primary-btn,
.secondary-btn,
.ghost-btn{
  border:none;
  border-radius:14px;
  padding:13px 18px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
}
.primary-btn{
  background:var(--accent);
  color:white;
}
.primary-btn:hover{background:var(--accent-dark)}
.secondary-btn{
  background:#eff4ff;
  color:#2436b8;
  border:1px solid #d5ddff;
}
.ghost-btn{
  background:white;
  border:1px solid var(--border);
  color:#374151;
}
.chat-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:20px 20px 14px;
  border-bottom:1px solid var(--border);
}
.chat-box{
  min-height:360px;
  max-height:60vh;
  overflow-y:auto;
  padding:20px;
  background:#fcfdff;
}
.message{
  max-width:78%;
  padding:14px 16px;
  border-radius:16px;
  margin-bottom:14px;
  line-height:1.55;
  white-space:pre-wrap;
}
.message.bot{
  background:var(--bot);
  border:1px solid var(--border);
  border-top-left-radius:6px;
}
.message.user{
  background:var(--user);
  border:1px solid #cfe3ff;
  border-top-right-radius:6px;
  margin-left:auto;
}
.status-text{
  padding:0 20px 10px;
  color:var(--muted);
  font-size:14px;
}
.input-area{
  border-top:1px solid var(--border);
  padding:16px 20px 20px;
  background:white;
}
textarea{
  width:100%;
  resize:vertical;
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  font-size:15px;
  font-family:inherit;
  min-height:88px;
  margin-bottom:12px;
}
textarea:focus{
  outline:none;
  border-color:#b9c6ff;
  box-shadow:0 0 0 3px rgba(91,109,248,0.12);
}
.summary-card{
  background:var(--success);
  border:1px solid #cdeed8;
}
@media (max-width: 700px){
  .chat-header{
    flex-direction:column;
    align-items:stretch;
  }
  .message{
    max-width:100%;
  }
}
