@import url("/site/_static/b8874a87ef5cfd138c059814f2e2aa79/miniapp/glass.css");
:root {
  --web-page: #f7f8fc;
  --web-panel: rgba(255, 255, 255, 0.54);
  --web-strong: rgba(255, 255, 255, 0.93);
  --web-sidebar: rgba(239, 240, 250, 0.57);
  --web-line: rgba(82, 73, 119, 0.1);
  --web-shadow: 0 12px 36px #29234b08, inset 0 1px 0 #fff;
  --z-popover: 30;
  --z-drawer: 50;
  --z-toast: 90;
  --app-height: 100dvh;
  --web-dialog-radius: 18px;
  --web-choice-radius: 10px;
  --web-menu-radius: 12px;
  --body-size: 15px;
}
:root[data-theme="dark"] {
  --web-page: #15151f;
  --web-panel: rgba(42, 42, 59, 0.52);
  --web-strong: rgba(36, 36, 52, 0.98);
  --web-sidebar: rgba(28, 28, 42, 0.69);
  --web-line: rgba(192, 185, 228, 0.11);
  --web-shadow: 0 12px 40px #0002, inset 0 1px 0 #ffffff09;
}
* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: auto;
}
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
}
body {
  font:
    var(--body-size)/1.55 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  letter-spacing: -0.015em;
  color: var(--ink);
  background: var(--web-page);
  overflow: hidden;
}
body::before,
body::after {
  display: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  filter: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
svg.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
button svg {
  pointer-events: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
strong {
  font-weight: 600;
}
small {
  font-size: 12px;
}
kbd {
  font: 11px inherit;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -60px;
  z-index: var(--z-toast);
  padding: 12px;
  background: var(--web-strong);
  border-radius: 12px;
}
.skip-link:focus {
  top: 12px;
}
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 30%, transparent) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 25%, transparent);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 0%, #baafff21, transparent 50%),
    radial-gradient(ellipse at 100% 100%, #a6dffb18, transparent 52%);
}
.app-shell {
  padding: 0;
  max-width: none;
  margin: 0;
  display: flex;
  height: var(--app-height);
  width: 100%;
  isolation: isolate;
}
.sidebar {
  position: relative;
  flex: 0 0 266px;
  width: 266px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 14px;
  background: var(--web-sidebar);
  border-right: 1px solid var(--web-line);
  backdrop-filter: blur(34px);
  transition: transform 0.25s ease;
  z-index: 10;
  min-height: 0;
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.8px;
  white-space: nowrap;
}
.brand em {
  font-style: normal;
  color: var(--brand);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--web-panel);
  border-radius: 10px;
  box-shadow: var(--glass-shadow-soft);
  font-size: 27px;
  color: var(--brand);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  color: var(--muted);
  padding: 0;
}
.icon-button:hover {
  background: var(--soft);
  color: var(--ink);
}
.new-chat {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--web-panel);
  box-shadow: var(--glass-shadow-soft);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
}
.new-chat:hover {
  border-color: var(--brand);
  background: var(--glass-strong);
}
.key-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.search-shortcut {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  margin-top: 6px;
  border-radius: 11px;
}
.search-shortcut kbd {
  margin-left: auto;
}
.search-shortcut:hover {
  background: var(--soft);
}
.primary-nav {
  display: grid;
  gap: 3px;
  margin: 17px 0 23px;
}
.primary-nav a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.primary-nav a:hover {
  background: var(--soft);
}
.primary-nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--brand-deep);
}
.nav-label {
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid var(--web-line);
  font-size: 9px;
  border-radius: 5px;
  color: var(--muted);
}
.history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding: 0 12px 10px;
}
.history-heading a {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
}
.history-heading a:hover {
  background: var(--soft);
}
.history-heading svg {
  width: 14px;
}
.sidebar-history {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.history-group {
  font-size: 10px;
  color: var(--muted);
  padding: 12px 12px 6px;
}
.history-row {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 9px;
  margin: 2px 0;
}
.history-row:hover,
.history-row.active {
  background: var(--soft);
}
.history-open {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  padding: 9px 12px;
  text-align: left;
}
.history-open .icon {
  width: 12px;
  margin-right: 5px;
  color: var(--brand);
}
.history-row > .icon-button {
  width: 28px;
  min-height: 28px;
  flex-basis: 28px;
  height: 28px;
  margin-right: 4px;
  opacity: 0;
}
.history-row:hover > .icon-button,
.history-row:focus-within > .icon-button {
  opacity: 1;
}
.history-row.active > .history-open {
  color: var(--brand-deep);
}
.sidebar-bottom {
  padding-top: 15px;
  margin-top: auto;
}
.free-note {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 9px;
  background: var(--web-panel);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow-soft);
  border-radius: 13px;
  text-align: left;
  margin-bottom: 11px;
}
.free-note strong {
  font-size: 10px;
  white-space: nowrap;
}
.free-note small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.free-note-symbol {
  color: var(--model-claude-ink);
  font-size: 26px;
}
.free-note > span:last-child {
  margin-left: auto;
  color: var(--brand);
  font-size: 19px;
}
.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 9px;
  border-radius: 12px;
}
.profile-trigger:hover {
  background: var(--soft);
}
.profile-trigger strong {
  font-size: 12px;
}
.profile-trigger small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.profile-trigger > .icon {
  margin-left: auto;
  width: 15px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--brand-deep);
  background: linear-gradient(145deg, #e2dbff, #f0effa);
  border: 1px solid var(--glass-border);
  font-weight: 600;
}
.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.topbar {
  border-radius: 0;
  box-shadow: none;
  height: 76px;
  flex: 0 0 76px;
  max-width: none;
  width: 100%;
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  top: auto;
  background: none;
  border: 0;
  backdrop-filter: none;
  z-index: 10;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.demo-badge {
  border: 1px solid var(--web-line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}
.balance-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--web-panel);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow-soft);
}
.balance-pill:hover {
  background: var(--glass-strong);
}
.balance-gem {
  font-size: 18px;
  color: var(--brand);
}
.login-button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid var(--web-line);
  border-radius: 20px;
}
.login-button svg {
  width: 14px;
}
.login-button:hover {
  background: var(--soft);
}
.open-sidebar {
  display: none;
}
#main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  outline: none;
  padding: 0;
  max-width: none;
  width: 100%;
  margin: 0;
}
.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  margin-right: -266px;
}
.sidebar-collapsed .open-sidebar {
  display: grid;
}
.drawer-shade {
  position: fixed;
  inset: 0;
  background: #18152b44;
  backdrop-filter: blur(3px);
  z-index: var(--z-drawer);
}
.chat-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: page-in 0.22s ease;
}
.conversation {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scroll-behavior: smooth;
  padding: 20px max(28px, calc((100% - 760px) / 2)) 44px;
  position: relative;
}
.welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100%;
  padding: 20px 0 50px;
}
.welcome-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 17px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--soft);
}
.welcome h1 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -1.3px;
  text-align: center;
}
.welcome h1 span {
  background: linear-gradient(110deg, var(--ink) 40%, var(--brand));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.welcome > p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
  max-width: 390px;
  line-height: 1.7;
}
.suggestions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin-top: 42px;
  width: min(100%, 660px);
}
.suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  min-height: 105px;
  padding: 15px;
  background: var(--web-panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow-soft);
  font-size: 11px;
  line-height: 1.55;
  transition:
    transform 0.18s,
    background 0.18s;
}
.suggestion:hover {
  transform: translateY(-3px);
  background: var(--glass-strong);
}
.suggestion .icon {
  color: var(--brand);
  width: 19px;
}
.suggestion > span:last-child {
  max-width: 118px;
}
.welcome-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 25px;
}
.welcome-bottom svg {
  width: 13px;
}
.composer-zone {
  flex-shrink: 0;
  width: min(100% - 64px, 780px);
  margin: 0 auto;
  padding-bottom: 18px;
  position: relative;
}
.composer {
  background: var(--web-panel);
  background-image: var(--glass-reflection);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  box-shadow: var(--web-shadow);
  backdrop-filter: blur(30px);
  padding: 15px 16px 10px;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
  position: relative;
}
.composer:focus-within {
  border-color: var(--brand);
  box-shadow:
    var(--web-shadow),
    0 0 0 3px var(--soft);
}
.composer textarea {
  display: block;
  width: 100%;
  min-height: 49px;
  max-height: 180px;
  resize: none;
  background: transparent;
  border: 0;
  outline: none;
  padding: 4px 3px 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  box-shadow: none;
  border-radius: 0;
}
.composer textarea:focus {
  outline: none;
  box-shadow: none;
}
.composer textarea::placeholder {
  color: var(--muted);
  opacity: 0.82;
}
.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.composer .icon-button {
  width: 34px;
  flex-basis: 34px;
  height: 34px;
  min-height: 34px;
}
.model-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--web-line);
  background: var(--web-panel);
  border-radius: 11px;
  font-size: 11px;
  white-space: nowrap;
  min-width: 0;
}
.model-trigger .icon {
  width: 11px;
  color: var(--muted);
}
.model-trigger:hover {
  background: var(--glass-strong);
}
.model-symbol,
.model-orb {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
.model-orb.model-luna {
  color: var(--brand);
  background: linear-gradient(145deg, #f0eaff, #d2c6f6);
  border-radius: 50%;
  font-size: 20px;
}
.model-terra {
  color: #3e9390;
}
.model-sol {
  color: #bd9039;
}
.model-astra {
  color: var(--brand);
}
.composer-spacer {
  flex: 1;
}
.send-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  box-shadow: 0 3px 10px #6455d92b;
  padding: 0;
}
.send-button:hover {
  background: var(--brand-deep);
}
.send-button:disabled {
  background: var(--muted);
  opacity: 0.28;
  box-shadow: none;
}
.send-button .icon {
  width: 18px;
}
.composer-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: var(--muted);
  padding: 9px 10px 0;
  line-height: 1.5;
}
.composer-note span:last-child {
  white-space: nowrap;
}
.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.file-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  background: var(--web-panel);
  border: 1px solid var(--web-line);
  border-radius: 12px;
  max-width: 240px;
  font-size: 10px;
  margin-bottom: 9px;
}
.file-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-chip .icon {
  width: 17px;
  color: var(--brand);
}
.file-chip small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.file-chip button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
}
.file-chip button svg {
  width: 13px;
}
.jump-bottom {
  position: absolute;
  right: 0;
  top: -48px;
  box-shadow: var(--web-shadow);
  background: var(--web-strong);
  border: 1px solid var(--web-line);
  border-radius: 50%;
  transform: rotate(180deg);
}
.message {
  max-width: 100%;
  margin: 0 0 28px;
  animation: page-in 0.2s ease;
}
.message.user {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}
.user-bubble {
  background: color-mix(in srgb, var(--brand) 7%, var(--web-panel));
  border: 1px solid var(--web-line);
  padding: 12px 18px;
  border-radius: 20px 20px 5px 20px;
  max-width: 87%;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 13px;
}
.message-header .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 21px;
}
.message-model {
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
  margin-left: 1px;
}
.message-body {
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.answer-rich p {
  margin: 0 0 11px;
}
.answer-rich h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 18px 0 10px;
  letter-spacing: -0.4px;
}
.answer-rich h3:first-child {
  margin-top: 0;
}
.answer-rich ul,
.answer-rich ol {
  padding-left: 23px;
  margin: 12px 0;
}
.answer-rich li {
  padding-left: 3px;
  margin: 7px 0;
}
.answer-rich code {
  background: var(--soft);
  font-family: Consolas, monospace;
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 5px;
}
.answer-rich a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.answer-gap {
  height: 5px;
}
.answer-code {
  border: 1px solid var(--web-line);
  border-radius: 14px;
  overflow: hidden;
  margin: 18px 0;
  background: var(--soft);
}
.answer-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--web-panel);
  padding: 8px 14px;
  font-size: 10px;
  color: var(--muted);
}
.answer-code-bar button {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
}
.answer-code-bar button:hover {
  background: var(--soft);
}
.answer-code pre {
  overflow: auto;
  padding: 17px;
  margin: 0;
  font-size: 12px;
}
.answer-code code {
  background: transparent;
  padding: 0;
  line-height: 1.8;
}
.code-keyword {
  color: var(--brand);
}
.code-string {
  color: #3c8c72;
}
.code-number {
  color: #aa6940;
}
.code-comment {
  color: var(--muted);
}
.answer-table-wrap {
  overflow: auto;
  margin: 18px 0;
  border: 1px solid var(--web-line);
  border-radius: 12px;
}
.answer-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.answer-table-wrap th,
.answer-table-wrap td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--web-line);
  white-space: normal;
  min-width: 100px;
}
.answer-table-wrap th {
  background: var(--soft);
  font-weight: 600;
}
.message-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 12px;
  color: var(--muted);
}
.message-actions .icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex-basis: 30px;
}
.message-actions .icon {
  width: 15px;
  height: 15px;
}
.message-actions .selected {
  color: var(--brand);
  background: var(--soft);
}
.message-actions .tiny-label {
  font-size: 9px;
  color: var(--muted);
  margin-left: 8px;
}
.message.user .message-actions {
  margin-top: 0;
  opacity: 0;
}
.message.user:hover .message-actions,
.message.user:focus-within .message-actions {
  opacity: 1;
}
.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
}
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: typing 1.2s ease-in-out infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
.stream-cursor {
  display: inline-block;
  width: 5px;
  height: 13px;
  margin-left: 2px;
  background: var(--brand);
  vertical-align: middle;
  animation: typing 1s infinite;
}
.page-scroll {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 24px 48px 55px;
  animation: page-in 0.2s ease;
}
.page-inner {
  max-width: 1080px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}
.page-head h1 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.9px;
  font-weight: 600;
}
.page-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.primary-button {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 13px #6455d91a;
}
.primary-button:hover {
  background: var(--brand-deep);
}
.secondary-button {
  border: 1px solid var(--web-line);
  background: var(--web-panel);
}
.secondary-button:hover {
  background: var(--soft);
}
.primary-button svg,
.secondary-button svg {
  width: 16px;
}
.glass {
  background: var(--web-panel);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(30px);
  box-shadow: var(--web-shadow);
}
.tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: var(--soft);
  border-radius: 12px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 25px;
  overflow: auto;
}
.tabs button {
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 11px;
  white-space: nowrap;
  min-height: 32px;
  color: var(--muted);
}
.tabs button[aria-pressed="true"] {
  background: var(--web-strong);
  color: var(--ink);
  box-shadow: var(--glass-shadow-soft);
}
.tabs button:hover {
  color: var(--brand);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
  align-items: start;
}
.art-card {
  min-width: 0;
  position: relative;
  contain: paint;
  border: 1px solid var(--glass-border);
  border-radius: 19px;
  overflow: hidden;
  background: var(--web-panel);
  box-shadow: var(--glass-shadow-soft);
}
.art-preview {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 0;
}
.art-preview img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.art-preview:hover img {
  transform: scale(1.025);
}
.art-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 13px;
}
.art-meta div {
  min-width: 0;
  flex: 1;
}
.art-meta strong {
  display: block;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.art-meta small {
  font-size: 9px;
  color: var(--muted);
}
.art-meta .icon-button {
  width: 29px;
  flex-basis: 29px;
  height: 29px;
  min-height: 29px;
}
.art-meta svg {
  width: 15px;
}
.gallery-label {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 19px;
}
.gallery-label h2 {
  font-size: 14px;
  font-weight: 550;
}
.gallery-label span {
  font-size: 10px;
  color: var(--muted);
}
.studio-prompt {
  margin: 0 0 32px;
  padding: 17px 18px 13px;
  border-radius: 22px;
  background: var(--web-panel);
  box-shadow: var(--web-shadow);
  border: 1px solid var(--glass-border);
}
.studio-prompt textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  max-height: 150px;
  border: 0;
  background: none;
  outline: none;
  color: var(--ink);
  padding: 2px 0;
  font-size: 13px;
}
.studio-prompt .composer-toolbar {
  flex-wrap: wrap;
}
.studio-prompt select {
  width: auto;
  max-width: 200px;
  background: var(--web-panel);
  border: 1px solid var(--web-line);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 11px;
  min-height: 34px;
}
.studio-prompt .primary-button {
  margin-left: auto;
  min-height: 34px;
}
.studio-hint {
  font-size: 10px;
  color: var(--muted);
  margin: 13px 0 0;
}
.count-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--web-line);
  border-radius: 10px;
  min-height: 34px;
  font-size: 12px;
}
.count-control button {
  width: 30px;
  height: 32px;
  min-height: 32px;
}
.count-control button:hover {
  background: var(--soft);
}
.count-control output {
  width: 20px;
  text-align: center;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: start;
}
.card {
  padding: 26px;
  border-radius: 21px;
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 7px;
}
.card p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}
.profile-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.profile-card-head .avatar {
  width: 54px;
  height: 54px;
  font-size: 20px;
}
.profile-card-head strong {
  font-size: 16px;
}
.profile-card-head small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--web-line);
  font-size: 12px;
}
.detail-row:last-child {
  border: 0;
}
.detail-row span {
  color: var(--muted);
}
.detail-row button {
  color: var(--brand);
  font-size: 11px;
}
.profile-links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.profile-links a,
.profile-links button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 11px;
  font-size: 12px;
}
.profile-links a:hover,
.profile-links button:hover {
  background: var(--soft);
}
.wallet-hero {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 23px;
  background: var(--web-panel);
  border: 1px solid var(--glass-border);
  box-shadow: var(--web-shadow);
  border-radius: 22px;
  padding: 28px;
}
.wallet-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.wallet-amount {
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -1.7px;
  font-weight: 600;
}
.wallet-caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}
.wallet-columns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}
.method-row,
.preset-row {
  display: flex;
  gap: 8px;
  margin: 15px 0;
}
.method-row button,
.preset-row button {
  min-height: 40px;
  padding: 8px 14px;
  background: var(--web-panel);
  border: 1px solid var(--web-line);
  border-radius: 10px;
  font-size: 12px;
}
.method-row button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-deep);
}
.method-row img {
  height: 17px;
  width: 26px;
  object-fit: contain;
  margin-right: 6px;
  vertical-align: middle;
}
.amount-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--web-line);
  background: var(--web-panel);
  padding: 11px 14px;
  border-radius: 12px;
  margin-top: 18px;
}
.amount-field input {
  width: 100%;
  min-width: 0;
  background: none;
  outline: none;
  border: 0;
  color: var(--ink);
  font-size: 20px;
}
.amount-field span {
  color: var(--muted);
}
.preset-row button {
  flex: 1;
  padding: 7px 6px;
}
.full-width {
  width: 100%;
}
.field-error {
  font-size: 11px;
  line-height: 1.5;
  color: #ad4553;
  margin-top: 7px;
  min-height: 17px;
}
.transaction {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--web-line);
  font-size: 12px;
}
.transaction .txn-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--brand);
}
.transaction .txn-main {
  flex: 1;
}
.transaction small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.positive {
  color: #36876c;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 220px;
  text-align: center;
  padding: 35px;
  color: var(--muted);
}
.empty-state > .icon {
  width: 34px;
  height: 34px;
  color: var(--brand);
  opacity: 0.7;
}
.empty-state strong {
  font-size: 14px;
  color: var(--ink);
}
.empty-state p {
  font-size: 12px;
  max-width: 320px;
  line-height: 1.7;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--web-line);
  background: var(--web-panel);
  border-radius: 12px;
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 13px;
}
.search-field:focus-within {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.search-field input:focus {
  outline: none;
}
.chat-list {
  display: grid;
  gap: 10px;
}
.chat-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--web-line);
  background: var(--web-panel);
  border-radius: 14px;
}
.chat-list-item:hover {
  border-color: var(--line);
}
.chat-list-open {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.chat-list-open strong {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-list-open small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.chat-list-item > .icon {
  color: var(--brand);
}
.chat-list-title {
  margin: 24px 0 12px;
  font-size: 11px;
  color: var(--muted);
}
.favorite-card {
  border: 1px solid var(--web-line);
  background: var(--web-panel);
  border-radius: 17px;
  padding: 20px;
  margin-bottom: 13px;
}
.favorite-card > p {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}
.favorite-card > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 11px;
}
.favorite-card .message-actions {
  justify-content: flex-end;
}
.popover {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: var(--z-popover);
  background: var(--web-strong);
  border: 1px solid var(--glass-border);
  border-radius: 17px;
  box-shadow: 0 15px 50px #26203e26;
  padding: 6px;
  min-width: 190px;
  max-width: min(340px, calc(100vw - 20px));
  max-height: min(600px, calc(var(--app-height) - 30px));
  overflow: auto;
  animation: menu-in 0.14s ease;
  backdrop-filter: blur(30px);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: 10px;
  font-size: 12px;
  min-height: 38px;
}
.menu-item:hover {
  background: var(--soft);
}
.menu-item.danger {
  color: #b45869;
}
.menu-item .icon {
  width: 16px;
}
.menu-separator {
  height: 1px;
  background: var(--web-line);
  margin: 5px;
}
.model-menu {
  min-width: 305px;
}
.model-group {
  font-size: 9px;
  color: var(--muted);
  padding: 7px 13px 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.model-option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 61px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 11px;
}
.model-option:hover,
.model-option[aria-checked="true"] {
  background: var(--soft);
}
.model-option > .model-symbol,
.model-option > .model-orb {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
  font-size: 26px;
}
.model-option > span:nth-child(2) {
  flex: 1;
}
.model-option strong {
  font-size: 12px;
}
.model-option small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  max-width: 235px;
  line-height: 1.5;
}
.model-level {
  display: inline-block;
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 5px;
}
.model-option .icon {
  width: 15px;
  color: var(--brand);
}
.dialog {
  padding: 0;
  border-radius: var(--web-dialog-radius);
  max-height: calc(var(--app-height) - 48px);
  width: min(540px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  color: var(--ink);
  background: var(--web-strong);
  border: 1px solid var(--glass-border);
  box-shadow: 0 28px 120px #1f1b4233;
  animation: popover-in 0.2s ease;
  overflow: hidden;
}
.dialog::backdrop {
  background: #1715285c;
  backdrop-filter: blur(7px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--web-line);
}
.dialog-head h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.dialog-body {
  padding: 20px;
  max-height: calc(var(--app-height) - 130px);
  overflow: auto;
}
.dialog.wide {
  width: min(740px, calc(100% - 32px));
}
.dialog.media {
  width: min(780px, calc(100% - 32px));
}
.dialog.media .dialog-body {
  padding: 16px;
}
.dialog.media img {
  display: block;
  width: 100%;
  max-height: calc(var(--app-height) - 230px);
  object-fit: contain;
  border-radius: 15px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}
:root { --model-sunburst-ink: #edc873; }
.sunburst-icon { color: var(--model-sunburst-ink); flex-shrink: 0; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 8px;
}
.field {
  width: 100%;
  border: 1px solid var(--web-line);
  border-radius: 11px;
  padding: 11px 13px;
  background: var(--web-panel);
  color: var(--ink);
  font-size: 13px;
  min-height: 42px;
}
.field::placeholder {
  color: var(--muted);
}
textarea.field {
  min-height: 110px;
  resize: vertical;
}
.dialog-description {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}
.settings-layout {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 20px;
  min-height: 260px;
}
.settings-nav {
  display: grid;
  align-content: start;
  gap: 5px;
}
.settings-nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 12px;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.settings-nav button.active {
  background: var(--soft);
  border-color: var(--pearl-edge);
  color: var(--ink);
}
.settings-nav button:hover {
  background: var(--soft);
}
.settings-nav .icon {
  width: 16px;
}
.settings-section h3 {
  font-size: 14px;
  margin-bottom: 18px;
}
.settings-section {
  min-width: 0;
}
.setting-block {
  padding: 14px 0;
  border-bottom: 1px solid var(--web-line);
}
.setting-block:first-of-type {
  padding-top: 0;
}
.settings-section .setting-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.setting-block > label,
.setting-label {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin-bottom: 9px;
}
.setting-help {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  margin-top: 7px;
}
.theme-options {
  display: flex;
  gap: 8px;
}
.theme-option {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 7px;
  border: 1px solid var(--web-line);
  border-radius: 12px;
  font-size: 10px;
}
.theme-option:hover {
  background: var(--soft);
}
.theme-option[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--soft);
  color: var(--brand-deep);
}
.theme-option svg {
  width: 19px;
}
.switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.setting-block > .switch-row {
  display: grid;
  margin-bottom: 0;
  min-height: 36px;
}
.switch {
  appearance: none;
  width: 36px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  align-self: center;
  border-radius: 20px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  border: 0;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  left: 3px;
  top: 3px;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.15s;
}
.switch:checked {
  background: var(--brand);
}
.switch:checked::after {
  transform: translateX(14px);
}
.choice-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.choice-pill {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.choice-pill > input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.choice-content,
.choice-button {
  min-height: 46px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--pearl-edge);
  border-radius: var(--web-choice-radius);
  background: var(--web-panel);
  transition:
    border-color 0.15s,
    background-color 0.15s;
}
.choice-content > .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.choice-content > span:not(.choice-sample, .choice-check) {
  min-width: 0;
  flex: 1;
}
.choice-content strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}
.choice-content small {
  display: block;
  font-size: 10px;
  line-height: 1.4;
  margin-top: 4px;
  color: var(--muted);
}
.choice-check {
  display: grid;
  place-items: center;
  width: 14px;
  flex: 0 0 14px;
  opacity: 0;
}
.choice-check .icon {
  width: 14px;
  height: 14px;
}
.choice-pill:hover .choice-content,
.choice-button:hover {
  border-color: var(--brand);
}
.choice-pill input:checked + .choice-content,
.choice-button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--soft);
}
.choice-pill input:checked + .choice-content .choice-check {
  opacity: 1;
  color: var(--brand);
}
.choice-pill input:focus-visible {
  outline: 0;
}
.choice-pill input:focus-visible + .choice-content {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}
.choice-sample {
  font-size: 16px;
  letter-spacing: -1px;
  width: 23px;
}
.choice-sample.large {
  font-size: 21px;
}
.setting-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
.setting-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}
.setting-value .icon {
  width: 15px;
  height: 15px;
}
.settings-dialog .settings-model-trigger {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  gap: 12px;
  padding: 10px 13px;
  border-radius: var(--web-choice-radius);
}
.settings-model-trigger > span {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.settings-model-trigger strong {
  display: block;
  font-size: 12px;
}
.settings-model-trigger small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.popover.model-menu:has([data-action="select-model"]) {
  overflow-x: hidden;
}
.popover.model-menu.settings-model-menu {
  min-width: 0;
  max-width: calc(100vw - 20px);
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.danger-action {
  color: var(--danger, #e9a5b2);
}
@media (max-width: 600px) {
  .settings-dialog .choice-pills {
    grid-template-columns: 1fr;
  }
  .settings-dialog #font-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-dialog #font-mode .choice-content {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .settings-dialog #font-mode .choice-check {
    position: absolute;
    right: 10px;
    top: 10px;
  }
  .choice-content {
    min-height: 46px;
    padding: 10px 12px;
  }
  .settings-dialog .settings-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .settings-dialog .settings-nav button {
    justify-content: center;
    padding-inline: 4px;
    gap: 5px;
  }
}
@media (max-width: 370px) {
  .settings-dialog .settings-nav button {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    min-height: 48px;
  }
}
.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}
.auth-brand .brand-mark {
  margin: 0 auto 14px;
  width: 45px;
  height: 45px;
  font-size: 37px;
}
.auth-brand h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.auth-brand p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.auth-telegram {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--web-line);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 550;
  background: var(--web-panel);
}
.auth-telegram:hover {
  background: var(--soft);
}
.auth-telegram .icon {
  color: #329bd2;
  width: 18px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--web-line);
}
.demo-notice {
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--web-line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 18px;
}
.auth-legal {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
  margin-top: 18px;
}
.auth-legal a {
  color: var(--brand);
  text-decoration: underline;
}
.otp-example {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0;
}
.otp-example span {
  display: grid;
  place-items: center;
  width: 39px;
  height: 49px;
  background: var(--web-panel);
  border: 1px solid var(--web-line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 22px;
}
.success-mark {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  margin: 0 auto 20px;
  background: #4eaa8314;
  border: 1px solid #4eaa8344;
  border-radius: 50%;
  color: #3a8d6c;
  animation: success-in 0.4s ease;
}
.success-mark svg {
  width: 29px;
}
.center {
  text-align: center;
}
.search-result {
  display: block;
  text-align: left;
  width: 100%;
  padding: 13px;
  border-radius: 11px;
}
.search-result:hover {
  background: var(--soft);
}
.search-result strong {
  display: block;
  font-size: 13px;
}
.search-result small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.search-results {
  margin-top: 15px;
  max-height: 330px;
  overflow: auto;
}
.toast {
  position: fixed;
  z-index: var(--z-toast);
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: calc(100vw - 32px);
  background: var(--web-strong);
  border: 1px solid var(--glass-border);
  padding: 12px 17px;
  border-radius: 14px;
  font-size: 12px;
  box-shadow: 0 10px 40px #0002;
  display: flex;
  align-items: center;
  gap: 15px;
}
.toast button {
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.legal-card {
  padding: 22px;
  border: 1px solid var(--web-line);
  border-radius: 16px;
  margin-top: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--web-panel);
}
.legal-card .icon {
  color: var(--brand);
}
.legal-card h3 {
  font-size: 13px;
}
.legal-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.legal-card > a {
  margin-left: auto;
}
.storage-warning {
  padding: 10px 14px;
  background: #b86a1f14;
  color: var(--ink);
  font-size: 11px;
  border-bottom: 1px solid var(--web-line);
}
[data-glass="clear"] {
  --web-panel: rgba(255, 255, 255, 0.3);
  --web-sidebar: rgba(237, 239, 251, 0.27);
}
[data-theme="dark"][data-glass="clear"] {
  --web-panel: rgba(42, 42, 59, 0.3);
  --web-sidebar: rgba(28, 28, 42, 0.35);
}
[data-font="large"] .message-body {
  font-size: 16px;
}
[data-font="large"] .message-body .answer-rich h3 {
  font-size: 18px;
}
[data-font="large"] .composer textarea {
  font-size: 16px;
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes popover-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}
@keyframes success-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 236px;
    flex-basis: 236px;
    padding: 22px 12px 12px;
  }
  .sidebar-collapsed .sidebar {
    margin-right: -236px;
  }
  .key-hint {
    display: none;
  }
  .topbar {
    padding: 0 24px;
  }
  .demo-badge {
    font-size: 8px;
  }
  .free-note strong {
    font-size: 9px;
  }
  .page-scroll {
    padding: 20px 28px 40px;
  }
  .suggestions {
    grid-template-columns: repeat(2, 1fr);
    max-width: 425px;
  }
  .suggestion {
    min-height: 78px;
    gap: 8px;
  }
  .suggestion > span:last-child {
    max-width: none;
  }
  .profile-grid,
  .wallet-columns {
    grid-template-columns: 1fr;
  }
  .welcome h1 {
    font-size: 32px;
  }
  .gallery {
    gap: 13px;
  }
  .art-meta {
    padding: 10px;
  }
  .art-meta .icon-button {
    width: 25px;
    height: 28px;
    flex-basis: 25px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: calc(100vw - 42px);
    height: var(--app-height);
    transform: translateX(-100%);
    z-index: calc(var(--z-drawer) + 1);
    padding: 23px 16px 16px;
    background: var(--web-strong);
    transition: transform 0.25s ease;
  }
  .mobile-drawer .sidebar {
    transform: none;
  }
  .sidebar-collapsed .sidebar {
    margin-right: 0;
  }
  .sidebar-collapsed .open-sidebar,
  .open-sidebar {
    display: grid;
  }
  .topbar {
    height: 64px;
    flex-basis: 64px;
    padding: 0 16px;
    gap: 8px;
  }
  .topbar-left {
    gap: 8px;
  }
  .breadcrumb {
    max-width: 170px;
    font-size: 12px;
  }
  .demo-badge {
    display: none;
  }
  .balance-pill {
    padding: 4px 10px;
    font-size: 11px;
  }
  .login-button {
    padding: 7px 10px;
    font-size: 11px;
  }
  .login-button .icon {
    display: none;
  }
  .topbar-right {
    gap: 8px;
  }
  .conversation {
    padding: 15px 20px 25px;
  }
  .welcome {
    padding: 10px 0 40px;
  }
  .welcome h1 {
    font-size: 30px;
  }
  .welcome > p {
    font-size: 12px;
    max-width: 300px;
  }
  .suggestions {
    margin-top: 30px;
    gap: 9px;
    max-width: 390px;
  }
  .suggestion {
    min-height: 80px;
    padding: 12px;
  }
  .composer-zone {
    width: calc(100% - 28px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .composer {
    padding: 13px 12px 10px;
    border-radius: 22px;
  }
  .composer textarea {
    font-size: 16px;
    min-height: 50px;
  }
  .composer-note {
    font-size: 8px;
    padding: 8px 6px 0;
  }
  .composer-note span:last-child {
    display: none;
  }
  .model-trigger {
    font-size: 11px;
    max-width: 185px;
  }
  .composer-toolbar {
    gap: 5px;
  }
  .page-scroll {
    padding: 22px 20px 40px;
  }
  .page-head {
    margin-bottom: 23px;
    align-items: flex-start;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .gallery-label span {
    font-size: 9px;
  }
  .art-meta small {
    font-size: 8px;
  }
  .card {
    padding: 21px;
  }
  .wallet-hero {
    padding: 22px;
    gap: 15px;
  }
  .wallet-amount {
    font-size: 34px;
  }
  .wallet-hero .primary-button {
    font-size: 10px;
    padding: 8px 10px;
  }
  .profile-grid,
  .wallet-columns {
    gap: 16px;
  }
  .message-actions {
    gap: 4px;
  }
  .message.user .message-actions {
    opacity: 1;
  }
  .history-row > .icon-button {
    opacity: 1;
  }
  .message-body {
    font-size: 14px;
  }
  .user-bubble {
    max-width: 92%;
    font-size: 14px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .settings-nav {
    display: flex;
    overflow: auto;
    gap: 5px;
    border-bottom: 1px solid var(--web-line);
    padding-bottom: 12px;
  }
  .settings-nav button {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px 9px;
  }
  .dialog-head {
    padding: 16px 19px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
  }
  .auth-brand h3 {
    font-size: 23px;
  }
  .popover.model-menu {
    max-height: min(540px, calc(var(--app-height) - 40px));
  }
  .toast {
    bottom: 15px;
    font-size: 11px;
  }
  .art-meta strong {
    font-size: 10px;
  }
  .studio-prompt {
    padding: 14px;
  }
  .studio-prompt select {
    max-width: 155px;
  }
  .studio-prompt .primary-button {
    font-size: 10px;
  }
  .jump-bottom {
    right: 5px;
  }
  .topbar .icon-button {
    width: 30px;
    flex-basis: 30px;
  }
  .welcome-eyebrow {
    font-size: 10px;
  }
}
@media (max-width: 370px) {
  .topbar {
    padding: 0 10px;
  }
  .breadcrumb {
    max-width: 120px;
  }
  .login-button {
    padding: 5px 8px;
  }
  .balance-pill {
    font-size: 10px;
  }
  .conversation {
    padding-left: 16px;
    padding-right: 16px;
  }
  .welcome h1 {
    font-size: 28px;
  }
  .composer-toolbar {
    gap: 3px;
  }
  .model-trigger {
    padding: 5px 7px;
    gap: 5px;
    font-size: 10px;
  }
  .model-symbol,
  .model-orb {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }
  .composer .icon-button {
    width: 30px;
    flex-basis: 30px;
  }
  .gallery {
    gap: 9px;
  }
  .art-meta {
    padding: 9px;
  }
  .art-meta strong {
    font-size: 9px;
  }
  .art-meta .icon-button {
    width: 24px;
    flex-basis: 24px;
  }
  .page-scroll {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-head {
    gap: 8px;
  }
  .page-head .secondary-button {
    font-size: 10px;
    padding: 7px 9px;
  }
  .wallet-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  button,
  a,
  input,
  select,
  textarea {
    forced-color-adjust: auto;
  }
  .glass,
  .card,
  .composer,
  .sidebar {
    border: 1px solid CanvasText;
  }
  .brand em {
    color: LinkText;
  }
  .ambient {
    display: none;
  }
}

/* Browser density: comfortable reading without the Mini App navigation clearance. */
.welcome h1 {
  font-size: 42px;
}
.welcome > p {
  font-size: 15px;
}
.suggestion {
  font-size: 13px;
}
.message-body {
  font-size: 14px;
}
.user-bubble {
  font-size: 16px;
}
.composer textarea {
  font-size: 16px;
}
.page-subtitle,
.card > p {
  font-size: 14px;
}
.composer-note {
  font-size: 10px;
}
.new-chat,
.search-shortcut,
.primary-nav a {
  font-size: 14px;
}
.history-open {
  font-size: 13px;
}
.brand {
  letter-spacing: -0.6px;
}
.search-clear {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.search-clear .icon {
  width: 16px;
}
.search-field:has(input:placeholder-shown) .search-clear {
  visibility: hidden;
}
.page-scroll {
  flex: 1;
  min-height: 0;
}
.workspace {
  height: 100%;
  overflow: hidden;
}
.message {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .welcome h1 {
    font-size: 34px;
  }
  .welcome > p {
    font-size: 14px;
  }
  .composer-note {
    font-size: 9px;
  }
  .suggestion {
    font-size: 12px;
  }
  .wallet-hero {
    flex-wrap: wrap;
  }
  .wallet-hero .demo-badge {
    display: block;
  }
  .page-head {
    flex-wrap: wrap;
  }
  .studio-prompt .composer-toolbar {
    flex-wrap: wrap;
  }
  .art-meta {
    min-width: 0;
  }
  .art-meta > div {
    min-width: 0;
  }
  .gallery-label {
    gap: 10px;
    flex-wrap: wrap;
  }
  .count-control button {
    min-width: 30px;
  }
}

textarea {
  resize: none;
}
.file-dragover .composer,
.file-dragover .studio-prompt {
  outline: 2px dashed var(--brand);
  outline-offset: 4px;
}
.attachment-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1 0 100%;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--ink);
  border-radius: 10px;
}
.attachment-error button {
  flex-shrink: 0;
}
.attachment-error .icon {
  width: 16px;
}
.composer-note {
  gap: 12px;
}
.model-menu .model-option:focus-visible {
  outline-offset: -2px;
}
[data-font="large"] .message-body {
  font-size: 16px;
}
.studio-prompt #create-image {
  min-width: 180px;
}
.dialog .setting-help {
  color: var(--muted);
}

.tabs .selected-tab {
  padding: 7px 13px;
  border-radius: 9px;
  background: var(--web-strong);
  box-shadow: var(--glass-shadow-soft);
  font-size: 11px;
  min-height: 32px;
  white-space: nowrap;
}

.sync-notice {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 10px 16px;
  background: var(--soft);
  font-size: 12px;
  flex-shrink: 0;
}
.sync-notice button {
  font-weight: 600;
  color: var(--brand-deep);
  text-decoration: underline;
  min-height: 28px;
}

.avatar {
  background: color-mix(in srgb, var(--brand) 16%, var(--web-strong));
  color: var(--ink);
}

/* --- Полировка локального сайта: жидкое стекло, аврора, исправленные состояния. --- */
:root {
  --aurora-a: rgba(139, 120, 255, 0.2);
  --aurora-b: rgba(103, 186, 244, 0.17);
  --aurora-c: rgba(255, 157, 214, 0.13);
  --glass-blur-web: blur(26px) saturate(165%);
}
:root[data-theme="dark"] {
  --aurora-a: rgba(126, 96, 228, 0.3);
  --aurora-b: rgba(52, 142, 178, 0.22);
  --aurora-c: rgba(186, 88, 164, 0.18);
}
[data-glass="clear"] {
  --aurora-a: rgba(139, 120, 255, 0.26);
  --aurora-b: rgba(103, 186, 244, 0.22);
  --aurora-c: rgba(255, 157, 214, 0.17);
}
.ambient {
  inset: -25% -15%;
  background:
    radial-gradient(36% 40% at 18% 12%, var(--aurora-a), transparent 68%),
    radial-gradient(40% 46% at 88% 22%, var(--aurora-b), transparent 70%),
    radial-gradient(42% 48% at 28% 94%, var(--aurora-c), transparent 72%),
    radial-gradient(34% 40% at 76% 84%, var(--aurora-a), transparent 74%);
  animation: aurora-shift 46s ease-in-out infinite alternate;
}
@keyframes aurora-shift {
  from {
    transform: translate3d(-1.5%, -1%, 0) rotate(-1.2deg) scale(1.04);
  }
  to {
    transform: translate3d(1.5%, 1.5%, 0) rotate(1.2deg) scale(1.1);
  }
}

/* Единая стеклянная поверхность вместо плоских белых карточек. */
.sidebar,
.new-chat,
.search-field,
.free-note,
.balance-pill,
.login-button,
.suggestion,
.composer,
.studio-prompt,
.card.glass,
.wallet-hero,
.favorite-card,
.chat-list-item,
.art-card,
.method-row button,
.preset-row button {
  background-image: var(--glass-reflection);
  backdrop-filter: var(--glass-blur-web);
  -webkit-backdrop-filter: var(--glass-blur-web);
}
.sidebar {
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.42);
}
:root[data-theme="dark"] .sidebar {
  box-shadow: inset -1px 0 0 rgba(197, 204, 255, 0.08);
}
.composer {
  background-color: color-mix(in srgb, var(--web-panel) 94%, transparent);
  box-shadow:
    0 18px 44px rgba(56, 48, 120, 0.1),
    0 2px 8px rgba(56, 48, 120, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(120, 110, 180, 0.08);
  backdrop-filter: blur(30px) saturate(175%);
  -webkit-backdrop-filter: blur(30px) saturate(175%);
}
:root[data-theme="dark"] .composer {
  box-shadow:
    0 20px 50px #0006,
    inset 0 1px 0 #ffffff2e,
    inset 0 -1px 0 #00000040;
}
.composer:focus-within {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow:
    0 18px 44px rgba(56, 48, 120, 0.12),
    0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.suggestion {
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}
.suggestion:hover {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--glass-border));
  box-shadow:
    0 16px 34px rgba(64, 52, 145, 0.13),
    inset 0 1px 0 #fff;
}
.welcome {
  position: relative;
  isolation: isolate;
}
.welcome::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(620px, 100%);
  height: 320px;
  transform: translate(-50%, -56%);
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--brand) 13%, transparent),
    transparent
  );
  filter: blur(10px);
  pointer-events: none;
}
.popover {
  background-image: var(--glass-reflection);
  background-color: color-mix(in srgb, var(--web-strong) 92%, transparent);
  backdrop-filter: blur(32px) saturate(170%);
  -webkit-backdrop-filter: blur(32px) saturate(170%);
}
.dialog {
  background: color-mix(in srgb, var(--web-strong) 84%, transparent);
  backdrop-filter: blur(38px) saturate(170%);
  -webkit-backdrop-filter: blur(38px) saturate(170%);
}
.dialog::backdrop {
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

/* Вход: отдельная стеклянная модалка без дублирующего заголовка. */
.dialog.auth {
  border-radius: var(--web-dialog-radius);
}
.dialog.auth .dialog-head {
  display: none;
}
.dialog.auth .dialog-body {
  position: relative;
  padding: 28px 24px 22px;
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex-basis: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
}
.auth-close:hover {
  background: var(--soft);
  color: var(--ink);
}
.auth-brand {
  margin-bottom: 22px;
}
.auth-brand .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 40px;
  box-shadow:
    0 10px 26px rgba(100, 85, 217, 0.18),
    inset 0 1px 0 #fff;
}
.auth-brand h3 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
.auth-brand p {
  max-width: 340px;
  margin: 10px auto 0;
  font-size: 13px;
  line-height: 1.65;
}
.auth-telegram {
  min-height: 48px;
  border-radius: 14px;
  border-color: rgba(50, 155, 210, 0.34);
  background-image: linear-gradient(
    135deg,
    rgba(50, 155, 210, 0.16),
    rgba(50, 155, 210, 0.04)
  );
  box-shadow:
    inset 0 1px 0 #ffffff8c,
    0 6px 18px rgba(50, 155, 210, 0.08);
}
.auth-telegram:hover {
  background-color: rgba(50, 155, 210, 0.1);
}
.auth-divider {
  margin: 20px 0;
}
#auth-form .field {
  min-height: 46px;
  border-radius: 13px;
  font-size: 14px;
}
#auth-form .primary-button {
  min-height: 46px;
  border-radius: 13px;
  font-size: 13px;
}
.auth-legal {
  margin-top: 16px;
}
.auth-legal button {
  color: var(--brand-deep);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
:root[data-theme="dark"] .primary-button,
:root[data-theme="dark"] .send-button {
  background: linear-gradient(145deg, #8a77e8, #6a56cd);
  color: #fff;
  box-shadow:
    inset 0 1px 0 #ffffff33,
    0 5px 16px #00000045;
}
:root[data-theme="dark"] .primary-button:hover,
:root[data-theme="dark"] .send-button:hover {
  background: linear-gradient(145deg, #9684f0, #7763d9);
}
:root[data-theme="dark"] .primary-button:disabled,
:root[data-theme="dark"] .send-button:disabled {
  background: var(--muted);
  opacity: 0.28;
}
.otp-example span {
  width: 42px;
  height: 52px;
  background-image: var(--glass-reflection);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Избранное: Markdown-ответ вместо сырого текста. */
.favorite-body {
  max-height: 240px;
  overflow: auto;
  padding-right: 6px;
}
.favorite-body.is-clamped {
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
  mask-image: linear-gradient(#000 82%, transparent);
}
.favorite-body.answer-rich {
  font-size: 14px;
  line-height: 1.8;
}
.favorite-body h3 {
  margin-top: 14px;
  font-size: 16px;
}
.favorite-body .answer-table-wrap {
  margin: 12px 0;
}
.favorite-body p:last-child {
  margin-bottom: 0;
}
.favorite-card .message-actions {
  margin-top: 14px;
}

/* Поиск: подсветка совпадения и фрагмент ответа. */
.search-result {
  border-radius: 12px;
}
.search-result .search-snippet {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.search-snippet mark {
  padding: 0 2px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  color: var(--ink);
}

/* Уведомления: короткая мягкая анимация вместо резкой плашки. */
.toast {
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.985);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 760px) {
  .sidebar {
    background: color-mix(in srgb, var(--web-strong) 78%, transparent);
    background-image: var(--glass-reflection);
    backdrop-filter: blur(32px) saturate(170%);
    -webkit-backdrop-filter: blur(32px) saturate(170%);
  }
  .drawer-shade {
    background: rgba(18, 16, 34, 0.38);
  }
  .dialog.auth .dialog-body {
    padding: 26px 20px 20px;
  }
  .auth-brand h3 {
    font-size: 23px;
  }
  .auth-brand .brand-mark {
    width: 50px;
    height: 50px;
    font-size: 36px;
  }
  .otp-example span {
    width: 34px;
    height: 44px;
    font-size: 18px;
  }
  .answer-table-wrap table {
    font-size: 11px;
  }
  .answer-table-wrap th,
  .answer-table-wrap td {
    min-width: 76px;
    padding: 8px 9px;
  }
}
