#tactics { display:grid; gap:20px; color:#162039; }
#tactics h2, #tactics h3 { margin:0; }
#tactics p { margin:8px 0; }
.family-announcement-banner.tactics-overview-banner { color:#293b69; border-color:#cbd7f3; background:linear-gradient(110deg,#f4f7ff,#e6edfc); }
.tactics-overview-banner .family-announcement-visual { color:#3655a0; border-color:#cbd7f3; }
.tactics-overview-banner .family-announcement-copy .eyebrow { color:#4862a3; }
.tactics-overview-banner .family-announcement-actions .btn { color:#253f7b; border-color:#cbd7f3; }
.tactics-overview-banner .family-announcement-actions .text-btn { color:#3655a0; }
.tactics-overview-banner .family-announcement-facts time { font-weight:700; }
.tactics-assignment:focus { outline:2px solid #82a3f5; outline-offset:3px; }
.tactics-hero {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:24px; align-items:center;
  padding:clamp(20px,4vw,34px); border-radius:20px; color:#fff;
  background:radial-gradient(ellipse at 91% -20%,#3678f6 0%,transparent 50%),linear-gradient(110deg,#183c9e,#1254e9);
}
.tactics-hero h2 { font-size:clamp(25px,4vw,36px); line-height:1.13; letter-spacing:-.035em; }
.tactics-hero p { color:#e3edff; }
.tactics-kicker { display:block; text-transform:uppercase; font-size:12px; font-weight:800; letter-spacing:.12em; margin-bottom:10px; color:#dbedff; }
.tactics-hero-stat { display:grid; gap:3px; padding:12px 19px; border-radius:14px; background:#ffffff21; min-width:120px; }
.tactics-hero-stat strong { font-size:30px; font-variant-numeric:tabular-nums; }
.tactics-hero-stat span { font-size:13px; color:#eaf1ff; }
.tactics-tabs,.tactics-progress,.tactics-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.tactics-message:empty { display:none; }
#tactics .tactics-message { color:#854a11; font-weight:650; }
.tactics-coach-grid { display:grid; grid-template-columns:minmax(230px,1fr) minmax(0,1.75fr); gap:18px; align-items:start; }
.tactics-panel { min-width:0; padding:clamp(16px,3vw,28px); }
.tactics-section-title,.tactics-assignment { display:flex; align-items:flex-start; gap:18px; justify-content:space-between; }
.tactics-list-item {
  width:100%; background:#f5f7fc; border:1px solid transparent; border-radius:12px; color:inherit;
  margin-top:12px; padding:13px 14px; display:grid; gap:4px; text-align:left; cursor:pointer; font:inherit;
}
.tactics-list-item.active { border-color:#b2caff; background:#eaf1ff; }
.tactics-list-item span,.tactics-result > span,.tactics-bank-row summary span { font-size:13px; color:#586981; }
.tactics-result-list { margin-top:10px; }
.tactics-result,.tactics-bank-row,.tactics-review { padding:13px 0; border-top:1px solid #e5eaf3; }
.tactics-result { display:grid; gap:9px; }
.tactics-result-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 14px; }
.tactics-attempt-metrics { display:flex; flex-wrap:wrap; gap:8px 18px; margin:0; }
.tactics-attempt-metrics > div { display:flex; align-items:center; gap:5px; font-size:13px; min-height:24px; }
.tactics-attempt-metrics dt { color:#586981; }
.tactics-attempt-metrics dd { margin:0; font-weight:700; font-variant-numeric:tabular-nums; }
.tactics-review-count {
  min-width:30px; min-height:28px; padding:2px 7px; border:1px solid #cbd6e6; border-radius:7px;
  background:#f1f5fb; color:#204c9f; font:inherit; font-weight:700; cursor:pointer;
}
.tactics-review-count.incorrect { background:#fff0e9; border-color:#f2cfc0; color:#923d26; }
.tactics-review-count:hover { border-color:currentColor; text-decoration:underline; }
.tactics-statistics-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr); gap:12px; margin:16px 0; }
.tactics-statistics-filters .field { margin:0; min-width:0; }
.tactics-statistics-filters select { text-overflow:ellipsis; }
.tactics-statistics-table { overflow:auto; margin-top:14px; }
.tactics-statistics-table table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; font-size:14px; }
.tactics-statistics-table :is(th,td) { padding:11px 10px; text-align:center; white-space:normal; border-bottom:1px solid #e5eaf3; }
.tactics-statistics-table th:first-child { min-width:145px; text-align:left; }
.tactics-statistics-table thead th { background:#f2f6fc; color:#475c7a; line-height:1.3; }
.tactics-statistics-table tbody tr:hover { background:#f8faff; }
.tactics-tag { display:inline-block; padding:5px 9px; border-radius:7px; background:#eaf1ff; color:#2451a1; font-size:13px; font-weight:700; }
.tactics-tag.green,.tactics-answered { color:#176647; background:#e6f4ed; }
.tactics-tag.amber { color:#834b00; background:#fff0d9; }
.tactics-tag.neutral { color:#526079; background:#edf0f5; }
.tactics-bank-row summary { cursor:pointer; }
.tactics-bank-row summary span { margin-left:5px; }
.tactics-bank-row summary strong { display:block; margin:5px 0 0 17px; }
.tactics-issue,.tactics-question { max-width:800px; width:100%; }
.tactics-issue form { margin-top:18px; }
.tactics-assignment { align-items:center; }
.tactics-assignment h2,.tactics-question h2 { padding:9px 0 3px; }
.tactics-question h2 { font-size:clamp(20px,3vw,27px); }
.tactics-options { display:grid; gap:9px; margin:17px 0; }
.tactics-options button {
  width:100%; display:flex; align-items:center; gap:12px; text-align:left; cursor:pointer;
  background:#f6f8fc; color:#162039; font:inherit; padding:11px 13px; border:1px solid #dbe4f2; border-radius:10px;
}
.tactics-options button span { display:grid; place-items:center; background:#e6ecf7; border-radius:6px; min-width:31px; height:31px; font-weight:750; }
.tactics-options button[aria-pressed=true] { border-color:#2b62dc; background:#e9f0ff; }
.tactics-options button[aria-pressed=true] span { background:#1c55da; color:white; }
.tactics-question-footer { justify-content:flex-end; }
#tactics > .text-btn { justify-self:start; }
@media(max-width:960px) {
  .tactics-coach-grid {grid-template-columns:1fr;}
  .tactics-statistics-filters {grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);}
  .tactics-statistics-table :is(th,td) {padding:9px 6px;}
  .tactics-statistics-table th:first-child {min-width:102px;}
}
@media(max-width:620px) {
  .tactics-statistics-filters { grid-template-columns:minmax(0,1fr); }
  .tactics-assignment,.tactics-section-title {display:grid;gap:10px;}
  .tactics-hero {grid-template-columns:1fr;gap:12px;}
  .tactics-hero-stat {justify-self:start;}
}
.tactics-form-grid { align-items:end; }
.tactics-fieldset { border:1px solid #dce5f3; border-radius:12px; margin:14px 0; padding:12px 15px; min-width:0; }
.tactics-fieldset legend,.tactics-fieldset summary { font-size:14px; font-weight:750; }
.tactics-fieldset summary { cursor:pointer; margin-bottom:8px; }
#tactics select {
  min-width:0;
  min-height:44px;
  appearance:none;
  padding:10px 35px 10px 11px;
  background:
    linear-gradient(45deg, transparent 50%, #526079 50%) calc(100% - 17px) center / 5px 5px no-repeat,
    linear-gradient(135deg, #526079 50%, transparent 50%) calc(100% - 12px) center / 5px 5px no-repeat,
    #fff;
  font:inherit;
}
@media (forced-colors:active) {
  #tactics select { appearance:auto; padding-inline-end:11px; background:Canvas; }
}
#tactics input:is([type=radio],[type=checkbox]) {
  width:18px; height:18px; margin:0; flex:none; accent-color:var(--blue); cursor:pointer;
}
.tactics-recipient-modes { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr)); gap:8px; }
.tactics-recipient-modes label,.tactics-background-options label,.tactics-correct-option {
  display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 12px;
  border:1px solid var(--line); border-radius:8px; font-size:14px; cursor:pointer;
}
.tactics-recipient-modes label:has(:checked),.tactics-background-options label:has(:checked),.tactics-correct-option:has(:checked) {
  border-color:#a8bff9; background:#edf3ff;
}
.tactics-correct-option { justify-content:center; padding-inline:9px; align-self:end; margin-bottom:8px; }
.tactics-recipient-panel { min-width:0; margin:10px 0 0; padding:0; border:0; }
.tactics-recipient-panel .field { margin:0; }
.tactics-topic-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); column-gap:16px; }
.tactics-fixed-list { display:grid; align-content:start; max-height:280px; overflow:auto; }
#tactics .check-row { flex-wrap:nowrap; min-height:44px; padding:9px 6px; cursor:pointer; }
#tactics .check-row:hover { background:#f6f8fc; }
#tactics .check-row:has(:checked) { background:#edf3ff; }
#tactics .tactics-toggle { justify-self:start; border:0; padding-inline:11px; border-radius:8px; }
#tactics .tactics-recipient-row { display:grid; grid-template-columns:18px 34px minmax(0,1fr) minmax(0,auto); align-items:center; }
.tactics-recipient-row .avatar-small { width:34px; height:34px; }
.tactics-recipient-row > small { text-align:right; max-width:40ch; overflow-wrap:anywhere; }
#tactics .tactics-question-row { align-items:flex-start; }
#tactics [hidden] { display:none; }
.tactics-question-row small,.tactics-preview li small { display:block; margin-top:4px; color:#586981; }
@media(max-width:620px) {
  #tactics .tactics-recipient-row { grid-template-columns:18px 34px minmax(0,1fr); row-gap:2px; }
  .tactics-recipient-row :is(input,.player-avatar) { grid-row:1 / span 2; }
  .tactics-recipient-row > small { grid-column:3; text-align:left; max-width:none; }
}
.tactics-issue-actions { margin-top:18px; }
.tactics-preview { margin-top:18px; padding:16px; border:1px solid #cbdcf9; border-radius:13px; background:#f6f9ff; }
.tactics-preview-person { padding:9px 0; border-top:1px solid #dce5f3; }
.tactics-preview-person summary { cursor:pointer; font-weight:650; }
.tactics-preview-person li { margin:9px 0; }

.tactics-bank-heading { margin-bottom:12px; }
.tactics-bank-filters { align-items:end; gap:8px 12px; margin-bottom:14px; }
.tactics-bank-filter.field { margin:0; min-width:86px; max-width:100%; }
.tactics-bank-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:start; }
.tactics-bank-row-actions { justify-content:flex-end; }
.tactics-delete { color:#9b3030; }
.tactics-template-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr)); gap:13px; margin-top:16px; }
.tactics-template-card { padding:16px; border:1px solid #dce5f3; border-radius:12px; background:#f8faff; }
.tactics-template-card .tactics-actions { margin-top:10px; }
.tactics-review-topic { border:1px solid #dce5f3; border-radius:11px; margin-top:10px; }
.tactics-review-topic summary { padding:10px 12px; cursor:pointer; }
.tactics-review-topic summary span { color:#586981; font-size:13px; margin-left:8px; }
.tactics-review-topic .tactics-review { padding:12px; }
.tactics-review { display:grid; gap:9px; overflow-wrap:anywhere; }
#tactics .tactics-review > .subtitle { margin:0; }
#tactics .tactics-review h3 { font-size:clamp(17px,3vw,20px); line-height:1.35; }
.tactics-all-answers { margin:14px 0 0; padding-inline-start:26px; }
.tactics-all-answers li::marker { color:#536885; font-weight:700; }
.tactics-option-edit { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; align-items:center; }
.tactics-option-edit label.field { margin:2px 0 8px; }
@media(max-width:620px) {
  .tactics-bank-row { grid-template-columns:minmax(0,1fr); gap:8px; }
  .tactics-bank-row-actions { justify-content:flex-start; }
}
.tactics-topic-add,.tactics-topic-list form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; }
.tactics-topic-list { margin-top:16px; }
.tactics-topic-list form { grid-template-columns:minmax(0,1fr) auto auto; align-items:center; border-top:1px solid #e5eaf3; padding:9px 0; margin:0; }
.tactics-topic-add .field,.tactics-topic-list .field { margin:0; }
.tactics-topic-list .subtitle { font-size:13px; }
@media(max-width:470px) {
  .tactics-topic-list form { grid-template-columns:minmax(0,1fr) auto; }
  .tactics-topic-list .subtitle { grid-row:2; }
}

.tactics-question-image {
  display:block; max-width:100%; max-height:360px; object-fit:contain;
  margin:10px 0; border:1px solid var(--line); border-radius:8px;
}
.tactics-editor-image small { color:var(--muted); font-weight:400; }
.tactics-editor-image .tactics-question-image { max-height:135px; }
.tactics-editor-image input[type=file]::file-selector-button,
.tactics-background-file input::file-selector-button {
  padding:6px 10px; margin-inline-end:9px; border:1px solid var(--line);
  border-radius:6px; background:#edf3ff; color:var(--ink); font:inherit; cursor:pointer;
}
.tactics-board { margin:12px 0; }
.tactics-canvas-frame {
  display:grid; aspect-ratio:3 / 2; border:1px solid #cbd8ec; border-radius:10px;
  background:#f3f5f8; overflow:hidden;
}
.tactics-canvas-frame :is(img,canvas) { grid-area:1 / 1; display:block; width:100%; height:100%; min-width:0; min-height:0; }
.tactics-canvas-frame img { object-fit:contain; pointer-events:none; }
.tactics-canvas-frame canvas { position:relative; }
.tactics-canvas-frame canvas[tabindex] { touch-action:manipulation; cursor:crosshair; }
.tactics-canvas-frame canvas:focus-visible { outline-offset:-3px; }
.tactics-board-actions { margin-top:9px; }
.tactics-review .tactics-board { max-width:560px; }

.tactics-background-options {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr)); gap:8px;
}
.tactics-background-file { margin-bottom:0; }
.tactics-background-actions { margin-top:8px; }
.tactics-board-tools .btn {
  display:inline-flex; align-items:center; gap:7px;
}
.tactics-board-tools .btn[aria-pressed=true] {
  color:#17428a; background:#edf3ff; border-color:#8baaf1;
}
.tactics-board-key {
  display:flex; gap:8px 14px; flex-wrap:wrap; margin-top:9px;
  color:var(--muted); font-size:13px;
}
.tactics-board-key > span { display:inline-flex; align-items:center; gap:6px; }
.tactics-tool-icon {
  position:relative; display:inline-block; width:16px; height:16px; flex:0 0 16px;
}
.tactics-tool-teammate,.tactics-tool-opponent,.tactics-tool-ball {
  border:2px solid #fff; border-radius:50%; box-shadow:0 0 0 1px #8696b0;
}
.tactics-tool-teammate { background:#164bbf; }
.tactics-tool-opponent { background:#ae2637; }
.tactics-tool-ball { background:#fff; border-color:#1c293a; box-shadow:none; }
.tactics-tool-ball::after {
  content:""; position:absolute; inset:2px; background:#1c293a;
  clip-path:polygon(50% 0,100% 36%,81% 100%,19% 100%,0 36%);
}
.tactics-tool-movement { color:#164bbf; }
.tactics-tool-pass { color:#79440e; }
.tactics-tool-movement::before,.tactics-tool-pass::before {
  content:""; position:absolute; inset:7px 1px auto 0; border-top:2px solid currentColor;
}
.tactics-tool-pass::before { border-top-style:dashed; }
.tactics-tool-movement::after,.tactics-tool-pass::after {
  content:""; position:absolute; right:1px; top:5px; width:6px; height:6px;
  border-top:2px solid currentColor; border-right:2px solid currentColor; transform:rotate(45deg);
}

.tactics-age-warnings { margin:16px 0; padding:0; list-style:none; }
.tactics-age-warnings li { padding:10px 12px; border-left:3px solid #d8a25d; background:#fff9ef; overflow-wrap:anywhere; }
.tactics-age-warnings li+li { margin-top:8px; }
.tactics-age-warnings span { display:block; color:var(--muted); font-size:13px; }

.tactics-player-review {
  display:grid; gap:14px; width:100%; max-width:900px;
}
.tactics-player-review-card {
  display:grid; gap:10px; min-width:0; padding:clamp(14px,3vw,22px);
  overflow-wrap:anywhere;
}
#tactics .tactics-player-review-card h3 {
  margin-bottom:4px; font-size:clamp(17px,3vw,20px); line-height:1.35;
}
.tactics-player-review-note {
  background:var(--review-bg,#f1f4fa); border-radius:8px;
  border-inline-start:3px solid var(--review-edge,#aab8cf); padding:10px 12px;
}
.tactics-player-review-note[data-tone=correct] {
  --review-bg:#eaf5ef; --review-edge:#399367; --review-label:#205d42;
}
.tactics-player-review-note[data-tone=incorrect] {
  --review-bg:#fff2e8; --review-edge:#c47943; --review-label:#803e21;
}
.tactics-player-review-note[data-tone=tip] {
  --review-bg:#edf3ff; --review-edge:#7299ea; --review-label:#2451a1;
}
.tactics-player-review-label {
  display:flex; align-items:center; gap:6px; color:var(--review-label,#4c5e79);
  font-size:13px; line-height:1.35;
}
.tactics-player-review-label .icon { width:16px; height:16px; flex:none; }
#tactics .tactics-player-review-note p { margin:4px 0 0; white-space:pre-wrap; }
.tactics-player-review-card :is(.tactics-board,.tactics-question-image) {
  max-width:min(100%,560px); margin:0;
}

.tactics-question-layout {
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(0,3fr);
  align-items:start;
  gap:16px;
}
.tactics-question-layout > .panel { margin:0; }
.tactics-question-layout .form-grid > .field,
.tactics-question-layout > .panel > .tactics-fieldset:first-of-type { margin-top:0; }
.tactics-question-actions { justify-content:flex-end; margin-top:16px; }
@media (max-width:1100px) {
  .tactics-question-layout { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px) {
  .tactics-question-layout .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tactics-question-actions .btn { flex:1; text-align:center; white-space:normal; }
}
