/* /companion — Risa's page. Rides the site tokens in style.css. */
.risa-hero { display: flex; flex-direction: column; align-items: center; }
#risaStage { width: min(64vw, 300px); height: min(60vw, 284px); margin: 4px auto 0; cursor: default; }

#risaSkins { display: flex; gap: 8px; justify-content: center; margin: 2px 0 4px; }
.risa-skin { appearance: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card); display: flex; align-items: center;
  justify-content: center; padding: 0; opacity: .65; transition: opacity .15s ease, border-color .15s ease; }
.risa-skin:hover { opacity: 1; }
.risa-skin.on { opacity: 1; border-color: var(--gold); box-shadow: 0 0 8px rgba(243,200,73,.35); }

.risa-panel { width: 100%; max-width: 640px; margin: 6px auto 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 18px; padding: 14px 14px 12px; text-align: left; }

#risaLog { max-height: 44vh; min-height: 96px; overflow-y: auto; display: flex; flex-direction: column;
  gap: 10px; padding: 2px 2px 8px; scroll-behavior: smooth; }
.rb-msg { max-width: 86%; border-radius: 14px; padding: 9px 13px; font-size: 15px; line-height: 1.5; }
.rb-user { align-self: flex-end; background: var(--accent-soft); border: 1px solid rgba(59,111,224,.35); color: var(--ink); }
.rb-risa { align-self: flex-start; background: rgba(243,200,73,.08); border: 1px solid rgba(243,200,73,.28); color: var(--ink); white-space: pre-line; }

.rb-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rb-card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 12px; transition: border-color .15s ease, transform .15s ease; }
.rb-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.rb-card-t { display: inline; color: var(--ink); font-weight: 650; font-size: 15px; }
.rb-card-s { display: inline-block; margin-left: 8px; color: var(--gold); font-size: 11.5px; border: 1px solid var(--gold-soft);
  background: var(--gold-soft); border-radius: 999px; padding: 1px 8px; vertical-align: 2px; }
.rb-card-d { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }

.rb-typing { display: flex; gap: 5px; padding: 13px 16px; align-items: center; }
.rb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .35; animation: rbdot 1.2s infinite; }
.rb-typing span:nth-child(2) { animation-delay: .2s; }
.rb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes rbdot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

#risaChips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.rb-chip { appearance: none; cursor: pointer; background: var(--accent-soft); color: var(--ink);
  border: 1px solid rgba(59,111,224,.4); border-radius: 999px; padding: 7px 14px; font-size: 13.5px;
  transition: border-color .15s ease, background .15s ease; }
.rb-chip:hover { border-color: var(--accent); background: rgba(59,111,224,.22); }

/* wrap so the input keeps a full, usable row when the button count (send, mic,
   speaker, memory) would otherwise squeeze it on narrow phones; on wider panels
   the flex-basis lets everything sit on one line. */
#risaForm { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#risaInput { flex: 1 1 200px; min-width: 0; background: rgba(255,255,255,.06); color: var(--ink);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 13px; font-size: 16px; outline: none; }
#risaInput:focus { border-color: var(--accent); }
#risaInput::placeholder { color: var(--muted); }
.rb-btn { appearance: none; cursor: pointer; flex: 0 0 auto; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--ink); font-size: 15px; padding: 0 14px; min-height: 44px; }
.rb-btn:hover { border-color: var(--gold); }
#risaSend { background: var(--accent); border-color: var(--accent); font-weight: 650; }
#risaSend:hover { filter: brightness(1.12); }
#risaMic.listening { border-color: var(--heart); background: rgba(255,93,143,.18); animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,93,143,.45); } 50% { box-shadow: 0 0 0 7px rgba(255,93,143,0); } }

.risa-notes { max-width: 640px; margin: 22px auto 0; text-align: left; display: grid; gap: 10px; }
.risa-note { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 15px;
  color: var(--muted); font-size: 14px; line-height: 1.55; min-width: 0; overflow-wrap: anywhere; }
.risa-note b { color: var(--ink); }
.risa-note .soon { color: var(--gold); font-weight: 650; }

/* Spark (on-device brain) card, injected into #sparkNote */
.spark-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.spark-btn { padding: 8px 14px; font-size: 13.5px; color: var(--ink); background: var(--gold-soft); border-color: var(--gold); }
.spark-btn:hover { filter: brightness(1.15); }
.spark-btn:disabled { opacity: .6; cursor: default; }
.spark-big { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.spark-sel { appearance: none; background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 11px; font-size: 13px; max-width: 100%; }
.spark-bar { display: none; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); margin-top: 10px; overflow: hidden; }
.spark-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), #ffd76a); transition: width .3s ease; }
.spark-status { font-size: 12px; color: var(--muted); margin-top: 6px; white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  #risaStage { width: 74vw; height: 70vw; }
  #risaLog { max-height: 38vh; }
  .rb-msg { max-width: 94%; }
}

/* ---- Memory panel (risa-memory.js) ---- */
.rm-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(6,10,22,.72);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.rm-panel { width: 100%; max-width: 520px; background: #101a38; border: 1px solid var(--border);
  border-radius: 18px; padding: 16px 18px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.rm-top { display: flex; align-items: center; justify-content: space-between; }
.rm-top b { color: var(--ink); font-size: 17px; }
.rm-x { appearance: none; cursor: pointer; background: none; border: none; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.rm-x:hover { color: var(--ink); }
.rm-intro { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 4px 0 12px; }
.rm-h { color: var(--gold); font-weight: 650; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 8px; }
.rm-sec { display: flex; flex-direction: column; gap: 8px; }
.rm-row { display: flex; align-items: center; gap: 8px; }
.rm-lbl { color: var(--muted); font-size: 14px; flex: 0 0 auto; min-width: 84px; }
.rm-in { flex: 1; min-width: 0; background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 11px; font-size: 14px; outline: none; }
.rm-in:focus { border-color: var(--accent); }
.rm-in-sm { flex: 1 1 40%; }
.rm-add { flex-wrap: wrap; }
.rm-del { appearance: none; cursor: pointer; background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 4px 8px; font-size: 12px; flex: 0 0 auto; }
.rm-del:hover { border-color: var(--heart); color: var(--heart); }
.rm-toggle input { width: 18px; height: 18px; accent-color: var(--gold); margin-left: auto; }
.rm-empty { color: var(--muted); font-size: 13px; font-style: italic; }
.rm-prow, .rm-drow { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 13.5px; color: var(--ink); }
.rm-sum { color: var(--muted); }
.rm-visits { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.rm-msg, .rm-fmsg { color: var(--gold); font-size: 12.5px; margin-top: 4px; }
.rm-forget { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.rm-chk { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.rm-chk input { accent-color: var(--heart); }
.rm-forgetbtn { appearance: none; cursor: pointer; background: rgba(255,93,143,.12); color: var(--heart);
  border: 1px solid rgba(255,93,143,.5); border-radius: 12px; padding: 9px 16px; font-size: 14px; font-weight: 600; }
.rm-forgetbtn:hover { background: rgba(255,93,143,.2); }
.rm-forgetbtn.armed { background: var(--heart); color: #fff; }
.rm-sec .rb-chip.on { border-color: var(--gold); background: rgba(243,200,73,.18); }
@media (max-width: 560px) { .rm-lbl { min-width: 64px; } }

/* "New here?" hint — surfaces the /how guide right under the tagline */
.how-hint { text-align: center; margin: -2px 0 12px; font-size: 14px; }
.how-hint a { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color .15s ease; }
.how-hint a:hover { border-bottom-color: var(--gold); }

/* engine-load heads-up (risa-engines.js) — only on mobile with all three on */
.rb-heavy { margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--gold);
  background: rgba(243,200,73,.08); border: 1px solid rgba(243,200,73,.3); border-radius: 10px; padding: 7px 10px; }
