:root {
  color-scheme: light;
  --bg: #edf1ef;
  --surface: #ffffff;
  --surface-2: #f7faf8;
  --surface-3: #ebf4f1;
  --text: #172121;
  --muted: #62706d;
  --faint: #8a9692;
  --line: #d7ded8;
  --line-strong: #c2cec7;
  --accent: #13766e;
  --accent-dark: #0d5f59;
  --blue: #163b63;
  --blue-soft: #e8f0f7;
  --red: #b24a36;
  --red-soft: #fff1ec;
  --shadow: 0 16px 38px rgba(27, 39, 42, 0.1);
  --soft-shadow: 0 10px 24px rgba(27, 39, 42, 0.08);
  --sidebar-width: 292px;
  --inspector-width: 276px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(19, 118, 110, 0.13), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(22, 59, 99, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--inspector-width);
  width: min(1440px, 100%);
  height: 100dvh;
  margin: 0 auto;
  padding: 16px;
  gap: 16px;
}

.sidebar,
.workspace,
.inspector,
.settings-panel,
.composer,
.chat-area {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.new-chat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  margin: 0 16px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 750;
}

.new-chat-button:hover {
  background: var(--accent-dark);
}

.history-toolbar {
  padding: 0 16px 12px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19, 118, 110, 0.14);
}

.conversation-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 10px 14px;
}

.conversation-group {
  padding: 12px 8px 3px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-empty {
  padding: 18px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.conversation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 58px;
  padding: 9px 8px 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.conversation-item:hover {
  background: var(--surface-2);
}

.conversation-item.is-active {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.conversation-item.is-pinned .conversation-title::before {
  content: "★ ";
  color: var(--accent);
}

.conversation-main {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.conversation-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  opacity: 0.58;
  transition: opacity 150ms ease;
}

.conversation-item:hover .conversation-actions,
.conversation-item.is-active .conversation-actions {
  opacity: 1;
}

.mini-icon-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.mini-icon-button:hover,
.icon-button:hover {
  color: var(--red);
  background: var(--red-soft);
}

.mini-icon-button {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 14px;
}

.mini-icon-button.danger:hover {
  color: #fff;
  background: var(--red);
}

.only-mobile {
  display: none;
}

.workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.inspector {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  overflow-y: auto;
  padding: 12px;
  border-radius: 8px;
}

.inspector-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 250, 248, 0.92);
}

.status-card-header,
.gallery-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.inspector-card h3 {
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(19, 118, 110, 0.12);
}

.status-dot.is-busy {
  background: #c8812f;
  box-shadow: 0 0 0 4px rgba(200, 129, 47, 0.16);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.metric-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.metric-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
}

.inspector-meta {
  display: grid;
  gap: 7px;
}

.inspector-meta span {
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-card-header span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gallery-thumb {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-thumb:hover {
  border-color: var(--accent);
}

.gallery-empty {
  grid-column: 1 / -1;
  padding: 24px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  text-align: center;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
}

.model-chip {
  max-width: 320px;
  overflow: hidden;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 850;
}

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

.brand-copy h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mode-switch {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.mode-button {
  min-width: 74px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.mode-button.is-active {
  color: #fff;
  background: var(--blue);
}

.settings-panel {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}

.settings-panel.is-collapsed {
  display: none;
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-panel h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(170px, 0.8fr);
  align-items: end;
  gap: 10px;
}

.compact-button {
  min-height: 36px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.field strong {
  color: var(--text);
  font-weight: 750;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.size-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.size-options button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 800;
}

.size-options button:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.size-options button.is-active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.is-hidden {
  display: none !important;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.secondary-button {
  color: var(--text);
  background: #eef2ef;
  border: 1px solid var(--line);
}

.secondary-button:hover:not(:disabled) {
  background: #e3ebe6;
}

.chat-area {
  min-height: 0;
  overflow: hidden;
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(248, 250, 247, 0.8), rgba(255, 255, 255, 0.92)),
    var(--surface);
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  padding: 22px;
}

.empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  gap: 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  letter-spacing: 0;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  line-height: 1.7;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 680px;
  margin-top: 8px;
}

.prompt-chip {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 700;
}

.prompt-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.message-row {
  display: flex;
}

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

.message {
  width: fit-content;
  max-width: min(820px, 88%);
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  line-height: 1.7;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 14px rgba(27, 39, 42, 0.04);
}

.message.user {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.message.assistant {
  background: #fff;
}

.message.image {
  width: min(820px, 92%);
}

.message.error {
  max-width: 100%;
  color: var(--red);
  background: var(--red-soft);
  border-color: #edc1b3;
}

.role-label {
  display: block;
  color: inherit;
  opacity: 0.68;
  font-size: 12px;
  font-weight: 800;
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
}

.message-actions button,
.image-actions button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.message-actions button:hover,
.image-actions button:hover {
  color: var(--accent);
  background: var(--surface-3);
}

.message-content {
  min-height: 1.35em;
}

.message-content a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.message-content pre {
  position: relative;
  overflow-x: auto;
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 8px;
  color: #edf4f0;
  background: #101c24;
  font-size: 13px;
  line-height: 1.55;
}

.message-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.code-copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  color: #dce8e4;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
}

.code-copy-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.generated-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #dde4df;
  cursor: zoom-in;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #dfe7e3 0%, #f8faf8 48%, #dfe7e3 100%);
  background-size: 220% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

.image-card.is-loading .image-prompt {
  color: var(--muted);
  font-weight: 750;
}

.image-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.image-actions a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

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

.cursor {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

textarea {
  display: block;
  min-height: 50px;
  max-height: 180px;
  resize: none;
  padding: 13px 14px;
  line-height: 1.5;
}

.composer-actions {
  display: flex;
  gap: 8px;
}

.backdrop {
  display: none;
}

.backdrop[hidden] {
  display: none !important;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  transform: translateY(8px);
  min-width: 180px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
  opacity: 0;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.dialog-backdrop,
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 28, 31, 0.42);
}

.dialog-backdrop[hidden],
.image-preview[hidden] {
  display: none !important;
}

.dialog {
  width: min(440px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.dialog h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.dialog p {
  margin: 10px 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.image-preview-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  max-height: 94dvh;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #101c24;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
}

.image-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.36);
}

.image-preview-panel img {
  display: block;
  width: 100%;
  max-height: calc(94dvh - 110px);
  object-fit: contain;
  border-radius: 8px;
  background: #0b1218;
}

.image-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-preview-footer p {
  margin: 0;
  color: #dce8e4;
  line-height: 1.5;
}

@media (max-width: 1260px) {
  .app-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .settings-panel-header {
    align-items: start;
  }

  .settings-panel-header > .secondary-button {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    display: block;
    width: 100%;
    padding: 0;
  }

  .only-mobile {
    display: inline-grid;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: min(86vw, 320px);
    border-radius: 0;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    background: rgba(20, 28, 30, 0.34);
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    overflow-x: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 68px;
    padding: 12px;
    gap: 10px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .model-chip {
    max-width: none;
    grid-column: 1 / -1;
    order: 2;
  }

  .mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  h2 {
    font-size: 17px;
  }

  .brand-copy p {
    font-size: 12px;
  }

  .mode-button {
    width: 100%;
    min-width: 58px;
    padding: 0 8px;
  }

  .mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: auto;
    min-width: 0;
    order: 1;
  }

  .topbar-actions > .icon-button {
    order: 1;
    justify-self: end;
  }

  .settings-panel {
    padding: 10px 12px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .settings-panel-header {
    display: grid;
  }

  .message-list {
    gap: 12px;
    width: 100%;
    max-width: 100vw;
    padding: 14px 12px;
  }

  .empty-state {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .quick-prompts {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: min(100%, calc(100vw - 28px));
    max-width: 330px;
  }

  .prompt-chip {
    width: 100%;
    height: auto;
    min-height: 36px;
    white-space: normal;
    line-height: 1.35;
  }

  .message {
    max-width: 94%;
    padding: 12px 13px;
  }

  .message-actions {
    opacity: 1;
  }

  .message.image {
    width: 94%;
  }

  .image-grid {
    grid-template-columns: 1fr;
  }

  .composer {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
    padding: 10px 12px 12px;
  }

  .composer-actions {
    justify-content: flex-end;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    max-width: none;
  }

  .image-preview {
    padding: 10px;
  }

  .image-preview-footer {
    display: grid;
  }
}

@media (max-width: 430px) {
  .topbar {
    align-items: start;
  }

  .brand {
    gap: 8px;
  }

  .mark {
    display: none;
  }

  .primary-button,
  .secondary-button {
    min-height: 38px;
    padding: 0 13px;
  }

  .empty-state {
    padding: 0 12px;
  }

  .empty-state p {
    max-width: 100%;
  }
}
