:root {
  --navy: #14284b;
  --blue: #2a5d8f;
  --ball: #f2c230;
  --chalk: #f4f6f9;
  --ink: #18202f;
  --muted: #5d6a80;
  --line: #d5dce6;
  --danger: #b3261e;
  --ok: #1f7a4d;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--chalk); color: var(--ink); line-height: 1.5; }
h1 { font-size: 1.9rem; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.25rem; }
a { color: var(--blue); }
.muted, .hint { color: var(--muted); }
:focus-visible { outline: 3px solid var(--ball); outline-offset: 2px; }

/* App layout: sidebar + content */
.shell { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: white; padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar a { color: white; text-decoration: none; }
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.sidebar li a { display: block; padding: 0.5rem 0.75rem; border-radius: 6px; }
.sidebar li a:hover { background: rgba(255, 255, 255, 0.12); }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; border-bottom: 3px solid var(--ball); padding-bottom: 0.75rem; }
.whoami { margin-top: auto; display: grid; gap: 0.4rem; justify-items: start; }
.whoami .name { font-weight: 600; }
.content { padding: 2rem 2.5rem; max-width: 56rem; min-width: 0; }  /* min-width: wide tables scroll instead of stretching the page */

/* Controls */
label { display: grid; gap: 0.3rem; font-weight: 600; margin-bottom: 1rem; }
input, select, textarea { font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
button, .button { font: inherit; cursor: pointer; }
.primary, .button { display: inline-block; background: var(--navy); color: white; border: 0; padding: 0.65rem 1.1rem; border-radius: 6px; font-weight: 700; text-decoration: none; }
.primary:hover, .button:hover { background: var(--blue); }
.link-button { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; }
.sidebar .link-button { color: white; }
.narrow-form { max-width: 24rem; margin-top: 1.5rem; }
.cancel { margin-left: 1rem; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem 1rem 0.25rem; margin: 0 0 1rem; }
legend { font-weight: 600; padding: 0 0.3rem; }
fieldset.choice { display: flex; gap: 1.5rem; padding-bottom: 0.75rem; }
fieldset.choice label { display: flex; align-items: center; gap: 0.4rem; margin: 0; font-weight: 400; }
fieldset .hint { margin: -0.5rem 0 1rem; font-size: 0.9rem; }
.danger.link-button { color: var(--danger); }
.danger-button { background: white; color: var(--danger); border: 1px solid var(--danger); padding: 0.6rem 1rem; border-radius: 6px; font-weight: 700; }
.danger-button:hover { background: var(--danger); color: white; }
.danger-zone { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); max-width: 32rem; }
.copy-field { width: 100%; min-width: 16rem; font-size: 0.85rem; }

/* Tables and badges */
table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: white; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--line); color: var(--ink); }
.badge-admin { background: var(--ball); color: var(--navy); }
.badge-coach { background: var(--blue); color: white; }
th.num, td.num { width: 3.5rem; text-align: center; }
.jersey { display: inline-grid; place-items: center; min-width: 2.1rem; height: 2.1rem; border-radius: 6px; background: var(--navy); color: white; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Videos */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1.25rem; }
.filters a { white-space: nowrap; padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: white; text-decoration: none; color: var(--ink); }
.filters a[aria-current] { background: var(--navy); border-color: var(--navy); color: white; }
.video-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; }
.video-card { display: grid; gap: 0.35rem; justify-items: start; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; height: 100%; }
.video-card:hover { border-color: var(--blue); }
.badge-training { background: #dfe9f5; color: var(--navy); }
.badge-game { background: var(--ball); color: var(--navy); }
.player { margin: 1rem 0; background: black; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; }
.description { white-space: pre-line; }

/* Rotations: courts drawn as a 3x2 grid, net at the top */
.actions { display: flex; align-items: center; gap: 1rem; }
.legend { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.5rem; }
.swatch { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 3px; border: 1px solid var(--line); margin-left: 0.4rem; }
.swatch.front, .zone.front { background: #fff8e1; }
.swatch.back, .zone.back { background: white; }
.swatch.setter { background: white; border: 3px solid var(--blue); }
.rotations { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.25rem; margin: 1rem 0 2rem; }
.rotation h3 { margin: 0; font-size: 1.05rem; }
.rotation .serve { margin: 0 0 0.4rem; font-size: 0.85rem; }
.court-diagram { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--blue); border-radius: 6px; }
.court-diagram .net { grid-column: 1 / -1; text-align: center; color: white; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; border-bottom: 3px solid white; margin-bottom: 2px; }
.court-diagram .zone { position: relative; display: grid; justify-items: center; align-content: center; gap: 0.1rem; min-height: 5.5rem; padding: 1.2rem 0.3rem 0.4rem; border-radius: 4px; text-align: center; margin: 0; font-weight: 400; }
.zone.setter { box-shadow: inset 0 0 0 3px var(--blue); }
.zone-number { position: absolute; top: 0.2rem; left: 0.35rem; font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.zone .jersey { min-width: 1.7rem; height: 1.7rem; font-size: 0.85rem; }
.zone-name { font-weight: 600; font-size: 0.85rem; line-height: 1.2; overflow-wrap: anywhere; }
.zone-pos { font-size: 0.72rem; color: var(--muted); }
.court-diagram.editor { max-width: 36rem; margin: 0.5rem 0 1.5rem; }
.court-diagram.editor .zone { padding-top: 1.5rem; }
.court-diagram.editor select { width: 100%; font-size: 0.85rem; padding: 0.4rem; }

/* Interactive court (static/court.js): half court, net at the top, player icons with role tags */
.court-stage {
  position: relative; aspect-ratio: 1; margin: 1.6rem 0 0.75rem; touch-action: none; user-select: none;
  background: linear-gradient(white, white) 0 33.3% / 100% 2px no-repeat, #d9874a;  /* attack line, 3 m from the net */
  border: 3px solid white; border-top: 7px solid var(--navy); box-shadow: 0 0 0 1px var(--line);
}
.court-stage::before { content: "NET"; position: absolute; top: -1.45rem; left: 50%; transform: translateX(-50%); font-size: 0.7rem; letter-spacing: 0.25em; color: var(--muted); font-weight: 700; }
.token { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; transition: left 0.45s ease, top 0.45s ease; }
.token[tabindex] { cursor: grab; touch-action: none; }
.token.dragging { transition: none; cursor: grabbing; z-index: 2; }
.token-role { font-size: 0.68rem; font-weight: 700; line-height: 1.5; padding: 0 0.45rem; border-radius: 999px; background: white; color: var(--navy); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); white-space: nowrap; }
.token-dot { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid white; background: var(--navy); color: white; font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.token-name { max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; font-weight: 600; color: white; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.token-role:empty, .token-name:empty { display: none; }
.token[data-role="setter"] .token-dot { background: var(--ball); color: var(--navy); }
.token[data-role="middle"] .token-dot { background: #1f7a4d; }
.token[data-role="opposite"] .token-dot { background: #a8402a; }
.token[data-role="ds"] .token-dot { background: #5d6a80; }
.token[data-role="libero"] .token-dot { background: #6b3fa0; }  /* liberos wear a different colour */

/* Lineup page: rotation viewer */
.cycler { max-width: 30rem; margin: 1rem 0 2rem; }
.cycler-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.cycler-status { display: grid; text-align: center; }
label.checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }

/* Video page: court panel that slides in beside the video */
.wide-content .content { max-width: 92rem; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.watch-main { max-width: 56rem; }
.watch-layout.court-open { grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem); }
.court-panel { position: sticky; top: 1rem; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 8px; animation: slide-in 0.25s ease-out; }
.court-panel[hidden] { display: none; }
.court-panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.court-panel-head h2 { margin: 0; }
.court-panel-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.court-panel-controls label { margin: 0; font-size: 0.85rem; }
.court-panel-controls select { width: 100%; padding: 0.4rem; }
/* Video page: notes pinned to a moment in the video */
.notes { margin: 1.5rem 0; }
.notes-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.notes-head h2 { margin: 0; }
.note-form { display: grid; gap: 0.5rem; margin: 0.75rem 0; padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 8px; }
.note-form[hidden] { display: none; }
.note-form label { margin: 0; }
.note-time-label { font-variant-numeric: tabular-nums; color: var(--blue); }
.note-form-actions { display: flex; align-items: center; gap: 1rem; }
.note-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.note-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: start; padding: 0.6rem 0.75rem; background: white; border: 1px solid var(--line); border-radius: 8px; }
.note-time { background: var(--navy); color: white; border: 0; border-radius: 999px; padding: 0.15rem 0.65rem; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.note-time:hover { background: var(--blue); }
.note-body p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.note-body .muted { font-size: 0.8rem; }

.view-toggle { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0.75rem; border: 1px solid var(--navy); border-radius: 6px; overflow: hidden; }
.view-toggle button { background: white; color: var(--navy); border: 0; border-left: 1px solid var(--navy); padding: 0.45rem 0.2rem; font-size: 0.8rem; font-weight: 700; }
.view-toggle button:first-child { border-left: 0; }
.view-toggle.two { grid-template-columns: repeat(2, 1fr); margin-top: 0; min-width: 9rem; }
.libero-controls { display: grid; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.9rem; }
.libero-controls label.checkbox { margin: 0; }
.libero-zone { display: flex; align-items: center; gap: 0.75rem; }
.libero-zone[hidden] { display: none; }
.view-toggle button[aria-pressed="true"] { background: var(--navy); color: white; }
.view-hint { min-height: 4.5em; margin: 0.5rem 0 0; font-size: 0.8rem; }
@keyframes slide-in { from { transform: translateX(2rem); opacity: 0; } }
@media (max-width: 1000px) {
  .watch-layout.court-open { grid-template-columns: minmax(0, 1fr); }
  .court-panel { position: static; max-width: 30rem; }
}

/* Chat: conversation list on the left, messages on the right */
.chat { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.25rem; height: calc(100vh - 4rem); min-height: 28rem; }
.chat-side { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
.chat-side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.chat-side-head h2 { margin: 0; }
.new-chat { position: relative; }
.new-chat summary { list-style: none; }
.new-chat summary::-webkit-details-marker { display: none; }
.new-chat-menu { position: absolute; right: 0; z-index: 3; width: 16rem; max-height: 22rem; overflow-y: auto; padding: 0.5rem 0.9rem; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.new-chat-menu .hint { margin: 0.25rem 0 0.5rem; font-size: 0.85rem; }
.new-chat-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.new-chat-menu form { display: flex; align-items: center; gap: 0.4rem; }
.chat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; align-content: start; overflow-y: auto; }
.chat-link { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.chat-link:hover { background: white; }
.chat-link[aria-current] { background: var(--navy); color: white; }
.chat-list .team .chat-link-title { font-weight: 700; }
.chat-link-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--ball); color: var(--navy); font-size: 0.75rem; font-weight: 800; }
.count[hidden] { display: none; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: white; border: 1px solid var(--line); border-radius: 8px; }
.chat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
.chat-head h1 { font-size: 1.3rem; margin: 0; }
.chat-toggle { display: none; }
.pin-banner { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.6rem 1rem; background: #fff8e1; border-bottom: 1px solid var(--line); }
.pin-banner[hidden] { display: none; }
.pin-label { font-weight: 700; white-space: nowrap; }
.pin-text { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 6rem; overflow-y: auto; }
.messages { flex: 1; overflow-y: auto; padding: 0.75rem 1rem; }
.load-older { display: block; margin: 0 auto 0.75rem; }
.load-older[hidden], .empty[hidden] { display: none; }
.message-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.message { justify-self: start; max-width: min(36rem, 85%); padding: 0.45rem 0.75rem; border-radius: 10px; background: var(--chalk); }
.message.mine { justify-self: end; background: #dfe9f5; }
.message-meta { font-size: 0.8rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.3rem; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.pin-button { font-size: 0.75rem; opacity: 0; }
.message:hover .pin-button, .pin-button:focus-visible { opacity: 1; }
@media (hover: none) { .pin-button { opacity: 1; } }
.composer { display: flex; gap: 0.6rem; align-items: end; padding: 0.75rem 1rem 0; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: vertical; min-height: 2.8rem; max-height: 12rem; }
.composer button:disabled { opacity: 0.6; cursor: wait; }
.composer-error { min-height: 1.5rem; margin: 0.2rem 1rem 0.4rem; color: var(--danger); font-size: 0.85rem; }

/* Flash messages */
.flashes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.flash { padding: 0.6rem 0.85rem; border-radius: 6px; border-left: 5px solid; background: white; }
.flash.error { border-color: var(--danger); }
.flash.ok { border-color: var(--ok); }

/* Login / setup / signup: a card on a volleyball court */
body.auth { background: var(--blue); display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.court {
  position: fixed; inset: 5vh 5vw; border: 3px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)) center / 3px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) 33.3% 0 / 2px 100% no-repeat,
    linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,.3)) 66.6% 0 / 2px 100% no-repeat;
}
.auth-card { position: relative; width: min(26rem, 100%); background: var(--chalk); padding: 2rem; border-radius: 10px; border-top: 6px solid var(--ball); }
.auth-card .primary { width: 100%; }

@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
  .brand { border: 0; padding: 0; }
  .sidebar ul { display: flex; flex-wrap: wrap; }
  .whoami { margin: 0 0 0 auto; justify-items: end; }
  .content { padding: 1.25rem; }
  .chat { display: flex; flex-direction: column; gap: 0.75rem; height: calc(100dvh - 2.5rem); }
  .chat-main { flex: 1; }
  .chat-side { display: none; }
  .chat.list-open .chat-side { display: flex; max-height: 40vh; }
  .chat-toggle { display: inline; width: 100%; text-align: left; }
}
@media print {
  .no-print { display: none !important; }
  .shell { display: block; }
  body, .content { background: white; padding: 0; max-width: none; }
  .rotations { grid-template-columns: repeat(3, 1fr); }
  .rotation { break-inside: avoid; }
  .court-diagram, .zone { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Statistics: set scores, stat tables, the MVP reveal */
.table-scroll { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
.table-scroll table { margin: 0; }
table.stats th, table.stats td { padding: 0.45rem 0.5rem; white-space: nowrap; }
table.stats .stat { text-align: center; font-variant-numeric: tabular-nums; }
table.stats .stat.key { font-weight: 700; background: #f7f9fc; }
table.stats tfoot th, table.stats tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
table.stats .player-cell { position: sticky; left: 0; background: white; z-index: 1; }
table.stats thead a { color: inherit; text-decoration: none; }
table.stats th.sorted a { color: var(--navy); text-decoration: underline; }
table.stats abbr { text-decoration: none; cursor: help; }
.stats-entry input { width: 3.4rem; padding: 0.3rem; text-align: center; }
.stats-entry input[aria-invalid="true"] { border-color: var(--danger); background: #fdeceb; }
.jersey.small { min-width: 1.6rem; height: 1.6rem; font-size: 0.8rem; margin-right: 0.3rem; }
.set-scores { list-style: none; margin: 0.75rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.set-scores li { display: grid; justify-items: center; padding: 0.35rem 0.8rem; border-radius: 8px; background: white; border: 1px solid var(--line); border-top: 4px solid var(--muted); }
.set-scores li.won { border-top-color: var(--ok); }
.set-scores li.lost { border-top-color: var(--danger); }
.set-scores strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.set-label { font-size: 0.75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.result { display: inline-block; vertical-align: middle; font-size: 0.85rem; font-weight: 700; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--line); }
.result.won { background: #dcefe4; color: var(--ok); }
.result.lost { background: #fdeceb; color: var(--danger); }
details.mvp { margin: 1rem 0; max-width: 34rem; }
details.mvp > summary { display: inline-block; cursor: pointer; list-style: none; background: var(--ball); color: var(--navy); font-weight: 800; padding: 0.6rem 1.1rem; border-radius: 6px; }
details.mvp > summary::-webkit-details-marker { display: none; }
details.mvp[open] > summary { margin-bottom: 0.75rem; }
details.mvp.highlight:not([open]) > summary { animation: mvp-pulse 1.2s ease-in-out 3; }
@keyframes mvp-pulse { 50% { box-shadow: 0 0 0 6px rgba(242, 194, 48, 0.45); } }
.mvp-card { display: grid; gap: 0.15rem; padding: 1rem 1.25rem; background: var(--navy); color: white; border-radius: 10px; border-left: 6px solid var(--ball); }
.mvp-card .muted { color: #c9d3e3; margin: 0.25rem 0 0; }
.mvp-label { font-size: 0.75rem; letter-spacing: 0.25em; font-weight: 800; color: var(--ball); }
.mvp-name { font-size: 1.4rem; }
.mvp-card .jersey { background: var(--ball); color: var(--navy); }
.mvp-score { font-weight: 600; }
.set-best { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.25rem; }
.mvp-inline summary { cursor: pointer; color: var(--blue); }
.mvp-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--ball); color: var(--navy); font-weight: 800; }
.match-summary { margin: 1.5rem 0; padding: 1rem 1.25rem; background: white; border: 1px solid var(--line); border-radius: 8px; }
.match-summary h2 { margin: 0; }
.top-scorers { margin: 0.5rem 0; padding-left: 1.4rem; display: grid; gap: 0.3rem; }
.team-line { margin: 0.25rem 0; font-size: 0.9rem; }
.played-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.25rem 1rem; }
.played-list label.checkbox { margin: 0; }
.set-score-form { max-width: 20rem; margin: 0 0 0.75rem; }
.set-score-form input { width: 5rem; }
.edit-sets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.25rem; }
.legend-box { margin-top: 1.5rem; font-size: 0.9rem; }
.legend-box summary { cursor: pointer; color: var(--blue); }
.legend-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 1rem; margin: 0.5rem 0; }
.legend-box dt { font-weight: 700; }
.legend-box dd { margin: 0; }
