:root {
  --bg: #0b2223;
  --surface: #0f2d2d;
  --surface-2: #123536;
  --surface-3: #163f3e;
  --chalk: #f2efe2;
  --muted: #a9bdb6;
  --dim: #7c9690;
  --line: rgba(242, 239, 226, 0.14);
  --line-strong: rgba(242, 239, 226, 0.3);
  --ball: #d9f24b;
  --ball-soft: rgba(217, 242, 75, 0.16);
  --ball-faint: rgba(217, 242, 75, 0.07);
  --sky: #9adbd5;
  --clay: #e7986a;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --ink: #071817;
  --font-display: "Noto Serif SC", "STZhongsong", "Songti SC", "SimSun", Georgia, serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  --font-data: "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(154, 219, 213, 0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(217, 242, 75, 0.05), transparent 55%);
  z-index: -1;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ball);
  outline-offset: 3px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  height: 66px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 34, 35, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand-ball {
  position: relative;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ball);
  box-shadow: inset -2px -2px 0 rgba(7, 24, 23, 0.18);
}

.brand-ball::after {
  content: "";
  position: absolute;
  inset: 2px -1px;
  border: 1.5px solid var(--ink);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-28deg);
  opacity: 0.55;
}

.brand-name {
  font-family: var(--font-data);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}

.status-chip.live {
  color: var(--sky);
}

.status-chip.live::before {
  background: var(--sky);
  box-shadow: 0 0 0 4px rgba(154, 219, 213, 0.12);
}

.text-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--chalk);
  font-size: 13px;
  transition: color 140ms ease, border-color 140ms ease;
}

.text-button:hover {
  color: var(--ball);
  border-color: var(--ball);
}

/* ---------- shared ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.view {
  min-height: calc(100vh - 66px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sky);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--ball);
  border-radius: 2px;
  background: var(--ball);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.primary-button:hover:not(:disabled) {
  background: transparent;
  color: var(--ball);
}

.primary-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > span {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select {
  width: 100%;
  height: 38px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--chalk);
  outline: none;
  transition: border-color 140ms ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 8px) 17px, calc(100% - 3px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input::placeholder {
  color: var(--dim);
}

.field input:focus,
.field select:focus {
  border-color: var(--ball);
}

/* ---------- upload hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.85fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  padding: clamp(48px, 8vh, 96px) 0 56px;
}

.hero-copy {
  animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(48px, 6.4vw, 82px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.015em;
}

.lede {
  max-width: 46ch;
  margin: 0 0 38px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.process {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 540px;
}

.process li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.process li:last-child {
  border-bottom: 1px solid var(--line);
}

.process-num {
  padding-top: 2px;
  color: var(--ball);
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.process strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
  font-weight: 600;
}

.process p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
}

.upload-card {
  position: relative;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(18, 53, 54, 0.92), rgba(15, 45, 45, 0.96));
  animation: rise 600ms 90ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.court-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.17;
}

.court-lines rect,
.court-lines line {
  fill: none;
  stroke: var(--chalk);
  stroke-width: 1;
}

.upload-form {
  position: relative;
  padding: 26px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 190px;
  margin-bottom: 24px;
  border: 1px dashed rgba(242, 239, 226, 0.34);
  background: rgba(7, 24, 23, 0.25);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--ball);
  background: var(--ball-faint);
}

.dropzone.has-file {
  border-style: solid;
  border-color: rgba(217, 242, 75, 0.5);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ball);
  font-size: 20px;
  font-family: var(--font-data);
}

.drop-title {
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}

.drop-hint {
  color: var(--dim);
  font-size: 12px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-bottom: 26px;
}

.field-wide {
  grid-column: 1 / -1;
}

.upload-form .primary-button {
  width: 100%;
}

.upload-note {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.6;
}

.capture-tips {
  padding: 30px 0 70px;
  border-top: 1px solid var(--line);
}

.capture-tips h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}

.tips-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.tips-row p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
}

.tips-row strong {
  display: block;
  margin-bottom: 3px;
  color: var(--chalk);
  font-weight: 600;
}

/* ---------- progress ---------- */

#progressView {
  display: grid;
  place-items: center;
  padding: 60px 0;
}

.progress-panel {
  width: min(680px, 100%);
  padding: 48px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.progress-panel h1 {
  margin: 0 0 34px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
}

.progress-track {
  height: 4px;
  background: rgba(242, 239, 226, 0.12);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--ball);
  transition: width 400ms ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 14px 0 36px;
  color: var(--dim);
  font-size: 12px;
}

#progressPct {
  color: var(--chalk);
  font-family: var(--font-data);
  font-size: 18px;
}

/* ---------- report ---------- */

.view#reportView {
  padding: 42px 0 80px;
}

.report-head {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.75fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.report-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.18;
}

.report-overall {
  max-width: 66ch;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: var(--dim);
  font-size: 12px;
}

.meta-item {
  padding: 0 14px;
  border-left: 1px solid var(--line);
}

.meta-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.meta-item strong {
  color: var(--chalk);
  font-weight: 500;
}

.match-card {
  padding: 24px 26px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.score-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.score-value {
  font-family: var(--font-data);
  font-size: clamp(58px, 6vw, 78px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.score-denom {
  color: var(--dim);
  font-family: var(--font-data);
  font-size: 18px;
}

.score-caption {
  margin-left: auto;
  color: var(--dim);
  font-size: 11px;
}

.level-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0 18px;
}

.level-ntrp {
  font-family: var(--font-data);
  font-size: 22px;
}

.level-label {
  color: var(--muted);
  font-size: 12px;
}

.dimension-bars {
  display: grid;
  gap: 11px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 84px 1fr 32px;
  gap: 12px;
  align-items: center;
  font-size: 11px;
}

.dimension-row > span:first-child {
  color: var(--muted);
}

.dimension-track {
  height: 6px;
  background: rgba(242, 239, 226, 0.1);
  overflow: hidden;
}

.dimension-fill {
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--ball);
}

.dimension-row > span:last-child {
  color: var(--chalk);
  font-family: var(--font-data);
  text-align: right;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
  gap: 34px;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.video-column {
  min-width: 0;
}

.notice {
  margin: 30px 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(236, 131, 90, 0.45);
  background: rgba(236, 131, 90, 0.06);
}

.notice strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
}

.notice p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.notice ul {
  margin: 0;
  padding-left: 18px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.8;
}

.video-shell {
  border: 1px solid var(--line-strong);
  background: #061414;
}

.video-shell video {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: #061414;
}

.video-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
}

.video-actions a {
  color: var(--sky);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 219, 213, 0.4);
}

.video-actions a:hover {
  color: var(--ball);
  border-color: var(--ball);
}

.video-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: var(--dim);
  font-size: 13px;
}

.shot-timeline {
  position: relative;
  min-height: 74px;
  margin-top: 18px;
  padding: 0 6px;
}

.timeline-line {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 36px;
  height: 2px;
  background: rgba(242, 239, 226, 0.28);
}

.timeline-marker {
  position: absolute;
  top: 24px;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  padding: 0;
  border: 0;
  background: transparent;
}

.timeline-marker::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--ball);
  transition: transform 120ms ease;
}

.timeline-marker:hover::before,
.timeline-marker:focus-visible::before,
.timeline-marker.active::before {
  transform: scale(1.55);
}

.timeline-marker .marker-label {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--chalk);
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.timeline-marker:hover .marker-label,
.timeline-marker:focus-visible .marker-label,
.timeline-marker.active .marker-label {
  opacity: 1;
}

.timeline-caption {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 10px;
}

.shot-index h2,
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
}

.shot-index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.shot-index-head p {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
}

.shot-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 480px;
  overflow: auto;
}

.shot-item {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: background 120ms ease;
}

.shot-item:hover {
  background: rgba(242, 239, 226, 0.04);
}

.shot-item.active {
  box-shadow: inset 2px 0 0 var(--ball);
}

.shot-time {
  color: var(--chalk);
  font-family: var(--font-data);
  font-size: 12px;
}

.shot-type {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 13px;
}

.shot-type small {
  color: var(--dim);
  font-size: 10px;
}

.shot-score {
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 12px;
}

.section-block {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-head p {
  max-width: 46ch;
  margin: 0;
  color: var(--dim);
  font-size: 12px;
}

.issue-list {
  display: grid;
  gap: 0;
}

.issue {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.issue:last-child {
  border-bottom: 1px solid var(--line);
}

.issue-priority {
  color: var(--ball);
  font-family: var(--font-data);
  font-size: 34px;
  line-height: 1;
}

.issue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.issue-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
}

.issue-stroke {
  color: var(--sky);
  font-size: 12px;
}

.severity {
  padding: 1px 7px;
  border: 1px solid currentColor;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.severity.high {
  color: var(--critical);
}

.severity.medium {
  color: var(--warning);
}

.severity.low {
  color: var(--sky);
}

.issue-observation {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre-line;
}

.issue-observation strong {
  color: var(--chalk);
  font-family: var(--font-data);
  font-weight: 500;
}

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

.issue-cell {
  padding-left: 13px;
  border-left: 1px solid var(--line-strong);
}

.issue-cell span {
  display: block;
  margin-bottom: 5px;
  color: var(--dim);
  font-size: 10.5px;
}

.issue-cell p {
  margin: 0;
  color: var(--chalk);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-line;
}

.strength-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 24px 0 0;
}

.strength-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.strength-list strong {
  color: var(--chalk);
  font-weight: 600;
}

.stroke-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.stroke-tab {
  padding: 0 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  transition: color 120ms ease, border-color 120ms ease;
}

.stroke-tab:hover {
  color: var(--chalk);
}

.stroke-tab.active {
  color: var(--chalk);
  border-color: var(--ball);
}

.stroke-tab small {
  margin-left: 5px;
  color: var(--dim);
  font-family: var(--font-data);
  font-size: 10px;
}

.metric-table {
  margin-top: 26px;
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(150px, 1.9fr) 92px 74px;
  gap: 20px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.metric-row:last-child {
  border-bottom: 1px solid var(--line);
}

.metric-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
}

.metric-label small {
  color: var(--dim);
  font-size: 10px;
}

.metric-gauge {
  position: relative;
  height: 18px;
}

.metric-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 4px;
  background: rgba(242, 239, 226, 0.1);
}

.metric-ideal {
  position: absolute;
  top: 8px;
  height: 4px;
  background: var(--ball-soft);
  border-left: 1px solid rgba(217, 242, 75, 0.5);
  border-right: 1px solid rgba(217, 242, 75, 0.5);
}

.metric-dot {
  position: absolute;
  top: 4px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--sky);
}

.metric-dot.good {
  background: var(--good);
}

.metric-dot.ok {
  background: var(--warning);
}

.metric-dot.poor {
  background: var(--critical);
}

.metric-dimensions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 30px;
  margin-bottom: 14px;
}

.metric-value {
  color: var(--chalk);
  font-family: var(--font-data);
  font-size: 13px;
  text-align: right;
}

.metric-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.metric-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

.metric-status.good::before {
  background: var(--good);
}

.metric-status.ok::before {
  background: var(--warning);
}

.metric-status.poor::before {
  background: var(--critical);
}

.keyframe-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.keyframe {
  flex: 0 0 260px;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 140ms ease;
}

.keyframe:hover {
  border-color: var(--ball);
}

.keyframe img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.keyframe span {
  display: block;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 11px;
}

.plan-focus {
  margin: 0 0 30px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.plan-focus strong {
  color: var(--chalk);
  font-weight: 600;
}

.weeks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.week-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
}

.week-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

.week-head span {
  color: var(--ball);
  font-family: var(--font-data);
  font-size: 12px;
}

.session {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.session-head {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.session-day {
  color: var(--dim);
  font-family: var(--font-data);
  font-size: 11px;
}

.session-title {
  font-size: 13px;
  font-weight: 600;
}

.session-duration {
  color: var(--dim);
  font-size: 11px;
}

.drill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 5px 0 5px 56px;
  font-size: 12px;
}

.drill-name {
  color: var(--muted);
}

.drill-sets {
  color: var(--dim);
  font-family: var(--font-data);
  white-space: nowrap;
}

.drill-notes {
  grid-column: 1 / -1;
  margin-top: -2px;
  padding-left: 0;
  color: var(--dim);
  font-size: 11px;
}

.success-list {
  display: grid;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.success-list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12.5px;
}

.success-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--ball);
}

.chat-section {
  padding: 38px 0 0;
}

.chat-log {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.chat-message {
  max-width: 76ch;
  padding: 12px 16px;
  border-left: 2px solid var(--line-strong);
  background: rgba(242, 239, 226, 0.03);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
}

.chat-message.user {
  border-left-color: var(--ball);
  background: var(--ball-faint);
  color: var(--chalk);
}

.chat-empty {
  color: var(--dim);
  font-size: 12px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.chat-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--chalk);
  outline: none;
}

.chat-form input:focus {
  border-color: var(--ball);
}

.chat-form input:disabled {
  opacity: 0.45;
}

.chat-form button {
  min-height: 44px;
  padding: 0 22px;
}

.chat-note {
  margin: 10px 0 0;
  color: var(--dim);
  font-size: 11px;
}

.report-disclaimer {
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
  line-height: 1.7;
}

/* ---------- footer, modal, toast ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 44px;
  color: var(--dim);
  font-size: 11px;
}

.site-footer p {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 15, 15, 0.72);
}

.modal-panel {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
}

.icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--ball);
  border-color: var(--ball);
}

.modal-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.modal-fineprint {
  margin: 12px 0 22px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  max-width: min(90vw, 560px);
  padding: 12px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--chalk);
  font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 54px;
  }

  .upload-card {
    width: min(620px, 100%);
  }

  .report-head {
    grid-template-columns: 1fr;
  }

  .match-card {
    max-width: 460px;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .shot-list {
    max-height: none;
  }

  .issue-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .weeks {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 720px) {
  main {
    padding: 0 18px;
  }

  .topbar {
    padding: 0 18px;
  }

  .top-actions {
    gap: 12px;
  }

  .brand-name {
    display: none;
  }

  .hero h1 {
    font-size: 46px;
  }

  .lede {
    font-size: 14.5px;
  }

  .upload-form {
    padding: 20px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .tips-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .progress-panel {
    padding: 28px;
  }

  .report-title {
    font-size: 32px;
  }

  .issue {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .issue-priority {
    font-size: 26px;
  }

  .metric-row {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    padding: 16px 0;
  }

  .metric-dimensions {
    grid-template-columns: 1fr;
  }

  .metric-label {
    grid-column: 1;
  }

  .metric-gauge {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .metric-value {
    grid-column: 2;
    grid-row: 1;
  }

  .metric-status {
    grid-column: 2;
    grid-row: 3;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 8px;
  }

  .session-head {
    grid-template-columns: 40px 1fr;
  }

  .session-duration {
    grid-column: 2;
  }

  .drill {
    padding-left: 0;
  }
}

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