/* NiceUI Logo Maker — app layout. Shares .gm-* control styles from styles.css. */
.lm [hidden] { display: none !important; }
.lm { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100vh - var(--ap-bar, 52px)); height: calc(100dvh - var(--ap-bar, 52px)); }
.lm-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
.lm-stage { position: relative; min-height: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); display: grid; place-items: center; padding: 40px 40px 70px; background: #fafaf9; transition: background 0.25s; }
.lm-stage[data-bg="dark"] { background: #0b0b0d; }
.lm-stage[data-bg="brand"] { background: var(--brand, #0ea5e9); }
.lm-canvas { width: 100%; height: 100%; display: grid; place-items: center; min-height: 0; }
.lm-svg { max-width: min(78%, 720px); max-height: 62%; width: auto; height: auto; overflow: visible; }
.lm-stage-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: center; gap: 8px; align-items: center; }
.lm-stage-bar .lm-seg { width: 220px; margin: 0; background: rgba(0, 0, 0, 0.55); border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); }
.lm-stage-bar .lm-seg button { color: rgba(255, 255, 255, 0.75); }
.lm-stage-bar .lm-seg button[aria-pressed="true"] { background: #fff; color: #000; }
.lm-chip { height: 36px; padding: 0 14px; border-radius: 10px; background: #fff; color: #000; font-size: 13px; font-weight: 500; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.4); }
.lm-chip:active { transform: scale(0.97); }
.lm-contexts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.lm-ctx { margin: 0; display: grid; grid-template-rows: 92px auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--s1); }
.lm-ctx figcaption { padding: 6px 10px; font-size: 11px; color: var(--mute); border-top: 1px solid var(--line); background: var(--s1); }
.lm-ctx-art { display: grid; place-items: center; padding: 14px 18px; min-height: 0; }
.lm-ctx-art svg { max-width: 100%; max-height: 46px; width: auto; height: auto; }
.lm-ctx-light .lm-ctx-art { background: #fff; }
.lm-ctx-dark .lm-ctx-art { background: #0b0b0d; }
.lm-ctx-brand .lm-ctx-art { background: transparent; }
.lm-ctx-app > div:first-child { background: linear-gradient(160deg, #c7d2fe, #fbcfe8); }
.lm-app { display: grid; place-items: center; align-content: center; gap: 4px; }
.lm-app svg { width: 52px; height: 52px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2)); }
.lm-app span { font-size: 10px; color: #111; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-ctx-tab { grid-template-rows: 30px 62px auto; }
.lm-tab { display: flex; align-items: center; gap: 6px; margin: 6px 8px 0; padding: 0 8px; height: 24px; border-radius: 8px 8px 0 0; background: #fff; font-size: 10px; color: #222; width: 70%; }
.lm-ctx-tab { background: #dfe1e5; }
.lm-tab-fav svg { width: 14px; height: 14px; display: block; }
.lm-tab-t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-tab-x { color: #777; }
.lm-nav { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; }
.lm-nav-logo svg { height: 20px; width: auto; max-width: 92px; display: block; }
.lm-nav i { flex: none; width: 18px; height: 4px; border-radius: 2px; background: #d4d4d8; }
.lm-nav i:first-of-type { margin-left: auto; }
.lm-nav b { font-size: 9px; font-weight: 600; padding: 4px 7px; border-radius: 6px; background: #111; color: #fff; }
.lm-side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--s1); }
.lm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.lm-scroll .gm-card { background: var(--s2); }
.lm-field { display: grid; gap: 5px; margin-top: 8px; font-size: 12.5px; color: var(--mute); }
.lm-field i { font-style: normal; opacity: 0.6; }
.lm-field input, .lm-search { height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--s1); color: var(--text); font-size: 14px; width: 100%; }
.lm-search { margin: 8px 0 6px; font-size: 13px; }
.lm-seg { margin: 8px 0 4px; }
.lm-seg button { font-size: 12px; }
.lm-lab { display: block; font-size: 12.5px; color: var(--mute); margin: 10px 0 6px; }
.lm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 8px; }
.lm-icons { max-height: 200px; overflow-y: auto; margin-top: 0; }
.lm-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); color: var(--mute); font-size: 14px; }
.lm-cell:hover { color: var(--text); border-color: var(--line-3); }
.lm-cell[aria-pressed="true"] { color: var(--text); border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); background: var(--s3); }
.lm-containers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.lm-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--mute); padding: 8px 2px; }
.lm-fonts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; max-height: 236px; overflow-y: auto; padding-right: 2px; }
.lm-font { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); text-align: left; color: var(--text); }
.lm-font b { flex: 1; min-width: 0; font-weight: inherit; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-font i { font: 400 9.5px var(--mono); font-style: normal; color: var(--mute); flex: none; }
.lm-font[aria-pressed="true"] { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky); background: var(--s3); }
.lm-weights .lm-seg button { font-size: 11.5px; padding: 0 2px; }
.lm-palettes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 8px; }
.lm-pal { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.lm-pal:hover { transform: scale(1.08); }
.lm-colors { display: grid; gap: 2px; }
.lm-check { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--mute); }
.lm-check input { accent-color: var(--sky); width: 16px; height: 16px; }
.lm-export { display: grid; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--s1); }
.lm-export .gm-tabs { grid-template-columns: repeat(3, 1fr); }
.lm-export .lm-seg { margin: 0; }
.lm-export .gm-actions .btn-sky { flex: 1; justify-content: center; }
.lm-export .gm-actions .btn-sky svg { transform: rotate(90deg); }
.lm-export .gm-actions .btn-cmd { padding: 0 11px; }
@media (max-width: 1000px) {
  .lm { height: auto; grid-template-columns: 1fr; }
  .lm-main { grid-template-rows: auto auto; }
  .lm-stage { height: 46vh; min-height: 300px; }
  .lm-side { border-left: 0; border-top: 1px solid var(--line); }
  .lm-scroll { overflow: visible; }
  .lm-export { position: sticky; bottom: 0; z-index: 5; }
}
@media (max-width: 480px) {
  .lm-stage { padding: 24px 16px 70px; }
  .lm-svg { max-width: 92%; }
  .lm-stage-bar .lm-seg { width: 180px; }
}
