/* ============ 关澜会议 · 暗色审图模式 ============ */
body { background: var(--d-canvas); color: var(--d-ink); }

.meet { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ---------- 顶栏 ---------- */
.topbar { height: 54px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--d-panel); border-bottom: 1px solid var(--d-line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.topbar .brand .logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #2563EB, #0E7490);
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; }
.live { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.35); color: #F87171; font-size: 11px; font-weight: 600; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #EF4444; animation: pulse-dot 1.4s ease infinite; }
.rec { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--d-ink-2); font-variant-numeric: tabular-nums; }
.rec i { width: 7px; height: 7px; border-radius: 50%; background: #EF4444; animation: pulse-dot 1.4s ease infinite; }
.ver-chips { display: flex; gap: 6px; }
.dchip { height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center;
  border: 1px solid var(--d-line); color: var(--d-ink-2); background: var(--d-panel-2); cursor: pointer; }
.dchip.on { color: #93C5FD; border-color: rgba(96,165,250,.4); background: rgba(96,165,250,.12); }
.dchip.warn { color: #FCA5A5; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.1); }
.topbar .spacer { flex: 1; }

.dbtn { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--d-ink-2);
  border: 1px solid var(--d-line); background: var(--d-panel-2); display: inline-flex; align-items: center; gap: 7px; transition: all .15s ease; }
.dbtn:hover { color: var(--d-ink); background: #1B2436; }
.dbtn.on { color: #93C5FD; border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.14); }
.dbtn.end { color: #FCA5A5; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); }
.dbtn.end:hover { background: rgba(239,68,68,.2); color: #fff; }

/* ---------- 主体 ---------- */
.main { flex: 1; display: flex; min-height: 0; }
.stage-wrap { flex: 1; position: relative; display: flex; flex-direction: column; min-width: 0; background:
  radial-gradient(1000px 500px at 50% 30%, rgba(37,99,235,.05), transparent), var(--d-canvas); }

.viewport { flex: 1; position: relative; overflow: hidden; cursor: default; }
.viewport.tool-pointer { cursor: grab; }
.viewport.tool-pointer:active { cursor: grabbing; }
.viewport.crosshair { cursor: crosshair; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }

/* 跟随提示 */
.follow-banner { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: none; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px;
  background: rgba(16,22,35,.85); border: 1px solid rgba(96,165,250,.4); backdrop-filter: blur(8px);
  color: #93C5FD; font-size: 12px; }
.follow-banner.show { display: flex; }
.follow-banner button { color: #93C5FD; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- SVG 图纸 ---------- */
.plan { display: block; background: #0D1424; border-radius: 4px; }
.plan .grid line { stroke: rgba(148,163,184,.055); }
.plan .wall { stroke: #CBD5E1; stroke-width: 3.5; fill: none; stroke-linecap: square; }
.plan .wall-thin { stroke: #94A3B8; stroke-width: 1.6; fill: none; }
.plan .door { stroke: #64748B; stroke-width: 1.4; fill: none; stroke-dasharray: none; }
.plan .furn { stroke: #7DD3FC; stroke-width: 1.5; fill: rgba(125,211,252,.06); }
.plan .furn2 { stroke: #A5B4FC; stroke-width: 1.5; fill: rgba(165,180,252,.05); }
.plan .room-label { fill: #94A3B8; font-size: 15px; font-weight: 600; letter-spacing: .3em; }
.plan .room-sub { fill: #475569; font-size: 10px; letter-spacing: .1em; }
.plan .dim { stroke: #475569; stroke-width: 1; }
.plan .dim-text { fill: #64748B; font-size: 11px; font-family: var(--mono); }
.plan .ceil { stroke: rgba(148,163,184,.22); stroke-width: 1; stroke-dasharray: 6 6; }
.plan .tagbox { fill: rgba(13,20,36,.85); stroke: rgba(148,163,184,.25); stroke-width: 1; rx: 4; }
.plan .tagtext { fill: #CBD5E1; font-size: 11.5px; }

/* V2 叠图层 */
#v2layer { opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.diff-on #v2layer { opacity: 1; }
#v2layer .v2-el { stroke: #F87171; stroke-width: 2; fill: rgba(248,113,113,.05); stroke-dasharray: 7 5; }
.diffregion { opacity: 0; transition: opacity .4s ease; }
.diff-on .diffregion { opacity: 1; }
.diffregion rect { fill: rgba(96,165,250,.05); stroke: #60A5FA; stroke-width: 1.5; stroke-dasharray: 4 4; }
.diffregion text { fill: #93C5FD; font-size: 11px; }

/* 标注 */
.anno { cursor: pointer; }
.anno-laser { fill: #F87171; filter: drop-shadow(0 0 6px rgba(248,113,113,.9)); animation: laser-fade .55s ease forwards; }
@keyframes laser-fade { from { opacity: .95; r: 7; } to { opacity: 0; r: 16; } }

/* ---------- 底部工具栏 ---------- */
.toolbar { flex: none; height: 64px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 16px;
  background: var(--d-panel); border-top: 1px solid var(--d-line); position: relative; }
.tool { width: 40px; height: 40px; border-radius: 10px; color: var(--d-ink-3); display: flex; align-items: center; justify-content: center; position: relative; }
.tool:hover { color: var(--d-ink); background: rgba(148,163,184,.1); }
.tool.on { color: #93C5FD; background: rgba(96,165,250,.15); }
.tool.on::after { content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 14px; height: 2.5px; border-radius: 2px; background: #60A5FA; }
.tool-sep { width: 1px; height: 26px; background: var(--d-line); margin: 0 8px; }
.swatches { display: flex; gap: 5px; margin-left: 8px; }
.swatch { width: 17px; height: 17px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.zoombox { position: absolute; right: 16px; display: flex; align-items: center; gap: 2px; }
.zoombox .tool { width: 32px; height: 32px; }
.zoombox .pct { font-size: 11.5px; color: var(--d-ink-2); font-variant-numeric: tabular-nums; width: 44px; text-align: center; }

/* ---------- 字幕 ---------- */
.subtitle { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; max-width: 68%;
  display: flex; align-items: baseline; gap: 10px; padding: 9px 16px; border-radius: 12px;
  background: rgba(13,20,36,.88); border: 1px solid var(--d-line); backdrop-filter: blur(10px);
  font-size: 13.5px; box-shadow: 0 8px 28px rgba(0,0,0,.4); animation: sub-in .35s ease; }
.subtitle b { flex: none; font-size: 12px; }
.subtitle span { color: var(--d-ink-2); }
@keyframes sub-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- 右侧栏 ---------- */
.side { width: 300px; flex: none; background: var(--d-panel); border-left: 1px solid var(--d-line); display: flex; flex-direction: column; min-height: 0; }
.side-tabs { display: flex; flex: none; border-bottom: 1px solid var(--d-line); }
.side-tabs button { flex: 1; height: 44px; font-size: 12.5px; font-weight: 500; color: var(--d-ink-3);
  border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: -1px; }
.side-tabs button.on { color: var(--d-ink); border-bottom-color: #60A5FA; }
.side-body { flex: 1; overflow-y: auto; padding: 12px 14px; min-height: 0; }

.parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.part { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(160deg, #1E293B, #0F172A); border: 1px solid var(--d-line);
  display: flex; align-items: center; justify-content: center; transition: border-color .2s ease, box-shadow .2s ease; }
.part.speaking { border-color: #34D399; box-shadow: 0 0 0 2px rgba(52,211,153,.25); }
.part .avatar { width: 40px; height: 40px; font-size: 14px; }
.part .pname { position: absolute; left: 8px; bottom: 6px; font-size: 11px; color: var(--d-ink); font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.6); display: flex; align-items: center; gap: 5px; }
.part .pname .i { width: 12px; height: 12px; color: var(--d-ink-3); }
.part .pname .i.off { color: #EF4444; }
.part .host { position: absolute; top: 6px; left: 8px; font-size: 9.5px; padding: 1px 7px; border-radius: 999px;
  background: rgba(96,165,250,.18); border: 1px solid rgba(96,165,250,.4); color: #93C5FD; font-weight: 600; }
.part .mic-btn { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; color: var(--d-ink-3); background: rgba(15,23,42,.55); }
.part .mic-btn:hover { color: #fff; }

.issue { display: flex; gap: 9px; padding: 10px; border: 1px solid var(--d-line); border-radius: 10px; margin-bottom: 7px; background: var(--d-panel-2); }
.issue .pinno { flex: none; width: 19px; height: 19px; border-radius: 50%; margin-top: 1px; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #0F172A; }
.issue .im { flex: 1; min-width: 0; }
.issue .it { font-size: 12.5px; line-height: 1.5; color: var(--d-ink); }
.issue .is { font-size: 10.5px; color: var(--d-ink-3); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.issue.done .it { color: var(--d-ink-3); text-decoration: line-through; }
.issue .tick { flex: none; width: 17px; height: 17px; border-radius: 6px; border: 1.5px solid #334155;
  display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; margin-top: 1px; }
.issue.done .tick { background: #059669; border-color: #059669; }

.mchat { display: flex; flex-direction: column; gap: 10px; }
.mchat .m { font-size: 12.5px; line-height: 1.55; }
.mchat .m b { font-size: 11.5px; display: block; margin-bottom: 2px; }
.mchat .m .txt { color: var(--d-ink-2); background: var(--d-panel-2); border: 1px solid var(--d-line); border-radius: 3px 10px 10px 10px; padding: 7px 10px; display: inline-block; }
.mchat-input { margin-top: 10px; display: flex; gap: 6px; }
.mchat-input input { flex: 1; height: 34px; background: var(--d-panel-2); border: 1px solid var(--d-line); border-radius: 9px;
  outline: 0; color: var(--d-ink); padding: 0 11px; font-size: 12.5px; }
.mchat-input input:focus { border-color: rgba(96,165,250,.5); }
.mchat-input button { width: 34px; height: 34px; border-radius: 9px; background: #2563EB; color: #fff; display: flex; align-items: center; justify-content: center; }

.dscroll::-webkit-scrollbar-thumb { background: #334155; background-clip: content-box; }

/* ---------- 结束会议流程 ---------- */
.endflow { text-align: center; padding: 30px 24px; }
.endflow .steps { text-align: left; margin: 22px auto 0; max-width: 300px; display: flex; flex-direction: column; gap: 12px; }
.estep { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--d-ink-3); }
.estep .st-ic { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #334155; display: flex; align-items: center; justify-content: center; flex: none; }
.estep.doing { color: var(--d-ink); }
.estep.doing .st-ic { border-color: #60A5FA; border-top-color: transparent; animation: spin 1s linear infinite; }
.estep.done { color: var(--d-ink-2); }
.estep.done .st-ic { border-color: #059669; background: #059669; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
