* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Arial, Helvetica, sans-serif; background: #f3f4f6; color: #111827; }
body { min-height: 100vh; display: flex; flex-direction: column; }
header { background: #2563eb; color: white; padding: 14px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.header-wrap { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-weight: 700; font-size: 20px; }
.subtitle { opacity: .88; font-size: 13px; }
#chat { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 18px; overflow-y: auto; }
.row { width: 100%; margin: 0 0 12px; display: flex; }
.row.user { justify-content: flex-end; }
.row.assistant { justify-content: flex-start; }
.bubble { max-width: min(88%, 920px); padding: 12px 16px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.48; box-shadow: 0 1px 5px rgba(0,0,0,.08); font-size: 17px; }
.user .bubble { background: #3b82f6; color: white; border-bottom-right-radius: 6px; }
.assistant .bubble { background: white; color: #111827; border-bottom-left-radius: 6px; }
.loader .bubble { color: #6b7280; }
.error .bubble { background: #fee2e2; color: #991b1b; }
footer { position: sticky; bottom: 0; background: white; border-top: 1px solid #d1d5db; padding: 10px; }
.composer { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; align-items: center; }
#input { flex: 1; border: 1px solid #9ca3af; border-radius: 12px; padding: 12px 14px; font-size: 17px; outline: none; min-width: 0; }
#input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
button, .button { border: 0; border-radius: 10px; padding: 12px 16px; color: white; font-size: 16px; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: #2563eb; }
.green { background: #16a34a; }
.red { background: #dc2626; }
.notice { max-width: 1200px; margin: 8px auto 0; padding: 0 18px; color: #6b7280; font-size: 12px; line-height: 1.35; }
.mobile-links { display: none; max-width: 1200px; margin: 7px auto 0; text-align: center; font-size: 13px; }
.mobile-links a, .mobile-links button { color: #6b7280; background: none; padding: 4px 8px; text-decoration: underline; font-size: 13px; }
@media (max-width: 720px) {
  .subtitle { display: none; }
  #chat { padding: 12px; }
  .bubble { max-width: 94%; font-size: 16px; }
  .desktop-action { display: none; }
  .mobile-links { display: block; }
  button, .button { padding: 11px 13px; }
}
