.lm { display: grid; gap: 18px; }
@media (min-width: 880px) { .lm { grid-template-columns: minmax(360px, 1fr) 1fr; align-items: start; } .lm-stage { position: sticky; top: 76px; } }
.lm-stage canvas { width: 100%; max-width: 560px; aspect-ratio: 1; border-radius: 4px; border: 12px solid #fff; border-bottom-width: 36px; box-shadow: 0 14px 36px rgba(30, 42, 58, 0.16); background: repeating-conic-gradient(#f4ece3 0 25%, #fff 0 50%) 0 0 / 24px 24px; margin: 0 auto; }
}
.lm-actions { justify-content: center; margin-top: 12px; }
.lm-note { text-align: center; min-height: 1.4em; margin: 6px 0 0; font-size: 0.95rem; }
.lm-group { background: #fff; border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; border: 1px solid #f3e8dc; }
.lm-group h2 { font-size: 1.1rem; margin: 0 0 10px; }
.lm-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); font: inherit; font-weight: 800; font-size: 0.92rem; color: var(--ink); cursor: pointer; }
.lm-opt[aria-pressed="true"] { border-color: var(--ink); background: var(--butter); box-shadow: 0 3px 0 var(--ink); }
.lm-opt.thumb { flex-direction: column; padding: 4px 6px; gap: 0; font-size: 0.8rem; }
.lm-opt.thumb img { width: 56px; height: 56px; }
.lm-opt .sw { width: 22px; height: 22px; border-radius: 50%; border: 3px solid; }
@media (max-width: 879px) {
  .lm-stage { position: sticky; top: 0; padding-top: 8px; z-index: 5; background: var(--cream); padding-bottom: 8px; }
  .lm-stage canvas { width: min(56vw, 34vh); border-width: 8px; border-bottom-width: 22px; }
  .lm-actions { gap: 6px; margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; max-width: 360px; margin-left: auto; margin-right: auto; }
  .lm-actions .btn { min-height: 44px; padding: 6px 10px; font-size: 0.88rem; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
  .lm-actions .long, .lm-actions .hide-m { display: none; }
  .lm-note { font-size: 0.85rem; margin-top: 2px; }
/* reserve room for the controls until the script fills them, so the page does not jump */
#lm-controls:empty { min-height: 1150px; }
@media (max-width: 879px) { #lm-controls:empty { min-height: 2000px; } }
.lm-opt.aes[aria-pressed="true"] { background: var(--blush); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
