:root {
  --background: #f6f5f4;
  --foreground: #131211;
  --card: #fff;
  --primary: #e65e2d;
  --primary-dark: #c54d22;
  --muted: #efedeb;
  --muted-foreground: #6f6a66;
  --border: #c5c1be;
  --ring: #ff8605;
  --court-edge: #0b5d6e;
  --court-front: #d4703f;
  --court-back: #eb934f;
  --shadow-sm: 0 1px 2px rgb(19 18 17 / 6%), 0 2px 10px rgb(19 18 17 / 3%);
  --shadow-lg: 0 18px 50px rgb(19 18 17 / 18%);
  color-scheme: light;
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--foreground);
  background:
    radial-gradient(circle at 52% 27%, rgb(255 255 255 / 92%) 0 18rem, transparent 37rem),
    var(--background);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

svg {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  border-bottom: 1px solid transparent;
  background: rgb(246 245 244 / 78%);
  backdrop-filter: blur(14px) saturate(140%);
}

.header-inner,
.title-row,
.simulator,
.explain,
.footer-inner {
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--foreground);
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  margin-right: 11px;
}

.brand-mark path {
  fill: none;
  stroke: rgb(255 255 255 / 72%);
  stroke-width: 4;
  stroke-linecap: round;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: 150ms ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.mobile-menu {
  display: none !important;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-top: 26px;
  padding-bottom: 8px;
}

h1,
.dialog h2 {
  margin: 0;
  font-family: "Crimson Pro", ui-serif, Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(40px, 4.2vw, 50px);
  line-height: 1;
}

.document-name {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-size {
  color: var(--muted-foreground);
  font: 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.button,
.icon-button,
.small-action {
  border: 1px solid transparent;
  background: transparent;
  color: var(--foreground);
  transition: 150ms ease;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button.secondary {
  border-color: rgb(197 193 190 / 72%);
  background: rgb(255 255 255 / 70%);
  color: var(--foreground);
}

.button.secondary:hover {
  border-color: var(--border);
  background: #fff;
}

.button.compact {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border-radius: 7px;
}

.icon-button:hover,
.icon-button[aria-pressed="true"] {
  background: var(--muted);
}

.icon-button[aria-pressed="true"] {
  color: var(--primary);
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.small {
  width: 32px;
  height: 32px;
}

.small-action {
  padding: 4px 7px;
  border-radius: 5px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.small-action:hover {
  background: rgb(230 94 45 / 9%);
}

.simulator {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 224px;
  align-items: start;
  gap: 32px;
  margin-top: 22px;
  margin-bottom: 110px;
}

.panel {
  overflow: hidden;
  border: 1px solid rgb(197 193 190 / 52%);
  border-radius: 12px;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.panel-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}

.panel-toolbar select {
  width: 150px;
  height: 30px;
  padding: 4px 28px 4px 9px;
  border: 1px solid rgb(197 193 190 / 66%);
  border-radius: 6px;
  background: rgb(246 245 244 / 65%);
  color: var(--foreground);
  font-size: 12px;
}

.toolbar-actions {
  display: flex;
  gap: 2px;
}

.players-collapse {
  display: none;
}

.players-content {
  padding: 8px 12px 12px;
  border-top: 1px solid rgb(197 193 190 / 28%);
}

.panel-heading-row,
.settings-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-heading-row {
  min-height: 34px;
}

.panel h2,
.settings-section h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.player-list {
  display: grid;
  gap: 2px;
}

.player-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}

.player-row:hover {
  background: rgb(239 237 235 / 70%);
}

.player-row.inactive {
  opacity: 0.78;
}

.player-dot {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgb(19 18 17 / 16%);
}

.player-row-copy {
  min-width: 0;
  flex: 1;
}

.player-row-name,
.player-row-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-row-name {
  font-size: 12px;
  font-weight: 500;
}

.player-row-role {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.player-zone {
  min-width: 15px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.bench-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgb(197 193 190 / 45%);
}

.eyebrow {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.empty-list {
  padding: 12px 6px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.court-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.court-shell {
  position: relative;
  width: 100%;
  max-width: min(100%, max(320px, calc(100svh - 350px)));
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(11 93 110 / 12%);
  touch-action: none;
  user-select: none;
}

.court {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.court-border-area { fill: var(--court-edge); }
.front-court { fill: var(--court-front); }
.back-court { fill: var(--court-back); }

.zone-grid {
  opacity: 0.25;
  stroke: #fff;
  stroke-width: 0.4;
  stroke-dasharray: 2 2;
}

.zone-grid line:last-child { stroke-width: 0.5; stroke-dasharray: none; }
.attack-line { stroke: #fff; stroke-width: 0.75; }
.court-outline { fill: none; stroke: #fff; stroke-width: 0.75; }

.zone-numbers text {
  fill: rgb(255 255 255 / 55%);
  font: 600 14px "Schibsted Grotesk", sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}

.net rect:first-child,
.net circle { fill: #1a1a1a; }
.net .antenna rect { fill: #dc2626; }

.players-layer,
.annotations-layer,
.overlap-layer {
  position: absolute;
  inset: 0;
}

.overlap-layer {
  z-index: 7;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.overlap-layer line {
  stroke: rgb(255 255 255 / 84%);
  stroke-width: 1.15;
  stroke-dasharray: 2.4 2.2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 1px rgb(19 18 17 / 35%));
}

.overlap-layer line.invalid {
  stroke: #dc2626;
  stroke-width: 1.55;
  stroke-dasharray: none;
}

.overlap-layer circle {
  fill: var(--primary);
  stroke: #fff;
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.annotations-layer {
  z-index: 8;
  pointer-events: none;
}

.players-layer {
  z-index: 10;
}

.court-shell.annotation-active {
  cursor: crosshair;
}

.court-shell.annotation-active .players-layer {
  pointer-events: none;
}

.court-hint {
  position: absolute;
  z-index: 20;
  top: 13px;
  left: 50%;
  padding: 6px 10px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  background: rgb(19 18 17 / 63%);
  color: #fff;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: 200ms ease;
}

.court-shell:hover .court-hint,
.court-shell.annotation-active .court-hint {
  opacity: 1;
  transform: translate(-50%, 0);
}

.court-player {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  cursor: grab;
  transform: translate(-50%, -50%);
  transition: left 280ms ease, top 280ms ease, filter 150ms ease;
}

.court-player.dragging {
  z-index: 30;
  cursor: grabbing;
  filter: drop-shadow(0 9px 10px rgb(19 18 17 / 26%));
  transition: none;
}

.court-player:hover .court-player-dot {
  transform: scale(1.03);
}

.court-player-dot {
  display: grid;
  width: clamp(44px, 9vw, 60px);
  height: clamp(44px, 9vw, 60px);
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: clamp(10px, 2vw, 14px);
  font-weight: 700;
  box-shadow: 0 5px 14px rgb(19 18 17 / 23%);
  transition: transform 150ms ease;
}

.court-player-name {
  max-width: 90px;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 62%);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.court-label {
  position: absolute;
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 999px;
  background: rgb(19 18 17 / 75%);
  color: #fff;
  font-size: clamp(8px, 1.4vw, 11px);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 9px rgb(19 18 17 / 16%);
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.court-label[data-color="1"] { background: rgb(230 94 45 / 90%); }
.court-label[data-color="2"] { background: rgb(0 77 214 / 88%); }
.court-label[data-color="3"] { background: rgb(10 140 64 / 90%); }
.court-label[data-color="4"] { background: rgb(124 58 237 / 90%); }

.annotation-active .court-label {
  outline: 2px dashed rgb(255 255 255 / 72%);
  cursor: pointer;
}

.rotation-nav {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 2px;
  padding: 4px 6px 4px 4px;
  border: 1px solid rgb(197 193 190 / 52%);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.rotation-buttons {
  display: flex;
  max-width: min(44vw, 300px);
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rotation-buttons::-webkit-scrollbar { display: none; }

.rotation-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
}

.rotation-button:hover { background: var(--muted); color: var(--foreground); }
.rotation-button.active { background: var(--primary); color: #fff; }
.vertical-rule { width: 1px; height: 20px; margin: 0 3px; background: rgb(197 193 190 / 62%); }
.play-button { color: var(--primary); }
.pause-icon { display: none !important; fill: currentColor !important; stroke: none !important; }
.play-button.playing .play-icon { display: none; }
.play-button.playing .pause-icon { display: block !important; }
.play-icon { fill: currentColor !important; stroke: none !important; }

.rotation-caption {
  min-height: 16px;
  margin-top: -7px;
  color: var(--muted-foreground);
  font-size: 11px;
}

.phases-panel {
  position: sticky;
  top: 80px;
  display: flex;
  max-height: calc(100svh - 96px);
  flex-direction: column;
}

.phases-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgb(197 193 190 / 50%);
}

.phase-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.phase-title-row > div { display: flex; }

.mode-switch {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgb(239 237 235 / 64%);
}

.mode-switch button {
  flex: 1;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.mode-switch button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.phase-list {
  display: grid;
  min-height: 80px;
  margin: 0;
  padding: 12px;
  gap: 3px;
  overflow-y: auto;
  list-style: none;
}

.phase-item {
  display: flex;
  min-width: 0;
  align-items: center;
  border-radius: 8px;
  color: var(--muted-foreground);
}

.phase-item:hover { background: rgb(239 237 235 / 54%); color: var(--foreground); }
.phase-item.active { background: var(--primary); color: #fff; }

.phase-select {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  text-align: left;
}

.phase-number {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.phase-item.active .phase-number { background: rgb(255 255 255 / 20%); }
.phase-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.phase-options {
  position: relative;
  margin-right: 4px;
}

.phase-options summary {
  display: grid;
  width: 26px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: inherit;
  font-size: 16px;
  opacity: 0;
  cursor: pointer;
  list-style: none;
}

.phase-options summary::-webkit-details-marker { display: none; }
.phase-item:hover .phase-options summary,
.phase-item.active .phase-options summary,
.phase-options[open] summary { opacity: 0.8; }
.phase-options summary:hover { background: rgb(255 255 255 / 18%); }

.phase-option-menu {
  position: absolute;
  z-index: 40;
  top: 30px;
  right: 0;
  display: grid;
  width: 104px;
  padding: 4px;
  border: 1px solid rgb(197 193 190 / 62%);
  border-radius: 8px;
  background: #fff;
  color: var(--foreground);
  box-shadow: 0 10px 26px rgb(19 18 17 / 16%);
}

.phase-option-menu button {
  padding: 7px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  text-align: left;
}

.phase-option-menu button:hover { background: var(--muted); }
.phase-option-menu button.danger { color: #a93b2f; }

.phase-actions {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-top: 1px solid rgb(197 193 190 / 40%);
}

.explain {
  padding: 10px 0 96px;
}

.section-kicker {
  margin: 0 0 20px;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 500;
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.explain article {
  min-height: 185px;
  padding: 24px;
  border: 1px solid rgb(197 193 190 / 50%);
  border-radius: 12px;
  background: rgb(255 255 255 / 56%);
}

.explain article > span {
  color: var(--primary);
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.explain h2 {
  margin: 34px 0 7px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}

.explain p:not(.section-kicker) {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 32px;
  padding: 30px 0 40px;
}

.footer-brand { font-size: 22px; }
.footer-brand .brand-mark { width: 32px; height: 32px; }
.footer-inner p { margin: 0; color: var(--muted-foreground); font-size: 12px; }
.footer-note { text-align: right; }

.dialog {
  width: min(92vw, 760px);
  max-height: min(86vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--foreground);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgb(19 18 17 / 40%);
  backdrop-filter: blur(4px);
}

.dialog-card {
  display: flex;
  max-height: min(86vh, 760px);
  flex-direction: column;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 16px;
  background: var(--background);
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  background: rgb(255 255 255 / 68%);
}

.dialog-header { border-bottom: 1px solid rgb(197 193 190 / 42%); }
.dialog-footer { justify-content: flex-end; border-top: 1px solid rgb(197 193 190 / 42%); }
.dialog-footer.split { justify-content: space-between; }
.dialog h2 { margin-top: 2px; font-size: 29px; }
.dialog-scroll { display: grid; gap: 22px; padding: 20px; overflow-y: auto; }

.field {
  display: grid;
  gap: 6px;
}

.field > span,
.editor-field > span {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.editor-field input,
.editor-field select {
  width: 100%;
  height: 38px;
  padding: 7px 10px;
  border: 1px solid rgb(197 193 190 / 72%);
  border-radius: 7px;
  background: #fff;
  color: var(--foreground);
  font-size: 13px;
}

.settings-section {
  display: grid;
  gap: 10px;
}

.settings-section h3 { margin-top: 2px; font-size: 17px; }
.libero-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settings-hint { margin: 0; color: var(--muted-foreground); font-size: 11px; line-height: 1.5; }
.libero-note { padding: 10px; border-radius: 8px; background: #fff; color: var(--muted-foreground); font-size: 12px; }
.editor-list { display: grid; gap: 8px; }

.player-editor {
  display: grid;
  grid-template-columns: 48px 0.7fr 68px 1.3fr 1.25fr 34px;
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgb(197 193 190 / 48%);
  border-radius: 10px;
  background: rgb(255 255 255 / 58%);
}

.editor-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.color-input {
  width: 40px !important;
  padding: 3px !important;
}

.remove-editor {
  width: 34px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #a93b2f;
  font-size: 18px;
}

.remove-editor:hover { background: rgb(169 59 47 / 8%); }

.rotation-editor {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgb(197 193 190 / 46%);
  border-radius: 9px;
  background: rgb(255 255 255 / 58%);
}

.rotation-editor > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.rotation-editor input {
  min-width: 0;
  height: 34px;
  padding: 6px 9px;
  border: 1px solid rgb(197 193 190 / 70%);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.rotation-editor button {
  height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 11px;
}

.rotation-editor button:hover { background: var(--muted); color: var(--foreground); }
.rotation-editor button.danger { color: #a93b2f; }
.mini-dialog { width: min(92vw, 430px); }
.mini-dialog .dialog-card { max-height: none; }

.quiz-dialog { width: min(94vw, 680px); }
.quiz-content { justify-items: center; gap: 12px; }
.quiz-settings { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quiz-question { width: 100%; font-size: 14px; line-height: 1.5; }
.quiz-question strong { color: var(--primary-dark); }
.quiz-court { position: relative; width: min(100%, 420px); aspect-ratio: 1; overflow: hidden; border-radius: 10px; cursor: crosshair; touch-action: manipulation; }
.quiz-court > div, .quiz-court svg { width: 100%; height: 100%; }
.quiz-crosshair, .quiz-answer, .quiz-correct { position: absolute; width: 22px; height: 22px; border: 3px solid white; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 2px 8px rgb(0 0 0 / 35%); }
.quiz-crosshair { background: rgb(19 18 17 / 45%); }
.quiz-answer { background: #dc2626; }
.quiz-answer.right, .quiz-correct { background: #15803d; }
.quiz-feedback, .quiz-note { width: 100%; margin: 0; color: var(--muted-foreground); font-size: 12px; line-height: 1.5; }
.quiz-feedback { min-height: 18px; color: var(--foreground); font-weight: 600; }
.quiz-score { color: var(--muted-foreground); font-size: 11px; }
.quiz-footer-actions { display: flex; gap: 8px; }

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 14px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 9px;
  background: #24211f;
  color: #fff;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1199px) {
  .simulator {
    grid-template-columns: minmax(0, 1fr) 224px;
    gap: 24px;
  }

  .players-panel { grid-column: 1 / -1; }
  .players-collapse { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 8px 12px; border: 0; border-top: 1px solid rgb(197 193 190 / 30%); background: transparent; color: var(--muted-foreground); font-size: 12px; font-weight: 600; }
  .players-collapse svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
  .players-collapse[aria-expanded="false"] svg { transform: rotate(-90deg); }
  .players-content.collapsed { display: none; }
  .players-content { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; }
  .panel-heading-row { align-self: start; gap: 8px; }
  .players-content > .player-list { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .bench-block { margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid rgb(197 193 190 / 45%); }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .mobile-menu { display: inline-grid !important; }
  .title-row { align-items: flex-start; flex-direction: column; padding-top: 18px; }
  .title-actions { width: 100%; justify-content: space-between; }
  .simulator { grid-template-columns: 1fr; gap: 16px; margin-top: 14px; margin-bottom: 70px; }
  .players-panel,
  .court-column,
  .phases-panel { grid-column: 1; }
  .court-column { grid-row: 2; }
  .phases-panel { position: static; max-height: none; }
  .players-content { display: block; }
  .players-content > .player-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench-block { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid rgb(197 193 190 / 45%); border-left: 0; }
  .bench-block .player-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .court-shell { max-width: 620px; }
  .phase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explain-grid { grid-template-columns: 1fr; }
  .explain article { min-height: 150px; }
  .footer-inner { grid-template-columns: 1fr; gap: 12px; }
  .footer-note { text-align: left; }
  .player-editor { grid-template-columns: 48px 1fr 34px; }
  .player-editor .zone-field,
  .player-editor .name-field,
  .player-editor .role-field { grid-column: 1 / -1; }
  .player-editor .remove-editor { grid-column: 3; grid-row: 1; }
}

@media (max-width: 480px) {
  .header-inner,
  .title-row,
  .simulator,
  .explain,
  .footer-inner { width: min(100% - 22px, 1280px); }
  .brand { font-size: 22px; }
  .brand-mark { width: 32px; height: 32px; }
  h1 { font-size: 38px; }
  .button { padding-inline: 12px; }
  .players-content > .player-list,
  .bench-block .player-list { grid-template-columns: 1fr; }
  .court-player-dot { width: 43px; height: 43px; border-width: 2px; }
  .court-player-name { max-width: 68px; padding-inline: 6px; font-size: 8px; }
  .rotation-buttons { max-width: 43vw; }
  .phase-list { grid-template-columns: 1fr; }
  .player-editor { grid-template-columns: 46px 1fr 34px; }
  .rotation-editor { grid-template-columns: 28px 1fr auto; }
  .rotation-editor .danger { grid-column: 3; }
  .rotation-editor .duplicate-rotation { display: none; }
  .quiz-settings { grid-template-columns: 1fr; }
  .libero-fields { grid-template-columns: 1fr; }
  .quiz-dialog .dialog-footer { align-items: flex-start; gap: 8px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
