/* MindFlow 灵图 · 样式 */
:root {
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --ink: #1d2433; --ink-2: #4a5468; --ink-3: #8a93a6;
  --line: #e7eaf0; --line-2: #d9dee7;
  --bg: #f6f7fb; --card: #ffffff;
  --brand: #3b6cff; --brand-2: #8a5cf6; --brand-soft: #edf1ff;
  --danger: #e5484d; --ok: #16b38a;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 28, 50, .05), 0 8px 24px -10px rgba(20, 28, 50, .14);
  --shadow-lg: 0 24px 60px -18px rgba(20, 28, 50, .28);
  --th-fresh: #f6f8fc; --th-business: #f3f4f6; --th-rainbow: #fffdf7; --th-macaron: #fff8f5;
  --th-forest: #f3f7f1; --th-ocean: #f1f7fb; --th-dark: #15171e; --th-ink: #fbfaf6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 600 11px/16px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-2); text-align: center; }
.ic { flex: none; display: block; }
.rot45 { transform: rotate(45deg); }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; transition: .18s; white-space: nowrap; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 20px -8px rgba(59, 108, 255, .7); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(59, 108, 255, .75); }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.danger, .btn.ghost.danger { color: var(--danger); }
.btn.ghost.danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: .6; pointer-events: none; }

/* ---------- 首页 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: rgba(246, 247, 251, .78); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(0, 0, 0, .04); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark svg { display: block; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.brand-name em { font-style: normal; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.top-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--ink-2); }
.top-nav a:hover { color: var(--brand); }

.hero { position: relative; overflow: hidden; padding: 72px 24px 64px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 85% 30%, rgba(138, 92, 246, .14), transparent 70%), radial-gradient(50% 60% at 10% 10%, rgba(59, 108, 255, .14), transparent 70%); }
.hero-bg { position: absolute; right: max(-80px, calc((100vw - 1240px) / 2 - 60px)); top: 40px; width: 620px; height: 400px; opacity: .95; pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 30%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); }
.hero-art { width: 100%; height: 100%; background: transparent !important; }
.hero-inner { position: relative; max-width: 1240px; margin: 0 auto; }
.pill-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--brand); box-shadow: var(--shadow); }
.hero h1 { margin: 22px 0 14px; font-size: clamp(38px, 5.4vw, 64px); line-height: 1.08; letter-spacing: -1.5px; font-weight: 800; }
.grad { background: linear-gradient(120deg, var(--brand) 10%, var(--brand-2) 55%, #ef4f8b 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 520px; margin: 0 0 30px; font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0; padding: 0; list-style: none; max-width: 560px; }
.feature-chips li { padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px 60px; }
.block { padding-top: 34px; scroll-margin-top: 70px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.block-head h2 small { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 99px; vertical-align: 3px; }
.chips { display: flex; gap: 6px; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.chip { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.chip.on { background: var(--ink); color: #fff; }

.grid.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.mm-thumb { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
.use-hint { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); opacity: 0; padding: 7px 14px; border-radius: 99px; background: rgba(20, 24, 36, .86); color: #fff; font-size: 12.5px; font-weight: 600; transition: .2s; backdrop-filter: blur(6px); }
.tpl-card:hover .use-hint { opacity: 1; transform: translate(-50%, 0); }
.tpl-card.loading { opacity: .6; pointer-events: none; }
.card-body { padding: 14px 16px 16px; }
.card-title { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-desc { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink-3); min-height: 40px; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.tag { padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tag.soft { background: #f1f2f6; color: var(--ink-2); }
.card-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0; transition: .2s; }
.card:hover .card-actions { opacity: 1; }
.card-actions button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .95); color: var(--ink-2); }
.card-actions button:hover { color: var(--brand); }
.card-actions button.danger:hover { color: var(--danger); }
.new-card { align-items: center; justify-content: center; gap: 12px; min-height: 230px; border: 2px dashed var(--line-2); background: transparent; color: var(--ink-3); font-weight: 600; }
.new-card .plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; color: var(--brand); box-shadow: var(--shadow); }
.new-card:hover { border-color: var(--brand); color: var(--brand); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px; background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-3); }
.empty-art { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; max-width: 1240px; margin: 0 auto; padding: 26px 24px 40px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.foot code { background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 10px; background: #1d2433; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--danger); }
.toast.ok { background: #12805f; }

/* ---------- 编辑器 ---------- */
body.editor { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.ed-top { position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); }
.ed-left, .ed-right, .ed-tools { display: flex; align-items: center; gap: 8px; }
.ed-left { flex: 1; min-width: 0; }
.ed-tools { position: absolute; left: 50%; transform: translateX(-50%); }
.ed-right { flex: 1; justify-content: flex-end; }
.ed-title { min-width: 80px; max-width: 300px; width: 100%; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; font: 700 15px var(--font); color: var(--ink); background: transparent; outline: none; text-overflow: ellipsis; }
.ed-title:hover { background: #f4f5f9; }
.ed-title:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(59, 108, 255, .14); }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-state.pending i { background: #f4b400; animation: pulse 1s infinite; }
.save-state.err i { background: var(--danger); }
.save-state.err { color: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }
.tb { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); transition: .15s; }
.tb:hover { background: #f1f3f8; color: var(--ink); }
.tb:active { transform: scale(.94); }
.tb-group { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #f6f7fa; border: 1px solid var(--line); }
.tb-group .tb { width: 34px; height: 32px; }
.tb-group .tb:hover { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.zoom { display: flex; align-items: center; padding: 2px; border-radius: 10px; border: 1px solid var(--line); }
.zoom .tb { width: 30px; height: 30px; }
.zoom-val { min-width: 54px; height: 30px; border: 0; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-radius: 7px; }
.zoom-val:hover { background: #f1f3f8; }
.menu-wrap { position: relative; }
.menu, .ctx { position: absolute; z-index: 50; min-width: 210px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-4px) scale(.98); pointer-events: none; transition: .15s; }
.menu { right: 0; top: calc(100% + 8px); }
.menu.open, .ctx.open { opacity: 1; transform: none; pointer-events: auto; }
.menu button, .ctx button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13.5px; text-align: left; }
.menu button:hover, .ctx button:hover { background: var(--brand-soft); color: var(--brand); }
.menu small { margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.menu hr, .ctx hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.ctx { position: fixed; min-width: 200px; }
.ctx button { justify-content: space-between; }
.ctx button.danger { color: var(--danger); }
.ctx button.danger:hover { background: #fff0f0; }
.ctx kbd { font-size: 10.5px; }

.ed-main { flex: 1; display: flex; min-height: 0; }
.canvas-wrap { position: relative; flex: 1; min-width: 0; overflow: hidden; transition: background .3s; }
.mm-canvas { display: block; width: 100%; height: 100%; outline: none; cursor: default; user-select: none; -webkit-user-select: none; touch-action: none; }
.mm-canvas.panning { cursor: grabbing; }
.mm-canvas.linking, .mm-canvas.linking .mm-node { cursor: crosshair; }
.mm-node { cursor: pointer; }
.mm-node .mm-text { pointer-events: none; }
.mm-sel { display: none; fill: rgba(59, 108, 255, .06); stroke: #3b6cff; stroke-width: 2; }
.mm-node.selected .mm-sel { display: block; }
.mm-node.drop-target .mm-sel { display: block; fill: rgba(22, 179, 138, .1); stroke: #16b38a; stroke-dasharray: 5 4; }
.mm-node.dragging { opacity: .72; pointer-events: none; }
.mm-node:hover .mm-shape { filter: brightness(1.04); }
.mm-toggle { cursor: pointer; opacity: 0; transition: opacity .15s; }
.mm-toggle.collapsed, .mm-node:hover .mm-toggle, .mm-node.selected .mm-toggle { opacity: 1; }
.mm-toggle:hover circle { stroke-width: 2.4; }
.mm-note { cursor: help; }
.mm-link { cursor: pointer; }
.mm-link.selected .mm-link-line { stroke-width: 3; stroke-dasharray: none; }
.mm-link:hover .mm-link-line { stroke-width: 2.6; }
.mm-editor { position: absolute; z-index: 10; margin: 0; padding: 6px 10px; border: 2px solid var(--brand); border-radius: 10px; background: #fff; color: var(--ink); font-family: var(--font); line-height: 1.42; text-align: center; resize: none; outline: none; overflow: hidden; box-shadow: 0 0 0 4px rgba(59, 108, 255, .16), var(--shadow-lg); }
.mm-editor.link { border-radius: 99px; padding: 6px 12px; }

.hintbar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 16px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12px; color: var(--ink-2); white-space: nowrap; backdrop-filter: blur(8px); transition: opacity .6s; }
.hintbar.fade { opacity: 0; pointer-events: none; }
.canvas-wrap:hover .hintbar.fade { opacity: .9; }
.link-tip { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -10px); opacity: 0; padding: 8px 16px; border-radius: 99px; background: #1d2433; color: #fff; font-size: 13px; pointer-events: none; transition: .2s; }
.link-tip.show { opacity: 1; transform: translate(-50%, 0); }
.link-tip kbd { background: rgba(255, 255, 255, .15); border-color: transparent; color: #fff; }

/* ---------- 侧栏 ---------- */
.side { width: 300px; flex: none; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); transition: margin .25s; }
body.side-hidden .side { margin-right: -300px; }
.side-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.side-tabs button { position: relative; flex: 1; padding: 10px 0 11px; border: 0; background: transparent; font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.side-tabs button:hover { color: var(--ink); }
.side-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.side-tabs button.has::after { content: ""; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.side-body { flex: 1; overflow-y: auto; padding: 4px 16px 24px; }
.sec { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.sec:last-child { border-bottom: 0; }
.sec h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .4px; }
.muted { margin: 8px 0 10px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.opts { display: grid; gap: 8px; }
.opts.g2 { grid-template-columns: repeat(2, 1fr); }
.opts.g3 { grid-template-columns: repeat(3, 1fr); }
.opts.g4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 600; transition: .15s; }
.opt:hover { border-color: #b9c6ff; color: var(--brand); background: #fafbff; }
.opt.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.opt.xs { padding: 7px 2px 5px; font-size: 10.5px; font-weight: 500; gap: 3px; }
.opt.xs span { white-space: nowrap; transform: scale(.95); }
.ico { width: 100%; height: 34px; display: block; }
.ico.lay { height: 36px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.lay .f { fill: currentColor; fill-opacity: .9; }
.ico.lay .b { stroke-width: 3; opacity: .35; }
.opt.xs .ico { height: 26px; }
.opt.sm .ico { height: 30px; }
.theme-card { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: .15s; }
.theme-card:hover { border-color: #b9c6ff; }
.theme-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 108, 255, .14); }
.tc-prev { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 8px; background: var(--bg); }
.tc-root { width: 26px; height: 14px; border-radius: 5px; }
.tc-dots { display: grid; grid-template-columns: repeat(5, 9px); gap: 3px; }
.tc-dots i { width: 9px; height: 9px; border-radius: 3px; }
.tc-name { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center; padding-bottom: 2px; }
.seg { display: flex; padding: 3px; gap: 2px; border-radius: 10px; background: #f3f4f8; }
.seg button { flex: 1; height: 30px; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.switch input { display: none; }
.switch i { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: #d5d9e2; transition: .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { left: 19px; }
.range { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.range input { flex: 1; accent-color: var(--brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stats div { display: flex; flex-direction: column; align-items: center; padding: 10px 0; border-radius: 10px; background: #f6f7fb; }
.stats b { font-size: 18px; }
.stats span { font-size: 11.5px; color: var(--ink-3); }
.swatches { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.sw { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid rgba(0, 0, 0, .1); border-radius: 7px; background: var(--c); transition: .12s; }
.sw:hover { transform: scale(1.12); }
.sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.sw.auto { display: grid; place-items: center; background: #fff; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.sw.custom { display: block; overflow: hidden; background: conic-gradient(#ff595e, #f4b400, #6ab04c, #1982c4, #8a5cf6, #ff595e); cursor: pointer; }
.sw.custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.inp { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 9px; font: 13.5px/1.5 var(--font); color: var(--ink); background: #fff; outline: none; resize: vertical; transition: .15s; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 108, 255, .14); }
select.inp { height: 34px; padding: 0 8px; }
.font-row { display: flex; gap: 6px; }
.tog { width: 34px; height: 34px; flex: none; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: 15px; }
.tog.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.side-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 12px; text-align: center; color: var(--ink-3); font-size: 13px; line-height: 1.7; }
.side-empty .ico { width: 90px; height: 56px; color: #c3cad8; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(18, 22, 34, .42); backdrop-filter: blur(4px); animation: fade .2s; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(560px, calc(100vw - 32px)); padding: 20px 22px 24px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.keys div { display: flex; align-items: center; gap: 4px; padding: 7px 0; border-bottom: 1px solid #f1f2f6; font-size: 12.5px; color: var(--ink-2); }
.keys span { margin-left: auto; color: var(--ink-3); }

/* ---------- 暗色画布时的浮层 ---------- */
body.canvas-dark .hintbar { background: rgba(30, 33, 44, .9); border-color: #2c3140; color: #b8bfd0; }
body.canvas-dark .hintbar kbd { background: #2a2f3d; border-color: #3a4152; color: #d5dae6; }

@media (max-width: 1100px) { .ed-tools { position: static; transform: none; } .ed-tools .tb-group:last-child { display: none; } }
@media (max-width: 860px) {
  .side { position: absolute; right: 0; top: 58px; bottom: 0; z-index: 25; box-shadow: var(--shadow-lg); }
  body:not(.side-shown) .side { margin-right: -300px; }
  .ed-tools, .save-state, .hintbar { display: none; }
  .hero-bg { opacity: .35; }
  .top-nav a { display: none; }
}
.mm-link-temp { pointer-events: none; }
