/* Learning Companions: look-and-feel layer (design-proposal inspired).
 * Loaded after the inline styles in index.html. Cosmetic only: every element,
 * id, label and behaviour is unchanged. Deliberately NOT restyled: the Practice
 * mode dropdown (.skill-picker-*), the left sidebar buttons, and the position of
 * the voice (left) and Send (right) buttons.
 */
:root {
  --lc-brand: #1d4ed8; --lc-brand-2: #2563eb; --lc-brand-400: #3b82f6; --lc-brand-50: #eff6ff; --lc-brand-100: #dbeafe;
  --lc-ink: #0f172a; --lc-ink-2: #334155; --lc-muted: #64748b; --lc-faint: #94a3b8;
  --lc-surface: #ffffff; --lc-surface-2: #f8fafc; --lc-surface-3: #f1f5f9; --lc-line: #e2e8f0; --lc-line-strong: #cbd5e1;
  --lc-ok: #059669; --lc-voice: #10b981; --lc-voice-2: #059669;
  --lc-sh-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --lc-sh-2: 0 6px 18px -6px rgba(15, 23, 42, .14), 0 2px 4px rgba(15, 23, 42, .04);
  --lc-sh-3: 0 24px 60px -18px rgba(15, 23, 42, .32);
  --lc-ring: 0 0 0 3px rgba(59, 130, 246, .28);
  --lc-glass: rgba(255, 255, 255, .78);
  --lc-ease: cubic-bezier(.2, .8, .2, 1); --lc-spring: cubic-bezier(.34, 1.56, .64, 1);
}
[data-theme="dark"] {
  --lc-ink: #eef2fb; --lc-ink-2: #cbd5e1; --lc-muted: #94a3b8; --lc-faint: #64748b;
  --lc-surface: #111a2e; --lc-surface-2: #0f172a; --lc-surface-3: #1a2540; --lc-line: #22304d; --lc-line-strong: #31415f;
  --lc-brand-50: rgba(59, 130, 246, .14); --lc-brand-100: rgba(59, 130, 246, .24);
  --lc-sh-2: 0 6px 20px -6px rgba(0, 0, 0, .5); --lc-sh-3: 0 26px 64px -16px rgba(0, 0, 0, .7);
  --lc-glass: rgba(17, 26, 46, .78);
}

@keyframes lc-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lc-pop { 0% { opacity: 0; transform: translateY(14px) scale(.97); } 70% { transform: translateY(-2px) scale(1.004); } 100% { opacity: 1; transform: none; } }
@keyframes lc-drift { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
@keyframes lc-invite { 0%, 100% { box-shadow: 0 4px 14px -4px rgba(16, 185, 129, .55), 0 0 0 0 rgba(16, 185, 129, .45); } 50% { box-shadow: 0 6px 18px -4px rgba(16, 185, 129, .6), 0 0 0 9px rgba(16, 185, 129, 0); } }
@keyframes lc-wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes lc-sheen { 0%, 75% { background-position: -150% 0; } 100% { background-position: 250% 0; } }

/* ---------- Page ---------- */
body::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 12% 8%, rgba(37, 99, 235, .09), transparent 70%),
    radial-gradient(35% 30% at 92% 4%, rgba(34, 211, 238, .08), transparent 70%),
    radial-gradient(30% 28% at 60% 100%, rgba(124, 58, 237, .06), transparent 70%);
  animation: lc-drift 28s ease-in-out infinite;
}

/* ---------- Top bar: glass, pill chips; Roche logo stays on its white chip ---------- */
.top-bar { background: var(--lc-glass); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.top-bar-brand .logo-icon { position: relative; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, var(--lc-brand), var(--lc-brand-400)); box-shadow: 0 6px 16px -6px var(--lc-brand); }
.top-bar-brand .logo-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) no-repeat;
  background-size: 220% 100%; animation: lc-sheen 7s ease-in-out infinite;
}
.top-bar-brand h1 { letter-spacing: -.015em; }
.top-help-chip, .mem-status-chip { border-radius: 999px; transition: transform .15s var(--lc-ease), box-shadow .2s, background .2s; }
.top-help-chip:hover, .mem-status-chip:hover { transform: translateY(-1px); box-shadow: var(--lc-sh-2); }
.dark-mode-btn { transition: transform .4s var(--lc-ease), background .2s; }
.dark-mode-btn:hover { transform: rotate(-18deg); }

/* ---------- Chat card ---------- */
.chat-area { border-radius: 22px; box-shadow: var(--lc-sh-2); animation: lc-rise .45s var(--lc-ease) both; }
.chat-top-banner { border-radius: 22px 22px 0 0; letter-spacing: .01em; }

/* Welcome */
.chat-empty-state h3 {
  font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(100deg, var(--lc-ink) 25%, var(--lc-brand-2) 60%, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lc-rise .5s var(--lc-ease) .05s both;
}
.chat-empty-state p { font-size: 15px; line-height: 1.6; color: var(--lc-muted); animation: lc-rise .5s var(--lc-ease) .1s both; }
.chat-empty-state .suggestions { gap: 12px; }
.chat-empty-state .suggestion-chip {
  border: 1px solid var(--lc-line); border-radius: 18px; background: var(--lc-surface); box-shadow: var(--lc-sh-1);
  padding: 16px 16px 14px; transition: transform .22s var(--lc-ease), box-shadow .22s, border-color .22s;
  animation: lc-rise .5s var(--lc-ease) both;
}
.chat-empty-state .suggestion-chip:nth-child(1) { animation-delay: .14s; }
.chat-empty-state .suggestion-chip:nth-child(2) { animation-delay: .2s; }
.chat-empty-state .suggestion-chip:nth-child(3) { animation-delay: .26s; }
.chat-empty-state .suggestion-chip:hover { transform: translateY(-4px); box-shadow: var(--lc-sh-2); border-color: var(--lc-brand-100); }
.chat-empty-state .suggestion-chip .suggestion-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  color: #fff; background: linear-gradient(135deg, var(--lc-brand-2), #22d3ee); box-shadow: 0 6px 14px -6px var(--lc-brand-2);
  font-size: 19px;
}
.chat-empty-state .suggestion-chip:nth-child(2) .suggestion-icon { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 6px 14px -6px #f59e0b; }
.chat-empty-state .suggestion-chip:nth-child(3) .suggestion-icon { background: linear-gradient(135deg, #7c3aed, #ec4899); box-shadow: 0 6px 14px -6px #7c3aed; }
.chat-empty-state .suggestion-chip .suggestion-title { font-size: 14px; font-weight: 700; color: var(--lc-ink); }
.chat-empty-state .suggestion-chip .suggestion-desc { font-size: 12.5px; color: var(--lc-muted); }

/* Messages: your message in blue, the companion's in a soft card */
.msg.msg-new { animation: lc-rise .32s var(--lc-ease) both; }
.msg.user .msg-bubble { background: linear-gradient(135deg, var(--lc-brand-2), var(--lc-brand)); color: #fff; border-radius: 18px 18px 6px 18px; box-shadow: 0 6px 16px -8px var(--lc-brand-2); }
.msg.user .msg-bubble a { color: #fff; }
/* Voice: the learner's spoken words are not shown (they are still saved for summaries and memory) */
.msg.user.spoken { display: none; }
.msg.agent .msg-bubble {
  width: auto; max-width: 100%; padding: 14px 18px; border: 1px solid var(--lc-line); border-bottom: 1px solid var(--lc-line);
  border-radius: 6px 18px 18px 18px; background: var(--lc-surface-2); box-shadow: var(--lc-sh-1);
}
.msg-role-icon { box-shadow: var(--lc-sh-1); }
.msg-label { font-weight: 650; }
.msg.system .msg-bubble { border-radius: 14px; }

/* Message bar: same layout (voice left, Send right), softer shapes */
.chat-input-bar { gap: 10px; }
.chat-text-input-wrap { border-radius: 16px; transition: box-shadow .2s, border-color .2s; }
.chat-text-input-wrap:focus-within { box-shadow: var(--lc-ring); }
#text-input { border-radius: 16px; }
.send-btn { border-radius: 999px; transition: transform .15s var(--lc-ease), box-shadow .2s, background .2s; }
.send-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px var(--lc-brand-2); }
.send-btn:disabled { opacity: .55; transform: none; box-shadow: none; }
.send-btn .material-icons { transition: transform .2s var(--lc-ease); }
.send-btn:hover:not(:disabled) .material-icons { transform: translateX(2px) rotate(-12deg); }

/* Voice button: pill, gentle "start here" glow while idle, live waves while talking */
.mic-btn { border-radius: 999px; padding: 0 20px; position: relative; }
.mic-btn:not(.recording):not(.connecting) { animation: lc-invite 2.6s ease-in-out infinite; }
.mic-btn:not(.recording):not(.connecting) .material-icons { transition: transform .25s var(--lc-spring); }
.mic-btn:not(.recording):not(.connecting):hover .material-icons { transform: scale(1.15) rotate(-6deg); }
.mic-btn.recording { border-radius: 999px; }
.mic-btn.recording .material-icons { animation: lc-wave .9s ease-in-out infinite; transform-origin: 50% 70%; }
.mic-mute-btn { border-radius: 999px; transition: transform .15s var(--lc-ease); }
.mic-mute-btn:hover { transform: translateY(-1px); }

/* ---------- Pop-ups: Profile, How to Use, SkillUP, My Situation, Dashboard, tools ---------- */
.modal-overlay { background: rgba(8, 12, 28, .45); backdrop-filter: blur(6px); }
.modal-box { border-radius: 24px; border: 1px solid var(--lc-line); box-shadow: var(--lc-sh-3); animation: lc-pop .42s var(--lc-ease) both; }
.modal-box.modal-skillup, .modal-box.modal-skill-objective { border-radius: 24px; }
.modal-hdr { padding: 22px 24px 4px; }
.modal-hdr h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.modal-hdr .icon-btn, .modal-hdr button[onclick*="close"], .modal-hdr button[aria-label*="Close"], .modal-hdr button[title*="Close"] {
  border-radius: 999px; transition: background .2s, transform .2s var(--lc-ease);
}
.modal-hdr .icon-btn:hover, .modal-hdr button[aria-label*="Close"]:hover, .modal-hdr button[title*="Close"]:hover { transform: rotate(90deg); }
.modal-body input:not([type="checkbox"]):not([type="radio"]), .modal-body select, .modal-body textarea {
  border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.modal-body input:not([type="checkbox"]):not([type="radio"]):focus, .modal-body select:focus, .modal-body textarea:focus { outline: none; box-shadow: var(--lc-ring); border-color: var(--lc-brand-400); }
.modal-body button { transition: transform .15s var(--lc-ease), box-shadow .2s, background .2s, border-color .2s; }
.modal-body button:hover:not(:disabled) { transform: translateY(-1px); }
.modal-body button:active:not(:disabled) { transform: scale(.97); }

/* How to Use */
.guide-view-tabs { gap: 4px; padding: 4px; border-radius: 12px; background: var(--lc-surface-3); border: 0; }
.guide-view-tab { border-radius: 9px !important; border-bottom: 0 !important; transition: background .2s, color .2s, box-shadow .2s; }
.guide-view-tab.active { background: var(--lc-surface) !important; box-shadow: var(--lc-sh-1); color: var(--lc-brand-2) !important; }
.guide-section { border-radius: 16px; transition: transform .2s var(--lc-ease), box-shadow .2s; animation: lc-rise .4s var(--lc-ease) both; }
.guide-section:hover { transform: translateY(-2px); box-shadow: var(--lc-sh-2); }
.guide-section-title { letter-spacing: .01em; }
.guide-tour-launch { border-radius: 16px; }
.guide-tour-launch-btn { border-radius: 999px; }

/* Dashboard */
.dash-tabs { border: 0; border-radius: 12px; background: var(--lc-surface-3); }
.dash-tab { border-radius: 9px; transition: background .2s, color .2s; }
.dash-ring-card { background: var(--lc-surface); border: 1px solid var(--lc-line); border-radius: 18px; box-shadow: var(--lc-sh-1); transition: transform .22s var(--lc-ease), box-shadow .22s; animation: lc-rise .45s var(--lc-ease) both; }
.dash-ring-card:nth-child(2) { animation-delay: .07s; }
.dash-ring-card:hover { transform: translateY(-3px); box-shadow: var(--lc-sh-2); }
.dash-ring-label { font-weight: 800; letter-spacing: -.02em; }
.dash-ring-fill { transition: stroke-dashoffset 1.1s var(--lc-ease); }
.dash-comp-card { border-radius: 18px; box-shadow: var(--lc-sh-1); transition: transform .22s var(--lc-ease), box-shadow .22s; animation: lc-rise .45s var(--lc-ease) both; }
.dash-comp-card:nth-child(2) { animation-delay: .06s; }
.dash-comp-card:nth-child(3) { animation-delay: .12s; }
.dash-comp-card:hover { transform: translateY(-3px); box-shadow: var(--lc-sh-2); }
.dash-comp-avatar { box-shadow: 0 0 0 3px var(--lc-surface), 0 0 0 5px var(--lc-brand-100); }
.dash-activity-item { border-radius: 14px; transition: transform .2s var(--lc-ease), background .2s, box-shadow .2s; }
.dash-activity-clickable:hover { transform: translateX(4px); box-shadow: var(--lc-sh-1); }
.dash-activity-dot { box-shadow: 0 0 0 4px var(--lc-brand-50); }
.dash-section-title { letter-spacing: .08em; }

/* My Situation */
.modal-box.modal-situation { border-radius: 24px; }
.modal-situation details, .modal-situation .situation-example, .modal-situation [class*="example"] { border-radius: 14px; }

/* Tools: Breathe, Compass and the other visual tools, Journal */
.visual-tool-modal, #breathe-modal-box, #notes-modal-box, #mem-profile-modal-overlay > *, #summary-modal-overlay > * { border-radius: 24px; }
#breathe-modal-box { overflow: hidden; box-shadow: var(--lc-sh-3); animation: lc-pop .45s var(--lc-ease) both; }
#modal-breath-start-btn { border-radius: 999px; transition: transform .15s var(--lc-ease), box-shadow .2s; }
#modal-breath-start-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px var(--lc-brand-2); }
.visual-tool-modal-body textarea, .visual-tool-modal-body input { border-radius: 12px; }
.visual-tool-modal-body textarea:focus, .visual-tool-modal-body input:focus { outline: none; box-shadow: var(--lc-ring); }
#notes-side-panel { box-shadow: var(--lc-sh-2); }
.notes-side-hdr { backdrop-filter: blur(10px); }
.notes-side-title { letter-spacing: -.01em; }
#notes-side-panel textarea { border-radius: 12px; }
#notes-side-panel textarea:focus { outline: none; box-shadow: var(--lc-ring); }
#notes-side-panel button { transition: transform .15s var(--lc-ease), background .2s, box-shadow .2s; }
#notes-side-panel button:active { transform: scale(.96); }
.share-modal-box { border-radius: 22px; box-shadow: var(--lc-sh-3); animation: lc-pop .4s var(--lc-ease) both; }

/* ---------- Pop-ups, stronger pass ----------
 * The inline sheet sets small radii and flat headers with ids and dark-mode
 * selectors, so these rules carry !important where they must win. */
body .modal-box,
body #get-started-modal .modal-wide,
body .profile-modal-box,
body .modal-box.modal-skillup,
body .modal-box.modal-skill-objective,
body .modal-box.modal-situation-main { border-radius: 24px !important; background: var(--lc-surface) !important; border: 1px solid var(--lc-line) !important; }
body .modal-hdr,
body #get-started-modal .modal-hdr,
body .profile-modal-box .modal-hdr,
body .modal-dashboard .modal-hdr,
body .modal-situation-main > .modal-hdr {
  background: linear-gradient(180deg, var(--lc-brand-50), var(--lc-surface) 92%) !important;
  border-bottom: 1px solid var(--lc-line) !important;
  padding-bottom: 16px !important;
}
body .modal-hdr h2 { display: flex; align-items: center; gap: 10px; color: var(--lc-ink) !important; }
body .modal-hdr h2 > .material-icons:first-child {
  width: 38px; height: 38px; margin-right: 0 !important; border-radius: 12px; flex: 0 0 auto;
  display: inline-grid; place-items: center; font-size: 21px !important;
  background: var(--lc-surface); border: 1px solid var(--lc-line); box-shadow: var(--lc-sh-1);
  animation: lc-pop .5s var(--lc-spring) .08s both;
}
/* Pill tabs for Profile, How to Use and Dashboard */
body .profile-tabs, body .guide-view-tabs, body .dash-tabs {
  gap: 4px !important; padding: 4px !important; margin: 12px 22px 14px !important;
  background: var(--lc-surface-3) !important; border: 1px solid var(--lc-line) !important; border-radius: 14px !important;
}
body .dash-tabs { margin: 0 0 20px !important; }
body .profile-tab, body .guide-view-tab, body .dash-tab {
  border: 0 !important; border-radius: 10px !important; color: var(--lc-muted) !important;
  transition: background .2s, color .2s, box-shadow .2s, transform .15s var(--lc-ease);
}
body .profile-tab:hover, body .guide-view-tab:hover, body .dash-tab:hover { color: var(--lc-ink) !important; }
body .profile-tab.active, body .guide-view-tab.active, body .dash-tab.active {
  background: var(--lc-surface) !important; color: var(--lc-brand-2) !important; box-shadow: var(--lc-sh-2) !important;
}
/* Cards inside pop-ups */
body .guide-section {
  background: var(--lc-surface) !important; border: 1px solid var(--lc-line) !important;
  border-left: 4px solid var(--lc-brand-400) !important; border-radius: 16px !important; box-shadow: var(--lc-sh-1);
}
body .dash-ring-card {
  background: linear-gradient(160deg, var(--lc-surface), var(--lc-brand-50)) !important;
  border: 1px solid var(--lc-line) !important; border-radius: 20px !important;
}
body .dash-comp-card { border-radius: 20px !important; border: 1px solid var(--lc-line) !important; }
body .dash-activity-item { border-radius: 14px !important; }
body .modal-body .retention-option, body .modal-body .profile-field, body .modal-body .privacy-card { border-radius: 14px !important; }
body .modal-situation-main .situation-footer { background: var(--lc-surface-2) !important; border-top-color: var(--lc-line) !important; }
body .modal-body .btn-primary, body .modal-body button.primary, body .modal-body .situation-save-btn, body .situation-footer button {
  border-radius: 999px !important;
}

/* Dark mode: the inline sheet flattens both bubbles, keep the new look */
[data-theme="dark"] .msg.user .msg-bubble { background: linear-gradient(135deg, var(--lc-brand-2), var(--lc-brand)); color: #fff; }
[data-theme="dark"] .msg.agent .msg-bubble { background: var(--lc-surface); border: 1px solid var(--lc-line); }
[data-theme="dark"] .dash-reset-text strong { color: #c7d2fe; }
/* Visual tools (Compass and the others) */
body .visual-tool-dialog { border-radius: 24px !important; border-color: var(--lc-line) !important; background: var(--lc-surface) !important; box-shadow: var(--lc-sh-3) !important; animation: lc-pop .42s var(--lc-ease) both; }
body .visual-tool-header { background: linear-gradient(180deg, var(--lc-brand-50), var(--lc-surface) 92%); border-bottom-color: var(--lc-line) !important; }
body .visual-tool-header button { border-radius: 999px; transition: background .2s, transform .2s var(--lc-ease); }
body .visual-tool-header button:hover { background: var(--lc-surface-3); transform: rotate(90deg); }

/* ---------- Closer to the design proposal ----------
 * Proposal sizes and spacing: bigger type, roomier cards, eyebrow headers,
 * line tabs, ring cards with the label beside the ring. */
body .chat-top-banner { min-height: 36px; background: linear-gradient(90deg, transparent, var(--lc-brand-50), transparent) !important; border-bottom: 1px solid var(--lc-line) !important; }
body .chat-top-banner p { font-size: 13px !important; font-style: italic; color: var(--lc-muted) !important; }
.top-help-chip, .mem-status-chip { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 999px; }

/* Welcome */
.chat-empty-state h3 { font-size: clamp(34px, 3.4vw, 46px); }
body .chat-empty-state p { max-width: 520px; font-size: 16.5px; line-height: 1.6; }
body .chat-empty-state { max-width: 760px !important; width: 100%; }
body .chat-empty-state .suggestions { max-width: 760px; gap: 14px; margin-top: 10px; }
body .chat-empty-state .suggestion-chip { padding: 18px; border-radius: 20px; gap: 6px; position: relative; overflow: hidden; }
body .chat-empty-state .suggestion-chip::before {
  display: block; content: ""; position: absolute; right: -40px; bottom: -60px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(closest-side, #22d3ee, transparent); opacity: 0; transition: opacity .48s; pointer-events: none;
}
body .chat-empty-state .suggestion-chip:hover::before { opacity: .18; }
body .chat-empty-state .suggestion-chip .suggestion-icon { width: 38px; height: 38px; border-radius: 12px; margin-bottom: 8px; }
body .chat-empty-state .suggestion-chip .suggestion-title { font-size: 14.5px; line-height: 1.35; }
body .chat-empty-state .suggestion-chip .suggestion-desc { font-size: 13px; line-height: 1.45; }

/* Chat */
body .msg .msg-bubble { font-size: 15px; line-height: 1.6; }
body .msg.agent .msg-bubble { padding: 12px 16px; background: var(--lc-surface-2); }
body .msg.user .msg-bubble { padding: 12px 16px; }
body #text-input { font-size: 15px; }
body .chat-input-bar { max-width: 800px; }
/* Keep the ongoing-conversation composer centred inside its own chat panel. */
body .chat-area:not(.empty-state) .chat-input-bar {
  width: 100%; box-sizing: border-box; margin-inline: auto;
}
/* Keep the voice exit labelled on phones without squeezing the text field. */
@media (max-width: 768px) {
  body .mobile-tools-fab { bottom: calc(196px + env(safe-area-inset-bottom)); }
  body .chat-input-bar:has(.mic-btn.recording) { flex-wrap: wrap; }
  body .chat-input-bar:has(.mic-btn.recording) .chat-input-row-talk { width: 100%; }
  body .chat-input-bar:has(.mic-btn.recording) .chat-input-row-type { flex-basis: 100%; }
  body .chat-input-bar .mic-btn.recording { width: auto; min-height: 44px; padding-inline: 14px; }
  body .chat-input-bar .mic-btn.recording .mic-label { display: inline; white-space: nowrap; }
}

/* Pop-up headers: eyebrow + title, plain surface, round close button */
body .modal-hdr, body #get-started-modal .modal-hdr, body .profile-modal-box .modal-hdr,
body .modal-dashboard .modal-hdr, body .modal-situation-main > .modal-hdr {
  background: var(--lc-surface) !important; padding: 22px 24px 14px !important; align-items: flex-start;
}
.lc-hdr-text { min-width: 0; animation: lc-rise .4s var(--lc-ease) both; }
.lc-eyebrow { margin-bottom: 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--lc-brand-400); }
body .lc-hdr-text h2 { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
body .modal-hdr > .icon-btn { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-muted); }
body .modal-hdr > .icon-btn:hover { background: var(--lc-surface-3); color: var(--lc-ink); }

/* Line tabs, as in the proposal */
body .profile-tabs, body .guide-view-tabs, body .dash-tabs {
  display: flex !important; gap: 4px !important; padding: 0 24px !important; margin: 0 !important;
  background: var(--lc-surface) !important; border: 0 !important; border-bottom: 1px solid var(--lc-line) !important; border-radius: 0 !important;
}
body .dash-tabs { padding: 0 !important; margin: -6px 0 20px !important; }
body .profile-tab, body .guide-view-tab, body .dash-tab {
  flex: 0 0 auto; min-height: 44px; padding: 0 14px !important; margin-bottom: -1px;
  border-radius: 0 !important; border-bottom: 2px solid transparent !important; background: transparent !important;
  box-shadow: none !important; font-size: 14px !important; font-weight: 600; color: var(--lc-muted) !important;
}
body .profile-tab.active, body .guide-view-tab.active, body .dash-tab.active {
  background: transparent !important; box-shadow: none !important; color: var(--lc-ink) !important; border-bottom-color: var(--lc-brand) !important;
}
body .dash-tab .material-icons { display: none; }
/* Sticky tabs sit right under the taller eyebrow header */
body .profile-tabs, body .guide-view-tabs, body .dash-tabs { top: 81px !important; }

/* Dashboard ring cards: ring on the left, label on the right */
body .dash-usage-row { gap: 14px; }
body .dash-ring-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px !important; text-align: left;
  background: var(--lc-surface) !important;
}
body .dash-ring-wrap { width: 72px; height: 72px; margin: 0; flex: 0 0 auto; }
body .dash-ring-wrap svg { width: 72px; height: 72px; }
body .dash-ring-label { font-size: 17px; }
body .dash-ring-title { font-size: 15px; font-weight: 700; color: var(--lc-ink); margin: 0; }
body .dash-reset-banner { border-radius: 14px; }
body .dash-section-title { font-size: 12px; color: var(--lc-muted); }

/* Cards inside pop-ups: softer, proposal style */
body .guide-section { border-left-width: 1px !important; border-left-color: var(--lc-line) !important; padding: 16px 18px; }
body .guide-section-title { font-size: 14px; }
body .guide-section ul li { font-size: 13.5px; }

/* ---------- Inside the pop-ups ----------
 * ":root body" outranks the inline light and dark rules without !important. */

/* My Situation */
:root body .situation-intro {
  padding: 14px 16px; border: 1px solid var(--lc-brand-100); border-left: 1px solid var(--lc-brand-100);
  border-radius: 16px; background: linear-gradient(135deg, var(--lc-brand-50), var(--lc-surface)); color: var(--lc-ink-2);
  font-size: 14px; line-height: 1.6; animation: lc-rise .4s var(--lc-ease) both;
}
:root body .situation-toggle-row {
  padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--lc-line); border-radius: 16px;
  background: var(--lc-surface); color: var(--lc-ink); font-size: 14px; box-shadow: var(--lc-sh-1);
  transition: border-color .2s, box-shadow .2s; animation: lc-rise .4s var(--lc-ease) .05s both;
}
:root body .situation-toggle-row:hover { border-color: var(--lc-brand-100); box-shadow: var(--lc-sh-2); }
:root body .situation-switch { width: 44px; height: 24px; }
:root body .situation-switch .slider::before { width: 20px; height: 20px; transition: transform .3s var(--lc-spring); }
:root body .situation-switch input:checked + .slider { background: linear-gradient(135deg, var(--lc-brand-400), var(--lc-brand)); }
:root body .situation-switch input:checked + .slider::before { transform: translateX(20px); }
:root body #situation-title, :root body #situation-textarea {
  border: 1px solid var(--lc-line-strong); border-radius: 14px; background: var(--lc-surface); color: var(--lc-ink); font-size: 14.5px;
}
:root body #situation-title { padding: 12px 16px; }
:root body #situation-textarea { padding: 14px 16px 32px; line-height: 1.6; }
:root body #situation-title:focus, :root body #situation-textarea:focus { border-color: var(--lc-brand-400); box-shadow: var(--lc-ring); }
:root body .situation-section-heading { margin-top: 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--lc-muted); }
:root body .practice-library-group {
  border: 1px solid var(--lc-line); border-radius: 16px; background: var(--lc-surface);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--lc-ease); animation: lc-rise .4s var(--lc-ease) both;
}
:root body .practice-library-group + .practice-library-group { margin-top: 8px; }
:root body .practice-library-group:nth-child(2) { animation-delay: .05s; }
:root body .practice-library-group:nth-child(3) { animation-delay: .1s; }
:root body .practice-library-group:nth-child(4) { animation-delay: .15s; }
:root body .practice-library-group:hover { border-color: var(--lc-brand-100); box-shadow: var(--lc-sh-2); }
:root body .practice-library-group[open] { border-color: var(--lc-brand-100); box-shadow: var(--lc-sh-2); }
:root body .practice-library-group > summary { grid-template-columns: 38px minmax(0, 1fr) 22px; gap: 12px; padding: 12px 14px; }
:root body .practice-library-group > summary:hover { background: transparent; }
:root body .practice-library-icon { width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #2563eb, #22d3ee); font-size: 19px !important; }
:root body .practice-library-group:nth-child(2) .practice-library-icon { background: linear-gradient(135deg, #7c3aed, #ec4899); }
:root body .practice-library-group:nth-child(3) .practice-library-icon { background: linear-gradient(135deg, #f97316, #f43f5e); }
:root body .practice-library-group:nth-child(4) .practice-library-icon { background: linear-gradient(135deg, #059669, #84cc16); }
:root body .practice-library-summary strong { font-size: 14px; color: var(--lc-ink); }
:root body .practice-library-summary small { font-size: 12.5px; color: var(--lc-muted); }
:root body .practice-library-items { border-top-color: var(--lc-line); gap: 10px; padding: 12px 14px 14px; }
:root body .situation-example-card {
  padding: 14px; border-radius: 14px; border: 1px solid var(--lc-line); background: var(--lc-surface-2);
  transition: transform .2s var(--lc-ease), box-shadow .2s, border-color .2s;
}
:root body .situation-example-card:hover { transform: translateY(-2px); box-shadow: var(--lc-sh-2); border-color: var(--lc-brand-100); }
:root body .situation-example-title { font-size: 13.5px; color: var(--lc-ink); }
:root body .situation-example-title .material-icons { color: var(--lc-brand-400); font-size: 16px; }
/* Skill examples: match the rounded, coloured Open Practice icon badges. */
:root body #situation-examples:not(.practice-library) .situation-example-title {
  gap: 10px; min-height: 38px; line-height: 1.4;
}
:root body #situation-examples:not(.practice-library) .situation-example-title .material-icons {
  display: inline-grid; place-items: center; flex: 0 0 38px;
  width: 38px; height: 38px; border-radius: 12px; font-size: 20px;
  color: #fff; background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 6px 14px -6px #2563eb;
}
:root body #situation-examples:not(.practice-library) .situation-example-card:nth-child(2) .situation-example-title .material-icons {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  box-shadow: 0 6px 14px -6px #7c3aed;
}
:root body .situation-example-text { font-size: 13px; line-height: 1.5; color: var(--lc-muted); }
:root body .situation-example-btn { border-radius: 999px; padding: 7px 14px; border-color: var(--lc-brand-100); background: var(--lc-brand-50); color: var(--lc-brand-2); }
:root body .situation-example-btn:hover { background: var(--lc-brand-2); border-color: var(--lc-brand-2); color: #fff; }
:root body .modal-situation-main .situation-footer { padding: 14px 24px; }
:root body .situation-footer button { border-radius: 999px; padding-left: 18px; padding-right: 18px; }

/* SkillUP */
:root body .skillup-option {
  padding: 14px 16px; border: 1px solid var(--lc-line); border-radius: 16px; background: var(--lc-surface);
  transition: transform .2s var(--lc-ease), box-shadow .2s, border-color .2s; animation: lc-rise .4s var(--lc-ease) both;
}
:root body .skillup-option:nth-child(2) { animation-delay: .06s; }
:root body .skillup-option:nth-child(3) { animation-delay: .12s; }
:root body .skillup-option:hover { transform: translateY(-2px); border-color: var(--lc-brand-100); box-shadow: var(--lc-sh-2); background: var(--lc-surface); }
:root body .skillup-option > .material-icons:first-child {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto;
  color: #fff; background: linear-gradient(135deg, #2563eb, #22d3ee);
}
:root body .skillup-option:nth-child(2) > .material-icons:first-child { background: linear-gradient(135deg, #7c3aed, #ec4899); }
:root body .skillup-option:nth-child(3) > .material-icons:first-child { background: linear-gradient(135deg, #059669, #84cc16); }
:root body .skillup-option-copy strong { font-size: 14.5px; color: var(--lc-ink); }
:root body .skillup-option-copy small { font-size: 13px; color: var(--lc-muted); }
:root body .skillup-option .skillup-open { transition: transform .2s var(--lc-ease), color .2s; }
:root body .skillup-option:hover .skillup-open { transform: translate(2px, -2px); color: var(--lc-brand-2); }
:root body .skillup-intro { font-size: 14.5px; line-height: 1.6; color: var(--lc-ink-2); }

/* Profile and privacy */
:root body .retention-option { border-radius: 16px; transition: transform .2s var(--lc-ease), box-shadow .2s, border-color .2s; }
:root body .retention-option:hover { transform: translateY(-2px); box-shadow: var(--lc-sh-2); }
:root body .profile-modal-box .modal-body input:not([type="checkbox"]):not([type="radio"]),
:root body .profile-modal-box .modal-body select { min-height: 44px; border-radius: 14px; font-size: 14.5px; }
:root body .profile-modal-box .modal-body button { border-radius: 999px; min-height: 44px; }

/* ---------- Tools: Energy Check-in, Conversation Compass, Feedback Readiness, Clarity Canvas ----------
 * Proposal look: eyebrow intro, companion accent, styled sliders, soft cards
 * and a pill "Continue in chat". Same controls, values and handlers. */
.energy-tool, .compass-tool { --tool-acc: #2563eb; --tool-acc-2: #22d3ee; }
.feedback-readiness-tool, .feedback-clarity-tool { --tool-acc: #f97316; --tool-acc-2: #f43f5e; }
:root body .visual-tool-header { min-height: 64px; padding: 0 22px; }
:root body .visual-tool-header h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; color: var(--lc-ink); }
:root body .visual-tool-header button { width: 38px; height: 38px; border: 1px solid var(--lc-line); background: var(--lc-surface); }
:root body .visual-tool-modal-body > div { padding: 18px 22px 20px; }
:root body .visual-tool-intro { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--lc-line); animation: lc-rise .35s var(--lc-ease) both; }
:root body .visual-tool-intro > span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--tool-acc); }
:root body .visual-tool-intro p { margin-top: 4px; font-size: 14px; color: var(--lc-muted); }
/* Sliders */
:root body .visual-tool-modal-body input[type="range"], :root body #mobile-tool-panel-body input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 8px; border-radius: 999px; accent-color: var(--tool-acc);
  background: linear-gradient(90deg, var(--tool-acc), var(--tool-acc-2)); opacity: .9; cursor: pointer;
}
:root body .visual-tool-modal-body input[type="range"]::-webkit-slider-thumb, :root body #mobile-tool-panel-body input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--tool-acc);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .35); transition: transform .15s var(--lc-spring);
}
:root body .visual-tool-modal-body input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
:root body .visual-tool-modal-body input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--tool-acc); }
:root body .energy-controls label, :root body .readiness-fields label { font-size: 13.5px; font-weight: 650; color: var(--lc-ink); }
:root body .energy-controls output, :root body .readiness-fields output { color: var(--tool-acc); font-weight: 800; }
/* Text fields */
:root body .visual-tool-modal-body textarea, :root body .visual-tool-modal-body input[type="text"],
:root body #mobile-tool-panel-body textarea { border: 1px solid var(--lc-line-strong); border-radius: 14px; background: var(--lc-surface); color: var(--lc-ink); font-size: 14px; padding: 10px 12px; }
:root body .visual-tool-modal-body textarea:focus, :root body #mobile-tool-panel-body textarea:focus {
  border-color: var(--tool-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tool-acc) 22%, transparent);
}
/* Guidance and readiness cards */
:root body .energy-guidance, :root body .readiness-guidance {
  border: 1px solid color-mix(in srgb, var(--tool-acc) 28%, var(--lc-line)); border-left-width: 1px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tool-acc) 10%, var(--lc-surface)), var(--lc-surface)); padding: 14px 16px;
  animation: lc-rise .4s var(--lc-ease) .08s both;
}
:root body .energy-guidance strong, :root body .readiness-guidance strong { color: var(--lc-ink); font-size: 14.5px; }
:root body .energy-guidance p, :root body .readiness-guidance p { color: var(--lc-muted); font-size: 13px; }
:root body .readiness-meter { filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--tool-acc) 22%, transparent)); animation: lc-pop .5s var(--lc-spring) both; }
/* Energy map */
:root body .energy-map {
  border: 1px solid var(--lc-line); border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(34, 211, 238, .06) 50%, rgba(16, 185, 129, .1));
}
:root body .energy-map-line { background: var(--lc-line-strong); opacity: .7; }
:root body .energy-map-dot {
  width: 18px; height: 18px; background: linear-gradient(135deg, var(--tool-acc), var(--tool-acc-2)); border: 3px solid #fff;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tool-acc) 45%, transparent); animation: lc-dot 2.4s ease-in-out infinite;
  transition: left .35s var(--lc-ease), top .35s var(--lc-ease);
}
@keyframes lc-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .4); } 50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); } }
:root body .energy-axis-label { font-size: 11px; font-weight: 600; color: var(--lc-muted); }
/* Compass */
:root body .compass-centre {
  background: linear-gradient(135deg, var(--tool-acc), var(--tool-acc-2)); color: #fff; border: 0;
  box-shadow: 0 10px 22px -10px var(--tool-acc); animation: lc-pop .5s var(--lc-spring) both;
}
:root body .compass-line { background: color-mix(in srgb, var(--tool-acc) 35%, var(--lc-line)); }
:root body .compass-direction { font-weight: 700; color: var(--lc-ink-2); }
:root body .compass-fields label, :root body .clarity-fields label { font-size: 13px; font-weight: 650; color: var(--lc-ink); }
:root body .compass-fields .material-icons, :root body .clarity-fields .material-icons { color: var(--tool-acc); }
/* Clarity path: numbered steps on an accent line */
:root body .clarity-path { padding: 6px 0 12px; }
:root body .clarity-path::before { height: 3px; border-radius: 999px; background: linear-gradient(90deg, var(--tool-acc), var(--tool-acc-2)); opacity: .45; }
:root body .clarity-path span {
  border: 0; color: #fff; background: linear-gradient(135deg, var(--tool-acc), var(--tool-acc-2));
  box-shadow: 0 0 0 4px var(--lc-surface), 0 8px 16px -8px var(--tool-acc); animation: lc-pop .45s var(--lc-spring) both;
}
:root body .clarity-path > div:nth-child(2) span { animation-delay: .06s; }
:root body .clarity-path > div:nth-child(3) span { animation-delay: .12s; }
:root body .clarity-path > div:nth-child(4) span { animation-delay: .18s; }
:root body .clarity-path strong { font-size: 12px; color: var(--lc-ink); }
/* Hand-off row */
:root body .visual-tool-handoff { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--lc-line); }
:root body .visual-tool-handoff > span { font-size: 13px; color: var(--lc-muted); }
:root body .tool-conversation-btn {
  min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; color: #fff; font-weight: 650;
  background: linear-gradient(135deg, var(--tool-acc), var(--tool-acc-2)); box-shadow: 0 10px 22px -12px var(--tool-acc);
  transition: transform .15s var(--lc-ease), box-shadow .2s;
}
:root body .tool-conversation-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px var(--tool-acc); }
:root body .tool-conversation-btn .material-icons { transition: transform .2s var(--lc-ease); }
:root body .tool-conversation-btn:hover .material-icons { transform: translateX(3px); }

/* ---------- Learning Journal ---------- */
:root body .notes-side-hdr { padding: 14px 16px; border-bottom: 1px solid var(--lc-line); }
:root body .notes-side-title { font-size: 16px; font-weight: 750; color: var(--lc-ink); }
:root body .journal-filter-row { gap: 6px; padding: 12px 14px 4px; }
:root body .journal-filter-label, :root body .journal-prompt-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lc-faint); }
:root body .journal-filter-btn, :root body .journal-type-btn {
  min-height: 32px; padding: 0 12px; border: 1px solid var(--lc-line); border-radius: 999px; background: var(--lc-surface);
  color: var(--lc-ink-2); font-size: 12.5px; font-weight: 600; transition: background .2s, color .2s, border-color .2s, transform .15s var(--lc-ease);
}
:root body .journal-filter-btn:hover, :root body .journal-type-btn:hover { border-color: var(--lc-line-strong); transform: translateY(-1px); }
:root body .journal-type-btn { white-space: nowrap; padding: 0 10px; font-size: 12px; gap: 4px; }
:root body .journal-type-row { flex-wrap: wrap; gap: 6px; }
:root body .journal-filter-btn.active, :root body .journal-type-btn.active { background: var(--lc-ink); border-color: var(--lc-ink); color: var(--lc-surface); }
:root body .journal-prompt-chip {
  min-height: 28px; padding: 0 11px; border: 1px dashed var(--lc-line-strong); border-radius: 999px; background: transparent;
  color: var(--lc-muted); font-size: 12px; transition: border-color .2s, color .2s, background .2s;
}
:root body .journal-prompt-chip:hover { border-style: solid; border-color: var(--lc-brand-400); color: var(--lc-brand-2); background: var(--lc-brand-50); }
:root body .journal-input-row textarea, :root body #journal-input {
  border: 1px solid var(--lc-line-strong); border-radius: 16px; background: var(--lc-surface); color: var(--lc-ink); font-size: 14px; padding: 12px 14px;
}
:root body .journal-input-row textarea:focus, :root body #journal-input:focus { outline: none; border-color: var(--lc-brand-400); box-shadow: var(--lc-ring); }
:root body .journal-add-btn { min-height: 38px; padding: 0 16px; border-radius: 999px; background: linear-gradient(135deg, var(--lc-brand-2), var(--lc-brand)); color: #fff; border: 0; font-weight: 650; }
:root body .journal-date-header { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lc-faint); }
:root body .journal-date-badge { border-radius: 999px; background: var(--lc-surface-3); color: var(--lc-muted); font-weight: 700; }
:root body .journal-date-items { display: grid; gap: 8px; }
:root body .journal-entry {
  align-items: flex-start; gap: 10px; padding: 12px 12px; border: 1px solid var(--lc-line); border-radius: 14px; background: var(--lc-surface-2);
  transition: transform .2s var(--lc-ease), box-shadow .2s, border-color .2s; animation: lc-rise .35s var(--lc-ease) both;
}
:root body .journal-entry:hover { transform: translateY(-1px); box-shadow: var(--lc-sh-2); border-color: var(--lc-brand-100); }
:root body .journal-entry-text { font-size: 13.5px; line-height: 1.5; color: var(--lc-ink); }
:root body .journal-entry-meta { font-size: 11.5px; color: var(--lc-faint); }
:root body .journal-type-badge {
  width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px;
  color: var(--lc-brand-2); background: var(--lc-brand-50);
}
:root body .journal-entry-actions button { border-radius: 999px; transition: background .2s, transform .15s var(--lc-ease); }
:root body .journal-entry-actions button:hover { background: var(--lc-surface-3); transform: scale(1.06); }
:root body .journal-tick-btn { border-radius: 50%; }
:root body .journal-footer { font-size: 11.5px; color: var(--lc-faint); }

/* ---------- Sidebar: companions card, Immersia, My Situation, Voice usage, Tools ----------
 * Proposal look: a "Companions" card with round avatar icons and a highlighted
 * active row; the other blocks as matching cards. Same buttons and handlers. */
/* Keep expanded cards at their content height; scroll the sidebar, not clipped cards. */
:root body .sidebar { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
:root body .sidebar > * { flex-shrink: 0; }
:root body .sidebar,
:root body .mobile-tools-buttons {
  scrollbar-width: thin; scrollbar-color: var(--lc-muted) transparent;
  overscroll-behavior-y: contain;
}
:root body .agent-selector {
  position: relative; display: grid; gap: 4px; padding: 30px 8px 8px; border: 1px solid var(--lc-line); border-radius: 18px;
  background: var(--lc-surface); box-shadow: var(--lc-sh-1);
}
:root body .agent-selector::before {
  content: "Companions"; position: absolute; top: 11px; left: 14px; font-size: 11px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--lc-muted);
}
:root body .agent-card {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px;
  border: 1px solid transparent; border-radius: 12px; background: transparent; opacity: 1; box-shadow: none;
  transition: background .2s, border-color .2s, transform .15s var(--lc-ease);
}
:root body .agent-card:hover { background: var(--lc-surface-2); transform: translateX(2px); }
/* The proposal shows every companion at full strength; only the selected one is highlighted. */
:root body .agent-card:not(.active), :root body .language-resource:not(.active) { opacity: 1; filter: none; }
/* While Immersia is open it is the highlighted row; the companions stay readable, not greyed out. */
:root body .sidebar:has(> .language-resource.active) .agent-card { opacity: 1; filter: none; background: transparent; border-color: transparent; }
:root body .sidebar:has(> .language-resource.active) .agent-card:hover { background: var(--lc-surface-2); }

:root body .agent-card.active { border-color: var(--lc-brand-400); background: var(--lc-brand-50); }
:root body .agent-card-icon {
  display: block !important; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--lc-surface), 0 4px 10px -4px rgba(15, 23, 42, .35);
}
:root body .agent-card-icon video, :root body .agent-card-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
:root body .companion-selector-initial {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  color: #fff; font-size: 17px; font-weight: 750; line-height: 1; letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  background: linear-gradient(135deg, var(--selector-start), var(--selector-end));
}
:root body .companion-selector-initial[data-companion="alex"] { --selector-start: #2563eb; --selector-end: #22d3ee; }
:root body .companion-selector-initial[data-companion="iris"] { --selector-start: #7c3aed; --selector-end: #ec4899; }
:root body .companion-selector-initial[data-companion="mia"] { --selector-start: #f97316; --selector-end: #f43f5e; }
:root body .companion-selector-initial[data-companion="immersia"] { --selector-start: #059669; --selector-end: #84cc16; font-size: 14px; }
:root body .agent-card-name { font-size: 14px; font-weight: 650; color: var(--lc-ink) !important; }
:root body .agent-card-desc { font-size: 12px; color: var(--lc-muted) !important; }
:root body .agent-card .agent-card-check, :root body .agent-card.active .agent-card-check { display: none !important; }
/* Immersia sits with the companions as a matching row with a green orb */
:root body .language-resource {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px;
  border: 1px solid var(--lc-line); border-radius: 14px; background: var(--lc-surface); text-align: left;
  transition: background .2s, border-color .2s, transform .15s var(--lc-ease);
}
:root body .language-resource-icon {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none;
  box-shadow: 0 0 0 2px var(--lc-surface), 0 4px 10px -4px rgba(15, 23, 42, .35);
}
:root body .language-resource-icon video { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
:root body .language-resource:hover { transform: translateX(2px); border-color: rgba(5, 150, 105, .4); }
:root body .language-resource.active, :root body .language-resource[aria-pressed="true"] { border-color: #059669; background: rgba(5, 150, 105, .08); }
:root body .language-resource-title { font-size: 14px; font-weight: 650; color: var(--lc-ink) !important; }
:root body .language-resource-desc { font-size: 12px; color: var(--lc-muted) !important; }
/* My Situation and the collapsible blocks */
:root body .sidebar-situation, :root body .sidebar-collapsible {
  border: 1px solid var(--lc-line); border-radius: 16px; background: var(--lc-surface); box-shadow: var(--lc-sh-1); overflow: hidden;
}
:root body .sidebar-situation-open, :root body .sidebar-collapse-toggle {
  min-height: 48px; padding: 10px 14px; border: 0; background: transparent; color: var(--lc-ink); font-size: 14px; font-weight: 650;
  transition: background .2s;
}
:root body .sidebar-situation-open:hover, :root body .sidebar-collapse-toggle:hover { background: var(--lc-surface-2); }
:root body .sidebar-situation-open > .material-icons, :root body .sidebar-collapse-toggle > .material-icons:first-child {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 18px;
  color: var(--lc-brand-2); background: var(--lc-brand-50);
}
:root body .sidebar-collapse-content { border-top: 1px solid var(--lc-line); }

/* ---------- Immersia page ---------- */
:root body .immersia-focus-inner { max-width: 760px; margin: 0 auto; text-align: center; animation: lc-rise .45s var(--lc-ease) both; }
:root body .immersia-focus-eyebrow { color: #059669 !important; letter-spacing: .1em; font-weight: 700; }
:root body #immersia-focus-title { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--lc-ink); text-wrap: balance; }
:root body .immersia-focus-lead { max-width: 580px; margin-left: auto; margin-right: auto; font-size: 16.5px; line-height: 1.6; color: var(--lc-muted); }
:root body .immersia-focus-points { gap: 12px; border: 0; }
:root body .immersia-focus-point {
  padding: 16px; border: 0; border-radius: 16px; text-align: left; background: rgba(5, 150, 105, .08);
  transition: transform .2s var(--lc-ease), box-shadow .2s; animation: lc-rise .45s var(--lc-ease) both;
}
:root body .immersia-focus-point:nth-child(2) { animation-delay: .06s; }
:root body .immersia-focus-point:nth-child(3) { animation-delay: .12s; }
:root body .immersia-focus-point:hover { transform: translateY(-3px); box-shadow: var(--lc-sh-2); }
:root body .immersia-focus-point strong { color: var(--lc-ink); font-size: 14px; }
:root body .immersia-focus-point span { color: var(--lc-muted); font-size: 13px; }
:root body .immersia-focus-note { font-size: 12.5px; color: var(--lc-faint); }
:root body .immersia-focus-actions { justify-content: center; gap: 10px; }
:root body .immersia-focus-open {
  min-height: 46px; padding: 0 22px; border-radius: 999px; color: #fff; font-weight: 700; background: linear-gradient(135deg, #059669, #65a30d);
  box-shadow: 0 12px 24px -12px #059669; transition: transform .15s var(--lc-ease), box-shadow .2s;
}
:root body .immersia-focus-open:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px #059669; }
:root body .immersia-focus-back { min-height: 46px; padding: 0 20px; border: 1px solid var(--lc-line-strong); border-radius: 999px; background: var(--lc-surface); color: var(--lc-ink); font-weight: 600; }

/* ---------- How to Use: closer to the proposal ---------- */
:root body #get-started-modal .guide-section {
  border: 1px solid var(--lc-line) !important; border-left: 1px solid var(--lc-line) !important; border-radius: 14px !important;
  background: var(--lc-surface) !important; box-shadow: none; padding: 14px 16px;
}
:root body #get-started-modal .guide-section-title { color: var(--lc-ink) !important; font-size: 14px; font-weight: 700; }
:root body #get-started-modal .guide-section-title .material-icons { color: var(--lc-brand-400); }
:root body #get-started-modal .guide-section ul li { color: var(--lc-ink-2); }
:root body .guide-tour-launch { border: 0 !important; border-radius: 16px; background: var(--lc-brand-50) !important; }
:root body .guide-accordion { border: 1px solid var(--lc-line); border-radius: 14px; background: var(--lc-surface); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
:root body .guide-accordion + .guide-accordion { margin-top: 8px; }
:root body .guide-accordion:hover { border-color: var(--lc-brand-100); box-shadow: var(--lc-sh-1); }
:root body .guide-accordion-header { padding: 13px 16px; }
:root body .guide-accordion-header > span:first-child { color: var(--lc-ink) !important; font-size: 14px !important; }

/* Colourful content icons; leave close buttons, arrows and feedback controls alone. */
:root body #get-started-modal .guide-section-title > .material-icons,
:root body #get-started-modal .guide-accordion-header > span:first-child > .material-icons,
:root body #get-started-modal .guide-tour-launch-copy > .material-icons,
:root body #tools-content > button > .material-icons:first-child {
  display: inline-grid; place-items: center; flex: 0 0 34px;
  width: 34px; height: 34px; border-radius: 11px;
  font-size: 19px !important; line-height: 1; color: #fff;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 6px 14px -6px #2563eb;
}
:root body #get-started-modal .guide-section-title { gap: 10px; }
:root body #get-started-modal :is(.guide-section, .guide-accordion):nth-child(3n+2) {
  --guide-icon-start: #7c3aed; --guide-icon-end: #ec4899;
}
:root body #get-started-modal :is(.guide-section, .guide-accordion):nth-child(3n) {
  --guide-icon-start: #059669; --guide-icon-end: #14b8a6;
}
:root body #get-started-modal .guide-section-title > .material-icons,
:root body #get-started-modal .guide-accordion-header > span:first-child > .material-icons {
  background: linear-gradient(135deg, var(--guide-icon-start, #2563eb), var(--guide-icon-end, #22d3ee));
  box-shadow: 0 6px 14px -6px var(--guide-icon-start, #2563eb);
}
:root body #tools-content > :is(.sidebar-breathe, .sidebar-energy) > .material-icons:first-child {
  background: linear-gradient(135deg, #059669, #14b8a6); box-shadow: 0 6px 14px -6px #059669;
}
:root body #tools-content > :is(.sidebar-compass, .sidebar-clarity) > .material-icons:first-child {
  background: linear-gradient(135deg, #7c3aed, #ec4899); box-shadow: 0 6px 14px -6px #7c3aed;
}
:root body #tools-content > :is(.sidebar-readiness, .sidebar-feedback) > .material-icons:first-child {
  background: linear-gradient(135deg, #f97316, #f43f5e); box-shadow: 0 6px 14px -6px #f97316;
}

/* Dashboard: quiet inline icons keep the figures and actions prominent. */
:root body #dashboard-modal :is(.dash-section-title, .dash-reset-banner, .dash-comp-stat, .dash-mem-btn, .dash-resource-btn, .dash-export-btn) > .material-icons {
  display: inline-block; flex: 0 0 auto;
  width: auto; height: auto; border-radius: 0;
  font-size: 18px !important; line-height: 1;
  color: var(--lc-muted) !important; background: none; box-shadow: none;
}
:root body #dashboard-modal :is(.dash-comp-stat, .dash-mem-btn) > .material-icons {
  font-size: 16px !important;
}
:root body #dashboard-modal :is(.dash-mem-btn, .dash-resource-btn, .dash-export-btn):hover > .material-icons {
  color: inherit !important;
}

/* One accent badge per dashboard section; metrics and action icons stay quiet. */
:root body #dashboard-modal .dash-section-title {
  gap: 10px; color: var(--lc-ink); letter-spacing: .04em;
}
:root body #dashboard-modal .dash-section-title > .material-icons {
  display: inline-grid; place-items: center; flex: 0 0 32px;
  width: 32px; height: 32px; border-radius: 10px;
  color: #fff !important; font-size: 18px !important;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
}
:root body #dash-panel-companions .dash-section-title > .material-icons {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
}
:root body #dash-panel-activity .dash-section-title > .material-icons {
  background: linear-gradient(135deg, #059669, #2dd4bf);
}
/* Roomier usage rings with distinct, subtle card accents. Preserve usage/warning strokes. */
:root body #dashboard-modal .dash-ring-card {
  --usage-accent: #2563eb;
  min-width: 0; gap: 14px;
  background: linear-gradient(145deg, var(--lc-surface), color-mix(in srgb, var(--usage-accent) 6%, var(--lc-surface))) !important;
  border-color: color-mix(in srgb, var(--usage-accent) 18%, var(--lc-line)) !important;
}
:root body #dashboard-modal .dash-ring-card:nth-child(2) { --usage-accent: #8b5cf6; }
:root body #dashboard-modal .dash-ring-wrap,
:root body #dashboard-modal .dash-ring-wrap svg { width: 92px; height: 92px; }
:root body #dashboard-modal .dash-ring-bg { stroke: var(--lc-line); stroke-width: 7; }
:root body #dashboard-modal .dash-ring-fill { stroke-width: 7; }
:root body #dashboard-modal .dash-ring-label {
  font-size: 23px; font-variant-numeric: tabular-nums; line-height: 1.15;
  text-align: center; color: var(--lc-ink);
}
:root body #dashboard-modal .dash-ring-label small {
  margin-top: 3px; font-size: 11px; white-space: nowrap; color: var(--lc-muted);
}
:root body #dashboard-modal .dash-ring-title { font-size: 14px; line-height: 1.4; }
@media (max-width: 420px) {
  :root body #dashboard-modal .dash-ring-card { padding: 14px 8px !important; gap: 10px; }
  :root body #dashboard-modal .dash-ring-wrap,
  :root body #dashboard-modal .dash-ring-wrap svg { width: 80px; height: 80px; }
}

/* ---------- Selected skill: practice card and banner, as in the proposal ----------
 * Only the selected-skill state changes; the dropdown itself and its menu are untouched. */
:root body .skill-picker-btn.has-skill {
  color: var(--lc-ink) !important; background: var(--lc-surface) !important; border: 1.5px solid var(--lc-brand-400) !important;
  box-shadow: 0 0 0 4px var(--lc-brand-50), var(--lc-sh-1) !important; border-radius: 16px !important;
}
:root body .skill-picker-btn.has-skill .skill-picker-leading-icon {
  color: #fff !important; background: linear-gradient(135deg, var(--lc-brand-2), var(--lc-brand-400)) !important; border-radius: 10px;
}
:root body .skill-picker-btn.has-skill .skill-picker-leading-icon .material-icons { color: #fff !important; }
:root body .skill-picker-btn.has-skill .skill-picker-eyebrow { color: var(--lc-brand-2) !important; }
:root body .skill-picker-btn.has-skill #skill-picker-label { color: var(--lc-ink) !important; font-weight: 750; }
:root body .skill-picker-btn.has-skill .skill-active-hint, :root body .skill-picker-btn.has-skill #skill-mode-hint { color: var(--lc-muted) !important; }
:root body .skill-picker-btn.has-skill .skill-picker-chevron { color: var(--lc-muted) !important; }
:root body .skill-picker-open-btn.visible {
  width: 32px; height: 32px; border-radius: 999px !important; border: 1px solid var(--lc-line) !important; background: var(--lc-surface) !important;
  color: var(--lc-muted) !important; transition: transform .2s var(--lc-ease), background .2s, color .2s;
}
:root body .skill-picker-open-btn.visible:hover { transform: rotate(90deg); background: var(--lc-surface-3) !important; color: var(--lc-ink) !important; }
/* The tagline strip turns into a soft skill banner while a skill is selected */
:root body .chat-area:has(.skill-picker-btn.has-skill) .chat-top-banner {
  background: linear-gradient(90deg, var(--lc-brand-50), color-mix(in srgb, #22d3ee 10%, var(--lc-surface)), var(--lc-brand-50)) !important;
  border-bottom: 1px solid var(--lc-brand-100) !important;
}
:root body .chat-area:has(.skill-picker-btn.has-skill) .chat-top-banner p { font-style: normal; font-weight: 600; color: var(--lc-ink-2) !important; }
:root body .chat-area:has(.skill-picker-btn.has-skill) .banner-icon-left { color: var(--lc-brand-2) !important; animation: lc-pop .5s var(--lc-spring) both; }

/* My Situation with a skill: compact example cards with a pill action */
:root body .modal-situation .situation-examples:not(.practice-library) { gap: 10px; }
:root body .modal-situation .situation-examples:not(.practice-library) .situation-example-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 16px; background: var(--lc-surface);
}
:root body .modal-situation .situation-example-title { gap: 8px; }
:root body .modal-situation .situation-example-title .material-icons {
  width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--lc-brand-50); font-size: 15px;
}
:root body .modal-situation .situation-example-btn { justify-self: start; }

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  :root body .mobile-tools-sheet {
    display: flex; flex-direction: column;
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
    box-sizing: border-box; overflow: hidden;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  :root body .mobile-tools-header { flex-shrink: 0; }
  :root body .mobile-tools-buttons { min-height: 0; overflow-y: auto; }
}
@media (max-width: 760px) {
  body .lc-hdr-text h2 { font-size: 19px; }
  body .profile-tabs, body .guide-view-tabs, body .dash-tabs { top: 77px !important; }
  body .profile-tabs, body .guide-view-tabs { padding: 0 12px !important; }
  body .profile-tab, body .guide-view-tab, body .dash-tab { padding: 0 10px !important; font-size: 13px !important; }
  body .dash-ring-card { flex-direction: column; text-align: center; gap: 8px; }
  body .chat-empty-state p { font-size: 15px; }
  .chat-area { border-radius: 18px; }
  .chat-empty-state h3 { font-size: 26px; }
  .msg.agent .msg-bubble { padding: 12px 14px; }
  .modal-box { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  body::before, .mic-btn, .mic-btn .material-icons, .top-bar-brand .logo-icon::after { animation: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- My Dashboard: "Your learning space" ----------
 * Hero with greeting, voice this week and quick actions; companion cards with
 * the last summary, Continue chat and Memory; recent conversations; memory
 * highlights. Every button reuses an existing handler. */
:root body .modal-box.modal-dashboard { width: min(1040px, calc(100vw - 32px)); max-width: none; }
:root body #dashboard-body { padding: 20px 24px 24px; background: var(--lc-surface-2); }
:root body .ls { display: grid; gap: 22px; }
:root body .ls-hero {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 24px 26px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #0b2a8a 0%, #1d4ed8 48%, #6d28d9 100%);
  box-shadow: 0 22px 48px -26px rgba(29, 78, 216, .7);
}
:root body .ls-hero::before {
  content: ""; position: absolute; z-index: -1; inset: -40% -10% auto auto; width: 60%; height: 160%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .38), transparent 70%); pointer-events: none;
}
:root body .ls-hello { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; }
:root body .ls-hero-sub { margin: 6px 0 0; max-width: 560px; color: rgba(255, 255, 255, .86); font-size: 14px; line-height: 1.6; }
:root body .ls-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
:root body .ls-hero .ls-btn, :root body .ls-hero .dash-resource-btn {
  width: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 13px; font-weight: 650;
  backdrop-filter: blur(6px); transition: transform .15s var(--lc-ease), background .2s;
}
:root body .ls-hero .ls-btn:hover, :root body .ls-hero .dash-resource-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .2); }
:root body .ls-hero .ls-btn-primary { background: #fff; color: #1d4ed8; border-color: #fff; text-align: left; }
:root body .ls-hero .ls-btn-primary:hover { background: #fff; }
:root body .ls-btn-text { display: grid; line-height: 1.25; }
:root body .ls-btn-text small { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; font-size: 11.5px; font-weight: 500; }
:root body .ls-hero .material-icons { font-size: 20px; }
:root body .ls-voice { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); }
:root body .ls-voice-ring { position: relative; width: 96px; height: 96px; flex: none; }
:root body .ls-voice-ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
:root body .ls-voice-ring .dash-ring-bg { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 8; }
:root body .ls-voice-ring .dash-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .8s var(--lc-ease); }
:root body .ls-voice-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
:root body .ls-voice-num strong { font-size: 26px; font-variant-numeric: tabular-nums; }
:root body .ls-voice-num small { font-size: 11px; color: rgba(255, 255, 255, .8); }
:root body .ls-voice-title { font-weight: 750; font-size: 14px; margin-bottom: 4px; }
:root body .ls-voice-line { font-size: 12.5px; color: rgba(255, 255, 255, .86); line-height: 1.6; }
:root body .ls-voice-reset { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; color: rgba(255, 255, 255, .78); }
:root body .ls-voice-reset .material-icons { font-size: 15px; }

:root body .ls-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
:root body .ls-section-head h3 { margin: 0; font-size: 16px; font-weight: 750; color: var(--lc-ink); letter-spacing: -.01em; }
:root body .ls-section-head span { font-size: 12px; color: var(--lc-muted); }

:root body .ls-companions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
:root body .ls-comp {
  display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--lc-surface);
  border: 1px solid var(--lc-line); box-shadow: var(--lc-sh-1); position: relative; overflow: hidden;
  transition: transform .2s var(--lc-ease), box-shadow .2s;
}
:root body .ls-comp::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--comp); }
:root body .ls-comp:hover { transform: translateY(-2px); box-shadow: var(--lc-sh-2); }
:root body .ls-comp-head { display: flex; align-items: center; gap: 12px; }
:root body .ls-comp-head .companion-selector-initial { width: 42px; height: 42px; flex: none; border-radius: 14px; font-size: 18px; }
:root body .ls-comp-name { font-size: 16px; font-weight: 750; color: var(--lc-ink); }
:root body .ls-comp-role { font-size: 12px; color: var(--lc-muted); }
:root body .ls-comp-stats { display: flex; flex-wrap: wrap; gap: 6px; }
:root body .ls-comp-stats span { padding: 4px 10px; border-radius: 999px; background: var(--lc-surface-3); color: var(--lc-ink-2); font-size: 12px; }
:root body .ls-comp-stats strong { color: var(--lc-ink); }
:root body .ls-comp-summary {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--comp) 22%, var(--lc-line)); background: color-mix(in srgb, var(--comp) 6%, var(--lc-surface));
  transition: border-color .2s, background .2s; flex: 1;
}
:root body .ls-comp-summary:hover { border-color: var(--comp); }
:root body .ls-comp-summary-label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--comp); }
:root body .ls-comp-summary-label .material-icons { font-size: 15px; }
:root body .ls-comp-summary-title { font-size: 13.5px; font-weight: 700; color: var(--lc-ink); }
:root body .ls-comp-summary-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.55; color: var(--lc-ink-2); }
:root body .ls-comp-summary-more { font-size: 12px; font-weight: 650; color: var(--comp); }
:root body .ls-comp-summary-empty { cursor: default; color: var(--lc-muted); font-size: 13px; }
:root body .ls-comp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
:root body .ls-comp .ls-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 1 1 120px; min-height: 40px; padding: 8px 12px;
  border-radius: 999px; border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-ink); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
  transition: background .2s, border-color .2s;
}
:root body .ls-comp .ls-btn:hover { border-color: var(--comp); }
:root body .ls-comp .ls-btn-tint { background: var(--comp); border-color: var(--comp); color: #fff; }
:root body .ls-comp .ls-btn-tint:hover { filter: brightness(1.06); }
:root body .ls-comp .ls-btn .material-icons { font-size: 17px; }

:root body .ls-link { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--comp); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
:root body .ls-link:hover { text-decoration: underline; }
:root body .ls .dash-empty { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: 14px; background: var(--lc-surface-2); color: var(--lc-muted); font-size: 13px; line-height: 1.5; }
:root body .ls-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--lc-muted); font-size: 12px; }
:root body .ls-footer .dash-export-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
:root body .ls-footer .dash-export-btn .material-icons { font-size: 17px; }
@media (max-width: 820px) {
  :root body .ls-hero { grid-template-columns: 1fr; padding: 20px; }
  :root body #dashboard-body { padding: 14px; }
}
@media (max-width: 480px) {
  :root body .ls-voice { gap: 12px; padding: 12px; }
  :root body .ls-voice-ring, :root body .ls-voice-ring svg { width: 80px; height: 80px; }
  :root body .ls-hero .ls-btn, :root body .ls-hero .dash-resource-btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .ls-comp, .ls-voice-ring .dash-ring-fill { transition: none; } }

:root body #dashboard-modal .ls-hero .dash-resource-btn > .material-icons { color: #fff !important; font-size: 20px !important; }
:root body #dashboard-modal .ls-footer .dash-export-btn > .material-icons { color: inherit !important; }
:root body .ls-footer .dash-export-btn { width: auto; }
/* Card accents match the coloured initials used across the app. */
:root body .ls [data-companion="alex"] { --comp: #2563eb !important; }
:root body .ls [data-companion="iris"] { --comp: #7c3aed !important; }
:root body .ls [data-companion="mia"] { --comp: #f97316 !important; }
:root body .ls-comp-summary-empty { flex: 0 0 auto; display: flex; align-items: center; min-height: 64px; }
:root body .ls { grid-template-columns: minmax(0, 1fr); }
:root body .ls-hero-copy, :root body .ls-btn-text { min-width: 0; }
:root body .ls-btn-text small { max-width: 100%; }
@media (max-width: 480px) { :root body .ls-btn-text small { white-space: normal; } }
:root body .ls-voice-copy { min-width: 0; }
:root body .ls-comp-head .companion-selector-initial { width: 42px; height: 42px; flex: none; border-radius: 14px; font-size: 18px; }
/* Saved chats inside each companion card */
:root body .ls-comp-chats { display: grid; gap: 2px; }
:root body .ls-comp-chats-label { margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lc-muted); }
:root body .ls-comp-chats .dash-activity-item {
  display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; transition: background .2s;
}
:root body .ls-comp-chats .dash-activity-item:hover, :root body .ls-comp-chats .dash-activity-item:focus-visible { background: var(--lc-surface-3); outline: none; }
:root body .ls-comp-chats .dash-activity-item > .material-icons:first-child { font-size: 18px; color: var(--comp); }
:root body .ls-comp-chats .dash-activity-info { flex: 1; min-width: 0; }
:root body .ls-comp-chats .dash-activity-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; color: var(--lc-ink); }
:root body .ls-comp-chats .dash-activity-meta { font-size: 11.5px; color: var(--lc-muted); }
:root body .ls-comp-chats .ls-chevron { font-size: 18px; color: var(--lc-faint); }
/* Skills practised with Alex */
:root body .ls-skills-section { padding: 18px; border-radius: 18px; background: var(--lc-surface); border: 1px solid var(--lc-line); box-shadow: var(--lc-sh-1); }
:root body .ls-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
:root body .ls-skill {
  display: grid; gap: 4px; padding: 14px; border-radius: 14px; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid color-mix(in srgb, #2563eb 18%, var(--lc-line)); background: linear-gradient(150deg, color-mix(in srgb, #2563eb 7%, var(--lc-surface)), var(--lc-surface));
  transition: transform .15s var(--lc-ease), border-color .2s, box-shadow .2s;
}
:root body .ls-skill:hover { transform: translateY(-2px); border-color: #2563eb; box-shadow: var(--lc-sh-2); }
:root body .ls-skill-name { font-size: 14px; font-weight: 750; color: var(--lc-ink); }
:root body .ls-skill-meta { font-size: 12px; color: var(--lc-muted); }
:root body .ls-skill-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 650; color: #2563eb; }
:root body .ls-skill-go .material-icons { font-size: 16px; }
:root[data-theme="dark"] body .ls-skill-go { color: #60a5fa; }
:root body .ls-skills-section .dash-empty { flex-wrap: wrap; }

/* ---------- Memory and summary windows ---------- */
:root body #mem-profile-modal, :root body #summary-modal {
  width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px); overflow-y: auto; padding: 24px 24px 20px;
  border-radius: 22px; border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-ink); box-shadow: var(--lc-sh-3);
}
:root body #mem-profile-modal-overlay, :root body #summary-modal-overlay { background: rgba(13, 32, 60, .55); backdrop-filter: blur(5px); }
:root body #mem-profile-modal-close, :root body #summary-modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-muted); font-size: 20px; line-height: 1; cursor: pointer;
}
:root body #mem-profile-modal, :root body #summary-modal { position: relative; }
:root body #mem-profile-modal-title { display: flex; align-items: center; gap: 12px; margin: 0 44px 6px 0; }
:root body #mem-profile-modal-title .companion-selector-initial { width: 44px; height: 44px; flex: none; border-radius: 14px; font-size: 19px; }
:root body .mem-title-text { display: grid; gap: 2px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--lc-ink); }
:root body .mem-title-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
:root body .mem-intro { margin: 8px 0 16px; font-size: 13px; line-height: 1.6; color: var(--lc-muted); }
:root body .mem-group { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--lc-line); background: var(--lc-surface-2); }
:root body #mem-profile-modal-body .mem-profile-field-label {
  display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--lc-ink-2);
}
:root body .mem-group-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--lc-surface-3); color: var(--lc-muted); font-size: 11px; text-align: center; letter-spacing: 0; }
:root body #mem-profile-modal-body .mem-profile-item {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--lc-line); background: var(--lc-surface); color: var(--lc-ink); font-size: 13.5px; line-height: 1.55;
  transition: opacity .2s, border-color .2s;
}
:root body #mem-profile-modal-body .mem-profile-item:hover { border-color: var(--lc-brand-400); }
:root body #mem-profile-modal-body .mem-profile-del {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center; margin: -4px -4px -4px 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--lc-faint); font-size: 18px; cursor: pointer;
}
:root body #mem-profile-modal-body .mem-profile-del:hover, :root body #mem-profile-modal-body .mem-profile-del:focus-visible { background: rgba(239, 68, 68, .1); color: #ef4444; outline: none; }
:root body .mem-footnote { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; font-size: 12px; color: var(--lc-muted); }
:root body .mem-footnote .material-icons { font-size: 16px; }
:root body #mem-profile-modal-body .mem-profile-empty { color: var(--lc-muted); font-style: normal; font-size: 13px; }
:root body #summary-modal-title { display: grid; gap: 4px; margin: 0 44px 14px 0; }
:root body .summary-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--comp, var(--lc-brand-2)); }
:root body .summary-title-text { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--lc-ink); }
:root body #summary-modal-body {
  padding: 16px 18px; border-radius: 16px; border-left: 4px solid var(--lc-brand-400); background: var(--lc-surface-2);
  color: var(--lc-ink-2); font-size: 14px; line-height: 1.75; white-space: pre-wrap;
}

/* Phone polish only. Keep the existing avatar, voice controls, practice picker
   and bottom navigation behaviour and placement. */
@media (max-width: 768px) {
  :root body.app-authenticated .top-bar {
    background: var(--lc-glass) !important;
    border-bottom: 1px solid var(--lc-line);
    box-shadow: 0 4px 18px -12px rgba(15, 23, 42, .22);
  }
  :root body.app-authenticated .chat-area {
    border: 1px solid var(--lc-line) !important;
    border-radius: 20px !important;
    background: var(--lc-surface) !important;
    box-shadow: 0 12px 32px -24px rgba(15, 23, 42, .28) !important;
  }
  :root body.app-authenticated .chat-top-banner {
    background: var(--lc-brand-50) !important;
  }
  :root body.app-authenticated .chat-empty-state h3 {
    font-size: clamp(25px, 7vw, 32px);
    letter-spacing: -.025em;
  }
  :root body.app-authenticated .chat-empty-state p {
    font-size: 14px; line-height: 1.6; color: var(--lc-muted);
  }
  :root body.app-authenticated .chat-empty-state .suggestions { gap: 8px; }
  :root body.app-authenticated .chat-empty-state .suggestion-chip {
    padding: 12px 14px; border-radius: 16px;
    border: 1px solid var(--lc-line); background: var(--lc-surface-2);
    box-shadow: none;
  }
  :root body.app-authenticated .chat-empty-state .suggestion-chip .suggestion-title { font-size: 13px; }
  :root body.app-authenticated .chat-empty-state .suggestion-chip .suggestion-desc { font-size: 12px; }
  :root body.app-authenticated .chat-input-bar {
    border-color: var(--lc-line) !important; border-radius: 20px !important;
    background: var(--lc-surface) !important; box-shadow: var(--lc-sh-2) !important;
  }
  :root body.app-authenticated .chat-text-input-wrap {
    border-radius: 14px !important; background: var(--lc-surface-2) !important;
  }
  :root body.app-authenticated .mobile-bottom-nav {
    background: var(--lc-glass) !important; border-top: 1px solid var(--lc-line);
    backdrop-filter: blur(16px); box-shadow: 0 -8px 28px -24px rgba(15, 23, 42, .3);
  }
  :root body.app-authenticated .mobile-nav-item {
    border-radius: 16px; color: var(--lc-muted);
  }
  :root body.app-authenticated .mobile-nav-item.active {
    background: var(--lc-brand-50); border-color: var(--lc-brand-100);
  }
  :root body.app-authenticated .mobile-tools-fab {
    border: 1px solid var(--lc-brand-100); box-shadow: var(--lc-sh-2);
  }
  :root body.app-authenticated #mobile-speaking-avatar {
    background: var(--lc-surface); border-color: var(--lc-line); border-radius: 18px;
  }
}
