.link-card{
  background:var(--lk-surface);
  border:1px solid var(--lk-border);
  border-radius:16px;
  padding:14px;
  box-shadow:0 1px 2px rgba(2,6,23,.04);
  display:grid;
  gap:12px;
  min-width:0;
}
.link-card.is-dragging{
  opacity:.62;
  transform:scale(.995);
}
.link-card-reorder{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
  gap:8px;
  max-width:100%;
  min-width:0;
  position:relative;
  z-index:1;
}
.lk-drag-handle,
.lk-reorder-btn{
  min-height:34px;
  border-radius:8px;
  border:1px solid var(--lk-border);
  background:color-mix(in srgb, var(--lk-bg-soft) 58%, var(--lk-surface));
  color:var(--lk-text);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  line-height:1;
  padding:8px 10px;
  flex:0 0 auto;
  transition:border-color .12s ease, background .12s ease, opacity .12s ease, transform .12s ease;
}
.lk-drag-handle{
  cursor:grab;
}
.lk-drag-handle:active{
  cursor:grabbing;
}
.lk-drag-handle:hover,
.lk-drag-handle:focus-visible,
.lk-reorder-btn:hover,
.lk-reorder-btn:focus-visible{
  border-color:color-mix(in srgb, var(--lk-accent) 45%, var(--lk-border));
  background:color-mix(in srgb, var(--lk-accent) 10%, var(--lk-surface));
  outline:0;
  transform:translateY(-1px);
}
.lk-reorder-btn:disabled{
  opacity:.38;
  cursor:not-allowed;
  transform:none;
}

.link-card-top{
  display:grid;
  grid-template-columns:minmax(130px,160px) minmax(130px,1fr) minmax(150px,1.2fr) auto;
  gap:12px;
  align-items:start;
  min-width:0;
}
.link-card-top > *{
  min-width:0;
}
.link-card-top .col-remove{
  display:flex;
  justify-content:flex-end;
  min-width:34px;
}
.link-card-secondary{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.link-card-extras{
  display:grid;
  gap:10px;
}
.lk-link-style-grid,
.lk-color-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(140px, 1fr));
  gap:10px;
  min-width:0;
}
.lk-link-style-grid label,
.lk-color-grid label{
  display:grid;
  gap:6px;
  min-width:0;
}
.lk-color-grid label span{
  color:var(--lk-muted);
  font-size:13px;
  font-weight:700;
}
.lk-color-grid input[type="color"].input{
  height:44px;
  padding:6px;
}
.lk-button-color-grid{
  padding:10px;
  border:1px dashed color-mix(in srgb, var(--lk-border) 80%, transparent);
  border-radius:14px;
}
.link-card-thumbrow{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.link-card-thumbrow .input[type="file"]{
  max-width:360px;
}
.link-card-options{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.link-card-display{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding-top:2px;
}
.lk-button-empty-state{
  display:grid;
  gap:8px;
  padding:12px;
  margin-bottom:12px;
  border:1px dashed color-mix(in srgb, var(--lk-accent) 34%, var(--lk-border));
  border-radius:8px;
  background:color-mix(in srgb, var(--lk-accent) 7%, var(--lk-surface));
}
.lk-button-empty-state[hidden]{
  display:none;
}
.lk-button-empty-state strong{
  color:var(--lk-text);
  font-size:15px;
}
.lk-button-empty-state span{
  color:var(--lk-muted);
  font-size:13px;
  font-weight:700;
  line-height:1.4;
}
.lk-button-suggestions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.lk-button-suggestion{
  min-height:32px;
  border:1px solid color-mix(in srgb, var(--lk-border) 82%, transparent);
  border-radius:999px;
  background:var(--lk-surface);
  color:var(--lk-text);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  padding:7px 10px;
}
.lk-button-suggestion:hover,
.lk-button-suggestion:focus-visible{
  border-color:color-mix(in srgb, var(--lk-accent) 45%, var(--lk-border));
  background:color-mix(in srgb, var(--lk-accent) 10%, var(--lk-surface));
  outline:0;
}

@media (max-width:980px){
  .link-card-top{
    grid-template-columns:1fr 1fr 40px;
  }
  .link-card-top .col-kind{
    grid-column:1;
  }
  .link-card-top .col-label{
    grid-column:2;
  }
  .link-card-top .col-main{
    grid-column:1 / span 2;
  }
  .link-card-top .col-remove{
    grid-column:3;
    grid-row:1 / span 2;
    align-self:start;
    justify-self:end;
  }
}
@media (max-width:640px){
  .link-card-top,
  .link-card-secondary,
  .lk-link-style-grid,
  .lk-color-grid{
    grid-template-columns:1fr;
  }
  .link-card-top .col-kind,
  .link-card-top .col-label,
  .link-card-top .col-main,
  .link-card-top .col-remove{
    grid-column:auto;
    grid-row:auto;
  }
  .link-card-top .col-remove{
    justify-self:end;
  }
}
@media (max-width:1080px){
  .lk-tree-editor-shell{
    grid-template-columns:1fr;
  }
  .lk-preview-panel{
    position:static;
    order:-1;
  }
  .lk-live-screen{
    min-height:0;
    width:min(100%, 430px);
  }
}
@media (max-width:700px){
  .lk-preview-details > summary{
    padding:12px 14px;
  }
  .lk-live-phone{
    padding:10px;
  }
  .lk-live-screen{
    width:min(100%, calc(100vw - 44px));
    border-radius:22px;
    padding:14px 12px;
  }
  .lk-live-cover{
    margin:-14px -12px 12px;
    height:74px;
  }
}

.kind-wrap{position:relative;}
.kind-ico{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  pointer-events:none;
  opacity:.9;
}
.kind-wrap select.kind{padding-left:34px;}


.chk{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  color:var(--lk-text);
}
.chk input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  width:42px;
  height:24px;
  border-radius:999px;
  background:#e5e7eb;
  border:1px solid #d1d5db;
  position:relative;
  cursor:pointer;
  transition:background .12s, border-color .12s;
  outline:none;
  flex:0 0 auto;
}
.chk input[type="checkbox"]::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 2px rgba(2,6,23,.18);
  transition:transform .12s ease;
}
.chk input[type="checkbox"]:checked{
  background:color-mix(in srgb, var(--lk-accent) 86%, #fff);
  border-color:color-mix(in srgb, var(--lk-accent) 74%, #fff);
}
.chk input[type="checkbox"]:checked::after{transform:translateX(18px);}


.chkradio{
  display:inline-flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.chkradio input[type="radio"]{
  margin:0;
}


.lk-helpwrap .lk-help{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:50%;
  font-size:12px;
  line-height:18px;
  background:#e2e8f0;
  color:#0f172a;
  cursor:help;
}


.icon-btn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--lk-border);
  background:var(--lk-surface);
  color:var(--lk-text);
  cursor:pointer;
  transition:transform .12s, background .12s, border-color .12s;
}
.icon-btn:hover{background:#fee2e2;border-color:#fecaca;transform:translateY(-1px);}


#addLinkBtn{
  background:var(--lk-surface) !important;
  color:var(--lk-text) !important;
  border:1px dashed var(--lk-border) !important;
  padding:10px 12px;
  border-radius:12px;
  font-weight:700;
}
#addLinkBtn:hover{
  border-color:color-mix(in srgb, var(--lk-accent) 45%, var(--lk-border)) !important;
  background:#f8fffb !important;
}


.lk-thumb-preview{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--lk-muted);
  font-size:14px;
}
.lk-thumb-preview img{
  width:64px;
  height:40px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--lk-border);
}


.lk-stepper{margin-top:10px;display:flex;flex-direction:column;gap:12px;}
.lk-stepper-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  position:sticky;
  top:10px;
  z-index:5;
  background:color-mix(in srgb, var(--lk-surface) 85%, transparent);
  border:1px solid color-mix(in srgb, var(--lk-border) 70%, transparent);
  border-radius:16px;
  padding:10px 12px;
  backdrop-filter:blur(8px);
}
.lk-steps-progress{display:flex;gap:8px;flex-wrap:wrap;}
.lk-stepper-actions{display:flex;gap:8px;flex-wrap:wrap;}


.lk-stepdot{
  border:1px solid var(--lk-border);
  background:var(--lk-surface);
  color:var(--lk-text);
  border-radius:999px;
  padding:8px 10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.lk-stepdot .n{
  width:22px;
  height:22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:color-mix(in srgb, var(--lk-accent) 18%, transparent);
  font-weight:900;
}
.lk-stepdot[aria-current="step"]{
  border-color:color-mix(in srgb, var(--lk-accent) 50%, var(--lk-border));
  box-shadow:0 0 0 4px color-mix(in srgb, var(--lk-accent) 14%, transparent);
}


.lk-step{
  border:1px solid var(--lk-border);
  border-radius:16px;
  overflow:hidden;
  background:var(--lk-surface);
  box-shadow:0 1px 2px rgba(2,6,23,.04);
}


.lk-step-head{
  width:100%;
  text-align:left;
  padding:14px;
  display:grid;
  grid-template-columns:84px 1fr auto 24px;
  gap:10px;
  align-items:center;
  background:linear-gradient(180deg, color-mix(in srgb, var(--lk-surface) 92%, #f8fafc), var(--lk-surface));
  border:0;
  cursor:pointer;
}
.lk-step-head .k{font-weight:900;color:color-mix(in srgb, var(--lk-text) 75%, var(--lk-muted));}
.lk-step-head .h{font-size:16px;font-weight:900;}
.lk-step-head .m{color:var(--lk-muted);font-weight:600;}
.lk-step-head .chev{justify-self:end;transition:transform .16s ease;opacity:.8;}
.lk-step[aria-expanded="true"] .lk-step-head .chev{transform:rotate(180deg);}


.lk-step-body{
  padding:14px 14px 16px;
  border-top:1px solid color-mix(in srgb, var(--lk-border) 75%, transparent);
}


@media (max-width:600px){
  .lk-step-head{grid-template-columns:70px 1fr 24px;}
  .lk-step-head .m{grid-column:1/-1;}
  .lk-stepper-top{position:static;}
}


.lk-stepper-bottom{
  position:sticky;
  bottom:10px;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  padding:10px 12px;
  border-radius:16px;
  background:color-mix(in srgb, var(--lk-surface) 88%, transparent);
  border:1px solid color-mix(in srgb, var(--lk-border) 70%, transparent);
  backdrop-filter:blur(10px);
  box-shadow:0 12px 30px rgba(2,6,23,.10),0 2px 10px rgba(2,6,23,.06);
}
.lk-stepper-bottom .lk-save{
  flex:0 0 auto;
  white-space:nowrap;
  padding:12px 14px;
  border-radius:14px;
}
.lk-stepper-bottom .btn[type="submit"]{width:auto;margin:0;box-shadow:none;}


.lk-stepper-bottom.lk-ported{
  position:fixed !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  top:auto !important;
  bottom:calc(12px + env(safe-area-inset-bottom) + var(--lk-footer-gap, 0px)) !important;
  width:min(980px, calc(100% - 24px)) !important;
  z-index:9999 !important;
}


@media (max-width:700px), (max-height:520px){
  .lk-stepper{padding-bottom:160px !important;}
}


.lk-mobile-fixedbar .lk-stepper-top{display:none;}


.lk-create .lk-stepper-top .btn.btn-ghost,
.lk-create .lk-stepper-bottom .btn.btn-ghost,
.lk-create .lk-stepper-bottom .lk-save{
  background:#0b1324 !important;
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,0) !important;
  box-shadow:none !important;
  background-image:none !important;
  filter:none !important;
}
.lk-create .lk-stepper-top .btn.btn-ghost:disabled,
.lk-create .lk-stepper-bottom .btn.btn-ghost:disabled{
  opacity:.45 !important;
  cursor:not-allowed !important;
}
.lk-create .lk-stepper-top .btn.btn-ghost::before,
.lk-create .lk-stepper-top .btn.btn-ghost::after,
.lk-create .lk-stepper-bottom .btn.btn-ghost::before,
.lk-create .lk-stepper-bottom .btn.btn-ghost::after{
  content:none !important;
}


.lk-create.lk-dark-preview{
  color-scheme:dark;
  background:linear-gradient(180deg,
    color-mix(in srgb, var(--lk-bg-soft) 86%, #000) 0%,
    color-mix(in srgb, #0b1220 65%, transparent) 120%);
  box-shadow:0 10px 30px rgba(0,0,0,.25),0 4px 10px rgba(0,0,0,.18);
}
.lk-create.lk-dark-preview .notice.success{background:rgba(16,185,129,.15);border-color:#10b981;color:#6ee7b7;}
.lk-create.lk-dark-preview .notice.error{background:rgba(239,68,68,.15);border-color:#ef4444;color:#fca5a5;}
.lk-create.lk-dark-preview .input,
.lk-create.lk-dark-preview .lk-sl-prefix,
.lk-create.lk-dark-preview .link-card{
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.22);
  color:#E5E7EB;
}
.lk-create.lk-dark-preview .lk-help{background:rgba(255,255,255,.16);color:#E5E7EB;}
.lk-create.lk-dark-preview #addLinkBtn{
  background:rgba(255,255,255,.06) !important;
  border-color:rgba(255,255,255,.22) !important;
  color:#E5E7EB !important;
}
.lk-create.lk-dark-preview .field.locked .input{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.18);
}
.lk-create.lk-dark-preview .lk-stepper-bottom{
  background:rgba(15,23,42,.75);
  border-color:rgba(255,255,255,.18);
}


@media (min-width:701px) and (min-height:521px){
  #lkStepBottom{display:none !important;}
  .lk-stepper-top{display:flex !important;}
}

.lk-save-overlay{
  position:fixed;
  inset:0;
  z-index:10050;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(8,13,24,.52);
  backdrop-filter:blur(8px);
}
.lk-tree-saving .lk-save-overlay{display:flex;}
.lk-save-card{
  width:min(420px, calc(100vw - 32px));
  max-width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.22);
  border-radius:20px;
  padding:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  color:#0b1324;
  box-shadow:0 24px 70px rgba(2,6,23,.28);
  text-align:center;
}
.lk-save-spinner{
  width:42px;
  height:42px;
  margin:0 auto 14px;
  border-radius:999px;
  border:4px solid rgba(11,42,74,.14);
  border-top-color:#0b2a4a;
  animation:lkTreeSpin .8s linear infinite;
}
.lk-save-card strong{
  display:block;
  font-size:20px;
  margin-bottom:8px;
}
.lk-save-card span{
  display:block;
  color:#556275;
  line-height:1.45;
}
.lk-tree-saving .lk-save,
.lk-tree-saving button[type="submit"]{
  pointer-events:none;
  opacity:.78;
}
.lk-tree-saving .lk-save::after{
  content:"";
  display:inline-block;
  width:14px;
  height:14px;
  margin-left:8px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  vertical-align:-2px;
  animation:lkTreeSpin .8s linear infinite;
}
@keyframes lkTreeSpin{to{transform:rotate(360deg);}}
@media (prefers-reduced-motion:reduce){
  .lk-save-spinner,
  .lk-tree-saving .lk-save::after{animation:none;}
}

 
