/* ── Toast shell ─────────────────────────────────────────────────────────
   Still pops, but without the tilt and the overshoot: the bot keeps its
   personality in what it says, not in how hard the box lands. */

.char-limit-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  width: 440px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.94);
  transform-origin: center center;
}
.char-limit-toast.clt-visible {
  animation: clt-pop .32s cubic-bezier(.22,1,.36,1) forwards;
  pointer-events: auto;
}
.char-limit-toast.clt-hiding {
  animation: clt-bye .22s ease-in forwards;
}
@keyframes clt-pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes clt-bye {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
}

.clt-bubble {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-modal);
  padding: 24px 26px 22px;
  box-shadow: 0 40px 90px rgba(0,0,0,.6);
  position: relative;
}

/* ── Bot header ──────────────────────────────────────────────────────────── */

.clt-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.clt-bot {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.clt-bot svg { width: 19px; height: 19px; }

.clt-bot.clt-talk { animation: clt-talk .5s ease; }
@keyframes clt-talk {
  0%   { transform: scale(1)    rotate(0); }
  25%  { transform: scale(1.14) rotate(-7deg); }
  55%  { transform: scale(1.06) rotate(5deg); }
  80%  { transform: scale(1.01) rotate(-2deg); }
  100% { transform: scale(1)    rotate(0); }
}

.clt-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-4);
}

.clt-deleted {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,138,138,.12);
  border: 1px solid var(--red-line);
  border-radius: 10px;
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.clt-deleted svg { width: 13px; height: 13px; }

.clt-msg {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  min-height: 42px;
  white-space: pre-wrap;
}
.clt-cursor {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--accent);
  border-radius: 1px;
  vertical-align: middle;
  margin-left: 1px;
  animation: blink .8s step-end infinite;
}

/* ── Welcome ─────────────────────────────────────────────────────────────
   Same message as before, restructured: the promise leads, the three things it
   does are scannable, and privacy is a block you cannot miss instead of a line
   in the middle of prose. */

.char-limit-toast.clt-welcome { width: min(560px, calc(100vw - 32px)); }
.clt-welcome .clt-bubble {
  padding: 28px 30px 26px;
  text-align: left;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.clt-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.clt-close svg { width: 14px; height: 14px; }
.clt-close:hover { color: var(--text); background: rgba(255,255,255,.06); }

.cw-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cw-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cw-mark svg { width: 17px; height: 17px; }
.cw-brand-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-4);
}

.cw-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -1.1px;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 12px;
  text-wrap: balance;
}

.cw-lead {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 18px;
  text-wrap: pretty;
}
.cw-lead strong { color: var(--text); font-weight: 600; }

.cw-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 18px;
}
.cw-points li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.cw-points strong { color: var(--text); font-weight: 600; }
.cw-points em { font-style: normal; color: var(--text); }

.cw-point-icon {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent-2);
  display: inline-flex;
}
.cw-point-icon svg { width: 15px; height: 15px; }
.cw-point-elec { color: var(--elec); }

.cw-privacy {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  background: rgba(192,241,78,.06);
  border: 1px solid rgba(192,241,78,.28);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 20px;
}
.cw-privacy strong { color: var(--lime); font-weight: 700; }
.cw-privacy-icon { flex-shrink: 0; margin-top: 2px; color: var(--lime); display: inline-flex; }
.cw-privacy-icon svg { width: 15px; height: 15px; }

.cw-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cw-cta {
  flex: 1 1 170px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.cw-cta:hover { background: var(--accent-2); }
.cw-cta:active { transform: scale(.97); }

.cw-ghost {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text-3);
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cw-ghost:hover { border-color: var(--accent); color: var(--text); }

/* The escape hatch for visitors who won't upload anything of their own */
.cw-sample {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-4);
}
.cw-sample a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(154,160,255,.4);
}
.cw-sample a:hover,
.cw-sample a:focus-visible { color: var(--text); border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .char-limit-toast.clt-visible { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .clt-bot.clt-talk { animation: none; }
}

/* ── Char counter ────────────────────────────────────────────────────────── */

.input-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.input-bottom .input-hint { margin-top: 0; flex: 1; }

.char-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .2s, color .2s;
  pointer-events: none;
  user-select: none;
  color: var(--text-4);
}
.char-counter.clt-warn  { opacity: 1; color: var(--elec); }
.char-counter.clt-limit { opacity: 1; color: var(--red); font-weight: 700; }
