:root {
  --bg: #f5f7fb;
  --bg-grad-1: #f8fbff;
  --bg-grad-2: #eef3fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --line: #dbe4f2;
  --line-soft: #e9eff8;
  --text: #1f2a44;
  --muted: #6d7b99;
  --accent: #3f6fff;
  --accent-soft: #eaf0ff;
  --ok: #1fa971;
  --off: #e05f5f;
  --loading: #c28a20;
  --shadow-lg: 0 18px 40px rgba(30, 54, 96, 0.12);
  --shadow-md: 0 10px 22px rgba(44, 72, 120, 0.1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: auto; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 56%, var(--bg) 100%);
  overflow-x: hidden;
}
body.booting { overflow: hidden; }

/* hide scrollbar on main page, keep scroll behavior */
body:not(.in-workbench):not(.workbench-entering) {
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body:not(.in-workbench):not(.workbench-entering)::-webkit-scrollbar {
  display: none;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.bg {
  position: fixed;
  inset: -16%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 36% at 16% 18%, rgba(108, 146, 255, 0.16), transparent 70%),
    radial-gradient(46% 34% at 86% 72%, rgba(123, 225, 255, 0.14), transparent 72%),
    radial-gradient(30% 22% at 52% 46%, rgba(146, 169, 255, 0.1), transparent 76%);
  animation: drift 16s ease-in-out infinite alternate;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px 300px at var(--mx, 50%) var(--my, 50%), rgba(117, 157, 255, 0.16), transparent 72%);
}

.launch {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(58% 44% at 18% 12%, rgba(116, 158, 255, 0.22), transparent 72%),
    radial-gradient(56% 44% at 84% 78%, rgba(119, 217, 255, 0.16), transparent 76%),
    #f4f8ff;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.launch.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.launch h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(3.1rem, 8.6vw, 6rem);
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(180deg, #2f4fbc 0%, #5a7dff 54%, #8ea6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 18px rgba(88, 121, 219, 0.24));
  animation: tIn 1.15s cubic-bezier(.22, 1, .36, 1) both;
  transform-origin: center center;
  will-change: transform, opacity;
  transition: opacity .5s ease;
}

.launch p {
  margin: 12px 0 0;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.16rem);
  color: #4f6190;
  animation: sIn 1s cubic-bezier(.22, 1, .36, 1) both .32s;
  transition: opacity .44s ease, transform .44s ease;
}

.launch.fly-to-brand h1 {
  animation: launchSnap .9s cubic-bezier(.18, .8, .2, 1) forwards;
  opacity: .98;
}

.launch.fly-to-brand p {
  opacity: 0;
  transform: translateY(-14px);
}

.app {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 86px 16px 18px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .55s ease, transform .55s ease;
}
body.booting .app { opacity: 0; transform: translateY(10px); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 16px 20px;
  min-height: 72px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  border-bottom: none;
  box-shadow: none;
  z-index: 60;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-brand-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #2e3f6f;
  position: relative;
}

.site-brand-dot::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2e3f6f;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.site-brand-text {
  font-size: 1.08rem;
  color: #1f2f5c;
  font-weight: 700;
  letter-spacing: .2px;
}

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

.account-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 112px;
  min-width: 148px;
  border-radius: 12px;
  border: 1px solid #d7e2f4;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(30, 49, 88, 0.16);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 80;
}

.account-popover.show {
  display: flex;
}

.account-popover button {
  border: none;
  background: transparent;
  color: #3a4f80;
  font-size: 0.82rem;
  text-align: left;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.account-popover button:hover {
  background: #edf3ff;
}

.site-link {
  border: none;
  background: transparent;
  color: #3d5384;
  font-size: .86rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.site-link:hover {
  background: #edf3ff;
}

.backend-pill {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  border: 1px solid #d3def3;
  background: #f6f9ff;
  color: #4f6494;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backend-pill.is-ok {
  border-color: #b6e3cc;
  background: #edf9f3;
  color: #2c7a54;
}

.backend-pill.is-warn {
  border-color: #f0c9b1;
  background: #fff4ec;
  color: #9d4f24;
}

.backend-pill.is-pending {
  border-style: dashed;
}

.site-cta {
  border: 1px solid #cfdcf3;
  background: linear-gradient(180deg, #eef3ff, #dde8ff);
  color: #2b488f;
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 42, 0.35);
  backdrop-filter: blur(2px);
  padding: 20px;
}

.auth-modal.show {
  display: flex;
}

.auth-card {
  width: min(440px, 92vw);
  border-radius: 16px;
  border: 1px solid #d7e1f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 42px rgba(21, 39, 75, 0.16);
  overflow: hidden;
}

.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2eaf7;
}

.auth-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #213460;
}

.auth-head button {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: #506389;
  cursor: pointer;
}

.auth-body {
  display: grid;
  gap: 8px;
  padding: 14px 16px 8px;
}

.auth-body label {
  font-size: 0.82rem;
  color: #4d5f84;
}

.auth-body input {
  width: 100%;
  border: 1px solid #cfdbf0;
  background: #fbfdff;
  color: #1f2a44;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.auth-body input:focus {
  border-color: #7092ff;
  box-shadow: 0 0 0 3px rgba(88, 129, 255, 0.16);
}

.auth-tip {
  min-height: 18px;
  margin: 0;
  font-size: 0.78rem;
  color: #5c6f95;
}

.auth-tip.is-error { color: #d03e55; }
.auth-tip.is-ok { color: #179a67; }

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 16px;
}

.auth-btn {
  border-radius: 10px;
  border: 1px solid #cedaf0;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-btn.ghost {
  background: #f5f8ff;
  color: #3e5487;
}

.auth-btn.primary {
  border-color: #6d90ff;
  background: linear-gradient(180deg, #7ea1ff, #5f83f3);
  color: #fff;
}

.top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 0 auto 8px;
  width: min(1220px, 94%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cube {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid #c6d4ef;
  background: linear-gradient(150deg, #dfe8ff, #f3f7ff);
  box-shadow: 0 8px 18px rgba(97, 132, 221, 0.16);
}

.name h1 {
  margin: 0;
  font-size: 1.06rem;
  color: #23325a;
}

.name p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .82rem;
}

.search {
  position: relative;
  width: min(560px, 100%);
}

.search input {
  width: 100%;
  padding: 11px 40px 11px 13px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  box-shadow: 0 8px 18px rgba(73, 101, 157, 0.08);
}

.search input:focus {
  border-color: #b5c8ef;
  box-shadow: 0 0 0 3px rgba(93, 128, 220, 0.12);
}

.search span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a2bf;
}

.nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  margin-bottom: 0;
  width: min(1220px, 94%);
  margin-inline: auto;
}

.nav button {
  border: none;
  border-right: none;
  background: transparent;
  color: #5b6d90;
  padding: 13px 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.nav button:last-child { border-right: none; }
.nav button:hover {
  background: #f4f8ff;
  color: #344c8f;
  transform: scale(1.03);
}

.nav button.active {
  background: linear-gradient(180deg, #eaf1ff 0%, #dce8ff 100%);
  color: #25459d;
  transform: scale(1.05);
  box-shadow: none;
  z-index: 1;
}

.panel {
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}

.panel::before {
  content: none;
}

.chat {
  min-height: 54vh;
  display: flex;
  flex-direction: column;
  position: relative;
  width: min(1220px, 94%);
  margin-inline: auto;
}

.chat-head {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px 10px;
}

.chat-head h2 {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  color: #1f3160;
}

.session-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 10px;
}

.billing-strip {
  display: none;
}

.session-list {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.session-tab {
  border: 1px solid #d9e3f6;
  background: #f7faff;
  color: #5f7195;
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  font-size: .76rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.session-tab-label {
  cursor: pointer;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-tab-close {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #9ea9bf;
  font-size: .7rem;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(.9);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.session-tab:hover .session-tab-close,
.session-tab:focus-within .session-tab-close {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.session-tab-close:hover {
  background: #ffe5e5;
  color: #c64545;
}

.session-tab.active {
  background: #eaf1ff;
  color: #3556a8;
  border-color: #bfd0f3;
}

.session-tab.session-tab-more {
  border-style: dashed;
  cursor: pointer;
  background: #f6f9ff;
  color: #5d74aa;
}

.session-tab.session-tab-loading {
  border-style: dashed;
  color: #7d8fb8;
  background: #f8fbff;
  pointer-events: none;
}

.session-add {
  margin-left: auto;
  border: 1px solid #d0dbef;
  background: #f3f7ff;
  color: #4c649c;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .74rem;
  cursor: pointer;
  white-space: nowrap;
}

.session-add:hover {
  background: #eaf1ff;
}

.models-toggle-btn {
  margin-right: 2px;
  border: 1px solid #d0dbef;
  background: #f3f7ff;
  color: #4c649c;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .74rem;
  cursor: pointer;
  white-space: nowrap;
}

.models-toggle-btn:hover {
  background: #eaf1ff;
}

.msg-history-more-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}

.msg-history-more-btn {
  border: 1px dashed #bfd0ef;
  background: #f6f9ff;
  color: #4f689c;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

.msg-history-more-btn:hover {
  background: #eef4ff;
}

.msg-history-more-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.msg-history-more-btn.msg-history-warn {
  border-style: solid;
  border-color: #f0c1a0;
  background: #fff4eb;
  color: #a65424;
  cursor: default;
}

.sel { position: relative; width: 216px; }

.sel-btn {
  width: 216px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #d2ddf0;
  background: #ffffff;
  color: #233056;
  border-radius: 10px;
  padding: 7px 9px;
  cursor: pointer;
  gap: 8px;
}

.sel-btn:hover { background: #f7faff; }

#selLabel {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  width: 100%;
  min-width: 0;
  justify-content: space-between;
}

#selLabel .name {
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#selLabel .light { margin-left: auto; }
.sel.open .menu { display: block; }

.menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 280px;
  border: 1px solid #d0dbef;
  border-radius: 12px;
  background: #ffffff;
  max-height: min(58vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 30;
  box-shadow: 0 14px 30px rgba(47, 72, 125, 0.2);
}

.menu::-webkit-scrollbar {
  display: none;
}

.menu button {
  width: 100%;
  border: none;
  background: #ffffff;
  color: #2e3f6f;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  column-gap: 14px;
  padding: 9px 10px 9px 8px;
  cursor: pointer;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}

.menu button:hover { background: #f5f8ff; }

.menu button.active {
  background: #e9f0ff;
  color: #24469f;
  box-shadow: inset 2px 0 0 #7da0ff;
}

.menu button .name {
  justify-self: start;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu button .opt-status {
  display: grid;
  grid-template-columns: 1fr 8px;
  align-items: center;
  column-gap: 8px;
  width: 112px;
  min-width: 112px;
  text-align: right;
  justify-self: end;
}

.menu button .opt-status .opt-text {
  font-size: .62rem;
  letter-spacing: .25px;
  line-height: 1;
  color: #5d719a;
  justify-self: end;
}

.menu-sep {
  height: 1px;
  margin: 2px 8px;
  background: rgba(218, 227, 244, 0.9);
}

.menu .menu-action {
  width: calc(100% - 12px);
  margin: 4px 6px 8px;
  border: 1px solid #dbe5f7;
  border-radius: 10px;
  background: #f6f9ff;
  color: #3a5390;
  padding: 8px 10px;
  font-size: .75rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.menu .menu-action:hover {
  background: #edf3ff;
  color: #274892;
  border-color: #cddbf4;
}

.menu .menu-action.is-ghost {
  margin-top: 0;
  background: #ffffff;
  color: #5a6f98;
  border-color: #e3eaf8;
}

.menu .menu-action.is-ghost:hover {
  background: #f8faff;
  color: #35599c;
  border-color: #d4dff4;
}

.light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 8px;
}

.online { background: var(--ok); }
.offline { background: var(--off); }
.loading { background: var(--loading); }
.restricted { background: #f2b24c; }

.box {
  position: relative;
  z-index: 1;
  padding: 8px 14px 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 280px;
  max-height: 54vh;
  overflow: auto;
  -webkit-tap-highlight-color: transparent;
}

.msg {
  max-width: 86%;
  border: none;
  border-radius: 12px;
  padding: 10px 11px;
  font-size: .9rem;
  -webkit-tap-highlight-color: transparent;
}

.msg.user { align-self: end; background: #edf3ff; color: #223a72; }
.msg.ai { align-self: start; background: #f4f7ff; color: #384e80; }

.msg:active { background: #edf1fa; }

.input {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 8px;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid #d7e2f3;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(55, 83, 134, .12);
}

.input input {
  flex: 1;
  border: 1px solid #d4deee;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 9px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.input input:focus {
  border-color: #b8caef;
  box-shadow: 0 0 0 3px rgba(80, 121, 210, .12);
}

.input button {
  border: 1px solid #c7d7f4;
  background: linear-gradient(180deg, #ecf2ff, #dce8ff);
  color: #2f4e98;
  border-radius: 10px;
  padding: 0 12px;
  cursor: pointer;
}

.models { margin-top: 12px; padding: 12px; }
.models { width: min(1220px, 94%); margin-inline: auto; padding: 10px 12px 12px; }

.head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.head h2 { margin: 0; font-size: 1rem; color: #263a67; }
.head span { font-size: .82rem; color: #7283a3; }

.cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.model-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 10px;
}

.model-scope .scope-btn {
  border: 1px solid #d5e1f4;
  background: #fff;
  color: #466094;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  cursor: pointer;
}

.model-scope .scope-btn.active {
  background: #edf3ff;
  border-color: #c3d3f5;
  color: #2f4f98;
}

.card {
  border: 1px solid #d8e3f4;
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.card h3 { margin: 0; font-size: .95rem; color: #2d4173; }
.card small { color: #7a8baa; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9e3f2;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: .74rem;
  background: #ffffff;
}

.desc { margin: 0; flex: 1; color: #61759f; font-size: .85rem; }

.card button {
  border: 1px solid #d0ddf1;
  background: #ffffff;
  color: #38559a;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions button {
  flex: 1;
}

.card .fav-btn.is-on {
  background: #edf3ff;
  border-color: #c3d3f5;
  color: #2f4f98;
}

.empty {
  border: 1px dashed #d2dff2;
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  color: #8395b4;
  background: #f8fbff;
}

@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    min-height: 68px;
  }
  .site-actions {
    justify-content: space-between;
  }
  .app { padding-top: 92px; }
  .top { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .nav { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .chat-head { flex-direction: column; align-items: stretch; }
  .sel, .sel-btn, .menu { width: 100%; }
  .session-bar { flex-wrap: wrap; }
  .session-add { margin-left: 0; }
}

@keyframes drift {
  from { transform: translate3d(-1%, -1%, 0) scale(1); }
  to { transform: translate3d(1%, 1%, 0) scale(1.04); }
}

@keyframes pulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .9; transform: scale(1.04); }
}

@keyframes tIn {
  from { transform: translateY(24px); opacity: 0; filter: blur(6px); }
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes sIn {
  from { transform: translateY(16px); opacity: 0; filter: blur(4px); }
  to { transform: translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes launchSnap {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    filter: drop-shadow(0 10px 18px rgba(88, 121, 219, 0.24));
  }
  32% {
    transform: translate(calc(var(--fly-x, 0) * .08), calc(var(--fly-y, 0) * .08)) scale(1.08);
    opacity: 1;
    filter: drop-shadow(0 16px 26px rgba(88, 121, 219, 0.28));
  }
  100% {
    transform: translate(var(--fly-x, 0), var(--fly-y, 0)) scale(var(--fly-scale, .22));
    opacity: .96;
    filter: drop-shadow(0 4px 8px rgba(88, 121, 219, 0.12));
  }
}

/* ---- cohesive page overrides (no stitched card feel) ---- */
body {
  background: #f6f8fb;
  color: #1f2a44;
}

.bg {
  opacity: 0.35;
  animation-duration: 24s;
}

.bg::before {
  content: "";
  position: absolute;
  inset: -14%;
  background:
    radial-gradient(circle at 10% 12%, rgba(102, 239, 255, 0.34) 0 2px, transparent 3px),
    radial-gradient(circle at 18% 22%, rgba(117, 136, 255, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 10%, rgba(109, 255, 233, 0.24) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 68% 26%, rgba(98, 215, 255, 0.22) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 62%, rgba(123, 139, 255, 0.2) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 36% 72%, rgba(109, 255, 233, 0.16) 0 1.5px, transparent 2.5px);
  opacity: .62;
  filter: blur(.1px);
  animation: ambientDots 27s ease-in-out infinite alternate;
}

.bg::after {
  animation: ambientGlow 16s ease-in-out infinite;
}

.bg-orb {
  position: fixed;
  left: 5%;
  top: 62%;
  width: clamp(220px, 30vw, 420px);
  height: clamp(220px, 30vw, 420px);
  pointer-events: none;
  z-index: 1;
  opacity: .45;
  filter: blur(0.4px);
  background:
    radial-gradient(42% 42% at 36% 34%, rgba(110, 255, 235, 0.26), transparent 70%),
    radial-gradient(34% 34% at 68% 64%, rgba(109, 136, 255, 0.24), transparent 72%),
    radial-gradient(70% 70% at 50% 50%, rgba(107, 190, 255, 0.1), transparent 75%);
  border-radius: 50%;
  animation: orbRoam 21s cubic-bezier(.36, .02, .2, .98) infinite alternate, orbBreath 8.8s ease-in-out infinite;
}

.bg-orb::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    conic-gradient(from 110deg, rgba(98, 245, 234, 0), rgba(98, 245, 234, 0.18), rgba(120, 138, 255, 0) 72%),
    radial-gradient(40% 40% at 58% 40%, rgba(152, 215, 255, 0.12), transparent 75%);
  animation: orbSpin 14s linear infinite;
}

.float-sprite {
  position: fixed;
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  pointer-events: none;
  z-index: 1;
  transform: translate3d(var(--sx, 22vw), var(--sy, 72vh), 0) scale(var(--ss, 1));
  will-change: transform, opacity;
  filter: drop-shadow(0 0 14px rgba(108, 236, 255, 0.42));
  opacity: .88;
}

.float-sprite.sprite-alt {
  width: 84px;
  height: 84px;
  opacity: .8;
  filter: drop-shadow(0 0 16px rgba(146, 142, 255, 0.4));
}

.float-sprite::before,
.float-sprite::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.float-sprite::before {
  background:
    radial-gradient(34% 34% at 36% 36%, rgba(188, 255, 249, 0.96), transparent 70%),
    radial-gradient(38% 38% at 62% 58%, rgba(128, 147, 255, 0.72), transparent 72%),
    radial-gradient(76% 76% at 50% 50%, rgba(97, 222, 255, 0.3), transparent 76%);
  animation: spriteBlink 3.2s ease-in-out infinite;
}

.float-sprite::after {
  inset: 14% 10% 12% 12%;
  background: conic-gradient(from 80deg, rgba(103, 245, 236, 0), rgba(103, 245, 236, 0.4), rgba(120, 132, 255, 0) 72%);
  animation: spriteSpin 7.8s linear infinite;
}

.float-sprite.sprite-alt::before {
  background:
    radial-gradient(34% 34% at 36% 36%, rgba(248, 219, 255, 0.94), transparent 70%),
    radial-gradient(38% 38% at 62% 58%, rgba(171, 120, 255, 0.72), transparent 72%),
    radial-gradient(76% 76% at 50% 50%, rgba(160, 141, 255, 0.3), transparent 76%);
}

.float-sprite.sprite-alt::after {
  background: conic-gradient(from 50deg, rgba(201, 118, 255, 0), rgba(201, 118, 255, 0.42), rgba(120, 132, 255, 0) 72%);
  animation-duration: 10.4s;
}

/* 工作台模式下小精灵保持与主页面一致，不做弱化 */
body.in-workbench .float-sprite,
body.workbench-entering .float-sprite {
  z-index: 36;
  opacity: .88;
}

body.in-workbench .float-sprite.sprite-alt,
body.workbench-entering .float-sprite.sprite-alt {
  opacity: .8;
}

/* ---- fix: session deletion + chat scroll usability ---- */
/* 统一会话区与输入区宽度，避免消息超出输入框视觉范围 */
body.in-workbench .workspace .chat-head,
body.workbench-entering .workspace .chat-head,
body.in-workbench .workspace .session-bar,
body.workbench-entering .workspace .session-bar,
body.in-workbench .workspace .box,
body.workbench-entering .workspace .box,
body.in-workbench .workspace .input,
body.workbench-entering .workspace .input {
  width: min(980px, 100%);
  margin-inline: auto;
}

/* 恢复会话内容滚动 */
body.in-workbench .workspace .chat,
body.workbench-entering .workspace .chat {
  min-height: 0;
  height: calc(100vh - 188px);
  grid-template-rows: auto auto 1fr auto;
}

body.in-workbench .workspace .box,
body.workbench-entering .workspace .box {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 170px;
}

/* 删除按钮可点击 */
body.in-workbench .workspace .session-tab-close,
body.workbench-entering .workspace .session-tab-close {
  pointer-events: auto;
}

@media (max-width: 980px) {
  body.in-workbench .workspace .chat,
  body.workbench-entering .workspace .chat {
    height: calc(100vh - 210px);
  }

  body.in-workbench .workspace .box,
  body.workbench-entering .workspace .box {
    padding-bottom: 150px;
  }
}

.app {
  padding-top: 62px;
  padding-bottom: 28px;
  opacity: 1;
  transform: none;
  transition: none;
}

body.booting .app {
  opacity: 0;
  transform: none;
}

body.booting .site-brand-text {
  visibility: hidden;
}

.top {
  width: min(1080px, 92%);
  margin-inline: auto;
}

.nav,
.chat,
.models {
  width: 100%;
  margin-inline: auto;
}

.site-header {
  min-height: 84px;
  padding: 14px 26px;
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.site-brand {
  gap: 0;
  cursor: pointer;
}

.site-brand-dot {
  display: none;
}

.site-brand-text {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: .6px;
  background: linear-gradient(180deg, #2f4fbc 0%, #5a7dff 54%, #8ea6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 12px rgba(88, 121, 219, 0.2));
  opacity: 1;
  visibility: visible;
}

.site-actions {
  gap: 2px;
}

.site-link {
  font-size: .86rem;
  font-weight: 600;
  padding: 6px 8px;
  color: #4d628e;
  border-radius: 0;
  background: transparent;
}

.site-link:hover {
  background: transparent;
  color: #2f4f97;
}

.site-cta {
  font-size: .84rem;
  padding: 6px 10px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #304d8f;
}

/* 工作台顶部：与主页面 Hero 风格统一 */
.top {
  margin: 28px auto 20px;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

.logo {
  gap: 12px;
}

.cube {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(88, 121, 219, 0.12);
  border: 1px solid rgba(225, 232, 246, 0.8);
  background: linear-gradient(150deg, #e8f4ff, #f4f8ff);
}

.name h1 {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: .4px;
  background: linear-gradient(180deg, #2f4fbc 0%, #5a7dff 54%, #8ea6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.name p {
  font-size: .82rem;
  color: #60739a;
  margin-top: 2px;
}

.search {
  width: min(520px, 100%);
}

.search input {
  box-shadow: 0 2px 8px rgba(31, 42, 68, 0.04);
  border: 1px solid #e5ebf6;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 10px 14px;
}

.search input:focus {
  box-shadow: 0 0 0 2px rgba(102, 133, 212, 0.1);
  border-color: #d0ddf0;
}

/* 工作台模型列表：与主页面模块卡片风格一致 */
.models {
  margin-top: 16px;
  padding: 0;
  border-top: 1px solid #edf2fb;
  padding-top: 12px;
}

.head {
  margin-bottom: 12px;
}

.head h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1b2438;
}

.head span {
  color: #60739a;
  font-size: .84rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e1e8f6;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(31, 42, 68, 0.03);
}

.cards {
  gap: 12px;
}

.cards .card:last-child {
  border-bottom: 1px solid #e1e8f6;
}

.card:hover {
  transform: none;
  border-color: #d7e0f0;
  background: #fafbff;
  box-shadow: 0 4px 12px rgba(31, 42, 68, 0.06);
}

.workspace .card h3 {
  color: #1f2a44;
  font-weight: 700;
}

.workspace .card small,
.workspace .card .desc {
  color: #60739a;
}

.workspace .card button {
  border: 1px solid #e1e8f6;
  background: rgba(255, 255, 255, 0.9);
  color: #2f4f97;
}

.workspace .card button:hover {
  background: #edf3ff;
}

@media (max-width: 760px) {
  .app {
    padding-top: 70px;
  }

  .site-header {
    padding: 10px 12px;
    min-height: 70px;
  }

  .site-actions {
    gap: 0;
  }

  .top { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .chat {
    border-radius: 0;
  }
}

.hero {
  width: min(980px, 92%);
  margin: 138px auto 110px;
  text-align: center;
  position: relative;
  z-index: 3;
  transition: opacity .55s ease, transform .6s cubic-bezier(.2, .78, .24, 1);
}

.hero h1 {
  margin: 0;
  position: relative;
  display: inline-block;
  padding: 18px 40px;
  font-size: clamp(2.2rem, 6.2vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: .6px;
  color: #141823;
  font-weight: 900;
}

.hero-title-text span {
  background: linear-gradient(130deg, #57ffd2 0%, #3de6ff 34%, #66adff 62%, #7c6dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(96, 238, 255, 0.26);
}

.hero-title-text {
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

.hero-title-text::before {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(86, 233, 255, 0.03), rgba(86, 233, 255, 0.72) 30%, rgba(127, 127, 255, 0.7) 62%, rgba(86, 233, 255, 0.03));
  background-size: 220% 100%;
  box-shadow: 0 0 8px rgba(86, 233, 255, 0.24);
  animation: chipRail 6.8s linear infinite;
}

.hero-title-text::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  left: -2%;
  bottom: -3px;
  background: radial-gradient(circle at 30% 30%, #dffff8 0 28%, #58f0ff 54%, #7b7fff 100%);
  box-shadow: 0 0 10px rgba(88, 240, 255, 0.5);
  opacity: .62;
  animation: chipRunner 6.2s cubic-bezier(.42, .03, .34, .98) infinite;
}

.chip-links {
  position: absolute;
  inset: -12px -32px;
  pointer-events: none;
}

.chip-links::before,
.chip-links::after {
  content: "";
  position: absolute;
  inset: 0;
}

.chip-links::before {
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(84, 229, 255, 0.52) 8% 10%, transparent 10% 26%, rgba(118, 120, 255, 0.56) 26% 28%, transparent 28% 72%, rgba(84, 229, 255, 0.48) 72% 74%, transparent 74%),
    linear-gradient(0deg, transparent 0 20%, rgba(114, 180, 255, 0.35) 20% 22%, transparent 22% 76%, rgba(109, 255, 234, 0.35) 76% 78%, transparent 78%);
  mask: radial-gradient(95% 86% at 50% 50%, #000 62%, transparent 100%);
  opacity: .58;
  animation: chipFlow 7.2s ease-in-out infinite alternate;
}

.chip-links::after {
  background:
    radial-gradient(circle at 10% 22%, rgba(103, 244, 233, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 28% 78%, rgba(117, 141, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 74% 20%, rgba(103, 244, 233, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 68%, rgba(117, 141, 255, 0.9) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 10px rgba(100, 217, 255, 0.62));
  animation: chipPulse 12.4s ease-in-out infinite;
}


.hero p {
  margin: 28px auto 0;
  max-width: 780px;
  font-size: 1rem;
  line-height: 1.8;
  color: #5c6b8c;
}

.hero-cta {
  margin-top: 88px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2332 0%, #0d1219 100%);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  padding: 16px 36px;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .28s ease, background .24s ease;
  box-shadow: 0 12px 28px rgba(10, 18, 32, 0.35);
  letter-spacing: .4px;
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(10, 18, 32, 0.4);
}

.hero-cta:active {
  transform: translateY(-1px);
}

.page-switch-fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  opacity: 0;
  background:
    radial-gradient(40% 34% at 50% 36%, rgba(111, 221, 255, 0.18), transparent 72%),
    radial-gradient(80% 70% at 50% 20%, rgba(255, 255, 255, 0.24), transparent 78%);
}

.workspace {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  opacity: 0;
  overflow: auto;
  transform: translateY(18px);
  visibility: hidden;
  pointer-events: none;
  z-index: 34;
  background: #f6f8fb;
  scrollbar-width: none;
  -ms-overflow-style: none;
  will-change: transform, opacity;
  contain: layout paint style;
  transition: opacity .62s ease, transform .72s cubic-bezier(.2, .78, .24, 1), visibility 0s linear .72s;
}

.workspace::-webkit-scrollbar {
  display: none;
}

.workspace.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: opacity .62s ease, transform .72s cubic-bezier(.2, .78, .24, 1), visibility 0s;
}

.module-intro {
  width: min(980px, 92%);
  margin: 120px auto 110px;
  transition: opacity .52s ease, transform .58s cubic-bezier(.2, .78, .24, 1);
}

/* 小精灵气泡：与主页面风格统一，柔和融入背景 */
.sprite-thought {
  position: fixed;
  transform: translate(1px, 2px) scale(0.95);
  transform-origin: 0% 100%;
  max-width: 208px;
  min-width: 136px;
  padding: 9px 13px 11px;
  border-radius: 20px;
  border: 1px solid rgba(218, 229, 248, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(244, 250, 255, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #32486f;
  font-size: 0.86rem;
  line-height: 1.5;
  letter-spacing: 0;
  font-family: "Comic Sans MS", "YouYuan", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  box-shadow: 0 8px 20px rgba(31, 42, 68, 0.1), 0 0 0 1px rgba(229, 235, 246, 0.56);
  transition: opacity 0.5s ease-out, transform 0.58s cubic-bezier(.22, .88, .2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sprite-thought::before {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(248, 252, 255, 0.96);
  border: 1px solid rgba(223, 233, 248, 0.88);
  box-shadow: 0 2px 7px rgba(31, 42, 68, 0.1);
}

.sprite-thought::after {
  content: none;
}

.sprite-thought.cloud-right::before {
  left: auto;
  right: -6px;
}

.sprite-thought.cloud-right::after {
  content: none;
}

.sprite-thought.show {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  animation: bubblePopCute .24s cubic-bezier(.22, .88, .2, 1);
}

.sprite-thought.is-cyan {
  border-color: rgba(219, 237, 252, 0.94);
  background: linear-gradient(180deg, rgba(247, 252, 255, 0.96) 0%, rgba(241, 249, 255, 0.94) 100%);
}

.sprite-thought.is-cyan::before {
  border-color: rgba(219, 237, 252, 0.94);
  background: rgba(242, 250, 255, 0.96);
}

.sprite-thought.is-violet {
  border-color: rgba(235, 227, 250, 0.92);
  background: linear-gradient(180deg, rgba(253, 249, 255, 0.96) 0%, rgba(248, 243, 255, 0.94) 100%);
}

.sprite-thought.is-violet::before {
  background: rgba(249, 244, 255, 0.96);
  border-color: rgba(235, 227, 250, 0.92);
}

.think-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.think-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7d95c6;
  opacity: .65;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.think-dots span:nth-child(2) { animation-delay: .15s; }
.think-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes dotBounce {
  0%, 100% { transform: translateY(0) scale(1); opacity: .65; }
  50% { transform: translateY(-2px) scale(1.08); opacity: .9; }
}

.thought-text {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(.22, .88, .2, 1);
  font-weight: 700;
  color: inherit;
}

.sprite-thought.ready .thought-text {
  opacity: 1;
  transform: translateY(0);
}

.sprite-thought.ready .think-dots {
  display: none;
}

@keyframes bubblePopCute {
  0% { transform: translate(0, 0) scale(.9); }
  62% { transform: translate(0, 0) scale(1.035); }
  100% { transform: translate(0, 0) scale(1); }
}

body.workbench-entering:not(.workbench-returning) .hero,
body.workbench-entering:not(.workbench-returning) .module-intro {
  opacity: 0;
  transform: translateY(-18px) scale(.99);
  pointer-events: none;
}

body.in-workbench .hero,
body.in-workbench .module-intro {
  opacity: 0;
  pointer-events: none;
}

/* return path: keep home content visible while workspace fades out */
body.workbench-returning .hero,
body.workbench-returning .module-intro {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition: opacity .56s cubic-bezier(.22, .88, .2, 1), transform .62s cubic-bezier(.22, .88, .2, 1);
}

body.workbench-returning .workspace.show {
  opacity: 0;
  transform: translateY(16px) scale(.992);
  pointer-events: none;
  transition: opacity .56s cubic-bezier(.22, .88, .2, 1), transform .62s cubic-bezier(.22, .88, .2, 1), visibility 0s linear .62s;
}

.module-intro h2 {
  margin: 0 0 38px;
  text-align: center;
  font-size: clamp(1.45rem, 3vw, 2rem);
  color: #1b2438;
}

.module-list {
  display: grid;
  gap: 34px;
}

.module-item {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 34px;
  align-items: center;
  padding-block: 6px;
}

.module-copy h3 {
  margin: 6px 0 10px;
  font-size: 1.3rem;
  color: #1f2a44;
}

.module-copy p {
  margin: 0;
  color: #60739a;
  line-height: 1.85;
}

.module-kicker {
  margin: 0;
  color: #7f8cad;
  font-size: .82rem;
  letter-spacing: .25px;
}

.module-media {
  position: relative;
  border-radius: 14px;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e1e8f6;
  background:
    radial-gradient(90% 100% at 14% 10%, rgba(92, 251, 221, 0.28), transparent 58%),
    radial-gradient(100% 120% at 90% 86%, rgba(110, 130, 255, 0.3), transparent 62%),
    linear-gradient(135deg, #0f1118 0%, #161b29 44%, #111726 100%);
}

.module-media::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.16) 48%, transparent 64%);
  transform: translateX(-56%);
  animation: sheen 3.8s linear infinite;
}

.module-media span {
  position: relative;
  z-index: 1;
  color: #e9efff;
  font-size: .9rem;
  letter-spacing: .45px;
}

@keyframes sheen {
  to { transform: translateX(62%); }
}

@keyframes chipFlow {
  from { transform: translateX(-26px); }
  to { transform: translateX(26px); }
}

@keyframes chipPulse {
  0%, 100% { opacity: .82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes chipRail {
  0% { background-position: 120% 50%; opacity: .74; }
  50% { background-position: 0% 50%; opacity: .98; }
  100% { background-position: -120% 50%; opacity: .74; }
}

@keyframes chipRunner {
  0% { left: -2%; opacity: .86; transform: scale(1); }
  34% { left: 38%; opacity: 1; transform: scale(1.18); }
  68% { left: 76%; opacity: .96; transform: scale(.94); }
  100% { left: 102%; opacity: .78; transform: scale(1); }
}

@keyframes ambientDots {
  0% {
    transform: translate3d(-8px, -10px, 0) scale(1);
    opacity: .5;
  }
  50% {
    transform: translate3d(12px, 6px, 0) scale(1.02);
    opacity: .64;
  }
  100% {
    transform: translate3d(-2px, 14px, 0) scale(1.04);
    opacity: .58;
  }
}

@keyframes ambientGlow {
  0%, 100% { opacity: .82; }
  50% { opacity: .58; }
}

@keyframes orbRoam {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  40% {
    transform: translate3d(14vw, -5vh, 0) scale(1.04);
  }
  70% {
    transform: translate3d(8vw, 7vh, 0) scale(0.98);
  }
  100% {
    transform: translate3d(20vw, -2vh, 0) scale(1.03);
  }
}

@keyframes orbBreath {
  0%, 100% { opacity: .38; }
  50% { opacity: .56; }
}

@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spriteBlink {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

@keyframes spriteSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .hero {
    margin-top: 108px;
    margin-bottom: 72px;
  }
  .hero h1 { padding: 14px 16px; }
  .chip-links { inset: -8px -14px; }
  .float-sprite {
    width: 56px;
    height: 56px;
    opacity: .74;
  }
  .float-sprite.sprite-alt {
    width: 62px;
    height: 62px;
    opacity: .68;
  }
  .bg-orb {
    left: -12%;
    top: 66%;
    width: clamp(180px, 46vw, 280px);
    height: clamp(180px, 46vw, 280px);
    opacity: .34;
  }
  .module-intro {
    margin-top: 92px;
    margin-bottom: 88px;
  }
  .module-item {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .module-media { min-height: 190px; }
}

/* ---- workbench consolidated styles ---- */
body.in-workbench .workspace,
body.workbench-entering .workspace {
  --chat-side-pad: clamp(132px, 18vw, 332px);
  --chat-input-width: min(800px, calc(100% - clamp(240px, 30vw, 520px)));
  --user-inline-offset: clamp(34px, 4.2vw, 78px);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 0;
  padding: 10px 16px 0;
  background:
    radial-gradient(34% 26% at 14% 82%, rgba(102, 229, 255, 0.14), transparent 72%),
    radial-gradient(32% 22% at 82% 42%, rgba(153, 128, 255, 0.14), transparent 74%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.94) 0%, rgba(243, 247, 253, 0.92) 100%);
  overscroll-behavior: none;
}

body.in-workbench.models-collapsed .workspace,
body.workbench-entering.models-collapsed .workspace {
  --chat-side-pad: clamp(200px, 23vw, 500px);
  --chat-input-width: min(860px, calc(100% - 24px));
  --user-inline-offset: clamp(46px, 5vw, 96px);
  grid-template-columns: minmax(0, 1fr);
}

body.in-workbench,
body.workbench-entering {
  overflow: hidden;
}

/* left sidebar */
body.in-workbench .workspace .models,
body.workbench-entering .workspace .models {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  margin-top: 0;
  border-top: none;
  border-right: 1px solid rgba(219, 228, 245, 0.88);
  padding: 8px 0 0;
  background: rgba(250, 252, 255, 0.42);
}

body.in-workbench.models-collapsed .workspace .models,
body.workbench-entering.models-collapsed .workspace .models {
  display: none;
}

body.in-workbench .workspace .head,
body.workbench-entering .workspace .head {
  padding: 4px 14px 8px;
  margin-bottom: 6px;
}

body.in-workbench .workspace .head h2,
body.workbench-entering .workspace .head h2 {
  font-size: .94rem;
  letter-spacing: .2px;
  color: #213968;
}

body.in-workbench .workspace #count,
body.workbench-entering .workspace #count {
  font-size: .7rem;
  color: #8fa1c4;
}

/* moved search in sidebar */
body.in-workbench .workspace .top,
body.workbench-entering .workspace .top,
body.in-workbench .workspace .logo,
body.workbench-entering .workspace .logo {
  display: none;
}

body.in-workbench .workspace .models .side-search,
body.workbench-entering .workspace .models .side-search {
  width: 100%;
  margin: 0;
  padding: 8px 12px 16px;
}

body.in-workbench .workspace .models .side-search input,
body.workbench-entering .workspace .models .side-search input {
  width: 100%;
  border: 1px solid #d8e3f6;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 30px 8px 10px;
  box-shadow: 0 3px 10px rgba(45, 73, 126, 0.06);
  font-size: .82rem;
  color: #2f456f;
}

body.in-workbench .workspace .models .side-search input::placeholder,
body.workbench-entering .workspace .models .side-search input::placeholder {
  font-size: .78rem;
  color: #8ea0be;
  font-weight: 500;
  letter-spacing: .12px;
}

body.in-workbench .workspace .models .side-search span,
body.workbench-entering .workspace .models .side-search span {
  right: 16px;
  color: #95a3bf;
  font-size: 1.08rem;
}

body.in-workbench .workspace .cards,
body.workbench-entering .workspace .cards {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 2px;
  padding: 0 8px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.in-workbench .workspace .cards::-webkit-scrollbar,
body.workbench-entering .workspace .cards::-webkit-scrollbar {
  display: none;
}

body.in-workbench .workspace .card,
body.workbench-entering .workspace .card {
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 10px;
  padding: 10px 10px 11px;
  cursor: pointer;
}

body.in-workbench .workspace .card:hover,
body.workbench-entering .workspace .card:hover {
  background: rgba(240, 245, 253, 0.55);
}

body.in-workbench .workspace .card.active,
body.workbench-entering .workspace .card.active {
  background: rgba(237, 243, 255, 0.62);
}

body.in-workbench .workspace .card.active::after,
body.workbench-entering .workspace .card.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8fb1ff, #b7c8ff);
}

body.in-workbench .workspace .card h3,
body.workbench-entering .workspace .card h3 {
  font-size: .87rem;
  color: #2f4f97;
}

body.in-workbench .workspace .card .desc,
body.workbench-entering .workspace .card .desc,
body.in-workbench .workspace .card button,
body.workbench-entering .workspace .card button {
  display: none;
}

body.in-workbench .workspace .badge,
body.workbench-entering .workspace .badge {
  border: none;
  background: transparent;
  padding: 0;
  font-size: .68rem;
  color: #8b9ab8;
}

/* right content area */
body.in-workbench .workspace .nav,
body.workbench-entering .workspace .nav {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  margin: 0;
  border-top: none;
  border-bottom: 1px solid #dce6f7;
  background: rgba(246, 250, 255, 0.72);
  padding: 0;
}

body.in-workbench.models-collapsed .workspace .nav,
body.workbench-entering.models-collapsed .workspace .nav {
  grid-column: 1;
}

body.in-workbench .workspace .nav button,
body.workbench-entering .workspace .nav button {
  border-radius: 0;
  font-size: .79rem;
  font-weight: 600;
  padding: 11px 8px;
  color: #5d729b;
}

body.in-workbench .workspace .nav button.active,
body.workbench-entering .workspace .nav button.active {
  color: #2a4a96;
  background: rgba(235, 243, 255, 0.62);
}

body.in-workbench .workspace .chat,
body.workbench-entering .workspace .chat {
  grid-column: 2;
  grid-row: 3;
  width: 100%;
  min-height: 0;
  height: calc(100vh - 188px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0;
  position: relative;
}

body.in-workbench.models-collapsed .workspace .chat,
body.workbench-entering.models-collapsed .workspace .chat {
  grid-column: 1;
}

/* motion profile: mellow */
body {
  --motion-enter-y: 10px;
  --motion-enter-scale: .992;
  --motion-enter-opacity-dur: .42s;
  --motion-enter-transform-dur: .5s;
  --motion-delay-nav: 40ms;
  --motion-delay-session: 80ms;
  --motion-delay-sel: 105ms;
  --motion-delay-box: 120ms;
  --motion-delay-input: 150ms;
  --motion-msg-y: 8px;
  --motion-msg-scale: .985;
  --motion-msg-opacity-dur: .24s;
  --motion-msg-transform-dur: .28s;
}

/* smoother staged reveal for workbench modules */
body.workbench-entering .workspace .models,
body.workbench-entering .workspace .nav,
body.workbench-entering .workspace .session-bar,
body.workbench-entering .workspace .chat > .sel,
body.workbench-entering .workspace .box,
body.workbench-entering .workspace .input {
  opacity: 0;
  transform: translateY(var(--motion-enter-y)) scale(var(--motion-enter-scale));
  will-change: opacity, transform;
}

body.in-workbench .workspace .models,
body.workbench-entering .workspace .models,
body.in-workbench .workspace .nav,
body.workbench-entering .workspace .nav,
body.in-workbench .workspace .session-bar,
body.workbench-entering .workspace .session-bar,
body.in-workbench .workspace .chat > .sel,
body.workbench-entering .workspace .chat > .sel,
body.in-workbench .workspace .box,
body.workbench-entering .workspace .box,
body.in-workbench .workspace .input,
body.workbench-entering .workspace .input {
  transition: opacity var(--motion-enter-opacity-dur) cubic-bezier(.22, .88, .2, 1), transform var(--motion-enter-transform-dur) cubic-bezier(.22, .88, .2, 1);
}

body.in-workbench .workspace .models,
body.in-workbench .workspace .nav,
body.in-workbench .workspace .session-bar,
body.in-workbench .workspace .chat > .sel,
body.in-workbench .workspace .box,
body.in-workbench .workspace .input {
  opacity: 1;
  transform: none;
}

body.in-workbench .workspace .nav { transition-delay: var(--motion-delay-nav); }
body.in-workbench .workspace .session-bar { transition-delay: var(--motion-delay-session); }
body.in-workbench .workspace .chat > .sel { transition-delay: var(--motion-delay-sel); }
body.in-workbench .workspace .box { transition-delay: var(--motion-delay-box); }
body.in-workbench .workspace .input { transition-delay: var(--motion-delay-input); }

body.in-workbench,
body.workbench-entering {
  overflow: hidden;
}

body.in-workbench .workspace .chat-head,
body.workbench-entering .workspace .chat-head,
body.in-workbench .workspace .session-bar,
body.workbench-entering .workspace .session-bar,
body.in-workbench .workspace .box,
body.workbench-entering .workspace .box,
body.in-workbench .workspace .input,
body.workbench-entering .workspace .input {
  width: 100%;
  margin: 0;
}

/* model selector at right top in chat page */
body.in-workbench .workspace .chat-head,
body.workbench-entering .workspace .chat-head {
  display: none !important;
}

/* second nav: sessions */
body.in-workbench .workspace .session-bar,
body.workbench-entering .workspace .session-bar {
  grid-row: 1;
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 8px 12px 0;
  background: rgba(250, 252, 255, 0.78);
  border-bottom: 1px solid #e4ebf8;
  position: relative;
}

body.in-workbench .workspace .billing-strip,
body.workbench-entering .workspace .billing-strip {
  width: min(760px, calc(100% - 34px));
  margin: 6px auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.76rem;
  color: #5e7298;
  user-select: none;
}

body.in-workbench .workspace .billing-strip .billing-label,
body.workbench-entering .workspace .billing-strip .billing-label {
  color: #8ea0bf;
}

body.in-workbench .workspace .billing-strip .billing-points,
body.workbench-entering .workspace .billing-strip .billing-points {
  color: #355392;
  font-weight: 700;
  letter-spacing: 0.2px;
}

body.in-workbench .workspace .billing-strip .billing-topup-btn,
body.workbench-entering .workspace .billing-strip .billing-topup-btn {
  border: 1px solid #d5e2f6;
  background: rgba(255, 255, 255, 0.8);
  color: #4c6493;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  cursor: pointer;
}

body.in-workbench .workspace .billing-strip.ready .billing-points,
body.workbench-entering .workspace .billing-strip.ready .billing-points {
  color: #2f4f98;
}

body.in-workbench .workspace .billing-strip.is-low .billing-points,
body.workbench-entering .workspace .billing-strip.is-low .billing-points {
  color: #c54d58;
}

body.in-workbench .workspace .chat > .sel,
body.workbench-entering .workspace .chat > .sel {
  position: absolute;
  top: 56px;
  right: clamp(22px, 3vw, 34px);
  z-index: 14;
  width: auto;
  margin: 0;
}

body.in-workbench .workspace .chat > .sel .sel-btn,
body.workbench-entering .workspace .chat > .sel .sel-btn {
  width: auto;
  display: inline-flex;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #5a6f96;
  border-radius: 0;
  padding: 4px 2px;
  font-weight: 600;
  outline: none;
}

body.in-workbench .workspace .chat > .sel .sel-btn:hover,
body.workbench-entering .workspace .chat > .sel .sel-btn:hover,
body.in-workbench .workspace .chat > .sel .sel-btn:focus,
body.workbench-entering .workspace .chat > .sel .sel-btn:focus,
body.in-workbench .workspace .chat > .sel .sel-btn:focus-visible,
body.workbench-entering .workspace .chat > .sel .sel-btn:focus-visible {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
  color: #405c93;
}

body.in-workbench .workspace .session-list,
body.workbench-entering .workspace .session-list {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.in-workbench .workspace .session-list::-webkit-scrollbar,
body.workbench-entering .workspace .session-list::-webkit-scrollbar {
  display: none;
}

/* fade edges for tab strip */
body.in-workbench .workspace .session-bar::before,
body.workbench-entering .workspace .session-bar::before,
body.in-workbench .workspace .session-bar::after,
body.workbench-entering .workspace .session-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  pointer-events: none;
  z-index: 2;
}

body.in-workbench .workspace .session-bar::before,
body.workbench-entering .workspace .session-bar::before {
  left: 56px;
  background: linear-gradient(90deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0) 100%);
}

body.in-workbench .workspace .session-bar::after,
body.workbench-entering .workspace .session-bar::after {
  right: 56px;
  background: linear-gradient(270deg, rgba(248, 251, 255, 0.96) 0%, rgba(248, 251, 255, 0) 100%);
}

body.in-workbench .workspace .session-tab,
body.workbench-entering .workspace .session-tab {
  position: relative;
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #7a8fb8;
  font-size: .78rem;
  font-weight: 600;
}

body.in-workbench .workspace .session-list.single .session-tab,
body.workbench-entering .workspace .session-list.single .session-tab {
  flex: 1 1 auto;
}

body.in-workbench .workspace .session-tab::after,
body.workbench-entering .workspace .session-tab::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

body.in-workbench .workspace .session-tab.active,
body.workbench-entering .workspace .session-tab.active {
  color: #2a4a96;
}

body.in-workbench .workspace .session-tab.active::after,
body.workbench-entering .workspace .session-tab.active::after {
  background: linear-gradient(90deg, #8fb1ff, #b7c8ff);
}

body.in-workbench .workspace .session-tab-label,
body.workbench-entering .workspace .session-tab-label {
  flex: 0 1 auto;
  text-align: center;
}

body.in-workbench .workspace .session-tab-close,
body.workbench-entering .workspace .session-tab-close {
  position: static;
  width: 14px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  opacity: 0;
  transform: scale(.75);
  pointer-events: none;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2, .84, .24, 1), background .18s ease;
  color: #a3afc5;
}

body.in-workbench .workspace .session-tab:hover .session-tab-close,
body.workbench-entering .workspace .session-tab:hover .session-tab-close,
body.in-workbench .workspace .session-tab:focus-within .session-tab-close,
body.workbench-entering .workspace .session-tab:focus-within .session-tab-close {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

body.in-workbench .workspace .session-add,
body.workbench-entering .workspace .session-add {
  margin-left: 0;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6f83ab;
  font-size: 1.15rem;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  padding: 0;
  transition: transform .22s ease, color .22s ease;
  position: relative;
  z-index: 4;
}

body.in-workbench .workspace .models-toggle-btn,
body.workbench-entering .workspace .models-toggle-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6f83ab;
  font-size: 0;
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  transition: color .22s ease, transform .22s ease, opacity .2s ease;
  position: relative;
  z-index: 4;
}

body.in-workbench .workspace .models-toggle-btn::before,
body.workbench-entering .workspace .models-toggle-btn::before {
  content: "👁";
  font-size: 1rem;
  line-height: 1;
}

body.in-workbench .workspace .models-toggle-btn.is-collapsed,
body.workbench-entering .workspace .models-toggle-btn.is-collapsed {
  opacity: .58;
}

body.in-workbench .workspace .session-add:hover,
body.workbench-entering .workspace .session-add:hover {
  color: #2f4f97;
  transform: rotate(90deg) scale(1.08);
}

body.in-workbench .workspace .models-toggle-btn:hover,
body.workbench-entering .workspace .models-toggle-btn:hover {
  color: #2f4f97;
  transform: scale(1.08);
  opacity: 1;
}

body.in-workbench .workspace .session-add.add-pop,
body.workbench-entering .workspace .session-add.add-pop {
  animation: addSessionPop .26s cubic-bezier(.2, .84, .24, 1);
}

@keyframes addSessionPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* message area */
body.in-workbench .workspace .box,
body.workbench-entering .workspace .box {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  align-items: stretch;
  padding: 30px 14px 112px;
  padding-left: var(--chat-side-pad);
  padding-right: var(--chat-side-pad);
}

body.in-workbench .workspace .box::-webkit-scrollbar,
body.workbench-entering .workspace .box::-webkit-scrollbar {
  display: none;
}

body.in-workbench .workspace .box .msg,
body.workbench-entering .workspace .box .msg {
  width: fit-content;
  min-width: 0;
  max-width: 68%;
  border: none;
  box-shadow: none;
  line-height: 1.72;
}

.msg-enter {
  opacity: 0;
  transform: translateY(var(--motion-msg-y)) scale(var(--motion-msg-scale));
}

.msg-enter.msg-enter-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity var(--motion-msg-opacity-dur) cubic-bezier(.22, .88, .2, 1), transform var(--motion-msg-transform-dur) cubic-bezier(.22, .88, .2, 1);
}

body.in-workbench .workspace .box .msg.ai,
body.workbench-entering .workspace .box .msg.ai {
  max-width: 70%;
  align-self: flex-start;
  text-align: left;
  background: transparent;
  color: #31466f;
}

body.in-workbench .workspace .box .msg.user,
body.workbench-entering .workspace .box .msg.user {
  max-width: 52%;
  align-self: flex-end;
  margin-right: var(--user-inline-offset);
  text-align: right;
  background: linear-gradient(180deg, #eef2f7 0%, #e7edf4 100%);
  border: 1px solid #dce3ec;
  border-radius: 12px;
  color: #2f456f;
  padding: 10px 12px;
}

.msg.user .msg-meta,
.msg-avatar.user {
  display: none;
}

.msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: .76rem;
  font-weight: 700;
  border: 1px solid #d7e1f4;
  color: #5f7399;
  background: #f4f7fd;
}

.msg-avatar.ai {
  background: #eef3ff;
  color: #3a5696;
}

.msg-name {
  font-size: .84rem;
  color: #7288b3;
  letter-spacing: .1px;
  font-weight: 600;
}

.msg-body {
  line-height: 1.72;
  font-size: .92rem;
  text-align: left;
}

.msg.user .msg-body {
  text-align: right;
}

.msg-rich-text p {
  margin: 0 0 10px;
}

.msg-rich-text p:last-child {
  margin-bottom: 0;
}

.msg-rich-text ul,
.msg-rich-text ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.msg-rich-text li {
  margin: 3px 0;
}

.msg-rich-text code {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(122, 149, 201, 0.14);
  font-size: 0.86em;
}

.msg-rich-text .msg-block-heading {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.42;
  color: #2b4a88;
}

.msg-rich-text .msg-block-code {
  margin: 0 0 10px;
  padding: 30px 10px 8px;
  border-radius: 10px;
  background: rgba(231, 240, 255, 0.72);
  border: 1px solid rgba(201, 217, 243, 0.9);
  overflow-x: auto;
  position: relative;
}

.msg-rich-text .msg-block-code code {
  display: inline;
  padding: 0;
  background: transparent;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-rich-text .msg-block-code .code-lang {
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: #5c76a7;
  letter-spacing: 0.2px;
}

.msg-rich-text .code-copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 1px solid rgba(183, 201, 234, 0.92);
  background: rgba(249, 252, 255, 0.9);
  color: #4c669b;
  border-radius: 8px;
  font-size: 0.68rem;
  padding: 2px 7px;
  cursor: pointer;
}

.msg-rich-text .code-copy-btn:hover {
  background: rgba(239, 247, 255, 0.96);
  color: #35599a;
}

.msg-rich-text .msg-block-quote {
  margin: 0 0 10px;
  padding: 4px 0 4px 10px;
  border-left: 3px solid rgba(137, 164, 214, 0.75);
  color: #4e6798;
}

.msg-rich-text .msg-block-divider {
  border: none;
  border-top: 1px dashed rgba(154, 177, 220, 0.7);
  margin: 10px 0;
}

.msg-rich-text .msg-block-table-wrap {
  overflow-x: auto;
  margin: 0 0 10px;
}

.msg-rich-text .msg-block-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.msg-rich-text .msg-block-table th,
.msg-rich-text .msg-block-table td {
  border: 1px solid rgba(200, 216, 241, 0.9);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.msg-rich-text .msg-block-table th {
  background: rgba(236, 244, 255, 0.85);
  color: #395b98;
  font-weight: 700;
}

.msg.pending .msg-body {
  opacity: .86;
  white-space: nowrap;
}

.msg.ai.pending .msg-body::after {
  content: "...";
  display: inline-block;
  margin-left: 2px;
  letter-spacing: 1px;
  animation: aiThinkingDots 1s ease-in-out infinite;
}

@keyframes aiThinkingDots {
  0% { opacity: .4; transform: translateY(0); }
  33% { opacity: 1; transform: translateY(-2px); }
  66% { opacity: .8; transform: translateY(0); }
  100% { opacity: .4; transform: translateY(0); }
}

/* input area */
.input-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8a95ab;
  padding: 0;
  width: auto;
  height: auto;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease;
}

.tool-btn:hover,
.tool-btn.active {
  color: #66748f;
}

body.in-workbench .workspace .input,
body.workbench-entering .workspace .input {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "draft"
    "field"
    "tools";
  align-items: start;
  gap: 6px;
  padding: 10px 14px 10px;
  border: 1px solid #dce6f7;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(243, 247, 253, 0.94) 100%);
  box-shadow: 0 8px 20px rgba(35, 62, 106, 0.07);
  position: sticky;
  bottom: 0;
  z-index: 12;
  width: var(--chat-input-width);
  justify-self: center;
}

.guide-example-title {
  margin-bottom: 8px;
  color: #7188b0;
  font-size: 0.84rem;
}

.draft-media {
  grid-area: draft;
  display: none;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 0;
}

.draft-media.show {
  display: inline-flex;
}

.draft-chip {
  border: 1px solid #d9e4f7;
  background: rgba(243, 248, 255, 0.95);
  color: #4f6590;
  border-radius: 10px;
  font-size: .72rem;
  padding: 3px 6px 3px 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.draft-chip:hover {
  background: rgba(233, 241, 255, 0.95);
  border-color: #c6d7f3;
  color: #3f5f99;
}

.draft-thumb {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(214, 226, 248, 0.6);
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
}

.draft-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.draft-thumb-video {
  font-size: .82rem;
  color: #5f77a7;
}

.draft-chip-close {
  opacity: .8;
  font-size: .82rem;
  margin-left: -2px;
}

.msg-media {
  width: 100%;
}

.msg-media img {
  width: 220px;
  height: 220px;
  max-width: min(56vw, 220px);
  max-height: min(56vw, 220px);
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(206, 219, 242, 0.92);
}

.msg-media video {
  width: 240px;
  max-width: min(58vw, 240px);
  border-radius: 12px;
  display: block;
}

.guide-example-panel {
  width: min(70%, 760px);
  margin: 6px 0 0;
  padding: 4px 0 0;
  border: none;
  background: transparent;
  align-self: flex-start;
}

.guide-example-group {
  margin-top: 8px;
}

.guide-example-group h5 {
  margin: 0 0 4px;
  font-size: 0.74rem;
  color: #8a9ec2;
  font-weight: 600;
  letter-spacing: 0.18px;
}

.guide-example-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-example-btn {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #6e83ad;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 6px 0;
  cursor: pointer;
  transition: color .16s ease;
}

.guide-example-btn:hover {
  color: #3f5f99;
}

.guide-refresh-btn {
  margin-top: 10px;
  border: none;
  background: transparent;
  color: #5a73a4;
  border-radius: 0;
  padding: 2px 0;
  font-size: 0.72rem;
  cursor: pointer;
  position: relative;
}

.guide-refresh-icon {
  margin-right: 4px;
}

.guide-refresh-badge {
  margin-left: 5px;
  font-size: 0.62rem;
  color: #7f9ce0;
}

body.in-workbench .workspace .input .input-tools,
body.workbench-entering .workspace .input .input-tools {
  grid-area: tools;
}

body.in-workbench .workspace .input input,
body.workbench-entering .workspace .input input {
  grid-area: field;
  height: 38px;
  padding: 8px 2px;
  font-size: .98rem;
  color: #2a416f;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.in-workbench .workspace .input input::placeholder,
body.workbench-entering .workspace .input input::placeholder {
  color: #97a6c3;
}

body.in-workbench .workspace .input input:focus::placeholder,
body.workbench-entering .workspace .input input:focus::placeholder {
  color: transparent;
}

body.in-workbench .workspace .chat .scroll-bottom-btn,
body.workbench-entering .workspace .chat .scroll-bottom-btn {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 92px;
  width: 30px;
  height: 36px;
  border: 1px solid rgba(208, 220, 242, 0.96);
  border-radius: 58% 58% 66% 66% / 48% 48% 72% 72%;
  background: linear-gradient(180deg, rgba(249, 252, 255, 0.98) 0%, rgba(234, 242, 255, 0.96) 100%);
  color: #5f79ac;
  box-shadow: 0 8px 16px rgba(35, 62, 106, 0.1);
  font-size: .92rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  z-index: 13;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .22s ease, color .18s ease, border-color .18s ease, box-shadow .2s ease;
}

body.in-workbench .workspace .chat .scroll-bottom-btn::before,
body.workbench-entering .workspace .chat .scroll-bottom-btn::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 8px;
  width: 8px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

body.in-workbench .workspace .chat .scroll-bottom-btn.show,
body.workbench-entering .workspace .chat .scroll-bottom-btn.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  animation: jellyDrop 1.7s ease-in-out infinite;
}

body.in-workbench .workspace .chat .scroll-bottom-btn:hover,
body.workbench-entering .workspace .chat .scroll-bottom-btn:hover {
  color: #4f6798;
  border-color: rgba(188, 204, 235, 0.98);
  box-shadow: 0 10px 18px rgba(35, 62, 106, 0.13);
}

@keyframes jellyDrop {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  35% { transform: translate(-50%, -1px) scale(1.04, 0.96); }
  65% { transform: translate(-50%, 1px) scale(0.97, 1.03); }
}

.icon-btn {
  font-size: 0;
}

.icon-btn::before {
  font-size: 1rem;
  line-height: 1;
}

.icon-image::before {
  content: "+";
  font-weight: 500;
  font-size: 1.2rem;
}

.icon-video::before { content: "✧"; }
.icon-voice::before { content: "🎙"; font-size: .92rem; }
.icon-voice.active::before { content: "■"; font-size: .62rem; }

/* keep sprite same in workbench */
body.in-workbench .float-sprite,
body.workbench-entering .float-sprite {
  z-index: 36;
  opacity: .88;
}

body.in-workbench .float-sprite.sprite-alt,
body.workbench-entering .float-sprite.sprite-alt {
  opacity: .8;
}

@media (max-width: 980px) {
  body.in-workbench .workspace,
  body.workbench-entering .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    row-gap: 0;
    padding: 10px 10px 0;
  }

  body.in-workbench.models-collapsed .workspace,
  body.workbench-entering.models-collapsed .workspace {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  body.in-workbench .workspace .models,
  body.workbench-entering .workspace .models {
    grid-column: 1;
    grid-row: 4;
    border-right: none;
    border-top: 1px solid #edf1f8;
    margin-top: 10px;
    padding-top: 10px;
  }

  body.in-workbench .workspace .nav,
  body.workbench-entering .workspace .nav {
    grid-column: 1;
    grid-row: 2;
  }

  body.in-workbench .workspace .chat,
  body.workbench-entering .workspace .chat {
    grid-column: 1;
    grid-row: 3;
    height: calc(100vh - 210px);
  }

  body.in-workbench .workspace .chat > .sel,
  body.workbench-entering .workspace .chat > .sel {
    top: 50px;
    right: 16px;
  }

  body.in-workbench .workspace .session-bar,
  body.workbench-entering .workspace .session-bar {
    padding-right: 12px;
  }

  body.in-workbench .workspace .box {
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 26px;
    padding-bottom: 108px;
  }

  body.in-workbench .workspace .input,
  body.workbench-entering .workspace .input {
    width: calc(100% - 16px);
    bottom: 0;
  }

  body.in-workbench .workspace .chat .scroll-bottom-btn,
  body.workbench-entering .workspace .chat .scroll-bottom-btn {
    left: 50%;
    right: auto;
    bottom: 82px;
  }

  body.in-workbench .workspace .box .msg.ai,
  body.workbench-entering .workspace .box .msg.ai,
  body.in-workbench .workspace .box .msg.user,
  body.workbench-entering .workspace .box .msg.user {
    max-width: 88%;
  }

  body.in-workbench .workspace .box .msg.user,
  body.workbench-entering .workspace .box .msg.user {
    margin-right: 0;
  }

  .guide-example-panel {
    width: 100%;
  }

  body.in-workbench .workspace .session-bar::before,
  body.workbench-entering .workspace .session-bar::before {
    left: 52px;
    width: 14px;
  }

  body.in-workbench .workspace .session-bar::after,
  body.workbench-entering .workspace .session-bar::after {
    right: 44px;
    width: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace *,
  .sprite-thought,
  .scroll-bottom-btn {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- day/night switch ---- */
.site-mode-toggle {
  border: 1px solid #d7e2f3;
  background: rgba(255, 255, 255, 0.92);
  color: #3f5788;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.site-mode-toggle:hover {
  background: #f0f5ff;
  color: #2f4f97;
  border-color: #c7d7f0;
}

body.theme-night {
  color: #e3e8ff;
  background: #070a16;
}

body.theme-night .bg {
  background:
    radial-gradient(56% 42% at 14% 88%, rgba(67, 179, 255, 0.24), transparent 70%),
    radial-gradient(50% 40% at 88% 16%, rgba(170, 96, 255, 0.24), transparent 75%),
    radial-gradient(24% 20% at 50% 8%, rgba(83, 120, 255, 0.18), transparent 82%),
    linear-gradient(180deg, #090f22 0%, #070b18 100%);
}

body.theme-night .bg::before {
  content: none;
}

body.theme-night .bg::after {
  animation: ambientGlow 16s ease-in-out infinite;
}

body.theme-night .site-header {
  background: rgba(12, 22, 48, 0.78);
  border-color: rgba(106, 129, 196, 0.3);
  box-shadow: 0 12px 28px rgba(6, 10, 24, 0.52), 0 0 0 1px rgba(95, 130, 255, 0.1) inset;
}

body.theme-night .site-brand-text,
body.theme-night .hero-title-text,
body.theme-night .hero p {
  color: #dce7ff;
}

body.theme-night .site-link {
  color: #bfccf5;
}

body.theme-night .site-link:hover {
  color: #eff4ff;
  text-shadow: 0 0 10px rgba(122, 174, 255, 0.45);
}

body.theme-night .account-popover {
  border-color: rgba(123, 148, 220, 0.45);
  background: rgba(16, 26, 49, 0.98);
  box-shadow: 0 14px 30px rgba(2, 8, 19, 0.5);
}

body.theme-night .account-popover button {
  color: #d2e0ff;
}

body.theme-night .account-popover button:hover {
  background: rgba(94, 126, 214, 0.25);
}

body.theme-night .backend-pill {
  border-color: rgba(118, 143, 214, 0.45);
  background: rgba(23, 36, 69, 0.88);
  color: #c6d7ff;
}

body.theme-night .backend-pill.is-ok {
  border-color: rgba(89, 181, 133, 0.55);
  background: rgba(22, 66, 46, 0.72);
  color: #c9f7de;
}

body.theme-night .backend-pill.is-warn {
  border-color: rgba(221, 144, 102, 0.62);
  background: rgba(94, 52, 30, 0.72);
  color: #ffd9c0;
}

body.theme-night .site-cta {
  background: linear-gradient(145deg, #3250b9 0%, #7a46df 100%);
  color: #e9f1ff;
  box-shadow: 0 8px 20px rgba(83, 116, 255, 0.35);
}

body.theme-night .site-mode-toggle {
  background: rgba(20, 34, 70, 0.9);
  border-color: rgba(112, 138, 215, 0.5);
  color: #d1dcff;
}

body.theme-night .site-mode-toggle:hover {
  background: rgba(36, 55, 94, 0.95);
  color: #f0f4ff;
}

body.theme-night .module-intro h2 {
  color: #dce7ff;
}

body.theme-night.in-workbench .workspace,
body.theme-night.workbench-entering .workspace {
  background:
    radial-gradient(38% 30% at 14% 84%, rgba(71, 194, 255, 0.2), transparent 74%),
    radial-gradient(34% 24% at 84% 30%, rgba(178, 109, 255, 0.22), transparent 78%),
    linear-gradient(180deg, rgba(12, 21, 48, 0.95) 0%, rgba(10, 16, 36, 0.96) 100%);
}

body.theme-night.in-workbench .workspace .models,
body.theme-night.workbench-entering .workspace .models {
  background: rgba(18, 30, 62, 0.54);
  border-right-color: rgba(98, 121, 190, 0.5);
}

body.theme-night.in-workbench .workspace .nav,
body.theme-night.workbench-entering .workspace .nav,
body.theme-night.in-workbench .workspace .session-bar,
body.theme-night.workbench-entering .workspace .session-bar {
  background: rgba(19, 32, 66, 0.76);
  border-color: rgba(101, 123, 186, 0.38);
}

body.theme-night.in-workbench .workspace .billing-strip,
body.theme-night.workbench-entering .workspace .billing-strip {
  color: #9fb4df;
}

body.theme-night.in-workbench .workspace .billing-strip .billing-label,
body.theme-night.workbench-entering .workspace .billing-strip .billing-label {
  color: #859dcb;
}

body.theme-night.in-workbench .workspace .billing-strip .billing-points,
body.theme-night.workbench-entering .workspace .billing-strip .billing-points {
  color: #d8e6ff;
}

body.theme-night.in-workbench .workspace .billing-strip .billing-topup-btn,
body.theme-night.workbench-entering .workspace .billing-strip .billing-topup-btn {
  border-color: rgba(111, 135, 204, 0.44);
  background: rgba(34, 51, 93, 0.66);
  color: #c1d3ff;
}

body.theme-night.in-workbench .workspace .session-tab,
body.theme-night.workbench-entering .workspace .session-tab {
  color: #aac0ea;
}

body.theme-night.in-workbench .workspace .session-tab.session-tab-more,
body.theme-night.workbench-entering .workspace .session-tab.session-tab-more {
  border-style: dashed;
  color: #bfd3ff;
}

body.theme-night.in-workbench .workspace .session-tab.session-tab-loading,
body.theme-night.workbench-entering .workspace .session-tab.session-tab-loading {
  color: #9fb7ea;
  background: rgba(38, 57, 103, 0.82);
}

body.theme-night.in-workbench .workspace .session-tab.active,
body.theme-night.workbench-entering .workspace .session-tab.active {
  color: #e5edff;
  text-shadow: 0 0 10px rgba(136, 172, 255, 0.42);
}

body.theme-night.in-workbench .workspace .chat > .sel .sel-btn,
body.theme-night.workbench-entering .workspace .chat > .sel .sel-btn {
  color: #ccdafd;
}

body.theme-night.in-workbench .workspace .box .msg.ai,
body.theme-night.workbench-entering .workspace .box .msg.ai {
  color: #dbe6ff;
}

body.theme-night .msg-rich-text .msg-block-heading {
  color: #dbe8ff;
}

body.theme-night .msg-rich-text .msg-block-code {
  background: rgba(39, 56, 98, 0.72);
  border-color: rgba(93, 118, 185, 0.58);
}

body.theme-night .msg-rich-text .msg-block-code .code-lang {
  color: #9eb8ea;
}

body.theme-night .msg-rich-text .code-copy-btn {
  border-color: rgba(110, 137, 205, 0.58);
  background: rgba(32, 49, 88, 0.82);
  color: #c6d8ff;
}

body.theme-night .msg-rich-text .msg-block-quote {
  border-left-color: rgba(130, 160, 230, 0.72);
  color: #b9cff8;
}

body.theme-night .msg-rich-text .msg-block-divider {
  border-top-color: rgba(107, 132, 194, 0.65);
}

body.theme-night .msg-rich-text .msg-block-table th,
body.theme-night .msg-rich-text .msg-block-table td {
  border-color: rgba(89, 111, 172, 0.65);
}

body.theme-night .msg-rich-text .msg-block-table th {
  background: rgba(41, 60, 106, 0.74);
  color: #d8e6ff;
}

body.theme-night.in-workbench .workspace .box .msg.user,
body.theme-night.workbench-entering .workspace .box .msg.user {
  background: linear-gradient(180deg, #3a3c86 0%, #2d2f68 100%);
  border-color: #5968b2;
  color: #e3ebff;
  box-shadow: 0 6px 14px rgba(74, 89, 188, 0.26);
}

body.theme-night.in-workbench .workspace .input,
body.theme-night.workbench-entering .workspace .input {
  background: linear-gradient(180deg, rgba(30, 45, 86, 0.92) 0%, rgba(22, 34, 66, 0.95) 100%);
  border-color: rgba(98, 120, 188, 0.58);
  box-shadow: 0 8px 22px rgba(6, 10, 24, 0.5), 0 0 0 1px rgba(112, 144, 235, 0.12) inset;
}

body.theme-night.in-workbench .workspace .input input,
body.theme-night.workbench-entering .workspace .input input {
  color: #d3e0fc;
}

body.theme-night.in-workbench .workspace .input input::placeholder,
body.theme-night.workbench-entering .workspace .input input::placeholder {
  color: #9eb1da;
}

body.theme-night .guide-example-title {
  color: #9fb7e5;
}

body.theme-night .guide-example-group h5 {
  color: #89a2d6;
}

body.theme-night .guide-example-panel {
  border: none;
  background: transparent;
}

body.theme-night .guide-example-btn {
  border: none;
  background: transparent;
  color: #9cb4e2;
}

body.theme-night .guide-example-btn:hover {
  color: #d7e6ff;
}

body.theme-night .guide-refresh-btn {
  border: none;
  background: transparent;
  color: #bdd1fb;
}

body.theme-night .msg-history-more-btn {
  border-color: rgba(125, 150, 220, 0.55);
  background: rgba(31, 46, 85, 0.86);
  color: #d3e2ff;
}

body.theme-night .msg-history-more-btn.msg-history-warn {
  border-color: rgba(219, 146, 97, 0.6);
  background: rgba(93, 53, 30, 0.62);
  color: #ffd9c0;
}

body.theme-night .draft-chip {
  border-color: rgba(111, 135, 204, 0.44);
  background: rgba(34, 51, 93, 0.66);
  color: #c6d8ff;
}

body.theme-night .draft-thumb {
  background: rgba(67, 90, 146, 0.46);
}

body.theme-night.in-workbench .workspace .models-toggle-btn,
body.theme-night.workbench-entering .workspace .models-toggle-btn {
  border: none;
  background: transparent;
  color: #c6d8ff;
}

body.theme-night.in-workbench .workspace .chat .scroll-bottom-btn,
body.theme-night.workbench-entering .workspace .chat .scroll-bottom-btn {
  background: linear-gradient(180deg, rgba(74, 103, 194, 0.97) 0%, rgba(116, 80, 207, 0.96) 100%);
  border-color: rgba(139, 165, 245, 0.72);
  color: #eef3ff;
  box-shadow: 0 10px 20px rgba(86, 102, 228, 0.36);
}

.account-page {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 34, 0.34);
  z-index: 80;
}

.account-page.show {
  display: flex;
}

.account-card {
  width: min(680px, 92vw);
  max-height: 82vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(202, 216, 243, 0.9);
  background: linear-gradient(180deg, rgba(252, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 100%);
  box-shadow: 0 24px 44px rgba(33, 54, 95, 0.2);
  padding: 16px 18px 18px;
}

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

.account-head h2 {
  margin: 0;
  font-size: 1.06rem;
  color: #273f70;
}

.account-head button {
  border: 1px solid #d6e2f7;
  background: #f8fbff;
  color: #5270a5;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.account-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-item {
  border: 1px solid #dbe6f8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-item span {
  color: #7e93b8;
  font-size: 0.76rem;
}

.account-item strong {
  color: #2f4f98;
  font-size: 1rem;
}

.account-usage {
  margin-top: 14px;
  border: 1px solid #dbe6f8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
}

.account-usage h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: #3d588f;
}

#accountUsageList {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #6680ae;
  font-size: 0.76rem;
}

.usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.usage-row time {
  color: #8ea2c5;
  white-space: nowrap;
}

body.theme-night .account-page {
  background: rgba(4, 8, 18, 0.54);
}

body.theme-night .account-card {
  border-color: rgba(97, 123, 189, 0.52);
  background: linear-gradient(180deg, rgba(24, 36, 71, 0.98) 0%, rgba(17, 28, 58, 0.98) 100%);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.45);
}

body.theme-night .account-head h2 {
  color: #d6e5ff;
}

body.theme-night .account-head button,
body.theme-night .account-item,
body.theme-night .account-usage {
  border-color: rgba(96, 121, 191, 0.5);
  background: rgba(31, 47, 88, 0.66);
  color: #b8cef8;
}

body.theme-night .account-item span,
body.theme-night .usage-row time {
  color: #8fa7d8;
}

body.theme-night .account-item strong {
  color: #e4ecff;
}

body.theme-night .auth-modal {
  background: rgba(6, 10, 22, 0.58);
}

body.theme-night .auth-card {
  border-color: rgba(130, 152, 219, 0.35);
  background: linear-gradient(180deg, #121a31 0%, #0f162b 100%);
  box-shadow: 0 18px 42px rgba(2, 6, 16, 0.55);
}

body.theme-night .auth-head {
  border-bottom-color: rgba(132, 154, 215, 0.26);
}

body.theme-night .auth-head h3 {
  color: #dbe5ff;
}

body.theme-night .auth-head button {
  color: #b8c9f6;
}

body.theme-night .auth-body label {
  color: #a6b8e8;
}

body.theme-night .auth-body input {
  border-color: rgba(120, 145, 214, 0.44);
  background: rgba(17, 26, 49, 0.95);
  color: #e8eeff;
}

body.theme-night .auth-tip {
  color: #97aee8;
}

body.theme-night .auth-btn.ghost {
  border-color: rgba(124, 149, 221, 0.44);
  background: rgba(24, 36, 67, 0.86);
  color: #d3e0ff;
}

