/* =========================================================
   مجلس — Majlis  ·  Design system
   Dark "aurora night" by default, light theme via [data-theme=light]
   ========================================================= */
/* Light, airy and friendly by default. Optional night mode via [data-theme=dark]. */
:root {
  --bg: #F5F6FB;
  --bg-2: #EEF0F8;
  --surface: rgba(255, 255, 255, .86);
  --surface-2: #F3F4FA;
  --surface-3: #E8EAF3;
  --solid: #FFFFFF;
  --border: rgba(35, 40, 100, .08);
  --border-2: rgba(35, 40, 100, .15);
  --text: #1D2042;
  --text-2: #4A4F74;
  --muted: #8A8FAF;
  --primary: #6C5CE7;
  --primary-2: #0E9CC4;
  --grad: linear-gradient(135deg, #7C6CFF 0%, #5B8CFF 55%, #38C2F2 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 108, 255, .11), rgba(56, 194, 242, .09));
  --gold: #E0900F;
  --gold-2: #F9733A;
  --success: #0FA27A;
  --warn: #E8761C;
  --danger: #E5484D;
  --shadow: 0 24px 50px -28px rgba(55, 60, 140, .32), 0 2px 6px rgba(55, 60, 140, .04);
  --shadow-sm: 0 8px 24px -16px rgba(55, 60, 140, .22), 0 1px 2px rgba(55, 60, 140, .05);
  --glow: 0 0 0 1px rgba(108, 92, 231, .22), 0 12px 32px -14px rgba(108, 92, 231, .45);
  --backdrop: rgba(40, 44, 90, .28);
  --r: 22px;
  --r-sm: 14px;
  --r-xs: 10px;
  --font: 'Readex Pro', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --side: 272px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0B0D1A;
  --bg-2: #11142A;
  --surface: rgba(255, 255, 255, .05);
  --surface-2: rgba(255, 255, 255, .075);
  --surface-3: rgba(255, 255, 255, .11);
  --solid: #151936;
  --border: rgba(255, 255, 255, .085);
  --border-2: rgba(255, 255, 255, .16);
  --text: #EEF0FF;
  --text-2: #BCC1E3;
  --muted: #8187AE;
  --primary: #7C5CFF;
  --primary-2: #38D3F0;
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, .22), rgba(34, 211, 238, .14));
  --gold: #FFB547;
  --gold-2: #FF7A45;
  --success: #34D399;
  --warn: #FB923C;
  --danger: #F87171;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .75);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .6);
  --glow: 0 0 0 1px rgba(124, 92, 255, .35), 0 10px 40px -10px rgba(124, 92, 255, .55);
  --backdrop: rgba(3, 4, 12, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
[hidden] { display: none !important; }
::selection { background: rgba(124, 92, 255, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; border-radius: 8px; }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .55; animation: drift 26s ease-in-out infinite alternate; }
.aurora span:nth-child(1) { width: 55vw; height: 55vw; background: #DCD5FF; top: -24vw; right: -12vw; }
.aurora span:nth-child(2) { width: 45vw; height: 45vw; background: #C7EEFF; bottom: -20vw; left: -10vw; animation-delay: -8s; }
.aurora span:nth-child(3) { width: 32vw; height: 32vw; background: #FFE3D1; top: 38%; left: 34%; animation-delay: -14s; opacity: .5; }
[data-theme="dark"] .aurora span:nth-child(1) { background: #6D4DFF; opacity: .35; }
[data-theme="dark"] .aurora span:nth-child(2) { background: #0EA5E9; opacity: .24; }
[data-theme="dark"] .aurora span:nth-child(3) { background: #EC4899; opacity: .1; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6vw, 5vh) scale(1.12); } }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(40, 40, 110, .07) 1px, transparent 1px); background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }
[data-theme="dark"] .grain { background-image: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px); }

/* ---------- layout ---------- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; height: 100%; overflow-y: auto;
  background: rgba(255, 255, 255, .72);
  border-inline-end: 1px solid var(--border); backdrop-filter: blur(18px);
}
[data-theme="dark"] .sidebar { background: rgba(255, 255, 255, .03); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; }
.brand img { border-radius: 12px; box-shadow: 0 8px 20px -8px rgba(108, 92, 231, .55); }
.brand b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); margin-top: -3px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 500; transition: .2s var(--ease); position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--grad-soft); color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(108, 92, 231, .16); }
[data-theme="dark"] .nav a.on { color: var(--text); }
.nav a.on::before { content: ''; position: absolute; inset-inline-start: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: var(--grad); }
.nav a.on .ic { color: var(--primary); }
[data-theme="dark"] .nav a.on .ic { color: var(--primary-2); }
.side-section { margin-top: 6px; }
.side-title { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 6px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.side-team { display: flex; flex-direction: column; gap: 2px; }
.side-mentor { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; transition: .2s; position: relative; }
.side-mentor:hover, .side-mentor.on { background: var(--surface-2); }
.side-mentor b { display: block; font-size: 13.5px; font-weight: 500; }
.side-mentor small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.side-mentor .crown { color: var(--gold); margin-inline-start: auto; }
.me-card { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.me-ring { position: relative; width: 46px; height: 46px; flex: none; }
.me-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.me-info { flex: 1; min-width: 0; }
.me-info b { display: block; font-size: 14px; }
.me-info small { color: var(--gold); font-size: 11.5px; }
.xpbar { display: block; height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.xpbar b { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 5px; transition: width .8s var(--ease); }

.main { height: 100%; overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: smooth; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: linear-gradient(180deg, var(--bg) 20%, transparent); backdrop-filter: blur(6px);
}
.crumb b { font-size: 15px; font-weight: 600; color: var(--text-2); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 13.5px; transition: transform .3s var(--ease); }
.pill b { font-weight: 700; }
.pill small { color: var(--muted); font-size: 11px; }
.pill.streak .ic { color: var(--muted); }
.pill.streak.hot { background: linear-gradient(135deg, rgba(255, 122, 69, .22), rgba(255, 181, 71, .14)); border-color: rgba(255, 122, 69, .35); }
.pill.streak.hot .ic { color: var(--gold-2); animation: flicker 1.6s infinite; }
.pill.xp .ic { color: var(--gold); }
.pill.bump { animation: bump .6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.mode-pill { display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--gold); background: rgba(255, 181, 71, .12); border: 1px dashed rgba(224, 144, 15, .45); cursor: pointer; }
.view { padding: 4px 28px 60px; }
.view-root { animation: enter .45s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.page { max-width: 1320px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 28px; font-weight: 700; letter-spacing: -.3px; }
.page-head h1 .ic { color: var(--primary-2); }
.page-head p { margin-top: 6px; max-width: 680px; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; backdrop-filter: blur(16px); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.card-head h2 .ic { color: var(--primary-2); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2.tight, .grid-3.tight { gap: 12px; }
.link { color: var(--primary-2); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  font-weight: 500; font-size: 14px; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .25s, background .2s, opacity .2s;
  border: 1px solid transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(124, 92, 255, .9); }
.btn.primary:hover { box-shadow: 0 10px 30px -8px rgba(124, 92, 255, 1); transform: translateY(-1px); }
.btn.subtle { background: var(--surface-2); border-color: var(--border); }
.btn.subtle:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn.ghost { border-color: var(--border); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.success { background: linear-gradient(135deg, #10B981, #34D399); color: #062A1E; font-weight: 600; }
.btn.danger, .btn.ghost.danger { color: var(--danger); }
.btn.danger:not(.ghost) { background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .35); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.lg { padding: 13px 24px; font-size: 15.5px; border-radius: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--text-2); transition: .2s; position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.xs { width: 24px; height: 24px; border-radius: 7px; }
.icon-btn .dot { position: absolute; top: 3px; inset-inline-end: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); transition: .18s var(--ease); }
.chip:hover { border-color: var(--border-2); color: var(--text); transform: translateY(-1px); }
.chip.on { background: var(--grad-soft); border-color: rgba(124, 92, 255, .6); color: var(--text); box-shadow: 0 0 0 1px rgba(124, 92, 255, .25); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.center { justify-content: center; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.tag.ok { color: var(--success); border-color: rgba(52, 211, 153, .35); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.badge.gold { background: rgba(255, 181, 71, .15); color: var(--gold); }
.input {
  width: 100%; padding: 11px 14px; border-radius: 12px; background: #F7F8FC; border: 1px solid var(--border-2);
  outline: none; transition: border-color .2s, box-shadow .2s, background .2s; resize: vertical;
}
.input:focus { border-color: rgba(108, 92, 231, .6); box-shadow: 0 0 0 4px rgba(108, 92, 231, .12); background: var(--solid); }
[data-theme="dark"] .input { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .input:focus { background: var(--surface-3); }
.input.lg { padding: 14px 18px; font-size: 16px; border-radius: 14px; }
.input.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.input::placeholder { color: var(--muted); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 55%, 12px 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-inline-start: 34px; }
select.input option { background: var(--solid); }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-inline-start: 42px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.field > span small { color: var(--muted); font-weight: 400; }
.form { display: flex; flex-direction: column; gap: 16px; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: var(--surface-3); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); box-shadow: 0 2px 10px rgba(124, 92, 255, .6); cursor: grab; transition: transform .15s; }
.slider::-webkit-slider-thumb:active { transform: scale(1.2); }
.slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--primary); cursor: grab; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; cursor: pointer; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-size: 14px; }
.toggle input { display: none; }
.toggle span { width: 42px; height: 24px; border-radius: 24px; background: var(--surface-3); position: relative; transition: .25s; flex: none; }
.toggle span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .25s var(--ease); }
.toggle input:checked + span { background: var(--grad); }
.toggle input:checked + span::after { inset-inline-start: 21px; }
.toggle input:disabled + span { opacity: .4; }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar b { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width .8s var(--ease); }
.ring-bg { stroke: var(--surface-3); }
.ring-fg { transition: stroke-dashoffset 1s var(--ease); }
.ring-label { fill: var(--text); font-size: 13px; font-weight: 700; font-family: var(--font); }
.ring { flex: none; }
.skel { height: 14px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skel.w80 { width: 80%; } .skel.w70 { width: 70%; } .skel.w60 { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-2); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; background: #6C8CFF; }
.typing i:nth-child(3) { animation-delay: .3s; background: var(--primary); }
.typing.sm i { width: 6px; height: 6px; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-6px); opacity: 1; } }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border-2); color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty > .ic { color: var(--primary-2); opacity: .8; }
.empty h3 { font-size: 20px; color: var(--text); }
.empty p { max-width: 460px; color: var(--muted); }
.empty .btn { margin-top: 10px; }
.mini-empty { text-align: center; padding: 10px 0 4px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; line-height: 1.7; }
.note .ic { flex: none; margin-top: 3px; }

/* ---------- avatars (realistic 3D) ---------- */
.av { --a1: #7C5CFF; --a2: #22D3EE; width: var(--s); height: var(--s); border-radius: 30%; overflow: hidden; flex: none; display: inline-block; position: relative; isolation: isolate;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a2) 42%, #fff), color-mix(in srgb, var(--a1) 55%, #fff) 78%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 2px 8px -4px rgba(40, 40, 110, .25); }
[data-theme="dark"] .av { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a2) 60%, #0b0d1a), color-mix(in srgb, var(--a1) 70%, #0b0d1a) 80%); }
.av.round { border-radius: 50%; }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; transform: scale(1.08); transform-origin: 50% 30%; transition: transform .4s var(--ease); user-select: none; }
.av[data-mood="talking"] img, .av[data-mood="happy"] img { transform: scale(1.14); }
.av[data-mood="thinking"] { animation: avThink 1.6s ease-in-out infinite; }
@keyframes avThink { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 0 0 4px rgba(255, 181, 71, .35); } }
.live-av { --a1: #7C5CFF; --a2: #22D3EE; position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--a2) 38%, #fff) 0%, color-mix(in srgb, var(--a1) 34%, #fff) 60%, color-mix(in srgb, var(--a1) 55%, #fff) 100%); transition: background .6s; }
[data-theme="dark"] .live-av { background: radial-gradient(ellipse at 50% 38%, color-mix(in srgb, var(--a2) 55%, #0b0d1a), color-mix(in srgb, var(--a1) 60%, #0b0d1a) 100%); }
.live-av::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 110%, rgba(255, 255, 255, .55), transparent 55%); pointer-events: none; z-index: 0; }
.live-av canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; opacity: 0; transition: opacity .5s var(--ease); }
.live-av.ready canvas { opacity: 1; }
.live-av .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; z-index: 0; filter: blur(1px) saturate(.9); transition: opacity .5s; }
.live-av.ready .ph { opacity: 0; }
.live-av[data-framing="bust"] .ph { object-fit: contain; object-position: 50% 0%; transform: scale(.78); transform-origin: 50% 12%; }
.live-av.loading::after { content: ''; position: absolute; inset-inline: 30%; bottom: 10px; height: 3px; border-radius: 3px; z-index: 2; background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }

/* ---------- home ---------- */
.hero { position: relative; overflow: hidden; display: flex; gap: 26px; align-items: center; padding: 28px 30px; border-radius: 28px;
  background: linear-gradient(120deg, #F1EDFF 0%, #EAF6FF 55%, #FFF4E8 100%); border-color: rgba(255, 255, 255, .9); box-shadow: var(--shadow); }
[data-theme="dark"] .hero { background: linear-gradient(135deg, rgba(124, 92, 255, .2), rgba(34, 211, 238, .08) 60%, rgba(255, 181, 71, .08)); border-color: rgba(124, 92, 255, .25); }
.hero-glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 110, .45), transparent 65%); top: -170px; inset-inline-start: -110px; pointer-events: none; }
.hero-av { position: relative; flex: none; width: 150px; height: 150px; border-radius: 36%; overflow: hidden; box-shadow: 0 22px 44px -20px rgba(224, 144, 15, .6), 0 0 0 4px rgba(255, 255, 255, .8); transition: transform .3s var(--ease); display: block; }
.hero-av:hover { transform: translateY(-3px) rotate(-2deg); }
.hero-body { flex: 1; min-width: 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gold); font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(255, 181, 71, .16); }
.hero-title { font-size: 30px; font-weight: 700; margin: 10px 0 8px; letter-spacing: -.4px; }
.wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } }
.brief-greet { font-size: 15.5px; color: var(--text-2); margin-bottom: 8px; }
.focus { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.focus li { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * .12s + .1s); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.focus a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 2px 8px -4px rgba(55, 60, 140, .12); transition: .2s var(--ease); }
[data-theme="dark"] .focus a { background: var(--surface-2); border-color: var(--border); box-shadow: none; }
.focus a:hover { border-color: rgba(124, 92, 255, .5); transform: translateX(-3px); }
.focus a > span:not(.n):not(.av) { flex: 1; font-size: 14px; }
.focus .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--grad); color: #fff; flex: none; }
.focus a > .ic { color: var(--muted); }
.nudge { margin-top: 10px; font-size: 13.5px; color: var(--gold); display: flex; align-items: center; gap: 6px; }
#refreshBrief { margin-top: 6px; }
.askbar { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding: 8px; padding-inline-start: 18px; border-radius: 18px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: .25s; }
.askbar:focus-within { border-color: rgba(124, 92, 255, .6); box-shadow: var(--glow); }
.askbar input { flex: 1; background: none; border: 0; outline: none; font-size: 15.5px; padding: 8px 0; min-width: 0; }
.ask-ic { color: var(--primary-2); }
.reminders { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.rem-card { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 14px; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25); }
.rem-card span { flex: 1; }
.rem-card.warn { background: rgba(251, 146, 60, .1); border-color: rgba(251, 146, 60, .35); }
.rem-card.warn > .ic:first-child { color: var(--warn); }
.rem-card.danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .4); }
.rem-card.danger > .ic:first-child { color: var(--danger); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.stat small { display: block; color: var(--muted); font-size: 12px; }
.stat b { display: block; font-size: 19px; font-weight: 700; }
.stat .muted { font-size: 12px; }
.stat-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.stat-ic.flame { background: rgba(255, 122, 69, .14); color: var(--gold-2); }
.stat.hot .stat-ic.flame .ic { animation: flicker 1.6s infinite; }
.stat-ic.book { background: rgba(34, 211, 238, .12); color: var(--primary-2); }
.stat-ic.trophy { background: rgba(255, 181, 71, .14); color: var(--gold); }
.home-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }
.side-col { display: flex; flex-direction: column; gap: 18px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mentor-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px 16px 16px; border-radius: 20px; background: var(--solid); border: 1px solid var(--border); transition: .3s var(--ease); overflow: hidden; }
.mentor-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 100px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--aura) 22%, transparent), transparent 72%); pointer-events: none; }
[data-theme="dark"] .mentor-card::before { background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--aura) 45%, transparent), transparent 70%); }
.mentor-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--aura) 40%, transparent); box-shadow: 0 20px 40px -22px color-mix(in srgb, var(--aura) 80%, transparent); }
.mc-av { position: relative; transition: transform .3s var(--ease); }
.mentor-card:hover .mc-av { transform: scale(1.05) rotate(-2deg); }
.mc-body { width: 100%; }
.mc-body h3 { font-size: 16.5px; }
.mc-body p { font-size: 12.5px; margin-bottom: 8px; }
.mc-body small { font-size: 11.5px; display: block; margin-top: 6px; }
.mc-actions { display: flex; gap: 6px; align-items: center; }
.mentor-card.add { justify-content: center; border-style: dashed; color: var(--muted); min-height: 230px; background: transparent; }
.mentor-card.add span { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary-2); }
.mentor-card.add b { color: var(--text); }
.mentor-card.add:hover { color: var(--text); border-color: rgba(124, 92, 255, .6); }
.bond { display: flex; flex-direction: column; gap: 4px; align-items: stretch; font-size: 11.5px; color: #F472B6; width: 100%; max-width: 180px; margin: 0 auto; }
.bond span { display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.bond i { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bond i b { display: block; height: 100%; background: linear-gradient(90deg, #F472B6, #FB7185); border-radius: 4px; }
.next-lesson { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; transition: .2s; }
.next-lesson:hover { background: var(--surface-2); }
.next-lesson > div { flex: 1; min-width: 0; }
.next-lesson b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-lesson small { display: block; font-size: 12px; margin-bottom: 5px; }
.play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; box-shadow: 0 6px 16px -6px rgba(124, 92, 255, .9); }
.goal-mini { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 14px; transition: .2s; }
.goal-mini:hover { background: var(--surface-2); }
.goal-mini > div { flex: 1; min-width: 0; }
.goal-mini b { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-mini small { font-size: 12px; }
.due { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.due.warn { background: rgba(251, 146, 60, .15); color: var(--warn); }
.due.danger { background: rgba(248, 113, 113, .15); color: var(--danger); }
.due.ok { background: rgba(52, 211, 153, .15); color: var(--success); }
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; direction: ltr; }
.heatmap i { aspect-ratio: 1; border-radius: 5px; background: color-mix(in srgb, var(--primary-2) calc(var(--v) * 100%), var(--surface-2)); transition: transform .2s; }
.heatmap i:hover { transform: scale(1.2); }
.heatmap i.today { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- chat ---------- */
.v-chat .view, body[data-view="chat"] .view { padding-bottom: 20px; }
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; height: calc(100dvh - 90px); max-width: 1320px; margin: 0 auto; }
.mentor-panel { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mentor-panel h2 { text-align: center; font-size: 21px; margin-top: 4px; }
.stage { position: relative; display: grid; place-items: center; padding: 14px 0 4px; }
.stage::before { content: ''; position: absolute; width: 290px; height: 290px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--glow) 55%, transparent), transparent 68%); filter: blur(10px); animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .8; } }
.stage-av { position: relative; }
.stage-av { width: 250px; height: 300px; border-radius: 32px; overflow: hidden; box-shadow: 0 24px 50px -22px color-mix(in srgb, var(--glow) 90%, transparent), 0 0 0 4px rgba(255, 255, 255, .85); }
.stage-status { position: relative; margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.stage-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 10px var(--success); }
.stage-status i.thinking { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: av-bubble 1s infinite; }
.stage-status i.talking { background: var(--primary-2); box-shadow: 0 0 10px var(--primary-2); animation: av-bubble .6s infinite; }
.stage-status i.happy { background: #F472B6; box-shadow: 0 0 10px #F472B6; }
.panel-sec { border-top: 1px solid var(--border); padding-top: 12px; }
.panel-sec h4 { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.panel-sec p { font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; }
.peek { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.peek li { font-size: 12.5px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); border-inline-start: 3px solid var(--primary); }
.panel-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: auto; padding-top: 6px; }
.traits { display: flex; flex-direction: column; gap: 8px; }
.trait { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.trait i { display: block; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.trait i b { display: block; height: 100%; background: var(--grad); border-radius: 6px; transition: width .4s var(--ease); }
.traits.compact .trait { grid-template-columns: 100px 1fr; font-size: 12px; }
.chat-main { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(248, 249, 253, .85)); }
[data-theme="dark"] .chat-main { background: var(--surface); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.ch-title b { display: block; font-size: 15.5px; }
.ch-title small { display: block; font-size: 12px; }
.ch-actions { margin-inline-start: auto; display: flex; gap: 6px; }
.only-mobile { display: none; }
.lesson-banner:empty { display: none; }
.lesson-banner { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: linear-gradient(90deg, rgba(52, 211, 153, .14), rgba(34, 211, 238, .08)); border-bottom: 1px solid rgba(52, 211, 153, .3); flex-wrap: wrap; }
.lb-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(52, 211, 153, .2); color: var(--success); }
.lb-text { flex: 1; min-width: 160px; }
.lb-text small { display: block; font-size: 11.5px; color: var(--success); }
.lb-text b { font-size: 14.5px; }
.msgs { flex: 1; overflow-y: auto; padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.chat-intro { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); max-width: 420px; }
.chat-intro h3 { color: var(--text); font-size: 20px; }
.msg { display: flex; gap: 10px; max-width: 86%; animation: msgIn .35s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.msg.user { align-self: flex-end; flex-direction: column; align-items: flex-end; }
.msg.user .bubble { background: var(--grad); color: #fff; border-radius: 20px 20px 6px 20px; padding: 11px 16px; box-shadow: 0 10px 24px -14px rgba(108, 92, 231, .7); white-space: pre-wrap; }
.msg time { font-size: 11px; color: var(--muted); padding: 0 6px; }
.msg.mentor { align-self: flex-start; }
.msg-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.msg.mentor .bubble { background: var(--solid); border: 1px solid var(--border); border-radius: 6px 20px 20px 20px; padding: 13px 17px; box-shadow: var(--shadow-sm); }
[data-theme="dark"] .msg.mentor .bubble { background: var(--surface-2); box-shadow: none; }
.msg.mentor.checkin .bubble { border-color: rgba(255, 181, 71, .35); background: linear-gradient(135deg, rgba(255, 181, 71, .08), var(--surface-2)); }
.msg-tools { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .2s; }
.msg:hover .msg-tools { opacity: 1; }
.tool { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.tool:hover { background: var(--surface-2); color: var(--text); }
.caret { display: inline-block; width: 8px; height: 17px; margin-inline-start: 2px; vertical-align: text-bottom; background: var(--primary-2); border-radius: 2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.mem-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mem-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(124, 92, 255, .12); border: 1px dashed rgba(124, 92, 255, .5); color: var(--text-2); animation: memIn .6s var(--ease); }
.mem-chip .ic { color: var(--primary); }
@keyframes memIn { 0% { opacity: 0; transform: scale(.8); } 60% { transform: scale(1.05); } }
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(255, 181, 71, .14), rgba(255, 122, 69, .06)); border: 1px solid rgba(255, 181, 71, .4); animation: memIn .6s var(--ease); }
.suggest > div:first-child { display: flex; align-items: center; gap: 10px; }
.suggest > div:first-child > .ic { color: var(--gold); }
.suggest small { display: block; font-size: 11.5px; color: var(--gold); }
.suggest b { font-size: 14px; }
.colleague { display: flex; gap: 6px; flex-wrap: wrap; }
.composer-wrap { padding: 10px 18px 12px; border-top: 1px solid var(--border); }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { flex: none; font-size: 12.5px; padding: 6px 12px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px; padding-inline-start: 16px; border-radius: 18px; background: var(--solid); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); transition: .25s; }
.composer:focus-within { border-color: rgba(124, 92, 255, .6); box-shadow: var(--glow); }
.composer textarea { flex: 1; background: none; border: 0; outline: none; resize: none; padding: 9px 0; line-height: 1.6; max-height: 200px; min-height: 24px; }
.composer .send { width: 44px; height: 44px; padding: 0; border-radius: 14px; flex: none; }
.composer .send.stop { background: var(--danger); box-shadow: none; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; justify-content: center; }

/* markdown */
.md { overflow-wrap: anywhere; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md .table-wrap, .md .code { margin: 0 0 10px; }
.md h3, .md h4, .md h5, .md h6 { margin: 14px 0 6px; font-size: 15.5px; color: var(--text); }
.md h3 { font-size: 17px; }
.md ul, .md ol { padding-inline-start: 22px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--primary-2); }
.md strong { color: var(--text); font-weight: 600; }
.md em { color: var(--text-2); }
.md a { color: var(--primary-2); text-decoration: underline; }
.md blockquote { border-inline-start: 3px solid var(--primary); padding: 6px 14px; background: rgba(124, 92, 255, .08); border-radius: 0 12px 12px 0; color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.md .table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.md th, .md td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: start; }
.md th { background: var(--surface-2); font-weight: 600; }
.md tr:last-child td { border-bottom: 0; }
.md .code { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #1B1F3B; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; font-size: 11.5px; color: #8E95C0; background: rgba(255, 255, 255, .04); font-family: var(--mono); }
.copy-code { font-size: 11.5px; color: #B8BEE8; padding: 2px 8px; border-radius: 6px; }
.copy-code:hover { background: rgba(255, 255, 255, .08); }
.md pre { margin: 0; padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: #E6E8FF; }
.md pre code { background: none; padding: 0; font-size: inherit; }

/* ---------- council ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; font-size: 13.5px; color: var(--text-2); transition: .2s; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 18px -8px rgba(124, 92, 255, .9); }
.council-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; height: calc(100dvh - 200px); min-height: 560px; }
.table-card { padding: 10px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 55%, rgba(124, 108, 255, .08), transparent 65%), var(--surface); }
.round-table { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1 / .96; }
.links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.links line { stroke: var(--border-2); stroke-width: 1.5; stroke-dasharray: 4 6; transition: .5s; opacity: .5; }
.links line.on { stroke: var(--primary-2); stroke-width: 2.5; opacity: 1; stroke-dasharray: 8 8; animation: flow 1s linear infinite; filter: drop-shadow(0 0 6px var(--primary-2)); }
@keyframes flow { to { stroke-dashoffset: -32; } }
.table-surface { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .2) 55%, transparent 70%), conic-gradient(from 200deg, #DCD3FF, #CFEAFF, #D2F7EE, #FFE6D5, #DCD3FF);
  box-shadow: 0 34px 60px -30px rgba(60, 60, 140, .45), inset 0 0 0 8px rgba(255, 255, 255, .7), inset 0 0 40px rgba(108, 92, 231, .12); display: grid; place-items: center; }
[data-theme="dark"] .table-surface { background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .14), transparent 55%), conic-gradient(from 200deg, #3B2F7A, #1C3E6E, #1E5E78, #3B2F7A); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8), inset 0 0 0 6px rgba(255, 255, 255, .06), inset 0 0 60px rgba(34, 211, 238, .25); }
.table-core { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 70%; }
.table-stage { width: 74%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 16px 34px -18px rgba(60, 60, 140, .6), 0 0 0 5px rgba(255, 255, 255, .85); }
@keyframes float { 50% { transform: translateY(-5px); } }
.table-core span { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .4s var(--ease), opacity .4s, filter .4s; z-index: 2; }
.seat .av { transition: box-shadow .4s, transform .4s var(--ease); box-shadow: 0 0 0 4px var(--solid), 0 12px 26px -12px rgba(40, 40, 110, .45); }
.seat:hover .av { transform: scale(1.06); }
.seat-name { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--solid); border: 1px solid var(--border); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.seat.director .seat-name { color: var(--gold); border-color: rgba(255, 181, 71, .45); }
.seat.director .av { box-shadow: 0 0 0 4px var(--solid), 0 0 0 6px rgba(255, 181, 71, .7), 0 12px 26px -12px rgba(245, 158, 11, .7); }
.seat.assigned .av { box-shadow: 0 0 0 4px var(--solid), 0 0 0 6px var(--primary-2), 0 0 30px -6px var(--primary-2); }
.seat.speaking { transform: translate(-50%, -50%) scale(1.16); z-index: 3; }
.seat.speaking .av { box-shadow: 0 0 0 4px var(--solid), 0 0 0 7px var(--primary), 0 0 40px 0 rgba(108, 92, 231, .55); animation: speak 1.2s ease-in-out infinite; }
@keyframes speak { 50% { box-shadow: 0 0 0 4px var(--solid), 0 0 0 8px var(--primary-2), 0 0 50px 4px rgba(56, 194, 242, .5); } }
.seat.dim { opacity: .45; filter: grayscale(.5); }
.tx-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tx { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.tx-empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); max-width: 460px; }
.tx-empty h3 { color: var(--text); font-size: 19px; }
.tx-empty > .ic { color: var(--primary-2); }
.tx-user { align-self: flex-end; max-width: 86%; background: var(--grad); color: #fff; padding: 10px 16px; border-radius: 18px 18px 6px 18px; animation: msgIn .35s var(--ease); }
.tx-user.interjection { background: linear-gradient(135deg, #F472B6, #A855F7); }
.tx-label { display: block; font-size: 11px; opacity: .8; }
.tx-decision { display: flex; gap: 10px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 181, 71, .07); border: 1px solid rgba(255, 181, 71, .3); animation: msgIn .35s var(--ease); }
.tx-decision > div { flex: 1; min-width: 0; }
.tx-decision small { color: var(--gold); font-size: 11.5px; display: inline-flex; gap: 4px; align-items: center; }
.tx-decision p { font-size: 14px; }
.assign { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.as { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 8px; border-radius: 10px; background: var(--surface-2); }
.as b { font-weight: 600; flex: none; }
.as em { font-style: normal; color: var(--text-2); }
.tx-msg { padding: 14px 16px; border-radius: 18px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); animation: msgIn .35s var(--ease); }
[data-theme="dark"] .tx-msg { background: var(--surface-2); box-shadow: none; }
.tx-msg.live { border-color: rgba(124, 92, 255, .5); box-shadow: 0 0 0 4px rgba(124, 92, 255, .08); }
.tx-msg.synth { background: linear-gradient(135deg, rgba(255, 181, 71, .12), rgba(124, 92, 255, .08)); border-color: rgba(255, 181, 71, .45); }
.tx-who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tx-who b { display: block; font-size: 14.5px; }
.tx-who small { display: block; font-size: 11.5px; color: var(--muted); }
.tx-msg.synth .tx-who small { color: var(--gold); }
.tx-task { font-size: 12px; color: var(--primary-2); margin-bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(34, 211, 238, .08); }
.tx-actions { margin-top: 10px; }
.hire { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--grad-soft); border: 1px dashed rgba(124, 92, 255, .6); }
.hire > .ic { color: var(--primary-2); flex: none; }
.hire div { flex: 1; }
.hire b { display: block; font-size: 13.5px; }
.hire small { font-size: 12px; color: var(--muted); }
.tx-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.tx-foot > .row, .tx-foot > .link { align-self: center; }
.rt-setup { display: flex; flex-direction: column; gap: 10px; }
.rt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rt-row .btn { margin-inline-start: auto; }
.mentor-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mp { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; padding-inline-start: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; transition: .2s var(--ease); }
.mp:hover { border-color: var(--border-2); }
.mp.on { border-color: var(--primary); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.mp .av { border-radius: 50%; }
.hist { display: flex; flex-direction: column; gap: 8px; }
.hist-item { display: flex; align-items: center; gap: 6px; }
.hist-item > button:first-child { flex: 1; text-align: start; display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.hist-item > button:first-child:hover { border-color: var(--border-2); }
.hist-item .tag { align-self: flex-start; }

/* ---------- paths ---------- */
.path-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.path-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); transition: .3s var(--ease); }
.path-card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, .5); box-shadow: var(--shadow); }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-top > div { flex: 1; min-width: 0; }
.pc-top h3 { font-size: 16.5px; }
.path-card > p { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pc-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pc-next { font-size: 13px; padding: 8px 12px; border-radius: 12px; background: var(--grad-soft); display: flex; align-items: center; gap: 6px; }
.pc-next.done { background: rgba(255, 181, 71, .12); color: var(--gold); }
.path-card.add { align-items: center; justify-content: center; border-style: dashed; color: var(--muted); min-height: 220px; }
.path-card.add b { color: var(--text); }
.path-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 26px; padding: 24px; background: linear-gradient(120deg, #F1EDFF, #EAF6FF 60%, #F2FFF9); border-color: rgba(255, 255, 255, .9); }
[data-theme="dark"] .path-hero { background: linear-gradient(135deg, rgba(124, 92, 255, .14), rgba(34, 211, 238, .06)); border-color: var(--border); }
.ph-main { display: flex; gap: 18px; align-items: center; flex: 1; min-width: 280px; }
.ph-main h1 { font-size: 25px; margin: 4px 0 6px; }
.ph-main p { color: var(--text-2); margin-bottom: 10px; max-width: 640px; }
.ph-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ph-side .ring-label { font-size: 20px; }
.journey { position: relative; max-width: 760px; margin: 0 auto; padding: 10px 0 30px; }
.road { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.road-base { fill: none; stroke: #E6E3FA; stroke-width: 20; stroke-linecap: round; }
[data-theme="dark"] .road-base { stroke: var(--surface-3); }
.road-dash { fill: none; stroke: var(--border-2); stroke-width: 2; stroke-dasharray: 6 10; }
.road-done { fill: none; stroke: url(#roadGrad); stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 2px 6px rgba(108, 92, 231, .45)); }
.journey-start, .journey-end { position: relative; z-index: 1; margin: 0 auto; width: max-content; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--solid); border: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.journey-end { margin-top: 26px; padding: 14px 22px; font-size: 15px; }
.journey-end.done { color: var(--gold); border-color: rgba(255, 181, 71, .5); box-shadow: 0 0 40px -6px rgba(255, 181, 71, .6); }
.module { position: relative; z-index: 1; margin-top: 26px; }
.module-banner { display: flex; align-items: center; gap: 12px; margin: 0 auto 14px; width: min(100%, 520px); padding: 12px 16px; border-radius: 16px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.mnum { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; flex: none; }
.module-banner b { display: block; font-size: 15px; }
.module-banner small { display: block; font-size: 12px; color: var(--muted); }
.node-row { display: flex; justify-content: center; padding: 9px 0; transform: translateX(var(--x)); }
.node { display: flex; align-items: center; gap: 12px; text-align: start; }
.node-dot { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--solid); border: 3px solid var(--border-2); color: var(--muted); transition: .3s var(--ease); box-shadow: 0 10px 20px -12px rgba(40, 40, 110, .45); }
.node-card { padding: 8px 14px; border-radius: 14px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); max-width: 260px; transition: .3s var(--ease); }
.node-card b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.node-card small { font-size: 11.5px; color: var(--muted); }
.node-card em { color: var(--primary-2); font-style: normal; font-weight: 600; }
.node:hover .node-dot { transform: scale(1.1); border-color: var(--primary); color: var(--text); }
.node:hover .node-card { border-color: var(--border-2); transform: translateX(-3px); }
.node.done .node-dot { background: linear-gradient(135deg, #10B981, #34D399); border-color: transparent; color: #04231A; }
.node.done .node-card { opacity: .8; }
.node.next .node-dot { background: var(--grad); border-color: transparent; color: #fff; animation: nextPulse 2s ease-in-out infinite; }
.node.next .node-card { border-color: rgba(124, 92, 255, .6); box-shadow: var(--glow); }
@keyframes nextPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, .6); } 50% { box-shadow: 0 0 0 14px rgba(124, 92, 255, 0); } }
.lesson-detail { display: flex; flex-direction: column; gap: 10px; }
.lesson-detail h4 { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); margin-top: 8px; }
.lesson-detail h4 .ic { color: var(--primary-2); }
.outline { margin: 0; padding-inline-start: 22px; }
.outline li { margin: 4px 0; }
.outline li::marker { color: var(--primary-2); font-weight: 700; }
.exercise { padding: 12px 14px; border-radius: 14px; background: #FFF7EA; border: 1px solid rgba(224, 144, 15, .25); }
[data-theme="dark"] .exercise { background: rgba(255, 181, 71, .09); }
.resources { margin: 0; padding-inline-start: 20px; color: var(--text-2); font-size: 14px; }
.lesson-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.gen { padding: 10px 0; }
.gen-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.gen-stage .av { border-radius: 34%; box-shadow: var(--glow); }
.gen-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: min(100%, 380px); text-align: start; }
.gen-steps li { padding: 9px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; transition: .4s; display: flex; align-items: center; gap: 10px; }
.gen-steps li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); flex: none; }
.gen-steps li.now { color: var(--text); border: 1px solid rgba(124, 92, 255, .5); }
.gen-steps li.now::before { background: var(--primary-2); box-shadow: 0 0 10px var(--primary-2); animation: av-bubble .8s infinite; }
.gen-steps li.done { color: var(--text-2); }
.gen-steps li.done::before { background: var(--success); }

/* ---------- goals ---------- */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.goal-card { display: flex; flex-direction: column; gap: 14px; transition: .3s var(--ease); }
.goal-card:hover { border-color: var(--border-2); }
.goal-card.is-done { background: linear-gradient(135deg, #FFF6E6, var(--solid)); border-color: rgba(224, 144, 15, .25); }
[data-theme="dark"] .goal-card.is-done { background: linear-gradient(135deg, rgba(255, 181, 71, .1), var(--surface)); }
.goal-card.loading { opacity: .7; pointer-events: none; }
.gc-top { display: flex; gap: 14px; align-items: flex-start; }
.gc-title { flex: 1; min-width: 0; }
.gc-title h3 { font-size: 16.5px; }
.gc-title p { font-size: 13px; margin-top: 4px; }
.smart { display: block; font-size: 12px; color: var(--primary-2); margin-top: 3px; }
.gc-menu { display: flex; gap: 2px; opacity: .6; transition: .2s; }
.goal-card:hover .gc-menu { opacity: 1; }
.gc-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gc-mentor { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 10px 2px 3px; padding-inline-start: 3px; border-radius: 999px; background: var(--surface-2); }
.milestones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.milestones label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; font-size: 13.5px; transition: .2s; }
.milestones label:hover { background: var(--surface-2); }
.milestones input { display: none; }
.milestones .cb { width: 20px; height: 20px; border-radius: 7px; border: 2px solid var(--border-2); display: grid; place-items: center; flex: none; color: transparent; transition: .25s var(--ease); }
.milestones input:checked + .cb { background: linear-gradient(135deg, #10B981, #34D399); border-color: transparent; color: #04231A; transform: scale(1.08); }
.milestones label > span:last-of-type { flex: 1; }
.milestones li.done label > span:last-of-type { text-decoration: line-through; color: var(--muted); }
.milestones small { font-size: 11px; color: var(--muted); }
.no-ms { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--grad-soft); font-size: 13.5px; }
.no-ms span { flex: 1; }
.no-ms > .ic { color: var(--primary-2); }
.first-step { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .25); }
.first-step > .ic { color: var(--gold); flex: none; margin-top: 3px; }
.first-step small { color: var(--gold); font-size: 11.5px; }
.first-step p { font-size: 13.5px; }
.motivation { font-size: 13px; color: var(--text-2); font-style: italic; }
.gc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.done-goals { margin-top: 26px; }
.done-goals summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 600; margin-bottom: 14px; list-style: none; }
.ms-edit { display: flex; flex-direction: column; gap: 6px; }
.ms-row { display: flex; gap: 6px; align-items: center; }

/* ---------- memory ---------- */
.mem-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; }
.mem-tab { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; padding-inline-start: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; white-space: nowrap; transition: .2s; }
.mem-tab.on { border-color: var(--primary); background: var(--grad-soft); }
.mem-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.mh-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mh-info h2 { font-size: 20px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 8px; background: #EEF1FF; color: #4F46E5; border: 1px solid rgba(79, 70, 229, .18); }
[data-theme="dark"] .file-chip { background: #0B0E1C; color: #A5F3FC; border-color: rgba(34, 211, 238, .25); }
.mh-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.how { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 18px; margin-bottom: 16px; font-size: 13px; color: var(--text-2); align-items: center; }
.how > span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-2); }
.mem-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mem-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 10px; }
.mem-sec h3 small { margin-inline-start: auto; font-size: 11.5px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ms-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.mem-sec ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.mem-sec li { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; transition: .2s; }
.mem-sec li span { flex: 1; }
.mem-sec li .icon-btn { opacity: 0; }
.mem-sec li:hover .icon-btn { opacity: 1; }
.mem-sec li.removing { opacity: 0; transform: translateX(20px); }
.mem-sec li.empty-li { background: none; font-size: 12.5px; }
.mem-add { display: flex; gap: 6px; }
.raw textarea { width: 100%; min-height: 460px; font-family: var(--mono); font-size: 13px; line-height: 1.8; padding: 18px; border-radius: 14px; background: #FBFBFE; color: var(--text); border: 1px solid var(--border-2); outline: none; resize: vertical; margin-bottom: 12px; }
[data-theme="dark"] .raw textarea { background: #0B0E1C; color: #E6E8FF; }

/* ---------- forge ---------- */
.tpl-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 18px; align-items: center; }
.tpl-strip > span { flex: none; }
.tpl { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; padding-inline-start: 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: .2s var(--ease); text-align: start; }
.tpl-av { width: 46px; height: 46px; border-radius: 14px; overflow: hidden; flex: none; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a2) 42%, #fff), color-mix(in srgb, var(--a1) 55%, #fff)); }
.tpl-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transform: scale(1.1); }
.tpl b { display: block; font-size: 13px; }
.tpl small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.tpl:hover { transform: translateY(-2px); border-color: var(--border-2); }
.tpl.on { border-color: var(--primary); background: var(--grad-soft); }
.forge-layout { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.forge-preview { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.pv-stage { position: relative; border-radius: 22px; padding: 22px 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--a2) 40%, transparent), transparent 65%), radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--a1) 35%, transparent), transparent 70%); transition: background .5s; }
.pv-av { width: 100%; max-width: 290px; aspect-ratio: 5 / 6; border-radius: 30px; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(40, 40, 110, .55), 0 0 0 4px rgba(255, 255, 255, .85); }
.moods { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; justify-content: center; }
.moods button { padding: 5px 10px; border-radius: 9px; font-size: 12px; color: var(--text-2); }
.moods button.on { background: var(--surface-3); color: var(--text); }
.pv-stage .dice { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--surface-2); }
.forge-preview h2 { text-align: center; font-size: 21px; }
.speech { position: relative; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; line-height: 1.7; }
.speech small { display: block; font-size: 11px; color: var(--primary-2); margin-bottom: 2px; }
.speech::before { content: ''; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; background: inherit; border-top: 1px solid var(--border); border-inline-start: 1px solid var(--border); transform: translateX(-50%) rotate(45deg); }
.pv-traits { display: flex; flex-direction: column; gap: 7px; padding-top: 6px; }
.forge-editor { padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 11px; font-size: 13.5px; color: var(--text-2); white-space: nowrap; transition: .2s; }
.tabs button:hover { background: var(--surface-2); }
.tabs button.on { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .35); }
.tab-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-height: 420px; }
.sliders { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.trait-slider { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ts-head { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.ts-head output { font-weight: 700; color: var(--primary-2); font-variant-numeric: tabular-nums; }
.ts-ends { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.look-tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.look-tabs > button:not(.btn) { padding: 6px 13px; border-radius: 999px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.look-tabs > button.on { border-color: var(--primary); color: var(--text); background: var(--grad-soft); }
.look-tabs .btn { margin-inline-start: auto; }
.look-body h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 14px 0 8px; }
.look-body h4:first-child { margin-top: 0; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { padding: 7px 13px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; transition: .15s; }
.opt:hover { border-color: var(--border-2); }
.opt.on { border-color: var(--primary); background: var(--grad-soft); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 0 0 1px var(--border); transition: .2s var(--ease); }
.sw:hover { transform: scale(1.12); }
.sw.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--primary-2); transform: scale(1.08); }
.aura-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.aura { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; }
.aura span { width: 100%; aspect-ratio: 1.6; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.aura.on { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.rule-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.look-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.look-bar .btn { margin-inline-start: auto; }
.seg.sm button { padding: 6px 12px; font-size: 12.5px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px; }
.model-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px; border-radius: 18px; background: var(--solid); border: 2px solid var(--border); transition: .2s var(--ease); font-size: 12px; text-align: center; }
.model-card b { font-weight: 500; line-height: 1.35; color: var(--text-2); }
.mc-img { width: 84px; height: 84px; border-radius: 26px; overflow: hidden; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--a2) 40%, #fff), color-mix(in srgb, var(--a1) 50%, #fff)); }
.mc-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transform: scale(1.1); transition: transform .3s var(--ease); }
.model-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.model-card:hover .mc-img img { transform: scale(1.18); }
.model-card.on { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108, 92, 231, .14); }
.model-card.on b { color: var(--primary); font-weight: 600; }
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.look-grid h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.aura-row { display: flex; gap: 8px; flex-wrap: wrap; }
.aura-dot { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 1px var(--border); transition: .2s var(--ease); }
.aura-dot:hover { transform: scale(1.1); }
.aura-dot.on { box-shadow: 0 0 0 3px var(--solid), 0 0 0 5px var(--primary); }
.credit { display: flex; align-items: center; gap: 6px; }
.forge-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
.set-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 14px; }
.set-card h2 .ic { color: var(--primary-2); }
.set-card > p { margin-bottom: 12px; }
.conn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; }
.conn i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.conn b { display: block; }
.conn small { color: var(--muted); font-size: 12.5px; }
.conn.live { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); }
.conn.live i { background: var(--success); box-shadow: 0 0 12px var(--success); }
.conn.mock { background: rgba(255, 181, 71, .08); border: 1px solid rgba(255, 181, 71, .3); }
.conn.mock i { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.dir-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dir-row > div { flex: 1; }
.dir-row b { display: block; font-size: 16px; }

/* ---------- onboarding ---------- */
.onb { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.onb-card { width: min(860px, 100%); padding: 36px; border-radius: 32px; background: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .95); backdrop-filter: blur(24px); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 22px; animation: enter .6s var(--ease); }
[data-theme="dark"] .onb-card { background: var(--surface); border-color: var(--border); }
.onb-dots { display: flex; gap: 6px; justify-content: center; }
.onb-dots i { width: 8px; height: 8px; border-radius: 8px; background: var(--surface-3); transition: .4s var(--ease); }
.onb-dots i.on { width: 30px; background: var(--grad); }
.onb-dots i.done { background: var(--primary); }
.onb-director { display: flex; gap: 18px; align-items: flex-start; }
.onb-av { width: 140px; height: 140px; border-radius: 34%; overflow: hidden; flex: none; box-shadow: 0 20px 44px -18px rgba(224, 144, 15, .6), 0 0 0 4px rgba(255, 255, 255, .85); }
.onb-av.big { width: 220px; height: 220px; }
.bubble-say { position: relative; flex: 1; padding: 16px 20px; border-radius: 6px 22px 22px 22px; background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-height: 90px; }
.bubble-say b { color: var(--gold); font-size: 13px; }
.bubble-say p { font-size: 16px; line-height: 1.8; margin-top: 2px; }
.onb-form { display: flex; gap: 10px; }
.onb-form.col { flex-direction: column; }
.onb-form > .input { flex: 1; }
.onb-form textarea { resize: none; }
.ok-note { color: var(--success); font-size: 13.5px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.onb-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.onb-pillars > div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: var(--solid); border: 1px solid var(--border); }
.onb-pillars .ic { color: var(--primary-2); }
.onb-pillars b { font-size: 13.5px; }
.onb-pillars small { font-size: 11.5px; color: var(--muted); }
.login-card { width: min(420px, 100%); align-items: center; text-align: center; }
.login-card img { border-radius: 18px; box-shadow: 0 12px 30px -10px rgba(108, 92, 231, .6); }
.login-card h2 { font-size: 24px; }
.login-card form { width: 100%; }
.onb-thinking { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 30px 0; }
.onb-thinking h2 { font-size: 22px; }
.proposal { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.prop-card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 20px 16px; border-radius: 22px; background: var(--solid); border: 2px solid rgba(108, 92, 231, .35); box-shadow: var(--shadow-sm); transition: .3s var(--ease); animation: rise .6s var(--ease) both; }
.prop-card:nth-child(2) { animation-delay: .12s; }
.prop-card:nth-child(3) { animation-delay: .24s; }
.prop-card.off { opacity: .45; border-color: var(--border); filter: grayscale(.7); }
.prop-toggle { position: absolute; top: 12px; inset-inline-end: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; z-index: 1; }
.prop-card.off .prop-toggle { background: var(--surface-3); }
.prop-av { position: relative; width: 120px; height: 120px; }
.prop-av > .av { border-radius: 34%; }
.prop-av .dice { position: absolute; bottom: -6px; inset-inline-start: -6px; background: var(--solid); border: 1px solid var(--border); }
.prop-card h3 { font-size: 18px; margin-top: 6px; }
.prop-title { font-size: 13px; color: var(--primary-2); }
.prop-desc { font-size: 12.5px; color: var(--muted); }
.prop-quote { font-size: 12.5px; color: var(--gold); font-style: italic; }
.mini-traits { display: flex; gap: 6px; justify-content: center; width: 100%; }
.mini-traits span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13px; flex: 1; max-width: 42px; }
.mini-traits i { display: block; width: 100%; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.mini-traits i b { display: block; height: 100%; background: var(--grad); }

/* ---------- overlays ---------- */
.modal-back, .drawer-back { position: fixed; inset: 0; z-index: 60; background: var(--backdrop); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.modal-back { display: grid; place-items: center; padding: 20px; }
.modal-back.show, .drawer-back.show { opacity: 1; }
.modal, .drawer { background: var(--solid); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 40px); border-radius: 26px; transform: translateY(16px) scale(.97); transition: transform .3s var(--ease); }
.modal.wide { width: min(720px, 100%); }
.modal-back.show .modal { transform: none; }
.drawer { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(480px, 100%); border-radius: 26px 0 0 26px; transform: translateX(-100%); transition: transform .35s var(--ease); }
.drawer-back.show .drawer { transform: none; }
.modal-head, .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3, .drawer-head h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.modal-body, .drawer-body { padding: 20px 22px; overflow-y: auto; }
.confirm-text { font-size: 15px; margin-bottom: 18px; line-height: 1.8; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 16px; background: var(--solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 14px; opacity: 0; transform: translateY(14px) scale(.96); transition: .35s var(--ease); }
.toast.show { opacity: 1; transform: none; }
.toast a { color: var(--primary-2); text-decoration: underline; }
.toast.success { border-color: rgba(52, 211, 153, .45); }
.toast.success .ic { color: var(--success); }
.toast.error { border-color: rgba(229, 72, 77, .45); color: #B42318; }
[data-theme="dark"] .toast.error { color: #FECACA; }
.toast.gold { border-color: rgba(255, 181, 71, .55); background: linear-gradient(135deg, rgba(255, 181, 71, .16), var(--solid)); }
.toast.gold .ic { color: var(--gold); }
.toast .ic { flex: none; color: var(--primary-2); }
.levelup { display: flex; flex-direction: column; gap: 2px; }
.levelup b { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--gold); }
.xp-float { position: fixed; z-index: 90; transform: translateX(-50%); font-weight: 700; font-size: 15px; color: var(--gold); text-shadow: 0 2px 12px rgba(255, 181, 71, .7); pointer-events: none; animation: xpUp 1.4s var(--ease) forwards; }
@keyframes xpUp { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, 40px); } }
#confetti { position: fixed; inset: 0; z-index: 95; pointer-events: none; display: none; width: 100vw; height: 100vh; }
.bell-wrap { position: relative; }
.bell-pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 330px; padding: 14px; border-radius: 18px; background: var(--solid); border: 1px solid var(--border-2); box-shadow: var(--shadow); z-index: 40; display: flex; flex-direction: column; gap: 6px; animation: enter .25s var(--ease); }
.bell-pop h4 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 4px; }
.rem { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; font-size: 13px; background: var(--surface-2); }
.rem:hover { background: var(--surface-3); }
.rem .ic { flex: none; margin-top: 3px; color: var(--primary-2); }
.rem.warn .ic { color: var(--warn); }
.rem.danger .ic { color: var(--danger); }
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 16px; background: var(--bg); transition: opacity .5s; }
.splash img { border-radius: 20px; animation: float 2s ease-in-out infinite; box-shadow: 0 16px 40px -10px rgba(124, 92, 255, .8); }
.splash.hide { opacity: 0; pointer-events: none; }
.scrim { display: none; }
.bottom-nav { display: none; }
.menu-btn { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .home-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .council-grid { grid-template-columns: 1fr; height: auto; }
  .table-card { min-height: 0; }
  .round-table { max-width: 440px; }
  .tx-card { height: 70dvh; }
  .forge-layout { grid-template-columns: 290px 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 290px; z-index: 70; transform: translateX(100%); transition: transform .35s var(--ease); background: var(--solid); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .view { padding: 4px 16px 96px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--solid) 90%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -18px rgba(40, 40, 110, .3); justify-content: space-around; }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--muted); padding: 4px 10px; border-radius: 12px; }
  .bottom-nav a.on { color: var(--text); }
  .bottom-nav a.on { color: var(--primary); }
  .bottom-nav a.on .ic { color: var(--primary); }
  .chat-layout { grid-template-columns: 1fr; height: calc(100dvh - 150px); }
  .mentor-panel { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(330px, 88vw); z-index: 70; transform: translateX(-110%); transition: transform .35s var(--ease); border-radius: 26px 0 0 26px; background: var(--solid); }
  .mentor-panel.open { transform: none; box-shadow: var(--shadow); }
  .only-mobile { display: inline-grid; width: auto; height: auto; }
  .ch-actions .btn span { display: none; }
  .forge-layout { grid-template-columns: 1fr; }
  .forge-preview { position: static; }
  .pv-av { max-width: 240px; }
  .look-grid { grid-template-columns: 1fr; }
  .sliders { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .goal-grid, .path-grid, .mem-sections { grid-template-columns: 1fr; }
  .crumb { display: none; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hero { flex-direction: column; text-align: center; padding: 22px 18px; gap: 14px; }
  .hero-av { width: 128px; height: 128px; }
  .hero-title { font-size: 23px; }
  .focus a { text-align: start; }
  .askbar kbd { display: none; }
  .stats { gap: 10px; }
  .stat { padding: 12px; gap: 10px; flex-direction: column; text-align: center; }
  .stat-ic { width: 46px; height: 46px; border-radius: 15px; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mentor-card { padding: 14px 10px 12px; }
  .mentor-card .mc-av .av { --s: 64px !important; }
  .mentor-card.add { min-height: 180px; }
  .page-head h1 { font-size: 23px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .onb-card { padding: 22px 16px; border-radius: 24px; gap: 16px; }
  .onb-director { flex-direction: column; align-items: center; text-align: center; }
  .onb-av { width: 90px; height: 90px; }
  .bubble-say { border-radius: 22px; }
  .bubble-say p { font-size: 14.5px; }
  .onb-form { flex-direction: column; }
  .onb-pillars { grid-template-columns: 1fr 1fr; }
  .msg { max-width: 94%; }
  .msgs { padding: 16px 12px 6px; }
  .composer-wrap { padding: 8px 10px 10px; }
  .hint { display: none; }
  .seat .av { --s: 54px !important; }
  .seat-name { font-size: 10.5px; padding: 1px 7px; }
  .seg button { padding: 7px 10px; font-size: 12.5px; }
  .node-card { max-width: 190px; }
  .node-dot { width: 48px; height: 48px; }
  .node-row { transform: translateX(calc(var(--x) * .45)); }
  .aura-grid { grid-template-columns: repeat(2, 1fr); }
  .top-actions .pill small { display: none; }
  .mode-pill { display: none !important; }
  .bell-pop { width: min(330px, calc(100vw - 32px)); inset-inline-end: -60px; }
  .path-hero { padding: 18px; }
  .ph-main { flex-direction: column; text-align: center; }
  .ph-side { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
