/* Quiet Studio workspace redesign. Kept isolated so legacy styles stay stable. */

:root {
  --workspace-bg: #f7f8fa;
  --workspace-surface: #ffffff;
  --workspace-line: #e5e8eb;
  --workspace-line-strong: #d7dce1;
  --workspace-text: #20262e;
  --workspace-muted: #7b8490;
  --workspace-green: #109a58;
  --workspace-green-dark: #087946;
  --workspace-green-soft: #eaf8f0;
}

.web-topbar {
  height: 64px;
  border-bottom: 1px solid var(--workspace-line);
  background: rgb(255 255 255 / 98%);
  box-shadow: none;
}

.web-nav-left {
  gap: 14px;
}

.web-mobile-brand img {
  width: 38px;
  height: 38px;
}

.web-mobile-brand strong {
  color: var(--workspace-green);
  font-size: 17px;
}

.web-mobile-brand small {
  color: var(--workspace-muted);
}

.web-primary-nav {
  flex: 0 1 auto;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
}

.web-primary-nav button {
  height: 40px;
  padding: 0 10px;
  border-radius: 7px;
  color: #3f4854;
  font-weight: 650;
}

.nav-more-wrap {
  position: relative;
}

.web-primary-nav .nav-more-trigger {
  gap: 5px;
}

.web-primary-nav button:hover {
  background: #f4f6f7;
}

.web-primary-nav button.active,
.web-primary-nav .nav-more-trigger.active {
  background: var(--workspace-green-soft);
  box-shadow: none;
  color: var(--workspace-green-dark);
}

.web-primary-nav button.active::after {
  display: none;
}

.nav-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 180;
  display: grid;
  min-width: 178px;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgb(15 23 42 / 12%);
}

.nav-more-menu button {
  justify-content: flex-start;
  width: 100%;
  height: 34px;
  padding: 0 9px;
}

.user-chip,
.account-trigger {
  border-color: var(--workspace-line);
  background: #fff;
  box-shadow: none;
}

.user-balance {
  max-width: 108px;
}

.account-trigger {
  max-width: 210px;
}

.account-trigger-copy strong {
  max-width: 132px;
}

.nav-recharge-action.el-button {
  border-color: var(--workspace-green);
  background: var(--workspace-green);
  box-shadow: none;
}

body.chat-page-active .web-content.chat-content {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--workspace-bg);
}

body.chat-page-active .chat-layout {
  grid-template-columns: 254px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  border: 0;
  overflow: hidden;
  background: var(--workspace-surface);
}

body.chat-page-active .chat-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 22px 14px 14px;
  border: 0;
  border-right: 1px solid var(--workspace-line);
  border-radius: 0;
  background: #fbfcfc;
}

body.chat-page-active .chat-sidebar::after {
  display: none;
}

body.chat-page-active .chat-sidebar-head {
  padding: 0 8px;
}

body.chat-page-active .chat-sidebar-head span {
  display: none;
}

body.chat-page-active .chat-sidebar-head strong {
  color: var(--workspace-text);
  font-size: 15px;
  font-weight: 750;
}

body.chat-page-active .chat-sidebar-head small {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--workspace-muted);
  font-size: 11px;
}

body.chat-page-active .new-session-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--workspace-green);
  border-radius: 6px;
  background: var(--workspace-green);
  box-shadow: none;
  font-weight: 700;
}

body.chat-page-active .new-session-button:hover,
body.chat-page-active .new-session-button:focus {
  border-color: var(--workspace-green-dark);
  background: var(--workspace-green-dark);
}

body.chat-page-active .session-list {
  gap: 4px;
  padding: 0;
}

body.chat-page-active .session-item {
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  min-height: 66px;
  padding: 10px 8px 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

body.chat-page-active .session-item:hover {
  border-color: var(--workspace-line);
  background: #fff;
}

body.chat-page-active .session-item.active {
  border-color: #d8eee2;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
}

body.chat-page-active .session-index {
  display: none;
}

body.chat-page-active .session-title-row strong {
  font-size: 13px;
  font-weight: 750;
}

body.chat-page-active .session-main small,
body.chat-page-active .session-item.active .session-main small {
  color: var(--workspace-muted);
  font-size: 11px;
  -webkit-line-clamp: 1;
}

body.chat-page-active .session-meta {
  min-width: 34px;
  justify-items: end;
}

body.chat-page-active .session-meta .session-count-badge,
body.chat-page-active .session-item.active .session-meta .session-count-badge {
  min-width: auto;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: var(--workspace-muted) !important;
  font-size: 10px;
}

body.chat-page-active .session-rename,
body.chat-page-active .session-delete {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: transparent;
  opacity: 0;
}

body.chat-page-active .session-item:hover .session-rename,
body.chat-page-active .session-item:hover .session-delete,
body.chat-page-active .session-item.active .session-rename {
  opacity: 1;
}

body.chat-page-active .chat-panel {
  grid-template-rows: 64px minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

body.chat-page-active .chat-header {
  min-height: 64px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

body.chat-page-active .chat-header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.chat-page-active .chat-header-copy strong {
  overflow: hidden;
  color: var(--workspace-text);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.chat-page-active .chat-header-copy small {
  overflow: hidden;
  color: var(--workspace-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

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

.chat-header-actions button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  color: #5e6874;
}

.chat-header-actions button:hover {
  border-color: #b9dcca;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
}

body.chat-page-active .chat-thread {
  display: block;
  min-height: 0;
  padding: 28px 18px 22px;
  overflow-y: auto;
  overflow-anchor: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(190, 236, 209, 0.28), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(255, 229, 170, 0.2), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf7 100%),
    #fff;
}

body.chat-page-active .chat-empty {
  position: relative;
  display: grid;
  min-height: 100%;
  align-content: center;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: 10px;
}

body.chat-page-active .chat-empty-showcase {
  position: relative;
  display: grid;
  grid-template-columns: minmax(310px, .95fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(175, 214, 195, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245, 253, 248, 0.94), rgba(255, 255, 255, 0.98) 52%, rgba(255, 251, 241, 0.92)),
    #fff;
  box-shadow: 0 24px 70px rgba(26, 76, 51, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  padding: 18px;
}

body.chat-page-active .chat-empty-showcase::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 168, 96, 0.18), transparent 68%);
  pointer-events: none;
}

body.chat-page-active .chat-empty-showcase::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  pointer-events: none;
}

body.chat-page-active .chat-empty-art {
  position: relative;
  min-width: 0;
  z-index: 1;
}

body.chat-page-active .empty-art-window {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 256px;
  border: 1px solid rgba(22, 95, 58, 0.16);
  border-radius: 18px;
  background: #fbfff9;
  box-shadow: 0 18px 44px rgba(18, 69, 43, 0.12);
}

body.chat-page-active .empty-art-toolbar {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(214, 231, 222, 0.84);
  background: rgba(255, 255, 255, 0.8);
  padding: 0 14px;
  backdrop-filter: blur(10px);
}

body.chat-page-active .empty-art-toolbar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4ddd8;
}

body.chat-page-active .empty-art-toolbar span:first-child {
  background: #f2ad78;
}

body.chat-page-active .empty-art-toolbar span:nth-child(2) {
  background: #f2d982;
}

body.chat-page-active .empty-art-toolbar span:nth-child(3) {
  background: #6fcf94;
}

body.chat-page-active .empty-art-toolbar em {
  margin-left: auto;
  color: #6d7b72;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.chat-page-active .empty-art-canvas {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.38) 48%, rgba(13, 55, 34, 0.04) 100%),
    url("/web/assets/home-preview-lime-tea.png") center / cover;
}

body.chat-page-active .empty-art-canvas::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(8, 121, 70, 0.17);
  border-radius: 14px;
  pointer-events: none;
}

body.chat-page-active .empty-art-glow {
  position: absolute;
  right: 22px;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 245, 132, 0.42), transparent 68%);
  filter: blur(4px);
}

body.chat-page-active .empty-art-brand {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: #066b41;
  font-weight: 920;
  box-shadow: 0 12px 28px rgba(29, 93, 58, 0.14);
}

body.chat-page-active .empty-art-copy {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: grid;
  gap: 5px;
  max-width: 210px;
  color: #102e20;
}

body.chat-page-active .empty-art-copy i {
  color: #0d8a51;
  font-size: 20px;
}

body.chat-page-active .empty-art-copy b {
  font-size: 21px;
  line-height: 1.05;
}

body.chat-page-active .empty-art-copy small {
  color: #52665a;
  font-size: 12px;
  font-weight: 760;
}

body.chat-page-active .empty-art-specs {
  position: absolute;
  top: 26px;
  right: 24px;
  display: flex;
  gap: 6px;
}

body.chat-page-active .empty-art-specs span,
body.chat-page-active .empty-art-prompt {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(20, 68, 43, 0.09);
  color: #315142;
  backdrop-filter: blur(10px);
}

body.chat-page-active .empty-art-specs span {
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 850;
}

body.chat-page-active .empty-art-prompt {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 168px;
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
}

body.chat-page-active .empty-art-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  background:
    linear-gradient(90deg, rgba(237, 249, 241, 0.92), rgba(255, 255, 255, 0.9));
}

body.chat-page-active .empty-art-footer span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  background: #eaf5ef;
  color: #42604f;
  flex: 1;
  font-size: 11px;
  font-weight: 800;
}

body.chat-page-active .empty-art-footer span:first-child {
  background: #c6edd6;
  color: #08643d;
}

body.chat-page-active .chat-empty-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 12px 16px 4px;
}

body.chat-page-active .chat-empty-kicker {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.chat-page-active .chat-empty-kicker span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(19, 141, 80, 0.16);
  border-radius: 999px;
  background: rgba(235, 250, 240, 0.86);
  color: #087946;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 850;
}

body.chat-page-active .chat-empty-kicker span i {
  font-size: 15px;
}

body.chat-page-active .chat-empty-kicker em {
  color: #8d9b93;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.chat-page-active .chat-empty-copy > strong {
  max-width: 360px;
  color: #14241b;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 920;
  letter-spacing: -.04em;
  line-height: 1.05;
}

body.chat-page-active .chat-empty-copy > p {
  max-width: 430px;
  margin: 0;
  color: #56665d;
  font-size: 14px;
  line-height: 1.85;
}

body.chat-page-active .chat-empty-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

body.chat-page-active .chat-empty-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2ece6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #33463b;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 780;
}

body.chat-page-active .empty-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.chat-page-active .empty-template-grid button {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(214, 229, 221, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(246, 252, 248, 0.96));
  color: #1d2a24;
  box-shadow: 0 12px 28px rgba(24, 66, 43, 0.07);
  padding: 14px 42px 14px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.chat-page-active .empty-template-grid button::after {
  content: "";
  position: absolute;
  top: -36px;
  right: -32px;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(34, 174, 99, 0.09);
  transition: transform .2s ease, opacity .2s ease;
}

body.chat-page-active .empty-template-grid button:hover {
  border-color: rgba(124, 191, 154, 0.9);
  box-shadow: 0 18px 36px rgba(24, 93, 55, 0.12);
  transform: translateY(-2px);
}

body.chat-page-active .empty-template-grid button:hover::after {
  opacity: .9;
  transform: scale(1.14);
}

body.chat-page-active .empty-template-grid button > i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(21, 146, 83, 0.14);
  border-radius: 13px;
  background: #ecf9f1;
  color: #087946;
  font-size: 19px;
}

body.chat-page-active .empty-template-grid button span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.chat-page-active .empty-template-grid button strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.chat-page-active .empty-template-grid button small {
  overflow: hidden;
  color: #6e7c73;
  font-size: 11.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.chat-page-active .empty-template-grid button em {
  position: absolute;
  right: 13px;
  top: 50%;
  z-index: 1;
  color: #91a59b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  transform: translateY(-50%);
}

body.chat-page-active .message {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: none;
  margin: 0 0 26px;
  align-items: start;
}

body.chat-page-active .message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
  width: 100%;
  margin-right: 0;
  margin-left: 0;
}

body.chat-page-active .message.user .avatar {
  grid-column: 2;
}

body.chat-page-active .avatar,
body.chat-page-active .message.user .avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dce7e1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #57616b;
  font-size: 11px;
  font-weight: 760;
}

body.chat-page-active .message.assistant .avatar {
  border-color: #0fa15b;
  background: linear-gradient(180deg, #13b66a, #07924f);
  box-shadow: 0 8px 18px rgba(7, 146, 79, 0.18);
  color: #fff;
}

body.chat-page-active .bubble,
body.chat-page-active .message.assistant .bubble {
  grid-column: 2;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #37404a;
}

body.chat-page-active .message.user .bubble {
  grid-column: 1;
  justify-self: end;
  width: fit-content;
  max-width: min(680px, 72%);
  padding: 0;
  border: 0;
  background: transparent;
  color: #37404a;
}

body.chat-page-active .bubble > p {
  width: fit-content;
  max-width: min(760px, 100%);
  padding: 10px 13px;
  border: 1px solid #e5ebe8;
  border-radius: 12px;
  background: #f7f8f7;
  color: #26313c;
  font-size: 14px;
  line-height: 1.65;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body.chat-page-active .message.user .bubble > p {
  border-color: #cfe9db;
  border-top-right-radius: 4px;
  background: #e9f8ef;
  color: #123524;
}

body.chat-page-active .message.assistant .bubble > p {
  border-top-left-radius: 4px;
  background: #fff;
}

body.chat-page-active .generating-bubble {
  position: relative;
  overflow: visible;
  width: min(340px, 100%);
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.chat-page-active .message.assistant .bubble.generating-bubble {
  width: min(340px, 100%);
}

body.chat-page-active .generating-bubble::before {
  display: none;
}

body.chat-page-active .generating-bubble::after {
  display: none;
}

body.chat-page-active .generating-card {
  position: relative;
  z-index: 1;
  display: block;
  overflow: visible;
  padding: 0;
  border-radius: 12px;
}

body.chat-page-active .generating-card::before {
  display: none;
}

body.chat-page-active .generating-orb {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(168, 225, 192, 0.9);
  border-radius: 11px;
  background:
    linear-gradient(180deg, #f9fffb, #e8faef),
    #effaf4;
  box-shadow:
    0 0 0 9px rgba(37, 191, 103, 0.08),
    0 18px 34px rgba(21, 156, 86, 0.18),
    inset 0 1px 0 #fff;
  color: var(--workspace-green);
  font-size: 18px;
}

body.chat-page-active .generating-orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(42, 190, 103, 0.22);
  border-radius: 16px;
  animation: workspace-generating-ring 1.7s ease-in-out infinite;
}

body.chat-page-active .generating-orb i {
  position: relative;
  z-index: 1;
}

body.chat-page-active .generating-copy {
  position: relative;
  z-index: 1;
  gap: 4px;
}

body.chat-page-active .generating-copy strong {
  color: var(--workspace-text);
  font-size: 15px;
  font-weight: 760;
}

body.chat-page-active .generating-copy span {
  color: var(--workspace-muted);
  font-size: 12px;
  font-weight: 500;
}

body.chat-page-active .generating-title-dots {
  gap: 3px;
  margin-left: 3px;
}

body.chat-page-active .generating-title-dots i {
  width: 5px;
  height: 5px;
  background: var(--workspace-green);
}

body.chat-page-active .generating-progress {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(340px, 100%);
  min-height: 180px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin-top: 0;
  border: 0;
  border-radius: 12px;
  background: #e8f8ef;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.12),
    0 8px 22px rgba(16, 163, 93, 0.12),
    inset 0 0 0 1px rgba(32, 191, 98, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.chat-page-active .generating-progress::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 165%;
  aspect-ratio: 1;
  background: conic-gradient(
    from 0deg,
    #19b961 0deg,
    #9af08b 58deg,
    #25c86e 116deg,
    #d7ffd9 166deg,
    #17b45d 222deg,
    #8ced80 292deg,
    #19b961 360deg
  );
  transform: translate(-50%, -50%) rotate(0deg);
  animation: workspace-generating-marquee 2.6s linear infinite;
}

body.chat-page-active .generating-progress::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 22%, rgba(207, 247, 222, 0.92), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 252, 245, 0.92)),
    #f7fcf9;
  box-shadow:
    inset 0 0 0 1px rgba(196, 228, 211, 0.78),
    0 0 0 1px rgba(255, 255, 255, 0.66);
}

body.chat-page-active .generating-progress i {
  position: absolute;
  z-index: 2;
  inset: 13px;
  width: auto;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 24%, rgba(134, 229, 172, 0.22), transparent 34%),
    radial-gradient(circle at 72% 76%, rgba(24, 177, 91, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(238, 250, 244, 0.72), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 0 0 1px rgba(196, 226, 211, 0.68);
  animation: workspace-generating-sheen 2.4s ease-in-out infinite;
}

body.chat-page-active .generating-placeholder-copy {
  position: absolute;
  z-index: 3;
  inset: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  pointer-events: none;
}

body.chat-page-active .generating-placeholder-copy strong {
  max-width: min(240px, 100%);
  color: #1f3b2d;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
}

body.chat-page-active .generating-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

body.chat-page-active .generating-tags span {
  min-height: 18px;
  padding: 0 7px;
  border-color: rgba(159, 216, 184, 0.72);
  background: rgba(255, 255, 255, 0.78);
  color: #32614a;
  font-size: 10px;
  font-weight: 650;
  backdrop-filter: blur(6px);
}

body.chat-page-active .generating-tags span::before {
  width: 5px;
  height: 5px;
  background: var(--workspace-green);
  box-shadow: none;
}

@keyframes workspace-generating-ring {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}

@keyframes workspace-generating-glow {
  0%,
  100% {
    opacity: 0.52;
  }

  50% {
    opacity: 1;
  }
}

@keyframes workspace-generating-marquee {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes workspace-generating-sheen {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 1;
  }
}

body.chat-page-active .result-stack {
  display: grid;
  gap: 10px;
  width: min(300px, 100%);
  max-width: 100%;
  margin-top: 8px;
}

.result-stage {
  position: relative;
  isolation: isolate;
  width: min(280px, 100%);
  max-width: 100%;
  margin-bottom: 8px;
}

.result-main-card,
.result-gallery {
  width: 100%;
  max-width: 100%;
}

.result-main-card {
  position: relative;
  z-index: 5;
  display: grid;
  overflow: hidden;
  width: min(280px, 100%);
  max-height: min(280px, 46vh);
  min-width: 0;
  aspect-ratio: 1 / 1 !important;
  padding: 0;
  border: 1px solid #dce7e1;
  border-radius: 12px;
  background: #f6f8f7;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 14px 34px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.result-main-card:hover {
  border-color: var(--workspace-green);
  box-shadow:
    0 0 0 2px rgba(15, 161, 91, 0.1),
    0 18px 40px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.result-main-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-main-card.image-load-failed {
  border-style: dashed;
  background:
    radial-gradient(circle at 30% 22%, rgba(16, 154, 88, 0.08), transparent 34%),
    #f8fbf9;
}

.result-main-card.image-load-failed img {
  display: none;
}

.result-main-card.image-load-failed::after {
  content: "图片加载中或已失效";
  place-self: center;
  color: #6b756f;
  font-size: 12px;
  font-weight: 800;
}

.result-main-badge,
.result-fold-hint {
  position: absolute;
  z-index: 3;
}

.result-main-badge {
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: rgb(20 28 34 / 76%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.result-fold-hint {
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 999px;
  background: rgb(20 28 34 / 68%);
  color: #fff;
  font-size: 11px;
  font-weight: 760;
  backdrop-filter: blur(8px);
}

.result-fold-peek {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.result-fold-peek i {
  position: absolute;
  z-index: calc(4 - var(--peek));
  inset: calc(var(--peek) * -2px) calc(var(--peek) * -9px) calc(var(--peek) * 10px) calc(var(--peek) * 16px);
  border: 1px solid rgba(18, 128, 73, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(236, 249, 241, 0.94), rgba(255, 255, 255, 0.98));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  transform: translate(calc(var(--peek) * 4px), calc(var(--peek) * -2px)) rotate(calc(var(--peek) * 3deg));
  transform-origin: 0% 100%;
}

.result-gallery {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 76px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.result-stack.is-folded .result-gallery {
  display: none;
}

.result-gallery-item {
  position: relative;
  overflow: hidden;
  flex: 0 0 70px;
  width: 70px;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 0;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #f6f8f7;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 28px rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.result-stack.is-folded .result-gallery-item {
  position: absolute;
  left: calc(var(--stack-offset) * 1.35);
  top: calc(var(--stack-offset) * 0.72);
  z-index: var(--stack-z);
  transform: rotate(var(--stack-rotate));
}

.result-stack.is-folded .result-gallery-item:not(.active) {
  opacity: .76;
}

.result-stack.is-folded .result-gallery-item.active {
  transform: translateY(-3px) rotate(0deg);
}

.result-gallery-item:hover,
.result-gallery-item.active {
  border-color: var(--workspace-green);
  box-shadow:
    0 0 0 2px rgba(15, 161, 91, 0.1),
    0 14px 32px rgba(15, 23, 42, 0.08);
}

.result-gallery-item:hover {
  opacity: 1;
  transform: translateY(-2px) rotate(0deg);
}

.result-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-gallery-item span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: rgb(20 28 34 / 72%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.result-toolbar {
  position: relative;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin-top: 0;
  padding: 2px 0 0;
}

.result-stack.is-folded .result-toolbar {
  margin-top: 0;
}

.result-stack.is-expanded .result-toolbar {
  margin-top: 0;
}

.result-toolbar small {
  margin-left: 4px;
  color: var(--workspace-muted);
  font-size: 11px;
}

body.chat-page-active .result-action {
  min-height: 30px;
  border-color: #dfe7e3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #47515d;
  font-weight: 650;
}

body.chat-page-active .result-action:hover {
  border-color: #b9dcca;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
  transform: none;
}

body.chat-page-active .result-action.primary {
  border-color: var(--workspace-green);
  background: var(--workspace-green);
  color: #fff;
}

body.chat-page-active .lost-image-card {
  width: min(480px, 100%);
  min-height: 170px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffafa, #fff);
  box-shadow: 0 10px 28px rgba(185, 28, 28, 0.06);
}

body.chat-page-active .lost-image-card.is-canceled {
  background: linear-gradient(180deg, #fffbeb, #fff);
  box-shadow: 0 10px 28px rgba(146, 64, 14, 0.06);
}

body.chat-page-active .lost-image-card.is-missing {
  width: min(480px, 100%);
  min-height: 220px;
  border-color: #cfd8d3;
  background: #f7f9f8;
  color: #59645f;
  box-shadow: none;
}

body.chat-page-active .lost-image-card.is-missing i {
  background: #e8eeeb;
  color: #69756f;
}

body.chat-page-active .lost-image-card.is-missing strong {
  color: #37413c;
}

body.chat-page-active .lost-image-card.is-missing small {
  color: #737f79;
}

body.chat-page-active .composer-card {
  gap: 6px;
  padding: 8px 14px 10px;
  border: 0;
  border-top: 1px solid var(--workspace-line);
  background: #fff;
}

body.chat-page-active .composer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(90px, .5fr)) minmax(104px, .55fr) auto;
  gap: 6px;
}

body.chat-page-active .composer-field {
  min-width: 0;
  width: auto;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

body.chat-page-active .composer-field:hover {
  background: #fff;
}

body.chat-page-active .composer-model {
  min-width: 0;
  background: #fff;
  box-shadow: none;
}

body.chat-page-active .composer-ratio {
  width: auto;
}

body.chat-page-active .composer-quality {
  width: auto;
}

body.chat-page-active .composer-quantity {
  width: auto;
}

body.chat-page-active .composer-format {
  width: auto;
}

body.chat-page-active .composer-transparent {
  width: auto;
}

body.chat-page-active .composer-field > span {
  height: 20px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f1f3f4;
  color: #606a75;
  font-size: 10px;
  font-weight: 700;
}

body.chat-page-active .composer-grid .cost-chip {
  min-width: 136px;
  min-height: 36px;
  margin-left: 0;
  padding: 5px 10px;
  border: 1px solid #d8eee2;
  border-radius: 8px;
  background: var(--workspace-green-soft);
  box-shadow: none;
  color: var(--workspace-green-dark);
  font-size: 12px;
}

body.chat-page-active .composer-grid .cost-chip.cost-chip-discount {
  border-color: #bfe6cf;
  background: linear-gradient(180deg, #f2fbf6, var(--workspace-green-soft));
}

body.chat-page-active .composer-grid .cost-chip .cost-chip-main {
  gap: 6px;
}

body.chat-page-active .composer-grid .cost-chip i {
  font-size: 14px;
  color: var(--workspace-green-dark);
}

body.chat-page-active .composer-grid .cost-chip em {
  padding: 1px 6px;
  background: rgba(40, 167, 105, 0.14);
  color: var(--workspace-green-dark);
  font-size: 10px;
  font-weight: 800;
}

body.chat-page-active .composer-grid .cost-chip del {
  color: #8aa597;
  font-size: 11px;
}

body.chat-page-active .composer-grid .cost-chip strong {
  color: var(--workspace-green-dark);
  font-size: 14px;
}

body.chat-page-active .composer-grid .cost-chip .cost-chip-unit {
  color: #5f7d6e;
  font-size: 10px;
}

body.chat-page-active .composer-grid .cost-chip .cost-chip-note {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding-left: 20px;
  color: #4f6b5d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

body.chat-page-active .composer-input {
  grid-template-columns: 78px minmax(0, 1fr) 96px;
  gap: 6px;
  padding: 6px;
  border-color: var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

body.chat-page-active .reference-button,
body.chat-page-active .prompt-box .ant-input,
body.chat-page-active .prompt-box .el-textarea__inner,
body.chat-page-active .generate-button {
  min-height: 72px;
  border-radius: 6px;
}

body.chat-page-active .composer-field .el-select__wrapper {
  min-height: 24px;
}

body.chat-page-active .composer-selected,
body.chat-page-active .composer-option {
  min-height: 24px;
  gap: 8px;
}

.ratio-select-popper {
  min-width: 132px !important;
}

.quality-select-popper {
  min-width: 150px !important;
}

.quantity-select-popper,
.format-select-popper {
  min-width: 142px !important;
}

body.chat-page-active .reference-button {
  gap: 1px;
  font-size: 11px;
}

body.chat-page-active .reference-button i,
body.chat-page-active .generate-button i {
  font-size: 15px;
}

body.chat-page-active .reference-button {
  border-color: #cfe4d8;
  background: #f7fbf8;
}

body.chat-page-active .prompt-box .ant-input,
body.chat-page-active .prompt-box .el-textarea__inner {
  height: 72px;
  padding: 9px 10px;
  border-color: transparent;
  background: #fafbfb;
  box-shadow: none;
  line-height: 1.45;
  resize: none;
}

body.chat-page-active .prompt-box .ant-input:focus,
body.chat-page-active .prompt-box .el-textarea__inner:focus {
  background: #fff;
  box-shadow: 0 0 0 1px var(--workspace-green) inset;
}

body.chat-page-active .generate-button {
  border-color: var(--workspace-green);
  background: var(--workspace-green);
  box-shadow: none;
  font-size: 14px;
}

body.chat-page-active .generate-button:hover {
  background: var(--workspace-green-dark);
  box-shadow: none;
  transform: none;
}

.model-select-popper {
  min-width: 500px !important;
}

.model-option {
  min-height: 50px;
  padding-block: 3px;
}

.model-select-popper .ant-select-item {
  padding: 6px 8px;
}

.model-select-popper .model-option-price {
  display: inline-flex;
  min-width: 96px;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.1;
}

.model-select-popper .model-option-price small {
  color: #718077;
  font-size: 10px;
  font-weight: 700;
}

.model-select-popper .model-option-price em {
  color: #15905a;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.model-option-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.model-option-link,
.model-selected-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #718077;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.model-option-link i,
.model-selected-link i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.model-option-link.is-online,
.model-selected-link.is-online {
  color: #15905a;
}

.model-option-link.is-warning,
.model-selected-link.is-warning {
  color: #d97706;
}

.model-option-link.is-error,
.model-selected-link.is-error {
  color: #dc2626;
}

.model-option-link.is-disabled,
.model-selected-link.is-disabled {
  color: #9ca3af;
}

.model-option-link.is-unknown,
.model-selected-link.is-unknown {
  color: #b7791f;
}

body.chat-page-active .model-selected {
  min-width: 0;
}

body.chat-page-active .model-selected > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.chat-page-active .model-select-link .ant-select-selection-item {
  font-weight: 800;
}

body.chat-page-active .model-select-link.is-online .ant-select-selection-item {
  color: #15905a;
}

body.chat-page-active .model-select-link.is-warning .ant-select-selection-item,
body.chat-page-active .model-select-link.is-warning .ant-select-selection-item {
  color: #d97706;
}

body.chat-page-active .model-select-link.is-error .ant-select-selection-item {
  color: #dc2626;
}

body.chat-page-active .model-select-link.is-disabled .ant-select-selection-item {
  color: #9ca3af;
}

body.chat-page-active .model-selected-link {
  margin-left: auto;
  transform: scale(.92);
  transform-origin: right center;
}

@media (max-width: 1260px) {
  .web-primary-nav button {
    padding-inline: 8px;
  }

  body.chat-page-active .composer-grid {
    grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(88px, .55fr)) minmax(100px, .6fr) auto;
  }

  body.chat-page-active .composer-transparent {
    display: none;
  }
}

@media (max-width: 980px) {
  body.chat-page-active .chat-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .result-gallery {
    width: 100%;
  }

  body.chat-page-active .composer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.chat-page-active .composer-model {
    grid-column: span 2;
  }

  body.chat-page-active .composer-grid .cost-chip {
    grid-column: span 2;
  }
}

@media (max-height: 680px) and (min-width: 801px) {
  body.chat-page-active .chat-panel {
    grid-template-rows: 54px minmax(96px, 1fr) auto;
  }

  body.chat-page-active .chat-header {
    min-height: 54px;
    padding-block: 8px;
  }

  body.chat-page-active .chat-thread {
    padding-block: 14px;
    overscroll-behavior: contain;
  }

  body.chat-page-active .composer-card {
    max-height: min(48dvh, 280px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 800px) {
  body.chat-page-active .web-content.chat-content {
    padding: 0 0 calc(70px + env(safe-area-inset-bottom));
  }

  body.chat-page-active .chat-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.chat-page-active .chat-empty {
    align-content: start;
    gap: 12px;
    padding: 8px;
  }

  body.chat-page-active .chat-empty-showcase,
  body.chat-page-active .empty-template-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.chat-page-active .chat-empty-showcase {
    border-radius: 20px;
    padding: 16px;
  }

  body.chat-page-active .chat-empty-art {
    display: none;
  }

  body.chat-page-active .chat-empty-copy {
    align-items: center;
    padding: 8px 4px 10px;
    text-align: center;
  }

  body.chat-page-active .chat-empty-kicker {
    justify-content: center;
  }

  body.chat-page-active .chat-empty-kicker em {
    display: none;
  }

  body.chat-page-active .chat-empty-copy > strong {
    max-width: 280px;
    font-size: 28px;
  }

  body.chat-page-active .chat-empty-copy > p {
    max-width: 320px;
    font-size: 13px;
  }

  body.chat-page-active .chat-empty-steps {
    justify-content: center;
  }

  body.chat-page-active .empty-template-grid button {
    padding-right: 54px;
  }

  body.chat-page-active .chat-sidebar {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 8px;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--workspace-line);
  }

  body.chat-page-active .chat-sidebar-head {
    display: none;
  }

  body.chat-page-active .new-session-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
  }

  body.chat-page-active .new-session-button-text {
    display: none;
  }

  body.chat-page-active .session-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  body.chat-page-active .session-item {
    flex: 0 0 min(62vw, 230px);
    min-height: 40px;
    padding: 6px 8px;
  }

  body.chat-page-active .session-main small,
  body.chat-page-active .session-meta {
    display: none;
  }

  body.chat-page-active .chat-panel {
    grid-template-rows: 54px minmax(0, 1fr) auto;
  }

  body.chat-page-active .chat-header {
    min-height: 54px;
    padding: 8px 12px;
  }

  body.chat-page-active .chat-thread {
    padding: 16px 10px;
  }

  body.chat-page-active .message,
  body.chat-page-active .message.assistant {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    margin-bottom: 18px;
  }

  body.chat-page-active .message.user {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 8px;
    width: 100%;
    margin-bottom: 18px;
    margin-left: auto;
  }

  body.chat-page-active .avatar,
  body.chat-page-active .message.user .avatar {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  body.chat-page-active .bubble,
  body.chat-page-active .message.assistant .bubble {
    width: 100%;
  }

  body.chat-page-active .message.user .bubble {
    max-width: min(82vw, 100%);
  }

  body.chat-page-active .bubble > p {
    max-width: 100%;
    padding: 9px 11px;
    font-size: 13px;
  }

  body.chat-page-active .composer-card {
    max-height: min(48dvh, 360px);
    padding: 8px;
    overflow-y: auto;
  }
}

@media (max-width: 600px) {
  body.chat-page-active .chat-header-actions button {
    width: 32px;
    height: 32px;
  }

  body.chat-page-active .chat-header-actions button:first-child {
    display: none;
  }

  .result-gallery {
    display: flex;
    width: 100%;
    gap: 7px;
  }

  .result-toolbar .result-action span {
    display: none;
  }

  .result-toolbar .result-action {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .result-toolbar small {
    width: 100%;
    margin-left: 0;
  }

  body.chat-page-active .composer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body.chat-page-active .composer-model,
  body.chat-page-active .composer-grid .cost-chip {
    grid-column: 1 / -1;
  }

  .ratio-select-popper,
  .quality-select-popper,
  .quantity-select-popper,
  .format-select-popper {
    min-width: 132px !important;
  }

  body.chat-page-active .composer-format,
  body.chat-page-active .composer-transparent {
    display: none;
  }

  body.chat-page-active .composer-input {
    grid-template-columns: 42px minmax(0, 1fr) 54px;
  }

  body.chat-page-active .reference-button,
  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner,
  body.chat-page-active .generate-button {
    min-height: 60px;
  }

  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner {
    height: 60px;
  }

  body.chat-page-active .reference-button span,
  body.chat-page-active .generate-button-text {
    display: none;
  }

  .model-select-popper {
    min-width: min(430px, calc(100vw - 20px)) !important;
  }
}

/* Quiet Studio coverage for the rest of the user-facing pages. */

.web-content:not(.chat-content):not(.oauth-content) {
  background: var(--workspace-bg);
  padding: 18px 20px 24px;
}

.web-content:not(.chat-content) > :where(.home-page, .page-stack, .reverse-page, .status-page, .profile-page, .api-docs-page) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.page-stack,
.home-page,
.reverse-page,
.status-page,
.profile-page,
.api-docs-page {
  gap: 14px;
}

:where(
  .glass-card,
  .home-hero,
  .home-commerce-panel,
  .home-activity-card,
  .home-status-card,
  .home-flow-panel,
  .home-notice-strip article,
  .home-announcement-strip article,
  .home-feature-grid article,
  .home-subscription-feature,
  .home-subscription-card,
  .plaza-hero,
  .plaza-filter-panel,
  .plaza-card,
  .reverse-hero,
  .reverse-upload-panel,
  .reverse-control-panel,
  .reverse-result-panel,
  .history-hero,
  .history-empty,
  .history-card,
  .api-docs-hero,
  .api-docs-panel,
  .status-hero,
  .status-metric,
  .status-panel,
  .status-interface-card,
  .profile-hero,
  .profile-empty,
  .profile-account-card,
  .profile-stat-card,
  .profile-panel
) {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: var(--workspace-surface);
  box-shadow: none;
}

.home-hero.clean-home-hero,
.plaza-hero.glass-card,
.reverse-hero.glass-card,
.status-hero.glass-card,
.history-hero,
.profile-hero,
.api-docs-hero,
.home-dashboard-preview,
.home-flow-panel.glass-card,
.reverse-upload-panel.glass-card,
.reverse-control-panel.glass-card,
.reverse-result-panel.glass-card {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: var(--workspace-surface);
  box-shadow: none;
}

.home-hero.clean-home-hero,
.plaza-hero.glass-card {
  overflow: hidden;
}

:where(.home-hero, .plaza-hero, .reverse-hero, .status-hero)::before,
:where(.home-hero, .plaza-hero, .reverse-hero, .status-hero)::after,
.clean-home-hero::before,
.clean-home-hero::after {
  display: none;
}

.eyebrow,
.section-head span,
:where(.plaza-hero-copy, .reverse-hero-copy, .status-hero-copy, .profile-hero, .api-docs-hero) .eyebrow,
:where(.profile-panel-head, .api-docs-panel-head, .status-panel-head, .reverse-result-head) span {
  color: var(--workspace-green-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-head h2,
:where(.hero-copy, .plaza-hero-copy, .reverse-hero-copy, .status-hero-copy, .profile-hero, .api-docs-hero) h1,
:where(.hero-copy, .plaza-hero-copy, .reverse-hero-copy, .status-hero-copy, .profile-hero, .api-docs-hero) h2,
:where(.profile-panel-head, .api-docs-panel-head, .status-panel-head) h3,
:where(.profile-panel-head, .api-docs-panel-head, .status-panel-head) h2 {
  color: var(--workspace-text);
  letter-spacing: 0;
}

:where(.hero-copy, .plaza-hero-copy, .reverse-hero-copy, .status-hero-copy, .profile-hero, .api-docs-hero) p,
.section-head p,
:where(.home-status-card, .home-flow-grid, .home-feature-grid, .plaza-card, .reverse-hero-note, .profile-panel-desc, .api-docs-note) p {
  color: var(--workspace-muted);
  line-height: 1.6;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  min-height: 0;
  padding: 22px;
}

.clean-home-hero .hero-copy h1,
.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

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

.hero-actions .el-button,
.home-flow-panel .el-button,
.reverse-hero-actions .el-button {
  min-height: 38px;
  border-radius: 7px;
  box-shadow: none;
  font-weight: 750;
}

.home-signal-row,
.plaza-stats,
.api-key-endpoints,
.status-latency-grid,
.status-metrics {
  gap: 8px;
}

.home-signal-row span,
.plaza-stats span,
.api-key-endpoints span,
.tag-row span,
.empty-tip-row span {
  border: 1px solid var(--workspace-line);
  border-radius: 999px;
  background: #f8faf9;
  color: #4b5563;
  box-shadow: none;
}

.home-dashboard-preview {
  align-self: stretch;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fbfcfc;
  box-shadow: none;
}

.preview-toolbar {
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
}

.preview-canvas img {
  border-radius: 7px;
}

.preview-floating-card,
.preview-meta {
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: rgb(255 255 255 / 92%);
  box-shadow: none;
}

.home-creation-preview {
  position: relative;
  overflow: hidden;
  gap: 10px;
  padding: 0;
  border-color: #dfe7e3;
  background: #f8faf9;
}

.home-creation-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 154, 88, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 154, 88, 0.026) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.home-creation-preview .preview-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #e5e8eb;
  background: rgba(255, 255, 255, 0.86);
}

.preview-window-dots {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 5px;
}

.preview-window-dots span,
.home-creation-preview .preview-toolbar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d5dbe1;
}

.home-creation-preview .preview-toolbar strong {
  margin-left: 0;
  color: #20262e;
  font-size: 13px;
  font-weight: 780;
}

.home-creation-preview .preview-toolbar em {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 5px;
  border: 1px solid #d8eee2;
  border-radius: 999px;
  background: #f1fbf5;
  color: #087946;
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
}

.home-creation-preview .preview-toolbar em::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #109a58;
}

.preview-workbench {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(168px, 0.5fr) minmax(300px, 1.25fr);
  gap: 12px;
  padding: 12px;
}

.preview-prompt-panel,
.preview-result-panel {
  min-width: 0;
  border: 1px solid #e5e8eb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.preview-prompt-panel {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.preview-prompt-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-prompt-heading > i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: #eaf8ef;
  color: #09834c;
  font-size: 17px;
}

.preview-prompt-heading > div {
  display: grid;
  gap: 2px;
}

.preview-prompt-heading strong {
  color: #20262e;
  font-size: 13px;
  font-weight: 780;
}

.preview-prompt-panel span,
.preview-meta span {
  color: #7b8490;
  font-size: 11px;
  font-weight: 720;
}

.preview-prompt-panel > p {
  margin: 0;
  color: #26322c;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.72;
}

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

.preview-parameter-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid #e5ebe8;
  border-radius: 7px;
  background: #fbfcfc;
  padding: 9px 10px;
}

.preview-parameter-grid strong {
  overflow: hidden;
  color: #20262e;
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-prompt-note {
  display: inline-flex;
  margin-top: auto;
  align-items: center;
  gap: 6px;
  color: #6f7883;
  font-size: 11px;
  line-height: 1.4;
}

.preview-prompt-note i {
  color: #109a58;
  font-size: 14px;
}

.preview-result-panel {
  padding: 8px;
}

.preview-result-frame {
  height: 100%;
  overflow: hidden;
  border-radius: 7px;
  background: #f4f7f5;
}

.preview-poster-art {
  position: relative;
  min-height: 310px;
  height: 100%;
  overflow: hidden;
  background: #edf7f0;
}

.preview-poster-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
}

.preview-poster-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(246, 251, 248, 0.98) 0%, rgba(246, 251, 248, 0.9) 30%, rgba(246, 251, 248, 0.12) 62%, transparent 100%);
  pointer-events: none;
}

.preview-poster-copy {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 24px;
  display: grid;
  max-width: 52%;
  justify-items: start;
}

.preview-poster-mark {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #087946;
  font-weight: 850;
  box-shadow: 0 6px 20px rgba(18, 53, 36, 0.08);
}

.preview-poster-copy span {
  color: #087946;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.preview-poster-copy h3 {
  margin: 6px 0 4px;
  color: #123b29;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.12;
}

.preview-poster-copy p {
  margin: 0;
  color: #476154;
  font-size: 12px;
}

.preview-poster-copy b {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  border-radius: 6px;
  background: #123b29;
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
}

.preview-generate-state {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #087946;
  padding: 5px 8px;
  box-shadow: 0 6px 20px rgba(18, 53, 36, 0.08);
  backdrop-filter: blur(8px);
}

.preview-generate-state i {
  font-size: 13px;
}

.preview-generate-state span {
  color: #087946;
  font-size: 10px;
  font-weight: 760;
}

.home-creation-preview .preview-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 12px 12px;
  border: 0;
  background: transparent;
}

.home-creation-preview .preview-meta div {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid #e5e8eb;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  padding: 9px 10px;
}

.home-creation-preview .preview-meta i {
  display: grid;
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: #edf8f1;
  color: #09834c;
  font-size: 14px;
}

.home-creation-preview .preview-meta strong {
  display: block;
  overflow: hidden;
  color: #20262e;
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-commerce-panel,
.home-activity-card,
.home-flow-panel {
  padding: 18px;
}

.home-activity-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.25fr);
  gap: 18px;
  align-items: center;
  min-height: 210px;
  border-color: #bfe8cf;
  background:
    radial-gradient(circle at 6% 0%, rgba(34, 197, 94, 0.2), transparent 24rem),
    radial-gradient(circle at 96% 10%, rgba(250, 204, 21, 0.16), transparent 22rem),
    linear-gradient(135deg, #f3fff7 0%, #f8fdf5 52%, #fffaf0 100%);
  padding: clamp(18px, 2.2vw, 26px);
}

.home-activity-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 154, 88, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 154, 88, 0.032) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.home-activity-card::after {
  content: "";
  position: absolute;
  right: clamp(18px, 4vw, 72px);
  top: -84px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(16, 154, 88, 0.16), transparent 68%);
  pointer-events: none;
}

.home-activity-progress,
.home-activity-rules,
.home-activity-actions,
.home-activity-login,
.home-activity-link {
  position: relative;
  z-index: 1;
}

.home-activity-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.home-activity-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid #bfe8cf;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--workspace-green-dark);
  padding: 7px 10px;
  box-shadow: 0 10px 24px rgba(16, 154, 88, 0.08);
}

.home-activity-kicker i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #e1f7ea;
  color: #087946;
  font-size: 14px;
}

.home-activity-kicker span {
  color: var(--workspace-green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.home-activity-copy h2 {
  margin: 0;
  color: var(--workspace-text);
  font-size: clamp(28px, 3.5vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.home-activity-copy p {
  margin: 0;
  color: var(--workspace-muted);
  line-height: 1.55;
}

.home-activity-discount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #e0eee6;
  padding: 0 0 12px;
}

.home-activity-discount strong {
  max-width: 7em;
  color: #087946;
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.06em;
  text-align: right;
}

.home-activity-discount strong.is-text {
  border: 1px solid #bfe8cf;
  border-radius: 999px;
  background: #eaf8ef;
  padding: 8px 12px;
  font-size: 18px;
  letter-spacing: 0;
}

.home-activity-discount span,
.home-activity-progress-head span,
.home-activity-foot span {
  color: #6b756f;
  font-size: 12px;
  font-weight: 720;
}

.home-activity-progress {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.home-activity-board {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(191, 232, 207, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
  box-shadow: 0 22px 56px rgba(22, 99, 63, 0.1);
  backdrop-filter: blur(10px);
}

.home-activity-progress-head,
.home-activity-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-activity-progress-head strong {
  color: #1f2d26;
  font-size: 13px;
}

.home-activity-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #e7f0eb;
  box-shadow: inset 0 1px 2px rgba(18, 59, 41, 0.08);
}

.home-activity-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087946, #16a35b 56%, #f1b23b);
  box-shadow: 0 0 18px rgba(22, 163, 91, 0.28);
  transition: width 0.45s ease;
}

.home-activity-foot {
  flex-wrap: wrap;
}

.home-activity-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.home-activity-foot i {
  color: #109a58;
}

.home-activity-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-activity-rules span {
  border: 1px solid #dceee5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #516057;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 760;
}

.home-activity-rules span.active {
  border-color: #b7e2ca;
  background: #eaf8ef;
  color: #087946;
}

.home-activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.home-activity-login {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  border: 1px solid #0c5f3d;
  border-radius: 999px;
  background: linear-gradient(135deg, #073b2a, #0c5f3d);
  color: #fff;
  padding: 10px 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(7, 59, 42, 0.16);
}

.home-activity-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid #b7e2ca;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #087946;
  padding: 10px 15px;
  font-weight: 900;
  cursor: pointer;
}

.home-commerce-grid,
.home-status-grid,
.home-feature-grid,
.home-flow-grid {
  gap: 10px;
}

.home-subscription-feature,
.home-subscription-card,
.home-status-card,
.home-feature-grid article,
.home-flow-grid article {
  padding: 14px;
}

.home-status-card:hover,
.home-flow-grid article:hover,
.home-feature-grid article:hover,
.plaza-card:hover,
.history-card:hover {
  transform: none;
  box-shadow: none;
}

.home-status-card.primary,
.profile-stat-card.primary {
  border-color: #d8eee2;
  background: var(--workspace-green-soft);
}

.home-status-card > i,
.home-feature-grid i,
.home-flow-grid i,
.status-interface-icon,
.profile-avatar,
.profile-membership-badge > i {
  border-radius: 7px;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
  box-shadow: none;
}

.plaza-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 18px;
  padding: 20px;
}

.plaza-filter-panel {
  padding: 14px;
  background: #fbfcfc;
}

.plaza-filter-row {
  gap: 7px;
}

.plaza-filter-row button,
.history-tabs button,
.reverse-language-tabs button {
  min-height: 32px;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  color: #4b5563;
  font-weight: 650;
  box-shadow: none;
}

.plaza-filter-row button.active,
.history-tabs button.active,
.reverse-language-tabs button.active {
  border-color: #b9dcca;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
}

.plaza-board,
.history-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.plaza-card,
.history-card {
  overflow: hidden;
}

.plaza-cover,
.history-cover {
  background: #f3f5f6;
}

.plaza-cover img,
.history-cover img {
  border-radius: 0;
}

.plaza-card-body,
.history-body,
.plaza-actions,
.history-actions {
  padding: 12px;
}

.reverse-page {
  display: grid;
  gap: 14px;
}

.reverse-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
  padding: 20px;
}

.reverse-hero-note {
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fbfcfc;
  box-shadow: none;
}

.reverse-workspace {
  gap: 14px;
}

.reverse-upload-panel,
.reverse-control-panel,
.reverse-result-panel {
  padding: 16px;
}

.reverse-dropzone {
  min-height: 260px;
  border-color: #cfe4d8;
  border-radius: 8px;
  background: #fbfcfc;
  box-shadow: none;
}

.reverse-dropzone i {
  border-radius: 8px;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
  box-shadow: none;
}

.reverse-form label > span {
  color: #56616d;
  font-weight: 700;
}

.reverse-submit,
.profile-submit-btn {
  border-radius: 7px;
  box-shadow: none;
}

.reverse-result-panel .el-textarea__inner {
  border-radius: 7px;
  background: #fbfcfc;
}

.history-hero,
.profile-hero,
.api-docs-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-search {
  min-height: 36px;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.history-empty,
.profile-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 42px 18px;
  color: var(--workspace-muted);
}

.history-empty > i,
.profile-empty > i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
}

.api-docs-page {
  display: grid;
  gap: 14px;
}

.api-docs-hero {
  align-items: flex-start;
}

.api-docs-base,
.api-docs-note,
.api-docs-response-card,
.api-docs-endpoint {
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fbfcfc;
  box-shadow: none;
}

.api-docs-grid,
.api-docs-examples,
.api-docs-response-grid {
  gap: 12px;
}

.api-docs-panel {
  padding: 16px;
}

.api-docs-panel pre,
.api-docs-panel code,
.api-docs-response-card pre {
  border-radius: 7px;
  background: #111827;
}

.status-page {
  display: grid;
  gap: 14px;
}

.status-page-header {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 2px;
}

.status-page-header > div {
  min-width: 0;
}

.status-page-header h2 {
  margin: 10px 0 5px;
  color: var(--workspace-text);
  font-size: 30px;
  line-height: 1.15;
}

.status-page-header p {
  max-width: 760px;
  margin: 0;
  color: var(--workspace-muted);
  font-size: 13px;
  line-height: 1.6;
}

.status-page-header .el-button {
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 7px;
}

.status-overview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.status-summary-card {
  display: flex;
  min-width: 0;
  min-height: 106px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: var(--workspace-surface);
  box-shadow: none;
}

.status-summary-card > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.status-summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #d8eee2;
  border-radius: 9px;
  background: #f1fbf5;
  color: var(--workspace-green-dark);
  font-size: 19px;
}

.status-summary-card small,
.status-summary-card em {
  overflow: hidden;
  color: var(--workspace-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-summary-card strong {
  overflow: hidden;
  color: var(--workspace-text);
  font-size: 21px;
  font-weight: 790;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-summary-card .status-summary-time {
  font-size: 14px;
  line-height: 1.35;
}

.status-summary-current {
  border-color: #d8eee2;
  background: #f4fbf6;
}

.status-summary-current.degraded {
  border-color: #fde3a7;
  background: #fffbeb;
}

.status-summary-current.degraded .status-summary-icon {
  border-color: #fbd38d;
  background: #fff;
  color: #b54708;
}

.status-summary-current.warning,
.status-summary-current.incident {
  border-color: #fecdd3;
  background: #fff5f6;
}

.status-summary-current.warning .status-summary-icon,
.status-summary-current.incident .status-summary-icon {
  border-color: #fecdd3;
  background: #fff;
  color: #c01048;
}

.status-summary-current.unknown {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.status-summary-current.unknown .status-summary-icon {
  border-color: #e2e8f0;
  background: #fff;
  color: #64748b;
}

.status-metric,
.status-panel,
.status-interface-card {
  padding: 16px;
}

.status-provider-grid {
  grid-template-columns: repeat(auto-fit, minmax(400px, 440px));
  justify-content: start;
  align-items: start;
  gap: 12px;
}

.status-interface-card {
  width: 100%;
  max-width: 440px;
  min-height: 0;
  gap: 12px;
  padding: 14px;
}

.status-interface-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 19px;
}

.status-interface-brand strong {
  font-size: 16px;
}

.status-interface-brand small {
  margin-top: 3px;
  font-size: 11px;
}

.status-interface-state {
  padding: 5px 9px;
  font-size: 11px;
}

.status-latency-box {
  min-height: 64px;
  gap: 8px;
  padding: 10px;
}

.status-latency-box strong {
  font-size: 17px;
}

.status-latency-box,
.status-availability {
  border-color: var(--workspace-line);
  border-radius: 7px;
  background: #fbfcfc;
}

.status-availability {
  padding: 10px 0 0;
}

.status-availability strong {
  font-size: 27px;
}

.status-history-head {
  font-size: 11px;
}

.status-history-bars {
  gap: 2px;
}

.status-history-bars i {
  height: 18px;
}

.status-history-bars i {
  border-radius: 3px;
}

.profile-overview,
.profile-grid {
  gap: 12px;
}

.profile-account-card,
.profile-stat-card,
.profile-panel {
  padding: 16px;
}

.profile-panel-head {
  align-items: center;
}

.api-key-secret,
.api-key-create,
.api-key-limit-note,
.api-key-row,
.profile-log-row,
.profile-task-row,
.profile-membership-badge {
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fbfcfc;
  box-shadow: none;
}

.api-key-row,
.profile-log-row,
.profile-task-row {
  padding: 10px;
}

.api-key-full-value,
.api-key-secret code {
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
}

.result-action {
  min-height: 32px;
  border-color: var(--workspace-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  color: #47515d;
  font-weight: 650;
}

.result-action:hover {
  border-color: #b9dcca;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
  transform: none;
}

.result-action.primary {
  border-color: var(--workspace-green);
  background: var(--workspace-green);
  color: #fff;
}

.result-action.danger {
  color: #b42318;
}

.text-chat-page .chat-header > div:first-child {
  display: grid;
  gap: 4px;
}

.text-chat-page .chat-thread,
.text-chat-page .text-chat-thread {
  width: 100%;
}

.text-chat-page .message,
.text-chat-page .message.assistant {
  width: 100%;
  max-width: none;
}

.text-chat-page .message .bubble,
.text-chat-page .message.assistant .bubble {
  width: 100%;
  max-width: 100%;
}

.text-chat-page .message.user .bubble {
  width: fit-content;
  max-width: min(760px, 72%);
}

.text-chat-page .chat-specs span {
  border-color: var(--workspace-line);
  border-radius: 999px;
  background: #f8faf9;
  color: #56616d;
}

.text-chat-page .text-chat-empty i {
  border: 1px solid #d8eee2;
  border-radius: 8px;
  background: var(--workspace-green-soft);
  color: var(--workspace-green-dark);
  box-shadow: none;
}

.text-chat-page .text-chat-markdown {
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fbfcfc;
}

@media (max-width: 980px) {
  .web-content:not(.chat-content):not(.oauth-content) {
    padding: 12px;
  }

  .home-hero,
  .plaza-hero,
  .reverse-hero {
    grid-template-columns: 1fr;
  }

  .home-activity-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-activity-rules,
  .home-activity-actions {
    grid-column: auto;
  }

  .home-activity-discount {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }

  .home-dashboard-preview {
    min-height: 320px;
  }

  .history-hero,
  .profile-hero,
  .api-docs-hero,
  .status-hero,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .web-content:not(.chat-content):not(.oauth-content) {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .status-provider-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-interface-card {
    max-width: none;
  }

  .home-hero,
  .home-activity-card,
  .plaza-hero,
  .reverse-hero,
  .history-hero,
  .profile-hero,
  .api-docs-hero,
  .status-hero,
  .home-commerce-panel,
  .home-flow-panel,
  .reverse-upload-panel,
  .reverse-control-panel,
  .reverse-result-panel,
  .api-docs-panel,
  .profile-panel,
  .status-panel {
    padding: 14px;
  }

  .clean-home-hero .hero-copy h1,
  .hero-copy h1,
  .plaza-hero-copy h2,
  .reverse-hero-copy h2,
  .status-hero-copy h2,
  .profile-hero h2,
  .api-docs-hero h2 {
    font-size: 26px;
  }

  .plaza-board,
  .history-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-toolbar,
  .profile-hero-actions,
  .reverse-hero-actions,
  .hero-actions {
    width: 100%;
  }

  .history-search,
  .history-toolbar .result-action,
  .profile-hero-actions .result-action,
  .hero-actions .el-button {
    width: 100%;
  }
}

/* Mobile compatibility pass */
@media (max-width: 980px) {
  html,
  body,
  #app,
  .app-shell,
  .web-main {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .web-topbar,
  .web-nav-left,
  .web-top-actions,
  .web-content,
  .web-content > * {
    min-width: 0;
  }

  .web-mobile-brand {
    max-width: 46vw;
  }

  .web-content:not(.chat-content):not(.oauth-content) > :where(.home-page, .page-stack, .reverse-page, .status-page, .profile-page, .api-docs-page) {
    max-width: 100%;
  }

  .home-status-grid,
  .home-feature-grid,
  .home-flow-grid,
  .home-commerce-grid,
  .home-commerce-grid.subscription-only .home-subscription-list,
  .status-metrics,
  .profile-overview,
  .profile-grid,
  .profile-detail-grid,
  .api-docs-grid,
  .api-docs-examples,
  .api-docs-response-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero,
  .plaza-hero,
  .reverse-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-dashboard-preview {
    display: none;
  }

  .plaza-filter-panel,
  .history-tabs,
  .reverse-language-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .plaza-filter-panel::-webkit-scrollbar,
  .history-tabs::-webkit-scrollbar,
  .reverse-language-tabs::-webkit-scrollbar {
    display: none;
  }

  .plaza-filter-row,
  .history-tabs,
  .reverse-language-tabs {
    flex-wrap: nowrap;
  }

  .plaza-filter-row button,
  .history-tabs button,
  .reverse-language-tabs button {
    flex: 0 0 auto;
  }

  .api-docs-panel pre,
  .api-docs-panel code,
  .api-docs-response-card pre,
  .api-key-full-value,
  .api-key-secret code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

@media (max-width: 760px) {
  .web-topbar {
    height: auto;
    min-height: 56px;
  }

  .web-mobile-brand img {
    width: 32px;
    height: 32px;
  }

  .web-mobile-brand strong {
    max-width: 112px;
  }

  .web-top-actions {
    gap: 6px;
  }

  .user-chip {
    max-width: 104px;
  }

  .mobile-account-panel {
    max-height: min(62dvh, 430px);
    overflow-y: auto;
  }

  .web-bottom-nav {
    right: 8px;
    left: 8px;
  }

  .web-bottom-nav button {
    height: 46px;
  }

  .home-status-grid,
  .home-feature-grid,
  .home-flow-grid,
  .home-commerce-grid,
  .home-commerce-grid.subscription-only .home-subscription-list,
  .status-metrics,
  .profile-overview,
  .profile-grid,
  .profile-detail-grid,
  .api-docs-grid,
  .api-docs-examples,
  .api-docs-response-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero,
  .plaza-hero,
  .reverse-hero,
  .history-hero,
  .profile-hero,
  .api-docs-hero,
  .home-commerce-panel,
  .home-flow-panel,
  .reverse-upload-panel,
  .reverse-control-panel,
  .reverse-result-panel,
  .api-docs-panel,
  .profile-panel,
  .status-panel {
    padding: 14px;
  }

  .status-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .status-page-header .el-button {
    width: 100%;
  }

  .status-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-activity-progress-head,
  .home-activity-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .status-summary-card {
    min-height: 86px;
    padding: 12px;
  }

  .home-hero-stats,
  .preview-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .el-button,
  .history-toolbar .result-action,
  .profile-hero-actions .result-action,
  .reverse-hero-actions .el-button,
  .reverse-result-actions .result-action {
    width: 100%;
  }

  .plaza-card p,
  .history-body p {
    min-height: 0;
  }

  .plaza-filter-panel,
  .history-tabs,
  .reverse-language-tabs {
    overflow-x: visible;
  }

  .plaza-filter-row,
  .history-tabs,
  .reverse-language-tabs {
    flex-wrap: wrap;
  }

  .status-provider-row,
  .status-endpoint-row,
  .profile-log-row,
  .profile-task-row,
  .api-key-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .status-endpoint-samples,
  .profile-log-balance,
  .profile-task-status {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .web-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }

  .web-nav-left {
    gap: 8px;
  }

  .web-mobile-brand {
    max-width: 132px;
  }

  .web-mobile-brand span {
    min-width: 0;
  }

  .web-mobile-brand strong {
    max-width: 86px;
    font-size: 14px;
  }

  .nav-recharge-action.el-button,
  .nav-recharge-action.ant-btn {
    min-width: 54px;
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
  }

  .user-chip {
    max-width: 90px;
    height: 32px;
    min-height: 32px;
  }

  .user-balance {
    max-width: 72px;
  }

  .mobile-menu-trigger {
    width: 32px;
    height: 32px;
  }

  .web-content:not(.chat-content):not(.oauth-content) {
    padding: 10px 10px calc(82px + env(safe-area-inset-bottom));
  }

  .clean-home-hero .hero-copy h1,
  .hero-copy h1,
  .plaza-hero-copy h2,
  .reverse-hero-copy h2,
  .status-hero-copy h2,
  .profile-hero h2,
  .api-docs-hero h2 {
    font-size: 25px;
    line-height: 1.18;
  }

  .hero-copy p,
  .plaza-hero-copy p,
  .reverse-hero-copy p,
  .status-hero-copy p,
  .api-docs-hero p {
    font-size: 13px;
  }

  .home-signal-row span,
  .plaza-stats span,
  .empty-tip-row span {
    min-height: 28px;
    padding: 5px 8px;
  }

  body.chat-page-active .web-main,
  body.chat-page-active .web-main:has(.web-announcement-topbar) {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.chat-page-active .web-content.chat-content {
    height: 100%;
    min-height: 0;
    padding: 0 0 calc(68px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  body.chat-page-active .chat-layout {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.chat-page-active .chat-sidebar {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 8px;
  }

  body.chat-page-active .new-session-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }

  body.chat-page-active .new-session-button > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
  }

  body.chat-page-active .new-session-button i {
    margin: 0;
    transform: none;
  }

  body.chat-page-active .new-session-button .new-session-button-text {
    display: none !important;
  }

  body.chat-page-active .session-list {
    gap: 6px;
    padding: 0 8px 0 0;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.chat-page-active .session-list::-webkit-scrollbar {
    display: none;
  }

  body.chat-page-active .session-item {
    flex: 0 0 clamp(148px, 58vw, 214px);
    min-height: 38px;
    scroll-snap-align: start;
  }

  body.chat-page-active .chat-panel {
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body.chat-page-active .chat-header {
    display: none;
  }

  body.chat-page-active .chat-thread {
    min-height: 0;
    padding: 12px 9px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.chat-page-active .message,
  body.chat-page-active .message.assistant {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 18px;
  }

  body.chat-page-active .message.user {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  body.chat-page-active .avatar,
  body.chat-page-active .message.user .avatar {
    width: 30px;
    height: 30px;
    font-size: 10px;
  }

  body.chat-page-active .bubble,
  body.chat-page-active .message.assistant .bubble,
  body.chat-page-active .message.user .bubble {
    max-width: 100%;
  }

  body.chat-page-active .message.user .bubble > p,
  .text-chat-page .message.user .bubble {
    max-width: calc(100vw - 78px);
  }

  body.chat-page-active .bubble > p {
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
  }

  body.chat-page-active .generating-bubble,
  body.chat-page-active .message.assistant .bubble.generating-bubble,
  body.chat-page-active .generating-progress {
    width: min(100%, calc(100vw - 66px));
  }

  body.chat-page-active .generating-progress {
    min-height: 170px;
  }

  body.chat-page-active .generating-placeholder-copy {
    inset: 14px;
  }

  body.chat-page-active .result-stack,
  body.chat-page-active .lost-image-card {
    width: min(100%, 300px);
    max-width: 100%;
  }

  .result-stage,
  .result-main-card {
    width: min(100%, 280px);
  }

  .result-gallery {
    width: 100%;
    justify-content: start;
  }

  .result-gallery-item {
    width: 66px;
    flex-basis: 66px;
  }

  .result-toolbar {
    width: 100%;
    gap: 5px;
  }

  .result-toolbar .result-action {
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
  }

  .result-toolbar .result-action span {
    display: none;
  }

  .result-toolbar small {
    flex: 1 0 100%;
    margin: 0;
  }

  body.chat-page-active .lost-image-card {
    min-height: 150px;
    padding: 18px;
  }

  body.chat-page-active .composer-card {
    max-height: min(48dvh, 350px);
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.chat-page-active .composer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  body.chat-page-active .composer-model,
  body.chat-page-active .composer-grid .cost-chip {
    grid-column: 1 / -1;
  }

  body.chat-page-active .composer-field {
    min-height: 34px;
    padding: 5px 6px;
  }

  body.chat-page-active .composer-field > span {
    flex: 0 0 auto;
    height: 18px;
    padding: 1px 4px;
    font-size: 10px;
  }

  body.chat-page-active .composer-field .el-select,
  body.chat-page-active .composer-field .el-select__wrapper,
  body.chat-page-active .composer-field .el-select__selection,
  body.chat-page-active .composer-selected,
  body.chat-page-active .model-selected,
  body.chat-page-active .model-option-copy,
  body.chat-page-active .model-option-main {
    min-width: 0;
    max-width: 100%;
  }

  body.chat-page-active .composer-selected,
  body.chat-page-active .model-option-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.chat-page-active .composer-grid .cost-chip {
    min-height: 32px;
    justify-content: center;
    font-size: 12px;
  }

  body.chat-page-active .composer-format,
  body.chat-page-active .composer-transparent {
    display: none;
  }

  body.chat-page-active .composer-input,
  .text-chat-page .composer-input.text-chat-composer-input {
    grid-template-columns: 44px minmax(0, 1fr) 56px;
    gap: 6px;
    padding: 6px;
  }

  body.chat-page-active .reference-button,
  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner,
  body.chat-page-active .generate-button {
    min-height: 86px;
  }

  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner {
    height: 86px;
    padding: 10px;
    font-size: 13px;
    line-height: 1.55;
  }

  body.chat-page-active .reference-button,
  body.chat-page-active .generate-button.el-button,
  .text-chat-page .composer-input.text-chat-composer-input .generate-button.el-button {
    width: auto;
    min-width: 0;
    padding: 0;
  }

  body.chat-page-active .reference-button span,
  body.chat-page-active .generate-button-text {
    display: none;
  }

  .composer-select-popper,
  .model-select-popper,
  .ratio-select-popper,
  .quality-select-popper,
  .quantity-select-popper,
  .format-select-popper {
    max-width: calc(100vw - 20px) !important;
  }

  .model-select-popper {
    width: min(100%, 340px) !important;
    min-width: min(100%, 340px) !important;
  }

  .ratio-select-popper,
  .quality-select-popper,
  .quantity-select-popper,
  .format-select-popper {
    min-width: 156px !important;
  }

  .composer-option {
    min-width: 0;
  }

  .model-option {
    gap: 8px;
  }

  .model-select-popper .model-option-price {
    min-width: 50px;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .web-mobile-brand {
    max-width: 106px;
  }

  .web-mobile-brand img {
    width: 30px;
    height: 30px;
  }

  .web-mobile-brand strong {
    max-width: 66px;
  }

  .user-chip {
    display: none;
  }

  .web-bottom-nav {
    right: 6px;
    left: 6px;
    padding: 4px;
  }

  .web-bottom-nav button {
    height: 44px;
    font-size: 9px;
  }

  .web-bottom-nav i {
    font-size: 17px;
  }

  body.chat-page-active .chat-sidebar {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 6px;
  }

  body.chat-page-active .new-session-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  body.chat-page-active .new-session-button > span {
    width: 100%;
  }

  body.chat-page-active .session-item {
    flex-basis: clamp(134px, 60vw, 190px);
  }

  body.chat-page-active .chat-thread {
    padding: 10px 7px;
  }

  body.chat-page-active .message,
  body.chat-page-active .message.assistant,
  body.chat-page-active .message.user {
    gap: 7px;
  }

  body.chat-page-active .avatar,
  body.chat-page-active .message.user .avatar {
    width: 28px;
    height: 28px;
    font-size: 9px;
  }

  body.chat-page-active .message,
  body.chat-page-active .message.assistant {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  body.chat-page-active .message.user {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  body.chat-page-active .message.user .bubble > p,
  .text-chat-page .message.user .bubble {
    max-width: calc(100vw - 70px);
  }

  body.chat-page-active .composer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.chat-page-active .composer-model,
  body.chat-page-active .composer-grid .cost-chip {
    grid-column: 1 / -1;
  }

  body.chat-page-active .composer-input,
  .text-chat-page .composer-input.text-chat-composer-input {
    grid-template-columns: 42px minmax(0, 1fr) 52px;
  }

  body.chat-page-active .reference-button,
  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner,
  body.chat-page-active .generate-button {
    min-height: 82px;
  }

  body.chat-page-active .prompt-box .ant-input,
  body.chat-page-active .prompt-box .el-textarea__inner {
    height: 82px;
  }

  .result-gallery {
    width: 100%;
  }

}

/* Text chat workspace refresh */
body.chat-page-active .text-chat-page .chat-panel {
  grid-template-rows: 64px minmax(0, 1fr) auto;
  background: #f8faf9;
}

body.chat-page-active .text-chat-page .text-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 10px 20px;
  border-bottom: 1px solid #e4e9e6;
  background:
    linear-gradient(90deg, #ffffff, #f6fbf8),
    #fff;
}

body.chat-page-active .text-chat-page .text-chat-header > .text-chat-title,
.text-chat-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.text-chat-title > i {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #d8eee2;
  border-radius: 10px;
  background: #eaf8f0;
  color: #087946;
  font-size: 19px;
}

.text-chat-title > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.text-chat-title small {
  color: #7b8490;
  font-size: 11px;
  font-weight: 700;
}

.text-chat-title strong {
  overflow: hidden;
  color: #20262e;
  font-size: 16px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.chat-page-active .text-chat-page .chat-specs {
  gap: 6px;
}

body.chat-page-active .text-chat-page .chat-specs span {
  min-height: 26px;
  padding: 4px 8px;
  border-color: #d8eee2;
  background: #f4fbf6;
  color: #087946;
  font-size: 11px;
  font-weight: 720;
}

body.chat-page-active .text-chat-page .text-chat-thread {
  display: grid;
  align-content: start;
  gap: 18px;
  width: 100%;
  padding: 26px 22px 24px;
  background:
    linear-gradient(90deg, rgba(16, 154, 88, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 154, 88, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff, #f8faf9 58%, #f5f8f6);
  background-size: 36px 36px, 36px 36px, auto;
}

body.chat-page-active .text-chat-page .message,
body.chat-page-active .text-chat-page .message.assistant {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}

body.chat-page-active .text-chat-page .message.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

body.chat-page-active .text-chat-page .avatar,
body.chat-page-active .text-chat-page .message.user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 11px;
}

body.chat-page-active .text-chat-page .message.assistant .avatar {
  border-color: #109a58;
  background: #109a58;
  color: #fff;
}

body.chat-page-active .text-chat-page .message .bubble,
body.chat-page-active .text-chat-page .message.assistant .bubble {
  width: min(920px, 100%);
  max-width: 100%;
  padding: 0;
}

body.chat-page-active .text-chat-page .message.user .bubble {
  width: fit-content;
  max-width: min(720px, 72%);
  justify-self: end;
}

body.chat-page-active .text-chat-page .text-chat-markdown {
  padding: 13px 15px;
  border: 1px solid #e1e7e4;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 24px rgba(15, 23, 42, 0.035);
  color: #26313c;
  font-size: 14px;
  line-height: 1.72;
}

body.chat-page-active .text-chat-page .message.assistant .text-chat-markdown {
  border-top-left-radius: 4px;
}

body.chat-page-active .text-chat-page .message.user .text-chat-markdown {
  border-color: #bfe8d0;
  border-top-right-radius: 4px;
  background: #e9f8ef;
  box-shadow: none;
  color: #123524;
}

body.chat-page-active .text-chat-page .message.error .text-chat-markdown {
  border-color: #ffd1d1;
  background: #fff5f5;
  color: #b42318;
}

body.chat-page-active .text-chat-page .text-chat-markdown pre,
body.chat-page-active .text-chat-page .text-chat-markdown .markdown-code-wrap {
  max-width: 100%;
}

body.chat-page-active .text-chat-page .text-chat-markdown pre {
  border-radius: 10px;
}

body.chat-page-active .text-chat-page .text-chat-empty {
  width: min(640px, 100%);
  max-width: 100%;
  margin: min(12vh, 88px) auto 0;
  padding: 34px;
  border: 1px solid #e1e7e4;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 249, 0.9)),
    #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 20px 54px rgba(15, 23, 42, 0.08);
}

body.chat-page-active .text-chat-page .text-chat-empty i {
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  border: 1px solid #d8eee2;
  border-radius: 16px;
  background: #eaf8f0;
  color: #087946;
  font-size: 25px;
}

body.chat-page-active .text-chat-page .text-chat-empty strong {
  color: #20262e;
  font-size: 22px;
  font-weight: 780;
}

body.chat-page-active .text-chat-page .text-chat-empty p {
  max-width: 440px;
  color: #6f7883;
  font-size: 13px;
}

.text-chat-quick-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 18px;
}

.text-chat-quick-prompts button {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #dfe7e3;
  border-radius: 10px;
  background: #fff;
  color: #3f4854;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.text-chat-quick-prompts button:hover {
  border-color: #b9dcca;
  background: #f1fbf5;
  color: #087946;
}

body.chat-page-active .text-chat-composer {
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid #e1e7e4;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -16px 36px rgba(15, 23, 42, 0.05);
}

body.chat-page-active .text-chat-composer-input {
  grid-template-columns: 54px minmax(0, 1fr) 104px;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dfe7e3;
  border-radius: 16px;
  background: #fff;
}

body.chat-page-active .text-chat-upload-button,
body.chat-page-active .text-chat-composer-input .generate-button.el-button,
body.chat-page-active .text-chat-composer-input .prompt-box .el-textarea__inner {
  min-height: 78px;
  border-radius: 12px;
}

body.chat-page-active .text-chat-composer-input .prompt-box .el-textarea__inner {
  height: 78px;
  padding: 12px 13px;
  border-color: transparent;
  background: #f7f9f8;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.55;
  resize: none;
}

body.chat-page-active .text-chat-composer-input .prompt-box .el-textarea__inner:focus {
  background: #fff;
  box-shadow: 0 0 0 1px #109a58 inset;
}

body.chat-page-active .text-chat-upload-button {
  border-color: #d8eee2;
  background: #f4fbf6;
  color: #087946;
}

body.chat-page-active .text-chat-composer-input .generate-button.el-button {
  width: 104px;
  min-width: 104px;
  border-color: #109a58;
  background: #109a58;
  font-weight: 780;
}

body.chat-page-active .text-chat-composer-input .generate-button.el-button:hover {
  background: #087946;
}

body.chat-page-active .text-chat-vision-card {
  border-color: #d8eee2;
  border-radius: 12px;
  background: #f7fbf8;
}

body.chat-page-active .text-chat-image-row img {
  border-radius: 10px;
}

@media (max-width: 760px) {
  body.chat-page-active .text-chat-page .text-chat-header {
    display: none;
    min-height: 54px;
    padding: 8px 12px;
  }

  body.chat-page-active .text-chat-page .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body.chat-page-active .text-chat-page .chat-specs span:not(:first-child) {
    display: none;
  }

  .text-chat-quick-prompts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  body.chat-page-active .text-chat-page .chat-panel {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  body.chat-page-active .text-chat-page .text-chat-header {
    display: none;
  }

  .text-chat-title > i {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
  }

  .text-chat-title strong {
    font-size: 15px;
  }

  body.chat-page-active .text-chat-page .text-chat-thread {
    padding: 12px 9px;
    background:
      linear-gradient(180deg, #fff, #f8faf9);
  }

  body.chat-page-active .text-chat-page .message,
  body.chat-page-active .text-chat-page .message.assistant {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
  }

  body.chat-page-active .text-chat-page .message.user {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  body.chat-page-active .text-chat-page .message.user .bubble,
  body.chat-page-active .text-chat-page .message.user .text-chat-markdown {
    max-width: calc(100vw - 78px);
  }

  body.chat-page-active .text-chat-page .text-chat-markdown {
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  body.chat-page-active .text-chat-page .text-chat-empty {
    margin-top: 34px;
    padding: 20px 14px;
    border-radius: 14px;
  }

  body.chat-page-active .text-chat-page .text-chat-empty i {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  body.chat-page-active .text-chat-page .text-chat-empty strong {
    font-size: 19px;
  }

  body.chat-page-active .text-chat-composer {
    padding: 7px 8px calc(8px + env(safe-area-inset-bottom));
  }

  body.chat-page-active .text-chat-composer-input {
    grid-template-columns: 44px minmax(0, 1fr) 56px;
    gap: 6px;
    padding: 6px;
    border-radius: 12px;
  }

  body.chat-page-active .text-chat-upload-button,
  body.chat-page-active .text-chat-composer-input .generate-button.el-button,
  body.chat-page-active .text-chat-composer-input .prompt-box .el-textarea__inner {
    min-height: 88px;
    border-radius: 9px;
  }

  body.chat-page-active .text-chat-composer-input .prompt-box .el-textarea__inner {
    height: 88px;
    padding: 10px;
    font-size: 13px;
  }

  body.chat-page-active .text-chat-composer-input .generate-button.el-button {
    width: auto;
    min-width: 0;
    padding: 0;
  }

  body.chat-page-active .text-chat-composer-input .generate-button-text {
    display: none;
  }
}

@media (max-width: 420px) {
  body.chat-page-active .text-chat-page .message,
  body.chat-page-active .text-chat-page .message.assistant {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  body.chat-page-active .text-chat-page .message.user {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  body.chat-page-active .text-chat-page .message.user .bubble,
  body.chat-page-active .text-chat-page .message.user .text-chat-markdown {
    max-width: calc(100vw - 70px);
  }

  body.chat-page-active .text-chat-page .chat-specs {
    display: none;
  }
}

/* Mobile chat bubble containment: keep bubbles inside their content column. */
@media (max-width: 600px) {
  body.chat-page-active .chat-thread {
    overflow-x: hidden;
  }

  body.chat-page-active .message,
  body.chat-page-active .message.assistant,
  body.chat-page-active .message.user,
  body.chat-page-active .message > .bubble,
  body.chat-page-active .message.assistant > .bubble,
  body.chat-page-active .message.user > .bubble {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.chat-page-active .message > .bubble,
  body.chat-page-active .message.assistant > .bubble {
    width: 100%;
    justify-self: stretch;
  }

  body.chat-page-active .message.user > .bubble {
    width: fit-content;
    justify-self: end;
  }

  body.chat-page-active .bubble > p,
  body.chat-page-active .message.user .bubble > p,
  body.chat-page-active .message.assistant .bubble > p,
  body.chat-page-active .lost-image-card,
  body.chat-page-active .generating-bubble,
  body.chat-page-active .generating-progress,
  body.chat-page-active .text-chat-page .message.user .bubble,
  body.chat-page-active .text-chat-page .message.user .text-chat-markdown {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.chat-page-active .lost-image-card {
    width: min(100%, 320px);
    justify-self: start;
  }

  body.chat-page-active .generating-progress {
    width: min(100%, 340px);
  }
}
