/* ══════════════════════════════════════════════════════════
   PARALLEL MINDS
   Dark · Discord grey · Excalidraw sketch cards · Comic Relief
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ────────────────────────────────────────────── */
:root {
  --bg:        #111214;
  --bg-nav:    #18191c;
  --bg-card:   #1e2024;
  --bg-input:  #25272c;
  --bg-hover:  #2a2c31;

  --line:      rgba(255,255,255,0.08);
  --line-med:  rgba(255,255,255,0.13);
  --line-hi:   rgba(255,255,255,0.22);

  --t1: #e8eaed;
  --t2: #9b9fa8;
  --t3: #52555c;
  --t4: #2e3035;

  --blurple: #5865f2;

  --openai: #1db580;
  --gemini: #4a9eff;
  --claude: #d08050;

  --green: #4ade80;
  --red:   #f87171;

  --f-logo: "Caveat", cursive;
  --f-ui:   "Comic Relief", cursive;
  --f-in:   "Inter", system-ui, sans-serif;

  --rad: 12px;
  --dur: 140ms;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--f-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.07); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.13); }

/* ══════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════ */
.app-header {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.75rem;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Caveat ONLY on logo — never touched anywhere else */
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-logo);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--t1);
  user-select: none;
}
.logo-icon { color: var(--blurple); font-size: 1.3rem; }
.logo-text em { font-style: normal; color: var(--t2); }

.header-badge {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  color: var(--t3);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 2px 10px;
}

/* ══════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.75rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ══════════════════════════════════════════════════════════
   SKETCH CARD — shared
   ══════════════════════════════════════════════════════════ */
.sketch-border {
  border: 1.5px dashed rgba(255,255,255,0.11);
  border-radius: var(--rad);
  background: var(--bg-card);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.55);
}

/* ══════════════════════════════════════════════════════════
   PROMPT AREA
   ══════════════════════════════════════════════════════════ */
.prompt-section { width: 100%; }

.prompt-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prompt-label {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* textarea + button in one row */
.prompt-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: var(--bg-input);
  border: 1px solid var(--line-med);
  border-radius: 9px;
  overflow: hidden;
  transition: border-color var(--dur);
}

.prompt-row:focus-within {
  border-color: rgba(88,101,242,0.5);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.08);
}

.prompt-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--t1);
  font-family: var(--f-in);
  font-size: 0.93rem;
  line-height: 1.65;
  padding: 0.85rem 1rem;
  resize: none;
  min-height: 72px;
  max-height: 200px;
}

.prompt-textarea::placeholder { color: var(--t4); font-size: 0.9rem; }

/* ── Run button — simple, lives inside the row ─────────── */
.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--blurple);
  color: #fff;
  border: none;
  border-left: 1px solid rgba(255,255,255,0.06);
  padding: 0 1.25rem;
  font-family: var(--f-ui);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur);
  /* no glow, no shadow, no border-radius — it's flush inside the row */
}

.send-btn:hover:not(:disabled) { background: #6470f3; }
.send-btn:active:not(:disabled) { background: #4e5bd4; }
.send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.send-btn svg { flex-shrink: 0; }

/* spinner */
.send-btn.loading > * { visibility: hidden; }
.send-btn.loading { position: relative; }
.send-btn.loading::after {
  content: "";
  position: absolute;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bottom row: status + clear ────────────────────────── */
.prompt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.status-bar {
  font-family: var(--f-ui);
  font-size: 0.78rem;
  color: var(--t3);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--dur);
}

.status-bar::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--t4);
  flex-shrink: 0;
  transition: background var(--dur);
}

.status-bar.streaming { color: var(--green); }
.status-bar.streaming::before {
  background: var(--green);
  animation: pulse-dot 1s ease-in-out infinite;
}
.status-bar.error { color: var(--red); }
.status-bar.error::before { background: var(--red); }
.status-bar.done  { color: var(--t2); }
.status-bar.done::before  { background: var(--t2); }

@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.65); }
}

/* Clear — plain text link style, not a "button" */
.clear-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t3);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color var(--dur);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: color var(--dur), text-decoration-color var(--dur);
}

.clear-btn:hover {
  color: var(--t2);
  text-decoration-color: var(--t3);
}

/* ══════════════════════════════════════════════════════════
   CARDS GRID
   ══════════════════════════════════════════════════════════ */
.cards-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  align-items: start;
}

@media (max-width: 1060px) { .cards-section { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .cards-section { grid-template-columns: 1fr; }
  .prompt-row { flex-direction: column; }
  .send-btn {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem;
  }
}

/* ── Card ──────────────────────────────────────────────── */
.model-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 680px;
  overflow: hidden;
  transition: border-color var(--dur), box-shadow var(--dur);
}

.model-card.active {
  border-color: var(--line-hi);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04) inset;
}

.model-card.done-state  { border-color: var(--line); }
.model-card.error-state { border-color: rgba(248,113,113,0.25); }

/* ── Winner highlight ──────────────────────────────────── */
.model-card.winner {
  border-color: rgba(255,255,255,0.7);
  border-style: dashed;
  box-shadow:
    3px 3px 0 rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.08) inset;
  animation: winner-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes winner-in {
  from { box-shadow: 3px 3px 0 rgba(0,0,0,0.55), 0 0 0 0 rgba(255,255,255,0.35); }
  to   { box-shadow: 3px 3px 0 rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08) inset; }
}

.winner-badge {
  font-family: var(--f-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px dashed rgba(255,255,255,0.5);
  border-radius: 99px;
  padding: 2px 9px;
  cursor: default;
  /* tooltip underline hint */
  text-decoration: underline dotted rgba(255,255,255,0.3);
  text-underline-offset: 2px;
}

/* ── Card header ───────────────────────────────────────── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-ui);
  font-size: 0.88rem;
  font-weight: 700;
}

.model-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity var(--dur);
}

.model-card.active .model-logo {
  opacity: 1;
  animation: pulse-logo 1s ease-in-out infinite;
}

@keyframes pulse-logo {
  0%,100% { opacity: 1;    transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.88); }
}

.openai .model-name { color: var(--openai); }
.gemini .model-name { color: var(--gemini); }
.claude .model-name { color: var(--claude); }

.card-meta { display: flex; align-items: center; gap: 7px; }

.token-count {
  font-family: var(--f-ui);
  font-size: 0.7rem;
  color: var(--t4);
}

.card-status {
  font-family: var(--f-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
}

.card-status.idle      { color: var(--t4);    border-color: var(--t4);    background: transparent; }
.card-status.streaming { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.06); }
.card-status.done      { color: var(--t3);    border-color: var(--t3);    background: transparent; }
.card-status.error     { color: var(--red);   border-color: var(--red);   background: rgba(248,113,113,0.06); }

/* ── Output ────────────────────────────────────────────── */
.card-output {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1rem 1rem;
  font-family: var(--f-ui);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--t1);
  word-break: break-word;
  scroll-behavior: auto;
}

.placeholder-text {
  color: var(--t4);
  font-size: 0.88rem;
  font-style: italic;
}

.error-text {
  display: block;
  margin-top: 0.5rem;
  color: var(--red);
  font-size: 0.88rem;
}

/* blinking cursor */
.card-cursor {
  display: inline-block;
  width: 1.5px;
  height: 0.9em;
  background: var(--t2);
  margin-left: 1px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: blink 0.9s step-start infinite;
}
.card-cursor.hidden { display: none; }

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ══════════════════════════════════════════════════════════
   MARKDOWN PROSE — scoped to .card-output
   ══════════════════════════════════════════════════════════ */

/* headings */
.card-output h1,
.card-output h2,
.card-output h3,
.card-output h4 {
  font-family: var(--f-ui);
  font-weight: 700;
  color: var(--t1);
  line-height: 1.3;
  margin: 1.1em 0 0.35em;
}
.card-output h1 { font-size: 1.18rem; }
.card-output h2 { font-size: 1.05rem; border-bottom: 1px dashed rgba(255,255,255,0.08); padding-bottom: 0.25em; }
.card-output h3 { font-size: 0.97rem; color: var(--t2); }
.card-output h4 { font-size: 0.92rem; color: var(--t2); }
.card-output > *:first-child { margin-top: 0; }

/* paragraphs */
.card-output p { margin: 0 0 0.65em; }
.card-output p:last-child { margin-bottom: 0; }

/* inline emphasis */
.card-output strong { font-weight: 700; color: var(--t1); }
.card-output em     { font-style: italic; color: var(--t2); }
.card-output del    { color: var(--t3); text-decoration: line-through; }

/* links */
.card-output a { color: #7b8fff; text-decoration: underline; text-underline-offset: 2px; }
.card-output a:hover { color: #a0aaff; }

/* lists */
.card-output ul,
.card-output ol { margin: 0.25em 0 0.65em 1.3em; display: flex; flex-direction: column; gap: 0.2em; }
.card-output li { line-height: 1.75; }
.card-output ul { list-style: disc; }
.card-output ol { list-style: decimal; }
.card-output li::marker { color: var(--t3); }
.card-output li > ul,
.card-output li > ol  { margin: 0.2em 0 0.2em 1.1em; }

/* inline code */
.card-output code {
  font-family: "JetBrains Mono", "Cascadia Code", "Fira Code", monospace;
  font-size: 0.8em;
  background: rgba(255,255,255,0.07);
  color: #c4cdeb;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.07);
}

/* fenced code block */
.card-output pre {
  background: #13141a;
  border: 1.5px dashed rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  margin: 0.5em 0 0.85em;
}
.card-output pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.81rem;
  color: #c4cdeb;
  line-height: 1.65;
}

/* blockquote */
.card-output blockquote {
  border-left: 2.5px dashed rgba(255,255,255,0.18);
  padding: 0.05em 0 0.05em 1em;
  margin: 0.4em 0 0.75em;
  color: var(--t2);
  font-style: italic;
}

/* horizontal rule */
.card-output hr {
  border: none;
  border-top: 1px dashed rgba(255,255,255,0.09);
  margin: 0.9em 0;
}

/* table */
.card-output table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.5em 0 0.85em;
}
.card-output th,
.card-output td { padding: 0.4em 0.7em; border: 1px solid rgba(255,255,255,0.07); text-align: left; }
.card-output th { background: rgba(255,255,255,0.04); font-weight: 700; color: var(--t2); }
.card-output tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ══════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════ */
.app-footer {
  text-align: center;
  padding: 1rem;
  font-family: var(--f-ui);
  font-size: 0.73rem;
  color: var(--t4);
  border-top: 1px solid var(--line);
}

/* ══════════════════════════════════════════════════════════
   HEADER — right side (user info, rounds, logout)
   ══════════════════════════════════════════════════════════ */

.header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ── Round circles ──────────────────────────────────────── */
.round-circles {
  display: flex;
  align-items: center;
  gap: 6px;
}

.round-circle {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--blurple);
  border: 1.5px solid rgba(88,101,242,0.5);
  /* smooth fade-out when consumed */
  transition:
    background  0.5s ease,
    border-color 0.5s ease,
    opacity     0.5s ease;
  flex-shrink: 0;
}

/* Consumed = grey, faded */
.round-circle.consumed {
  background: var(--t4);
  border-color: var(--t4);
  opacity: 0.35;
}

.rounds-label {
  font-family: var(--f-ui);
  font-size: 0.75rem;
  color: var(--t2);
  white-space: nowrap;
  transition: color 0.4s ease;
}

.rounds-label.exhausted {
  color: var(--red);
}

/* ── User name ──────────────────────────────────────────── */
.header-user {
  font-family: var(--f-ui);
  font-size: 0.8rem;
  color: var(--t2);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Logout button ──────────────────────────────────────── */
.logout-btn {
  background: none;
  border: 1px solid var(--line-med);
  border-radius: 6px;
  padding: 3px 10px;
  font-family: var(--f-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--t3);
  cursor: pointer;
  transition: color var(--dur), border-color var(--dur), background var(--dur);
  white-space: nowrap;
}
.logout-btn:hover {
  color: var(--t1);
  border-color: var(--line-hi);
  background: var(--bg-hover);
}

/* ══════════════════════════════════════════════════════════
   GUARDRAIL BAR
   ══════════════════════════════════════════════════════════ */
.guardrail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1.5px dashed rgba(255,255,255,0.08);
  border-radius: var(--rad);
  font-family: var(--f-ui);
  font-size: 0.78rem;
}

.guardrail-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.guardrail-label {
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.guardrail-chip {
  padding: 2px 9px;
  border-radius: 99px;
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 700;
}

.guardrail-chip.safe.is-safe    { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.07); }
.guardrail-chip.safe.is-blocked { color: var(--red);   border-color: var(--red);   background: rgba(248,113,113,0.07); }
.guardrail-chip.tokens          { color: var(--t3);    border-color: var(--t4);    background: transparent; }

.guardrail-chip.intent                  { color: var(--t2); border-color: var(--t4); background: transparent; }
.guardrail-chip.intent.intent-coding    { color: var(--openai); border-color: var(--openai); background: rgba(29,181,128,0.08); }
.guardrail-chip.intent.intent-creative  { color: var(--claude); border-color: var(--claude); background: rgba(208,128,80,0.08); }
.guardrail-chip.intent.intent-harmful   { color: var(--red);    border-color: var(--red);    background: rgba(248,113,113,0.08); }
.guardrail-chip.intent.intent-jailbreak { color: var(--red);    border-color: var(--red);    background: rgba(248,113,113,0.08); }

.guardrail-reason {
  font-family: var(--f-in);
  font-size: 0.75rem;
  color: var(--t3);
  text-align: right;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   BLOCKED BANNER
   ══════════════════════════════════════════════════════════ */
.blocked-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: rgba(248,113,113,0.06);
  border: 1.5px dashed rgba(248,113,113,0.3);
  border-radius: var(--rad);
  font-family: var(--f-ui);
  font-size: 0.9rem;
}

.blocked-icon { font-size: 1.1rem; flex-shrink: 0; }
.blocked-reason { color: var(--red); }

/* ══════════════════════════════════════════════════════════
   ROUNDS EXHAUSTED BANNER
   ══════════════════════════════════════════════════════════ */
.rounds-exhausted-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  background: rgba(88,101,242,0.06);
  border: 1.5px dashed rgba(88,101,242,0.3);
  border-radius: var(--rad);
  font-family: var(--f-ui);
  font-size: 0.9rem;
  color: var(--t2);
}

/* ══════════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.card-blocked { opacity: 0.4; pointer-events: none; }

/* ══════════════════════════════════════════════════════════
   AUTH MODAL
   ══════════════════════════════════════════════════════════ */

/* Prevent background scroll when modal is open */
body.modal-open { overflow: hidden; }

/* Backdrop */
.auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: backdrop-in 0.18s ease both;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal card */
.auth-modal {
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.85rem;
  animation: modal-in 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.auth-modal-header {
  margin-bottom: 1.75rem;
}

/* Reuse .logo from header inside the modal */
.auth-modal .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.auth-modal-sub {
  font-family: var(--f-in);
  font-size: 0.875rem;
  color: var(--t2);
  line-height: 1.5;
}

/* Fields */
.field-group { margin-bottom: 1rem; }

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.35rem;
}

.field-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--line-med);
  border-radius: 8px;
  color: var(--t1);
  font-family: var(--f-ui);
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.field-input::placeholder { color: var(--t3); }
.field-input:focus {
  border-color: var(--blurple);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.18);
}

/* Submit button */
.submit-btn {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.72rem 1rem;
  background: var(--blurple);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--f-ui);
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur), opacity var(--dur), transform 80ms;
}
.submit-btn:hover:not(:disabled) { background: #4752c4; }
.submit-btn:active:not(:disabled) { transform: translateY(1px); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Note under button */
.auth-note {
  margin-top: 0.85rem;
  font-family: var(--f-in);
  font-size: 0.75rem;
  color: var(--t3);
  text-align: center;
}

/* Error */
.auth-error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 7px;
  color: var(--red);
  font-family: var(--f-in);
  font-size: 0.85rem;
  padding: 0.55rem 0.8rem;
  margin-bottom: 1rem;
}

/* Success */
.auth-success {
  text-align: center;
  padding: 0.5rem 0;
}
.auth-success-icon  { width: 48px; height: 48px; display: block; margin: 0 auto 1rem; opacity: 0.85; }
.auth-success-title { font-size: 1.1rem; font-weight: 700; color: var(--green); margin-bottom: 0.3rem; }
.auth-success-hint  { font-family: var(--f-in); font-size: 0.85rem; color: var(--t2); line-height: 1.5; }

/* ── Round divider — separates responses between rounds ─── */
.round-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0;
}

.round-divider::before,
.round-divider::after {
  content: "";
  flex: 1;
  border-top: 1px dashed rgba(255,255,255,0.1);
}

.round-divider-label {
  font-family: var(--f-in);
  font-size: 0.7rem;
  color: var(--t4);
  letter-spacing: 0.15em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Char counter ────────────────────────────────────────── */
.prompt-footer-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.char-count {
  font-family: var(--f-in);
  font-size: 0.72rem;
  color: var(--t3);
  transition: color var(--dur);
  letter-spacing: 0.02em;
}

.char-count-over {
  color: var(--red);
  font-weight: 700;
}

/* ── Input shake — feedback when submitting empty ────────── */
@keyframes input-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  60%      { transform: translateX(6px); }
  80%      { transform: translateX(-3px); }
}
.input-shake { animation: input-shake 0.35s ease both; }
