* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(111, 76, 255, 0.35), transparent 35%),
    linear-gradient(135deg, #090914, #14142b 55%, #050509);
  color: white;
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
  backdrop-filter: blur(18px);
}

.orb {
  width: 92px;
  height: 92px;
  margin: 0 auto 22px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 25%, white, #bca7ff 18%, #6d48ff 48%, #25116f 80%);
  box-shadow:
    0 0 35px rgba(133, 94, 255, 0.8),
    0 0 80px rgba(133, 94, 255, 0.35);
}

.eyebrow {
  letter-spacing: 0.22em;
  font-size: 12px;
  opacity: 0.75;
  margin: 0 0 12px;
}

h1 {
  font-size: 34px;
  margin: 0 0 14px;
}

.subtitle {
  opacity: 0.84;
  line-height: 1.5;
  margin-bottom: 28px;
}

.login-form {
  display: grid;
  gap: 14px;
}

input,
select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

select {
  cursor: pointer;
}

select option {
  background: #14142b;
  color: white;
}

button {
  margin-top: 6px;
  padding: 15px 18px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, #9f7cff, #5a35ff);
  color: white;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(91, 54, 255, 0.4);
}

button:hover {
  transform: translateY(-1px);
}

.hint {
  font-size: 13px;
  opacity: 0.55;
  margin-top: 22px;
}


.pulse {
  animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 35px rgba(133, 94, 255, 0.8),
      0 0 80px rgba(133, 94, 255, 0.35);
  }

  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 50px rgba(180, 150, 255, 0.95),
      0 0 120px rgba(133, 94, 255, 0.55);
  }
}

.loading-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  text-align: left;
}

.step {
  opacity: 0.3;
  transform: translateX(-6px);
  transition: all 0.35s ease;
}

.step.active {
  opacity: 1;
  transform: translateX(0);
}

.step.active::before {
  content: "✓ ";
}

.status-box {
  margin: 26px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
}

.status-box p {
  margin: 10px 0;
}

.status-box span {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #8cffc1;
  border-radius: 999px;
  margin-right: 10px;
  box-shadow: 0 0 14px rgba(140, 255, 193, 0.8);
}

.button-link {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #9f7cff, #5a35ff);
  color: white;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 16px 38px rgba(91, 54, 255, 0.4);
}

.soul-id-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(140, 255, 193, 0.08);
  border: 1px solid rgba(140, 255, 193, 0.24);
  text-align: left;
}

.soul-id-box span {
  display: block;
  font-size: 12px;
  opacity: 0.72;
  margin-bottom: 5px;
}

.soul-id-box strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.profile-box {
  margin: 22px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: left;
}

.profile-box h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.profile-box p {
  display: grid;
  gap: 4px;
  margin: 12px 0;
}

.profile-box p span {
  font-size: 12px;
  opacity: 0.62;
}

.profile-box p strong {
  font-size: 14px;
  line-height: 1.35;
}

.profile-box.warning {
  border-color: rgba(255, 190, 90, 0.35);
  background: rgba(255, 190, 90, 0.08);
}

.small-link {
  display: inline-block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-decoration: none;
}

.small-link:hover {
  color: white;
  text-decoration: underline;
}

.error-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 90, 120, 0.10);
  border: 1px solid rgba(255, 90, 120, 0.32);
  text-align: left;
}

.error-box span {
  display: block;
  font-size: 12px;
  opacity: 0.72;
  margin-bottom: 5px;
}

.error-box strong {
  font-size: 14px;
  line-height: 1.35;
}

.profile-mini-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: left;
}

.profile-mini-box span {
  display: block;
  font-size: 12px;
  opacity: 0.72;
  margin-bottom: 5px;
}

.profile-mini-box strong {
  font-size: 14px;
  line-height: 1.35;
}

.world-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 35%, rgba(128, 85, 255, 0.28), transparent 28%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(135deg, #050509, #111124 55%, #070711);
  color: white;
  overflow: hidden;
}

.world-scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  position: relative;
}

.world-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.75) 1px, transparent 1px),
    radial-gradient(circle, rgba(180, 150, 255, 0.45) 1px, transparent 1px);
  background-size: 70px 70px, 110px 110px;
  background-position: 0 0, 35px 55px;
  opacity: 0.22;
}

.world-content {
  width: 100%;
  max-width: 760px;
  padding: 42px;
  border-radius: 34px;
  position: relative;
  z-index: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.world-content h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.03;
  margin: 0 0 18px;
}

.world-subtitle {
  font-size: 18px;
  opacity: 0.82;
  margin: 0 0 34px;
}

.portal-ring {
  width: 260px;
  height: 260px;
  margin: 0 auto 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    conic-gradient(from 180deg, #8f63ff, #f0b7ff, #5d35ff, #8f63ff);
  box-shadow:
    0 0 50px rgba(142, 100, 255, 0.72),
    0 0 140px rgba(142, 100, 255, 0.34);
  animation: portalSpin 7s linear infinite;
}

.portal-core {
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 25%, white, #d7c1ff 18%, #7b4dff 48%, #160a48 82%);
  box-shadow:
    inset 0 0 38px rgba(255, 255, 255, 0.22),
    0 0 60px rgba(190, 150, 255, 0.8);
}

@keyframes portalSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.world-message {
  max-width: 520px;
  margin: 0 auto 28px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.11);
  line-height: 1.55;
}

.world-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-message {
  background: rgba(142, 100, 255, 0.16);
  border-color: rgba(190, 150, 255, 0.32);
  box-shadow: 0 0 32px rgba(142, 100, 255, 0.18);
}

.ai-message p {
  font-size: 17px;
}

.world-status-panel {
  max-width: 620px;
  margin: 0 auto 28px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.13);
  text-align: left;
  box-shadow: 0 0 34px rgba(142, 100, 255, 0.12);
}

.world-status-panel h2 {
  margin: 0 0 18px;
  font-size: 19px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.status-grid p {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-grid span {
  display: block;
  font-size: 12px;
  opacity: 0.62;
  margin-bottom: 6px;
}

.status-grid strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .status-grid {
    grid-template-columns: 1fr;
  }
}

.status-grid .full-width {
  grid-column: 1 / -1;
}


/* =========================================================
   Soul Chat UI - 34CHAT-1
   ========================================================= */

:root {
  --chat-bg-deep: #05050b;
  --chat-panel: rgba(255, 255, 255, 0.075);
  --chat-panel-strong: rgba(255, 255, 255, 0.105);
  --chat-border: rgba(255, 255, 255, 0.14);
  --chat-border-soft: rgba(255, 255, 255, 0.09);
  --chat-text: #ffffff;
  --chat-muted: rgba(255, 255, 255, 0.64);
  --chat-muted-strong: rgba(255, 255, 255, 0.78);
  --chat-violet: #7c4dff;
  --chat-violet-soft: #b794ff;
  --chat-cyan: #39f5ff;
  --chat-gold: #ffd166;
  --chat-shadow: rgba(0, 0, 0, 0.45);
}

.soul-chat-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #05050b;
}

html.atmosphere-violet .soul-chat-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(124, 77, 255, 0.30), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(183, 148, 255, 0.08), transparent 24%),
    linear-gradient(135deg, #05050b, #111126 58%, #050509);
}

html.atmosphere-cyan .soul-chat-page {
  background:
    radial-gradient(circle at 80% 16%, rgba(57, 245, 255, 0.34), transparent 30%),
    radial-gradient(circle at 18% 78%, rgba(124, 77, 255, 0.18), transparent 34%),
    radial-gradient(circle at 55% 105%, rgba(57, 245, 255, 0.20), transparent 34%),
    linear-gradient(135deg, #02070d, #071525 58%, #030409);
}

html.atmosphere-gold .soul-chat-page {
  background:
    radial-gradient(circle at 50% 100%, rgba(255, 209, 102, 0.30), transparent 34%),
    radial-gradient(circle at 18% 18%, rgba(124, 77, 255, 0.20), transparent 28%),
    radial-gradient(circle at 88% 70%, rgba(255, 209, 102, 0.10), transparent 22%),
    linear-gradient(135deg, #080507, #15101b 58%, #050509);
}

html.atmosphere-portal .soul-chat-page {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 7%),
    radial-gradient(circle at 50% 42%, rgba(124, 77, 255, 0.42), transparent 18%),
    radial-gradient(circle at 50% 42%, rgba(57, 245, 255, 0.16), transparent 34%),
    radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0.52), transparent 52%),
    linear-gradient(135deg, #020208, #0b0820 58%, #010104);
}

html.atmosphere-city .soul-chat-page {
  background:
    linear-gradient(to top, rgba(57, 245, 255, 0.18), transparent 30%),
    radial-gradient(circle at 50% 85%, rgba(57, 245, 255, 0.22), transparent 36%),
    radial-gradient(circle at 18% 16%, rgba(124, 77, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #05050b, #0b1624 58%, #050509);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.55) 1px, transparent 1px),
    radial-gradient(circle, rgba(183,148,255,0.42) 1px, transparent 1px);
  background-size: 76px 76px, 118px 118px;
  background-position: 0 0, 42px 58px;
  opacity: 0.18;
  pointer-events: none;
}

.portal-dust {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.dust-particle {
  position: absolute;
  display: block;
  border-radius: 999px;
  opacity: var(--dust-opacity);
  background: rgba(183, 148, 255, 0.82);
  box-shadow:
    0 0 12px rgba(183, 148, 255, 0.40),
    0 0 28px rgba(124, 77, 255, 0.35);
  animation: soulDustFloat linear infinite;
}

@keyframes soulDustFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.8);
  }

  100% {
    transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(1.18);
  }
}

.atmosphere-badge {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  padding: 8px 12px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--chat-muted);
  font-size: 12px;
  backdrop-filter: blur(14px);
}

.atmosphere-badge::before {
  content: attr(data-label);
}

.chat-app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.chat-frame {
  width: min(1180px, 100%);
  height: min(880px, calc(100vh - 56px));
  max-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--chat-border);
  border-radius: 32px;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.035) 42%,
      rgba(57, 245, 255, 0.055)
    );
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
}

.chat-main,
.soul-panel {
  min-width: 0;
}


.chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--chat-border-soft);
  border-radius: 26px;
  background: rgba(0, 0, 0, 0.10);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--chat-border-soft);
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-header .orb {
  width: 58px;
  height: 58px;
  margin: 0;
}

.title-block h1 {
  margin: 0;
  font-size: 28px;
}

.header-pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.connection-pill,
.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--chat-muted-strong);
  font-size: 13px;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  background: #8cffc1;
  box-shadow: 0 0 14px rgba(140, 255, 193, 0.8);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  scroll-behavior: smooth;
  background: transparent;
}

.system-note {
  align-self: center;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--chat-muted);
  font-size: 12px;
  text-align: center;
}

.message {
  max-width: 78%;
  display: grid;
  gap: 6px;
}

.message.ai {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
}

.message-label {
  padding: 0 4px;
  color: var(--chat-muted);
  font-size: 12px;
}

.message.user .message-label {
  text-align: right;
}

.bubble {
  padding: 14px 16px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 20px;
  color: white;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bubble:has(.soul-code-wrap) {
  padding-top: 10px;
  padding-bottom: 10px;
}

.message.ai .bubble {
  border-top-left-radius: 8px;
  background:
    linear-gradient(135deg, rgba(124, 77, 255, 0.22), rgba(255, 255, 255, 0.07));
}

.message.user .bubble {
  border-top-right-radius: 8px;
  background:
    linear-gradient(135deg, rgba(57, 245, 255, 0.18), rgba(124, 77, 255, 0.22));
}


/* =========================================================
   Soul Generated File Cards - 36FILE-GEN-1G
   ========================================================= */

.ai-generated-file-answer-content {
  display: grid;
  gap: 10px;
  white-space: normal;
}

.message.ai .bubble:has(
  .ai-generated-file-answer-content
) {
  white-space: normal;
}

.ai-generated-file-answer-content--compact {
  display: inline-grid;
  width: fit-content;
  gap: 4px;
}

.ai-generated-file-answer-content--compact .ai-generated-file-download-list {
  margin-top: 0;
}

.ai-generated-file-answer-content--compact-with-text {
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  justify-items: start;
  align-items: start;
}

.ai-generated-file-answer-content--compact-with-text
.ai-generated-file-download-list {
  margin-top: 0;
}

.ai-generated-file-answer-content--compact-with-text
.ai-generated-file-answer-text {
  max-width: 380px;
  text-align: left;
}

.ai-generated-file-answer-content--compact-with-text
.ai-generated-file-answer-text p {
  margin: 0;
}

.message.ai:has(
  .ai-generated-file-answer-content--compact-with-text
) {
  width: fit-content;
  max-width: min(78%, 430px);
}

.message.ai:has(
  .ai-generated-file-answer-content--compact-with-text
) .bubble {
  width: fit-content;
  min-width: 0;
  padding: 12px 14px;
}


.ai-generated-file-answer-text {
  white-space: pre-wrap;
  text-align: left;
}

.ai-generated-file-download-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  white-space: normal;
}

.ai-generated-file-card {
  width: fit-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    filter 0.16s ease,
    opacity 0.16s ease;
}

.ai-generated-file-card:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.ai-generated-file-card:active {
  transform: translateY(0);
}

.ai-generated-file-card:focus-visible {
  outline: 2px solid rgba(183, 148, 255, 0.72);
  outline-offset: 5px;
}

.ai-generated-file-icon {
  width: 36px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #9f7cff;
  filter:
    drop-shadow(0 0 5px rgba(159, 124, 255, 0.42))
    drop-shadow(0 0 12px rgba(124, 77, 255, 0.20));
  transition:
    transform 0.16s ease,
    color 0.16s ease,
    filter 0.16s ease;
}

.ai-generated-file-svg {
  width: 31px;
  height: 37px;
  display: block;
  fill: currentColor;
}

.ai-generated-file-card:hover .ai-generated-file-icon {
  transform: translateY(-1px) scale(1.04);
  color: #b79cff;
  filter:
    drop-shadow(0 0 7px rgba(183, 156, 255, 0.56))
    drop-shadow(0 0 16px rgba(124, 77, 255, 0.28));
}

.ai-generated-file-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ai-generated-file-main strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.ai-generated-file-card:hover .ai-generated-file-main strong {
  color: var(--chat-violet-soft);
}

.ai-generated-file-main span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.25;
}


/* =========================================================
   Soul Code Blocks - 36CODE-1B
   ========================================================= */

.soul-code-wrap {
  margin: 6px 0;
  overflow: hidden;
  border: 1px solid rgba(57, 245, 255, 0.18);
  border-radius: 16px;
  background: rgba(8, 10, 24, 0.92);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  white-space: normal;
}

.soul-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 6px 10px 6px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(
      135deg,
      rgba(57, 245, 255, 0.10),
      rgba(124, 77, 255, 0.14)
    );
  color: rgba(255, 255, 255, 0.72);
  font-family: Consolas, "Cascadia Code", "Fira Code", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.soul-code-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(57, 245, 255, 0.24);
  border-radius: 999px;
  background: rgba(57, 245, 255, 0.10);
  color: rgba(255, 255, 255, 0.84);
  font-family: Consolas, "Cascadia Code", "Fira Code", monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: none;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.soul-code-copy-label {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1;
  pointer-events: none;
}

.soul-code-copy-button:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 245, 255, 0.42);
  background: rgba(57, 245, 255, 0.16);
}

.soul-code-copy-button:active {
  transform: translateY(0);
}

.soul-code-block {
  display: block;
  margin: 0;
  padding: 8px 14px 12px;
  overflow-x: auto;
  background: transparent;
  white-space: pre;
}

.soul-code-block code {
  display: block;
  margin: 0;
  padding: 0;
  font-family: Consolas, "Cascadia Code", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 4;
  white-space: pre;
}

.soul-inline-code {
  padding: 2px 6px;
  border: 1px solid rgba(57, 245, 255, 0.18);
  border-radius: 7px;
  background: rgba(57, 245, 255, 0.08);
  color: rgba(190, 235, 255, 0.98);
  font-family: Consolas, "Cascadia Code", "Fira Code", monospace;
  font-size: 0.92em;
  white-space: nowrap;
}

.soul-code-block::-webkit-scrollbar {
  height: 9px;
}

.soul-code-block::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(57, 245, 255, 0.22);
}

.soul-code-block::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.typing-message .bubble {
  color: var(--chat-muted-strong);
  font-style: italic;
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--chat-border-soft);
  background: rgba(0, 0, 0, 0.10);
}

.composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 140px;
  margin: 0;
  padding: 15px 16px;
  resize: none;
  overflow-y: auto;
  line-height: 1.35;
  font-family: inherit;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: white;
  outline: none;
}

.composer textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.composer textarea:focus {
  border-color: rgba(57, 245, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(57, 245, 255, 0.08);
}

.composer textarea::-webkit-scrollbar {
  width: 8px;
}

.composer textarea::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
}

.icon-button,
.send-button {
  height: 48px;
  margin: 0;
}

.icon-button {
  width: 48px;
  border-radius: 999px;
  padding: 0;
}



.attachment-menu-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.attachment-menu-button {
  font-size: 24px;
  line-height: 1;
}

.attachment-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  min-width: 160px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 18px;
  background: rgba(10, 10, 22, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.attachment-menu[hidden] {
  display: none;
}

.attachment-menu-item {
  --attachment-accent: rgba(255, 255, 255, 0.82);
  --attachment-accent-soft: rgba(255, 255, 255, 0.12);

  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  color: var(--attachment-accent);
  font-size: 13px;
  text-align: left;
}

.attachment-menu-item-file {
  --attachment-accent: #C9A7FF;
  --attachment-accent-hover: #D8BCFF;
  --attachment-accent-soft: rgba(201, 167, 255, 0.16);
  --attachment-accent-focus: rgba(201, 167, 255, 0.28);
}

.attachment-menu-item-image {
  --attachment-accent: #8FE8FF;
  --attachment-accent-hover: #B6F1FF;
  --attachment-accent-soft: rgba(143, 232, 255, 0.16);
  --attachment-accent-focus: rgba(143, 232, 255, 0.28);
}

.attachment-menu-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  flex: 0 0 20px;
  place-items: center;
  color: currentColor;
}

.attachment-menu-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.attachment-menu-label {
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.attachment-menu-item:hover {
  color: var(--attachment-accent-hover);
  border-color: var(--attachment-accent-focus);
  background: var(--attachment-accent-soft);
  box-shadow: 0 0 18px var(--attachment-accent-soft);
}

.attachment-menu-item:focus-visible {
  outline: 2px solid var(--attachment-accent);
  outline-offset: 2px;
  background: var(--attachment-accent-soft);
}

.attachment-menu-item:active {
  transform: translateY(0) scale(0.98);
}

.hidden-file-input {
  display: none;
}

.attachment-draft-message {
  max-width: 74%;
  opacity: 0.92;
}

.attachment-draft-bubble {
  display: grid;
  gap: 5px;
  border-color: rgba(57, 245, 255, 0.22);
  background: rgba(57, 245, 255, 0.08);
}

.attachment-draft-bubble strong {
  font-size: 13px;
  word-break: break-word;
}

.attachment-draft-bubble span {
  color: var(--chat-muted-strong);
  font-size: 12px;
}


.attachment-status.is-uploading {
  color: rgba(255, 231, 145, 0.92);
}

.attachment-status.is-ready {
  color: rgba(142, 255, 202, 0.92);
}

.attachment-status.is-error {
  color: rgba(255, 143, 143, 0.94);
}



.send-button:disabled,
.composer input:disabled,
.composer textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.soul-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  height: 100%;
  overflow: hidden;
  padding-right: 0;
}

.panel-card {
  padding: 16px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(16px);
}

.panel-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.profile-line {
  display: grid;
  gap: 3px;
  margin: 10px 0;
}

.profile-line span {
  color: var(--chat-muted);
  font-size: 12px;
}

.profile-line strong {
  font-size: 14px;
  line-height: 1.35;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--chat-muted-strong);
  font-size: 14px;
}

.memory-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 10px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--chat-muted-strong);
  font-size: 12px;
}

.chip.gold {
  border-color: rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.12);
  color: rgba(255, 226, 157, 0.94);
}

.tiny-note {
  margin: 12px 0 0;
  color: var(--chat-muted);
  font-size: 12px;
  line-height: 1.45;
}

.world-button-wrap {
  position: relative;
  border-radius: 18px;
}

.world-button {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, rgba(57,245,255,0.92), rgba(124,77,255,0.94));
  color: white;
  font-weight: bold;
  text-decoration: none;
  box-shadow:
    0 16px 38px rgba(57,245,255,0.18),
    0 0 26px rgba(124,77,255,0.24);
}

.world-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(80,250,255,1), rgba(145,95,255,1));
  filter: brightness(1.08);
}

.button-label {
  position: relative;
  z-index: 2;
}

.button-shine {
  position: absolute;
  top: 0;
  left: -45%;
  width: 38%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.22),
    transparent
  );
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
}

.world-button:hover .button-shine {
  animation: buttonShineSweep 0.72s ease forwards;
}

@keyframes buttonShineSweep {
  0% {
    left: -45%;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  82% {
    opacity: 1;
  }

  100% {
    left: 108%;
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .chat-frame {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .soul-panel {
    order: -1;
  }

  .chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-pills {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .chat-app-shell {
    width: 100%;
    padding: 0;
  }

  .chat-frame {
    min-height: 100vh;
    border-radius: 0;
    padding: 10px;
  }

  .messages {
    padding: 16px;
  }

  .message {
    max-width: 92%;
  }

  .composer {
    grid-template-columns: auto 1fr auto;
  }

  .composer .attachment-menu-button {
    display: grid;
  }

  .attachment-menu {
    left: 0;
    right: auto;
  }
}

/* =========================================================
   Soul Chat Navigation Polish - 34CHAT-2
   ========================================================= */

.chat-side-link {
  display: inline-block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

.chat-side-link:hover {
  color: white;
  text-decoration: underline;
}

/* =========================================================
   Soul Chat Local Conversation Controls - 34CHAT-3B
   ========================================================= */

.chat-side-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.chat-panel-button {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

.chat-panel-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.chat-panel-button.subtle {
  color: rgba(255, 255, 255, 0.62);
}

.chat-panel-button.subtle:hover {
  color: #ffffff;
}

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

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

.messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* =========================================================
   Soul Chat Side Panel Compact Fit - 34CHAT polish
   ========================================================= */

.soul-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding-right: 0;
}

.panel-card {
  padding: 14px;
  border: 1px solid var(--chat-border-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(16px);
}

.panel-card h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.profile-line {
  display: grid;
  gap: 2px;
  margin: 8px 0;
}

.profile-line span {
  color: var(--chat-muted);
  font-size: 11px;
}

.profile-line strong {
  font-size: 13px;
  line-height: 1.25;
}

.status-list {
  display: grid;
  gap: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--chat-muted-strong);
  font-size: 13px;
}

.memory-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 9px;
  font-size: 11px;
}

.tiny-note {
  margin: 9px 0 0;
  color: var(--chat-muted);
  font-size: 11px;
  line-height: 1.35;
}

.chat-side-actions {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.chat-panel-button {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 13px;
  font-size: 12px;
}

/* =========================================================
   Soul Chat Debug Status - 34CHAT-4D
   ========================================================= */

.chat-debug-box {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.chat-debug-box p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.chat-debug-box span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 10px;
}

.chat-debug-box strong {
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 700;
  word-break: break-word;
}


/* =========================================================
   Soul Archive page - 34CHAT-5G
   ========================================================= */

.soul-archive-body {
  min-height: 100vh;
  margin: 0;
  color: white;
  background:
    radial-gradient(circle at top left, rgba(120, 83, 255, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(57, 220, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #090716 0%, #07151e 50%, #130a1f 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.soul-archive-shell {
  width: min(1180px, calc(100% - 34px));
  margin: 0 auto;
  padding: 52px 0 70px;
}

.soul-archive-hero {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(13, 15, 32, 0.72);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.soul-archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(125, 82, 255, 0.26), transparent 28%),
    radial-gradient(circle at 88% 40%, rgba(57, 220, 255, 0.18), transparent 30%);
  pointer-events: none;
}

.soul-archive-hero > * {
  position: relative;
  z-index: 1;
}

.soul-archive-orb {
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
}

.soul-archive-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.soul-archive-subtitle {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
  line-height: 1.6;
}

.soul-archive-profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.soul-archive-profile-strip span {
  display: inline-flex;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.soul-archive-profile-strip strong {
  color: white;
}

.soul-archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0;
}

.soul-archive-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.soul-archive-tab,
.soul-archive-back-button,
.soul-archive-open-button,
.soul-archive-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.soul-archive-tab.active {
  border-color: rgba(57, 220, 255, 0.44);
  background: linear-gradient(135deg, rgba(57, 220, 255, 0.24), rgba(125, 82, 255, 0.24));
  box-shadow: 0 0 28px rgba(57, 220, 255, 0.12);
}

.soul-archive-back-button {
  background: linear-gradient(135deg, rgba(57, 220, 255, 0.84), rgba(125, 82, 255, 0.9));
}

.soul-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.soul-archive-card {
  position: relative;
  min-height: 260px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.soul-archive-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
  pointer-events: none;
}

.soul-archive-card-0::before {
  background: linear-gradient(135deg, rgba(31, 95, 156, 0.45), rgba(20, 19, 54, 0.78));
}

.soul-archive-card-1::before {
  background: linear-gradient(135deg, rgba(98, 32, 132, 0.48), rgba(20, 11, 42, 0.82));
}

.soul-archive-card-2::before {
  background: linear-gradient(135deg, rgba(132, 35, 82, 0.45), rgba(16, 9, 35, 0.84));
}

.soul-archive-card:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 220, 255, 0.34);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.36),
    0 0 38px rgba(125, 82, 255, 0.12);
}

.soul-archive-card > * {
  position: relative;
  z-index: 1;
}

.soul-archive-card-top,
.soul-archive-meta,
.soul-archive-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.soul-archive-card-top {
  justify-content: space-between;
  margin-bottom: 18px;
}

.soul-archive-status,
.soul-archive-source {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.soul-archive-card h2 {
  margin: 0;
  min-height: 64px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.soul-archive-preview {
  min-height: 74px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.45;
}

.soul-archive-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.soul-archive-actions {
  margin-top: 18px;
}

.soul-archive-open-button {
  background: linear-gradient(135deg, rgba(57, 220, 255, 0.82), rgba(125, 82, 255, 0.88));
}

.soul-archive-action-button {
  font-family: inherit;
}

.soul-archive-empty {
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.soul-archive-empty h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.soul-archive-empty p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.68);
}

@media (max-width: 980px) {
  .soul-archive-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .soul-archive-shell {
    width: min(100% - 22px, 1180px);
    padding: 24px 0 44px;
  }

  .soul-archive-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .soul-archive-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .soul-archive-tabs,
  .soul-archive-back-button {
    width: 100%;
  }

  .soul-archive-tab {
    flex: 1;
  }

  .soul-archive-grid {
    grid-template-columns: 1fr;
  }

  .soul-archive-card {
    min-height: auto;
  }
}

/* =========================================================
   Chat side main action buttons
   ========================================================= */

.chat-side-main-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #39dfff, #7657ff);
  color: white;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 14px 34px rgba(88, 91, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.chat-side-main-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 18px 42px rgba(88, 91, 255, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.chat-side-main-button:active {
  transform: translateY(0);
}

/* =========================================================
   Chat side Living City action card fix
   ========================================================= */

.chat-side-actions-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  flex-shrink: 0;
}

.chat-side-actions-card .world-button-wrap {
  margin: 0;
}

.chat-side-actions-card .world-button {
  min-height: 40px;
  border-radius: 16px;
}

.chat-side-actions-card .button-label {
  font-size: 13px;
  font-weight: 900;
}

.chat-side-actions-card .chat-side-note {
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
}

.chat-side-actions {
  display: grid;
  gap: 6px;
}

.chat-side-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}


/* =========================================================
   Clean chat side action layout - 34CHAT-5G cleanup
   ========================================================= */

.soul-archive-card-mini {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.soul-archive-note {
  margin: 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.68);
}

.chat-side-main-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 10px 14px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #39dfff, #7657ff);
  color: white !important;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  box-shadow:
    0 14px 34px rgba(88, 91, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.chat-side-actions-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.chat-side-actions-card .world-button-wrap {
  margin: 0;
}

.chat-side-actions-card .world-button {
  min-height: 38px;
  border-radius: 16px;
}

.chat-side-actions-card .button-label {
  font-size: 13px;
  font-weight: 900;
}

.chat-side-actions-card .chat-side-note {
  margin: 0;
  font-size: 10px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.68);
}

.chat-side-actions {
  display: grid;
  gap: 7px;
}

.chat-side-button,
.chat-side-actions a.chat-side-button,
.chat-side-actions button.chat-side-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86) !important;
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
}

.chat-side-button:hover,
.chat-side-actions a.chat-side-button:hover,
.chat-side-actions button.chat-side-button:hover {
  background: rgba(255, 255, 255, 0.13);
  color: white !important;
}


/* =========================================================
   Final chat side spacing polish - 34CHAT-5G cleanup
   ========================================================= */

.chat-side-actions-card {
  margin-top: 14px;
  padding: 16px;
  gap: 12px;
}

.soul-archive-card-mini {
  margin-top: 14px;
  padding: 16px;
  gap: 9px;
}

.chat-side-main-button,
.chat-side-actions-card .world-button {
  min-height: 40px;
}

.soul-archive-note,
.chat-side-actions-card .chat-side-note {
  margin-top: 2px;
  margin-bottom: 6px;
}

.chat-side-actions {
  gap: 9px;
  margin-top: 2px;
}

.chat-side-button {
  min-height: 31px;
}

.panel-card + .panel-card {
  margin-top: 14px;
}

/* =========================================================
   Final side action button readability polish
   ========================================================= */

/* =========================================================
   Final side action button dark readability polish
   ========================================================= */

.chat-side-actions .chat-side-button,
.chat-side-actions a.chat-side-button,
.chat-side-actions button.chat-side-button {
  background:
    linear-gradient(
      135deg,
      rgba(38, 49, 72, 0.78),
      rgba(58, 62, 91, 0.72)
    ) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: rgba(255, 255, 255, 0.96) !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.15);
}

.chat-side-actions .chat-side-button:hover,
.chat-side-actions a.chat-side-button:hover,
.chat-side-actions button.chat-side-button:hover {
  background:
    linear-gradient(
      135deg,
      rgba(23, 39, 66, 0.94),
      rgba(55, 47, 96, 0.90)
    ) !important;
  border-color: rgba(95, 226, 255, 0.36) !important;
  color: white !important;
}

.chat-side-actions .chat-side-button {
  font-size: 12px;
}


/* =========================================================
   Soul Chat Image Attachment Preview - 36FILE-1W-A
   ========================================================= */

.attachment-draft-bubble.has-image-preview {
  width: min(420px, 100%);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.attachment-image-preview-wrap {
  width: 100%;
  max-height: 260px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.attachment-image-preview {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.attachment-draft-meta {
  display: grid;
  gap: 5px;
}

.attachment-draft-meta strong {
  word-break: break-word;
}

.attachment-size {
  font-size: 12px;
  opacity: 0.68;
}


/* =========================================================
   Soul Chat Sent Message Image Preview - 36FILE-1W-B
   ========================================================= */

.message-attachment-preview-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.message-sent-attachment-list {
  width: min(320px, 100%);
  justify-items: stretch;
}

.message-sent-attachment-card {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.06)
    );
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.message-sent-attachment-file-icon,
.message-sent-attachment-thumbnail-wrap {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  flex: 0 0 auto;
}

.message-sent-attachment-file-icon {
  color: #C9A7FF;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(201, 167, 255, 0.28), rgba(124, 77, 255, 0.16));
  border: 1px solid rgba(201, 167, 255, 0.30);
  filter:
    drop-shadow(0 0 5px rgba(201, 167, 255, 0.24))
    drop-shadow(0 0 10px rgba(124, 77, 255, 0.14));
}

.message-sent-attachment-file-icon .attachment-preview-file-svg {
  width: 18px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.message-sent-attachment-thumbnail-wrap {
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(143, 232, 255, 0.24);
  box-shadow:
    0 0 9px rgba(143, 232, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.message-sent-attachment-thumbnail {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.message-sent-attachment-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.message-sent-attachment-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.96);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-sent-attachment-meta {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-image-preview-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.message-image-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 15px;
}

.message-text-with-attachments {
  margin-top: 4px;
}

/* =========================================================
   Soul Chat AI Image Answer Bubble - 36UI-1C
   ========================================================= */

.message.ai.image-attachment-followup {
  align-self: flex-start;
  width: auto;
  max-width: 86%;
  margin-top: 0;
  margin-right: 0;
}

.ai-image-answer-bubble-content {
  display: grid;
  gap: 14px;
}

.ai-image-answer-preview-list {
  display: grid;
  gap: 10px;
}

.ai-image-answer-preview-wrap {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ai-image-answer-preview {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 17px;
}

.ai-image-answer-text {
  display: block;
}

.soul-chat-page.share-mode-active .message.ai.image-attachment-followup {
  max-width: 760px;
}

.soul-chat-page.share-mode-active .ai-image-answer-preview-wrap {
  max-height: 560px;
  border-radius: 22px;
}

.soul-chat-page.share-mode-active .ai-image-answer-preview {
  max-height: 560px;
  border-radius: 21px;
}

@media (max-width: 560px) {
  .message.ai.image-attachment-followup {
    max-width: 92%;
  }

  .ai-image-answer-preview-wrap,
  .ai-image-answer-preview {
    max-height: 420px;
  }
}

/* =========================================================
   Soul Chat Share Mode - 36SHARE-1A
   ========================================================= */

.soul-chat-page.share-mode-active .chat-app-shell {
  padding: 18px;
}

.soul-chat-page.share-mode-active .chat-frame {
  width: min(1480px, 100%);
  height: min(940px, calc(100vh - 36px));
  max-height: calc(100vh - 36px);
  grid-template-columns: minmax(0, 1fr);
  padding: 20px;
}

.soul-chat-page.share-mode-active .soul-panel {
  display: none;
}

.soul-chat-page.share-mode-active .chat-main {
  border-radius: 28px;
}

.soul-chat-page.share-mode-active .chat-header {
  padding: 16px 22px;
}

.soul-chat-page.share-mode-active .header-pills {
  display: none;
}

.soul-chat-page.share-mode-active .system-note {
  display: none;
}

.soul-chat-page.share-mode-active .atmosphere-badge {
  display: none;
}

.soul-chat-page.share-mode-active .messages {
  gap: 18px;
  padding: 28px 34px;
}

.soul-chat-page.share-mode-active .message {
  max-width: 90%;
}

.soul-chat-page.share-mode-active .message.ai {
  max-width: 86%;
}

.soul-chat-page.share-mode-active .message.user {
  max-width: 82%;
}

.soul-chat-page.share-mode-active .bubble {
  padding: 16px 19px;
  font-size: 16px;
  line-height: 1.58;
}

.soul-chat-page.share-mode-active .message-label {
  font-size: 12px;
  opacity: 0.76;
}

.soul-chat-page.share-mode-active .message-attachment-preview-list {
  margin-bottom: 12px;
}

.soul-chat-page.share-mode-active .message-image-preview-wrap {
  width: min(620px, 100%);
  max-width: 100%;
  display: flex;
  justify-content: center;
  overflow: visible;
  border-radius: 22px;
}

.soul-chat-page.share-mode-active .message-image-preview {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 21px;
}

.soul-chat-page.share-mode-active .composer {
  padding: 16px 22px;
}

.share-mode-toggle-button[aria-pressed="true"] {
  border-color: rgba(57, 245, 255, 0.46) !important;
  background:
    linear-gradient(
      135deg,
      rgba(57, 245, 255, 0.22),
      rgba(124, 77, 255, 0.34)
    ) !important;
  color: white !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 22px rgba(57, 245, 255, 0.18) !important;
}

@media (max-width: 900px) {
  .soul-chat-page.share-mode-active .chat-frame {
    width: 100%;
    height: min(940px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    padding: 12px;
  }

  .soul-chat-page.share-mode-active .messages {
    padding: 20px;
  }

  .soul-chat-page.share-mode-active .message,
  .soul-chat-page.share-mode-active .message.ai,
  .soul-chat-page.share-mode-active .message.user {
    max-width: 94%;
  }
}

@media (max-width: 560px) {
  .soul-chat-page.share-mode-active .chat-app-shell {
    padding: 0;
  }

  .soul-chat-page.share-mode-active .chat-frame {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .soul-chat-page.share-mode-active .messages {
    padding: 16px;
  }

  .soul-chat-page.share-mode-active .bubble {
    font-size: 15px;
  }
}

/* =========================================================
   Soul Chat Share Mode Exit Button - 36SHARE-1A-FIX
   ========================================================= */

.share-mode-exit-button {
  display: none;
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 80;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid rgba(57, 245, 255, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(
      135deg,
      rgba(57, 245, 255, 0.20),
      rgba(124, 77, 255, 0.34)
    );
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(57, 245, 255, 0.16);
  backdrop-filter: blur(16px);
}

.soul-chat-page.share-mode-active .share-mode-exit-button {
  display: inline-flex;
}

.share-mode-exit-button:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 245, 255, 0.54);
  background:
    linear-gradient(
      135deg,
      rgba(57, 245, 255, 0.28),
      rgba(124, 77, 255, 0.44)
    );
}

@media (max-width: 560px) {
  .share-mode-exit-button {
    top: 12px;
    right: 12px;
    min-height: 38px;
    padding: 9px 12px;
    font-size: 12px;
  }
}

/* =========================================================
   Soul Chat Streamed Answer Polish - 36SHARE-1B
   ========================================================= */

.final-message .bubble,
.turbo-message .bubble {
  font-style: normal;
}


/* =========================================================
   Soul Chat User Image Analysis Panel - 36UI-1E
   ========================================================= */

.message.user .bubble:has(.user-image-analysis-panel) {
  max-width: min(760px, 100%);
}

.message.user .bubble:has(.user-image-analysis-panel) .message-attachment-preview-list {
  margin-bottom: 10px;
}

.message.user .bubble:has(.user-image-analysis-panel) .message-image-preview-wrap {
  max-height: 320px;
  overflow: hidden;
}

.message.user .bubble:has(.user-image-analysis-panel) .message-image-preview {
  max-height: 320px;
  object-fit: contain;
}

.message.user .bubble:has(.user-image-analysis-panel) .message-text-with-attachments {
  margin-top: 10px;
  margin-bottom: 10px;
}

.user-image-analysis-panel {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-image-analysis-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.user-image-analysis-label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.84);
}

.user-image-analysis-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-image-analysis-text {
  color: rgba(255, 255, 255, 0.96);
  line-height: 1.68;
}

.user-image-analysis-text p:first-child {
  margin-top: 0;
}

.user-image-analysis-text p:last-child {
  margin-bottom: 0;
}

.soul-chat-page.share-mode-active .message.user .bubble:has(.user-image-analysis-panel) .message-image-preview-wrap {
  max-height: 300px;
}

.soul-chat-page.share-mode-active .message.user .bubble:has(.user-image-analysis-panel) .message-image-preview {
  max-height: 300px;
}

.soul-chat-page.share-mode-active .user-image-analysis-panel {
  margin-top: 12px;
  padding-top: 12px;
}


/* =========================================================
   Soul Chat Final Compact Image Analysis - 36UI-1G
   ========================================================= */

.message.user.has-inline-image-analysis {
  width: min(680px, 72%);
  max-width: min(680px, 72%);
}

.message.user.has-inline-image-analysis .bubble {
  padding: 10px 12px 12px;
  border-radius: 22px;
}

.message.user.has-inline-image-analysis .message-attachment-preview-list {
  gap: 0;
  margin: 0 0 6px;
}

.message.user.has-inline-image-analysis .message-image-preview-wrap {
  width: min(520px, 100%);
  max-height: 220px;
  margin: 0 auto 6px;
  overflow: hidden;
  border-radius: 16px;
}

.message.user.has-inline-image-analysis .message-image-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 15px;
}

.message.user.has-inline-image-analysis .message-text-with-attachments[hidden] {
  display: none;
}

.message.user.has-inline-image-analysis .user-image-analysis-header,
.message.user.has-inline-image-analysis .user-image-analysis-label,
.message.user.has-inline-image-analysis .user-image-analysis-badge {
  display: none !important;
}

.message.user.has-inline-image-analysis .user-image-analysis-panel {
  margin-top: 4px;
  padding-top: 4px;
  border-top: none;
}

.message.user.has-inline-image-analysis .user-image-analysis-text {
  color: rgba(255, 255, 255, 0.97);
  line-height: 1.62;
}

.message.user.has-inline-image-analysis .user-image-analysis-text br:first-child {
  display: none;
}

.message.user.has-inline-image-analysis .user-image-analysis-text br + br {
  display: none;
}

.soul-chat-page.share-mode-active .message.user.has-inline-image-analysis {
  width: min(660px, 70%);
  max-width: min(660px, 70%);
}

.soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview-wrap,
.soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview {
  max-height: 210px;
}

@media (max-width: 900px) {
  .message.user.has-inline-image-analysis,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis {
    width: 88%;
    max-width: 88%;
  }
}

@media (max-width: 560px) {
  .message.user.has-inline-image-analysis,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis {
    width: 94%;
    max-width: 94%;
  }

  .message.user.has-inline-image-analysis .message-image-preview-wrap,
  .message.user.has-inline-image-analysis .message-image-preview,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview-wrap,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview {
    max-height: 200px;
  }
}


/* =========================================================
   Soul Chat Inline Image Analysis Gap Fix - 36UI-1H
   ========================================================= */

.message.user.has-inline-image-analysis .bubble {
  white-space: normal;
  display: grid;
  gap: 0;
  padding: 8px 10px 10px;
}

.message.user.has-inline-image-analysis .message-attachment-preview-list {
  display: grid;
  gap: 0;
  margin: 0;
  line-height: 0;
}

.message.user.has-inline-image-analysis .message-image-preview-wrap {
  width: min(460px, 100%);
  max-height: 180px;
  margin: 0 auto 4px;
  line-height: 0;
  overflow: hidden;
  border-radius: 15px;
}

.message.user.has-inline-image-analysis .message-image-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 14px;
}

.message.user.has-inline-image-analysis .user-image-analysis-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.message.user.has-inline-image-analysis .user-image-analysis-text {
  margin-top: 0;
  padding-top: 0;
  white-space: normal;
  line-height: 1.58;
}

.message.user.has-inline-image-analysis .user-image-analysis-text p,
.message.user.has-inline-image-analysis .user-image-analysis-text div {
  margin-top: 0;
}

.soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview-wrap,
.soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview {
  max-height: 170px;
}

@media (max-width: 560px) {
  .message.user.has-inline-image-analysis .message-image-preview-wrap,
  .message.user.has-inline-image-analysis .message-image-preview,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview-wrap,
  .soul-chat-page.share-mode-active .message.user.has-inline-image-analysis .message-image-preview {
    max-height: 165px;
  }
}


/* =========================================================
   Soul Chat Inline Image Analysis Label Cleanup - 36UI-1I
   ========================================================= */

.message.user.has-inline-image-analysis > .message-label {
  display: none;
}


/* =========================================================
   Soul Chat Visible Attachment Tray Reset - 36FILE-UI-ATTACH-1B-O
   ========================================================= */

.composer-input-shell {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
  color: white;
  outline: none;
  overflow: hidden;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.composer-input-shell:focus-within {
  border-color: rgba(57, 245, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(57, 245, 255, 0.08);
}

.composer-input-shell.has-attachment-drafts,
.composer-input-shell:has(.attachment-draft-message) {
  min-height: 78px;
  display: grid;
  grid-template-rows: 38px 20px;
  align-content: start;
  gap: 3px;
  padding: 7px 8px 6px;
}

.composer .composer-input-shell textarea,
.composer .composer-input-shell textarea:focus {
  width: 100%;
  min-height: 30px;
  max-height: 120px;
  margin: 0;
  padding: 5px 6px;
  resize: none;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: white;
  outline: none;
  line-height: 1.25;
}

.composer-input-shell.has-attachment-drafts textarea,
.composer-input-shell.has-attachment-drafts textarea:focus,
.composer-input-shell:has(.attachment-draft-message) textarea,
.composer-input-shell:has(.attachment-draft-message) textarea:focus {
  min-height: 20px;
  height: 20px;
  padding: 0 6px 1px;
  line-height: 1.18;
  align-self: start;
}

.composer .composer-input-shell textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.attachment-composer-tray-wrap {
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  display: block;
  margin: 0;
  overflow: hidden;
}

.attachment-composer-tray-wrap[hidden] {
  display: none !important;
}

.attachment-draft-tray {
  width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  padding: 0 4px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.attachment-draft-tray::-webkit-scrollbar {
  height: 5px;
}

.attachment-draft-tray::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.attachment-draft-tray::-webkit-scrollbar-track {
  background: transparent;
}

.attachment-draft-message {
  all: unset;
  box-sizing: border-box;
  flex: 0 0 176px;
  width: 176px;
  max-width: 176px;
  height: 38px;
  min-height: 38px;
  display: block;
  opacity: 1;
  visibility: visible;
  overflow: visible;
}

.attachment-draft-message .message-label {
  display: none !important;
}

.attachment-draft-bubble,
.attachment-draft-bubble.has-image-preview {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  min-height: 38px;
  display: block;
  opacity: 1;
  visibility: visible;
  overflow: visible;
  font-family: inherit;
  color: white;
}

.attachment-preview-card {
  box-sizing: border-box;
  position: relative;
  width: 100%;
  height: 36px;
  min-height: 36px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 3px 23px 3px 5px;
  opacity: 1;
  visibility: visible;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.06)
    );
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.attachment-preview-card-image {
  grid-template-columns: 30px minmax(0, 1fr);
}

.attachment-preview-file-icon,
.attachment-preview-thumbnail-wrap {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  flex: 0 0 auto;
}

.attachment-preview-file-icon {
  color: #C9A7FF;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(201, 167, 255, 0.28), rgba(124, 77, 255, 0.16));
  border: 1px solid rgba(201, 167, 255, 0.30);
  filter:
    drop-shadow(0 0 5px rgba(201, 167, 255, 0.24))
    drop-shadow(0 0 10px rgba(124, 77, 255, 0.14));
}

.attachment-preview-file-svg {
  width: 18px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.attachment-preview-thumbnail-wrap {
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(143, 232, 255, 0.24);
  box-shadow:
    0 0 9px rgba(143, 232, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.attachment-preview-thumbnail {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.attachment-preview-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.attachment-preview-name {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.96);
  font-size: 10.8px;
  font-weight: 850;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview-meta-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9.4px;
  line-height: 1.08;
  white-space: nowrap;
}

.attachment-preview-type {
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-preview-meta-row.attachment-preview-error {
  color: rgba(255, 143, 143, 0.96);
}

.attachment-preview-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  opacity: 0.94;
}

.attachment-preview-status::before {
  content: "";
  width: 4px;
  height: 4px;
  display: inline-block;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  opacity: 0.88;
}

.attachment-status.is-uploading {
  color: rgba(255, 231, 145, 0.94);
}

.attachment-status.is-ready {
  color: rgba(142, 255, 202, 0.94);
}

.attachment-status.is-error {
  color: rgba(255, 143, 143, 0.96);
}

.attachment-remove-button {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 42%),
    rgba(22, 22, 34, 0.66);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.attachment-remove-button::before {
  content: "×";
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 16px;
  transform: translateY(0.5px);
}

.attachment-remove-button:hover {
  transform: scale(1.08);
  border-color: rgba(255, 143, 170, 0.60);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.24), transparent 42%),
    rgba(255, 70, 110, 0.24);
  color: white;
  box-shadow:
    0 0 12px rgba(255, 70, 110, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.attachment-remove-button:focus-visible {
  outline: 2px solid rgba(255, 143, 170, 0.78);
  outline-offset: 2px;
}

.attachment-remove-button:active {
  transform: scale(0.96);
}

.send-button.is-uploading-attachments {
  cursor: wait;
  opacity: 0.76;
  filter: saturate(0.9);
}

@media (max-width: 760px) {
  .attachment-draft-message {
    flex-basis: 165px;
    width: 165px;
    max-width: 165px;
  }
}

@media (max-width: 560px) {
  .composer-input-shell {
    padding: 7px;
  }

  .attachment-draft-message {
    flex-basis: 155px;
    width: 155px;
    max-width: 155px;
  }
}


/* =========================================================
   Soul Chat Attachment Tray Final Position Fix - 36FILE-UI-ATTACH-SEND-1D
   ========================================================= */

.composer-input-shell.has-attachment-drafts,
.composer-input-shell:has(.attachment-draft-message) {
  position: relative;
  display: block;
  min-height: 78px;
  padding: 44px 8px 6px;
  overflow: hidden;
}

.composer-input-shell.has-attachment-drafts .attachment-composer-tray-wrap,
.composer-input-shell:has(.attachment-draft-message) .attachment-composer-tray-wrap {
  position: absolute;
  top: 7px;
  left: 8px;
  right: 8px;
  width: auto;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  display: block;
  margin: 0;
  overflow: hidden;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-tray,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-tray {
  width: 100%;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-message,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-message {
  flex: 0 0 176px;
  width: 176px;
  max-width: 176px;
  height: 36px;
  min-height: 36px;
  display: block;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-bubble,
.composer-input-shell.has-attachment-drafts .attachment-draft-bubble.has-image-preview,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-bubble,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-bubble.has-image-preview {
  width: 100%;
  height: 36px;
  min-height: 36px;
  display: block;
}

.composer-input-shell.has-attachment-drafts .attachment-preview-card,
.composer-input-shell:has(.attachment-draft-message) .attachment-preview-card {
  height: 36px;
  min-height: 36px;
}

.composer-input-shell.has-attachment-drafts textarea,
.composer-input-shell.has-attachment-drafts textarea:focus,
.composer-input-shell:has(.attachment-draft-message) textarea,
.composer-input-shell:has(.attachment-draft-message) textarea:focus {
  display: block;
  width: 100%;
  min-height: 22px;
  height: 22px;
  max-height: 22px;
  margin: 0;
  padding: 0 6px 1px;
  line-height: 1.18;
  overflow: hidden;
}


/* =========================================================
   Soul Chat Attachment Tray Flow Layout Fix - 36FILE-UI-ATTACH-SEND-1E
   ========================================================= */

.composer-input-shell.has-attachment-drafts,
.composer-input-shell:has(.attachment-draft-message) {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 4px !important;
  min-height: 82px !important;
  padding: 7px 8px 7px !important;
  overflow: hidden !important;
}

.composer-input-shell.has-attachment-drafts .attachment-composer-tray-wrap,
.composer-input-shell:has(.attachment-draft-message) .attachment-composer-tray-wrap {
  position: static !important;
  inset: auto !important;
  order: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: block !important;
  margin: 0 !important;
  overflow: hidden !important;
  z-index: auto !important;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-tray,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-tray {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  padding: 0 4px 0 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-message,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-message {
  flex: 0 0 176px !important;
  width: 176px !important;
  max-width: 176px !important;
  height: 38px !important;
  min-height: 38px !important;
  display: block !important;
  overflow: visible !important;
}

.composer-input-shell.has-attachment-drafts .attachment-draft-bubble,
.composer-input-shell.has-attachment-drafts .attachment-draft-bubble.has-image-preview,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-bubble,
.composer-input-shell:has(.attachment-draft-message) .attachment-draft-bubble.has-image-preview {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  display: block !important;
  overflow: visible !important;
}

.composer-input-shell.has-attachment-drafts .attachment-preview-card,
.composer-input-shell:has(.attachment-draft-message) .attachment-preview-card {
  height: 36px !important;
  min-height: 36px !important;
}

.composer-input-shell.has-attachment-drafts textarea,
.composer-input-shell.has-attachment-drafts textarea:focus,
.composer-input-shell:has(.attachment-draft-message) textarea,
.composer-input-shell:has(.attachment-draft-message) textarea:focus {
  order: 1 !important;
  flex: 0 0 22px !important;
  width: 100% !important;
  min-height: 22px !important;
  height: 22px !important;
  max-height: 22px !important;
  margin: 0 !important;
  padding: 0 6px 1px !important;
  line-height: 1.18 !important;
  overflow: hidden !important;
  position: relative !important;
  z-index: 1 !important;
}


/* =========================================================
   Soul Chat Attachment Tray Outside Input Fix - 36FILE-UI-ATTACH-SEND-1F
   ========================================================= */

.composer > .attachment-composer-tray-wrap {
  grid-column: 2 / 3;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  display: block;
  margin: 0 0 4px;
  overflow: hidden;
}

.composer > .attachment-composer-tray-wrap[hidden] {
  display: none !important;
}

.composer > .attachment-composer-tray-wrap + .composer-input-shell {
  grid-column: 2 / 3;
  grid-row: 2;
}

.composer:has(> .attachment-composer-tray-wrap:not([hidden])) {
  grid-template-rows: 42px auto;
  align-items: end;
}

.composer:has(> .attachment-composer-tray-wrap:not([hidden])) .attachment-menu-wrap {
  grid-column: 1 / 2;
  grid-row: 2;
}

.composer:has(> .attachment-composer-tray-wrap:not([hidden])) .send-button {
  grid-column: 3 / 4;
  grid-row: 2;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-tray {
  width: 100%;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 7px;
  padding: 2px 4px 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-message {
  flex: 0 0 176px;
  width: 176px;
  max-width: 176px;
  height: 38px;
  min-height: 38px;
  display: block;
  overflow: visible;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-bubble,
.composer > .attachment-composer-tray-wrap .attachment-draft-bubble.has-image-preview {
  width: 100%;
  height: 38px;
  min-height: 38px;
  display: block;
  overflow: visible;
}

.composer > .attachment-composer-tray-wrap .attachment-preview-card {
  height: 36px;
  min-height: 36px;
}

/* Reset input shell when attachment tray is outside the input field. */
.composer:has(> .attachment-composer-tray-wrap:not([hidden])) .composer-input-shell {
  min-height: 48px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 7px 9px !important;
  overflow: hidden !important;
}

.composer:has(> .attachment-composer-tray-wrap:not([hidden])) .composer-input-shell textarea,
.composer:has(> .attachment-composer-tray-wrap:not([hidden])) .composer-input-shell textarea:focus {
  width: 100% !important;
  min-height: 30px !important;
  height: auto !important;
  max-height: 120px !important;
  margin: 0 !important;
  padding: 5px 6px !important;
  line-height: 1.25 !important;
  overflow-y: auto !important;
}


/* =========================================================
   Soul Chat Attachment Tray Bubble Reset - 36FILE-UI-ATTACH-SEND-1G
   ========================================================= */

.composer > .attachment-composer-tray-wrap .attachment-draft-message > .message-label {
  display: none !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-message {
  flex: 0 0 176px !important;
  width: 176px !important;
  max-width: 176px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  opacity: 1 !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-bubble,
.composer > .attachment-composer-tray-wrap .attachment-draft-bubble.has-image-preview {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.composer > .attachment-composer-tray-wrap .attachment-preview-card {
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  margin: 1px 0 !important;
  display: grid !important;
  align-items: center !important;
}

.composer > .attachment-composer-tray-wrap .attachment-preview-main {
  min-width: 0 !important;
}

.composer > .attachment-composer-tray-wrap .attachment-preview-name,
.composer > .attachment-composer-tray-wrap .attachment-preview-meta-row {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* =========================================================
   Soul Chat Attachment Tray Scrollbar Space Fix - 36FILE-UI-ATTACH-SEND-1H
   ========================================================= */

.composer:has(> .attachment-composer-tray-wrap:not([hidden])) {
  grid-template-rows: 52px auto !important;
}

.composer > .attachment-composer-tray-wrap {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  margin: 0 0 4px !important;
  overflow: hidden !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-tray {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  align-items: flex-start !important;
  padding: 2px 4px 10px 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
  box-sizing: border-box !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-message {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-bubble,
.composer > .attachment-composer-tray-wrap .attachment-draft-bubble.has-image-preview {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
}

.composer > .attachment-composer-tray-wrap .attachment-preview-card {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-tray::-webkit-scrollbar {
  height: 6px !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-tray::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.26) !important;
}

.composer > .attachment-composer-tray-wrap .attachment-draft-tray::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 999px !important;
}

/* =========================================================
   Soul Chat Attachment Tray Hidden Layout Reset - 36FILE-UI-ATTACH-SEND-1I
   ========================================================= */

.composer:has(> .attachment-composer-tray-wrap[hidden]) {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  grid-template-rows: auto !important;
  align-items: center !important;
}

.composer:has(> .attachment-composer-tray-wrap[hidden]) .attachment-menu-wrap {
  grid-column: 1 / 2 !important;
  grid-row: 1 !important;
}

.composer:has(> .attachment-composer-tray-wrap[hidden]) .composer-input-shell {
  grid-column: 2 / 3 !important;
  grid-row: 1 !important;
  min-height: 48px !important;
  display: flex !important;
  justify-content: center !important;
  padding: 7px 9px !important;
}

.composer:has(> .attachment-composer-tray-wrap[hidden]) .send-button {
  grid-column: 3 / 4 !important;
  grid-row: 1 !important;
  width: auto !important;
  min-width: 72px !important;
  max-width: 92px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  justify-self: end !important;
  align-self: center !important;
}

.composer:has(> .attachment-composer-tray-wrap[hidden]) .composer-input-shell textarea,
.composer:has(> .attachment-composer-tray-wrap[hidden]) .composer-input-shell textarea:focus {
  width: 100% !important;
  min-height: 30px !important;
  height: auto !important;
  max-height: 120px !important;
  margin: 0 !important;
  padding: 5px 6px !important;
  line-height: 1.25 !important;
  overflow-y: auto !important;
}