:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #050505;
  --surface: #222222;
  --surface-hover: #2b2b2b;
  --surface-soft: #151515;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f7f7f7;
  --text-muted: #a7a7a7;
  --text-soft: #777777;
  --accent: #ffffff;
  --danger: #ff8f88;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  --rail-width: 78px;
  --sidebar-width: 318px;
  --ui-scale: 1;
  --layout-width: calc(100vw / var(--ui-scale));
  --layout-height: calc(100dvh / var(--ui-scale));
  --user-bubble-bg: #2c2c2c;
  --user-bubble-text: #ffffff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  user-select: text;
  -webkit-user-select: text;
}

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

button {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

img,
canvas,
video {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

select,
option,
.composer-menu,
.reasoning-button,
.send-button,
.composer-tool,
.icon-action,
.rail-button,
.menu-item,
.attachment-remove,
.edit-action {
  user-select: none;
  -webkit-user-select: none;
}

.message-content,
.noon-thinking,
.thinking-line,
.session-title,
.session-preview,
.conversation-title,
.welcome h1,
.welcome p,
.temporary-intro,
.references-panel,
.profile-dialog,
input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: var(--layout-width);
  min-height: 100vh;
  min-height: var(--layout-height);
  overflow: hidden;
  zoom: var(--ui-scale);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.035), transparent 24%),
    #000;
}

.session-menu {
  zoom: var(--ui-scale);
}


.rail {
  position: fixed;
  z-index: 35;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  padding: 12px 9px;
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #f7f7f7;
}

.rail-button:first-child {
  margin-bottom: 22px;
}

.rail-button:hover,
.rail-button:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.rail-button.active {
  background: rgba(255, 255, 255, 0.1);
}

.rail-button svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.9;
}

.rail-apps-icon {
  width: 29px;
  height: 29px;
  object-fit: contain;
  filter:
    invert(1)
    drop-shadow(0.35px 0 0 #ffffff)
    drop-shadow(-0.35px 0 0 #ffffff)
    drop-shadow(0 0.35px 0 #ffffff)
    drop-shadow(0 -0.35px 0 #ffffff);
}

.rail-toggle-mascot,
.rail-toggle-menu {
  grid-area: 1 / 1;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.rail-toggle-mascot {
  display: block;
  width: 36px;
  height: 31px;
  object-fit: contain;
  filter: invert(1);
}

.rail-toggle-menu {
  opacity: 0;
  transform: scale(0.88);
}

.rail-button:hover .rail-toggle-mascot,
.rail-button:focus-visible .rail-toggle-mascot {
  opacity: 0;
  transform: scale(0.9);
}

.rail-button:hover .rail-toggle-menu,
.rail-button:focus-visible .rail-toggle-menu {
  opacity: 1;
  transform: scale(1);
}

.rail-button::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  z-index: 60;
  display: block;
  width: max-content;
  max-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #242424;
  color: #f5f5f5;
  content: attr(data-tooltip);
  font-size: 18px;
  font-weight: 760;
  line-height: 1;
  opacity: 0;
  padding: 9px 12px;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}

.rail-button[data-shortcut]::after {
  content: attr(data-tooltip) "  " attr(data-shortcut);
}

.rail-button:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.rail-spacer {
  flex: 1;
}

.rail-user {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #ffffff;
  padding: 0;
}

.rail-user:hover,
.rail-user:focus-visible,
.rail-user[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.13);
}

.rail-user::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  z-index: 60;
  display: block;
  width: max-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #242424;
  color: #f5f5f5;
  content: attr(data-name);
  font-size: 18px;
  font-weight: 760;
  line-height: 1;
  opacity: 0;
  padding: 9px 12px;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
  white-space: nowrap;
}

.rail-user:hover::after,
.rail-user:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 999px;
  background: #d468b8;
  background-position: center;
  background-size: cover;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.account-menu {
  position: fixed;
  z-index: 95;
  display: grid;
  width: 372px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #333333;
  padding: 22px 24px 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.account-menu-head,
.account-menu-item {
  display: grid;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: #f6f6f6;
  text-align: left;
}

.account-menu-head {
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  gap: 12px;
  min-height: 44px;
  padding: 0;
}

.account-menu-head > svg,
.account-chevron {
  justify-self: end;
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
}

.account-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.05;
}

.account-identity span {
  color: #b8b8b8;
  font-size: 16px;
}

.account-divider {
  height: 1px;
  margin: 20px 0 12px;
  background: rgba(255, 255, 255, 0.14);
}

.account-menu-item {
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  gap: 12px;
  min-height: 52px;
  border-radius: 11px;
  padding: 0 4px;
  font-size: 21px;
  font-weight: 520;
}

.account-menu-item:hover,
.account-menu-head:hover {
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
}

.account-menu-item svg {
  align-self: center;
  justify-self: center;
  width: 25px;
  height: 25px;
  stroke-width: 2.15;
}

.account-icon-img {
  display: block;
  align-self: center;
  justify-self: center;
  width: 25px;
  height: 25px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.profile-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.62);
  padding: 26px;
}

.profile-dialog {
  display: grid;
  width: min(672px, calc(100vw - 44px));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: #222222;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
  padding: 24px;
}

.profile-dialog h2 {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: 720;
  line-height: 1.2;
}

.profile-avatar-wrap {
  position: relative;
  justify-self: center;
  width: 208px;
  height: 208px;
  margin-bottom: 30px;
}

.profile-avatar-preview {
  width: 208px;
  height: 208px;
  border: 4px solid #ffffff;
  box-shadow:
    0 0 0 3px #111111,
    0 14px 44px rgba(0, 0, 0, 0.34);
  font-size: 58px;
  font-weight: 500;
}

.profile-camera {
  position: absolute;
  right: 10px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: #2f2f2f;
  color: #ffffff;
}

.profile-camera:hover {
  background: #3b3b3b;
}

.profile-camera svg {
  width: 22px;
  height: 22px;
}

.profile-field {
  display: grid;
  min-height: 86px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 13px 18px 10px;
}

.profile-field + .profile-field {
  margin-top: 12px;
}

.profile-field span {
  color: #f5f5f5;
  font-size: 16px;
}

.profile-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 22px;
  font-weight: 520;
}

.profile-note {
  margin: 14px 0 22px;
  color: #b5b5b5;
  font-size: 16px;
  text-align: center;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 28px;
}

.profile-actions button {
  min-width: 76px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 18px;
}

.profile-cancel {
  background: #000000;
  color: #ffffff;
}

.profile-save {
  background: #ffffff;
  color: #222222;
}

.settings-modal {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 32px;
}

.settings-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(1020px, calc(100vw - 74px));
  height: min(900px, calc(100vh - 78px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: #202020;
  color: #f7f7f7;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62);
}

.settings-sidebar {
  display: grid;
  grid-template-rows: 58px 1fr;
  gap: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 18px 10px 18px;
}

.settings-close {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #f5f5f5;
  transition:
    background 0.14s ease,
    color 0.14s ease;
}

.settings-close:hover,
.settings-close:focus-visible {
  background: rgba(255, 255, 255, 0.09);
}

.settings-close svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.settings-nav-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #f4f4f4;
  padding: 0 16px;
  font-size: 20px;
  text-align: left;
}

.settings-nav-item.active,
.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.settings-nav-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.settings-content {
  min-width: 0;
  overflow: auto;
  padding: 28px 46px 36px 34px;
}

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.settings-section h2 {
  margin: 0 0 30px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 760;
  line-height: 1.2;
}

.settings-list {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 90px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #f6f6f6;
  font-size: 22px;
}

.settings-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 128px;
  border: 0;
  background: transparent;
  color: #ffffff;
  padding: 8px 0 8px 14px;
  font-size: 21px;
}

.settings-value svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.4;
}

.accent-dot {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--dot-color, #8f8f8f);
}

.settings-popover {
  position: absolute;
  z-index: 4;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #383838;
  padding: 8px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.45);
}

.settings-popover-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #f8f8f8;
  padding: 0 12px;
  font-size: 20px;
  text-align: left;
}

.settings-popover.accent-menu .settings-popover-item {
  grid-template-columns: 18px minmax(0, 1fr) 24px;
}

.settings-popover-item.active,
.settings-popover-item:hover {
  background: rgba(255, 255, 255, 0.11);
}

.settings-popover-item svg {
  visibility: hidden;
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
}

.settings-popover-item.active svg {
  visibility: visible;
}

body[data-theme="light"] {
  --bg: #f7f9fd;
  --panel: #ffffff;
  --surface: #eef2f7;
  --surface-hover: #e5ebf3;
  --surface-soft: #f4f7fb;
  --border: rgba(20, 35, 55, 0.13);
  --border-strong: rgba(20, 35, 55, 0.24);
  --text: #101418;
  --text-muted: #5e6a78;
  --text-soft: #8490a0;
  background: var(--bg);
  color: var(--text);
}

body[data-theme="light"] ::selection {
  background: rgba(31, 95, 174, 0.22);
  color: #0f1720;
}

body[data-theme="light"] .app-shell {
  background:
    radial-gradient(circle at 50% 46%, rgba(45, 103, 180, 0.08), transparent 28%),
    var(--bg);
}

body[data-theme="light"] .rail,
body[data-theme="light"] .topbar,
body[data-theme="light"] .chat-panel,
body[data-theme="light"] .message-scroll {
  background: var(--bg);
  color: var(--text);
}

body[data-theme="light"] .sidebar,
body[data-theme="light"] .account-menu,
body[data-theme="light"] .composer-menu,
body[data-theme="light"] .model-options,
body[data-theme="light"] .settings-dialog,
body[data-theme="light"] .profile-dialog,
body[data-theme="light"] .references-panel {
  border-color: rgba(20, 35, 55, 0.12);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 24px 70px rgba(42, 64, 92, 0.18);
}

body[data-theme="light"] .account-menu-head,
body[data-theme="light"] .account-menu-item,
body[data-theme="light"] .menu-item,
body[data-theme="light"] .settings-nav-item,
body[data-theme="light"] .settings-row,
body[data-theme="light"] .settings-value,
body[data-theme="light"] .settings-section h2,
body[data-theme="light"] .settings-popover-item,
body[data-theme="light"] .profile-field input,
body[data-theme="light"] .message-content,
body[data-theme="light"] .conversation-title,
body[data-theme="light"] .topbar,
body[data-theme="light"] .reference-card,
body[data-theme="light"] .references-header h2 {
  color: var(--text);
}

body[data-theme="light"] .account-menu-item:hover,
body[data-theme="light"] .account-menu-head:hover,
body[data-theme="light"] .menu-item:hover,
body[data-theme="light"] .settings-nav-item.active,
body[data-theme="light"] .settings-nav-item:hover,
body[data-theme="light"] .settings-popover-item.active,
body[data-theme="light"] .settings-popover-item:hover {
  background: rgba(41, 79, 122, 0.09);
}

body[data-theme="light"] .composer,
body[data-theme="light"] .composer:focus-within,
body[data-theme="light"] .search-input,
body[data-theme="light"] .profile-field,
body[data-theme="light"] .user-message-edit-form {
  border-color: rgba(20, 35, 55, 0.12);
  background: #eef3f8;
  color: var(--text);
}

body[data-theme="light"] .composer {
  border-color: rgba(10, 20, 30, 0.16);
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(10, 20, 30, 0.13);
}

body[data-theme="light"] .composer:focus-within {
  border-color: rgba(10, 20, 30, 0.24);
  background: #ffffff;
}

body[data-theme="light"] .composer textarea {
  color: #111111;
}

body[data-theme="light"] .composer textarea::placeholder {
  color: #8f8f8f;
}

body[data-theme="light"] .composer-tool,
body[data-theme="light"] .reasoning-button {
  background: transparent;
  color: #111111;
}

body[data-theme="light"] .deep-thinking-toggle {
  border-color: rgba(15, 23, 42, 0.2);
  background: transparent;
  color: #111827;
}

body[data-theme="light"] .deep-thinking-toggle.active {
  border-color: #3478f6;
  background: rgba(52, 120, 246, 0.08);
  color: #1f63d3;
}

body[data-theme="light"] .reasoning-button:hover,
body[data-theme="light"] .reasoning-button[aria-expanded="true"] {
  background: rgba(10, 20, 30, 0.06);
}

body[data-theme="light"] .message.user .message-content {
  color: var(--user-bubble-text);
}

body[data-theme="light"] .message.user .message-content[style] {
  color: var(--user-bubble-text);
}

body[data-theme="light"] .message.user .message-content {
  background: var(--user-bubble-bg);
}

body[data-theme="light"] .app-tile {
  color: var(--text);
}

body[data-theme="light"] .app-tile:hover,
body[data-theme="light"] .app-tile:focus-visible {
  background: #e7ecf3;
}

body[data-theme="light"] .app-tile-icon {
  filter: none;
}

body[data-theme="light"] .thinking-line,
body[data-theme="light"] .thinking-tool-label,
body[data-theme="light"] .conversation-heading p,
body[data-theme="light"] .attachment-meta,
body[data-theme="light"] .account-identity span,
body[data-theme="light"] .session-meta,
body[data-theme="light"] .profile-field span {
  color: var(--text-muted);
}

body[data-theme="light"] .send-button {
  background: #101418;
  color: #ffffff;
}

body[data-theme="light"] .settings-popover {
  border-color: rgba(20, 35, 55, 0.14);
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(42, 64, 92, 0.2);
}

body[data-theme="light"] .settings-close {
  color: #000000;
}

body[data-theme="light"] .settings-close:hover,
body[data-theme="light"] .settings-close:focus-visible {
  background: #f1f2f4;
}

body[data-theme="light"] .account-divider,
body[data-theme="light"] .menu-divider,
body[data-theme="light"] .settings-list,
body[data-theme="light"] .settings-row,
body[data-theme="light"] .references-header {
  border-color: rgba(20, 35, 55, 0.1);
}

body[data-theme="light"] .account-divider,
body[data-theme="light"] .menu-divider {
  background: rgba(20, 35, 55, 0.12);
}

body[data-theme="light"] .welcome-mascot-image,
body[data-theme="light"] .welcome-wordmark,
body[data-theme="light"] .thinking-mascot,
body[data-theme="light"] .rail-toggle-mascot {
  filter: none;
}

body[data-theme="light"] .mascot-eye-mask,
body[data-theme="light"] .mascot-eyes {
  display: block;
}

body[data-theme="light"] .mascot-eye-mask {
  background: #ffffff;
}

body[data-theme="light"] .mascot-eyes {
  display: flex;
}

body[data-theme="light"] .mascot-eye {
  background: #000000;
}

body[data-theme="light"] .rail-button,
body[data-theme="light"] .ghost-icon {
  color: #111111;
}

body[data-theme="light"] .rail-apps-icon {
  filter:
    drop-shadow(0.35px 0 0 #111111)
    drop-shadow(-0.35px 0 0 #111111)
    drop-shadow(0 0.35px 0 #111111)
    drop-shadow(0 -0.35px 0 #111111);
}

body[data-theme="light"] .rail-button.active {
  background: rgba(41, 79, 122, 0.09);
}

body[data-theme="light"] .brand-wordmark {
  filter: none;
}

body[data-theme="light"] .reasoning-menu {
  border-color: rgba(20, 35, 55, 0.13);
  background: #ffffff;
}

body[data-theme="light"] .reasoning-menu .model-options {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="light"] .checkmark,
body[data-theme="light"] .menu-chevron {
  color: #101418;
}

body[data-theme="light"] .session-item {
  background: #ffffff;
}

body[data-theme="light"] .session-item.active,
body[data-theme="light"] .session-item:hover {
  background: #eef2f7;
}

body[data-theme="light"] .session-button {
  background: transparent;
  color: var(--text);
}

body[data-theme="light"] .session-more {
  color: #667180;
}

body[data-theme="light"] .session-more:hover,
body[data-theme="light"] .session-more[aria-expanded="true"] {
  color: #101418;
}

body[data-theme="light"] .session-pin,
body[data-theme="light"] .session-pin svg {
  color: #667180;
  stroke: #667180;
}

body[data-theme="light"] .chat-panel:not(.empty) .composer-wrap {
  background: transparent;
}

body[data-theme="light"] .message-actions .icon-action,
body[data-theme="light"] .message.assistant .icon-action {
  color: #62676d;
}

body[data-theme="light"] .message-actions .action-icon-img,
body[data-theme="light"] .message.assistant .action-icon-img {
  filter: invert(1);
  opacity: 0.62;
}

body[data-theme="light"] .message-actions .icon-action:hover,
body[data-theme="light"] .message.assistant .icon-action:hover {
  color: #111111;
}

body[data-theme="light"] .message-actions .icon-action:hover .action-icon-img,
body[data-theme="light"] .message.assistant .icon-action:hover .action-icon-img {
  opacity: 1;
}

body[data-theme="light"] .temporary-intro h2 {
  color: #000000;
}

body[data-theme="light"] .message.user .user-message-actions .icon-action {
  color: #5f646b;
}

body[data-theme="light"] .message.user .user-message-actions .action-icon-img {
  filter: invert(1);
  opacity: 0.58;
}

body[data-theme="light"] .message.user .user-message-actions .icon-action:hover {
  color: #000000;
  transform: scale(1.12);
}

body[data-theme="light"] .message.user .user-message-actions .icon-action:hover .action-icon-img {
  opacity: 1;
}

body[data-theme="light"] .menu-icon-img,
body[data-theme="light"] .settings-nav-icon,
body[data-theme="light"] .account-icon-img,
body[data-theme="light"] .image-mode-icon-img,
body[data-theme="light"] .aspect-icon-img,
body[data-theme="light"] .temporary-chat-icon {
  filter: invert(1);
}

body[data-language="en"] .settings-nav-item,
body[data-language="ja"] .settings-nav-item {
  font-size: 18px;
}

body[data-language="en"] .menu-item,
body[data-language="ja"] .menu-item,
body[data-language="en"] .account-menu-item,
body[data-language="ja"] .account-menu-item {
  font-size: 19px;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 var(--rail-width);
  display: flex;
  width: min(calc(100vw - var(--rail-width)), var(--sidebar-width));
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--border);
  background: rgba(12, 12, 12, 0.94);
  padding: 18px 14px;
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 220ms ease;
  backdrop-filter: blur(26px);
}

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

.overlay.open {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  background: rgba(0, 0, 0, 0.54);
}

.overlay {
  display: none;
}

.brand-row {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 8px 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.brand-mascot {
  display: block;
  width: 34px;
  height: 28px;
  object-fit: contain;
}

.brand-wordmark {
  display: block;
  width: 154px;
  height: auto;
  filter: invert(1);
}

.brand-name {
  line-height: 1.1;
}

.brand-caption {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.noon-logo {
  --logo-size: 84px;
  --logo-stroke: #f7c15d;
  --logo-fill: #ffeeb2;
  position: relative;
  display: inline-block;
  width: var(--logo-size);
  height: calc(var(--logo-size) * 0.86);
}

.noon-rays,
.noon-shadow,
.noon-blob,
.noon-shine,
.noon-eye {
  position: absolute;
  display: block;
}

.noon-rays {
  inset: 8% 13% 18%;
}

.noon-rays i {
  position: absolute;
  display: block;
  width: calc(var(--logo-size) * 0.048);
  height: calc(var(--logo-size) * 0.13);
  border-radius: 999px;
  background: #ffd98b;
  opacity: 0.9;
  transform-origin: center calc(var(--logo-size) * 0.38);
}

.noon-rays i:nth-child(1) {
  top: 1%;
  left: 48%;
}

.noon-rays i:nth-child(2) {
  top: 11%;
  left: 70%;
  transform: rotate(24deg);
}

.noon-rays i:nth-child(3) {
  top: 33%;
  left: 84%;
  transform: rotate(58deg);
}

.noon-rays i:nth-child(4) {
  top: 59%;
  left: 88%;
  transform: rotate(84deg);
}

.noon-rays i:nth-child(5) {
  top: 59%;
  left: 7%;
  transform: rotate(-84deg);
}

.noon-rays i:nth-child(6) {
  top: 33%;
  left: 11%;
  transform: rotate(-58deg);
}

.noon-rays i:nth-child(7) {
  top: 11%;
  left: 27%;
  transform: rotate(-24deg);
}

.noon-shadow {
  left: 13%;
  right: 13%;
  bottom: 2%;
  height: 9%;
  border-radius: 999px;
  background: #b8b7df;
  opacity: 0.75;
  filter: blur(1px);
}

.noon-blob {
  left: 14%;
  right: 14%;
  bottom: 8%;
  height: 52%;
  border: calc(var(--logo-size) * 0.035) solid var(--logo-stroke);
  border-radius: 52% 52% 42% 42% / 78% 78% 22% 22%;
  background:
    radial-gradient(circle at 34% 34%, rgba(255, 255, 255, 0.62) 0 10%, transparent 11%),
    linear-gradient(180deg, #fff4c7 0%, var(--logo-fill) 78%, #ffe18d 100%);
  box-shadow: 0 7px 20px rgba(246, 189, 91, 0.22);
}

.noon-shine {
  top: 20%;
  left: 13%;
  width: 26%;
  height: 8%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform: rotate(-28deg);
}

.noon-eye {
  top: 44%;
  width: 7%;
  height: 24%;
  border-radius: 999px;
  background: #55546c;
}

.noon-eye.left {
  left: 42%;
}

.noon-eye.right {
  right: 31%;
}

.noon-logo-sidebar {
  --logo-size: 34px;
}

.noon-wordmark {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.055em;
  font-family:
    "Arial Rounded MT Bold",
    "Nunito",
    "Aptos Display",
    "Segoe UI Rounded",
    "Microsoft YaHei",
    sans-serif;
  font-size: clamp(52px, 5.8vw, 90px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

.word-noon {
  color: #f4f7fb;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.08);
}

.word-ai {
  background: linear-gradient(135deg, #15c7c5 0%, #1597ed 58%, #246ee8 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: none;
}

.noon-wordmark-small {
  gap: 0.04em;
  font-size: 24px;
  line-height: 1;
}

.new-chat-button,
.search-box,
.select-label {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.new-chat-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  color: var(--text);
  font-weight: 680;
}

.new-chat-button:hover,
.text-button:hover,
.inline-action:hover,
.composer-tool:hover,
.ghost-icon:hover {
  background: rgba(255, 255, 255, 0.11);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  color: var(--text-muted);
}

.search-box svg {
  width: 17px;
  height: 17px;
}

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

.session-list {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 4px 6px 4px 0;
}

.session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px 32px;
  align-items: center;
  width: 100%;
  height: 42px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.session-item.active {
  background: rgba(255, 255, 255, 0.18);
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.session-button {
  display: grid;
  align-items: center;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0 8px 0 14px;
  color: var(--text);
  text-align: left;
}

.session-button:hover {
  background: transparent;
}

.session-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  opacity: 0;
  padding: 0;
}

.session-item:hover .session-more,
.session-more[aria-expanded="true"] {
  opacity: 1;
}

.session-more:hover,
.session-more[aria-expanded="true"] {
  background: transparent;
  color: #ffffff;
}

.session-more svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

.session-pin {
  display: grid;
  place-items: center;
  width: 24px;
  height: 42px;
  color: #767676;
}

.session-pin svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #737373;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-title {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 520;
}

.session-meta {
  display: none;
}

.session-item.renaming {
  grid-template-columns: minmax(0, 1fr);
  background: transparent;
}

.session-rename-input {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
}

.session-menu {
  position: fixed;
  z-index: 90;
  display: grid;
  width: 214px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: #343434;
  padding: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.session-menu button {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f4f4f4;
  padding: 0 10px;
  text-align: left;
  font-size: 17px;
}

.session-menu button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.session-menu button.danger {
  color: #ff6c6c;
}

.session-menu svg {
  width: 23px;
  height: 23px;
  stroke-width: 2;
}

.session-menu .pin-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-settings {
  display: grid;
  gap: 10px;
}

.text-button,
.inline-action {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 12px;
}

.danger {
  color: var(--danger);
}

.select-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.select-label select,
.speed-label select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.chat-panel {
  position: relative;
  display: grid;
  overflow: hidden;
  margin-left: var(--rail-width);
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: 58px 1fr auto;
  background: transparent;
}

.chat-panel:not(.empty) {
  grid-template-rows: 1fr;
}

.chat-panel:not(.empty) .topbar {
  display: none;
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 34px;
}

.conversation-heading {
  min-width: 0;
  opacity: 1;
  transition: opacity 160ms ease;
}

.chat-panel.empty .conversation-heading {
  display: none;
}

.conversation-heading h1 {
  margin: 0;
  overflow: hidden;
  max-width: min(520px, 52vw);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-heading p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.ghost-icon,
.icon-button,
.composer-tool {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
}

.ghost-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.88);
}

.ghost-icon svg,
.icon-button svg {
  width: 22px;
  height: 22px;
}

.temporary-chat-button svg {
  width: 24px;
  height: 24px;
}

.temporary-chat-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.temporary-chat-outline {
  stroke-dasharray: 3.2 3.2;
  stroke-width: 2.15;
}

.close-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--text-muted);
}

.message-scroll {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px max(22px, calc((100vw - 850px) / 2)) 28px;
}

.chat-panel:not(.empty) .message-scroll {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100vh;
  height: 100dvh;
  padding: 36px max(22px, calc((100vw - 1080px) / 2)) 240px;
  scroll-padding-bottom: 240px;
}

.chat-panel.apps-open {
  grid-template-rows: 1fr;
}

.chat-panel.apps-open .topbar {
  display: none;
}

.chat-panel.apps-open .composer-wrap {
  display: none;
}

.apps-view {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  display: grid;
  place-items: start center;
  padding: clamp(112px, 16vh, 160px) max(34px, calc((100vw - 1120px) / 2)) 72px;
}

.apps-view[hidden] {
  display: none;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 300px));
  gap: clamp(16px, 2.5vw, 26px);
  align-content: center;
  justify-content: center;
  width: min(100%, 1040px);
}

.app-tile {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  min-height: 236px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    #101010;
  color: #f5f5f5;
  padding: 30px 24px 28px;
  font-size: 22px;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease;
}

.app-tile:hover,
.app-tile:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    #171717;
  transform: translateY(-2px);
}

.app-tile-icon {
  width: 94px;
  height: 94px;
  object-fit: contain;
  filter: invert(1);
}

.app-tile span {
  line-height: 1.2;
}

.app-tile small {
  max-width: 210px;
  color: #a8a8a8;
  font-size: 15px;
  font-weight: 520;
  line-height: 1.45;
}

.welcome {
  position: relative;
  display: grid;
  min-height: 100%;
  align-content: center;
  justify-items: center;
  gap: 154px;
  padding-bottom: 14vh;
  text-align: center;
}

.chat-panel.empty .welcome {
  display: block;
}

.welcome-brand {
  position: fixed;
  top: calc(50% - 190px);
  left: calc(var(--rail-width) + (var(--layout-width) - var(--rail-width)) / 2);
  display: grid;
  justify-items: center;
  width: min(680px, calc(var(--layout-width) - var(--rail-width) - 32px));
  transform: translateX(-50%);
}

.welcome-logo {
  --eye-x: 0px;
  --eye-y: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.3vw, 30px);
  width: min(560px, calc(var(--layout-width) - var(--rail-width) - 48px));
  height: auto;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.temporary-intro {
  display: none;
}

.chat-panel.empty.temporary .welcome-brand {
  display: none;
}

.chat-panel.empty.temporary .top-actions {
  display: none;
}

.chat-panel.empty.temporary .temporary-intro {
  position: fixed;
  top: calc(50% - 178px);
  left: calc(var(--rail-width) + (var(--layout-width) - var(--rail-width)) / 2);
  display: grid;
  width: min(780px, calc(var(--layout-width) - var(--rail-width) - 44px));
  justify-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.temporary-intro h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 760;
  line-height: 1.08;
}

.temporary-intro p {
  margin: 0;
  color: #b7b7b7;
  font-size: clamp(16px, 2.1vw, 24px);
  font-weight: 520;
  line-height: 1.45;
}

.welcome-mascot {
  position: relative;
  display: block;
  flex: 0 0 31%;
  max-width: 174px;
  min-width: 92px;
  aspect-ratio: 464 / 356;
}

.welcome-mascot-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(1);
  user-select: none;
  -webkit-user-drag: none;
}

.welcome-wordmark {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 356px;
  height: auto;
  filter: invert(1);
  user-select: none;
  -webkit-user-drag: none;
}

.mascot-eye-mask,
.mascot-eyes {
  position: absolute;
  pointer-events: none;
}

.mascot-eye-mask {
  left: 40.5%;
  top: 52.5%;
  width: 22%;
  height: 22%;
  border-radius: 999px;
  background: #000;
}

.mascot-eyes {
  left: 43.6%;
  top: 58.4%;
  display: flex;
  gap: 8.2%;
  width: 16%;
  height: 15%;
  justify-content: space-between;
  transform: translate3d(var(--eye-x), var(--eye-y), 0);
  transition: transform 0.12s ease-out;
}

.mascot-eye {
  display: block;
  width: 23%;
  height: 100%;
  border-radius: 999px;
  background: #fff;
}

.drop-overlay {
  position: fixed;
  z-index: 80;
  inset: 0 0 0 var(--rail-width);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(8px);
}

.drop-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: #242424;
  color: #f7f7f7;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  font-size: 20px;
  font-weight: 720;
}

.drop-card svg {
  width: 28px;
  height: 28px;
}

.message {
  display: flex;
  margin: 0 auto 34px;
  width: min(1080px, 100%);
}

.message.user {
  justify-content: flex-end;
  margin-bottom: 68px;
}

.message.assistant {
  justify-content: flex-start;
}

.message-body {
  min-width: 0;
  max-width: min(760px, 100%);
}

.message.user .message-body {
  max-width: min(720px, 66.666%);
  position: relative;
}

.message.user.editing .message-body {
  width: min(1120px, 100%);
  max-width: 100%;
}

.message-attachments {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.message-attachment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
}

.attachment-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
  color: #f4f4f4;
  font-size: 13px;
  font-weight: 760;
}

.attachment-name,
.attachment-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-name {
  color: #f7f7f7;
  font-size: 14px;
  font-weight: 680;
}

.attachment-meta {
  margin-top: 2px;
  color: #b8b8b8;
  font-size: 12px;
}

.message-content {
  color: var(--text);
  font-size: 25px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.message.user .message-content {
  color: var(--user-bubble-text);
  font-size: 25px;
  line-height: 1.35;
  border-radius: 10px;
  background: var(--user-bubble-bg);
  padding: 14px 22px;
}

.user-message-stack {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
}

.user-message-stack.has-images {
  width: auto;
  max-width: 100%;
}

.user-message-stack.has-images .message-content {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
}

.message-image-attachments {
  display: grid;
  justify-items: end;
  width: min(576px, 100%);
  gap: 8px;
}

.message-image-preview {
  display: block;
  width: min(576px, 100%);
  max-height: 360px;
  border-radius: 28px;
  object-fit: cover;
  background: #111111;
}

.user-message-actions {
  position: absolute;
  right: 8px;
  bottom: -42px;
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0;
  pointer-events: auto;
  transition:
    opacity 1s ease,
    transform 1s ease,
    visibility 0s linear 1s;
  transform: translateY(-2px);
  visibility: hidden;
}

.message.user:hover .user-message-actions,
.message.user:focus-within .user-message-actions {
  opacity: 1;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease,
    visibility 0s linear 0s;
  transform: translateY(0);
  visibility: visible;
}

.user-message-edit-form {
  display: grid;
  gap: 16px;
  width: 100%;
  border-radius: 0 0 30px 30px;
  background: #2c2c2c;
  padding: 18px 24px 14px 30px;
}

.user-message-edit-input {
  width: 100%;
  min-height: 72px;
  max-height: 220px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f5f5f5;
  font: inherit;
  font-size: 24px;
  line-height: 1.36;
  overflow-y: auto;
}

.user-message-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.edit-action {
  min-width: 76px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #1f1f1f;
  color: #f5f5f5;
  padding: 0 20px;
  font-size: 20px;
}

.edit-action.send {
  border-color: transparent;
  background: #f5f5f5;
  color: #111111;
}

.thinking-line {
  margin-bottom: 24px;
  color: #dedede;
  font-size: 23px;
  line-height: 1.2;
}

.noon-thinking {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  min-height: 118px;
  margin-bottom: 22px;
}

.noon-logo-thinking {
  display: inline-block;
  width: 124px;
  height: auto;
  animation: noon-hop 1.35s ease-in-out infinite;
  transform-origin: 50% 92%;
}

.thinking-mascot {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: invert(1);
  animation: noon-squish 1.35s ease-in-out infinite;
  transform-origin: 50% 86%;
}

.thinking-dots {
  display: inline-flex;
  gap: 5px;
  padding-bottom: 26px;
}

.thinking-tool-label {
  align-self: center;
  color: #f2f2f2;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.2;
  padding-bottom: 4px;
}

.thinking-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f7d07b;
  animation: thinking-dot 1.1s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 280ms;
}

.message.assistant.finishing .noon-thinking {
  animation: noon-pop-away 420ms ease forwards;
}

.message-content.reveal-response {
  animation: response-reveal 520ms ease both;
}

@keyframes noon-hop {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  28% {
    transform: translateY(-10px) rotate(-4deg);
  }
  56% {
    transform: translateY(1px) rotate(3deg);
  }
  76% {
    transform: translateY(-5px) rotate(0deg);
  }
}

@keyframes noon-squish {
  0%,
  100% {
    transform: scale(1, 1);
  }
  20% {
    transform: scale(1.05, 0.94);
  }
  38% {
    transform: scale(0.96, 1.08);
  }
  62% {
    transform: scale(1.03, 0.97);
  }
}

@keyframes noon-blink {
  0%,
  44%,
  52%,
  100% {
    transform: scaleY(1);
  }
  48% {
    transform: scaleY(0.12);
  }
}

@keyframes noon-ray {
  0%,
  100% {
    opacity: 0.5;
    height: calc(var(--logo-size) * 0.13);
  }
  42% {
    opacity: 1;
    height: calc(var(--logo-size) * 0.18);
  }
}

@keyframes noon-shadow {
  0%,
  100% {
    opacity: 0.72;
    transform: scaleX(1);
  }
  32% {
    opacity: 0.38;
    transform: scaleX(0.74);
  }
}

@keyframes thinking-dot {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  45% {
    opacity: 1;
    transform: translateY(-8px);
  }
}

@keyframes noon-pop-away {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  45% {
    opacity: 1;
    transform: translateY(-14px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translateY(10px) scale(0.86);
  }
}

@keyframes response-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-content p {
  margin: 0 0 12px;
}

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

.message-content pre {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  padding: 15px;
}

.message-content code {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  padding: 2px 6px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.message-content pre code {
  background: transparent;
  padding: 0;
}

.generated-image-wrap {
  position: relative;
  display: block;
  width: min(420px, 100%);
  margin-top: 10px;
  line-height: 0;
  border-radius: 18px;
}

.generated-image {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.generated-image-download {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(0.96);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    background 0.16s ease;
  user-select: none;
}

.generated-image-wrap:hover .generated-image-download,
.generated-image-wrap:focus-within .generated-image-download {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.generated-image-download:hover {
  background: #ffffff;
  transform: translateY(0) scale(1.06);
}

.generated-image-download img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #f1f1f1;
  padding: 0;
}

.icon-action svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.action-icon-img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    filter 0.14s ease,
    transform 0.14s ease;
}

.icon-action:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.feedback-action.active .action-icon-img {
  opacity: 1;
}

.references-panel {
  position: fixed;
  z-index: 45;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 34vw);
  min-width: 360px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: #050505;
  color: #f6f6f6;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.48);
}

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

.references-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 22px 0 30px;
}

.references-header h2 {
  margin: 0;
  color: #f5f5f5;
  font-size: 22px;
  font-weight: 720;
}

.references-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #f2f2f2;
  padding: 0;
}

.references-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.references-close svg {
  width: 24px;
  height: 24px;
}

.references-content {
  overflow-y: auto;
  height: calc(100% - 74px);
  padding: 28px 28px 34px;
}

.references-empty {
  margin: 40px 0 0;
  color: #a9c8ff;
  font-size: 17px;
}

.references-empty[hidden] {
  display: none;
}

.references-list {
  display: grid;
  gap: 14px;
}

.reference-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #151515;
  color: #d8d8d8;
  padding: 16px;
  text-decoration: none;
}

.reference-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #1d1d1d;
}

.reference-card strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.reference-card span {
  overflow: hidden;
  display: -webkit-box;
  color: #b9b9b9;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.reference-card .reference-domain {
  display: block;
  color: #8fbaff;
  font-size: 12px;
  -webkit-line-clamp: 1;
}

.chat-panel.references-open .message-scroll,
.chat-panel.references-open .composer-wrap {
  padding-right: calc(min(520px, 34vw) + 24px);
}

.composer-wrap {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px max(18px, calc((100vw - 940px) / 2)) 24px;
  transition:
    top 180ms ease,
    transform 180ms ease,
    padding 180ms ease;
}

.chat-panel:not(.empty) .composer-wrap {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--rail-width);
  padding: 18px max(18px, calc((100vw - 1080px) / 2)) 28px;
  background: linear-gradient(to top, #000 74%, rgba(0, 0, 0, 0));
}

.chat-panel:not(.empty) .composer {
  width: min(1080px, calc(100vw - var(--rail-width) - 44px));
}

.chat-panel.empty .composer-wrap {
  position: static;
  width: auto;
  max-width: none;
  padding: 0;
  transform: none;
}

.composer {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 999px;
  background: var(--surface);
  padding: 8px 12px 8px 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.chat-panel.empty .composer {
  position: fixed;
  top: calc(50% + 90px);
  left: calc(var(--rail-width) + (var(--layout-width) - var(--rail-width)) / 2);
  width: 940px;
  max-width: calc(var(--layout-width) - var(--rail-width) - 36px);
  transform: translate(-50%, -50%);
}

.composer:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  background: #252525;
}

.composer.expanded:not(.image-mode) {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  min-height: 156px;
  border-radius: 28px;
  padding: 24px 18px 14px 20px;
}

.composer.expanded:not(.image-mode) .composer-main {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-content: flex-start;
  padding-bottom: 13px;
}

.composer.expanded:not(.image-mode) textarea {
  min-height: 82px;
  max-height: 220px;
  padding: 0 8px 0 0;
  font-size: 18px;
  line-height: 1.45;
}

.composer.expanded:not(.image-mode) .composer-tool {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

.composer.expanded:not(.image-mode) .composer-actions {
  grid-column: 3;
  grid-row: 2;
  align-self: center;
}

.composer.image-mode,
.composer.web-mode,
.composer.deepseek-mode {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: end;
  min-height: 112px;
  border-radius: 34px;
  padding: 16px 20px 14px;
}

.composer.image-mode .composer-tool,
.composer.web-mode .composer-tool,
.composer.deepseek-mode .composer-tool {
  align-self: end;
  margin-bottom: 1px;
}

.composer.image-mode .composer-main,
.composer.web-mode .composer-main,
.composer.deepseek-mode .composer-main {
  gap: 12px;
}

.composer.image-mode .composer-actions,
.composer.web-mode .composer-actions,
.composer.deepseek-mode .composer-actions {
  align-self: end;
}

.composer.image-mode textarea,
.composer.web-mode textarea,
.composer.deepseek-mode textarea {
  min-height: 28px;
  padding: 0;
  font-size: 20px;
  line-height: 1.35;
}

.composer.web-mode.deepseek-mode .composer-main {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  column-gap: 10px;
  row-gap: 12px;
}

.composer.web-mode.deepseek-mode textarea {
  grid-column: 1 / -1;
  grid-row: 1;
}

.composer.web-mode.deepseek-mode .deep-thinking-toggle {
  grid-column: 1;
  grid-row: 2;
}

.composer.web-mode.deepseek-mode .web-mode-bar {
  grid-column: 2;
  grid-row: 2;
}

.composer.has-attachments {
  min-height: 132px;
  align-items: end;
  border-radius: 28px;
  padding-top: 20px;
  padding-bottom: 16px;
}

.composer.has-attachments .composer-main {
  justify-content: flex-start;
  gap: 12px;
}

.composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-height: 160px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 560;
  line-height: 1.45;
  padding: 7px 0 4px;
}

.composer textarea::placeholder {
  color: #9a9a9a;
}

.composer-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 2px 0 10px;
}

.attachment-chip {
  position: relative;
  color: #f4f4f4;
}

.attachment-image-chip {
  width: 74px;
  height: 74px;
  overflow: visible;
  border-radius: 14px;
}

.attachment-thumb {
  display: block;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  object-fit: cover;
  background: #111111;
}

.attachment-file-chip {
  display: inline-grid;
  grid-template-columns: 58px minmax(120px, max-content);
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: min(360px, 100%);
  min-height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.55);
  padding: 10px 42px 10px 10px;
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #2d2d2d;
  color: #ffffff;
}

.attachment-file-icon.sheet {
  background: #20bf55;
}

.attachment-file-icon.pdf {
  background: #d94d43;
}

.attachment-file-icon.doc {
  background: #3478f6;
}

.attachment-file-icon.deck {
  background: #d86c3b;
}

.attachment-file-icon.video {
  background: #6a5cff;
}

.attachment-file-icon svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.attachment-chip-body {
  display: grid;
  min-width: 0;
  max-width: 238px;
  gap: 4px;
}

.attachment-chip .attachment-name {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 20px;
  font-weight: 740;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip .attachment-meta {
  display: block;
  overflow: hidden;
  color: #d3d3d3;
  font-size: 17px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #1d1d1d;
  padding: 0;
}

.attachment-file-chip .attachment-remove {
  top: 9px;
  right: 9px;
}

.attachment-remove:hover {
  background: #e9e9e9;
  color: #000000;
}

.attachment-remove svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.image-mode-bar,
.web-mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.image-mode-bar[hidden],
.web-mode-bar[hidden],
.deep-thinking-toggle[hidden] {
  display: none;
}

.image-mode-pill,
.web-mode-pill,
.aspect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
}

.image-mode-pill,
.web-mode-pill {
  position: relative;
  gap: 7px;
  background: rgba(83, 129, 181, 0.2);
  color: #9bc6ff;
  font-size: 16px;
  font-weight: 650;
  padding: 0 13px 0 11px;
}

.deep-thinking-toggle {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: transparent;
  color: #f7f7f7;
  gap: 7px;
  padding: 0 14px 0 12px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  user-select: none;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
}

.deep-thinking-toggle.active {
  border-color: #5f86ff;
  background: rgba(95, 134, 255, 0.08);
  color: #78a0ff;
}

.deep-thinking-toggle svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.web-mode-pill {
  background: rgba(83, 129, 181, 0.16);
}

.image-mode-pill svg,
.web-mode-pill svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.image-mode-icon-img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.aspect-icon-img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.image-mode-close,
.web-mode-close {
  display: none;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-left: -4px;
  border-radius: 999px;
  background: rgba(126, 169, 220, 0.24);
}

.image-mode-close svg,
.web-mode-close svg {
  width: 16px;
  height: 16px;
}

.image-mode-pill:hover,
.web-mode-pill:hover {
  background: rgba(83, 129, 181, 0.34);
}

.image-mode-pill:hover > svg,
.image-mode-pill:hover > .image-mode-icon-img,
.web-mode-pill:hover > svg {
  display: none;
}

.image-mode-pill:hover .image-mode-close,
.web-mode-pill:hover .web-mode-close {
  display: grid;
}

.aspect-button {
  gap: 7px;
  background: transparent;
  color: #f3f3f3;
  padding: 0 10px;
  font-size: 16px;
}

.aspect-button:hover,
.aspect-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
}

.aspect-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.composer-tool {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
}

.composer-tool svg {
  width: 22px;
  height: 22px;
}

.reasoning-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 128px;
  max-width: min(280px, 42vw);
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7d7d7;
  font-size: 16px;
  padding: 0 15px 0 18px;
}

.reasoning-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reasoning-button:hover,
.reasoning-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.11);
}

.reasoning-button svg {
  width: 16px;
  height: 16px;
}

.send-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 0;
  border-radius: 999px;
  background: #f7f7f7;
  color: #050505;
  padding: 0;
  line-height: 0;
}

.send-button #sendIcon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  line-height: 0;
  transition:
    transform 0.14s ease;
}

.send-button svg {
  display: block;
  width: 32px;
  height: 32px;
  overflow: visible;
  stroke-width: 2.2;
}

.send-button:hover #sendIcon {
  transform: translateY(-1.5px) scale(1.08);
}

.send-button:disabled {
  cursor: default;
  opacity: 1;
}

.composer-menu {
  position: fixed;
  z-index: 40;
  min-width: 186px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #343434;
  color: #f5f5f5;
  padding: 12px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
}

.tools-menu {
  width: 348px;
}

.reasoning-menu {
  width: 348px;
  padding: 8px;
}

.reasoning-menu.image-model-menu {
  width: 286px;
}

.aspect-menu {
  width: 258px;
  padding: 14px 12px;
}

.menu-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  padding: 9px 12px;
  font-size: 18px;
  text-align: left;
}

.reasoning-menu .menu-item {
  grid-template-columns: 1fr auto;
  font-size: 18px;
}

.model-options {
  position: static;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.model-options .menu-item {
  min-height: 50px;
  padding: 9px 10px 9px 18px;
  font-size: 17px;
}

.reasoning-menu .menu-title,
.reasoning-menu .reasoning-option,
.reasoning-menu .menu-divider,
.reasoning-menu .model-toggle,
.reasoning-menu:not(.image-model-menu) .model-option[data-model-kind="image"],
.reasoning-menu.image-model-menu .menu-title,
.reasoning-menu.image-model-menu .reasoning-option,
.reasoning-menu.image-model-menu .menu-divider,
.reasoning-menu.image-model-menu .model-toggle,
.reasoning-menu.image-model-menu .model-option[data-model-kind="chat"] {
  display: none;
}

.aspect-menu .menu-item {
  grid-template-columns: 28px 1fr auto;
  min-height: 52px;
  font-size: 18px;
}

.aspect-option em {
  color: #b9b9b9;
  font-style: normal;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-item svg {
  width: 24px;
  height: 24px;
}

.menu-icon-img {
  display: block;
  justify-self: center;
  width: 24px;
  height: 24px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.menu-divider {
  height: 1px;
  margin: 8px 12px;
  background: rgba(255, 255, 255, 0.17);
}

.menu-title {
  padding: 8px 12px 12px;
  color: #aaa;
  font-size: 17px;
}

.menu-chevron {
  color: #f5f5f5;
  font-size: 28px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.checkmark {
  visibility: hidden;
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  color: #f5f5f5;
  font-size: 0;
  line-height: 1;
  place-self: center;
}

.checkmark::before {
  position: absolute;
  inset: 1px;
  background: currentColor;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 22 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.7 11.8 8.8 16 17.4 5.2' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 22 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.7 11.8 8.8 16 17.4 5.2' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.reasoning-option.active .checkmark {
  visibility: visible;
}

.aspect-option.active .checkmark {
  visibility: visible;
}

.model-option.active .checkmark {
  visibility: visible;
}

.aspect-icon {
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 5px;
  color: #ededed;
}

.aspect-icon.auto {
  width: 21px;
  height: 14px;
  border-radius: 4px;
}

.aspect-icon.auto::after {
  content: "";
  display: block;
  width: 9px;
  height: 2px;
  margin: 4px 0 0 3px;
  border-radius: 999px;
  background: currentColor;
}

.aspect-icon.square {
  width: 22px;
  height: 22px;
}

.aspect-icon.portrait {
  width: 18px;
  height: 25px;
}

.aspect-icon.story {
  width: 16px;
  height: 28px;
}

.aspect-icon.landscape {
  width: 25px;
  height: 18px;
}

.aspect-icon.wide {
  width: 28px;
  height: 16px;
}

.dot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  font-size: 28px;
  letter-spacing: 2px;
}

.typing-cursor::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -0.18em;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .topbar {
    padding: 8px 18px;
  }

  .message-scroll {
    padding: 70px 18px 230px;
  }

  .welcome {
    gap: 144px;
    padding-bottom: 15vh;
  }

  .composer {
    min-height: 64px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 9px 8px 15px;
  }

  .composer.expanded:not(.image-mode):not(.web-mode) {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 142px;
    border-radius: 24px;
    padding: 18px 12px 12px 15px;
  }

  .composer.expanded:not(.image-mode):not(.web-mode) textarea {
    min-height: 72px;
    font-size: 16px;
  }

  .composer.image-mode,
  .composer.web-mode,
  .composer.deepseek-mode {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 106px;
    padding: 14px 14px 13px;
  }

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

  .composer.image-mode textarea,
  .composer.web-mode textarea,
  .composer.deepseek-mode textarea {
    font-size: 18px;
  }

  .references-panel {
    left: var(--rail-width);
    width: auto;
    min-width: 0;
  }

  .chat-panel.references-open .message-scroll,
  .chat-panel.references-open .composer-wrap {
    padding-right: max(18px, calc((100vw - 940px) / 2));
  }

  .reasoning-button {
    min-width: 82px;
    height: 40px;
    font-size: 14px;
    padding: 0 10px 0 12px;
  }
}

@media (max-width: 560px) {
  :root {
    --rail-width: 64px;
  }

  .rail {
    gap: 14px;
    padding: 10px 8px;
  }

  .rail-button {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .rail-button:first-child {
    margin-bottom: 20px;
  }

  .rail-button svg {
    width: 25px;
    height: 25px;
  }

  .rail-toggle-mascot {
    width: 32px;
    height: 28px;
  }

  .rail-button::after {
    font-size: 15px;
  }

  .rail-user {
    width: 50px;
    height: 50px;
  }

  .rail-user::after {
    font-size: 15px;
  }

  .user-avatar {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .account-menu {
    width: min(360px, calc(100vw - var(--rail-width) - 24px));
    padding: 18px 18px 16px;
  }

  .account-identity strong {
    font-size: 20px;
  }

  .account-menu-item {
    min-height: 48px;
    font-size: 19px;
  }

  .profile-modal {
    padding: 16px;
  }

  .profile-dialog {
    padding: 20px;
  }

  .profile-dialog h2 {
    font-size: 24px;
  }

  .profile-avatar-wrap,
  .profile-avatar-preview {
    width: 156px;
    height: 156px;
  }

  .profile-avatar-preview {
    font-size: 44px;
  }

  .chat-panel {
    grid-template-rows: 54px 1fr auto;
  }

  .apps-view {
    place-items: start stretch;
    padding: 96px 18px 38px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
  }

  .app-tile {
    grid-template-columns: 78px minmax(0, 1fr);
    justify-items: start;
    align-content: center;
    min-height: 118px;
    padding: 20px 22px;
    font-size: 22px;
    text-align: left;
  }

  .app-tile-icon {
    width: 78px;
    height: 78px;
  }

  .topbar {
    padding: 8px 12px;
  }

  .top-actions {
    gap: 8px;
  }

  .chat-panel.empty .composer-wrap {
    width: auto;
    max-width: none;
  }

  .chat-panel.empty .composer {
    top: calc(50% + 52px);
    width: 300px;
    max-width: calc(var(--layout-width) - 88px);
  }

  .welcome {
    gap: 128px;
    padding: 0 12px 16vh;
  }

  .welcome-brand {
    top: calc(50% - 142px);
  }

  .welcome-logo {
    width: min(290px, calc(var(--layout-width) - var(--rail-width) - 42px));
  }

  .chat-panel.empty:not(.has-input) .composer {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .composer-actions {
    gap: 0;
  }

  .composer-tool {
    width: 32px;
    height: 32px;
  }

  .send-button {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .send-button #sendIcon,
  .send-button svg {
    width: 30px;
    height: 30px;
  }

  .message-content,
  .message.user .message-content {
    font-size: 18px;
  }

  .thinking-line {
    font-size: 16px;
    margin-bottom: 14px;
  }

  .message.user .message-body {
    max-width: 66.666%;
  }

  .message.user.editing .message-body {
    max-width: 100%;
  }

  .message-image-preview {
    max-height: 280px;
    border-radius: 22px;
  }

  .message.user .message-content {
    padding: 12px 16px;
  }

  .user-message-edit-form {
    padding: 14px 16px 12px;
  }

  .user-message-edit-input {
    font-size: 18px;
  }

  .edit-action {
    min-width: 66px;
    height: 44px;
    font-size: 17px;
  }

  .message-actions {
    gap: 17px;
  }

  .icon-action svg {
    width: 24px;
    height: 24px;
  }
}
