:root {
  color-scheme:dark;
  --bg:#0b1016;
  --panel:#111923;
  --line:#26313d;
  --muted:#8f9dad;
  --text:#eaf0f4;
  --accent:#d5ee7b
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
button,input,select,textarea {
  font:inherit
}
button,a,input,summary {
  outline-offset:5px
}
a {
  color:inherit;
  text-decoration:none
}
button {
  cursor:pointer
}
button:disabled {
  cursor:default;
  opacity:.5
}
button {
  color:inherit
}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible,textarea:focus-visible,.table-scroll:focus-visible {
  outline:2px solid var(--accent)
}
[hidden] {
  display:none!important
}
.sidebar {
  overflow-y:auto;
  position:fixed;
  inset:0 auto 0 0;
  width:248px;
  padding:32px 22px;
  background:#10171f;
  border-right:1px solid var(--line);
  display:flex;
  flex-direction:column
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:21px;
  font-weight:750;
  letter-spacing:-.5px
}
.brand-symbol {
  position:relative;
  display:inline-grid;
  place-items:center;
  width:35px;
  height:35px;
  background:var(--accent);
  color:#142017;
  border-radius:10px;
  font-size:24px;
  font-weight:900
}
.brand-symbol span {
  font-size:15px;
  position:absolute;
  top:-6px;
  right:-3px
}
.workspace {
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:12px;
  margin-top:40px
}
.club-avatar {
  background:#273340;
  color:#bccadd;
  border-radius:8px;
  padding:9px;
  font-size:12px;
  font-weight:700
}
.workspace strong {
  font-size:13px
}
.workspace small,.account small {
  display:block;
  font-size:11px;
  color:var(--muted)
}
.nav-label {
  font-size:10px;
  color:#6f8091;
  letter-spacing:2px;
  margin:32px 12px 12px
}
.nav-item {
  display:flex;
  align-items:center;
  gap:12px;
  background:none;
  border:0;
  text-align:left;
  width:100%;
  padding:12px;
  border-radius:8px;
  color:var(--muted);
  margin-bottom:5px
}
.nav-item>span:first-child {
  font-size:20px;
  line-height:1
}
.nav-item.active {
  background:#243025;
  color:var(--accent)
}
.nav-count {
  margin-left:auto;
  font-size:11px;
  background:#28313b;
  padding:1px 6px;
  border-radius:5px
}
.sidebar-bottom {
  margin-top:auto
}
.player-link {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--accent);
  background:var(--accent);
  color:#17200b;
  font-weight:700;
  padding:14px 16px;
  min-height:50px;
  border-radius:8px
}
.player-link:hover { background:#e2f59e; border-color:#e2f59e; }
.sidebar-bottom>p {
  color:var(--muted);
  font-size:11px;
  text-align:center
}
.account {
  display:flex;
  gap:10px;
  align-items:center;
  border-top:1px solid var(--line);
  padding-top:22px;
  margin-top:24px;
  overflow-wrap:anywhere
}
.account strong {
  font-size:12px
}
.account-dot {
  width:8px;
  height:8px;
  border-radius:100%;
  background:var(--accent);
  flex-shrink:0
}
main {
  margin-left:248px;
  padding:0 42px 45px;
  max-width:1800px
}
.topline {
  height:78px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:10px;
  letter-spacing:1.7px;
  color:var(--muted)
}
.slash {
  margin:0 16px;
  color:#455361
}
.connection {
  display:flex;
  align-items:center;
  gap:7px
}
.connection i {
  width:6px;
  height:6px;
  background:var(--accent);
  border-radius:100%
}
.preview-note {
  color:#b5c49c;
  background:#161e19;
  border:1px solid #303c2b;
  padding:9px 14px;
  border-radius:7px;
  font-size:12px;
  margin-top:22px
}
.page-title {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:38px 0 28px;
  gap:20px
}
.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  color:var(--muted);
  margin:0 0 10px;
  font-weight:650
}
h1 {
  font-size:42px;
  line-height:1.15;
  font-weight:650;
  letter-spacing:-1.7px;
  margin:0
}
h1 span {
  color:var(--accent)
}
.page-title h1 { width:fit-content; max-width:100%; }
/* View navigation focuses headings for screen readers, not as interactive controls. */
.page-title h1:focus { outline:none; }
.page-title p:last-child {
  color:var(--muted);
  margin:10px 0 0
}
.primary,.secondary {
  border-radius:8px;
  padding:11px 18px;
  font-weight:650;
  border:1px solid transparent;
  white-space:nowrap
}
.primary {
  background:var(--accent);
  color:#15200e
}
.primary:hover {
  background:#e4faa0
}
.secondary {
  background:transparent;
  border-color:var(--line)
}
.secondary:not(:disabled):hover,.icon-button:not(:disabled):hover { background:#202d38; border-color:#576979; }
.nav-item:not(.active):hover { background:#1a2530; color:var(--text); }
.overview-scope a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
#views-view .toolbar .search { margin-left:0; flex:1; max-width:360px; }
#views-view .toolbar .search input { width:100%; min-width:0; }
#clear-filters { padding:6px 10px; font-size:12px; }
.upload-empty { border:1px dashed var(--line); border-radius:12px; margin-top:24px; }
.upload-empty h2 { color:var(--text); font-size:22px; }
.upload-empty p { max-width:420px; margin:12px auto 22px; }
.account-details { max-width:800px; padding:24px; }
.club-switcher { margin-top:24px; }
#club-switch-list { list-style:none; padding:0; margin:20px 0 0; }
#club-switch-list li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid var(--line); }
#club-switch-list li>div { min-width:0; overflow-wrap:anywhere; }
#club-switch-list small { display:block; color:var(--muted); margin-top:6px; }
#club-switch-list button { flex-shrink:0; }
@media(max-width:480px) { #club-switch-list li { align-items:flex-start; flex-direction:column; } }
.club-switcher>p { color:var(--muted); }
.club-switcher .upload-actions { margin-top:20px; }
#club-switch-message { color:#f6c884; }
.account-identity { display:flex; align-items:center; gap:16px; margin-bottom:24px; }
.account-identity h2 { margin:0; overflow-wrap:anywhere; }
.account-identity p { margin:6px 0 0; color:var(--muted); }
.account-details dl { margin:0; }
.account-details dl>div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 24px; padding:18px 0; border-top:1px solid var(--line); }
.account-details dt { color:var(--muted); }
.account-details dd { margin:0; overflow-wrap:anywhere; }
.stats {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  margin:30px 0
}
.stats>div {
  padding:22px 24px;
  border-right:1px solid var(--line)
}
.playlist-stats { grid-template-columns:repeat(3,1fr); }
#playlists-view .playlist-toolbar { margin:0; padding:16px 20px; border-bottom:1px solid var(--line); }
.stats>div:last-child {
  border:0
}
.stats span {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:10px
}
.stats strong {
  font-size:28px;
  letter-spacing:-1px;
  font-weight:550
}
.library-box {
  border:1px solid var(--line);
  border-radius:12px;
  background:#101720;
  overflow:hidden
}
.toolbar {
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px 20px;
  border-bottom:1px solid var(--line)
}
.tabs {
  display:flex;
  gap:6px
}
.tabs button {
  background:none;
  border:0;
  padding:7px 10px;
  color:var(--muted);
  border-radius:6px;
  font-size:12px;
  white-space:nowrap
}
.tabs .selected {
  background:#283329;
  color:#d5e6ad
}
.search {
  margin-left:auto;
  display:flex;
  align-items:center;
  background:#0c121a;
  border:1px solid var(--line);
  border-radius:7px;
  padding:6px 10px;
  gap:8px
}
.search input {
  width:170px;
  background:transparent;
  border:0;
  color:var(--text);
  padding:2px;
  font-size:12px
}
.search>span {
  color:var(--muted)
}
.match-row-actions { display: flex; gap: 8px; align-items: center; }
#library-view > .stats, #playlists-view > .stats, #views-view > .stats, #clubs-view > .stats { display:none; }
.management-action { width:36px; height:36px; padding:0; flex-shrink:0; }
.management-action.danger:not(:disabled):hover { background:#362226; border-color:#a96775; }
@media (max-width:700px) { .management-action { width:44px; height:44px; } }
.ui-icon { display:inline-block; width:20px; height:20px; vertical-align:middle; flex-shrink:0; pointer-events:none; }
[data-icon] { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; }
.nav-item > span:first-child { display:inline-flex; width:22px; flex-shrink:0; }
.destination-icon .ui-icon { width:24px; height:24px; }
.search .ui-icon { width:16px; height:16px; }
.primary [data-icon],.secondary [data-icon] { margin-right:5px; }
.table-footer .ui-icon,.overview-scope .ui-icon { width:14px; height:14px; }
.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:none;
  border:1px solid var(--line);
  border-radius:7px;
  min-width:34px;
  min-height:34px;
  font-size:19px
}
.table-scroll {
  overflow:auto
}
.table-scroll-hint { display:none; margin:0; padding:10px 16px; color:var(--muted); font-size:11px; border-bottom:1px solid var(--line); }
@media(max-width:700px) {
  .table-scroll-hint { display:block; }
  #clubs-view .table-scroll-hint { display:none; }
  .icon-button { min-width:44px; min-height:44px; }
  .playlist-stats>div:last-child { grid-column:1 / -1; }
  .page-title { flex-wrap:wrap; }
}
table {
  border-collapse:collapse;
  width:100%;
  text-align:left
}
th {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:1px;
  font-weight:500;
  color:var(--muted);
  background:#0e151d;
  padding:12px 16px
}
th:first-child,td:first-child {
  padding-left:22px
}
td {
  padding:20px 16px;
  border-top:1px solid #202a35;
  font-size:12px;
  white-space:nowrap
}
td:first-child {
  white-space:normal;
  min-width:230px
}
td strong {
  display:block;
  font-size:14px;
  font-weight:600
}
td small {
  display:block;
  color:var(--muted);
  margin-top:4px;
  font-size:11px
}
.match-mark {
  display:flex;
  gap:13px;
  align-items:center
}
.match-emblem {
  width:36px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid #354459;
  border-radius:9px;
  background:linear-gradient(150deg,#263952,#141f2b);
  color:#b9cde5;
  flex-shrink:0;
  font-size:12px;
  letter-spacing:1px
}
.file-chip {
  font-size:10px;
  background:#1c2733;
  border:1px solid #334152;
  color:#b3c5d9;
  border-radius:4px;
  padding:3px 5px;
  display:inline-block;
  margin:2px
}
button.file-chip { min-height:32px; }
button.file-chip:not(.missing) { background:#1b312b; border-color:#3e765a; color:#9ad1b7; }
button.file-chip:hover { border-color:var(--accent); }
.file-chip.missing { background:transparent; border-style:dashed; color:var(--muted); }
.media-tabs { margin-top:24px; justify-content:flex-start; }
.media-tab.present { border-color:#536345; }
.media-tab[aria-expanded=true] { background:#243025; color:var(--accent); border-color:var(--accent); }
.media-details { padding:20px; margin-top:16px; background:#0c131b; border:1px solid var(--line); border-radius:10px; }
.media-details h3 { display:inline-block; margin:0 12px 0 0; }
.media-filename { overflow-wrap:anywhere; font-weight:600; }
.media-details .upload-actions { margin-top:18px; }
.badge {
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#1b312b;
  color:#9ad1b7;
  padding:4px 9px;
  border-radius:20px;
  font-size:10px
}
.badge.warning {
  background:#342c1b;
  color:#dfc28b
}
.badge.error {
  background:#362226;
  color:#efabb6
}
.table-footer {
  border-top:1px solid var(--line);
  padding:13px 22px;
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:11px
}
.library-hint {
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:28px;
  padding:20px 2px
}
.hint-icon {
  font-size:23px;
  color:var(--accent);
  background:#222d21;
  border-radius:10px;
  padding:7px 13px
}
.library-hint strong {
  font-size:13px
}
.library-hint p {
  font-size:12px;
  color:var(--muted);
  margin:4px 0
}
.library-hint a {
  margin-left:auto;
  font-size:12px;
  color:var(--accent);
  white-space:nowrap
}
#load-message:not(:empty) {
  padding:18px 22px;
  color:var(--muted)
}
#load-message:empty {
  display:none
}
dialog {
  color:var(--text);
  background:#111a24;
  border:1px solid #354252;
  border-radius:16px;
  padding:0;
  width:min(660px,calc(100vw - 32px));
  max-height:90dvh;
  box-shadow:0 30px 100px #0009
}
dialog::backdrop {
  background:#03070bc9;
  backdrop-filter:blur(4px)
}
.dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 28px;
  border-bottom:1px solid var(--line)
}
h2 {
  font-size:26px;
  letter-spacing:-.6px;
  margin:0;
  font-weight:600
}
.dialog-body {
  padding:22px 28px
}
.dialog-intro {
  color:var(--muted);
  margin:0 0 20px;
  font-size:13px
}
.file-grid,.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px
}
.file-card {
  position:relative;
  border:1px dashed #536345;
  border-radius:10px;
  background:#1a241d;
  text-align:center;
  padding:18px 10px;
  display:flex;
  flex-direction:column;
  gap:5px;
  cursor:pointer;
  min-width:0
}
.file-card input {
  position:absolute;
  inset:0;
  opacity:0;
  width:100%;
  cursor:pointer
}
.file-card:focus-within {
  outline:2px solid var(--accent);
  outline-offset:3px
}
.file-card>span[data-file-name] {
  font-size:12px;
  color:var(--accent);
  overflow-wrap:anywhere
}
.file-card small {
  font-size:10px;
  color:var(--muted)
}
.file-icon {
  font-size:24px;
  color:var(--accent)
}
.field {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-size:12px;
  margin-top:18px;
  color:#bdcad7
}
.field input {
  min-width:0;
  border:1px solid #344251;
  background:#0c131b;
  color:var(--text);
  border-radius:7px;
  padding:10px;
  width:100%
}
.field input[type=file] {
  font-size:11px
}
details {
  border-top:1px solid var(--line);
  padding-top:16px;
  margin-top:22px
}
summary {
  cursor:pointer;
  font-size:13px
}
summary span {
  color:var(--muted);
  font-size:11px;
  margin-left:8px
}
.form-notice {
  font-size:11px;
  color:var(--muted);
  margin:20px 0 0
}
#form-error, .creation-warning {
  font-size:14px;
  line-height:1.5;
  color:#f4b0a4;
  background:rgba(244,176,164,.08);
  border:1px solid rgba(244,176,164,.4);
  border-left:4px solid #f4b0a4;
  border-radius:8px;
  padding:14px 16px;
  margin:0 0 20px
}
#form-error:empty {
  display:none
}
.dialog-footer {
  display:flex;
  justify-content:flex-end;
  gap:12px;
  padding:18px 28px;
  border-top:1px solid var(--line)
}
.draft-card {
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:12px;
  padding:24px;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  gap:18px
}
.draft-card>div {
  flex:1
}
.draft-card h3 {
  margin:0 0 7px
}
.draft-card p {
  color:var(--muted);
  font-size:12px;
  margin:5px 0;
  overflow-wrap:anywhere
}
.empty {
  padding:60px 24px;
  text-align:center;
  color:var(--muted)
}
.detail-pair {
  display:flex;
  justify-content:space-between;
  gap:18px;
  padding:13px 0;
  border-bottom:1px solid var(--line);
  overflow-wrap:anywhere
}
.detail-pair span:first-child {
  color:var(--muted)
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0)
}
@media(min-width:1600px) {
  main {
    padding-left:64px;
    padding-right:64px
  }
}
@media(max-width:1100px) {
  .sidebar {
    width:205px;
    padding:28px 15px
  }
  main {
    margin-left:205px;
    padding:0 24px 30px
  }
  .toolbar {
    flex-wrap:wrap
  }
  .search {
    margin-left:0
  }
  .stats>div {
    padding:18px
  }
  .stats strong {
    font-size:24px
  }
}
@media(max-width:700px) {
  .sidebar {
    position:static;
    width:100%;
    padding:16px;
    display:block;
    border-right:0;
    border-bottom:1px solid var(--line)
  }
  .brand {
    font-size:19px
  }
  .workspace,.nav-label,.sidebar-bottom {
    display:none
  }
  .sidebar nav {
    display:flex;
    margin-top:16px;
    gap:8px
  }
  .nav-item {
    width:auto;
    margin:0;
    padding:8px 12px;
    font-size:12px
  }
  .nav-item>span:first-child {
    display:none
  }
  main {
    margin:0;
    padding:0 16px 24px
  }
  .topline {
    height:55px;
    font-size:9px;
    letter-spacing:1px
  }
  .page-title {
    margin:28px 0 20px;
    align-items:flex-start;
    gap:14px
  }
  h1 {
    font-size:30px
  }
  .page-title p:last-child {
    font-size:12px;
    max-width:185px
  }
  .page-title .primary, .page-title .secondary {
    padding:9px 12px;
    font-size:12px
  }
  .stats {
    grid-template-columns:1fr 1fr
  }
  .stats>div:nth-child(2) {
    border-right:0
  }
  .stats>div:nth-child(-n+2) {
    border-bottom:1px solid var(--line)
  }
  .toolbar {
    padding:14px;
    gap:10px
  }
  .search {
    flex:1
  }
  .search input {
    width:100%;
    min-width:0
  }
  .library-hint {
    align-items:flex-start
  }
  .library-hint a {
    display:none
  }
  .table-footer {
    gap:12px
  }
  .table-footer>span:last-child {
    display:none
  }
  .dialog-head,.dialog-body,.dialog-footer {
    padding:20px
  }
  .file-grid,.form-grid {
    gap:10px
  }
  .draft-card {
    align-items:flex-start;
    flex-wrap:wrap
  }
  .connection {
    letter-spacing:0
  }
}
.table-scroll {
  position: relative;
}
@media (max-width: 700px) {
  .toolbar .tabs {
    flex-basis: 100%;
  }
  .toolbar .search {
    min-width: 0;
    flex: 1 1 200px;
  }
}
.metadata-filters { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.metadata-filters label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.metadata-filters > span { color: var(--muted); font-size: 11px; margin-left: auto; }
.metadata-filters select, .field select { font: inherit; color: var(--text); background: #0c131b; padding: 9px; border: 1px solid #344251; border-radius: 7px; min-width: 0; }
.field select { width: 100%; }
.match-metadata { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 10px; color: var(--muted); }
.type-badge { border: 1px solid #354659; border-radius: 4px; padding: 1px 6px; color: #aebfd4; }
/* One tint per kind: match amber, training violet, studio blue (green is taken by file chips). */
.type-badge.match { background: #33291b; border-color: #6c5631; color: #ebcb8f; }
.type-badge.training { background: #26253c; border-color: #4a4267; color: #c6b9eb; }
.type-badge.studio { background: #1c2a3c; border-color: #38557a; color: #a9c8ee; }
.metadata-edit { margin-top: 18px; }
.template-controls { margin-top:18px; }
.template-conditions { margin-top:12px; }
.template-codes { margin:20px 0 0; padding:12px; border:1px solid var(--line); border-radius:8px; display:flex; gap:10px; }
.template-patterns { min-width:0; margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:8px; }
.template-patterns > div > div { padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid var(--line); }
.template-codes legend { color:var(--muted); font-size:12px; }
.filter-advanced { margin-top:24px; padding:18px; border:1px solid var(--line); border-radius:12px; background:#0c131b; }
.filter-section { margin-top:16px; padding:14px 18px; border:1px solid var(--line); border-radius:12px; }
.filter-section > summary { cursor:pointer; font-weight:700; font-size:16px; }
.filter-section .filter-advanced { margin-top:16px; }
.template-score,.template-court { margin:18px 0 0; padding:12px; border:1px solid var(--line); border-radius:8px; min-width:0; }
.template-score legend,.template-court legend { color:var(--muted); font-size:12px; }
.template-court > div > .form-grid { align-items:end; margin-bottom:10px; }
.filter-advanced summary { cursor:pointer; font-weight:700; font-size:16px; }
.filter-after-group { margin-top:22px; padding:16px; border:1px solid #344251; border-radius:10px; background:#0c131b; }
.filter-after-group .field { margin-top:0; }
.after-eval-options { margin:18px 0 0; padding:0; min-width:0; border:0; }
.after-eval-options legend { margin-bottom:8px; }
.after-eval-dropdown { position:relative; margin:0; padding:0; border:0; }
.after-eval-dropdown summary { list-style:none; cursor:pointer; padding:10px 30px 10px 12px; border:1px solid #344251; border-radius:6px; background:#0c131b; font-size:12px; }
.after-eval-dropdown summary::-webkit-details-marker { display:none; }
.after-eval-dropdown summary::after { content:'▾'; position:absolute; right:12px; }
.after-eval-choices { position:absolute; z-index:10; bottom:calc(100% + 4px); left:0; right:0; max-height:220px; overflow-y:auto; padding:10px; border:1px solid #344251; border-radius:8px; background:#121c26; box-shadow:0 8px 20px #0006; }
.after-eval-choices label { padding:8px; }
.after-eval-options legend { font-size:12px; color:var(--text); }
.after-eval-options label { display:flex; align-items:center; gap:5px; cursor:pointer; }
.after-eval-options input { width:auto; margin:0; accent-color:#d6ef7b; }
.after-eval-options small { flex-basis:100%; color:var(--muted); }
.filter-advanced summary:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
.template-codes input { width:42px; min-width:0; padding:10px; text-align:center; text-transform:uppercase; background:#0c131b; color:var(--text); border:1px solid #344251; border-radius:6px; }
#template-count { margin-left:auto; font-size:12px; color:var(--muted); }
#template-error { color:#efabb6; }
.club-summary { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px; background:var(--panel); border:1px solid var(--line); border-radius:12px; }
.club-summary h2 { overflow-wrap:anywhere; }
#clubs-view > .library-box { margin-top:24px; }
.club-summary > div { min-width:0; }
.club-person { display:flex; align-items:center; gap:12px; }
.club-person > div { min-width:0; overflow-wrap:anywhere; }
.club-person .club-avatar { flex-shrink:0; }
.member-role { font-size:11px; border:1px solid #3a4656; border-radius:6px; padding:4px 9px; color:#bdcad7; }
.member-role.admin { color:var(--accent); border-color:#526338; background:#232d21; }
.member-role.manager { color:#c6b9eb; border-color:#4a4267; background:#26253c; }
.club-role-filter { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.club-role-filter select { color:var(--text); background:#0c131b; border:1px solid var(--line); border-radius:7px; padding:8px; font:inherit; }
#clubs-view .search { margin-left:0; flex:1; }
#clubs-view .search input { width:100%; min-width:0; }
.club-role-guide { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:24px; }
.club-role-guide p { font-size:12px; color:var(--muted); }
.club-access-explanation { padding:14px; border-left:2px solid var(--accent); color:#bdcad7; background:#1b2526; font-size:13px; }
#club-message:not(:empty) { padding:14px 22px; color:#dfc28b; }
#club-message:empty, #club-dialog-error:empty { display:none; }
#club-dialog-error { color:#efabb6; }
@media(max-width:700px) { .club-summary { flex-wrap:wrap; padding:18px; } .club-role-guide { grid-template-columns:1fr; gap:6px; } #clubs-view .page-title { flex-wrap:wrap; } }
@media(max-width:700px) {
  #clubs-view .toolbar .search { flex-basis:100%; }
  #clubs-view table, #club-rows { display:block; }
  #clubs-view thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
  #club-rows tr { display:flex; flex-direction:column; padding:16px; gap:10px; border-top:1px solid var(--line); }
  #club-rows td, #club-rows td:first-child { display:block; padding:0; border:0; min-width:0; white-space:normal; }
}
.playlist-notice { color:var(--muted); font-size:12px; }
.playlist-toolbar { display:flex; align-items:center; gap:16px; margin:22px 0 12px; }
.playlist-toolbar .search { margin-left:0; flex:1; max-width:360px; }
.playlist-toolbar .search input { width:100%; min-width:0; }
#playlist-count { color:var(--muted); font-size:12px; margin-left:auto; }
#playlist-message:not(:empty) { padding:12px 16px; border:1px solid var(--line); border-radius:8px; color:#dfc28b; }
#playlist-message:empty, #playlist-dialog-error:empty { display:none; }
#playlist-dialog-error { color:#efabb6; }
.playlist-layout { display:grid; grid-template-columns:minmax(230px, .8fr) minmax(0, 1.5fr); gap:20px; align-items:start; }
.playlist-card { display:flex; flex-direction:column; text-align:left; width:100%; padding:20px; gap:8px; border:1px solid var(--line); border-radius:10px; background:var(--panel); margin-bottom:12px; overflow-wrap:anywhere; }
.playlist-card strong { font-size:16px; }
.playlist-card span { color:#bdcad7; font-size:12px; }
.playlist-card small { color:var(--muted); font-size:11px; }
.playlist-card.selected { border-color:#8da950; background:#1b271f; box-shadow:inset 3px 0 var(--accent); }
.playlist-card:hover { border-color:#8da950; }
.playlist-detail { border:1px solid var(--line); border-radius:12px; background:var(--panel); min-width:0; overflow:hidden; }
.playlist-detail-head { padding:22px; border-bottom:1px solid var(--line); }
.playlist-detail-head h2 { font-size:22px; overflow-wrap:anywhere; }
.playlist-controls { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.playlist-controls .secondary { font-size:12px; padding:8px 12px; }
.danger { color:#efabb6; border-color:#69434b; }
.danger:hover { background:#362226; }
.playlist-action { padding:20px 22px; border-bottom:1px solid var(--line); }
.playlist-action:last-child { border-bottom:0; }
.playlist-action-info { display:flex; align-items:center; gap:12px; }
.playlist-action-info > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.playlist-action-info small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.playlist-position { color:var(--muted); font-size:12px; }
.playlist-action .playlist-controls { margin-top:14px; }
.playlist-comment { padding:10px 14px; border-left:2px solid #91aa58; background:#1b2526; color:#c9d7dc; font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.field textarea { font:inherit; color:var(--text); border:1px solid #344251; background:#0c131b; padding:12px; border-radius:8px; resize:vertical; width:100%; }
.playlist-roster { max-height:45vh; overflow:auto; }
.match-viewers-dialog .dialog-head { gap:16px; }
.match-viewers-dialog .dialog-head h2 { min-width:0; overflow-wrap:anywhere; }
.match-viewers-dialog .dialog-head button { flex-shrink:0; }
.playlist-roster h3 { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; }
.playlist-roster section + section { border-top:1px solid var(--line); margin-top:16px; }
.playlist-member { display:flex; gap:12px; align-items:center; padding:10px 0; cursor:pointer; }
.playlist-member input { width:18px; height:18px; accent-color:var(--accent); }
.playlist-member small { display:block; color:var(--muted); font-size:11px; }
.playlist-member > span { overflow-wrap:anywhere; min-width:0; }
@media(max-width:900px) { .playlist-layout { grid-template-columns:1fr; } .playlist-card { margin:0; } }
@media(max-width:500px) { #playlist-list { grid-template-columns:1fr; } .playlist-toolbar { flex-wrap:wrap; gap:10px; } .playlist-toolbar .search { flex-basis:100%; max-width:none; } #playlist-count { margin-left:0; flex:1; } .playlist-detail-head,.playlist-action { padding:16px; } }
.dashboard-stats { margin:12px 0 22px; }
.dashboard-stats > div { padding:12px 20px; }
.dashboard-stats span { margin-bottom:5px; }
.dashboard-stats strong { font-size:24px; }
#dashboard-view .dashboard-stats { grid-template-columns:repeat(6,minmax(0,1fr)); }
@media (max-width:1200px) {
  #dashboard-view .dashboard-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #dashboard-view .dashboard-stats > div { border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
  #dashboard-view .dashboard-stats > div:nth-child(3n) { border-right:0; }
  #dashboard-view .dashboard-stats > div:nth-last-child(-n+3) { border-bottom:0; }
}
@media (max-width:600px) {
  #dashboard-view .dashboard-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #dashboard-view .dashboard-stats > div:nth-child(n) { border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
  #dashboard-view .dashboard-stats > div:nth-child(2n) { border-right:0; }
  #dashboard-view .dashboard-stats > div:nth-last-child(-n+2) { border-bottom:0; }
}
.dashboard-section-title { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:14px; gap:12px; }
.dashboard-section-title h2 { font-size:20px; }
.dashboard-section-title > span, .overview-scope { font-size:11px; color:var(--muted); }
.destination-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.destination-card { display:flex; text-align:left; align-items:flex-start; gap:16px; border:1px solid var(--line); background:var(--panel); border-radius:12px; padding:22px; min-width:0; }
.destination-card:not(:disabled):hover { border-color:#7b9150; background:#17211f; }
.destination-icon { display:grid; place-items:center; flex-shrink:0; width:42px; height:42px; border:1px solid #3a4a32; border-radius:10px; color:var(--accent); background:#202b21; font-size:24px; }
.destination-copy { display:flex; flex-direction:column; gap:6px; min-width:0; }
.destination-copy strong { font-size:17px; }
.destination-copy > span { color:var(--muted); font-size:12px; }
.destination-copy small { margin-top:10px; color:#b4c598; font-size:11px; }
.destination-arrow { margin-left:auto; color:var(--muted); }
.dashboard-followup { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 22px; border:1px solid var(--line); border-radius:12px; margin-top:22px; }
.dashboard-followup p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.overview-scope { margin-top:14px; }
.coming-panel { border:1px solid var(--line); border-radius:12px; background:var(--panel); padding:30px; }
.coming-panel h2 { margin-top:18px; font-size:22px; }
.coming-panel p { color:var(--muted); max-width:600px; margin-bottom:26px; }
.coming-panel a { display:inline-block; }
@media (max-height:850px) and (min-width:701px) { .sidebar { padding-top:22px; padding-bottom:20px; } .workspace { margin-top:22px; } .nav-label { margin-top:20px; } .nav-item { padding-top:9px; padding-bottom:9px; } .account { margin-top:16px; padding-top:14px; } }
@media (max-width:1100px) { .destination-card { padding:18px; gap:12px; } .destination-copy strong { font-size:15px; } }
@media (max-width:700px) { .sidebar nav { flex-wrap:wrap; } .destination-grid { grid-template-columns:1fr; } .dashboard-section-title > span { display:none; } .dashboard-followup { padding:16px; } .dashboard-followup .secondary { font-size:12px; padding:10px; } }
@media (max-width: 700px) { .metadata-filters { gap: 10px; padding: 12px 14px; } .metadata-filters > span { display: none; } .metadata-filters label { flex: 1; } }
.upload-card { margin: 20px 0; padding: 24px; background: #101a23; border: 1px solid #293844; border-radius: 16px; }
.upload-heading, .upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.upload-actions { justify-content: flex-start; }
.upload-card p { overflow-wrap: anywhere; }
.upload-files { color: #98a9b8; font-size: 13px; }
.video-recap { margin: 20px 0; padding: 20px; border: 1px solid #354552; border-radius: 12px; background: #0c141c; }
.video-recap h4 { margin: 0 0 12px; font-size: 16px; }
.video-recap > strong { color: #d7ef7a; }
.video-recap-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 20px 0; }
.video-recap-details dt { color: #98a9b8; font-size: 12px; }
.video-recap-details dd { margin: 6px 0 0; font-size: 15px; }
.upload-card progress { width: 100%; height: 12px; accent-color: #d7ef7a; }
.upload-card progress::-webkit-progress-bar { background: #253440; border-radius: 8px; }
.upload-card progress::-webkit-progress-value { background: #d7ef7a; border-radius: 8px; }
.upload-card progress::-moz-progress-bar { background: #d7ef7a; border-radius: 8px; }
.upload-reselect { position: relative; overflow: hidden; cursor: pointer; }
.upload-reselect input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-reselect:focus-within { outline: 2px solid #d7ef7a; outline-offset: 3px; }
#upload-notice { color: #ffa4a4; overflow-wrap: anywhere; }
.management-login { display: grid; min-height: 100dvh; place-items: center; padding: 24px; }
.management-login .login-card { width: min(100%, 460px); margin: 0; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; }
.login-card .brand { margin-bottom: 32px; }
.login-card h1 { font-size: 38px; }
.login-card input { font-size: 16px; }
.login-card form button, .login-return { width: 100%; margin: 8px 0; }
.login-return { display: block; text-align: center; text-decoration: none; }
.login-warning, .login-endpoint { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.login-warning { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
#session-message, #metadata-error { overflow-wrap: anywhere; color: #f6c884; }

.account-plan-summary { margin-top: 1.25rem; color: var(--muted, #a8b6c5); line-height: 1.6; }
.account-plan-summary p { margin: .5rem 0; }
.inline-asset-upload { display: grid; gap: 16px; width: 100%; min-width: 0; }
.inline-asset-upload input[type="file"] { max-width: 100%; }
.inline-asset-upload.awaiting-file input[type="file"] { border-color: var(--accent); }
.inline-asset-upload.awaiting-file input[type="file"]::file-selector-button {
  background: var(--accent); color: #101810; border: 0; border-radius: 6px;
  padding: 8px 12px; margin-right: 12px; font: inherit; font-weight: 700; cursor: pointer;
}
.inline-asset-upload progress { width: 100%; accent-color: var(--accent); }
.inline-asset-upload p { margin: 0; overflow-wrap: anywhere; }
.inline-upload-result { color: var(--accent); }
.account-plan-summary a, #library-view .playlist-notice a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
button.file-chip.conversion-waiting,.media-tab.conversion-waiting{border-color:#c5a54a;color:#ead48a;background:#332d1c}.conversion-status.warning{color:#ead48a}
/* Free-plan upgrade prompt on the dashboard. */
.upgrade-banner { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 0 22px; padding:20px 24px; background:#161e19; border:1px solid #3d4c2c; border-radius:10px; }
.upgrade-banner .eyebrow { color:var(--accent); margin-bottom:6px; }
.upgrade-banner h2 { margin:0 0 4px; font-size:18px; font-weight:650; letter-spacing:-.3px; }
.upgrade-banner p:last-child { margin:0; color:var(--muted); max-width:640px; }
.upgrade-banner .primary { display:inline-flex; align-items:center; gap:8px; text-decoration:none; flex-shrink:0; }
.upgrade-action { display:flex; flex-direction:column; align-items:center; gap:6px; flex-shrink:0; }
.upgrade-action small { color:var(--muted); font-size:11px; }
@media(max-width:700px) { .upgrade-banner { flex-direction:column; align-items:flex-start; padding:18px; } .upgrade-action { align-items:flex-start; } }
/* Playlist type tabs (0 = team, 1 = studio). */
.playlist-toolbar .tabs { flex-shrink:0; }
@media(max-width:700px) { .playlist-toolbar { flex-wrap:wrap; } .playlist-toolbar .tabs { flex-basis:100%; } }
.playlist-member-all { border-bottom:1px solid var(--line); padding-bottom:12px; margin-bottom:4px; }
/* Filters page: same top spacing as page titles, so Back sits clear of the header line. */
#template-filters-close { margin-top:38px; }
/* Matches, Playlists and Templates toolbars: on wide screens tabs left, search centred,
   count/refresh right. Narrower layouts are unchanged: the wrapper is invisible to them. */
.toolbar-end { display:contents; }
@media (min-width:1000px) {
  .toolbar-end { display:flex; align-items:center; gap:12px; }
  #playlist-count, #template-count { margin-left:0; }
  #library-view .toolbar, #views-view .toolbar, #playlists-view .playlist-toolbar {
    display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,360px) minmax(0,1fr); column-gap:16px;
  }
  #library-view .toolbar .search, #views-view .toolbar .search, #playlists-view .playlist-toolbar .search { margin:0; width:100%; max-width:none; }
  #library-view .toolbar .search input, #views-view .toolbar .search input, #playlists-view .playlist-toolbar .search input { width:100%; min-width:0; }
  #library-view .toolbar .tabs, #views-view .toolbar .tabs, #playlists-view .playlist-toolbar .tabs { justify-self:start; }
  #library-view .toolbar .toolbar-end, #views-view .toolbar .toolbar-end, #playlists-view .playlist-toolbar .toolbar-end { justify-self:end; }
}
/* New match, step 2: which match the player access is for. */
.match-access-recap { border:1px solid var(--line); border-radius:10px; padding:12px 16px; margin-bottom:16px; }
.match-access-recap strong { display:block; overflow-wrap:anywhere; }
.match-access-recap small { color:var(--muted); font-size:12px; }
/* Platform admin views (Stats, Status): panels loaded by manage-platform.js. */
.platform-panel .dashboard-section-title { margin-top:34px; }
.platform-panel .library-box td { padding:12px 16px; }
.platform-panel .library-box td:first-child { min-width:0; }
.platform-panel td small { display:inline; margin:0 0 0 4px; }
.ps-generated, .ps-note { color:var(--muted); font-size:12px; margin:12px 0 0; }
.ps-generated { margin:-14px 0 18px; }
.ps-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; }
.ps-cards > div { border:1px solid var(--line); border-radius:12px; background:var(--panel); padding:18px 20px; min-width:0; }
.ps-cards span { display:block; color:var(--muted); font-size:12px; margin-bottom:8px; }
.ps-cards strong { display:block; font-size:26px; letter-spacing:-1px; font-weight:550; overflow-wrap:anywhere; }
.ps-cards small { display:block; color:var(--muted); font-size:11px; margin-top:6px; }
.ps-trend { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.ps-trend-card { border:1px solid var(--line); border-radius:12px; background:var(--panel); padding:14px 16px; min-width:0; }
.ps-trend-card h3 { font-size:12px; font-weight:550; color:var(--muted); margin:0 0 10px; }
.ps-bars { display:flex; align-items:flex-end; gap:3px; height:72px; }
.ps-bars span { flex:1; min-height:1px; border-radius:2px 2px 0 0; background:var(--accent); opacity:.8; }
.ps-axis { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:10px; margin-top:6px; }
.ps-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.ps-retention th, .ps-retention td { padding-left:8px !important; padding-right:8px !important; }
.ps-plan { display:inline-block; border:1px solid var(--line); border-radius:999px; padding:2px 9px; font-size:11px; color:var(--muted); }
.ps-plan--cloud, .ps-plan--pro { border-color:#4b5d33; color:var(--accent); background:#1d281c; }
.ps-good { color:#8fd694; }
.ps-bad, .ps-bad strong { color:#f19a9a; }
.ps-error { max-width:280px; overflow:hidden; text-overflow:ellipsis; }
.ps-status { --tone:var(--muted); display:flex; align-items:center; gap:16px; border:1px solid var(--line); border-left:3px solid var(--tone); border-radius:12px; background:var(--panel); padding:20px 22px; }
.ps-status strong { font-size:18px; }
.ps-status p { color:var(--muted); margin:4px 0 0; }
.ps-status--live { --tone:#8fd694; }
.ps-status--stale { --tone:#f6c884; }
.ps-status--offline { --tone:#f19a9a; }
.ps-lamp { width:12px; height:12px; flex-shrink:0; border-radius:50%; background:var(--tone); box-shadow:0 0 12px var(--tone); }
.ps-facts { margin-top:20px; padding:4px 24px; }
.ps-facts dl > div:first-child { border-top:0; }
.ps-queue { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:860px) { .ps-two { grid-template-columns:1fr; } }
@media (max-width:700px) { .ps-queue { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* Demo notice (shared demos, Free clubs): same inline link as the plan summary. */
#demo-dialog .dialog-body a { color:var(--accent); text-decoration:underline; text-underline-offset:.2em; }
/* Delete match: playlists that still use the match. */
.delete-usage p { margin:12px 0 6px; }
.delete-usage .muted { color:var(--muted); font-size:12px; }
.delete-usage ul { margin:0; padding-left:20px; }
.delete-usage li { margin:3px 0; overflow-wrap:anywhere; }
/* Uploads queue: status line and Upload all / Stop after this upload. */
.upload-queue-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:20px 0 0; padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:var(--panel); color:var(--muted); font-size:13px; }
.upload-queue-bar[hidden] { display:none; }
.delete-warning { color:#efabb6; font-weight:700; margin-top:-4px; }

/* Template filter editor: toggle chips and the live summary. */
.chip-field.wide { grid-column:1 / -1; }
.chip-row { display:flex; flex-wrap:wrap; gap:6px; }
.chip-toggle { min-height:36px; min-width:40px; padding:7px 12px; border:1px solid #344251; border-radius:999px; background:#0c131b; color:#bdcad7; font:inherit; font-size:12px; cursor:pointer; }
.chip-toggle:hover { border-color:var(--accent); }
.chip-toggle[aria-pressed=true] { background:#283329; border-color:var(--accent); color:#e4f3b6; font-weight:600; }
.filter-summary { position:sticky; top:10px; z-index:5; margin-top:16px; padding:12px 14px; border:1px solid #3e4d5e; border-radius:10px; background:#18232f; box-shadow:0 8px 24px #0b1118cc; font-size:12px; }
.filter-summary strong { color:#bdcad7; font-weight:600; }
.filter-summary .template-conditions { margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
.filter-summary .playlist-notice { margin:6px 0 0; }
#template-dialog.filter-editor { width:min(820px,calc(100vw - 32px)); }
/* Dashboard help boxes (links styled like the workspace cards). */
.help-title { margin-top:34px; }
.help-card { display:flex; text-align:left; align-items:flex-start; gap:16px; border:1px solid var(--line); background:var(--panel); border-radius:12px; padding:22px; min-width:0; color:inherit; text-decoration:none; }
.help-card:hover { border-color:#7b9150; background:#17211f; }
@media (max-width:1100px) { .help-card { padding:18px; gap:12px; } }
/* Playlists: row checkboxes and Delete selected. */
.playlist-pick-cell { display:flex; align-items:center; gap:14px; }
.playlist-pick-cell > div { min-width:0; }
.playlist-pick, #playlist-select-all { flex-shrink:0; width:18px; height:18px; margin:0; accent-color:var(--accent); cursor:pointer; }
#playlist-list tr.picked { background:#1a2420; }
.playlist-delete-list { max-height:220px; overflow-y:auto; margin:10px 0; padding:10px 14px 10px 30px; border:1px solid var(--line); border-radius:8px; background:#0c131b; font-size:13px; }
.playlist-delete-list li + li { margin-top:4px; }
