/* Logo Maker — tool-specific styles (uses the site design tokens only). */
@media (min-width: 1024px) {
  .tool-shell.lm-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.lm-section-hint { margin: -6px 0 12px; }

/* ---------- Starter styles ---------- */
.lm-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 16px; }
.lm-style {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px;
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: .82rem; font-weight: 600; text-align: center; cursor: pointer;
}
.lm-style:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.lm-style:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lm-style-thumb {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1.6; border-radius: 6px;
  background-color: #fff; border: 1px solid var(--border); overflow: hidden; padding: 4px;
}
.lm-style-thumb.checker { background-size: 10px 10px; background-position: 0 0, 0 5px, 5px -5px, -5px 0; }
.lm-style-thumb svg { display: block; width: 100%; height: 100%; }
.lm-style-label { line-height: 1.25; }

/* ---------- Icon picker ---------- */
.lm-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.lm-icon-grid legend { font-weight: 600; font-size: .875rem; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.lm-icon-opt { position: relative; cursor: pointer; }
.lm-icon-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.lm-icon-opt > span {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px;
  border: 2px solid var(--border); background: var(--surface); color: var(--text-2);
}
.lm-icon-opt > span svg { width: 26px; height: 26px; }
.lm-icon-opt:hover > span { border-color: var(--border-strong); background: var(--surface-2); }
.lm-icon-opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.lm-icon-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.lm-icon-opt.is-suggested::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
}
.lm-suggest { margin-top: 10px; }

/* ---------- Layout & shapes ---------- */
.lm-layout-hint { margin: -8px 0 16px; }
.lm-shape-ico { width: 16px; height: 16px; fill: currentColor; }
.lm-shape-ico.is-ring { fill: none; stroke: currentColor; stroke-width: 2.4; }
.lm-checks { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 12px; }
.lm-transparent-field { display: flex; align-items: flex-end; }

/* Sections that do not affect the current layout are dimmed (still usable) */
.is-inactive { opacity: .55; }
.is-inactive:focus-within { opacity: 1; }

/* ---------- Preview ---------- */
.lm-history { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.lm-history .spacer { flex: 1; }
.lm-frame {
  display: grid; place-items: center; min-height: 260px; padding: 16px;
  border-radius: var(--radius); border: 1px solid var(--border); background-color: var(--surface);
}
.lm-frame.checker { background-color: #fff; }
.lm-preview { width: 100%; display: grid; place-items: center; }
.lm-preview svg { display: block; width: 100%; height: auto; max-height: 52vh; }

.lm-export { padding: 18px 20px; }
.lm-export h2 { font-size: 1.05rem; margin-bottom: 12px; }
.lm-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lm-buttons .btn { justify-content: center; }
.lm-notice { margin-top: 12px; }
.lm-notice > span { flex: none; display: inline-flex; }
.lm-lead { color: var(--text-2); max-width: 820px; }

@media (max-width: 640px) {
  .lm-buttons { grid-template-columns: 1fr; }
  .lm-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-frame { min-height: 200px; padding: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .lm-style, .lm-icon-opt > span { transition: border-color .15s, background-color .15s, color .15s; }
  .is-inactive { transition: opacity .15s; }
}
