.team-workspace-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #383838;
  border-radius: 7px;
  background: #202020;
  color: #eee;
  font: 650 .79rem/1.2 'Inter', system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
}
.team-workspace-action:hover { background: #2d2d2d; border-color: #666; }
.team-workspace-action.primary { color: #131313; background: #ededed; border-color: #ededed; }
.team-workspace-action.primary:hover { background: #fff; }
.team-workspace-action.danger { color: #ffa2a2; }
.team-workspace-action:disabled { opacity: .55; cursor: wait; }

#druzynyContent .detail-masthead-team .team-hero-body { grid-template-columns: minmax(0, 1fr) auto; }
#druzynyContent .detail-masthead-team .team-hero-body:has(.team-hero-logo) { grid-template-columns: auto minmax(0, 1fr) auto; }
#druzynyContent .detail-masthead-team .team-hero-logo img { padding: 6px; object-fit: contain; }
#druzynyContent .detail-masthead-team .team-hero-actions { max-width: 390px; }

.team-workspace-header,
.team-workspace-card,
.lineup-editor {
  min-width: 0;
  border: 1px solid #343434;
  border-radius: 12px;
  background: #131313;
}
.team-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(15px, 3vw, 28px);
  background: linear-gradient(120deg, #242424, #131313 65%);
}
.team-workspace-header .detail-kind { color: #c6c6c6; }
.team-workspace-header h1 {
  margin: 0;
  color: #fff;
  font: 850 clamp(1.65rem, 4.5vw, 3.05rem)/1.02 var(--site-display, system-ui);
}
.team-workspace-nav {
  display: flex;
  gap: 5px;
  margin: 12px 0 14px;
  padding: 4px;
  border-bottom: 1px solid #333;
}
.team-workspace-nav button {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #bfbfbf;
  cursor: pointer;
}
.team-workspace-nav button:hover { background: #222; }
.team-workspace-nav [aria-current] { background: #eaeaea; color: #161616; font-weight: 750; }
.team-workspace-nav [aria-current]:hover { background: #fff; }
.team-workspace-grid,
.team-kit-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  align-items: start;
  gap: 12px;
}
.team-workspace-card { padding: clamp(12px, 2vw, 20px); }
.team-workspace-card h2,
.lineup-editor-head h2 { margin: 0; color: #fff; font: 800 1.12rem/1.2 'Inter', system-ui, sans-serif; }
.team-workspace-card p,
.lineup-editor p { margin: 5px 0; color: #bcbcbc; font-size: .83rem; }
.team-workspace-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 11px; }
.team-workspace-card-head > span { min-width: 32px; text-align: center; font-size: .76rem; color: #cfcfcf; font-variant-numeric: tabular-nums; }
.team-lineup-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.team-workspace-aside { display: grid; gap: 12px; min-width: 0; }
.team-roster-filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(135px,.65fr); gap: 7px; padding-bottom: 8px; }
.team-workspace-card :is(input:not([type=range]), select),
.lineup-editor select {
  min-width: 0;
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid #3c3c3c;
  border-radius: 6px;
  background: #0f0f0f;
  color: #eeeeee;
  font: inherit;
  font-size: .81rem;
}
.team-workspace-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 0;
  border-top: 1px solid #2e2e2e;
}
.team-workspace-row[hidden], .team-roster-no-results[hidden] { display: none; }
.team-workspace-person,
.team-workspace-person a { display: flex; min-width: 0; align-items: center; gap: 8px; }
.team-workspace-person { flex-wrap: wrap; }
.team-workspace-person a { color: #f5f5f5; text-decoration: none; }
.team-workspace-person a:hover b { text-decoration: underline; }
.team-workspace-person b { display: block; font-size: .85rem; overflow-wrap: anywhere; }
.team-workspace-person small { display: block; color: #acacac; font-size: .72rem; }
.team-workspace-avatar { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #242424; }
.team-workspace-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-workspace-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.team-workspace-row-actions .team-workspace-action { min-height: 29px; }
.team-workspace-tag { max-width: max-content; padding: 4px 6px; border: 1px solid #424242; border-radius: 4px; background: #1e1e1e; font-size: .69rem; }
.team-workspace-tag.open { color: #a6e4bb; }
.team-workspace-tag.alert { color: #ffa2a2; }

.team-kit-controls fieldset { min-width: 0; margin: 12px 0; padding: 10px; border: 1px solid #303030; border-radius: 8px; }
.team-kit-controls legend { padding: 0 5px; color: #dedede; font-size: .8rem; font-weight: 750; }
.team-kit-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.team-kit-fields label, .team-kit-sample label { display: grid; gap: 4px; font-size: .75rem; color: #cfcfcf; }
.team-kit-presets, .team-kit-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.team-kit-presets i { width: 15px; height: 15px; border-radius: 4px; border: 1px solid #777; }
.team-kit-fields input[type=color] { padding: 3px; cursor: pointer; }
.team-kit-size { grid-column: span 2; padding-inline: 4px; }
.team-kit-size output { float: right; font-variant-numeric: tabular-nums; }
.team-kit-size input { width: 100%; accent-color: #eee; }
.team-kit-footer [role=status] { color: #dedede; font-size: .75rem; }
.team-kit-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px solid #373737;
  border-radius: 8px;
  background: radial-gradient(ellipse at center, #292929, #0e0e0e 75%);
}
.team-kit-shirt {
  display: grid;
  place-items: center;
  width: min(172px, 72%);
  aspect-ratio: 1.05;
  padding-top: 10px;
  clip-path: polygon(0 15%, 24% 6%, 37% 0, 42% 7%, 50% 9%, 58% 7%, 63% 0, 76% 6%, 100% 15%, 88% 38%, 77% 34%, 77% 100%, 23% 100%, 23% 34%, 12% 38%);
  text-shadow: 0 1px 3px #0008;
}
.team-kit-sample { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; }
.team-kit-sample > div { display: flex; align-items: center; gap: 8px; }
.team-kit-sample small { color: #bfbfbf; }
.team-kit-marker { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; }
.team-kit-sample input { max-width: 115px; }

.term-edit.lineup-editor { padding: clamp(10px,2vw,19px); }
.lineup-editor-head,
.lineup-editor-controls,
.lineup-pitch-tools,
.lineup-editor-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lineup-editor-head, .lineup-pitch-tools, .lineup-editor-footer { justify-content: space-between; }
.lineup-editor-head { margin-bottom: 12px; }
.lineup-editor-head h2 { font-size: 1.3rem; }
.lineup-editor-controls label { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: #c9c9c9; }
.lineup-editor-controls select { width: auto; min-height: 34px; }
.lineup-editor .lu-grid { grid-template-columns: minmax(0,1fr) minmax(270px,.88fr); }
.lineup-editor .lu-pitch-card, .lineup-editor .lu-list-card { padding: 12px; min-width: 0; border-radius: 8px; background: #181818; box-shadow: none; }
.lineup-editor .lu-pitch { max-width: 430px; }
.lineup-editor .lu-pitch:not(.lu-grid-active) {
  background: repeating-linear-gradient(0deg,#19362d 0 12.5%,#1c3c31 12.5% 25%);
}
.lineup-editor .lu-list { gap: 4px; }
.lineup-editor .lu-row-edit { gap: 6px; min-width: 0; }
.lineup-editor .lu-edit-num { max-width: 46px; }
.lineup-editor .lu-pick-btn { min-width: 0; }
.lineup-editor .lu-role { font-size: .58rem; }
.lineup-editor .lu-pick-avatar img,
.lineup-editor .lu-cap-chip-avatar img,
.lineup-player-picker .pp-item-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.lineup-editor .lu-marker-empty {
  display: grid;
  place-items: center;
  width: clamp(25px, 5vw, 34px);
  height: clamp(25px, 5vw, 34px);
  min-width: 0;
  padding: 0;
  border: 1px dashed #b1c8bf;
  border-radius: 50%;
  background: #162b25d9;
  color: #fff;
  font: 700 1rem/1 system-ui;
  cursor: pointer;
  pointer-events: auto;
}
.lineup-editor .lu-marker-empty:hover,
.lineup-editor .lu-marker-empty:focus-visible { background: #d8ede4; color: #14251d; }
.lineup-editor button.lu-marker-edit-name { pointer-events: auto; cursor: pointer; border: 0; }
.lineup-editor .lu-marker-num { touch-action: none; cursor: grab; }
.lineup-pitch-tools label { display: inline-flex; align-items: center; gap: 6px; color: #ddd; font-size: .8rem; }
.lineup-editor p.lineup-caption { margin: 0; font-size: .73rem; }
.lineup-editor-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid #343434; }
.lineup-editor-footer .mm-autosave-status { margin: 0; }
.lu-pick-panel.lineup-player-picker {
  width: min(350px, calc(100vw - 16px));
  max-height: min(385px, calc(100dvh - 16px));
  border: 1px solid #484848;
  border-radius: 10px;
  background: #151515;
}
.lineup-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 1px 3px 5px; }
.lineup-picker-head button { width: 28px; height: 28px; padding: 0; border: 1px solid #434343; border-radius: 6px; background: #242424; color: #fff; cursor: pointer; }
.lineup-player-picker .pp-item { width: 100%; text-align: left; background: #202020; color: #ededed; }
.lineup-player-picker .pp-item:disabled { opacity: .5; }
.lineup-player-picker .pp-item small { color: #bebebe; font-size: .68rem; }

@media(max-width: 820px) {
  .lineup-editor .lu-grid { grid-template-columns: minmax(0, 1fr); }
}
@media(max-width: 690px) {
  .team-workspace-grid, .team-kit-editor, #druzynyContent .detail-masthead-team .team-hero-body { grid-template-columns: minmax(0,1fr); }
  #druzynyContent .detail-masthead-team .team-hero-body:has(.team-hero-logo) { grid-template-columns: auto minmax(0, 1fr); }
  #druzynyContent .detail-masthead-team .team-hero-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media(max-width: 430px) {
  .team-workspace-header, .team-lineup-shortcut { align-items: flex-start; flex-direction: column; }
  .team-kit-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .team-workspace-row { flex-wrap: wrap; }
  .team-workspace-row-actions { justify-content: flex-start; }
}
