/* ---------- Edytor spawnów i presetów ---------- */
.sp-cols { display: grid; grid-template-columns: minmax(260px, 340px) minmax(220px, 280px) minmax(440px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1200px) { .sp-cols { grid-template-columns: 1fr; } }
.sp-blok { border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 8px 10px; margin-bottom: 10px; }
.sp-blok__h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-ch { width: 74px !important; padding: 3px 6px !important; text-align: center; }
.sp-items { margin-top: 6px; }
.sp-it { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.sp-it img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.sp-it .tl-ph { width: 28px; height: 28px; flex: none; }
.sp-it__n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bone); font-size: 13px; }
.sp-it.x .sp-it__n { color: var(--tl-warn); }
.sp-it .tl-btn--small { padding: 1px 7px; }
.sp-items > .tl-btn { margin-top: 6px; }
.sp-podsum { max-height: 300px; overflow: auto; margin-bottom: 8px; }
.sp-ps { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.sp-ps img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.sp-ps .tl-ph { width: 24px; height: 24px; flex: none; }
.sp-bar { width: 90px; height: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; flex: none; }
.sp-bar i { display: block; height: 100%; background: var(--rust); }

.sp-tabs { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.sp-tabs .tl-chip { font-size: 15px; padding: 6px 16px; }
.sp-siatka { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; position: relative; }
.sp-paleta { height: calc(100vh - 340px); min-height: 300px; overflow: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); padding: 8px; }
.sp-strefa { min-height: 90px; border: 2px dashed var(--line); border-radius: 6px; padding: 8px; background: rgba(0,0,0,.18); transition: border-color .12s, background .12s; }
.sp-strefa.sp-over { border-color: var(--tl-ok); background: rgba(163,181,78,.12); }
.sp-duza { min-height: 260px; }
.sp-hint { width: 100%; text-align: center; color: var(--bone-dim); font-size: 12px; padding: 8px 4px; pointer-events: none; }
.sp-nowy { margin: 8px 0; display: flex; }
.sp-blok.aktywny { border-color: var(--tl-acc); box-shadow: 0 0 0 1px rgba(224,138,79,.4); }
.sp-kafel { position: relative; width: 84px; padding: 5px 4px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: center; cursor: grab; user-select: none; flex: none; }
.sp-kafel:hover { border-color: var(--bone-dim); }
.sp-kafel.x { border-color: var(--tl-warn); }
.sp-kafel.maly { width: 62px; padding: 3px; cursor: default; }
.sp-kafel__img { height: 56px; display: flex; align-items: center; justify-content: center; }
.sp-kafel.maly .sp-kafel__img { height: 40px; }
.sp-kafel__img img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.sp-kafel__img .tl-ph { width: 40px; height: 40px; }
.sp-kafel__n { font-size: 11px; line-height: 1.15; color: var(--bone); min-height: 25px; overflow: hidden; word-break: break-word; }
.sp-kafel__b { font-size: 10px; color: var(--bone-dim); }
.sp-kafel__ch { width: 100% !important; padding: 2px 3px !important; font-size: 12px !important; text-align: center; margin-top: 3px; }
.sp-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 16px; padding: 0; border: 1px solid rgba(224,80,58,.5); border-radius: 50%; background: rgba(13,13,11,.85); color: var(--tl-err); font-size: 10px; cursor: pointer; display: none; }
.sp-kafel:hover .sp-x { display: block; }
.sp-kafel.preset.cargo { border-color: rgba(163,181,78,.55); }
.sp-kafel.preset.attach { border-color: rgba(91,155,213,.6); }
.sp-mini { display: grid; grid-template-columns: 26px 26px; grid-auto-rows: 26px; gap: 0; width: 52px; height: 52px; overflow: hidden; }
.sp-mini img { width: 26px; height: 26px; max-width: 26px; max-height: 26px; object-fit: contain; min-width: 0; }
.sp-mini .tl-ph { width: 22px; height: 22px; }

.pd-row { align-items: center; }
.sp-ikona { width: 30px; height: 30px; object-fit: contain; flex: none; margin-right: 8px; }
.sp-ikona--brak { display: inline-block; }

.sp-tip { position: fixed; z-index: 9999; max-width: 480px; max-height: 62vh; overflow: hidden; background: var(--surface); border: 1px solid var(--tl-acc); border-radius: 6px; padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,.6); pointer-events: none; }
.sp-tip__h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.sp-tip__s { display: flex; flex-wrap: wrap; gap: 6px; }

.sp-ikony { display: flex; gap: 2px; width: 112px; flex: none; margin-right: 8px; }
.sp-ikony img, .sp-ikony .sp-ikona--brak { width: 26px; height: 26px; object-fit: contain; flex: none; }

.sp-cols--p { grid-template-columns: minmax(240px, 300px) minmax(380px, 440px) minmax(420px, 1fr); }
@media (max-width: 1200px) { .sp-cols--p { grid-template-columns: 1fr; } }
#s-presety, #s-lista { overflow-x: hidden; }
#s-presety .pd-row, #s-lista .pd-row { min-width: 0; gap: 8px; }
#s-presety .pd-uid, #s-lista .pd-uid { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#s-presety .tl-muted, #s-lista .tl-muted { flex: none; white-space: nowrap; font-size: 11px; }

.sp-pname { font-family: 'Oswald', sans-serif; font-size: 15px; letter-spacing: .08em; padding: 3px 12px; border-radius: 12px; border: 1px solid var(--line); color: var(--bone); background: rgba(255,255,255,.04); }
.sp-pname.cargo { border-color: rgba(163,181,78,.6); color: var(--tl-ok); }
.sp-pname.attach { border-color: rgba(91,155,213,.7); color: var(--tl-info); }
.sp-kafel.preset .sp-kafel__n { font-weight: 600; }

.sp-limity { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.sp-limit { flex: 1; min-width: 130px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.sp-limit b { font-family: 'Oswald', sans-serif; font-size: 22px; color: var(--bone); }
.sp-limit span { font-size: 12px; color: var(--bone-dim); }
.sp-rozklad { margin-bottom: 6px; }

.sp-stepper { display: inline-flex; align-items: stretch; gap: 2px; }
.sp-stepper input { width: 58px !important; text-align: center; padding: 3px 2px !important; }
.sp-kafel .sp-stepper { display: flex; width: 100%; margin-top: 3px; }
.sp-kafel .sp-stepper input { flex: 1; min-width: 0; width: auto !important; font-size: 12px !important; margin-top: 0 !important; }
.sp-krok { width: 20px; flex: none; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--bone-dim); font-size: 14px; line-height: 1; padding: 0; cursor: pointer; }
.sp-krok:hover { border-color: var(--rust); color: var(--bone); }
