:root {
  color-scheme: light;
  --page: #f4f6f9;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --surface-blue: #f2f6ff;
  --text: #17191d;
  --text-soft: #555c68;
  --muted: #7b8492;
  --line: #e2e6eb;
  --line-strong: #cfd5dd;
  --graphite: #1f2228;
  --blue: #2f65d9;
  --blue-dark: #244fab;
  --blue-soft: #e8f0ff;
  --green: #13835d;
  --green-soft: #eaf7f1;
  --red: #b63737;
  --red-soft: #fff1f1;
  --shadow-panel: 0 20px 60px rgba(22, 29, 39, 0.10);
  --shadow-control: 0 8px 24px rgba(22, 29, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

[hidden] {
  display: none !important;
}

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

.app-shell {
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  width: min(1180px, calc(100% - 32px));
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fff;
  background: var(--graphite);
  font-size: 14px;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.brand-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-case-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22, 29, 39, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.new-case-button:hover {
  border-color: #aeb7c4;
  box-shadow: var(--shadow-control);
  transform: translateY(-1px);
}

.new-case-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace {
  min-height: 0;
  padding-bottom: 20px;
}

.selection-view {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  scrollbar-color: #c7cdd5 transparent;
  scrollbar-width: thin;
}

.selection-content {
  display: flex;
  width: min(980px, 100%);
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  padding: 36px 40px 28px;
}

.selection-heading {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.selection-kicker {
  display: inline-block;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.selection-heading h1 {
  margin: 12px 0 0;
  font-size: 40px;
  line-height: 1.1;
}

.selection-heading p {
  margin: 14px auto 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.appliance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.appliance-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.appliance-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.appliance-card-surface {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 26px;
  min-height: 108px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.appliance-card:hover .appliance-card-surface {
  border-color: #b8c4d4;
  background: #fbfcfd;
  box-shadow: 0 10px 26px rgba(22, 29, 39, 0.07);
  transform: translateY(-1px);
}

.appliance-card input:checked + .appliance-card-surface {
  border-color: var(--blue);
  background: var(--surface-blue);
  box-shadow: 0 0 0 3px rgba(47, 101, 217, 0.10);
}

.appliance-card input:focus-visible + .appliance-card-surface {
  outline: 3px solid rgba(47, 101, 217, 0.36);
  outline-offset: 3px;
}

.appliance-card-icon,
.case-appliance-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--text);
  background: var(--surface-soft);
}

.appliance-card-icon svg,
.case-appliance-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appliance-card input:checked + .appliance-card-surface .appliance-card-icon {
  color: #fff;
  background: var(--blue);
}

.appliance-card-copy {
  display: block;
  min-width: 0;
}

.appliance-card-copy strong,
.appliance-card-copy small {
  display: block;
}

.appliance-card-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.appliance-card-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.appliance-card-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  background: var(--surface);
}

.appliance-card-check svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.appliance-card input:checked + .appliance-card-surface .appliance-card-check {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.selection-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.primary-button {
  display: inline-flex;
  min-width: 250px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 13px;
  color: #fff;
  background: var(--graphite);
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 12px 26px rgba(31, 34, 40, 0.18);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.primary-button:hover:not(:disabled) {
  background: #08090c;
  box-shadow: 0 16px 34px rgba(31, 34, 40, 0.24);
  transform: translateY(-1px);
}

.primary-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.selection-action p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.selection-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.selection-trust > div {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 18px 28px;
}

.selection-trust > div + div {
  border-left: 1px solid var(--line);
}

.trust-number {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.selection-trust p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.selection-trust strong {
  color: var(--text-soft);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.case-bar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.case-appliance {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.case-appliance-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.case-appliance-copy {
  display: block;
  min-width: 0;
}

.case-appliance-copy small,
.case-appliance-copy strong {
  display: block;
}

.case-appliance-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.case-appliance-copy strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-appliance-button {
  min-height: 36px;
  margin-left: 8px;
  padding: 0 11px;
  border-radius: 9px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 750;
}

.change-appliance-button:hover {
  background: #dce8ff;
}

.case-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.case-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.conversation-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #c7cdd5 transparent;
  scrollbar-width: thin;
}

.conversation-scroll::-webkit-scrollbar {
  width: 10px;
}

.conversation-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #c7cdd5;
  background-clip: padding-box;
}

.empty-state {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 28px 36px;
  text-align: center;
}

.empty-state.hidden {
  display: none;
}

.hero-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #d7e3ff;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--surface-blue);
  font-size: 12px;
  font-weight: 800;
}

.hero-badge > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.empty-state h1 {
  max-width: 720px;
  margin: 20px auto 0;
  font-size: 44px;
  line-height: 1.08;
}

.empty-state > p {
  max-width: 650px;
  margin: 16px auto 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.55;
}

.quick-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 26px;
}

.quick-prompts button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  text-align: left;
  line-height: 1.35;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.quick-prompts button::after {
  content: "→";
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 19px;
}

.quick-prompts button:hover {
  border-color: #bdccec;
  background: var(--surface-blue);
  box-shadow: 0 7px 20px rgba(47, 101, 217, 0.08);
}

.chat {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 28px 26px 10px;
}

.message-row {
  display: flex;
  width: 100%;
  margin-bottom: 22px;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.assistant,
.message-row.error {
  justify-content: flex-start;
}

.message {
  max-width: 88%;
  overflow-wrap: anywhere;
}

.message.user {
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  color: #fff;
  background: var(--graphite);
  box-shadow: 0 8px 20px rgba(31, 34, 40, 0.12);
}

.message.assistant {
  width: 100%;
  max-width: 780px;
}

.message.assistant.final {
  padding: 20px;
  border: 1px solid #d9e3f6;
  border-radius: 16px;
  background: #fbfdff;
}

.message.error {
  max-width: min(650px, 100%);
  padding: 14px 16px;
  border: 1px solid #f0cccc;
  border-radius: 12px;
  color: #852a2a;
  background: var(--red-soft);
}

.message p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.58;
}

.assistant-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.assistant-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.markdown-body {
  color: var(--text);
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 22px 0 9px;
  line-height: 1.3;
}

.markdown-body h2:first-child,
.markdown-body h3:first-child {
  margin-top: 0;
}

.markdown-body h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}

.markdown-body h3 {
  font-size: 16px;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 14px;
}

.markdown-body p {
  margin: 0 0 12px;
}

.markdown-body ul,
.markdown-body ol {
  margin: 8px 0 16px;
  padding-left: 23px;
}

.markdown-body li {
  margin: 7px 0;
  line-height: 1.55;
}

.markdown-body blockquote {
  margin: 14px 0;
  padding: 11px 14px;
  border-left: 3px solid var(--blue);
  color: var(--text-soft);
  background: var(--surface-blue);
  line-height: 1.55;
}

.markdown-body hr {
  height: 1px;
  margin: 22px 0;
  border: 0;
  background: var(--line);
}

.markdown-body code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #edf0f4;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.markdown-table-wrap {
  max-width: 100%;
  margin: 12px 0 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.markdown-body th,
.markdown-body td {
  min-width: 120px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--surface-soft);
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.error-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.retry-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dfaaaa;
  border-radius: 9px;
  color: #7b2222;
  background: #fff;
  font-size: 13px;
  font-weight: 750;
}

.loading-state {
  display: flex;
  width: min(880px, 100%);
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 4px 26px 26px;
}

.loading-state > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  animation: loading-pulse 1s ease-in-out infinite;
}

.loading-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.loading-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.composer {
  padding: 14px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.composer-box,
.composer-footer,
.voice-status {
  width: min(900px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.composer-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-control);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft), var(--shadow-control);
}

textarea {
  width: 100%;
  min-height: 44px;
  max-height: 150px;
  padding: 11px 8px 9px 10px;
  overflow-y: auto;
  border: 0;
  outline: 0;
  resize: none;
  color: var(--text);
  background: transparent;
  line-height: 1.45;
}

textarea::placeholder {
  color: #929aa6;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.icon-button,
.send-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button {
  color: var(--text-soft);
  background: var(--surface-soft);
}

.send-button {
  color: #fff;
  background: var(--graphite);
}

.icon-button:hover {
  color: var(--text);
  background: #eceff3;
}

.send-button:hover:not(:disabled) {
  background: #090a0d;
  transform: translateY(-1px);
}

.icon-button.recording {
  color: #fff;
  background: var(--red);
  animation: recording-ring 1.4s ease-in-out infinite;
}

.icon-button svg,
.send-button svg,
.safety-note svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 6px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.safety-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}

.safety-note svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.voice-status {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  padding: 7px 10px;
  border: 1px solid #f0cccc;
  border-radius: 10px;
  color: #812929;
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 700;
}

.voice-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: voice-blink 1s ease-in-out infinite;
}

.voice-status time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.voice-status button {
  padding: 3px 6px;
  border-radius: 6px;
  color: #812929;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.voice-status button:hover {
  background: #f8dddd;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(360px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  font-size: 13px;
  line-height: 1.45;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 101, 217, 0.32);
  outline-offset: 2px;
}

@keyframes loading-pulse {
  0%, 80%, 100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes recording-ring {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(182, 55, 55, 0.24);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(182, 55, 55, 0);
  }
}

@keyframes voice-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 820px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    grid-template-rows: 68px minmax(0, 1fr);
  }

  .workspace {
    padding-bottom: 10px;
  }

  .selection-content {
    justify-content: flex-start;
    padding: 30px 24px 26px;
  }

  .selection-heading h1 {
    font-size: 34px;
  }

  .appliance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selection-trust > div {
    padding-right: 18px;
    padding-left: 18px;
  }

  .empty-state {
    justify-content: flex-start;
    padding-top: 34px;
  }

  .empty-state h1 {
    font-size: 36px;
  }
}

@media (max-width: 600px) {
  .app-shell {
    grid-template-rows: 58px minmax(0, 1fr);
    width: 100%;
  }

  .topbar {
    padding: 0 10px;
  }

  .brand {
    gap: 9px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 12px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy small {
    display: none;
  }

  .new-case-button {
    min-height: 38px;
    gap: 7px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 12px;
  }

  .new-case-button svg {
    width: 16px;
    height: 16px;
  }

  .workspace {
    padding: 0;
  }

  .selection-view,
  .chat-panel {
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .selection-content {
    padding: 24px 12px 18px;
  }

  .selection-heading {
    padding: 0 6px;
  }

  .selection-kicker {
    font-size: 10px;
  }

  .selection-heading h1 {
    margin-top: 9px;
    font-size: 28px;
  }

  .selection-heading p {
    margin-top: 10px;
    font-size: 13px;
  }

  .appliance-grid {
    gap: 8px;
    margin-top: 20px;
  }

  .appliance-card-surface {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 108px;
    align-content: center;
    gap: 10px;
    padding: 12px;
  }

  .appliance-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .appliance-card-icon svg {
    width: 22px;
    height: 22px;
  }

  .appliance-card-copy strong {
    font-size: 13px;
  }

  .appliance-card-copy small {
    display: none;
  }

  .appliance-card-check {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 21px;
    height: 21px;
  }

  .appliance-card-check svg {
    width: 14px;
    height: 14px;
  }

  .selection-action {
    position: sticky;
    bottom: 0;
    z-index: 3;
    margin-top: 18px;
    margin-right: -12px;
    margin-left: -12px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
  }

  .primary-button {
    width: 100%;
    min-width: 0;
  }

  .selection-action p {
    text-align: center;
  }

  .selection-trust {
    grid-template-columns: 1fr;
  }

  .selection-trust > div {
    min-height: 62px;
    padding: 11px 18px;
  }

  .selection-trust > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .case-bar {
    min-height: 62px;
    gap: 8px;
    padding: 8px 12px;
  }

  .case-appliance {
    flex: 1;
    gap: 8px;
  }

  .case-appliance-icon {
    width: 38px;
    height: 38px;
  }

  .case-appliance-copy small {
    display: none;
  }

  .case-appliance-copy strong {
    margin-top: 0;
    font-size: 13px;
  }

  .change-appliance-button {
    min-height: 38px;
    margin-left: auto;
  }

  .case-state {
    display: none;
  }

  .empty-state {
    min-height: auto;
    justify-content: flex-start;
    padding: 28px 16px 24px;
  }

  .empty-state h1 {
    margin-top: 16px;
    font-size: 30px;
    line-height: 1.12;
  }

  .empty-state > p {
    margin-top: 12px;
    font-size: 14px;
  }

  .quick-prompts {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 20px;
  }

  .quick-prompts button {
    min-height: 48px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .chat {
    padding: 20px 14px 8px;
  }

  .message-row {
    margin-bottom: 18px;
  }

  .message {
    max-width: 92%;
  }

  .message.assistant,
  .message.error {
    max-width: 100%;
  }

  .message.assistant.final {
    padding: 15px;
  }

  .loading-state {
    padding: 3px 14px 20px;
  }

  .composer {
    padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  }

  .composer-box {
    min-height: 58px;
    border-radius: 15px;
  }

  .icon-button,
  .send-button {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .composer-footer {
    justify-content: center;
    padding-top: 7px;
  }

  .composer-footer > span:first-child {
    display: none;
  }

  .safety-note {
    text-align: center;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 380px) {
  .new-case-button span {
    display: none;
  }

  .new-case-button {
    width: 38px;
    padding: 0;
  }

  .empty-state h1 {
    font-size: 27px;
  }
}

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