/* Morrow workspace layer, updated for v1.16.0. Loaded after the legacy stylesheet. */
:root {
  --artifact-panel-width: clamp(540px, 48vw, 760px);
  --ink: #202123;
  --ink-soft: #5f6368;
  --ink-faint: #8a8d91;
  --sidebar: #f7f7f8;
  --line: #ececee;
  --line-strong: #dcdde0;
  --sidebar-width: 272px;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

.login-input-wrap {
  position: relative;
  border-color: #d9d9db;
  background: #fff;
}

.login-input-wrap:focus-within {
  border-color: #77797d;
  background: #fff;
  box-shadow: none;
}

.login-input-wrap input {
  outline: none;
  background: transparent;
  color: #242426;
  caret-color: #242426;
}

.login-input-wrap input:focus-visible {
  outline: none;
}

#loginPassword {
  padding-right: 36px;
}

.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:hover,
.login-input-wrap input:-webkit-autofill:focus,
.login-input-wrap input:-webkit-autofill:active {
  -webkit-text-fill-color: #242426;
  caret-color: #242426;
  box-shadow: inset 0 0 0 1000px #fff;
  transition: background-color 9999s ease-out 0s;
}

.login-input-wrap .password-toggle {
  right: 7px;
  flex: 0 0 31px;
}

.login-input-wrap .password-toggle:hover {
  background: #f1f1f2;
}

.provider-http-warning {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: #8a5a16;
  font-size: 12px;
  line-height: 1.45;
}

.provider-http-warning[hidden] {
  display: none;
}

.provider-http-warning svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.app-shell {
  transition: width 200ms ease, grid-template-columns 180ms ease;
}

.sidebar {
  border-right: 1px solid #ededee;
  background: var(--sidebar);
  transition: opacity 150ms ease, transform 180ms ease, visibility 180ms;
}

.sidebar-topbar {
  min-height: 58px;
  padding: 10px 12px 8px 14px;
}

.brand img {
  width: 29px;
  height: 29px;
  border-radius: 7px;
}

.brand span {
  font-size: 15px;
  font-weight: 650;
}

.new-chat-button,
.search-box,
.conversation-item,
.profile-button {
  border-radius: 7px;
}

.new-chat-button {
  min-height: 40px;
  margin: 3px 8px 8px;
}

.conversation-item:hover,
.conversation-item.active,
.profile-button:hover,
.icon-button:hover {
  background: #e9e9eb;
}

.sidebar-footer {
  padding: 7px 8px 9px;
}

.main-panel {
  min-width: 0;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  background: #fff;
}

.topbar {
  padding: 0 16px;
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}

.model-button {
  padding: 7px 9px;
  color: #303033;
  font-size: 15px;
  font-weight: 600;
}

.message-list,
.welcome-view {
  width: min(780px, calc(100% - 44px));
}

.message-list {
  padding: 28px 0 64px;
}

.message-row {
  padding: 19px 0;
}

.message-content {
  color: #242426;
  font-size: 15px;
  line-height: 1.72;
}

.message-row.user .message-column {
  max-width: min(82%, 620px);
}

.message-row.user .message-content {
  padding: 9px 15px;
  border-radius: 18px;
  background: #f4f4f4;
}

.message-content h1,
.message-content h2,
.message-content h3 {
  color: #1f2022;
  font-weight: 650;
}

.message-actions {
  gap: 3px;
  opacity: 0.62;
}

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

.artifact-message-status {
  display: grid;
  width: min(520px, 100%);
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #e1e2e3;
  border-radius: 8px;
  background: #fafafa;
}

.artifact-message-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: #e9efe7;
  color: #496443;
}

.artifact-message-icon svg {
  width: 16px;
  height: 16px;
}

.artifact-message-copy {
  display: block;
  min-width: 0;
}

.artifact-message-copy strong,
.artifact-message-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.artifact-message-copy strong {
  color: #292a2c;
  font-size: 13px;
  font-weight: 650;
}

.artifact-message-copy small {
  margin-top: 2px;
  color: #777b80;
  font-size: 11px;
}

.artifact-message-status button {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #d9dadc;
  border-radius: 7px;
  background: #fff;
  color: #343538;
  font-size: 12px;
  font-weight: 600;
}

.artifact-message-status button:hover {
  border-color: #c8c9cc;
  background: #f3f3f3;
}

.artifact-message-status button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.artifact-message-status button svg {
  width: 15px;
  height: 15px;
}

.generated-files {
  display: grid;
  width: min(560px, 100%);
  gap: 8px;
  margin: 0 0 12px;
}

.generated-file {
  display: grid;
  min-height: 68px;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid #dedfdf;
  border-radius: 8px;
  background: #fff;
  color: #242525;
  text-decoration: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.generated-file:hover {
  border-color: #c9ccca;
  background: #f8f9f8;
}

.generated-file-icon,
.generated-file-download {
  display: grid;
  place-items: center;
}

.generated-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: #e8f0ec;
  color: #315e50;
}

.generated-file-icon svg {
  width: 20px;
  height: 20px;
}

.generated-file-copy {
  display: block;
  min-width: 0;
}

.generated-file-copy strong,
.generated-file-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-file-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.generated-file-copy small {
  margin-top: 4px;
  color: #777b78;
  font-size: 11px;
}

.generated-file-download {
  width: 32px;
  height: 32px;
  color: #6a6d6b;
}

.generated-file-download svg {
  width: 17px;
  height: 17px;
}

.composer-region {
  padding: 0 20px max(10px, env(safe-area-inset-bottom));
  background: #fff;
}

.composer {
  width: min(780px, 100%);
  padding: 8px 10px 7px;
  border: 0;
  border-radius: 24px;
  background: #f4f4f4;
  box-shadow: inset 0 0 0 1px #e4e4e5, 0 2px 8px rgb(0 0 0 / 5%);
}

.composer:focus-within {
  border: 0;
  box-shadow: inset 0 0 0 1px #d0d1d2, 0 3px 12px rgb(0 0 0 / 7%);
}

.composer textarea {
  min-height: 38px;
  padding: 8px 9px 5px;
  color: #242426;
  font-size: 15px;
}

.composer-note {
  margin-top: 6px;
  color: #8a8d91;
  font-size: 10px;
}

.attachment-button,
.send-button {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.artifact-panel {
  width: var(--artifact-panel-width);
  min-width: 540px;
  grid-template-rows: 60px 44px minmax(0, 1fr);
  border-left: 1px solid #dedfe1;
  background: #fff;
  box-shadow: -10px 0 30px rgb(0 0 0 / 8%);
}

.artifact-header {
  padding: 0 13px 0 15px;
  border-bottom-color: #ebebed;
}

.artifact-title-icon {
  background: #e9efe7;
  color: #496443;
}

.artifact-title strong {
  color: #242528;
  font-size: 13px;
}

.artifact-title small {
  color: #8b8e92;
  font-size: 9px;
}

.artifact-tabs {
  padding: 5px 11px;
  border-bottom-color: #e8e9ea;
  background: #f8f8f8;
}

.artifact-tabs button {
  height: 32px;
  border-radius: 6px;
}

.artifact-tabs button[aria-selected="true"] {
  box-shadow: inset 0 0 0 1px #d8d9db;
}

.artifact-stage {
  padding: 10px;
  background: #f5f5f5;
}

.artifact-stage iframe {
  border-color: #dedfe1;
  border-radius: 6px;
}

.artifact-code {
  padding: 20px 22px 80px;
  background: #1e1f22;
  color: #e7e7e8;
  font: 12px/1.65 "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  tab-size: 2;
}

@media (min-width: 761px) {
  .app-shell.sidebar-collapsed {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed .sidebar {
    visibility: hidden;
    overflow: hidden;
    border-right: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12px);
  }

  .app-shell.sidebar-collapsed .sidebar-open {
    display: inline-grid;
  }
}

@media (min-width: 1101px) {
  body.artifact-open .app-shell {
    width: calc(100% - var(--artifact-panel-width));
  }

  body.artifact-open .message-list,
  body.artifact-open .welcome-view {
    width: min(680px, calc(100% - 32px));
  }

  body.artifact-open .composer-region {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 1100px) {
  .artifact-panel {
    width: 100vw;
    min-width: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .message-list,
  .welcome-view {
    width: calc(100% - 28px);
  }

  .message-row {
    padding: 15px 0;
  }

  .artifact-message-status {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .artifact-message-status button {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .artifact-message-status button span {
    display: none;
  }

  .composer-region {
    padding: 0 8px max(7px, env(safe-area-inset-bottom));
  }
}

.welcome-view:empty {
  visibility: hidden;
  padding: 0;
  animation: none;
}

.composer-region {
  transition: padding-bottom 180ms ease;
}

.composer-actions {
  display: flex;
  min-width: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.composer-voice-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #252525;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.composer-voice-button:hover {
  background: #e7e7e7;
}

.composer-voice-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.composer-voice-button svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.dictation-button.active {
  background: #dedede;
  color: #111;
  animation: voice-button-pulse 1.5s ease-in-out infinite;
}

.voice-mode-button {
  background: #212121;
  color: #fff;
}

.voice-mode-button:hover,
.voice-mode-button.active {
  background: #000;
  color: #fff;
}

.voice-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: #202123;
}

.voice-dialog::backdrop {
  background: rgb(0 0 0 / 28%);
  backdrop-filter: blur(5px);
}

.voice-surface {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: 64px minmax(0, 1fr) 104px;
  background: #fff;
}

.voice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.voice-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
}

.voice-brand img {
  border-radius: 7px;
}

.voice-stage {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 24px;
  text-align: center;
}

.voice-wave {
  display: flex;
  width: 176px;
  height: 74px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 31px;
}

.voice-wave span {
  width: 7px;
  height: 16px;
  border-radius: 4px;
  background: #222;
  transform-origin: center;
}

.voice-surface[data-voice-state="connecting"] .voice-wave span,
.voice-surface[data-voice-state="thinking"] .voice-wave span {
  animation: voice-thinking 1.15s ease-in-out infinite;
}

.voice-surface[data-voice-state="listening"] .voice-wave span,
.voice-surface[data-voice-state="speaking"] .voice-wave span {
  animation: voice-level 0.9s ease-in-out infinite alternate;
}

.voice-wave span:nth-child(2),
.voice-wave span:nth-child(6) {
  animation-delay: 90ms !important;
}

.voice-wave span:nth-child(3),
.voice-wave span:nth-child(5) {
  animation-delay: 180ms !important;
}

.voice-wave span:nth-child(4) {
  animation-delay: 270ms !important;
}

.voice-surface[data-voice-state="paused"] .voice-wave span,
.voice-surface[data-voice-state="error"] .voice-wave span {
  background: #a1a1a1;
}

.voice-stage h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0;
}

.voice-stage p {
  min-height: 24px;
  max-width: 620px;
  margin: 12px 0 0;
  overflow: hidden;
  color: #737373;
  font-size: 15px;
  line-height: 1.6;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.voice-controls {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
}

.voice-control-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid #d9d9d9;
  border-radius: 50%;
  background: #f4f4f4;
  color: #222;
}

.voice-control-button:hover {
  background: #e9e9e9;
}

.voice-control-button svg {
  width: 21px;
  height: 21px;
}

.voice-end-button {
  border-color: #d4473d;
  background: #d4473d;
  color: #fff;
}

.voice-end-button:hover {
  background: #bd372f;
}

.profile-menu-usage {
  display: grid;
  gap: 6px;
  margin: 3px 4px;
  padding: 9px 8px 10px;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
}

.profile-menu-usage-heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #5f5f5f;
  font-size: 11px;
}

.profile-menu-usage-heading strong {
  color: #202020;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.profile-menu-usage progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: #eceeeb;
}

.profile-menu-usage progress::-webkit-progress-bar {
  border-radius: 3px;
  background: #eceeeb;
}

.profile-menu-usage progress::-webkit-progress-value {
  border-radius: 3px;
  background: #5f7f57;
}

.profile-menu-usage progress::-moz-progress-bar {
  border-radius: 3px;
  background: #5f7f57;
}

.profile-menu-usage small {
  overflow: hidden;
  color: #7c7c7c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 761px) {
  .main-panel.empty-chat .composer-region {
    padding-bottom: clamp(180px, calc((100dvh - 180px) / 2), 480px);
  }
}

@media (max-width: 760px) {
  .composer-actions {
    gap: 2px;
  }

  .composer-voice-button,
  .send-button {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .voice-surface {
    grid-template-rows: 58px minmax(0, 1fr) 94px;
  }

  .voice-header {
    padding: 0 14px;
  }

  .voice-stage {
    padding: 22px 18px;
  }

  .voice-wave {
    margin-bottom: 25px;
  }

  .voice-stage h2 {
    font-size: 22px;
  }
}

@keyframes voice-level {
  0% { transform: scaleY(0.65); }
  100% { transform: scaleY(3.4); }
}

@keyframes voice-thinking {
  0%, 100% { transform: scaleY(0.8); opacity: 0.45; }
  50% { transform: scaleY(1.8); opacity: 1; }
}

@keyframes voice-button-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(0 0 0 / 0%); }
  50% { box-shadow: 0 0 0 4px rgb(0 0 0 / 7%); }
}

@media (prefers-reduced-motion: reduce) {
  .voice-wave span,
  .dictation-button.active {
    animation: none !important;
  }
}

/* v1.16.0 final UI layer */
:root {
  --font-ui: "Manrope Variable", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Manrope Variable", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --artifact-panel-width: clamp(580px, 46vw, 820px);
  --sidebar-width: 260px;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-ui);
  letter-spacing: 0;
}

.main-panel {
  grid-template-rows: 56px minmax(0, 1fr) auto;
}

.topbar {
  padding: 0 12px;
  border-bottom: 0;
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(18px);
}

.model-button {
  min-height: 40px;
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 650;
}

.message-list {
  width: min(768px, calc(100% - 40px));
  padding: 30px 0 72px;
}

.message-row {
  padding: 17px 0;
}

.message-content {
  color: #202020;
  font-size: 15px;
  line-height: 1.75;
}

.message-row.user .message-content {
  padding: 9px 15px;
  border-radius: 18px;
  background: #f3f3f3;
}

.composer-region {
  padding: 0 18px max(8px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 78%, rgb(255 255 255 / 0%));
  transition: none;
  z-index: 80;
}

.composer {
  width: min(768px, 100%);
  padding: 8px 9px 7px;
  border: 0;
  border-radius: 26px;
  background: #f4f4f4;
  box-shadow: inset 0 0 0 1px #e1e1e1, 0 4px 14px rgb(0 0 0 / 6%);
}

.composer:focus-within {
  border: 0;
  box-shadow: inset 0 0 0 1px #cdcdcd, 0 5px 18px rgb(0 0 0 / 7%);
}

.composer textarea {
  min-height: 40px;
  max-height: 200px;
  padding: 8px 9px 5px;
  color: #202020;
  font-size: 16px;
  line-height: 1.5;
}

.composer-toolbar {
  min-height: 38px;
  gap: 8px;
}

.composer-tools {
  flex: 1 1 auto;
  overflow: visible;
}

.composer-tools::-webkit-scrollbar {
  display: none;
}

.composer-actions {
  flex: 0 0 auto;
}

.attachment-button,
.send-button,
.composer-voice-button {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.attachment-button {
  border: 1px solid #d6d6d6;
  border-radius: 50%;
  background: transparent;
}

.active-tool-pill,
.image-setting-button {
  height: 36px;
  border-color: #d5d5d5;
  border-radius: 18px;
  background: #fff;
  color: #343434;
  font-size: 12px;
}

.image-options,
.image-setting,
.image-setting-button {
  flex: 0 0 auto;
}

.image-setting-button,
.image-setting-button strong,
.image-setting-label {
  white-space: nowrap;
}

.composer-note {
  margin-top: 5px;
  color: #858585;
  font-size: 10px;
}

.main-panel.empty-chat .chat-viewport {
  overflow: hidden;
  pointer-events: none;
}

.main-panel.empty-chat .welcome-view {
  min-height: 100%;
  padding: 0;
  pointer-events: none;
}

.main-panel.empty-chat .composer-region {
  position: absolute;
  top: 42%;
  right: 0;
  left: 0;
  padding: 0 18px;
  background: transparent;
  transform: translateY(-50%);
}

.main-panel.empty-chat .tools-menu {
  top: calc(100% + 9px);
  bottom: auto;
}

.tools-menu {
  z-index: 200;
  width: 316px;
  max-height: min(520px, calc(100dvh - 104px));
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 32px rgb(0 0 0 / 14%);
  scrollbar-width: thin;
}

.tools-menu > button {
  min-height: 50px;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
}

.tools-menu > button:hover,
.tools-menu > button[aria-pressed="true"] {
  background: #f0f0ef;
}

.tools-menu > button > svg {
  width: 19px;
  height: 19px;
  color: #333;
}

.tools-menu > button strong {
  color: #242424;
  font-size: 13px;
  font-weight: 620;
}

.tools-menu > button small {
  margin-top: 1px;
  color: #777;
  font-size: 10px;
  line-height: 1.35;
}

.artifact-message-status {
  width: min(540px, 100%);
  min-height: 62px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  margin-top: 13px;
  padding: 10px 10px 10px 12px;
  border: 1px solid #dedede;
  background: #fafafa;
}

.artifact-message-status:hover {
  border-color: #cecece;
  background: #f7f7f7;
}

.artifact-message-icon {
  width: 36px;
  height: 36px;
  background: #ecefed;
  color: #3f5f4d;
}

.artifact-message-copy small {
  margin-top: 3px;
  color: #737373;
}

.generated-files {
  width: min(540px, 100%);
  margin: 9px 0 12px;
}

.artifact-panel {
  width: var(--artifact-panel-width);
  min-width: 580px;
  grid-template-rows: 62px auto minmax(0, 1fr);
  border-left: 1px solid #dcdcdc;
  box-shadow: -12px 0 34px rgb(0 0 0 / 10%);
}

.artifact-header {
  grid-row: 1;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid #e7e7e7;
}

.artifact-title-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.artifact-title small {
  margin-top: 2px;
  font-size: 10px;
  text-transform: none;
}

.artifact-tabs {
  min-height: 44px;
  grid-row: 2;
  padding: 5px 12px;
  border-bottom: 1px solid #e7e7e7;
  background: #fafafa;
}

.artifact-tabs button {
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
}

.artifact-tabs button[aria-selected="true"] {
  background: #fff;
  color: #202020;
  box-shadow: inset 0 0 0 1px #d8d8d8, 0 1px 2px rgb(0 0 0 / 4%);
}

.artifact-loading,
.artifact-image-stage,
.artifact-stage,
.artifact-code {
  min-width: 0;
  min-height: 0;
  grid-row: 3;
  grid-column: 1;
}

.artifact-stage {
  padding: 12px;
  background: #ededeb;
}

.artifact-stage iframe {
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 7%);
}

.artifact-code {
  padding: 22px 24px 80px;
  background: #20211f;
  color: #eceeea;
}

@media (min-width: 1360px) {
  body.artifact-open .app-shell {
    width: calc(100% - var(--artifact-panel-width));
  }

  body.artifact-open .message-list,
  body.artifact-open .welcome-view {
    width: min(680px, calc(100% - 32px));
  }
}

@media (max-width: 1359px) {
  body.artifact-open .app-shell {
    width: 100%;
  }

  .artifact-panel {
    width: 100vw;
    min-width: 0;
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .main-panel {
    grid-template-rows: 54px minmax(0, 1fr) auto;
  }

  .message-list {
    width: calc(100% - 28px);
    padding: 18px 0 46px;
  }

  .message-row {
    padding: 14px 0;
  }

  .composer-region {
    padding: 0 8px max(6px, env(safe-area-inset-bottom));
  }

  .main-panel.empty-chat .composer-region {
    top: 39%;
    padding-right: 8px;
    padding-left: 8px;
  }

  .composer {
    width: 100%;
    padding: 7px 8px 6px;
    border-radius: 24px;
  }

  .composer textarea {
    min-height: 38px;
    padding: 8px 7px 5px;
  }

  .tools-menu {
    width: min(310px, calc(100vw - 24px));
    max-height: min(55dvh, 470px);
  }

  .image-setting-label {
    display: none;
  }

  .image-setting-button {
    min-width: 58px;
    gap: 4px;
    justify-content: center;
    padding: 0 7px;
  }

  .artifact-panel {
    grid-template-rows: 56px auto minmax(0, 1fr);
  }

  .artifact-header {
    padding: 0 7px 0 11px;
  }

  .artifact-title-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .artifact-tabs {
    padding: 5px 8px;
  }

  .artifact-stage {
    padding: 7px;
  }

  .artifact-message-status {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
    padding: 9px;
  }
}

@media (max-width: 360px) {
  .composer-tools {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .active-tool-pill {
    max-width: 86px;
  }
}
