@import url("/typography.css");
:root {
  --ink: #18352f;
  --muted: #6c7b74;
  --paper: #f7f8f3;
  --line: #e0e6dc;
  --green: #194d3e;
  --lime: #c4f469;
  --white: #fff;
  --radius: 20px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  letter-spacing: -0.055em;
  line-height: 1.12;
  margin-bottom: 14px;
  font-weight: 760;
}
h2 {
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
h3 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  margin-bottom: 7px;
}
p {
  color: var(--muted);
}
.hidden {
  display: none !important;
}
.small,
small {
  font-size: 0.8rem;
}
.muted {
  color: var(--muted);
}
.wide {
  width: 100%;
}
.eyebrow {
  font-size: 0.69rem;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 12px;
}
.mint-dot {
  color: #6f9e46;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.07em;
}
.brand img {
  width: 37px;
  height: 37px;
}
.brand-dot {
  color: #73964f;
}
.app-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 22px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.sidebar .brand {
  margin: 0 8px 56px;
}
.nav-caption {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  margin: 0 13px 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.nav-item:hover {
  background: #f3f5ef;
}
.nav-item.active {
  background: #eaf0df;
  font-weight: 650;
}
.team-nav {
  margin-top: 20px;
  overflow: auto;
}
.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #edf1e8;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 0.8rem;
  font-weight: 700;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 32px;
}
.sidebar-note {
  padding: 20px 14px;
  border-radius: 13px;
  background: var(--paper);
  font-size: 0.8rem;
}
.sidebar-note span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.account {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}
.account > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account .icon-btn {
  margin-left: auto;
}
.workspace {
  min-width: 0;
  max-width: 1740px;
  width: 100%;
  margin: auto;
}
.topbar {
  height: 88px;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.topbar .eyebrow {
  margin: 0;
}
.sync-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 24px;
  font-size: 0.76rem;
  padding: 8px 13px;
  min-height: 40px;
}
.sync-pill:before {
  content: "●";
  color: #58956e;
  margin-right: 8px;
}
.sync-pill.pending {
  background: #fff2d7;
}
.sync-pill.pending:before {
  color: #b47722;
}
main {
  padding: 38px 48px 58px;
  min-height: calc(100vh - 150px);
}
.page-heading,
.match-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
}
.page-heading p:last-child {
  margin: 0;
}
.page-heading .button {
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  padding: 11px 19px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 650;
  white-space: nowrap;
  background: #fff;
}
.button:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
.button.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.button.lime {
  background: var(--lime);
  color: #163c2c;
  border: 0;
}
.button.ghost {
  background: #fff;
}
.button.danger {
  color: #9f4336;
  border-color: #e4c2b9;
  background: #fff8f4;
}
.text-link {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 650;
  padding: 7px 0;
  min-height: 40px;
  text-align: left;
}
.text-link:hover {
  text-decoration: underline;
}
.icon-btn {
  border: 0;
  background: transparent;
  min-width: 40px;
  min-height: 40px;
  font-size: 1.3rem;
  border-radius: 8px;
}
.icon-btn:hover {
  background: #edf1e8;
}
.hero-banner {
  background: #153c31;
  border-radius: 22px;
  min-height: 310px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  color: white;
  margin-bottom: 34px;
}
.hero-banner > div:first-child {
  padding: 32px 38px;
  position: relative;
  z-index: 1;
}
.hero-banner h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 18px 0 15px;
}
.hero-banner p {
  color: #bdd0c4;
  font-size: 0.88rem;
}
.pill {
  display: inline-block;
  border: 1px solid #ffffff38;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  font-weight: 700;
  white-space: nowrap;
}
.pill.subtle {
  background: #f2f4ed;
  color: #6a766c;
  border-color: #e7eadf;
  letter-spacing: 0;
}
.pill.live {
  background: #eaf5d9;
  color: #3b643d;
  border-color: #d7e6bd;
}
.hero-court {
  position: relative;
  overflow: hidden;
  transform: rotate(-12deg) scale(1.12);
  background: repeating-linear-gradient(
    90deg,
    transparent 0 58px,
    #ffffff04 59px 60px
  );
}
.court-arc {
  position: absolute;
  border: 2px solid #94b99140;
  width: 340px;
  height: 500px;
  border-radius: 50%;
  right: -150px;
  top: -85px;
}
.arc-two {
  width: 520px;
  height: 680px;
  right: -240px;
  top: -175px;
  border-style: dashed;
}
.court-word {
  position: absolute;
  right: 45px;
  top: 92px;
  font-size: 4.2rem;
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: #bce881;
}
.court-ball {
  position: absolute;
  font-size: 5rem;
  left: 30px;
  top: 15px;
  color: #c4f469;
}
.court-marker {
  position: absolute;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff7e1;
  color: #224833;
  width: 42px;
  height: 42px;
  font-weight: 750;
  box-shadow: 0 0 0 7px #ffffff12;
}
.marker-one {
  left: 80px;
  bottom: 35px;
}
.marker-two {
  right: 55px;
  top: 15px;
  background: #91ab80;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 18px;
}
.section-heading h2 {
  margin: 0;
}
.count {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 500;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 22px;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.team-card:hover {
  box-shadow: 0 10px 30px #173b2910;
  transform: translateY(-3px);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 10px;
}
.team-avatar {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border-radius: 16px;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-size: 1.2rem;
}
.tone-0 {
  background: #e8efdc;
  color: #49733a;
}
.tone-1 {
  background: #e8e7fa;
  color: #676094;
}
.tone-2 {
  background: #f6e8d6;
  color: #a47842;
}
.team-card .eyebrow {
  font-size: 0.6rem;
  margin-bottom: 7px;
}
.team-card h3 {
  font-size: 1.2rem;
}
.team-card p {
  font-size: 0.8rem;
}
.card-bottom {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.76rem;
}
.card-bottom > span:last-child {
  font-size: 1.2rem;
  color: var(--green);
}
.club-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
}
.club-row > span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}
.page-footer {
  border-top: 1px solid var(--line);
  margin: 0 48px;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: #819079;
}
.page-footer span {
  letter-spacing: 0;
}
.empty {
  text-align: center;
  padding: 46px 22px;
  grid-column: 1/-1;
}
.empty.compact {
  padding: 30px 8px;
}
.empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.panel > .section-heading:first-child {
  margin-top: 0;
}
.panel > h2:first-child {
  margin-top: 0;
}
.back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 25px;
  min-height: 30px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
  overflow-x: auto;
  align-items: center;
}
.tabs button {
  border: 0;
  background: none;
  border-bottom: 3px solid transparent;
  min-height: 49px;
  padding: 12px 3px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}
.tabs button.selected {
  border-color: var(--green);
  color: var(--green);
}
.match-list {
  display: grid;
  gap: 14px;
}
.match-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 20px;
}
.match-card:hover {
  border-color: #9cba86;
}
.match-date {
  font-size: 0.82rem;
  font-weight: 650;
}
.match-date span {
  display: block;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}
.match-card h3 {
  margin-top: 9px;
}
.match-card p {
  font-size: 0.8rem;
  margin-bottom: 0;
}
.match-score {
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  white-space: nowrap;
}
.match-score span {
  color: #a6b1a0;
  padding: 0 8px;
}
.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.player-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.player-card > div {
  flex: 1;
  min-width: 0;
}
.player-card strong {
  display: block;
  overflow-wrap: anywhere;
}
.player-card > div > span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.jersey {
  display: grid;
  place-items: center;
  background: #ecf2e3;
  border-radius: 9px;
  min-width: 42px;
  height: 45px;
  font-weight: 750;
}
.archived {
  opacity: 0.64;
}
.member-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child {
  border: 0;
}
.member-row strong {
  flex: 1;
}
.member-row .text-link {
  margin-left: 12px;
}
.settings p {
  max-width: 650px;
}
.notice {
  padding: 16px 20px;
  border: 1px solid #e3d4b8;
  background: #fff7e8;
  color: #795c30;
  border-radius: 12px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin: 24px 0;
}
.metric-grid article {
  background: #eef2e8;
  border: 1px solid #e2e8d8;
  border-radius: 15px;
  padding: 20px;
}
.metric-grid article span {
  display: block;
  font-size: 0.77rem;
  color: var(--muted);
}
.metric-grid strong {
  font-size: 2rem;
  letter-spacing: -0.05em;
  display: block;
  margin-top: 7px;
}
.toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0;
}
.toolbar label {
  margin: 0;
  min-width: 160px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  min-width: 100%;
  white-space: nowrap;
  font-size: 0.82rem;
  text-align: right;
}
th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #e7ebe2;
}
thead {
  color: var(--muted);
  font-size: 0.72rem;
  background: #f8faf5;
}
thead th {
  font-weight: 600;
}
th:first-child,
td:first-child {
  text-align: left;
}
tbody th {
  font-weight: 550;
}
td.emphasis {
  font-weight: 750;
  color: var(--green);
}
tbody tr:last-child > * {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafbf7;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.player-history a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.player-history small {
  display: block;
  color: var(--muted);
}
.scoreboard {
  background: #173c32;
  border-radius: 20px;
  padding: 25px 35px;
  display: grid;
  grid-template-columns: 1fr 180px 1fr;
  align-items: center;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
  gap: 12px;
}
.scoreboard > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.score-team {
  font-size: 1.3rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.scoreboard .small {
  font-size: 0.6rem;
  color: #acc1b4;
  letter-spacing: 0.1em;
}
.score-center strong {
  font-size: 3.3rem;
  line-height: 1.15;
  letter-spacing: -0.06em;
}
.score-center strong span {
  color: #729584;
  padding: 0 9px;
}
.score-center > span:last-child {
  font-size: 0.74rem;
  color: #acc1b4;
}
.live-status {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.69rem;
  color: var(--muted);
}
.recorder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 22px;
}
.recorder {
  padding: 25px;
}
.recorder .section-heading h2 {
  font-size: 1.15rem;
}
.record-fields {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.record-context {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  justify-content: space-between;
}
.segmented {
  display: inline-flex;
  background: #edf1e7;
  padding: 4px;
  border-radius: 10px;
  gap: 3px;
}
.segmented button {
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 0.8rem;
  min-height: 42px;
}
.segmented button.selected {
  background: white;
  box-shadow: 0 2px 4px #00000009;
  font-weight: 650;
}
.minute-input {
  width: 125px;
  font-size: 0.65rem !important;
  margin: 0 !important;
}
.minute-input input {
  min-height: 38px !important;
  padding: 5px 12px !important;
}
.side-switch {
  display: flex;
  margin-bottom: 18px;
}
.side-switch button {
  flex: 1;
}
.court-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.court-header span span {
  color: #9ba596;
}
shot-court {
  display: block;
}
shot-court svg {
  width: 100%;
  display: block;
  cursor: crosshair;
  touch-action: manipulation;
  max-height: 300px;
}
shot-court[readonly] svg {
  cursor: default;
}
.court-floor {
  fill: #eef3e5;
  stroke: #d8e3cd;
  stroke-width: 1.5;
}
.court-line {
  fill: none;
  stroke: #a3b593;
  stroke-width: 1.8;
}
.court-line.dashed {
  stroke-dasharray: 7 5;
}
.court-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  fill: #79906a;
  font-family: inherit;
  font-weight: 650;
}
.shot-goal {
  fill: #214f3e;
  stroke: #fff;
  stroke-width: 1;
}
.shot-save {
  fill: #e7a272;
  stroke: #fff;
  stroke-width: 1;
}
.shot-miss {
  fill: #fff;
  stroke: #be5d4a;
  stroke-width: 2;
}
.shot-cross {
  fill: none;
  stroke: #572f22;
  stroke-width: 1.8;
}
.selected-shot {
  fill: #204b3a;
  stroke: #c4f469;
  stroke-width: 4;
}
.court-zones {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin: 6px 0;
}
.court-zones button {
  background: #f5f7f0;
  border: 1px solid var(--line);
  font-size: 0.66rem;
  border-radius: 6px;
  min-height: 36px;
  padding: 3px;
}
.court-zones button:hover {
  background: #e3edda;
}
.shot-options {
  display: flex;
  gap: 25px;
  margin: 18px 0;
}
.shot-options label {
  margin: 0;
}
.shot-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.shot-button {
  border: 0;
  border-radius: 12px;
  padding: 13px;
  min-height: 90px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
}
.shot-button span {
  font-size: 1.8rem;
  line-height: 1.1;
}
.shot-button.goal {
  background: var(--green);
  color: #fff;
}
.shot-button.save {
  background: #e8e6f6;
  color: #655684;
}
.shot-button.miss {
  background: #f8e5da;
  color: #ac6542;
}
.shot-button:active {
  transform: scale(0.97);
}
.shot-actions + p {
  margin: 10px 0 18px;
}
.event-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.event-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  min-height: 52px;
  font-size: 0.77rem;
  padding: 10px;
}
.event-button:hover {
  background: #f4f6ee;
}
.tip-card {
  border: 1px solid #dce5cb;
  background: #eef2e2;
  padding: 25px;
  border-radius: 18px;
}
.tip-card .eyebrow {
  font-size: 0.62rem;
}
.tip-card h3 {
  font-size: 1.15rem;
}
.tip-card p {
  font-size: 0.82rem;
}
.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child {
  border: 0;
}
.event-row > div {
  flex: 1;
  min-width: 0;
}
.event-row strong,
.event-row span:not(.event-mark),
.event-row small {
  display: block;
}
.event-row strong {
  font-size: 0.84rem;
}
.event-row span:not(.event-mark) {
  font-size: 0.76rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.event-row small {
  font-size: 0.64rem;
  color: #95a08e;
  margin-top: 3px;
}
.event-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f1f1e8;
  flex: none;
  font-size: 1.2rem;
}
.event-mark.goal-mark {
  background: #e7efd9;
  color: var(--green);
}
.event-row.voided {
  opacity: 0.5;
}
.event-row.voided strong {
  text-decoration: line-through;
}
.match-side .section-heading {
  gap: 7px;
}
.match-side .section-heading h2 {
  font-size: 1.05rem;
}
.match-side .text-link {
  font-size: 0.7rem;
}
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
}
input,
select {
  width: 100%;
  display: block;
  background: #fff;
  border: 1px solid #d8e0d1;
  border-radius: 9px;
  padding: 12px 13px;
  min-height: 46px;
  margin-top: 7px;
  color: var(--ink);
}
input::placeholder {
  color: #a2ab9b;
}
input:focus,
select:focus {
  outline: 2px solid #9cbf70;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #87ad55;
  outline-offset: 3px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  flex: none;
  margin: 0;
  accent-color: var(--green);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
legend {
  font-size: 0.82rem;
  font-weight: 650;
}
.squad-picker {
  max-height: 230px;
  overflow: auto;
}
.squad-picker .check {
  margin-bottom: 6px;
  min-height: 38px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  width: min(560px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  color: var(--ink);
  box-shadow: 0 30px 100px #061c2440;
}
dialog::backdrop {
  background: #0d211e80;
  backdrop-filter: blur(4px);
}
dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
dialog header h2 {
  margin: 0;
}
dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
}
.form-error {
  color: #aa3f2d;
  font-size: 0.82rem;
}
.form-error:empty {
  display: none;
}
.queue-item {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.queue-item span {
  font-size: 0.8rem;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}
.auth-story {
  background: #153c31;
  color: white;
  padding: 48px 10%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.auth-story .brand {
  color: #fff;
  margin-bottom: 90px;
}
.auth-story > .pill {
  align-self: flex-start;
  color: #c4f469;
}
.auth-story h1 {
  font-size: clamp(3.5rem, 6vw, 6rem);
  margin: 28px 0;
  line-height: 0.98;
}
.auth-story h1 span {
  color: var(--lime);
}
.auth-story > p {
  color: #b6cabd;
  max-width: 330px;
}
.auth-art {
  position: relative;
  flex: 1;
  min-height: 220px;
  margin-top: 15px;
}
.auth-art .court-word {
  font-size: 4.7rem;
  color: #aace7840;
  right: 30px;
  top: 55px;
  transform: rotate(-12deg);
}
.auth-art .court-arc {
  right: -50px;
  top: -10px;
  transform: rotate(20deg);
  width: 400px;
  height: 220px;
}
.auth-story > .small {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.auth-box {
  width: 100%;
  max-width: 360px;
}
.auth-box h2 {
  font-size: 2.2rem;
  letter-spacing: -0.05em;
  line-height: 1.1;
}
.auth-box > p {
  font-size: 0.9rem;
}
.auth-box form {
  margin-top: 30px;
}
.auth-toggle {
  margin: 20px 0;
}
.auth-box > .small {
  margin-top: 16px;
  font-size: 0.75rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 15px);
  padding: 14px 22px;
  background: #183b30;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 30px #0003;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  font-size: 0.85rem;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.loading {
  padding: 60px;
  text-align: center;
}
@media (min-width: 1500px) {
  main {
    padding: 45px 65px;
  }
  .topbar {
    padding: 0 65px;
  }
  .hero-banner {
    min-height: 340px;
  }
  .team-card {
    padding: 26px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  main {
    padding: 30px;
  }
  .topbar {
    padding: 0 30px;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recorder-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 15px;
  }
  .recorder,
  .match-side .panel {
    padding: 18px;
  }
  .record-context {
    gap: 10px;
  }
  .segmented button {
    padding: 8px 9px;
  }
  .hero-banner > div:first-child {
    padding: 28px;
  }
  .match-card {
    grid-template-columns: 90px minmax(0, 1fr) auto 12px;
    padding: 20px;
    gap: 15px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .match-heading {
    align-items: flex-start;
  }
  .match-heading .actions {
    justify-content: flex-end;
  }
  .court-word {
    font-size: 3.6rem;
    right: 25px;
  }
  .court-ball {
    left: 5px;
  }
}
@media (max-width: 950px) {
  .app-shell {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .sidebar .brand {
    font-size: 1.35rem;
    margin-left: 0;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .nav-item {
    font-size: 0.8rem;
    padding: 10px 8px;
  }
  .sidebar-note {
    display: none;
  }
  .nav-caption {
    font-size: 0.57rem;
  }
  .recorder-layout {
    grid-template-columns: 1fr;
  }
  .match-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .match-side .panel {
    margin: 0;
  }
  .tip-card {
    height: fit-content;
  }
  .hero-banner {
    grid-template-columns: 1.2fr 1fr;
  }
  .hero-banner h2 {
    font-size: 2.4rem;
  }
  .hero-court .court-word {
    font-size: 2.9rem;
    right: 12px;
    top: 100px;
  }
  .marker-one {
    left: 40px;
  }
  .page-heading {
    flex-direction: column;
    gap: 18px;
  }
  .match-heading {
    flex-direction: column;
    gap: 12px;
  }
  .match-heading .actions {
    justify-content: flex-start;
  }
  .metric-grid {
    gap: 10px;
  }
  .metric-grid article {
    padding: 15px;
  }
  .metric-grid strong {
    font-size: 1.7rem;
  }
  .scoreboard {
    padding: 22px;
    grid-template-columns: 1fr 130px 1fr;
  }
  .score-team {
    font-size: 1.05rem;
  }
  .two-columns {
    gap: 12px;
  }
  .two-columns .panel {
    padding: 15px;
  }
  .auth-story {
    padding: 40px 10%;
  }
  .auth-story h1 {
    font-size: 4.3rem;
  }
  .auth-panel {
    padding: 35px;
  }
  .auth-box h2 {
    font-size: 1.9rem;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
  .sidebar .brand {
    margin: 0;
    font-size: 1.55rem;
    flex: 1;
  }
  .sidebar > .nav-item {
    margin: 0;
    font-size: 0.78rem;
    padding: 8px 10px;
    min-height: 40px;
  }
  .sidebar .nav-caption,
  .sidebar .team-nav,
  .sidebar-note {
    display: none;
  }
  .sidebar-bottom {
    margin: 0;
    padding: 0;
  }
  .account {
    margin: 0;
    gap: 0;
  }
  .account > span {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 20px;
  }
  .topbar .eyebrow {
    font-size: 0.58rem;
  }
  .sync-pill {
    font-size: 0.68rem;
    padding: 6px 10px;
    min-height: 34px;
  }
  main {
    padding: 25px 20px 40px;
  }
  h1 {
    font-size: 2.45rem;
  }
  .page-heading {
    gap: 18px;
    margin-bottom: 24px;
  }
  .page-heading > div > p:last-child {
    font-size: 0.85rem;
  }
  .hero-banner {
    min-height: 280px;
    grid-template-columns: 1.4fr 1fr;
    border-radius: 17px;
    margin-bottom: 28px;
  }
  .hero-banner > div:first-child {
    padding: 25px;
  }
  .hero-banner h2 {
    font-size: 2.25rem;
  }
  .hero-banner p {
    font-size: 0.77rem;
  }
  .hero-banner .button {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
  .hero-court {
    margin-left: -25px;
  }
  .hero-court .court-word {
    font-size: 2.35rem;
    right: 10px;
    top: 100px;
  }
  .hero-court .court-ball {
    font-size: 3.5rem;
    left: 20px;
    top: 25px;
  }
  .hero-court .marker-two {
    right: 25px;
  }
  .hero-court .marker-one {
    left: 45px;
    bottom: 30px;
  }
  .team-grid {
    gap: 12px;
  }
  .team-card {
    padding: 18px;
  }
  .team-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1rem;
  }
  .card-top {
    margin-bottom: 18px;
    gap: 6px;
  }
  .card-top .pill {
    font-size: 0.55rem;
    padding: 4px 6px;
  }
  .team-card h3 {
    font-size: 1.08rem;
  }
  .team-card .eyebrow {
    font-size: 0.55rem;
  }
  .card-bottom {
    font-size: 0.68rem;
  }
  .section-heading {
    gap: 10px;
    align-items: center;
  }
  .section-heading h2 {
    font-size: 1.18rem;
  }
  .section-heading .text-link {
    font-size: 0.75rem;
  }
  .page-footer {
    margin: 0 20px;
  }
  .tabs {
    gap: 22px;
    margin-bottom: 20px;
  }
  .tabs button {
    font-size: 0.82rem;
  }
  .tabs .live-status {
    display: none;
  }
  .match-card {
    grid-template-columns: minmax(0, 1fr) auto 12px;
    gap: 12px;
    padding: 18px;
  }
  .match-date {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
  }
  .match-date span {
    margin: 0;
  }
  .match-card h3 {
    font-size: 1rem;
  }
  .match-card .match-score {
    font-size: 1.65rem;
  }
  .match-score span {
    padding: 0 5px;
  }
  .match-card .pill {
    font-size: 0.53rem;
  }
  .roster-grid {
    gap: 10px;
  }
  .player-card {
    padding: 11px;
    gap: 8px;
  }
  .player-card strong {
    font-size: 0.8rem;
  }
  .player-card > div > span {
    font-size: 0.64rem;
  }
  .jersey {
    min-width: 34px;
    height: 40px;
    font-size: 0.9rem;
  }
  .player-card .icon-btn {
    min-width: 28px;
  }
  .panel {
    padding: 18px;
    border-radius: 15px;
  }
  .member-row {
    gap: 9px;
    flex-wrap: wrap;
  }
  .member-row strong {
    font-size: 0.85rem;
  }
  .member-row .pill {
    font-size: 0.62rem;
  }
  .member-row .text-link {
    margin-left: 0;
    font-size: 0.75rem;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric-grid strong {
    font-size: 1.9rem;
  }
  .toolbar {
    align-items: flex-end;
    gap: 12px;
  }
  .toolbar .pill {
    font-size: 0.58rem;
  }
  .toolbar label {
    min-width: 110px;
  }
  .toolbar .segmented button {
    font-size: 0.7rem;
    padding: 8px;
  }
  .toolbar .button {
    font-size: 0.7rem;
    padding: 10px;
  }
  .scoreboard {
    grid-template-columns: 1fr 115px 1fr;
    padding: 20px 14px;
    gap: 5px;
    border-radius: 16px;
  }
  .score-team {
    font-size: 0.92rem;
  }
  .score-center strong {
    font-size: 2.75rem;
  }
  .score-center .pill {
    font-size: 0.5rem;
  }
  .scoreboard .small {
    font-size: 0.5rem;
  }
  .score-center > span:last-child {
    font-size: 0.65rem;
  }
  .recorder-layout {
    gap: 15px;
  }
  .recorder .section-heading h2 {
    font-size: 1.15rem;
  }
  .record-context {
    gap: 10px;
  }
  .record-context .segmented {
    flex: 1;
  }
  .record-context .segmented button {
    flex: 1;
    padding: 8px 7px;
  }
  .minute-input {
    width: 110px;
  }
  .shot-button {
    min-height: 85px;
  }
  .event-button {
    font-size: 0.73rem;
  }
  .match-side {
    grid-template-columns: 1fr;
  }
  .tip-card {
    display: none;
  }
  .two-columns {
    grid-template-columns: 1fr;
  }
  .court-zones button {
    min-height: 40px;
  }
  .button {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.8rem;
  }
  .actions {
    gap: 8px;
  }
  .auth-layout {
    display: block;
  }
  .auth-story {
    min-height: 260px;
    padding: 24px 28px;
  }
  .auth-story .brand {
    margin-bottom: 28px;
    font-size: 1.5rem;
  }
  .auth-story > .pill {
    font-size: 0.52rem;
  }
  .auth-story h1 {
    font-size: 3.2rem;
    margin: 18px 0;
  }
  .auth-story > p {
    max-width: 250px;
    font-size: 0.8rem;
    margin-bottom: 0;
  }
  .auth-art {
    position: absolute;
    right: -20px;
    bottom: 0;
    width: 180px;
    min-height: 220px;
    opacity: 0.5;
  }
  .auth-art .court-word {
    font-size: 2.6rem;
    top: 90px;
    right: 20px;
  }
  .auth-art .court-arc {
    width: 300px;
    right: -130px;
  }
  .auth-story > .small {
    display: none;
  }
  .auth-panel {
    padding: 35px 28px;
  }
  .auth-box {
    max-width: 420px;
  }
  .auth-box h2 {
    font-size: 1.9rem;
  }
  .auth-box .eyebrow {
    font-size: 0.62rem;
  }
  dialog {
    padding: 22px;
    border-radius: 18px;
  }
  .form-row {
    gap: 12px;
  }
  .squad-picker {
    max-height: 190px;
  }
  #toast {
    bottom: 16px;
    font-size: 0.78rem;
  }
}
@media (max-width: 390px) {
  main {
    padding: 22px 14px;
  }
  .topbar,
  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .hero-banner {
    grid-template-columns: 1.4fr 0.8fr;
  }
  .hero-banner > div:first-child {
    padding: 22px;
  }
  .hero-court .court-word {
    font-size: 1.8rem;
  }
  .hero-banner h2 {
    font-size: 2.1rem;
  }
  .hero-court .court-ball {
    left: 5px;
  }
  .hero-court .marker-one {
    left: 20px;
  }
  .roster-grid {
    grid-template-columns: 1fr;
  }
  .event-actions {
    grid-template-columns: repeat(2, 1fr);
  }
  .scoreboard {
    grid-template-columns: 1fr 90px 1fr;
  }
  .score-center strong {
    font-size: 2.3rem;
  }
  .score-center strong span {
    padding: 0 4px;
  }
  .score-team {
    font-size: 0.82rem;
  }
  .record-context .segmented button {
    font-size: 0.73rem;
  }
  .minute-input {
    width: 95px;
  }
  .court-zones {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .button:hover {
    transform: none;
  }
}
@media print {
  body {
    background: #fff;
    font-size: 10pt;
  }
  .sidebar,
  .topbar,
  .page-footer,
  .tabs,
  .back-link,
  .actions,
  .recorder-layout,
  .toolbar button,
  .text-link,
  #toast,
  dialog {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  main {
    padding: 0;
  }
  .match-heading h1 {
    font-size: 20pt;
  }
  .scoreboard {
    background: #fff;
    color: #000;
    border: 1px solid #ccc;
  }
  .scoreboard .small,
  .score-center > span:last-child {
    color: #333;
  }
  .panel {
    break-inside: avoid;
    border-radius: 0;
    padding: 12px;
    margin-bottom: 14px;
  }
  .table-scroll {
    overflow: visible;
  }
  table {
    font-size: 8pt;
  }
  th,
  td {
    padding: 6px;
  }
  .metric-grid {
    margin: 12px 0;
  }
  .metric-grid article {
    padding: 10px;
  }
  .metric-grid strong {
    font-size: 16pt;
  }
  .two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  shot-court svg {
    max-height: 180px;
  }
  .scoreboard .pill {
    display: none;
  }
  .section-heading {
    margin: 10px 0;
  }
  .panel:has(#all-events) {
    display: none;
  }
}

.position-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px 10px;
  margin: 12px 0;
}
.position-picker h3 {
  margin: 0;
  padding: 12px 0;
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 44px;
}
.match-heading h1 {
  font-size: 2.3rem;
  margin: 0;
}
.match-heading {
  margin-bottom: 20px;
}
.match-heading .eyebrow {
  margin-bottom: 7px;
}
.position-picker:not([open]) .court-header {
  display: none;
}
@media (max-width: 700px) {
  match-page .back-link {
    margin-bottom: 12px;
    min-height: 24px;
  }
  .match-heading h1 {
    font-size: 1.8rem;
  }
  .match-heading {
    gap: 12px;
    margin-bottom: 16px;
  }
  .match-heading .eyebrow {
    font-size: 0.58rem;
  }
  .match-heading .button {
    min-height: 38px;
    font-size: 0.73rem;
    padding: 8px 11px;
  }
  .scoreboard {
    padding: 15px 12px;
    margin-bottom: 12px;
  }
  .recorder .section-heading {
    margin-bottom: 14px;
  }
  .record-context {
    margin-bottom: 14px;
  }
  .shot-options {
    margin: 12px 0;
  }
  .record-fields > label {
    margin-bottom: 12px;
  }
  .shot-actions {
    background: #fff;
    border-radius: 12px;
  }
  .shot-button {
    min-height: 76px;
  }
  .position-picker {
    margin: 10px 0;
  }
  .position-picker h3 {
    padding: 9px 0;
    min-height: 40px;
  }
}

/* Courtside v2: true-scale court and action-first touch controls. */
shot-court:not([legacy]) .court-line { stroke-width: 1; }
shot-court:not([legacy]) .court-line.dashed { stroke-dasharray: 3 3; }
.goal-area { fill: #dce9cd; }
.goal-frame { fill: none; stroke: #456439; stroke-width: 1.6; }
.goal-line { stroke: #456439; stroke-width: 1.6; }
.court-dimension { fill: #49623e; font-size: 9px; }
.match-clock { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 18px; background: #eef3e5; margin-bottom: 16px; }
.match-clock output { display: block; font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: -.04em; }
.clock-actions { display: grid; gap: 8px; }
.clock-actions button { min-height: 44px; }
.record-step { margin: 18px 0 12px; }
.player-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.player-button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 86px; gap: 4px; border: 1px solid #c7d7bd; border-radius: 14px; background: #f2f6ed; padding: 10px 5px; color: #243720; cursor: pointer; }
.player-button strong { font-size: 1.7rem; line-height: 1; }
.player-button span { font-weight: 700; overflow-wrap: anywhere; }
.player-button small { color: #556d4a; }
.player-button:hover, .player-button:focus-visible, .player-button.selected { background: #d5f67d; border-color: #46691b; }
.player-button.team-only { background: #fff; }
.captured-time { background: #eef3e5; padding: 12px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.phase-picker { display: flex; gap: 6px; border: 0; padding: 0; margin: 14px 0; }
.phase-picker legend { margin-bottom: 8px; font-weight: 700; }
.phase-picker label { flex: 1; position: relative; margin: 0; }
.phase-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.phase-picker span { display: grid; place-items: center; min-height: 44px; padding: 6px; border: 1px solid #c7d7bd; border-radius: 10px; font-size: .9rem; }
.phase-picker input:checked + span { background: #d5f67d; border-color: #46691b; }
.phase-picker input:focus-visible + span { outline: 3px solid #456439; outline-offset: 2px; }
@media (max-width: 400px) { .match-clock { padding: 12px; } .clock-actions .button { padding: 10px; } }
/* Author display rules must not override the native hidden attribute. */
[hidden] { display: none !important; }

.shot-type-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shot-type-picker legend { grid-column: 1 / -1; }
.shot-type-picker span { font-size: .8rem; overflow-wrap: anywhere; }

.event-picker footer { position: sticky; bottom: -1px; background: var(--paper, #fff); padding: 12px 0; z-index: 2; border-top: 1px solid #dce3d5; }

.shot-type-picker[hidden] { display: none; }
