@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════
   ARIA — CYBERPUNK REDESIGN  |  PART 1: FOUNDATION
   Black & Orange | Sharp | HUD | Scan Lines
   ═══════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* Core palette */
  --bg:           #050505;
  --bg-2:         #0a0a0a;
  --card:         #0d0d0d;
  --card2:        #111111;
  --card3:        #161616;

  /* Borders */
  --border:       rgba(249,115,22,0.1);
  --border-2:     rgba(249,115,22,0.2);
  --border-3:     rgba(249,115,22,0.35);
  --border-dim:   rgba(255,255,255,0.05);

  /* Orange accent — the signature color */
  --rose:         #f97316;
  --rose-dim:     rgba(249,115,22,0.08);
  --rose-dim2:    rgba(249,115,22,0.14);
  --rose-border:  rgba(249,115,22,0.25);
  --rose-border2: rgba(249,115,22,0.45);
  --rose-glow:    0 0 20px rgba(249,115,22,0.4), 0 0 60px rgba(249,115,22,0.12);
  --rose-glow-sm: 0 0 10px rgba(249,115,22,0.35);

  /* Text */
  --text:         #f0ece4;
  --text2:        rgba(240,236,228,0.72);
  --muted:        rgba(240,236,228,0.35);
  --faint:        rgba(240,236,228,0.14);

  /* Secondary accents */
  --green:        #39d98a;
  --green-dim:    rgba(57,217,138,0.08);
  --amber:        #fbbf24;
  --amber-dim:    rgba(251,191,36,0.08);
  --blue:         #38bdf8;
  --blue-dim:     rgba(56,189,248,0.08);
  --red:          #f43f5e;
  --red-dim:      rgba(244,63,94,0.08);

  /* Geometry — sharp, no pills */
  --radius-sm:    2px;
  --radius-md:    3px;
  --radius-lg:    4px;
  --radius-xl:    6px;

  /* Typography */
  --font-display: 'Orbitron', monospace;
  --font-mono:    'Share Tech Mono', monospace;
  --font-body:    'Rajdhani', sans-serif;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── GRID BACKGROUND ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(249,115,22,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249,115,22,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* CRT scan lines */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.07) 2px,
    rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
}

/* Corner circuit accent marks (decorative) */
.ambient { display: none; }

/* ── SCREENS ── */
.screen {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  max-width: 480px; margin: 0 auto;
}
.screen:not(#introScreen) { display: none; }
.screen.active { display: flex !important; }

/* ── HUD CORNER ACCENTS — decorative helper ── */
.hud-corner {
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--rose);
  border-style: solid;
  pointer-events: none;
}
.hud-corner-tl { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; }
.hud-corner-tr { top: 0; right: 0; border-width: 1.5px 1.5px 0 0; }
.hud-corner-bl { bottom: 0; left: 0; border-width: 0 0 1.5px 1.5px; }
.hud-corner-br { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; }

/* ── TOP BAR ── */
.top-bar {
  padding: 16px 16px 0;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(to bottom, var(--bg) 75%, transparent);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Add HUD line accent to top bar */
.top-bar::after {
  content: '';
  position: absolute; bottom: 0; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
  opacity: 0.35;
}

.back-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px; cursor: pointer;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; flex-shrink: 0;
  position: relative;
}
.back-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.back-btn:active {
  border-color: var(--rose-border);
  color: var(--rose);
  box-shadow: var(--rose-glow-sm);
}

.aria-mini {
  width: 34px; height: 34px;
  background: transparent;
  box-shadow: 0 0 14px rgba(249,115,22,0.3);
  flex-shrink: 0; position: relative;
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-sm);
}
.aria-mini.thinking::before {
  content: '';
  position: absolute; inset: -3px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  border-top-color: var(--rose);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.top-bar-info { flex: 1; min-width: 0; }
.top-bar-name {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
}
.top-bar-status {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--rose);
  margin-top: 2px; letter-spacing: 0.05em;
}

/* ── SECTION LABELS ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted);
  letter-spacing: 0.2em; padding: 0 16px; margin-bottom: 12px;
}
.section-label::before {
  content: '// ';
  color: var(--rose); opacity: 0.5;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card2);
  border: 1px solid var(--rose-border);
  color: var(--rose);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  opacity: 0; transition: all 0.25s ease;
  pointer-events: none; z-index: 999;
  white-space: nowrap;
  box-shadow: var(--rose-glow-sm);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-green {
  border-color: rgba(57,217,138,0.3);
  color: var(--green);
  box-shadow: 0 0 12px rgba(57,217,138,0.3);
}
.toast.toast-blue {
  border-color: rgba(56,189,248,0.3);
  color: var(--blue);
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-bottom: none;
  border-radius: 0;
  padding: 20px 16px 40px;
  width: 100%; max-width: 480px;
  transform: translateY(30px);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  max-height: 88vh; overflow-y: auto;
  position: relative;
}

/* HUD corners on modal */
.modal-sheet::before,
.modal-sheet::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--rose);
  border-style: solid;
  pointer-events: none;
}
.modal-sheet::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.modal-sheet::after  { top: 0; right: 0; border-width: 2px 2px 0 0; }

/* Orange top line */
.modal-sheet > .modal-handle {
  width: 32px; height: 2px;
  background: var(--rose);
  margin: 0 auto 18px;
  box-shadow: var(--rose-glow-sm);
}

.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 32px; height: 2px;
  background: var(--rose);
  margin: 0 auto 18px;
  box-shadow: var(--rose-glow-sm);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 6px; color: var(--text);
}
.modal-sub {
  font-family: var(--font-body);
  font-size: 13px; color: var(--muted);
  margin-bottom: 20px; line-height: 1.55;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 28px; height: 28px;
  color: var(--muted); font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.modal-close:active { border-color: var(--rose-border); color: var(--rose); }

/* ── CURSOR (typing) ── */
.cursor {
  display: inline-block; width: 2px; height: 13px;
  background: var(--rose); margin-left: 2px;
  animation: blink 0.7s ease infinite; vertical-align: middle;
  box-shadow: 0 0 6px var(--rose);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── ANIMATIONS ── */
@keyframes slide-up   { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes fade-in    { from{opacity:0} to{opacity:1} }
@keyframes scale-in   { from{opacity:0;transform:scale(0.96)} to{opacity:1;transform:scale(1)} }
@keyframes glitch {
  0%,100%  { clip-path: none; transform: none; }
  10%      { clip-path: inset(30% 0 50% 0); transform: translateX(-4px); }
  20%      { clip-path: inset(60% 0 10% 0); transform: translateX(3px); }
  30%      { clip-path: none; transform: none; }
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 0; background: transparent; }

/* ═══════════════════════════════════════════════
   AUTH GATE
   ═══════════════════════════════════════════════ */
#authGate {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 0 24px 40px;
  overflow-y: auto; overflow-x: hidden;
  transition: opacity 0.4s ease;
}
#authGate.hiding { opacity: 0; pointer-events: none; }

.gate-inner {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 380px;
}

/* Portrait */
.gate-hero {
  position: relative;
  width: 140px;
  margin-top: 40px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.gate-portrait {
  width: 100%;
  display: block;
  border-radius: 0;
  object-fit: cover;
  filter: drop-shadow(0 0 30px rgba(249,115,22,0.5));
  border: 1px solid var(--rose-border);
}
.gate-portrait-glow {
  position: absolute; inset: -8px;
  background: radial-gradient(ellipse at center, rgba(249,115,22,0.12) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}
/* HUD corners on portrait */
.gate-hero::before,
.gate-hero::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--rose);
  border-style: solid;
  z-index: 2;
}
.gate-hero::before { bottom: -4px; left: -4px; border-width: 0 0 2px 2px; }
.gate-hero::after  { bottom: -4px; right: -4px; border-width: 0 2px 2px 0; }

/* Identity */
.gate-identity {
  text-align: center;
  margin-bottom: 6px;
  width: 100%;
}
.gate-title {
  font-family: var(--font-display);
  font-size: 32px; letter-spacing: 0.12em;
  line-height: 1; margin-bottom: 4px;
  text-align: center;
  color: var(--text);
  text-shadow: 0 0 30px rgba(249,115,22,0.4);
}
.gate-tagline {
  font-family: var(--font-mono);
  font-size: 8px; color: var(--muted);
  letter-spacing: 0.18em; text-align: center;
  line-height: 1.6; margin-bottom: 6px;
}
.gate-pl-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; font-size: 10px; color: var(--muted);
  margin-bottom: 12px; margin-top: -2px;
}
.gate-pl-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--rose);
  opacity: 0.7;
}
.pl-brand-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--rose);
  opacity: 0.7;
}

.gate-sub {
  font-family: var(--font-body);
  font-size: 14px; color: var(--text2);
  text-align: center; line-height: 1.5;
  margin-bottom: 18px; max-width: 280px;
}
.gate-sub-unlock {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

.gate-memory-badge { display: none; }

/* Gate tabs */
.gate-tabs {
  display: flex; gap: 0; width: 100%;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--border-2);
  padding: 2px;
}
.gate-tab {
  flex: 1; padding: 9px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.18s;
}
.gate-tab--active {
  background: var(--rose-dim);
  color: var(--rose);
  box-shadow: inset 0 0 0 1px var(--rose-border);
}

.gate-field { width: 100%; margin-bottom: 10px; }
.gate-field-row { display: flex; gap: 8px; width: 100%; margin-bottom: 0; }
.gate-field-row .gate-field { flex: 1; }
.gate-field-label {
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.16em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 5px;
}
.gate-field-optional {
  font-size: 9px; color: var(--muted); opacity: 0.55;
  letter-spacing: 0; text-transform: none;
}

.gate-input {
  width: 100%; background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.gate-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 1px var(--rose-dim), inset 0 0 20px var(--rose-dim);
}
.gate-input::placeholder { color: var(--muted); }
.gate-select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(249,115,22,0.5)' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
.gate-select option { background: #111; color: var(--text); }
.gate-signup-notice {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); text-align: center;
  line-height: 1.7; margin: 4px 0 10px; opacity: 0.7;
  padding: 0 6px;
}

.gate-error-msg {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--red);
  width: 100%; margin-bottom: 8px; min-height: 16px; text-align: center;
  letter-spacing: 0.03em;
}

.gate-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--rose);
  padding: 14px;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.18s; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
}
.gate-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose-dim);
  opacity: 0; transition: opacity 0.18s;
}
.gate-btn:hover::before, .gate-btn:active::before { opacity: 1; }
.gate-btn:active { box-shadow: var(--rose-glow-sm); }
.gate-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.gate-sent-wrap { text-align: center; max-width: 320px; }
.gate-sent-icon {
  width: 48px; height: 48px;
  background: var(--green-dim); border: 1px solid rgba(57,217,138,0.25);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.gate-sent-title { font-family: var(--font-display); font-size: 16px; margin-bottom: 8px; letter-spacing: 0.06em; }
.gate-sent-email { color: var(--rose); font-family: var(--font-mono); font-size: 12px; margin: 6px 0; }
.gate-sent-sub { font-family: var(--font-body); font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

.gate-skip {
  background: none; border: none; color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer; margin-top: 6px; padding: 8px 14px;
  transition: color 0.18s;
}
.gate-skip:active { color: var(--text2); }

.gate-divider {
  width: 100%; display: flex; align-items: center; gap: 10px;
  margin: 4px 0 10px;
}
.gate-divider::before,
.gate-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border-2);
}
.gate-divider span {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--muted); letter-spacing: 0.1em;
}

.gate-google-btn {
  width: 100%;
  background: var(--card); border: 1px solid var(--border-2);
  padding: 12px 14px;
  color: var(--text2);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: border-color 0.18s, background 0.18s;
  margin-bottom: 4px;
}
.gate-google-btn:hover { border-color: var(--border-3); background: var(--card2); }
.gate-google-btn:active { opacity: 0.75; }
.gate-google-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.gate-orb-wrap { display: none; }
.gate-orb, .gate-ring, .gate-ring-2 { display: none; }

/* ═══════════════════════════════════════════════
   MEMORY SCREEN
   ═══════════════════════════════════════════════ */
#memoryScreen { padding-bottom: 80px; }

.memory-header-card {
  margin: 0 16px 16px;
  background: var(--card);
  border: 1px solid var(--border-2);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  position: relative;
}
.memory-header-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

.memory-body-scroll {
  flex: 1; overflow-y: auto; padding: 0 0 8px; min-height: 80px;
}
.memory-orb {
  width: 56px; height: 64px;
  background: transparent;
  box-shadow: 0 0 18px rgba(249,115,22,0.3);
  flex-shrink: 0; overflow: hidden;
  border: 1px solid var(--rose-border);
}
.memory-header-info { flex: 1; }
.memory-header-title {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; margin-bottom: 4px;
}
.memory-header-sub { font-family: var(--font-body); font-size: 12px; color: var(--muted); line-height: 1.55; }

.memory-sql-notice {
  margin: 0 16px 16px;
  background: rgba(251,191,36,0.04); border: 1px solid rgba(251,191,36,0.2);
  padding: 12px 14px;
  font-family: var(--font-mono); font-size: 10px; color: var(--amber); line-height: 1.7;
  display: none;
}
.memory-sql-notice code {
  display: block; margin-top: 8px; padding: 8px;
  background: rgba(0,0,0,0.5);
  font-size: 9px; color: var(--text2);
  white-space: pre-wrap; word-break: break-all;
  font-family: var(--font-mono); letter-spacing: 0;
}

.memory-section { margin: 0 16px 14px; }
.memory-section-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.memory-section-label::before { content: '//'; color: var(--rose); opacity: 0.5; margin-right: 4px; }
.memory-section-label span { flex: 1; }
.memory-count-badge {
  background: var(--card2); border: 1px solid var(--border);
  padding: 1px 7px;
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
}

.memory-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 6px; transition: border-color 0.18s;
  position: relative;
}
.memory-card:last-child { margin-bottom: 0; }
.memory-card:hover { border-color: var(--border-2); }
.memory-card-key {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.12em;
  margin-bottom: 5px; text-transform: uppercase;
}
.memory-card-value {
  font-family: var(--font-body);
  font-size: 14px; color: var(--text); line-height: 1.5;
}
.memory-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.memory-card-source {
  font-family: var(--font-mono);
  font-size: 9px; padding: 1px 7px;
  background: var(--card2); color: var(--muted); letter-spacing: 0.06em;
}
.memory-card-source.observed  { background: var(--blue-dim); color: var(--blue); }
.memory-card-source.explicit  { background: var(--green-dim); color: var(--green); }
.memory-card-source.inferred  { background: var(--rose-dim); color: var(--rose); }
.memory-confidence-bar {
  flex: 1; height: 2px; background: var(--border); overflow: hidden;
}
.memory-confidence-fill {
  height: 100%; background: var(--rose);
  transition: width 0.4s ease;
  box-shadow: 0 0 6px var(--rose);
}

.memory-empty {
  text-align: center; padding: 40px 20px;
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; line-height: 1.7;
  letter-spacing: 0.06em;
}
.memory-empty-icon { font-size: 28px; margin-bottom: 12px; opacity: 0.4; }

.memory-learn-btn {
  width: calc(100% - 32px); margin: 0 16px 20px;
  background: var(--card); border: 1px solid var(--rose-border);
  padding: 13px;
  color: var(--rose);
  font-family: var(--font-display); font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.18s;
}
.memory-learn-btn:active { background: var(--rose-dim); box-shadow: var(--rose-glow-sm); }

/* ═══════════════════════════════════════════════
   INTRO SCREEN
   ═══════════════════════════════════════════════ */
#introScreen { padding-bottom: 0; min-height: 100vh; }
.intro-scroll { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

.aria-avatar-wrap {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 32px 16px 18px;
}

/* Portrait */
.aria-portrait-container {
  position: relative;
  width: 120px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.aria-portrait-img {
  width: 100%; display: block;
  object-fit: cover;
  filter: drop-shadow(0 0 24px rgba(249,115,22,0.5));
  border: 1px solid var(--rose-border);
}
/* HUD corners on portrait */
.aria-portrait-container::before,
.aria-portrait-container::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border-color: var(--rose);
  border-style: solid;
  z-index: 2;
}
.aria-portrait-container::before { top: -3px; left: -3px; border-width: 2px 0 0 2px; }
.aria-portrait-container::after  { bottom: -3px; right: -3px; border-width: 0 2px 2px 0; }

.aria-portrait-glow {
  position: absolute; inset: -10px;
  background: radial-gradient(ellipse at center, rgba(249,115,22,0.16) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
}

.aria-avatar-wrap .sound-bars {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.aria-orb-container { display: none; }
.aria-orb { display: none; }
.orb-ring, .orb-ring-2, .orb-ring-3 { display: none; }

@keyframes breathe {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes ring-pulse {
  0%,100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 0; }
}

.aria-name {
  font-family: var(--font-display);
  font-size: 38px; letter-spacing: 0.14em;
  color: var(--text); margin-bottom: 4px;
  text-shadow: 0 0 32px rgba(249,115,22,0.35);
  text-align: center; line-height: 1;
}
.aria-full-name {
  font-family: var(--font-mono);
  font-size: 8px; color: var(--muted);
  letter-spacing: 0.18em; text-align: center;
  line-height: 1.8; margin-bottom: 4px;
}

/* Version badge */
.version-badge {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-size: 9px; color: var(--rose); letter-spacing: 0.08em;
}
.version-dot {
  width: 4px; height: 4px; background: var(--rose);
  animation: blink 1.5s ease infinite;
  box-shadow: 0 0 4px var(--rose);
}

/* Intro message bubble */
.intro-bubble-area { padding: 0 16px; margin-bottom: 16px; }
.intro-msg {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.7;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: relative;
}
.intro-msg::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--rose), transparent);
  opacity: 0.4;
}
.intro-msg.visible { opacity: 1; transform: translateY(0); }
.intro-msg .highlight { color: var(--rose); font-family: var(--font-display); font-size: 13px; letter-spacing: 0.04em; }

/* Mood selector on intro */
.mood-strip {
  padding: 0 16px; margin-bottom: 14px;
  opacity: 0; transition: opacity 0.4s ease 0.15s;
}
.mood-strip.visible { opacity: 1; }
.mood-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em; margin-bottom: 10px;
}
.mood-label::before { content: '// '; color: var(--rose); opacity: 0.5; }
.mood-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.mood-pill {
  background: var(--card); border: 1px solid var(--border);
  padding: 6px 13px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
  letter-spacing: 0.06em;
}
.mood-pill:active, .mood-pill.active {
  background: var(--rose-dim); border-color: var(--rose);
  color: var(--rose);
  box-shadow: var(--rose-glow-sm);
}

/* Main options */
.intro-options {
  padding: 0 16px 32px; display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}
.intro-options.visible { opacity: 1; transform: translateY(0); }

.option-btn {
  background: var(--card); border: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left; color: var(--text);
  font-family: var(--font-body); font-size: 15px;
  cursor: pointer;
  transition: all 0.18s; display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden;
}
.option-btn::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 2px; height: 100%;
  background: var(--rose); opacity: 0;
  transition: opacity 0.18s;
}
.option-btn:active::before { opacity: 1; }
.option-btn:active {
  border-color: var(--rose-border);
  background: var(--rose-dim);
}
.option-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--rose); transition: background 0.18s, border-color 0.18s;
}
.option-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }
.option-btn:active .option-icon {
  background: var(--rose-dim); border-color: var(--rose-border);
}
.option-label { flex: 1; }
.option-label > div:first-child { font-weight: 500; margin-bottom: 2px; letter-spacing: 0.02em; }
.option-sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }
.option-arrow { color: var(--rose); flex-shrink: 0; display: flex; align-items: center; opacity: 0.6; }
.option-arrow svg { width: 14px; height: 14px; stroke: currentColor; }

/* Stats row */
.intro-stats {
  margin: 0 16px 18px;
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px;
  opacity: 0; transition: opacity 0.4s ease 0.5s;
}
.intro-stats.visible { opacity: 1; }
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 12px 8px; text-align: center;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--rose); opacity: 0.25;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 20px; color: var(--rose);
  text-shadow: 0 0 12px rgba(249,115,22,0.4);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); margin-top: 3px; letter-spacing: 0.08em;
}

/* Aria insight banner */
.aria-insight-banner {
  margin: 0 16px 16px;
  background: var(--card); border: 1px solid var(--border-2);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  animation: slide-up 0.3s ease;
}
.aria-insight-photo { display: none; }
.aria-insight-body { flex: 1; }
.aria-insight-text {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.55;
}

/* ═══════════════════════════════════════════════
   CONTACT SCREEN
   ═══════════════════════════════════════════════ */
#contactScreen { padding-bottom: 80px; }

.search-wrap {
  padding: 0 16px; margin-bottom: 14px;
  opacity: 0; animation: slide-up 0.3s ease 0.1s both;
}
#contactScreen.active .search-wrap { opacity: 1; }
.search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border-2);
  padding: 10px 12px;
  transition: border-color 0.18s;
}
.search-input-wrap:focus-within {
  border-color: var(--rose);
  box-shadow: inset 0 0 20px var(--rose-dim);
}
.search-icon { color: var(--rose); flex-shrink: 0; opacity: 0.6; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
}
.search-input::placeholder { color: var(--muted); }

/* ARIA comment */
.aria-comment {
  margin: 0 16px 14px;
  padding: 12px 14px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  font-family: var(--font-body);
  font-size: 13px; color: var(--text2); line-height: 1.55;
  display: none; animation: slide-up 0.3s ease;
}
.aria-tag {
  font-family: var(--font-mono);
  color: var(--rose); font-size: 9px; letter-spacing: 0.15em; margin-bottom: 5px;
}

/* Contact cards */
.contact-card {
  margin: 0 16px 6px; background: var(--card); border: 1px solid var(--border);
  padding: 12px 14px;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; gap: 12px;
  animation: slide-up 0.3s ease both;
  position: relative;
}
.contact-card:active { border-color: var(--rose-border); background: var(--rose-dim); }
.contact-card.selected { border-color: var(--rose); background: var(--rose-dim2); }
.contact-card::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 2px; height: 0;
  background: var(--rose);
  transition: height 0.18s;
}
.contact-card:active::before, .contact-card.selected::before { height: 100%; }

.contact-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600; color: var(--rose);
  flex-shrink: 0; position: relative;
}
.contact-avatar.online::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--green); border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--green);
}
.contact-avatar.needs-reply::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--rose); border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--rose);
}
.contact-avatar.away::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--amber); border: 2px solid var(--bg);
  box-shadow: 0 0 6px var(--amber);
}

/* Avatar color variants */
.contact-avatar[data-color="blue"]   { background: linear-gradient(135deg, #0a1929, #1d3a5f); color: var(--blue); }
.contact-avatar[data-color="purple"] { background: linear-gradient(135deg, #1a0929, #4c1d7a); color: #a78bfa; }
.contact-avatar[data-color="green"]  { background: linear-gradient(135deg, #012b1a, #065f3b); color: var(--green); }
.contact-avatar[data-color="rose"]   { background: linear-gradient(135deg, #1a0a05, #5c1f0a); color: var(--rose); }
.contact-avatar[data-color="amber"]  { background: linear-gradient(135deg, #1a0f00, #5c3a00); color: var(--amber); }

.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-family: var(--font-body); font-weight: 600;
  font-size: 15px; margin-bottom: 2px; letter-spacing: 0.02em;
}
.contact-preview {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contact-meta { text-align: right; flex-shrink: 0; }
.contact-time {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--muted); margin-bottom: 5px;
}

.platform-badge {
  font-family: var(--font-mono);
  font-size: 9px; padding: 1px 6px;
  white-space: nowrap; display: inline-block;
  letter-spacing: 0.04em;
}
.platform-badge.instagram { background: rgba(225,48,108,0.08); color: #e1306c; border: 1px solid rgba(225,48,108,0.2); }
.platform-badge.imessage  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(57,217,138,0.2); }
.platform-badge.whatsapp  { background: rgba(37,211,102,0.08); color: #25d366; border: 1px solid rgba(37,211,102,0.2); }
.platform-badge.twitter   { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(56,189,248,0.2); }
.platform-badge.snapchat  { background: rgba(255,252,0,0.08); color: #d4d000; border: 1px solid rgba(255,252,0,0.2); }
.silent-badge {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--rose);
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 1px 7px; white-space: nowrap; display: inline-block;
}

/* Drift detection */
.drift-badge {
  font-family: var(--font-mono);
  font-size: 9px; padding: 1px 6px;
  white-space: nowrap; display: inline-block;
}
.drift-badge.cold   { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(56,189,248,0.25); }
.drift-badge.fading { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.25); }
.drift-badge.lost   { background: var(--red-dim); color: var(--red); border: 1px solid rgba(244,63,94,0.25); }
.contact-card.drifting-cold   { border-color: rgba(56,189,248,0.2); }
.contact-card.drifting-fading { border-color: rgba(251,191,36,0.2); }
.contact-card.drifting-lost   { border-color: rgba(244,63,94,0.2); }

/* Drift snooze sheet */
#driftSnoozeSheet {
  position: fixed; inset: 0; z-index: 3600;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: none; align-items: flex-end;
}
#driftSnoozeSheet.open { display: flex; }
.drift-snooze-inner {
  background: var(--card); border-top: 1px solid var(--border-2);
  padding: 20px 16px 36px; width: 100%;
}
.drift-snooze-handle {
  width: 28px; height: 2px; background: var(--rose);
  margin: 0 auto 18px; box-shadow: var(--rose-glow-sm);
}
.drift-snooze-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 6px;
}
.drift-snooze-sub {
  font-family: var(--font-body);
  font-size: 13px; color: var(--muted); margin-bottom: 18px; line-height: 1.5;
}
.drift-snooze-options { display: flex; flex-direction: column; gap: 8px; }
.drift-snooze-btn {
  padding: 13px 14px; background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  cursor: pointer; text-align: left; transition: all 0.18s;
}
.drift-snooze-btn:active { border-color: var(--rose-border); background: var(--rose-dim); }
.drift-snooze-btn.dismiss-btn { color: var(--red); border-color: rgba(244,63,94,0.2); background: var(--red-dim); }

/* Add contact card */
.add-contact-card {
  margin: 0 16px 8px;
  border: 1px dashed var(--border-2);
  padding: 12px 14px;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; gap: 12px;
}
.add-contact-card:active { border-color: var(--rose); }

/* ═══════════════════════════════════════════════
   REPLY SCREEN
   ═══════════════════════════════════════════════ */
#replyScreen { padding-bottom: 24px; }

.convo-area { padding: 0 16px; margin-bottom: 14px; }
.convo-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.their-bubble {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--border-2);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.65;
  max-width: 85%; margin-bottom: 6px;
}
.time-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--faint); margin-top: 4px;
}

/* Convo thread */
.convo-thread { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.thread-msg {
  max-width: 80%;
  font-family: var(--font-body); font-size: 13px; line-height: 1.6;
  padding: 9px 13px;
}
.thread-msg.them {
  background: var(--card); border: 1px solid var(--border);
  border-left: 2px solid var(--border-2);
  align-self: flex-start;
}
.thread-msg.me {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-right: 2px solid var(--rose);
  align-self: flex-end; color: #fff7ed;
}
.thread-timestamp {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--faint); margin: 3px 2px; align-self: center;
}

/* Thinking indicator */
.aria-thinking {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px; margin-bottom: 14px;
}
.thinking-orb {
  width: 28px; height: 28px;
  background: transparent;
  box-shadow: 0 0 14px rgba(249,115,22,0.3);
  flex-shrink: 0;
  animation: breathe 2s ease-in-out infinite;
  border: 1px solid var(--rose-border);
}
.thinking-dots { display: flex; gap: 4px; align-items: center; }
.dot {
  width: 4px; height: 4px;
  background: var(--rose);
  animation: dot-pulse 1.2s ease infinite;
  box-shadow: 0 0 4px var(--rose);
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%,100% { transform: scale(0.7); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 1; }
}
.thinking-text {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
}
.thinking-status {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--rose); margin-left: 4px; letter-spacing: 0.06em;
}

/* Reply label */
.reply-from-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--rose);
  letter-spacing: 0.18em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.reply-from-label::before { content: ''; width: 20px; height: 1px; background: var(--rose); opacity: 0.5; }

/* Reply bubbles */
.reply-bubble {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 12px 14px; color: #fff3e8;
  font-family: var(--font-body); font-size: 14px; line-height: 1.65;
  margin-bottom: 6px; position: relative; cursor: pointer;
  animation: slide-up 0.3s ease both;
  transition: background 0.18s, border-color 0.18s;
}
.reply-bubble:active { background: var(--rose-dim2); border-color: var(--rose); }
/* All reply bubbles share the same style — no pill rounding */
.reply-bubble.first, .reply-bubble.middle, .reply-bubble.last, .reply-bubble.only {
  border-radius: 0;
}
.reply-bubble.editable { cursor: text; }
.reply-bubble[contenteditable="true"]:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 1px var(--rose-dim), inset 0 0 20px var(--rose-dim);
}
.edit-hint {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--rose); letter-spacing: 0.12em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 5px;
}

/* Aria reaction bubble */
.aria-reaction {
  margin: 0 16px 14px;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  display: none; animation: slide-up 0.35s ease;
  position: relative;
}
.aria-reaction::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--rose), transparent);
  opacity: 0.4;
}
.aria-reaction-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.aria-reaction-orb {
  width: 20px; height: 20px; flex-shrink: 0;
  background: transparent;
  box-shadow: 0 0 8px rgba(249,115,22,0.3);
  border: 1px solid var(--rose-border);
}
.aria-reaction-tag {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--rose); letter-spacing: 0.15em;
}
.aria-reaction-text {
  font-family: var(--font-body);
  font-size: 14px; color: var(--text); line-height: 1.65;
}
.aria-reaction-divider {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.15em;
  display: flex; align-items: center; gap: 8px;
}
.aria-reaction-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Tone strip */
.tone-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px;
  margin-bottom: 10px; scrollbar-width: none;
}
.tone-strip::-webkit-scrollbar { display: none; }
.tone-chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
  letter-spacing: 0.06em; flex-shrink: 0;
}
.tone-chip.active {
  background: var(--rose-dim); border-color: var(--rose);
  color: var(--rose);
}

/* Platform selector */
.platform-selector { padding: 0 16px; margin-bottom: 12px; }
.platform-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em; margin-bottom: 8px;
}
.platform-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.platform-pill {
  display: flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 10px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  transition: all 0.18s; letter-spacing: 0.04em;
}
.platform-pill.active.instagram { background: rgba(225,48,108,0.08); border-color: rgba(225,48,108,0.3); color: #e1306c; }
.platform-pill.active.imessage  { background: var(--green-dim); border-color: rgba(57,217,138,0.3); color: var(--green); }
.platform-pill.active.whatsapp  { background: rgba(37,211,102,0.08); border-color: rgba(37,211,102,0.3); color: #25d366; }
.platform-pill.active.twitter   { background: var(--blue-dim); border-color: rgba(56,189,248,0.3); color: var(--blue); }
.platform-pill.active.snapchat  { background: rgba(255,252,0,0.08); border-color: rgba(255,252,0,0.3); color: #d4d000; }

/* Paste area */
.paste-area { padding: 0 16px; margin-bottom: 10px; }
.paste-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em; margin-bottom: 8px;
}
textarea.convo-input {
  width: 100%; background: var(--card); border: 1px solid var(--border-2);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  resize: none; line-height: 1.65; transition: border-color 0.18s;
  margin-bottom: 8px;
  outline: none;
}
textarea.convo-input:focus {
  border-color: var(--rose);
  box-shadow: inset 0 0 20px var(--rose-dim);
}
textarea.convo-input::placeholder { color: var(--muted); }

/* Context section */
.context-section { padding: 0 16px; margin-bottom: 12px; }
.context-toggle {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  margin-bottom: 0; transition: color 0.18s; width: fit-content;
  letter-spacing: 0.1em;
}
.context-toggle:active { color: var(--rose); }
.context-toggle-icon { font-size: 12px; transition: transform 0.18s; }
.context-toggle.open .context-toggle-icon { transform: rotate(90deg); }
.context-toggle-label { letter-spacing: 0.1em; }
.context-badge {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  color: var(--rose);
  font-family: var(--font-mono); font-size: 8px; padding: 1px 5px;
  letter-spacing: 0.06em;
}
.context-body { margin-top: 10px; display: none; animation: slide-up 0.2s ease; }
.context-body.open { display: block; }
.context-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.context-tab {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  padding: 7px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  text-align: center; transition: all 0.18s; letter-spacing: 0.06em;
}
.context-tab.active { background: var(--rose-dim); border-color: var(--rose); color: var(--rose); }
.context-panel { display: none; }
.context-panel.active { display: block; }
textarea.context-input {
  width: 100%; background: var(--card); border: 1px solid var(--border-2);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body); font-size: 12px;
  resize: none; line-height: 1.65; transition: border-color 0.18s;
  min-height: 80px; outline: none;
}
textarea.context-input:focus { border-color: var(--rose); }
textarea.context-input::placeholder { color: var(--muted); }

.screenshot-drop {
  background: var(--card); border: 1px dashed var(--border-2);
  padding: 18px; text-align: center; cursor: pointer;
  transition: all 0.18s; position: relative;
}
.screenshot-drop:active, .screenshot-drop.dragover {
  border-color: var(--rose); background: var(--rose-dim);
}
.screenshot-drop-icon { margin-bottom: 6px; color: var(--muted); }
.screenshot-drop-text {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.5;
}
.screenshot-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.screenshot-preview {
  width: 100%; margin-top: 8px;
  max-height: 160px; object-fit: cover; border: 1px solid var(--rose-border);
  display: none;
}
.context-clear {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  margin-top: 6px; cursor: pointer; display: none; text-align: right;
  letter-spacing: 0.06em;
}
.context-clear:active { color: var(--rose); }

/* Thread mode */
.thread-toggle-btn {
  background: none; border: 1px solid var(--border);
  padding: 5px 10px;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  cursor: pointer; transition: all 0.18s; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 5px;
}
.thread-toggle-btn:active { border-color: var(--rose); color: var(--rose); }
.tt-dot {
  width: 5px; height: 5px; background: var(--muted);
  transition: background 0.18s; flex-shrink: 0;
}
.thread-toggle-btn.active .tt-dot { background: var(--rose); box-shadow: 0 0 5px var(--rose); }
.thread-mode-banner {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 10px 12px; margin-bottom: 8px;
  font-family: var(--font-body); font-size: 12px; color: var(--text2); line-height: 1.55;
  display: none;
}
.thread-mode-banner.visible { display: block; }

/* Ask/generate buttons */
.ask-aria-btn {
  width: 100%; padding: 11px;
  background: var(--card); border: 1px dashed var(--rose-border);
  color: var(--rose);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s; margin-bottom: 8px;
}
.ask-aria-btn:active { background: var(--rose-dim); }

.gen-reply-btn {
  width: 100%; padding: 14px;
  background: transparent; border: 1px solid var(--rose);
  color: var(--rose);
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer; transition: all 0.18s;
  position: relative; overflow: hidden;
}
.gen-reply-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose);
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
  z-index: 0;
}
.gen-reply-btn:active::before { transform: translateX(0); }
.gen-reply-btn:active { color: #000; }
.gen-reply-btn > * { position: relative; z-index: 1; }
.gen-reply-btn:disabled {
  opacity: 0.4; cursor: default;
}

/* Vibes score */
.vibes-score {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; margin-bottom: 12px;
  background: var(--card2); border: 1px solid var(--border);
  animation: slide-up 0.3s ease 0.4s both;
}
.vibes-label {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); flex: 1;
  letter-spacing: 0.06em;
}
.vibes-bar-wrap { flex: 2; height: 2px; background: var(--border); overflow: hidden; }
.vibes-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), #ffaa40);
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(249,115,22,0.5);
}
.vibes-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--rose); min-width: 30px; text-align: right;
}

/* Tone pills (modal) */
.tone-section { padding: 0 16px; margin-bottom: 14px; }
.tone-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.tone-pills { display: flex; gap: 5px; flex-wrap: wrap; }
.tone-pill {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); cursor: pointer;
  transition: all 0.18s; letter-spacing: 0.06em;
}
.tone-pill.active { background: var(--rose-dim); border-color: var(--rose); color: var(--rose); }

/* Alternatives */
.alternatives-section { padding: 0 16px; margin-bottom: 14px; }
.alt-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.alt-bubble {
  background: var(--card); border: 1px solid var(--border);
  border-left: 2px solid var(--border-2);
  padding: 11px 13px;
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6;
  margin-bottom: 6px; cursor: pointer; transition: all 0.18s;
  animation: slide-up 0.3s ease both;
}
.alt-bubble:active { border-color: var(--rose-border); border-left-color: var(--rose); background: var(--rose-dim); }
.alt-bubble-tone {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  margin-bottom: 5px; letter-spacing: 0.1em;
  display: flex; align-items: center; gap: 6px;
}
.alt-bubble-tone::before {
  content: ''; display: inline-block; width: 4px; height: 4px;
  background: var(--rose); box-shadow: 0 0 4px var(--rose);
}

/* Action rows */
.action-row { display: flex; gap: 6px; padding: 0 16px; margin-bottom: 10px; }
.regen-btn {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  padding: 12px;
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s;
}
.regen-btn:active { border-color: var(--rose-border); color: var(--rose); }

.copy-btn {
  flex: 2; background: transparent; border: 1px solid var(--rose);
  padding: 12px;
  color: var(--rose);
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.18s;
  position: relative; overflow: hidden;
}
.copy-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose); transform: translateX(-100%);
  transition: transform 0.22s ease; z-index: 0;
}
.copy-btn:active::before { transform: translateX(0); }
.copy-btn:active { color: #000; }
.copy-btn > * { position: relative; z-index: 1; }
.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
}
.copy-btn.copied::before { background: var(--green); }

.action-row-2 { display: flex; gap: 5px; padding: 0 16px; margin-bottom: 10px; }
.action-btn-sm {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  padding: 9px 6px;
  color: var(--muted);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.18s;
  text-align: center;
}
.action-btn-sm:active { border-color: var(--rose-border); color: var(--rose); }
.action-btn-sm .btn-icon { display: block; font-size: 14px; margin-bottom: 3px; }

/* Contact memory card */
.contact-memory-card {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose-border);
  padding: 11px 13px; margin-bottom: 12px;
  cursor: pointer; transition: all 0.18s;
  animation: slide-up 0.3s ease both;
}
.contact-memory-card:active { background: var(--rose-dim); border-left-color: var(--rose); }
.contact-memory-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.contact-memory-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.15em;
}
.contact-memory-toggle { font-family: var(--font-mono); font-size: 11px; color: var(--rose); transition: transform 0.18s; }
.contact-memory-card.expanded .contact-memory-toggle { transform: rotate(180deg); }
.contact-memory-body {
  font-family: var(--font-body); font-size: 12.5px; color: var(--text2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: all 0.3s ease;
}
.contact-memory-card.expanded .contact-memory-body { -webkit-line-clamp: unset; overflow: visible; }
.contact-memory-events { margin-top: 8px; display: none; flex-direction: column; gap: 4px; }
.contact-memory-card.expanded .contact-memory-events { display: flex; }
.contact-memory-event {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); line-height: 1.5;
  padding: 4px 7px; background: var(--card2);
  border-left: 2px solid var(--rose-border);
}

/* ═══════════════════════════════════════════════
   HISTORY SCREEN
   ═══════════════════════════════════════════════ */
#historyScreen { padding-bottom: 80px; }

.history-card {
  margin: 0 16px 8px;
  background: var(--card); border: 1px solid var(--border);
  padding: 14px;
  cursor: pointer; transition: all 0.18s;
  animation: slide-up 0.3s ease both;
  position: relative;
}
.history-card:active { border-color: var(--rose-border); }
.history-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--rose), transparent);
  opacity: 0; transition: opacity 0.18s;
}
.history-card:active::before { opacity: 0.5; }
.history-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.history-card-name {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; flex: 1;
}
.history-card-time {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
}
.history-original {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.55;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.history-reply {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.55;
}
.history-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.history-tone-tag {
  font-family: var(--font-mono); font-size: 9px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  color: var(--rose); padding: 1px 7px; letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════
   PROFILE SCREEN
   ═══════════════════════════════════════════════ */
#profileScreen { padding-bottom: 80px; }

.profile-hero { padding: 0 16px 20px; text-align: center; }
.profile-orb {
  width: 60px; height: 60px;
  background: transparent;
  border: 1px solid var(--rose-border);
  margin: 0 auto 14px;
  box-shadow: 0 0 24px rgba(249,115,22,0.25);
  position: relative;
}
.profile-orb::before,
.profile-orb::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-color: var(--rose);
  border-style: solid;
}
.profile-orb::before { top: -2px; left: -2px; border-width: 2px 0 0 2px; }
.profile-orb::after  { bottom: -2px; right: -2px; border-width: 0 2px 2px 0; }
.profile-name {
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.08em; margin-bottom: 4px;
}
.profile-sub {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em;
}

.profile-section { margin-bottom: 22px; }
.profile-section-title {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em;
  padding: 0 16px; margin-bottom: 10px;
}
.profile-section-title::before { content: '// '; color: var(--rose); opacity: 0.5; }
.profile-card {
  margin: 0 16px 6px;
  background: var(--card); border: 1px solid var(--border);
  padding: 14px;
}
.profile-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.profile-row:last-child { border-bottom: none; padding-bottom: 0; }
.profile-row-icon { flex-shrink: 0; width: 26px; text-align: center; color: var(--rose); }
.profile-row-info { flex: 1; }
.profile-row-label {
  font-family: var(--font-body); font-size: 13px; color: var(--text); font-weight: 500;
}
.profile-row-sub {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px;
}
.profile-row-action {
  font-family: var(--font-mono); font-size: 11px; color: var(--rose);
  cursor: pointer; flex-shrink: 0; letter-spacing: 0.06em;
}

/* Style trait tags */
.trait-pills-wrap { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.trait-pill {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  color: var(--rose);
  font-family: var(--font-mono); font-size: 10px;
  padding: 3px 10px; letter-spacing: 0.06em;
}
.trait-pill.muted {
  background: var(--card2); border-color: var(--border); color: var(--muted);
}

/* Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle {
  width: 38px; height: 20px;
  background: var(--card2); border: 1px solid var(--border-2);
  position: relative; cursor: pointer; transition: background 0.18s;
  flex-shrink: 0;
}
.toggle.on { background: var(--rose-dim); border-color: var(--rose); }
.toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--muted); transition: all 0.18s;
}
.toggle.on .toggle-knob { left: 20px; background: var(--rose); box-shadow: 0 0 6px var(--rose); }

/* Input */
.profile-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 9px 11px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  margin-top: 8px; outline: none; transition: border-color 0.18s;
}
.profile-input:focus { border-color: var(--rose); }

/* Slider */
.slider-wrap { margin-top: 10px; }
.slider-labels {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9px; color: var(--muted); margin-bottom: 8px;
  letter-spacing: 0.06em;
}
input[type=range] {
  width: 100%; appearance: none; background: var(--border);
  height: 2px; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px;
  background: var(--rose);
  box-shadow: 0 0 8px rgba(249,115,22,0.5);
  cursor: pointer;
}

/* Streak banner */
.streak-banner {
  margin: 0 16px 18px;
  background: var(--card); border: 1px solid var(--border-2);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  position: relative;
}
.streak-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
.streak-flame { font-size: 28px; }
.streak-info { flex: 1; }
.streak-num {
  font-family: var(--font-display); font-size: 26px;
  color: var(--rose); text-shadow: 0 0 14px rgba(249,115,22,0.4);
}
.streak-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.streak-badge {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 5px 11px;
  font-family: var(--font-mono); font-size: 10px; color: var(--rose); letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════
   MOOD SCREEN
   ═══════════════════════════════════════════════ */
#moodScreen { padding-bottom: 80px; }
.mood-grid {
  padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 20px;
}
.mood-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 18px 14px; text-align: center; cursor: pointer;
  transition: all 0.18s; animation: scale-in 0.3s ease both;
  position: relative; overflow: hidden;
}
.mood-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--rose); transform: scaleX(0);
  transition: transform 0.18s;
}
.mood-card:active::before, .mood-card.active::before { transform: scaleX(1); }
.mood-card:active, .mood-card.active {
  border-color: var(--rose-border); background: var(--rose-dim);
}
.mood-card-emoji {
  margin-bottom: 10px; color: var(--rose);
  display: flex; justify-content: center; align-items: center;
}
.mood-card-label {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.mood-card-sub {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  line-height: 1.4; letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════
   NAVIGATION (hamburger + drawer)
   ═══════════════════════════════════════════════ */
.hamburger-btn {
  position: fixed; bottom: 20px; right: 16px; z-index: 100;
  width: 48px; height: 48px;
  background: var(--card);
  border: 1px solid var(--rose-border);
  cursor: pointer;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  box-shadow: 0 0 20px rgba(249,115,22,0.25);
  transition: all 0.18s;
}
.hamburger-btn.visible { display: flex; }
.hamburger-btn:active { box-shadow: var(--rose-glow); }
.hamburger-btn.open { box-shadow: var(--rose-glow); border-color: var(--rose); }
.hb-line {
  width: 18px; height: 1.5px; background: var(--rose);
  transition: all 0.22s ease; transform-origin: center;
}
.hamburger-btn.open .hb-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger-btn.open .hb-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open .hb-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Menu drawer */
.menu-drawer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px; z-index: 99;
  background: rgba(8,8,8,0.98); backdrop-filter: blur(24px);
  border-top: 1px solid var(--rose-border);
  padding: 10px 0 36px;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.menu-drawer.open { transform: translateX(-50%) translateY(0); }
.menu-drawer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
.menu-drawer-handle {
  width: 28px; height: 2px; background: var(--rose);
  margin: 0 auto 18px;
  box-shadow: var(--rose-glow-sm);
}

.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; cursor: pointer;
  transition: background 0.14s; border: none;
  background: none; width: 100%; text-align: left;
  font-family: var(--font-body);
}
.menu-item:active { background: rgba(249,115,22,0.05); }
.menu-item.active .menu-item-label { color: var(--rose); }
.menu-item-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--muted); transition: all 0.18s; flex-shrink: 0;
}
.menu-item-icon svg { width: 15px; height: 15px; stroke-width: 1.5; }
.menu-item.active .menu-item-icon {
  background: var(--rose-dim); border-color: var(--rose-border); color: var(--rose);
  box-shadow: var(--rose-glow-sm);
}
.menu-item-label {
  font-size: 15px; color: var(--text); letter-spacing: 0.02em; font-weight: 500;
}
.menu-item-sub {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 1px; letter-spacing: 0.04em;
}
.menu-divider { height: 1px; background: var(--border); margin: 6px 16px; }

.menu-overlay {
  position: fixed; inset: 0; z-index: 98;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.menu-overlay.open { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════════
   FORM FIELDS & BUTTONS (modals, add contact)
   ═══════════════════════════════════════════════ */
.form-field { margin-bottom: 12px; }
.form-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.15em; margin-bottom: 5px;
  display: block;
}
.form-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  outline: none; transition: border-color 0.18s;
}
.form-input:focus { border-color: var(--rose); box-shadow: inset 0 0 16px var(--rose-dim); }
.form-select {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  outline: none; appearance: none; cursor: pointer;
}
.btn-primary {
  width: 100%; padding: 13px;
  background: transparent; border: 1px solid var(--rose);
  color: var(--rose);
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer; margin-top: 8px;
  transition: all 0.18s; position: relative; overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose); transform: translateX(-100%);
  transition: transform 0.22s ease; z-index: 0;
}
.btn-primary:active::before { transform: translateX(0); }
.btn-primary:active { color: #000; }
.btn-primary > * { position: relative; z-index: 1; }

/* Smart suggestions */
.smart-suggestions { padding: 0 16px; margin-bottom: 14px; }
.suggestions-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.suggestion-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 12px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text2); cursor: pointer;
  margin: 0 5px 5px 0; transition: all 0.18s; letter-spacing: 0.04em;
}
.suggestion-chip:active { border-color: var(--rose-border); background: var(--rose-dim); color: var(--rose); }

/* Loading skeleton */
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Divider */
.divider { height: 1px; background: var(--border); margin: 0 16px 18px; }

/* ═══════════════════════════════════════════════
   CHAT SCREEN
   ═══════════════════════════════════════════════ */
#chatScreen {
  padding-bottom: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-top-bar {
  padding: 12px 16px 10px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--border);
}
.chat-top-bar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
  opacity: 0.3;
}

.chat-back-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.18s; color: var(--muted);
}
.chat-back-btn:active { border-color: var(--rose-border); background: var(--rose-dim); color: var(--rose); }
.chat-back-btn svg { display: block; }

/* Chat portrait */
.chat-header-portrait {
  width: 40px; height: 40px; flex-shrink: 0;
  overflow: hidden; position: relative;
  border: 1px solid var(--rose-border);
  box-shadow: 0 0 14px rgba(249,115,22,0.3);
  transition: box-shadow 0.3s;
}
.chat-header-portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 15%;
  display: block;
}
.chat-header-portrait.speaking {
  box-shadow: 0 0 24px rgba(249,115,22,0.9), 0 0 48px rgba(249,115,22,0.3) !important;
  border-color: var(--rose) !important;
}
.chat-header-portrait.thinking-pulse { animation: chat-think 1s ease-in-out infinite !important; }
@keyframes chat-think {
  0%,100% { box-shadow: 0 0 10px rgba(249,115,22,0.25); }
  50%      { box-shadow: 0 0 28px rgba(249,115,22,0.65); }
}
.chat-header-portrait .chat-status-dot {
  width: 8px; height: 8px;
  background: var(--green); position: absolute;
  bottom: 1px; right: 1px; border: 2px solid var(--bg);
  box-shadow: 0 0 4px var(--green);
}

.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; line-height: 1;
  letter-spacing: 0.06em; color: var(--text);
}
.chat-header-status {
  font-family: var(--font-mono); font-size: 10px; color: var(--rose); margin-top: 2px;
}

.chat-mood-pill {
  font-family: var(--font-mono);
  font-size: 9px; padding: 3px 10px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  color: var(--rose); letter-spacing: 0.06em; flex-shrink: 0;
  transition: all 0.2s;
}

.chat-aria-orb { display: none; }

/* Messages */
.chat-messages {
  flex: 1; overflow-y: auto;
  min-height: 0;
  padding: 14px 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.chat-date-label {
  text-align: center;
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.14em; margin: 4px 0; text-transform: uppercase;
}

/* Aria message */
.chat-msg-aria-wrap {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 0;
  max-width: 88%; align-self: flex-start;
}

.chat-expr-card {
  width: 100%;
  overflow: hidden; position: relative;
  background: var(--card);
  border: 1px solid var(--border-2);
  border-bottom: none;
  height: 0; transition: height 0.25s ease;
}
.chat-expr-card.has-image { height: 190px; }
.chat-expr-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 15%; display: block;
}
.chat-expr-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--card));
  pointer-events: none;
}
.chat-expr-badge {
  position: absolute; top: 7px; left: 8px;
  font-family: var(--font-mono); font-size: 9px; color: var(--rose); letter-spacing: 0.1em;
  background: rgba(5,5,5,0.8); backdrop-filter: blur(8px);
  padding: 2px 8px;
  border: 1px solid var(--rose-border);
  display: flex; align-items: center; gap: 4px;
}

.chat-msg-aria { display: flex; gap: 0; width: 100%; }
.chat-msg-aria-orb { display: none; }

.chat-bubble-aria {
  width: 100%;
  background: var(--card); border: 1px solid var(--border-2);
  border-top: none;
  border-left: 2px solid var(--rose-border);
  padding: 11px 14px 12px;
  font-family: var(--font-body);
  font-size: 14px; line-height: 1.75; color: var(--text);
}
.chat-msg-aria-wrap.no-card .chat-bubble-aria {
  border-top: 1px solid var(--border-2);
  border-left: 2px solid var(--rose-border);
}
.chat-bubble-aria .emotion-tag { display: none; }
.chat-bubble-aria.typing-bubble {
  display: flex; align-items: center; gap: 5px;
  padding: 13px 17px; min-width: 70px;
}

/* User message */
.chat-msg-user { display: flex; justify-content: flex-end; align-self: flex-end; max-width: 88%; }
.chat-msg-user-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.chat-bubble-user {
  background: var(--rose-dim);
  border: 1px solid var(--rose-border);
  border-right: 2px solid var(--rose);
  padding: 11px 15px;
  font-family: var(--font-body); font-size: 14px; line-height: 1.75; color: var(--text);
}

.chat-msg-time {
  font-family: var(--font-mono); font-size: 9px; color: var(--faint); padding: 3px 4px 0;
}

.chat-emotion-bar { display: none; }

.chat-typing-dot {
  width: 6px; height: 6px; background: var(--rose);
  animation: dot-pulse 1.1s ease infinite;
  box-shadow: 0 0 4px var(--rose);
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Chat input */
.chat-input-bar {
  flex-shrink: 0;
  background: rgba(5,5,5,0.98); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-2);
  padding: 9px 14px 30px;
}
.chat-input-bar::before {
  content: '';
  display: block; height: 1px; margin-bottom: 8px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
  opacity: 0.25;
}
.chat-suggestions {
  display: flex; gap: 5px; flex-wrap: nowrap; overflow-x: auto;
  padding: 0 2px 7px; scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-suggestion-chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 4px 12px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 10px; color: var(--text2); cursor: pointer;
  transition: all 0.18s; flex-shrink: 0; letter-spacing: 0.04em;
}
.chat-suggestion-chip:active { border-color: var(--rose-border); background: var(--rose-dim); color: var(--rose); }

.chat-input-row { display: flex; align-items: flex-end; gap: 8px; }
textarea.chat-input {
  flex: 1; background: var(--card2); border: 1px solid var(--border-2);
  padding: 11px 16px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  resize: none; outline: none; line-height: 1.5; max-height: 120px;
  transition: border-color 0.18s;
}
textarea.chat-input:focus { border-color: var(--rose); }
textarea.chat-input::placeholder { color: var(--muted); }

.chat-send-btn {
  width: 42px; height: 42px; flex-shrink: 0;
  background: transparent; border: 1px solid var(--rose);
  color: var(--rose); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px rgba(249,115,22,0.2); transition: all 0.18s;
}
.chat-send-btn:active { background: var(--rose); color: #000; box-shadow: var(--rose-glow); }
.chat-send-btn:disabled { opacity: 0.3; cursor: default; }

.aria-mood-shift {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.1em;
  padding: 2px 10px; background: var(--card2); border: 1px solid var(--border);
  animation: fade-in 0.4s ease;
}

/* ═══════════════════════════════════════════════
   VOICE / SPEAKING
   ═══════════════════════════════════════════════ */
.sound-bars {
  display: flex; gap: 3px; align-items: flex-end;
  height: 14px; margin-top: 8px;
  opacity: 0; transition: opacity 0.25s; pointer-events: none;
}
.sound-bars.active { opacity: 1; }
.sound-bar {
  width: 2.5px; background: var(--rose); box-shadow: 0 0 4px var(--rose);
}
.sound-bar:nth-child(1) { height: 4px;  animation: bar-bounce 0.55s ease infinite 0s; }
.sound-bar:nth-child(2) { height: 9px;  animation: bar-bounce 0.55s ease infinite 0.09s; }
.sound-bar:nth-child(3) { height: 14px; animation: bar-bounce 0.55s ease infinite 0.18s; }
.sound-bar:nth-child(4) { height: 9px;  animation: bar-bounce 0.55s ease infinite 0.09s; }
.sound-bar:nth-child(5) { height: 4px;  animation: bar-bounce 0.55s ease infinite 0s; }
@keyframes bar-bounce {
  0%,100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1.2); opacity: 1; }
}

/* Stop speech */
#stopSpeechBtn {
  position: fixed; top: 60px; right: 14px; z-index: 200;
  background: var(--card2);
  border: 1px solid var(--rose-border);
  padding: 6px 12px 6px 9px;
  display: none; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; color: var(--rose); cursor: pointer;
  backdrop-filter: blur(12px); animation: fade-in 0.2s ease;
  box-shadow: 0 0 14px rgba(249,115,22,0.2);
  letter-spacing: 0.06em;
}
#stopSpeechBtn .stop-bars {
  display: flex; gap: 2px; align-items: flex-end; height: 11px;
}
#stopSpeechBtn .stop-bar {
  width: 2px; background: var(--rose); box-shadow: 0 0 3px var(--rose);
}
#stopSpeechBtn .stop-bar:nth-child(1) { height: 4px;  animation: bar-bounce 0.5s ease infinite 0s; }
#stopSpeechBtn .stop-bar:nth-child(2) { height: 7px;  animation: bar-bounce 0.5s ease infinite 0.1s; }
#stopSpeechBtn .stop-bar:nth-child(3) { height: 11px; animation: bar-bounce 0.5s ease infinite 0.2s; }
#stopSpeechBtn .stop-bar:nth-child(4) { height: 7px;  animation: bar-bounce 0.5s ease infinite 0.1s; }

/* Mute button */
.mute-btn {
  background: var(--card); border: 1px solid var(--border);
  font-size: 14px; cursor: pointer;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; flex-shrink: 0; color: var(--muted);
}
.mute-btn.muted { border-color: var(--border); opacity: 0.4; }
.mute-btn:active { border-color: var(--rose-border); color: var(--rose); }

/* Aria image overrides */
.aria-orb { background: transparent !important; box-shadow: 0 0 50px rgba(249,115,22,0.25), 0 0 100px rgba(249,115,22,0.06) !important; }
.aria-orb::before { display: none !important; }
.aria-mini { background: transparent !important; box-shadow: 0 0 10px rgba(249,115,22,0.2) !important; }
.thinking-orb { background: transparent !important; }
.profile-orb { background: transparent !important; box-shadow: 0 0 22px rgba(249,115,22,0.2) !important; }
.aria-reaction-orb { background: transparent !important; }

/* Speaking animations */
.aria-orb.speaking {
  animation: orb-speaking 0.45s ease-in-out infinite !important;
  box-shadow: 0 0 80px rgba(249,115,22,0.7), 0 0 160px rgba(249,115,22,0.25) !important;
}
@keyframes orb-speaking {
  0%   { transform: scale(1);    box-shadow: 0 0 70px rgba(249,115,22,0.55); }
  30%  { transform: scale(1.08); box-shadow: 0 0 100px rgba(249,115,22,0.75); }
  60%  { transform: scale(0.97); box-shadow: 0 0 60px rgba(249,115,22,0.5); }
  100% { transform: scale(1);    box-shadow: 0 0 70px rgba(249,115,22,0.55); }
}
.aria-mini.speaking {
  box-shadow: 0 0 24px rgba(249,115,22,0.8), 0 0 48px rgba(249,115,22,0.25) !important;
  animation: mini-speaking 0.4s ease-in-out infinite !important;
}
.thinking-orb.speaking { animation: mini-speaking 0.4s ease-in-out infinite !important; }
.profile-orb.speaking {
  animation: mini-speaking 0.4s ease-in-out infinite !important;
  box-shadow: 0 0 48px rgba(249,115,22,0.55) !important;
}
@keyframes mini-speaking {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}

/* ═══════════════════════════════════════════════
   VOICE PICKER
   ═══════════════════════════════════════════════ */
.voice-section { margin-bottom: 22px; }
.voice-list {
  max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 10px; padding-right: 2px;
}
.voice-option {
  padding: 10px 13px;
  background: var(--card2); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; justify-content: space-between;
}
.voice-option:active { border-color: var(--rose-border); }
.voice-option.active {
  background: var(--rose-dim); border-color: var(--rose-border);
  border-left: 2px solid var(--rose);
}
.voice-option-left { flex: 1; min-width: 0; }
.voice-option-name {
  font-family: var(--font-body); font-size: 13px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.voice-option-lang {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted); margin-top: 2px; letter-spacing: 0.06em;
}
.voice-lang-tab {
  flex: 1; padding: 7px;
  background: var(--card2); border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer; transition: all 0.18s;
}
.voice-lang-tab.active {
  background: var(--rose-dim); border-color: var(--rose); color: var(--rose);
}
.voice-option-badge {
  font-family: var(--font-mono); font-size: 8px; color: var(--rose);
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 1px 5px; flex-shrink: 0;
}

.voice-controls-row { display: flex; gap: 6px; margin-top: 10px; }
.voice-ctrl-card {
  flex: 1; background: var(--card); border: 1px solid var(--border); padding: 11px;
}
.voice-ctrl-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.14em; margin-bottom: 6px;
}
.voice-ctrl-row { display: flex; align-items: center; gap: 8px; }
.voice-ctrl-row input[type=range] { flex: 1; }
.voice-ctrl-val {
  font-family: var(--font-mono); font-size: 11px; color: var(--rose); min-width: 26px; text-align: right;
}

.test-voice-btn {
  width: 100%; padding: 11px; margin-top: 10px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  color: var(--rose);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s;
}
.test-voice-btn:active { background: var(--rose-dim2); }

.voice-mute-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.voice-mute-row:last-child { border-bottom: none; padding-bottom: 0; }
.voice-mute-label { font-family: var(--font-body); font-size: 13px; color: var(--text); font-weight: 500; }
.voice-mute-sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; letter-spacing: 0.04em; }

/* ═══════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 40px 20px; animation: fade-in 0.4s ease; }
.empty-state-icon { font-size: 32px; margin-bottom: 14px; opacity: 0.35; }
.empty-state-text {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); line-height: 1.6;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════
   FLOAT COPY BUTTON
   ═══════════════════════════════════════════════ */
.float-copy {
  position: fixed; bottom: 86px; right: 16px;
  width: 48px; height: 48px;
  background: var(--card);
  border: 1px solid var(--rose);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose);
  box-shadow: 0 0 16px rgba(249,115,22,0.25);
  transition: all 0.18s; z-index: 40;
  opacity: 0; pointer-events: none;
}
.float-copy.visible { opacity: 1; pointer-events: all; }
.float-copy:active { background: var(--rose-dim); box-shadow: var(--rose-glow); }

/* ═══════════════════════════════════════════════
   REACTION ROW
   ═══════════════════════════════════════════════ */
.reaction-row { display: flex; gap: 5px; margin-bottom: 10px; padding: 0 16px; flex-wrap: wrap; }
.reaction-btn {
  background: var(--card); border: 1px solid var(--border);
  padding: 4px 11px;
  font-family: var(--font-mono); font-size: 11px; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; gap: 4px;
}
.reaction-btn:active { border-color: var(--rose-border); background: var(--rose-dim); }
.reaction-btn .reaction-count { font-size: 9px; color: var(--muted); }

/* ═══════════════════════════════════════════════
   AUTH MODAL (inside modals)
   ═══════════════════════════════════════════════ */
#authModal .modal-sheet { position: relative; }
.auth-orb-wrap { display: flex; justify-content: center; margin-bottom: 14px; padding-top: 4px; }
.auth-portrait-wrap {
  width: 72px; overflow: hidden;
  box-shadow: 0 0 24px rgba(249,115,22,0.35);
  border: 1px solid var(--rose-border);
}
.auth-portrait-img { width: 100%; display: block; object-fit: cover; }
.auth-orb { display: none; }

.auth-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  background: var(--card2);
  padding: 2px; border: 1px solid var(--border-2);
}
.auth-tab {
  flex: 1; padding: 8px; background: none; border: none;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted); cursor: pointer; transition: all 0.18s;
}
.auth-tab.active {
  background: var(--rose-dim); color: var(--rose);
  box-shadow: inset 0 0 0 1px var(--rose-border);
}

.auth-field { margin-bottom: 12px; }
.auth-field-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.15em; margin-bottom: 5px; display: block;
}
.auth-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 12px 13px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  outline: none; transition: border-color 0.18s, box-shadow 0.18s;
}
.auth-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 1px var(--rose-dim), inset 0 0 18px var(--rose-dim);
}
.auth-input::placeholder { color: var(--muted); }
.auth-btn {
  width: 100%; padding: 13px;
  background: transparent; border: 1px solid var(--rose);
  color: var(--rose);
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer; margin-top: 6px; transition: all 0.18s;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.auth-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose); transform: translateX(-100%);
  transition: transform 0.22s ease; z-index: 0;
}
.auth-btn:active::before { transform: translateX(0); }
.auth-btn:active { color: #000; }
.auth-btn > * { position: relative; z-index: 1; }
.auth-btn:disabled { opacity: 0.4; cursor: default; }

.auth-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0;
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-2); }

.auth-skip {
  display: block; width: 100%; padding: 12px;
  background: none; border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s; text-align: center;
}
.auth-skip:active { border-color: var(--border-2); color: var(--text2); }
.auth-note {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  text-align: center; margin-top: 10px; line-height: 1.6;
}
.auth-note a { color: var(--rose); text-decoration: none; }

.auth-sent { text-align: center; padding: 10px 0 4px; animation: slide-up 0.35s ease; }
.auth-sent-icon {
  width: 46px; height: 46px; margin: 0 auto 14px;
  background: var(--green-dim); border: 1px solid rgba(57,217,138,0.25);
  display: flex; align-items: center; justify-content: center; color: var(--green);
}
.auth-sent-icon svg { width: 20px; height: 20px; stroke-width: 2; }
.auth-sent-title {
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.06em; margin-bottom: 8px;
}
.auth-sent-sub { font-family: var(--font-body); font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.auth-sent-email {
  display: inline-block; background: var(--card2); border: 1px solid var(--border);
  padding: 5px 13px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text); margin-bottom: 18px;
}

/* ═══════════════════════════════════════════════
   CLARIFY MODAL
   ═══════════════════════════════════════════════ */
.clarify-questions { margin-bottom: 14px; }
.clarify-q { margin-bottom: 12px; }
.clarify-q-label {
  font-family: var(--font-body); font-size: 13px; color: var(--muted); margin-bottom: 6px; line-height: 1.5;
}
.clarify-q-input {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  outline: none; transition: border-color 0.18s;
}
.clarify-q-input:focus { border-color: var(--rose); }

/* ═══════════════════════════════════════════════
   PRE-SEND SCREEN
   ═══════════════════════════════════════════════ */
#presendScreen { padding-bottom: 80px; }

.presend-header-banner {
  margin: 0 16px 18px; padding: 18px;
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  position: relative; overflow: hidden;
}
.presend-header-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--rose), transparent);
}
.presend-banner-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.2em; margin-bottom: 6px;
}
.presend-banner-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--text); margin-bottom: 4px;
}
.presend-banner-sub { font-family: var(--font-body); font-size: 12px; color: var(--muted); line-height: 1.55; }

.presend-mode-strip {
  padding: 0 16px; margin-bottom: 14px; display: flex; gap: 6px;
}
.presend-mode-pill {
  flex: 1; padding: 8px 10px; text-align: center;
  background: var(--card); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  cursor: pointer; transition: all 0.18s; letter-spacing: 0.06em;
}
.presend-mode-pill.active {
  background: var(--rose-dim); border-color: var(--rose); color: var(--rose);
}
.presend-mode-pill .pill-icon { display: block; margin-bottom: 4px; color: inherit; }

.presend-who-row {
  padding: 0 16px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center;
}
.presend-who-label {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  white-space: nowrap; letter-spacing: 0.08em;
}
.presend-who-input {
  flex: 1; background: var(--card); border: 1px solid var(--border-2);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  outline: none; transition: border-color 0.18s;
}
.presend-who-input:focus { border-color: var(--rose); }

.presend-textarea-wrap { padding: 0 16px; margin-bottom: 10px; }
.presend-textarea-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 6px;
}
.presend-input {
  width: 100%; background: var(--card); border: 1px solid var(--border-2);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  resize: none; line-height: 1.65; outline: none; transition: border-color 0.18s;
}
.presend-input:focus { border-color: var(--rose); box-shadow: inset 0 0 20px var(--rose-dim); }
.presend-input::placeholder { color: var(--muted); }
.presend-char-hint {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  margin-top: 4px; text-align: right; letter-spacing: 0.06em;
}

.presend-context-wrap { padding: 0 16px; margin-bottom: 12px; }
.presend-context-input {
  width: 100%; background: var(--card); border: 1px solid var(--border);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  resize: none; line-height: 1.65; outline: none; transition: border-color 0.18s;
}
.presend-context-input:focus { border-color: var(--rose); }
.presend-context-input::placeholder { color: var(--muted); }

.presend-run-btn {
  width: calc(100% - 32px); margin: 0 16px 16px;
  padding: 14px;
  background: transparent; border: 1px solid var(--rose);
  color: var(--rose);
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  cursor: pointer; transition: all 0.18s; position: relative; overflow: hidden;
}
.presend-run-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--rose); transform: translateX(-100%);
  transition: transform 0.22s ease; z-index: 0;
}
.presend-run-btn:active::before { transform: translateX(0); }
.presend-run-btn:active { color: #000; }

.presend-result { margin: 0 16px 14px; display: none; animation: slide-up 0.3s ease; }

.presend-verdict-card {
  padding: 18px; margin-bottom: 10px; text-align: center;
  border: 1px solid var(--border-2); background: var(--card);
  position: relative; overflow: hidden;
}
.presend-verdict-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
}
.presend-verdict-emoji { margin-bottom: 8px; display: flex; justify-content: center; }
.presend-verdict-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.2em; margin-bottom: 6px;
}
.presend-verdict-headline {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.presend-verdict-sub { font-family: var(--font-body); font-size: 13px; color: var(--muted); line-height: 1.5; }

.presend-flags-wrap { margin-bottom: 10px; }
.presend-flags-title {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 8px;
}

.presend-aria-take {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose); padding: 14px; margin-bottom: 10px;
}
.presend-aria-take-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.15em; margin-bottom: 5px;
}
.presend-aria-take-text {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6;
}

.presend-rewrite-wrap { margin-bottom: 10px; }
.presend-rewrite-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 8px;
}
.presend-rewrite-toggle { display: flex; gap: 5px; margin-bottom: 10px; }
.presend-action-row { display: flex; gap: 6px; margin-top: 10px; }
.presend-retry-btn {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  padding: 11px;
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s;
}
.presend-retry-btn:active { border-color: var(--rose-border); color: var(--rose); }
.presend-copy-fixed {
  flex: 2; background: transparent; border: 1px solid var(--rose);
  padding: 11px; color: var(--rose);
  font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.18s; position: relative; overflow: hidden;
}
.presend-copy-fixed::before {
  content: '';
  position: absolute; inset: 0; background: var(--rose);
  transform: translateX(-100%); transition: transform 0.22s ease; z-index: 0;
}
.presend-copy-fixed:active::before { transform: translateX(0); }
.presend-copy-fixed:active { color: #000; }
.presend-action-original { display: flex; gap: 6px; }

/* ═══════════════════════════════════════════════
   GLOW-UP SCREEN
   ═══════════════════════════════════════════════ */
#glowupScreen { padding-bottom: 80px; }

.glowup-result {
  margin: 0 16px 10px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 16px; animation: slide-up 0.3s ease both; display: none;
}
.glowup-result-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.15em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.glowup-result-label::before { content:''; width:16px; height:1px; background:var(--rose); opacity:0.5; }
.glowup-result-text { font-family: var(--font-body); font-size: 14px; color: #fff3e8; line-height: 1.7; }
.glowup-variants { padding: 0 16px; margin-bottom: 10px; display: none; }
.glowup-var-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.glowup-var-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 13px; margin-bottom: 6px;
  cursor: pointer; transition: all 0.18s; animation: slide-up 0.3s ease both;
}
.glowup-var-card:active { border-color: var(--rose-border); background: var(--rose-dim); }
.glowup-var-tone {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.1em; margin-bottom: 5px;
}
.glowup-var-text { font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6; }
.glowup-copy-row { display: flex; gap: 6px; padding: 0 16px; margin-bottom: 14px; display: none; }

/* ═══════════════════════════════════════════════
   RED FLAG SCREEN
   ═══════════════════════════════════════════════ */
#redflagScreen { padding-bottom: 80px; }

.redflag-result { margin: 0 16px 14px; display: none; animation: slide-up 0.3s ease; }
.redflag-score-card {
  padding: 18px; margin-bottom: 10px; text-align: center; border: 1px solid;
  position: relative;
}
.redflag-score-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
}
.redflag-score-card.safe   { background: var(--green-dim); border-color: rgba(57,217,138,0.25); }
.redflag-score-card.safe::before { background: var(--green); opacity: 0.4; }
.redflag-score-card.caution { background: var(--amber-dim); border-color: rgba(251,191,36,0.25); }
.redflag-score-card.caution::before { background: var(--amber); opacity: 0.4; }
.redflag-score-card.danger  { background: var(--red-dim); border-color: rgba(244,63,94,0.25); }
.redflag-score-card.danger::before { background: var(--red); opacity: 0.4; }
.redflag-emoji { font-size: 28px; margin-bottom: 8px; }
.redflag-verdict {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 4px;
}
.redflag-verdict.safe   { color: var(--green); }
.redflag-verdict.caution { color: var(--amber); }
.redflag-verdict.danger  { color: var(--red); }
.redflag-score-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.redflag-breakdown {
  background: var(--card); border: 1px solid var(--border); padding: 14px; margin-bottom: 8px;
}
.redflag-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-body); font-size: 13px;
}
.redflag-item:last-child { border-bottom: none; padding-bottom: 0; }
.redflag-item-icon { flex-shrink: 0; margin-top: 1px; }
.redflag-item-text { flex: 1; color: var(--text2); line-height: 1.5; }
.redflag-suggestion {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 12px 14px; font-family: var(--font-body); font-size: 13px;
  color: var(--text2); line-height: 1.6; margin-bottom: 10px;
}
.redflag-suggestion-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.15em; margin-bottom: 5px;
}

/* ═══════════════════════════════════════════════
   VIBE REPORT SCREEN
   ═══════════════════════════════════════════════ */
#vibeScreen { padding-bottom: 80px; }

.vibe-contact-select { padding: 0 16px; margin-bottom: 14px; }
.vibe-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vibe-contact-chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 11px 13px;
  cursor: pointer; transition: all 0.18s; display: flex; align-items: center; gap: 10px;
}
.vibe-contact-chip:active, .vibe-contact-chip.selected {
  border-color: var(--rose-border); background: var(--rose-dim);
}
.vibe-contact-chip-name { font-family: var(--font-body); font-size: 13px; font-weight: 500; }
.vibe-contact-chip-rel {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px;
}
.vibe-report-card {
  margin: 0 16px 10px;
  background: var(--card); border: 1px solid var(--border);
  padding: 16px; animation: slide-up 0.3s ease both; display: none;
}
.vibe-report-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.vibe-report-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
  border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--rose);
}
.vibe-report-name { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.06em; }
.vibe-report-rel { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.vibe-stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.vibe-stat-box {
  background: var(--card2); border: 1px solid var(--border); padding: 9px; text-align: center;
}
.vibe-stat-box-num {
  font-family: var(--font-display); font-size: 18px; color: var(--rose);
  text-shadow: 0 0 10px rgba(249,115,22,0.4);
}
.vibe-stat-box-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted); margin-top: 2px; letter-spacing: 0.06em;
}
.vibe-insight {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 12px 14px; font-family: var(--font-body); font-size: 13px;
  color: var(--text2); line-height: 1.65;
  margin-bottom: 10px; display: none; animation: slide-up 0.3s ease;
}
.vibe-insight-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  letter-spacing: 0.15em; margin-bottom: 5px;
}
.vibe-pattern-list { margin-top: 10px; }
.vibe-pattern-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-family: var(--font-body); font-size: 13px;
}
.vibe-pattern-item:last-child { border-bottom: none; }
.vibe-pattern-icon { flex-shrink: 0; color: var(--rose); }
.vibe-pattern-text { flex: 1; color: var(--text2); line-height: 1.4; }

/* ═══════════════════════════════════════════════
   CRM FIELDS
   ═══════════════════════════════════════════════ */
.cp-section-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.18em; margin-bottom: 10px;
}
.cp-crm-fields { display: flex; flex-direction: column; gap: 8px; }
.cp-field-row { display: flex; flex-direction: column; gap: 4px; }
.cp-field-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.14em;
}
.cp-field-input {
  background: var(--card); border: 1px solid var(--border-2);
  padding: 9px 11px;
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  width: 100%; transition: border-color 0.18s; outline: none;
}
.cp-field-input:focus { border-color: var(--rose); }
.cp-field-input::placeholder { color: var(--muted); }
.cp-field-textarea { resize: none; min-height: 68px; line-height: 1.5; }
input[type="date"].cp-field-input { color-scheme: dark; }
.cp-crm-save {
  flex: 1; background: transparent; border: 1px solid var(--rose);
  color: var(--rose);
  font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  padding: 10px 16px; cursor: pointer; transition: all 0.18s;
}
.cp-crm-save:active { background: var(--rose-dim); }

/* ═══════════════════════════════════════════════
   NETWORK BANNER
   ═══════════════════════════════════════════════ */
#ariaNetworkBanner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--card2);
  border-bottom: 1px solid rgba(244,63,94,0.3);
  color: var(--red);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-align: center;
  padding: 9px 14px;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#ariaNetworkBanner.show  { transform: translateY(0); }
#ariaNetworkBanner.hide  { transform: translateY(-100%); }

/* ═══════════════════════════════════════════════
   PL BRAND (intro screen)
   ═══════════════════════════════════════════════ */
.pl-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; margin-bottom: 8px;
}
.pl-brand--intro { margin-top: 4px; }
.pl-brand--modal { margin-bottom: 12px; }

/* ═══════════════════════════════════════════════
   LOADING / ARIA LOADER OVERRIDE
   (keep loader as-is — only update colors to orange)
   ═══════════════════════════════════════════════ */
#ariaLoader {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  flex-direction: column;
}

.pl2-bg-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(249,115,22,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.pl2-loader {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; position: relative; z-index: 1;
}

.pl2-chevrons {
  display: flex; gap: 2px; align-items: center; justify-content: center;
  position: relative;
  transform-style: preserve-3d;
}

.pl2-ch {
  width: 58px; height: 76px; flex-shrink: 0;
  position: relative; opacity: 0;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}
.pl2-ch svg { width: 100%; height: 100%; overflow: visible; }

.pl2-ch::after {
  content: '';
  position: absolute; inset: -12px;
  opacity: 0; will-change: opacity;
}
.pl2-ch-1::after { background: radial-gradient(ellipse at center, rgba(249,115,22,0.35) 0%, transparent 70%);  animation: pl2HaloIn 0.4s 0.85s both; }
.pl2-ch-2::after { background: radial-gradient(ellipse at center, rgba(249,150,50,0.30) 0%, transparent 70%);  animation: pl2HaloIn 0.4s 1.02s both; }
.pl2-ch-3::after { background: radial-gradient(ellipse at center, rgba(249,115,22,0.28) 0%, transparent 70%);  animation: pl2HaloIn 0.4s 1.19s both; }
.pl2-ch-4::after { background: radial-gradient(ellipse at center, rgba(255,160,70,0.25) 0%, transparent 70%);  animation: pl2HaloIn 0.4s 1.36s both; }
@keyframes pl2HaloIn { from { opacity: 0; } to { opacity: 1; } }

.pl2-ch-1 { animation: pl2FlyIn1 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both, pl2Idle 3.2s ease-in-out 1.5s infinite; }
@keyframes pl2FlyIn1 {
  0%   { opacity: 0; transform: translate3d(-120px, -80px, -400px) rotateY(90deg) rotateZ(-25deg) scale(0.4); }
  60%  { opacity: 1; }
  85%  { transform: translate3d(4px, -4px, 0) rotateY(-6deg) rotateZ(2deg) scale(1.04); }
  100% { opacity: 1; transform: translate3d(0,0,0) rotateY(0) rotateZ(0) scale(1); }
}
.pl2-ch-2 { animation: pl2FlyIn2 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both, pl2Idle 3.2s ease-in-out 1.65s infinite; }
@keyframes pl2FlyIn2 {
  0%   { opacity: 0; transform: translate3d(0, 120px, -600px) rotateX(-70deg) rotateY(15deg) scale(0.2); }
  60%  { opacity: 1; }
  85%  { transform: translate3d(0, -5px, 0) rotateX(5deg) scale(1.06); }
  100% { opacity: 1; transform: translate3d(0,0,0) rotateX(0) rotateY(0) scale(1); }
}
.pl2-ch-3 { animation: pl2FlyIn3 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.49s both, pl2Idle 3.2s ease-in-out 1.8s infinite; }
@keyframes pl2FlyIn3 {
  0%   { opacity: 0; transform: translate3d(140px, -60px, -300px) rotateZ(180deg) rotateY(-50deg) scale(0.3); }
  60%  { opacity: 1; }
  85%  { transform: translate3d(-3px, 3px, 0) rotateZ(-4deg) rotateY(4deg) scale(1.05); }
  100% { opacity: 1; transform: translate3d(0,0,0) rotateZ(0) rotateY(0) scale(1); }
}
.pl2-ch-4 { animation: pl2FlyIn4 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.66s both, pl2Idle 3.2s ease-in-out 1.95s infinite; }
@keyframes pl2FlyIn4 {
  0%   { opacity: 0; transform: translate3d(60px, -160px, -500px) rotateX(120deg) rotateZ(-60deg) scale(0.2); }
  50%  { opacity: 0.8; }
  85%  { transform: translate3d(-2px, 5px, 0) rotateX(-5deg) rotateZ(3deg) scale(1.07); }
  100% { opacity: 1; transform: translate3d(0,0,0) rotateX(0) rotateZ(0) scale(1); }
}
@keyframes pl2Idle {
  0%,100% { transform: translateX(0) translateY(0) scale(1); }
  50%     { transform: translateX(2px) translateY(-3px) scale(1.03); }
}

.pl2-chevrons-shadow {
  width: 200px; height: 12px;
  background: radial-gradient(ellipse, rgba(249,115,22,0.2) 0%, transparent 70%);
  margin-bottom: 4px;
  animation: pl2ShadowIn 0.6s 1.2s both;
  transform-origin: center; will-change: opacity, transform;
}
@keyframes pl2ShadowIn {
  from { opacity: 0; transform: scaleX(0.4); }
  to   { opacity: 1; transform: scaleX(1); }
}

.pl2-wordmark { text-align: center; position: relative; margin-top: 8px; transform: translateZ(0); }

.pl2-paradigm {
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  font-size: clamp(42px, 11vw, 62px);
  letter-spacing: 0.06em; line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #f97316 50%, #ff6b00 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 0 18px rgba(249,115,22,0.5));
  animation: pl2FadeUp 0.9s 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

.pl2-divider {
  width: 100%; height: 1px; position: relative; margin: 10px 0;
  background: linear-gradient(90deg, transparent, #f97316 30%, #ff9500 70%, transparent);
  overflow: hidden; transform-origin: left center;
  animation: pl2DividerExpand 0.7s 1.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}
@keyframes pl2DividerExpand {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}
.pl2-divider-shine {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9) 50%, transparent);
  animation: pl2DividerShine 0.9s 1.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  will-change: transform;
}
@keyframes pl2DividerShine {
  from { transform: translateX(-100%); }
  to   { transform: translateX(200%); }
}

.pl2-leveling {
  font-family: 'Share Tech Mono', monospace;
  font-weight: 400;
  font-size: clamp(13px, 3.5vw, 20px);
  letter-spacing: 0.4em;
  color: rgba(249,115,22,0.6);
  animation: pl2FadeUp 0.7s 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  will-change: transform, opacity;
}

@keyframes pl2FadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   ARIA OPINION
   ═══════════════════════════════════════════════ */
.aria-opinion {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose-border);
  padding: 12px 14px; margin-bottom: 14px;
  font-family: var(--font-body); font-size: 13px; color: var(--muted);
  line-height: 1.6;
  animation: slide-up 0.3s ease 0.3s both;
}
.aria-opinion .name {
  font-family: var(--font-mono);
  color: var(--rose); font-size: 9px; letter-spacing: 0.15em;
  display: block; margin-bottom: 5px;
}

/* ═══════════════════════════════════════════════
   QUEUE SCREEN (swipeable reply stack)
   ═══════════════════════════════════════════════ */
#queueScreen { padding-bottom: 80px; overflow: hidden; }

.queue-header { padding: 14px 16px 8px; }
.queue-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.queue-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

.queue-stack {
  position: relative; height: 320px;
  margin: 0 16px; perspective: 1000px;
}
.queue-card {
  position: absolute; inset: 0;
  background: var(--card); border: 1px solid var(--border);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: grab; user-select: none;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.2s;
  touch-action: none;
}
.queue-card:nth-child(2) { transform: translateY(8px) scale(0.97); z-index: 1; }
.queue-card:nth-child(3) { transform: translateY(16px) scale(0.94); z-index: 0; }
.queue-card.top { z-index: 10; box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
.queue-card.swiping-right { border-color: var(--green); box-shadow: 0 0 24px rgba(57,217,138,0.2); }
.queue-card.swiping-left  { border-color: rgba(244,63,94,0.4); box-shadow: 0 0 24px rgba(244,63,94,0.12); }

.queue-card-contact { display: flex; align-items: center; gap: 10px; }
.queue-card-avatar {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  flex-shrink: 0; border: 1px solid var(--border-2); color: var(--rose);
}
.queue-card-name { font-family: var(--font-body); font-size: 15px; font-weight: 600; }
.queue-card-time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.queue-card-msg {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6;
  padding: 11px 12px; background: var(--card2); border-left: 2px solid var(--border-2);
}
.queue-card-platform { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.queue-swipe-hint { display: flex; justify-content: space-between; padding: 12px 16px; margin-bottom: 8px; }
.queue-swipe-label {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; letter-spacing: 0.06em;
}
.queue-swipe-actions { display: flex; gap: 10px; justify-content: center; padding: 0 16px 14px; }
.queue-action-btn {
  flex: 1; padding: 13px; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s;
}
.queue-action-snooze { background: var(--card); color: var(--muted); border: 1px solid var(--border); }
.queue-action-reply  {
  background: transparent; border: 1px solid var(--rose); color: var(--rose);
}
.queue-action-reply:active { background: var(--rose-dim); box-shadow: var(--rose-glow-sm); }
.queue-empty { text-align: center; padding: 60px 20px; }
.queue-empty-icon { margin-bottom: 12px; opacity: 0.3; color: var(--rose); }
.queue-empty-text { font-family: var(--font-mono); font-size: 12px; color: var(--muted); line-height: 1.6; letter-spacing: 0.04em; }

/* ═══════════════════════════════════════════════
   FOLLOW-UP NUDGE
   ═══════════════════════════════════════════════ */
.followup-nudge {
  position: fixed; bottom: 86px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--card); border: 1px solid var(--rose-border);
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(249,115,22,0.1); z-index: 200;
  width: calc(100% - 32px); max-width: 360px;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0; pointer-events: none;
}
.followup-nudge.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: all; }
.followup-nudge-top { display: flex; align-items: center; gap: 10px; }
.followup-nudge-orb { width: 22px; height: 22px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--rose-border); }
.followup-nudge-orb img { width: 100%; height: 100%; object-fit: cover; }
.followup-nudge-text { font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.5; }
.followup-nudge-btns { display: flex; gap: 6px; }
.followup-btn {
  flex: 1; padding: 9px 6px; background: var(--card2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px; color: var(--text); cursor: pointer;
  text-align: center; transition: all 0.18s; letter-spacing: 0.06em;
}
.followup-btn:active { transform: scale(0.96); }
.followup-btn.good { border-color: rgba(57,217,138,0.4); color: var(--green); }
.followup-btn.meh  { border-color: rgba(251,191,36,0.4); color: var(--amber); }
.followup-btn.bad  { border-color: rgba(244,63,94,0.4); color: var(--red); }

/* ═══════════════════════════════════════════════
   LONG GAME SCREEN
   ═══════════════════════════════════════════════ */
#longGameScreen { padding-bottom: 100px; overflow-y: auto; }
.lg-header { padding: 16px 16px 8px; }
.lg-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text); margin-bottom: 4px;
}
.lg-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.5; }

.lg-new-btn {
  margin: 10px 16px 18px;
  width: calc(100% - 32px);
  padding: 13px;
  background: transparent; border: 1px solid var(--green);
  color: var(--green);
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer; display: block;
  transition: all 0.18s; position: relative; overflow: hidden;
}
.lg-new-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--green-dim); opacity: 0; transition: opacity 0.18s;
}
.lg-new-btn:active::before { opacity: 1; }
.lg-new-btn:active { box-shadow: 0 0 14px rgba(57,217,138,0.3); }

.lg-section-label {
  font-family: var(--font-mono);
  font-size: 9px; color: var(--muted); letter-spacing: 0.18em;
  padding: 0 16px; margin-bottom: 10px;
}
.lg-section-label::before { content: '// '; color: var(--rose); opacity: 0.5; }

/* Active game card */
.lg-game-card {
  margin: 0 16px 10px;
  background: var(--card); border: 1px solid var(--border);
  overflow: hidden; cursor: pointer;
  transition: border-color 0.18s;
  position: relative;
}
.lg-game-card:active { border-color: rgba(167,139,250,0.4); }
.lg-game-card.priority-1 { border-color: rgba(167,139,250,0.3); }
.lg-game-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: rgba(167,139,250,0.3); opacity: 0;
  transition: opacity 0.18s;
}
.lg-game-card.priority-1::before { opacity: 1; }

.lg-game-header {
  padding: 12px 14px 8px;
  display: flex; align-items: center; gap: 10px;
}
.lg-game-avatar {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; flex-shrink: 0;
  border: 1px solid var(--border-2); color: var(--rose);
}
.lg-game-info { flex: 1; min-width: 0; }
.lg-game-name { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text); }
.lg-game-goal { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-game-priority {
  font-family: var(--font-mono); font-size: 9px; padding: 1px 7px;
  background: rgba(167,139,250,0.08); color: #a78bfa;
  border: 1px solid rgba(167,139,250,0.2); white-space: nowrap; letter-spacing: 0.06em;
}

.lg-progress-bar { height: 2px; background: var(--card2); margin: 0 14px 12px; overflow: hidden; }
.lg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.5s ease;
  box-shadow: 0 0 6px rgba(167,139,250,0.4);
}

.lg-step-row { display: flex; gap: 5px; align-items: center; padding: 0 14px 10px; flex-wrap: wrap; }
.lg-step-pip {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; flex-shrink: 0;
  border: 1px solid var(--border); color: var(--muted);
  background: var(--card2);
}
.lg-step-pip.done   { background: rgba(57,217,138,0.1); border-color: rgba(57,217,138,0.35); color: var(--green); }
.lg-step-pip.active { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.4); color: #a78bfa; animation: breathe 2s ease-in-out infinite; }

.lg-drag-handle { padding: 12px 14px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; }
.lg-game-card.dragging { opacity: 0.5; border-style: dashed; }
.lg-game-card.drag-over { border-color: #a78bfa; background: rgba(167,139,250,0.04); }
.lg-priority-badge {
  width: 18px; height: 18px;
  background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.3);
  color: #a78bfa;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-right: 8px;
}

/* Detail */
.lg-detail-wrap { padding: 0 16px 20px; }
.lg-detail-goal-card {
  background: var(--card); border: 1px solid rgba(167,139,250,0.2);
  border-left: 2px solid rgba(167,139,250,0.4);
  padding: 13px 14px; margin-bottom: 14px;
}
.lg-detail-goal-label { font-family: var(--font-mono); font-size: 9px; color: #a78bfa; letter-spacing: 0.15em; margin-bottom: 6px; }
.lg-detail-goal-text { font-family: var(--font-body); font-size: 14px; color: var(--text); line-height: 1.6; }
.lg-aria-read { font-family: var(--font-body); font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.55; }

.lg-step-card {
  background: var(--card); border: 1px solid var(--border);
  margin-bottom: 8px; overflow: hidden; transition: border-color 0.18s;
}
.lg-step-card.active-step { border-color: rgba(167,139,250,0.35); }
.lg-step-card.done-step   { opacity: 0.6; }

.lg-step-header { display: flex; align-items: center; gap: 10px; padding: 11px 13px; }
.lg-step-num {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700; flex-shrink: 0;
  background: var(--card2); border: 1px solid var(--border); color: var(--muted);
}
.lg-step-card.active-step .lg-step-num { background: rgba(167,139,250,0.12); border-color: rgba(167,139,250,0.4); color: #a78bfa; }
.lg-step-card.done-step   .lg-step-num { background: rgba(57,217,138,0.1); border-color: rgba(57,217,138,0.3); color: var(--green); }
.lg-step-title { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.lg-step-status { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.lg-step-body { padding: 0 13px 13px; }
.lg-step-intent { font-family: var(--font-body); font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.55; }
.lg-step-draft {
  background: var(--card2); border: 1px solid var(--border);
  border-left: 2px solid rgba(167,139,250,0.3);
  padding: 11px 12px;
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6;
  white-space: pre-wrap; margin-bottom: 10px;
}
.lg-step-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lg-step-btn {
  flex: 1; min-width: 100px;
  padding: 9px 11px; font-family: var(--font-mono); font-size: 10px;
  font-weight: 600; letter-spacing: 0.06em; cursor: pointer; border: none;
  transition: all 0.18s;
}
.lg-btn-send   { background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.3); color: #a78bfa; }
.lg-btn-edit   { background: var(--card2); border: 1px solid var(--border); color: var(--text); }
.lg-btn-regen  { background: var(--card2); border: 1px solid var(--border); color: var(--muted); }

.lg-outcome-row { display: flex; gap: 6px; margin-top: 10px; }
.lg-outcome-btn {
  flex: 1; padding: 9px 7px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--card2); color: var(--text); text-align: center;
  transition: all 0.18s;
}
.lg-outcome-btn.good  { border-color: rgba(57,217,138,0.35); color: var(--green); }
.lg-outcome-btn.meh   { border-color: rgba(251,191,36,0.35); color: var(--amber); }
.lg-outcome-btn.bad   { border-color: rgba(244,63,94,0.35);  color: var(--red); }
.lg-outcome-btn.selected { transform: scale(1.04); box-shadow: 0 0 0 1px currentColor; font-weight: 700; }

/* Setup modal */
.lg-setup-wrap { padding: 4px 16px 20px; }
.lg-setup-label { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.15em; margin-bottom: 8px; margin-top: 14px; }
.lg-setup-textarea {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 11px 13px;
  color: var(--text); font-family: var(--font-body); font-size: 14px;
  line-height: 1.6; resize: none; min-height: 88px;
}
.lg-setup-textarea:focus { outline: none; border-color: rgba(167,139,250,0.4); }
.lg-contact-select {
  width: 100%; background: var(--card2); border: 1px solid var(--border-2);
  padding: 11px 13px; color: var(--text); font-family: var(--font-body); font-size: 14px;
  appearance: none; cursor: pointer;
}
.lg-contact-select:focus { outline: none; border-color: rgba(167,139,250,0.4); }
.lg-setup-btn {
  width: 100%; margin-top: 18px; padding: 13px;
  background: transparent; border: 1px solid rgba(167,139,250,0.5);
  color: #a78bfa;
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; cursor: pointer; transition: all 0.18s;
}
.lg-setup-btn:active { background: rgba(167,139,250,0.08); }

.lg-aria-thinking-card {
  background: var(--card); border: 1px solid rgba(167,139,250,0.2);
  border-left: 2px solid rgba(167,139,250,0.4);
  padding: 18px; text-align: center; margin: 16px;
}
.lg-thinking-orb {
  width: 40px; height: 40px;
  background: transparent; border: 1px solid rgba(167,139,250,0.3);
  margin: 0 auto 12px; animation: breathe 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.lg-thinking-text { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }

/* Completion card */
.lg-completion-card {
  background: var(--card); border: 1px solid rgba(167,139,250,0.2);
  border-top: 2px solid rgba(167,139,250,0.4);
  padding: 24px 16px 18px; text-align: center; margin-bottom: 14px;
}
.lg-completion-emoji { margin-bottom: 10px; color: #a78bfa; opacity: 0.7; font-size: 32px; }
.lg-completion-headline {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--text); margin-bottom: 6px;
}
.lg-completion-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.lg-completion-stats { display: flex; gap: 6px; justify-content: center; margin-bottom: 4px; }
.lg-completion-stat {
  background: var(--card2); border: 1px solid var(--border); padding: 9px 14px; min-width: 56px;
}
.lg-completion-stat-num { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.lg-completion-stat-label { font-family: var(--font-mono); font-size: 8px; color: var(--muted); letter-spacing: 0.1em; margin-top: 2px; }

.lg-game-card.done-card { opacity: 0.5; }
#lgArcPreviewScreen { padding-bottom: 100px; overflow-y: auto; }

/* ═══════════════════════════════════════════════
   TUTORIAL MODAL
   ═══════════════════════════════════════════════ */
#tutorialModal .modal-sheet { max-height: 92vh; overflow-y: auto; padding-bottom: 24px; }
.tutorial-aria-row { display: flex; align-items: center; gap: 12px; padding: 16px 16px 0; }
.tutorial-aria-img {
  width: 46px; height: 46px; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 16px rgba(249,115,22,0.3); border: 1px solid var(--rose-border);
}
.tutorial-aria-img img { width: 160%; height: 160%; object-fit: cover; object-position: center 10%; margin-left: -30%; margin-top: -5%; }
.tutorial-aria-bubble {
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose-border);
  padding: 9px 13px;
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.55; flex: 1;
}
.tutorial-bubble-headline { font-weight: 600; color: var(--text); font-size: 13px; display: block; margin-bottom: 2px; }
.tutorial-bubble-sub { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.tutorial-title {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--text); padding: 14px 16px 4px; text-align: center;
}
.tutorial-sub {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  text-align: center; padding: 0 16px 14px; line-height: 1.5; letter-spacing: 0.04em;
}
.tutorial-methods { display: flex; flex-direction: column; gap: 8px; padding: 0 14px; }
.tutorial-method-card {
  background: var(--card); border: 1px solid var(--border); padding: 13px 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.tutorial-method-icon {
  width: 36px; height: 36px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tutorial-method-body { flex: 1; }
.tutorial-method-title { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.tutorial-method-num {
  font-family: var(--font-display) !important; font-size: 14px !important; font-weight: 700 !important;
  color: var(--text) !important;
  background: var(--rose-dim) !important; border: 1px solid var(--rose-border) !important;
}
.tutorial-method-desc { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.5; }
.tutorial-method-badge {
  display: inline-block; margin-top: 5px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.06em;
  padding: 1px 8px;
}
.tutorial-method-badge.easiest { background: var(--green-dim); color: var(--green); border: 1px solid rgba(57,217,138,0.25); }
.tutorial-method-badge.quick   { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.25); }
.tutorial-method-badge.power   { background: var(--rose-dim); color: var(--rose); border: 1px solid var(--rose-border); }

.tutorial-dont-show { display: flex; align-items: center; gap: 10px; padding: 13px 16px 0; cursor: pointer; }
.tutorial-checkbox {
  width: 16px; height: 16px; border: 1px solid var(--border);
  background: var(--card);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.18s;
}
.tutorial-checkbox.checked { background: var(--rose-dim); border-color: var(--rose); }
.tutorial-checkbox.checked::after { content: 'x'; font-family: var(--font-mono); font-size: 10px; color: var(--rose); }
.tutorial-dont-show-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.4; letter-spacing: 0.04em; }
.tutorial-got-it-btn {
  margin: 14px 14px 0; width: calc(100% - 28px);
  padding: 13px;
  background: transparent; border: 1px solid var(--rose); color: var(--rose);
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; cursor: pointer; display: block;
  transition: all 0.18s;
}
.tutorial-got-it-btn:active { background: var(--rose-dim); box-shadow: var(--rose-glow-sm); }

/* ═══════════════════════════════════════════════
   CONTACT PROFILE (cp-) EXTRAS
   ═══════════════════════════════════════════════ */
.cp-action-row {
  display: flex; gap: 6px; padding: 12px 16px 0;
}
.cp-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 13px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  cursor: pointer; transition: all 0.18s; border: 1px solid var(--border);
}
.cp-action-reply    { background: var(--rose-dim); border-color: var(--rose-border); color: var(--rose); }
.cp-action-reply:active { opacity: 0.75; }
.cp-action-longgame { background: rgba(167,139,250,0.06); border-color: rgba(167,139,250,0.2); color: #a78bfa; }
.cp-action-longgame:active { opacity: 0.75; }

.contact-reply-meta {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
}

/* ═══════════════════════════════════════════════
   MEMORY LOADING STATE
   ═══════════════════════════════════════════════ */
#memoryScreen { display: flex; flex-direction: column; overflow: hidden; }
.memory-loading-wrap {
  padding: 40px 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.memory-loading-label {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  text-align: center; min-height: 20px; transition: opacity 0.3s;
  letter-spacing: 0.06em;
}
.memory-progress-track {
  width: 100%; max-width: 260px; height: 2px;
  background: var(--card2);
  overflow: hidden;
}
.memory-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), #f472b6);
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(249,115,22,0.4);
}
.memory-loading-pct {
  font-family: var(--font-mono); font-size: 11px; color: var(--rose);
  font-weight: 600; letter-spacing: 0.06em;
}

/* ═══════════════════════════════════════════════
   ARIA LOCK OVERLAY
   ═══════════════════════════════════════════════ */
#ariaLockOverlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#ariaLockOverlay.visible { opacity: 1; pointer-events: all; }

.aria-lock-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 28px 44px; max-width: 320px; width: 100%;
}
.aria-lock-portrait {
  width: 100px; height: 100px; overflow: hidden;
  border: 1px solid rgba(244,63,94,0.3);
  box-shadow: 0 0 32px rgba(244,63,94,0.18), 0 0 60px rgba(244,63,94,0.06);
  margin-bottom: 22px; flex-shrink: 0;
}
.aria-lock-img {
  width: 160%; height: 160%;
  object-fit: cover; object-position: center 15%;
  margin-left: -30%; margin-top: -5%;
}
.aria-lock-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 10px; letter-spacing: 0.06em;
}
.aria-lock-sub {
  font-family: var(--font-body);
  font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.65; margin-bottom: 28px;
}
.aria-lock-timer-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
  color: rgba(244,63,94,0.5); margin-bottom: 6px; text-transform: uppercase;
}
.aria-lock-timer {
  font-family: var(--font-display); font-size: 48px; font-weight: 900;
  color: var(--red); letter-spacing: 0.02em; line-height: 1; margin-bottom: 24px;
  text-shadow: 0 0 24px rgba(244,63,94,0.4);
}
.aria-lock-footer {
  font-family: var(--font-mono); font-size: 11px;
  color: rgba(255,255,255,0.18); letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════════
   XP BAR (aria-xp-bar.js injected)
   ═══════════════════════════════════════════════ */
#ariaXPBar {
  padding: 4px 16px 8px;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.xp-stage-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.12em; flex-shrink: 0; min-width: 60px;
  text-transform: lowercase;
}
.xp-track-wrap { flex: 1; display: flex; align-items: center; gap: 8px; }
.xp-track {
  flex: 1; height: 2px; background: var(--border); overflow: hidden;
}
.xp-fill { height: 100%; transition: width 0.6s ease; }
.xp-pct {
  font-family: var(--font-mono); font-size: 9px; color: var(--rose);
  min-width: 28px; text-align: right;
}

/* Intro XP card */
.xp-intro-card {
  margin: 0 16px 14px;
  background: var(--card); border: 1px solid var(--border-2);
  padding: 14px;
  animation: slide-up 0.3s ease;
  position: relative; overflow: hidden;
}
.xp-intro-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
  opacity: 0.3;
}
.xp-intro-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.xp-intro-stage-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.14em; margin-bottom: 3px;
}
.xp-intro-stage-name { font-family: var(--font-display); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.xp-intro-stage-num { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.xp-intro-arc-wrap { position: relative; margin-bottom: 10px; }
.xp-intro-track {
  height: 2px; background: var(--border); overflow: hidden; position: relative;
}
.xp-intro-fill { height: 100%; transition: width 0.6s ease; position: relative; z-index: 1; }
.xp-intro-nodes { position: absolute; top: 50%; transform: translateY(-50%); left: 0; right: 0; }
.xp-node {
  position: absolute; width: 8px; height: 8px;
  transform: translateX(-50%) translateY(-50%);
  background: var(--border); border: 1px solid var(--border-2);
  transition: all 0.3s;
}
.xp-node-reached {
  background: var(--node-color, var(--rose));
  border-color: var(--node-color, var(--rose));
  box-shadow: 0 0 6px var(--node-color, rgba(249,115,22,0.4));
}
.xp-intro-sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.06em; }

/* ═══════════════════════════════════════════════
   GAMES SCREEN (aria-games.css — cyberpunk)
   ═══════════════════════════════════════════════ */
#gamesScreen { background: var(--bg); min-height: 100vh; overflow-x: hidden; }

.g-screen {
  display: flex; flex-direction: column; min-height: 100vh;
  max-width: 480px; margin: 0 auto; padding-bottom: 48px;
}

.g-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
  border-bottom: 1px solid var(--border);
}
.g-back {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  cursor: pointer; padding: 7px 9px;
  display: flex; align-items: center;
  transition: all 0.18s; flex-shrink: 0;
}
.g-back:active { border-color: var(--rose-border); color: var(--rose); }

.g-topbar-label {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; color: var(--text2); flex: 1;
}
.g-round-tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--rose); background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 3px 10px; text-transform: uppercase;
}

.g-lobby { display: flex; flex-direction: column; }
.g-hero { padding: 14px 16px 24px; position: relative; overflow: hidden; }
.g-hero::after {
  content: 'READ';
  position: absolute; right: -10px; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--font-display); font-weight: 900; font-size: 72px;
  color: var(--faint); letter-spacing: -2px;
  pointer-events: none; user-select: none; line-height: 1;
}
.g-hero-eyebrow {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--rose); text-transform: uppercase; margin-bottom: 10px;
}
.g-hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 13vw, 60px); line-height: 0.9;
  color: var(--text); text-transform: uppercase; letter-spacing: -1px; margin-bottom: 16px;
  text-shadow: 0 0 30px rgba(249,115,22,0.2);
}
.g-hero-sub {
  font-family: var(--font-body); font-size: 13px; line-height: 1.75; color: var(--text2);
  max-width: 280px; border-left: 2px solid var(--rose); padding-left: 13px; margin-bottom: 14px;
}
.g-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.g-hero-tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 3px 9px;
}

.g-divider { display: flex; align-items: center; gap: 12px; padding: 0 16px 16px; }
.g-divider-line { flex: 1; height: 1px; background: var(--border); }
.g-divider-text {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
}

.g-diff-grid { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.g-diff-card {
  background: var(--card); border: 1px solid var(--border);
  cursor: pointer; overflow: hidden; transition: border-color 0.18s, transform 0.14s;
  width: 100%; position: relative; display: flex; flex-direction: column;
  text-align: left; isolation: isolate; will-change: transform; min-height: 86px;
  -webkit-transform: translateZ(0);
}
.g-diff-card:active { transform: translateY(0) scale(0.99); }
.g-diff-card-inner { display: flex; align-items: stretch; min-height: 80px; background: inherit; }
.g-diff-num {
  font-family: var(--font-display); font-weight: 900; font-size: 48px; line-height: 1;
  letter-spacing: -2px; width: 74px; min-width: 74px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 0 12px 12px; color: var(--border); transition: color 0.18s;
}
.g-diff-content {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 14px 12px; border-left: 1px solid var(--border); min-width: 0;
}
.g-diff-name {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text); line-height: 1; margin-bottom: 4px;
}
.g-diff-desc { font-family: var(--font-mono); font-size: 11px; color: var(--muted); line-height: 1.45; white-space: normal; }
.g-diff-arrow {
  display: flex; align-items: center; padding: 0 16px; color: var(--border); transition: all 0.18s; flex-shrink: 0;
}
.g-diff-card:active .g-diff-arrow { transform: translateX(3px); }
.g-diff-accent { height: 2px; background: transparent; transition: background 0.18s; }

/* Level colors */
.g-diff-card[data-level="easy"]:active  { border-color: rgba(57,217,138,0.3); }
.g-diff-card[data-level="easy"]:active .g-diff-accent  { background: var(--green); }
.g-diff-card[data-level="easy"]:active .g-diff-arrow   { color: var(--green); }
.g-diff-card[data-level="easy"]:active .g-diff-num     { color: rgba(57,217,138,0.3); }
.g-diff-card[data-level="medium"]:active { border-color: rgba(251,191,36,0.35); }
.g-diff-card[data-level="medium"]:active .g-diff-accent { background: var(--amber); }
.g-diff-card[data-level="medium"]:active .g-diff-arrow  { color: var(--amber); }
.g-diff-card[data-level="medium"]:active .g-diff-num    { color: rgba(251,191,36,0.35); }
.g-diff-card[data-level="hard"]:active  { border-color: rgba(249,115,22,0.4); }
.g-diff-card[data-level="hard"]:active .g-diff-accent  { background: var(--rose); }
.g-diff-card[data-level="hard"]:active .g-diff-arrow   { color: var(--rose); }
.g-diff-card[data-level="hard"]:active .g-diff-num     { color: var(--rose-border2); }

.g-rules {
  display: flex; flex-direction: row; margin: 16px 16px 0;
  border: 1px solid var(--border); overflow: hidden;
}
.g-rule {
  flex: 1; font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  padding: 10px; text-align: center; line-height: 1.4;
  border-right: 1px solid var(--border); letter-spacing: 0.04em;
}
.g-rule:last-child { border-right: none; }

.g-round-body { flex: 1; padding: 14px 16px 0; display: flex; flex-direction: column; gap: 14px; }
.g-progress-bar { height: 2px; background: var(--border); overflow: hidden; }
.g-progress-fill { height: 100%; background: var(--rose); transition: width 0.4s ease; box-shadow: 0 0 6px rgba(249,115,22,0.4); }

.g-timer-row { display: flex; align-items: center; gap: 10px; }
.g-timer-bar-track { flex: 1; height: 3px; background: var(--border); overflow: hidden; }
.g-timer-bar { height: 100%; width: 100%; background: var(--green); box-shadow: 0 0 6px rgba(57,217,138,0.4); }
.g-timer-bar.warning { background: var(--amber); box-shadow: 0 0 6px rgba(251,191,36,0.4); }
.g-timer-bar.danger  { background: var(--red); box-shadow: 0 0 6px rgba(244,63,94,0.4); }
.g-timer-num {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--rose); min-width: 32px; text-align: right;
  text-shadow: 0 0 10px rgba(249,115,22,0.4);
}

/* Sequence display */
.g-seq-items { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.g-seq-item {
  background: var(--card); border: 1px solid var(--border);
  padding: 10px 14px; min-width: 40px;
  font-family: var(--font-mono); font-size: 14px; color: var(--text);
  text-align: center; transition: all 0.18s;
  animation: g-seq-in 0.22s ease both;
}
@keyframes g-seq-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.g-seq-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em;
}
.g-shape-item {
  background: var(--card); border: 1px solid var(--border); padding: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s;
}
.g-shape-wrap { display: flex; align-items: center; justify-content: center; line-height: 0; }

.g-seq-anomaly {
  border-color: rgba(249,115,22,0.55) !important;
  background: rgba(249,115,22,0.06) !important;
  animation: g-seq-in 0.22s ease both, g-anomaly-pulse 1.6s ease-in-out infinite;
}
@keyframes g-anomaly-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,0); }
  50%      { box-shadow: 0 0 0 4px rgba(249,115,22,0.16); }
}
.g-seq-blank {
  background: transparent; border: 1px dashed var(--border-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center; min-width: 40px;
}
.g-seq-answer-correct { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.g-seq-answer-wrong   { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.06); color: var(--red); }

.g-input-row { display: flex; gap: 8px; align-items: center; }
.g-answer-input {
  flex: 1; background: var(--card); border: 1px solid var(--border-2);
  padding: 13px 16px;
  font-family: var(--font-body); font-size: 15px; color: var(--text);
  outline: none; transition: border-color 0.18s; min-width: 0;
}
.g-answer-input::placeholder { color: var(--muted); }
.g-answer-input:focus { border-color: var(--rose); box-shadow: inset 0 0 18px var(--rose-dim); }

.g-submit-btn {
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  padding: 13px 15px; color: var(--rose); cursor: pointer;
  display: flex; align-items: center; transition: all 0.18s; flex-shrink: 0;
}
.g-submit-btn:active { background: var(--rose-dim2); transform: scale(0.96); }

.g-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-choice-btn {
  background: var(--card); border: 1px solid var(--border);
  padding: 13px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: all 0.18s; text-align: center;
}
.g-choice-btn:active { border-color: var(--rose-border); background: var(--rose-dim); transform: scale(0.97); }
.g-choice-shape { display: flex; align-items: center; justify-content: center; line-height: 0; }
.g-choice-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }

/* Results */
.g-result { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; animation: g-fade-up 0.22s ease both; }
.g-result-correct { background: var(--green-dim); border: 1px solid rgba(57,217,138,0.18); border-left: 2px solid var(--green); }
.g-result-wrong   { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.14); border-left: 2px solid var(--red); }
.g-result-label {
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.g-result-correct .g-result-label { color: var(--green); }
.g-result-wrong   .g-result-label { color: var(--red); }
.g-result-yours { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.g-result-rule  { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* Transition */
.g-transition-screen { justify-content: center; align-items: center; }
.g-transition-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 28px; text-align: center; }
.g-transition-round { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.g-transition-label {
  font-family: var(--font-display); font-weight: 900; font-size: 38px;
  text-transform: uppercase; letter-spacing: -1px; color: var(--text); line-height: 1;
  text-shadow: 0 0 24px rgba(249,115,22,0.2);
}
.g-transition-note { font-family: var(--font-body); font-size: 15px; color: var(--text2); line-height: 1.65; max-width: 260px; }
.g-continue-btn {
  margin-top: 14px; background: var(--card); border: 1px solid var(--border-2);
  padding: 13px 28px;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); cursor: pointer;
  display: flex; align-items: center; gap: 10px; transition: all 0.18s;
}
.g-continue-btn:active { border-color: var(--rose-border); color: var(--rose); }

/* Results screen */
.g-read-body { flex: 1; padding: 18px 16px 44px; display: flex; flex-direction: column; gap: 24px; }
.g-read-header { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.g-read-score {
  font-family: var(--font-display); font-weight: 900; font-size: 72px;
  line-height: 0.9; letter-spacing: -3px; color: var(--rose);
  text-shadow: 0 0 30px rgba(249,115,22,0.35);
}
.g-read-pct { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.5px; color: var(--muted); margin-bottom: 10px; margin-left: 4px; }
.g-read-score-label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.g-round-summary { display: flex; gap: 6px; }
.g-round-pill {
  background: var(--card); border: 1px solid var(--border); padding: 8px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
}
.g-round-pill-label { font-family: var(--font-mono); font-size: 8px; font-weight: 600; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; }
.g-round-pill-score { font-family: var(--font-display); font-weight: 800; font-size: 16px; letter-spacing: -0.5px; color: var(--text); }
.g-obs-section { display: flex; flex-direction: column; gap: 16px; }
.g-obs-label { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.g-obs {
  font-family: var(--font-body); font-size: 15px; line-height: 1.75;
  color: var(--text2); padding-left: 16px;
  border-left: 2px solid var(--rose-border);
  animation: g-fade-up 0.4s ease both;
}
.g-read-footer { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.g-read-stored { font-family: var(--font-mono); font-size: 9px; color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase; }
.g-play-again-btn {
  background: transparent; border: 1px solid var(--rose); padding: 13px 20px;
  font-family: var(--font-display); font-weight: 800; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); cursor: pointer;
  transition: all 0.18s; position: relative; overflow: hidden;
}
.g-play-again-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--rose-dim); opacity: 0; transition: opacity 0.18s;
}
.g-play-again-btn:active::before { opacity: 1; }
.g-done-btn {
  background: transparent; border: 1px solid var(--border); padding: 12px 20px;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); cursor: pointer;
  transition: all 0.18s; letter-spacing: 0.06em;
}
.g-done-btn:active { border-color: var(--border-2); color: var(--text2); }

@keyframes g-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   EXPLORE SCREEN (aria-explore.css — cyberpunk)
   ═══════════════════════════════════════════════ */
#exploreScreen {
  display: none; flex-direction: column;
  min-height: 100vh; max-width: 480px; margin: 0 auto;
  position: relative; z-index: 1;
}
#exploreScreen.active { display: flex !important; }

.explore-location-banner {
  margin: 0 16px 14px; padding: 12px 14px;
  background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  display: flex; align-items: center; gap: 12px;
}
.explore-location-banner-icon { flex-shrink: 0; color: var(--rose); }
.explore-location-banner-text {
  flex: 1; font-family: var(--font-body); font-size: 12px; color: var(--text2); line-height: 1.5;
}
.explore-location-banner-text strong {
  color: var(--rose); display: block;
  font-family: var(--font-mono); font-size: 11px; margin-bottom: 2px; letter-spacing: 0.06em;
}
.explore-location-grant-btn {
  background: transparent; border: 1px solid var(--rose); color: var(--rose);
  padding: 6px 12px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  cursor: pointer; flex-shrink: 0; transition: all 0.18s;
}
.explore-location-grant-btn:active { background: var(--rose-dim); }

.explore-loc-status {
  margin: 0 16px 14px; display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; background: var(--card); border: 1px solid var(--border);
  cursor: pointer; transition: border-color 0.18s;
}
.explore-loc-status:active { border-color: var(--rose-border); }
.explore-loc-dot { width: 7px; height: 7px; background: var(--muted); flex-shrink: 0; }
.explore-loc-dot.active  { background: var(--green); box-shadow: 0 0 6px rgba(57,217,138,0.5); }
.explore-loc-dot.loading { background: var(--amber); animation: loc-pulse 1s ease-in-out infinite; }
@keyframes loc-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.explore-loc-text { flex: 1; font-family: var(--font-mono); font-size: 11px; color: var(--text2); letter-spacing: 0.04em; }
.explore-loc-refresh { font-family: var(--font-mono); font-size: 10px; color: var(--rose); cursor: pointer; }

.explore-manual-wrap { margin: 0 16px 14px; position: relative; }
.explore-manual-input {
  width: 100%; padding: 10px 36px 10px 13px;
  background: var(--card2); border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font-body); font-size: 13px;
  outline: none; transition: border-color 0.18s;
}
.explore-manual-input:focus { border-color: var(--rose); }
.explore-manual-input::placeholder { color: var(--muted); }
.explore-manual-go {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--rose); cursor: pointer; font-size: 16px; padding: 4px;
}

.explore-cats {
  display: flex; gap: 6px; padding: 0 16px 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.explore-cats::-webkit-scrollbar { display: none; }
.explore-cat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 13px; background: var(--card); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.18s; flex-shrink: 0; min-width: 58px;
}
.explore-cat-chip:active, .explore-cat-chip.active {
  background: var(--rose-dim); border-color: var(--rose);
}
.explore-cat-icon { font-size: 18px; }
.explore-cat-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.explore-cat-chip.active .explore-cat-label { color: var(--rose); }

.explore-map-wrap {
  margin: 0 16px 14px; overflow: hidden; border: 1px solid var(--border);
  position: relative; height: 210px; background: var(--card); flex-shrink: 0;
}
#exploreMap { width: 100%; height: 100%; }
.explore-map-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 10px; color: var(--muted);
}
.explore-map-placeholder-icon { font-size: 28px; opacity: 0.4; }
.explore-map-placeholder-text { font-family: var(--font-mono); font-size: 11px; }

/* Aria insight panel */
.explore-aria-insight {
  margin: 0 16px 14px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  display: none; animation: slide-up 0.3s ease;
}
.explore-aria-insight.visible { display: flex; align-items: flex-start; gap: 10px; }
.explore-aria-insight-orb {
  width: 28px; height: 28px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--rose-border);
}
.explore-aria-insight-orb img { width: 160%; height: 160%; object-fit: cover; object-position: center 10%; margin-left: -30%; margin-top: -5%; }
.explore-aria-insight-text {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6; flex: 1;
}

/* Place cards */
.explore-places-list { padding: 0 16px; }
.explore-place-card {
  background: var(--card); border: 1px solid var(--border); padding: 13px 14px;
  margin-bottom: 6px; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: flex-start; gap: 12px; position: relative;
}
.explore-place-card:active { border-color: var(--rose-border); background: var(--rose-dim); }
.explore-place-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 0;
  background: var(--rose); transition: height 0.18s;
}
.explore-place-card:active::before { height: 100%; }
.explore-place-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.explore-place-info { flex: 1; min-width: 0; }
.explore-place-name { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.explore-place-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 5px; }
.explore-place-aria { font-family: var(--font-body); font-size: 12px; color: var(--text2); line-height: 1.5; font-style: italic; }
.explore-place-aria-label { font-family: var(--font-mono); font-size: 9px; color: var(--rose); letter-spacing: 0.1em; margin-bottom: 3px; }
.explore-place-dist {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  flex-shrink: 0; padding-top: 2px;
}

/* Place detail modal */
.explore-detail-img-wrap {
  width: 100%; height: 160px; overflow: hidden; border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.explore-detail-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.explore-detail-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 6px; }
.explore-detail-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 12px; }
.explore-detail-aria {
  padding: 12px 13px; background: var(--rose-dim); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose); margin-bottom: 14px;
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.6;
}
.explore-detail-aria-label { font-family: var(--font-mono); font-size: 9px; color: var(--rose); letter-spacing: 0.1em; margin-bottom: 4px; }
.explore-detail-reviews { margin-bottom: 12px; }
.explore-detail-reviews-label { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.14em; margin-bottom: 8px; }
.explore-detail-review-item {
  padding: 10px 12px; background: var(--card2); border: 1px solid var(--border);
  margin-bottom: 5px;
  font-family: var(--font-body); font-size: 12px; color: var(--text2); line-height: 1.5;
}
.explore-detail-review-meta { font-family: var(--font-mono); font-size: 9px; color: var(--muted); margin-top: 4px; }
.explore-directions-btn {
  width: 100%; padding: 13px; background: transparent; border: 1px solid var(--rose);
  color: var(--rose); font-family: var(--font-display); font-size: 11px;
  font-weight: 700; letter-spacing: 0.12em; cursor: pointer; transition: all 0.18s;
  text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.explore-directions-btn:active { background: var(--rose-dim); box-shadow: var(--rose-glow-sm); }

/* ═══════════════════════════════════════════════
   PRESEND — extra flags/rewrite items
   ═══════════════════════════════════════════════ */
.presend-flag-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.presend-flag-item:last-child { border-bottom: none; padding-bottom: 0; }
.presend-flag-icon { flex-shrink: 0; margin-top: 1px; }
.presend-flag-text { font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.55; flex: 1; }
.presend-flag-severity {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.1em; padding: 1px 6px;
  flex-shrink: 0; margin-top: 2px;
}
.presend-flag-severity.watch { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.2); }
.presend-flag-severity.fix   { background: var(--red-dim); color: var(--red); border: 1px solid rgba(244,63,94,0.2); }
.presend-flag-severity.good  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(57,217,138,0.2); }

.presend-verdict-card.send-it   { background: rgba(57,217,138,0.04); border-color: rgba(57,217,138,0.25); }
.presend-verdict-card.pause     { background: rgba(251,191,36,0.04); border-color: rgba(251,191,36,0.25); }
.presend-verdict-card.dont-send { background: var(--red-dim); border-color: rgba(244,63,94,0.25); }
.presend-verdict-card.send-it .presend-verdict-label   { color: var(--green); }
.presend-verdict-card.pause .presend-verdict-label     { color: var(--amber); }
.presend-verdict-card.dont-send .presend-verdict-label { color: var(--red); }

.presend-rewrite-tab {
  flex: 1; padding: 6px 8px; background: var(--card2); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 10px; color: var(--muted); cursor: pointer;
  transition: all 0.18s; text-align: center; letter-spacing: 0.06em;
}
.presend-rewrite-tab.active { background: var(--rose-dim); border-color: var(--rose); color: var(--rose); }
.presend-rewrite-item {
  background: var(--card2); border: 1px solid var(--border);
  border-left: 2px solid var(--border-2);
  padding: 11px 13px; font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.65;
  margin-bottom: 5px; cursor: pointer; transition: all 0.18s; display: none;
}
.presend-rewrite-item.visible { display: block; }
.presend-rewrite-item:active { border-color: var(--rose-border); border-left-color: var(--rose); background: var(--rose-dim); }
.presend-rewrite-tone { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 5px; }

/* ═══════════════════════════════════════════════
   ARIA EXPRESSION TRANSITIONS
   ═══════════════════════════════════════════════ */
@keyframes aria-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.aria-expr-fade { animation: aria-fade-in 0.35s ease both; }

@keyframes aria-pop-in {
  0%   { opacity: 0; transform: scale(0.84); }
  65%  { opacity: 1; transform: scale(1.05); }
  100% { transform: scale(1); }
}
.aria-expr-pop { animation: aria-pop-in 0.38s cubic-bezier(0.34,1.56,0.64,1) both; }

@keyframes aria-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aria-expr-slide { animation: aria-slide-up 0.32s ease both; }

.chat-msg-aria-orb.has-expression img,
#insightOrbImg { will-change: opacity, transform; }

/* ═══════════════════════════════════════════════
   NUDGE BANNER (aria-nudge-banner.css — minimal)
   ═══════════════════════════════════════════════ */
.aria-nudge-banner {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card); border: 1px solid var(--rose-border);
  border-left: 2px solid var(--rose);
  padding: 10px 14px; max-width: calc(100% - 32px);
  z-index: 500; opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; gap: 10px;
}
.aria-nudge-banner.visible {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.aria-nudge-banner-text {
  font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.5; flex: 1;
}
.aria-nudge-banner-close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--font-mono); font-size: 12px; flex-shrink: 0;
  transition: color 0.18s;
}
.aria-nudge-banner-close:active { color: var(--rose); }

/* ═══════════════════════════════════════════════
   NOTIFICATIONS (aria-notifications.js)
   ═══════════════════════════════════════════════ */
.aria-notif-toast {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  padding: 11px 14px; max-width: calc(100% - 32px); width: 340px;
  z-index: 9000; opacity: 0; pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22,1,0.36,1);
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 14px rgba(249,115,22,0.1);
}
.aria-notif-toast.show {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.aria-notif-icon {
  width: 28px; height: 28px; overflow: hidden; flex-shrink: 0; border: 1px solid var(--rose-border);
}
.aria-notif-icon img { width: 160%; height: 160%; object-fit: cover; object-position: center 10%; margin-left: -30%; margin-top: -5%; }
.aria-notif-body { flex: 1; min-width: 0; }
.aria-notif-title { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--text); margin-bottom: 2px; }
.aria-notif-msg  { font-family: var(--font-body); font-size: 12px; color: var(--text2); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aria-notif-time { font-family: var(--font-mono); font-size: 9px; color: var(--muted); flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   MISC / UTILITY OVERRIDES
   ═══════════════════════════════════════════════ */

/* Contact profile screen extras */
.cp-action-row button { font-family: var(--font-body); }

/* Aria insight banner (home) */
.aria-insight-banner {
  display: none; animation: slide-up 0.4s ease 0.8s both;
}
.aria-insight-banner.visible {
  display: flex; align-items: stretch;
  margin: 0 16px 14px; background: var(--card); border: 1px solid var(--border-2);
  border-left: 2px solid var(--rose);
  overflow: hidden;
}
.aria-insight-photo { width: 80px; min-width: 80px; flex-shrink: 0; overflow: hidden; }
.aria-insight-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.aria-insight-body { padding: 13px; display: flex; flex-direction: column; justify-content: center; }
.aria-insight-text { font-family: var(--font-body); font-size: 13px; color: var(--text2); line-height: 1.65; }

/* Presend select */
#psExtraContextRow select {
  appearance: none; -webkit-appearance: none; cursor: pointer; transition: border-color 0.18s;
}
#psExtraContextRow select:focus { outline: none; border-color: var(--rose) !important; }
#psExtraContextRow select option { background: #111; color: var(--text); }

/* #lgArcPreviewScreen */
#lgArcPreviewScreen { padding-bottom: 100px; overflow-y: auto; }
