/* ═══════════════════════════════════════════════════════════
   MEOWTEK — Feline Intelligence Systems
   Liquid-glass design system. Over-engineered on purpose.
   ═══════════════════════════════════════════════════════════ */

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #08080a;
  --ink: #edebe6;
  --ink-dim: rgba(237, 235, 230, 0.56);
  --ink-faint: rgba(237, 235, 230, 0.30);
  --gold: #d6b87e;
  --gold-bright: #f0ddaf;
  --gold-deep: #a8874f;
  --gold-dim: rgba(214, 184, 126, 0.35);
  --violet: #8b7ec8;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --glass-hi: rgba(255, 255, 255, 0.075);
  --glass-lo: rgba(255, 255, 255, 0.02);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", -apple-system, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-w: 284px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

::selection { background: var(--gold-dim); color: var(--gold-bright); }

button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 1.5px solid var(--gold-dim);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════
   LIQUID GLASS PRIMITIVE
   Layered translucency: tint gradient + heavy blur/saturate
   + specular top highlight + inner refraction edge + drop.
   ═══════════════════════════════════════════════════════════ */
.liquid {
  position: relative;
  background:
    linear-gradient(135deg, var(--glass-hi) 0%, var(--glass-lo) 45%, rgba(255,255,255,0.045) 100%);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    inset 1px 0 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Specular streak that sweeps across on hover */
.liquid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.09) 48%, transparent 62%);
  background-size: 250% 100%;
  background-position: 120% 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.liquid:hover::after {
  opacity: 1;
  animation: sheen 1.1s var(--ease);
}
@keyframes sheen {
  from { background-position: 120% 0; }
  to   { background-position: -60% 0; }
}

/* ═══════════════════════════════════════════════════════════
   AMBIENT BACKGROUND
   ═══════════════════════════════════════════════════════════ */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}
.orb-1 {
  width: 640px; height: 640px;
  top: -20%; right: -10%;
  background: radial-gradient(circle, rgba(214, 184, 126, 0.11), transparent 65%);
  animation: drift1 32s ease-in-out infinite alternate;
}
.orb-2 {
  width: 540px; height: 540px;
  bottom: -25%; left: 8%;
  background: radial-gradient(circle, rgba(139, 126, 200, 0.09), transparent 65%);
  animation: drift2 38s ease-in-out infinite alternate;
}
.orb-3 {
  width: 420px; height: 420px;
  top: 32%; left: 44%;
  background: radial-gradient(circle, rgba(214, 184, 126, 0.05), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate-reverse;
}
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-60px, 45px, 0) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(50px, -40px, 0) scale(0.95); }
}

/* Slow-breathing aurora wash across the top */
.aurora {
  position: absolute;
  top: -40%; left: -20%; right: -20%;
  height: 80%;
  background: conic-gradient(from 180deg at 50% 50%,
    transparent 0deg,
    rgba(214, 184, 126, 0.035) 80deg,
    rgba(139, 126, 200, 0.03) 160deg,
    transparent 240deg,
    rgba(214, 184, 126, 0.025) 320deg,
    transparent 360deg);
  filter: blur(60px);
  animation: auroraSpin 60s linear infinite;
}
@keyframes auroraSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Cursor spotlight — a soft light that follows the pointer */
.spotlight {
  position: absolute;
  width: 700px; height: 700px;
  left: 0; top: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 184, 126, 0.045), transparent 60%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 0.6s;
  opacity: 0;
  will-change: transform;
}
.spotlight.on { opacity: 1; }

.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.032;
  animation: grain 800ms steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(2%, 2%); }
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 12px 0 12px 12px;
  transition: margin-left 0.5s var(--ease);
}
.sidebar.collapsed { margin-left: calc(var(--sidebar-w) * -1); }

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 14px 12px;
  border-radius: 20px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 50%, rgba(255,255,255,0.035) 100%);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 48px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 20px;
}
.brand-mark {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--gold);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(214,184,126,0.16), rgba(214,184,126,0.03) 60%);
  border: 1px solid var(--gold-dim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 24px rgba(214, 184, 126, 0.12);
}
.brand-mark svg { width: 23px; height: 23px; position: relative; z-index: 1; }
.brand-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.22) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: sheen 4s var(--ease) infinite;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  background: linear-gradient(120deg, var(--ink) 30%, var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 20px;
  border-radius: 12px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--spring), border-color 0.3s, box-shadow 0.3s;
}
.new-chat:hover {
  border-color: var(--gold-dim);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 14px 28px rgba(0,0,0,0.4),
    0 0 0 4px rgba(214,184,126,0.05);
}
.new-chat:active { transform: translateY(0) scale(0.985); }
.new-chat svg { color: var(--gold); position: relative; z-index: 1; }
.new-chat kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.25);
}

.history-label {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 12px 8px;
}

.history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 -4px;
  padding: 0 4px;
}
.history-empty {
  padding: 8px 12px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink-faint);
}
.history-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-dim);
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.25s var(--ease);
  animation: slideIn 0.4s var(--ease) both;
}
.history-item span { overflow: hidden; text-overflow: ellipsis; }
.history-item svg { flex-shrink: 0; opacity: 0.45; }
.history-item:hover {
  background: rgba(255,255,255,0.035);
  border-color: var(--line-soft);
  color: var(--ink);
  transform: translateX(2px);
}
.history-item.active {
  background: linear-gradient(120deg, rgba(214,184,126,0.1), rgba(214,184,126,0.03));
  border-color: rgba(214,184,126,0.2);
  color: var(--gold-bright);
}
.history-item.active svg { color: var(--gold); opacity: 0.9; }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); filter: blur(3px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

.sidebar-footer { padding-top: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 13px;
  cursor: pointer;
  transition: transform 0.3s var(--spring), border-color 0.3s;
}
.user-chip:hover { transform: translateY(-1px); border-color: var(--gold-dim); }
.user-avatar {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 16px;
  color: #0a0a0c;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 2px 10px rgba(214,184,126,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-name { font-size: 13px; font-weight: 500; }
.user-plan { font-size: 10.5px; color: var(--gold); opacity: 0.85; }
.dots { margin-left: auto; color: var(--ink-faint); }

/* ═══════════════════════════════════════════════════════════
   MAIN / TOPBAR
   ═══════════════════════════════════════════════════════════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 12px;
}

.icon-btn {
  display: grid; place-items: center;
  width: 33px; height: 33px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.icon-btn:hover {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  border-color: var(--line);
  transform: translateY(-1px);
}
.icon-btn:active { transform: scale(0.94); }

.model-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s var(--spring), border-color 0.3s;
}
.model-picker:hover { transform: translateY(-1px); border-color: var(--gold-dim); }
.model-name {
  font-family: var(--serif);
  font-size: 17px;
  background: linear-gradient(110deg, var(--gold-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.model-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 9px;
  background: rgba(0,0,0,0.25);
}
.model-picker svg { color: var(--ink-faint); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-dim);
  border-radius: 20px;
  padding: 6px 13px;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #82d99a;
  box-shadow: 0 0 10px rgba(130, 217, 154, 0.9);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
.share-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 11px;
  padding: 7px 16px;
  cursor: pointer;
  transition: transform 0.3s var(--spring), border-color 0.3s, color 0.3s;
}
.share-btn:hover { border-color: var(--gold-dim); color: var(--gold-bright); transform: translateY(-1px); }
.share-btn:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════════════════════
   CHAT SCROLL
   ═══════════════════════════════════════════════════════════ */
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
}
.scroll-fade {
  position: sticky;
  top: 0;
  height: 28px;
  margin-bottom: -28px;
  background: linear-gradient(to bottom, var(--bg), transparent);
  z-index: 2;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   LANDING
   ═══════════════════════════════════════════════════════════ */
.landing {
  max-width: 740px;
  margin: 0 auto;
  padding: 10vh 28px 60px;
  text-align: center;
}

.landing-mark {
  position: relative;
  width: 78px; height: 78px;
  margin: 0 auto 34px;
  display: grid; place-items: center;
  color: var(--gold);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(214,184,126,0.14), rgba(214,184,126,0.02) 55%);
  border: 1px solid var(--gold-dim);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 70px rgba(214, 184, 126, 0.1);
  animation: markIn 1s var(--spring) both;
}
.landing-mark svg { width: 46px; height: 46px; }
.landing-mark-ring {
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: conic-gradient(from var(--angle),
    transparent 0deg,
    rgba(240, 221, 175, 0.7) 60deg,
    transparent 120deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringSpin 5s linear infinite;
}
@keyframes ringSpin { to { --angle: 360deg; } }
@keyframes markIn {
  from { opacity: 0; transform: scale(0.7) translateY(16px); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

.landing-title {
  font-family: var(--serif);
  font-size: clamp(40px, 6.4vw, 62px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}
.landing-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px) rotate(1.5deg);
  filter: blur(6px);
  animation: wordIn 0.9s var(--ease) forwards;
}
.landing-title .w:nth-child(1) { animation-delay: 0.20s; }
.landing-title .w:nth-child(2) { animation-delay: 0.32s; }
.landing-title .w:nth-child(3) { animation-delay: 0.46s; }
@keyframes wordIn {
  to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
.landing-title em {
  font-style: italic;
  background: linear-gradient(105deg, var(--gold-bright) 15%, var(--gold) 55%, var(--gold-deep));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wordIn 0.9s var(--ease) 0.46s forwards, goldShift 6s ease-in-out 1.5s infinite;
}
@keyframes goldShift {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.landing-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-dim);
  letter-spacing: 0.015em;
  margin-bottom: 54px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.65s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.suggestion {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) forwards;
  transition: transform 0.35s var(--spring), border-color 0.3s, box-shadow 0.35s;
}
.suggestion:nth-child(1) { animation-delay: 0.75s; }
.suggestion:nth-child(2) { animation-delay: 0.85s; }
.suggestion:nth-child(3) { animation-delay: 0.95s; }
.suggestion:nth-child(4) { animation-delay: 1.05s; }
.suggestion:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.25),
    0 18px 40px rgba(0, 0, 0, 0.45),
    0 0 0 4px rgba(214,184,126,0.04);
}
.suggestion:active { transform: translateY(-1px) scale(0.99); }
.sug-kicker {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  position: relative;
  z-index: 1;
}
.sug-text {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-dim);
  transition: color 0.25s;
  position: relative;
  z-index: 1;
}
.suggestion:hover .sug-text { color: var(--ink); }
.sug-arrow {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--gold);
  font-size: 14px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s var(--ease);
}
.suggestion:hover .sug-arrow { opacity: 1; transform: translateX(0); }

/* ═══════════════════════════════════════════════════════════
   THREAD
   ═══════════════════════════════════════════════════════════ */
.thread {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 28px 30px;
}

.msg {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  animation: msgIn 0.55s var(--ease) both;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(14px); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.msg-avatar {
  flex-shrink: 0;
  width: 35px; height: 35px;
  display: grid; place-items: center;
  border-radius: 11px;
  margin-top: 2px;
}
.msg.user .msg-avatar {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-dim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.msg.ai .msg-avatar {
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  background: linear-gradient(145deg, rgba(214,184,126,0.14), rgba(214,184,126,0.02) 60%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 20px rgba(214,184,126,0.1);
}
.msg.ai .msg-avatar svg { width: 20px; height: 20px; }

.msg-body { min-width: 0; flex: 1; }
.msg-role {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 5px;
}
.msg.ai .msg-role { color: var(--gold); opacity: 0.75; }

.msg-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.ai .msg-text {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.015em;
  background: linear-gradient(110deg, var(--gold-bright) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.msg-text .caret {
  display: inline-block;
  width: 9px; height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(214,184,126,0.7);
  -webkit-text-fill-color: initial;
  animation: blink 0.85s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.msg.user .msg-text {
  display: inline-block;
  padding: 12px 17px;
  border-radius: 4px 18px 18px 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.msg-actions {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.msg.ai:hover .msg-actions { opacity: 1; transform: translateY(0); }
.msg-action {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--ink-faint);
  cursor: pointer;
  transition: all 0.2s;
}
.msg-action:hover {
  background: rgba(255,255,255,0.05);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

/* Typing indicator — three gold beads with glow */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 0;
}
.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(214,184,126,0.5);
  animation: bounce 1.3s var(--ease) infinite;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0) scale(1); opacity: 0.35; }
  30% { transform: translateY(-6px) scale(1.15); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   COMPOSER
   ═══════════════════════════════════════════════════════════ */
.composer-wrap {
  padding: 8px 28px 16px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}

.composer-shell {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  border-radius: 20px;
}

/* Rotating conic halo — visible as a living border when focused */
.composer-halo {
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1.2px;
  background: conic-gradient(from var(--angle),
    transparent 0deg,
    rgba(240, 221, 175, 0.0) 40deg,
    rgba(240, 221, 175, 0.65) 90deg,
    rgba(214, 184, 126, 0.25) 140deg,
    transparent 200deg,
    rgba(139, 126, 200, 0.3) 300deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.composer-shell:focus-within .composer-halo {
  opacity: 1;
  animation: ringSpin 4s linear infinite;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 13px 13px 13px 20px;
  border-radius: 20px;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease);
}
.composer:focus-within {
  border-color: rgba(214,184,126,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 24px 60px rgba(0,0,0,0.5),
    0 0 0 5px rgba(214,184,126,0.05),
    0 0 40px rgba(214,184,126,0.07);
}
.composer textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.55;
  max-height: 180px;
  padding: 4px 0;
  caret-color: var(--gold);
}
.composer textarea::placeholder { color: var(--ink-faint); font-style: italic; }

.composer-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.composer-tool {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--ink-faint);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.composer-tool:hover {
  background: rgba(255,255,255,0.05);
  color: var(--ink-dim);
  transform: translateY(-1px);
}

.send-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: none;
  border-radius: 13px;
  color: #0a0a0c;
  background: linear-gradient(135deg, var(--gold-bright) 10%, var(--gold) 55%, var(--gold-deep));
  cursor: pointer;
  transition: all 0.3s var(--spring);
  box-shadow:
    0 4px 20px rgba(214, 184, 126, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.45);
}
.send-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 8px 28px rgba(214, 184, 126, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.5);
}
.send-btn:active:not(:disabled) { transform: translateY(0) scale(0.94); }
.send-btn:disabled {
  background: rgba(255,255,255,0.045);
  color: var(--ink-faint);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  cursor: default;
}

.composer-meta {
  max-width: 780px;
  margin: 9px auto 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.disclaimer {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.context-meter {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color 0.3s;
}
.context-meter.hot { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   COMMAND PALETTE
   ═══════════════════════════════════════════════════════════ */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-top: 16vh;
  background: rgba(5, 5, 7, 0.6);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  animation: overlayIn 0.25s var(--ease);
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.palette-overlay.closing { animation: overlayOut 0.18s var(--ease) forwards; }
@keyframes overlayOut {
  to { opacity: 0; }
}

.palette {
  width: min(560px, calc(100vw - 40px));
  height: fit-content;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  animation: paletteIn 0.35s var(--spring);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 40px 90px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(214,184,126,0.06);
}
@keyframes paletteIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-faint);
}
.palette-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 300;
  color: var(--ink);
  caret-color: var(--gold);
}
.palette-input-row input::placeholder { color: var(--ink-faint); font-style: italic; }
.palette-input-row kbd, .palette-footer kbd {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.25);
}

.palette-list {
  overflow-y: auto;
  padding: 8px;
}
.palette-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 11px;
  background: transparent;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink-dim);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.palette-item svg { flex-shrink: 0; opacity: 0.5; }
.palette-item .pal-hint {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.palette-item.selected {
  background: linear-gradient(120deg, rgba(214,184,126,0.12), rgba(214,184,126,0.04));
  color: var(--gold-bright);
}
.palette-item.selected svg { color: var(--gold); opacity: 1; }
.palette-empty {
  padding: 22px 12px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-faint);
}

.palette-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--ink-faint);
}
.palette-footer span { display: flex; align-items: center; gap: 6px; }
.palette-brand {
  margin-left: auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: var(--gold);
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); background-clip: content-box; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
.sidebar-scrim { display: none; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    z-index: 50;
    height: 100%;
    padding: 10px;
    margin-left: calc(var(--sidebar-w) * -1 - 20px);
  }
  .sidebar.open { margin-left: 0; }
  .sidebar.open + .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
  }
  .suggestions { grid-template-columns: 1fr; }
  .status-pill, .context-meter { display: none; }
  .topbar { padding: 12px 14px 8px; }
  .composer-wrap { padding: 6px 14px 12px; }
}

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


/* ═══════════════════════════════════════════════════════════
   FIX: [hidden] must beat display:flex on the palette overlay
   ═══════════════════════════════════════════════════════════ */
.palette-overlay[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════
   BOOT GATING — landing entrance motion waits for the intro
   ═══════════════════════════════════════════════════════════ */
.landing-mark, .landing-mark-ring, .landing-title .w, .landing-title em,
.landing-sub, .suggestion {
  animation: none;
}
.landing-mark { opacity: 0; }

body.revealed .landing-mark { animation: markIn 1s var(--spring) both; }
body.revealed .landing-mark-ring { animation: ringSpin 5s linear infinite; }
body.revealed .landing-title .w { animation: wordIn 0.9s var(--ease) forwards; }
body.revealed .landing-title .w:nth-child(1) { animation-delay: 0.20s; }
body.revealed .landing-title .w:nth-child(2) { animation-delay: 0.32s; }
body.revealed .landing-title .w:nth-child(3) { animation-delay: 0.46s; }
body.revealed .landing-title em {
  animation: wordIn 0.9s var(--ease) 0.46s forwards, goldShift 6s ease-in-out 1.5s infinite;
}
body.revealed .landing-sub { animation: fadeUp 0.9s var(--ease) 0.65s forwards; }
body.revealed .suggestion { animation: fadeUp 0.8s var(--ease) forwards; }
body.revealed .suggestion:nth-child(1) { animation-delay: 0.75s; }
body.revealed .suggestion:nth-child(2) { animation-delay: 0.85s; }
body.revealed .suggestion:nth-child(3) { animation-delay: 0.95s; }
body.revealed .suggestion:nth-child(4) { animation-delay: 1.05s; }

/* ═══════════════════════════════════════════════════════════
   INTRO SEQUENCE
   ═══════════════════════════════════════════════════════════ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: transform 0.95s var(--ease) 0.3s, visibility 0s linear 1.35s;
}
/* Gold hairline that rides the curtain's bottom edge */
.intro::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.intro.intro-exit {
  transform: translateY(-100%);
  visibility: hidden;
}

.intro-inner {
  text-align: center;
  transition: opacity 0.4s ease, transform 0.55s var(--ease), filter 0.45s ease;
}
.intro.intro-exit .intro-inner {
  opacity: 0;
  transform: translateY(-26px) scale(0.98);
  filter: blur(8px);
}

.intro-mark {
  position: relative;
  width: 86px; height: 86px;
  margin: 0 auto;
  display: grid; place-items: center;
  color: var(--gold);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(214,184,126,0.14), rgba(214,184,126,0.02) 55%);
  border: 1px solid var(--gold-dim);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 80px rgba(214, 184, 126, 0.12);
  animation: introMarkIn 1s var(--spring) 0.1s both;
}
.intro-mark svg { width: 50px; height: 50px; }
.intro-ring {
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: conic-gradient(from var(--angle),
    transparent 0deg,
    rgba(240, 221, 175, 0.8) 60deg,
    transparent 120deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringSpin 3.5s linear infinite;
}
@keyframes introMarkIn {
  from { opacity: 0; transform: scale(0.6); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

.intro-word {
  margin-top: 30px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: 0.44em;
  text-indent: 0.44em; /* optically re-center tracked text */
  color: var(--ink);
}
.intro-word .l {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  filter: blur(7px);
  animation: introLetter 0.85s var(--ease) forwards;
}
.intro-word .l:nth-child(1) { animation-delay: 0.40s; }
.intro-word .l:nth-child(2) { animation-delay: 0.48s; }
.intro-word .l:nth-child(3) { animation-delay: 0.56s; }
.intro-word .l:nth-child(4) { animation-delay: 0.64s; }
.intro-word .l:nth-child(5) { animation-delay: 0.72s; }
.intro-word .l:nth-child(6) { animation-delay: 0.80s; }
.intro-word .l:nth-child(7) { animation-delay: 0.88s; }
@keyframes introLetter {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.intro-tag {
  margin-top: 14px;
  font-size: 9.5px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  animation: introFade 0.9s var(--ease) 1.2s forwards;
}
@keyframes introFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 0.8; transform: translateY(0); }
}

.intro-line {
  margin: 30px auto 0;
  width: 150px;
  height: 1px;
  background: var(--line-soft);
  overflow: hidden;
}
.intro-line span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: introLine 1.7s var(--ease) 0.55s forwards;
}
@keyframes introLine {
  to { transform: scaleX(1); }
}


/* ═══════════════════════════════════════════════════════════
   ACCENT THEMES — swap the gold tokens
   ═══════════════════════════════════════════════════════════ */
body[data-accent="violet"] {
  --gold: #a796e6;
  --gold-bright: #d3c9f7;
  --gold-deep: #6f5fb8;
  --gold-dim: rgba(167, 150, 230, 0.35);
}
body[data-accent="silver"] {
  --gold: #c6ccd6;
  --gold-bright: #eef1f6;
  --gold-deep: #8b93a2;
  --gold-dim: rgba(198, 204, 214, 0.35);
}

/* ═══════════════════════════════════════════════════════════
   MODEL PICKER DROPDOWN
   ═══════════════════════════════════════════════════════════ */
.model-wrap { position: relative; }
.model-picker {
  font-family: var(--sans);
  border-radius: 12px;
}
.model-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 300px;
  padding: 6px;
  border-radius: 16px;
  z-index: 60;
  animation: menuIn 0.28s var(--spring);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 30px 70px rgba(0, 0, 0, 0.6);
}
.model-menu[hidden] { display: none; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s;
}
.model-option:hover { background: rgba(255,255,255,0.045); }
.model-option.active {
  background: linear-gradient(120deg, rgba(214,184,126,0.12), rgba(214,184,126,0.03));
}
.mo-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mo-name {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ink);
}
.model-option.active .mo-name { color: var(--gold-bright); }
.mo-desc { font-size: 11.5px; color: var(--ink-faint); }
.mo-check {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--gold);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.25s var(--spring);
}
.model-option.active .mo-check { opacity: 1; transform: scale(1); }

/* ═══════════════════════════════════════════════════════════
   SETTINGS MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 7, 0.6);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  animation: overlayIn 0.25s var(--ease);
}
.modal-overlay[hidden] { display: none; }
.modal {
  width: min(430px, 100%);
  border-radius: 20px;
  padding: 22px;
  animation: paletteIn 0.35s var(--spring);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.3),
    0 40px 90px rgba(0, 0, 0, 0.65);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  background: linear-gradient(110deg, var(--ink), var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-section { margin-bottom: 20px; }
.modal-label {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.modal-hint {
  margin-top: 8px;
  font-size: 11.5px;
  font-style: italic;
  font-family: var(--serif);
  color: var(--ink-faint);
}
.modal-foot {
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.swatch:hover { transform: scale(1.1); }
.swatch-gold { background: linear-gradient(135deg, #f0ddaf, #a8874f); }
.swatch-violet { background: linear-gradient(135deg, #d3c9f7, #6f5fb8); }
.swatch-silver { background: linear-gradient(135deg, #eef1f6, #8b93a2); }
.swatch.active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold);
  transform: scale(1.08);
}

.segmented {
  display: flex;
  padding: 3px;
  gap: 3px;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line-soft);
}
.segmented button {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button.active {
  background: linear-gradient(120deg, rgba(214,184,126,0.16), rgba(214,184,126,0.06));
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.danger-btn {
  width: 100%;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid rgba(224, 122, 122, 0.25);
  background: rgba(224, 122, 122, 0.06);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: #e0a0a0;
  cursor: pointer;
  transition: all 0.25s;
}
.danger-btn:hover {
  background: rgba(224, 122, 122, 0.12);
  border-color: rgba(224, 122, 122, 0.45);
  color: #f0bcbc;
}

/* Dots button inside user chip */
.dots-btn {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: all 0.2s;
}
.dots-btn:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  padding: 11px 20px;
  border-radius: 13px;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  text-overflow: ellipsis;
  animation: toastIn 0.4s var(--spring);
}
.toast[hidden] { display: none; }
.toast.leaving { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.95); filter: blur(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); filter: blur(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); filter: blur(4px); }
}

/* ═══════════════════════════════════════════════════════════
   MESSAGE ACTION VOTE STATE
   ═══════════════════════════════════════════════════════════ */
.msg-action.voted {
  color: var(--gold-bright);
  background: rgba(214,184,126,0.12);
}


/* ═══════════════════════════════════════════════════════════
   LOGO MARKS — the ASCII cat, zoomed to crop its padding
   ═══════════════════════════════════════════════════════════ */
.mark-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.brand-mark .mark-img,
.msg-avatar .mark-img { transform: scale(1.5); }
.landing-mark .mark-img,
.intro-mark .mark-img { transform: scale(1.35); }

.msg.ai .msg-avatar,
.landing-mark,
.intro-mark { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   X (TWITTER) LINK
   ═══════════════════════════════════════════════════════════ */
.x-link {
  display: grid;
  place-items: center;
  width: 33px; height: 33px;
  border-radius: 11px;
  color: var(--ink-dim);
  text-decoration: none;
  transition: transform 0.3s var(--spring), color 0.25s, border-color 0.3s;
}
.x-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold-dim);
  transform: translateY(-1px);
}
.x-link:active { transform: scale(0.94); }
