/* ─── TOKENS DARK ─── */
:root {
  --bg:       #07111E;
  --bg2:      #0D1E35;
  --bg3:      #122040;
  --bg4:      #1A2E4A;
  --border:   rgba(255,255,255,.08);
  --border2:  rgba(255,255,255,.05);
  --gold:     #D4A843;
  --gold2:    #EFC45A;
  --gold3:    #F5E09A;
  --text:     #F7F4EE;
  --text2:    #B8AD9E;
  --muted:    #7A7268;
  --muted2:   #4A4540;
  --green:    #3DB87A;
  --r:        11px;
  --rl:       16px;
  --m: 'Montserrat', system-ui, sans-serif;
  --o: 'Open Sans', system-ui, sans-serif;
  --safe-t: env(safe-area-inset-top,0px);
  --safe-b: env(safe-area-inset-bottom,0px);
  --sidebar-w: 280px;
}

/* ─── TOKENS LIGHT ─── */
[data-theme="light"] {
  --bg:      #F0EDE8;
  --bg2:     #E8E4DC;
  --bg3:     #DEDAD0;
  --bg4:     #D4CFC4;
  --border:  rgba(0,0,0,.1);
  --border2: rgba(0,0,0,.06);
  --text:    #1A1410;
  --text2:   #3A3228;
  --muted:   #6A6258;
  --muted2:  #9A9288;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--o);
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

/* ══════════════════════════════════════════
   APP SHELL — DESKTOP: sidebar + main
══════════════════════════════════════════ */
.app {
  display: flex;
  height: 100dvh;
  max-width: 1280px;
  margin: 0 auto;
}

/* ─── SIDEBAR (desktop only) ─── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg2);
  overflow: hidden;
  transition: background .3s;
}

.sidebar-hdr {
  padding: calc(18px + var(--safe-t)) 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sb-greeting { font-family: var(--o); font-size: 11px; color: var(--muted); }
.sb-name {
  font-family: var(--m); font-size: 22px; font-weight: 900;
  color: var(--text); letter-spacing: -.04em; line-height: 1.1; margin-top: 2px;
}
.sb-name span { color: var(--gold); }

.sb-status {
  display: flex; align-items: center; gap: 5px; margin-top: 10px;
  background: rgba(61,184,122,.1); border: 1px solid rgba(61,184,122,.2);
  border-radius: 99px; padding: 4px 10px; width: fit-content;
}
.sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: blip 2.5s infinite; }
.sdot.busy { background: var(--gold); animation: blip .8s infinite; }
@keyframes blip{0%,100%{opacity:1;}50%{opacity:.3;}}
.slbl { font-family: var(--o); font-size: 11px; color: var(--green); font-weight: 600; }

.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}
.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.sb-section { font-family: var(--m); font-size: 9px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; padding: 8px 10px 5px; }

.sb-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
  margin-bottom: 1px;
  border: none; background: none; width: 100%; text-align: left;
}
.sb-btn:hover { background: var(--border); }
.sb-btn.active { background: rgba(212,168,67,.12); }
.sb-btn-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(212,168,67,.10);
  border: 1px solid rgba(212,168,67,.14);
  font-size: 16px;
  line-height: 1;
}
.ui-icon { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.sb-btn-icon .ui-icon { width: 17px; height: 17px; }
.sb-btn-txt { flex: 1; min-width: 0; }
.sb-btn-name {
  font-family: var(--m);
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.sb-btn-meta { font-family: var(--o); font-size: 10px; color: var(--muted); margin-top: 1px; }
.sb-btn-sal {
  font-family: var(--m);
  font-size: 9px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: 2px;
}

.sb-divider { height: 1px; background: var(--border); margin: 6px 10px; }

.sb-footer {
  padding: 12px 10px calc(12px + var(--safe-b));
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.sb-action {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
  border: none; background: none; width: 100%;
  font-family: var(--o); font-size: 12px; color: var(--text2); font-weight: 500;
}
.sb-action:hover { background: var(--border); }
.sb-action.gold { color: var(--gold); }
.sb-action svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ─── MAIN PANEL ─── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* topbar (mobile header + desktop sub-header) */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-t)) 20px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
  gap: 12px;
  transition: background .3s;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title { font-family: var(--m); font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-sub { font-family: var(--o); font-size: 11px; color: var(--muted); white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* mobile brand (hidden on desktop) */
.mobile-brand { display: none; }
.mobile-brand .sb-name { font-size: 18px; }

/* theme toggle */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; transition: background .2s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg4); }
.theme-icon { width: 17px; height: 17px; }

.btn-back {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  font-family: var(--o); font-size: 12px; color: var(--text2); font-weight: 500;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.btn-back:hover { background: var(--bg4); color: var(--text); }

/* progress */
.prog-wrap {
  padding: 0 20px;
  overflow: hidden; transition: max-height .4s ease, opacity .4s;
  max-height: 44px; opacity: 1; flex-shrink: 0;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.prog-wrap.hidden { max-height: 0; opacity: 0; }
.prog-inner { padding: 8px 0; }
.prog-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.prog-lbl { font-family: var(--m); font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.prog-num { font-family: var(--m); font-size: 10px; font-weight: 800; color: var(--gold); }
.prog-track { height: 3px; background: var(--border); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width .5s cubic-bezier(.4,0,.2,1); width: 0; }

/* ── SCROLL AREA ── */
.content-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.content-scroll::-webkit-scrollbar { width: 4px; }
.content-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ══ HOME CONTENT ══ */
.home-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  max-width: 900px;
}

/* banner full-width */
.banner {
  grid-column: 1 / -1;
  background: var(--bg3);
  border: 1px solid rgba(212,168,67,.2);
  border-radius: var(--rl);
  padding: 24px 28px;
  position: relative; overflow: hidden;
  transition: background .3s;
}
.banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(212,168,67,.07) 0%, transparent 55%);
  pointer-events: none;
}
.banner-deco { position: absolute; right: 24px; bottom: -6px; font-size: 80px; opacity: .06; user-select: none; transform: rotate(-8deg); }
.banner-deco .ui-icon { width: 88px; height: 88px; color: var(--gold); stroke-width: 1.3; }
.banner-tag { font-family: var(--m); font-size: 10px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.banner-title { font-family: var(--m); font-size: 32px; font-weight: 900; color: var(--text); line-height: 1.08; letter-spacing: -.04em; margin-bottom: 8px; }
.banner-title em { color: var(--gold); font-style: italic; }
.banner-sub { font-family: var(--o); font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-bottom: 20px; max-width: 520px; }
.banner-sub strong { color: var(--text2); font-weight: 600; }
.banner-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.banner-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--gold); color: var(--bg); border: none;
  border-radius: 10px; padding: 12px 22px;
  font-family: var(--m); font-size: 13px; font-weight: 800;
  cursor: pointer; transition: background .18s, transform .15s; letter-spacing: .01em;
}
.banner-cta:hover { background: var(--gold2); transform: translateY(-1px); }
.banner-cta:active { transform: scale(.96); }
.banner-cta svg { width: 14px; height: 14px; }
.banner-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-family: var(--o);
  font-size: 12.5px;
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 14px;
  transition: color .18s, background .18s, border-color .18s, transform .15s;
}
.banner-ghost:hover {
  color: var(--gold);
  background: rgba(212,168,67,.08);
  border-color: rgba(212,168,67,.35);
  transform: translateY(-1px);
}

/* stats row */
.stats-row {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 10px;
}
.stat-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  transition: background .3s;
}
.stat-n { font-family: var(--m); font-size: 22px; font-weight: 900; color: var(--gold); letter-spacing: -.03em; }
.stat-l { font-family: var(--o); font-size: 11px; color: var(--muted); margin-top: 3px; }

/* feature cards */
.feat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  transition: background .3s, border-color .18s, transform .15s;
  cursor: pointer;
}
.feat-card:hover {
  border-color: rgba(212,168,67,.3);
  background: var(--bg3);
  transform: translateY(-2px);
}
.feat-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(212,168,67,.10);
  border: 1px solid rgba(212,168,67,.14);
  font-size: 22px;
  margin-bottom: 10px;
}
.feat-icon .ui-icon { width: 22px; height: 22px; color: var(--gold); }
.feat-title { font-family: var(--m); font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: -.01em; margin-bottom: 3px; }
.feat-sub { font-family: var(--o); font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ── CHAT VIEW ── */
.chat-wrap {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.chat-panel::-webkit-scrollbar { width: 3px; }
.chat-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* messages */
.msg { display: flex; gap: 8px; animation: msgIn .32s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes msgIn{from{opacity:0;transform:translateY(10px) scale(.97);}to{opacity:1;transform:none;}}
.msg.user { flex-direction: row-reverse; }
.av {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0; margin-top: 2px;
}
.av.bot { background: var(--bg3); border: 1px solid var(--border); }
.av.usr { background: var(--gold); font-family: var(--m); font-size: 10px; font-weight: 900; color: var(--bg); }
.bubble {
  padding: 10px 13px; border-radius: 13px;
  max-width: calc(100% - 46px); word-break: break-word;
  font-family: var(--o); font-size: 13.5px; line-height: 1.65;
}
.msg.bot .bubble { background: var(--bg3); border: 1px solid var(--border); border-top-left-radius: 4px; color: var(--text); transition: background .3s; }
.msg.user .bubble { background: var(--gold); color: var(--bg); font-weight: 600; border-top-right-radius: 4px; font-family: var(--m); font-size: 13px; }
.av .msg-icon { width: 16px; height: 16px; }
.bubble strong { color: var(--gold2); font-weight: 700; }
.bubble em { color: var(--muted); font-style: italic; }
.bubble code { font-size: 12px; background: rgba(0,0,0,.25); padding: 1px 5px; border-radius: 4px; }

/* typing */
.typing { display: flex; gap: 5px; align-items: center; padding: 10px 13px; }
.td { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: td 1.1s infinite; }
.td:nth-child(2){animation-delay:.16s;}.td:nth-child(3){animation-delay:.32s;}
@keyframes td{0%,80%,100%{opacity:.3;transform:scale(1);}40%{opacity:1;transform:scale(1.3);}}

/* btn groups */
.btn-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bc {
  background: var(--bg4); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px; padding: 7px 12px;
  font-family: var(--o); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.bc .ui-icon { width: 16px; height: 16px; flex-shrink: 0; }
.bc:hover { background: rgba(212,168,67,.1); border-color: rgba(212,168,67,.35); color: var(--gold2); }
.bc:active { transform: scale(.95); }
.bc.used { opacity: .25; pointer-events: none; }

/* scale */
.scale-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.bs {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-family: var(--m); font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.bs:hover { background: rgba(212,168,67,.15); border-color: var(--gold); color: var(--gold2); transform: translateY(-2px); }
.bs:active { transform: scale(.9); }
.bs.used { opacity: .25; pointer-events: none; }
.scale-labs { display: flex; justify-content: space-between; font-family: var(--o); font-size: 9.5px; color: var(--muted); margin-top: 4px; max-width: 216px; }

/* input area */
.input-area {
  padding: 10px 20px calc(12px + var(--safe-b));
  background: var(--bg2); border-top: 1px solid var(--border);
  flex-shrink: 0; transition: background .3s;
}
.input-row { display: flex; gap: 8px; align-items: flex-end; }
.input-box {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 11px; padding: 10px 14px; color: var(--text);
  font-family: var(--o); font-size: 13.5px; outline: none; resize: none;
  max-height: 100px; line-height: 1.5; transition: border-color .18s, background .3s;
  min-height: 42px;
}
.input-box::placeholder { color: var(--muted2); }
.input-box:focus { border-color: rgba(212,168,67,.35); }
.btn-send {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--gold); border: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .18s, transform .15s; color: var(--bg);
}
.btn-send:hover { background: var(--gold2); transform: translateY(-1px); }
.btn-send:active { transform: scale(.91); }
.btn-send:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.btn-send svg { width: 16px; height: 16px; }

/* ── CAREER DETAIL ── */
.career-detail {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rl); overflow: hidden; margin-top: 4px; width: 100%;
  transition: background .3s;
}
.cd-hero {
  padding: 18px 18px 14px; background: var(--bg3);
  border-bottom: 1px solid var(--border); position: relative; transition: background .3s;
}
.cd-match {
  position: absolute; top: 14px; right: 14px;
  background: var(--gold); color: var(--bg);
  font-family: var(--m); font-size: 12px; font-weight: 800;
  border-radius: 7px; padding: 4px 10px;
}
.cd-emoji { font-size: 26px; margin-bottom: 6px; display: block; }
.cd-emoji .career-icon { width: 30px; height: 30px; color: var(--gold); }
.cd-title { font-family: var(--m); font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin-bottom: 2px; }
.cd-area { font-family: var(--o); font-size: 11px; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cd-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); }
.cd-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; padding: 10px 14px;
  font-family: var(--m); font-size: 10.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: color .15s; border-bottom: 2px solid transparent;
  background: none; border-top: none; border-left: none; border-right: none;
  text-transform: uppercase; letter-spacing: .05em;
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.cd-body { padding: 16px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .22s ease; }
@keyframes fadeUp{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
.info-lbl { font-family: var(--m); font-size: 10px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; margin-top: 14px; }
.info-lbl:first-child { margin-top: 0; }
.info-txt { font-family: var(--o); font-size: 13px; color: var(--text2); line-height: 1.7; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; font-family: var(--o); font-size: 11.5px; color: var(--text2); transition: background .3s; }
.tag-icon { width: 13px; height: 13px; color: var(--gold); }
.salary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.sal-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 11px 8px; text-align: center; transition: background .3s; }
.sal-lbl { font-family: var(--m); font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.sal-val { font-family: var(--m); font-size: 12px; font-weight: 800; color: var(--gold2); letter-spacing: -.01em; }
.sal-sub { font-family: var(--o); font-size: 9px; color: var(--muted); margin-top: 3px; }
.job-list { display: flex; flex-direction: column; gap: 5px; }
.job-row { display: flex; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; transition: background .3s; }
.job-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold); }
.job-svg { width: 16px; height: 16px; }
.job-txt { font-family: var(--o); font-size: 12.5px; color: var(--text2); }
.yt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.yt-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .15s; text-decoration: none; display: flex; flex-direction: column; }
.yt-card:hover { border-color: rgba(212,168,67,.3); }
.yt-thumb { aspect-ratio: 16/9; background: var(--bg4); display: flex; align-items: center; justify-content: center; position: relative; font-size: 26px; }
.yt-thumb > span .career-icon { width: 34px; height: 34px; color: var(--gold); }
.play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.25); }
.play-btn { width: 30px; height: 30px; background: rgba(255,255,255,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.play-btn svg { width: 11px; height: 11px; fill: #FF0000; margin-left: 2px; }
.yt-info { padding: 8px 10px; }
.yt-title { font-family: var(--o); font-size: 11px; color: var(--text2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-source { font-family: var(--m); font-size: 9px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.ext-row { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ext-link { display: flex; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; text-decoration: none; transition: border-color .15s; }
.ext-link:hover { border-color: rgba(212,168,67,.25); }
.ext-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold); }
.ext-svg { width: 18px; height: 18px; }
.ext-txt { flex: 1; }
.ext-title { font-family: var(--m); font-size: 12px; font-weight: 700; color: var(--text); }
.ext-sub { font-family: var(--o); font-size: 11px; color: var(--muted); margin-top: 1px; }
.ext-arr { font-size: 14px; color: var(--muted); }
.ai-qrow { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ai-qbtn { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); border-radius: 7px; padding: 6px 11px; font-family: var(--o); font-size: 11.5px; cursor: pointer; transition: all .15s; }
.ai-qbtn:hover { border-color: rgba(212,168,67,.3); color: var(--gold3); }
.ai-resp { background: var(--bg3); border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; font-family: var(--o); font-size: 13px; color: var(--muted); line-height: 1.7; min-height: 52px; font-style: italic; transition: background .3s; }
.ai-resp.loaded { font-style: normal; color: var(--text2); }
.ai-resp strong { color: var(--gold2); font-style: normal; }
.ai-custom { display: flex; gap: 7px; margin-top: 10px; }
.ai-input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; font-family: var(--o); font-size: 12.5px; color: var(--text); outline: none; transition: background .3s; }
.ai-input::placeholder { color: var(--muted2); }
.ai-submit { background: var(--gold); color: var(--bg); border: none; border-radius: 9px; padding: 9px 14px; font-family: var(--m); font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; transition: background .18s; }
.ai-submit:hover { background: var(--gold2); }

/* keyboard accessibility */
.sb-btn:focus-visible,
.sb-action:focus-visible,
.banner-cta:focus-visible,
.banner-ghost:focus-visible,
.feat-card:focus-visible,
.theme-toggle:focus-visible,
.bc:focus-visible,
.bs:focus-visible,
.btn-send:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ranking */
.rank-wrap { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.rank-row { display: flex; align-items: center; gap: 11px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; cursor: pointer; transition: background .15s, border-color .15s; }
.rank-row:hover { background: var(--bg4); border-color: rgba(212,168,67,.2); }
.rank-row:active { transform: scale(.98); }
.rank-medal { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; }
.rank-info { flex: 1; min-width: 0; }
.rank-name { display: flex; align-items: center; gap: 7px; font-family: var(--m); font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.rank-name .career-icon { width: 17px; height: 17px; color: var(--gold); flex-shrink: 0; }
.rank-bar { height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.rank-fill { height: 100%; border-radius: 99px; transition: width 1.1s cubic-bezier(.4,0,.2,1); width: 0; }
.rank-fill.r0 { background: var(--gold); }
.rank-fill.r1 { background: #8898B8; }
.rank-fill.r2 { background: #C07840; }
.rank-pct { font-family: var(--m); font-size: 12px; font-weight: 800; color: var(--gold); flex-shrink: 0; min-width: 34px; text-align: right; }

/* ── MOBILE header (hidden on desktop) ── */
.mob-hdr { display: none; }

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .mob-hdr {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(12px + var(--safe-t)) 16px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg2); flex-shrink: 0;
    transition: background .3s;
  }
  .mob-hdr .sb-name { font-size: 18px; }
  .mob-hdr-right { display: flex; align-items: center; gap: 8px; }
  .app { flex-direction: column; }
  .topbar { display: none; }
  .home-wrap { grid-template-columns: 1fr; padding: 14px; gap: 12px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .banner-title { font-size: 24px; }
  .yt-grid { grid-template-columns: 1fr 1fr; }
  .content-scroll { padding-bottom: 0; }
}

@media (min-width: 769px) {
  .mob-hdr { display: none; }
  /* on desktop topbar shows context title */
  .topbar { display: flex; }
}

/* ─── UTILS ─── */
.hidden { display: none !important; }
