@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/google-sans-flex-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #000;
  --sidebar: #000;
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --hover: rgba(255, 255, 255, 0.1);
  --active: rgba(255, 255, 255, 0.16);
  --composer: #2b2b2b;
  --composer-border: #3a3a3a;
  --text: #f4f4f4;
  --muted: #b4b4b4;
  --subtle: #7f7f7f;
  --line: #242424;
  --user-bubble: #303030;
  --learny-bubble: rgba(20, 20, 22, 0.86);
  --error: #ff6b6b;
  --ready: #d8d8d8;
  --accent: #5865ff;
  --accent-2: #6e75ff;
  --accent-3: #3d8bff;
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --focus-ring: rgba(139, 166, 255, 0.72);
  --surface-raised: rgba(28, 28, 31, 0.94);
  --shadow-raised: 0 18px 54px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --sidebar-width: 350.4px;
  --sidebar-mobile-width: 403.2px;
  --sidebar-mobile-compact-width: 396px;
  --sidebar-gutter: 14px;
  --workspace-editor-width: clamp(560px, 48vw, 820px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  color: #fff;
  background: rgba(91, 111, 224, 0.48);
}

.account-gate-pending body {
  background: #000;
}

.account-gate-pending body > :not(.account-required-gate) {
  visibility: hidden !important;
}

.account-required-gate {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
}

.account-required-gate[hidden] {
  display: none;
}

.account-required-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 440px);
  padding: 34px;
  border: 1px solid rgba(150, 167, 216, 0.26);
  border-radius: 24px;
  color: #f6f7fb;
  background:
    radial-gradient(circle at 50% -20%, rgba(83, 112, 195, 0.3), transparent 52%),
    linear-gradient(155deg, #121725, #090b12 72%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.72);
  text-align: center;
  overflow: hidden;
}

.account-required-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.065) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: account-dialog-shine 4.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes account-dialog-shine {
  0%, 58% { transform: translateX(-120%); }
  82%, 100% { transform: translateX(120%); }
}

.account-required-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border: 1px solid rgba(142, 164, 232, 0.35);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(72, 99, 179, 0.5), rgba(35, 43, 73, 0.5));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.1);
}

.account-required-mark span {
  width: 16px;
  height: 13px;
  border: 2px solid #e8ebf6;
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(206, 216, 255, 0.2);
}

.account-required-mark span::before {
  content: "";
  display: block;
  width: 8px;
  height: 7px;
  margin: -9px auto 0;
  border: 2px solid #e8ebf6;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.account-required-copy p {
  margin: 0 0 10px;
  color: rgba(181, 195, 237, 0.7);
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.14em;
}

.account-required-copy h1 {
  margin: 0;
  font-family: "Google Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 5vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.account-required-copy > span {
  display: block;
  max-width: 340px;
  margin-top: 13px;
  color: rgba(224, 227, 238, 0.7);
  font-size: 0.91rem;
  line-height: 1.5;
}

.account-required-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
}

.account-required-actions a,
.account-required-actions button {
  display: grid;
  place-items: center;
  min-height: 45px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  color: #f8f9ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 720;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.account-required-actions a {
  border-color: rgba(105, 145, 255, 0.55);
  background: linear-gradient(135deg, #3569df, #5069e8);
}

.account-required-actions a:hover,
.account-required-actions button:hover,
.account-required-actions a:focus-visible,
.account-required-actions button:focus-visible {
  border-color: rgba(176, 194, 255, 0.72);
  transform: translateY(-1px);
}

.account-required-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

@media (max-width: 520px) {
  .account-required-dialog {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .account-required-actions {
    grid-template-columns: 1fr;
  }
}

body.site-loading,
body.site-loading * {
  cursor: wait !important;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    opacity 620ms cubic-bezier(0.2, 0.9, 0.2, 1),
    backdrop-filter 620ms cubic-bezier(0.2, 0.9, 0.2, 1),
    -webkit-backdrop-filter 620ms cubic-bezier(0.2, 0.9, 0.2, 1),
    visibility 0s linear 620ms;
}

.loading-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.spinner {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, #fff 94%, #0000) top/14.1px 14.1px no-repeat,
    conic-gradient(#0000 30%, #fff);
  mask: radial-gradient(farthest-side, #0000 calc(100% - 14.1px), #000 0);
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 14.1px), #000 0);
  animation: spinner-c7wet2 1s infinite linear;
}

.loading-skip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 64px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.34);
  font: 600 0.82rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.loading-screen.is-skip-visible .loading-skip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.loading-skip:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
}

@keyframes spinner-c7wet2 {
  100% {
    transform: rotate(1turn);
  }
}

body.contact-page {
  min-height: 100%;
  overflow: auto;
  background: #000;
}

.page-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 9px 18px;
  border: 0;
  border-radius: 0;
  color: #130f00;
  background: #ffd83d;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transform: translateY(-100%);
  animation: pageUpdateBannerIn 240ms ease forwards;
}

.page-update-banner:hover {
  background: #ffe066;
}

.page-update-banner:active {
  background: #f2c400;
}

.page-update-banner:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.86);
  outline-offset: -5px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  cursor: not-allowed;
}

.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;
}

@keyframes pageUpdateBannerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

.app-shell > .binary-field {
  left: var(--sidebar-width);
}

.contact-page-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 44px 18px;
  place-items: center;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.contact-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  width: min(660px, 100%);
  padding: clamp(22px, 5vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0, rgba(72, 120, 255, 0.16), transparent 32%),
    rgba(18, 19, 25, 0.92);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 32px 100px rgba(0, 0, 0, 0.7);
}

.contact-card-header {
  display: grid;
  gap: 8px;
}

.contact-card-header a {
  width: max-content;
  color: rgba(229, 234, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.contact-card-header a:hover,
.contact-card-header a:focus-visible {
  color: #fff;
}

.contact-card-header h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem, 8vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.contact-card-header p {
  margin: 0;
  max-width: 58ch;
  color: rgba(235, 238, 248, 0.72);
  font-size: 0.98rem;
  font-weight: 620;
  line-height: 1.55;
}

.contact-form {
  display: grid;
  gap: 15px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(240, 243, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 820;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.94rem;
}

.contact-form input {
  height: 48px;
  padding: 0 14px;
}

.contact-form input[readonly] {
  color: rgba(245, 247, 255, 0.74);
}

.contact-form textarea {
  min-height: 150px;
  max-height: 320px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.5;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(108, 159, 255, 0.56);
  box-shadow: 0 0 0 1px rgba(108, 159, 255, 0.16);
}

.contact-upload-label input {
  display: none;
}

.contact-upload-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  color: rgba(235, 238, 248, 0.72);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.contact-upload-control strong {
  color: #fff;
}

.contact-file-preview {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.contact-file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.contact-file-pill span {
  overflow: hidden;
  color: rgba(245, 247, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-file-pill button {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.contact-counter {
  color: rgba(222, 228, 248, 0.58);
  font-size: 0.74rem;
  font-weight: 720;
  text-align: right;
}

.contact-form-message {
  min-height: 20px;
  margin: 0;
  color: rgba(226, 234, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.contact-form-message.error {
  color: #ffaaaa;
}

.contact-hold-submit {
  position: relative;
  min-height: 52px;
  overflow: hidden;
  border-radius: 16px;
  color: #fff;
  background: #2378ff;
  font-size: 0.96rem;
  font-weight: 850;
}

.contact-hold-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.22);
  transform: scaleX(var(--hold-progress, 0));
  transform-origin: left center;
  transition: transform 80ms linear;
}

.contact-hold-submit span {
  position: relative;
  z-index: 1;
}

.contact-hold-submit:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.sidebar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) max-content max-content;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 12px var(--sidebar-gutter);
  border-right: 1px solid var(--sidebar-border);
  background:
    linear-gradient(180deg, rgba(2, 30, 83, 0.513), rgba(76, 46, 99, 0.499)),
    linear-gradient(115deg, rgba(6, 18, 52, 0.05), rgba(0, 0, 0, 0.02) 56%, rgba(0, 0, 0, 0.07)),
    var(--sidebar);
  box-shadow:
    inset -1px 0 rgb(24, 24, 24),
    inset 0 1px rgba(155, 155, 155, 0.08),
    18px 0 60px rgba(0, 0, 0, 0.38);
  overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar-header {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1px 1px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
}

.brand-name {
  min-width: 0;
  color: rgba(255, 255, 255, 0.94);
  font-family: "Google Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
}

.admin-nav-button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 46px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(118, 162, 255, 0.16);
  border-radius: 15px;
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 171, 255, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(29, 49, 92, 0.64), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.admin-nav-button[hidden] {
  display: none;
}

.admin-nav-button::before {
  content: "";
  position: absolute;
  inset: -55% -70%;
  background: linear-gradient(105deg, transparent 24%, rgba(134, 180, 255, 0.22), transparent 58%);
  opacity: 0;
  transform: translateX(-62%);
  transition: opacity 220ms ease, transform 720ms ease;
  pointer-events: none;
}

.admin-nav-button:hover,
.admin-nav-button:focus-visible,
.admin-nav-button.active {
  border-color: rgba(142, 188, 255, 0.34);
  background:
    radial-gradient(circle at 18% 18%, rgba(116, 171, 255, 0.3), transparent 34%),
    linear-gradient(135deg, rgba(34, 59, 111, 0.82), rgba(255, 255, 255, 0.06));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.14),
    0 18px 38px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.admin-nav-button:hover::before,
.admin-nav-button:focus-visible::before,
.admin-nav-button.active::before {
  opacity: 1;
  transform: translateX(68%);
}

.admin-nav-button span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
  place-items: center;
  text-align: center;
}

.admin-nav-button strong {
  overflow: hidden;
  color: rgba(247, 250, 255, 0.96);
  font-size: 0.9rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rate-limit-open {
  overflow: hidden;
}

.rate-limit-modal[hidden],
.attachment-limit-modal[hidden],
.admin-reply-modal[hidden],
.admin-warn-modal[hidden],
.unsafe-user-modal[hidden],
.unsafe-warning-modal[hidden],
.contact-reply-modal[hidden] {
  display: none;
}

.rate-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 22px;
}

.rate-limit-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.055), transparent 30%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: modalBackdropIn 220ms ease both;
}

.rate-limit-dialog {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(430px, 100%);
  padding: 26px 22px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.09), transparent 44%),
    linear-gradient(180deg, rgba(22, 22, 27, 0.96), rgba(7, 7, 10, 0.94));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 30px 110px rgba(0, 0, 0, 0.68);
  overflow: hidden;
  animation: modalPanelIn 340ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.rate-limit-dialog::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 32%, rgba(255, 255, 255, 0.055));
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}

.rate-limit-dialog > * {
  position: relative;
  z-index: 1;
}

.rate-limit-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.075);
  transition: background 160ms ease, transform 160ms ease;
}

.rate-limit-close:hover,
.rate-limit-close:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.04);
}

.rate-limit-warning-icon {
  display: block;
  width: 54px;
  height: 54px;
  background: #c9cbd2;
  mask: url("../icon_library/warning.png") center / contain no-repeat;
  -webkit-mask: url("../icon_library/warning.png") center / contain no-repeat;
}

.attachment-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  padding: 20px;
}

.attachment-limit-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(15px) saturate(1.08);
  -webkit-backdrop-filter: blur(15px) saturate(1.08);
  animation: modalBackdropIn 220ms ease both;
}

.attachment-limit-dialog {
  position: relative;
  display: grid;
  gap: 22px;
  width: min(500px, calc(100vw - 30px));
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 0, rgba(112, 142, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(30, 31, 39, 0.98), rgba(11, 12, 17, 0.97));
  color: #fff;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 34px 110px rgba(0, 0, 0, 0.68);
  overflow: hidden;
  animation: modalPanelIn 340ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.attachment-limit-dialog::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 30%, rgba(102, 138, 255, 0.16));
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 1px;
}

.attachment-limit-dialog > * {
  position: relative;
  z-index: 1;
}

.attachment-limit-copy {
  display: grid;
  gap: 11px;
}

.attachment-limit-kicker {
  margin: 0;
  color: rgba(180, 194, 255, 0.86);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attachment-limit-copy h2 {
  max-width: 10ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 850;
  line-height: 0.96;
}

.attachment-limit-copy p:not(.attachment-limit-kicker) {
  margin: 0;
  color: rgba(235, 237, 248, 0.78);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.55;
}

.attachment-limit-ok {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(88, 101, 255, 0.98), rgba(60, 144, 255, 0.98)),
    var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  box-shadow:
    0 18px 48px rgba(59, 103, 255, 0.28),
    inset 0 1px rgba(255, 255, 255, 0.3);
  transition:
    filter 170ms ease,
    transform 170ms ease;
}

.attachment-limit-ok:hover,
.attachment-limit-ok:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
  outline: 2px solid rgba(126, 156, 255, 0.9);
  outline-offset: 3px;
}

.admin-reply-modal,
.admin-warn-modal,
.unsafe-user-modal,
.unsafe-warning-modal,
.contact-reply-modal {
  position: fixed;
  inset: 0;
  z-index: 29;
  display: grid;
  place-items: center;
  padding: 20px;
}

.admin-reply-backdrop,
.admin-warn-backdrop,
.unsafe-user-backdrop,
.unsafe-warning-backdrop,
.contact-reply-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  animation: modalBackdropIn 220ms ease both;
}

.admin-reply-dialog,
.admin-warn-dialog,
.unsafe-user-dialog,
.unsafe-warning-dialog,
.contact-reply-dialog {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(560px, calc(100vw - 30px));
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 14% 0, rgba(71, 126, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(31, 32, 40, 0.98), rgba(12, 13, 18, 0.97));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 34px 110px rgba(0, 0, 0, 0.68);
  animation: modalPanelIn 320ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.unsafe-warning-dialog {
  width: min(520px, calc(100vw - 30px));
  border-color: rgba(255, 255, 255, 0.12);
  background: #050507;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 34px 120px rgba(0, 0, 0, 0.78);
}

.admin-reply-close,
.admin-warn-close,
.unsafe-user-close,
.contact-reply-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  transition: background 160ms ease, transform 160ms ease;
}

.admin-reply-close:hover,
.admin-reply-close:focus-visible,
.admin-warn-close:hover,
.admin-warn-close:focus-visible,
.unsafe-user-close:hover,
.unsafe-user-close:focus-visible,
.contact-reply-close:hover,
.contact-reply-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.04);
}

.admin-reply-kicker,
.admin-warn-kicker,
.unsafe-user-kicker,
.unsafe-warning-kicker,
.contact-reply-kicker {
  margin: 0 0 6px;
  color: rgba(145, 174, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-reply-dialog h2,
.admin-warn-dialog h2,
.unsafe-user-dialog h2,
.unsafe-warning-dialog h2,
.contact-reply-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.75rem, 5vw, 2.45rem);
  line-height: 1.04;
}

#adminReplyMeta,
#adminWarnMeta,
#unsafeWarningText,
.mobile-admin-message,
#contactReplyText {
  margin: 8px 0 0;
  color: rgba(235, 237, 248, 0.8);
  font-size: 0.96rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

#adminReplyInput,
#adminWarnInput {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  outline: 0;
  padding: 14px 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
}

#adminReplyInput:focus,
#adminWarnInput:focus {
  border-color: rgba(116, 164, 255, 0.56);
  box-shadow: 0 0 0 1px rgba(116, 164, 255, 0.15);
}

.admin-reply-actions,
.admin-warn-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.admin-reply-secondary,
.admin-reply-primary,
.admin-warn-secondary,
.admin-warn-primary,
.unsafe-user-ok,
.unsafe-warning-ok,
.contact-reply-ok {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 820;
  transition:
    background 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.admin-reply-secondary,
.admin-warn-secondary {
  color: rgba(244, 246, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
}

.admin-reply-primary,
.admin-warn-primary,
.unsafe-user-ok,
.unsafe-warning-ok,
.contact-reply-ok {
  color: #fff;
  background: #2378ff;
}

.admin-reply-secondary:hover,
.admin-reply-primary:hover,
.admin-warn-secondary:hover,
.admin-warn-primary:hover,
.unsafe-user-ok:hover,
.unsafe-warning-ok:hover,
.contact-reply-ok:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.unsafe-warning-blocked {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(255, 94, 113, 0.2);
  border-radius: 18px;
  background: rgba(255, 60, 80, 0.08);
}

.unsafe-warning-blocked span {
  color: rgba(255, 184, 194, 0.76);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unsafe-warning-blocked p {
  max-height: min(34vh, 260px);
  margin: 0;
  overflow: auto;
  color: #ff8a98;
  font-size: 0.95rem;
  font-weight: 760;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.unsafe-user-header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.unsafe-user-header img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe7ff;
}

.unsafe-user-header > div {
  min-width: 0;
}

.unsafe-user-header h2,
.unsafe-user-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unsafe-user-header span {
  display: block;
  margin-top: 5px;
  color: rgba(231, 236, 255, 0.68);
  font-size: 0.86rem;
  font-weight: 650;
}

.unsafe-user-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.unsafe-user-details > div {
  display: grid;
  grid-template-columns: minmax(96px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.unsafe-user-details dt,
.unsafe-user-details dd {
  margin: 0;
  min-width: 0;
}

.unsafe-user-details dt {
  color: rgba(215, 224, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
}

.unsafe-user-details dd {
  overflow: hidden;
  color: rgba(248, 250, 255, 0.94);
  font-size: 0.84rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-reply-admin {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-right: 44px;
}

.contact-reply-admin img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe7ff;
}

.contact-reply-admin div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-reply-admin span,
.contact-reply-admin small {
  color: rgba(222, 228, 248, 0.62);
  font-size: 0.74rem;
  font-weight: 700;
}

.contact-reply-admin strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-reply-original {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.contact-reply-original button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  color: rgba(242, 245, 255, 0.9);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 850;
}

.contact-reply-original img {
  width: 18px;
  height: 18px;
  opacity: 0.88;
}

.contact-reply-original p {
  margin: 0;
  color: rgba(232, 236, 255, 0.76);
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.captcha-slot {
  --captcha-edge-crop: 3px;
  --captcha-bottom-crop: 4px;
  position: relative;
  display: flex;
  width: calc(304px - (var(--captcha-edge-crop) * 2));
  max-width: 100%;
  height: calc(78px - var(--captcha-edge-crop) - var(--captcha-bottom-crop));
  min-height: calc(78px - var(--captcha-edge-crop) - var(--captcha-bottom-crop));
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #222;
  overflow: hidden;
  line-height: 0;
}

.captcha-slot[data-captcha-state="loading"],
.captcha-slot[data-captcha-state="error"] {
  display: grid;
  width: 100%;
  height: auto;
  min-height: 78px;
  justify-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  line-height: normal;
}

.captcha-widget-clip {
  flex: 0 0 auto;
  width: 304px;
  height: 78px;
  overflow: visible;
  transform: translate(calc(var(--captcha-edge-crop) * -1), calc(var(--captcha-edge-crop) * -1));
  transform-origin: top left;
}

.captcha-widget-clip > div,
.captcha-widget-clip iframe {
  display: block;
  border: 0 !important;
}

.captcha-slot[data-captcha-state="loading"] .captcha-widget-clip,
.captcha-slot[data-captcha-state="error"] .captcha-widget-clip {
  display: none;
}

.captcha-slot[data-captcha-state="loading"]::before,
.captcha-slot[data-captcha-state="error"]::before {
  content: attr(data-captcha-message);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 720;
  text-align: center;
}

.captcha-slot[data-captcha-state="loading"]::after {
  content: "";
  width: 17px;
  height: 17px;
  margin-left: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  animation: spinner-c7wet2 820ms linear infinite;
}

.captcha-slot[data-captcha-state="error"] {
  border-color: rgba(255, 126, 126, 0.28);
  background: rgba(255, 70, 70, 0.1);
}

.captcha-slot.danger[data-captcha-state="loading"],
.captcha-slot.danger[data-captcha-state="error"] {
  border-color: rgba(255, 118, 118, 0.18);
  background: rgba(30, 0, 0, 0.14);
}

.captcha-slot[hidden],
.captcha-slot.captcha-disabled {
  display: none;
}

.rate-limit-dialog-copy {
  display: grid;
  gap: 8px;
  max-width: 330px;
  text-align: center;
}

.rate-limit-dialog h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  line-height: 1.05;
}

.rate-limit-dialog-copy p:last-child {
  margin: 0;
  color: rgba(232, 232, 240, 0.72);
  line-height: 1.55;
  white-space: pre-line;
}

.rate-limit-countdown-card {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 150px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.24);
}

.rate-limit-countdown-card span {
  color: #fff;
  font-size: 3.3rem;
  font-weight: 820;
  line-height: 0.96;
  letter-spacing: 0;
}

.rate-limit-countdown-card small {
  color: rgba(232, 232, 240, 0.58);
  font-size: 0.78rem;
  font-weight: 650;
}

.rate-limit-dialog-meter {
  width: min(290px, 100%);
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rate-limit-dialog-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0.96));
  transform-origin: left center;
  transform: scaleX(var(--rate-popup-fill, 1));
  transition: transform 280ms linear;
}

.rate-limit-ok {
  min-width: 130px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-weight: 760;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  transition: background 160ms ease, transform 160ms ease;
}

.rate-limit-ok:hover,
.rate-limit-ok:focus-visible {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-1px);
}

.add-chat-button,
.attach-button,
.send-button,
.message-copy-button {
  display: inline-grid;
  place-items: center;
}

.ui-icon {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: brightness(0) invert(1);
}

.new-chat-icon {
  width: 14px;
  height: 14px;
}

.attach-icon {
  width: 14px;
  height: 14px;
}

.send-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1) !important;
}

.file-input {
  display: none;
}

.x-icon {
  width: 12px;
  height: 12px;
  opacity: 1;
  filter: brightness(0) invert(1) !important;
}

.chats-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  margin-top: 8px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 2px 2px;
}

.panel-heading p {
  margin: 0;
  color: rgba(217, 220, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.add-chat-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 0;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(88, 101, 255, 0.95), rgba(61, 139, 255, 0.95)),
    var(--accent);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  box-shadow:
    0 9px 22px rgba(68, 90, 255, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.28);
  overflow: hidden;
  transition:
    box-shadow 400ms ease,
    transform 400ms ease,
    filter 400ms ease;
}

.add-chat-button::after {
  content: none;
}

.add-chat-button:hover {
  filter: brightness(1.08);
  box-shadow:
    0 13px 30px rgba(68, 90, 255, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.34);
  transform: translateY(-1px) scale(1.02);
}

.chat-search {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 34px;
  width: 100%;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 10px 30px rgba(0, 0, 0, 0.18);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.chat-search:focus-within {
  border-color: rgba(255, 255, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 34px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.chat-search-icon {
  width: 14px;
  height: 14px;
  opacity: 0.68;
  transition: opacity 160ms ease, transform 160ms ease;
}

.chat-search:focus-within .chat-search-icon {
  opacity: 1;
  transform: scale(1.06);
}

.chat-search input {
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
}

.chat-search input::placeholder {
  color: rgba(180, 180, 180, 0.68);
}

.chat-search input::-webkit-search-cancel-button {
  appearance: none;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.chat-list,
.chat-log {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chat-list::-webkit-scrollbar,
.chat-log::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.rate-limit-panel {
  position: relative;
  display: grid;
  align-self: end;
  grid-template-rows: auto auto auto;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 14px;
  border: 2px solid #0095ff;
  border-radius: 16px;
  background: #2d4883;
  box-shadow: none;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.rate-limit-refresh {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.rate-limit-refresh:hover,
.rate-limit-refresh:focus-visible {
  background: rgba(255, 255, 255, 0.055);
}

.rate-limit-refresh:active {
  transform: scale(0.92);
}

.rate-limit-refresh:disabled {
  cursor: default;
}

.rate-limit-refresh img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.48;
  transition: opacity 180ms ease, filter 180ms ease;
}

.rate-limit-refresh:hover img,
.rate-limit-refresh:focus-visible img {
  opacity: 0.68;
}

.rate-limit-refresh.refreshing img {
  animation: rate-limit-refresh-spin 760ms cubic-bezier(0.32, 0.72, 0.18, 1) both;
}

@keyframes rate-limit-refresh-spin {
  0% { transform: rotate(0deg) scale(1); }
  16% { transform: rotate(38deg) scale(0.88); }
  48% { transform: rotate(205deg) scale(1.09); }
  74% { transform: rotate(318deg) scale(0.96); }
  90% { transform: rotate(354deg) scale(1.025); }
  100% { transform: rotate(360deg) scale(1); }
}

.rate-limit-panel.limited {
  border-color: rgba(255, 88, 88, 0.42);
  background: #241013;
}

.rate-limit-copy {
  display: grid;
  gap: 4px;
  min-height: 0;
  padding-right: 34px;
}

.rate-limit-copy span,
.rate-limit-panel p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.rate-limit-copy span {
  color: rgba(236, 236, 242, 0.64);
}

.rate-limit-panel p {
  color: #fff;
  font-size: 0.84rem;
  line-height: 1.25;
}

.rate-limit-copy strong {
  color: #f7f7ff;
  font-size: 1.72rem;
  line-height: 1;
  white-space: nowrap;
}

.rate-limit-track {
  position: relative;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.rate-limit-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(235, 235, 245, 0.82), rgba(255, 255, 255, 0.96));
  box-shadow: none;
  transform-origin: left center;
  transform: scaleX(var(--rate-fill, 1));
  transition:
    transform 360ms cubic-bezier(0.2, 0.9, 0.2, 1),
    background 180ms ease;
}

.rate-limit-panel.limited .rate-limit-track span {
  background: linear-gradient(90deg, #ff6b6b, #ffb36b);
}

.rate-limit-panel.limited .rate-limit-track {
  background: rgba(255, 118, 118, 0.22);
}

.sidebar-footer {
  align-self: end;
  display: grid;
  gap: 9px;
  width: 100%;
}

.contact-us-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  color: #fff;
  background: #2378ff;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  transition:
    background 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.contact-us-button:hover,
.contact-us-button:focus-visible {
  background: #3287ff;
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.contact-us-button[hidden] {
  display: none;
}

.sidebar-legal-links {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  color: #62a2ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.sidebar-legal-links div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.sidebar-legal-links a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.sidebar-legal-links a:hover,
.sidebar-legal-links a:focus-visible {
  color: #9bc5ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px 26px;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 5px 4px 5px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transition:
    border-color 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease,
    transform 170ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.project-group {
  display: grid;
  gap: 3px;
  margin-bottom: 5px;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 26px);
  align-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 3px 4px 3px 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: background 160ms ease, border-color 160ms ease;
}

.project-row.has-reconnect-action {
  grid-template-columns: minmax(0, 1fr) repeat(4, 26px);
}

.project-row:hover,
.project-row:focus-within {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.075);
}

.project-label {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px 0;
  background: transparent;
  color: #ededf2;
  text-align: left;
}

.project-label strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-folder {
  grid-row: auto;
}

.reconnect-project-action img {
  filter: brightness(0) invert(78%);
}

.project-folder {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(72%);
}

.project-action {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
}

.project-action img {
  width: 13px;
  height: 13px;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

.project-row:hover .project-action,
.project-row:focus-within .project-action,
.project-action:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.project-action:hover { background: rgba(126, 156, 255, 0.14); }
.delete-project-action:hover { background: rgba(255, 107, 107, 0.13); }
.project-action:disabled { opacity: 0.18; cursor: not-allowed; }

.project-tasks {
  display: grid;
  gap: 2px;
  padding-left: 24px;
}

.task-item {
  min-height: 38px;
  border-radius: 9px;
  clip-path: inset(0 round 9px);
  isolation: isolate;
}

.task-item::before { border-radius: inherit; }

.task-item .chat-title { font-size: 0.82rem; }

.task-item.running .chat-meta {
  color: #9fc3ff;
}

.task-item.running .chat-meta::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #75a7ff;
  box-shadow: 0 0 0 3px rgba(117, 167, 255, 0.14);
  animation: task-running-pulse 1.4s ease-in-out infinite;
}

@keyframes task-running-pulse {
  50% { opacity: 0.42; }
}

.empty-project-tasks {
  padding: 7px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  font-size: 0.76rem;
  text-align: left;
}

.empty-project-tasks:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e7e7e7;
}

.chat-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 50%, rgba(88, 101, 255, 0.2), transparent 46%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 170ms ease, transform 170ms ease;
  pointer-events: none;
}

.chat-item:hover,
.chat-item:focus-within,
.chat-item.active {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.08);
  transform: none;
}

.chat-item:hover::before,
.chat-item:focus-within::before,
.chat-item.active::before {
  opacity: 1;
  transform: translateX(0);
}

.chat-open-button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
  z-index: 1;
}

.chat-title {
  overflow: hidden;
  color: #e7e7e7;
  font-size: 0.79rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-meta {
  overflow: hidden;
  color: var(--subtle);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rename-chat-button,
.delete-chat-button,
.rename-chat-cancel-button,
.rename-chat-save-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  z-index: 1;
  border-radius: 50%;
  background: transparent;
  color: var(--subtle);
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease, color 150ms ease;
}

.rename-chat-button img,
.delete-chat-button img,
.rename-chat-cancel-button img,
.rename-chat-save-button img {
  width: 13px;
  height: 13px;
  filter: brightness(0) invert(1);
  opacity: 0.72;
}

.chat-item:hover .delete-chat-button,
.chat-item:hover .rename-chat-button,
.chat-item:hover .rename-chat-cancel-button,
.chat-item:hover .rename-chat-save-button,
.chat-item:focus-within .delete-chat-button,
.chat-item:focus-within .rename-chat-button,
.chat-item:focus-within .rename-chat-cancel-button,
.chat-item:focus-within .rename-chat-save-button,
.chat-item.renaming .delete-chat-button,
.chat-item.renaming .rename-chat-button,
.chat-item.renaming .rename-chat-cancel-button,
.chat-item.renaming .rename-chat-save-button,
.rename-chat-button:focus-visible,
.delete-chat-button:focus-visible,
.rename-chat-cancel-button:focus-visible,
.rename-chat-save-button:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.rename-chat-button:hover {
  background: rgba(126, 156, 255, 0.14);
  color: #dfe6ff;
}

.delete-chat-button:hover {
  background: rgba(255, 107, 107, 0.12);
  color: #ff8f8f;
}

.delete-chat-button,
.delete-project-action {
  overflow: hidden;
}

.sidebar-x-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  overflow: hidden;
  color: #fff;
  pointer-events: none;
}

.sidebar-x-icon::before,
.sidebar-x-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 1px;
  width: 14px;
  height: 2.25px;
  border-radius: 2px;
  background: #fff;
  opacity: 1;
}

.sidebar-x-icon::before { transform: rotate(45deg); }
.sidebar-x-icon::after { transform: rotate(-45deg); }

.rename-chat-cancel-button:hover {
  background: rgba(255, 107, 107, 0.12);
  color: #ff8f8f;
}

.rename-chat-save-button:hover {
  background: rgba(115, 235, 177, 0.14);
  color: #baf8d9;
}

.chat-rename-form {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.chat-rename-input {
  width: 100%;
  height: 30px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  outline: 0;
  padding: 0 9px;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 650;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(88, 101, 255, 0.12);
}

.chat-rename-input:focus {
  border-color: rgba(170, 188, 255, 0.72);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 3px rgba(88, 101, 255, 0.18);
}

.empty-chat-list {
  padding: 8px;
  color: var(--subtle);
  font-size: 0.78rem;
}

.main-area {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
  transition: padding-right 360ms cubic-bezier(0.2, 0.82, 0.2, 1);
}

body.workspace-editor-is-open .main-area {
  padding-right: calc(var(--workspace-editor-width) + 10px);
}

.top-bar,
.chat-panel {
  position: relative;
  z-index: 2;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
}

.message-search {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: min(340px, 38vw);
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.18);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.message-search:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 12px 30px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.message-search-icon {
  width: 14px;
  height: 14px;
  opacity: 0.72;
  transition: opacity 160ms ease, transform 160ms ease;
}

.message-search:focus-within .message-search-icon {
  opacity: 1;
  transform: scale(1.06);
}

.message-search input {
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
}

.message-search input::placeholder {
  color: rgba(180, 180, 180, 0.68);
}

.message-search input::-webkit-search-cancel-button {
  appearance: none;
}

.message-search-count {
  min-width: 24px;
  color: var(--subtle);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chat-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.main-area.admin-mode .chat-panel,
.main-area.admin-mode .message-search {
  display: none;
}

.admin-portal {
  position: relative;
  z-index: 2;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.admin-portal[hidden] {
  display: none;
}

.admin-portal-scroll {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 16px;
  width: min(1080px, calc(100vw - 320px));
  height: 100%;
  margin: 0 auto;
  padding: 28px 0 52px;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.admin-portal-scroll::-webkit-scrollbar {
  display: none;
}

.admin-panel,
.admin-action-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(17, 18, 24, 0.82);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.07),
    0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-panel h2 {
  margin: 4px 0 0;
  color: #f7f9ff;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.admin-action-card button,
.admin-mini-action {
  display: inline-grid;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(245, 248, 255, 0.92);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 750;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.admin-action-card button:hover,
.admin-mini-action:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.admin-mini-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.admin-mini-action:disabled:hover {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  transform: none;
}

.admin-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-radius: 18px;
}

.admin-availability-panel,
.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-panel-heading > span {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  place-items: center;
  color: rgba(245, 248, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-heading-actions > span {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  place-items: center;
  color: rgba(245, 248, 255, 0.9);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-heading-icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  place-items: center;
  background: rgba(255, 255, 255, 0.065);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.admin-heading-icon-button img,
.admin-account-search img {
  width: 15px;
  height: 15px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.admin-heading-icon-button:hover,
.admin-heading-icon-button:focus-visible,
.admin-heading-icon-button.active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.admin-account-search {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.admin-account-search[hidden] {
  display: none;
}

.admin-account-search:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.065);
}

.admin-account-search input {
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
}

.admin-account-search input::placeholder {
  color: rgba(232, 236, 255, 0.48);
}

.admin-availability-panel > div > span {
  display: inline-block;
  margin-top: 6px;
  color: rgba(225, 231, 255, 0.64);
  font-size: 0.82rem;
}

.admin-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.admin-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.admin-switch span {
  position: relative;
  width: 58px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 87, 87, 0.16);
  transition: background 180ms ease, border-color 180ms ease;
}

.admin-switch span::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease;
}

.admin-switch input:checked + span {
  border-color: rgba(94, 230, 132, 0.38);
  background: rgba(81, 211, 116, 0.22);
}

.admin-switch input:checked + span::before {
  transform: translateX(26px);
}

.admin-switch strong {
  min-width: 84px;
  color: #fff;
  font-size: 0.84rem;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 16px;
  min-width: 0;
}

.admin-list,
.admin-ban-list,
.admin-contact-list,
.admin-unsafe-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.admin-account-row,
.admin-ban-row,
.admin-contact-row,
.admin-unsafe-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-account-row {
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.admin-list.compact .admin-account-row {
  grid-template-columns: 36px minmax(0, 1fr);
}

.admin-contact-row {
  align-items: stretch;
  padding: 14px;
  gap: 12px;
}

.admin-unsafe-list {
  max-height: 388px;
  overflow: auto;
  padding-right: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.admin-unsafe-list::-webkit-scrollbar {
  display: none;
}

.admin-unsafe-row {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  min-height: 88px;
  padding: 12px;
}

.admin-unsafe-identity {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-unsafe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.admin-unsafe-header strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-unsafe-message {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #ff6d7a;
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.45;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.admin-unsafe-meta {
  color: rgba(226, 232, 255, 0.58);
  font-size: 0.72rem;
  font-weight: 650;
}

.admin-unsafe-actions {
  margin-top: 2px;
}

.admin-contact-row-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.admin-contact-row-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-contact-row-header strong {
  color: #fff;
  font-size: 0.92rem;
}

.admin-contact-row-header span,
.admin-contact-message,
.admin-contact-file span,
.admin-contact-reply-preview {
  color: rgba(218, 225, 255, 0.66);
  font-size: 0.78rem;
  line-height: 1.45;
}

.admin-contact-status {
  flex: 0 0 auto;
  display: inline-grid;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  place-items: center;
  color: rgba(245, 248, 255, 0.92) !important;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.68rem !important;
  font-weight: 850;
}

.admin-contact-row[data-status="replied"] .admin-contact-status {
  color: #d9ffea !important;
  background: rgba(72, 216, 123, 0.15);
}

.admin-contact-row[data-status="ignored"] .admin-contact-status {
  color: rgba(235, 236, 242, 0.74) !important;
  background: rgba(255, 255, 255, 0.055);
}

.admin-contact-message {
  margin: 0;
  color: rgba(244, 246, 255, 0.88);
  white-space: pre-wrap;
}

.admin-contact-file {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.admin-contact-file strong {
  color: #fff;
  font-size: 0.82rem;
}

.admin-contact-file img {
  display: block;
  width: min(320px, 100%);
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.28);
}

.admin-contact-file pre {
  max-height: 180px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: rgba(241, 244, 255, 0.86);
  font: 700 0.74rem/1.48 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.admin-contact-file pre::-webkit-scrollbar {
  display: none;
}

.admin-contact-reply-preview {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid rgba(117, 165, 255, 0.52);
  color: rgba(224, 232, 255, 0.74);
}

.admin-avatar {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #dfe7ff;
}

.admin-account-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-account-copy strong,
.admin-account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-copy strong {
  color: #fff;
  font-size: 0.88rem;
}

.admin-account-copy span,
.admin-ban-row span {
  color: rgba(218, 225, 255, 0.62);
  font-size: 0.73rem;
}

.admin-badges,
.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-badge {
  display: inline-grid;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  place-items: center;
  color: rgba(241, 246, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.66rem;
  font-weight: 800;
}

.admin-badge.admin {
  color: #deecff;
  background: rgba(83, 144, 255, 0.18);
}

.admin-badge.rate-limit {
  color: #f3f6ff;
  background: rgba(255, 255, 255, 0.11);
}

.admin-badge.banned {
  color: #ffd8e2;
  background: rgba(255, 82, 112, 0.17);
}

.admin-mini-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.7rem;
}

.admin-mini-action.danger,
.admin-action-card.danger button {
  border-color: rgba(255, 108, 108, 0.26);
  color: #ffd9d9;
  background: rgba(255, 70, 70, 0.11);
}

.admin-actions-shell {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-action-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
}

.admin-action-card button {
  align-self: end;
  min-height: 38px;
  height: 38px;
}

.admin-action-card h3 {
  margin: 0;
  color: #fff;
  font-size: 0.92rem;
}

.admin-action-card input,
.admin-action-card textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 0.82rem;
}

.admin-action-card input {
  height: 38px;
  padding: 0 11px;
}

.admin-action-card textarea {
  resize: vertical;
  min-height: 76px;
  padding: 10px 11px;
}

.admin-action-card input:focus,
.admin-action-card textarea:focus {
  border-color: rgba(132, 183, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(132, 183, 255, 0.14);
}

.admin-status-message {
  min-height: 18px;
  margin: 0;
  color: rgba(222, 230, 255, 0.72);
  font-size: 0.8rem;
}

.admin-status-message.error {
  color: #ffaaaa;
}

.empty-admin-list {
  margin: 0;
  padding: 8px 2px;
  color: rgba(218, 225, 255, 0.54);
  font-size: 0.8rem;
}

.chat-log {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(820px, calc(100% - 28px));
  container-type: inline-size;
  min-height: 0;
  max-height: 100%;
  margin: 0 auto;
  padding: 42px 0 96px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-padding-bottom: 96px;
  scroll-behavior: smooth;
}

.empty-state {
  position: absolute;
  left: 50%;
  top: 40%;
  display: grid;
  width: calc(100% - 16px);
  opacity: 1;
  transform: translate(-50%, -50%);
  place-items: center;
  pointer-events: none;
}

.empty-state.hidden {
  opacity: 0;
}

.empty-state h1 {
  margin: 0;
  color: #f1f1f1;
  font-family: "Google Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 3.22rem;
  font-size: clamp(2rem, 6cqi, 3.22rem);
  font-weight: 500;
  line-height: 1.2;
  opacity: 1;
  text-align: center;
  transform: translateY(0);
  white-space: nowrap;
}

.welcome-word {
  display: inline-block;
  opacity: 1;
}

.message {
  display: grid;
  gap: 6px;
  width: 100%;
  animation: messageIn 160ms ease both;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 16px;
  color: var(--subtle);
  font-size: 0.68rem;
}

.source {
  display: none;
}

.message.user .message-meta {
  justify-content: flex-end;
  padding-right: 4px;
}

.message.learny .message-meta {
  padding-left: 4px;
}

.bubble {
  position: relative;
  max-width: min(680px, 76%);
  margin: 0;
  color: #f4f4f4;
  font-size: 0.95rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.bubble-text,
.thought-time {
  display: block;
}

.message-footer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--subtle);
}

.message.user .message-footer {
  justify-content: flex-end;
  width: 100%;
}

.message.user .user-message-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.user-message-footer-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.user-message-sent-time {
  display: block;
  align-self: flex-start;
  width: 100%;
  margin-top: 1px;
  color: rgba(232, 232, 240, 0.48);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  text-align: left;
}

.message-text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: rgba(236, 236, 236, 0.78);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.message-text-action:hover,
.message-text-action:focus-visible,
.message-text-action.copied {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.message-text-action:disabled {
  cursor: default;
  opacity: 0.36;
  pointer-events: none;
  transform: none;
}

.message-action-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 1;
  filter: brightness(0) invert(1);
}

.message-delete-button:hover,
.message-delete-button:focus-visible {
  border-color: rgba(255, 116, 116, 0.38);
  color: #ffd9d9;
  background: rgba(255, 84, 84, 0.12);
}

.message-edit-form {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: min(480px, 68vw);
  padding: 4px;
  border-radius: 18px;
  isolation: isolate;
  animation: editSurfaceIn 260ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.message-edit-form::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(115, 234, 255, 0.72), rgba(107, 105, 255, 0.4), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.04);
  opacity: 0.62;
  filter: blur(0.5px);
  animation: editGlowDrift 2.8s ease-in-out infinite alternate;
}

.message-edit-input {
  width: 100%;
  min-height: 96px;
  max-height: 260px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  outline: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045)),
    rgba(16, 17, 22, 0.94);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 18px 44px rgba(0, 0, 0, 0.34);
  font: inherit;
  line-height: 1.45;
}

.message-edit-input:focus {
  border-color: rgba(130, 235, 255, 0.58);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(130, 235, 255, 0.16),
    0 22px 52px rgba(0, 0, 0, 0.38);
}

.message-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.message-edit-actions button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  place-items: center;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.message-edit-action-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.message-edit-cancel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(245, 245, 245, 0.82);
  background: rgba(255, 255, 255, 0.06);
}

.message-edit-save {
  border: 1px solid rgba(135, 234, 255, 0.38);
  color: #fff;
  background: linear-gradient(135deg, rgba(74, 153, 255, 0.9), rgba(108, 101, 255, 0.86));
  box-shadow: 0 12px 26px rgba(58, 118, 255, 0.28);
}

.message-edit-actions button:hover,
.message-edit-actions button:focus-visible {
  transform: translateY(-1px);
}

.markdown-body {
  min-width: 0;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body p {
  margin: 0 0 0.76em;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 0.08em 0 0.42em;
  color: #fff;
  font-weight: 720;
  line-height: 1.18;
}

.markdown-body h1 {
  font-size: 1.32rem;
}

.markdown-body h2 {
  font-size: 1.18rem;
}

.markdown-body h3 {
  font-size: 1.06rem;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 0.98rem;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.42em 0 0.78em;
  padding-left: 1.24rem;
}

.markdown-body li {
  margin: 0.22em 0;
  padding-left: 0.08rem;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin: 0.28em 0 0.28em;
}

.markdown-body blockquote {
  margin: 0.62em 0 0.78em;
  padding: 0.18em 0 0.18em 0.82rem;
  border-left: 3px solid rgba(118, 132, 255, 0.66);
  color: rgba(242, 242, 255, 0.8);
}

.markdown-body blockquote p {
  margin-bottom: 0.48em;
}

.markdown-body a {
  color: #62a8ff;
  font-weight: 750;
  text-decoration: none;
}

.markdown-body a:hover,
.markdown-body a:focus-visible {
  color: #91c5ff;
  text-decoration: none;
}

.markdown-body a:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(98, 168, 255, 0.72);
  outline-offset: 2px;
}

.markdown-body code {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.075);
  color: #f4f5ff;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  overflow-wrap: anywhere;
  padding: 0.12em 0.34em;
}

.markdown-body pre {
  max-width: 100%;
  margin: 0.58em 0 0.84em;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.42);
  overflow-x: auto;
}

.markdown-body pre code {
  display: block;
  border: 0;
  background: transparent;
  color: #f5f5f5;
  font-size: 0.82rem;
  line-height: 1.52;
  overflow-wrap: normal;
  padding: 0;
  white-space: pre;
}

.markdown-body .markdown-table-wrap {
  max-width: 100%;
  margin: 0.64em 0 0.84em;
  overflow-x: auto;
}

.markdown-body table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  color: #f4f4f4;
  font-size: 0.88rem;
}

.markdown-body th,
.markdown-body td {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  vertical-align: top;
}

.markdown-body th {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 720;
}

.markdown-body tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.035);
}

.markdown-body hr {
  height: 1px;
  margin: 0.84em 0;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
}

.markdown-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.58em 0;
  border-radius: 10px;
}

.task-list-item {
  display: inline-grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.task-list-entry {
  margin-left: -1.08rem;
  list-style: none;
}

.task-list-item input {
  width: 14px;
  height: 14px;
  margin: 0.34em 0 0;
  accent-color: var(--accent-2);
}

.message.user .bubble {
  justify-self: end;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--user-bubble);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.message.learny .bubble {
  justify-self: start;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: var(--learny-bubble);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 10px 28px rgba(0, 0, 0, 0.26);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.message.learny .thought-time {
  max-height: none;
  margin-top: 0;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.35;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
}

.message.learny .workspace-run-count {
  color: rgba(222, 222, 230, 0.72);
  font-size: 0.72rem;
  line-height: 1.35;
}

.message-copy-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  opacity: 0.72;
  transition:
    background 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.message-copy-button:hover,
.message-copy-button:focus-visible,
.message-copy-button.copied {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
  transform: scale(1.06);
}

.message-resend-button:hover,
.message-resend-button:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.message-copy-button:active {
  transform: scale(0.94);
}

.message-copy-button:disabled {
  cursor: default;
}

.message-copy-icon {
  width: 15px;
  height: 15px;
}

.message.learny.word-revealing .message-footer {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
}

.message.learny.word-revealing.reveal-complete .message-footer {
  display: inline-flex;
  pointer-events: auto;
  animation: footerFadeIn 420ms ease forwards;
}

.message.learny.word-revealing .markdown-body li::marker {
  color: transparent;
  transition: color 220ms ease;
}

.message.learny.word-revealing .markdown-body li.reveal-content-visible::marker {
  color: rgba(242, 242, 255, 0.84);
}

.message.learny.word-revealing .markdown-body .task-list-item input {
  opacity: 0;
  transition: opacity 220ms ease;
}

.message.learny.word-revealing .markdown-body .task-list-item.reveal-content-visible input {
  opacity: 1;
}

.message.learny.word-revealing .markdown-body code,
.message.learny.word-revealing .markdown-body pre,
.message.learny.word-revealing .markdown-body blockquote,
.message.learny.word-revealing .markdown-body .markdown-table-wrap {
  transition:
    opacity 260ms ease,
    border-color 260ms ease,
    background-color 260ms ease;
}

.message.learny.word-revealing .markdown-body code:not(.reveal-content-visible),
.message.learny.word-revealing .markdown-body pre:not(.reveal-content-visible),
.message.learny.word-revealing .markdown-body blockquote:not(.reveal-content-visible),
.message.learny.word-revealing .markdown-body .markdown-table-wrap:not(.reveal-content-visible) {
  opacity: 0;
}

.word-fade {
  display: none;
  opacity: 0;
}

.word-fade.word-visible {
  display: inline;
  animation-name: wordFadeIn;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}

.stream-text {
  white-space: normal;
}

.stream-chunk-fade {
  display: inline-block;
  animation: streamChunkFade 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  will-change: opacity, filter, transform;
}

.message-search-match .bubble {
  box-shadow:
    0 0 0 1px rgba(174, 184, 255, 0.44),
    0 10px 28px rgba(0, 0, 0, 0.26);
}

.message-search-current .bubble {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.66),
    0 0 24px rgba(88, 101, 255, 0.22),
    0 10px 28px rgba(0, 0, 0, 0.26);
}

.message-search-dim {
  opacity: 0.38;
}

.message.is-deleting {
  pointer-events: none;
  z-index: 3;
  animation: messageGlitchDelete 850ms steps(2, end) forwards;
}

.message.is-deleting .bubble {
  overflow: hidden;
  background-color: #1c1c1f;
  animation: bubbleGlitchDelete 850ms steps(8, end) forwards;
}

.message.is-deleting .bubble-text,
.message.is-deleting .message-footer {
  animation: glitchContentDelete 850ms steps(2, end) forwards;
}

.message.is-deleting .bubble::before,
.message.is-deleting .bubble::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 10px 14px auto 14px;
  max-height: calc(100% - 20px);
  border-radius: inherit;
  color: #fff;
  background-color: #1c1c1f;
  font: inherit;
  font-weight: 760;
  line-height: 1.55;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.is-deleting .bubble::before {
  left: 11px;
  text-shadow: -2px 0 #00ffff, -6px 0 rgba(0, 255, 255, 0.22);
  animation: noiseBeforeDelete 520ms infinite linear alternate-reverse;
}

.message.is-deleting .bubble::after {
  left: 17px;
  text-shadow: 2px 0 #ff00ff, 7px 0 rgba(255, 0, 255, 0.22);
  animation: noiseAfterDelete 430ms infinite linear alternate-reverse;
}

.message.typing .bubble {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 28px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ready);
  animation: typingDot 900ms ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 140ms;
}

.typing-dot:nth-child(3) {
  animation-delay: 280ms;
}

.composer-zone {
  width: min(760px, calc(100% - 28px));
  margin: 0 auto 36px;
  flex: 0 0 auto;
}

.workspace-agent-progress .bubble {
  max-width: min(680px, 90%);
}

.workspace-agent-progress-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.workspace-agent-stream-card {
  display: block;
  width: 100%;
}

.workspace-agent-phase-stage {
  position: relative;
  display: inline-grid;
  width: max-content;
  height: 1.55em;
  overflow: hidden;
}

.workspace-agent-phase {
  position: relative;
  grid-area: 1 / 1;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: baseline;
  width: max-content;
  color: transparent;
  background: linear-gradient(
    90deg,
    #8f8f96 0%,
    #8f8f96 39%,
    #c3c3ca 45%,
    #ffffff 50%,
    #bdbdc5 56%,
    #8f8f96 63%,
    #8f8f96 100%
  );
  background-position: 100% 0;
  background-size: 250% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 0.92rem;
  font-weight: 760;
  letter-spacing: 0.01em;
  text-shadow: 0 0 12px rgba(225, 225, 235, 0.12);
  will-change: opacity, filter, transform, background-position;
  animation: workspace-agent-shine 3s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.workspace-agent-phase.is-entering {
  animation:
    workspace-agent-phase-enter 560ms cubic-bezier(0.2, 0.72, 0.2, 1) both,
    workspace-agent-shine 3s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.workspace-agent-phase.is-leaving {
  pointer-events: none;
  animation:
    workspace-agent-phase-leave 420ms cubic-bezier(0.4, 0, 0.6, 1) both,
    workspace-agent-shine 3s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.workspace-agent-dots {
  display: inline-flex;
  min-width: 1.05em;
  color: #e7e7eb;
  -webkit-text-fill-color: #e7e7eb;
}

.workspace-agent-dots span {
  opacity: 0.22;
  animation: workspace-agent-dot 1.15s ease-in-out infinite;
}

.workspace-agent-dots span:nth-child(2) { animation-delay: 160ms; }
.workspace-agent-dots span:nth-child(3) { animation-delay: 320ms; }

.workspace-agent-summary {
  display: grid;
  gap: 3px;
  color: #ededf2;
  font-size: 0.84rem;
  font-weight: 670;
}

.workspace-agent-summary small {
  color: rgba(222, 222, 230, 0.68);
  font-size: 0.74rem;
  font-weight: 580;
}

@keyframes workspace-agent-shine {
  0%, 18% { background-position: 100% 0; }
  58%, 100% { background-position: 0 0; }
}

@keyframes workspace-agent-phase-enter {
  0% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(10px);
  }
  68% {
    opacity: 1;
    filter: blur(0.2px);
    transform: translateY(-2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes workspace-agent-phase-leave {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  55% {
    opacity: 0.38;
    filter: blur(2.5px);
    transform: translateY(-4px);
  }
  100% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(-10px);
  }
}

@keyframes workspace-agent-dot {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  45% { opacity: 1; transform: translateY(-1px); }
}

.message-search[hidden] {
  display: none;
}

.chat-panel.no-active-task .composer-zone {
  display: none;
}

.attachment-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
  min-height: 0;
  margin: 0 0 8px;
  max-height: min(214px, 32vh);
  padding: 0 2px 2px;
  overflow-y: auto;
  scrollbar-width: none;
  animation: attachmentTrayIn 220ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.attachment-tray::-webkit-scrollbar {
  display: none;
}

.attachment-card {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  flex: 1 1 min(344px, 100%);
  width: min(420px, 100%);
  max-width: 100%;
  padding: 9px 9px 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: rgba(246, 246, 246, 0.94);
  background: rgba(25, 25, 27, 0.94);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.08),
    0 16px 42px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.attachment-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(31, 31, 34, 0.97);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 18px 46px rgba(0, 0, 0, 0.38);
}

.attachment-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  opacity: 0.68;
  pointer-events: none;
}

.attachment-file-icon {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.attachment-info {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attachment-name {
  overflow: hidden;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta {
  color: rgba(213, 213, 213, 0.68);
  font-size: 0.72rem;
  line-height: 1.25;
}

.attachment-remove {
  position: relative;
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.attachment-remove:hover,
.attachment-remove:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.04);
}

.attachment-remove img {
  width: 11px;
  height: 11px;
}

.composer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: start;
  gap: 6px;
  min-height: 54px;
  padding: 6px;
  border: 1px solid var(--composer-border);
  border-radius: 28px;
  background: var(--composer);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.composer:focus-within {
  border-color: rgba(126, 155, 255, 0.52);
  background: #303034;
  box-shadow:
    0 0 0 3px rgba(88, 101, 255, 0.12),
    0 16px 42px rgba(0, 0, 0, 0.36);
}

.composer-disclaimer {
  margin: 9px 0 0;
  color: rgba(232, 232, 238, 0.72);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.composer.unavailable {
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: #252525;
  opacity: 0.78;
}

.composer.unavailable *,
.composer.unavailable textarea::placeholder {
  cursor: not-allowed;
}

.attach-button,
.send-button {
  align-self: start;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  margin-top: 4px;
  padding: 0;
  border-radius: 50%;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
}

.attach-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  transition:
    border-color 300ms ease,
    background 300ms ease,
    color 300ms ease,
    transform 300ms ease;
}

.attach-button:hover,
.attach-button:focus-visible,
.composer.has-attachment .attach-button {
  border-color: #00245e;
  background: #3381ff;
  color: #000;
  transform: scale(1.1);
}

.composer textarea {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  max-height: min(240px, 34vh);
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  caret-color: #aebcff;
  font: inherit;
  line-height: 1.35;
  outline: none;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  resize: none;
  scrollbar-width: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.composer textarea::-webkit-scrollbar {
  display: none;
}

.composer textarea:disabled {
  cursor: not-allowed;
}

.composer textarea::placeholder {
  color: #a7a7a7;
}

.send-button {
  background: #676767;
  font-weight: 850;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
  transition:
    background-color 260ms ease,
    box-shadow 260ms ease,
    transform 120ms ease;
}

.send-button.has-message:not(.pause-mode) {
  background: #3381ff;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.22),
    0 8px 20px rgba(51, 129, 255, 0.22);
}

.send-button.pause-mode {
  background: rgba(255, 255, 255, 0.16);
}

.send-button:hover {
  background: #7a7a7a;
}

.send-button.has-message:not(.pause-mode):hover {
  background: #5596ff;
}

.send-button.pause-mode:hover {
  background: rgba(255, 255, 255, 0.24);
}

.send-button:active {
  transform: scale(0.96);
}

.send-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.message-attachment {
  display: inline-grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: min(260px, 100%);
  max-width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.052);
}

.message-attachment-icon {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.message-attachment-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.message-attachment-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-attachment-meta {
  color: rgba(220, 220, 220, 0.58);
  font-size: 0.68rem;
  line-height: 1.2;
}

.ban-lock {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgb(0, 3, 7), transparent 0 34%),
    #000;
  cursor: not-allowed;
}

.ban-lock[hidden] {
  display: none;
}

body.ban-lock-active {
  overflow: hidden;
  cursor: not-allowed;
}

body.ban-lock-active .app-shell,
body.ban-lock-active .loading-screen {
  display: none !important;
}

.ban-lock-card {
  width: min(560px, 100%);
  padding: 32px;
  border-radius: 26px;
  color: #f5f8ff;
  background:
    radial-gradient(circle at 22% 0%, hsl(221, 100%, 3%), transparent 38%),
    linear-gradient(145deg, rgb(0, 0, 0), rgb(0, 9, 29));
  cursor: not-allowed;
}

.ban-lock-card * {
  cursor: not-allowed;
}

.ban-lock-card h1 {
  margin: 0;
  max-width: 440px;
  color: #fff;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.ban-lock-admin {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.ban-lock-admin img {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  background: rgba(255, 255, 255, 0.12);
}

.ban-lock-admin div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ban-lock-admin span {
  color: rgba(180, 202, 255, 0.66);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ban-lock-admin strong {
  overflow: hidden;
  color: rgba(250, 252, 255, 0.96);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ban-lock-card dl {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
}

.ban-lock-card dl > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.ban-lock-card dt {
  color: rgba(180, 202, 255, 0.66);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ban-lock-card dd {
  margin: 0;
  color: rgba(250, 252, 255, 0.94);
  font-size: 0.9rem;
  line-height: 1.45;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes attachmentTrayIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes typingDot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editSurfaceIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editGlowDrift {
  from {
    opacity: 0.44;
    transform: translate3d(-2px, 0, 0);
  }
  to {
    opacity: 0.82;
    transform: translate3d(2px, 0, 0);
  }
}

@keyframes messageGlitchDelete {
  0%, 18% {
    opacity: 1;
    filter: contrast(1.1) saturate(1.4);
    transform: translate3d(0, 0, 0) skewX(0deg);
  }
  20% {
    opacity: 1;
    filter: contrast(2.1) saturate(2.4) hue-rotate(18deg);
    transform: translate3d(-9px, 2px, 0) skewX(18deg);
  }
  24% {
    transform: translate3d(10px, -2px, 0) skewX(-20deg);
  }
  39% {
    opacity: 0.88;
    filter: contrast(2.8) saturate(3) hue-rotate(-24deg);
    transform: translate3d(-14px, 5px, 0) skewX(36deg) skewY(8deg);
  }
  43% {
    transform: translate3d(16px, -4px, 0) skewX(-42deg) skewY(-8deg);
  }
  62% {
    opacity: 0.56;
    filter: blur(0.8px) contrast(3.2) saturate(3.5);
    transform: translate3d(-7px, 8px, 0) scale(1.025);
  }
  78% {
    opacity: 0.24;
    filter: blur(1.6px) contrast(4);
    transform: translate3d(6px, 16px, 0) scale(0.96);
  }
  100% {
    opacity: 0;
    filter: blur(5px) contrast(4.4);
    transform: translate3d(0, 30px, 0) scale(0.9);
  }
}

@keyframes bubbleGlitchDelete {
  0%, 8% {
    clip-path: inset(0 0 0 0);
  }
  10% {
    clip-path: inset(4% 0 72% 0);
  }
  14% {
    clip-path: inset(0 0 0 0);
  }
  19% {
    clip-path: inset(42% 0 18% 0);
  }
  25% {
    clip-path: inset(0 0 0 0);
  }
  35% {
    clip-path: inset(70% 0 3% 0);
  }
  43% {
    clip-path: inset(0 0 64% 0);
  }
  52% {
    clip-path: inset(18% 0 35% 0);
  }
  65% {
    clip-path: inset(58% 0 12% 0);
  }
  79%, 100% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes glitchContentDelete {
  0%, 24% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  26% {
    opacity: 0.24;
    transform: translate3d(8px, -2px, 0);
  }
  31% {
    opacity: 1;
    transform: translate3d(-8px, 2px, 0);
  }
  57% {
    opacity: 0.18;
    transform: translate3d(13px, 0, 0);
  }
  72%, 100% {
    opacity: 0;
    transform: translate3d(-6px, 8px, 0);
  }
}

@keyframes noiseBeforeDelete {
  0% {
    clip-path: inset(62% 0 28% 0);
    opacity: 0.9;
  }
  8% {
    clip-path: inset(12% 0 76% 0);
    transform: translate3d(-10px, 0, 0);
  }
  16% {
    clip-path: inset(80% 0 4% 0);
    transform: translate3d(7px, -1px, 0);
  }
  28% {
    clip-path: inset(30% 0 48% 0);
    transform: translate3d(-16px, 2px, 0);
  }
  41% {
    clip-path: inset(4% 0 82% 0);
    transform: translate3d(14px, -2px, 0);
  }
  55% {
    clip-path: inset(52% 0 20% 0);
    transform: translate3d(-8px, 1px, 0);
  }
  72% {
    clip-path: inset(22% 0 62% 0);
    opacity: 0.98;
    transform: translate3d(18px, 0, 0);
  }
  100% {
    clip-path: inset(74% 0 10% 0);
    opacity: 0;
    transform: translate3d(-20px, 4px, 0);
  }
}

@keyframes noiseAfterDelete {
  0% {
    clip-path: inset(20% 0 66% 0);
    opacity: 0.86;
  }
  9% {
    clip-path: inset(76% 0 6% 0);
    transform: translate3d(14px, 1px, 0);
  }
  18% {
    clip-path: inset(6% 0 84% 0);
    transform: translate3d(-12px, -1px, 0);
  }
  31% {
    clip-path: inset(44% 0 30% 0);
    transform: translate3d(20px, 2px, 0);
  }
  47% {
    clip-path: inset(12% 0 70% 0);
    transform: translate3d(-18px, -2px, 0);
  }
  63% {
    clip-path: inset(68% 0 16% 0);
    opacity: 1;
    transform: translate3d(10px, 3px, 0);
  }
  81% {
    clip-path: inset(28% 0 46% 0);
    transform: translate3d(-22px, 0, 0);
  }
  100% {
    clip-path: inset(86% 0 0 0);
    opacity: 0;
    transform: translate3d(24px, -4px, 0);
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wordFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes streamChunkFade {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(5px) scale(0.992);
  }
  55% {
    opacity: 0.72;
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes footerFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workspace-editor-toggle {
  position: fixed;
  z-index: 36;
  top: 9px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 94px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(245, 247, 255, 0.88);
  background: rgba(26, 27, 31, 0.92);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07), 0 10px 30px rgba(0, 0, 0, 0.32);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 760;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 180ms ease;
}

body.workspace-editor-is-open .workspace-editor-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
}

.workspace-editor-toggle:hover,
.workspace-editor-toggle:focus-visible,
.workspace-editor-toggle[aria-expanded="true"] {
  border-color: rgba(157, 177, 255, 0.32);
  color: #fff;
  background: rgba(42, 44, 52, 0.96);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.1),
    0 12px 34px rgba(0, 0, 0, 0.38);
}

.workspace-editor-toggle:active { transform: scale(0.97); }

.workspace-editor-toggle-icon {
  position: relative;
  width: 17px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.workspace-editor-toggle-icon::after {
  content: "";
  position: absolute;
  top: 1.5px;
  bottom: 1.5px;
  right: 3px;
  width: 1.5px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.8;
}

.workspace-editor-panel {
  position: absolute;
  z-index: 30;
  top: 5px;
  right: 5px;
  bottom: 5px;
  display: grid;
  grid-template-rows: 61px minmax(0, 1fr);
  width: var(--workspace-editor-width);
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 17px;
  background: #151515;
  box-shadow:
    -26px 0 80px rgba(0, 0, 0, 0.62),
    inset 0 1px rgba(255, 255, 255, 0.065),
    inset 1px 0 rgba(255, 255, 255, 0.025);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(100% + 24px));
  transition:
    transform 360ms cubic-bezier(0.2, 0.82, 0.2, 1),
    opacity 220ms ease,
    visibility 0s linear 360ms;
}

.workspace-editor-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition-delay: 0s;
}

.workspace-save-button[hidden],
.workspace-editor-empty[hidden],
.workspace-editor-empty button[hidden],
.workspace-code-surface[hidden] {
  display: none !important;
}

.workspace-editor-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 0 58px 0 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent), #171717;
}

.workspace-editor-close {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 8px;
  border: 0;
  border-radius: 0;
  place-items: center;
  color: #fff;
  background: transparent !important;
  box-shadow: none !important;
  transform: translateY(-50%);
}

.workspace-editor-close:hover,
.workspace-editor-close:focus-visible,
.workspace-editor-close:active {
  color: #ff5c68;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-editor-close img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.96;
  filter: brightness(0) invert(1) !important;
  transition:
    filter 180ms ease,
    opacity 180ms ease;
}

.workspace-editor-close:hover img,
.workspace-editor-close:focus-visible img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(49%) sepia(98%) saturate(1853%) hue-rotate(322deg) brightness(108%) contrast(102%) !important;
}

.workspace-editor-close:active img {
  opacity: 0.72;
}

.workspace-editor-heading {
  display: flex;
  align-items: center;
  min-width: 0;
}

.workspace-editor-heading strong {
  overflow: hidden;
  color: rgba(248, 249, 255, 0.94);
  font-size: 0.9rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-save-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.workspace-save-mode {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 232px;
  height: 36px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
}

.workspace-save-mode button {
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 8px;
  color: rgba(220, 223, 233, 0.48);
  background: transparent;
  font: inherit;
  font-size: 0.71rem;
  font-weight: 780;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.workspace-save-mode button:hover {
  color: rgba(255, 255, 255, 0.78);
}

.workspace-save-mode button:focus-visible {
  outline-offset: -1px;
}

.workspace-save-mode button[aria-pressed="true"] { color: rgba(255, 255, 255, 0.96); }

.workspace-save-mode-slider {
  position: absolute;
  z-index: 1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(105, 129, 255, 0.34), rgba(71, 84, 170, 0.25));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.09), 0 6px 16px rgba(0, 0, 0, 0.24);
  transition: transform 240ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.workspace-save-mode.is-manual .workspace-save-mode-slider { transform: translateX(100%); }

.workspace-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(125, 151, 255, 0.24);
  border-radius: 11px;
  color: #fff;
  background: rgba(70, 92, 190, 0.38);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 790;
  cursor: pointer;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.workspace-save-button:not(:disabled):hover,
.workspace-save-button:not(:disabled):focus-visible {
  border-color: rgba(151, 171, 255, 0.42);
  background: rgba(78, 101, 209, 0.5);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.11),
    0 9px 24px rgba(36, 53, 130, 0.2);
  transform: translateY(-1px);
}

.workspace-save-button:disabled {
  border-color: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.035);
  cursor: default;
}

.workspace-save-button-icon {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.workspace-save-button-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 3px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.workspace-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 29%, 350px);
  min-width: 0;
  min-height: 0;
}

.workspace-code-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #161616;
}

.workspace-editor-save-status {
  overflow: hidden;
  max-width: 150px;
  margin-right: 2px;
  color: rgba(216, 220, 232, 0.43);
  font-size: 0.66rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-editor-save-status.is-error { color: #ffaaaa; }
.workspace-editor-save-status.is-saved { color: #7fe3a7; }

.workspace-editor-empty {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 30px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.workspace-editor-empty-icon {
  display: block;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  object-fit: contain;
  opacity: 0.62;
  filter: grayscale(1) brightness(0) invert(1);
  transition: opacity 180ms ease, transform 180ms ease;
}

.workspace-editor-empty:hover .workspace-editor-empty-icon {
  opacity: 0.78;
  transform: translateY(-2px);
}

.workspace-editor-empty strong { color: #fff; font-size: 1.04rem; }
.workspace-editor-empty p { margin: 0; color: rgba(224, 226, 235, 0.5); font-size: 0.78rem; }

.workspace-editor-empty button {
  margin-top: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(126, 151, 255, 0.28);
  border-radius: 10px;
  color: #fff;
  background: rgba(71, 91, 177, 0.34);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 760;
}

.workspace-code-surface {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #161616;
}

.workspace-line-numbers,
.workspace-code-input {
  min-height: 100%;
  margin: 0;
  padding-top: 18px;
  padding-bottom: 38px;
  border: 0;
  outline: 0;
  font-family: Consolas, "SFMono-Regular", "Cascadia Code", monospace;
  font-size: 13px;
  font-weight: 450;
  line-height: 1.62;
  tab-size: 2;
}

.workspace-line-numbers {
  min-width: 52px;
  padding-right: 13px;
  padding-left: 10px;
  overflow: hidden;
  color: rgba(190, 194, 207, 0.28);
  background: rgba(0, 0, 0, 0.09);
  text-align: right;
  user-select: none;
}

.workspace-code-input {
  width: 100%;
  min-width: 0;
  padding-right: 28px;
  padding-left: 17px;
  resize: none;
  overflow: auto;
  color: #e8e8ea;
  caret-color: #b4c0ff;
  background: transparent;
  scrollbar-color: rgba(255, 255, 255, 0.18) #161616;
  scrollbar-width: thin;
  white-space: pre;
}

.workspace-code-input:focus-visible {
  outline: 0;
  box-shadow: inset 2px 0 rgba(126, 151, 255, 0.56);
}

.workspace-code-input::selection { background: rgba(94, 114, 220, 0.38); }
.workspace-code-input::-webkit-scrollbar { width: 11px; height: 11px; }
.workspace-code-input::-webkit-scrollbar-thumb { border: 3px solid #161616; border-radius: 10px; background: rgba(255, 255, 255, 0.18); }

.workspace-explorer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 31px;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: #171717;
}

.workspace-explorer-toolbar {
  display: grid;
  gap: 8px;
  padding: 11px 10px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.workspace-file-filter {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.workspace-file-filter:focus-within {
  border-color: rgba(142, 163, 255, 0.42);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(88, 101, 255, 0.08);
}

.workspace-file-filter > span {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(230, 232, 240, 0.52);
  border-radius: 50%;
}

.workspace-file-filter > span::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 5px;
  height: 1.5px;
  background: rgba(230, 232, 240, 0.52);
  transform: rotate(45deg);
}

.workspace-file-filter input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: rgba(247, 248, 252, 0.86);
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
}

.workspace-file-filter input::placeholder { color: rgba(221, 224, 234, 0.42); }
.workspace-file-filter input::-webkit-search-cancel-button { appearance: none; }

.workspace-explorer-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.workspace-explorer-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(232, 234, 242, 0.62);
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.workspace-explorer-actions button:last-child { width: 30px; margin-left: auto; padding: 0; }
.workspace-explorer-actions button:hover,
.workspace-explorer-actions button:focus-visible { border-color: rgba(255, 255, 255, 0.09); color: #fff; background: rgba(255, 255, 255, 0.06); transform: translateY(-1px); }
.workspace-explorer-actions button:active { transform: scale(0.97); }
.workspace-explorer-actions small { font-size: 0.66rem; font-weight: 740; }

.workspace-explorer-action-icon {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 0.76;
  filter: brightness(0) invert(78%);
  transition: opacity 160ms ease;
}

.workspace-explorer-actions button:hover .workspace-explorer-action-icon,
.workspace-explorer-actions button:focus-visible .workspace-explorer-action-icon { opacity: 1; }

.workspace-refresh-icon {
  display: block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  opacity: 0.76;
  filter: grayscale(1) brightness(0) invert(78%);
  transition: opacity 160ms ease;
}

.workspace-explorer-actions button:hover .workspace-refresh-icon,
.workspace-explorer-actions button:focus-visible .workspace-refresh-icon { opacity: 1; }

.workspace-tree-context-menu {
  position: fixed;
  z-index: 1400;
  display: grid;
  width: 174px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #f3f4f8;
  background: #19191d;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62), inset 0 1px rgba(255, 255, 255, 0.045);
  transform-origin: top left;
  animation: workspace-context-menu-in 150ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.workspace-tree-context-menu[hidden] { display: none; }

.workspace-tree-context-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(245, 246, 250, 0.88);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.workspace-tree-context-menu button:hover,
.workspace-tree-context-menu button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
  outline: none;
}

.workspace-tree-context-menu button.is-danger:hover,
.workspace-tree-context-menu button.is-danger:focus-visible {
  color: #ffd9dd;
  background: rgba(209, 58, 73, 0.2);
}

.workspace-tree-context-menu button:disabled {
  color: rgba(232, 234, 242, 0.27);
  background: transparent;
  cursor: default;
}

.workspace-context-separator {
  display: block;
  height: 1px;
  margin: 5px 7px;
  background: rgba(255, 255, 255, 0.09);
}

.workspace-file-tree {
  min-height: 0;
  padding: 7px 4px 20px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.workspace-tree-message {
  padding: 15px 12px;
  color: rgba(220, 223, 232, 0.42);
  font-size: 0.72rem;
  line-height: 1.5;
}

.workspace-tree-row {
  display: grid;
  grid-template-columns: 17px 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 32px;
  width: 100%;
  padding: 0 8px 0 calc(7px + var(--tree-depth, 0) * 15px);
  border: 0;
  border-radius: 7px;
  color: rgba(239, 240, 245, 0.82);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
  cursor: grab;
  transition:
    background 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    opacity 140ms ease,
    transform 140ms ease;
}

.workspace-tree-row:active { cursor: grabbing; }
.workspace-file-tree.has-dragged-entry .workspace-tree-row { cursor: grabbing; }

.workspace-tree-row:hover,
.workspace-tree-row:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.055); }
.workspace-tree-row:focus-visible { outline-offset: -2px; }
.workspace-tree-row.is-selected {
  color: #fff;
  background: rgba(92, 109, 199, 0.24);
  box-shadow: inset 2px 0 rgba(143, 162, 255, 0.64);
}
.workspace-tree-row.is-context-target { color: #fff; background: rgba(255, 255, 255, 0.08); }

.workspace-tree-row.is-dragging {
  opacity: 0.38;
  transform: scale(0.985);
}

.workspace-tree-row.is-drop-target {
  color: #fff;
  background: rgba(91, 112, 224, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(161, 176, 255, 0.48),
    inset 3px 0 rgba(161, 176, 255, 0.88);
}

.workspace-tree-row.is-drop-target .workspace-tree-icon {
  opacity: 1;
}

.workspace-tree-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.62;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.workspace-tree-row.is-expanded .workspace-tree-chevron { transform: rotate(45deg) translate(-1px, -1px); }
.workspace-tree-row.is-file .workspace-tree-chevron { visibility: hidden; }

.workspace-tree-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  color: #e39a54;
  font-family: Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 850;
}

.workspace-tree-row.is-directory .workspace-tree-icon {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.68;
  filter: grayscale(1) brightness(0) invert(1);
}

.workspace-tree-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-explorer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(215, 219, 231, 0.35);
  font-size: 0.62rem;
  font-weight: 700;
}

.workspace-explorer-footer span:last-child {
  position: relative;
  padding-left: 10px;
  color: rgba(128, 226, 168, 0.62);
}

.workspace-explorer-footer span:last-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #66d894;
  transform: translateY(-50%);
}

@keyframes workspace-context-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  :root {
    --workspace-editor-width: min(520px, calc(100vw - var(--sidebar-width) - 230px));
  }

  .workspace-editor-panel {
    width: var(--workspace-editor-width);
    min-width: 0;
    top: 3px;
    right: 3px;
    bottom: 3px;
  }

  .workspace-editor-layout { grid-template-columns: minmax(0, 1fr) minmax(170px, 36%); }
  .workspace-save-mode { width: 190px; }
}

@media (max-width: 860px) {
  body.workspace-editor-is-open .main-area { padding-right: 0; }

  .workspace-editor-panel {
    position: fixed;
    width: calc(100vw - 6px);
    height: calc(100dvh - 6px);
    min-width: 0;
  }

  .workspace-editor-header { padding-left: 12px; }
  .workspace-editor-heading { display: none; }
  .workspace-save-controls { width: 100%; }
  .workspace-save-mode { flex: 1 1 auto; width: auto; max-width: 260px; }
  .workspace-editor-layout { grid-template-columns: minmax(0, 1fr) min(38vw, 310px); }

  html,
  body:not(.contact-page) {
    overflow: hidden;
    overscroll-behavior: none;
  }

  body:not(.contact-page) {
    position: fixed;
    inset: 0;
  }

  .app-shell {
    position: fixed;
    inset: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 42dvh) minmax(0, 1fr);
    height: var(--app-viewport-height, 100dvh);
    max-height: none;
  }

  .app-shell > .binary-field {
    left: 0;
  }

  .app-shell.mobile-composer-focused {
    transform: translate3d(0, var(--mobile-viewport-offset, 0px), 0);
  }

  .app-shell.mobile-composer-focused .composer-zone {
    position: relative;
    z-index: 4;
    pointer-events: auto;
    transform: translate3d(0, calc(-1 * var(--mobile-keyboard-inset, 0px)), 0);
    will-change: transform;
  }

  .app-shell.mobile-composer-focused .attach-button,
  .app-shell.mobile-composer-focused .send-button,
  .app-shell.mobile-composer-focused .attachment-remove {
    pointer-events: auto;
    touch-action: manipulation;
  }

  .sidebar {
    position: relative;
    inset: auto;
    z-index: 2;
    display: grid;
    width: 100%;
    height: 100%;
    transform: none;
    visibility: visible;
    transition: none;
    box-shadow:
      24px 0 70px rgba(0, 0, 0, 0.52),
      inset -1px 0 rgba(255, 255, 255, 0.1),
      inset 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .chat-log,
  .composer-zone {
    width: min(760px, calc(100vw - 28px));
  }

  .rename-chat-button,
  .delete-chat-button,
  .rename-chat-cancel-button,
  .rename-chat-save-button {
    opacity: 1;
    transform: translateX(0);
  }

  .top-bar {
    align-items: center;
    gap: 10px;
    padding: 0 14px;
  }

  .message-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 44px;
  }

}

@media (max-width: 560px) {
  .main-area {
    grid-template-rows: 52px minmax(0, 1fr);
  }

  .empty-state {
    top: 36%;
  }

  .empty-state h1 {
    max-width: calc(100vw - 36px);
    font-size: clamp(2.04rem, 10vw, 3.05rem);
  }

  .composer-zone {
    margin-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .composer {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    min-height: 58px;
    align-items: start;
  }

  .attach-button,
  .send-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin-top: 4px;
  }

  .bubble {
    max-width: 92%;
  }

  .message-edit-form {
    min-width: min(330px, 78vw);
  }

  .message-text-action {
    width: 34px;
    height: 34px;
  }

  .message-copy-button {
    width: 34px;
    height: 34px;
  }

  .top-bar {
    align-items: center;
    gap: 8px;
    padding: 0 10px;
  }

  .message-search input {
    height: 40px;
  }

  .sidebar {
    width: 100%;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .add-chat-button {
    width: 42px;
    height: 42px;
  }

  .chat-search {
    min-height: 44px;
  }

  .chat-search input {
    height: 38px;
  }

  .message-search {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 7px;
    min-height: 44px;
    padding: 0 9px;
  }

  .message-search-count {
    display: none;
  }

}

@media (prefers-contrast: more) {
  :root {
    --sidebar-border: rgba(255, 255, 255, 0.3);
    --composer-border: rgba(255, 255, 255, 0.42);
    --border-soft: rgba(255, 255, 255, 0.28);
    --border-strong: rgba(255, 255, 255, 0.48);
    --subtle: #b7b7b7;
  }

  .message.learny .bubble,
  .message.user .bubble,
  .workspace-editor-panel,
  .workspace-tree-context-menu {
    border-color: rgba(255, 255, 255, 0.36);
  }

  .workspace-tree-row.is-selected {
    box-shadow: inset 3px 0 #b9c5ff;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
