﻿:root {
  color-scheme: light;
  --background: #f4f4f1;
  --surface: #fff;
  --ink: #252923;
  --muted: #686f65;
  --line: #dedfd8;
  --accent: #e6bd59;
  --focus: #477858;
  --green: #356b48;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--ink); font: 14px/1.5 'Segoe UI', Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, .import-button { min-height: 38px; border: 1px solid #cfd3c9; border-radius: 4px; background: var(--surface); color: var(--ink); padding: 8px 14px; cursor: pointer; font-weight: 600; line-height: 1.35; }
button:hover, .import-button:hover { background: #eff1eb; border-color: #b7beaf; }
button:disabled, input:disabled, select:disabled { opacity: .6; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .table-scroll:focus-visible, .import-button:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #345941; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.2; font-weight: 650; letter-spacing: -.65px; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 650; letter-spacing: -.1px; }
h3 { font-size: 15px; }
p { color: var(--muted); }
button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.primary { color: #fff; background: #30382d; border-color: #30382d; }
.primary:hover { background: #47553f; border-color: #47553f; }
.secondary { background: #fff; }
.full { width: 100%; }
.hint, .form-note, .fieldset-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip-link:focus { top: 8px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .navigation, main { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
.header-inner { min-height: 72px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-size: 21px; font-weight: 750; letter-spacing: -.7px; }
.brand img { display: block; flex-shrink: 0; }
.header-divider { width: 1px; height: 20px; background: var(--line); }
.panel-label { font-size: 13px; color: var(--muted); }
.identity { margin-left: auto; display: flex; gap: 24px; align-items: center; min-width: 0; }
.connection { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.connection i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.connection.pending i { background: #999f94; }
.connection.offline i { background: #ad693d; }
.profile-button { display: inline-flex; gap: 10px; align-items: center; border: 0; background: transparent; min-width: 0; min-height: 36px; padding: 6px 0 6px 8px; font-size: 13px; }
.profile-button:hover { background: transparent; color: var(--green); }
#player-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.navigation-wrap { border-bottom: 1px solid var(--line); background: #fff; }
.navigation { min-height: 48px; display: flex; align-items: stretch; gap: 24px; }
.nav { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); padding: 12px 1px 11px; font-size: 13px; min-height: 48px; }
.nav:hover { background: transparent; border-color: #d9ddcf; color: var(--ink); }
.nav.active { color: var(--ink); border-bottom-color: var(--accent); }
.navigation-note { display: flex; align-items: center; margin-left: auto; color: #777e70; font-size: 11px; }
main { padding-top: 32px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-heading > button { display: inline-flex; align-items: center; gap: 7px; }
.page-kicker { font-size: 10px; font-weight: 600; letter-spacing: 1px; color: #777e70; margin-bottom: 9px; }
.page-description { margin: 10px 0 27px; font-size: 14px; }
.status-summary { display: grid; grid-template-columns: repeat(4,1fr); margin: 0 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.status-summary > div { padding: 0 28px; border-right: 1px solid var(--line); }
.status-summary > div:first-child { padding-left: 0; }
.status-summary > div:last-child { border: 0; }
.status-summary dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.status-summary dd { margin: 0; font-size: 27px; font-weight: 550; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.overview-layout { display: grid; grid-template-columns: minmax(0,2.15fr) minmax(280px,1fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; min-width: 0; }
.panel-heading { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-heading .hint { text-align: right; }
.panel-body { padding: 22px; }
.panel-footnote { padding: 15px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.table-scroll { position: relative; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th { padding: 11px 18px; color: var(--muted); font-size: 11px; font-weight: 600; background: #f9faf6; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 17px 18px; vertical-align: middle; border-bottom: 1px solid #eaede5; }
tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { padding-left: 22px; }
td:last-child, th:last-child { padding-right: 22px; }
td b, .row-title { display: block; font-weight: 600; overflow-wrap: anywhere; }
td small, .row-subtitle { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.host-table td:first-child { width: 42%; }
.host-table td { font-variant-numeric: tabular-nums; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cddbc7; border-radius: 3px; background: #f3f7f0; color: #356039; padding: 3px 7px; font-size: 11px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.status-tag.neutral, .status-tag.offline, .tag-neutral { background: #f4f4f1; color: #6a7064; border-color: #dce0d5; }
.status-tag.warning, .status-tag.retiring, .status-tag.retargeting { background: #fff8ea; border-color: #ead9b2; color: #80662f; }
.status-tag.error { background: #fff0ed; border-color: #e8cdc5; color: #994837; }
.empty-state { padding: 38px 22px; color: var(--muted); text-align: left; }
.empty-state p { font-size: 13px; }
.empty-state .hint { margin-top: 6px; }
label { display: block; font-size: 12px; font-weight: 600; }
input, select, textarea { display: block; width: 100%; min-width: 0; border: 1px solid #cfd3c9; border-radius: 3px; background: #fff; color: var(--ink); padding: 9px 11px; margin-top: 7px; font-size: 14px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #898f82; opacity: 1; }
input[readonly] { background: #f8f9f5; color: #58624f; }
textarea { resize: vertical; min-height: 112px; font: 12px/1.65 Consolas,'Courier New',monospace; tab-size: 2; }
.copy-field { display: flex; align-items: stretch; gap: 7px; margin-top: 7px; }
.copy-field input { margin: 0; font: 12px/1.5 Consolas,'Courier New',monospace; }
.copy-field button { font-size: 12px; padding: 8px 11px; }
.setup-steps { margin: 22px 0 24px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.setup-steps li { padding-left: 4px; margin-bottom: 12px; }
.setup-steps li:last-child { margin-bottom: 0; }
.setup-steps strong { font-weight: 600; color: var(--ink); }
.account-layout { display: grid; grid-template-columns: minmax(0,480px) minmax(230px,340px); gap: 48px; align-items: start; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 22px; gap: 22px; }
.auth-tabs button { color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 16px 0 14px; font-size: 13px; }
.auth-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.auth-tabs button:hover { color: var(--ink); }
.form-stack { display: flex; flex-direction: column; gap: 19px; }
.form-stack > button:not(.full) { align-self: flex-start; }
.form-stack .hint { margin-top: -11px; }
.form-note { margin-top: 16px; }
.form-stack .form-note { margin-top: -7px; }
summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #58624f; }
.setup-key { border-top: 1px solid var(--line); padding-top: 15px; }
.setup-key[open] label { margin: 15px 0 8px; }
.account-help { padding-top: 17px; }
.account-help p { font-size: 13px; margin-top: 15px; line-height: 1.7; }
.account-help a { display: inline-block; margin-top: 18px; font-size: 12px; }
.account-details { margin: 0 0 24px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.account-details dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.account-details dd { margin: 0; overflow-wrap: anywhere; }
.account-actions { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.playlist-list { margin-bottom: 24px; }
.bot-settings { margin-bottom: 24px; }
.checkbox-field { display: flex; align-items: center; gap: 10px; }
.checkbox-field input { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; accent-color: var(--accent); }
#bot-settings-status { font-size: 13px; color: var(--muted); }
#bot-skill-matches td { font-variant-numeric: tabular-nums; }
#admin-panel .panel-body { max-width: 920px; }
#admin-playlists td:first-child { width: 32%; }
#admin-playlists button { min-height: 30px; padding: 5px 11px; font-size: 12px; }
#admin-panel table { min-width: 620px; }
.template-field { max-width: 390px; margin-bottom: 26px; }
fieldset { margin: 0 0 27px; padding: 19px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
legend { font-weight: 650; font-size: 13px; padding: 0 12px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 24px; }
.span-2 { grid-column: span 2; }
.fieldset-note { margin: -4px 0 18px; }
#playlist-items-help { margin-top: 10px; overflow-wrap: anywhere; }
code { font: 12px/1.6 Consolas,'Courier New',monospace; }
.item-reference { margin-top: 14px; }
#playlist-item-list { max-height: 260px; overflow-y: auto; margin-top: 14px; font-size: 12px; }
#playlist-item-list > div, #playlist-item-list p { padding: 6px 0; border-bottom: 1px solid #edf0e7; overflow-wrap: anywhere; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.import-button { position: relative; display: inline-flex; align-items: center; font-size: 14px; }
.import-button input { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#notice { padding: 12px 16px; border: 1px solid #c7d8bd; background: #f3f8ee; border-radius: 4px; color: #345d37; font-size: 13px; margin-bottom: 24px; overflow-wrap: anywhere; }
#notice.error, #notice[data-type="error"] { border-color: #e2c5ba; background: #fff3ee; color: #943f2c; }
footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 21px 0 28px; margin-top: 54px; font-size: 11px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.credits-page { width: min(700px,calc(100% - 48px)); margin: 56px auto; background: #fff; padding: 34px; border: 1px solid var(--line); border-radius: 5px; }
.credits-page .brand { margin-bottom: 30px; }
.credits-page h1 { margin-bottom: 20px; }
.credits-page h2 { margin: 27px 0 12px; }
.credits-page p { margin-bottom: 15px; }
.credits-page .back-link { display: inline-block; margin-top: 15px; font-size: 13px; }
@media(max-width: 1000px) {
  .header-inner, .navigation, main { width: calc(100% - 48px); }
  .overview-layout { grid-template-columns: minmax(0,1fr) minmax(250px,.75fr); gap: 18px; }
  th, td { padding-left: 13px; padding-right: 13px; }
  .host-table td:first-child { width: 37%; }
  .panel-heading, .panel-body { padding-left: 18px; padding-right: 18px; }
}
@media(max-width: 760px) {
  .overview-layout { grid-template-columns: 1fr; }
  .setup-panel .panel-body { display: block; }
  .account-layout { grid-template-columns: minmax(0,480px); gap: 23px; }
  .account-help { max-width: 440px; padding-top: 0; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-summary > div { padding: 0 16px; }
  .panel-label, .header-divider { display: none; }
}
@media(max-width: 480px) {
  .header-inner, .navigation, main { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; gap: 10px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .identity { gap: 10px; }
  .profile-button { padding-left: 0; gap: 4px; }
  #player-name { max-width: 76px; }
  .connection { font-size: 11px; }
  .connection i { width: 5px; height: 5px; }
  .profile-button svg { display: none; }
  .navigation { gap: 22px; }
  .navigation-note { display: none; }
  main { padding-top: 25px; }
  h1 { font-size: 26px; }
  .page-heading { gap: 10px; }
  .page-heading > button { padding: 8px 11px; font-size: 12px; }
  .page-heading > button svg { display: none; }
  .page-description { margin-bottom: 23px; font-size: 13px; }
  .status-summary { grid-template-columns: repeat(2,1fr); gap: 18px 0; padding: 18px 0; }
  .status-summary > div { padding: 0 18px; }
  .status-summary > div:nth-child(odd) { padding-left: 0; }
  .status-summary > div:nth-child(even) { border: 0; }
  .status-summary dd { font-size: 25px; }
  .status-summary dt { font-size: 11px; }
  .host-table { min-width: 430px; }
  .panel-heading { padding: 16px; min-height: 56px; align-items: flex-start; }
  .panel-heading .hint { max-width: 140px; font-size: 11px; }
  .panel-body { padding: 19px 16px; }
  .panel-footnote { padding: 13px 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .span-2 { grid-column: auto; }
  .form-actions { gap: 9px; }
  .form-actions button, .import-button { font-size: 12px; padding: 8px 12px; }
  .auth-tabs { padding: 0 16px; }
  footer { margin-top: 37px; font-size: 10px; padding: 19px 0 23px; }
  .credits-page { margin: 25px auto; padding: 25px 22px; }
}
@media(prefers-reduced-motion: no-preference) { button, a, .import-button { transition: background-color .12s,color .12s,border-color .12s; } }
.tournament-toolbar { display:flex; align-items:flex-end; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.tournament-toolbar > label { flex:1 1 220px; min-width:0; }
.tournament-panel h3 { margin:0 0 12px; font-size:16px; }
.tournament-panel p { overflow-wrap:anywhere; }
.tournament-lifecycle { border-top:1px solid var(--line); margin-top:24px; padding-top:22px; }
.tournament-lifecycle .checkbox-field { margin:18px 0 10px; }
.tournament-rounds { display:grid; gap:10px; margin-top:20px; }
.tournament-rounds > div { border-left:3px solid var(--line); padding:7px 12px; overflow-wrap:anywhere; }
.tournament-rounds p { margin:5px 0 0; }
.tournament-standings { min-width:580px; }
.tournament-observers { border-top:1px solid var(--line); }
.tournament-observer-list { display:grid; gap:8px; margin-top:16px; }
.tournament-observer-list > div { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; border-bottom:1px solid var(--line); padding:9px 0; }
.tournament-observer-list code { overflow-wrap:anywhere; }
