* {
  box-sizing: border-box;
}

:root {
  --bg: #070a12;
  --bg-deep: #05070d;
  --side: #0b101c;
  --panel: #101827;
  --panel-soft: #141d2d;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(24, 200, 255, 0.32);
  --text: #f8fafc;
  --muted: #94a3b8;
  --weak: #64748b;
  --brand: #18c8ff;
  --brand-soft: rgba(24, 200, 255, 0.1);
  --brand-2: #2f7bff;
  --gold: #f7b500;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

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

button {
  border: 0;
  cursor: pointer;
}

.achu-page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% -12%, rgba(24, 200, 255, 0.14), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(47, 123, 255, 0.12), transparent 28%),
    radial-gradient(circle at 70% 74%, rgba(124, 58, 237, 0.1), transparent 32%),
    var(--bg);
}

/* 左侧栏 */

.achu-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 12, 22, 0.98));
  border-right: 1px solid var(--line);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 82px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #061018;
  font-size: 22px;
  font-weight: 1000;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.7), transparent 26%),
    linear-gradient(135deg, #18c8ff, #7c3aed 62%, #f7b500);
  box-shadow: 0 0 26px rgba(24, 200, 255, 0.28);
}

.brand-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--weak);
  font-size: 12px;
}

.product-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.product-tabs button {
  height: 38px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.product-tabs button.active {
  color: var(--brand);
  background: rgba(24, 200, 255, 0.1);
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 14px 16px 8px;
}

.category-tabs button {
  height: 30px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9px;
}

.category-tabs button.active {
  color: #061018;
  font-weight: 900;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
}

.model-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 0 16px 12px;
  padding: 0 12px;
  color: var(--weak);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.model-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
}

.model-search input::placeholder {
  color: var(--weak);
}

.model-list {
  flex: 1;
  min-height: 0;
  padding: 0 14px 14px;
  overflow-y: auto;
}

.model-list::-webkit-scrollbar,
.chat-stream::-webkit-scrollbar,
.large-result-grid::-webkit-scrollbar,
.history-pop-list::-webkit-scrollbar {
  width: 5px;
}

.model-list::-webkit-scrollbar-thumb,
.chat-stream::-webkit-scrollbar-thumb,
.large-result-grid::-webkit-scrollbar-thumb,
.history-pop-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

.model-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.model-list-title span {
  color: var(--weak);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.model-list-title em {
  color: var(--weak);
  font-style: normal;
  font-size: 12px;
}

.model-card {
  display: flex;
  gap: 12px;
  width: 100%;
  min-height: 94px;
  margin-bottom: 10px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  border-radius: 16px;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.model-card:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}

.model-card.active {
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.15), rgba(47, 123, 255, 0.07)),
    rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  box-shadow:
    inset 3px 0 0 var(--brand),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.model-icon,
.control-icon,
.mini-model-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #e0faff;
  font-weight: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
}

.icon-blue {
  background: linear-gradient(135deg, #155e75, #2563eb);
}

.icon-cyan {
  background: linear-gradient(135deg, #0e7490, #14b8a6);
}

.icon-purple {
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
}

.icon-gold {
  color: #211600;
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.icon-gpt {
  background: linear-gradient(135deg, #1e293b, #475569);
}

.icon-gemini {
  background: linear-gradient(135deg, #172554, #6366f1);
}

.model-card-main {
  min-width: 0;
  flex: 1;
}

.model-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-card-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-card-head span {
  flex: 0 0 auto;
  padding: 3px 7px;
  color: var(--brand);
  font-size: 11px;
  background: rgba(24, 200, 255, 0.1);
  border-radius: 8px;
}

.model-card p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.model-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.model-card-meta em {
  padding: 3px 6px;
  color: var(--weak);
  font-style: normal;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.045);
  border-radius: 7px;
}

.side-placeholder {
  margin: 0 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.side-placeholder strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.side-placeholder p {
  margin: 8px 0 0;
  color: var(--weak);
  line-height: 1.6;
  font-size: 12px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 72px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #061018;
  font-weight: 1000;
  background: linear-gradient(135deg, #f8fafc, #7dd3fc);
  border-radius: 50%;
}

.user-copy {
  min-width: 0;
  flex: 1;
}

.user-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.user-copy i {
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.sidebar-user button {
  height: 32px;
  padding: 0 12px;
  color: #201500;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border-radius: 10px;
}

/* 主体 */

.achu-main {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) auto;
  min-width: 0;
  height: 100vh;
  padding: 0 22px 16px;
  overflow: hidden;
}

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

.topbar-left h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.balance-pill strong {
  color: var(--text);
}

.top-btn {
  height: 36px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.top-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

.charge-btn {
  height: 36px;
  padding: 0 16px;
  color: #201500;
  font-weight: 900;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(247, 181, 0, 0.2);
}

/* 工作区 */

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding-top: 16px;
}

.center-panel {
  width: min(1220px, 100%);
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-topline {
  flex: 0 0 auto;
  height: 56px;
  margin-bottom: 12px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.mini-model-icon {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.workspace-model span {
  display: block;
  color: var(--weak);
  font-size: 12px;
}

.workspace-model strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
}

.workspace-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.new-conversation-btn {
  height: 38px;
  padding: 0 15px;
  color: #061018;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(24, 200, 255, 0.18);
}

.ghost-action {
  height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ghost-action:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
}

/* 历史对话折叠框 */

.history-pop-wrap {
  position: relative;
}

.history-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.history-trigger.active {
  color: #f7d45c;
  background: rgba(247, 181, 0, 0.1);
  border-color: rgba(247, 181, 0, 0.32);
}

.history-trigger span {
  color: inherit;
  font-size: 12px;
}

.history-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 360px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(18, 23, 34, 0.98), rgba(12, 17, 28, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.history-pop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.history-pop-head strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.history-pop-head span {
  display: block;
  margin-top: 5px;
  color: var(--weak);
  font-size: 12px;
}

.history-pop-head button {
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  font-size: 18px;
  line-height: 1;
}

.history-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-bottom: 10px;
  padding: 0 11px;
  color: var(--weak);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.history-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
}

.history-search input::placeholder {
  color: var(--weak);
}

.history-new-btn {
  width: 100%;
  height: 36px;
  margin-bottom: 10px;
  color: #061018;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
  border-radius: 12px;
}

.history-pop-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 3px;
}

.history-pop-item {
  width: 100%;
  min-height: 62px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.history-pop-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
}

.history-delete-btn {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  color: #fecaca;
  font-size: 12px;
  font-weight: 900;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: 999px;
}

.history-delete-btn:hover {
  color: #ffffff;
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.34);
}

.history-pop-item:hover {
  background: rgba(255, 255, 255, 0.055);
}

.history-pop-item.active {
  background:
    linear-gradient(135deg, rgba(247, 181, 0, 0.14), rgba(255, 255, 255, 0.035));
  border-color: rgba(247, 181, 0, 0.32);
}

.history-pop-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: #061018;
  font-size: 11px;
  font-weight: 1000;
  background: #dffaff;
  border-radius: 12px;
}

.history-pop-main {
  min-width: 0;
  flex: 1;
}

.history-pop-main strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-pop-main span {
  display: block;
  margin-top: 4px;
  color: var(--weak);
  font-size: 12px;
}

.history-pop-item em {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: var(--gold);
  background: rgba(247, 181, 0, 0.1);
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
}


.danger-action {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.18);
  background: rgba(248, 113, 113, 0.055);
}

.danger-action:hover {
  color: #ffffff;
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.12);
}

/* 对话大画布 */

.chat-workspace {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 200, 255, 0.055), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.045), transparent 32%),
    rgba(4, 7, 13, 0.34);
}

.chat-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.chat-stream {
  height: 100%;
  overflow-y: auto;
  padding: 28px 34px 38px;
}

.chat-message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  width: min(980px, 100%);
  margin: 0 auto 24px;
}

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

.chat-message.user .chat-avatar {
  grid-column: 2;
  grid-row: 1;
}

.chat-message.user .chat-content {
  grid-column: 1;
  grid-row: 1;
  align-items: flex-end;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #061018;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
  border-radius: 15px;
  box-shadow: 0 14px 30px rgba(24, 200, 255, 0.14);
}

.chat-message.user .chat-avatar {
  color: #ffffff;
  background: linear-gradient(135deg, #334155, #6366f1);
}

.chat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-bubble {
  width: fit-content;
  max-width: 100%;
  min-width: min(560px, 100%);
  padding: 18px 20px;
  color: #dce4ef;
  line-height: 1.85;
  font-size: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.chat-message.user .chat-bubble {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.18), rgba(99, 102, 241, 0.2));
  border-color: rgba(24, 200, 255, 0.15);
}

.chat-markdown {
  display: grid;
  gap: 10px;
}

.chat-markdown p {
  margin: 0;
}

.chat-markdown h3,
.chat-markdown h4 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
}

.chat-markdown ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
}

.chat-markdown li {
  padding-left: 2px;
}

.chat-markdown strong {
  color: #ffffff;
  font-weight: 950;
}

.chat-markdown code {
  padding: 2px 6px;
  color: #dffaff;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.chat-markdown hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

.chat-meta {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  color: var(--weak);
  font-size: 12px;
}

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

/* 图片大画布 */

.image-workspace {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 200, 255, 0.055), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.045), transparent 32%),
    rgba(4, 7, 13, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.image-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.image-stage-head span {
  display: block;
  color: var(--weak);
  font-size: 12px;
}

.image-stage-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 20px;
}

.image-stage-head p {
  margin: 6px 0 0;
  color: var(--weak);
  font-size: 13px;
}

.image-stage-head .image-expire-warning {
  display: inline-flex;
  align-items: center;
  max-width: min(760px, 100%);
  margin-top: 8px;
  padding: 7px 10px;
  color: #ffd15c;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  background: rgba(247, 181, 0, 0.10);
  border: 1px solid rgba(247, 181, 0, 0.26);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(247, 181, 0, 0.05) inset;
}

.image-stage-head button {
  height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.image-empty-stage {
  height: calc(100% - 74px);
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto;
  color: var(--brand);
  font-size: 30px;
  background: rgba(24, 200, 255, 0.08);
  border: 1px solid rgba(24, 200, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 0 38px rgba(24, 200, 255, 0.12);
}

.image-empty-stage strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 18px;
}

.image-empty-stage p {
  margin: 8px 0 0;
  color: var(--weak);
  font-size: 13px;
}

.large-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
  max-height: calc(100% - 86px);
  overflow-y: auto;
  padding-right: 4px;
}

.large-result-item {
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.fake-image {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.1), rgba(124, 58, 237, 0.1)),
    #0b1020;
}

.fake-image span {
  padding: 7px 10px;
  color: var(--brand);
  background: rgba(24, 200, 255, 0.08);
  border-radius: 999px;
}

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

.result-item-foot strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.result-item-foot span {
  display: block;
  margin-top: 3px;
  color: var(--weak);
  font-size: 11px;
}

.result-item-foot button {
  height: 28px;
  padding: 0 10px;
  color: var(--brand);
  background: rgba(24, 200, 255, 0.08);
  border-radius: 9px;
}

/* 底部输入控制台：画布式输入区 */

.composer {
  width: min(1120px, calc(100% - 16px));
  margin: 12px auto 0;
  position: relative;
}

.canvas-composer {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.canvas-composer::before {
  display: none;
}

.composer-surface {
  position: relative;
  min-height: 214px;
  padding: 20px 18px 16px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 15%, rgba(24, 200, 255, 0.10), transparent 26%),
    radial-gradient(circle at 10% 100%, rgba(160, 92, 255, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(18, 25, 39, 0.96), rgba(12, 18, 30, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow:
    0 24px 74px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.composer-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.18), transparent 62%);
}

.composer-surface textarea {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-height: 126px;
  max-height: 220px;
  resize: vertical;
  padding: 0 56px 14px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  background: transparent;
  border: 0;
  outline: none;
}

.composer-surface textarea::placeholder {
  color: rgba(155, 168, 190, 0.82);
}

.send-floating {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #03111a;
  font-size: 22px;
  font-weight: 1000;
  line-height: 1;
  border-radius: 999px;
  background: linear-gradient(135deg, #17d4ff, #64ecff);
  box-shadow:
    0 14px 32px rgba(24, 200, 255, 0.24),
    inset 0 1px 0 rgba(255,255,255,0.42);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.send-floating:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 38px rgba(24, 200, 255, 0.30),
    inset 0 1px 0 rgba(255,255,255,0.50);
}

.composer-glassbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.composer-pills {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 52px;
}

.model-pill,
.select-pill,
.count-pill,
.tool-pill,
.cost-pill {
  min-height: 34px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 4px 10px 4px 5px;
}

.model-pill-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
}

.model-pill-text {
  min-width: 0;
}

.model-pill-text span,
.select-pill span,
.count-pill > span,
.cost-pill span {
  display: block;
  margin-bottom: 2px;
  color: rgba(155, 168, 190, 0.76);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.model-pill-text strong {
  display: block;
  max-width: 132px;
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-pill {
  display: grid;
  align-items: center;
  min-width: 118px;
  max-width: 236px;
  padding: 5px 10px 5px 11px;
}

.channel-pill {
  min-width: 210px;
  max-width: 282px;
}

.small-pill {
  min-width: 108px;
  max-width: 172px;
}

.select-pill select {
  width: 100%;
  min-width: 0;
  padding: 0 16px 0 0;
  color: rgba(244, 248, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  background: transparent;
  border: 0;
  outline: none;
  cursor: pointer;
}

.select-pill option {
  color: #0f172a;
}

.count-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 10px;
}

.count-pill > span {
  margin: 0;
}

.count-pill > div {
  display: flex;
  gap: 5px;
}

.count-pill button {
  width: 25px;
  height: 22px;
  color: rgba(155, 168, 190, 0.86);
  font-size: 12px;
  font-weight: 950;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
}

.count-pill button.active {
  color: #03111a;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  color: rgba(209, 218, 233, 0.88);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.tool-pill:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
}

.upload-pill {
  color: #f7dd91;
  background: rgba(247, 181, 0, 0.08);
  border-color: rgba(247, 181, 0, 0.20);
}

.subtle-pill {
  color: rgba(155, 168, 190, 0.72);
}

.cost-pill {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 7px 13px;
  text-align: right;
  background: rgba(247, 181, 0, 0.07);
  border-color: rgba(247, 181, 0, 0.20);
}

.cost-pill strong {
  display: block;
  color: var(--gold);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.1;
  white-space: nowrap;
}

/* 兼容旧类名，避免局部模板复用时样式丢失 */
.composer-controlbar,
.composer-bottom,
.composer-tools,
.control-left,
.control-model,
.control-block,
.count-switch,
.control-cost,
.generate-btn {
  /* 这些类在新版输入区已不再使用，保留空规则防止历史缓存样式穿透 */
}

/* 任务抽屉 */

.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.task-drawer {
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  padding: 22px;
  background: #0b1020;
  border-left: 1px solid var(--line);
  box-shadow: -26px 0 80px rgba(0, 0, 0, 0.5);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.drawer-head p {
  margin: 6px 0 0;
  color: var(--weak);
  font-size: 13px;
}

.drawer-head button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.task-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.task-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.task-item span {
  display: block;
  margin-top: 5px;
  color: var(--weak);
  font-size: 12px;
}

.task-item em {
  flex: 0 0 auto;
  padding: 5px 8px;
  font-style: normal;
  font-size: 12px;
  border-radius: 999px;
}

.task-item em.done {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.task-item em.running {
  color: var(--brand);
  background: rgba(24, 200, 255, 0.1);
}

.task-item em.failed {
  color: var(--orange);
  background: rgba(245, 158, 11, 0.1);
}

/* 响应式 */

@media (max-width: 1200px) {
  .achu-page {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .composer-controlbar {
    align-items: stretch;
    flex-direction: column;
  }

  .control-cost {
    text-align: left;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .achu-page {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .achu-sidebar {
    height: auto;
  }

  .model-list {
    max-height: 360px;
  }

  .achu-main {
    display: block;
    height: auto;
    min-height: auto;
    padding: 0 14px 16px;
    overflow: visible;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 0;
  }

  .topbar-right {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workbench {
    display: block;
    padding-top: 16px;
  }

  .center-panel {
    overflow: visible;
  }

  .workspace-topline {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .history-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 32px));
  }

  .chat-workspace,
  .image-workspace {
    min-height: 420px;
  }

  .chat-stream {
    padding: 20px 16px 28px;
  }

  .chat-message,
  .chat-message.user {
    display: flex;
    gap: 10px;
  }

  .chat-message.user {
    flex-direction: row-reverse;
  }

  .chat-bubble {
    min-width: 0;
    max-width: 84%;
  }

  .image-stage-head {
    flex-direction: column;
  }

  .composer {
    width: 100%;
  }

  .control-left {
    align-items: stretch;
    flex-direction: column;
  }

  .control-model,
  .control-block,
  .count-switch,
  .tool-btn,
  .control-cost {
    width: 100%;
  }

  .composer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .generate-btn {
    width: 100%;
  }
}
/* APIKEY 设置弹窗 */

.balance-pill {
  cursor: pointer;
}

.balance-pill.loading {
  opacity: 0.72;
  pointer-events: none;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.api-key-modal {
  width: min(460px, 100%);
  padding: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(24, 200, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(18, 25, 38, 0.98), rgba(10, 15, 26, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.api-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.api-modal-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.api-modal-head p {
  margin: 7px 0 0;
  color: var(--weak);
  font-size: 13px;
  line-height: 1.6;
}

.api-modal-head button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 18px;
}

.api-key-field {
  display: block;
}

.api-key-field span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.api-key-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(2, 6, 14, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.09);
  outline: none;
  border-radius: 13px;
}

.api-key-field input:focus {
  border-color: rgba(24, 200, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(24, 200, 255, 0.09);
}

.api-key-field input::placeholder {
  color: var(--weak);
}

.api-key-tip {
  margin-top: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.api-key-tip strong {
  color: var(--brand);
}

.api-key-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.api-key-actions button {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  border-radius: 12px;
}

.api-key-actions .danger {
  margin-right: auto;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.1);
}

.api-key-actions .ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.api-key-actions .primary {
  color: #061018;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
}

@media (max-width: 820px) {
  .api-key-actions {
    flex-direction: column;
  }

  .api-key-actions button,
  .api-key-actions .danger {
    width: 100%;
    margin-right: 0;
  }
}

/* 输入控制台细化：参考图入框、成本右上角、胶囊控件更轻 */
.composer {
  width: min(1120px, calc(100% - 18px));
  margin-top: 10px;
}

.composer-surface {
  min-height: 178px;
  padding: 16px 16px 13px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(24, 200, 255, 0.075), transparent 28%),
    radial-gradient(circle at 8% 100%, rgba(142, 92, 255, 0.085), transparent 28%),
    linear-gradient(180deg, rgba(19, 23, 33, 0.965), rgba(13, 17, 27, 0.99));
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.052);
}

.composer-surface::before {
  opacity: 0.62;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.16), transparent 58%);
}

.composer-surface textarea {
  min-height: 90px;
  max-height: 190px;
  padding: 0 64px 10px 0;
  font-size: 15px;
  line-height: 1.75;
}

.composer-surface.has-reference-inside textarea {
  padding-top: 42px;
}

.reference-inside-btn {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 14px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px 0 9px;
  color: #f7d98c;
  border-radius: 11px;
  border: 1px solid rgba(247, 181, 0, 0.28);
  background: rgba(247, 181, 0, 0.085);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
}

.reference-inside-btn span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: #15110a;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd96a, #ffb800);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
}

.reference-inside-btn strong {
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.cost-mini-badge {
  position: absolute;
  z-index: 4;
  top: 13px;
  right: 16px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(247, 181, 0, 0.18);
  background: rgba(247, 181, 0, 0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.045);
  backdrop-filter: blur(16px);
}

.cost-mini-badge span {
  color: rgba(247, 181, 0, 0.64);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.cost-mini-badge strong {
  color: var(--gold);
  font-size: 12px;
  font-weight: 1000;
  white-space: nowrap;
}

.composer-glassbar {
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top-color: rgba(255, 255, 255, 0.046);
}

.composer-pills {
  width: 100%;
  gap: 7px;
  padding-right: 56px;
  align-items: center;
}

.model-pill,
.select-pill,
.count-pill,
.tool-pill {
  min-height: 31px;
  border-radius: 11px;
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.052);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.044);
}

.model-pill {
  max-width: 166px;
  height: 31px;
  padding: 3px 9px 3px 4px;
  gap: 7px;
}

.model-pill-icon {
  width: 23px;
  height: 23px;
  border-radius: 9px;
  font-size: 11px;
}

.model-pill-text span {
  display: none;
}

.model-pill-text strong {
  max-width: 112px;
  font-size: 12px;
}

.select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: unset;
  max-width: unset;
  height: 31px;
  padding: 0 25px 0 10px;
}

.select-pill::after {
  content: "⌄";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-52%);
  color: rgba(210, 221, 239, 0.64);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
}

.channel-pill {
  width: min(270px, 28vw);
}

.small-pill {
  width: 96px;
}

.select-pill span,
.count-pill > span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin: 0;
  color: rgba(155, 168, 190, 0.72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.select-pill select {
  height: 100%;
  min-width: 0;
  padding: 0;
  color: rgba(244, 248, 255, 0.94);
  font-size: 12px;
  font-weight: 950;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.count-pill {
  height: 31px;
  gap: 8px;
  padding: 0 8px 0 10px;
}

.count-pill > div {
  gap: 4px;
}

.count-pill button {
  width: 23px;
  height: 21px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.tool-pill {
  height: 31px;
  padding: 0 11px;
  border-radius: 11px;
  font-size: 12px;
}

.subtle-pill {
  padding: 0 10px;
  color: rgba(155, 168, 190, 0.70);
}

.send-floating {
  right: 18px;
  bottom: 18px;
  width: 38px;
  height: 38px;
  font-size: 21px;
}

@media (max-width: 860px) {
  .composer-surface {
    min-height: 190px;
  }

  .cost-mini-badge {
    right: 13px;
    top: 12px;
  }

  .channel-pill {
    width: min(100%, 290px);
  }

  .small-pill {
    width: 94px;
  }
}

@media (max-width: 640px) {
  .composer-surface {
    padding: 14px 13px 12px;
  }

  .composer-surface textarea {
    min-height: 94px;
    padding-right: 0;
  }

  .composer-surface.has-reference-inside textarea {
    padding-top: 40px;
  }

  .reference-inside-btn {
    left: 13px;
    top: 12px;
  }

  .cost-mini-badge {
    position: relative;
    top: auto;
    right: auto;
    margin-left: auto;
    margin-bottom: 8px;
    width: fit-content;
  }

  .composer-glassbar {
    padding-top: 8px;
  }

  .composer-pills {
    padding-right: 0;
  }

  .model-pill,
  .channel-pill,
  .small-pill,
  .count-pill,
  .tool-pill {
    width: 100%;
    max-width: none;
  }

  .send-floating {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 38px;
    margin-top: 8px;
    border-radius: 13px;
  }
}

/* 高级版输入控制台：无表单感玻璃输入画布 */
.premium-composer {
  width: min(1120px, calc(100% - 18px));
  margin: 12px auto 0;
  position: relative;
}

.premium-composer .premium-composer-surface {
  position: relative;
  min-height: 216px;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 13px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 86% 10%, rgba(48, 214, 255, 0.10), transparent 24%),
    radial-gradient(circle at 18% 115%, rgba(132, 77, 255, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(20, 22, 31, 0.92), rgba(9, 12, 20, 0.965));
  border: 1px solid rgba(149, 171, 205, 0.16);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.50),
    0 0 0 1px rgba(255, 255, 255, 0.025) inset,
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(22px);
}

.premium-composer .premium-composer-surface::before {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 27px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.09), transparent 28%, transparent 68%, rgba(24,200,255,0.055)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.075), transparent 28%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), rgba(0,0,0,0.12) 58%, transparent);
}

.premium-composer .premium-composer-surface::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 64px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(154, 170, 204, 0.14), transparent);
}

.composer-topline {
  position: relative;
  z-index: 3;
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-spacer {
  flex: 1 1 auto;
}

.attachment-chip,
.price-corner {
  height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
  backdrop-filter: blur(18px);
}

.attachment-chip {
  gap: 8px;
  padding: 0 12px 0 8px;
  color: rgba(236, 225, 199, 0.94);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.attachment-chip:hover {
  color: #fff5d9;
  border-color: rgba(247, 181, 0, 0.32);
  background: rgba(247, 181, 0, 0.085);
}

.attachment-plus {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #171207;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe28a, #ffb800);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(247, 181, 0, 0.18);
}

.price-corner {
  gap: 6px;
  padding: 0 11px;
  color: var(--gold);
  border-color: rgba(247, 181, 0, 0.16);
  background: rgba(247, 181, 0, 0.055);
}

.price-corner span {
  font-size: 12px;
  line-height: 1;
}

.price-corner strong {
  max-width: 160px;
  overflow: hidden;
  color: rgba(247, 181, 0, 0.96);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-prompt-input {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 112px;
  margin: 4px 0 10px;
  padding: 6px 62px 10px 4px;
  resize: none;
  color: rgba(247, 250, 255, 0.96);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  background: transparent;
  border: 0;
  outline: none;
  box-shadow: none;
}

.premium-prompt-input::placeholder {
  color: rgba(147, 162, 187, 0.68);
}

.premium-composer-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.premium-pill-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 4px;
}

.premium-model-chip,
.premium-select-chip,
.premium-count-chip,
.premium-action-chip {
  height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(150, 166, 198, 0.12);
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.052),
    0 8px 22px rgba(0,0,0,0.12);
  backdrop-filter: blur(18px);
}

.premium-model-chip {
  max-width: 188px;
  gap: 8px;
  padding: 0 12px 0 6px;
}

.premium-model-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 8px 18px rgba(0,0,0,0.20);
}

.premium-model-chip div:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.premium-model-chip span,
.premium-count-chip span {
  color: rgba(149, 164, 190, 0.78);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.premium-model-chip strong {
  max-width: 126px;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.94);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-select-chip {
  position: relative;
  gap: 7px;
  padding: 0 13px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.premium-select-chip:hover,
.premium-model-chip:hover,
.premium-count-chip:hover,
.premium-action-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 200, 255, 0.22);
  background: rgba(255, 255, 255, 0.075);
}

.disabled-action,
.disabled-action:hover {
  cursor: default;
  opacity: 0.72;
  transform: none;
  color: rgba(203, 213, 225, 0.78);
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(150, 166, 198, 0.08);
}

.premium-select-chip::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 1px;
  border-right: 1.5px solid rgba(221, 231, 247, 0.66);
  border-bottom: 1.5px solid rgba(221, 231, 247, 0.66);
  transform: rotate(45deg) translateY(-2px);
  flex: 0 0 auto;
}

.premium-select-chip select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
}

.chip-symbol {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #dcb66a;
  border-radius: 999px;
  background: rgba(247, 181, 0, 0.11);
  font-size: 11px;
  font-weight: 1000;
}

.premium-select-chip strong {
  max-width: 160px;
  overflow: hidden;
  color: rgba(249, 251, 255, 0.94);
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-select-chip em {
  max-width: 120px;
  overflow: hidden;
  color: rgba(147, 162, 187, 0.74);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-channel-chip {
  max-width: 292px;
}

.compact-select-chip {
  min-width: 92px;
  padding-right: 12px;
}

.compact-select-chip strong {
  max-width: 72px;
}

.compact-select-chip em {
  max-width: 34px;
}

.premium-count-chip {
  gap: 7px;
  padding: 0 7px 0 11px;
}

.premium-count-chip button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: rgba(194, 207, 228, 0.72);
  font-size: 11px;
  font-weight: 950;
  border-radius: 999px;
  background: transparent;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.premium-count-chip button.active {
  color: #02121b;
  background: linear-gradient(135deg, #24d7ff, #62eeff);
  box-shadow: 0 8px 18px rgba(24, 200, 255, 0.20);
}

.premium-action-chip {
  padding: 0 13px;
  color: rgba(222, 231, 246, 0.84);
  font-size: 12px;
  font-weight: 900;
}

.muted-action {
  color: rgba(147, 162, 187, 0.72);
}

.premium-send-button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #031119;
  font-size: 22px;
  font-weight: 1000;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.62), transparent 28%),
    linear-gradient(135deg, #18d3ff, #62ecff);
  box-shadow:
    0 16px 34px rgba(24, 200, 255, 0.26),
    0 0 0 1px rgba(255,255,255,0.20) inset;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.premium-send-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 20px 42px rgba(24, 200, 255, 0.34),
    0 0 0 1px rgba(255,255,255,0.25) inset;
}

.is-chat-composer .premium-prompt-input {
  min-height: 110px;
}

@media (max-width: 980px) {
  .premium-composer .premium-composer-surface {
    min-height: 238px;
  }

  .premium-composer-footer {
    align-items: flex-end;
  }

  .premium-pill-row {
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  .premium-composer {
    width: calc(100% - 12px);
    margin-top: 8px;
  }

  .premium-composer .premium-composer-surface {
    min-height: 258px;
    padding: 12px;
    border-radius: 22px;
  }

  .premium-composer .premium-composer-surface::before {
    border-radius: 21px;
  }

  .composer-topline {
    align-items: flex-start;
  }

  .price-corner strong {
    max-width: 110px;
  }

  .premium-prompt-input {
    min-height: 106px;
    padding-right: 4px;
  }

  .premium-composer-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .premium-pill-row {
    gap: 7px;
  }

  .premium-model-chip,
  .premium-channel-chip,
  .compact-select-chip,
  .premium-count-chip,
  .premium-action-chip {
    max-width: none;
    width: 100%;
  }

  .premium-select-chip strong,
  .premium-select-chip em,
  .premium-model-chip strong {
    max-width: none;
  }

  .premium-send-button {
    width: 100%;
    height: 42px;
    border-radius: 16px;
  }
}

/* 高级自定义下拉：彻底替换浏览器原生 select 弹层 */
.premium-composer .premium-composer-surface {
  overflow: visible;
}

.premium-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 30;
}

.premium-dropdown-wrap:has(.premium-dropdown-panel) {
  z-index: 80;
}

.premium-select-chip {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(150, 166, 198, 0.12);
  color: inherit;
}

.premium-select-chip.active {
  border-color: rgba(247, 181, 0, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.045)),
    rgba(247, 181, 0, 0.065);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.20),
    0 0 0 1px rgba(247, 181, 0, 0.08) inset;
}

.premium-select-chip.active::after {
  border-color: rgba(255, 218, 143, 0.88);
  transform: rotate(225deg) translate(-2px, -1px);
}

.premium-select-chip select {
  display: none !important;
}

.premium-dropdown-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 11px);
  width: max-content;
  min-width: 236px;
  max-width: min(420px, calc(100vw - 48px));
  max-height: 310px;
  padding: 8px;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid rgba(161, 178, 216, 0.16);
  background:
    radial-gradient(circle at 15% 0%, rgba(24, 200, 255, 0.09), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(247, 181, 0, 0.07), transparent 30%),
    linear-gradient(180deg, rgba(24, 27, 38, 0.98), rgba(12, 15, 24, 0.985));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255,255,255,0.035) inset,
    0 1px 0 rgba(255,255,255,0.08) inset;
  backdrop-filter: blur(24px);
  animation: premiumDropdownIn 0.16s ease-out;
}

.channel-dropdown-panel {
  min-width: 330px;
}

.compact-dropdown-panel {
  min-width: 188px;
}

.premium-dropdown-panel::-webkit-scrollbar {
  width: 7px;
}

.premium-dropdown-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.035);
  border-radius: 999px;
}

.premium-dropdown-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 164, 194, 0.24);
  border-radius: 999px;
}

.premium-dropdown-title {
  padding: 6px 8px 8px;
  color: rgba(148, 164, 194, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.premium-dropdown-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 13px;
  color: rgba(231, 238, 250, 0.88);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.premium-dropdown-option:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 200, 255, 0.16);
  background: rgba(255, 255, 255, 0.058);
}

.premium-dropdown-option.active {
  border-color: rgba(247, 181, 0, 0.24);
  background:
    linear-gradient(135deg, rgba(247, 181, 0, 0.16), rgba(24, 200, 255, 0.065));
  box-shadow: 0 10px 24px rgba(0,0,0,0.16), 0 0 0 1px rgba(247,181,0,0.05) inset;
}

.premium-dropdown-option span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.premium-dropdown-option strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(250, 252, 255, 0.95);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-dropdown-option em {
  min-width: 0;
  overflow: hidden;
  color: rgba(146, 163, 194, 0.78);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-dropdown-option b {
  color: rgba(247, 181, 0, 0.92);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.compact-dropdown-panel .premium-dropdown-option {
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr);
}

.compact-dropdown-panel .premium-dropdown-option strong {
  font-size: 12px;
}

@keyframes premiumDropdownIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .premium-dropdown-wrap,
  .premium-dropdown-wrap .premium-select-chip {
    width: 100%;
  }

  .premium-dropdown-panel,
  .channel-dropdown-panel,
  .compact-dropdown-panel {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* 渠道浮层信息增强：对话模型输入/输出分两行，图片模型显示规格与返还规则 */
.price-corner.is-chat-price {
  height: auto;
  min-height: 34px;
  padding: 5px 10px;
  align-items: flex-start;
}

.price-corner-lines {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-corner.is-chat-price .price-corner-lines strong {
  max-width: 190px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
}

.price-corner-lines i,
.price-corner-lines em {
  font-style: normal;
}

.price-corner-lines i {
  color: rgba(247, 181, 0, 0.72);
  font-weight: 950;
}

.price-corner-lines em {
  min-width: 0;
  overflow: hidden;
  color: rgba(247, 181, 0, 0.96);
  text-overflow: ellipsis;
}

.channel-dropdown-panel {
  min-width: 370px;
}

.premium-dropdown-option {
  min-height: 58px;
  align-items: start;
}

.premium-dropdown-option .premium-option-main {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-top: 1px;
}

.premium-dropdown-option .premium-option-side {
  min-width: 148px;
  display: grid;
  justify-items: end;
  gap: 4px;
  color: rgba(148, 164, 194, 0.78);
}

.premium-option-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: end;
  gap: 6px;
  max-width: 190px;
  font-size: 10px;
  line-height: 1.18;
  white-space: nowrap;
}

.premium-option-line i,
.premium-option-line em {
  font-style: normal;
}

.premium-option-line i {
  color: rgba(148, 164, 194, 0.68);
  font-weight: 900;
}

.premium-option-line em {
  min-width: 0;
  overflow: hidden;
  color: rgba(194, 207, 232, 0.86);
  font-weight: 850;
  text-overflow: ellipsis;
}

.premium-dropdown-option.active .premium-option-line em {
  color: rgba(255, 234, 174, 0.94);
}

.premium-dropdown-option .premium-option-side b {
  font-size: 10px;
  line-height: 1.1;
}

@media (max-width: 640px) {
  .channel-dropdown-panel {
    min-width: min(340px, calc(100vw - 40px));
  }

  .premium-dropdown-option {
    grid-template-columns: minmax(0, 1fr);
  }

  .premium-dropdown-option .premium-option-side {
    min-width: 0;
    justify-items: start;
  }

  .premium-option-line {
    justify-items: start;
    max-width: 100%;
  }
}

/* Step 2：对话模型真实发送 + 图片分析附件 */
.composer-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.composer-attachment-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 2px;
}

.composer-attachment-list {
  min-width: 0;
  max-width: min(100%, 520px);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.composer-attachment-list::-webkit-scrollbar {
  height: 4px;
}

.composer-attachment-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
  border-radius: 999px;
}

.composer-attachment-item {
  position: relative;
  height: 48px;
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  display: grid;
  place-items: center;
  gap: 0;
  margin: 0;
  padding: 4px;
  overflow: visible;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
}

.composer-attachment-item img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.composer-attachment-item figcaption {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.composer-attachment-item strong {
  overflow: hidden;
  color: rgba(248, 250, 252, 0.92);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-attachment-item span {
  color: rgba(149, 164, 190, 0.78);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}


.composer-attachment-item button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fecaca;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.88);
  border: 1px solid rgba(248, 113, 113, 0.36);
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.86);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.composer-attachment-item:hover button {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.composer-attachment-item button:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
}

.attachment-status {
  flex: 0 0 auto;
  margin: 0;
  color: rgba(247, 181, 0, 0.78);
  font-size: 11px;
  font-weight: 850;
}

.chat-image-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}

.chat-message.user .chat-image-attachments {
  justify-content: flex-end;
}

.chat-image-attachments figure {
  width: 112px;
  margin: 0;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.055);
}

.chat-image-attachments img {
  display: block;
  width: 112px;
  height: 84px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.chat-image-attachments figcaption {
  overflow: hidden;
  padding: 6px 7px;
  color: rgba(203, 213, 225, 0.76);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-bubble.loading {
  color: rgba(203, 213, 225, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.026));
}

.chat-bubble.error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.20);
  background: rgba(248, 113, 113, 0.08);
}

.premium-send-button:disabled {
  cursor: not-allowed;
  color: rgba(148, 163, 184, 0.72);
  background: rgba(148, 163, 184, 0.18);
  box-shadow: none;
  transform: none;
}

.premium-send-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

@media (max-width: 640px) {
  .composer-attachment-row {
    align-items: stretch;
    flex-direction: column;
  }

  .composer-attachment-list {
    max-width: 100%;
  }

  .composer-attachment-item {
    width: 48px;
    max-width: 48px;
  }

  .attachment-status {
    flex: 1 1 auto;
  }
}

.real-image-list {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.real-image-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.real-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.real-image-card figcaption {
  padding: 8px;
  text-align: center;
}

.real-image-card a {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.image-task-state {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.image-task-state-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.image-task-state-main span {
  padding: 6px 10px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
  background: rgba(24, 200, 255, 0.08);
  border-radius: 999px;
}

.image-task-state em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.image-task-state p {
  max-width: 100%;
  margin: 0;
  color: var(--weak);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.image-task-state .image-task-error {
  padding: 9px 10px;
  color: var(--orange);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 12px;
}

.result-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.result-status.done {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
}

.result-status.running {
  color: var(--brand);
  background: rgba(24, 200, 255, 0.1);
}

.result-status.failed {
  color: var(--orange);
  background: rgba(245, 158, 11, 0.1);
}

.stored-image-placeholder {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

/* Chat Markdown renderer upgrade */
.chat-markdown {
  display: block;
  width: 100%;
  font-size: 14px;
  line-height: 1.82;
  word-break: break-word;
}

.chat-markdown > *:first-child {
  margin-top: 0;
}

.chat-markdown > *:last-child {
  margin-bottom: 0;
}

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

.chat-markdown h2,
.chat-markdown h3,
.chat-markdown h4 {
  margin: 18px 0 10px;
  color: #ffffff;
  font-weight: 950;
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.chat-markdown h2 {
  font-size: 19px;
}

.chat-markdown h3 {
  font-size: 17px;
}

.chat-markdown h4 {
  font-size: 15px;
}

.chat-markdown ul,
.chat-markdown ol {
  display: grid;
  gap: 7px;
  margin: 0 0 13px;
  padding-left: 24px;
}

.chat-markdown li {
  margin: 0;
  padding-left: 3px;
}

.chat-markdown li::marker {
  color: rgba(132, 231, 255, 0.9);
  font-weight: 900;
}

.chat-markdown strong {
  color: #ffffff;
  font-weight: 950;
}

.chat-markdown em {
  color: rgba(235, 246, 255, 0.94);
  font-style: italic;
}

.chat-markdown del {
  color: rgba(226, 232, 240, 0.72);
}

.chat-markdown a {
  color: #84e7ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(132, 231, 255, 0.38);
}

.chat-markdown a:hover {
  border-bottom-color: rgba(132, 231, 255, 0.85);
}

.chat-markdown code {
  padding: 2px 6px;
  color: #dffaff;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.chat-markdown pre {
  margin: 0 0 14px;
  padding: 13px 14px;
  overflow: auto;
  color: #e6f8ff;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.chat-markdown pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  white-space: pre-wrap;
  line-height: 1.72;
}

.chat-markdown blockquote {
  margin: 0 0 14px;
  padding: 10px 13px;
  color: rgba(226, 232, 240, 0.92);
  background: rgba(15, 23, 42, 0.26);
  border-left: 3px solid rgba(132, 231, 255, 0.72);
  border-radius: 12px;
}

.chat-markdown blockquote p {
  margin: 0 0 8px;
}

.chat-markdown blockquote p:last-child {
  margin-bottom: 0;
}

.chat-markdown hr {
  width: 100%;
  height: 1px;
  margin: 16px 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

.chat-table-wrap {
  width: 100%;
  margin: 0 0 14px;
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.24);
}

.chat-markdown table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}

.chat-markdown th,
.chat-markdown td {
  padding: 9px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  text-align: left;
  vertical-align: top;
}

.chat-markdown th {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.34);
  font-weight: 950;
}

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

.chat-message.user .chat-markdown {
  color: #ffffff;
}

.chat-message.user .chat-markdown pre,
.chat-message.user .chat-markdown blockquote,
.chat-message.user .chat-table-wrap {
  background: rgba(2, 6, 23, 0.18);
}

/* Streaming reply cursor */
.chat-markdown {
  overflow-x: auto;
}

.chat-bubble.loading .chat-markdown > *:last-child::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 3px;
  border-radius: 999px;
  background: currentColor;
  vertical-align: -0.12em;
  animation: chatStreamingCursor 0.9s steps(2, start) infinite;
}

@keyframes chatStreamingCursor {
  0%, 45% { opacity: 0.95; }
  46%, 100% { opacity: 0; }
}

/* Layout clarity pass: lighter workspace, split header actions, message operations */
.achu-main {
  grid-template-rows: 64px minmax(0, 1fr) auto;
  padding: 0 20px 14px;
}

.topbar {
  min-height: 64px;
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

.topbar-left h1 {
  font-size: 18px;
}

.topbar-left p {
  margin-top: 3px;
  opacity: 0.8;
}

.topbar-right {
  gap: 8px;
}

.balance-pill,
.top-btn {
  height: 34px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow: none;
}

.charge-btn {
  height: 34px;
  box-shadow: 0 10px 22px rgba(247, 181, 0, 0.16);
}

.workbench {
  padding-top: 10px;
}

.workspace-topline {
  height: auto;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 0 2px;
}

.workspace-model-copy {
  min-width: 0;
}

.workspace-model-copy strong {
  display: block;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
}

.workspace-model-copy span {
  display: block;
  color: rgba(154, 170, 204, 0.82);
  font-size: 12px;
  line-height: 1.25;
}

.mini-model-icon {
  width: 34px;
  height: 34px;
  border-radius: 13px;
}

.workspace-actions {
  gap: 8px;
}

.new-conversation-btn,
.ghost-action {
  height: 34px;
  border-radius: 11px;
}

.new-conversation-btn {
  padding: 0 13px;
  box-shadow: 0 10px 22px rgba(24, 200, 255, 0.15);
}

.ghost-action {
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.032);
  border-color: rgba(255, 255, 255, 0.07);
}

.ghost-action.active,
.ghost-action:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.13);
}

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

.chat-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
  min-width: 156px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(15, 18, 29, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.chat-more-menu button {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  color: rgba(226, 232, 240, 0.88);
  font-size: 13px;
  border-radius: 10px;
  background: transparent;
}

.chat-more-menu button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.chat-more-menu button.danger {
  color: rgba(255, 163, 163, 0.95);
}

.chat-workspace {
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 8%, rgba(24, 200, 255, 0.035), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(124, 58, 237, 0.035), transparent 30%),
    rgba(4, 7, 13, 0.22);
}

.chat-workspace::before {
  border-color: rgba(255, 255, 255, 0.04);
}

.chat-stream {
  padding: 26px 30px 34px;
}

.chat-message {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 13px;
  width: min(1040px, 100%);
  margin-bottom: 22px;
}

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

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(24, 200, 255, 0.10);
}

.chat-bubble {
  min-width: 0;
  max-width: min(920px, 100%);
  padding: 17px 19px;
  background: rgba(255, 255, 255, 0.038);
  border-color: rgba(255, 255, 255, 0.058);
  border-radius: 20px;
  box-shadow: none;
}

.chat-message.assistant .chat-bubble {
  width: min(920px, 100%);
}

.chat-message.user .chat-bubble {
  max-width: min(680px, 100%);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.09);
}

.chat-meta {
  margin-top: 7px;
  color: rgba(154, 170, 204, 0.68);
}

.chat-message-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.chat-message-actions button {
  height: 28px;
  padding: 0 10px;
  color: rgba(203, 213, 225, 0.82);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-message-actions button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.14);
}

.chat-message-actions button.danger {
  color: rgba(255, 163, 163, 0.9);
}

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

.chat-code-block {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
}

.chat-code-head {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 0 13px;
  color: rgba(203, 213, 225, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.58);
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.chat-code-copy {
  height: 24px;
  padding: 0 9px;
  color: rgba(226, 232, 240, 0.86);
  font-family: inherit;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.chat-code-copy:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.chat-markdown .chat-code-block pre {
  margin: 0;
  padding: 14px 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-markdown .chat-code-block pre code {
  white-space: pre;
}

.premium-composer {
  margin-top: 10px;
}

.premium-composer .premium-composer-surface {
  min-height: 190px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 10%, rgba(48, 214, 255, 0.075), transparent 24%),
    radial-gradient(circle at 18% 115%, rgba(132, 77, 255, 0.08), transparent 28%),
    rgba(15, 18, 29, 0.84);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.premium-composer .premium-composer-surface::after {
  bottom: 56px;
}

.premium-prompt-input {
  min-height: 90px;
  margin-bottom: 8px;
}

.premium-action-chip.disabled-action {
  opacity: 0.76;
}

@media (max-width: 900px) {
  .workspace-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .chat-more-menu,
  .history-popover {
    right: 0;
  }
}

/* Header consolidation hotfix: remove the visual second title bar and persist a single-level header feel */
.topbar-left {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-left p {
  max-width: min(720px, 48vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.topbar-conversation-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.topbar-action-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
}

.topbar-conversation-actions .new-conversation-btn,
.topbar-conversation-actions .ghost-action {
  height: 32px;
  border-radius: 11px;
  font-size: 13px;
}

.topbar-conversation-actions .new-conversation-btn {
  padding: 0 12px;
  box-shadow: 0 8px 18px rgba(24, 200, 255, 0.13);
}

.topbar-conversation-actions .ghost-action {
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.065);
}

.topbar-popover {
  top: calc(100% + 14px);
  right: 0;
  left: auto;
}

.topbar-more-menu {
  top: calc(100% + 14px);
  right: 0;
  left: auto;
}

.workbench {
  padding-top: 12px;
}

.center-panel {
  justify-content: stretch;
}

.chat-workspace,
.image-workspace {
  flex: 1 1 auto;
}

@media (max-width: 1280px) {
  .topbar {
    gap: 12px;
  }

  .topbar-left p {
    max-width: 34vw;
  }

  .topbar-right {
    gap: 6px;
  }

  .top-btn {
    padding: 0 10px;
  }

  .balance-pill {
    padding: 0 10px;
  }
}

@media (max-width: 1080px) {
  .topbar {
    align-items: flex-start;
    min-height: 92px;
    padding: 10px 0;
    flex-direction: column;
  }

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

  .topbar-left p {
    max-width: 100%;
  }

  .topbar-right {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .topbar-right > * {
    flex: 0 0 auto;
  }
}

/* Workspace rail + compact model list + brand logos refinement */
.achu-main {
  grid-template-rows: 64px minmax(0, 1fr) auto;
  padding: 0 18px 14px;
}

.topbar {
  min-height: 64px;
  gap: 12px;
  border-bottom-color: rgba(255, 255, 255, 0.055);
}

.topbar-left h1 {
  font-size: 19px;
}

.topbar-left p {
  margin-top: 4px;
  max-width: min(820px, 56vw);
  font-size: 12px;
  opacity: 0.86;
}

.topbar-right {
  gap: 8px;
}

.balance-pill,
.top-btn,
.charge-btn {
  height: 34px;
  border-radius: 999px;
}

.top-btn {
  padding: 0 13px;
}

.charge-btn {
  padding: 0 16px;
  border: 0;
  cursor: pointer;
}

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

.global-more-trigger.active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.075);
}

.global-more-menu {
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  min-width: 160px;
}

.workbench {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding-top: 14px;
}

.workbench-rail {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding-top: 20px;
}

.rail-button {
  width: 48px;
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.rail-button span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.rail-button:hover,
.rail-button.active {
  color: var(--text);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.14);
}

.rail-button.primary {
  color: #061018;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(24, 200, 255, 0.16);
}

.rail-pop-wrap {
  position: relative;
}

.rail-popover {
  top: 0;
  right: auto;
  left: calc(100% + 14px);
}

.rail-more-menu {
  top: 0;
  right: auto;
  left: calc(100% + 14px);
  min-width: 168px;
}

.center-panel {
  width: min(1220px, 100%);
  margin: 0;
}

.chat-workspace,
.image-workspace {
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 200, 255, 0.045), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.04), transparent 32%),
    rgba(4, 7, 13, 0.26);
}

.chat-stream {
  padding: 28px 34px 38px;
}

/* brand logos */
.model-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #e0faff;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo-openai {
  color: #f8fafc;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(135deg, #0f172a, #334155);
}

.logo-openai-image {
  color: #e0f2fe;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #1e3a8a, #0891b2);
}

.logo-gemini {
  color: #ffffff;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, #312e81, #6366f1 58%, #22d3ee);
}

.logo-banana {
  color: #221500;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 32%),
    linear-gradient(135deg, #fde047, #f59e0b);
}

.logo-image,
.logo-ai {
  color: #e0faff;
  background: linear-gradient(135deg, #0e7490, #2563eb);
}

.model-logo.has-remote-logo {
  background-origin: content-box;
  padding: 5px;
  overflow: hidden;
}

.model-card .model-logo.has-remote-logo {
  padding: 4px;
}

/* compact left model cards */
.model-list {
  padding-right: 2px;
}

.model-card {
  min-height: 62px;
  gap: 10px;
  margin-bottom: 7px;
  padding: 9px 10px;
  border-radius: 14px;
}

.model-card.active {
  box-shadow:
    inset 2px 0 0 var(--brand),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.model-card .model-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 14px;
}

.model-card-head strong {
  font-size: 13px;
}

.model-card-head span {
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 7px;
}

.model-card p {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}

.model-card-meta {
  display: none;
}

/* chat avatar follows current model */
.chat-message.assistant > .model-logo,
.history-pop-open .model-logo {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.chat-message.user .user-avatar-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #334155, #6366f1);
  border-radius: 15px;
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.14);
}

.premium-model-chip .model-logo {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-size: 12px;
}

/* model empty state */
.model-empty-state {
  width: min(720px, 100%);
  margin: 76px auto 24px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.model-empty-state > .model-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 20px;
}

.model-empty-copy span {
  color: var(--weak);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.model-empty-copy h2 {
  margin: 4px 0 8px;
  color: #ffffff;
  font-size: 22px;
}

.model-empty-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.model-empty-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.model-empty-facts em {
  padding: 6px 9px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.model-empty-prompts {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.model-empty-prompts button {
  width: 100%;
  padding: 10px 12px;
  color: var(--muted);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
}

.model-empty-prompts button:hover {
  color: var(--text);
  border-color: rgba(24, 200, 255, 0.22);
  background: rgba(24, 200, 255, 0.065);
}

.image-empty-stage.model-empty-state {
  min-height: auto;
  place-items: initial;
  text-align: left;
}

.image-empty-stage.model-empty-state > div {
  max-width: none;
}

/* drawer scroll fix */
.task-drawer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-head {
  flex: 0 0 auto;
}

.task-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 18px;
}

.task-list::-webkit-scrollbar,
.chat-stream::-webkit-scrollbar,
.model-list::-webkit-scrollbar {
  width: 8px;
}

.task-list::-webkit-scrollbar-thumb,
.chat-stream::-webkit-scrollbar-thumb,
.model-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 1fr;
  }

  .workbench-rail {
    order: 2;
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 8px;
  }

  .center-panel {
    order: 1;
  }

  .rail-popover,
  .rail-more-menu {
    top: auto;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 760px) {
  .topbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .topbar-left p {
    max-width: 100%;
  }

  .model-empty-state {
    grid-template-columns: 1fr;
    margin-top: 32px;
    padding: 18px;
  }

  .history-popover {
    width: min(340px, calc(100vw - 32px));
  }
}

/* Billing + workspace alignment refinement */
.center-panel {
  width: min(1360px, 100%);
  max-width: 1360px;
  margin: 0 auto;
}

.chat-workspace,
.image-workspace {
  width: 100%;
}

.chat-stream {
  padding-left: clamp(30px, 4vw, 58px);
  padding-right: clamp(30px, 4vw, 58px);
}

.chat-message {
  width: min(1160px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.chat-bubble {
  max-width: min(1040px, 100%);
}

.composer {
  width: min(1180px, calc(100% - 16px));
  margin-left: auto;
  margin-right: auto;
}

/* Slightly taller model cards with visible colored cost hints */
.model-card {
  min-height: 72px;
  padding: 10px 11px;
  gap: 11px;
}

.model-card .model-logo {
  width: 36px;
  height: 36px;
}

.model-card p {
  margin-top: 4px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
}

.model-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 6px;
}

.model-card-meta em {
  min-width: 0;
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  color: rgba(168, 179, 201, 0.88);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.model-card-meta em:first-child {
  flex: 0 0 auto;
}

.model-card-meta em:nth-child(2) {
  flex: 1 1 auto;
  max-width: 100%;
  color: #ffd76a;
  border-color: rgba(250, 204, 21, 0.22);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.13), rgba(245, 158, 11, 0.07));
}

.cost-pill-line strong,
.cost-pill strong {
  color: #ffd76a;
}

/* 模型卡片积分：只显示价格，不显示渠道；对话模型上下两行 */
.model-card {
  min-height: 82px;
}

.model-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin-top: 6px;
}

.model-card-meta em,
.model-card-meta em:first-child,
.model-card-meta em:nth-child(2),
.model-card-price-line {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 17px;
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  color: #ffd76a;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(245, 158, 11, 0.06));
}
.result-item-info {
  min-width: 0;
}

.result-item-info strong,
.result-task-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-foot-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.result-foot-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.result-foot-actions button {
  height: 26px;
  padding: 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  background: rgba(24, 200, 255, 0.08);
  border: 1px solid rgba(24, 200, 255, 0.16);
  border-radius: 9px;
}

.result-foot-actions button:hover {
  color: var(--text);
  background: rgba(24, 200, 255, 0.13);
}

/* 生图结果卡片信息层级：原图链接 → 完整任务ID → 更长提示词 → 操作按钮 */
.large-result-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.result-item-body {
  display: grid;
  gap: 6px;
  padding: 10px 12px 6px;
}

.result-task-id {
  display: block;
  max-width: none;
  overflow: visible;
  color: rgba(148, 164, 194, 0.86);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
  word-break: break-all;
}

.result-prompt-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.result-attachment-count {
  display: block;
  color: var(--weak);
  font-size: 11px;
  line-height: 1.35;
}

.result-item-foot {
  align-items: flex-end;
  padding: 6px 12px 12px;
}

.result-foot-actions {
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .large-result-grid {
    grid-template-columns: 1fr;
  }

  .result-item-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-foot-actions {
    justify-content: flex-start;
  }
}

/* 生图任务流：一条任务一条记录，图片操作悬浮显示 */
.image-task-flow {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  max-height: calc(100% - 86px);
  overflow-y: auto;
  padding: 0 4px 4px 0;
}

.image-task-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(7, 11, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.image-task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.image-task-title-block {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.image-task-title-block strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-task-id {
  display: block;
  color: rgba(148, 164, 194, 0.9);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  word-break: break-all;
}

.image-task-side {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 7px;
}

.image-task-side span {
  color: rgba(148, 164, 194, 0.72);
  font-size: 11px;
}

.image-task-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.image-task-tags em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: rgba(205, 219, 241, 0.82);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
}

.image-task-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 240px));
  align-items: start;
  gap: 12px;
}

.image-result-figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 16px;
}

.image-result-task-id {
  display: block;
  padding: 7px 9px 8px;
  color: rgba(177, 194, 224, 0.82);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.45;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.028);
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.image-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.image-preview-trigger img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.image-result-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 34%, rgba(24, 200, 255, 0.15), transparent 30%),
    linear-gradient(135deg, rgba(24, 200, 255, 0.07), rgba(124, 58, 237, 0.065)),
    rgba(6, 11, 22, 0.72);
}

.image-result-placeholder-main {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.image-result-placeholder-main span {
  color: rgba(238, 248, 255, 0.92);
  font-size: 13px;
  font-weight: 950;
}

.image-result-placeholder-main strong {
  color: var(--brand);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.image-result-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.image-result-progress span {
  display: block;
  min-width: 3%;
  height: 100%;
  background: linear-gradient(90deg, rgba(24, 200, 255, 0.88), rgba(124, 58, 237, 0.9));
  border-radius: inherit;
  transition: width 0.45s ease;
}

.image-result-error {
  max-height: 72px;
  margin: 0;
  overflow: auto;
  color: var(--orange);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
  word-break: break-word;
}

.image-result-figure.is-error .image-result-placeholder {
  background:
    radial-gradient(circle at 50% 34%, rgba(245, 158, 11, 0.13), transparent 30%),
    rgba(245, 158, 11, 0.045);
}

.image-result-figure.is-error .image-result-placeholder-main strong,
.image-result-figure.is-error .image-result-placeholder-main span {
  color: var(--orange);
}

.image-result-figure:hover .image-preview-trigger img {
  transform: scale(1.025);
  filter: brightness(0.76);
}

.image-hover-tools {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.image-result-figure:hover .image-hover-tools {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.image-hover-tools button,
.image-task-actions button,
.image-preview-actions button {
  min-height: 28px;
  padding: 0 9px;
  color: rgba(238, 248, 255, 0.94);
  font-size: 11px;
  font-weight: 900;
  background: rgba(4, 7, 13, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  backdrop-filter: blur(12px);
}

.image-hover-tools button:hover,
.image-task-actions button:hover,
.image-preview-actions button:hover {
  color: #ffffff;
  background: rgba(24, 200, 255, 0.18);
  border-color: rgba(24, 200, 255, 0.35);
}

.image-hover-tools button.danger,
.image-task-actions button.danger {
  color: #ffc4b8;
}

.image-hover-tools button.danger:hover,
.image-task-actions button.danger:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.34);
}

.image-task-pending-state {
  min-height: 0;
  width: 100%;
  align-content: start;
  justify-items: start;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(24, 200, 255, 0.055), rgba(124, 58, 237, 0.045)),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
}

.image-task-pending-state.is-error {
  background: rgba(245, 158, 11, 0.045);
  border-color: rgba(245, 158, 11, 0.18);
}

.image-task-pending-state.is-error .image-task-state-main span {
  color: var(--orange);
  background: rgba(245, 158, 11, 0.1);
}

.image-task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.image-task-actions button {
  background: rgba(255, 255, 255, 0.055);
}

/* 图片大图预览 */
.image-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
}

.image-preview-modal {
  width: min(1080px, 96vw);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: rgba(8, 12, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.image-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.image-preview-head div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.image-preview-head strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.image-preview-head span {
  color: rgba(148, 164, 194, 0.82);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-all;
}

.image-preview-head button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
}

.image-preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 18px;
}

.image-preview-body img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 150px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.image-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.image-preview-actions span {
  margin-right: auto;
  color: rgba(148, 164, 194, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.composer-attachment-item img {
  object-fit: cover;
}

@media (max-width: 720px) {
  .image-task-card-head {
    flex-direction: column;
  }

  .image-task-side {
    justify-items: start;
  }

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

  .image-preview-mask {
    padding: 12px;
  }

  .image-preview-modal {
    width: 100%;
    max-height: 96vh;
    border-radius: 18px;
  }
}

/* Single workbench panel: keep the left rail and content in one scrollable surface */
.workbench {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(24, 200, 255, 0.045), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.04), transparent 32%),
    rgba(4, 7, 13, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.workbench::-webkit-scrollbar {
  width: 8px;
}

.workbench::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

.workbench-rail {
  position: sticky;
  top: 12px;
  align-self: start;
  min-height: auto;
  padding-top: 0;
}

.center-panel {
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow: visible;
}

.chat-workspace,
.image-workspace {
  width: 100%;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-workspace::before {
  display: none;
}

.chat-stream {
  height: auto;
  min-height: calc(100vh - 320px);
  overflow: visible;
  padding: 18px clamp(22px, 3.4vw, 48px) 28px;
}

.image-workspace {
  padding: 8px clamp(14px, 2.2vw, 28px) 26px;
}

.image-stage-head {
  padding-top: 4px;
}

.rail-popover,
.rail-more-menu {
  position: absolute;
  z-index: 80;
}

@media (max-width: 1180px) {
  .workbench {
    grid-template-columns: 1fr;
    overflow-y: auto;
    padding: 12px;
  }

  .workbench-rail {
    position: sticky;
    top: 0;
    z-index: 40;
    order: 0;
    flex-direction: row;
    justify-content: center;
    padding: 0 0 8px;
    background: linear-gradient(180deg, rgba(4, 7, 13, 0.92), rgba(4, 7, 13, 0));
  }

  .center-panel {
    order: 1;
  }
}

/* Chat stability controls */
.stream-toggle-chip {
  gap: 6px;
  padding: 0 13px;
  color: rgba(226, 232, 240, 0.8);
  cursor: pointer;
}

.stream-toggle-chip.active {
  color: #09111f;
  border-color: rgba(34, 211, 238, 0.42);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(56, 189, 248, 0.82));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.18);
}

.stream-toggle-chip:not(.active) {
  border-color: rgba(250, 204, 21, 0.26);
  background: rgba(250, 204, 21, 0.08);
  color: rgba(254, 240, 138, 0.92);
}

.stream-toggle-chip:hover {
  transform: translateY(-1px);
}

/* Safari / low tolerance WebKit fallback: reduce complex layer effects around scroll containers. */
.safari-stability-mode .workbench,
.safari-stability-mode .premium-composer-surface,
.safari-stability-mode .premium-model-chip,
.safari-stability-mode .premium-select-chip,
.safari-stability-mode .premium-count-chip,
.safari-stability-mode .premium-action-chip,
.safari-stability-mode .chat-more-menu,
.safari-stability-mode .history-popover,
.safari-stability-mode .modal-card,
.safari-stability-mode .image-preview-modal {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.safari-stability-mode .workbench-rail {
  position: static;
}

.safari-stability-mode .chat-bubble,
.safari-stability-mode .image-task-card,
.safari-stability-mode .premium-composer-surface {
  box-shadow: none;
}

/* Site API runtime config */
.brand-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-logo span {
  position: relative;
  z-index: 1;
}

.announcement-top-btn {
  gap: 7px;
}

.announcement-top-btn span {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #03111f;
  background: rgba(125, 211, 252, 0.96);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.announcement-mask {
  z-index: 70;
}

.announcement-modal {
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.12), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.1), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(6, 10, 20, 0.98));
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.62);
}

.announcement-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.announcement-modal-head span {
  display: inline-flex;
  margin-bottom: 8px;
  color: rgba(125, 211, 252, 0.86);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.announcement-modal-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.2;
}

.announcement-modal-head p {
  margin: 8px 0 0;
  max-width: 560px;
  color: rgba(203, 213, 225, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.announcement-modal-head button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  font-size: 19px;
  cursor: pointer;
}

.announcement-list {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 24px;
  display: grid;
  gap: 14px;
}

.announcement-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
}

.announcement-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(125, 211, 252, 0.82);
}

.announcement-card-warning::before {
  background: rgba(251, 191, 36, 0.9);
}

.announcement-card-error::before {
  background: rgba(248, 113, 113, 0.92);
}

.announcement-card-success::before {
  background: rgba(52, 211, 153, 0.9);
}

.announcement-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.announcement-card-meta span,
.announcement-card-meta em,
.announcement-card-meta time {
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.announcement-card-meta span {
  color: #082f49;
  background: rgba(125, 211, 252, 0.92);
  font-weight: 900;
}

.announcement-card h4 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
}

.announcement-card p {
  margin: 9px 0 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 13px;
  line-height: 1.75;
}

.announcement-detail-list {
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.announcement-detail-list li {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.24);
}

.announcement-detail-list strong {
  color: rgba(226, 232, 240, 0.92);
  font-size: 12px;
}

.announcement-detail-list span {
  color: rgba(148, 163, 184, 0.86);
  font-size: 12px;
  line-height: 1.6;
}

.announcement-card a {
  width: fit-content;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  color: rgba(125, 211, 252, 0.94);
  font-size: 13px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .announcement-modal {
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }

  .announcement-modal-head,
  .announcement-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .announcement-card {
    padding: 16px;
  }
}

/* API 文档入口占位页 */
.api-docs-workspace,
.product-placeholder-workspace {
  min-height: 0;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(90, 111, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(24, 200, 255, 0.12), transparent 32%),
    rgba(7, 11, 20, 0.70);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.24);
}

.api-docs-hero,
.product-placeholder-workspace {
  max-width: 780px;
}

.api-docs-hero span,
.product-placeholder-workspace span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 7px 10px;
  color: rgba(188, 201, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(132, 144, 255, 0.22);
  border-radius: 999px;
  background: rgba(92, 100, 255, 0.12);
}

.api-docs-hero h2,
.product-placeholder-workspace h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.api-docs-hero p,
.product-placeholder-workspace p,
.api-docs-note p,
.api-docs-grid p {
  margin: 12px 0 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 14px;
  line-height: 1.8;
}

.api-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 940px;
}

.api-docs-grid article,
.api-docs-note {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
}

.api-docs-grid strong,
.api-docs-note strong {
  color: var(--text);
  font-size: 15px;
}

.task-item.clickable {
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.task-item.clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 134, 255, 0.34);
  background: rgba(122, 134, 255, 0.08);
}

.image-task-card.highlighted {
  animation: achuTaskHighlight 1.8s ease;
  border-color: rgba(255, 217, 122, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 217, 122, 0.36), 0 22px 54px rgba(255, 184, 77, 0.14);
}

@keyframes achuTaskHighlight {
  0%, 100% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(-2px);
  }
}

@media (max-width: 720px) {
  .api-docs-grid {
    grid-template-columns: 1fr;
  }
}

/* 停止生成 / 取消任务 */
.premium-send-button.is-stop {
  width: auto;
  min-width: 72px;
  padding: 0 16px;
  color: #fff1f2;
  font-size: 13px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.22), transparent 30%),
    linear-gradient(135deg, rgba(244, 63, 94, 0.95), rgba(245, 158, 11, 0.88));
  box-shadow:
    0 16px 34px rgba(244, 63, 94, 0.22),
    0 0 0 1px rgba(255,255,255,0.16) inset;
}

.premium-send-button.is-stop:hover {
  box-shadow:
    0 20px 42px rgba(244, 63, 94, 0.30),
    0 0 0 1px rgba(255,255,255,0.22) inset;
}

.image-placeholder-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.image-placeholder-actions button {
  min-height: 28px;
  padding: 0 10px;
  color: rgba(238, 248, 255, 0.92);
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
}

.image-placeholder-actions button:hover {
  color: #fff;
  background: rgba(24, 200, 255, 0.16);
  border-color: rgba(24, 200, 255, 0.34);
}

.image-placeholder-actions button.danger {
  color: #ffc4b8;
}

.image-placeholder-actions button.danger:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.34);
}

.composer-upload-hint {
  position: relative;
  z-index: 3;
  margin: 8px 2px 0;
  color: rgba(149, 164, 190, 0.74);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.premium-composer .premium-composer-surface.is-drag-active {
  border-color: rgba(99, 176, 255, 0.4);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.50),
    0 0 0 1px rgba(99, 176, 255, 0.28) inset,
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.composer-drop-overlay {
  position: absolute;
  inset: 10px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 22px;
  border: 1px dashed rgba(108, 188, 255, 0.48);
  background: rgba(9, 14, 26, 0.88);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.composer-drop-overlay strong {
  color: rgba(245, 249, 255, 0.96);
  font-size: 18px;
  font-weight: 900;
}

.composer-drop-overlay span {
  color: rgba(185, 201, 228, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.composer-attachment-preview figcaption {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  min-width: 0;
  padding: 1px 5px;
  border-radius: 999px;
  color: rgba(246, 248, 255, 0.96);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  background: rgba(8, 12, 22, 0.82);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  white-space: nowrap;
}


/* 全站操作轻提示 */
.app-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  width: min(360px, calc(100vw - 28px));
  pointer-events: none;
}

.app-toast-list {
  display: grid;
  gap: 10px;
}

.app-toast-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  align-items: start;
  gap: 10px;
  padding: 12px 12px 12px 11px;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.96);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    rgba(12, 18, 31, 0.94);
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.app-toast-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(24, 200, 255, 0.9);
}

.app-toast-item.is-success::before {
  background: rgba(34, 197, 94, 0.92);
}

.app-toast-item.is-error::before {
  background: rgba(239, 68, 68, 0.94);
}

.app-toast-item.is-warning::before {
  background: rgba(245, 158, 11, 0.95);
}

.app-toast-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border-radius: 999px;
  color: rgba(248, 250, 252, 0.96);
  font-size: 13px;
  font-weight: 1000;
  background: rgba(24, 200, 255, 0.16);
  border: 1px solid rgba(24, 200, 255, 0.24);
}

.app-toast-item.is-success .app-toast-icon {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.26);
}

.app-toast-item.is-error .app-toast-icon {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.28);
}

.app-toast-item.is-warning .app-toast-icon {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.30);
}

.app-toast-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.app-toast-copy strong {
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
}

.app-toast-copy p {
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.app-toast-item button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: rgba(203, 213, 225, 0.82);
  border-radius: 999px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.app-toast-item button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.app-toast-enter-active,
.app-toast-leave-active {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast-enter-from,
.app-toast-leave-to {
  opacity: 0;
  transform: translateX(18px) translateY(-4px);
}

.app-toast-move {
  transition: transform 0.18s ease;
}

@media (max-width: 720px) {
  .app-toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* task drawer filters */
.task-filter-panel {
  flex: 0 0 auto;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.032));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
}

.task-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  background: rgba(3, 7, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
}

.task-search-box span {
  color: var(--muted);
  font-size: 14px;
}

.task-search-box input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.task-search-box input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

.task-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.task-filter-row > span {
  flex: 0 0 32px;
  color: var(--weak);
  font-size: 12px;
  font-weight: 800;
}

.task-filter-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--weak);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.task-filter-row button b {
  color: var(--muted);
  font-size: 11px;
}

.task-filter-row button.active {
  color: #061018;
  background: linear-gradient(135deg, #18c8ff, #dffaff);
  border-color: rgba(24, 200, 255, 0.5);
}

.task-filter-row button.active b {
  color: rgba(6, 16, 24, 0.72);
}

.task-result-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--weak);
  font-size: 12px;
}

.task-result-bar button,
.task-empty-state button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--gold);
  background: rgba(247, 181, 0, 0.08);
  border: 1px solid rgba(247, 181, 0, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.task-item > div {
  min-width: 0;
}

.task-item strong,
.task-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item small {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.task-item.type-chat small {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.11);
}

.task-item.type-image small {
  color: #ddd6fe;
  background: rgba(167, 139, 250, 0.12);
}

.task-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 34px 18px;
  text-align: center;
  color: var(--weak);
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
}

.task-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.task-empty-state p {
  margin: 0;
  font-size: 13px;
}

/* task drawer actions */
.task-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.task-result-actions button.warning {
  color: #ffc4b8;
  background: rgba(244, 63, 94, 0.09);
  border-color: rgba(244, 63, 94, 0.22);
}

.task-item-main {
  flex: 1 1 auto;
  min-width: 0;
}

.task-item-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: max-content;
}

.task-delete-button {
  min-height: 26px;
  padding: 0 9px;
  color: rgba(255, 196, 184, 0.9);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.task-delete-button:hover {
  color: #fff;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.34);
}

@media (max-width: 560px) {
  .task-result-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-result-actions {
    justify-content: flex-start;
  }

  .task-item {
    align-items: flex-start;
  }
}

/* 对话历史管理增强 */
.history-pop-item.pinned {
  border-color: rgba(247, 181, 0, 0.28);
  background:
    linear-gradient(135deg, rgba(247, 181, 0, 0.1), rgba(255, 255, 255, 0.035));
}

.history-pop-item.generating {
  border-color: rgba(24, 200, 255, 0.26);
  box-shadow: 0 0 0 1px rgba(24, 200, 255, 0.06) inset;
}

.history-pop-main strong i {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-right: 6px;
  padding: 0 6px;
  color: #f9d66b;
  background: rgba(247, 181, 0, 0.12);
  border: 1px solid rgba(247, 181, 0, 0.2);
  border-radius: 999px;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
}

.history-pop-item em.running {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
}

.history-pop-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-pin-btn,
.history-rename-btn {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.history-pin-btn:hover,
.history-rename-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.history-rename-form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-rename-form input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(24, 200, 255, 0.22);
  border-radius: 11px;
  outline: none;
}

.history-rename-form input:focus {
  border-color: rgba(24, 200, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(24, 200, 255, 0.09);
}

.history-rename-form button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 10px;
  color: #061018;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #18c8ff, #63e6ff);
  border-radius: 999px;
}

.history-rename-form button.muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.history-empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 96px;
  padding: 18px;
  text-align: center;
  color: var(--weak);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.history-empty-state strong {
  color: var(--muted);
  font-size: 13px;
}

.history-empty-state span {
  font-size: 12px;
}

@media (max-width: 760px) {
  .history-pop-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  .history-pin-btn,
  .history-rename-btn,
  .history-delete-btn {
    height: 26px;
    padding: 0 7px;
    font-size: 11px;
  }
}

/* v0.3 动态 API 文档 */
.api-docs-content {
  max-width: 980px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background: rgba(8, 13, 24, 0.78);
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.api-docs-content > :first-child { margin-top: 0; }
.api-docs-content > :last-child { margin-bottom: 0; }
.api-docs-content h1,.api-docs-content h2,.api-docs-content h3,.api-docs-content h4 { color: var(--text); line-height: 1.3; scroll-margin-top: 20px; }
.api-docs-content h1 { font-size: 30px; }
.api-docs-content h2 { margin-top: 32px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 23px; }
.api-docs-content h3 { margin-top: 26px; font-size: 18px; }
.api-docs-content a { color: #8fb3ff; }
.api-docs-content code { padding: 2px 6px; border-radius: 7px; background: rgba(148,163,184,.12); font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.api-docs-content pre { padding: 16px; overflow-x: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(2,6,23,.72); }
.api-docs-content pre code { padding: 0; background: transparent; }
.api-docs-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.api-docs-content th,.api-docs-content td { padding: 10px 12px; border: 1px solid rgba(255,255,255,.09); text-align: left; }
.api-docs-content blockquote { margin-left: 0; padding: 4px 0 4px 16px; border-left: 3px solid rgba(122,134,255,.55); color: rgba(203,213,225,.78); }
@media(max-width:720px){.api-docs-content{padding:18px}.api-docs-content h1{font-size:25px}.api-docs-content h2{font-size:20px}}

/* Image2 1K 底图 + Nano Banana Pro 2K/4K 双阶段流水线 */
.image-hd-pipeline-card {
  grid-column: 1 / -1;
  overflow: hidden;
  padding: 12px;
  background:
    radial-gradient(circle at 10% 0%, rgba(24, 200, 255, 0.09), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(124, 58, 237, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(24, 200, 255, 0.14);
  border-radius: 18px;
}

.image-hd-pipeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.image-hd-pipeline-head > div {
  min-width: 0;
}

.image-hd-pipeline-head strong,
.image-hd-pipeline-head span {
  display: block;
}

.image-hd-pipeline-head strong {
  color: rgba(244, 250, 255, 0.96);
  font-size: 13px;
  font-weight: 950;
}

.image-hd-pipeline-head span {
  margin-top: 4px;
  color: rgba(181, 199, 228, 0.8);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
}

.image-hd-pipeline-head em {
  flex: 0 0 auto;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  border-radius: 999px;
}

.image-hd-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.image-hd-stage-figure {
  min-width: 0;
  background: rgba(5, 10, 20, 0.54);
}

.image-hd-stage-figure.is-final {
  border-color: rgba(124, 58, 237, 0.22);
  box-shadow: inset 0 1px 0 rgba(124, 58, 237, 0.08);
}

.image-hd-stage-label {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.image-hd-stage-label strong,
.image-hd-stage-label span {
  min-width: 0;
  display: block;
}

.image-hd-stage-label strong {
  color: rgba(239, 247, 255, 0.94);
  font-size: 11px;
  font-weight: 950;
}

.image-hd-stage-label span {
  max-width: 50%;
  overflow: hidden;
  color: rgba(158, 179, 213, 0.78);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-hd-pipeline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.image-hd-pipeline-actions p {
  margin: 0;
  color: rgba(181, 199, 228, 0.76);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.55;
}

.image-hd-pipeline-actions button {
  flex: 0 0 auto;
  min-height: 31px;
  padding: 0 12px;
  color: #f6fbff;
  font-size: 11px;
  font-weight: 950;
  background: linear-gradient(135deg, rgba(24, 200, 255, 0.2), rgba(124, 58, 237, 0.24));
  border: 1px solid rgba(24, 200, 255, 0.28);
  border-radius: 10px;
}

.image-hd-pipeline-actions button:hover {
  background: linear-gradient(135deg, rgba(24, 200, 255, 0.28), rgba(124, 58, 237, 0.34));
  border-color: rgba(24, 200, 255, 0.42);
}

@media (max-width: 720px) {
  .image-hd-pipeline-head,
  .image-hd-pipeline-actions {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .image-hd-pipeline-actions button {
    width: 100%;
  }
}
