:root {
  color-scheme: light;
  --ink: #18202b;
  --muted: #64748b;
  --line: #d8e0ea;
  --panel: #ffffff;
  --bg: #f5f7fb;
  --accent: #2459d6;
  --court: #f4c96a;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
.site-header { display: flex; justify-content: space-between; gap: 1rem; align-items: end; padding: 1.25rem clamp(1rem, 4vw, 3rem); background: #10213d; color: white; }
h1, h2, h3, p { margin-top: 0; }
.eyebrow { color: #9fb4d6; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.layout { display: grid; grid-template-columns: minmax(18rem, 26rem) 1fr; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; box-shadow: 0 10px 24px rgb(15 23 42 / .06); }
.hint, .note, .bench { color: var(--muted); }
.label-palette { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 .5rem; }
.label-chip { border: 1px solid var(--line); border-radius: 499.5px; padding: .35rem .75rem; background: #eef4ff; color: #244a91; cursor: grab; }
.label-boys { background: #e8f1ff; color: #17488d; }
.label-girls { background: #fff0f7; color: #9a2862; }
.label-out { background: #f1f5f9; color: #475569; }
.player-list { display: grid; gap: .5rem; margin: 1rem 0; }
.player-card { padding: .75rem; border: 1px solid var(--line); border-radius: .375rem; background: #fbfdff; cursor: grab; }
.player-card:first-child::before { content: "Starts P1 / server"; display: block; color: var(--accent); font-size: .75rem; margin-bottom: .25rem; }
.player-card-header { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.player-labels { display: flex; gap: .25rem; flex-wrap: wrap; justify-content: end; }
.player-label { border-radius: 499.5px; padding: .1rem .45rem; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.group-label { background: #e7efff; color: #244a91; }
.out-label { background: #e2e8f0; color: #334155; }
.player-card.group-girls .group-label { background: #ffe4f0; color: #9a2862; }
.player-card.is-out { opacity: .55; background: #f8fafc; }
.player-card.is-out strong { text-decoration: line-through; }
.player-card.label-drop-target { outline: 3px solid rgb(36 89 214 / .35); outline-offset: 2px; }
.tag { margin-left: .5rem; border-radius: 499.5px; padding: .1rem .45rem; background: #e7efff; color: #244a91; font-size: .75rem; }
dl { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 0; }
dl div { display: flex; gap: .2rem; align-items: center; padding: .15rem .35rem; background: #edf2f7; border-radius: .2rem; }
dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; }
dd { margin: 0; font-weight: 700; }
.controls { display: grid; gap: .75rem; }
label { display: grid; gap: .25rem; font-weight: 700; }
select, input, button { font: inherit; border-radius: .25rem; border: 1px solid var(--line); padding: .55rem .65rem; }
button { border: 0; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }
.rotations { display: grid; gap: 1rem; align-content: start; }
.rotation-card { border: 1px solid var(--line); border-radius: .425rem; padding: 1rem; }
.court { position: relative; display: grid; grid-template-columns: repeat(3, minmax(7rem, 1fr)); gap: .5rem; padding: .75rem .75rem 1.2rem; border-radius: .425rem .425rem 0 0; background: var(--court); }
.court::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .45rem; background: repeating-linear-gradient(90deg, #c91f2e 0 .45rem, #d7dce2 .45rem 1.35rem, #c91f2e 1.35rem 1.8rem); }
.court::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .45rem; background: linear-gradient(90deg, #c91f2e 0 .45rem, transparent .45rem calc(100% - .45rem), #c91f2e calc(100% - .45rem)); z-index: 1; pointer-events: none; }
.court-pos { min-height: 5rem; border: 2px solid rgb(130 83 20 / .35); border-radius: .325rem; background: rgb(255 255 255 / .65); padding: .5rem; display: grid; align-content: start; }
.server-pos { border-color: #c91f2e; background: #fff7d6; box-shadow: inset 0 0 0 3px rgb(201 31 46 / .16); }
.position { color: #7c4a03; font-weight: 900; font-size: .75rem; }
.drag-ghost { opacity: .35; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } .site-header { align-items: start; flex-direction: column; } }
