/* 3D 分子查看器（viewer/mol3d.js）。颜色都用 shared-nav.css 的变量。 */
.m3-box { display: grid; gap: 8px; margin: 10px 0; }
.m3-stage { position: relative; height: var(--m3-h, 320px); border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); overflow: hidden; touch-action: none; }
.m3-stage canvas { border-radius: 12px; }
.m3-state { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--muted); font-size: 0.92rem; }
.m3-state[data-bad=true] { color: var(--danger); }
.m3-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.88rem; }
.m3-bar select { font: inherit; padding: 3px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.m3-bar .text-button[aria-pressed=true] { color: var(--accent-text); font-weight: 600; }
.m3-frames { display: inline-flex; align-items: center; gap: 8px; }
.m3-frames input { width: 140px; accent-color: var(--accent); }
.m3-info { margin-left: auto; }
.m3-info a { color: var(--accent-text); }
@media (max-width: 560px) { .m3-stage { height: var(--m3-h-phone, 260px); } .m3-info { margin-left: 0; width: 100%; } }
.m3-box .text-button { border: 0; background: none; color: var(--accent-text); cursor: pointer; font-size: 12.5px; padding: 6px 4px; font-weight: 600; }
.m3-box .text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.m3-box .m3-open { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 12.5px; }
.m3-box .m3-open:hover { border-color: var(--accent); }

/* 分子绘制器（viewer/sketch.js） */
.sk-open { margin-top: 6px; justify-self: start; align-self: start; width: max-content; min-height: 30px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: 12.5px; }
.sk-open:hover { border-color: var(--accent); }
.sk-dialog { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sk-dialog::backdrop { background: rgba(10, 14, 20, 0.45); }
.sk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sk-head h2 { margin: 0; font-size: 18px; }
.sk-x { border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.sk-tip { margin: 6px 0 10px; color: var(--muted); font-size: 13px; }
.sk-board { position: relative; height: min(520px, calc(100vh - 230px)); min-height: 300px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; color: #222; }
.sk-state { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; color: #666; }
.sk-msg { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.sk-msg[data-bad=true] { color: var(--danger); }
.sk-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.sk-actions button { min-height: 34px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; }
.sk-actions .sk-ok { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.sk-actions .sk-clear { margin-right: auto; }
