:root {
  --bg: #f6f2f2; --panel: #ffffff; --fg: #231718; --muted: #6f5f60; --line: #e3d6d7;
  --accent: #8e1418; --accent-fg: #ffffff; --warn-bg: #fff1d6; --warn-fg: #6d4a00; --ok-bg: #e4f3e6; --ok-fg: #1f5b2a; --field: #fbf8f8;
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171112; --panel: #221a1b; --fg: #f3e9e9; --muted: #b7a5a6; --line: #3a2d2e;
    --accent: #e0464b; --accent-fg: #1a0d0e; --warn-bg: #3b2c0f; --warn-fg: #ffd68a; --ok-bg: #16301b; --ok-fg: #9fe0ad; --field: #1b1415; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
[hidden] { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 20px; padding-block: 24px 48px; }
header.top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
header.top img { width: 52px; height: 52px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 34px; letter-spacing: .5px; line-height: 1; margin: 0; text-transform: uppercase; }
header.top p { margin: 4px 0 0; color: var(--muted); }
h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: .6px; text-transform: uppercase; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.toolbar label { flex: 1 1 260px; }
.toolbar label.narrow { flex: 0 0 90px; }
.tabs { display: flex; gap: 6px; margin-left: auto; }
.tabs button[aria-selected="false"] { background: transparent; color: var(--accent); }
label { font-weight: 600; font-size: 14px; letter-spacing: .3px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
label small { font-weight: 400; color: var(--muted); letter-spacing: 0; }
select, input, textarea { font: inherit; color: var(--fg); background: var(--field); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 92px; line-height: 1.35; }
#squads { min-height: 420px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; font-weight: 600; letter-spacing: .3px; cursor: pointer; border-radius: 6px; padding: 9px 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); }
button.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
.status { min-height: 1.2em; font-size: 14px; color: var(--muted); margin: 10px 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 460px); gap: 24px; align-items: start; }
.teams-layout { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
@media (max-width: 900px) { .layout, .teams-layout { grid-template-columns: minmax(0, 1fr); } .preview { order: -1; } }
.forms { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 14px; margin: 0; flex: 1 1 320px; }
.team, .card-ish { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.team h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: .5px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.team h3 small { font-family: var(--font-body); font-size: 14px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.chip { align-self: flex-start; font-size: 13px; border-radius: 4px; padding: 3px 8px; background: var(--warn-bg); color: var(--warn-fg); font-weight: 600; }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.grid-score { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-perf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (max-width: 560px) { .grid-perf { grid-template-columns: minmax(0, 1fr); } }
.preview { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .preview { position: static; } }
.shot { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; overflow: hidden; background: #2a0507; border: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; display: block; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card h3 small { font-family: var(--font-body); font-size: 13px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.empty { border: 1px dashed var(--line); border-radius: 10px; padding: 28px; color: var(--muted); text-align: center; }
