/* Mind map — every mm- rule (design/mindmap-spec.md, sections 7 and 2.8).
   LOOK: the pen screen's "one clean bar" — one floating bar, solid surfaces, soft shadows, 11–20 px corners, the app's own accent.
   RULES: every surface is solid (no backdrop-filter, no filter, no blur), so Lite only has shadows and motion to switch off;
          only transform and opacity ever animate; touch targets are 44 px (bar buttons 40 px, the same as the pen bar).
   Dark and light come from light-dark() on the app's colour-scheme, so there is no separate dark block.
   Nothing here uses a class from pen.css or a rule scoped to .ink. Lines marked JS are layout that mind-edit.js / mind-ui.js rely on. */
:root{--mm-canvas:light-dark(#f4f5f7,#15161a);--mm-bar:light-dark(#ffffff,#28292f);--mm-barline:light-dark(rgba(20,30,60,.1),rgba(255,255,255,.09));
  --mm-pan:light-dark(#ffffff,#26272c);--mm-violet:#7c3aed;--mm-gold1:#f6c453;--mm-gold2:#e8930c;--mm-goldink:#3d2600}

/* ---------- editor: root, stage, text box (JS) ---------- */
.mm-ed{position:fixed;inset:0;z-index:76;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;overscroll-behavior:none;font:15px/1.4 var(--sans);color:var(--ink)}
.mm-stage{position:absolute;inset:0;overflow:hidden;background:var(--mm-canvas)}
.mm-stage canvas{position:absolute;transform-origin:0 0;touch-action:none}   /* left, top, width, height, transform are set inline */
.mm-cv,.mm-ink{pointer-events:none}
.mm-cv{z-index:1}.mm-ink{z-index:2}.mm-top{z-index:3}
.mm-hl{position:absolute;inset:0;pointer-events:none;z-index:4}
.mm-ta{position:absolute;pointer-events:auto;user-select:text;-webkit-user-select:text;resize:none;overflow:hidden;border:0;outline:0;padding:0;margin:0;background:transparent;white-space:pre-wrap;overflow-wrap:anywhere}
.mm-ta{display:block;border-radius:0;box-shadow:none;-webkit-appearance:none;appearance:none;caret-color:var(--acc)}
.mm-ed[data-tool=pen] .mm-top{cursor:crosshair}
.mm-ed[data-tool=pen][data-pen=e] .mm-top{cursor:cell}
.mm-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#mmSprite{position:absolute;width:0;height:0;overflow:hidden}
@media print{.mm-ed{display:none!important}}

/* ---------- the bar: Back, title, Undo, Redo, Draw (+ dot, Eraser), ＋, ⋯ ---------- */
.mm-bar{position:absolute;top:10px;left:0;right:0;margin:0 auto;width:max-content;max-width:calc(100% - 16px);display:flex;align-items:center;gap:2px;padding:6px;border-radius:18px;background:var(--mm-bar);border:1px solid var(--mm-barline);box-shadow:0 8px 26px rgba(15,20,45,.16);white-space:nowrap;z-index:10}
.mm-bar>*{flex:none}
.mm-b,.mm-plus{width:40px;height:40px}
.mm-b[aria-expanded=true]{background:var(--accSoft);color:var(--acc)}
.mm-plus,.mm-plus:hover,.mm-plus[aria-pressed=true],.mm-plus[aria-expanded=true]{border-radius:12px;background:var(--acc);color:var(--onacc)}
.mm-plus .i{stroke-width:2.4}
/* the title is the only part of the bar that gives way when the bar is too wide */
.mm-title{flex:0 1 auto;display:flex;align-items:center;gap:6px;height:40px;min-width:56px;padding:0 8px 0 6px;border:0;border-radius:11px;background:none;color:var(--ink);font-weight:600;text-align:left}
.mm-title:hover{background:var(--hover)}
.mm-tt{flex:0 1 auto;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.6}
/* saved = a quiet tick, saving = a small ring, error = a red chip that shows the (translated) aria-label */
.mm-tick{flex:none;display:inline-grid;place-items:center;width:16px;height:16px;font-style:normal}
.mm-tick[data-s=saved]::before{content:'';width:5px;height:9px;margin-top:-2px;border:solid var(--ok);border-width:0 1.8px 1.8px 0;transform:rotate(45deg);opacity:.8}
.mm-tick[data-s=saving]::before{content:'';width:12px;height:12px;border-radius:50%;border:1.8px solid var(--mut);border-right-color:transparent;animation:mmSpin .8s linear infinite}
.mm-tick[data-s=error]{width:auto;height:22px;padding:0 8px;border-radius:11px;background:light-dark(#d93a3f,#c9353a);color:#fff;font-size:11.5px;font-weight:700;line-height:22px}
.mm-tick[data-s=error]:empty::before{content:attr(aria-label)}
.mm-sep{width:1px;height:24px;margin:0 5px;background:light-dark(rgba(20,30,60,.13),rgba(255,255,255,.12))}
.mm-draw{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px 0 11px;border:0;border-radius:20px;background:var(--hover);color:var(--ink);font-size:14.5px;font-weight:600}
.mm-draw .i{width:20px;height:20px}
.mm-draw[aria-pressed=true],.mm-ed[data-tool=pen] .mm-draw{background:var(--acc);color:var(--onacc)}
.mm-dot{display:grid;place-items:center;width:36px;height:40px;padding:0;border:0;border-radius:12px;background:none}
/* double ring: a gap in the bar colour, then the pen colour; the faint third ring keeps a near-black pen visible on the dark bar */
.mm-dot i{display:block;width:24px;height:24px;border-radius:50%;background:var(--c,#1a1c22);box-shadow:0 0 0 2.5px var(--mm-bar),0 0 0 4.5px var(--c,#1a1c22),0 0 0 5.5px light-dark(rgba(20,30,60,.12),rgba(255,255,255,.3))}
.mm-ed[data-pen=e] .mm-era{background:var(--accSoft);color:var(--acc)}
/* under 520 px (JS adds .mm-tight): Redo moves into ⋯ and the title shrinks */
.mm-tight .mm-bar{gap:0;padding:5px}
.mm-tight .mm-sep{margin:0 3px}
.mm-tight .mm-redo{display:none}
.mm-tight .mm-tt{max-width:132px}
.mm-tight .mm-draw{padding:0 11px 0 9px}
@media (max-width:400px){   /* phones: Draw keeps its icon only, and gives the title's room to the pen controls */
  .mm-draw{width:40px;padding:0;justify-content:center}.mm-draw span{display:none}
  .mm-ed[data-tool=pen] .mm-title{min-width:0}.mm-ed[data-tool=pen] .mm-tt{display:none}
}

/* ---------- hint chip, selection bar, zoom pill, minimap, "Show my map" ---------- */
/* width:max-content because left:50% would otherwise wrap the text at half the screen */
.mm-hint{position:absolute;top:72px;left:50%;transform:translateX(-50%);z-index:7;display:flex;align-items:center;gap:2px;width:max-content;max-width:calc(100% - 24px);min-height:36px;padding:6px 14px;border-radius:18px;background:var(--ink);color:var(--bg);font-size:13.5px;font-weight:600;line-height:1.3;text-align:center;box-shadow:0 6px 18px rgba(15,20,45,.2);pointer-events:none;animation:mmHint .16s ease-out}
.mm-hx,.mm-hx:hover{width:44px;height:44px;margin:-10px -12px -10px 0;border-radius:50%;background:none;color:inherit;pointer-events:auto}   /* the chip lets touches through; only its ✕ takes them */
.mm-hx .i{width:18px;height:18px}
.mm-sel{position:absolute;z-index:8;display:flex;align-items:center;gap:2px;width:max-content;max-width:calc(100% - 16px);padding:4px;border-radius:16px;background:var(--mm-bar);border:1px solid var(--mm-barline);box-shadow:0 8px 22px rgba(15,20,45,.18);white-space:nowrap;animation:mmIn .16s ease-out}   /* left, top inline */
.mm-moving .mm-sel{visibility:hidden;pointer-events:none}   /* not display:none, so mind-ui.js can still measure it */
.mm-sel>*{flex:none}
.mm-sb[data-x="sel:delete"]{color:var(--warn)}
.mm-sn{padding:0 8px 0 12px;font-size:13.5px;font-weight:600;color:var(--mut)}
.mm-st{min-height:44px;padding:0 14px;border:0;border-radius:11px;background:none;color:var(--ink);font-weight:600}
.mm-st:hover{background:var(--hover)}
.mm-go,.mm-go:hover{background:var(--acc);color:var(--onacc)}
.mm-zoom{position:absolute;right:12px;bottom:12px;z-index:6;display:flex;align-items:center;padding:2px;border-radius:14px;background:var(--mm-bar);border:1px solid var(--mm-barline);box-shadow:0 6px 18px rgba(15,20,45,.14)}
.mm-zoom button{display:grid;place-items:center;width:44px;height:40px;padding:0;border:0;border-radius:11px;background:none;color:var(--mut)}
.mm-zoom button:hover{background:var(--hover);color:var(--ink)}
.mm-zoom .i{width:20px;height:20px}
.mm-zoom .mm-zp{width:auto;min-width:54px;padding:0 4px;color:var(--ink);font-size:13.5px;font-weight:600;font-variant-numeric:tabular-nums}
/* the outline is a shadow, not a border: a border would shrink the canvas box and shift where a tap lands */
.mm-map{position:absolute;left:12px;bottom:12px;width:160px;height:110px;z-index:6;border-radius:12px;background:var(--mm-bar);box-shadow:0 0 0 1px var(--mm-barline),0 6px 18px rgba(15,20,45,.14);touch-action:none;cursor:pointer}
/* while typing the keyboard halves the stage: the corner widgets sit above the text box (z 6 over z 4), so they step aside */
.mm-typing .mm-map,.mm-typing .mm-zoom,.mm-typing .mm-find{visibility:hidden;pointer-events:none}
.mm-find{position:absolute;left:50%;bottom:84px;transform:translateX(-50%);z-index:6;width:max-content;max-width:calc(100% - 24px);min-height:44px;padding:0 18px;border:0;border-radius:22px;background:var(--acc);color:var(--onacc);font-weight:600;box-shadow:0 8px 20px rgba(15,20,45,.22)}

/* ---------- panels (one at a time inside .mm-pan) ----------
   Hairlines inside a panel use light-dark(#e4e4df,#3b3c44): the app's --line in light, a little stronger in dark, where --line is lost on the panel colour. */
.mm-pan{position:absolute;width:min(380px,calc(100% - 16px));max-height:calc(100% - 90px);overflow:auto;z-index:12;padding:14px;border-radius:20px;background:var(--mm-pan);color:var(--ink);border:1px solid var(--line);box-shadow:0 22px 50px rgba(0,0,0,.28);overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin;animation:mmIn .16s ease-out}   /* left, top inline */
.mm-pan.mm-p-color,.mm-pan.mm-p-pen,.mm-pan.mm-p-line{width:min(292px,calc(100% - 16px))}   /* five 44 px swatches to a row */
.mm-ph{display:flex;align-items:center;gap:8px;min-height:28px;margin:0 2px 10px}
.mm-ph b{flex:1;font-size:17px;font-weight:650;letter-spacing:-.01em}
.mm-pk{margin:14px 2px 6px;font-size:12px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:var(--mut)}
.mm-pk:first-child{margin-top:0}
.mm-grid,.mm-q4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.mm-q4{gap:6px;margin-bottom:8px}
.mm-tile,.mm-q4>button,.mm-lay{display:flex;flex-direction:column;align-items:center;gap:6px;min-height:44px;padding:10px 2px 8px;border:0;border-radius:14px;background:light-dark(#f5f6f9,rgba(255,255,255,.05));color:var(--ink);font-size:12.5px;font-weight:600;line-height:1.2;text-align:center}
.mm-tile:active,.mm-q4>button:active,.mm-lay:active{transform:scale(.96)}
.mm-tile[aria-pressed=true]{box-shadow:inset 0 0 0 2px var(--tf,var(--acc))}
.mm-ti{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:var(--tb,var(--accSoft));color:var(--tf,var(--acc))}
/* quick tiles in ⋯: the whole tile carries the tint, so the icon needs no chip of its own */
.mm-q4>button{background:var(--tb,var(--accSoft));color:var(--tf,var(--acc));font-size:11.5px}
.mm-q4 .mm-ti{width:auto;height:22px;border-radius:0;background:none;color:inherit}
.mm-q4 .i{width:20px;height:20px}
.mm-lay{display:inline-flex;min-width:72px;box-shadow:inset 0 0 0 1px light-dark(#e4e4df,#3b3c44)}
.mm-lay svg{width:36px;height:36px;color:var(--mut)}
.mm-lay[aria-pressed=true]{background:var(--accSoft);color:var(--acc);box-shadow:inset 0 0 0 2px var(--acc)}
.mm-lay[aria-pressed=true] svg{color:var(--acc)}
/* the lines between buttons are the 1 px gaps showing the container colour, so a control that has to wrap onto two rows keeps its grid */
.mm-seg{display:flex;flex-wrap:wrap;gap:1px;border:1px solid light-dark(#e4e4df,#3b3c44);border-radius:12px;overflow:hidden;background:light-dark(#e4e4df,#3b3c44)}
.mm-seg button{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:min-content;min-height:44px;padding:4px 6px;border:0;background:var(--mm-pan);color:var(--ink);font-size:14px;line-height:1.15;white-space:normal}
.mm-seg button[aria-pressed=true]{background:var(--accSoft);color:var(--acc);font-weight:600}
.mm-seg .i{width:18px;height:18px}
.mm-seg button:focus-visible,.mm-tabs button:focus-visible{outline-offset:-2px}   /* the rounded box clips an outer ring */
/* emoji group tabs: six words never fit one row, so they are chips that scroll sideways */
.mm-tabs,.mm-tabs .mm-seg{display:flex;flex-wrap:nowrap;gap:6px;border:0;border-radius:0;overflow:visible;background:none}
.mm-tabs{overflow-x:auto;overflow-y:hidden;margin:0 -2px 8px;padding:0 2px;scrollbar-width:none;touch-action:pan-x pan-y}
.mm-tabs::-webkit-scrollbar{display:none}
.mm-tabs button{flex:none;min-height:44px;padding:0 13px;border:1px solid light-dark(#e4e4df,#3b3c44);border-radius:12px;background:var(--mm-pan);color:var(--ink);font-size:13.5px;white-space:nowrap}
.mm-tabs button[aria-pressed=true]{border-color:var(--acc);background:var(--accSoft);color:var(--acc);font-weight:600}
.mm-sw{display:flex;flex-wrap:wrap;gap:6px}
/* a 44 px button holding a 30 px disc */
.mm-swb{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:none;color:var(--ink);font-size:13px;font-weight:600}
.mm-swb::before{content:'';flex:none;width:30px;height:30px;border-radius:50%;background:var(--c,var(--mut));box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--ink) 20%,transparent)}
.mm-swb[aria-pressed=true]::before{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--ink) 20%,transparent),0 0 0 2.5px var(--mm-pan),0 0 0 5px var(--acc)}
.mm-swb.auto{width:auto;min-width:44px;gap:6px}
.mm-swb.auto:not(:empty){padding:0 10px 0 7px}
.mm-swb.auto::before{background:linear-gradient(135deg,var(--ink) 50%,var(--mm-pan) 50%)}   /* half ink, half paper = chosen for you */
.mm-row{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:5px 2px;border:0;border-bottom:1px solid light-dark(#e4e4df,#3b3c44);background:none;color:var(--ink);font-size:14.5px;line-height:1.3;text-align:left}
.mm-row:last-child{border-bottom:0}
.mm-row>span{flex:1}
.mm-row small{display:block;margin-top:3px;font-size:12.5px;line-height:1.45;color:var(--mut)}   /* Devanagari needs the taller line: at 1.3 the hint touched the label */
.mm-tg{flex:none;position:relative;width:44px;height:26px;border-radius:13px;background:light-dark(#d5d9e2,#4a4d57)}
.mm-tg::after{content:'';position:absolute;left:3px;top:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .18s}
.mm-row[aria-pressed=true] .mm-tg{background:light-dark(#2f54eb,#5b7cff)}
.mm-row[aria-pressed=true] .mm-tg::after{transform:translateX(18px)}
.mm-rows{display:flex;flex-direction:column;margin-top:6px}
.mm-r{display:flex;align-items:center;gap:12px;flex:none;width:100%;min-height:44px;padding:6px;border:0;border-radius:10px;background:none;color:var(--ink);font-size:14.5px;line-height:1.3;text-align:left}
.mm-r:hover{background:var(--hover)}
.mm-r>span{flex:1}
.mm-r .i{width:19px;height:19px;color:var(--mut)}
.mm-r.danger,.mm-r.danger .i{color:var(--warn)}
.mm-wide{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;padding:0 14px;border:0;border-radius:12px;background:var(--accSoft);color:var(--acc);font-weight:600}
.mm-wide .i{width:19px;height:19px}
.mm-emg{display:grid;grid-template-columns:repeat(8,minmax(0,1fr))}
.mm-em{display:grid;place-items:center;height:44px;padding:0;border:0;border-radius:10px;background:none;color:var(--ink);font-size:24px;line-height:1}
.mm-em:hover{background:var(--hover)}
.mm-em[aria-pressed=true]{background:var(--accSoft);box-shadow:inset 0 0 0 2px var(--acc)}
.mm-em .i{width:24px;height:24px}
.mm-em.none{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-bottom:6px;border:1px dashed light-dark(#e4e4df,#3b3c44);color:var(--mut);font-size:14px;font-weight:600}

/* ---------- Library: crown, shelf, Premium pill, cards ---------- */
.mm-crown{display:inline-grid;place-items:center;flex:none;font-style:normal}
.fi .mm-crown .i{width:14px;height:14px;stroke-width:2;color:var(--mm-gold2);fill:currentColor;fill-opacity:.25}
.fi.on .mm-crown .i{color:light-dark(var(--mm-gold1),#6b3f00)}   /* the chosen row is accent-coloured: pale gold on the blue, deep gold on the dark theme's light accent */
.mm-shelf{display:flow-root}
.mm-shead{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-height:44px;margin:-4px 0 8px;font-size:13px;color:var(--mut)}
.mm-shead .mm-prem{margin-left:auto}
.mm-prem{position:relative;display:inline-flex;align-items:center;gap:5px;flex:none;height:28px;padding:0 12px 0 9px;border:0;border-radius:14px;background:linear-gradient(135deg,var(--mm-gold1),var(--mm-gold2));color:var(--mm-goldink);font-size:12.5px;font-weight:700;line-height:1;white-space:nowrap;box-shadow:0 4px 10px rgba(232,147,12,.26)}
.mm-prem::after{content:'';position:absolute;inset:-8px -4px}   /* a 28 px pill with a 44 px touch area */
.mm-prem .i{width:14px;height:14px;stroke-width:2.2}
.mm-new .pv{display:grid;place-items:center;aspect-ratio:420/264;border:2px dashed color-mix(in srgb,var(--mm-violet) 45%,transparent);background:color-mix(in srgb,var(--mm-violet) 8%,var(--card));box-shadow:none}
.mm-newi{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:var(--mm-violet);color:#fff}
.mm-newi .i{width:26px;height:26px;stroke-width:2.2}
/* thumbnails are paper: always light on white, in both themes */
.mm-pv{aspect-ratio:420/264;background:#fff;color-scheme:light;container-type:inline-size}
.mm-pv>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
.mm-pvb{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--mm-violet);color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.22)}
.mm-pvb .i{width:13px;height:13px;stroke-width:2.1}
@container (max-width:110px){.mm-pvb{display:none}}   /* no room for a badge on the small "Continue writing" picture */
.th.mm-th{background:#fff;color-scheme:light;box-shadow:0 0 0 1px var(--line)}
.mm-empty{display:flex;flex-direction:column;align-items:center;gap:6px;max-width:460px;margin:0 auto;padding:36px 16px 40px;text-align:center;color:var(--mut)}
.mm-empty svg:not(.i){display:block;width:min(240px,70%);height:auto;margin-bottom:8px}
.mm-empty b{font-size:18px;color:var(--ink)}
.mm-empty p{margin:0}
.mm-empty .pb{display:inline-flex;align-items:center;gap:6px;margin-top:12px}
.mm-card{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 16px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);font:600 15px/1.3 var(--sans);text-align:left;cursor:pointer}
.mm-card .i{color:var(--mm-violet)}

/* ---------- start sheet and template tiles ---------- */
.mm-start{flex:1;display:flex;flex-direction:column;min-height:0;height:100%}
.mm-st-top h2{display:block;overflow:hidden;text-overflow:ellipsis}   /* the app hides a .fpt heading on narrow screens; this bar has room for it */
.mm-st-body{flex:1;min-height:0;overflow:auto;padding:18px max(22px,calc((100% - 1080px)/2)) 40px}
.mm-st-h{margin:2px 0 10px;font-size:15px;font-weight:650;color:var(--mut)}
.mm-st-h:not(:first-child){margin-top:26px}
.mm-st-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:720px}
.mm-st-card{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:12px 14px 14px;border:1px solid var(--line);border-radius:18px;background:var(--card);color:var(--ink);text-align:left}
.mm-st-card:hover,.mm-st-card:focus-visible{border-color:var(--acc)}
.mm-st-card:active,.mm-tpl:active .mm-tpl-im{transform:scale(.98)}
.mm-st-card>:first-child:not(b){display:block;width:100%;height:auto;aspect-ratio:2/1;margin-bottom:8px;border-radius:12px;background:#f3f5fa;color-scheme:light;object-fit:contain;overflow:hidden}
.mm-st-card>:first-child>svg,.mm-st-card>:first-child>img{display:block;width:100%;height:100%;object-fit:contain}
.mm-st-card b{font-size:17px}
.mm-st-card>b~span{font-size:13.5px;line-height:1.35;color:var(--mut)}
.mm-st-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:18px 16px}
.mm-tpl{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0;border:0;background:none;color:var(--ink);text-align:left}
.mm-tpl-im{display:block;aspect-ratio:220/140;border-radius:12px;overflow:hidden;background:#fff;color-scheme:light;box-shadow:0 0 0 1px rgba(0,0,0,.08),0 4px 12px rgba(30,30,50,.08)}
.mm-tpl-im img{display:block;width:100%;height:100%;object-fit:contain}
.mm-tpl-im img:not([src]){visibility:hidden}   /* no broken-picture outline while a thumbnail is still being drawn */
.mm-tpl:hover .mm-tpl-im,.mm-tpl:focus-visible .mm-tpl-im{box-shadow:0 0 0 2px var(--acc)}
.mm-tpl-n{font-size:13.5px;font-weight:600;line-height:1.25}
.mm-tpl-s{margin-top:-3px;font-size:12px;line-height:1.35;color:var(--mut)}
@media (max-width:520px){.mm-st-cards{grid-template-columns:minmax(0,1fr)}.mm-st-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- export sheet, note picker, guide ---------- */
.mm-exp{display:flex;flex-direction:column;gap:14px}
.mm-exp-pv{display:grid;place-items:center;min-height:120px;max-height:46vh;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff;color-scheme:light}
.mm-exp-pv img{display:block;width:auto;height:auto;max-width:100%;max-height:46vh;object-fit:contain}
.mm-exp-opts{display:flex;flex-direction:column;gap:6px}
.mm-exp .acts{margin-top:0}
.mm-exp .pb{min-width:120px}
.mm-exp .pb:disabled{opacity:.6;pointer-events:none}
.mm-pick{display:flex;flex-direction:column;gap:10px;min-height:0}
.mm-pick-q{flex:none}
.mm-pick-list{display:flex;flex-direction:column;gap:2px;max-height:52dvh;overflow:auto;overscroll-behavior:contain}
.mm-pick-list button{display:flex;flex-direction:column;justify-content:center;gap:1px;flex:none;min-height:48px;padding:6px 12px;border:0;border-radius:10px;background:none;color:var(--ink);text-align:left}
.mm-pick-list button:hover{background:var(--hover)}
.mm-pick-list b{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mm-pick-list small{font-size:12.5px;color:var(--mut)}
.mm-pick-none{padding:26px 8px;text-align:center;color:var(--mut)}
.mm-guide{display:flex;flex-direction:column;align-items:center;text-align:center;color:var(--ink)}
/* the art is paper, like thumbnails: light in both themes, whatever colours the drawing uses */
.mm-g-art{width:100%;max-width:320px;margin:4px auto;padding:10px;border-radius:16px;background:#eef2fb;color:#191b21;color-scheme:light}
.mm-g-art svg{display:block;width:100%;height:auto}
.mm-g-dots{display:flex;justify-content:center;gap:7px;margin:10px 0 2px}
.mm-g-dots>*{width:8px;height:8px;border-radius:50%;background:var(--line)}
.mm-g-dots>.on,.mm-g-dots>[aria-current=true],.mm-g-dots>[aria-current=step]{background:var(--acc)}
.mm-guide h3{margin:12px 0 6px;font-size:20px}
.mm-guide p{margin:0 0 16px;font-size:14.5px;line-height:1.5;color:var(--mut)}
.mm-guide .pb{min-width:160px}
/* if the guide is put straight on the editor (not in a sheet) it is its own centred card, above the panels */
.mm-ed>.mm-guide{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:14;width:min(430px,calc(100% - 32px));max-height:calc(100% - 32px);overflow:auto;padding:18px 22px 22px;border-radius:24px;background:var(--mm-pan);border:1px solid var(--line);box-shadow:0 30px 70px rgba(0,0,0,.35)}

/* ---------- motion; Lite, no-animation and reduced motion (2.8) ---------- */
@keyframes mmIn{from{opacity:0;transform:translateY(6px)}}   /* fade and rise 6 px; transform and opacity only */
@keyframes mmHint{from{opacity:0;transform:translate(-50%,6px)}}   /* the same, keeping the chip's own centring */
@keyframes mmSpin{to{transform:rotate(360deg)}}
/* nothing animates, and shadows are flat: an offset with no blur radius costs nothing to paint */
html.lite .mm-pan,html.noanim .mm-pan,html.lite .mm-sel,html.noanim .mm-sel,html.lite .mm-hint,html.noanim .mm-hint,html.lite .mm-tick::before,html.noanim .mm-tick::before{animation:none}
html.lite .mm-tg::after,html.noanim .mm-tg::after{transition:none}
html.lite .mm-tile:active,html.noanim .mm-tile:active,html.lite .mm-q4>button:active,html.noanim .mm-q4>button:active,html.lite .mm-lay:active,html.noanim .mm-lay:active,html.lite .mm-st-card:active,html.noanim .mm-st-card:active,html.lite .mm-tpl:active .mm-tpl-im,html.noanim .mm-tpl:active .mm-tpl-im{transform:none}
html.lite .mm-bar,html.noanim .mm-bar,html.lite .mm-sel,html.noanim .mm-sel,html.lite .mm-zoom,html.noanim .mm-zoom,html.lite .mm-pan,html.noanim .mm-pan,html.lite .mm-ed>.mm-guide,html.noanim .mm-ed>.mm-guide{box-shadow:0 2px 0 rgba(15,20,45,.1)}
html.lite .mm-map,html.noanim .mm-map{box-shadow:0 0 0 1px var(--mm-barline),0 2px 0 rgba(15,20,45,.1)}
html.lite .mm-hint,html.noanim .mm-hint,html.lite .mm-find,html.noanim .mm-find,html.lite .mm-prem,html.noanim .mm-prem,html.lite .mm-pvb,html.noanim .mm-pvb,html.lite .mm-tg::after,html.noanim .mm-tg::after{box-shadow:none}
html.lite .mm-tpl-im,html.noanim .mm-tpl-im{box-shadow:0 0 0 1px rgba(0,0,0,.08)}
@media (prefers-reduced-motion:reduce){
  .mm-pan,.mm-sel,.mm-hint,.mm-tick::before{animation:none}
  .mm-tg::after{transition:none}
  .mm-tile:active,.mm-q4>button:active,.mm-lay:active,.mm-st-card:active,.mm-tpl:active .mm-tpl-im{transform:none}
  .mm-bar,.mm-sel,.mm-zoom,.mm-pan,.mm-ed>.mm-guide{box-shadow:0 2px 0 rgba(15,20,45,.1)}
  .mm-map{box-shadow:0 0 0 1px var(--mm-barline),0 2px 0 rgba(15,20,45,.1)}
  .mm-hint,.mm-find,.mm-prem,.mm-pvb,.mm-tg::after{box-shadow:none}
  .mm-tpl-im{box-shadow:0 0 0 1px rgba(0,0,0,.08)}
}
