/* style — PRINCIPLES AS A MANUAL (js/learn-manual.js).

   Simon, 13 Oct 2026: "More of a space with several different sections on
   the left-hand side where the user can click, and that will reveal the
   text, image, and video, almost like an instruction manual" -- and for him,
   "a simple text image editor with the ability for me to drag and drop
   images, resize and reposition them, as well as do the same with videos".
   Sections and pages down the left, the open page to the right; the page is
   a readable column (820 wide at most) with pictures and clips set in it. */
#learn-page.ln-manual .ln-drophint { display: none; }
/* The module tools (upload into a module, Loom links, New module, set-up) are
   the gallery's; the manual has + Page and + Section. Share link stays. */
#learn-page.ln-manual .ln-tools .ln-hbtn:not(.ln-sharebtn) { display: none; }
/* The old gallery's section headings are small grey capitals (37-tutorials.css
   #learn-page h2); a page's headings and title are not. */
#learn-page .lm h2, #learn-page .lm h3 { text-transform: none; letter-spacing: normal; }
#learn-page .lm-title { font-size: 28px; font-weight: 800; line-height: 1.15; color: #fff; margin: 0; letter-spacing: -.01em; }
#learn-page .lm-body h2 { font-size: 22px; font-weight: 700; color: #fff; margin: 28px 0 10px; line-height: 1.25; }
#learn-page .lm-body h3 { font-size: 17.5px; font-weight: 700; color: #fff; margin: 22px 0 8px; }
#learn-page .lm-body h2:first-child, #learn-page .lm-body h3:first-child { margin-top: 0; }
#learn-page .lm { flex: 1; min-height: 0; width: 100%; display: grid; grid-template-columns: 290px minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: 8px; background: var(--card); overflow: hidden; }
@media (max-width: 959.98px) { #learn-page .lm { grid-template-columns: 1fr; min-height: 70vh; } #learn-page .lm-toc { border-right: 0; border-bottom: 1px solid var(--border); max-height: 40vh; } }
.lm-btn { font: inherit; font-size: 12px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--border); background: var(--card-hover, #19191c);
  color: var(--text); border-radius: 5px; cursor: pointer; white-space: nowrap; }
.lm-btn:hover { border-color: var(--text-faint); }
.lm-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lm-btn[disabled] { opacity: .45; cursor: default; }
.lm-sp { flex: 1; }

/* ---- the contents ---- */
.lm-toc { min-height: 0; overflow-y: auto; padding: 14px 10px 24px; border-right: 1px solid var(--border); background: var(--surface-sunk, #0e0e10); }
.lm-tocbar { display: flex; gap: 6px; margin: 0 4px 14px; }
.lm-grp { margin-bottom: 16px; }
.lm-gh { display: flex; align-items: baseline; gap: 8px; padding: 0 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.lm-gn { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; color: var(--accent); letter-spacing: .02em; }
.lm-dnd .lm-gh[draggable], .lm-dnd .lm-item[draggable] { cursor: grab; }
.lm-dnd .lm-dragsrc { opacity: .4; }
.lm-item.lm-dropb { box-shadow: inset 0 2px 0 var(--accent); }
.lm-item.lm-dropa { box-shadow: inset 0 -2px 0 var(--accent); }
.lm-grp.lm-dropb { box-shadow: 0 -2px 0 var(--accent); }
.lm-grp.lm-dropa { box-shadow: 0 2px 0 var(--accent); }
.lm-grp.lm-dropin { background: rgba(229, 10, 78, .08); border-radius: 6px; box-shadow: inset 0 0 0 1px var(--accent); }
/* the whole of Principles as one document */
.lm-doc { max-width: 820px; margin: 0 auto; padding-bottom: 40px; }
.lm-sec + .lm-sec { margin-top: 64px; }
.lm-sechead { display: flex; align-items: baseline; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #fff; padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.lm-page { scroll-margin-top: 10px; }
.lm-page + .lm-page { margin-top: 48px; padding-top: 34px; border-top: 1px solid rgba(255,255,255,.06); }
.lm-secempty { color: var(--text-faint); font-size: 13px; padding: 8px 0 4px; }
.lm-gh { cursor: pointer; }
.lm-gh:hover { color: #fff; }
/* generate into the page, and the + beside the line you are on */
.lm-read { position: relative; }
.lm-plus { position: absolute; display: none; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text-dim); font-size: 15px; line-height: 19px; cursor: pointer; z-index: 6; }
.lm-plus:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.lm-insmenu { position: absolute; z-index: 7; min-width: 230px; display: flex; flex-direction: column; padding: 5px; background: #141418; border: 1px solid #2a2a31; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.lm-insmenu button { text-align: left; font: inherit; font-size: 13px; padding: 7px 10px; border: 0; border-radius: 5px; background: none; color: #d6d6dd; cursor: pointer; }
.lm-insmenu button:hover { background: #26262c; color: #fff; }
.lm-insmenu .lmi-gen { color: #ffb3c6; }
.lm-insmenu hr { border: 0; border-top: 1px solid #2a2a31; margin: 4px 2px; }
.lm-tools .lm-t-gen { color: #ffb3c6; }
.lm-fig[data-gen] .lm-upl { background: repeating-linear-gradient(135deg, #121216 0 14px, #17171c 14px 28px); border-radius: 6px; }
#lm-draw .lmg-kinds { display: inline-flex; gap: 2px; margin-left: 14px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; }
#lm-draw .lmg-kinds button { font: inherit; font-size: 12px; padding: 4px 12px; border: 0; border-radius: 4px; background: none; color: var(--text-dim); cursor: pointer; }
#lm-draw .lmg-kinds button.on { background: var(--accent); color: #fff; }
#lm-draw .lmg-model { font: inherit; font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; max-width: 280px; }
#lm-draw .lmg-shapes { margin-left: 10px; display: inline-flex; gap: 4px; }
#lm-draw .lmd-asps { display: inline-flex; gap: 4px; }
#lm-draw .lmg-pic { width: 64px; height: 42px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: #000; cursor: pointer; }
#lm-draw .lmg-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
#lm-draw .lmg-pic.on { border-color: var(--accent); }
#lm-draw .lmg-fromhint { font-size: 12px; color: var(--text-faint); margin-left: 4px; }
.lm-body mark { background: none; color: var(--accent); }
.lm-body mark b, .lm-body mark i, .lm-body mark u, .lm-body mark a { color: inherit; }
.lm-tools .lm-brandsw { color: var(--accent); font-weight: 800; border-bottom: 3px solid var(--accent); padding: 0 2px; line-height: 1; }
/* ticks and crosses: the right way and the wrong way */
.lm-body ul[data-k] { list-style: none; padding-left: 0; }
.lm-body ul[data-k] > li { position: relative; padding-left: 34px; margin: 9px 0; }
.lm-body ul[data-k] > li::before { content: ''; position: absolute; left: 0; top: .18em; width: 22px; height: 22px; border-radius: 50%; background: #1f9d55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.lm-body ul[data-k="dont"] > li::before { background: #e5484d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 13px no-repeat; }
/* RIGHT / WRONG ON A PICTURE: a badge in its bottom-right corner, no frame (Simon, 14 Oct 2026). The badge is the figure's ::after laid in the same grid cell as the picture, so it sits on the picture's corner whatever the caption below does. */
.lm-fig[data-verdict] { display: grid; grid-template-columns: 100%; }
.lm-fig[data-verdict] > .lm-media { grid-area: 1 / 1; }
.lm-fig[data-verdict] > figcaption { grid-row: 2; }
.lm-fig[data-verdict]::after { content: ''; position: relative; grid-area: 1 / 1; align-self: end; justify-self: end; margin: 0 10px 10px 0; width: 34px; height: 34px; border-radius: 50%; background: #1f9d55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 21px no-repeat; box-shadow: 0 2px 10px rgba(0,0,0,.5); pointer-events: none; z-index: 2; }
.lm-fig[data-verdict]:has(> video.lm-media)::after { margin-bottom: 64px; }
.lm-fig[data-verdict="wrong"]::after { background: #e5484d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 19px no-repeat; }
.lm-tools .lm-tk { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 5px; background: #1f9d55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.lm-tools .lm-tk.no { background: #e5484d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 9px no-repeat; }
.lm-figbar .lm-vdb.ok { color: #4ade80; } .lm-figbar .lm-vdb.no { color: #ff7a7f; }
.lm-figbar .lm-vdb.cur.ok { background: #1f9d55; color: #fff; } .lm-figbar .lm-vdb.cur.no { background: #e5484d; color: #fff; }
.lm-figbar .lm-tsep { display: inline-block; width: 1px; align-self: stretch; background: #2a2a31; margin: 2px 3px; }
/* a cropped picture: the part kept, in its own shape */
.lm-fig .lm-cropwrap { position: relative; overflow: hidden; height: auto; }
.lm-fig .lm-cropwrap .lm-cropimg { position: absolute; max-width: none; display: block; }
#lm-crop { position: fixed; inset: 0; z-index: 9300; background: rgba(0,0,0,.78); display: flex; align-items: center; justify-content: center; padding: 20px; }
#lm-crop .lmc-box { background: var(--card); border: 1px solid #2a2a31; border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; max-width: calc(100vw - 40px); }
#lm-crop .lmc-h { display: flex; align-items: center; gap: 4px; }
#lm-crop .lmc-h b { font-size: 15px; color: #fff; margin-right: 12px; }
#lm-crop .lmc-shape { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; background: none; color: var(--text-dim); cursor: pointer; }
#lm-crop .lmc-shape.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#lm-crop .lmc-stage { position: relative; align-self: center; line-height: 0; background: #000; user-select: none; touch-action: none; }
#lm-crop .lmc-stage img { display: block; }
#lm-crop .lmc-rect { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.6); outline: 2px solid #fff; cursor: move; touch-action: none; }
#lm-crop .lmc-stage { overflow: hidden; }
#lm-crop .lmc-rect::before, #lm-crop .lmc-rect::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.25); }
#lm-crop .lmc-rect::before { left: 33.33%; right: 33.33%; border-top: 0; border-bottom: 0; }
#lm-crop .lmc-rect::after { top: 33.33%; bottom: 33.33%; border-left: 0; border-right: 0; }
#lm-crop .lmc-hd { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--accent); border-radius: 3px; box-sizing: border-box; z-index: 1; }
#lm-crop .lmc-n, #lm-crop .lmc-s { left: calc(50% - 7px); cursor: ns-resize; } #lm-crop .lmc-n { top: -7px; } #lm-crop .lmc-s { bottom: -7px; }
#lm-crop .lmc-e, #lm-crop .lmc-w { top: calc(50% - 7px); cursor: ew-resize; } #lm-crop .lmc-e { right: -7px; } #lm-crop .lmc-w { left: -7px; }
#lm-crop .lmc-ne { top: -7px; right: -7px; cursor: nesw-resize; } #lm-crop .lmc-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
#lm-crop .lmc-nw { top: -7px; left: -7px; cursor: nwse-resize; } #lm-crop .lmc-se { bottom: -7px; right: -7px; cursor: nwse-resize; }
#lm-crop .lmc-row { display: flex; align-items: center; gap: 6px; }
/* a figure being made again: it stays put, under a veil that says so */
.lm-fig.lm-regen:not(.lm-al-free) { position: relative; }
.lm-regen-ov { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px;
  background: rgba(10,10,12,.72); color: #fff; font-size: 13px; border-radius: 6px; pointer-events: none; }
.lm-figbar .lm-regen-b, .lm-figbar .lm-genedit { color: #ffb3c6; }
#lm-draw .lmg-real { display: inline-flex; align-items: center; gap: 7px; margin-left: 14px; font-size: 12.5px; color: var(--text-dim); cursor: pointer; user-select: none; }
#lm-draw .lmg-real input { position: absolute; opacity: 0; pointer-events: none; }
/* the panel's switch (12-card-sections.css): a thin rail, the knob over it */
#lm-draw .lmg-sw { position: relative; width: 30px; height: 17px; border-radius: 9px; background: transparent; }
#lm-draw .lmg-sw::before { content: ''; position: absolute; top: 5px; bottom: 5px; left: 3px; right: 3px; border-radius: 999px; background: var(--sw-track-off, #3a3a41); transition: background .15s; }
#lm-draw .lmg-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--sw-knob-off, #c9c9d0); box-shadow: var(--sw-knob-shadow, 0 1px 3px rgba(0, 0, 0, .6)); transition: transform .15s, background .15s; }
#lm-draw .lmg-real.on { color: #fff; }
#lm-draw .lmg-real.on .lmg-sw::before { background: var(--sw-track-on, rgba(229, 10, 78, .5)); }
#lm-draw .lmg-real.on .lmg-sw::after { transform: translateX(13px); background: var(--sw-knob-on, var(--accent)); }
#lm-draw .lmg-real input:focus-visible + .lmg-sw { outline: 2px solid rgba(229, 10, 78, .6); outline-offset: 2px; }
/* a call-out: a boxed note for a tool or a tip; and a tool's name in a small box */
.lm-body aside { position: relative; margin: 6px 0 18px; padding: 13px 16px 13px 48px; border: 1px solid rgba(var(--accent-rgb, 229,10,78), .45); border-radius: 8px;
  background: rgba(var(--accent-rgb, 229,10,78), .08); color: #fff; font-weight: 500; font-size: 15.5px; line-height: 1.6; }
.lm-body aside::before { content: ''; position: absolute; left: 15px; top: 14px; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e50a4e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 0 0 5.4-5.4l-2.5 2.5-2.4-.6-.6-2.4z'/%3E%3C/svg%3E") center / 20px no-repeat; }
.lm-body aside b { color: var(--accent); }
.lm-body kbd { display: inline-block; font: inherit; font-size: .88em; font-weight: 700; line-height: 1.35; color: #fff; padding: 1px 7px; margin: 0 1px; border: 1px solid rgba(var(--accent-rgb, 229,10,78), .6);
  border-radius: 5px; background: rgba(var(--accent-rgb, 229,10,78), .14); box-shadow: inset 0 -1px 0 rgba(0,0,0,.35); white-space: nowrap; vertical-align: 1px; }
.lm-tools .lm-kbdsw { font-size: 10.5px; font-weight: 700; color: #fff; padding: 1px 5px; border: 1px solid rgba(var(--accent-rgb), .6); border-radius: 4px; background: rgba(var(--accent-rgb), .14); }
.lm-tools .lm-cosw { display: inline-block; width: 13px; height: 11px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid var(--accent); border-radius: 3px; background: rgba(var(--accent-rgb), .15); }
.lm-gt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-delsec { flex: 0 0 auto; align-self: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--text-faint); font-size: 14px; line-height: 20px; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s, color .12s; }
.lm-grp:hover .lm-delsec, .lm-delsec:focus-visible { opacity: 1; }
.lm-delsec:hover { background: rgba(255, 80, 80, .14); color: #ff6b6b; }
.lm-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font: inherit; font-size: 13.5px; line-height: 1.35; color: var(--text-dim);
  background: none; border: 0; border-left: 2px solid transparent; border-radius: 0 5px 5px 0; padding: 8px 10px 8px 14px; cursor: pointer; }
.lm-item:hover { color: #fff; background: var(--card-hover, #19191c); }
.lm-item.on { color: #fff; background: rgba(var(--accent-rgb), .12); border-left-color: var(--accent); font-weight: 600; }
.lm-item .lm-ititle { flex: 1; min-width: 0; }
.lm-item.done::after { content: '\2713'; color: var(--green, #6fd08c); font-size: 12px; }
.lm-item.lm-k-vid .lm-ititle::before { content: '\25B6'; font-size: 8px; color: var(--text-faint); margin-right: 7px; vertical-align: 2px; }
.lm-none, .lm-empty { color: var(--text-faint); font-size: 13px; padding: 30px 12px; text-align: center; }

/* ---- the page ---- */
.lm-read { min-height: 0; overflow-y: auto; padding: 30px 44px 60px; }
.lm-rhead { max-width: 820px; margin: 0 auto 20px; position: relative; padding-right: 70px; }
.lm-crumb { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.lm-title { font-size: 28px; font-weight: 800; line-height: 1.15; color: #fff; margin: 0; letter-spacing: -.01em; }
.lm-rhead .lm-edit { position: absolute; right: 0; top: 0; }
.lm-body { max-width: 820px; margin: 0 auto; display: flow-root; font-size: 15.5px; line-height: 1.7; color: #d6d6dd; }
.lm-body p { margin: 0 0 14px; }
.lm-body h2 { font-size: 22px; font-weight: 700; color: #fff; margin: 28px 0 10px; line-height: 1.25; }
.lm-body h3 { font-size: 17.5px; font-weight: 700; color: #fff; margin: 22px 0 8px; }
.lm-body h2:first-child, .lm-body h3:first-child { margin-top: 0; }
.lm-body ul, .lm-body ol { margin: 0 0 14px; padding-left: 22px; }
.lm-body li { margin: 4px 0; }
.lm-body blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); color: #fff; font-size: 16.5px; }
.lm-body a { color: var(--accent); }
.lm-body b { color: #fff; }
.lm-fig { margin: 6px 0 20px; position: relative; box-sizing: border-box; }
.lm-fig.lm-al-center { margin-left: auto; margin-right: auto; clear: both; }
.lm-fig.lm-al-full { clear: both; }
.lm-fig.lm-al-left { float: left; margin: 4px 24px 12px 0; }
.lm-fig.lm-al-right { float: right; margin: 4px 0 12px 24px; }
.lm-fig .lm-media { display: block; width: 100%; height: auto; border-radius: 6px; background: #000; }
.lm-fig figcaption { font-size: 12.5px; line-height: 1.45; color: var(--text-faint); text-align: center; margin-top: 7px; }
.lm-loom { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.lm-loom iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lm-foot { max-width: 820px; margin: 44px auto 0; padding-top: 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; clear: both; }
.lm-foot button { font: inherit; font-size: 13px; color: var(--text-dim); background: none; border: 0; cursor: pointer; padding: 4px 0; }
.lm-foot button:hover { color: #fff; }

/* ---- the editor ---- */
.lm-ed { position: sticky; top: -30px; z-index: 6; max-width: 820px; margin: -30px auto 16px; padding: 30px 0 10px; background: var(--card); border-bottom: 1px solid var(--border); }
.lm-edhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lm-edtitle { flex: 1 1 260px; min-width: 200px; font: inherit; font-size: 22px; font-weight: 800; color: #fff; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 4px 8px; }
.lm-edtitle:hover, .lm-edtitle:focus { border-color: var(--border); background: var(--bg); outline: none; }
.lm-edsec { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.lm-edsec input { font: inherit; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; width: 170px; }
.lm-tools { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.lm-tool { font: inherit; font-size: 12px; min-width: 30px; height: 28px; padding: 0 9px; border: 1px solid transparent; border-radius: 4px; background: none; color: var(--text-dim); cursor: pointer; }
.lm-tool:hover { background: var(--card-hover, #19191c); color: #fff; border-color: var(--border); }
.lm-tool.lm-t-draw { color: #fff; background: rgba(var(--accent-rgb), .18); border-color: rgba(var(--accent-rgb), .4); font-weight: 600; margin-left: 4px; }
.lm-tool.lm-t-draw:hover { background: rgba(var(--accent-rgb), .3); }
.lm-tsep { width: 1px; height: 18px; background: var(--border); margin: 0 5px; }
.lm-edmsg { margin-left: 10px; font-size: 12px; color: var(--text-dim); }
.lm-edmsg.bad { color: #ff8a8a; }
.lm-linkbar { display: flex; gap: 6px; margin-top: 8px; }
.lm-linkbar[hidden] { display: none; }
.lm-linkin { flex: 1; font: inherit; font-size: 12.5px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; }
.lm-editable { min-height: 55vh; outline: none; border: 1px dashed var(--border); border-radius: 6px; padding: 20px 24px; }
.lm-editable:focus-within { border-color: rgba(var(--accent-rgb), .45); }
.lm-editable.lm-over { border-color: var(--accent); background: rgba(var(--accent-rgb), .03); }
.lm-editable .lm-fig { cursor: default; user-select: none; }
.lm-editable .lm-fig:hover { outline: 1px solid rgba(255,255,255,.18); outline-offset: 3px; }
.lm-editable .lm-fig.on { outline: 2px solid var(--accent); outline-offset: 3px; }
.lm-editable .lm-fig figcaption { user-select: text; cursor: text; min-height: 1.4em; outline: none; }
.lm-editable .lm-fig figcaption:empty::before { content: attr(data-ph); color: #4a4a52; }
.lm-figbar { position: absolute; left: 8px; top: 8px; display: none; gap: 2px; padding: 3px; border-radius: 6px; background: rgba(10,10,12,.9); border: 1px solid #2a2a31; z-index: 3; }
.lm-fig.on .lm-figbar, .lm-fig:hover .lm-figbar { display: flex; }
.lm-figbar button { font: inherit; font-size: 11px; padding: 3px 8px; border: 0; border-radius: 4px; background: none; color: #cfcfd6; cursor: pointer; }
.lm-figbar button:hover { background: #26262c; color: #fff; }
.lm-figbar .lm-grip { cursor: grab; font-size: 13px; }
.lm-figbar .lm-redraw { color: #ffb3c6; }
.lm-figbar .lm-figdel:hover { background: #5a1a26; }
.lm-rsz { position: absolute; width: 14px; height: 14px; border-radius: 3px; background: var(--accent); border: 2px solid #fff; display: none; z-index: 4; touch-action: none; box-sizing: border-box; }
.lm-rsz-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.lm-rsz-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.lm-rsz-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.lm-rsz-nw { left: -7px; top: -7px; cursor: nwse-resize; }
/* in the text, one corner (the one away from the edge it sits on); free, all four */
.lm-fig.on:not(.lm-al-right):not(.lm-al-free) .lm-rsz-se, .lm-fig.on.lm-al-right .lm-rsz-sw, .lm-fig.on.lm-al-free .lm-rsz { display: block; }
/* FREE: off the text, anywhere on the page */
.lm-body { position: relative; }
.lm-fig.lm-al-free { position: absolute; margin: 0; z-index: 2; }
.lm-fig.lm-al-free .lm-grip { display: none; }
.lm-editable .lm-fig .lm-media { cursor: grab; }
.lm-editable .lm-fig.lm-dragging, .lm-editable .lm-fig.lm-dragging .lm-media { cursor: grabbing; }
.lm-editable .lm-fig.lm-dragging { z-index: 5; box-shadow: 0 14px 40px rgba(0,0,0,.55); }
.lm-figbar button.cur { background: #2e2e36; color: var(--accent); }
.lm-fig.lm-moving { opacity: .35; }
.lm-dropline { height: 3px; border-radius: 2px; background: var(--accent); margin: 4px 0; clear: both; }
.lm-upl { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 13px; padding: 10px; text-align: center;
  background: repeating-linear-gradient(135deg, #141417 0 14px, #111113 14px 28px); border-radius: 6px; }

/* ---- Draw with Claude ---- */
#lm-draw { position: fixed; inset: 0; z-index: 9300; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
#lm-draw .lmd-box { width: min(860px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--card); border: 1px solid #2a2a31; border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
#lm-draw .lmd-h { display: flex; align-items: center; }
#lm-draw .lmd-h b { font-size: 15px; color: #fff; }
#lm-draw .lmd-x { width: 28px; height: 28px; border: 1px solid #2a2a31; border-radius: 4px; background: none; color: var(--text-dim); cursor: pointer; }
#lm-draw .lmd-p { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; resize: vertical; }
#lm-draw .lmd-p:focus { outline: none; border-color: rgba(var(--accent-rgb), .5); }
#lm-draw .lmd-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#lm-draw .lmd-lab { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-right: 4px; }
#lm-draw .lmd-asp { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 4px; background: none; color: var(--text-dim); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
#lm-draw .lmd-asp svg { display: block; flex: none; }
#lm-draw .lmd-asp.on { background: var(--accent); border-color: var(--accent); color: #fff; }
#lm-draw .lmd-prev { min-height: 220px; max-height: 52vh; display: flex; align-items: center; justify-content: center; background: #0d0d10; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; color: var(--text-faint); font-size: 13px; }
#lm-draw .lmd-prev img { display: block; max-width: 100%; max-height: 52vh; }
#lm-draw .lmd-msg { font-size: 12.5px; color: var(--text-dim); }
#lm-draw .lmd-msg.bad { color: #ff8a8a; }
#lm-draw .lmd-spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #2a2a31; border-top-color: var(--accent); animation: lmdspin .8s linear infinite; }
@keyframes lmdspin { to { transform: rotate(360deg); } }

/* A clip that would not play says so (learn-manual.js rescueVideo). */
.lm-vidfail{margin-top:6px;padding:7px 10px;border:1px solid var(--line2,#2a2a31);border-radius:3px;font-size:11px;color:var(--dim,#9a9aa2);background:rgba(229,10,78,.06)}

/* A clip being converted on this computer says so; the owner's "Make every clip play everywhere"
   and its progress (learn-manual.js rescueVideo, fixClips). */
.lm-vidnote{margin-top:6px;padding:7px 10px;border:1px solid var(--line2,#2a2a31);border-radius:3px;font-size:11px;color:var(--dim,#9a9aa2)}
.lm-tocbar:has(.lm-fixclips){flex-wrap:wrap}
.lm-tocbar .lm-fixmsg{flex-basis:100%;font-size:11px;line-height:1.4;color:var(--dim,#9a9aa2)}
.lm-tocbar .lm-fixmsg:empty{display:none}
.lm-tocbar .lm-fixmsg.bad{color:#ff8a8a}
