:root {
  /* 浅蓝留白风格：三层信息 = 深蓝主信息 / 灰蓝说明 / 亮蓝操作；三档圆角 = 卡片 12 / 按钮 10 / 浮层 16 */
  --bg: #eef3fa;
  --panel: #ffffff;
  --panel-2: #f5f8fd;
  --glass: rgba(255, 255, 255, .86);
  --line: #e2e9f4;
  --line-2: #cfdbee;
  --fg: #1a2b4c;
  --fg-dim: #7b8aa6;
  --accent: #2f6bff;
  --accent-soft: #eaf1ff;
  --accent-grad: linear-gradient(180deg, #4f86ff, #2f6bff);
  --accent-2: #e07b00;
  --cur: #ff8c1a;
  --cur-soft: #fff3e6;
  --r-card: 12px;
  --r-btn: 10px;
  --r-pop: 16px;
  --shadow-card: 0 2px 6px rgba(35, 74, 150, .05), 0 8px 24px rgba(35, 74, 150, .07);
  --shadow-btn: 0 4px 12px rgba(47, 107, 255, .28);
  --shadow-pop: 0 16px 48px rgba(35, 74, 150, .18);
  --gap: 10px;
  --topbar-h: 48px;
  --left-w: 300px;
  --right-w: 320px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { height: 100dvh; }   /* iOS 地址栏伸缩时按实际可见高度排版，底部工具条不被盖住（不支持 dvh 的浏览器用上一行） */
body {
  background: var(--bg) radial-gradient(1200px 600px at 80% -10%, #dfe9fb 0, transparent 60%); color: var(--fg);
  font: 13px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

#app {
  height: 100%;
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) auto;
  gap: var(--gap); padding: var(--gap);
  grid-template-areas:
    "top top top"
    "left stage right"
    "status status status";
}

/* ---------- 顶栏 ---------- */
#topbar {
  grid-area: top; display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 14px; background: var(--glass); border: 1px solid #fff; border-radius: var(--r-card);
  box-shadow: var(--shadow-card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
#topbar h1 { font-size: 15px; font-weight: 700; margin: 0; white-space: nowrap; letter-spacing: .2px; }
#topbar h1 small { color: var(--fg-dim); font-weight: 400; margin-left: 6px; }
.spacer { flex: 1; }
#toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sep { width: 1px; height: 22px; background: var(--line); }

button, select, input[type="search"] {
  background: var(--panel); color: var(--fg);
  border: 1px solid var(--line-2); border-radius: var(--r-btn);
  padding: 6px 12px; font: inherit; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
}
button:hover, select:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button.active, .tool.active {
  background: var(--accent-grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: var(--shadow-btn);
}
button.active:hover { color: #fff; }
input[type="search"] { cursor: text; background: var(--panel-2); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.icon-btn { padding: 4px 8px; }
#btn-tree, #btn-props, .only-narrow { display: none; }

/* ---------- 面板 ---------- */
.panel {
  background: var(--panel); display: flex; flex-direction: column; min-height: 0;
  border: 1px solid #fff; border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden;
}
#left { grid-area: left; }
#right { grid-area: right; }
.panel-head { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.panel-head strong { font-size: 14px; }
.panel-head .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.panel-body { overflow: auto; padding: 8px 10px; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
.panel-foot { padding: 10px 12px; border-top: 1px solid var(--line); color: var(--fg-dim); font-size: 12px; }
#search { width: 100%; cursor: text; }
.hint { color: var(--fg-dim); font-size: 12px; min-height: 16px; }
.chk { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-dim); cursor: pointer; }

/* ---------- 构件树 ---------- */
.node { user-select: none; }
.node-row {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.node-row:hover { background: var(--panel-2); }
.node-row.sel { background: var(--accent-soft); color: var(--accent); }
.node-row.hidden-item .label { color: #b3bfd2; text-decoration: line-through; }
.twist { width: 14px; text-align: center; color: var(--fg-dim); flex: 0 0 14px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; border: 1px solid #0002; }
.eye { width: 18px; flex: 0 0 18px; text-align: center; color: var(--fg-dim); }
.label { overflow: hidden; text-overflow: ellipsis; }
.meta { color: var(--fg-dim); font-size: 11px; margin-left: auto; padding-left: 8px; }
.mark { color: var(--accent-2); }
.children { margin-left: 14px; display: none; }
.node.open > .children { display: block; }

/* ---------- 3D ---------- */
/* min-height:0 + overflow:hidden：否则 canvas 的像素尺寸会当成内容高度撑开网格行，
   手机从竖屏转横屏时整块画面被挤出屏幕（实测 390x844 -> 844x390 一片空白） */
#stage {
  grid-area: stage; position: relative; min-width: 0; min-height: 0; overflow: hidden;
  border-radius: var(--r-card); border: 1px solid #fff; box-shadow: var(--shadow-card);
  background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #eaf1fb 55%, #dde7f6 100%);
}
#canvas { display: block; width: 100%; height: 100%; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#hud {
  position: absolute; left: 10px; bottom: 10px; pointer-events: none;
  font-variant-numeric: tabular-nums; font-size: 12px; color: var(--fg-dim);
  background: var(--glass); padding: 4px 10px; border-radius: 8px; box-shadow: var(--shadow-card);
}
.tool-hint {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  background: var(--fg); color: #fff; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow-pop);
  font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.tool-hint.show { opacity: 1; }

/* ---------- 属性 / 测距 / 剖切 ---------- */
table.props { width: 100%; border-collapse: collapse; }
table.props th, table.props td { text-align: left; padding: 5px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.props th { color: var(--fg-dim); font-weight: 400; width: 38%; }
table.props td { font-variant-numeric: tabular-nums; word-break: break-all; }
.empty { color: var(--fg-dim); padding: 8px 4px; }
.warn { color: var(--accent-2); font-size: 12px; margin-top: 6px; }

.measure-list, .section-ui, .tool-ui { display: none; border-top: 1px solid var(--line); flex: 0 0 auto; max-height: 45%; }
.measure-list.show, .section-ui.show, .tool-ui.show { display: block; }
/* 碰撞 / 差异 / 视图：列表是主角，属性栏让出位置 */
.tool-ui { max-height: 68%; }
#app.tool-panel #props { max-height: 32%; flex: 0 1 auto; }
.m-modes { display: flex; gap: 4px; margin: 2px 0 6px; flex-wrap: wrap; }
.m-modes button { padding: 3px 9px; }
.m-item { border-bottom: 1px solid var(--line); padding: 5px 2px; }
.m-item .m-d { font-weight: 600; font-variant-numeric: tabular-nums; }
.m-item .m-c { color: var(--fg-dim); font-size: 11px; font-variant-numeric: tabular-nums; }
.m-item button { padding: 1px 6px; font-size: 11px; float: right; }
.sec-row { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.sec-row label { width: 56px; color: var(--fg-dim); }
.sec-row input[type="range"] { flex: 1; }
.sec-row .val { width: 74px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }

/* ---------- 状态栏 ---------- */
#status {
  grid-area: status; background: transparent;
  padding: 0 6px; margin-top: calc(-1 * var(--gap) / 2); color: var(--fg-dim); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 抽屉遮罩（只在窄屏出现）---------- */
#backdrop { display: none; }
/* 要压过 .panel-head .row 的 display:flex，否则宽屏也会露出抽屉标题栏 */
.panel-head .drawer-bar { display: none; align-items: center; }
.drawer-bar .spacer { display: block; flex: 1; }

/* ---------- 平板 / 手机 ---------- */
@media (max-width: 1100px) {
  :root { --left-w: 260px; --right-w: 280px; }
}
@media (max-width: 860px) {
  /* minmax(0,1fr)：1fr 的下限是内容最小宽度，会被一排工具按钮撑得比屏幕宽（右边被裁、工具栏滑不动） */
  #app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "stage" "status"; --gap: 6px; }
  #topbar, #stage { min-width: 0; }
  #btn-tree, #btn-props, .only-narrow { display: inline-block; }
  /* 抽屉叠在 3D 区那一格上：上下边跟着顶栏和状态栏走，不用写死状态栏高度 */
  .panel {
    align-self: stretch; width: min(86vw, 340px); min-height: 0;
    z-index: 20; box-shadow: var(--shadow-pop); display: none; border-radius: var(--r-pop);
  }
  #left { grid-area: stage; justify-self: start; }
  #right { grid-area: stage; justify-self: end; }
  .panel.open { display: flex; animation: slide-in .16s ease-out; }
  #left.open { animation-name: slide-in-left; }
  @keyframes slide-in-left { from { transform: translateX(-12px); opacity: .6 } to { transform: none; opacity: 1 } }
  @keyframes slide-in { from { transform: translateX(12px); opacity: .6 } to { transform: none; opacity: 1 } }
  #backdrop.show {
    display: block; position: absolute; inset: 0;
    background: rgba(26, 43, 76, .22); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 15;
  }
  .panel-head .drawer-bar { display: flex; }
  #left-close, #right-close { font-size: 12px; }
  /* 窄屏顶栏只有一行高：工具栏不换行，改成横向滚动，避免按钮被切掉 */
  #toolbar {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: 0 2px; flex: 1 1 auto; min-width: 0; overscroll-behavior-x: contain; touch-action: pan-x;
    justify-content: flex-start;   /* 从左排：先露出选择/测距/坐标/剖切这些主工具 */
    scroll-snap-type: x proximity;
  }
  #toolbar > * { scroll-snap-align: start; }
  #toolbar::-webkit-scrollbar { display: none; }
  #toolbar .tool, #toolbar button, #toolbar select { padding: 6px 10px; flex: 0 0 auto; }
  #toolbar select { max-width: 132px; }
  #topbar { gap: 6px; padding: 0 6px; }
  #topbar h1 { font-size: 13px; flex: 0 0 auto; }
  #topbar h1 small { display: none; }
  .spacer { display: none; }
}
@media (max-width: 620px) {
  /* 屏幕太窄时标题让位给工具栏，分段名在构件树根节点和标签页标题里都有 */
  #topbar h1 { display: none; }
  /* 375px 宽的手机上一排放得下：收紧间距和按钮内边距 */
  #topbar { gap: 6px; padding: 0 6px; }
  #toolbar { gap: 4px; }
  #topbar button { padding-left: 7px; padding-right: 7px; }
}
@media (pointer: coarse) {
  button, select { min-height: 34px; }
  .node-row { padding: 6px 4px; }
}

/* ---------- 画布上的标签 ---------- */
.lbl {
  position: absolute; left: 0; top: 0; pointer-events: none;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 2px 8px; box-shadow: var(--shadow-card); font-size: 12px; font-variant-numeric: tabular-nums;
  white-space: nowrap; z-index: 5;
}
.lbl-dist { color: var(--accent); border-color: #2f6bff55; font-weight: 700; }
.lbl-coord { color: var(--accent-2); border-color: #e07b0055; }

/* 右键菜单 */
.ctx-menu {
  position: fixed; z-index: 50; display: flex; flex-direction: column; min-width: 150px; padding: 6px;
  background: var(--glass); border: 1px solid #fff; border-radius: var(--r-pop); box-shadow: var(--shadow-pop);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.ctx-menu[hidden] { display: none; }
.ctx-menu button { text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: var(--r-btn); white-space: nowrap; }
.ctx-menu button:hover { background: var(--accent-soft); color: var(--accent); }
@media (pointer: coarse) {
  .ctx-menu button { padding: 12px 16px; font-size: 15px; }   /* 手指点得准 */
}

/* ---------- 问AI ----------
   宽屏：贴在 3D 区右侧的整高侧栏，模型在左边照常可转；窄屏：底部半屏 */
#ai-sheet {
  grid-area: right; z-index: 25; min-height: 0;
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid #fff;
  border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden;
  animation: ai-in .18s ease-out;
}
@keyframes ai-in { from { transform: translateX(12px); opacity: 0; } to { transform: none; opacity: 1; } }
#ai-sheet[hidden] { display: none; }
/* 宽屏：右栏加宽到 400px 换成对话（属性面板先让位，关掉 AI 就回来）；3D 区跟着缩，不被遮挡 */
@media (min-width: 861px) {
  #app.ai-open { --right-w: 400px; }
  #app.ai-open #right { visibility: hidden; }
}
.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.ai-badge {
  flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-grad); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px; box-shadow: var(--shadow-btn);
}
.ai-titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ai-titles strong { font-size: 15px; }
.ai-sub { color: var(--fg-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-head .spacer { flex: 1; }
.ai-head button { padding: 5px 10px; font-size: 12px; white-space: nowrap; flex: 0 0 auto; }
.ai-head .ai-close { font-size: 16px; line-height: 1; padding: 5px 9px; }

.ai-log {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.ai-msg { max-width: 90%; padding: 9px 13px; border-radius: var(--r-card); line-height: 1.65; font-size: 14px; word-break: break-word; }
.ai-msg.me { align-self: flex-end; background: var(--accent-grad); color: #fff; border-bottom-right-radius: 4px; box-shadow: var(--shadow-btn); }
.ai-msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow-card); }
.ai-msg.wait { color: var(--fg-dim); display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .3; animation: ai-dot 1.1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-msg.err { color: #d93636; background: #fff5f5; border-color: #f7d4d4; }
.ai-msg ul { margin: 4px 0; padding-left: 18px; }
.ai-msg li + li { margin-top: 2px; }
.ai-ref {
  display: inline; padding: 1px 6px; margin: 0 1px; font: inherit; font-size: 13px; line-height: 1.5;
  background: var(--accent-soft); color: var(--accent); border: 1px solid #2f6bff33; border-radius: 6px; cursor: pointer;
}
.ai-ref:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.ai-did { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--fg-dim); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.ai-did button { margin-left: auto; padding: 2px 10px; font-size: 12px; }

/* 欢迎卡 */
.ai-welcome { padding: 6px 2px 2px; }
.ai-hello { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.ai-hello-sub { color: var(--fg-dim); font-size: 13px; line-height: 1.7; margin: 6px 0 14px; }
.ai-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-card {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px;
  text-align: left; padding: 12px; border-radius: var(--r-card); background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.ai-card:hover { border-color: #2f6bff66; color: inherit; transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.ai-card .ai-ic {
  grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.ai-card b { font-size: 13.5px; }
.ai-card span:last-child { color: var(--fg-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ai-chips { display: flex; gap: 6px; padding: 8px 14px 0; overflow-x: auto; scrollbar-width: none; }
.ai-chips::-webkit-scrollbar { display: none; }
.ai-chips button { flex: 0 0 auto; border-radius: 999px; font-size: 12px; padding: 4px 12px; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.ai-chips button:hover { background: var(--accent); color: #fff; }
#ai-sheet.busy .ai-chips button, #ai-sheet.busy .ai-send, #ai-sheet.busy .ai-card { opacity: .5; pointer-events: none; }

.ai-form { padding: 10px 14px 12px; }
.ai-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; transition: border-color .15s, box-shadow .15s;
}
.ai-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-box textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; color: var(--fg);
  font: inherit; font-size: 14px; line-height: 22px; padding: 5px 0; max-height: 120px; box-shadow: none;
}
.ai-box textarea:focus { box-shadow: none; }
.ai-send {
  flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-btn);
}
.ai-send:hover { color: #fff; filter: brightness(1.06); }
.ai-foot { color: var(--fg-dim); font-size: 11px; text-align: center; margin-top: 6px; }

@media (max-width: 860px) {
  #ai-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; height: 52%; border-radius: var(--r-pop) var(--r-pop) 0 0;
    background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow-pop);
    border-left: 0; border-right: 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom);
    animation-name: ai-up;
  }
  @keyframes ai-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .ai-sub, .ai-foot { display: none; }
  .ai-head { padding: 8px 10px; }
  .ai-badge { flex-basis: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
  .ai-log { padding: 10px; gap: 10px; }
  .ai-hello { font-size: 17px; }
  .ai-hello-sub { font-size: 12.5px; margin-bottom: 10px; }
  .ai-cards { gap: 8px; }
  .ai-card { padding: 9px; grid-template-columns: 28px 1fr; column-gap: 8px; }
  .ai-card .ai-ic { width: 28px; height: 28px; border-radius: 8px; }
  .ai-form { padding: 8px 10px 10px; }
  .ai-box textarea { font-size: 16px; }   /* 16px 以下 iOS 聚焦会自动放大页面 */
}
/* 手机顶栏放不下：「问AI」缩成「AI」、去掉分隔线 */
@media (max-width: 620px) {
  #btn-ai .wide-only, #toolbar .sep { display: none; }
}
/* 空的读数框不占位 */
#hud:empty { display: none; }
@media (max-width: 620px) {
  /* 外框留白后顶栏又窄了 12px：按钮内边距再收一点，一排仍放得下 */
  #topbar { padding: 0 4px; gap: 4px; }
  #toolbar { gap: 3px; }
  #topbar button, #toolbar .tool, #toolbar button { padding-left: 6px; padding-right: 6px; }
}

/* ---------- 多专业 ---------- */
.disc-key {
  display: inline-block; min-width: 18px; margin-right: 6px; padding: 0 4px; border-radius: 5px;
  font-size: 11px; line-height: 17px; text-align: center; color: #fff; background: #7a8696;
}
.disc-key.d-H { background: #3fb6c4; } .disc-key.d-P { background: #d9a900; } .disc-key.d-E { background: #3cb44b; }
.disc-key.d-V { background: #e0559f; } .disc-key.d-S { background: #7c977c; } .disc-key.d-M { background: #c29010; }
.node.disc > .node-row .label { font-weight: 600; }
.node.disc.empty > .node-row { opacity: .55; cursor: default; }
#btn-box.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---------- 碰撞 / 差异 / 视图 / 导出（extras.js） ---------- */
.row.wrap { flex-wrap: wrap; row-gap: 6px; margin: 6px 0; }
.tool-ui .list { margin-top: 6px; }
.tool-ui .li { border-bottom: 1px solid var(--line); padding: 6px 4px; cursor: pointer; font-variant-numeric: tabular-nums; }
.tool-ui .li:hover { background: #2f6bff10; }
.tool-ui .li.on { background: #2f6bff1f; }
.tool-ui .li .sub { color: var(--fg-dim); font-size: 11px; margin-top: 2px; word-break: break-all; }
.tool-ui .li.v { display: flex; align-items: center; justify-content: space-between; }
.tool-ui .li.v button { padding: 0 7px; }
.tool-ui code { font-size: 11px; background: #0000000d; padding: 0 3px; border-radius: 3px; }
.kind { display: inline-block; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 8px; color: #fff; background: #8a96a5; margin-right: 2px; }
.kind.k-clash { background: #e5383b; }
.kind.k-touch { background: #8a96a5; }
.kind.k-gap { background: #e09a1a; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; }
.sw.a { background: #e5383b; }
.sw.b { background: #2f6fff; }
.dl-box { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.dl-box .hint { flex-basis: 100%; }
.dl-title { flex-basis: 100%; font-weight: 600; margin: 8px 0 2px; }
.box-select { position: absolute; border: 1px dashed #2f6bff; background: #2f6bff1a; pointer-events: none; z-index: 5; }
.lbl-note { color: #fff; background: #2b3a4d; border-color: #2b3a4d; max-width: 240px; white-space: normal; }
