:root {
  --app-height: 100dvh;
  --bg: #edf1f4;
  --bg-2: #e4ebf1;
  --sidebar: rgba(250, 252, 253, 0.91);
  --panel: rgba(252, 253, 254, 0.93);
  --line: rgba(75, 103, 140, 0.19);
  --line-soft: rgba(75, 103, 140, 0.11);
  --ink: #0d1c30;
  --ink-soft: #5d6c82;
  --accent: #123b69;
  --accent-2: #246ba8;
  --accent-soft: #e6eff8;
  --gold: #c8953f;
  --gold-soft: #f3e5c7;
  --paper: #fffdf8;
  --user-a: #102f53;
  --user-b: #1d578c;
  --ok: #1f5f3f;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-lg: 0 26px 76px rgba(17, 38, 66, 0.13);
  --shadow-md: 0 12px 30px rgba(17, 38, 66, 0.1);
}

:root[data-theme="dark"] {
  --bg: #07111f;
  --bg-2: #0d1c31;
  --sidebar: rgba(11, 24, 42, 0.9);
  --panel: rgba(13, 28, 48, 0.88);
  --line: rgba(149, 178, 218, 0.2);
  --line-soft: rgba(149, 178, 218, 0.12);
  --ink: #eaf2ff;
  --ink-soft: #9fb0c8;
  --accent: #75b7ff;
  --accent-2: #2e7dd3;
  --accent-soft: rgba(117, 183, 255, 0.14);
  --user-a: #164f91;
  --user-b: #0f3868;
  --ok: #78d29f;
  --shadow-lg: 0 28px 90px rgba(0, 0, 0, 0.42);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

:root[data-theme="dark"] body {
  color-scheme: dark;
  background:
    radial-gradient(circle at 10% 8%, rgba(47, 104, 176, 0.26) 0%, var(--bg) 36%, #040914 100%),
    linear-gradient(130deg, #081423, #0c1a2d);
}

:root[data-theme="dark"] .grain {
  opacity: 0.1;
  background-image: radial-gradient(rgba(215, 229, 255, 0.2) 0.55px, transparent 0.55px);
}

:root[data-theme="dark"] .ambient--a {
  background: rgba(44, 112, 205, 0.38);
}

:root[data-theme="dark"] .ambient--b {
  background: rgba(27, 91, 143, 0.26);
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 255, 255, 0.95) 0%, transparent 32%),
    linear-gradient(138deg, #f4f6f7 0%, var(--bg) 46%, var(--bg-2) 100%);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:root.is-telegram-webapp,
:root.is-telegram-webapp body {
  height: var(--app-height);
  min-height: var(--app-height);
  overflow: hidden;
  overscroll-behavior: none;
}

:root.is-telegram-webapp .app,
:root.is-telegram-webapp .chat-layout {
  height: var(--app-height);
  min-height: 0;
}

:root.is-telegram-webapp .composer-wrap {
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
.brand,
.history-title {
  font-family: "Fraunces", Georgia, serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: radial-gradient(rgba(14, 24, 40, 0.2) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
}

.ambient--a {
  width: 260px;
  height: 260px;
  top: -150px;
  right: 11%;
  background: rgba(95, 148, 204, 0.24);
}

.ambient--b {
  width: 220px;
  height: 220px;
  bottom: -130px;
  left: 18%;
  background: rgba(213, 170, 92, 0.2);
}

body.referrals-page-active .ambient,
body.referrals-page-active .grain {
  display: none;
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  height: var(--app-height);
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
  padding: 16px;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  min-width: 0;
  min-height: 0;
  backdrop-filter: blur(18px);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.62), transparent 34%),
    var(--sidebar);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px;
}

.sidebar.sidebar--settings-open {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.account-card {
  border: 1px solid rgba(176, 197, 228, 0.62);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #edf5ff);
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.account-card:hover {
  transform: translateY(-1px);
  border-color: rgba(119, 158, 216, 0.82);
  box-shadow: 0 10px 24px rgba(31, 73, 124, 0.1);
}

.settings-popover {
  min-width: 0;
  animation: rise 0.18s ease;
}

.settings-popover[hidden] {
  display: none;
}

.account-login,
.account-credits {
  margin: 0;
}

.account-login {
  color: #15335c;
  font-size: 14px;
  font-weight: 900;
}

.account-credits {
  color: #61738f;
  font-size: 12px;
  margin-top: 2px;
}

.settings-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid #c9d8ef;
  border-radius: 11px;
  background: #f8fbff;
  cursor: pointer;
  color: #173f70;
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.settings-btn::after {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.43 12.98c.04-.32.07-.65.07-.98s-.02-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.37-.31-.6-.22l-2.49 1a7.28 7.28 0 0 0-1.69-.98L14.5 2.42A.49.49 0 0 0 14.02 2h-4c-.24 0-.44.17-.48.42L9.16 5.07c-.6.23-1.17.56-1.69.98l-2.49-1a.49.49 0 0 0-.6.22l-2 3.46c-.12.22-.07.49.12.64l2.11 1.65a7.93 7.93 0 0 0 0 1.96L2.5 14.63a.49.49 0 0 0-.12.64l2 3.46c.12.22.37.31.6.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.04.25.24.42.48.42h4c.24 0 .44-.17.48-.42l.38-2.65c.6-.24 1.17-.56 1.69-.98l2.49 1c.23.08.48 0 .6-.22l2-3.46a.49.49 0 0 0-.12-.64l-2.11-1.65ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.43 12.98c.04-.32.07-.65.07-.98s-.02-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.37-.31-.6-.22l-2.49 1a7.28 7.28 0 0 0-1.69-.98L14.5 2.42A.49.49 0 0 0 14.02 2h-4c-.24 0-.44.17-.48.42L9.16 5.07c-.6.23-1.17.56-1.69.98l-2.49-1a.49.49 0 0 0-.6.22l-2 3.46c-.12.22-.07.49.12.64l2.11 1.65a7.93 7.93 0 0 0 0 1.96L2.5 14.63a.49.49 0 0 0-.12.64l2 3.46c.12.22.37.31.6.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.04.25.24.42.48.42h4c.24 0 .44-.17.48-.42l.38-2.65c.6-.24 1.17-.56 1.69-.98l2.49 1c.23.08.48 0 .6-.22l2-3.46a.49.49 0 0 0-.12-.64l-2.11-1.65ZM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-btn--login::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 17v-3H3v-4h7V7l5 5-5 5Zm2-15h7c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2h-7v-2h7V4h-7V2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 17v-3H3v-4h7V7l5 5-5 5Zm2-15h7c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2h-7v-2h7V4h-7V2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-btn,
.new-chat,
.quick-new-chat-btn,
.chat-action,
.attach-btn,
.voice-btn,
.voice-call-btn,
.modal-close,
.referrals-back-btn,
.document-save-icon,
.settings-menu-icon,
.my-documents-icon,
.inline-link-btn span:first-child,
.document-inline-icon {
  display: inline-grid;
  place-items: center;
}

.document-save-icon,
.settings-menu-icon,
.voice-btn-icon,
.my-documents-icon,
.document-inline-icon {
  flex: 0 0 auto;
  align-self: center;
  justify-self: center;
}

.sidebar-head {
  display: grid;
  gap: 8px;
}

.sidebar-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.sidebar-title {
  margin: 0;
  color: #142e50;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.new-chat,
.search-chat,
.history-item,
.send-btn,
.model-btn,
.suggest {
  font-family: inherit;
}

.new-chat {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid #b6c9e9;
  color: #0e315b;
  background: linear-gradient(150deg, #f8fcff, #e9f2ff);
  border-radius: 13px;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.new-chat::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  background: currentColor;
  transform: translate(-50%, -50%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 11h-6V5h-2v6H5v2h6v6h2v-6h6v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 11h-6V5h-2v6H5v2h6v6h2v-6h6v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.search-chat {
  width: 100%;
  border: 1px solid rgba(150, 173, 207, 0.32);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: #344763;
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.new-chat:hover,
.history-item:hover,
.model-btn:hover,
.send-btn:hover,
.suggest:hover {
  transform: translateY(-1px);
}

.search-chat:focus {
  border-color: #9fc0ea;
}

.sidebar-section {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 2px;
}

.sidebar-label {
  margin: 0;
  padding-left: 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f7d95;
}

.history {
  display: grid;
  gap: 8px;
}

.history-item {
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
  padding: 10px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.history-main {
  min-width: 0;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.history-actions {
  display: inline-flex;
  gap: 4px;
  opacity: 0.35;
  align-items: center;
}

.history-item:hover .history-actions {
  opacity: 1;
}

.chat-action {
  position: relative;
  border: 1px solid #d3dfef;
  border-radius: 8px;
  background: #fff;
  color: #335275;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.chat-action::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.chat-action--rename::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 17.25V21h3.75L17.8 9.95l-3.75-3.75L3 17.25Zm17.7-10.2c.4-.4.4-1.03 0-1.42l-2.34-2.34a.99.99 0 0 0-1.41 0l-1.84 1.84 3.75 3.75 1.84-1.83Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 17.25V21h3.75L17.8 9.95l-3.75-3.75L3 17.25Zm17.7-10.2c.4-.4.4-1.03 0-1.42l-2.34-2.34a.99.99 0 0 0-1.41 0l-1.84 1.84 3.75 3.75 1.84-1.83Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.chat-action--delete::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12ZM8 9h8v10H8V9Zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12ZM8 9h8v10H8V9Zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.history-item--active {
  border-color: #b6caea;
  background: linear-gradient(145deg, #f8fbff, #eef4ff);
}

.history-title {
  font-size: 16px;
  color: #1a3356;
}

.history-sub {
  font-size: 12px;
  color: #6a7891;
}

.empty-history {
  font-size: 13px;
  color: #6f7d95;
  padding: 6px;
}

.sidebar-foot {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.my-documents-btn {
  width: 100%;
  border: 1px solid rgba(176, 197, 228, 0.72);
  border-radius: 15px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.95), transparent 38%),
    linear-gradient(145deg, #f8fcff, #e8f2ff);
  color: #17375f;
  min-height: 42px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31, 73, 124, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.my-documents-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(43, 106, 167, 0.34);
  box-shadow: 0 14px 28px rgba(31, 73, 124, 0.13);
}

.my-documents-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.8V8h4.2L14 3.8ZM8 12h8v1.8H8V12Zm0 4h8v1.8H8V16Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.8V8h4.2L14 3.8ZM8 12h8v1.8H8V12Zm0 4h8v1.8H8V16Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.brand {
  margin: 0;
  font-size: 20px;
  color: #15335c;
  line-height: 1.05;
}

.brand-sub {
  margin: 3px 0 0;
  color: #6b7991;
  font-size: 11px;
  font-weight: 700;
}

.brand-lockup {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 2px;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(13, 44, 80, 0.2);
}

.chat-layout {
  position: relative;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.58), transparent 35%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid var(--line-soft);
  padding: 15px 22px;
  background: rgba(250, 252, 253, 0.94);
  backdrop-filter: blur(18px);
  transition: padding 0.2s ease, border-color 0.2s ease;
}

.topbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.menu-btn {
  border: 1px solid #c9d8ef;
  border-radius: 10px;
  background: linear-gradient(145deg, #f8fcff, #edf4ff);
  color: #1c426f;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 11px;
  cursor: pointer;
}

.quick-new-chat-btn {
  border: 1px solid #c9d8ef;
  border-radius: 10px;
  background: linear-gradient(145deg, #f8fcff, #edf4ff);
  color: #1c426f;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  width: 38px;
  height: 34px;
  padding: 0 0 2px;
  cursor: pointer;
}

.topbar-title h1 {
  margin: 0;
  font-size: 24px;
  color: #102d50;
  line-height: 1.16;
  transition: font-size 0.2s ease;
}

.topbar-title p {
  margin: 5px 0 0;
  color: #68778c;
  font-size: 13px;
  transition: font-size 0.2s ease, margin-top 0.2s ease;
}

.chat-layout.chat-layout--active .topbar {
  padding: 12px 18px;
}

.chat-layout.chat-layout--active .topbar-title h1 {
  font-size: 20px;
}

.chat-layout.chat-layout--active .topbar-title p {
  font-size: 12px;
  margin-top: 3px;
}

.chat-feed {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 20px 0 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chat-stream {
  width: min(940px, calc(100% - 36px));
  margin: 0 auto;
}

.chat-intro.hidden {
  display: none;
}

.chat-intro {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px 0;
}

.start-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(142, 167, 199, 0.38);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 255, 255, 0.98), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(235, 242, 248, 0.85));
  box-shadow:
    0 28px 72px rgba(28, 55, 89, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  padding: clamp(24px, 4vw, 44px);
  text-align: center;
}

.start-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -90px;
  border-radius: 999px;
  background: rgba(23, 74, 134, 0.07);
  filter: blur(6px);
}

.start-card::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 180px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
  opacity: 0.72;
}

.start-eyebrow {
  margin: 0 0 9px;
  color: #557195;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.start-card h2 {
  position: relative;
  margin: 0;
  color: #0d294a;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.start-subtitle {
  position: relative;
  max-width: 620px;
  margin: 14px auto 0;
  color: #5f7087;
  font-size: 15px;
  line-height: 1.55;
}

.message {
  margin-bottom: 14px;
  max-width: min(880px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, #ffffff, #f8fbff);
  padding: 13px 15px;
  line-height: 1.55;
  font-size: 15px;
  white-space: pre-wrap;
  animation: rise 0.24s ease;
}

.message h3,
.message h4 {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  color: inherit;
}

.message p {
  margin: 0 0 8px;
}

.message p:last-child {
  margin-bottom: 0;
}

.message ul {
  margin: 0 0 8px 18px;
  padding: 0;
}

.message li {
  margin: 0 0 4px;
}

.message strong {
  font-weight: 800;
}

.message a {
  color: #1a5fb4;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 95, 180, 0.35);
}

.message a:hover {
  border-bottom-color: rgba(26, 95, 180, 0.8);
}

.message code {
  font-family: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(20, 30, 48, 0.08);
  border-radius: 6px;
  padding: 1px 5px;
}

.template-preview-img {
  display: block;
  width: min(420px, 100%);
  max-height: 520px;
  object-fit: cover;
  object-position: top left;
  margin: 10px 0 12px;
  border: 1px solid rgba(151, 164, 183, 0.32);
  border-radius: 16px;
  background: #fbfbf8;
  box-shadow: 0 14px 34px rgba(20, 38, 65, 0.12);
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.attachment-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(360px, 100%);
  border: 1px solid rgba(201, 218, 238, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
}

.message--user .attachment-card {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.attachment-preview {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #e9f2ff, #ffffff);
  color: #174a86;
  font-size: 11px;
  font-weight: 900;
}

.message--user .attachment-preview {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-body {
  min-width: 0;
}

.attachment-title,
.attachment-meta {
  margin: 0;
}

.attachment-title {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta {
  margin-top: 3px;
  color: rgba(95, 111, 137, 0.92);
  font-size: 11px;
  font-weight: 700;
}

.message--user .attachment-meta {
  color: rgba(255, 255, 255, 0.78);
}

.message--assistant {
  color: #13233a;
}

.message--document {
  position: relative;
  border-color: rgba(32, 91, 160, 0.24);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 54%, #eef6ff 100%);
  box-shadow:
    0 22px 55px rgba(28, 68, 116, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 18px 18px 16px 24px;
  overflow: hidden;
}

.message--document::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #173f70, #2d76bd 48%, #9bc7f4);
}

.message--document::after {
  content: "Документ";
  position: absolute;
  top: 12px;
  right: 14px;
  border: 1px solid rgba(34, 91, 157, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #55708d;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-save-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(157, 184, 219, 0.58);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 1), transparent 42%),
    linear-gradient(145deg, rgba(250, 253, 255, 0.96), rgba(226, 239, 255, 0.88));
  box-shadow:
    0 14px 34px rgba(29, 68, 116, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.document-message-context {
  margin: 0 0 12px;
  padding-right: 92px;
}

.document-message-context h3,
.document-message-context h4 {
  margin-top: 0;
}

.document-message-notes {
  margin-top: 12px;
  color: #4d617b;
  font-size: 13px;
}

.document-body-card {
  position: relative;
  margin: 12px 0 4px;
  border: 1px solid rgba(36, 85, 142, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.98), transparent 36%),
    linear-gradient(145deg, #ffffff 0%, #f7fbff 62%, #edf5ff 100%);
  box-shadow:
    0 22px 44px rgba(31, 75, 130, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

.document-body-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 12px;
  border-bottom: 1px solid rgba(49, 95, 149, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 255, 0.84));
}

.document-body-title {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #17375f;
}

.document-body-title b {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-body-title small {
  max-width: 520px;
  color: #617790;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.document-body-badge {
  width: fit-content;
  border: 1px solid rgba(31, 82, 143, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #60748d;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-body-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.document-body-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid rgba(31, 82, 143, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #17375f;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 79, 139, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.document-body-action--primary {
  border-color: rgba(31, 82, 143, 0.24);
  background: linear-gradient(145deg, #17375f, #2b6aa7);
  color: #ffffff;
}

.document-body-action:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 82, 143, 0.34);
  box-shadow: 0 13px 24px rgba(31, 79, 139, 0.16);
}

.document-body-paper {
  margin: 12px;
  padding: 28px min(34px, 5vw);
  border: 1px solid rgba(174, 190, 210, 0.48);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(208, 67, 67, 0.22) 0 1px, transparent 1px 100%) 30px 0 / 1px 100% no-repeat,
    #fffefb;
  color: #151515;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  line-height: 1.55;
  box-shadow:
    0 18px 36px rgba(44, 65, 91, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.document-body-paper p {
  margin: 0 0 8px;
}

.document-body-paper h3,
.document-body-paper h4 {
  margin: 10px 0 10px;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  text-align: center;
  letter-spacing: 0.01em;
}

.document-save-preview,
.my-document-thumb {
  width: 52px;
  height: 66px;
  border: 1px solid rgba(45, 91, 145, 0.2);
  border-radius: 11px;
  background:
    linear-gradient(90deg, rgba(222, 68, 68, 0.23) 0 1px, transparent 1px 100%) 12px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, #ffffff 0%, #f9fbff 58%, #edf5ff 100%);
  box-shadow:
    0 12px 22px rgba(31, 73, 124, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  padding: 15px 9px 8px 18px;
  display: grid;
  gap: 5px;
  align-content: start;
  transform: rotate(-1deg);
}

.document-save-preview span,
.my-document-thumb span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(23, 74, 134, 0.28);
}

.document-save-label {
  display: grid;
  gap: 4px;
  color: #183d69;
  font-size: 14px;
  min-width: 0;
}

.document-save-label b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-save-label small {
  color: #65768f;
  font-size: 11px;
  font-weight: 800;
}

.document-save-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.document-save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(31, 82, 143, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(145deg, #17375f, #2b6aa7);
  color: #fff;
  min-height: 38px;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 79, 139, 0.17);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.document-save-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: currentColor;
}

.document-save-icon--download {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v9.2l3.3-3.3 1.4 1.4L12 16l-5.7-5.7 1.4-1.4 3.3 3.3V3Zm-6 15h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 3h2v9.2l3.3-3.3 1.4 1.4L12 16l-5.7-5.7 1.4-1.4 3.3 3.3V3Zm-6 15h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.document-save-icon--edit {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 17.2V20h2.8L17.1 9.7l-2.8-2.8L4 17.2ZM19.3 7.5c.4-.4.4-1 0-1.4l-1.4-1.4a1 1 0 0 0-1.4 0l-1.1 1.1 2.8 2.8 1.1-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 17.2V20h2.8L17.1 9.7l-2.8-2.8L4 17.2ZM19.3 7.5c.4-.4.4-1 0-1.4l-1.4-1.4a1 1 0 0 0-1.4 0l-1.1 1.1 2.8 2.8 1.1-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.document-save-icon--check {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.2 16.6-4-4 1.5-1.5 2.5 2.5 8.1-8.1 1.5 1.5-9.6 9.6ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.2 16.6-4-4 1.5-1.5 2.5 2.5 8.1-8.1 1.5 1.5-9.6 9.6ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.document-save-btn--docx {
  background: linear-gradient(145deg, #f7fbff, #e5f0ff);
  color: #17375f;
}

.document-save-btn--soft {
  background: rgba(255, 255, 255, 0.78);
  color: #48627f;
  border-color: rgba(102, 131, 168, 0.22);
}

.document-save-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 82, 143, 0.32);
  box-shadow: 0 15px 28px rgba(31, 79, 139, 0.22);
}

.message--assistant p,
.message--assistant li,
.message--assistant h3,
.message--assistant h4,
.message--assistant code {
  color: inherit;
}

.message--streaming {
  animation: none;
  color: #13233a !important;
  transform: none;
  will-change: contents;
}

.message--streaming::after {
  content: none;
}

.message--user {
  margin-left: auto;
  border-color: rgba(44, 95, 164, 0.48);
  background: linear-gradient(145deg, var(--user-a), var(--user-b));
  color: #fff;
  box-shadow: var(--shadow-md);
}

.message--typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.message--typing span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #5d7092;
  animation: blink 1s infinite ease-in-out;
}

.message--typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.message--typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.followup-row {
  margin: -4px 0 14px;
  max-width: min(880px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.followup-chip {
  border: 1px solid #d4e1f6;
  background: linear-gradient(145deg, #f7fbff, #edf3ff);
  color: #1f4471;
  border-radius: 999px;
  padding: 7px 12px;
  max-width: min(100%, 520px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.followup-chip:hover {
  transform: translateY(-1px);
  border-color: #b8cdef;
  box-shadow: 0 8px 16px rgba(45, 89, 151, 0.12);
}

.retry-btn {
  margin-top: 12px;
  border: 1px solid #c9daef;
  border-radius: 999px;
  background: linear-gradient(145deg, #f8fcff, #eaf3ff);
  color: #1d4777;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(36, 83, 146, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.retry-btn:hover {
  transform: translateY(-1px);
  border-color: #abc5eb;
  box-shadow: 0 14px 28px rgba(36, 83, 146, 0.16);
}

.retry-btn span {
  font-size: 15px;
  line-height: 1;
}

.suggest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: min(760px, 100%);
  margin: 0 auto 6px;
}

.suggest {
  position: relative;
  min-height: 58px;
  border: 1px solid rgba(143, 169, 203, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 249, 0.9));
  color: #1d3d64;
  text-align: left;
  padding: 13px 14px 13px 44px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(26, 54, 88, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.suggest::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 19px;
  height: 19px;
  background: currentColor;
  transform: translateY(-50%);
  opacity: 0.78;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h10l4 4v14H5V3Zm9 1.8V8h3.2L14 4.8ZM8 12h8v1.8H8V12Zm0 4h6v1.8H8V16Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 3h10l4 4v14H5V3Zm9 1.8V8h3.2L14 4.8ZM8 12h8v1.8H8V12Zm0 4h6v1.8H8V16Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suggest:nth-child(2)::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3h4v2h-4V3Zm-5 4h14v13H5V7Zm2 2v9h10V9H7Zm2 2h6v2H9v-2Zm0 4h4v2H9v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3h4v2h-4V3Zm-5 4h14v13H5V7Zm2 2v9h10V9H7Zm2 2h6v2H9v-2Zm0 4h4v2H9v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suggest:nth-child(3)::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16v3H4V5Zm0 5h11v3H4v-3Zm0 5h16v3H4v-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16v3H4V5Zm0 5h11v3H4v-3Zm0 5h16v3H4v-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suggest:nth-child(4)::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.3 17.2-4-4 1.5-1.5 2.5 2.5 7.9-8 1.5 1.5-9.4 9.5ZM5 20h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.3 17.2-4-4 1.5-1.5 2.5 2.5 7.9-8 1.5 1.5-9.4 9.5ZM5 20h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.suggest:hover {
  border-color: rgba(52, 103, 157, 0.36);
  background: #ffffff;
  box-shadow: 0 15px 30px rgba(33, 70, 111, 0.12);
}

.composer-wrap {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(247, 250, 252, 0.97));
  padding: 12px 16px 16px;
  z-index: 11;
  backdrop-filter: blur(18px);
}

.voice-panel {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding:
    max(12px, env(safe-area-inset-top))
    14px
    max(12px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 15%, rgba(88, 159, 255, 0.3), transparent 34%),
    radial-gradient(circle at 14% 86%, rgba(65, 210, 220, 0.18), transparent 34%),
    radial-gradient(circle at 92% 78%, rgba(18, 58, 112, 0.24), transparent 38%),
    rgba(6, 14, 26, 0.54);
  backdrop-filter: blur(26px) saturate(145%);
  overflow: auto;
  overscroll-behavior: contain;
}

.voice-panel[hidden] {
  display: none;
}

.voice-call-card {
  position: relative;
  width: min(430px, 100%);
  height: min(540px, 72vh, calc(var(--app-height) - 32px));
  min-height: 0;
  max-height: calc(var(--app-height) - 32px);
  border: 1px solid rgba(206, 224, 248, 0.78);
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% -2%, rgba(255, 255, 255, 0.98), transparent 28%),
    radial-gradient(circle at 12% 22%, rgba(99, 174, 255, 0.28), transparent 32%),
    radial-gradient(circle at 90% 74%, rgba(84, 220, 226, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(252, 254, 255, 0.97), rgba(231, 243, 255, 0.94));
  box-shadow:
    0 36px 105px rgba(7, 28, 62, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.42) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(130px, 1fr) auto;
  gap: clamp(8px, 1.7vh, 14px);
  padding: clamp(11px, 1.9vh, 16px);
}

.voice-call-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -28% -20%;
  height: 48%;
  background:
    radial-gradient(ellipse at center, rgba(23, 74, 134, 0.16), transparent 66%);
  pointer-events: none;
}

.voice-call-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 2px 0;
}

.voice-call-kicker {
  margin: 0 0 5px;
  color: #587092;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.voice-call-head h2 {
  margin: 0;
  color: #102745;
  font-family: Fraunces, Georgia, serif;
  font-size: 31px;
  line-height: 1;
}

.voice-call-close {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(168, 190, 220, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: #173f70;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(38, 80, 136, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.voice-call-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(38, 80, 136, 0.18);
}

.voice-call-orb {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(210px, 38vh, 58vw);
  height: min(210px, 38vh, 58vw);
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 25%, rgba(255, 255, 255, 0.92), transparent 18%),
    radial-gradient(circle at 65% 72%, rgba(58, 188, 214, 0.6), transparent 23%),
    radial-gradient(circle at 38% 70%, rgba(65, 120, 220, 0.72), transparent 30%),
    linear-gradient(145deg, #123a70, #2f7fc9 48%, #6fd6e7);
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    0 34px 80px rgba(20, 75, 142, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.64),
    inset 0 -24px 54px rgba(4, 21, 46, 0.2);
  isolation: isolate;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.voice-call-orb:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.08);
}

.voice-call-orb:active {
  transform: scale(0.985);
}

.voice-call-ring {
  position: absolute;
  inset: -14px;
  border-radius: 999px;
  border: 1px solid rgba(65, 136, 225, 0.22);
  opacity: 0;
  pointer-events: none;
}

.voice-call-ring--two {
  inset: -30px;
}

.voice-call-core {
  position: absolute;
  inset: 31%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 26px rgba(255, 255, 255, 0.16);
}

.voice-call-core span {
  width: 7px;
  min-height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transform-origin: center;
  animation: voiceWave 0.96s ease-in-out infinite;
}

.voice-call-core span:nth-child(2) {
  min-height: 38px;
  animation-delay: 0.09s;
}

.voice-call-core span:nth-child(3) {
  min-height: 30px;
  animation-delay: 0.18s;
}

.voice-call-core span:nth-child(4) {
  min-height: 22px;
  animation-delay: 0.27s;
}

.voice-panel--idle .voice-call-core span {
  animation-play-state: paused;
  transform: scaleY(0.58);
}

.voice-panel--listening .voice-call-ring {
  animation: voiceCallRing 1.6s ease-out infinite;
  opacity: 1;
}

.voice-panel--listening .voice-call-ring--two {
  animation-delay: 0.32s;
}

.voice-panel--thinking .voice-call-orb {
  animation: voiceThink 2.1s ease-in-out infinite;
  filter: hue-rotate(10deg) saturate(1.08);
}

.voice-panel--speaking .voice-call-orb {
  animation: voiceSpeak 1.12s ease-in-out infinite;
  filter: saturate(1.16);
}

.voice-panel--speaking .voice-call-ring {
  animation: voiceCallRing 1.22s ease-out infinite;
  opacity: 1;
}

.voice-panel--speaking .voice-call-ring--two {
  animation-delay: 0.2s;
}

.voice-panel--error .voice-call-orb {
  background:
    radial-gradient(circle at 36% 25%, rgba(255, 255, 255, 0.7), transparent 18%),
    linear-gradient(145deg, #7b2625, #db6a55);
}

.voice-call-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  text-align: center;
  padding: 0 12px 4px;
}

.voice-call-status {
  margin: 0;
  color: #102745;
  font-size: clamp(23px, 4.4vw, 30px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.voice-call-transcript {
  min-height: 34px;
  margin: 0 auto;
  max-width: 360px;
  color: #405879;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.42;
}

.voice-call-hint {
  margin: 0 auto;
  max-width: 360px;
  color: #6b7d99;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.36;
}

.voice-call-end {
  justify-self: center;
  min-height: 42px;
  margin-top: 2px;
  border: 1px solid rgba(205, 74, 87, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 243, 245, 0.88));
  color: #9d2738;
  padding: 0 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(126, 42, 56, 0.1);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.voice-call-end:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 235, 239, 0.94));
  box-shadow: 0 18px 36px rgba(126, 42, 56, 0.14);
}

.composer {
  width: min(940px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(119, 149, 185, 0.35);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.98), transparent 42%),
    linear-gradient(150deg, #ffffff, #f4f7fa);
  box-shadow:
    0 14px 34px rgba(25, 54, 90, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  padding: 12px 13px;
  display: grid;
  gap: 10px;
}

.composer textarea {
  width: 100%;
  min-height: 30px;
  max-height: 220px;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  color: #12243b;
}

.composer textarea::placeholder {
  color: #8090ad;
}

.tools-row {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.model-switch {
  border: 1px solid rgba(125, 153, 187, 0.28);
  border-radius: 12px;
  padding: 2px;
  display: inline-flex;
  gap: 3px;
  background: #edf2f6;
}

.attach-btn,
.voice-call-btn {
  position: relative;
  border: 1px solid rgba(163, 184, 215, 0.72);
  border-radius: 13px;
  width: 38px;
  height: 38px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.96), transparent 42%),
    linear-gradient(145deg, #ffffff, #edf5ff);
  color: #173f70;
  padding: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(38, 80, 136, 0.1);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.attach-btn::after,
.voice-call-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.attach-btn::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6Zm-1 7V3.5L18.5 9H13Zm-5 4h8v2H8v-2Zm0 4h8v2H8v-2Zm0-8h3v2H8V9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6Zm-1 7V3.5L18.5 9H13Zm-5 4h8v2H8v-2Zm0 4h8v2H8v-2Zm0-8h3v2H8V9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-call-btn::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.6 10.15c1.35 2.65 3.6 4.9 6.25 6.25l2.1-2.1c.27-.27.66-.36 1-.24 1.1.36 2.28.55 3.5.55.55 0 1 .45 1 1V19c0 .55-.45 1-1 1C10.86 20 3 12.14 3 2.55c0-.55.45-1 1-1h3.4c.55 0 1 .45 1 1 0 1.22.19 2.4.55 3.5.11.35.03.73-.24 1l-2.11 2.1Zm7.85-6.6a.8.8 0 0 1 1.13 0 6.33 6.33 0 0 1 1.87 4.5.8.8 0 0 1-1.6 0 4.74 4.74 0 0 0-1.4-3.37.8.8 0 0 1 0-1.13Zm3.1-2.55a.8.8 0 0 1 1.13 0 9.96 9.96 0 0 1 2.92 7.05.8.8 0 1 1-1.6 0 8.35 8.35 0 0 0-2.45-5.92.8.8 0 0 1 0-1.13Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.6 10.15c1.35 2.65 3.6 4.9 6.25 6.25l2.1-2.1c.27-.27.66-.36 1-.24 1.1.36 2.28.55 3.5.55.55 0 1 .45 1 1V19c0 .55-.45 1-1 1C10.86 20 3 12.14 3 2.55c0-.55.45-1 1-1h3.4c.55 0 1 .45 1 1 0 1.22.19 2.4.55 3.5.11.35.03.73-.24 1l-2.11 2.1Zm7.85-6.6a.8.8 0 0 1 1.13 0 6.33 6.33 0 0 1 1.87 4.5.8.8 0 0 1-1.6 0 4.74 4.74 0 0 0-1.4-3.37.8.8 0 0 1 0-1.13Zm3.1-2.55a.8.8 0 0 1 1.13 0 9.96 9.96 0 0 1 2.92 7.05.8.8 0 1 1-1.6 0 8.35 8.35 0 0 0-2.45-5.92.8.8 0 0 1 0-1.13Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.attach-btn:hover,
.voice-call-btn:hover {
  transform: translateY(-1px);
  border-color: #aac5ea;
  box-shadow: 0 12px 24px rgba(38, 80, 136, 0.16);
}

.attach-btn:disabled,
.voice-call-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.model-btn {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3d4f6c;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: 0.18s ease;
}

.model-btn--active {
  background: #fff;
  color: #153964;
  box-shadow: 0 4px 12px rgba(17, 33, 56, 0.1);
}

.topic-select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(125, 153, 187, 0.28);
  border-radius: 12px;
  background: #f6f8fa;
  padding: 7px 10px;
  color: #4b5c79;
}

.topic-select span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.topic-select select {
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #203e67;
}

.send-btn {
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  min-height: 38px;
  background:
    linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 10px 20px rgba(31, 79, 139, 0.26);
}

.voice-btn {
  position: relative;
  border: 1px solid rgba(163, 184, 215, 0.72);
  border-radius: 13px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.96), transparent 42%),
    linear-gradient(145deg, #ffffff, #edf5ff);
  color: #173f70;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 8px 18px rgba(38, 80, 136, 0.1);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
}

.voice-btn:hover {
  transform: translateY(-1px);
  border-color: #aac5ea;
  box-shadow: 0 12px 24px rgba(38, 80, 136, 0.16);
}

.voice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.voice-btn-icon {
  display: none;
}

.voice-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: auto;
  background: currentColor;
  pointer-events: none;
  transform: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3Zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.49 6-3.31 6-6.72h-1.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3Zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.49 6-3.31 6-6.72h-1.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-btn--active {
  color: #ffffff;
  border-color: rgba(197, 77, 67, 0.42);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.25), transparent 44%),
    linear-gradient(145deg, #a93f38, #de7655);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 28px rgba(185, 56, 56, 0.24);
}

.voice-btn--active::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 16px;
  border: 1px solid rgba(185, 56, 56, 0.34);
  animation: voicePulse 1.2s ease-out infinite;
}

.voice-call-btn--active,
.voice-call-btn--speaking {
  color: #ffffff;
  border-color: rgba(23, 74, 134, 0.22);
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.32), transparent 44%),
    linear-gradient(145deg, #174a86, #38a3c8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 13px 30px rgba(31, 86, 151, 0.26);
}

.voice-call-btn--active::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 16px;
  border: 1px solid rgba(56, 163, 200, 0.34);
  animation: voicePulse 1.25s ease-out infinite;
}

.pending-uploads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d4dfef;
  background: #f7faff;
  border-radius: 999px;
  padding: 4px 8px;
}

.upload-chip-title {
  border: 0;
  background: transparent;
  color: #29486f;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-chip-remove {
  border: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dce9fb;
  color: #24456d;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

.status {
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.tip {
  color: #6f7e98;
  font-size: 12px;
}

.sources {
  display: none !important;
}

.message-sources {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}

.message-sources:empty {
  display: none;
}

.message-sources::-webkit-scrollbar {
  display: none;
}

.inline-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(100%, 360px);
  margin: 0 3px;
  padding: 3px 9px;
  border: 1px solid rgba(42, 92, 146, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(236, 245, 255, 0.92));
  color: #245f98;
  font-size: 0.93em;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: baseline;
  box-shadow:
    0 8px 20px rgba(31, 76, 128, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-link-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 95, 161, 0.34);
  background: #fff;
}

.inline-link-btn span {
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
}

.citation-chip {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin: 0 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f6fb9, #183d70);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  box-shadow: 0 7px 16px rgba(31, 76, 128, 0.18);
  transition: transform 0.16s ease, filter 0.16s ease;
}

.citation-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 25px;
  border: 1px solid rgba(42, 92, 146, 0.14);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  padding: 4px 9px 4px 5px;
  font-size: 11px;
  font-weight: 750;
  color: #315d8d;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(27, 58, 96, 0.08);
  backdrop-filter: blur(14px);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.source-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 95, 161, 0.3);
  background: #fff;
}

.source-pill-index {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f6fb9, #183d70);
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.source-pill-host {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  width: min(560px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(166, 187, 219, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.96), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 244, 255, 0.94));
  box-shadow: 0 22px 54px rgba(19, 45, 78, 0.22);
  padding: 10px 10px 10px 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.install-banner[hidden] {
  display: none;
}

.install-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(29, 66, 110, 0.18);
}

.install-banner-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.install-banner-copy {
  min-width: 0;
}

.install-banner-title {
  margin: 0;
  color: #12315c;
  font-size: 13px;
  font-weight: 900;
}

.install-banner-text {
  margin: 2px 0 0;
  color: #65758f;
  font-size: 12px;
  line-height: 1.25;
}

.install-banner-action,
.install-banner-close {
  font-family: inherit;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 24, 42, 0.42);
  backdrop-filter: blur(8px);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid rgba(177, 197, 225, 0.64);
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff, #f3f8ff);
  box-shadow: 0 32px 90px rgba(18, 43, 78, 0.25);
  padding: 22px;
}

.modal-card--narrow {
  width: min(440px, 100%);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 1), transparent 34%),
    linear-gradient(150deg, #ffffff, #eef3f7);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid #d0dcec;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  color: #526985;
}

.modal-kicker {
  margin: 0 0 6px;
  color: #61738f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-brand {
  display: inline-grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 9px;
  margin: 0 46px 18px 0;
  color: #17375f;
  font-family: "Fraunces", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
}

.auth-brand img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  box-shadow: 0 9px 20px rgba(13, 45, 82, 0.18);
}

.modal-card h2 {
  margin: 0 38px 8px 0;
  color: #102d52;
  font-family: "Fraunces", Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.modal-card h3 {
  margin: 0 0 10px;
  color: #17375f;
}

.modal-note,
.modal-status {
  color: #63738d;
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 14px 0;
  padding: 3px;
  border-radius: 13px;
  background: #edf4ff;
}

.auth-tab {
  border: 0;
  border-radius: 10px;
  padding: 9px;
  background: transparent;
  font-weight: 900;
  color: #536984;
  cursor: pointer;
}

.auth-tab--active {
  background: #fff;
  color: #17375f;
  box-shadow: 0 1px 3px rgba(23, 53, 88, 0.1);
}

.modal-form {
  display: grid;
  gap: 9px;
}

.modal-form input {
  border: 1px solid #cfdaea;
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
}

.modal-form input:focus {
  border-color: rgba(38, 101, 164, 0.62);
  box-shadow: 0 0 0 3px rgba(38, 101, 164, 0.09);
}

.auth-captcha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 38px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  border: 1px solid rgba(136, 162, 195, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(247, 250, 252, 0.94), rgba(235, 241, 247, 0.92));
  padding: 8px 9px 8px 12px;
}

.auth-captcha > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.auth-captcha-label {
  color: #6c7a8e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-captcha b {
  color: #17375f;
  font-size: 14px;
}

.auth-captcha input {
  min-width: 0;
  width: 100%;
  padding: 8px 9px;
  text-align: center;
  font-weight: 900;
}

.auth-captcha-refresh {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(128, 156, 192, 0.3) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.76) !important;
  color: #254e78 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.auth-captcha-refresh::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 17px;
  height: 17px;
  margin: auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.76-4.24L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.76-4.24L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.modal-form button,
.settings-actions button,
.buy-btn {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.document-link-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  padding: 4px;
  border: 1px solid rgba(181, 199, 224, 0.62);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(26, 62, 105, 0.08);
}

.document-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 74px;
  min-height: 32px;
  margin: 2px 4px 2px 0;
  padding: 0 12px;
  border: 1px solid rgba(31, 82, 143, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(145deg, #17375f, #2c6da7);
  color: #fff !important;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.03em;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  box-shadow:
    0 9px 18px rgba(31, 79, 139, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.document-download-link--doc {
  background:
    linear-gradient(145deg, #ffffff, #edf5ff);
  color: #17375f !important;
}

.document-download-link:hover {
  transform: translateY(-1px);
  box-shadow:
    0 13px 24px rgba(31, 79, 139, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  filter: brightness(1.03);
}

.document-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border: 1px solid rgba(43, 106, 167, 0.16);
  border-radius: 999px;
  background: linear-gradient(145deg, #f7fbff, #e8f2ff);
  color: #16406d;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.document-inline-btn:hover {
  border-color: rgba(43, 106, 167, 0.34);
  box-shadow: 0 8px 18px rgba(36, 82, 134, 0.12);
  transform: translateY(-1px);
}

.document-inline-btn--ghost {
  background: rgba(255, 255, 255, 0.72);
  color: #536984;
}

.document-inline-icon {
  width: 13px;
  height: 13px;
  background: currentColor;
}

.document-inline-icon--edit {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 17.2V20h2.8L17.1 9.7l-2.8-2.8L4 17.2ZM19.3 7.5c.4-.4.4-1 0-1.4l-1.4-1.4a1 1 0 0 0-1.4 0l-1.1 1.1 2.8 2.8 1.1-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 17.2V20h2.8L17.1 9.7l-2.8-2.8L4 17.2ZM19.3 7.5c.4-.4.4-1 0-1.4l-1.4-1.4a1 1 0 0 0-1.4 0l-1.1 1.1 2.8 2.8 1.1-1.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.document-inline-icon--check {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.2 16.6-4-4 1.5-1.5 2.5 2.5 8.1-8.1 1.5 1.5-9.6 9.6ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.2 16.6-4-4 1.5-1.5 2.5 2.5 8.1-8.1 1.5 1.5-9.6 9.6ZM5 19h14v2H5v-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.document-editor-card {
  width: min(1120px, 100%);
  display: grid;
  gap: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.98), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(203, 225, 255, 0.72), transparent 34%),
    linear-gradient(145deg, #ffffff, #edf5ff);
  border-color: rgba(162, 186, 219, 0.7);
}

.document-editor-grid {
  display: grid;
  gap: 8px;
}

.document-editor-label {
  color: #58708e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-editor-title,
.document-editor-text {
  width: 100%;
  border: 1px solid #c6d6ea;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #17375f;
  outline: none;
}

.document-editor-title {
  padding: 13px 14px;
  font: 900 15px/1.3 "Manrope", sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.document-editor-paper {
  position: relative;
  border: 1px solid rgba(174, 194, 221, 0.82);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(220, 68, 68, 0.18) 0 1px, transparent 1px 100%) 42px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 60px rgba(24, 58, 101, 0.14);
  padding: 14px 14px 14px 32px;
  overflow: hidden;
}

.document-editor-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(23, 74, 134, 0.045) 1px, transparent 1px);
  background-size: 100% 30px;
  opacity: 0.5;
}

.document-editor-text {
  position: relative;
  z-index: 1;
  min-height: min(58vh, 620px);
  resize: vertical;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 16px 18px;
  font: 15px/1.68 "Times New Roman", Times, serif;
  white-space: pre-wrap;
  box-shadow: none;
}

.document-editor-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 9px;
  border: 1px solid rgba(166, 190, 222, 0.66);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.98), transparent 42%),
    rgba(240, 247, 255, 0.78);
}

.document-editor-actions button,
.document-editor-downloads a {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  min-height: 42px;
  padding: 11px 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 12px 22px rgba(31, 79, 139, 0.15);
}

.document-editor-actions button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.document-editor-actions .document-editor-secondary {
  background: linear-gradient(145deg, #eef5ff, #dfeeff);
  color: #17375f;
  border: 1px solid #cddcf0;
}

.document-editor-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.document-editor-downloads a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(145deg, #f7fbff, #e5f0ff);
  color: #17375f;
  border: 1px solid #cddcf0;
  box-shadow: 0 10px 20px rgba(31, 79, 139, 0.1);
}

.document-editor-downloads a::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 20h14v-2H5v2ZM19 9h-4V3H9v6H5l7 7 7-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 20h14v-2H5v2ZM19 9h-4V3H9v6H5l7 7 7-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.my-documents-card {
  width: min(1060px, 100%);
  display: grid;
  gap: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.96), transparent 36%),
    linear-gradient(145deg, #ffffff, #edf5ff);
}

.my-documents-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 14px;
}

.my-documents-layout h3 {
  margin: 0 0 8px;
  color: #17375f;
  font-size: 16px;
}

.my-documents-list {
  display: grid;
  gap: 9px;
  max-height: min(54vh, 520px);
  overflow: auto;
  padding-right: 3px;
}

.my-documents-empty {
  margin: 0;
  border: 1px dashed rgba(126, 151, 184, 0.5);
  border-radius: 16px;
  padding: 18px;
  color: #65768f;
  background: rgba(255, 255, 255, 0.56);
}

.my-document-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(186, 204, 229, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px;
  box-shadow: 0 12px 28px rgba(31, 73, 124, 0.08);
}

.my-document-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.my-document-info b {
  color: #17375f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-document-info small {
  color: #65768f;
  line-height: 1.45;
}

.my-document-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.my-document-actions button,
.my-documents-form button {
  border: 1px solid rgba(31, 82, 143, 0.16);
  border-radius: 999px;
  background: linear-gradient(145deg, #17375f, #2b6aa7);
  color: #fff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.my-document-actions button:nth-child(2) {
  background: linear-gradient(145deg, #f7fbff, #e5f0ff);
  color: #17375f;
}

.my-document-actions button:nth-child(3) {
  background: rgba(255, 255, 255, 0.76);
  color: #8a3c3c;
}

.my-documents-form {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(186, 204, 229, 0.76);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  align-content: start;
}

.my-documents-form input,
.my-documents-form textarea {
  width: 100%;
  border: 1px solid #cfdaea;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #17375f;
  outline: none;
  padding: 11px 12px;
}

.my-documents-form textarea {
  resize: vertical;
  min-height: 190px;
  font: 14px/1.55 "Times New Roman", Times, serif;
}

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

.settings-panel {
  border: 1px solid #d8e3f1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.settings-panel--wide {
  grid-column: 1 / -1;
}

.settings-big {
  margin: 0 0 4px;
  color: #102d52;
  font-size: 24px;
  font-weight: 900;
}

.settings-actions,
.buy-grid {
  display: grid;
  gap: 8px;
}

.buy-btn {
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(145deg, #f7fbff, #e8f2ff);
  color: #17375f;
  border: 1px solid #cddcf0;
}

.buy-btn--pro {
  background: linear-gradient(145deg, #17375f, #2b6aa7);
  color: #fff;
}

.buy-btn--max {
  background: linear-gradient(145deg, #1a273c, #815f2d);
  color: #fff;
}

.login-history {
  display: grid;
  gap: 6px;
  color: #566982;
  font-size: 13px;
}

.settings-menu-card {
  position: relative;
  width: 100%;
  max-height: min(68vh, 620px);
  overflow: auto;
  border: 1px solid rgba(176, 197, 228, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(237, 245, 255, 0.86));
  color: #15335c;
  box-shadow: 0 16px 42px rgba(31, 73, 124, 0.14);
  padding: 12px;
}

.settings-menu-card .modal-close {
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(173, 195, 226, 0.78);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #526985;
  font-size: 20px;
  line-height: 1;
}

.settings-menu-head {
  border-bottom: 1px solid rgba(94, 120, 162, 0.14);
  padding: 4px 38px 10px 2px;
  margin-bottom: 8px;
}

.settings-account-name {
  margin: 0;
  color: #15335c;
  font-size: 15px;
  font-weight: 900;
}

.settings-account-meta {
  margin: 3px 0 0;
  color: #61738f;
  font-size: 12px;
  line-height: 1.35;
}

.settings-menu-list {
  display: grid;
  gap: 4px;
}

.settings-menu-row {
  position: relative;
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #1c426f;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.settings-menu-row[hidden] {
  display: none !important;
}

.settings-menu-row:hover,
.settings-menu-row--active {
  border-color: rgba(174, 197, 231, 0.74);
  background: rgba(255, 255, 255, 0.72);
  color: #123964;
}

.settings-menu-row--arrow::after {
  content: "";
  align-self: center;
  justify-self: end;
  width: 8px;
  height: 14px;
  margin-right: 2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.2 2 0 4.2 7.8 12 0 19.8 2.2 22 12.2 12 2.2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.2 2 0 4.2 7.8 12 0 19.8 2.2 22 12.2 12 2.2 2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon {
  width: 21px;
  height: 21px;
  background: currentColor;
}

.settings-menu-icon--sparkle {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 2.5 19.9 12l9.6 4-9.6 4L16 29.5 12.1 20l-9.6-4 9.6-4L16 2.5Zm0 6.3-2.2 5.4-5.3 1.8 5.3 1.8L16 23.2l2.2-5.4 5.3-1.8-5.3-1.8L16 8.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 2.5 19.9 12l9.6 4-9.6 4L16 29.5 12.1 20l-9.6-4 9.6-4L16 2.5Zm0 6.3-2.2 5.4-5.3 1.8 5.3 1.8L16 23.2l2.2-5.4 5.3-1.8-5.3-1.8L16 8.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--referral {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.8 5.8a5.2 5.2 0 1 1-1.4 10.2 7.4 7.4 0 0 0-6.8 0 5.2 5.2 0 1 1-1.4-2.3 7.1 7.1 0 0 0 9.6 0 5.2 5.2 0 0 1 0-7.9ZM8 8.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Zm16 0a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6ZM16 17a5.4 5.4 0 0 1 5.4 5.4V27H10.6v-4.6A5.4 5.4 0 0 1 16 17Zm0 2.4a3 3 0 0 0-3 3v2.2h6v-2.2a3 3 0 0 0-3-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.8 5.8a5.2 5.2 0 1 1-1.4 10.2 7.4 7.4 0 0 0-6.8 0 5.2 5.2 0 1 1-1.4-2.3 7.1 7.1 0 0 0 9.6 0 5.2 5.2 0 0 1 0-7.9ZM8 8.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Zm16 0a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6ZM16 17a5.4 5.4 0 0 1 5.4 5.4V27H10.6v-4.6A5.4 5.4 0 0 1 16 17Zm0 2.4a3 3 0 0 0-3 3v2.2h6v-2.2a3 3 0 0 0-3-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--personal {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.4a10.6 10.6 0 1 1 0 21.2 10.6 10.6 0 0 1 0-21.2Zm1.2 3.4h-2.4v8.1l6.1 3.7 1.2-2-4.9-2.9V8.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.4a10.6 10.6 0 1 1 0 21.2 10.6 10.6 0 0 1 0-21.2Zm1.2 3.4h-2.4v8.1l6.1 3.7 1.2-2-4.9-2.9V8.8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--profile {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.5a10.5 10.5 0 0 1 8.2 17.1c-1.7-3-4.6-4.6-8.2-4.6s-6.5 1.6-8.2 4.6A10.5 10.5 0 0 1 16 5.5Zm0 4a4.2 4.2 0 1 0 0 8.4 4.2 4.2 0 0 0 0-8.4Zm0 2.3a1.9 1.9 0 1 1 0 3.8 1.9 1.9 0 0 1 0-3.8Zm0 8.5c2.8 0 5 .95 6.2 3.1a10.44 10.44 0 0 1-12.4 0c1.2-2.15 3.4-3.1 6.2-3.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.5a10.5 10.5 0 0 1 8.2 17.1c-1.7-3-4.6-4.6-8.2-4.6s-6.5 1.6-8.2 4.6A10.5 10.5 0 0 1 16 5.5Zm0 4a4.2 4.2 0 1 0 0 8.4 4.2 4.2 0 0 0 0-8.4Zm0 2.3a1.9 1.9 0 1 1 0 3.8 1.9 1.9 0 0 1 0-3.8Zm0 8.5c2.8 0 5 .95 6.2 3.1a10.44 10.44 0 0 1-12.4 0c1.2-2.15 3.4-3.1 6.2-3.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--gear {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m27.2 18.2-2.3 1.8.8 2.8-2.9 2.9-2.8-.8-1.8 2.3h-4.4L12 24.9l-2.8.8-2.9-2.9.8-2.8-2.3-1.8v-4.4L7.1 12l-.8-2.8 2.9-2.9 2.8.8 1.8-2.3h4.4L20 7.1l2.8-.8 2.9 2.9-.8 2.8 2.3 1.8v4.4ZM16 11a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2.3a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m27.2 18.2-2.3 1.8.8 2.8-2.9 2.9-2.8-.8-1.8 2.3h-4.4L12 24.9l-2.8.8-2.9-2.9.8-2.8-2.3-1.8v-4.4L7.1 12l-.8-2.8 2.9-2.9 2.8.8 1.8-2.3h4.4L20 7.1l2.8-.8 2.9 2.9-.8 2.8 2.3 1.8v4.4ZM16 11a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0 2.3a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--help {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.4a10.6 10.6 0 1 1 0 21.2 10.6 10.6 0 0 1 0-21.2Zm-1.2 16.4h2.5v-2.5h-2.5v2.5Zm1.25-12.1c-2.6 0-4.35 1.5-4.45 3.8h2.35c.1-1.05.82-1.75 2.03-1.75 1.2 0 1.98.7 1.98 1.8 0 .9-.4 1.4-1.45 2.05-1.6.97-2.02 1.82-1.92 3.12h2.18c0-.88.35-1.32 1.48-2.02 1.45-.9 2.15-1.85 2.15-3.25 0-2.18-1.75-3.75-4.35-3.75Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 3a13 13 0 1 0 0 26 13 13 0 0 0 0-26Zm0 2.4a10.6 10.6 0 1 1 0 21.2 10.6 10.6 0 0 1 0-21.2Zm-1.2 16.4h2.5v-2.5h-2.5v2.5Zm1.25-12.1c-2.6 0-4.35 1.5-4.45 3.8h2.35c.1-1.05.82-1.75 2.03-1.75 1.2 0 1.98.7 1.98 1.8 0 .9-.4 1.4-1.45 2.05-1.6.97-2.02 1.82-1.92 3.12h2.18c0-.88.35-1.32 1.48-2.02 1.45-.9 2.15-1.85 2.15-3.25 0-2.18-1.75-3.75-4.35-3.75Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--bell {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 29a3.4 3.4 0 0 0 3.2-2.2h-6.4A3.4 3.4 0 0 0 16 29Zm10.4-7.2-2.3-3.1V13a8.1 8.1 0 0 0-6.2-7.9V3h-3.8v2.1A8.1 8.1 0 0 0 7.9 13v5.7l-2.3 3.1V24h20.8v-2.2ZM10.7 21.1l.9-1.2V13a4.4 4.4 0 1 1 8.8 0v6.9l.9 1.2H10.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 29a3.4 3.4 0 0 0 3.2-2.2h-6.4A3.4 3.4 0 0 0 16 29Zm10.4-7.2-2.3-3.1V13a8.1 8.1 0 0 0-6.2-7.9V3h-3.8v2.1A8.1 8.1 0 0 0 7.9 13v5.7l-2.3 3.1V24h20.8v-2.2ZM10.7 21.1l.9-1.2V13a4.4 4.4 0 1 1 8.8 0v6.9l.9 1.2H10.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-icon--logout,
.settings-menu-icon--login {
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5h11v3H9v16h8v3H6V5Zm16.2 7.2 5 5-5 5-2.1-2.1 1.4-1.4H13v-3h8.5l-1.4-1.4 2.1-2.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 5h11v3H9v16h8v3H6V5Zm16.2 7.2 5 5-5 5-2.1-2.1 1.4-1.4H13v-3h8.5l-1.4-1.4 2.1-2.1Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-menu-separator {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: rgba(94, 120, 162, 0.14);
}

.settings-details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(94, 120, 162, 0.14);
}

.settings-detail-panel {
  border: 1px solid rgba(176, 197, 228, 0.5);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px;
}

.settings-detail-panel h3 {
  margin: 0 0 8px;
  color: #17375f;
  font-size: 14px;
}

.settings-detail-note {
  margin: 0;
  color: #60718d;
  line-height: 1.45;
  font-size: 12px;
}

.settings-profile-form {
  margin-top: 10px;
}

.theme-setting-card {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(176, 197, 228, 0.62);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.98), transparent 42%),
    linear-gradient(145deg, rgba(248, 252, 255, 0.92), rgba(232, 242, 255, 0.78));
  padding: 11px;
}

.theme-setting-card b,
.theme-setting-card span {
  display: block;
}

.theme-setting-card b {
  color: #17375f;
  font-size: 13px;
  font-weight: 900;
}

.theme-setting-card span {
  margin-top: 2px;
  color: #65768f;
  font-size: 12px;
  font-weight: 800;
}

.theme-toggle-btn {
  border: 1px solid rgba(31, 82, 143, 0.16);
  border-radius: 999px;
  background: linear-gradient(145deg, #17375f, #2b6aa7);
  color: #fff;
  min-height: 36px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 79, 139, 0.15);
}

.theme-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(145deg, #f8fbff, #dfecff);
  color: #17375f;
}

.theme-toggle-icon {
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 14.4A8.6 8.6 0 0 1 9.6 3 9 9 0 1 0 21 14.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 14.4A8.6 8.6 0 0 1 9.6 3 9 9 0 1 0 21 14.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.settings-subtitle {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 120, 162, 0.14);
}

.settings-menu-card .modal-form input {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(176, 197, 228, 0.72);
  color: #17375f;
}

.settings-menu-card .modal-form input::placeholder {
  color: #7b8aa3;
}

:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .chat-layout,
:root[data-theme="dark"] .settings-menu-card,
:root[data-theme="dark"] .modal-card,
:root[data-theme="dark"] .support-panel,
:root[data-theme="dark"] .referrals-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(40, 92, 156, 0.24), transparent 36%),
    linear-gradient(160deg, rgba(13, 28, 48, 0.94), rgba(8, 18, 32, 0.94));
  border-color: rgba(149, 178, 218, 0.18);
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .account-card,
:root[data-theme="dark"] .history-item,
:root[data-theme="dark"] .settings-detail-panel,
:root[data-theme="dark"] .theme-setting-card,
:root[data-theme="dark"] .referral-stat-card,
:root[data-theme="dark"] .referral-card,
:root[data-theme="dark"] .referral-link-card,
:root[data-theme="dark"] .cards-setup-field input,
:root[data-theme="dark"] .cards-choice,
:root[data-theme="dark"] .cards-deck-zone,
:root[data-theme="dark"] .cards-player-line b,
:root[data-theme="dark"] .cards-scorebar span,
:root[data-theme="dark"] .cards-table,
:root[data-theme="dark"] .card-slot,
:root[data-theme="dark"] .card-item,
:root[data-theme="dark"] .referral-table-row,
:root[data-theme="dark"] .referral-detail-row,
:root[data-theme="dark"] .referral-rank-row,
:root[data-theme="dark"] .referral-card-toggle,
:root[data-theme="dark"] .referral-history-pager button,
:root[data-theme="dark"] .referral-empty,
:root[data-theme="dark"] .dice-stage,
:root[data-theme="dark"] .composer,
:root[data-theme="dark"] .start-card,
:root[data-theme="dark"] .suggest,
:root[data-theme="dark"] .message--assistant,
:root[data-theme="dark"] .document-save-panel,
:root[data-theme="dark"] .document-body-card,
:root[data-theme="dark"] .my-document-card,
:root[data-theme="dark"] .my-documents-form,
:root[data-theme="dark"] .attachment-card,
:root[data-theme="dark"] .voice-call-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(41, 92, 155, 0.18), transparent 42%),
    linear-gradient(145deg, rgba(15, 32, 54, 0.94), rgba(10, 22, 38, 0.9));
  border-color: rgba(149, 178, 218, 0.18);
  color: var(--ink);
}

:root[data-theme="dark"] .message--document,
:root[data-theme="dark"] .document-editor-card,
:root[data-theme="dark"] .my-documents-card,
:root[data-theme="dark"] .referral-cards-card {
  background:
    radial-gradient(circle at 8% 0%, rgba(62, 132, 218, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(16, 35, 59, 0.98), rgba(9, 20, 35, 0.96));
  border-color: rgba(149, 178, 218, 0.2);
  color: var(--ink);
}

:root[data-theme="dark"] .document-editor-paper {
  background:
    linear-gradient(90deg, rgba(255, 104, 104, 0.16) 0 1px, transparent 1px 100%) 42px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, #101f35, #0b1728);
  border-color: rgba(149, 178, 218, 0.2);
}

:root[data-theme="dark"] .document-body-head {
  background: linear-gradient(180deg, rgba(21, 45, 75, 0.92), rgba(12, 27, 47, 0.86));
  border-color: rgba(149, 178, 218, 0.16);
}

:root[data-theme="dark"] .document-body-paper {
  background:
    linear-gradient(90deg, rgba(255, 104, 104, 0.15) 0 1px, transparent 1px 100%) 30px 0 / 1px 100% no-repeat,
    #fffefb;
  color: #151515;
  border-color: rgba(149, 178, 218, 0.22);
}

:root[data-theme="dark"] .document-save-preview,
:root[data-theme="dark"] .my-document-thumb {
  background:
    linear-gradient(90deg, rgba(255, 104, 104, 0.18) 0 1px, transparent 1px 100%) 12px 0 / 1px 100% no-repeat,
    linear-gradient(180deg, #f8fbff 0%, #ddeaff 100%);
}

:root[data-theme="dark"] .account-login,
:root[data-theme="dark"] .sidebar-title,
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .auth-brand,
:root[data-theme="dark"] .topbar-title h1,
:root[data-theme="dark"] .start-card h2,
:root[data-theme="dark"] .settings-detail-panel h3,
:root[data-theme="dark"] .theme-setting-card b,
:root[data-theme="dark"] .document-save-label,
:root[data-theme="dark"] .document-body-title,
:root[data-theme="dark"] .document-editor-label,
:root[data-theme="dark"] .my-documents-layout h3,
:root[data-theme="dark"] .voice-call-head h2,
:root[data-theme="dark"] .voice-call-status,
:root[data-theme="dark"] .my-document-info b,
:root[data-theme="dark"] .referrals-head h2,
:root[data-theme="dark"] .referral-section-title,
:root[data-theme="dark"] .referral-table-row b,
:root[data-theme="dark"] .referral-detail-row b,
:root[data-theme="dark"] .referral-rank-row b,
:root[data-theme="dark"] .referral-card-toggle b,
:root[data-theme="dark"] .referral-history-pager button,
:root[data-theme="dark"] .cards-scorebar b,
:root[data-theme="dark"] .card-item,
:root[data-theme="dark"] .referral-stat-card b,
:root[data-theme="dark"] .dice-cube {
  color: #eef6ff;
}

:root[data-theme="dark"] .account-credits,
:root[data-theme="dark"] .brand-sub,
:root[data-theme="dark"] .history-sub,
:root[data-theme="dark"] .empty-history,
:root[data-theme="dark"] .topbar-title p,
:root[data-theme="dark"] .start-subtitle,
:root[data-theme="dark"] .settings-detail-note,
:root[data-theme="dark"] .theme-setting-card span,
:root[data-theme="dark"] .document-save-label small,
:root[data-theme="dark"] .document-message-notes,
:root[data-theme="dark"] .my-document-info small,
:root[data-theme="dark"] .attachment-meta,
:root[data-theme="dark"] .voice-call-kicker,
:root[data-theme="dark"] .voice-call-transcript,
:root[data-theme="dark"] .voice-call-hint,
:root[data-theme="dark"] .composer-meta,
:root[data-theme="dark"] .status,
:root[data-theme="dark"] .referrals-kicker,
:root[data-theme="dark"] .referrals-status,
:root[data-theme="dark"] .referral-muted,
:root[data-theme="dark"] .referral-stat-card span,
:root[data-theme="dark"] .referral-stat-card small,
:root[data-theme="dark"] .referral-card-head span,
:root[data-theme="dark"] .referral-game-result,
:root[data-theme="dark"] .referral-table-row,
:root[data-theme="dark"] .referral-detail-row span,
:root[data-theme="dark"] .referral-detail-row small,
:root[data-theme="dark"] .referral-detail-row em,
:root[data-theme="dark"] .referral-card-toggle small,
:root[data-theme="dark"] .referral-history-pager span,
:root[data-theme="dark"] .cards-status,
:root[data-theme="dark"] .cards-setup-field > span,
:root[data-theme="dark"] .cards-choice small,
:root[data-theme="dark"] .cards-player-line,
:root[data-theme="dark"] .cards-deck-meta,
:root[data-theme="dark"] .cards-scorebar span,
:root[data-theme="dark"] .cards-placeholder,
:root[data-theme="dark"] .card-slot,
:root[data-theme="dark"] .referral-rank-row {
  color: #9fb0c8;
}

:root[data-theme="dark"] .voice-panel {
  background:
    radial-gradient(circle at 50% 20%, rgba(55, 124, 219, 0.22), transparent 34%),
    radial-gradient(circle at 20% 90%, rgba(56, 163, 200, 0.15), transparent 32%),
    rgba(1, 8, 18, 0.68);
}

:root[data-theme="dark"] .voice-call-close {
  background: rgba(12, 27, 47, 0.82);
  border-color: rgba(149, 178, 218, 0.2);
  color: #dcecff;
}

:root[data-theme="dark"] .voice-call-end {
  background:
    linear-gradient(145deg, rgba(42, 21, 31, 0.86), rgba(30, 16, 27, 0.78));
  border-color: rgba(255, 120, 140, 0.24);
  color: #ffc9d1;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .search-chat,
:root[data-theme="dark"] .document-editor-title,
:root[data-theme="dark"] .document-editor-text,
:root[data-theme="dark"] .my-documents-form input,
:root[data-theme="dark"] .my-documents-form textarea,
:root[data-theme="dark"] .settings-menu-card .modal-form input,
:root[data-theme="dark"] .referral-link-row input,
:root[data-theme="dark"] .referral-game-controls input {
  background: rgba(5, 13, 24, 0.72);
  border-color: rgba(149, 178, 218, 0.2);
  color: #eef6ff;
}

:root[data-theme="dark"] .auth-captcha {
  border-color: rgba(149, 178, 218, 0.18);
  background: linear-gradient(145deg, rgba(14, 30, 51, 0.94), rgba(8, 19, 34, 0.9));
}

:root[data-theme="dark"] .auth-captcha b {
  color: #eef6ff;
}

:root[data-theme="dark"] .auth-captcha-label {
  color: #8fa2bc;
}

:root[data-theme="dark"] .auth-captcha-refresh {
  border-color: rgba(149, 178, 218, 0.2) !important;
  background: rgba(20, 43, 72, 0.82) !important;
  color: #cfe4ff !important;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder,
:root[data-theme="dark"] .settings-menu-card .modal-form input::placeholder {
  color: #72839d;
}

:root[data-theme="dark"] .settings-btn,
:root[data-theme="dark"] .new-chat,
:root[data-theme="dark"] .quick-new-chat-btn,
:root[data-theme="dark"] .menu-btn,
:root[data-theme="dark"] .attach-btn,
:root[data-theme="dark"] .voice-btn,
:root[data-theme="dark"] .voice-call-btn,
:root[data-theme="dark"] .topic-select,
:root[data-theme="dark"] .model-switch,
:root[data-theme="dark"] .document-save-btn--docx,
:root[data-theme="dark"] .document-save-btn--soft,
:root[data-theme="dark"] .document-body-action,
:root[data-theme="dark"] .document-inline-btn,
:root[data-theme="dark"] .document-editor-actions .document-editor-secondary,
:root[data-theme="dark"] .document-editor-downloads a,
:root[data-theme="dark"] .theme-toggle-btn[aria-pressed="true"] {
  background: linear-gradient(145deg, rgba(22, 45, 75, 0.98), rgba(13, 30, 52, 0.96));
  border-color: rgba(149, 178, 218, 0.2);
  color: #dcecff;
}

:root[data-theme="dark"] .model-btn,
:root[data-theme="dark"] .followup-chip {
  background: rgba(12, 27, 47, 0.86);
  border-color: rgba(149, 178, 218, 0.18);
  color: #dcecff;
}

:root[data-theme="dark"] .model-btn--active,
:root[data-theme="dark"] .send-btn,
:root[data-theme="dark"] .voice-call-btn--active,
:root[data-theme="dark"] .voice-call-btn--speaking,
:root[data-theme="dark"] .theme-toggle-btn,
:root[data-theme="dark"] .document-save-btn,
:root[data-theme="dark"] .document-body-action--primary,
:root[data-theme="dark"] .document-editor-actions button,
:root[data-theme="dark"] .my-documents-form button {
  background: linear-gradient(145deg, #2e7dd3, #75b7ff);
  color: #04101f;
}

:root[data-theme="dark"] .settings-menu-row {
  color: #eaf2ff;
}

:root[data-theme="dark"] .settings-menu-row:hover,
:root[data-theme="dark"] .settings-menu-row--active {
  background: rgba(117, 183, 255, 0.12);
}

:root[data-theme="dark"] .sidebar-backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.settings-menu-card .login-history {
  color: #566982;
}

.settings-menu-card .modal-status {
  color: #63738d;
  margin: 8px 2px 0;
}

.support-layout {
  min-width: 0;
  height: var(--app-height);
  padding: 22px;
  display: grid;
  place-items: center;
}

.support-layout[hidden] {
  display: none !important;
}

.support-panel {
  width: min(920px, 100%);
  height: min(760px, calc(var(--app-height) - 44px));
  border: 1px solid rgba(191, 207, 231, 0.92);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(64, 122, 194, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.93));
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.support-head {
  padding: 22px;
  border-bottom: 1px solid rgba(203, 216, 235, 0.9);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.support-kicker,
.support-status {
  margin: 0;
  color: #63728a;
  font-size: 13px;
  font-weight: 800;
}

.support-head h2 {
  margin: 4px 0 6px;
  color: #11233c;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
}

.support-back-btn,
.support-form button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #174a86, #2d6daf);
  color: #fff;
  padding: 11px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(31, 82, 143, 0.22);
}

.support-messages {
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-empty {
  margin: auto;
  color: #64738a;
  font-weight: 800;
}

.support-message {
  max-width: min(680px, 86%);
  border: 1px solid #d7e4f5;
  border-radius: 18px;
  background: #fff;
  padding: 13px 15px;
  box-shadow: 0 12px 28px rgba(41, 78, 128, 0.08);
}

.support-message--user {
  align-self: flex-end;
  background: linear-gradient(145deg, #174a86, #2d6daf);
  color: #fff;
}

.support-message--admin {
  align-self: flex-start;
}

.support-message p {
  margin: 7px 0;
  white-space: pre-wrap;
}

.support-message small {
  opacity: 0.72;
  font-size: 11px;
}

.support-form {
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(203, 216, 235, 0.9);
  display: grid;
  gap: 10px;
}

.support-form input,
.support-form textarea {
  width: 100%;
  border: 1px solid #d0ddec;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  color: #14243c;
  font: inherit;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
}

.support-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.referrals-layout {
  min-width: 0;
  height: var(--app-height);
  padding: 22px;
  display: grid;
  place-items: center;
}

.referrals-layout[hidden] {
  display: none !important;
}

.referrals-panel {
  width: min(1120px, 100%);
  height: min(860px, calc(var(--app-height) - 44px));
  border: 1px solid rgba(191, 207, 231, 0.92);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 247, 255, 0.96));
  box-shadow: var(--shadow-lg);
  overflow: auto;
  padding: 22px;
}

:root[data-theme="dark"] .referrals-panel {
  background: linear-gradient(160deg, rgba(13, 28, 48, 0.97), rgba(8, 18, 32, 0.96));
}

.referrals-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 16px;
}

.referrals-back-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(174, 197, 231, 0.84);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #174a86;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(31, 82, 143, 0.1);
}

.referrals-back-btn::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  place-self: center;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.8 5.2-6.1 6.1 6.1 6.1 1.6-1.6-3.4-3.4h10.3v-2.2H9l3.4-3.4-1.6-1.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m10.8 5.2-6.1 6.1 6.1 6.1 1.6-1.6-3.4-3.4h10.3v-2.2H9l3.4-3.4-1.6-1.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.referrals-kicker,
.referrals-status,
.referral-muted {
  margin: 0;
  color: #61738d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.referrals-head h2 {
  margin: 3px 0 5px;
  color: #11233c;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
}

.referrals-hero,
.referrals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.referrals-grid--single {
  grid-template-columns: 1fr;
}

.referral-stat-card,
.referral-card,
.referral-link-card {
  border: 1px solid rgba(184, 202, 229, 0.72);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.96), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(236, 245, 255, 0.74));
  box-shadow: 0 18px 42px rgba(34, 73, 121, 0.1);
}

.referral-stat-card {
  padding: 18px;
}

.referral-stat-card span,
.referral-stat-card small,
.referral-card-head span {
  display: block;
  color: #65768f;
  font-size: 12px;
  font-weight: 850;
}

.referral-stat-card b {
  display: block;
  margin: 3px 0;
  color: #153762;
  font-size: clamp(30px, 4.6vw, 52px);
  letter-spacing: -0.06em;
}

.referral-stat-card--main {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(145deg, #143b68, #2d70b0);
  color: #fff;
}

.referral-stat-card--main span,
.referral-stat-card--main small,
.referral-stat-card--main b {
  color: #fff;
}

.referral-link-card {
  margin: 12px 0;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.referral-section-title {
  margin: 0 0 5px;
  color: #153762;
  font-size: 15px;
  font-weight: 950;
}

.referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.referral-link-row input,
.referral-game-controls input {
  width: 100%;
  border: 1px solid rgba(178, 198, 226, 0.84);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #17375f;
  font: inherit;
  padding: 12px 13px;
  outline: none;
}

.referral-link-row button,
.referral-game-controls button,
.referral-shop-item,
.referral-secondary-btn {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #174a86, #2d6daf);
  color: #fff;
  padding: 11px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(31, 82, 143, 0.18);
}

.referral-secondary-btn {
  border: 1px solid rgba(174, 197, 231, 0.74);
  background: rgba(255, 255, 255, 0.78);
  color: #174a86;
  box-shadow: none;
}

.referrals-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  margin-top: 12px;
}

.referrals-grid.referrals-grid--single {
  grid-template-columns: 1fr;
}

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

.referral-card {
  min-width: 0;
  padding: 16px;
}

.referral-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.referral-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.referral-shop-item {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.3), transparent 42%),
    linear-gradient(145deg, #17375f, #2b6aa7);
}

.referral-shop-item b,
.referral-shop-item span {
  display: block;
}

.referral-shop-item b {
  font-size: 12px;
  opacity: 0.84;
}

.dice-stage {
  min-height: 128px;
  border: 1px solid rgba(184, 202, 229, 0.62);
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.94), transparent 32%),
    linear-gradient(145deg, rgba(230, 241, 255, 0.76), rgba(255, 255, 255, 0.7));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 12px;
  padding: 14px;
}

.dice-cube {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(177, 198, 228, 0.86);
  border-radius: 19px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.98), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #e8f2ff 58%, #c7d9f1 100%);
  color: #17375f;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px;
  padding: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset -7px -8px 16px rgba(30, 72, 126, 0.12),
    0 16px 32px rgba(31, 82, 143, 0.16);
}

.dice-cube--bot {
  border-color: rgba(47, 103, 168, 0.42);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.25), transparent 30%),
    linear-gradient(145deg, #17375f 0%, #2d6daf 62%, #0d2c52 100%);
  color: #fff;
}

.dice-dot {
  width: 9px;
  height: 9px;
  place-self: center;
  border-radius: 999px;
  opacity: 0;
}

.dice-dot--on {
  opacity: 1;
  background: currentColor;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.18);
}

.dice-placeholder {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  place-self: center;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.dice-cube--rolling {
  animation: diceRoll 0.42s ease-in-out infinite;
}

.dice-versus {
  color: #667991;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.referral-game-result {
  margin: 12px 0;
  min-height: 20px;
  color: #536985;
  font-size: 13px;
  font-weight: 850;
}

.referral-game-controls {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 8px;
}

.referral-cards-card {
  width: min(760px, 100%);
  max-height: min(780px, calc(100dvh - 18px));
  padding: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(225, 240, 255, 0.98), transparent 34%),
    linear-gradient(145deg, #ffffff, #edf6ff);
}

.referral-cards-card .modal-kicker {
  margin-bottom: 2px;
  font-size: 10px;
}

.referral-cards-card h2 {
  margin: 0 44px 2px 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 0.95;
}

.cards-setup {
  display: grid;
  gap: 13px;
}

.cards-setup[hidden],
.cards-board[hidden] {
  display: none;
}

.cards-setup-field {
  display: grid;
  gap: 8px;
}

.cards-setup-field > span {
  color: #526983;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cards-setup-field input {
  width: 100%;
  border: 1px solid rgba(178, 198, 226, 0.84);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  color: #17375f;
  font: inherit;
  padding: 12px 13px;
  outline: none;
}

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

.cards-choice-grid--difficulty {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-choice,
.cards-start-btn {
  border: 1px solid rgba(174, 197, 231, 0.74);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.92), transparent 38%),
    linear-gradient(145deg, rgba(238, 247, 255, 0.94), rgba(255, 255, 255, 0.78));
  color: #174a86;
  font-family: inherit;
  font-size: 13px;
  font-weight: 950;
  padding: 13px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(31, 82, 143, 0.08);
}

.cards-choice {
  display: grid;
  gap: 3px;
  text-align: left;
}

.cards-choice small {
  color: #6b7f98;
  font-size: 12px;
  font-weight: 900;
}

.cards-choice--active {
  border-color: rgba(45, 109, 175, 0.5);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.38), transparent 38%),
    linear-gradient(145deg, #174a86, #2d6daf);
  color: #fff;
  box-shadow: 0 18px 34px rgba(31, 82, 143, 0.2);
}

.cards-choice--active small {
  color: rgba(255, 255, 255, 0.78);
}

.cards-start-btn {
  background: linear-gradient(145deg, #174a86, #2d6daf);
  color: #fff;
}

.cards-status {
  margin: 0 44px 8px 0;
  color: #526983;
  font-size: 12px;
  font-weight: 850;
}

.cards-scorebar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.cards-scorebar span {
  border: 1px solid rgba(184, 202, 229, 0.64);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.68);
  color: #64768f;
  padding: 7px 9px;
  font-size: 10.5px;
  font-weight: 900;
}

.cards-scorebar b {
  color: #17375f;
}

.cards-red-suit {
  color: #c14655 !important;
}

.cards-board {
  display: grid;
  gap: 8px;
}

.cards-player-line {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(76px, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 950;
}

.cards-player-line b {
  min-width: 34px;
  border-radius: 999px;
  background: rgba(10, 29, 51, 0.42);
  color: #fff;
  padding: 6px 9px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cards-player-line > span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  min-height: 32px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.26), transparent 35%),
    rgba(8, 26, 48, 0.55);
  box-shadow: 0 10px 22px rgba(8, 21, 38, 0.22);
}

.cards-mini-stack {
  position: relative;
  min-height: 28px;
}

.cards-mini-stack i {
  position: absolute;
  left: calc(var(--card-index) * 10px);
  top: calc(var(--card-index) * 1px);
  width: 24px;
  height: 30px;
  border: 1px solid rgba(47, 103, 168, 0.3);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(145deg, #17375f, #2d6daf);
  box-shadow: 0 7px 14px rgba(31, 82, 143, 0.12);
}

.cards-mini-stack--user i {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), transparent 42%),
    linear-gradient(145deg, #ffffff, #dcecff);
}

.cards-mini-stack em {
  color: #8aa0bb;
  font-style: normal;
  font-weight: 900;
}

.cards-table-shell {
  position: relative;
  height: min(560px, calc(100dvh - 230px));
  min-height: 420px;
  max-height: 560px;
  border: 1px solid rgba(86, 137, 184, 0.5);
  border-radius: 30px;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.13), transparent 25%),
    radial-gradient(circle at 78% 20%, rgba(25, 70, 110, 0.24), transparent 31%),
    linear-gradient(135deg, rgba(77, 139, 183, 0.92), rgba(31, 91, 135, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -22px 60px rgba(6, 25, 43, 0.18),
    0 28px 80px rgba(28, 71, 115, 0.24);
}

.cards-table-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.09) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.09) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.cards-player-line--bot {
  position: absolute;
  top: 14px;
  left: 50%;
  width: min(240px, calc(100% - 36px));
  transform: translateX(-50%);
}

.cards-player-line--user {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 154px;
  width: auto;
}

.cards-deck-zone {
  position: absolute;
  z-index: 2;
  top: 72px;
  left: 16px;
  width: 132px;
  height: 166px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.2), transparent 40%),
    rgba(8, 28, 52, 0.2);
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
  overflow: hidden;
}

.cards-deck-stack {
  position: absolute;
  left: 18px;
  top: 21px;
  width: 76px;
  height: 106px;
}

.cards-deck-stack i {
  position: absolute;
  left: calc(var(--card-index) * 2px);
  top: calc(var(--card-index) * 2px);
  width: 58px;
  height: 82px;
  border: 1px solid rgba(47, 103, 168, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 44%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 6px, transparent 6px 12px),
    linear-gradient(145deg, #17375f, #2d6daf);
  box-shadow: 0 14px 24px rgba(31, 82, 143, 0.14);
  animation: deckBreath 2.4s ease-in-out infinite;
  animation-delay: calc(var(--card-index) * 0.08s);
}

.cards-deck-meta {
  position: absolute;
  left: 20px;
  bottom: 14px;
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 11px;
  font-weight: 950;
}

.cards-deck-meta b {
  color: #fff;
  font-size: 18px;
}

.cards-trump-card {
  position: absolute;
  right: 9px;
  top: 27px;
  transform: rotate(12deg);
}

.cards-table {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 178px));
  min-height: 210px;
  margin: 92px 14px 184px auto;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  border-radius: 26px;
  background: rgba(7, 31, 54, 0.12);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  align-items: center;
  justify-items: center;
  gap: 8px 10px;
  padding: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cards-table--drop-ready {
  border-style: dashed;
}

.cards-table--drag-over {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16), 0 18px 34px rgba(8, 24, 43, 0.18);
  transform: translateY(-1px);
}

.cards-table-pair {
  position: relative;
  width: 94px;
  height: 122px;
  display: block;
  color: rgba(255, 255, 255, 0.8);
}

.cards-placeholder,
.card-slot {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  padding: 12px;
  font-size: 13px;
  font-weight: 900;
}

.card-slot--overlay {
  position: absolute;
  left: 24px;
  top: 20px;
  width: 68px;
  min-height: 88px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.cards-placeholder {
  grid-column: 1 / -1;
  width: 100%;
}

.cards-beaten-label {
  position: absolute;
  inset: 12px;
  z-index: 30;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.92), transparent 42%),
    rgba(12, 39, 68, 0.58);
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 8px 18px rgba(3, 18, 34, 0.32);
  backdrop-filter: blur(4px);
  animation: beatenFade 1.1s ease both;
}

.cards-actions {
  position: absolute;
  z-index: 6;
  left: 18px;
  right: 18px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(7, 25, 45, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 34px rgba(7, 22, 40, 0.16);
  backdrop-filter: blur(10px);
}

.cards-actions button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 13px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.34), transparent 38%),
    linear-gradient(145deg, rgba(247, 251, 255, 0.96), rgba(208, 228, 250, 0.9));
  color: #123e70;
  font-family: inherit;
  font-size: 12px;
  font-weight: 950;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(8, 26, 48, 0.12);
}

.cards-actions button:disabled,
.card-item:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.cards-danger-btn {
  margin-left: 0;
  border-color: rgba(255, 160, 170, 0.42) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.26), transparent 38%),
    linear-gradient(145deg, rgba(255, 237, 240, 0.94), rgba(255, 194, 203, 0.84)) !important;
  color: #9f2736 !important;
}

.cards-hand {
  position: absolute;
  z-index: 4;
  left: 14px;
  right: 14px;
  bottom: 58px;
  min-height: 104px;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 0;
  padding: 8px 10px 2px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-padding-inline: 24px;
}

.card-item {
  width: 78px;
  height: 112px;
  border: 1px solid rgba(164, 187, 220, 0.82);
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(160deg, #ffffff, #e8f2ff);
  color: #17375f;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: start;
  align-items: start;
  padding: 9px;
  font-family: inherit;
  font-weight: 950;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 12px 24px rgba(31, 82, 143, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, margin 0.16s ease;
}

.cards-hand .card-item {
  flex: 0 0 78px;
  margin-left: -18px;
  transform: translateY(calc((var(--hand-offset, 0)) * 1px)) rotate(calc((var(--hand-rotate, 0)) * 1deg));
}

.cards-hand .card-item:first-child {
  margin-left: 0;
}

.card-item:hover:not(:disabled) {
  transform: translateY(-14px) rotate(0deg);
  box-shadow: 0 18px 34px rgba(31, 82, 143, 0.18);
}

.card-item--dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.card-drag-ghost {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.94;
  box-shadow: 0 24px 44px rgba(5, 18, 32, 0.32) !important;
  transition: none !important;
}

.card-item--static {
  pointer-events: none;
}

.card-item--table {
  position: absolute;
  left: 0;
  top: 0;
  width: 68px;
  height: 96px;
  border-radius: 14px;
  animation: cardToTable 0.24s ease-out both;
  animation-delay: calc(var(--pair-index, 0) * 0.05s);
  transform: rotate(calc((var(--pair-index, 0) - 1) * 4deg));
}

.card-item--defense {
  left: 24px;
  top: 20px;
  z-index: 2;
  transform: rotate(10deg);
}

.card-item--trump {
  width: 54px;
  height: 76px;
  border-radius: 12px;
  padding: 7px;
  box-shadow: 0 12px 24px rgba(31, 82, 143, 0.16);
}

.card-item span {
  font-size: 18px;
}

.card-item b {
  place-self: end;
  font-size: 30px;
  line-height: 1;
}

.card-item--red {
  color: #c14655;
}

.cards-count--pulse {
  animation: countPulse 0.38s ease;
}

.referral-table-list {
  display: grid;
  gap: 7px;
}

.referral-table-list--collapsed {
  display: none;
}

.referral-table-row,
.referral-detail-row,
.referral-rank-row,
.referral-empty {
  border: 1px solid rgba(184, 202, 229, 0.56);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  padding: 10px 11px;
}

.referral-table-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  color: #536985;
  font-size: 12px;
  font-weight: 850;
}

.referral-table-row b {
  color: #17375f;
}

.referral-history-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
}

.referral-history-pager button {
  border: 1px solid rgba(184, 202, 229, 0.72);
  border-radius: 13px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(145deg, rgba(238, 247, 255, 0.96), rgba(255, 255, 255, 0.82));
  color: #174a86;
  font-family: inherit;
  font-size: 12px;
  font-weight: 950;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 82, 143, 0.08);
}

.referral-history-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.referral-history-pager span {
  color: #64768f;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.referral-card-toggle {
  width: 100%;
  border: 0;
  border-radius: 17px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(145deg, rgba(233, 243, 255, 0.92), rgba(255, 255, 255, 0.74));
  color: #17375f;
  padding: 12px;
  margin-bottom: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.referral-card-toggle::after {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13.5 3.5 7l1.4-1.4L10 10.7l5.1-5.1L16.5 7 10 13.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 13.5 3.5 7l1.4-1.4L10 10.7l5.1-5.1L16.5 7 10 13.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.16s ease;
}

.referral-card-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.referral-card-toggle b,
.referral-card-toggle small {
  display: block;
}

.referral-card-toggle b {
  font-size: 15px;
  font-weight: 950;
}

.referral-card-toggle small {
  margin-top: 2px;
  color: #64768f;
  font-size: 12px;
  font-weight: 850;
}

.referral-detail-row {
  display: grid;
  grid-template-columns: 0.78fr 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.referral-detail-row span,
.referral-detail-row small,
.referral-detail-row b {
  display: block;
}

.referral-detail-row small {
  margin-bottom: 2px;
  color: #7a8aa0;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.referral-detail-row span {
  color: #536985;
  font-size: 12px;
  font-weight: 850;
}

.referral-detail-row em {
  grid-column: 1 / -1;
  color: #708098;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.referral-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #536985;
  font-size: 13px;
  font-weight: 900;
}

.referral-rank-row b {
  color: #17375f;
  overflow: hidden;
  text-overflow: ellipsis;
}

.referral-rank-place {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(232, 243, 255, 0.92);
  color: #174a86;
  display: grid;
  place-items: center;
  font-weight: 950;
}

.referral-rank-row--leader {
  border-color: rgba(219, 170, 66, 0.56);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 239, 184, 0.68), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 222, 0.78));
}

.referral-rank-row--leader .referral-rank-place {
  background: linear-gradient(145deg, #f6d36b, #b47c20);
  color: #fff;
  box-shadow: 0 10px 20px rgba(171, 116, 26, 0.22);
}

.referral-table-row--current {
  border-color: rgba(45, 109, 175, 0.44);
  background: rgba(232, 243, 255, 0.86);
}

.referral-plus {
  color: #157653 !important;
}

.referral-minus {
  color: #b04444 !important;
}

@keyframes deckBreath {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-2px) rotate(1deg);
  }
}

@keyframes cardToTable {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes beatenFade {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  18%,
  75% {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.03);
  }
}

@keyframes countPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes diceRoll {
  0% {
    transform: rotate(-4deg) scale(0.96);
  }
  50% {
    transform: rotate(7deg) scale(1.04);
  }
  100% {
    transform: rotate(-4deg) scale(0.96);
  }
}

.install-banner-action {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(31, 79, 139, 0.22);
}

.install-banner-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(151, 170, 201, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #55708f;
  font-size: 20px;
  line-height: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes cursorBlink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

@keyframes voicePulse {
  from {
    opacity: 0.75;
    transform: scale(0.94);
  }
  to {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes voiceWave {
  0%,
  100% {
    transform: scaleY(0.62);
  }
  50% {
    transform: scaleY(1.18);
  }
}

@keyframes voiceRing {
  from {
    opacity: 0.75;
    transform: scale(0.68);
  }
  to {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes voiceCallRing {
  from {
    opacity: 0.7;
    transform: scale(0.9);
  }
  to {
    opacity: 0;
    transform: scale(1.17);
  }
}

@keyframes voiceThink {
  0%,
  100% {
    transform: scale(0.985);
  }
  50% {
    transform: scale(1.025);
  }
}

@keyframes voiceSpeak {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 34px 80px rgba(20, 75, 142, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.64),
      inset 0 -24px 54px rgba(4, 21, 46, 0.2);
  }
  50% {
    transform: scale(1.035);
    box-shadow:
      0 42px 100px rgba(20, 75, 142, 0.42),
      0 0 50px rgba(82, 189, 228, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.68),
      inset 0 -24px 54px rgba(4, 21, 46, 0.18);
  }
}

@media (max-width: 1080px) {
  .app {
    grid-template-columns: 1fr;
    height: var(--app-height);
    padding: 10px;
    gap: 0;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(12, 24, 42, 0.42);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .app.app--sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    display: grid;
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 88vw);
    border-radius: 0 22px 22px 0;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    background: linear-gradient(160deg, #fbfdff, #eef5ff);
    backdrop-filter: none;
    transform: translateX(calc(-100% - 20px));
    transition: transform 0.22s ease;
    overflow: hidden;
  }

  .history-item {
    background: #ffffff;
    border-color: rgba(160, 181, 214, 0.32);
  }

  .history-item--active {
    background: linear-gradient(145deg, #ffffff, #edf5ff);
  }

  .app.app--sidebar-open .sidebar {
    transform: translateX(0);
  }

  .chat-layout {
    border-radius: 16px;
    height: calc(var(--app-height) - 20px);
  }

  .topbar {
    padding: 14px;
  }

  .topbar-row {
    align-items: center;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-title h1 {
    font-size: 21px;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
  }

  .chat-stream,
  .composer,
  .sources {
    width: calc(100% - 20px);
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .app {
    height: var(--app-height);
    min-height: 0;
    padding: 0;
  }

  .chat-layout {
    height: var(--app-height);
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(250, 253, 255, 0.84);
  }

  .topbar {
    padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  }

  .chat-layout.chat-layout--active .topbar {
    padding: max(9px, env(safe-area-inset-top)) 12px 8px;
  }

  .chat-layout.chat-layout--active .topbar-title h1 {
    font-size: 18px;
  }

  .chat-feed {
    padding: 14px 0 10px;
  }

  .chat-stream,
  .composer,
  .sources {
    width: calc(100% - 20px);
  }

  .message {
    font-size: 14px;
    border-radius: 14px;
    padding: 11px 12px;
    margin-bottom: 10px;
  }

  .message--user {
    max-width: 92%;
  }

  .followup-row {
    gap: 7px;
    margin-bottom: 12px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .followup-row::-webkit-scrollbar {
    display: none;
  }

  .followup-chip {
    white-space: nowrap;
    min-height: 34px;
    padding: 7px 11px;
  }

  .suggest {
    min-height: 52px;
    padding: 10px 10px 10px 39px;
    font-size: 12px;
  }

  .suggest::before {
    left: 12px;
    width: 17px;
    height: 17px;
  }

  .composer-wrap {
    padding: 9px 10px max(10px, env(safe-area-inset-bottom));
  }

  .voice-panel {
    align-items: center;
    padding:
      max(8px, env(safe-area-inset-top))
      8px
      max(8px, env(safe-area-inset-bottom));
  }

  .voice-call-card {
    width: min(390px, calc(100vw - 16px));
    height: min(470px, 72vh, calc(var(--app-height) - 22px));
    max-height: calc(var(--app-height) - 22px);
    border-radius: 24px;
    padding: 11px;
    gap: clamp(7px, 1.4vh, 10px);
    grid-template-rows: auto minmax(106px, 1fr) auto;
  }

  .voice-call-head h2 {
    font-size: 24px;
  }

  .voice-call-close {
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .voice-call-orb {
    width: min(168px, 31vh, 50vw);
    height: min(168px, 31vh, 50vw);
  }

  .voice-call-ring {
    inset: -10px;
  }

  .voice-call-ring--two {
    inset: -22px;
  }

  .voice-call-core {
    inset: 30%;
  }

  .voice-call-copy {
    padding: 0 4px 2px;
    gap: 6px;
  }

  .voice-call-status {
    font-size: clamp(20px, 6.4vw, 26px);
  }

  .voice-call-transcript {
    min-height: 28px;
    font-size: 12px;
  }

  .voice-call-hint {
    display: none;
  }

  .voice-call-end {
    min-height: 38px;
    padding: 0 16px;
  }

  .install-banner {
    bottom: calc(106px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .referrals-layout {
    padding: 0;
    align-items: stretch;
  }

  .referrals-panel {
    width: 100%;
    height: var(--app-height);
    border: 0;
    border-radius: 0;
    padding: max(14px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  }

  .referrals-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .referrals-head h2 {
    font-size: 32px;
  }

  .referrals-hero,
  .referrals-grid,
  .referrals-grid--tables {
    grid-template-columns: 1fr;
  }

  .referral-link-row,
  .referral-game-controls {
    grid-template-columns: 1fr;
  }

  .referral-shop-grid {
    grid-template-columns: 1fr;
  }

  .dice-stage {
    min-height: 112px;
  }

  .dice-cube {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 29px;
  }

  .cards-scorebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .cards-scorebar span {
    padding: 7px 6px;
    font-size: 10px;
  }

  .cards-choice-grid,
  .cards-choice-grid--difficulty {
    grid-template-columns: 1fr;
  }

  .cards-table-shell {
    height: min(500px, calc(100dvh - 190px));
    min-height: 390px;
    padding: 10px;
    border-radius: 24px;
  }

  .cards-deck-zone {
    top: 60px;
    left: 10px;
    width: 96px;
    height: 126px;
    border-radius: 18px;
  }

  .cards-deck-stack {
    left: 14px;
    top: 16px;
    transform: scale(0.7);
    transform-origin: left top;
  }

  .cards-trump-card {
    right: 7px;
    top: 18px;
    transform: rotate(13deg) scale(0.74);
  }

  .cards-table {
    width: calc(100% - 108px);
    min-height: 188px;
    margin: 80px 0 168px auto;
    grid-template-columns: repeat(2, minmax(84px, 1fr));
    padding: 8px;
  }

  .cards-table-pair {
    width: 84px;
    height: 112px;
  }

  .cards-actions {
    left: 10px;
    right: 10px;
    bottom: 8px;
    gap: 6px;
    padding: 6px;
  }

  .cards-actions button {
    padding: 8px 6px;
    font-size: 11px;
  }

  .cards-danger-btn {
    margin-left: 0;
  }

  .card-item {
    width: 58px;
    height: 86px;
    border-radius: 13px;
    padding: 8px;
  }

  .cards-hand .card-item {
    flex-basis: 58px;
    margin-left: -12px;
  }

  .cards-hand {
    bottom: 50px;
    min-height: 88px;
    padding-bottom: 0;
  }

  .cards-player-line--user {
    bottom: 132px;
  }

  .card-item--table {
    width: 58px;
    height: 84px;
  }

  .card-slot--overlay,
  .card-item--defense {
    left: 20px;
    top: 17px;
  }

  .card-slot--overlay {
    width: 58px;
    min-height: 78px;
  }

  .card-item b {
    font-size: 25px;
  }

  .referral-table-row {
    grid-template-columns: 0.8fr 1fr;
  }

  .referral-table-row span:last-child {
    grid-column: 1 / -1;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    border-radius: 18px;
    padding: 18px;
  }

  .document-editor-card {
    max-height: calc(var(--app-height) - 20px);
    padding: 14px;
  }

  .document-editor-card h2 {
    font-size: 27px;
  }

  .document-editor-text {
    min-height: 46vh;
    padding: 12px;
    font-size: 13px;
  }

  .document-editor-paper {
    padding: 8px 8px 8px 16px;
    border-radius: 14px;
    background: #fff;
  }

  .document-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .document-message-context {
    padding-right: 0;
  }

  .document-body-card {
    border-radius: 18px;
  }

  .document-body-head {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .document-body-title b {
    white-space: normal;
  }

  .document-body-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .document-body-action {
    width: 100%;
    min-width: 0;
    padding: 0 9px;
  }

  .document-body-paper {
    margin: 9px;
    padding: 20px 14px 20px 24px;
    font-size: 13px;
    line-height: 1.5;
    background:
      linear-gradient(90deg, rgba(208, 67, 67, 0.2) 0 1px, transparent 1px 100%) 16px 0 / 1px 100% no-repeat,
      #fffefb;
  }

  .document-save-panel {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .document-save-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-save-btn {
    width: 100%;
  }

  .document-link-group {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
  }

  .my-documents-card {
    max-height: calc(var(--app-height) - 20px);
    padding: 14px;
  }

  .my-documents-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .my-documents-list {
    max-height: 32vh;
  }

  .settings-menu-card {
    width: 100%;
    max-height: min(58vh, 520px);
    border-radius: 18px;
    padding: 12px;
  }

  .settings-menu-head {
    margin-bottom: 8px;
    padding-bottom: 10px;
  }

  .settings-menu-row {
    min-height: 40px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    font-size: 13px;
    border-radius: 12px;
  }

  .settings-menu-icon {
    width: 21px;
    height: 21px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .composer {
    border-radius: 14px;
    padding: 9px;
    gap: 8px;
  }

  .composer textarea {
    font-size: 16px;
    max-height: 132px;
  }

  .suggest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 4px;
  }

  .chat-intro {
    align-content: center;
    gap: 9px;
    padding: 10px 0 8px;
  }

  .start-card {
    border-radius: 19px;
    padding: 18px 14px;
  }

  .start-card h2 {
    font-size: clamp(27px, 8.6vw, 38px);
  }

  .start-subtitle {
    font-size: 13px;
    line-height: 1.42;
    margin-top: 10px;
  }

  .auth-captcha {
    grid-template-columns: minmax(0, 1fr) 70px 38px;
  }

  .tools-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 7px;
  }

  .model-switch {
    order: 1;
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .model-btn {
    min-height: 34px;
    padding: 8px 10px;
  }

  .topic-select {
    order: 2;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }

  .topic-select select {
    min-width: 0;
    width: 100%;
  }

  .composer-meta {
    align-items: center;
  }

  .send-btn {
    order: 3;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 10px 13px;
  }

  .voice-btn {
    order: 4;
    width: 42px;
    height: 40px;
  }

  .voice-call-btn {
    order: 5;
    width: 42px;
    height: 40px;
  }

  .attach-btn {
    order: 6;
    width: 42px;
    height: 40px;
  }

  .tip {
    display: none;
  }

  .support-layout {
    padding: 0;
  }

  .support-panel {
    width: 100%;
    height: var(--app-height);
    border-radius: 0;
    border: 0;
  }

  .support-head {
    padding: max(14px, env(safe-area-inset-top)) 14px 14px;
    flex-direction: column;
  }

  .support-back-btn {
    width: 100%;
  }

  .support-messages,
  .support-form {
    padding: 14px;
  }

  .support-message {
    max-width: 92%;
  }
}

@media (max-height: 680px) {
  .voice-call-card {
    height: min(420px, 68vh, calc(var(--app-height) - 18px));
    max-height: calc(var(--app-height) - 18px);
    grid-template-rows: auto minmax(116px, 1fr) auto;
    gap: 6px;
    padding: 10px;
  }

  .voice-call-kicker {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .voice-call-head h2 {
    font-size: 24px;
  }

  .voice-call-close {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .voice-call-orb {
    width: min(148px, 28vh, 46vw);
    height: min(148px, 28vh, 46vw);
  }

  .voice-call-core {
    gap: 4px;
  }

  .voice-call-core span {
    width: 5px;
    min-height: 14px;
  }

  .voice-call-core span:nth-child(2) {
    min-height: 30px;
  }

  .voice-call-core span:nth-child(3) {
    min-height: 24px;
  }

  .voice-call-core span:nth-child(4) {
    min-height: 18px;
  }

  .voice-call-status {
    font-size: clamp(18px, 5.4vh, 24px);
  }

  .voice-call-transcript {
    min-height: 24px;
    font-size: 11px;
  }

  .voice-call-hint {
    display: none;
  }

  .voice-call-end {
    min-height: 38px;
  }
}

@media (max-width: 430px) {
  .topbar-title p {
    display: none;
  }

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

  .quick-new-chat-btn {
    width: 36px;
  }

  .tools-row {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
  }

  .voice-btn,
  .voice-call-btn {
    width: 42px;
  }

  .send-btn {
    width: 100%;
  }

  .install-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
  }

  .install-banner-action {
    grid-column: 2 / 4;
    width: 100%;
  }

  .install-banner-close {
    grid-column: 3;
    grid-row: 1;
  }

  .auth-captcha {
    grid-template-columns: minmax(0, 1fr) 66px 36px;
    padding-left: 10px;
  }

  .auth-captcha-refresh {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1081px) {
  .menu-btn {
    display: none;
  }
}
