@font-face {
  font-family: "Rajdhani";
  src: url("/fonts/Rajdhani-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("/fonts/Rajdhani-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rajdhani";
  src: url("/fonts/Rajdhani-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("/fonts/Oxanium-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oxanium";
  src: url("/fonts/Oxanium-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --panel: rgba(10, 10, 12, 0.62);
  --panel-2: rgba(10, 10, 12, 0.78);
  --text: #f2f2f2;
  --muted: #a9a9ad;
  --muted2: #7e7e84;

  --line: rgba(255, 255, 255, 0.10);
  --line2: rgba(255, 255, 255, 0.06);
  --hover: rgba(255, 255, 255, 0.06);

  --radius: 18px;
  --radius-lg: 22px;
  --radius-xl: 26px;

  --font-ui: "Rajdhani", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Oxanium", "Rajdhani", ui-sans-serif, system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, monospace;

  --top-h: 48px;
  --status-h: 34px;
  --composer-h: 84px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
}


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  letter-spacing: 0.2px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}








body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/web/bg.png") center / cover no-repeat;
  opacity: 0.10;
  filter: saturate(0) contrast(1.05);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  pointer-events: none;
  z-index: 1;
}









body.loginLocked .chatViewport,
body.loginLocked .composerDock {
  pointer-events: none;
  user-select: none;
  filter: blur(1.5px);
  opacity: 0.45;
}

body.loginLocked .statusShell {
  opacity: 0.35;
}

body.loginLocked .welcomeWidget {
  opacity: 0.30;
}

body.loginLocked .loginOverlay {
  display: flex;
}

body.loginLocked .loginClose {
  display: none;
}

#logoutBtn {
  display: none;
}







.appMobile {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.bgLayer {
  display: none;
}

/* =========================================================
   TOP MINI BAR
   ========================================================= */

.topMini {
  position: relative;
  z-index: 80;
  height: var(--top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding:
    max(8px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    6px
    max(12px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topMiniBrand {
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 56px);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topMiniBrandLink {
  text-decoration: none;
  color: var(--muted);
  display: inline-block;
  transition: color .15s ease, opacity .15s ease;
}

.topMiniBrandLink:hover {
  color: var(--text);
  opacity: .96;
}

.iconGlassBtn {
  appearance: none;
  border: 1px solid var(--line2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 14px;
  width: 40px;
  height: 34px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
}

.iconGlassBtn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.iconGlassBtn:active {
  transform: translateY(1px);
}

.menuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: max(12px, env(safe-area-inset-right));
  width: min(220px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 18px;
  border: 1px solid var(--line2);
  background: rgba(10, 10, 12, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: none;
}

.menuPanel.open {
  display: grid;
  gap: 8px;
}

.menuPanelUser {
  padding: 10px 12px 12px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line2);
  margin-bottom: 6px;
  text-align: center;
}


.menuPanelBtn {
  appearance: none;
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.menuPanelBtn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line2);
}

/* =========================================================
   STATUS / ORIGINAL ANIMATION SLOT
   ========================================================= */

.statusShell {
  position: relative;
  z-index: 70;
  height: var(--status-h);
  display: flex;
  align-items: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
}

.statusShell.isHidden {
  display: none;
}

.status-line {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 2px;
}

#status-text {
  display: inline-block;
  position: relative;
  font-size: 11px;
  letter-spacing: 4.2px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .78;
  transform: translateZ(0);
  color: rgba(255, 255, 255, .72);
  text-shadow: 0 0 18px rgba(255, 255, 255, .06);
}

/* ===== LORD AI: NEURAL STREAM INDICATOR ===== */

.aiThinking .status-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, .12),
      rgba(255, 255, 255, .12)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, .00) 0px,
      rgba(255, 255, 255, .00) 16px,
      rgba(255, 255, 255, .14) 17px,
      rgba(255, 255, 255, .00) 26px) 0 50% / 100% 1px no-repeat,
    linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, .08) 22%,
      rgba(255, 255, 255, .18) 50%,
      rgba(255, 255, 255, .08) 78%,
      transparent 100%) -40% 50% / 220px 1px no-repeat;
  opacity: .88;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, .10));
  animation: lsTelemetry 2.9s linear infinite;
}

.aiThinking .status-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 2px;
  pointer-events: none;
  background:
    radial-gradient(circle,
      rgba(255, 255, 255, .95) 0%,
      rgba(255, 255, 255, .45) 32%,
      rgba(255, 255, 255, .12) 56%,
      rgba(255, 255, 255, 0) 72%) -15% 50% / 10px 10px no-repeat,
    radial-gradient(circle,
      rgba(255, 255, 255, .80) 0%,
      rgba(255, 255, 255, .30) 36%,
      rgba(255, 255, 255, .10) 58%,
      rgba(255, 255, 255, 0) 74%) -55% 50% / 30px 30px no-repeat,
    radial-gradient(circle,
      rgba(255, 255, 255, .92) 0%,
      rgba(255, 255, 255, .28) 40%,
      rgba(255, 255, 255, 0) 70%) -95% 50% / 12px 12px no-repeat;
  opacity: .92;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, .18));
  animation:
    lsPacketA 0.95s linear infinite,
    lsPacketB 3.10s linear infinite,
    lsPacketC 4.90s linear infinite,
    lsPower 6.8s ease-in-out infinite;
}

.aiThinking .status-line::before,
.aiThinking .status-line::after {
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%,
      #000 12%,
      #000 88%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0%,
      #000 12%,
      #000 88%,
      transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.aiThinking #status-text {
  animation:
    lsTextPower 6.8s ease-in-out infinite,
    lsTextMicro 2.9s linear infinite;
}

@keyframes lsTelemetry {
  0% { background-position: 0 50%, 0 50%, -40% 50%; }
  100% { background-position: 0 50%, -120px 50%, 140% 50%; }
}

@keyframes lsPacketA {
  0% { background-position: -15% 50%, -55% 50%, -95% 50%; }
  100% { background-position: 115% 50%, -55% 50%, -95% 50%; }
}

@keyframes lsPacketB {
  0% { background-position: -15% 50%, -55% 50%, -95% 50%; }
  100% { background-position: -15% 50%, 125% 50%, -95% 50%; }
}

@keyframes lsPacketC {
  0% { background-position: -15% 50%, -55% 50%, -95% 50%; }
  100% { background-position: -15% 50%, -55% 50%, 140% 50%; }
}

@keyframes lsPower {
  0% { opacity: .82; filter: drop-shadow(0 0 14px rgba(255, 255, 255, .12)); }
  14% { opacity: .90; filter: drop-shadow(0 0 18px rgba(255, 255, 255, .16)); }
  28% { opacity: .84; filter: drop-shadow(0 0 15px rgba(255, 255, 255, .12)); }
  41% { opacity: 1; filter: drop-shadow(0 0 28px rgba(255, 255, 255, .22)); }
  47% { opacity: .84; filter: drop-shadow(0 0 15px rgba(255, 255, 255, .12)); }
  62% { opacity: .92; filter: drop-shadow(0 0 20px rgba(255, 255, 255, .16)); }
  76% { opacity: 1; filter: drop-shadow(0 0 34px rgba(255, 255, 255, .24)); }
  82% { opacity: .86; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .12)); }
  100% { opacity: .82; filter: drop-shadow(0 0 14px rgba(255, 255, 255, .12)); }
}

@keyframes lsTextPower {
  0%   { opacity: .60; text-shadow: 0 0 0 rgba(255,255,255,0); }
  20%  { opacity: .78; text-shadow: 0 0 8px rgba(255,255,255,.06); }
  40%  { opacity: .68; text-shadow: 0 0 0 rgba(255,255,255,0); }
  60%  { opacity: .88; text-shadow: 0 0 10px rgba(255,255,255,.08); }
  80%  { opacity: .72; text-shadow: 0 0 0 rgba(255,255,255,0); }
  100% { opacity: .60; text-shadow: 0 0 0 rgba(255,255,255,0); }
}

@keyframes lsTextMicro {
  0% { transform: translateX(0) translateZ(0); }
  25% { transform: translateX(.35px) translateZ(0); }
  50% { transform: translateX(0) translateZ(0); }
  75% { transform: translateX(.25px) translateZ(0); }
  100% { transform: translateX(0) translateZ(0); }
}

/* =========================================================
   CHAT AREA
   ========================================================= */

.chatViewport {
  position: relative;
  height: calc(100dvh - var(--top-h) - var(--status-h));
  min-height: 0;
  overflow: hidden;
}

.welcomeWidget {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  padding: 16px 18px 15px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(10,10,12,.52);
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  z-index: 10;
  transition: opacity .18s ease, transform .18s ease;
}

.welcomeWidget.isHidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  pointer-events: none;
}

.welcomeLabel {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 2px;
}

.welcomeTitle {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.04;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.welcomeText {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--muted);
}

.messages {
  height: 100%;
  overflow: auto;
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding:
    84px
    6px
    calc(var(--composer-h) + 18px + env(safe-area-inset-bottom))
    0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}





.messages::-webkit-scrollbar {
  width: 10px;
}

.messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.messages::-webkit-scrollbar-track {
  background: transparent;
}

.codeBlock pre::-webkit-scrollbar,
.mdTableWrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.codeBlock pre::-webkit-scrollbar-thumb,
.mdTableWrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.10);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.codeBlock pre::-webkit-scrollbar-track,
.mdTableWrap::-webkit-scrollbar-track {
  background: transparent;
}










.msgRow {
  display: flex;
  width: 100%;
}

.msgRow.user {
  justify-content: flex-end;
}

.msgRow.assistant,
.msgRow.system {
  justify-content: flex-start;
}

.bubble {
  position: relative;
  overflow: hidden;
  max-width: min(760px, 92%);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}




.msgRow.user .bubble {
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 14px 34px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 14px 11px;
}



.msgRow.user .bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  opacity: .20;
}





.msgRow.assistant .bubble,
.msgRow.system .bubble {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 0 0 1px;
  max-width: 920px;
  overflow: visible;
}



.msgMeta {
  margin-bottom: 8px;
  padding-left: 1px;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  overflow: visible;
}






/* =========================================================
   MSG CONTENT
   ========================================================= */







.msgContent {
  white-space: normal;
  word-wrap: break-word;
  font-size: clamp(16px, 2.8vw, 20px);
  line-height: 1.58;
  letter-spacing: .01em;
}




.msgContent.isStreaming {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-ui);
}

.msgContent.isStreaming code,
.msgContent.isStreaming pre {
  font-family: inherit;
}




.msgContent h1,
.msgContent h2,
.msgContent h3 {
  margin: 18px 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255,255,255,.92);
  text-shadow: 0 8px 24px rgba(0,0,0,.45);
}

.msgContent h1 {
  font-size: clamp(22px, 5vw, 28px);
}

.msgContent h2 {
  font-size: clamp(19px, 4.6vw, 22px);
  opacity: .96;
}

.msgContent h3 {
  font-size: clamp(17px, 4.2vw, 18px);
  opacity: .92;
}

.msgContent p {
  margin: 8px 0;
}

.msgContent p:first-child {
  margin-top: 0;
}

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




.msgContent strong {
  font-weight: 700;
}

.msgContent em {
  font-style: italic;
  opacity: .96;
}

.msgContent .mdHr {
  border: 0;
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0),
    rgba(255,255,255,.18),
    rgba(255,255,255,0)
  );
}

.msgContent .mdQuote {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}







.msgContent ul,
.msgContent ol {
  margin: 12px 0 16px;
  padding-left: 26px;
}

.msgContent ul {
  list-style: disc outside;
}

.msgContent ol {
  list-style: decimal outside;
}

.msgContent li {
  margin: 8px 0;
  padding-left: 2px;
  line-height: 1.6;
}

.msgContent li::marker {
  color: rgba(255,255,255,.78);
}






.msgContent code,
.msgContent pre {
  font-family: var(--font-code);
}

.msgContent code {
  font-size: .92em;
  padding: .14em .50em;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 650;
}

.msgContent a,
.assetLink,
.docCanvasLink {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.22);
  padding-bottom: 1px;
  transition: border-color .15s ease, opacity .15s ease, color .15s ease;
}

.msgContent a:hover,
.assetLink:hover,
.docCanvasLink:hover {
  color: rgba(255,255,255,.95);
  border-bottom-color: rgba(255,255,255,.45);
  opacity: .98;
  text-shadow: 0 10px 28px rgba(255,255,255,.10);
}

.codeBlock {
  position: relative;
  margin: 14px 0;
  border-radius: 18px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 18px 40px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(0,0,0,.38);
  overflow: hidden;
  padding-top: 38px;
}

.codeBlock pre {
  margin: 0;
  padding: 18px 18px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.codeBlock pre code {
  background: transparent;
  border: 0;
  padding: 0;
  font-weight: 520;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,.92);
  display: block;
  white-space: pre;
}

.codeBlock .copyBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.80);
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: .08em;
  font-size: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.codeBlock .copyBtn:hover {
  color: rgba(255,255,255,.95);
  border-color: rgba(255,255,255,.18);
}

.codeBlock .copyBtn.copied {
  color: rgba(255,255,255,.95);
  background: rgba(255,255,255,.10);
}

.codeBlock .codeMeta {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  pointer-events: none;
}

.mdTableWrap {
  margin: 14px 0;
  border-radius: 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.mdTable {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}

.mdTable th {
  text-align: left;
  padding: 12px 14px;
  letter-spacing: .08em;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.mdTable td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  vertical-align: top;
}

.mdTable tr:last-child td {
  border-bottom: 0;
}
















/* =========================================================
   ASSETS / DOCUMENTS
   ========================================================= */

.assetsGrid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.assetCard {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.assetCard.imageCard {
  padding: 0;
  overflow: hidden;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}

.assetPreview {
  display: block;
  width: 100%;
  max-width: min(820px, 100%);
  margin: 0 auto;
  height: auto;
  object-fit: contain;
  background: rgba(0,0,0,.16);
}

.assetMeta {
  padding: 12px 14px 14px;
  text-align: center;
}

.assetType,
.docCanvasType {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--muted);
  text-transform: uppercase;
}

.assetName,
.docCanvasName {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.3;
}

.docCanvas {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow:
    0 14px 34px rgba(0,0,0,.26),
    inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.docCanvasLink {
  display: inline-block;
  margin-top: 10px;
}

/* =========================================================
   COMPOSER
   ========================================================= */









/* =========================================================
   COMPOSER
   ========================================================= */

.composerDock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding:
    10px
    max(12px, env(safe-area-inset-right))
    calc(10px + env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background: transparent;
}

.composerDock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 82px;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(11,11,12,0) 0%,
      rgba(11,11,12,.08) 18%,
      rgba(11,11,12,.18) 38%,
      rgba(11,11,12,.34) 62%,
      rgba(11,11,12,.58) 82%,
      rgba(11,11,12,.76) 100%
    );
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.composerShell {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  background: rgba(0,0,0,.60);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  padding: 10px;
  box-shadow:
    0 14px 34px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.composerShell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  opacity: .22;
}

#userInput {
  position: relative;
  z-index: 1;
  min-height: 52px;
  max-height: 170px;
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 12px 12px 10px;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.4;
}

#userInput::placeholder {
  color: var(--muted2);
}

.composerActions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.sendBtn {
  border: 0;
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 999px;
  min-width: 94px;
  height: 44px;
  cursor: pointer;
  transition: background .15s ease, transform .06s ease;
}

.sendBtn:hover {
  background: rgba(255,255,255,.12);
}

.sendBtn:active {
  transform: translateY(1px);
}

.composerHint {
  display: none;
}











/* =========================================================
   LOGIN OVERLAY
   ========================================================= */

.loginOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
}

.loginOverlay.open {
  display: flex;
}

.loginCard {
  width: min(460px, 100%);
  border-radius: 18px;
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  padding: 16px;
}

.loginTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.loginEyebrow {
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--muted);
  text-transform: uppercase;
}

.loginTitle {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(20px, 5vw, 28px);
  letter-spacing: .10em;
  text-transform: uppercase;
}

.loginClose {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.loginClose:hover {
  background: rgba(255,255,255,.07);
}

.loginBody {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loginHint,
.loginError {
  font-size: 13px;
  color: var(--muted);
}

.loginError {
  color: #ff6b6b;
  min-height: 18px;
}

.loginField {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.loginLabel {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.loginInput {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.loginInput:focus {
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
}

.loginActions {
  margin-top: 14px;
}

.wideBtn {
  width: 100%;
}

.isHidden {
  display: none !important;
}










/* =========================================================
   IN-CHAT THINKING PLACEHOLDER
   ========================================================= */











.msgRow.thinking {
  justify-content: flex-start;
}

.thinkingBubble {
  position: relative;
  width: 228px;
  min-height: 42px;
  padding: 0 0 14px;
}

.thinkingLine {
  position: relative;
  width: 208px;
  height: 28px;
  display: flex;
  align-items: flex-start;
  overflow: visible;
}

.thinkingText {
  display: inline-block;
  position: relative;
  top: 0;
  left: 0;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 3.4px;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .82;
  color: rgba(255, 255, 255, .70);
  text-shadow:
    0 0 10px rgba(255, 255, 255, .05),
    0 0 24px rgba(255, 255, 255, .04);
}














/* animacja ma siedzieć tylko w obrębie małego paska */


.aiThinking .thinkingLine::after {
  content: "";
  position: absolute;
  left: 0;
  width: 208px;
  bottom: 2px;
  height: 2px;


  bottom: 3px;
  height: 2px;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(255, 255, 255, .08),
      rgba(255, 255, 255, .08)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, .00) 0px,
      rgba(255, 255, 255, .00) 14px,
      rgba(255, 255, 255, .12) 15px,
      rgba(255, 255, 255, .00) 24px) 0 50% / 100% 1px no-repeat,
    linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, .06) 20%,
      rgba(255, 255, 255, .16) 50%,
      rgba(255, 255, 255, .06) 80%,
      transparent 100%) -40% 50% / 120px 1px no-repeat;
  opacity: .84;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .08));
  animation: lsTelemetry 2.9s linear infinite;
}




.aiThinking .thinkingLine::before {
  content: "";
  position: absolute;
  left: 0;
  width: 208px;
  bottom: 2px;
  height: 2px;



  bottom: 3px;
  height: 2px;
  pointer-events: none;
  background:
    radial-gradient(circle,
      rgba(255, 255, 255, .92) 0%,
      rgba(255, 255, 255, .34) 34%,
      rgba(255, 255, 255, .10) 58%,
      rgba(255, 255, 255, 0) 74%) -15% 50% / 8px 8px no-repeat,
    radial-gradient(circle,
      rgba(255, 255, 255, .72) 0%,
      rgba(255, 255, 255, .24) 36%,
      rgba(255, 255, 255, .08) 58%,
      rgba(255, 255, 255, 0) 74%) -55% 50% / 22px 22px no-repeat,
    radial-gradient(circle,
      rgba(255, 255, 255, .88) 0%,
      rgba(255, 255, 255, .22) 40%,
      rgba(255, 255, 255, 0) 70%) -95% 50% / 10px 10px no-repeat;
  opacity: .88;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .12));
  animation:
    lsPacketA 0.95s linear infinite,
    lsPacketB 3.10s linear infinite,
    lsPacketC 4.90s linear infinite,
    lsPower 6.8s ease-in-out infinite;
}

.aiThinking .thinkingLine::before,
.aiThinking .thinkingLine::after {
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%,
      #000 8%,
      #000 92%,
      transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0%,
      #000 8%,
      #000 92%,
      transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.aiThinking .thinkingText {
  animation:
    lsTextPower 6.8s ease-in-out infinite,
    lsTextMicro 2.9s linear infinite;
}















/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 640px) {
  :root {
    --top-h: 46px;
    --status-h: 32px;
    --composer-h: 78px;
  }

  .topMini {
    padding:
      max(8px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      6px
      max(10px, env(safe-area-inset-left));
  }

  .topMiniBrand {
    font-size: 9px;
    letter-spacing: .24em;
  }

  .statusShell {
    padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
  }

  .messages {
    width: calc(100% - 12px);
    padding:
      82px
      0
      calc(var(--composer-h) + 18px + env(safe-area-inset-bottom))
      0;
    gap: 12px;
  }

  .bubble {
    max-width: 100%;
    border-radius: 16px;
    padding: 13px 14px;
  }

  .msgContent {
    font-size: 16px;
    line-height: 1.55;
  }

  .msgContent.isStreaming {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-ui);
  }

  .msgContent.isStreaming code,
  .msgContent.isStreaming pre {
    font-family: inherit;
  }

  .msgContent ul,
  .msgContent ol {
    margin: 10px 0 14px;
    padding-left: 22px;
  }

  .msgContent li {
    margin: 8px 0;
    padding-left: 2px;
    line-height: 1.62;
  }

  .msgContent li::marker {
    color: rgba(255,255,255,.82);
  }

  .msgContent code {
    font-size: .88em;
    padding: .12em .42em;
    border-radius: 10px;
  }

  .codeBlock {
    margin: 12px 0;
    border-radius: 16px;
    padding-top: 34px;
  }

  .codeBlock pre {
    padding: 14px 14px 13px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .codeBlock pre code {
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    min-width: max-content;
  }

  .codeBlock .copyBtn {
    top: 8px;
    right: 8px;
    padding: 5px 9px;
    font-size: 11px;
    border-radius: 11px;
  }

  .codeBlock .codeMeta {
    top: 10px;
    left: 12px;
    font-size: 11px;
    letter-spacing: .12em;
  }

  .mdTableWrap {
    margin: 12px 0;
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .mdTable {
    min-width: 460px;
    font-size: 13px;
  }

  .mdTable th,
  .mdTable td {
    padding: 10px 11px;
  }

  .welcomeWidget {
    top: 14px;
    width: calc(100% - 20px);
    padding: 14px;
  }

  .welcomeTitle {
    font-size: 18px;
  }

  .welcomeText {
    font-size: 14px;
  }

  .composerDock {
    padding:
      8px
      max(8px, env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
  }

  .composerShell {
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
  }

  #userInput {
    min-height: 48px;
    font-size: 16px;
    padding: 12px 12px 10px;
  }

  .sendBtn {
    min-width: 84px;
    height: 42px;
  }

  .loginCard {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .menuPanel {
    right: max(8px, env(safe-area-inset-right));
    width: min(210px, calc(100vw - 16px));
  }

  .welcomeWidget {
    width: calc(100% - 16px);
  }

  .messages {
    width: calc(100% - 8px);
  }

  .msgContent ul,
  .msgContent ol {
    padding-left: 20px;
  }

  .codeBlock pre code {
    font-size: 12px;
  }

  .mdTable {
    min-width: 420px;
    font-size: 12.5px;
  }
}

@media (orientation: landscape) and (max-height: 640px) {
  :root {
    --top-h: 42px;
    --status-h: 28px;
    --composer-h: 70px;
  }

  .topMiniBrand {
    font-size: 8px;
  }

  .messages {
    padding:
      72px
      0
      calc(var(--composer-h) + 14px + env(safe-area-inset-bottom))
      0;
  }

  .welcomeWidget {
    top: 10px;
    width: min(82vw, 360px);
    padding: 12px 14px;
  }

  .welcomeTitle {
    font-size: 16px;
  }

  .welcomeText {
    font-size: 13px;
  }

  .msgContent {
    font-size: 15px;
  }

  .msgContent ul,
  .msgContent ol {
    padding-left: 22px;
  }

  .codeBlock pre code {
    font-size: 12px;
  }

  #userInput {
    min-height: 44px;
    font-size: 15px;
  }

  .sendBtn {
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aiThinking .status-line::before,
  .aiThinking .status-line::after,
  .aiThinking #status-text,
  .aiThinking .thinkingLine::before,
  .aiThinking .thinkingLine::after,
  .aiThinking .thinkingText {
    animation: none !important;
  }
}















