@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;
  --matrix-green: #8cff9f;
  --matrix-green-soft: rgba(140, 255, 159, .72);
  --matrix-green-dim: rgba(140, 255, 159, .48);
  --matrix-shadow: rgba(88, 255, 132, .22);
  --font-terminal: "JetBrains Mono", "Courier New", ui-monospace, monospace;

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

* {
  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;
}

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: -2;
}

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;
  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: 0;
  background: transparent;
  color: rgba(220,255,220,.62);
  border-radius: 0;
  width: auto;
  min-width: 54px;
  height: 34px;
  padding: 0 8px;
  cursor: pointer;
  font-family: var(--font-terminal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1;
  transition: color .15s ease, text-shadow .15s ease, transform .06s ease;
}

.iconGlassBtn::before {
  content: "[ ";
}

.iconGlassBtn::after {
  content: " ]";
}

.iconGlassBtn:hover {
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.22);
}

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






.menuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: max(12px, env(safe-area-inset-right));
  width: min(240px, calc(100vw - 24px));
  padding: 10px 8px;
  border-radius: 0;
  border: 0;
  background: rgba(0,0,0,.86);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: none;
}




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

.menuPanelUser {
  padding: 8px 8px 10px;
  font-family: var(--font-terminal);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(140,255,159,.42);
  border-bottom: 1px solid rgba(140,255,159,.10);
  margin-bottom: 6px;
  text-align: left;
}





.menuPanelBtn {
  appearance: none;
  width: 100%;
  min-height: 34px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: rgba(220,255,220,.62);
  font-family: var(--font-terminal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  padding: 0 8px;
  transition: color .15s ease, text-shadow .15s ease;
}

.menuPanelBtn::before {
  content: "[ ";
}

.menuPanelBtn::after {
  content: " ]";
}

.menuPanelBtn:hover {
  background: transparent;
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.22);
}






/* =========================================================
   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: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 0;
  max-width: min(760px, 92%);
}



.msgRow.user .bubble::before {
  display: none;
}


.msgRow.user .msgContent {
  font-family: var(--font-terminal);
  color: rgba(140, 255, 159, .50);
  font-size: clamp(14px, 2.35vw, 17px);
  line-height: 1.6;
  letter-spacing: .035em;
  text-shadow: 0 0 10px rgba(88,255,132,.08);
}

.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 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  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;
}

.msgRow.assistant .msgContent,
.msgRow.system .msgContent {
  font-family: var(--font-terminal);
  font-size: clamp(14px, 2.35vw, 17px);
  line-height: 1.72;
  letter-spacing: .045em;
  color: var(--matrix-green-soft);
  text-shadow:
    0 0 8px var(--matrix-shadow),
    0 0 22px rgba(88, 255, 132, .08);
}

.msgRow.assistant .msgContent strong,
.msgRow.assistant .msgContent h1,
.msgRow.assistant .msgContent h2,
.msgRow.assistant .msgContent h3,
.msgRow.assistant .msgContent .mdHeading,
.msgRow.system .msgContent strong,
.msgRow.system .msgContent h1,
.msgRow.system .msgContent h2,
.msgRow.system .msgContent h3,
.msgRow.system .msgContent .mdHeading {
  font-family: var(--font-terminal);
  color: var(--matrix-green);
  letter-spacing: .08em;
  text-shadow: 0 0 14px var(--matrix-shadow);
}

.msgContent.matrixTyping {
  white-space: pre-wrap;
  color: var(--matrix-green);
  text-shadow:
    0 0 10px rgba(88, 255, 132, .34),
    0 0 28px rgba(88, 255, 132, .12);
}

.msgContent.matrixTyping::after {
  content: "";
}

.msgContent.matrixTyping > :last-child::after {
  content: "█";
  display: inline-block;
  margin-left: .14em;
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88, 255, 132, .45);
  animation: matrixCursorBlink 1.04s steps(1, end) infinite;
}

.msgContent.matrixTyping:empty::after {
  content: "█";
  display: inline-block;
  margin-left: 0;
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88, 255, 132, .45);
  animation: matrixCursorBlink 1.04s steps(1, end) infinite;
}

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

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

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

.msgContent h3,
.msgContent .mdHeading3 {
  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: 800;
  color: rgba(255,255,255,.98);
  text-shadow: 0 0 18px rgba(255,255,255,.08);
}

.msgContent em {
  font-style: italic;
  color: rgba(255,255,255,.88);
}

.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,
.msgContent .mdList {
  margin: 12px 0 16px;
  padding-left: 24px;
}

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

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

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

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

.msgContent code {
  font-family: var(--font-mono, monospace);
  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;
  max-width: 100%;
  min-width: 0;
  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;
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

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

.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 {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 14px 0;
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -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: max-content;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 14px;
}

.mdTable th,
.mdTable td {
  min-width: 120px;
  max-width: 280px;
  padding: 12px 14px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}

.mdTable th {
  text-align: left;
  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 {
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
}

.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;
}


.assetDesc {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
  line-height: 1.4;
}



.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: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 0;
  box-shadow: none;
}

.composerShell::before {
  display: none;
}


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


.sendBtn,
.micBtn,
.polishBtn,
.speechBtn {
  appearance: none;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: rgba(220, 255, 220, .68);
  border-radius: 0;
  min-width: 86px;
  height: 44px;
  padding: 0 16px;
  cursor: pointer;
  font-family: var(--font-terminal);
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color .15s ease, transform .06s ease, text-shadow .15s ease;
}

.polishBtn,
.speechBtn {
  min-width: 86px;
  padding: 0 16px;
  font-family: var(--font-terminal);
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}

.micBtn {
  position: relative;
  min-width: 72px;
  padding: 0 16px;
  overflow: hidden;
  font-family: var(--font-terminal);
  letter-spacing: .08em;
}

.micIcon {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
}

.micDot {
  display: none;
}

body.voiceListening .micBtn {
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.18);
}

body.voiceListening .micDot {
  display: none;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.28); opacity: .75; }
  50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); opacity: 1; }
}

.sendBtn:hover,
.micBtn:hover,
.polishBtn:hover,
.speechBtn:hover {
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.22);
}


.sendBtn:focus-visible,
.micBtn:focus-visible,
.polishBtn:focus-visible,
.speechBtn:focus-visible {
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.25);
}

.sendBtn:active,
.micBtn:active,
.polishBtn:active,
.speechBtn:active {
  transform: translateY(1px);
}

.speechBtn.isOn {
  color: var(--matrix-green);
  text-shadow: 0 0 12px rgba(88,255,132,.18);
}


.sendBtn::before,
.micBtn::before,
.polishBtn::before,
.speechBtn::before {
  content: "[ ";
}

.sendBtn::after,
.micBtn::after,
.polishBtn::after,
.speechBtn::after {
  content: " ]";
}



.voiceTranscript,
.composerHint {
  width: min(920px, 100%);
  min-height: 15px;
  margin: 6px auto 0;
  padding: 0 14px;
  color: rgba(255,255,255,.52);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voiceTranscript:empty,
.composerHint:empty {
  display: none;
}

/* =========================================================
   MATRIX TERMINAL INPUT
   ========================================================= */

.terminalInputWrapper {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 0;
  font-family: var(--font-terminal);
  color: var(--matrix-green);
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}

.terminalPrompt {
  display: none;
}

#terminalInput,
.terminalInput {
  display: inline;
  min-width: 0;
  max-width: 100%;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  caret-color: transparent;
  font-family: var(--font-terminal);
  font-size: 15px;
  line-height: 1.5;
  color: var(--matrix-green);
  text-shadow: 0 0 14px rgba(88,255,132,.18);
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}





.terminalInput {
  /* Twoje istniejące style */
}

/* ===== TERMINAL CURSOR ===== */
.terminalInput::after {
  content: "█";
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

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







.terminalCursor {
  display: inline-block;
  vertical-align: baseline;
  margin-left: 1px;
  color: var(--matrix-green);
  font-family: var(--font-terminal);
  font-size: 15px;
  line-height: 1.5;
  text-shadow: 0 0 14px rgba(88,255,132,.35);
  animation: matrixCursorBlink 1.06s steps(1, end) infinite;
}

@keyframes matrixCursorBlink {
  0%, 46% { opacity: 1; }
  47%, 100% { opacity: 0; }
}

/* =========================================================
   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,.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
}

.loginOverlay.open {
  display: flex;
}

.loginCard {
  width: min(460px, 100%);
  border-radius: 0;
  background: rgba(0, 0, 0, .84);
  border: 1px solid rgba(140,255,159,.18);
  box-shadow:
    0 20px 70px rgba(0,0,0,.72),
    0 0 34px rgba(88,255,132,.06);
  overflow: hidden;
  padding: 16px;
  font-family: var(--font-terminal);
}

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

.loginEyebrow {
  font-size: 10px;
  letter-spacing: .24em;
  color: var(--matrix-green-dim);
  text-transform: uppercase;
  font-family: var(--font-terminal);
}

.loginTitle {
  margin-top: 6px;
  font-family: var(--font-terminal);
  font-size: clamp(18px, 4.7vw, 24px);
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--matrix-green);
  text-shadow: 0 0 14px var(--matrix-shadow);
}

.loginClose {
  width: 40px;
  height: 40px;
  border-radius: 0;
  border: 1px solid rgba(140,255,159,.16);
  background: transparent;
  color: var(--matrix-green-dim);
  font-family: var(--font-terminal);
  font-size: 22px;
  cursor: pointer;
}

.loginClose:hover {
  color: var(--matrix-green);
  border-color: rgba(140,255,159,.36);
  background: rgba(140,255,159,.04);
}

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

.loginHint,
.loginError {
  font-size: 13px;
  color: rgba(200,255,210,.58);
  font-family: var(--font-terminal);
}

.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(--matrix-green-dim);
  font-family: var(--font-terminal);
}

.loginInput {
  width: 100%;
  height: 44px;
  border-radius: 0;
  border: 1px solid rgba(140,255,159,.16);
  background: rgba(0,0,0,.42);
  color: var(--matrix-green);
  padding: 0 12px;
  outline: none;
  font-family: var(--font-terminal);
  text-shadow: 0 0 10px rgba(88,255,132,.12);
}

.loginInput:focus {
  border-color: rgba(140,255,159,.42);
  box-shadow: 0 0 0 3px rgba(88,255,132,.08);
}

.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: 108px;
  }

  .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) + 16px + env(safe-area-inset-bottom))
      0;
    gap: 18px;
  }

  /* ================= INPUT ================= */

  .composerShell {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    padding: 6px 0;
  }

  .terminalInputWrapper {
    width: 100%;
    min-height: 44px;
    padding: 10px 2px;
    cursor: text;
    display: block;
  }

  #terminalInput,
  .terminalInput {
    display: inline;
    font-size: 15px;
    line-height: 1.5;
  }

  .terminalCursor {
    font-size: 15px;
  }

  /* ================= BUTTONS ================= */

  .composerActions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
  }

  .micBtn,
  .polishBtn,
  .sendBtn {
    width: 100%;
    height: 34px;
    padding: 0 6px;
    font-size: 11px;
  }

  /* ================= TEXT ================= */

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

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

  .welcomeTitle {
    font-size: 18px;
  }

  .welcomeText {
    font-size: 14px;
  }

  .voiceTranscript,
  .composerHint {
    width: 100%;
    max-width: calc(100vw - 18px);
    margin: 4px auto 0;
    padding: 0 8px;
    font-size: 11px;
  }

  .loginCard {
    padding: 14px;
  }
}

/* =========================================================
   SMALL DEVICES
   ========================================================= */

@media (max-width: 420px) {
  :root {
    --composer-h: 110px;
  }

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

  .composerShell {
    gap: 6px;
  }

  .terminalInputWrapper {
    min-height: 40px;
    padding: 8px 2px;
  }

  .composerActions {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
  }

  .micBtn,
  .polishBtn,
  .sendBtn {
    height: 32px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  :root {
    --composer-h: 116px;
  }

  .micBtn,
  .polishBtn,
  .sendBtn {
    height: 30px;
    font-size: 10px;
  }
}

/* =========================================================
   LANDSCAPE FIX (CRUCIAL)
   ========================================================= */

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

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

  .composerShell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 10px;
  }

  .terminalInputWrapper {
    width: 100%;
    min-height: 36px;
    padding: 6px 0;
  }

  #terminalInput,
  .terminalInput {
    font-size: 14px;
    line-height: 1.45;
  }

  .terminalCursor {
    font-size: 14px;
  }

  /* 🔥 NAJWAŻNIEJSZE – przyciski po prawej */
  .composerActions {
    display: flex;
    justify-content: flex-end;
    width: auto;
    gap: 6px;
  }

  .micBtn,
  .polishBtn,
  .sendBtn {
    width: auto;
    min-width: 64px;
    height: 30px;
    font-size: 10px;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .terminalCursor,
  .msgContent.matrixTyping::after {
    animation: none !important;
  }
}







/* LORD SYSTEMS // MOBILE STABILITY PATCH V4 */
html,body,.appMobile,.chatViewport,.messages,.msgRow,.bubble,.msgContent,.assetsGrid,.assetCard,.docCanvas,.codeBlock,.mdTableWrap{max-width:100%;min-width:0;}
.messages{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;overflow-anchor:none;}
.msgRow.assistant .bubble,.msgRow.system .bubble,.msgContent,.assetsGrid,.assetCard,.docCanvas{overflow-x:hidden;}
.docCanvas,.assetCard,.codeBlock,.mdTableWrap{width:100%;max-width:100%;}
.codeBlock,.mdTableWrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.codeBlock pre{max-width:100%;overflow-x:auto;}
.assetPreview,.msgContent img,.msgContent video,.msgContent canvas,.msgContent iframe,.docCanvas canvas,.docCanvas iframe{max-width:100%!important;height:auto;}
.terminalInputWrapper{min-height:44px;align-items:center;}
.terminalInput{min-height:24px;outline:none;-webkit-user-select:text;user-select:text;caret-color:var(--matrix-green);}
@media (max-width:680px){.composerShell{grid-template-columns:1fr;align-items:stretch;}.composerActions{justify-content:space-between;flex-wrap:nowrap;}.sendBtn,.micBtn,.polishBtn,.speechBtn{min-width:0;flex:1 1 0;}}


/* LORD SYSTEMS // MIC + COMPOSER STABILITY PATCH V5
   - no sticky green mic on touch devices
   - transcript/hint overlays no longer change composer height
   - composer stays anchored while MIC starts/stops
*/
.composerDock{
  contain: layout paint;
}

.composerShell{
  min-height: 64px;
  transform: translateZ(0);
}

.sendBtn,
.micBtn,
.polishBtn,
.speechBtn{
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body:not(.voiceListening) .micBtn,
.micBtn[aria-pressed="false"],
.micBtn:not(.isListening){
  color: rgba(220, 255, 220, .68) !important;
  text-shadow: none !important;
}

body.voiceListening .micBtn,
.micBtn[aria-pressed="true"],
.micBtn.isListening{
  color: var(--matrix-green) !important;
  text-shadow: 0 0 12px rgba(88,255,132,.18) !important;
}

@media (hover: none), (pointer: coarse){
  .sendBtn:hover,
  .micBtn:hover,
  .polishBtn:hover,
  .speechBtn:hover,
  .sendBtn:focus,
  .micBtn:focus,
  .polishBtn:focus,
  .speechBtn:focus,
  .sendBtn:focus-visible,
  .micBtn:focus-visible,
  .polishBtn:focus-visible,
  .speechBtn:focus-visible{
    color: rgba(220, 255, 220, .68) !important;
    text-shadow: none !important;
    outline: none !important;
  }

  body.voiceListening .micBtn,
  .micBtn[aria-pressed="true"],
  .micBtn.isListening{
    color: var(--matrix-green) !important;
    text-shadow: 0 0 12px rgba(88,255,132,.18) !important;
  }
}

.voiceTranscript,
.composerHint{
  position: absolute !important;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 14px !important;
  pointer-events: none;
  z-index: 2;
}

.voiceTranscript{
  bottom: calc(2px + env(safe-area-inset-bottom));
}

.composerHint{
  bottom: calc(18px + env(safe-area-inset-bottom));
}

.voiceTranscript:empty,
.composerHint:empty{
  display: block !important;
  visibility: hidden;
}

@media (max-width: 680px){
  .composerDock{
    min-height: calc(var(--composer-h) + env(safe-area-inset-bottom));
  }

  .composerShell{
    min-height: 82px;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(40px, auto) 34px;
    align-items: stretch;
  }

  .composerActions{
    min-height: 34px;
  }
}

@media (orientation: landscape) and (max-height: 640px){
  .composerShell{
    min-height: 52px;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto;
  }

  .composerActions{
    min-height: 30px;
  }
}








/* ===== MATRIX CRT SCANLINES ===== */

.appMobile::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;

  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0px,
      rgba(255, 255, 255, 0.035) 1px,
      rgba(0, 0, 0, 0.10) 2px,
      rgba(0, 0, 0, 0.10) 4px
    );

  mix-blend-mode: overlay;
  opacity: 0.32;
}




.voiceTranscript,
.composerHint {
  display: none !important;
}





/* ===== MOBILE STABILITY / ORIENTATION FIX ===== */

html,
body,
.appMobile {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* zapobiega dziwnemu zoomowi i layout shift */


body {
  overflow: hidden;
}



/* scroll tylko w messages */
.messages {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== LANDSCAPE FIX ===== */

@media (orientation: landscape) {

  :root {
    --top-h: 40px;
    --status-h: 0px;
    --composer-h: 78px;
  }

  .messages {
    padding-top: 42px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .composerShell {
    padding: 4px 0;
  }

  .sendBtn,
  .micBtn,
  .polishBtn {
    height: 38px;
    min-width: 72px;
    padding: 0 10px;
    font-size: 11px;
  }

}








