:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172d40;
  background: #f4f9fd;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; min-height: 100%; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.material-symbols-rounded { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; }
.topbar { height: 76px; background: #45a4ec; box-shadow: 0 3px 18px #267bb725; }
.topbar-inner { width: min(1240px, 100%); height: 100%; margin: auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.permissions-open { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #ffffff80; border-radius: 10px; background: #ffffff1a; color: #fff; cursor: pointer; }
.permissions-open:hover { background: #ffffff33; }
.permissions-open .material-symbols-rounded { font-size: 20px; }
.site-logo { display: block; width: auto; max-width: 230px; max-height: 48px; object-fit: contain; filter: drop-shadow(0 1px 2px #143c6370); }
.portal {
  width: min(1240px, 100%);
  min-height: calc(100dvh - 76px);
  margin: auto;
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.sidebar { align-self: stretch; display: flex; flex-direction: column; min-width: 0; }
.intro { margin: auto 0; padding: 56px 0; }
.eyebrow { margin: 0 0 16px; color: #17699f; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
h1 { max-width: 320px; margin: 0; font-size: clamp(36px, 4vw, 54px); line-height: 1.07; letter-spacing: -.055em; }
.chat {
  height: min(780px, calc(100dvh - 140px)); min-height: 520px; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid #dceaf5; border-radius: 24px;
  background: #fff; box-shadow: 0 22px 65px #21476717;
}
.messages {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, #fbfcff, #fff 36%);
}
.welcome { margin: auto; color: #7e889e; font-size: 15px; text-align: center; }
.bubble { align-self: flex-end; max-width: min(83%, 510px); padding: 12px 15px; overflow-wrap: anywhere; border-radius: 17px 17px 5px 17px; background: #45a4ec; color: #102c42; line-height: 1.5; box-shadow: 0 3px 12px #2f87c426; }
.bubble small { display: block; margin-top: 6px; font-size: 11px; opacity: .78; }
.bubble.agent { align-self: flex-start; background: #eaf5fd; color: #17344c; border-radius: 17px 17px 17px 5px; box-shadow: none; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-body p { margin: 0 0 .55em; }
.message-body p:last-child { margin-bottom: 0; }
.message-body a { color: #17699f; text-decoration: underline; text-underline-offset: 2px; }
.chat-image { display: block; max-width: 100%; max-height: 320px; margin-top: 8px; border-radius: 10px; object-fit: contain; }
.chat-file { display: block; max-width: 100%; margin-top: 8px; overflow-wrap: anywhere; color: inherit; text-decoration: underline; }
.chat-audio { display: block; max-width: 100%; margin-top: 8px; }
.reply-options { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 12px; }
.reply-options button { min-height: 42px; max-width: 100%; padding: 8px 12px; border: 1px solid #a8d8f8; border-radius: 10px; background: #fff; color: #17699f; cursor: pointer; text-align: left; line-height: 1.35; }
.reply-options button:hover, .reply-options button:focus-visible { background: #dff1fd; border-color: #45a4ec; }
.composer { display: flex; align-items: center; gap: 10px; flex: none; margin: 0; padding: 15px 18px 10px; border-top: 1px solid #edf0f6; background: #fff; }
.composer [hidden] { display: none !important; }
.composer-pill { display: flex; align-items: center; flex: 1; min-width: 0; min-height: 56px; padding: 0 7px 0 16px; border: 1px solid #243238; border-radius: 28px; background: #243238; }
.composer-pill:focus-within { border-color: #45a4ec; box-shadow: 0 0 0 3px #45a4ec33; }
.composer input:not([type="file"]) { flex: 1; min-width: 0; min-height: 52px; padding: 0 4px; border: 0; outline: none; color: #fff; background: transparent; }
.composer input:not([type="file"])::placeholder { color: #b5c2c9; opacity: 1; }
.composer button { display: grid; place-items: center; flex: none; border: 0; cursor: pointer; }
.composer button:disabled { opacity: .45; cursor: not-allowed; }
.composer-icon { width: 39px; height: 42px; padding: 0; border-radius: 21px; background: transparent; color: #d4e0e6; }
.composer-icon:hover:not(:disabled) { background: #3d535e; }
.composer-action { width: 56px; height: 56px; padding: 0; border-radius: 50%; background: #45a4ec; color: #102c42; }
.composer-action:hover:not(:disabled) { background: #73bef3; }
.composer-action .material-symbols-rounded { font-size: 27px; }
.composer.recording .composer-pill { border-color: #ed8181; background: #422e33; }
#recording-status { flex: 1; color: #ffd0d0; font-size: 14px; font-weight: 700; }
.notice { flex: none; margin: 0; padding: 0 20px 15px; background: #fff; color: #7c879d; font-size: 11px; line-height: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.permissions-overlay[hidden] { display: none; }
.permissions-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: #0a233dbd; }
.permissions-card { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border-radius: 20px; background: #fff; box-shadow: 0 24px 70px #102b4566; }
.permissions-icon { color: #45a4ec; font-size: 34px; }
.permissions-card h2 { margin: 8px 0 10px; font-size: 26px; }
.permissions-card p { line-height: 1.5; }
.permissions-card ul { padding: 0; list-style: none; display: grid; gap: 13px; }
.permissions-card li { display: flex; align-items: flex-start; gap: 10px; line-height: 1.4; }
.permissions-card li .material-symbols-rounded { flex: none; color: #2686cc; }
.permissions-status { min-height: 1.4em; margin: 12px 0; color: #286991; font-size: 13px; }
.permissions-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.permissions-actions button { min-height: 44px; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.permissions-secondary { border: 1px solid #b9d0df; background: #fff; color: #17415d; }
.permissions-primary { border: 1px solid #45a4ec; background: #45a4ec; color: #102c42; }
.permissions-primary:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 800px) {
  .topbar { height: 68px; }
  .topbar-inner { padding: 0 18px; }
  .site-logo { max-width: 195px; max-height: 42px; }
  .portal { height: calc(100dvh - 68px); min-height: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
  .sidebar { display: none; }
  .chat { flex: 1; width: 100%; height: auto; min-height: 0; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; }
  .messages { padding: 18px; }
  .composer { padding: 11px 12px 8px; gap: 8px; }
  .notice { padding: 0 14px calc(10px + env(safe-area-inset-bottom)); }
}
@media (max-width: 390px) {
  .permissions-open span:last-child { display: none; }
  .permissions-card { padding: 20px; }
  .messages { padding: 14px 12px; }
  .bubble { max-width: 90%; }
  .composer { padding-inline: 10px; gap: 7px; }
  .composer-pill { padding-left: 12px; padding-right: 4px; }
  .composer-icon { width: 34px; }
  .composer-action { width: 50px; height: 50px; }
}
.conversation-end:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; background: #eaf5fd; color: #17394c; flex-wrap: wrap; }
.conversation-end button { border: 0; border-radius: .65rem; background: #45a4ec; color: #09263a; padding: .7rem 1rem; cursor: pointer; font-weight: 700; }
