/* Director Stage — 暗色专业剪辑 / 3D 工作台 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: oklch(0.16 0.012 255);
  --panel: oklch(0.205 0.014 255);
  --panel-raised: oklch(0.245 0.018 255);
  --panel-soft: oklch(0.185 0.012 255);
  --line: oklch(0.31 0.018 255);
  --line-strong: oklch(0.39 0.028 250);
  --text: oklch(0.91 0.015 250);
  --muted: oklch(0.67 0.025 250);
  --accent: oklch(0.79 0.14 220);
  --accent-soft: oklch(0.3 0.055 225);
  --accent-ink: oklch(0.19 0.035 230);
  --gold: oklch(0.84 0.15 88);
  --danger: oklch(0.68 0.19 20);
  --ok: oklch(0.78 0.13 155);
  --shadow: 0 18px 50px rgb(0 0 0 / 34%);
}
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 "Geist", "PingFang SC", "Microsoft YaHei", sans-serif;
}
[hidden], .hidden { display: none !important; }
button, input, textarea, select { font: inherit; }
button {
  color: var(--text);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 150ms cubic-bezier(.16,1,.3,1), border-color 150ms cubic-bezier(.16,1,.3,1), background 150ms cubic-bezier(.16,1,.3,1);
}
button:hover { border-color: var(--line-strong); background: oklch(0.275 0.024 250); }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input, textarea, select {
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  outline: none;
}
input:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus { border-color: var(--accent); }
input:disabled { color: var(--muted); opacity: .78; cursor: not-allowed; }
input[type="range"] { accent-color: var(--accent); padding-inline: 0; }

#app { display: flex; flex-direction: column; height: 100vh; }

/* 顶栏 */
#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: none;
  gap: 12px;
}
.brand { font-size: 15px; font-weight: 650; letter-spacing: .04em; white-space: nowrap; }
.brand .logo { color: var(--accent); }
.project-control { display: flex; align-items: center; gap: 5px; min-width: 0; }
.project-control select { width: 148px; height: 30px; padding: 4px 26px 4px 8px; font-size: 11px; }
.project-control button { width: 30px; height: 30px; padding: 0; color: var(--accent); font-size: 17px; }
.project-save-status { min-width: 48px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.project-save-status[data-kind="saved"] { color: var(--ok); }
.project-save-status[data-kind="dirty"] { color: var(--gold); }
.project-save-status[data-kind="error"] { color: var(--danger); }
.badge {
  font-size: 10px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: 2px;
}
.mode-switch { display: flex; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.mode-btn { border: 0; background: transparent; padding: 4px 16px; border-radius: 6px; color: var(--muted); white-space: nowrap; }
.mode-btn:hover { color: var(--text); background: var(--panel-raised); }
.mode-btn.active { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.panel-toggle { color: var(--muted); }
.panel-toggle.active { color: var(--accent); border-color: oklch(0.56 0.1 225); background: var(--accent-soft); }
.auth-control { display: inline-flex; align-items: center; height: 30px; padding-left: 6px; border-left: 1px solid var(--line); }
.auth-login, .auth-logout { min-height: 28px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--panel-raised); text-decoration: none; font-size: 12px; line-height: 16px; }
.auth-login:hover, .auth-logout:hover { border-color: var(--line-strong); background: oklch(0.275 0.024 250); }
.auth-login.loading { opacity: .5; pointer-events: none; }
.auth-control.signed-in { gap: 7px; }
.auth-identity { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.auth-avatar { display: inline-flex; width: 22px; height: 22px; flex: none; align-items: center; justify-content: center; object-fit: cover; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.auth-name { max-width: 92px; overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.auth-logout { padding-inline: 7px; color: var(--muted); background: transparent; }

#main { position: relative; display: flex; flex: 1; min-height: 0; min-width: 0; }

/* 左栏 */
#left-col {
  width: 272px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
#app:not(.left-open) #left-col { display: none; }
.side-tabbar, .inspector-bar {
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}
.side-title {
  color: var(--text);
  padding: 5px 8px;
  font-weight: 600;
}
.count-badge {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
}
.panel-close { margin-left: auto; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.left-view { flex: 1; min-height: 0; }
#scene-panel { display: flex; flex-direction: column; }
.scene-summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px 4px; font-size: 11px; color: var(--muted); }
.scene-summary #scene-selection { max-width: 122px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent); }
.search-row { position: relative; padding: 8px 10px; }
.search-row input { width: 100%; height: 34px; padding-left: 30px; }
.search-icon { position: absolute; z-index: 1; left: 20px; top: 15px; color: var(--muted); font-size: 16px; pointer-events: none; }
#scene-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 12px; }
.scene-group + .scene-group { margin-top: 10px; }
.scene-group-title { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.scene-group-title span:last-child { color: oklch(0.57 0.025 250); }
.scene-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 6px 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
}
.scene-item::before { content: ""; position: absolute; inset: 7px auto 7px 0; width: 2px; border-radius: 2px; background: transparent; }
.scene-item:hover, .scene-item:focus-visible { background: var(--panel-raised); }
.scene-item.selected { background: var(--accent-soft); border-color: oklch(0.49 0.08 225); }
.scene-item.selected::before { background: var(--accent); }
.scene-item .icon, .selection-mark {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: oklch(0.28 0.02 250);
  color: var(--text);
  flex: none;
}
.scene-item .icon.character, .selection-mark.character { color: oklch(0.82 0.08 92); }
.scene-item .icon.camera, .selection-mark.camera { color: var(--gold); }
.scene-item .icon.prop, .selection-mark.prop { color: oklch(0.72 0.11 55); }
.scene-item .icon.environment, .selection-mark.environment { color: var(--accent); }
.scene-item-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.scene-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.scene-item .tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.scene-actions { display: flex; align-items: center; opacity: 0; transform: translateX(4px); transition: 150ms cubic-bezier(.16,1,.3,1); }
.scene-item:hover .scene-actions, .scene-item:focus-within .scene-actions, .scene-item.selected .scene-actions { opacity: 1; transform: none; }
.scene-action { width: 25px; height: 25px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.scene-action.danger:hover { color: var(--danger); }
.scene-empty, .prop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}
.scene-empty { min-height: 210px; padding: 24px; }
.scene-empty > span, .prop-empty > span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; color: var(--accent); font-size: 20px; }
.scene-empty strong, .prop-empty strong { color: var(--text); margin-bottom: 4px; font-size: 13px; }
.scene-empty small, .prop-empty small { max-width: 220px; font-size: 11px; }
.axis-result { display: grid; gap: 6px; margin-top: 8px; font-size: 11px; line-height: 1.45; }
.axis-result .ok { color: var(--accent); }
.axis-result .warn { color: var(--danger); }

/* 中央视口 */
#viewport-col { flex: 1; display: flex; flex-direction: column; min-width: 240px; }
#viewport { flex: 1; position: relative; min-height: 0; overflow: hidden; }
#viewport canvas { display: block; }
#label-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.obj-label { position: absolute; top: 0; left: 0; pointer-events: auto; cursor: pointer; display: flex; gap: 4px; align-items: center; background: oklch(0.16 0.012 255 / .82); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; font-size: 11px; white-space: nowrap; user-select: none; }
.obj-label:hover { border-color: var(--accent); }
.obj-label .lbl-tag { color: var(--gold); font-size: 10px; }
#viewport-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 11px; background: oklch(0.16 0.012 255 / .7); padding: 3px 12px; border-radius: 12px; pointer-events: none; white-space: nowrap; }
#toolbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--panel); border-top: 1px solid var(--line); justify-content: center; }
.tool-menu-wrap { position: relative; display: inline-flex; }
.tool-popover { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 8; width: 146px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: 0 10px 30px #0008; }
.tool-popover.hidden { display: none; }
.tool-popover button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 0; background: transparent; text-align: left; }
.tool-popover button:hover { background: var(--panel-2); color: var(--accent); }
.tool-popover small { color: var(--muted); font-size: 9px; }
.tool-btn { width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center; }
.tool-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-btn.active { background: var(--accent); color: var(--accent-ink); }
.sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

/* 右栏 / 检查器 */
#right-col { width: 316px; flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); overflow: hidden; }
#app:not(.right-open) #right-col { display: none; }
.inspector-bar { padding-left: 12px; color: var(--muted); font-weight: 650; letter-spacing: .04em; }
#props-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 24px; }
.prop-empty { min-height: 190px; padding: 24px 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.selection-summary { display: flex; align-items: center; gap: 10px; padding: 4px 2px 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.selection-mark { width: 32px; height: 32px; border-radius: 9px; }
.selection-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.selection-copy small { color: var(--muted); font-size: 10px; }
.selection-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.selection-summary > code { color: var(--muted); font-size: 9px; }
.stage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; }
.stage-stats > div { display: flex; flex-direction: column; align-items: center; padding: 9px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.stage-stats strong { color: var(--text); font-size: 15px; }
.stage-stats span { color: var(--muted); font-size: 10px; }
.prop-section { margin-bottom: 18px; }
.prop-section h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.prop-section h4::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.prop-row { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.prop-row > label { width: 54px; color: var(--muted); flex: none; font-size: 11px; }
.prop-row > input, .prop-row > select { flex: 1; min-width: 0; }
.prop-row input[type="number"] { min-width: 0; }
.prop-row input[type="range"] { flex: 1; }
.readonly-value { display: flex; align-items: center; min-height: 30px; flex: 1; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); color: var(--muted); font: 11px/1.4 "Geist Mono", ui-monospace, monospace; }
.vec3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; flex: 1; min-width: 0; }
.axis-field { display: flex; align-items: center; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-soft); overflow: hidden; }
.axis-field > span { width: 20px; flex: none; text-align: center; font-size: 9px; font-weight: 800; color: var(--muted); }
.axis-field.axis-x > span { color: oklch(0.7 0.17 25); }
.axis-field.axis-y > span { color: oklch(0.76 0.15 145); }
.axis-field.axis-z > span { color: oklch(0.72 0.14 245); }
.axis-field input { width: 100%; min-width: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding-inline: 5px; }
.pip-box { position: relative; width: 100%; aspect-ratio: 16/9; display: grid; place-items: center; background: oklch(0.08 0.008 255); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 12px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 2%); }
.pip-box canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.pip-fov { position: absolute; top: 7px; left: 7px; font-size: 10px; color: var(--gold); background: oklch(0.16 0.012 255 / .82); border-radius: 5px; padding: 2px 7px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 9px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-raised); cursor: pointer; font-size: 11px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pose-section-toggle { width: 100%; display: flex; align-items: center; gap: 8px; margin-bottom: 9px; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.pose-section-toggle:hover { background: transparent; color: var(--text); }
.pose-section-title { flex: none; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.pose-section-title::after { content: ""; }
.pose-current { margin-left: auto; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 7px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); font-size: 10px; font-weight: 650; }
.pose-chevron { flex: none; font-size: 16px; line-height: 1; transform: rotate(0); transition: transform 150ms cubic-bezier(.16,1,.3,1); }
.pose-section-toggle[aria-expanded="false"] .pose-chevron { transform: rotate(-90deg); }
.pose-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pose-grid .chip { min-width: 0; padding: 7px 4px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 6px; padding: 9px; border-radius: 8px; background: var(--panel-soft); border: 1px solid var(--line); }
.meta-grid span { color: var(--muted); font-size: 10px; }
.meta-grid strong { font-size: 11px; }
.character-scale-row { margin-top: 10px; margin-bottom: 0; }
.character-scale-row > label { width: 64px; }
.character-scale-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.character-scale-control input { width: 100%; min-width: 0; }
.character-scale-value { min-width: 91px; color: var(--accent); font: 10px/1.2 "Geist Mono", ui-monospace, monospace; text-align: right; white-space: nowrap; }
.character-color-control { display: grid; gap: 8px; flex: 1; min-width: 0; }
.character-color-picker { display: flex; align-items: center; gap: 8px; }
.character-color-picker input[type="color"] { width: 42px; min-width: 42px; height: 30px; padding: 3px; border-radius: 7px; cursor: pointer; }
.character-color-value { color: var(--muted); font: 10px/1.2 "Geist Mono", ui-monospace, monospace; }
.character-color-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.character-color-swatch { width: 100%; min-width: 0; min-height: 20px; height: 20px; padding: 0; border: 2px solid transparent; border-radius: 5px; background: var(--swatch); }
.character-color-swatch:hover { background: var(--swatch); transform: translateY(-1px); }
.character-color-swatch.active { border-color: var(--text); box-shadow: 0 0 0 1px #000; }
.joint-row { display: grid; grid-template-columns: 62px 1fr 30px; align-items: center; gap: 6px; margin-bottom: 6px; }
.joint-row label { color: var(--muted); font-size: 10px; }
.joint-row .val { text-align: right; color: var(--accent); font-size: 10px; }
.wide-btn { width: 100%; margin-top: 6px; }
.wide-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 750; }
.wide-btn.primary:hover { background: oklch(0.84 0.13 220); }
.inspector-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.note { font-size: 11px; color: var(--muted); margin: 6px 0; }
.note.warn { color: var(--danger); }
.note.ok { color: var(--ok); }

/* First-visit Quick Start */
.quickstart-dialog { position: fixed; inset: 0; width: min(520px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 32px)); margin: auto; padding: 0; border: 1px solid var(--kimi-separator); border-radius: 16px; background: var(--kimi-bg-secondary); color: var(--kimi-label-primary); box-shadow: 0 24px 80px rgba(0, 0, 0, .48); }
.quickstart-dialog::backdrop { background: rgba(0, 0, 0, .68); backdrop-filter: blur(5px); }
.quickstart-card { position: relative; padding: 32px; }
.quickstart-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 32px; min-height: 32px; padding: 0; border-radius: 50%; background: transparent; color: var(--kimi-label-secondary); font-size: 22px; font-weight: 300; }
.quickstart-eyebrow { margin-bottom: 10px; color: var(--kimi-label-tertiary); font-size: 11px; font-weight: 600; letter-spacing: .16em; }
.quickstart-card h2 { margin: 0 0 8px; font-size: 24px; line-height: 32px; font-weight: 600; }
.quickstart-card p { margin: 0 0 20px; color: var(--kimi-label-secondary); font-size: 14px; line-height: 22px; }
.quickstart-prompt { padding: 16px; border: 1px solid var(--kimi-separator); border-radius: 12px; background: var(--kimi-fill-1); color: var(--kimi-label-primary); font-size: 15px; line-height: 24px; user-select: text; }
.quickstart-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.quickstart-copy { display: inline-flex; align-items: center; gap: 6px; background: var(--kimi-interaction); color: var(--kimi-bg-primary); }
.quickstart-copy:hover { background: rgba(255, 255, 255, .92); }
.quickstart-later { background: transparent; color: var(--kimi-label-secondary); }

@media (max-width: 639px) {
  .quickstart-card { padding: 28px 20px 20px; }
  .quickstart-actions { flex-direction: column-reverse; }
  .quickstart-actions button { width: 100%; justify-content: center; }
}

/* 时间轴 */
#timeline { flex: none; height: 166px; background: var(--panel); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.tl-head { display: flex; align-items: center; gap: 14px; padding: 6px 12px; font-weight: 650; border-bottom: 1px solid var(--line); }
.tl-head .muted { font-weight: 400; }
.tl-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
#tl-play { background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 700; }
#tl-export-all { border-color: oklch(0.56 0.1 225); color: var(--accent); font-weight: 650; }
#tl-export-all:disabled { opacity: .5; cursor: wait; }
#tl-export-size { width: auto; padding-block: 4px; font-size: 11px; }
#tl-export-status { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tl-strip { flex: 1; display: flex; gap: 10px; overflow-x: auto; padding: 8px 12px; align-items: stretch; }
.shot-card { flex: none; width: 178px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; cursor: grab; }
.shot-card:hover { border-color: var(--line-strong); }
.shot-card.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px oklch(0.79 0.14 220 / .24); }
.shot-card.playing { border-color: var(--gold); box-shadow: 0 0 12px oklch(0.84 0.15 88 / .25); }
.shot-thumb { height: 62px; background: oklch(0.08 0.008 255) center/contain no-repeat; }
.shot-info { padding: 4px 7px; display: flex; flex-direction: column; gap: 3px; }
.shot-info .nm { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-actions { color: var(--accent); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-actions.legacy { color: var(--gold); }
.shot-info .row { display: flex; align-items: center; gap: 4px; }
.shot-info input { width: 44px; padding: 1px 4px; font-size: 11px; }
.shot-info .x { color: var(--muted); border: 0; background: transparent; padding: 0 3px; cursor: pointer; }
.shot-info .x:hover { color: var(--accent); }
.shot-info .export-shot:hover { color: var(--ok); }
.shot-info .capture-shot:hover { color: var(--gold); }
.shot-add { flex: none; width: 90px; border: 1px dashed var(--line-strong); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; background: transparent; }
.shot-add:hover { border-color: var(--accent); color: var(--accent); }
.muted { color: var(--muted); font-size: 11px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: oklch(0.34 0.02 250); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.webmcp-badge { align-self: center; font-size: 10px; border-radius: 4px; padding: 2px 7px; border: 1px solid var(--line); color: var(--muted); cursor: default; user-select: none; white-space: nowrap; }
.webmcp-badge.on { color: var(--ok); border-color: var(--ok); }
.webmcp-badge.off { color: var(--muted); border-color: var(--line); }
.webmcp-badge.partial { color: var(--gold); border-color: var(--gold); }

@media (max-width: 1180px) {
  #left-col { width: 236px; }
  #right-col { width: 286px; }
  .panel-toggle { padding-inline: 7px; }
  .mode-btn { padding-inline: 12px; }
}

@media (max-width: 900px) {
  #left-col, #right-col {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 20;
    box-shadow: var(--shadow);
  }
  #left-col { left: 0; width: min(82vw, 292px); }
  #right-col { right: 0; width: min(88vw, 324px); }
  #viewport-col { min-width: 0; }
  .badge, .webmcp-badge { display: none; }
}

@media (max-width: 680px) {
  #topbar { gap: 6px; padding-inline: 8px; }
  .brand { font-size: 13px; }
  .mode-btn { padding-inline: 9px; font-size: 11px; }
  .panel-toggle { font-size: 11px; padding-inline: 6px; }
  .auth-name { display: none; }
  #btn-undo, #btn-redo { display: none; }
  #timeline { height: 136px; }
  #viewport-hint { max-width: 88%; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   kimi workspace theme
   Semantic values map to kimi Design Tokens 0.2.0 (dark theme).
   The legacy variables above remain as compatibility aliases for 3D overlays.
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --kimi-bg-primary: #121212;
  --kimi-bg-secondary: #1f1f1f;
  --kimi-bg-tertiary: #292929;
  --kimi-bg-ground: #161717;
  --kimi-label-primary: rgba(255, 255, 255, .84);
  --kimi-label-secondary: rgba(255, 255, 255, .56);
  --kimi-label-tertiary: rgba(255, 255, 255, .42);
  --kimi-label-quaternary: rgba(255, 255, 255, .26);
  --kimi-fill-1: rgba(255, 255, 255, .05);
  --kimi-fill-1-hover: rgba(255, 255, 255, .098);
  --kimi-fill-2: rgba(255, 255, 255, .10);
  --kimi-fill-2-hover: rgba(255, 255, 255, .145);
  --kimi-fill-3: rgba(255, 255, 255, .18);
  --kimi-separator: rgba(255, 255, 255, .12);
  --kimi-interaction: rgba(255, 255, 255, .84);
  --kimi-danger: #ff4756;
  --kimi-positive: #16c456;
  --kimi-caution: #ff9f0a;
  --kimi-radius-xs: 4px;
  --kimi-radius-sm: 8px;
  --kimi-radius-md: 10px;
  --kimi-radius-lg: 12px;
  --kimi-ease-out: cubic-bezier(.23, 1, .32, 1);
  --kimi-ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --z-dropdown: 100;
  --z-popover: 200;
  --z-header: 500;
  --z-drawer: 1000;
  --z-toast: 1500;

  --bg: var(--kimi-bg-primary);
  --panel: var(--kimi-bg-secondary);
  --panel-raised: var(--kimi-bg-tertiary);
  --panel-soft: var(--kimi-fill-1);
  --line: var(--kimi-separator);
  --line-strong: var(--kimi-fill-3);
  --text: var(--kimi-label-primary);
  --muted: var(--kimi-label-secondary);
  --accent: var(--kimi-interaction);
  --accent-soft: var(--kimi-fill-2);
  --accent-ink: var(--kimi-bg-primary);
  --gold: var(--kimi-caution);
  --danger: var(--kimi-danger);
  --ok: var(--kimi-positive);
  --shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

body {
  background: var(--kimi-bg-primary);
  color: var(--kimi-label-primary);
  font: 14px/20px "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font-family: inherit; }
button {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--kimi-radius-md);
  background: var(--kimi-fill-1);
  color: var(--kimi-label-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 140ms var(--kimi-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover { border-color: transparent; background: var(--kimi-fill-2); }
}
button:not(:disabled):active { transform: scale(.97); background: var(--kimi-fill-3); }
button:disabled { color: var(--kimi-label-quaternary); cursor: not-allowed; }
button:disabled:hover { background: var(--kimi-fill-1); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .scene-item:focus-visible {
  outline: 2px solid var(--kimi-interaction);
  outline-offset: 2px;
}
input, textarea, select {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--kimi-separator);
  border-radius: var(--kimi-radius-md);
  background: var(--kimi-fill-1);
  color: var(--kimi-label-primary);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 180ms ease, background-color 180ms ease;
}
input::placeholder, textarea::placeholder { color: var(--kimi-label-quaternary); }
input:hover, textarea:hover, select:hover { border-color: var(--kimi-fill-3); }
input:focus, textarea:focus, select:focus { border-color: var(--kimi-interaction); }
input[type="range"] { min-height: 24px; accent-color: var(--kimi-interaction); }

.ui-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-list { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 6h14M5 12h14M5 18h14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-inspector { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='4' width='17' height='16' rx='2.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M14 4v16M17 8h1M17 12h1M17 16h1' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-undo { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4 4 8l4 4M5 8h10a5 5 0 0 1 0 10H8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-redo { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m16 4 4 4-4 4m3-4H9a5 5 0 0 0 0 10h7' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-close { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 6 12 12M18 6 6 18' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m16 16 4 4' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.icon-camera { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='6.5' width='13' height='11' rx='2' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m16 10 5-3v10l-5-3' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-download { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M4 16v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-play { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.8v14.4a1 1 0 0 0 1.55.84l10.8-7.2a1 1 0 0 0 0-1.68l-10.8-7.2A1 1 0 0 0 7 4.8Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-stop { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='6' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E"); }
.icon-view { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 12s3-5 8.5-5 8.5 5 8.5 5-3 5-8.5 5-8.5-5-8.5-5Z' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E"); }
.icon-refresh { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11a8 8 0 1 0-2.35 5.65M20 5v6h-6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.icon-button { font-size: 0 !important; }
.icon-button::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }

.toast-region { position: fixed; z-index: var(--z-toast); top: 16px; left: 50%; display: flex; width: min(360px, calc(100vw - 32px)); flex-direction: column; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; min-height: 40px; align-items: center; gap: 8px; width: fit-content; max-width: 360px; margin-inline: auto; padding: 10px 12px; border-radius: var(--kimi-radius-lg); background: #404040; color: #fff; font-size: 14px; line-height: 20px; pointer-events: auto; animation: toast-enter 350ms var(--kimi-ease-out) both; }
.toast-icon { display: grid; place-items: center; width: 20px; height: 20px; font-weight: 600; }
.toast-success .toast-icon { color: var(--kimi-positive); }
.toast-error .toast-icon { color: var(--kimi-danger); }
.toast-caution .toast-icon { color: var(--kimi-caution); }
.toast-loading .toast-icon { color: var(--kimi-label-tertiary); }
.toast-copy { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.toast-exit { animation: toast-exit 260ms var(--kimi-ease-out) both; }
@keyframes toast-enter { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-exit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-12px) scale(.97); } }

/* Top bar */
#topbar {
  z-index: var(--z-header);
  height: 52px;
  padding: 0 16px;
  gap: 16px;
  background: var(--kimi-bg-primary);
  border-bottom: 1px solid var(--kimi-separator);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; letter-spacing: 0; }
.brand-mark { position: relative; width: 16px; height: 16px; border: 1.8px solid currentColor; border-radius: 5px; }
.brand-mark::after { content: ""; position: absolute; inset: 3px; border: 1.5px solid var(--kimi-label-tertiary); border-radius: 2px; }
.badge { display: none; }
.mode-switch {
  height: 40px;
  gap: 4px;
  padding: 4px;
  border: 0;
  border-radius: var(--kimi-radius-lg);
  background: var(--kimi-fill-2);
}
.mode-btn { min-width: 84px; height: 32px; padding: 6px 12px; border-radius: var(--kimi-radius-sm); background: transparent; color: var(--kimi-label-secondary); font-weight: 400; }
.mode-btn:hover { color: var(--kimi-label-primary); background: transparent; }
.mode-btn.active { background: var(--kimi-bg-tertiary); color: var(--kimi-label-primary); font-weight: 500; }
.top-actions { gap: 4px; }
.top-actions button { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.panel-toggle { background: transparent; color: var(--kimi-label-secondary); }
.panel-toggle.active { border: 0; background: var(--kimi-fill-2); color: var(--kimi-label-primary); }
.history-btn { background: transparent; color: var(--kimi-label-secondary); }
.webmcp-badge { margin: 0 4px; padding: 2px 6px; border: 0; border-radius: var(--kimi-radius-xs); background: var(--kimi-fill-1); color: var(--kimi-label-tertiary); font-size: 10px; }
.webmcp-badge.on { border: 0; color: var(--kimi-positive); }
.webmcp-badge.partial { border: 0; color: var(--kimi-caution); }

/* Main workspace and side panels */
#main { background: var(--kimi-bg-ground); }
#left-col { width: 264px; background: var(--kimi-bg-primary); border-right: 1px solid var(--kimi-separator); }
#right-col { width: 328px; background: var(--kimi-bg-primary); border-left: 1px solid var(--kimi-separator); }
.side-tabbar, .inspector-bar { height: 48px; padding: 8px 12px 8px 16px; border-bottom: 0; }
.side-title, .inspector-bar { color: var(--kimi-label-primary); font-size: 14px; font-weight: 500; letter-spacing: 0; }
.side-title { padding: 0; }
.count-badge { min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: var(--kimi-radius-sm); background: var(--kimi-fill-2); color: var(--kimi-label-secondary); font-size: 12px; }
.panel-close { display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; margin-left: auto; padding: 0; border: 0; background: transparent; color: var(--kimi-label-tertiary); }
.panel-close .ui-icon { width: 18px; height: 18px; }
.scene-summary { padding: 8px 16px 4px; color: var(--kimi-label-tertiary); font-size: 12px; }
.scene-summary #scene-selection { max-width: 128px; color: var(--kimi-label-secondary); }
.search-row { padding: 8px 12px 12px; }
.search-row input { height: 36px; padding-left: 36px; background: var(--kimi-fill-1); }
.search-icon { left: 22px; top: 17px; color: var(--kimi-label-tertiary); }
#scene-list { padding: 0 8px 16px; }
.scene-group + .scene-group { margin-top: 12px; }
.scene-group-title { padding: 4px 8px; color: var(--kimi-label-tertiary); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.scene-group-title span:last-child { color: var(--kimi-label-quaternary); }
.scene-item { min-height: 48px; gap: 8px; padding: 6px 8px; border: 0; border-radius: var(--kimi-radius-sm); }
.scene-item::before { display: none; }
.scene-item:hover, .scene-item:focus-visible { background: var(--kimi-fill-1); }
.scene-item.selected { border: 0; background: var(--kimi-fill-2); }
.scene-item .icon, .selection-mark { width: 28px; height: 28px; border-radius: var(--kimi-radius-sm); background: var(--kimi-fill-1); color: var(--kimi-label-secondary); }
.scene-item .icon.character, .scene-item .icon.camera, .scene-item .icon.prop, .scene-item .icon.environment,
.selection-mark.character, .selection-mark.camera, .selection-mark.prop, .selection-mark.environment { color: var(--kimi-label-secondary); }
.scene-item .name { color: var(--kimi-label-primary); font-size: 14px; font-weight: 400; line-height: 20px; }
.scene-item .tag { color: var(--kimi-label-tertiary); font-size: 12px; line-height: 18px; }
.scene-actions { gap: 2px; opacity: 0; transform: none; transition: opacity 125ms var(--kimi-ease-out); }
.scene-action { width: 26px; height: 26px; min-height: 26px; padding: 0; background: transparent; color: var(--kimi-label-tertiary); font-size: 16px; }
.scene-action.danger:hover { color: var(--kimi-danger); }
.scene-empty, .prop-empty { color: var(--kimi-label-secondary); }
.scene-empty > span, .prop-empty > span { border-color: var(--kimi-separator); border-radius: var(--kimi-radius-lg); color: var(--kimi-label-secondary); }
.scene-empty strong, .prop-empty strong { color: var(--kimi-label-primary); font-size: 14px; font-weight: 500; }
.scene-empty small, .prop-empty small { color: var(--kimi-label-tertiary); font-size: 12px; line-height: 18px; }

/* Viewport and compact floating toolbar */
#viewport-col { position: relative; background: #0d0e0e; }
#viewport { background: #0d0e0e; }
#viewport-hint { top: 12px; padding: 5px 10px; border-radius: var(--kimi-radius-sm); background: rgba(18, 18, 18, .72); color: rgba(255, 255, 255, .56); font-size: 12px; backdrop-filter: blur(8px); }
.obj-label { padding: 3px 8px; border: 1px solid var(--kimi-separator); border-radius: var(--kimi-radius-sm); background: rgba(18, 18, 18, .8); color: var(--kimi-label-secondary); font-size: 12px; }
.obj-label:hover { border-color: var(--kimi-fill-3); background: rgba(41, 41, 41, .9); }
.obj-label .lbl-tag { color: var(--kimi-label-tertiary); font-size: 10px; }
#toolbar {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 16px;
  width: max-content;
  max-width: calc(100% - 32px);
  height: 48px;
  padding: 8px;
  gap: 4px;
  border: 1px solid var(--kimi-separator);
  border-radius: var(--kimi-radius-lg);
  background: rgba(31, 31, 31, .94);
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
}
.tool-btn { width: 32px; height: 32px; min-height: 32px; border-radius: var(--kimi-radius-sm); background: transparent; color: var(--kimi-label-secondary); }
.tool-btn:hover { color: var(--kimi-label-primary); }
.tool-btn.active { background: var(--kimi-fill-3); color: var(--kimi-label-primary); }
.tool-btn svg { width: 18px; height: 18px; stroke-width: 1.8; }
.sep { height: 20px; margin: 0 4px; background: var(--kimi-separator); }
.tool-popover { z-index: var(--z-popover); bottom: calc(100% + 8px); width: 168px; padding: 4px; border: 1px solid var(--kimi-separator); border-radius: var(--kimi-radius-md); background: var(--kimi-bg-tertiary); box-shadow: none; transform-origin: bottom center; }
.tool-popover button { min-height: 40px; padding: 8px; border-radius: var(--kimi-radius-sm); font-weight: 400; }
.tool-popover button:hover { background: var(--kimi-fill-2); color: var(--kimi-label-primary); }
.tool-popover small { color: var(--kimi-label-tertiary); font-size: 10px; }

/* Inspector */
#props-panel { padding: 4px 16px 24px; }
.prop-empty { min-height: 220px; margin-bottom: 16px; border: 0; }
.selection-summary { gap: 8px; padding: 8px 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--kimi-separator); }
.selection-mark { width: 32px; height: 32px; }
.selection-copy small { color: var(--kimi-label-tertiary); font-size: 12px; }
.selection-copy strong { color: var(--kimi-label-primary); font-size: 14px; font-weight: 500; }
.selection-summary > code { color: var(--kimi-label-quaternary); font: 10px/14px "Geist Mono", monospace; }
.stage-stats { gap: 8px; margin-bottom: 24px; }
.stage-stats > div { padding: 8px 4px; border: 0; border-radius: var(--kimi-radius-sm); background: var(--kimi-fill-1); }
.stage-stats strong { font-size: 16px; font-weight: 500; }
.stage-stats span { color: var(--kimi-label-tertiary); font-size: 12px; }
.prop-section { margin-bottom: 24px; }
.prop-section h4 { margin-bottom: 12px; color: var(--kimi-label-secondary); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.prop-section h4::after { background: var(--kimi-separator); }
.prop-row { gap: 8px; margin-bottom: 8px; }
.prop-row > label { width: 56px; color: var(--kimi-label-secondary); font-size: 12px; }
.readonly-value { min-height: 32px; border-color: var(--kimi-separator); border-radius: var(--kimi-radius-md); background: var(--kimi-fill-1); color: var(--kimi-label-secondary); font: 12px/18px "Geist Mono", monospace; }
.axis-field { min-height: 32px; border-color: var(--kimi-separator); border-radius: var(--kimi-radius-md); background: var(--kimi-fill-1); }
.axis-field > span { width: 24px; color: var(--kimi-label-secondary); }
.pip-box { margin-bottom: 16px; border-color: var(--kimi-separator); border-radius: var(--kimi-radius-sm); background: #0d0e0e; box-shadow: none; }
.pip-fov { top: 8px; left: 8px; padding: 3px 6px; border-radius: var(--kimi-radius-xs); background: rgba(18, 18, 18, .76); color: var(--kimi-label-secondary); font-size: 10px; }
.chip-row { gap: 4px; }
.chip { min-height: 28px; padding: 4px 8px; border: 0; border-radius: var(--kimi-radius-sm); background: var(--kimi-fill-1); color: var(--kimi-label-secondary); font-size: 12px; font-weight: 400; }
.chip:hover { border-color: transparent; color: var(--kimi-label-primary); }
.chip.active { border: 0; background: var(--kimi-fill-3); color: var(--kimi-label-primary); font-weight: 500; }
.pose-section-toggle { min-height: 32px; margin-bottom: 8px; color: var(--kimi-label-secondary); }
.pose-section-toggle:hover { color: var(--kimi-label-primary); }
.pose-section-title { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.pose-current { border: 0; background: var(--kimi-fill-1); color: var(--kimi-label-secondary); font-size: 12px; font-weight: 400; }
.pose-chevron { transition: transform 180ms var(--kimi-ease-out); }
.pose-grid { gap: 4px; }
.pose-grid .chip { padding: 6px 4px; border-radius: var(--kimi-radius-sm); }
.meta-grid { gap: 8px; padding: 12px; border: 0; border-radius: var(--kimi-radius-sm); background: var(--kimi-fill-1); }
.meta-grid span { color: var(--kimi-label-tertiary); font-size: 12px; }
.meta-grid strong { font-size: 12px; font-weight: 500; }
.character-scale-value, .joint-row .val { color: var(--kimi-label-secondary); }
.joint-row label { color: var(--kimi-label-secondary); font-size: 12px; }
.wide-btn { min-height: 32px; margin-top: 4px; }
.wide-btn.primary { background: var(--kimi-interaction); color: var(--kimi-bg-primary); font-weight: 500; }
.wide-btn.primary:hover { background: rgba(255, 255, 255, .92); }
.inspector-actions { gap: 4px; margin-top: 12px; }
.note { color: var(--kimi-label-secondary); font-size: 12px; line-height: 18px; }
.note.warn { color: var(--kimi-danger); }
.note.ok { color: var(--kimi-positive); }

/* Shot timeline */
#timeline { height: 184px; border-top: 1px solid var(--kimi-separator); background: var(--kimi-bg-primary); }
.tl-head { min-height: 48px; gap: 12px; padding: 8px 12px 8px 16px; border-bottom: 0; font-size: 14px; font-weight: 500; }
.tl-title { display: inline-flex; align-items: center; gap: 6px; }
.tl-actions { gap: 8px; }
.tl-actions button { display: inline-flex; align-items: center; gap: 4px; }
#tl-play { border: 0; background: var(--kimi-interaction); color: var(--kimi-bg-primary); font-weight: 500; }
#tl-export-all { border: 0; background: var(--kimi-fill-1); color: var(--kimi-label-primary); font-weight: 500; }
#tl-export-all:disabled { color: var(--kimi-label-quaternary); opacity: 1; }
#tl-export-size { height: 32px; padding: 5px 8px; font-size: 12px; }
#tl-strip { gap: 12px; padding: 0 16px 12px; }
.shot-card { width: 176px; border: 0; border-radius: var(--kimi-radius-sm); background: transparent; }
.shot-card:hover { border: 0; background: var(--kimi-fill-1); }
.shot-card.active { border: 0; background: var(--kimi-fill-2); box-shadow: none; }
.shot-card.playing { border: 0; background: var(--kimi-fill-2); box-shadow: none; }
.shot-thumb { height: 72px; margin: 4px 4px 0; border: 1px solid var(--kimi-separator); border-radius: var(--kimi-radius-xs); background-color: #0d0e0e; overflow: hidden; }
.shot-card.active .shot-thumb { outline: 2px solid var(--kimi-interaction); outline-offset: -2px; }
.shot-info { gap: 2px; padding: 5px 8px 7px; }
.shot-info .nm { color: var(--kimi-label-primary); font-size: 12px; line-height: 18px; }
.shot-actions { color: var(--kimi-label-tertiary); font-size: 10px; }
.shot-actions.legacy { color: var(--kimi-caution); }
.shot-info .row { gap: 2px; color: var(--kimi-label-tertiary); font-size: 12px; }
.shot-info input { width: 44px; min-height: 26px; height: 26px; padding: 3px 5px; border-radius: var(--kimi-radius-sm); font-size: 12px; }
.shot-info .x { display: grid; place-items: center; width: 24px; min-width: 24px; height: 24px; min-height: 24px; padding: 0; background: transparent; color: var(--kimi-label-tertiary); font-size: 12px; }
.shot-info .x:hover { color: var(--kimi-label-primary); background: var(--kimi-fill-2); }
.shot-info .x:last-child:hover { color: var(--kimi-danger); }
.shot-info .export-shot:hover { color: var(--kimi-positive); }
.shot-info .capture-shot:hover { color: var(--kimi-label-primary); }
.shot-add { width: 104px; border: 1px dashed var(--kimi-separator); border-radius: var(--kimi-radius-sm); background: transparent; color: var(--kimi-label-secondary); font-size: 12px; font-weight: 400; }
.shot-add:hover { border-color: var(--kimi-fill-3); background: var(--kimi-fill-1); color: var(--kimi-label-primary); }
.muted { color: var(--kimi-label-tertiary); font-size: 12px; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--kimi-fill-2); }

@media (max-width: 1180px) {
  #left-col { width: 240px; }
  #right-col { width: 296px; }
}
@media (max-width: 1023px) {
  #left-col, #right-col { z-index: var(--z-drawer); box-shadow: var(--shadow); transition: transform 300ms var(--kimi-ease-drawer), opacity 220ms var(--kimi-ease-out); }
  #left-col { width: min(82vw, 296px); }
  #right-col { width: min(88vw, 336px); }
  #toolbar { bottom: 12px; }
  .webmcp-badge { display: none; }
}
@media (max-width: 639px) {
  #topbar { height: 48px; padding-inline: 8px; }
  .brand span:last-child { display: none; }
  .mode-switch { height: 36px; padding: 2px; }
  .mode-btn { min-width: 64px; height: 32px; padding-inline: 8px; font-size: 12px; }
  .panel-toggle { width: 32px; min-width: 32px; padding: 0; font-size: 0; }
  .panel-toggle .ui-icon { width: 18px; height: 18px; }
  #timeline { height: 152px; }
  .tl-head { min-height: 44px; padding-inline: 8px; }
  .tl-title, #tl-count, #tl-total, #tl-export-size { display: none; }
  .tl-actions { width: 100%; justify-content: flex-end; }
  #tl-strip { padding-inline: 8px; }
  .shot-card { width: 152px; }
  .shot-thumb { height: 60px; }
}
