/* SakibPro DLS Logo Maker: layout and controls on top of the shared Kit Creator styles (kit.css) */
.lm .stage { align-self: start; }
.lm-view { position: relative; aspect-ratio: 1; margin: 0 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.lm-view canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.lm-view canvas.dragging { cursor: grabbing; }
.lm-view.bg-dark { background: radial-gradient(circle at 50% 40%, #1b2d52 0%, #0a1326 70%); }
.lm-view.bg-light { background: radial-gradient(circle at 50% 40%, #ffffff 0%, #dfe6ef 75%); }
.lm-view.bg-grid { background: repeating-conic-gradient(#1a2440 0 25%, #111a30 0 50%) 0 0 / 22px 22px; }
.lm-bg button { font-size: 12.5px; }
.lm-hint { margin: 8px 14px 0; color: var(--mut); font-size: 12px; text-align: center; }
.lm .quick { position: static; }
.lm-tokit { display: flex; align-items: center; gap: 12px; width: calc(100% - 20px); margin: 0 10px 12px; padding: 12px 14px; border-radius: 14px; border: 1px dashed rgba(0, 229, 255, .45); background: rgba(0, 229, 255, .06); color: var(--txt); text-align: left; }
.lm-tokit:hover { background: rgba(0, 229, 255, .12); }
.lm-tokit svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linejoin: round; }
.lm-tokit b { display: block; font-size: 14px; }
.lm-tokit small { display: block; color: var(--mut); font-size: 12px; }

/* name fields */
.lm-name { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; padding: 12px 12px 10px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.lm-name label, .lm-field { display: grid; gap: 5px; }
.lm-name span, .lm-field span { display: flex; justify-content: space-between; color: var(--mut); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.lm-name small { font-weight: 600; letter-spacing: 0; }
.lm-name input, .lm-field input, .lm-field select, .lm-search { width: 100%; min-width: 0; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line2); background: var(--card2); color: var(--txt); font: 700 15px/1.2 Inter, system-ui, sans-serif; }
.lm-name input[data-k="name"] { font: 800 18px/1.1 var(--head); letter-spacing: .04em; text-transform: uppercase; }
.lm-name input:focus, .lm-field input:focus, .lm-field select:focus, .lm-search:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
.lm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.lm-field select { font-weight: 600; }

/* pickers */
.pkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.pk { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--txt); }
.pk svg { width: 44px; height: 44px; fill: currentColor; opacity: .9; }
.pk canvas { width: 48px; height: 48px; }
.pk span { color: var(--mut); font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.pk:hover { border-color: var(--line2); }
.pk.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); color: var(--acc); }
.pk.on span { color: var(--txt); }
.icgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; max-height: 330px; overflow: auto; padding: 2px; scrollbar-width: thin; }
.icgrid .ic { aspect-ratio: 1; display: grid; place-items: center; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--txt); font-size: 11px; font-weight: 700; }
.icgrid .ic svg { width: 100%; height: 100%; fill: currentColor; }
.icgrid .ic:hover { border-color: var(--line2); color: #fff; }
.icgrid .ic.on { border-color: var(--acc); color: var(--acc); background: rgba(0, 229, 255, .08); }
.icgrid.crowns { max-height: none; }
.lm-search { margin: 12px 0 8px; font-weight: 500; }
#iconCats { margin-bottom: 10px; }
#iconCats button.on { border-color: var(--acc); color: var(--acc); }

/* segmented choice */
.seg2 { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.seg2 button { flex: 1 0 auto; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); color: var(--mut); font-weight: 700; font-size: 13px; }
.seg2 button.on { background: rgba(0, 229, 255, .12); border-color: var(--acc); color: var(--txt); }

/* sliders and toggles */
.rngs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 16px; margin: 10px 0; }
.rngs > div { display: contents; }
.rngs > div[hidden] { display: none; }
.rng { display: grid; gap: 4px; padding: 6px 0; }
.rng span { display: flex; justify-content: space-between; color: var(--mut); font-size: 12.5px; font-weight: 600; }
.rng b { color: var(--txt); font-variant-numeric: tabular-nums; }
.rng input { width: 100%; accent-color: var(--acc); }
.tgs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.tg { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); font-size: 13px; font-weight: 600; cursor: pointer; }
.tg input { accent-color: var(--acc); width: 16px; height: 16px; }
.btn.sm { padding: 8px 12px; font-size: 12.5px; }
[hidden] { display: none !important; }

/* colour control extras */
.clr .metals { display: flex; gap: 4px; margin-left: auto; }
.clr .metals button { width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2px solid var(--bg2); box-shadow: 0 0 0 1px var(--line2); }
.clr .metals button.on { box-shadow: 0 0 0 2px var(--acc); }
.clr .metals + .pal-btn { margin-left: 6px; }
.lm .row2, .lm .row3 { margin: 8px 0; }
.lm .clr { flex-wrap: wrap; }

.lm-match { margin: 4px 0 4px; display: inline-flex; align-items: center; gap: 8px; }
.lm-match svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* save tab */
.lm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.lm-actions .btn { justify-content: center; }
.sv { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); margin-bottom: 6px; }
.sv img { width: 48px; height: 48px; border-radius: 8px; background: #0a1326; }
.sv span { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-reset { margin-top: 12px; }

.credit { margin-top: 18px; color: var(--mut); font-size: 12px; }
.credit a { color: var(--acc); }

/* mobile mini preview: the canvas sits in the thumb */
.mini-thumb canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 600px) {
  .lm-name { grid-template-columns: 1fr; }
  .lm-actions { grid-template-columns: 1fr; }
  .icgrid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); max-height: 280px; }
  .pkgrid { grid-template-columns: repeat(4, 1fr); }
  .rngs { grid-template-columns: 1fr; }
}
