/* Chat client – modern, accessible.
   Typography & color scheme adapted from the official City of Hofheim design
   system (hofheim.de): Source Sans Pro + brand blue #00498d / cyan #0a9fcc. */

/* Self-hosted Source Sans Pro (matches hofheim.de; no external CDN for privacy) */
@font-face {
  font-display: swap;
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 400;
  src: url("/chat/files/fonts/sanspro-regular-webfont.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Source Sans Pro";
  font-style: italic;
  font-weight: 400;
  src: url("/chat/files/fonts/sanspro-it-webfont.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 600;
  src: url("/chat/files/fonts/sanspro-semibold-webfont.woff2") format("woff2");
}
@font-face {
  font-display: swap;
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 700;
  src: url("/chat/files/fonts/sanspro-bold-webfont.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  /* Type */
  --font-body: "Source Sans Pro", Arial, Helvetica, system-ui, sans-serif;

  /* Backgrounds & surfaces */
  --bg: #eef1f4;
  --bg-gradient-mid: #e8edf1;
  --bg-gradient-end: #e2e8ee;
  --surface: #ffffff;
  --surface-elevated: #f5f5f5;
  --surface-sunken: #eef1f4;
  --input-bg: #f5f5f5;

  /* Text (hofheim.de: text #2b2b2b, light #707070) */
  --text: #2b2b2b;
  --text-soft: #5a5f66;
  --muted: #707070;

  /* Lines */
  --border: #cfd4da;
  --border-soft: rgba(112, 112, 112, 0.28);

  /* Accent (hofheim.de brand blue -> cyan) */
  --accent: #00498d;
  --accent-hover: #003a72;
  --accent-secondary: #0a9fcc;
  --accent-gradient: linear-gradient(90deg, #00498d, #0a9fcc);
  --accent-contrast: #ffffff;
  --accent-tint: rgba(0, 73, 141, 0.08);
  --accent-tint-strong: rgba(0, 73, 141, 0.14);
  --accent-border: rgba(0, 73, 141, 0.3);
  --ring: rgba(0, 73, 141, 0.45);

  /* User bubble */
  --user-bg: linear-gradient(145deg, #e3eef7 0%, #cfe4f2 100%);
  --user-bg-solid: #e3eef7;
  --user-text: #06304f;

  /* Warning / flagged (hofheim.de error red #a01e26) */
  --warn-bg: #f6e8e9;
  --warn-border: #a01e26;
  --warn-text: #a01e26;

  /* Code */
  --code-bg: rgba(0, 73, 141, 0.07);

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(43, 43, 43, 0.08);
  --shadow-md: 0 2px 12px rgba(43, 43, 43, 0.1), 0 1px 3px rgba(43, 43, 43, 0.07);
  --shadow-lg: 0 10px 34px rgba(0, 40, 80, 0.14), 0 3px 10px rgba(0, 40, 80, 0.08);
  --assistant-shadow: var(--shadow-md);
  --user-shadow: 0 2px 10px rgba(0, 73, 141, 0.12);

  /* Scrollbar */
  --scrollbar-thumb: rgba(43, 43, 43, 0.22);
  --scrollbar-thumb-hover: rgba(43, 43, 43, 0.38);

  --focus-outline: 2px solid var(--accent);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --bg-gradient-mid: #101a28;
    --bg-gradient-end: #0a121c;
    --surface: #172231;
    --surface-elevated: #1f2c3d;
    --surface-sunken: #131d29;
    --input-bg: #1f2c3d;

    --text: #e7ecf1;
    --text-soft: #b0b9c3;
    --muted: #94a0ac;

    --border: #33465c;
    --border-soft: rgba(120, 140, 165, 0.3);

    --accent: #4ea9dd;
    --accent-hover: #6dbcea;
    --accent-secondary: #37c0e6;
    --accent-gradient: linear-gradient(90deg, #1f6fb0, #0a9fcc);
    --accent-contrast: #06212f;
    --accent-tint: rgba(78, 169, 221, 0.15);
    --accent-tint-strong: rgba(78, 169, 221, 0.24);
    --accent-border: rgba(78, 169, 221, 0.42);
    --ring: rgba(78, 169, 221, 0.55);

    --user-bg: linear-gradient(145deg, #1d3a55 0%, #235478 100%);
    --user-bg-solid: #1d3a55;
    --user-text: #dcecfa;

    --warn-bg: rgba(224, 90, 100, 0.16);
    --warn-border: #e2727b;
    --warn-text: #eb929a;

    --code-bg: rgba(255, 255, 255, 0.08);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 14px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 38px rgba(0, 0, 0, 0.55), 0 3px 12px rgba(0, 0, 0, 0.4);
    --user-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);

    --scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.34);
  }
}

* {
  box-sizing: border-box;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-0.35rem);
    opacity: 1;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.445;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-gradient-mid) 45%, var(--bg-gradient-end) 100%);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-container {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border-soft), var(--shadow-lg);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 0.875rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}

.reset-btn {
  margin-left: 0;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.reset-btn:hover {
  background: var(--surface-elevated);
  color: var(--text);
  border-color: var(--accent);
}

.reset-btn:active {
  transform: scale(0.94);
}

.reset-btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.chat-logo {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 0.65rem;
  flex-shrink: 0;
  box-shadow: var(--assistant-shadow);
}

.chat-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.chat-title p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}

.chunk-status {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-elevated);
  white-space: nowrap;
}

.chunk-status--loading {
  border-color: var(--accent-border);
  color: var(--accent);
  animation: chunk-status-pulse 1.4s ease-in-out infinite;
}

.chunk-status--ready {
  border-color: rgba(42, 157, 106, 0.45);
  color: #1f7a52;
  background: rgba(42, 157, 106, 0.12);
}

.chunk-status--absent {
  opacity: 0.8;
}

@keyframes chunk-status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-color-scheme: dark) {
  .chunk-status--ready {
    color: #7dcea0;
    border-color: rgba(125, 206, 160, 0.4);
    background: rgba(42, 157, 106, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chunk-status--loading {
    animation: none;
  }
}

.messages-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0 3rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.messages::-webkit-scrollbar {
  width: 0.65rem;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.messages::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.messages::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
  border: 3px solid transparent;
  background-clip: padding-box;
}

.welcome-block {
  margin-bottom: 0.5rem;
}

.welcome {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.85rem;
  line-height: 1.55;
}

.scroll-to-bottom {
  position: absolute;
  bottom: 0.5rem;
  right: 0.25rem;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.scroll-to-bottom:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: var(--shadow-lg);
}

.scroll-to-bottom:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.scroll-to-bottom-icon {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 600;
}

.msg {
  margin-bottom: 1rem;
  padding: 0.8rem 1.05rem;
  border-radius: 1rem;
  max-width: 92%;
  animation: fadeSlideIn 0.28s ease-out;
}

.msg.user {
  margin-left: auto;
  color: var(--user-text);
  background: var(--user-bg-solid);
  background-image: var(--user-bg);
  border: none;
  border-bottom-right-radius: 0.35rem;
  box-shadow: var(--user-shadow);
}

.msg.assistant {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--assistant-shadow);
  border-bottom-left-radius: 0.35rem;
}

.msg .context-info {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.msg .context-info:empty {
  display: none;
}

.msg .context-info--pill {
  display: inline-block;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.5rem;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.35;
}

.msg .context-info--pill:empty {
  display: none;
}

.msg .context-info--flagged {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.45rem;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-border);
  border-radius: 0 6px 6px 0;
  color: var(--warn-text);
  font-size: 0.82rem;
}

.msg .context-info--router-dev {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.5rem;
  padding: 0.35rem 0.5rem;
  background: var(--code-bg);
  border-radius: 0.35rem;
  font-family: ui-monospace, monospace;
  line-height: 1.4;
  word-break: break-word;
}

.msg .context-info--router-dev:empty {
  display: none;
}

.msg .flagged-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.msg .content {
  word-break: break-word;
}

.msg.assistant .content {
  line-height: 1.6;
}

.msg .content:not(.markdown) {
  white-space: pre-wrap;
}

/* Typing indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0;
  min-height: 1.5rem;
}

.typing-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--muted);
  animation: typingBounce 1.1s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

/* Markdown in assistant messages */
.msg .content.markdown p {
  margin: 0 0 0.5em;
}
.msg .content.markdown p:last-child {
  margin-bottom: 0;
}
.msg .content.markdown ul,
.msg .content.markdown ol {
  margin: 0.5em 0;
  padding-left: 1.25rem;
}
.msg .content.markdown li {
  margin: 0.2em 0;
}
.msg .content.markdown code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}
.msg .content.markdown pre {
  margin: 0.5em 0;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--code-bg);
  border-radius: 0.4rem;
  font-size: 0.9em;
}
.msg .content.markdown pre code {
  padding: 0;
  background: none;
}
.msg .content.markdown h1, .msg .content.markdown h2, .msg .content.markdown h3,
.msg .content.markdown h4, .msg .content.markdown h5, .msg .content.markdown h6 {
  margin: 0.9em 0 0.4em;
  font-size: 1em;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.msg .content.markdown h1 { font-size: 1.2em; }
.msg .content.markdown h2 { font-size: 1.1em; }
.msg .content.markdown h3 { font-size: 1.03em; }
.msg .content.markdown h1:first-child, .msg .content.markdown h2:first-child { margin-top: 0; }
.msg .content.markdown a {
  color: var(--accent);
  text-decoration: none;
}
.msg .content.markdown a:hover {
  text-decoration: underline;
}
.msg .content.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5em 0;
  font-size: 0.95em;
}
.msg .content.markdown th,
.msg .content.markdown td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
  word-break: normal;
  white-space: normal;
  overflow-wrap: break-word;
}
.msg .content.markdown thead th {
  background: var(--surface-sunken);
  font-weight: 600;
}

.msg .content.markdown blockquote {
  margin: 0.5em 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--text-soft);
}

.citations {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

.citations-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.citations-toggle:hover {
  background: var(--accent-tint-strong);
  border-color: var(--accent);
}

.citations-toggle:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.citations-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.citations.collapsed .citations-list {
  display: none;
}

.citations a {
  color: var(--accent);
  text-decoration: none;
}

.citations a:hover {
  text-decoration: underline;
}

.citations a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.citation-score {
  font-size: 0.85em;
  color: var(--muted);
  margin-left: 0.25rem;
}

.citation-faq {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-sunken);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.citation-source {
  margin-left: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.citation-snippet {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-soft);
  white-space: pre-wrap;
  max-height: 12rem;
  overflow-y: auto;
  padding: 0.35rem 0.5rem;
  background: var(--surface-sunken);
  border-radius: 0.35rem;
  border: 1px solid var(--border);
}

.chat-bottom {
  flex-shrink: 0;
  padding: 0.5rem 0 0.75rem;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
}

.input-area {
  padding: 0.15rem 0 0.35rem;
}

.input-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding: 0.35rem 0.35rem 0.35rem 0.85rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-row:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-tint-strong);
}

#message-input {
  flex: 1;
  min-height: 2.75rem;
  max-height: 8.5rem;
  padding: 0.55rem 0.25rem 0.55rem 0;
  border: none;
  border-radius: 0;
  font: inherit;
  resize: none;
  background: transparent;
  color: var(--text);
  line-height: 1.45;
}

#message-input:focus {
  outline: none;
}

#message-input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

#send-btn {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  color: var(--accent-contrast);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

#send-btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: scale(1.04);
  box-shadow: var(--shadow-md);
}

#send-btn:active:not(:disabled) {
  transform: scale(0.96);
}

#send-btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

#send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.send-icon {
  display: block;
  margin-left: 2px;
}

.easy-language {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.easy-language input {
  margin-right: 0.35rem;
  width: 1.05rem;
  height: 1.05rem;
  vertical-align: middle;
  accent-color: var(--accent);
}

.easy-language input:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.dev-details {
  margin: 0.4rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.dev-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0;
  list-style-position: outside;
}

.dev-details summary:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  border-radius: 4px;
}

.dev-details[open] summary {
  margin-bottom: 0.35rem;
}

.dev-sources {
  margin: 0;
  padding: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.dev-sources input {
  margin-right: 0.3rem;
  vertical-align: middle;
  accent-color: var(--accent);
}

.dev-sources input:focus-visible {
  outline: var(--focus-outline);
}

.retry-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--accent-gradient);
  color: var(--accent-contrast);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.12s ease;
}

.retry-btn:hover {
  filter: brightness(1.08);
}

.retry-btn:active {
  transform: scale(0.97);
}

.retry-btn:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.tool-status {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--surface-elevated);
  border-radius: 0.4rem;
  border-left: 3px solid var(--accent);
  animation: tool-status-pulse 1.6s ease-in-out infinite;
}

@keyframes tool-status-pulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.privacy {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.privacy a {
  color: var(--accent);
}

.privacy a:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

.app-version {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.7;
}

/* Follow-up suggestion chips */
.followup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.followup-chip {
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: 1.25rem;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 0.4rem 0.85rem;
  min-height: 2.75rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  text-align: left;
}

.followup-chip:hover,
.followup-chip:focus {
  background: var(--accent-gradient);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: var(--shadow-md);
  outline: none;
}

.followup-chip:active {
  transform: scale(0.98);
}

.followup-chip:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  body {
    padding: 1.5rem 1rem;
  }

  .chat-container {
    border-radius: 1rem;
    min-height: calc(100vh - 3rem);
    min-height: calc(100dvh - 3rem);
    max-height: calc(100dvh - 3rem);
  }
}

@media (max-width: 480px) {
  .chat-container {
    padding: 0.5rem 0.65rem 0;
    box-shadow: none;
  }

  .chat-logo {
    width: 4.25rem;
    height: 4.25rem;
  }

  .msg {
    max-width: 94%;
    padding: 0.7rem 0.9rem;
  }

  .input-row {
    padding: 0.3rem 0.3rem 0.3rem 0.65rem;
    border-radius: 1.35rem;
  }

  .followup-chip {
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
  }

  .scroll-to-bottom {
    right: 0.15rem;
    bottom: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
