/* 新的面试（#new）、背景抽屉、实时面试子页（#live）。依赖 tokens.css、ui.css、console.css。 */
.tp-select--sm { height: 30px; font-size: var(--fs-13); }
.row-actions { display: inline-flex; gap: var(--s-2); justify-content: flex-end; }

/* ---------- #new 准备提示 ---------- */
.prep { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: var(--s-5); align-items: center; padding: var(--s-5) var(--s-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.prep__step { display: flex; gap: var(--s-3); align-items: flex-start; min-width: 0; }
.prep__num { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font: 700 var(--fs-13)/1 var(--font-mono); }
.prep__title { font-weight: 600; }
.prep__desc { margin-top: 2px; font-size: var(--fs-12); color: var(--text-3); }

/* ---------- 背景抽屉 ---------- */
.bd-head { display: flex; align-items: center; }
.bd-head .tp-count { margin-left: auto; }
.bd-sep { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-6) 0 var(--s-4); font-size: var(--fs-12); color: var(--text-3); }
.bd-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.bd-msg { min-height: 20px; margin-top: var(--s-4); font-size: var(--fs-13); color: var(--text-3); }
.bd-msg.is-ok { color: var(--ok); }
.bd-msg.is-err { color: var(--err); }
.bd-steps { display: flex; gap: var(--s-2); margin-bottom: var(--s-5); padding: var(--s-1); background: var(--surface-2); border-radius: var(--r-md); }
.bd-step { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--s-2); height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-3); font: 500 var(--fs-13)/1 var(--font); cursor: pointer; }
.bd-step:hover { color: var(--text); }
.bd-step__num { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); font: 700 var(--fs-12)/1 var(--font-mono); }
.bd-step.is-on { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm, 0 1px 2px rgba(14,23,38,.08)); }
.bd-step.is-on .bd-step__num { background: var(--ink); color: #fff; }
.bd-step.is-done { color: var(--brand-text); }
.bd-step.is-done .bd-step__num { background: var(--brand-soft); color: var(--brand-text); }
.bd-pane > * + * { margin-top: var(--s-4); }
.bd-pane > .tp-field + .tp-field { margin-top: var(--s-4); }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.bd-grid > .tp-field + .tp-field { margin-top: 0; }
.bd-quick { border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.bd-quick summary { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); font-size: var(--fs-13); color: var(--text-2); cursor: pointer; }
.bd-quick__body { display: flex; flex-direction: column; gap: var(--s-2); padding: 0 var(--s-3) var(--s-3); }
.bd-chips-wrap { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2) !important; }
.bd-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.bd-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: 400 var(--fs-12)/1 var(--font); cursor: pointer; }
.bd-chip:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-text); }
.bd-chip svg { width: 12px; height: 12px; }
.tp-count.is-over { color: var(--warn); }
.bd-seg { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.bd-seg__opt { flex: 1; min-width: 100px; cursor: pointer; }
.bd-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.bd-seg__opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: var(--fs-13); }
.bd-seg__opt small { font-size: var(--fs-12); color: var(--text-3); }
.bd-seg__opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.bd-seg__opt input:focus-visible + span { box-shadow: var(--focus-ring); }
.bd-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: 4px; font-size: var(--fs-12); color: var(--text-3); }
.bd-row-meta .tp-badge svg { width: 12px; height: 12px; }

/* ---------- 简历 ---------- */
.rs-sum { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4); border: 1px solid var(--brand-line); border-radius: var(--r-md); background: var(--brand-soft); }
.rs-sum__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.rs-sum__head svg { flex: none; width: 16px; height: 16px; color: var(--brand-text); }
.rs-sum__head span { font-size: var(--fs-12); color: var(--text-2); }
.rs-sum__text { font-size: var(--fs-13); color: var(--text-2); }
.rs-sum__list { margin: 0; padding-left: 18px; font-size: var(--fs-13); color: var(--text-2); }
.rs-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-tags span { padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface); font-size: var(--fs-12); color: var(--brand-text); }
.rs-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); }
.rs-detail__info { display: flex; flex-direction: column; gap: var(--s-4); }
.rs-sec h3 { margin-bottom: var(--s-2); font-size: var(--fs-13); color: var(--text-3); font-weight: 500; }
.rs-item + .rs-item { margin-top: var(--s-3); }
.rs-item p { margin-top: 2px; font-size: var(--fs-13); color: var(--text-2); white-space: pre-wrap; }
@media (max-width: 860px) { .rs-detail { grid-template-columns: 1fr; } }
.rs-terms td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
.rs-terms th:nth-child(1), .rs-terms th:nth-child(2) { width: 16%; }
.rs-terms th:nth-child(4) { width: 22%; }
.rs-term__in { width: 100%; min-width: 90px; height: 32px; font-size: var(--fs-13); }

/* ---------- #live：隐藏左侧菜单，铺满顶栏以下 ---------- */
.cs.is-live { grid-template-columns: minmax(0, 1fr); }
.cs.is-live .cs-side, .cs.is-live .cs-scrim { display: none; }
.cs.is-live .cs-content { max-width: none; height: calc(100dvh - 68px); min-height: 0; padding: 0; background: var(--bg); }
.cs.is-live ~ * .cs-top__menu, body:has(.cs.is-live) .cs-top__menu { display: none; }

.lv { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: 100%; background: var(--bg); color: var(--text); }
.lv-side { display: flex; flex-direction: column; gap: var(--s-4); min-height: 0; overflow-y: auto; padding: var(--s-5); background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 38%, var(--surface-2) 100%); border-right: 1px solid var(--border); }
.lv-side__top { display: flex; align-items: center; justify-content: space-between; }
.lv-sec { display: flex; flex-direction: column; gap: var(--s-3); padding-bottom: var(--s-4); border-bottom: 1px solid var(--border); }
.lv-sec__title { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-12); font-weight: 500; color: var(--text-3); }
.lv-sec__title a { font-weight: 400; }
.lv-brief__name { font-size: var(--fs-16); font-weight: 600; }
.lv-brief__meta { margin-top: 2px; font-size: var(--fs-13); color: var(--text-2); }
.lv-brief__resume { margin-top: var(--s-2); white-space: pre-line; font-size: var(--fs-12); color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lv-brief__none { font-size: var(--fs-13); color: var(--text-3); }
.lv-brief__edit { display: inline-block; margin-top: var(--s-2); font-size: var(--fs-12); }
.lv-brief .tp-skel-rows { padding: 0; }
.lv-stats { flex-direction: row; }
.lv-stats > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lv-num { font: 700 var(--fs-20)/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.lv-stats > div + div .lv-num { font: 600 var(--fs-14)/1.6 var(--font); padding-top: 4px; }
.lv-used { font-size: var(--fs-12); color: var(--text-3); }

.lv-dev { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-sm); }
.lv-dev.is-ok { border-color: var(--brand-line); background: linear-gradient(135deg, var(--brand-soft), var(--surface-2)); }
.lv-dev__head { display: flex; align-items: center; }
.lv-dev__label { font-size: var(--fs-13); font-weight: 600; }
.lv-dev__ok { margin-left: auto; width: 18px; height: 18px; color: var(--ok); }
.lv-dev__ok svg { width: 18px; height: 18px; }
.lv-dev__share { display: flex; align-items: center; gap: var(--s-2); height: 30px; font-size: var(--fs-13); color: var(--text-2); min-width: 0; }
.lv-dev__share svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.lv-dev__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-dev__line { display: flex; align-items: center; gap: var(--s-2); }
.lv-meter { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lv-meter i { display: block; width: 0; height: 100%; background: var(--brand); transition: width 80ms linear; }
.lv-devmsg { font-size: var(--fs-12); color: var(--text-3); min-height: 18px; }
.lv-devmsg.is-ok { color: var(--ok); }
.lv-devmsg.is-err { color: var(--err); }

.lv-actions { display: flex; flex-direction: column; gap: var(--s-2); }
.lv-ended { display: flex; flex-direction: column; gap: var(--s-2); }
.lv-tools { display: flex; align-items: center; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }
.lv-tools .tp-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--text-on-ink); }
.lv-tools__tip { margin-left: auto; font-size: var(--fs-12); color: var(--text-3); }

/* 对话区 */
.lv-chatbox { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: var(--bg); }
.lv-chathead { display: flex; align-items: center; gap: var(--s-4); height: 56px; padding: 0 var(--s-6); border-bottom: 1px solid var(--border); background: var(--surface-glass); backdrop-filter: blur(16px); flex: none; }
.lv-chathead h2 { font-size: var(--fs-16); }
.lv-legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: var(--text-3); }
.lv-legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
.lv-legend i.is-them { background: var(--info); }
.lv-legend i.is-me { background: var(--text-3); }
.lv-legend i.is-ai { background: var(--brand); }
.lv-chat {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-6) max(var(--s-6), calc((100% - 900px) / 2));
  background-image: radial-gradient(rgba(92, 121, 126, .13) .65px, transparent .65px);
  background-size: 18px 18px;
}
.lv-empty { margin: auto; text-align: center; max-width: 420px; }
.lv-empty .tp-state__desc { margin-top: var(--s-2); }
.lv-msg { max-width: 76%; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); white-space: pre-wrap; word-break: break-word; }
/* 面试官：左侧白底 + 蓝色标签和左边线，字大；我：右侧浅灰底、字小一号，弱化；建议：青绿 */
.lv-msg__who { display: inline-flex; align-items: center; height: 20px; margin-bottom: var(--s-1); padding: 0 8px; border-radius: 999px; font-size: var(--fs-12); font-weight: 600; }
.lv-msg__who + span { display: block; }
.lv-msg--them { align-self: flex-start; border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: var(--r-xs) var(--r-md) var(--r-md) var(--r-xs); background: var(--surface); box-shadow: var(--sh-sm); font-size: calc(var(--fs-16) * var(--chat-scale, 1)); font-weight: 500; }
.lv-msg--them .lv-msg__who { background: var(--info-soft); color: var(--info); }
.lv-msg--me { align-self: flex-end; border: 1px solid var(--border); border-radius: var(--r-md) var(--r-xs) var(--r-md) var(--r-md); background: var(--surface-3); color: var(--text-2); font-size: calc(var(--fs-14) * var(--chat-scale, 1)); text-align: left; box-shadow: var(--sh-sm); }
.lv-msg--me .lv-msg__who { background: var(--surface); color: var(--text-2); }
.lv-advice { align-self: stretch; padding: var(--s-4) var(--s-5); border: 1px solid var(--brand-line); border-left: 5px solid var(--brand); border-radius: var(--r-sm) var(--r-md) var(--r-md) var(--r-sm); background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface-2) 100%); box-shadow: var(--sh-sm); font-size: calc(17px * var(--chat-scale, 1)); font-weight: 500; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.lv-advice .lv-msg__who { display: block; height: auto; margin-bottom: 2px; padding: 0; border-radius: 0; color: var(--brand-text); font-weight: 600; }
.lv-advice__sum { display: block; font-weight: 700; }
.lv-advice__more { display: block; margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px dashed var(--brand-line); color: var(--text-2); font-size: calc(var(--fs-16) * var(--chat-scale, 1)); font-weight: 400; }
.lv-advice__more:empty { display: none; }
.lv-advice.is-failed { border-left-color: var(--err); background: var(--err-soft); color: var(--err); }
/* 设置 → 页面：不显示我的发言 */
.is-hide-me .lv-msg--me { display: none; }
.lv-notice { align-self: center; font-size: var(--fs-12); color: var(--text-3); }
.lv-liveline { flex: none; min-height: 44px; padding: var(--s-2) var(--s-6); border-top: 1px solid var(--border); background: var(--surface); font-size: var(--fs-13); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-pipholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3); height: 100%; }

/* 小窗里只放对话区 */
.lv-pipbody { margin: 0; height: 100vh; overflow: hidden; }
.lv-pipbody .lv-chatbox { height: 100vh; }
.lv-pipbody .lv-chathead { height: 40px; padding: 0 var(--s-4); }
.lv-pipbody .lv-legend { display: none; }
.lv-pipbody .lv-chat { padding: var(--s-4); }
.lv-pipbody .lv-msg { max-width: 92%; }

/* 进行中：设备区收起成状态 */
.lv.is-on .lv-dev__line .tp-btn, .lv.is-on .lv-dev select { display: none; }

@media (max-width: 960px) {
  .prep { grid-template-columns: 1fr; }
  .bd-grid { grid-template-columns: 1fr; }
  .cs.is-live .cs-content { height: auto; }
  .lv { grid-template-columns: 1fr; height: auto; }
  .lv-side { border-right: 0; border-bottom: 1px solid var(--border); }
  .lv-chatbox { height: 75dvh; }
  .lv-msg { max-width: 90%; }
}

/* 应聘岗位选择器（page-interview.js rolePicker）：行业 → 岗位两级列表 + 搜索 */
.rp { position: relative; }
.rp-panel { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--sh-md); }
.rp-cols { display: grid; grid-template-columns: 132px 1fr; height: 280px; }
.rp-col { overflow-y: auto; padding: var(--s-1); }
.rp-occs { border-right: 1px solid var(--border); background: var(--surface-2); }
.rp-search { max-height: 300px; overflow-y: auto; padding: var(--s-1); }
.rp-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: var(--r-xs); background: transparent; color: var(--text); font: 400 var(--fs-13)/1.4 var(--font); text-align: left; cursor: pointer; }
.rp-search .rp-item { justify-content: flex-start; gap: 0; }
.rp-item svg { width: 12px; height: 12px; flex: none; color: var(--text-3); }
.rp-item:hover, .rp-item.is-cur { background: var(--surface-3); }
.rp-item.is-on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.rp-item b { color: var(--err); font-weight: 600; }
.rp-occ { color: var(--text-3); white-space: pre; }
.rp-empty { padding: var(--s-2) 10px; font-size: var(--fs-13); color: var(--text-3); }
.rp-custom { justify-content: flex-start; gap: 6px; border-top: 1px solid var(--border); border-radius: 0; color: var(--brand-text); }
.rp-panel > .rp-custom { min-height: 38px; padding: 0 var(--s-3); }
.rp-search .rp-custom { margin-top: var(--s-1); }
.rp-custom svg { color: var(--brand-text); }
.rp-custom b { color: var(--brand-text); }

/* ---------- 设置 → 页面 ---------- */
.st-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.st-checks { display: flex; flex-direction: column; gap: var(--s-2); }
.st-preview { height: 420px; color: var(--text); }
@media (max-width: 1080px) { .st-grid { grid-template-columns: 1fr; } }
.lv-lowhint { margin: 0; font-size: var(--fs-12); color: var(--text-3); text-align: center; }
.lv-lowhint a { margin-left: var(--s-2); color: var(--brand-text); font-weight: 600; }
.lv-lowbar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--warn-soft); color: var(--text); font-size: var(--fs-13); }
.lv-lowbar svg { flex: none; width: 16px; height: 16px; }
.lv-lowbar__text { flex: 1; min-width: 0; }
.lv-lowbar.is-urgent { background: var(--err-soft); border-color: var(--err); color: var(--err); }
