:root {
  color-scheme: dark;
  --bg: #07080b;
  --bg-soft: #0a0c11;
  --panel: #0d1016;
  --panel-2: #121620;
  --panel-3: #171c27;
  --line: rgba(199, 214, 238, 0.13);
  --line-strong: rgba(213, 228, 250, 0.25);
  --text: #f4f7fb;
  --muted: #8992a1;
  --silver: #dbe5f2;
  --ice: #b9d5ff;
  --accent: #7f9fff;
  --accent-2: #a184ff;
  --accent-soft: rgba(127, 159, 255, 0.12);
  --danger: #ff6b7a;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background:
    linear-gradient(60deg, transparent 49.6%, rgba(178, 205, 255, .045) 50%, transparent 50.4%) 0 0 / 64px 56px,
    linear-gradient(-60deg, transparent 49.6%, rgba(178, 205, 255, .035) 50%, transparent 50.4%) 0 0 / 64px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .8), transparent 75%);
}

button,
textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app {
  height: 100%;
  display: grid;
  grid-template-columns: 292px 1fr;
  position: relative;
  isolation: isolate;
}

.sidebar {
  position: relative;
  z-index: 8;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(112, 143, 218, .12), transparent 28%),
    linear-gradient(180deg, #0a0c11 0%, #080a0e 100%);
  border-right: 1px solid var(--line);
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(183, 207, 244, .1);
}

.sidebar::before {
  width: 240px;
  height: 208px;
  right: -124px;
  top: 102px;
  transform: rotate(17deg);
}

.sidebar::after {
  width: 150px;
  height: 130px;
  left: -86px;
  bottom: 80px;
  transform: rotate(-21deg);
  opacity: .55;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 1px 8px 18px;
}

.brand::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, rgba(185, 213, 255, .55), rgba(185, 213, 255, .04) 72%, transparent);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: radial-gradient(circle, rgba(144, 181, 255, .23), transparent 68%);
  filter: blur(8px);
}

.brand-mark img {
  position: relative;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 11px rgba(155, 194, 255, .28));
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .12em;
  white-space: nowrap;
  color: var(--silver);
  text-shadow: 0 0 18px rgba(190, 215, 255, .13);
}

.brand-copy small {
  color: #758092;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  white-space: nowrap;
}

.new-chat {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 47px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(25, 31, 43, .94), rgba(15, 19, 27, .95));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}

.new-chat::after {
  content: "";
  position: absolute;
  right: -14px;
  top: -13px;
  width: 34px;
  height: 34px;
  transform: rotate(45deg);
  border: 1px solid rgba(177, 207, 255, .22);
  background: rgba(115, 145, 219, .06);
}

.new-chat:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 207, 255, .43);
  background: linear-gradient(145deg, rgba(31, 39, 54, .98), rgba(17, 22, 31, .98));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3), 0 0 20px rgba(111, 151, 255, .08);
}

.new-chat:active { transform: translateY(0) scale(.99); }
.new-chat-icon { color: var(--ice); font-size: 21px; line-height: 1; }

.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px 8px 6px;
  color: #697486;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.section-label i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line), transparent);
}

.chat-list {
  flex: 1;
  overflow: auto;
  padding: 3px 0 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 162, 191, .22) transparent;
}

.chat-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .18s, border-color .18s, transform .18s var(--ease), box-shadow .18s;
}

.chat-item::before {
  content: "";
  position: absolute;
  left: 7px;
  width: 6px;
  height: 6px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #536074;
  opacity: .55;
  transition: background .18s, filter .18s, opacity .18s;
}

.chat-item:hover {
  transform: translateX(2px);
  border-color: rgba(181, 207, 247, .12);
  background: rgba(23, 28, 39, .68);
}

.chat-item.active {
  border-color: rgba(145, 181, 255, .22);
  background: linear-gradient(90deg, rgba(101, 135, 210, .16), rgba(19, 24, 34, .78));
  box-shadow: inset 1px 0 rgba(189, 215, 255, .38), 0 8px 20px rgba(0, 0, 0, .12);
}

.chat-item.active::before {
  background: var(--ice);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(130, 177, 255, .75));
}

.chat-open {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: #dce3ec;
  text-align: left;
  padding: 8px 7px 8px 17px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.chat-more {
  width: 29px;
  height: 29px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  transition: color .18s, background .18s;
}

.chat-more:hover { color: var(--silver); background: rgba(197, 215, 240, .08); }

.account {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 6px 2px;
  border-top: 1px solid var(--line);
}

.account div { display: flex; flex-direction: column; }
.account span { color: var(--silver); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.account small { color: var(--muted); }

.account button {
  border: 1px solid rgba(189, 211, 245, .15);
  background: #171c26;
  color: #e9eef6;
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s var(--ease);
}

.account button:hover {
  transform: translateY(-1px);
  border-color: rgba(174, 207, 255, .34);
  background: #1c2330;
  box-shadow: 0 0 17px rgba(109, 151, 255, .08);
}

.main {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 60px 1fr auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(92, 124, 196, .18), transparent 34%),
    radial-gradient(circle at 96% 100%, rgba(119, 83, 181, .08), transparent 31%),
    var(--bg);
}

.triada-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: .16;
}

.triada-decor-one {
  width: 410px;
  height: 355px;
  right: -230px;
  top: 14%;
  background: linear-gradient(150deg, rgba(148, 185, 255, .24), transparent 48%);
  border: 1px solid rgba(172, 202, 250, .16);
  transform: rotate(23deg);
}

.triada-decor-two {
  width: 250px;
  height: 215px;
  left: 8%;
  bottom: -155px;
  border: 1px solid rgba(159, 129, 242, .12);
  transform: rotate(-12deg);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 58px;
  border-bottom: 1px solid rgba(199, 214, 238, .1);
  background: rgba(7, 8, 11, .78);
  backdrop-filter: blur(18px) saturate(120%);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(164, 196, 245, .2), transparent);
}

.topbar-rail {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 52px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(192, 219, 255, .35), transparent);
}

.icon-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd3de;
  font-size: 21px;
  border-radius: 12px;
  cursor: pointer;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s var(--ease);
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(185, 211, 249, .15);
  background: rgba(20, 25, 35, .85);
  box-shadow: 0 0 16px rgba(107, 149, 246, .08);
  transform: translateY(-1px);
}

#menuBtn { left: 10px; display: none; }
#newTopBtn { right: 10px; }

.model-btn {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(18, 22, 31, .98), rgba(12, 15, 21, .98));
  color: var(--text);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}

.model-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(164, 196, 255, .08), transparent);
  transform: translateX(-80%);
  transition: opacity .2s, transform .55s var(--ease);
}

.model-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(176, 208, 255, .36);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .22), 0 0 20px rgba(97, 139, 238, .1);
}

.model-btn:hover::before { opacity: 1; transform: translateX(80%); }
.model-btn i { font-style: normal; color: var(--muted); }

.model-glyph {
  width: 11px;
  height: 10px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #e5edf8, #789dca);
  filter: drop-shadow(0 0 6px rgba(145, 184, 255, .42));
}

.messages {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  padding: 34px max(20px, calc((100% - 820px) / 2)) 24px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 162, 195, .24) transparent;
}

.welcome {
  min-height: 72%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.logo-stage {
  position: relative;
  width: 126px;
  height: 116px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
}

.logo-stage::before {
  content: "";
  position: absolute;
  inset: 20px;
  background: radial-gradient(circle, rgba(143, 181, 255, .26), transparent 70%);
  filter: blur(18px);
}

.logo-stage img {
  position: relative;
  z-index: 2;
  width: 102px;
  height: 102px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(154, 195, 255, .25));
  transition: transform .45s var(--ease), filter .45s;
}

.logo-stage:hover img {
  transform: translateY(-3px) scale(1.025);
  filter: drop-shadow(0 0 29px rgba(154, 195, 255, .38));
}

.logo-ring {
  position: absolute;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(182, 211, 255, .15);
}

.logo-ring-one { width: 122px; height: 106px; transform: rotate(4deg); }
.logo-ring-two { width: 95px; height: 82px; transform: rotate(-5deg); opacity: .55; }

.welcome-wordmark {
  margin-top: -3px;
  color: #dbe4ef;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: .24em;
  text-shadow: 0 0 17px rgba(180, 208, 248, .14);
}

.welcome h1 {
  margin: 13px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -.02em;
}

.welcome p { color: var(--muted); margin: 0 0 28px; }

.suggestions {
  width: min(590px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.suggestions button {
  position: relative;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(18, 22, 30, .84), rgba(13, 16, 23, .82));
  color: #dce3ec;
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}

.suggestions button::after {
  content: "";
  position: absolute;
  right: -16px;
  top: -18px;
  width: 40px;
  height: 40px;
  transform: rotate(45deg);
  border: 1px solid rgba(184, 209, 247, .12);
}

.suggestions button span {
  flex: 0 0 auto;
  color: #66748a;
  font-size: 10px;
  letter-spacing: .08em;
}

.suggestions button:hover {
  transform: translateY(-2px);
  border-color: rgba(174, 204, 250, .34);
  background: linear-gradient(145deg, rgba(25, 31, 43, .96), rgba(15, 19, 27, .95));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24), 0 0 18px rgba(106, 149, 248, .08);
}

.message {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 24px;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #151923;
  color: #dbe5f2;
  font-size: 11px;
  font-weight: 800;
}

.avatar img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 7px rgba(148, 188, 255, .26));
}

.ai-avatar-mark {
  position: relative;
  width: 22px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(150, 190, 255, .34));
}

.ai-avatar-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(155deg, #f2f6fb 4%, #8ca1ba 42%, #42536a 72%, #dce7f3 100%);
}

.ai-avatar-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 5px;
  bottom: 4px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #141a24, #080b10);
}

.ai-avatar-mark i {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  top: 8px;
  bottom: 5px;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  background: linear-gradient(180deg, #e8f4ff, #7ba4d8);
  box-shadow: 0 0 8px rgba(140, 187, 255, .72);
}

.message.user .avatar { background: #252b37; }
.message.assistant .avatar {
  border-color: rgba(174, 205, 250, .22);
  background: linear-gradient(145deg, rgba(26, 34, 49, .95), rgba(13, 17, 24, .98));
}

.bubble {
  min-width: 0;
  padding-top: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.user .bubble { color: #f2f4f7; }

.message.assistant .bubble {
  position: relative;
  padding: 15px 17px;
  border: 1px solid rgba(183, 205, 238, .11);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 20, 28, .78), rgba(10, 13, 18, .72));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}

.message.assistant .bubble::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(transparent, rgba(150, 188, 255, .62), transparent);
  box-shadow: 0 0 8px rgba(118, 166, 255, .28);
}

.bubble pre {
  margin: 12px 0 4px;
  padding: 14px;
  overflow: auto;
  border: 1px solid rgba(184, 206, 240, .13);
  border-radius: 13px;
  background: #090b0f;
  white-space: pre;
}

.bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #d7e5f8;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 16px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--ice);
  box-shadow: 0 0 8px rgba(140, 183, 255, .45);
  animation: blink .9s infinite;
}

@keyframes blink { 50% { opacity: .15; } }

.composer-wrap {
  position: relative;
  z-index: 4;
  padding: 11px max(16px, calc((100% - 820px) / 2)) max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(7, 8, 11, .96) 27%);
}

.composer {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 10px 10px 10px 16px;
  border: 1px solid rgba(190, 210, 240, .18);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(16, 20, 28, .98), rgba(12, 15, 21, .98));
  box-shadow: 0 12px 35px rgba(0, 0, 0, .3);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}

.composer:focus-within {
  transform: translateY(-1px);
  border-color: rgba(167, 202, 255, .42);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .34), 0 0 24px rgba(105, 150, 255, .09);
}

.composer-mark {
  position: absolute;
  left: 13px;
  top: -5px;
  width: 11px;
  height: 10px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #dce9fb, #789fce);
  filter: drop-shadow(0 0 6px rgba(145, 183, 255, .46));
}

.composer textarea {
  flex: 1;
  resize: none;
  max-height: 180px;
  padding: 7px 8px 5px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.composer textarea::placeholder { color: #727b89; }

.composer button {
  width: 39px;
  height: 39px;
  border: 1px solid rgba(220, 232, 250, .32);
  border-radius: 13px;
  background: linear-gradient(145deg, #d8e5f5, #7898c5 56%, #6c7fad);
  color: #08101b;
  font-size: 21px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(126, 166, 234, .16);
  transition: transform .18s var(--ease), filter .18s, box-shadow .18s;
}

.composer button:hover {
  transform: translateY(-1px) scale(1.025);
  filter: brightness(1.08);
  box-shadow: 0 0 24px rgba(136, 180, 250, .28);
}

.composer button:disabled { opacity: .35; transform: none; }
.hint { margin-top: 7px; color: #616b79; font-size: 11px; text-align: center; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(0, 0, 0, .64);
  backdrop-filter: blur(11px);
}

.modal.open { display: flex; }

.modal-card {
  position: relative;
  width: min(590px, 100%);
  max-height: 88%;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(190, 212, 244, .18);
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(108, 144, 221, .14), transparent 27%),
    linear-gradient(160deg, #11151d, #0c0f15);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .52);
}

.modal-card::before {
  content: "";
  position: absolute;
  right: -52px;
  top: -44px;
  width: 120px;
  height: 104px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 1px solid rgba(177, 207, 253, .13);
  transform: rotate(23deg);
}

.modal-brand {
  position: absolute;
  top: 11px;
  right: 55px;
  width: 42px;
  height: 42px;
  opacity: .42;
}

.modal-brand img { width: 100%; height: 100%; object-fit: contain; }

.modal-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.modal-head div { display: flex; flex-direction: column; }
.modal-head b { font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 500; }
.modal-head span { color: var(--muted); font-size: 12px; }

.modal-head button {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(187, 210, 243, .12);
  border-radius: 11px;
  background: #1b202b;
  color: white;
  font-size: 21px;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.modal-head button:hover { transform: rotate(4deg); border-color: rgba(182, 211, 255, .32); background: #222a38; }
.model-list { display: grid; gap: 9px; }

.model-row {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 15px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(22, 27, 37, .92), rgba(15, 19, 26, .92));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
}

.model-row::before {
  content: "";
  position: absolute;
  left: 7px;
  width: 6px;
  height: 6px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #59677b;
}

.model-row:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 209, 255, .32);
  background: linear-gradient(145deg, rgba(29, 36, 50, .98), rgba(17, 22, 30, .98));
  box-shadow: 0 10px 25px rgba(0, 0, 0, .21), 0 0 17px rgba(110, 151, 244, .07);
}

.model-row.active {
  border-color: rgba(158, 194, 255, .55);
  background: linear-gradient(145deg, rgba(63, 84, 128, .25), rgba(19, 24, 34, .96));
  box-shadow: inset 0 0 20px rgba(111, 153, 245, .06), 0 0 19px rgba(105, 148, 244, .08);
}

.model-row.active::before {
  background: var(--ice);
  filter: drop-shadow(0 0 6px rgba(134, 180, 255, .78));
}

.model-row.locked { opacity: .58; }
.model-row span { display: flex; flex-direction: column; }
.model-row small { color: var(--muted); }
.model-row b:last-child { color: var(--accent); font-size: 10px; letter-spacing: .08em; }

.upgrade-wide {
  width: 100%;
  height: 47px;
  margin-top: 13px;
  border: 1px solid rgba(221, 232, 247, .38);
  border-radius: 14px;
  background: linear-gradient(145deg, #e6edf6, #a9b9ce);
  color: #10141a;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s var(--ease), filter .2s, box-shadow .2s;
}

.upgrade-wide:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25), 0 0 18px rgba(164, 197, 245, .12);
}

.scrim { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  z-index: 50;
  max-width: 90%;
  padding: 11px 15px;
  border: 1px solid rgba(185, 207, 240, .18);
  border-radius: 12px;
  background: rgba(28, 34, 45, .96);
  color: #eef3fa;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
  transition: .2s var(--ease);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .36);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    z-index: 15;
    transform: translateX(-102%);
    transition: transform .24s var(--ease);
  }
  .sidebar.open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; z-index: 14; background: rgba(0, 0, 0, .52); backdrop-filter: blur(4px); }
  .scrim.open { display: block; }
  #menuBtn { display: block; }
  .messages { padding: 25px 14px 18px; }
  .composer-wrap { padding-left: 9px; padding-right: 9px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestions button { min-height: 52px; }
  .message { grid-template-columns: 31px minmax(0, 1fr); gap: 9px; }
  .avatar { width: 31px; height: 31px; border-radius: 10px; }
  .avatar img { width: 27px; height: 27px; }
  .message.assistant .bubble { padding: 13px 14px; }
  .modal { padding: 0; }
  .modal-card { border-radius: 22px 22px 0 0; }
  .brand-copy strong { font-size: 16px; }
}

@media (min-width: 761px) {
  .modal { align-items: center; }
  .modal-card { border-radius: 22px; }
}

@media (hover: none) {
  .new-chat:hover,
  .suggestions button:hover,
  .model-row:hover,
  .model-btn:hover,
  .account button:hover,
  .icon-btn:hover,
  .composer button:hover { transform: none; }
}

/* ===== Triada App v1.2 ===== */
body.modal-open { overflow: hidden; }

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 38%, rgba(101, 143, 220, .16), transparent 29%),
    #07080b;
  transition: opacity .28s var(--ease), visibility .28s;
}

.boot-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.boot-brand img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(133, 180, 255, .28));
  animation: bootFloat 2.8s ease-in-out infinite;
}
.boot-brand strong {
  margin-top: -7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
  letter-spacing: .22em;
  color: #e5edf7;
  text-indent: .22em;
}
.boot-brand small { margin-top: 10px; color: #7f8998; }
.boot-retry {
  margin-top: 18px;
  padding: 10px 18px;
  border: 1px solid rgba(188, 215, 255, .26);
  border-radius: 12px;
  background: #151b25;
  color: #eef4fc;
  cursor: pointer;
}
@keyframes bootFloat { 50% { transform: translateY(-5px); filter: drop-shadow(0 0 40px rgba(133, 180, 255, .38)); } }

.app.is-loading { visibility: hidden; }

.brand { min-height: 72px; gap: 8px; }
.brand-mark { width: 64px; height: 64px; margin-left: -5px; }
.brand-mark img { width: 64px; height: 64px; object-fit: contain; }
.brand-copy strong { font-size: 18px; letter-spacing: .16em; }
.brand-copy small { font-size: 8.5px; letter-spacing: .1em; }

.account-card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 1px solid rgba(187, 211, 246, .13);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(22, 27, 38, .9), rgba(12, 15, 21, .94));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}
.account-card:hover {
  transform: translateY(-1px);
  border-color: rgba(174, 207, 255, .34);
  background: linear-gradient(145deg, rgba(29, 36, 50, .96), rgba(15, 19, 27, .98));
  box-shadow: 0 10px 25px rgba(0,0,0,.22), 0 0 18px rgba(109,151,255,.08);
}
.account-triangle {
  width: 17px;
  height: 16px;
  flex: 0 0 auto;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #edf5ff, #6e8eb8);
  filter: drop-shadow(0 0 7px rgba(143, 185, 255, .45));
}
.account-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.account-copy b { color: var(--silver); font-size: 12px; letter-spacing: .12em; }
.account-copy small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-action { color: #b8c8dc; font-size: 12px; }

.mobile-brand { display: none; align-items: center; gap: 5px; min-width: 0; }
.mobile-brand img { width: 28px; height: 28px; object-fit: contain; }
.mobile-brand span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: .12em;
  color: #dce6f2;
  white-space: nowrap;
}

.logo-stage { width: 172px; height: 154px; margin-bottom: -6px; }
.logo-stage::before { inset: 22px; filter: blur(24px); }
.logo-stage img {
  width: 158px;
  height: 158px;
  object-fit: contain;
  filter: drop-shadow(0 0 25px rgba(154, 195, 255, .3));
}
.logo-ring-one { width: 152px; height: 132px; }
.logo-ring-two { width: 118px; height: 102px; }
.welcome-wordmark {
  margin-top: -6px;
  font-size: 19px;
  letter-spacing: .26em;
  text-indent: .26em;
}
.welcome-tagline {
  margin-top: 4px;
  color: #737f90;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.avatar { overflow: visible; }
.avatar img {
  width: 42px;
  height: 42px;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 9px rgba(148, 188, 255, .48));
}
.message.assistant .avatar {
  border-color: rgba(174, 205, 250, .28);
  background: radial-gradient(circle, rgba(85, 122, 181, .25), rgba(13, 17, 24, .98) 68%);
  box-shadow: 0 0 16px rgba(105, 151, 230, .09);
}

.chat-more { position: relative; }
.chat-more::after {
  content: "";
  position: absolute;
  inset: -4px;
}

.modal-card { scrollbar-width: thin; scrollbar-color: rgba(141,162,195,.24) transparent; }
.modal-watermark {
  position: absolute;
  top: -19px;
  right: 42px;
  width: 102px;
  height: 102px;
  opacity: .12;
  pointer-events: none;
}
.modal-watermark img { width: 100%; height: 100%; object-fit: contain; }
.compact-card { width: min(470px, 100%); }
.plans-card { width: min(760px, 100%); }

.field-label {
  display: block;
  margin: 4px 0 7px;
  color: #929cab;
  font-size: 12px;
  letter-spacing: .05em;
}
.text-field {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(190, 212, 244, .17);
  border-radius: 13px;
  outline: none;
  background: #0a0d12;
  color: #f3f6fa;
  transition: border-color .18s, box-shadow .18s;
}
.text-field:focus { border-color: rgba(160, 199, 255, .48); box-shadow: 0 0 0 3px rgba(105, 151, 230, .08); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.primary-btn, .danger-btn, .secondary-btn, .danger-solid {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .18s var(--ease), filter .18s, border-color .18s, background .18s;
}
.primary-btn {
  border: 1px solid rgba(218, 232, 251, .35);
  background: linear-gradient(145deg, #dce8f6, #8fa8c8);
  color: #0b1119;
  font-weight: 750;
}
.danger-btn { border: 1px solid rgba(255, 112, 128, .22); background: rgba(106, 26, 40, .16); color: #ff9baa; }
.secondary-btn { border: 1px solid var(--line); background: #171c26; color: #e8edf5; }
.danger-solid { border: 1px solid rgba(255, 143, 153, .34); background: #9c3040; color: #fff; }
.primary-btn:hover, .danger-btn:hover, .secondary-btn:hover, .danger-solid:hover { transform: translateY(-1px); filter: brightness(1.06); }
.delete-confirm {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid rgba(255, 103, 120, .2);
  border-radius: 13px;
  background: rgba(81, 20, 31, .15);
}
.delete-confirm p { margin: 0 0 12px; color: #f3cbd1; }
.delete-confirm div { display: flex; justify-content: flex-end; gap: 8px; }

.plans-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.plan-card {
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(22, 27, 37, .95), rgba(12, 15, 21, .97));
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.plan-card::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -39px;
  width: 92px;
  height: 80px;
  clip-path: polygon(50% 0,100% 100%,0 100%);
  border: 1px solid rgba(186, 213, 255, .13);
  transform: rotate(16deg);
}
.plan-card:hover { transform: translateY(-2px); border-color: rgba(170, 205, 255, .34); box-shadow: 0 15px 32px rgba(0,0,0,.25), 0 0 22px rgba(105,151,230,.07); }
.plan-card.current { border-color: rgba(159, 197, 255, .54); box-shadow: inset 0 0 25px rgba(106,151,230,.07), 0 0 20px rgba(106,151,230,.08); }
.plan-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.plan-name { font-family: Georgia, "Times New Roman", serif; font-size: 21px; color: #edf3fb; }
.plan-price { color: #c7d6e8; font-weight: 750; white-space: nowrap; }
.plan-badge { display: inline-flex; align-items: center; min-height: 22px; margin-top: 7px; padding: 0 8px; border: 1px solid rgba(165,199,249,.2); border-radius: 999px; color: #9ebce2; font-size: 10px; letter-spacing: .08em; }
.plan-desc { margin: 14px 0; color: #929dab; font-size: 13px; }
.plan-features { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; color: #d2dae5; font-size: 12px; }
.plan-features li::before { content: "△"; margin-right: 7px; color: #91b7e8; }
.plan-button {
  width: 100%;
  min-height: 43px;
  margin-top: auto;
  border: 1px solid rgba(195, 218, 249, .2);
  border-radius: 12px;
  background: #1a2130;
  color: #edf3fa;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
}
.plan-button:hover { transform: translateY(-1px); background: #222c3d; border-color: rgba(174,207,255,.38); box-shadow: 0 0 18px rgba(105,151,230,.09); }
.plan-card.recommended .plan-button { background: linear-gradient(145deg, #dce8f6, #8da6c7); color: #0a111a; font-weight: 750; }
.plan-button:disabled { cursor: default; opacity: .55; transform: none; }

.payments-history { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.payments-history h3 { margin: 0 0 9px; font-size: 12px; color: #9aa6b7; text-transform: uppercase; letter-spacing: .1em; }
.payment-history-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; color: #cbd4df; font-size: 12px; }
.payment-history-row span:last-child { color: #8995a6; text-align: right; }
.payment-unavailable { padding: 12px; border: 1px solid rgba(255, 179, 91, .18); border-radius: 12px; color: #d9b98e; background: rgba(91, 59, 20, .12); font-size: 12px; }

.payment-card { text-align: center; }
.payment-emblem { width: 122px; height: 122px; margin: -7px auto -8px; }
.payment-emblem img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 22px rgba(137,181,255,.26)); }
.payment-card h2 { margin: 0; font: 500 23px Georgia, "Times New Roman", serif; }
.payment-card > p { margin: 7px 0 16px; color: #8e99a8; }
.payment-steps { display: grid; gap: 8px; margin-bottom: 15px; text-align: left; }
.payment-steps span { display: flex; align-items: center; gap: 10px; color: #d0d8e3; }
.payment-steps b { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(177,209,255,.22); border-radius: 8px; color: #bcd4f4; font-size: 11px; }
.primary-wide, .secondary-wide {
  width: 100%;
  min-height: 47px;
  margin-top: 9px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .18s var(--ease), filter .18s, box-shadow .18s;
}
.primary-wide { border: 1px solid rgba(221,232,247,.38); background: linear-gradient(145deg,#e6edf6,#a9b9ce); color: #10141a; font-weight: 750; }
.secondary-wide { border: 1px solid rgba(183,208,243,.18); background: #171d28; color: #eaf0f8; }
.primary-wide:hover, .secondary-wide:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 26px rgba(0,0,0,.24),0 0 18px rgba(164,197,245,.1); }
.primary-wide:disabled, .secondary-wide:disabled { opacity: .5; cursor: wait; transform: none; }
.link-btn { margin-top: 13px; border: 0; background: transparent; color: #8995a5; cursor: pointer; }

.loading-line { width: 100%; height: 1px; overflow: hidden; background: rgba(176,205,248,.08); }
.loading-line::after { content: ""; display: block; width: 34%; height: 100%; background: linear-gradient(90deg,transparent,#a8ccff,transparent); animation: loadRail 1.1s linear infinite; }
@keyframes loadRail { from { transform: translateX(-110%); } to { transform: translateX(310%); } }

@media (max-width: 760px) {
  .topbar { justify-content: flex-start; padding: 0 50px 0 54px; }
  .topbar-rail { display: none; }
  .mobile-brand { display: flex; }
  .model-btn { margin-left: auto; max-width: 46vw; padding: 8px 10px; }
  .model-btn #modelName { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logo-stage { width: 148px; height: 134px; }
  .logo-stage img { width: 138px; height: 138px; }
  .welcome-wordmark { font-size: 17px; }
  .avatar img { width: 30px; height: 30px; }
  .plans-list { grid-template-columns: 1fr; }
  .plans-card { max-height: 94%; }
  .modal-actions { justify-content: stretch; }
  .modal-actions > button { flex: 1; }
}

@media (max-width: 430px) {
  .mobile-brand span { display: none; }
  .model-btn { max-width: 58vw; }
  .welcome { min-height: 67%; }
  .welcome h1 { font-size: 29px; }
}


/* Triada Core v1.3: deterministic AI avatar alignment */
.message.assistant .avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.message.assistant .avatar img { display: none; }
.message.assistant .ai-avatar-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 22px;
  height: 20px;
  margin: 0;
  transform: translate(-50%, -50%);
}
@media (max-width: 760px) {
  .message.assistant .ai-avatar-mark { width: 20px; height: 18px; }
}

/* Triada Control v1.4 */
.admin-entry {
  width: calc(100% - 28px);
  margin: 8px 14px 2px;
  min-height: 44px;
  border: 1px solid rgba(128, 166, 230, .18);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(96, 132, 198, .12), rgba(21, 25, 34, .74));
  color: #dce8fb;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font: inherit;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.admin-entry:hover {
  transform: translateY(-1px);
  border-color: rgba(149, 187, 255, .42);
  box-shadow: 0 10px 30px rgba(40, 76, 145, .18), inset 0 0 24px rgba(107, 151, 234, .05);
}
.admin-entry[hidden] { display: none !important; }
.admin-card { width: min(920px, calc(100vw - 24px)); max-height: min(88vh, 820px); overflow: auto; }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.admin-stat {
  border: 1px solid rgba(139, 169, 219, .14);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(28, 34, 45, .88), rgba(12, 14, 19, .86));
}
.admin-stat span { display: block; color: #8993a3; font-size: 12px; margin-bottom: 7px; }
.admin-stat b { color: #edf4ff; font-size: 20px; font-weight: 600; }
.admin-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.admin-switch {
  border: 1px solid rgba(132, 162, 214, .16);
  border-radius: 12px;
  min-height: 46px;
  background: rgba(18, 22, 29, .9);
  color: #b8c2d1;
  cursor: pointer;
  transition: .18s ease;
}
.admin-switch:hover { border-color: rgba(144, 183, 249, .38); color: #eef5ff; }
.admin-switch.active { border-color: rgba(109, 190, 153, .48); color: #bdf4d8; box-shadow: inset 0 0 22px rgba(55, 163, 112, .08); }
.admin-switch.danger.active { border-color: rgba(232, 96, 111, .58); color: #ffc1c8; box-shadow: inset 0 0 22px rgba(195, 52, 72, .1); }
.admin-section { border-top: 1px solid rgba(143, 166, 202, .12); padding-top: 16px; }
.admin-section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.admin-section-head > div b { display: block; color: #edf3fd; }
.admin-section-head > div span { display: block; color: #778193; font-size: 12px; margin-top: 3px; }
.admin-section-head input { width: min(280px, 44vw); }
.admin-users { display: grid; gap: 7px; }
.admin-user {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(128, 151, 188, .12);
  background: rgba(12, 15, 20, .78);
  color: #dbe4f2;
  cursor: pointer;
  text-align: left;
  transition: .18s ease;
}
.admin-user:hover { transform: translateX(2px); border-color: rgba(137, 176, 241, .34); background: rgba(21, 27, 37, .88); }
.admin-user.blocked { border-color: rgba(225, 86, 105, .22); opacity: .74; }
.admin-user-main b, .admin-user-meta b { display: block; font-size: 13px; }
.admin-user-main small, .admin-user-meta small { display: block; color: #7d8797; font-size: 11px; margin-top: 4px; }
.admin-user-meta { text-align: right; }
.admin-loading, .admin-empty { color: #7f8999; text-align: center; padding: 24px; }
.admin-check { display: flex; align-items: center; gap: 10px; color: #c3ccda; margin: 15px 0; cursor: pointer; }
.admin-check input { width: 18px; height: 18px; accent-color: #779ee0; }

@media (max-width: 680px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-switches { grid-template-columns: 1fr; }
  .admin-section-head { align-items: stretch; flex-direction: column; }
  .admin-section-head input { width: 100%; }
  .admin-card { width: calc(100vw - 12px); max-height: 92vh; }
}
.admin-insights { display: grid; gap: 8px; margin: 0 0 18px; }
.admin-insight { border: 1px solid rgba(130, 154, 192, .12); border-radius: 12px; padding: 11px 13px; background: rgba(12, 15, 20, .58); }
.admin-insight b { display: block; color: #dce5f2; font-size: 12px; margin-bottom: 5px; }
.admin-insight span { display: block; color: #7f8a9c; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.admin-insight.has-errors { border-color: rgba(223, 86, 103, .22); }

/* Triada v1.5 — inline attachments, stable v1.4 visual foundation */
.message-content {
  min-width: 0;
}

.composer textarea {
  min-width: 0;
}

.composer .attach-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  margin: 1px 8px 1px -5px;
  border: 1px solid rgba(185, 207, 239, .14);
  border-radius: 12px;
  background: rgba(23, 28, 38, .76);
  color: #aebed3;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.composer .attach-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer .attach-btn:hover {
  color: #e2edfb;
  border-color: rgba(172, 204, 250, .34);
  background: rgba(31, 39, 53, .94);
  box-shadow: 0 0 18px rgba(111, 156, 235, .08);
}

.composer .attach-btn.uploading svg {
  animation: attachmentSpin .8s linear infinite;
}

@keyframes attachmentSpin {
  to { transform: rotate(360deg); }
}

.attachment-tray {
  width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 9px;
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 162, 195, .24) transparent;
}

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

.pending-attachment {
  min-width: 180px;
  max-width: 250px;
  height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 9px;
  padding: 7px 7px 7px 8px;
  border: 1px solid rgba(185, 207, 239, .16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 25, 35, .97), rgba(13, 17, 24, .97));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.pending-attachment > img {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  background: #0a0c10;
}

.pending-attachment-copy,
.message-file > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pending-attachment-copy b,
.message-file b {
  overflow: hidden;
  color: #e7edf5;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-attachment-copy small,
.message-file small {
  color: #737f90;
  font-size: 10px;
}

.pending-attachment button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7f8a99;
  font-size: 18px;
  box-shadow: none;
}

.pending-attachment button:hover {
  transform: none;
  background: rgba(255, 107, 122, .1);
  color: #ff8490;
  box-shadow: none;
}

.attachment-kind {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 190, 239, .18);
  border-radius: 10px;
  background: rgba(107, 145, 207, .09);
  color: #b9d3f7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 9px;
}

.message-image {
  position: relative;
  display: block;
  width: min(310px, 100%);
  overflow: hidden;
  border: 1px solid rgba(185, 207, 239, .15);
  border-radius: 15px;
  background: #0a0c10;
  color: #dfe8f4;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

.message-image img {
  width: 100%;
  max-height: 310px;
  display: block;
  object-fit: contain;
  background: #080a0d;
}

.message-image span {
  display: block;
  overflow: hidden;
  padding: 8px 10px;
  color: #9ca9ba;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-file {
  min-width: 210px;
  max-width: min(360px, 100%);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px 9px 9px;
  border: 1px solid rgba(185, 207, 239, .15);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(21, 26, 36, .94), rgba(14, 18, 25, .94));
  color: inherit;
  text-decoration: none;
  transition: border-color .18s, transform .18s var(--ease), background .18s;
}

.message-file:hover {
  transform: translateY(-1px);
  border-color: rgba(177, 207, 250, .33);
  background: linear-gradient(145deg, rgba(27, 34, 47, .97), rgba(16, 21, 29, .97));
}

.message-file i {
  color: #77869a;
  font-style: normal;
}

.message.user .message-attachments + .bubble {
  padding-top: 1px;
}

@media (max-width: 760px) {
  .composer {
    padding-left: 10px;
  }
  .composer .attach-btn {
    margin-left: -2px;
    margin-right: 6px;
  }
  .pending-attachment {
    min-width: 165px;
    max-width: 215px;
  }
  .message-image {
    width: min(270px, 100%);
  }
  .message-file {
    min-width: 0;
    width: 100%;
  }
}


/* Launch Pack v1.5.1 */
.model-row { align-items: stretch; gap: 12px; }
.model-copy { gap: 5px; min-width: 0; }
.model-title-line { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-title-line i { font-style: normal; color: #b8cfff; font-size: 9px; letter-spacing: .08em; padding: 3px 6px; border: 1px solid rgba(159,194,255,.2); border-radius: 999px; background: rgba(111,151,230,.07); }
.model-row em { color: #b4bfce; font-size: 11px; font-style: normal; }
.model-state { align-self: center; max-width: 112px; color: var(--accent); font-size: 9px; line-height: 1.3; letter-spacing: .06em; text-align: right; text-transform: uppercase; }
.message-actions { display: flex; align-items: center; gap: 7px; margin-top: 7px; min-height: 28px; }
.message-actions .answer-model { margin-right: auto; color: #697486; font-size: 10px; letter-spacing: .04em; }
.message-actions button { min-height: 28px; padding: 0 9px; border: 1px solid rgba(183,205,238,.11); border-radius: 8px; background: rgba(18,23,32,.62); color: #9da9b8; font-size: 11px; cursor: pointer; }
.message-actions button:hover { color: #edf3fb; border-color: rgba(170,205,255,.28); background: rgba(30,38,52,.8); }
.plan-card.black { grid-column: 1 / -1; min-height: 205px; border-color: rgba(218,228,244,.34); background: radial-gradient(circle at 88% 12%, rgba(133,164,218,.14), transparent 32%), linear-gradient(145deg, rgba(13,16,23,.99), rgba(4,5,8,.99)); }
.plan-card.black .plan-name { letter-spacing: .12em; }
.plan-card.black .plan-badge { color: #e3ebf6; border-color: rgba(218,228,244,.35); }
.plan-card.black .plan-button { background: linear-gradient(145deg, #eef3f8, #9aaec8); color: #080b10; font-weight: 800; }
.account-card:has(#planLabel:not(:empty)) { transition: border-color .2s, box-shadow .2s; }
@media (max-width: 640px) {
  .model-state { max-width: 86px; font-size: 8px; }
  .model-row { padding: 13px 12px 13px 16px; }
  .message-actions { flex-wrap: wrap; }
  .message-actions .answer-model { width: 100%; }
}
