.tg-custom-fields-toggle.is-active{border-color:var(--accent);box-shadow:0 0 0 1px rgba(133,255,76,.3)}.tg-custom-fields{margin:10px 0 12px;padding:12px;border:1px solid rgba(255,255,255,.14);border-radius:12px;background:rgba(0,0,0,.22)}.tg-custom-fields[hidden]{display:none!important}.tg-custom-fields__top{display:flex;align-items:end;gap:8px;flex-wrap:wrap}.tg-custom-fields__field{display:grid;gap:4px;min-width:150px;flex:1 1 170px}.tg-custom-fields__field label{font-size:12px;color:var(--muted)}.tg-custom-fields input,.tg-custom-fields select{min-height:36px;width:100%;padding:7px 9px;border:1px solid rgba(255,255,255,.2);border-radius:8px;background:#111;color:#fff}.tg-custom-fields__status{min-height:20px;margin:8px 0 0;font-size:12px;color:var(--muted)}.tg-custom-fields__status.is-error{color:#ff8d8d}.tg-custom-fields__status.is-ok{color:var(--accent)}.tg-custom-fields__section{margin-top:12px}.tg-custom-fields__section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:13px;font-weight:700}.tg-custom-fields__list{display:grid;gap:6px}.tg-custom-field-row{display:grid;grid-template-columns:minmax(130px,1fr) 130px auto auto;gap:7px;align-items:center;padding:7px;border:1px solid rgba(255,255,255,.1);border-radius:9px;background:rgba(255,255,255,.035)}.tg-custom-field-row__name{font-weight:600;overflow-wrap:anywhere}.tg-custom-fields__table-wrap{overflow:auto;max-height:360px;border:1px solid rgba(255,255,255,.1);border-radius:9px}.tg-custom-fields__table{border-collapse:separate;border-spacing:0;min-width:100%;width:max-content;background:rgba(0,0,0,.16)}.tg-custom-fields__table th,.tg-custom-fields__table td{padding:6px;border-right:1px solid rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.08);vertical-align:middle;min-width:150px}.tg-custom-fields__table th{position:sticky;top:0;z-index:1;background:#181a18;text-align:left;font-size:12px}.tg-custom-fields__table th:first-child,.tg-custom-fields__table td:first-child{position:sticky;left:0;z-index:2;min-width:160px;background:#181a18}.tg-custom-fields__table th:first-child{z-index:3}.tg-custom-fields__table input[type=checkbox]{width:20px;min-height:20px}.tg-custom-fields__empty{padding:10px;color:var(--muted);font-size:13px;border:1px dashed rgba(255,255,255,.15);border-radius:9px}@media(max-width:700px){.tg-custom-field-row{grid-template-columns:1fr 1fr}.tg-custom-field-row .btn{width:100%}.tg-custom-fields__top>*{flex:1 1 100%}}

/* Attribute tools: one authoritative desktop grid. The right column is only as wide
   as its widest content (the Export group ending at GeoJSON); Address and what3words
   receive every remaining pixel. */
#attrDock .attr-commandbar{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) max-content!important;
  grid-template-areas:
    "address fields"
    "w3w export";
  grid-auto-rows:max-content;
  gap:10px 12px!important;
  align-items:start;
  width:100%!important;
  margin-bottom:0!important;
}
#attrDock .attr-commandbar__group{
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:8px 12px!important;
  align-self:start!important;
  align-content:center;
}
#attrDock .attr-commandbar__group--address{
  grid-area:address;
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}
#attrDock .attr-commandbar__group--w3w{
  grid-area:w3w;
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
}
#attrDock .attr-commandbar__group--fields{grid-area:fields}
#attrDock .attr-commandbar__group--export{grid-area:export}
#attrDock .attr-commandbar__group--fields,
#attrDock .attr-commandbar__group--export{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  max-width:none!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
}
#attrDock .attr-commandbar__group .attr-commandbar__label{margin:0!important}

/* Match the final .attr-compact-btn cascade used by CSV/TSV/GeoJSON. */
#attrDock .attr-commandbar__group--fields .tg-custom-fields-toggle{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  min-height:38px!important;
  height:auto!important;
  padding:8px 13px!important;
  border-radius:12px!important;
  font-size:14px!important;
  line-height:1.1!important;
}
#attrDock .addr-fetch-status,
#attrDock .tg-w3w-table-status{
  min-height:0!important;
  margin:0!important;
}
#attrDock .addr-fetch-status:empty,
#attrDock .tg-w3w-table-status:empty{display:none!important}

/* Address format remains part of the same single desktop row. */
#attrDock .attr-address-format-wrap{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
#attrDock .attr-address-format-wrap > span{
  margin:0!important;
  padding:0!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1!important;
  color:var(--muted)!important;
}
#attrDock .attr-address-format-wrap > span::after{content:":"}
#attrDock #attrAddressFormat{
  flex:0 0 190px!important;
  width:190px!important;
  min-width:190px!important;
  max-width:190px!important;
  min-height:38px!important;
  height:38px!important;
  margin:0!important;
  padding:8px 36px 8px 13px!important;
  border-radius:12px!important;
  font-size:14px!important;
  line-height:1.1!important;
}

#attrDock .attr-dock__controls{padding-bottom:0!important}
#attrDock .attr-dock__body{margin-top:0!important;padding-top:0!important}

@media(max-width:1100px){
  #attrDock .attr-commandbar{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"address" "fields" "w3w" "export";
  }
  #attrDock .attr-commandbar__group--address,
  #attrDock .attr-commandbar__group--w3w,
  #attrDock .attr-commandbar__group--fields,
  #attrDock .attr-commandbar__group--export{
    flex-wrap:wrap!important;
    width:100%!important;
  }
}

@media(max-width:520px){
  #attrDock #attrAddressFormat{
    flex:1 1 150px!important;
    width:auto!important;
    min-width:150px!important;
    max-width:100%!important;
  }
}