.exercise-editor-page .page-heading .subtitle:empty { display: none; }
.exercise-editor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) minmax(420px, 3fr);
  align-items: start;
  gap: 16px;
}
.exercise-editor-layout > .panel { min-width: 0; margin: 0; }
.exercise-editor-fields > .field:first-child { margin-top: 0; }
.exercise-editor-media .exercise-image-editor { margin-top: 0; }
.exercise-editor-media { scroll-margin-top: 92px; }
[data-exercise-media-jump] { display: none; }
.exercise-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.exercise-editor-page [role="alert"]:empty { display: none; }
.exercise-drawing { margin-top: 12px; }
.exercise-drawing[hidden] { display: none; }
.tactics-board .tactics-board-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tactics-board .tactics-board-tools .btn {
  min-height: 40px;
  padding: 6px 9px;
}
.tactics-board [data-board-hint] { min-height: 2.8em; margin: 8px 0; }
.tactics-board .tactics-canvas-frame { margin-top: 10px; border-color: #236442; border-radius: 12px; }
.tactics-board .tactics-board-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tactics-board [data-board-status]:empty { display: none; }
.exercise-line-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 9px; }
.exercise-line-colors > span { color: var(--muted); margin-right: 2px; font-size: 13px; }
.exercise-color {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.exercise-color::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #19283a38; background: var(--stroke-color); }
.exercise-color[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.tactics-tool-goal {
  border-radius: 2px;
  border: 2px solid #35556a;
  background: repeating-linear-gradient(90deg, transparent 0 3px, #a8bdcb 3px 4px);
}
.exercise-player-icon { width: 21px; height: 25px; flex: none; }
.exercise-object-controls, .exercise-goal-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.exercise-object-controls[hidden], .exercise-goal-controls[hidden] { display: none; }
.exercise-goal-controls output { font-variant-numeric: tabular-nums; }
.exercise-object-controls button, .exercise-goal-controls button { min-height: 44px; min-width: 52px; }
.tactics-board .tactics-tool-line { height: 2px; background: #35556a; }
@media (max-width: 1050px) {
  .exercise-editor-layout { grid-template-columns: minmax(0, 1fr); }
  [data-exercise-media-jump] { display: inline-flex; }
}
@media (max-width: 600px) {
  .exercise-editor-layout > .panel { padding: 14px; }
  .exercise-editor-actions .btn { flex: 1; text-align: center; }
  .exercise-drawing { scroll-margin-top: 100px; }
  .tactics-board .tactics-board-tools .btn, .tactics-board .tactics-board-actions .btn { min-height: 44px; }
  .exercise-line-colors > span { flex-basis: 100%; }
}

.exercise-object-controls [aria-pressed="true"] { background: #eaf1ff; color: var(--blue); border-color: var(--blue); }
.tactics-board .tactics-tool-select { background: currentColor; clip-path: polygon(8% 0, 94% 59%, 54% 65%, 35% 100%); }
.tactics-board .tactics-canvas-frame canvas[tabindex] { touch-action: none; }
.tactics-board:has([data-board-tool="select"][aria-pressed="true"]) canvas { cursor: grab; }
.tactics-board:has([data-board-tool="select"][aria-pressed="true"]) canvas:active { cursor: grabbing; }
.tactics-board .tactics-board-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

.tactics-canvas-frame.tactics-grass { background: repeating-linear-gradient(to bottom, #2b8052 0 10%, #24734a 10% 20%); }
