* { box-sizing: border-box; }
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; color: #111; background: #f5f5f7; }
body { margin: 0; min-height: 100svh; height: 100dvh; padding: 24px; display: flex; justify-content: center; align-items: center; }
.chat { width: 100%; max-width: 360px; height: 100%; max-height: 740px; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #ddd; border-radius: 8px; }
.chat-header { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 12px 16px; background: #ffc733; }
.chat-avatar { width: 56px; height: 56px; object-fit: contain; }
h1 { margin: 0 0 4px; font-size: 19px; line-height: 1.2; font-weight: 700; letter-spacing: -0.035em; }
.chat-header p { margin: 0; font-size: 12px; line-height: 1.4; }
.chat-transcript { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #d2d2d2 transparent; }
.message { max-width: 92%; margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; border-radius: 8px; overflow-wrap: break-word; flex: 0 0 auto; }
.message--assistant { background: #ededed; color: #464646; }
.message--user { background: #fcd757; color: #111; align-self: flex-end; }
.message.is-new, .event.is-new { animation: appear 160ms ease; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.typing { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; min-height: 30px; padding: 10px 14px; border-radius: 8px; background: #ededed; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: #777; animation: thinking 900ms ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 150ms; }
.typing span:nth-child(3) { animation-delay: 300ms; }
@keyframes thinking { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.event { display: flex; align-items: stretch; gap: 16px; flex: 0 0 auto; width: 100%; max-width: 420px; padding: 12px; border: 1px solid #e4e4e4; border-radius: 8px; background: #fafafa; }
.event .event-poster { display: block; flex: 0 0 84px; width: 84px; height: 116px; object-fit: cover; border-radius: 4px; }
.event-details { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 2px 0; }
.event-category { font-size: 11px; color: #737373; line-height: 1.4; }
.event h2 { margin: 6px 0; font-size: 18px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; color: #171717; }
.event .event-venue { margin: 0; color: #5c5c5c; font-size: 12px; line-height: 1.45; }
.event-bottom { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: auto; padding-top: 12px; }
.event-bottom strong { font-size: 14px; font-weight: 600; color: #171717; white-space: nowrap; }
.event-bottom span { font-size: 11px; color: #737373; line-height: 1.4; }
@media (max-width: 340px) { .event { gap: 12px; padding: 10px; } .event .event-poster { flex-basis: 76px; width: 76px; height: 116px; } .event h2 { font-size: 16px; } .event-bottom { padding-top: 8px; } .event-bottom span { display: none; } }
.chat-composer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 16px; margin: 0 16px; border: 1px solid #dedede; border-radius: 8px; color: #777; font-size: 12px; }
.chat-composer #draft { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-composer.has-draft { color: #111; }
.send { display: grid; flex: 0 0 26px; height: 26px; place-items: center; background: #ffc733; color: #111; font-size: 18px; border-radius: 6px; }
.demo-controls { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.demo-controls > div { display: flex; gap: 2px; }
.demo-label { font-size: 11px; color: #666; }
button { font: inherit; font-size: 11px; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 4px; color: #444; background: transparent; cursor: pointer; }
button:hover { background: #f0f0f0; }
button:focus-visible, .chat-transcript:focus-visible { outline: 2px solid #7c5800; outline-offset: -2px; }
button:disabled { color: #888; cursor: default; }
.demo-notice { flex: 0 0 auto; margin: 0; padding: 0 16px 12px; color: #666; font-size: 11px; line-height: 1.5; }
[hidden] { display: none !important; }
.embedded body { padding: 0; background: #fff; }
.embedded .chat { max-width: none; max-height: none; border: none; border-radius: 0; }
.embedded .chat-header { padding: 16px 18px; gap: 14px; }
.embedded .chat-avatar { width: 64px; height: 64px; flex: 0 0 64px; }
.embedded h1 { font-size: 20px; margin-bottom: 6px; letter-spacing: -0.025em; }
.embedded .chat-header p { font-size: 13px; line-height: 1.3; }
.embedded .chat-header p span { display: block; }
.embedded .chat-transcript { padding: 12px; gap: 10px; }
.embedded .message { font-size: 13px; padding: 8px 10px; }
.embedded .demo-notice { display: none; }
.embedded .demo-label { display: none; }
.embedded .demo-controls > div { width: 100%; justify-content: space-between; }
@media (max-width: 380px) {
  body { padding: 8px; }
  .chat-header { gap: 8px; }
  .chat-avatar { width: 44px; height: 44px; }
  h1 { font-size: 16px; }
  .embedded .chat-header { padding: 14px; gap: 10px; }
  .embedded .chat-avatar { width: 56px; height: 56px; flex-basis: 56px; }
  .embedded h1 { font-size: 18px; }
  .embedded .chat-header p { font-size: 12px; }
  .chat-header p { font-size: 11px; }
  .demo-controls { padding-right: 8px; padding-left: 8px; gap: 4px; }
  button { padding-right: 6px; padding-left: 6px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
