:root {
  color-scheme: dark;
  --bg: #07090f;
  --surface: #111827;
  --surface-muted: #1b2433;
  --surface-glass: rgb(17 24 39 / 78%);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --border: #283244;
  --accent: #ff7a1a;
  --accent-2: #f6b13b;
  --accent-contrast: #150702;
  --shadow: 0 18px 50px rgb(0 0 0 / 38%);
}

html[data-theme="dark"] {
  --bg: #0c111d;
  --surface: #151b2b;
  --surface-muted: #20283a;
  --text: #eef3ff;
  --muted: #aab4c8;
  --border: #30394e;
  --accent: #ff8a4c;
  --accent-contrast: #1a0b03;
  --shadow: 0 8px 28px rgb(0 0 0 / 35%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #0c111d;
    --surface: #151b2b;
    --surface-muted: #20283a;
    --text: #eef3ff;
    --muted: #aab4c8;
    --border: #30394e;
    --accent: #ff8a4c;
    --accent-contrast: #1a0b03;
    --shadow: 0 8px 28px rgb(0 0 0 / 35%);
  }
}

* { box-sizing: border-box; }

/* The body background propagates to the canvas and is sized to the root
   element; make the root at least the viewport tall so short pages don't
   repeat the gradient as a band above the bottom nav. */
html { min-height: 100%; min-height: 100vh; min-height: 100dvh; }

body {
  margin: 0;
  background-color: #090b10;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 28rem),
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 24rem),
    linear-gradient(135deg, #07090f 0%, #0d1422 52%, #090b10 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.header-top-row {
  display: flex;
  align-items: center;
  order: 0;
  flex: 1 1 100%;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}

.header-top-row .brand {
  flex: 1 1 auto;
  min-width: 0;
}

.header-top-row .header-actions {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  order: 0;
  gap: 0.65rem;
  font-weight: 800;
  text-decoration: none;
  min-width: max-content;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
}

.team-brand {
  width: auto;
  height: 4rem;
}

.team-header-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 16rem;
  max-height: 4rem;
  border-radius: 6px;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.team-brand-customized {
  gap: 0.75rem;
  width: auto;
  height: auto;
  min-height: 4rem;
  max-width: min(32rem, 36vw);
}

.team-header-text {
  max-width: 15rem;
  color: var(--team-header-text-color, var(--text));
  line-height: 1.08;
  overflow-wrap: break-word;
}

.team-header-text-small {
  font-size: 0.85rem;
}

.team-header-text-medium {
  font-size: 1.1rem;
}

.team-header-text-large {
  font-size: 1.4rem;
}

.team-header-text-bold {
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  order: 1;
  flex: 1 1 auto;
  gap: 0.5rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  background: var(--surface-muted);
}

.site-nav-icon {
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 0.95rem;
  line-height: 1;
}

.site-nav-form {
  display: inline-flex;
  margin: 0;
}

.team-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.team-switcher label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.team-switcher select {
  max-width: 11rem;
  min-height: 2.05rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: var(--surface-muted);
  color: var(--text);
}

.site-nav-form button {
  padding: 0.4rem 0.75rem;
  background: var(--surface-muted);
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav-form button:hover,
.site-nav-form button:focus {
  border-color: var(--accent);
}

.site-nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  padding: 0 0.3rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  order: 2;
  gap: 0.45rem;
  margin-left: 0;
}

.page-alerts {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.page-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
}

.page-alert strong,
.page-alert p {
  margin: 0;
}

.page-alert p {
  color: var(--muted);
}

.page-alert .button {
  flex: 0 0 auto;
  text-decoration: none;
}

.team-branding-preview {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 0.65rem;
}

.team-identity-sample,
.team-identity-form-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.team-identity-sample .team-header-text {
  max-width: 10rem;
  font-size: 0.8rem;
}

.team-identity-form-preview-wrap {
  margin: 1.25rem 0;
}

.team-logo-color-picker {
  display: grid;
  gap: 0.45rem;
  max-width: 42rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  background: var(--surface-muted);
}

.team-logo-color-picker p,
.team-logo-color-picker-status {
  margin: 0;
  color: var(--muted);
}

.team-logo-color-picker-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.team-color-copy-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.team-color-copy-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.team-color-copy-row > span {
  min-width: 9.5rem;
  font-weight: 700;
}

.team-branding-copy {
  display: grid;
  gap: 0.75rem;
  max-width: 42rem;
  margin: 1.25rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface-muted);
}

.team-branding-copy legend {
  padding: 0 0.35rem;
  font-weight: 900;
}

.team-branding-copy p {
  margin: 0;
  color: var(--muted);
}

.team-branding-copy-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.team-branding-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 0.55rem;
}

.team-branding-target-grid label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  cursor: pointer;
}

.team-branding-target-grid input {
  width: auto;
  margin: 0;
}

.team-branding-copy-status {
  font-size: 0.85rem;
  font-weight: 700;
}

.team-logo-color-picker-status:not(:empty) {
  font-size: 0.82rem;
}

.team-identity-form-preview-wrap h3 {
  margin-bottom: 0.55rem;
}

.team-identity-form-preview {
  min-height: 4.75rem;
  max-width: 100%;
}

.team-identity-form-preview img {
  width: auto;
  height: auto;
  max-width: 12rem;
  max-height: 4rem;
  object-fit: contain;
}

.team-logo-preview {
  display: inline-grid;
  place-items: center;
  width: auto;
  height: auto;
  max-width: 9rem;
  max-height: 4.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.team-logo-placeholder {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  padding: 0;
  background: var(--surface-muted);
}

.team-color-swatch {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  vertical-align: -0.05rem;
}

.notification-center {
  position: relative;
  display: inline-grid;
}

.notification-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  line-height: 1;
}

.notification-bell-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -0.35rem;
  right: -0.4rem;
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--surface);
  border-radius: 999px;
  padding: 0 0.25rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 30;
  width: min(23rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100vh - 5.5rem));
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(0 0 0 / 45%);
  /* The header actions row is nowrap; the panel's messages must still wrap. */
  white-space: normal;
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 0.9rem;
  background: var(--surface);
}

.notification-panel-header h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.notification-panel-header span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.notification-list {
  display: grid;
}

.notification-item {
  display: grid;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  padding: 0.9rem;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item-setup {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent));
}

.notification-item h3,
.notification-item p,
.notification-item time {
  margin: 0;
}

.notification-item h3 {
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.notification-item > p:not(.notification-kicker),
.notification-item time {
  color: var(--muted);
  font-size: 0.82rem;
}

.notification-kicker {
  color: var(--accent-2);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-item .button {
  justify-self: start;
  margin-top: 0.25rem;
  text-decoration: none;
}

.notification-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.notification-actions form {
  margin: 0;
}

.notification-actions a,
.notification-actions button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.notification-actions a {
  color: var(--accent-2);
}

.notification-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1.4rem 0.9rem;
  text-align: center;
}

.notification-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

button,
.button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

button:hover,
.button:hover {
  border-color: var(--accent);
}

.upload-progress {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
}

.upload-progress progress {
  width: 100%;
  height: 0.8rem;
}

.upload-progress p {
  margin: 0;
  color: var(--muted);
}

.site-main {
  width: min(1440px, calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
}

.login-main {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.5rem auto 4rem;
}

.login-page {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}

.login-video-frame {
  width: min(760px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-video-frame video,
.login-video-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.login-video-frame video {
  object-fit: contain;
  background: #000;
}

.login-video-placeholder span {
  display: inline-grid;
  place-items: center;
  width: 5rem;
  aspect-ratio: 1;
  border: 2px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-size: 2rem;
}

.home-screen {
  display: grid;
  gap: 2rem;
  width: min(100%, 64rem);
  margin: 0 auto;
}

.home-video-block {
  display: grid;
  gap: 0.75rem;
}

.home-video-block h1,
.home-video-block h2 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  letter-spacing: 0;
}

.home-video-block video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.62);
}

.confirm-modal__panel {
  position: relative;
  width: min(100%, 28rem);
  border: 1px solid rgba(61, 47, 34, 0.22);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(12, 10, 8, 0.28);
  padding: 1.25rem;
}

.confirm-modal__panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.confirm-modal__panel p {
  margin: 0;
  color: var(--muted);
}

.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.confirm-modal__actions button {
  width: auto;
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(61, 47, 34, 0.28);
}

.button-danger {
  background: #a33a2a;
  color: #fff;
  border: 1px solid #a33a2a;
}

.login-form-wrap {
  width: min(760px, 100%);
  display: grid;
  gap: 1rem;
}

.login-form-wrap h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.login-form {
  display: grid;
  gap: 0.9rem;
}

.login-field {
  display: grid;
  grid-template-columns: minmax(6.5rem, 9rem) 1fr;
  align-items: center;
  gap: 0.75rem;
}

.login-field label {
  font-size: 1.15rem;
}

.login-field input {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  background: var(--surface);
  color: var(--text);
}

/* Forgot Password? and Log in share the first grid row; the details element
   spans the row so its tip opens full width below without moving the button. */
.login-actions {
  --login-actions-gap: clamp(1rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-top: 0.5rem;
}

.login-help,
.login-actions button {
  grid-row: 1;
  grid-column: 1;
}

.login-help summary {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: var(--tap);
  margin-left: auto;
  margin-right: calc(50% + var(--login-actions-gap) / 2);
  cursor: pointer;
  list-style: none;
}

.login-help summary::-webkit-details-marker {
  display: none;
}

.login-help-tip {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-2));
  color: var(--text);
  text-align: center;
}

.login-secondary-action,
.login-trial-link span {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.login-actions button {
  justify-self: start;
  min-width: 7rem;
  margin-left: calc(50% + var(--login-actions-gap) / 2);
}

.login-trial-link {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 1.1rem;
}

.admin-panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

.video-library,
.admin-dashboard-main,
.status-card,
.video-card,
.responsive-card,
.hero-card {
  background: var(--surface);
  color: var(--text);
}

.responsive-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 1rem;
}

.responsive-card,
.status-card,
.hero-card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: var(--shadow);
}

.hero-card {
  max-width: 760px;
  margin: 4rem auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.hero-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.library-controls,
.admin-dashboard-shell {
  gap: 1rem;
}

input,
select,
textarea {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #0b1220;
  color: var(--text);
  padding: 0.6rem 0.75rem;
}

.video-meta,
.helptext {
  color: var(--muted);
}

.admin-dashboard-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: var(--bg);
}

.admin-dashboard-main,
.status-card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem;
  background: var(--surface);
}

.admin-dashboard-main {
  overflow-x: auto;
}

.coach-tool-guide {
  margin: 0 0 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid #2fcf93;
  background: rgb(47 207 147 / 4%);
}

.coach-tool-guide summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
}

.coach-tool-guide summary::-webkit-details-marker {
  display: none;
}

.coach-tool-guide summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.coach-tool-guide-icon {
  display: inline-grid;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgb(47 207 147 / 55%);
  border-radius: 50%;
  color: #2fcf93;
  font-weight: 900;
}

.coach-tool-guide summary > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.coach-tool-guide summary strong,
.coach-tool-guide summary small {
  letter-spacing: 0;
}

.coach-tool-guide summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.coach-tool-guide summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
}

.coach-tool-guide[open] summary::after {
  content: "-";
}

.coach-tool-guide-body {
  max-width: 54rem;
  padding: 0 1rem 1rem 3.4rem;
}

.coach-tool-guide-body > p {
  margin: 0 0 0.75rem;
}

.coach-tool-guide-body ol {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.25rem;
}

.coach-tool-guide-tip {
  margin-top: 0.9rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
  color: var(--muted);
}

.admin-dashboard-main table {
  width: 100%;
  border-collapse: collapse;
}

.admin-dashboard-main th,
.admin-dashboard-main td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.admin-dashboard-main th {
  background: var(--surface-muted);
}

.browser-health {
  display: grid;
  gap: 1.25rem;
}

.browser-health-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.browser-health-header h1,
.browser-health-header p,
.browser-health-activity h2,
.browser-health-activity p {
  margin: 0;
}

.browser-health-freshness,
.browser-health-scope,
.browser-health-source {
  color: var(--muted);
  font-size: 0.85rem;
}

.diagnostic-privacy-note {
  border: 1px solid color-mix(in srgb, #2fcf93 45%, var(--border));
  border-radius: 0.75rem;
  padding: 0.8rem 1rem;
  background: color-mix(in srgb, #2fcf93 8%, var(--surface));
}

.browser-health-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--surface-muted);
}

.browser-health-filters label {
  display: grid;
  flex: 1 1 10rem;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.browser-health-filters button,
.browser-health-filters > a {
  min-height: 2.75rem;
}

.browser-health-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.browser-health-metrics article,
.browser-health-breakdowns > article,
.browser-health-activity {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  background: var(--surface-muted);
}

.browser-health-metrics article {
  display: grid;
  gap: 0.15rem;
}

.browser-health-metrics span,
.browser-health-metrics small {
  color: var(--muted);
}

.browser-health-metrics strong {
  color: var(--text);
  font-size: 1.85rem;
  line-height: 1.1;
}

.browser-health-metric-silk {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)) !important;
}

.browser-health-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.browser-health-breakdowns h2 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.diagnostic-bar-row {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.65rem;
}

.diagnostic-bar-row > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.diagnostic-bar {
  display: block;
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--border);
}

.diagnostic-bar i {
  display: block;
  width: var(--diagnostic-bar);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.browser-health-activity {
  padding: 0;
  overflow: hidden;
}

.browser-health-activity > header {
  padding: 1rem;
}

.browser-health-table-wrap {
  overflow-x: auto;
}

.browser-health-activity table {
  min-width: 58rem;
}

.browser-health-activity small,
.diagnostic-empty {
  color: var(--muted);
}

.diagnostic-severity {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.diagnostic-severity-info {
  background: rgb(59 130 246 / 18%);
  color: #93c5fd;
}

.diagnostic-severity-warning {
  background: rgb(245 184 75 / 18%);
  color: #f5c96f;
}

.diagnostic-severity-error {
  background: rgb(239 68 68 / 18%);
  color: #fca5a5;
}

.browser-health-source {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}





.status-warning {
  border: 1px solid #f5b84b;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #fff3cd;
  color: #6f4300;
}

@media (max-width: 720px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-inline: 0.75rem;
  }

  .header-top-row {
    flex: 0 0 100%;
    gap: 0.5rem;
  }

  .brand {
    flex: 0 1 auto;
    gap: 0.5rem;
    max-width: 100%;
    min-width: 0;
  }

  .brand-logo {
    width: 1.8rem;
    height: 1.8rem;
  }

  .team-brand {
    width: auto;
    height: 3.25rem;
    max-width: 100%;
  }

  .team-brand-customized {
    width: fit-content;
    max-width: 100%;
  }

  .team-header-logo {
    width: auto;
    height: auto;
    max-width: min(8rem, 28vw);
    max-height: 3.25rem;
    border-radius: 5px;
  }

  .team-brand-customized .team-header-text {
    max-width: 36vw;
    min-width: 0;
  }

  .brand-copy strong {
    font-size: 1rem;
  }

  .brand-copy small {
    max-width: 8.75rem;
    font-size: 0.58rem;
    letter-spacing: 0.045em;
    white-space: normal;
  }

  .site-nav {
    order: 3;
    flex: 0 0 100%;
    margin-left: 0;
    width: 100%;
  }

  .team-switcher {
    width: 100%;
  }

  .team-switcher select {
    max-width: none;
    flex: 1;
  }

  .header-actions {
    align-self: center;
    flex: 0 0 auto;
    margin-left: 0;
    white-space: nowrap;
  }

  .site-main {
    width: min(100% - 1rem, 1180px);
  }

  .library-controls,
  .admin-dashboard-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-controls input,
  .library-controls select,
  .library-controls button {
    width: 100%;
  }

  .coach-tool-guide-body {
    padding-left: 1rem;
  }

  .browser-health-header {
    align-items: start;
    flex-direction: column;
  }

  .browser-health-breakdowns {
    grid-template-columns: 1fr;
  }
}

/* Coach Smoke basketball video portal */
.video-app-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 1.5rem;
  padding: clamp(1rem, 2.5vw, 2rem);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
}

.library-hero-bar,
.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.library-hero-bar h1,
.section-heading-row h2 {
  margin: 0;
}

.library-hero-bar h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.library-subtitle,
.section-heading-row p {
  max-width: 760px;
  color: var(--muted);
}

.library-quick-stats {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.library-quick-stats span,
.duration-badge,
.video-card-kicker,
.category-chip {
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: var(--text);
  text-decoration: none;
}

.library-quick-stats span {
  display: grid;
  min-width: 7rem;
  padding: 0.75rem 1rem;
  text-align: center;
}

.library-quick-stats strong {
  color: var(--accent-2);
  font-size: 1.3rem;
}

.video-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(12rem, 0.45fr) minmax(10rem, 0.35fr) auto auto;
  gap: 0.85rem;
  align-items: end;
  margin: 1.5rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 1rem;
  background: rgb(7 9 15 / 58%);
}

.video-toolbar label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.video-toolbar input,
.video-toolbar select {
  width: 100%;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: var(--accent-contrast);
  font-weight: 900;
}

.category-chip-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.category-chip {
  padding: 0.5rem 0.8rem;
  font-weight: 800;
}

.category-chip:hover {
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.category-breadcrumbs {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1.25rem 0 1rem;
  color: var(--muted);
  font-weight: 800;
}

.category-breadcrumbs a {
  color: var(--accent-2);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  border-radius: 0.2rem;
}

.category-breadcrumbs a:hover {
  color: var(--text);
  text-decoration-color: var(--accent-2);
}

.category-breadcrumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--text);
}

.category-breadcrumbs .breadcrumb-separator {
  color: var(--muted);
  font-weight: 700;
}

.category-breadcrumbs [aria-current="page"] {
  color: var(--text);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.category-tile {
  display: flex;
  align-items: center;
  min-height: 8.5rem;
  padding: 1.25rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.75rem;
  background: rgb(17 24 39 / 70%);
  color: var(--text);
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.category-tile:hover,
.category-tile:focus {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.video-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1rem;
  margin: 1.25rem 0;
}

.featured-player-card,
.empty-state-card {
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 1.2rem;
  background: var(--surface-glass, var(--surface));
  box-shadow: var(--shadow);
}

.featured-player-card {
  overflow: hidden;
}

.featured-player-link,
.video-card-link {
  position: relative;
  display: block;
  text-decoration: none;
}

.featured-video-frame,
.court-thumb,
.video-thumb,
.video-thumb-placeholder {
  aspect-ratio: 16 / 9;
  width: 100%;
}

.featured-video-frame {
  position: relative;
  overflow: hidden;
  background: #0a0f1a;
}

.featured-video-thumb,
.video-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Portrait clips cropped into 16:9 boxes: favour the upper part so heads stay in frame. */
  object-position: center 20%;
}

.court-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, transparent 0 14%, rgb(255 255 255 / 22%) 14.5% 15%, transparent 15.5%),
    linear-gradient(90deg, transparent 49.5%, rgb(255 255 255 / 18%) 50%, transparent 50.5%),
    linear-gradient(135deg, #281209, #8b3a14 45%, #1a2233);
}

.court-thumb-large {
  min-height: 20rem;
}

.court-center,
.play-orb {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  color: var(--accent-contrast);
  font-weight: 900;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent);
}

.play-orb {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.duration-badge {
  position: absolute;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.duration-badge {
  right: 0.65rem;
  bottom: 0.65rem;
  background: rgb(0 0 0 / 72%);
}

.playback-rate-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
  background: rgb(7 9 15 / 70%);
}

.playback-rate-controls button {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
}

.playback-rate-controls button[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.playback-rate-controls .video-fullscreen-button {
  margin-left: auto;
}

.mock-player-controls {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #070b12;
  color: var(--muted);
}

.mock-timeline {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
}

.mock-timeline span,
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.featured-copy {
  padding: 1rem 1.15rem 1.25rem;
}

.featured-copy h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.featured-copy p:not(.eyebrow) {
  color: var(--muted);
}

.video-grid {
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.organize-video-form {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.organize-video-section {
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 1rem;
  background: rgb(17 24 39 / 42%);
}

.organize-video-section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.organize-video-section-heading p,
.organize-video-empty {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.organize-video-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.organize-video-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.85rem;
  background: rgb(17 24 39 / 70%);
}

.organize-video-position {
  display: inline-grid;
  min-height: 2.4rem;
  place-items: center;
  border-radius: 0.65rem;
  color: var(--accent-contrast, #111827);
  background: var(--accent);
  font-size: 0.9rem;
  font-weight: 900;
}

.organize-video-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.organize-video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.organize-video-actions .button {
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
}

.category-video-placement-heading {
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 680px) {
  .organize-video-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .organize-video-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .organize-video-actions .button {
    flex: 1 1 auto;
  }
}

.video-card {
  position: relative;
  overflow: hidden;
  border-color: rgb(255 255 255 / 10%);
  border-radius: 1rem;
  background: rgb(17 24 39 / 86%);
}

.video-card-body {
  padding: 0.9rem;
}

.video-card-kicker {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.55rem;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.25;
}

.video-title a {
  text-decoration: none;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0.35rem 0 0.7rem;
  font-size: 0.9rem;
}

.progress-track {
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
}

.progress-track span {
  width: 42%;
}

.empty-state-card {
  padding: 2rem;
  text-align: center;
}

.compact-empty-state {
  margin-top: 1.5rem;
}

@media (max-width: 980px) {
  .video-toolbar,
  .video-stage {
    grid-template-columns: 1fr;
  }

  .library-hero-bar,
  .section-heading-row {
    align-items: start;
    flex-direction: column;
  }
}

.daily-progress-page {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem;
}

.daily-progress-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.daily-progress-header .eyebrow {
  margin: 0 0 0.25rem;
}

.daily-progress-header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.daily-progress-header time,
.progress-period-date {
  color: var(--muted);
  font-weight: 700;
}

.progress-period-nav {
  max-width: 100%;
  margin-top: 1.25rem;
  overflow-x: auto;
}

.progress-period-toggle {
  display: grid;
  grid-template-columns: repeat(5, minmax(5.25rem, 1fr));
  width: min(100%, 38rem);
  min-width: 27rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: rgb(255 255 255 / 4%);
}

.progress-period-toggle a {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.progress-period-toggle a:last-child {
  border-right: 0;
}

.progress-period-toggle a:hover,
.progress-period-toggle a:focus-visible {
  color: var(--text);
  background: rgb(255 255 255 / 7%);
}

.progress-period-toggle a.is-active {
  color: #07130f;
  background: #2fcf93;
}

.daily-progress-chart {
  margin: 2rem 0 0;
}

.daily-progress-chart figcaption {
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.daily-progress-axis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 0.45rem 12rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.daily-progress-axis span:nth-child(2) {
  text-align: center;
}

.daily-progress-axis span:last-child {
  text-align: right;
}

.daily-progress-row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(255 255 255 / 7%);
}

.daily-progress-row:last-child {
  border-bottom: 1px solid rgb(255 255 255 / 7%);
}

.daily-progress-label {
  min-width: 0;
}

.daily-progress-label h2 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.daily-progress-label output {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.daily-progress-track {
  position: relative;
  height: 1.25rem;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0.35rem;
  background:
    linear-gradient(to right, transparent 49.8%, rgb(255 255 255 / 12%) 50%, transparent 50.2%),
    rgb(255 255 255 / 6%);
}

.daily-progress-track span {
  display: block;
  width: var(--daily-progress-fill);
  min-width: 0;
  height: 100%;
  transition: width 220ms ease;
}

.daily-progress-row--watch .daily-progress-track span {
  background: #2fcf93;
}

.daily-progress-row--practice .daily-progress-track span {
  background: #ff9f43;
}

.video-study-breakdown {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.video-study-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.video-study-header .eyebrow,
.video-study-header h2,
.video-study-header > p {
  margin: 0;
}

.video-study-header h2 {
  margin-top: 0.25rem;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.video-study-header > p {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.video-study-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.video-study-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(10rem, 0.65fr);
  gap: 1rem 1.5rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 4%);
}

.video-study-title h3,
.video-study-title p {
  margin: 0;
}

.video-study-title h3 {
  font-size: 1rem;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.video-study-title h3 a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.video-study-title p,
.video-study-time span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.video-study-time {
  min-width: 0;
  text-align: right;
}

.video-study-time strong,
.video-study-time span {
  display: block;
  font-variant-numeric: tabular-nums;
}

.video-study-track {
  height: 0.4rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
}

.video-study-track span {
  display: block;
  width: var(--video-study-fill);
  height: 100%;
  border-radius: inherit;
  background: #2fcf93;
}

.video-study-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.video-study-facts div {
  min-width: 0;
}

.video-study-facts dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.video-study-facts dd {
  margin: 0.25rem 0 0;
  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.video-study-empty,
.video-study-legacy {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 4%);
}

.video-study-empty h3,
.video-study-empty p {
  margin: 0;
}

.video-study-empty h3 {
  font-size: 1rem;
}

.video-study-empty p,
.video-study-legacy span {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.video-study-legacy {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  border-style: dashed;
}

.video-study-legacy strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.practice-entry {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.practice-entry h2 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.practice-entry form {
  display: flex;
  align-items: end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.practice-entry form > div {
  display: grid;
  gap: 0.3rem;
}

.practice-entry input {
  width: 8rem;
}

.coach-progress-roster {
  margin-top: 2rem;
}

.coach-progress-roster-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.coach-progress-roster-header h2,
.coach-progress-roster-header p {
  margin: 0;
  letter-spacing: 0;
}

.coach-progress-roster-header h2 {
  font-size: 1.15rem;
}

.coach-progress-roster-header p,
.coach-progress-scale {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.coach-progress-list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
  list-style: none;
}

.coach-progress-player {
  display: grid;
  grid-template-columns: minmax(10rem, 0.8fr) repeat(2, minmax(14rem, 1fr));
  align-items: center;
  gap: 1.25rem;
  min-height: 6rem;
  padding: 1rem 0;
  border-top: 1px solid rgb(255 255 255 / 9%);
}

.coach-progress-identity,
.coach-progress-metric {
  min-width: 0;
}

.coach-progress-identity strong,
.coach-progress-identity small {
  display: block;
  overflow-wrap: anywhere;
}

.coach-progress-identity small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.coach-progress-identity strong a,
.coach-progress-detail-link {
  color: var(--accent-2);
  text-decoration: none;
}

.coach-progress-identity strong a:hover,
.coach-progress-identity strong a:focus-visible,
.coach-progress-detail-link:hover,
.coach-progress-detail-link:focus-visible {
  text-decoration: underline;
}

.coach-progress-detail-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.player-progress-detail-header {
  align-items: flex-start;
}

.player-progress-detail-header h1 + p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.coach-progress-metric-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}

.coach-progress-metric-label span {
  font-weight: 800;
}

.coach-progress-metric-label output {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.coach-progress-metric--watch .daily-progress-track span {
  background: #2fcf93;
}

.coach-progress-metric--practice .daily-progress-track span {
  background: #ff9f43;
}

.coach-progress-empty {
  padding: 1.5rem 0;
  border-top: 1px solid rgb(255 255 255 / 9%);
  color: var(--muted);
}

@media (max-width: 900px) {
  .coach-progress-player {
    grid-template-columns: minmax(9rem, 0.7fr) minmax(0, 1fr);
  }

.coach-progress-identity {
    grid-row: span 2;
  }
}

@media (max-width: 680px) {
  .daily-progress-header {
    align-items: start;
    flex-direction: column;
  }

  .daily-progress-axis {
    margin-left: 0;
  }

  .daily-progress-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .daily-progress-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .daily-progress-label output {
    margin-top: 0;
  }

  .video-study-header,
  .video-study-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .video-study-time {
    text-align: left;
  }

  .video-study-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-study-legacy {
    align-items: start;
    flex-direction: column;
  }

  .coach-progress-roster-header,
  .coach-progress-player {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .coach-progress-roster-header {
    display: grid;
  }

  .coach-progress-identity {
    grid-row: auto;
    padding-bottom: 0.25rem;
  }
}

.watch-app-shell {
  display: grid;
  gap: 1rem;
}

.watch-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.watch-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.watch-actions a {
  color: var(--accent-2);
  font-weight: 800;
  text-decoration: none;
}

.watch-category-breadcrumbs {
  margin: 0;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.watch-main-column {
  display: grid;
  gap: 1rem;
}

.watch-player-card,
.watch-title-card,
.watch-notes-card {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 1.2rem;
  background: var(--surface-glass, var(--surface));
  box-shadow: var(--shadow);
}

.watch-player-card video {
  display: block;
  width: 100%;
  max-height: 72vh;
  background: #000;
}

.video-quality {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.65rem;
  padding: 0.5rem 1rem 1rem;
}

.video-quality a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.video-quality [aria-current="true"] {
  font-weight: 700;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.video-quality small {
  flex-basis: 100%;
}

.watch-title-card,
.watch-notes-card {
  padding: 1rem;
}

.watch-title-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.watch-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.watch-meta div {
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 0.85rem;
  padding: 0.75rem;
  background: rgb(255 255 255 / 5%);
}

.watch-meta dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.watch-meta dd {
  margin: 0.2rem 0 0;
  font-weight: 800;
}

.watch-test-action {
  margin: 1rem 0 0;
}

.comment-form,
.reply-form,
.edit-comment-form,
.delete-comment-form {
  display: grid;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.comment-form textarea,
.reply-form textarea,
.edit-comment-form textarea {
  width: 100%;
}

.comment-picture-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.comment-picture-control input[type="file"] {
  width: min(100%, 20rem);
  padding: 0.45rem;
}

.comment-picture {
  display: grid;
  justify-items: start;
  margin: 0.75rem 0 0;
}

.comment-picture a {
  display: inline-grid;
  max-width: 100%;
}

.comment-picture img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 22rem;
  object-fit: contain;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.85rem;
  background: #05070c;
}

.comments-list,
.comment-replies {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
}

.comment article {
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 0.85rem;
  padding: 0.75rem;
  background: rgb(255 255 255 / 4%);
}

.video-test-card h1 {
  margin-top: 0;
}

.test-submission-list {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
}

.test-submission-list li,
.inline-score-form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.status-pass {
  color: #74f0a7;
  font-weight: 800;
}

.status-fail {
  color: #ff9b8f;
  font-weight: 800;
}

.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.tag-list li {
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgb(255 255 255 / 6%);
}

.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;
}

.coach-notes-page {
  display: grid;
  gap: 1rem;
  width: min(100%, 72rem);
  margin: 0 auto;
}

.coach-notes-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.coach-notes-header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.coach-notes-header .eyebrow,
.coach-notes-summary {
  margin: 0;
}

.coach-notes-summary {
  color: var(--muted);
  white-space: nowrap;
}

.coach-notes-summary strong {
  color: var(--text);
}

.coach-notes-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.coach-note-filters {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.coach-note-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.45rem;
  padding: 0.45rem 0.7rem;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.coach-note-filter:last-child {
  border-right: 0;
}

.coach-note-filter:hover,
.coach-note-filter:focus,
.coach-note-filter.is-active {
  background: var(--surface-muted);
  color: var(--text);
}

.coach-note-filter.is-active {
  box-shadow: inset 0 -3px var(--accent);
}

.coach-note-filter-count {
  min-width: 1.25rem;
  text-align: center;
  color: var(--text);
  font-size: 0.76rem;
}

.coach-notes-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.coach-notes-search input[type="search"] {
  width: min(17rem, 48vw);
  min-height: 2.45rem;
}

.coach-notes-search a {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.coach-note-list {
  display: grid;
  gap: 0.75rem;
}

.coach-note-thread {
  display: grid;
  gap: 0.8rem;
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: 8px;
  padding: 1rem;
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(0 0 0 / 14%);
}

.coach-note-thread.is-unread {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent));
}

.coach-note-thread.is-resolved {
  opacity: 0.82;
}

.coach-note-thread-header,
.coach-note-video-row,
.coach-note-reply-heading,
.coach-note-actions,
.coach-note-reply-options {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.coach-note-thread-header {
  align-items: start;
  justify-content: space-between;
}

.coach-note-author,
.coach-note-meta,
.coach-note-body,
.coach-note-replies p {
  margin: 0;
}

.coach-note-author {
  font-size: 1rem;
  font-weight: 850;
}

.coach-note-meta,
.coach-note-reply-heading {
  color: var(--muted);
  font-size: 0.8rem;
}

.coach-note-statuses {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.coach-note-status {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 850;
}

.status-unread {
  border-color: #e36d1a;
  color: #ffb27b;
}

.status-reply {
  border-color: #c89a28;
  color: #f6cc62;
}

.status-resolved {
  border-color: #308a63;
  color: #79d9ad;
}

.coach-note-video-row {
  justify-content: space-between;
  border-block: 1px solid var(--border);
  padding: 0.55rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.coach-note-video-row a {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.coach-note-video-row a:hover,
.coach-note-video-row a:focus,
.coach-note-actions a:hover,
.coach-note-actions a:focus {
  color: var(--accent-2);
  text-decoration: underline;
}

.coach-note-video-row a span {
  margin-left: 0.35rem;
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.coach-note-body {
  overflow-wrap: anywhere;
}

.coach-note-image {
  display: inline-grid;
  justify-self: start;
}

.coach-note-image img {
  display: block;
  width: auto;
  max-width: min(100%, 24rem);
  max-height: 18rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  object-fit: contain;
}

.coach-note-replies {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--border);
  list-style: none;
}

.coach-note-replies li {
  display: grid;
  gap: 0.3rem;
}

.coach-note-reply-heading strong {
  color: var(--text);
}

.coach-note-reply-heading a {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

.coach-note-actions {
  padding-top: 0.25rem;
}

.coach-note-actions form {
  margin: 0;
}

.coach-note-actions button,
.coach-note-actions a {
  min-height: 2.1rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 750;
}

.coach-note-actions a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

.coach-note-reply-form {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.coach-note-reply-form > label {
  font-size: 0.82rem;
  font-weight: 800;
}

.coach-note-reply-form textarea {
  width: 100%;
  resize: vertical;
}

.coach-note-reply-options label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.coach-note-reply-options input[type="file"] {
  max-width: 15rem;
}

.coach-note-reply-options input[type="number"] {
  width: 6.5rem;
}

.coach-note-reply-options .button-primary {
  margin-left: auto;
}

.coach-notes-empty {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
}

.coach-notes-empty h2,
.coach-notes-empty p {
  margin: 0;
}

.coach-notes-empty h2 {
  color: var(--text);
  font-size: 1.15rem;
}

.coach-notes-empty p {
  margin-top: 0.25rem;
}

@media (max-width: 980px) {
  .page-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .page-alert .button {
    align-self: start;
  }

  .login-field {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .login-help summary {
    margin-left: 0;
    margin-right: 0;
  }

  .login-help-tip {
    text-align: left;
  }

  .login-actions button {
    justify-self: end;
    margin-left: 0;
  }

  .watch-layout,
  .watch-meta {
    grid-template-columns: 1fr;
  }

  .coach-notes-header {
    align-items: start;
    flex-direction: column;
  }

  .coach-notes-controls,
  .coach-notes-search {
    align-items: stretch;
    width: 100%;
  }

  .coach-note-filters {
    width: 100%;
  }

  .coach-note-filter {
    flex: 1 0 auto;
    justify-content: center;
  }

  .coach-notes-search input[type="search"] {
    width: 100%;
    min-width: 0;
  }

  .coach-note-video-row {
    align-items: start;
    flex-direction: column;
  }

  .coach-note-reply-options .button-primary {
    margin-left: 0;
  }

  .notification-panel {
    position: fixed;
    top: 4.5rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: calc(100vh - 5.25rem);
  }

}

/* Keep the coach's sequence easy to follow on touch screens. */
.video-sequence-label { color: var(--text); font-size: .85rem; letter-spacing: .02em; }
.video-order-guide { color: var(--muted); line-height: 1.5; }
.watch-sequence { padding: 1rem; border: 1px solid var(--border); border-radius: 1rem; background: var(--surface); }
.watch-sequence > p { margin: 0 0 .75rem; }
.watch-sequence-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.watch-sequence-links > a { flex: 1 1 180px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .3rem; min-width: 0; min-height: 56px; white-space: normal; }
.watch-sequence-links strong { overflow-wrap: anywhere; }
.video-sequence-end { margin: 0; padding: .5rem 0; }
/* Native touch scrolling with a finite, snapping video strip. */
.video-carousel { min-width: 0; max-width: 100%; }
.video-library .video-sequence { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(82%, 42rem); gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .3rem 0 .75rem; }
.video-sequence .video-card { min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.video-sequence .video-thumb, .video-sequence .court-thumb { aspect-ratio: 16 / 9; width: 100%; height: auto; object-fit: cover; }
.video-sequence .video-card-body { min-width: 0; }
.video-sequence .video-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.video-sequence:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.video-carousel-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.video-carousel-controls[hidden] { display: none; }
.video-carousel-controls button { min-height: 44px; }
.video-carousel-controls span { color: var(--muted); font-size: .85rem; text-align: center; }
.video-carousel-controls button:disabled { opacity: .4; cursor: default; }
@media (max-width: 480px) {
 .video-sequence .video-card-body { padding: .75rem; }
 .video-carousel-controls span { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
 .video-library .video-sequence { scroll-behavior: auto; }
}

/* ==========================================================================
   2026-10 UX clean-up: spacing scale, slim header, bottom nav, profile,
   pricing. Appended last so it refines earlier rules without rewriting them.
   ========================================================================== */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --radius: 0.9rem;
  --tap: 44px;
  --bottom-nav-height: 64px;
}

/* Visible keyboard focus everywhere. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.button,
button {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 600;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-4);
}

.card h2 { margin: 0 0 var(--space-3); font-size: 1.1rem; }
.muted { color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
}

/* Slim header: logo and bell. */
.site-header {
  padding: var(--space-2) clamp(var(--space-4), 3vw, var(--space-6));
  padding-top: max(var(--space-2), env(safe-area-inset-top));
  gap: var(--space-2);
  flex-wrap: nowrap;
}
.header-top-row { flex: 0 1 auto; width: auto; }
.team-brand,
.team-brand-customized { height: auto; min-height: 0; }
.team-header-logo { max-height: 2.75rem; max-width: 10rem; }
.team-header-text { max-width: 12rem; }
.header-actions .notification-center { flex: 0 0 auto; }
.notification-bell {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.notification-bell-icon { display: block; width: 22px; height: 22px; flex: none; }
.notification-bell .notification-badge { top: -4px; right: -4px; }

/* Desktop: one compact row of links beside the logo. */
.site-nav {
  order: 1;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.site-nav a {
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.site-nav a:hover { color: var(--text); background: var(--surface-muted); }
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-muted);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.site-nav .site-nav-profile { border-color: var(--border); color: var(--text); }
.header-top-row .header-actions { order: 2; }
.site-header > .header-top-row { order: 0; }

/* Bottom navigation for phones and tablets (incl. Fire / Silk). */
.bottom-nav { display: none; }

@media (max-width: 1023px), (pointer: coarse) {
  .site-header .site-nav:not(.site-nav-public) { display: none; }
  .site-header { justify-content: space-between; }
  .header-top-row { flex: 1 1 auto; width: 100%; }
  body.has-bottom-nav { padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)); }
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgb(0 0 0 / 30%);
  }
  .bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--bottom-nav-height);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
  }
  .bottom-nav svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bottom-nav a[aria-current="page"] { color: var(--accent); }
  .bottom-nav a[aria-current="page"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--accent);
  }
  .bottom-nav a:focus-visible { outline-offset: -3px; }
  .bottom-nav-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 8px);
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 0.68rem;
    line-height: 1.15rem;
    text-align: center;
  }
}

.site-main { margin-top: var(--space-4); margin-bottom: var(--space-6); }

/* Library / category: videos first. */
.video-library { display: grid; gap: var(--space-4); }
.library-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); }
.library-header h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; }
.library-header h1.library-heading-compact { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.library-header .category-breadcrumbs { margin: 0; font-size: 1rem; }
.library-header .category-breadcrumbs a,
.library-header .category-breadcrumbs span[aria-current] { display: inline-flex; align-items: center; min-height: var(--tap); }
.library-header .category-breadcrumbs span[aria-current] { color: var(--text); font-weight: 800; }
.video-library .section-heading-row { align-items: center; }
.video-library .section-heading-row h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
.video-library .category-tile { min-height: 5.5rem; }

.how-it-works {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}
.how-it-works summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
.how-it-works[open] summary { color: var(--text); }
.how-it-works > :not(summary) { margin: 0; padding: 0 var(--space-4) var(--space-4); }
.how-it-works dt { font-weight: 700; margin-top: var(--space-3); }
.how-it-works dd { margin: 0; color: var(--muted); }

/* Home. */
.home-screen { gap: var(--space-4); }
.home-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.home-header h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.home-quick-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.home-video-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.home-video-block h2 { font-size: 1.05rem; }

/* Login: pricing link. */
.login-trial-link a { color: var(--accent); font-weight: 700; }
.login-trial-link { font-size: 1rem; }

/* Profile. */
.profile-page { display: grid; gap: var(--space-4); width: min(100%, 64rem); margin: 0 auto; }
.profile-hero { display: flex; align-items: center; gap: var(--space-4); }
.profile-hero h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); line-height: 1.1; }
.profile-meta { margin: var(--space-1) 0 0; color: var(--muted); }
.profile-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 1.5rem;
  font-weight: 900;
}
.profile-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: 0 0 var(--space-4); }
.profile-stats dt { color: var(--muted); font-size: 0.85rem; }
.profile-stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; }
.profile-team-list,
.profile-link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.profile-team-list li { display: flex; align-items: center; gap: var(--space-2); min-height: var(--tap); }
.profile-team-list img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.profile-link-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--space-2); }
.profile-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-muted);
  text-decoration: none;
  font-weight: 600;
}
.profile-link-list a::after { content: "›"; color: var(--muted); font-size: 1.2rem; }
.profile-link-list a:hover { border-color: var(--accent); }
.profile-page .team-switcher { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-1); margin-top: var(--space-3); max-width: 100%; }
.profile-page .team-switcher select { max-width: 100%; width: 100%; min-width: 0; min-height: var(--tap); border-radius: 0.6rem; }
.profile-logout { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.profile-logout form { margin: 0; }
.profile-logout .button { min-width: 8.5rem; }
.help-button { position: relative; justify-content: center; }
.help-button-badge {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; margin-left: var(--space-2);
  border-radius: 999px; padding: 0 0.3rem; background: var(--accent); color: var(--accent-contrast);
  font-size: 0.78rem; font-weight: 800; line-height: 1;
}

/* Help chat and inbox. */
.help-chat, .help-inbox { display: grid; gap: var(--space-4); width: min(100%, 46rem); margin: 0 auto; min-width: 0; }
.help-chat-header h1 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.help-chat-header .eyebrow { margin: 0 0 var(--space-1); }
.help-chat-meta { margin: var(--space-1) 0 0; color: var(--muted); overflow-wrap: anywhere; }
.help-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.help-bubble {
  max-width: min(85%, 34rem); padding: var(--space-2) var(--space-3); border-radius: 1rem;
  border: 1px solid var(--border); background: var(--surface-muted); min-width: 0;
}
.help-bubble.is-mine { align-self: flex-end; border-color: transparent; background: var(--accent); color: var(--accent-contrast); border-bottom-right-radius: 0.3rem; }
.help-bubble.is-theirs { align-self: flex-start; border-bottom-left-radius: 0.3rem; }
.help-bubble-label { display: block; font-size: 0.75rem; font-weight: 700; opacity: 0.85; overflow-wrap: anywhere; }
.help-bubble-body { margin: var(--space-1) 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.help-bubble time { display: block; font-size: 0.72rem; opacity: 0.75; }
.help-bubble.is-mine time, .help-bubble.is-mine .help-bubble-label { text-align: right; }
.help-empty { margin: 0; padding: var(--space-4); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }
.help-compose { display: grid; gap: var(--space-2); }
.help-compose textarea { width: 100%; min-width: 0; box-sizing: border-box; resize: vertical; font: inherit; }
.help-compose .button { justify-self: end; min-width: 7rem; }
.help-compose-error { margin: 0; color: #fca5a5; }
.help-thread-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.help-thread-row {
  display: grid; gap: var(--space-1); padding: var(--space-3); border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-muted); color: inherit; text-decoration: none; min-width: 0;
}
.help-thread-row:hover { border-color: var(--accent); }
.help-thread-row.is-unread { border-color: var(--accent); }
.help-thread-top { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.help-thread-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-thread-top time { flex: none; color: var(--muted); font-size: 0.78rem; }
.help-unread-badge { position: static; border-color: transparent; }
.help-thread-meta, .help-thread-preview { color: var(--muted); font-size: 0.88rem; overflow-wrap: anywhere; }
.help-thread-preview { color: var(--text); }

/* Pricing. */
.pricing-page { display: grid; gap: var(--space-5); width: min(100%, 60rem); margin: 0 auto; }
.pricing-hero { text-align: center; }
.pricing-hero h1 { margin: 0; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.1; }
.pricing-lede { margin: var(--space-3) auto 0; max-width: 36rem; color: var(--muted); font-size: 1.05rem; }
.pricing-plans { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pricing-plan { position: relative; display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5); }
.pricing-plan h2 { margin: 0; }
.pricing-plan p { margin: 0; }
.pricing-plan-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.pricing-badge { position: absolute; top: var(--space-4); right: var(--space-4); }
.pricing-price { display: flex; align-items: baseline; gap: var(--space-2); }
.pricing-amount { font-size: 2.4rem; font-weight: 900; letter-spacing: -0.03em; }
.pricing-period { color: var(--muted); }
.pricing-plan .button { margin-top: var(--space-3); }
.table-scroll { overflow-x: auto; }
.pricing-matrix { width: 100%; border-collapse: collapse; min-width: 30rem; }
.pricing-matrix th,
.pricing-matrix td { padding: var(--space-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.pricing-matrix thead th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.pricing-matrix tbody th { font-weight: 600; }
.pricing-matrix .check { color: var(--accent); font-weight: 900; font-size: 1.1rem; }
.pricing-contact p { margin: 0 0 var(--space-3); color: var(--muted); }

/* Coach page guides start collapsed; tidy the summary. */
.coach-tool-guide:not([open]) { margin-bottom: var(--space-3); }

@media (max-width: 480px) {
  .site-main { width: calc(100% - 2rem); }
  .pricing-plan { padding: var(--space-4); }
}
.pricing-page > *,
.profile-page > *,
.video-library > * { min-width: 0; }
.video-library .section-heading-row h2 { margin-right: auto; }
/* A lone video should sit centred, not hug the left edge of the rail. */
.video-library .video-sequence.video-sequence--single { grid-auto-columns: min(100%, 42rem); justify-content: center; }
.video-sequence--single .video-card { scroll-snap-align: center; }
/* Phones: cards nearly full width; a thin sliver of the next card hints at swiping. */
@media (max-width: 760px) {
  .video-library .video-sequence { grid-auto-columns: 92%; gap: .6rem; }
  .video-library .video-sequence.video-sequence--single { grid-auto-columns: 100%; }
}
@media (max-width: 980px) {
  /* Stacked heading row: keep the title and its action left-aligned together. */
  .video-library .section-heading-row { align-items: flex-start; }
}
.video-carousel-controls button { white-space: nowrap; }
@media (min-width: 1024px) and (pointer: fine) {
  .header-top-row { flex: 0 0 auto; }
  .header-top-row .brand { flex: 0 0 auto; }
  .team-brand-customized { max-width: none; }
  .team-header-text { white-space: nowrap; max-width: none; flex: 0 0 auto; }
  .team-header-logo { flex: 0 0 auto; height: 2.75rem; }
  .header-top-row .brand { min-width: max-content; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.header-team-switcher { width: auto; }
/* The full-screen playbook editor keeps its own controls; no bottom bar there. */
body.playbook-page .bottom-nav { display: none; }
body.playbook-page.has-bottom-nav { padding-bottom: 0; }
/* Coach/admin tools: one column; breadcrumbs replace the old tool chip row. */
.admin-dashboard-shell > * { min-width: 0; max-width: 100%; }

/* Role-specific "Start here" videos */
.home-video-grid--single { grid-template-columns: minmax(0, 1fr); }
.home-video-label { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent, #f28c28); }
.home-video-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; min-width: 0; aspect-ratio: 16 / 9; padding: 1rem; text-align: center; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted, inherit); }
.home-video-empty p { margin: 0; max-width: 100%; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------
   Header identity (logo + name home link). Authoritative rules: they
   sit last on purpose and override the older .brand/.team-brand layers.
   - Logo lives in a fixed-height box; any image shape is contained.
   - Name is a single line with an ellipsis (keeps the header one fixed
     height on every device and never wraps under the bell).
   - The link shrinks; header actions (team switcher, bell) never do.
   ------------------------------------------------------------------ */
.site-header .header-top-row { min-width: 0; }
.site-header .header-top-row .header-identity,
.site-header .header-identity {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 64px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}
.site-header .header-identity:hover,
.site-header .header-identity:focus { text-decoration: none; }
.site-header .header-identity:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.header-identity .brand-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 64px;
  min-width: 36px;
  max-width: 10rem;
  overflow: hidden;
}
.header-identity .brand-logo-box img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 64px;
  min-width: 0;
  object-fit: contain;
  object-position: left center;
  border-radius: 6px;
  padding: 0;
}
.header-identity:not(.team-brand) .brand-logo-box,
.header-identity .brand-mark { width: 64px; min-width: 64px; height: 64px; }
.header-identity .brand-mark { border-radius: 0; }
/* Broken/missing team logo: hide it and show the default mark + name. */
.header-identity .brand-logo-box .brand-mark-fallback,
.header-identity .brand-name-fallback { display: none; }
.header-identity.logo-failed .brand-logo-box .team-header-logo { display: none; }
.header-identity.logo-failed .brand-logo-box .brand-mark-fallback { display: block; }
.header-identity.logo-failed .brand-logo-box { width: 64px; min-width: 64px; }
.header-identity.logo-failed .brand-name-fallback { display: block; }
.header-identity .brand-name,
.header-identity .brand-copy strong,
.header-identity .brand-copy small {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}
.header-identity .brand-name { flex: 0 1 auto; line-height: 1.15; color: var(--team-header-text-color, var(--text)); }
.header-identity .brand-name-fallback { font-weight: 800; }
.header-identity .brand-copy { display: grid; line-height: 1.1; }
.header-identity .brand-copy small { max-width: none; white-space: nowrap; }
.site-header .header-top-row .header-actions { flex: 0 0 auto; margin-left: auto; }
/* Public nav (e.g. "Pricing") takes only its own width so the brand keeps the rest. */
.site-header .site-nav-public { flex: 0 0 auto; width: auto; min-width: 0; }
/* Team menu beside the emblem: reads like the wordmark (bold white), with a
   small chevron so it still looks tappable. No box or ring; focus ring only
   for keyboard users. */
.site-header .header-identity.has-team-menu { flex: 0 0 auto; }
.site-header .header-team-switcher {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  min-height: var(--tap);
  margin: 0;
  border-radius: 6px;
}
/* What you see: the selected team's name, sized to its text, with a chevron. */
.header-team-switcher .team-menu-label {
  display: block;
  min-width: 0;
  padding-right: 0.85em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23cbd5e1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.1em center / 0.55em auto;
}
/* What you tap: the real select, invisible, stretched over the label. */
.header-team-switcher select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: var(--tap);
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}
@media (min-width: 1024px) and (pointer: fine) {
  .site-header .header-team-switcher { flex: 0 0 auto; max-width: 13rem; }
}
.header-team-switcher:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.header-team-switcher option { color: var(--text); background: var(--surface, #111827); font-weight: 600; }
/* Admin viewing another coach's team: " · coachname" after the team name. */
.header-team-switcher .team-menu-owner { color: var(--muted); font-size: 0.72em; font-weight: 700; }
/* Admin "Other coaches' teams…" picker: a panel under the sticky header. */
.header-other-teams:not([hidden]) {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem clamp(1rem, 4vw, 2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.header-other-teams label { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.header-other-teams-row { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.header-other-teams select {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 0.6rem;
  color: var(--text);
  font-size: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.header-other-teams select option, .header-other-teams select optgroup { color: var(--text); background: var(--surface); }
.header-other-teams-close { flex: 0 0 auto; min-height: var(--tap); }
.header-identity .header-team-name { font-weight: 800; color: var(--team-name-color, var(--text)); }
.header-team-switcher .team-menu-label { color: var(--team-name-color, var(--text)); }
/* Header name (team menu, single-team name, logged-out wordmark): sized to
   balance the 64px emblem. The logged-out wordmark may wrap to two lines. */
.header-identity .brand-copy strong,
.header-identity .header-team-name,
.header-team-switcher .team-menu-label { font-size: 1.35rem; line-height: 1.15; }
.header-identity .brand-copy strong { white-space: normal; overflow-wrap: normal; }
@media (min-width: 1024px) and (pointer: fine) {
  .header-identity .brand-copy strong,
  .header-identity .header-team-name,
  .header-team-switcher .team-menu-label { font-size: 1.5rem; }
  .site-header .header-team-switcher { max-width: 16rem; }
}
/* Smallest phones: keep "Team Headquarters" on one line next to the 64px emblem. */
@media (max-width: 360px) {
  .site-header .header-top-row .header-identity { gap: 0.4rem; }
  .header-identity .brand-copy strong,
  .header-identity .header-team-name,
  .header-team-switcher .team-menu-label { font-size: 1.15rem; }
  .site-header .site-nav-public a { padding-left: 0.4rem; padding-right: 0.4rem; }
}
@media (max-width: 720px) {
  .header-identity .brand-logo-box { max-width: min(7.5rem, 30vw); }
  .header-identity .brand-name.team-header-text { max-width: none; }
}
@media (min-width: 1024px) and (pointer: fine) {
  .site-header .header-top-row { flex: 0 1 auto; min-width: 0; }
  .site-header .header-top-row .header-identity { min-width: 0; max-width: min(28rem, 34vw); }
  .header-identity .brand-name.team-header-text { white-space: nowrap; max-width: none; flex: 0 1 auto; }
}

.team-current-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.team-current-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: rgb(255 255 255 / 6%);
}

[data-team-branding-form] input[type="file"] {
  max-width: 100%;
}

/* Category icons: a bullet-style emoji before the category name. */
.category-icon {
  display: inline-block;
  min-width: 1.25em;
  margin-right: 0.45em;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  vertical-align: -0.05em;
}

/* Custom SVG icons (e.g. crosshair) sized like an emoji, in the accent colour. */
.category-icon--svg { color: var(--accent); }
.category-icon--svg svg { display: block; width: 1.05em; height: 1.05em; margin: 0 auto; }
/* Colour SVG icons (fixed fills): drawn at the same ink size and baseline as a
   Noto colour emoji such as the cup. The negative margins keep the layout box
   1em tall like an emoji; `top` lowers it to sit where the emoji glyph sits. */
.category-icon--blender svg {
  position: relative;
  top: 0.16em;
  width: 1.2em;
  height: 1.2em;
  margin: -0.1em auto;
}

/* Number badges: num:<n>:<style>:<color>. System fonts only, styled with CSS. */
.category-icon--num {
  --num-fg: #ff7a1a;
  --num-bg: #0b0f17;
  --num-edge: rgb(255 255 255 / 18%);
  --num-ring: #f8fafc;
  min-width: 1.35em;
  height: 1.3em;
  padding: 0 0.16em;
  box-sizing: border-box;
  border: 1px solid var(--num-edge);
  border-radius: 0.32em;
  background: var(--num-bg);
  color: var(--num-fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.95em;
  font-style: normal;
  font-weight: 900;
  line-height: 1.22em;
  letter-spacing: -0.02em;
  vertical-align: -0.12em;
  font-variant-numeric: tabular-nums;
}
.category-icon--num[data-num-color="orange"] { --num-fg: #ff7a1a; --num-edge: rgb(255 122 26 / 45%); }
.category-icon--num[data-num-color="white"] { --num-fg: #f8fafc; --num-ring: #0b0f17; }
.category-icon--num[data-num-color="gold"] { --num-fg: #f6c343; --num-edge: rgb(246 195 67 / 45%); --num-ring: #0b0f17; }
.category-icon--num[data-num-color="red"] { --num-fg: #ff4d4d; --num-edge: rgb(255 77 77 / 45%); }
.category-icon--num[data-num-color="blue"] { --num-fg: #4ea3ff; --num-edge: rgb(78 163 255 / 45%); }
.category-icon--num[data-num-color="green"] { --num-fg: #34d17a; --num-edge: rgb(52 209 122 / 45%); --num-ring: #0b0f17; }
.category-icon--num[data-num-color="purple"] { --num-fg: #b794ff; --num-edge: rgb(183 148 255 / 45%); }
.category-icon--num[data-num-color="black"] { --num-fg: #0b0f17; --num-bg: #f1f5f9; --num-edge: #cbd5e1; --num-ring: #f1f5f9; }

.category-icon--num[data-num-style="rounded"] {
  border-radius: 999px;
  font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Varela Round", "Nunito", system-ui, sans-serif;
  font-weight: 800;
}
.category-icon--num[data-num-style="outline"] {
  /* Outline drawn with a text-shadow ring: renders the same on old Silk. */
  letter-spacing: 0.05em;
  color: var(--num-bg);
  font-weight: 900;
  text-shadow:
    0.045em 0 0 var(--num-fg), -0.045em 0 0 var(--num-fg), 0 0.045em 0 var(--num-fg), 0 -0.045em 0 var(--num-fg),
    0.032em 0.032em 0 var(--num-fg), -0.032em 0.032em 0 var(--num-fg), 0.032em -0.032em 0 var(--num-fg), -0.032em -0.032em 0 var(--num-fg);
}
.category-icon--num[data-num-style="varsity"] {
  font-family: "Rockwell Extra Bold", Rockwell, "Roboto Slab", "Noto Serif", Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow:
    0.05em 0 0 var(--num-ring), -0.05em 0 0 var(--num-ring), 0 0.05em 0 var(--num-ring), 0 -0.05em 0 var(--num-ring),
    0.09em 0.09em 0 var(--num-ring);
}
.category-icon--num[data-num-style="jersey"] {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Roboto Condensed", sans-serif-condensed, "Arial Narrow", sans-serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0.07em 0.07em 0 rgb(0 0 0 / 55%);
}
.category-icon--num[data-num-color="black"][data-num-style="jersey"] { text-shadow: 0.07em 0.07em 0 rgb(0 0 0 / 22%); }

.category-manage-label { margin: 0 0 0.35rem; font-weight: 800; }
.icon-field { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.icon-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  border: 1px dashed var(--border);
  border-radius: 0.6rem;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.icon-picker-trigger[data-has-icon="true"] { border-style: solid; }
.icon-picker-trigger-emoji { font-size: 1.4rem; line-height: 1; }

.icon-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 55%);
}
.icon-picker-backdrop[hidden] { display: none; }
.icon-picker {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 34rem;
  max-height: 85vh;
  max-height: 85dvh;
  border: 1px solid var(--border);
  border-radius: 1rem 1rem 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
@media (min-width: 640px) {
  .icon-picker-backdrop { align-items: center; }
  .icon-picker { border-radius: 1rem; }
}
.icon-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0.9rem 0.25rem; }
.icon-picker-head h2 { margin: 0; font-size: 1.1rem; }
.icon-picker-close, .icon-picker-none, .icon-picker-star-mode {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  padding: 0 0.7rem;
  cursor: pointer;
}
.icon-picker-star-mode[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.icon-picker-search { padding: 0.25rem 0.9rem; }
.icon-picker-search input { width: 100%; min-height: 44px; box-sizing: border-box; }
.icon-picker-suggested { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding: 0.25rem 0.9rem; }
.icon-picker-suggested[hidden] { display: none; }
.icon-picker-suggested-label { color: var(--muted); font-size: 0.85rem; }
.icon-picker-tabs { display: flex; gap: 0.25rem; padding: 0.35rem 0.9rem 0; border-bottom: 1px solid var(--border); }
.icon-picker-tab {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.icon-picker-tab { padding: 0 0.2rem; font-size: 0.9rem; white-space: nowrap; }
.icon-picker-tab[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); }
.icon-picker-body { flex: 1 1 auto; min-height: 9rem; overflow-y: auto; padding: 0.5rem 0.9rem; -webkit-overflow-scrolling: touch; }
.icon-picker-section-title { margin: 0.6rem 0 0.3rem; color: var(--muted); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.icon-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.icon-picker-emoji {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.icon-picker-emoji:hover, .icon-picker-emoji:focus-visible { border-color: var(--accent); }
.icon-picker-emoji[aria-current="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.icon-picker-emoji .icon-picker-fav-badge {
  position: absolute;
  top: 1px;
  right: 2px;
  color: #facc15;
  font-family: sans-serif;
  font-size: 0.7rem;
}
.icon-picker[data-star-mode="true"] .icon-picker-emoji { border-color: var(--border); }
.icon-picker[data-star-mode="true"] .icon-picker-emoji[data-favorite="true"] { border-color: #facc15; }
.icon-picker-chip { width: auto; min-width: 44px; border-color: var(--border); }
.icon-picker-empty { color: var(--muted); }
.icon-picker-foot { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; padding: 0.5rem 0.9rem 0.9rem; border-top: 1px solid var(--border); }
.icon-picker-emoji .category-icon { margin-right: 0; }
.icon-picker-emoji .category-icon--num, .icon-picker-trigger-emoji.category-icon--num { font-size: 1.1rem; }
.icon-picker-trigger-emoji.category-icon { margin-right: 0; }
.icon-picker-numbers-hint { margin: 0.4rem 0; }
.icon-picker-link { min-height: 44px; padding: 0 0.7rem; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface-muted); color: var(--text); font: inherit; cursor: pointer; }
.icon-number-builder { display: grid; gap: 0.6rem; padding-bottom: 0.4rem; }
.icon-number-preview { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--bg); }
.icon-number-preview .category-icon { margin: 0; font-size: 2.6rem; }
.icon-number-preview-text { color: var(--muted); font-size: 0.9rem; }
.icon-number-legend { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.icon-number-options { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }
.icon-number-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--surface-muted);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  justify-content: center;
}
.icon-number-option .category-icon { margin: 0; font-size: 1.15rem; }
.icon-number-option[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.icon-number-digits .icon-number-option { min-width: 44px; padding: 0; font-weight: 800; font-size: 1rem; }
.icon-number-custom { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.icon-number-custom input { width: 5.5rem; min-height: 44px; box-sizing: border-box; }
.icon-number-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.icon-number-use { min-height: 44px; padding: 0 1rem; border: 0; border-radius: 0.6rem; background: var(--accent); color: var(--accent-contrast); font: inherit; font-weight: 800; cursor: pointer; }
.icon-picker-status { min-height: 1em; margin: 0; padding: 0 0.9rem; color: var(--muted); font-size: 0.85rem; }

/* Site-wide breadcrumb trail (reuses .category-breadcrumbs styling). */
.page-breadcrumbs { margin: 0 0 1rem; min-width: 0; overflow-wrap: anywhere; }
.page-breadcrumbs a, .page-breadcrumbs [aria-current="page"] { display: inline-flex; align-items: center; min-height: var(--tap); }
.page-breadcrumbs .watch-category-path { display: contents; }

/* Forms whose fields stack: label above a full-width control. */
.stacked-form .form-field { display: flex; flex-direction: column; align-items: stretch; gap: 0.35rem; margin: 0 0 0.85rem; min-width: 0; }
.stacked-form .form-field > select,
.stacked-form .form-field > input { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Grid children default to min-width:auto, which let the filter row widen the
   whole Coach Notes page past the screen on phones. */
.coach-notes-page { grid-template-columns: minmax(0, 1fr); }
.coach-notes-page > * { min-width: 0; }

/* Long unbroken names (teams, categories, videos) wrap instead of pushing
   past the right edge on phones. */
body { overflow-wrap: break-word; }
.category-tile { min-width: 0; overflow-wrap: anywhere; }

/* Admin and coach tools at phone width: controls never exceed their card
   (selects otherwise size to their longest option, e.g. long team names). */
.admin-dashboard-main select,
.admin-dashboard-main input:not([type="checkbox"]):not([type="radio"]),
.admin-dashboard-main textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
.admin-dashboard-main fieldset { min-width: 0; }
.admin-dashboard-main label { max-width: 100%; }
/* Genuinely tabular admin lists scroll sideways inside their own box. */
.table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll > table { margin: 0; }
/* Grid cards: let long names and file inputs shrink to the card. */
.admin-panel { grid-template-columns: minmax(0, 1fr); }
.admin-panel > * { min-width: 0; }

/* Manage categories: each existing category is its own card with stacked fields. */
.category-manage-list { display: grid; gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.category-manage-item { min-width: 0; padding: 0.9rem; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--surface-muted, rgb(255 255 255 / 3%)); }
.category-manage-item .category-manage-label { margin: 0 0 0.75rem; overflow-wrap: anywhere; }
.category-manage-item .stacked-form .form-field:last-of-type { margin-bottom: 0.5rem; }
.category-manage-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

/* Page/Team locked to the chosen parent's (category-form-sync.js). */
.category-create-form select:disabled,
.category-edit-form select:disabled { opacity: 0.75; cursor: not-allowed; }
.category-lock-hint { font-size: 0.85rem; }

/* Manage categories v2: collapsed rows, page tabs, search, collapsible create. */
.category-create { margin: 0 0 1.25rem; }
.category-create > summary { display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--tap); cursor: pointer; list-style: none; }
.category-create > summary::-webkit-details-marker { display: none; }
.category-create[open] > summary { margin-bottom: 0.75rem; }
.category-create-body { padding: 0.9rem; border: 1px solid var(--border); border-radius: 0.75rem; }
.category-create-body h3 { margin-top: 0; }
.category-manage-toolbar { display: grid; gap: 0.6rem; margin: 0 0 0.85rem; }
.category-page-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.category-page-tab { display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--tap); padding: 0 0.85rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 700; }
.category-page-tab[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.category-page-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.category-page-tab-count { min-width: 1.5rem; padding: 0 0.35rem; border-radius: 999px; background: rgb(255 255 255 / 10%); font-size: 0.8rem; text-align: center; }
.category-manage-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.category-manage-filters label { flex: 1 1 12rem; min-width: 0; }
.category-manage-filters select, .category-manage-filters input { width: 100%; box-sizing: border-box; }
.category-manager.is-enhanced .category-filter-submit { display: none; }
.category-manage-list { gap: 0.4rem; }
.category-manage-item { padding: 0; margin-left: calc(min(var(--depth, 0), 3) * 1rem); }
.category-manage-item[hidden] { display: none; }
.category-manage-summary { display: flex; align-items: center; gap: 0.5rem; min-height: var(--tap); padding: 0.45rem 0.6rem 0.45rem 0.8rem; cursor: pointer; list-style: none; }
.category-manage-summary::-webkit-details-marker { display: none; }
.category-manage-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.category-manage-item .category-manage-label { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.category-parent-path { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
/* Team name under each row when several teams' categories are listed. */
.category-team-name { color: var(--muted); font-size: 0.78rem; font-weight: 400; overflow-wrap: anywhere; }
.category-page-badge { flex: 0 0 auto; padding: 0.1rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 0.75rem; }
.category-page-badge[hidden] { display: none; }
.category-edit-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 0.8rem; border: 1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: 0.9rem; }
.category-manage-details[open] .category-edit-toggle { border-color: var(--accent); }
.category-manage-details[open] > summary { border-bottom: 1px solid var(--border); }
.category-manage-details > form.category-edit-form { padding: 0.8rem; }
.category-page-tabs { gap: 0.3rem; }
.category-page-tab { flex: 1 1 auto; justify-content: center; gap: 0.3rem; padding: 0 0.55rem; font-size: 0.92rem; }
.category-parent-path { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Manage videos: compact rows built on the Manage categories list styles. */
.clip-manager .category-manage-filters label.clip-search { flex: 2 1 12rem; }
.clip-filter-submit { flex: 0 0 auto; }
.clip-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.6rem; }
.clip-manage-item { display: flex; align-items: flex-start; gap: 0.4rem; padding-left: 0.5rem; }
.clip-select { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin: 0.95rem 0 0; }
.clip-manage-details { flex: 1 1 auto; min-width: 0; }
.clip-manage-summary { padding-left: 0.3rem; }
.clip-manage-thumb { flex: 0 0 auto; width: 64px; height: 36px; border-radius: 0.35rem; object-fit: cover; object-position: center 20%; background: rgb(255 255 255 / 6%); }
.clip-manage-thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; }
.clip-manage-title { font-weight: 800; overflow-wrap: anywhere; }
.clip-manage-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.45rem; color: var(--muted); font-size: 0.82rem; }
.clip-manage-category { min-width: 0; overflow-wrap: anywhere; }
.clip-status { padding: 0 0.45rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.clip-status-ready { border-color: color-mix(in srgb, #2e9d57 60%, transparent); color: #6fd394; }
.clip-status-processing, .clip-status-uploaded { border-color: color-mix(in srgb, #d9a400 60%, transparent); color: #f2c94c; }
.clip-status-failed { border-color: color-mix(in srgb, #d64545 60%, transparent); color: #ff8a8a; }
.clip-manage-body { padding: 0.8rem; }
.clip-manage-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0.4rem 0.8rem; margin: 0; }
.clip-manage-facts dt { color: var(--muted); font-size: 0.75rem; }
.clip-manage-facts dd { margin: 0; overflow-wrap: anywhere; }
.clip-actions form { margin: 0; }
.clip-failure { color: #ff8a8a; margin: 0 0 0.6rem; }
.clip-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.9rem; }
.clip-pagination a, .clip-pagination span[aria-current] { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: 0 0.5rem; border: 1px solid var(--border); border-radius: 0.5rem; color: var(--text); text-decoration: none; }
.clip-pagination span[aria-current] { border-color: var(--accent); font-weight: 800; }

/* Manage videos: compact top and rows on phones. */
.clip-manage-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0 0 0.7rem; }
.clip-manage-head h2 { margin: 0; min-width: 0; }
.clip-manage-head .button { flex: 0 0 auto; }
.clip-search-row { display: flex; gap: 0.4rem; }
.clip-search-row .clip-search { flex: 1 1 auto; min-width: 0; }
.clip-search-row input { width: 100%; box-sizing: border-box; }
.clip-filters > summary { display: inline-flex; align-items: center; gap: 0.35rem; min-height: var(--tap); padding: 0 0.8rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; list-style: none; font-weight: 700; }
.clip-filters > summary::-webkit-details-marker { display: none; }
.clip-filters[open] > summary, .clip-filters[data-active] > summary { border-color: var(--accent); }
.clip-filters .category-manage-filters { margin-top: 0.5rem; }
.clip-manager .category-manage-filters label { flex: 1 1 9rem; }
.clip-manager .category-manage-toolbar { gap: 0.5rem; }
.clip-manage-list { gap: 0.4rem; }
.clip-manage-item { align-items: center; gap: 0.3rem; padding: 0 0 0 0.45rem; }
.clip-manage-item .clip-select { width: 1.05rem; height: 1.05rem; margin: 0; align-self: center; }
.clip-manage-details[open] { align-self: stretch; }
.clip-manage-summary { gap: 0.45rem; padding: 0.35rem 0.4rem; }
.clip-manage-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; }
.clip-manage-category { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-manage-meta { flex-wrap: nowrap; min-width: 0; }
.clip-manage-meta .clip-status { flex: 0 0 auto; }
.clip-manage-toggle { flex: 0 0 auto; }
.clip-toggle-icon { display: none; }
.clip-manage-fulltitle { margin: 0 0 0.6rem; font-weight: 800; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .clip-toggle-label { display: none; }
  .clip-toggle-icon { display: inline; }
  .clip-manage-toggle { min-width: 2.25rem; padding: 0 0.5rem; justify-content: center; }
}
.clip-manage-item:has(.clip-manage-details[open]) { align-items: flex-start; }
.clip-manage-item:has(.clip-manage-details[open]) .clip-select { margin-top: 1.55rem; }
@media (max-width: 400px) {
  .clip-manage-head h2 { font-size: 1.3rem; }
  .clip-manage-head .button { min-height: 2.25rem; padding: 0 0.7rem; }
  .clip-manager .category-page-tabs { flex-wrap: nowrap; gap: 0.25rem; }
  .clip-manager .category-page-tab { flex: 1 1 0; min-width: 0; padding: 0 0.3rem; font-size: 0.82rem; gap: 0.2rem; }
  .clip-manager .category-page-tab-count { padding: 0 0.3rem; }
}
.clip-manage-item:has(.clip-manage-details[open]) .clip-select { align-self: flex-start; }
@media (max-width: 400px) {
  .clip-manage-head h2#admin-dashboard-heading { font-size: 1.25rem; line-height: 1.2; }
  .clip-manager .category-page-tab { font-size: 0.78rem; padding: 0 0.2rem; }
  .clip-manager .category-page-tab .category-page-tab-count { min-width: 0; padding: 0 0.25rem; font-size: 0.72rem; }
}

/* Library "depth deck" (added by video-carousel.js as .is-deck; without JS or
   with reduced motion the plain scroll-snap row above is used). The active
   card is centred; neighbours are pulled in behind it by per-card transforms. */
.video-library .video-sequence.is-deck {
  --deck-peek-1: 14px; --deck-peek-2: 9px; --deck-gap: 10px; --deck-max: 672px;
  position: relative; gap: var(--deck-gap); grid-auto-columns: var(--deck-w, 92%);
  padding-inline: var(--deck-pad, 0);
  align-items: center; isolation: isolate;
}
.video-sequence.is-deck .video-card { position: relative; scroll-snap-align: center; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.video-sequence.is-deck .video-card-face { overflow: hidden; transform-origin: 50% 50%; border: 1px solid rgb(255 255 255 / 10%); border-radius: 1rem; background: rgb(17 24 39); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); backface-visibility: hidden; }
.video-sequence.is-deck .video-card:not(.is-active) { cursor: pointer; }
.video-sequence.is-deck .video-card:not(.is-active) .video-card-actions { visibility: hidden; }
@media (min-width: 761px) {
  .video-library .video-sequence.is-deck { --deck-peek-1: 56px; --deck-peek-2: 32px; --deck-gap: 16px; }
}

/* Teams & seasons: compact rows built on the Manage categories/videos styles. */
.team-manage-new { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.7rem; }
.team-manage-new .button { min-height: 2.25rem; padding: 0 0.8rem; }
.team-season-manager .clip-search-row { margin: 0; }
.team-season-manager.is-enhanced .clip-search-row .category-filter-submit { display: none; }
.team-season-manager .clip-filters .category-manage-filters label { flex: 1 1 9rem; }
.team-manage-item[hidden] { display: none; }
.team-group-heading { list-style: none; margin: 0.9rem 0 0.15rem; }
.team-group-heading:first-child { margin-top: 0; }
.team-group-heading[hidden] { display: none; }
.team-group-heading h3 { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.team-manage-item > details { min-width: 0; }
.team-row-logo { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; max-width: 2.25rem; max-height: 2.25rem; padding: 0; border-radius: 0.4rem; object-fit: contain; font-size: 1.1rem; }
.team-row-name { color: var(--team-row-color, var(--text)); }
.team-row-owner { color: var(--muted); font-size: 0.8rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.team-chip { flex: 0 1 auto; min-width: 0; padding: 0 0.45rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-date-chip { flex: 0 0 auto; overflow: visible; }
.team-row-count { flex: 0 0 auto; white-space: nowrap; }
.team-season-name { -webkit-line-clamp: unset; display: block; }
.team-status-inactive { flex: 0 0 auto; color: var(--muted); }
.team-manage-item .team-identity-sample { flex-wrap: wrap; gap: 0.4rem; }

/* Manage categories: tree connector lines (drawn by category-manager.js). */
.category-manager .category-manage-item { position: relative; }
.category-manager.is-tree .category-parent-path { display: none; }
.category-tree-guide { position: absolute; top: calc(-0.4rem - 1px); bottom: -1px; left: calc(var(--guide-x) * 1rem + 0.5rem - 1px); width: 0; border-left: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); pointer-events: none; }
.category-tree-guide.is-elbow { bottom: auto; height: calc(0.4rem + 1px + var(--tap) / 2); }
.category-tree-guide.is-tee::before,
.category-tree-guide.is-elbow::before { content: ""; position: absolute; top: calc(0.4rem + 1px + var(--tap) / 2 - 2px); left: -2px; width: calc(0.5rem + 2px); border-top: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); }
.category-tree-guide.is-elbow::before { top: auto; bottom: 0; }

/* Home: coach welcome videos, below Start here. */
.home-welcome { min-width: 0; }
.home-welcome-item { display: grid; gap: 0.75rem; min-width: 0; }
.home-welcome-item + .home-welcome-item { padding-top: 0.75rem; border-top: 1px solid var(--border); }
.home-welcome-item h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.home-welcome-item video { display: block; margin: 0 auto; max-width: 100%; }
.home-welcome-actions { margin: 0; display: flex; justify-content: center; }
.welcome-video-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.welcome-video-item { display: grid; gap: var(--space-2); min-width: 0; padding: var(--space-3); border: 1px solid var(--border); border-radius: 8px; }
.welcome-video-item-title { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.welcome-video-item-meta { margin: 0; font-size: 0.85rem; color: var(--muted, inherit); overflow-wrap: anywhere; }
.welcome-video-item-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.welcome-video-item-actions form { margin: 0; }
.welcome-video-form { display: grid; gap: var(--space-2); max-width: 32rem; }
.welcome-video-form select, .welcome-video-form input[type="text"] { width: 100%; max-width: 100%; min-width: 0; }

/* Tag picker (upload + edit video): each tag is a tappable chip with its own
   checkbox, so the checked state is visible even without :has(). */
.tag-picker { min-width: 0; display: grid; gap: 0.5rem; }
.tag-chip-options { display: flex; flex-wrap: wrap; gap: 0.45rem; min-width: 0; }
.tag-chip-option { display: inline-flex; align-items: center; gap: 0.4rem; min-height: var(--tap); max-width: 100%; padding: 0 0.8rem 0 0.6rem; border: 1px solid var(--border); border-radius: 999px; background: rgb(255 255 255 / 4%); cursor: pointer; font-weight: 700; }
.tag-chip-option span { min-width: 0; overflow-wrap: anywhere; }
.tag-chip-option input[type="checkbox"] { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; padding: 0; accent-color: var(--accent); }
.tag-chip-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.tag-chip-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag-picker small { color: var(--muted); }
.watch-tag-list { margin: 0.85rem 0 0; }
.watch-tag-list li { overflow-wrap: anywhere; font-size: 0.85rem; font-weight: 700; }

/* Video tests: player result card and the coach results page. */
.test-status { display: inline-flex; align-items: center; padding: 0.1rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8rem; font-weight: 800; white-space: nowrap; }
.test-status-correct { border-color: color-mix(in srgb, #2e9d57 60%, transparent); }
.test-status-incorrect { border-color: color-mix(in srgb, #d64545 60%, transparent); }
.test-status-pending { color: #f2c94c; border-color: color-mix(in srgb, #d9a400 60%, transparent); }
.test-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; min-width: 0; }
.test-result-head h2, .test-result-head strong { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.test-answer-facts { display: grid; gap: 0.5rem; margin: 0.75rem 0 0; }
.test-answer-facts dt { color: var(--muted); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.test-answer-facts dd { margin: 0.15rem 0 0; font-weight: 700; overflow-wrap: anywhere; white-space: pre-line; }
.test-answer-text { min-width: 0; overflow-wrap: anywhere; }
.test-results-video { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.test-results-actions { margin: 0 0 1rem; }
.test-results-question { margin: 0 0 1rem; min-width: 0; overflow-wrap: anywhere; }
.test-results-question h3 { margin: 0.2rem 0 0.4rem; }
.test-results-question p { margin: 0.4rem 0; }
.test-choice-list { display: grid; gap: 0.35rem; margin: 0.5rem 0 0; padding-left: 1.25rem; }
.test-choice-list li.is-correct { font-weight: 800; }
.test-results-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0 0 1rem; }
.test-results-summary div { min-width: 0; padding: 0.55rem 0.4rem; border: 1px solid var(--border); border-radius: 0.75rem; text-align: center; }
.test-results-summary dt { color: var(--muted); font-size: 0.72rem; font-weight: 800; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.test-results-summary dd { margin: 0.1rem 0 0; font-size: 1.2rem; font-weight: 800; }
/* Phones: four boxes in a row would split "Answered"/"Incorrect" mid-word,
   so the summary goes 2x2 until the row is wide enough for whole labels. */
@media (max-width: 30rem) {
  .test-results-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.test-results-list { display: grid; gap: 0.6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.test-results-row { min-width: 0; padding: 0.8rem; }
.test-results-row .test-answer-facts { margin-top: 0.5rem; }
.test-results-when { margin: 0.45rem 0 0; font-size: 0.82rem; overflow-wrap: anywhere; }
.test-review-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0; }
.test-review-form .button { flex: 1 1 8rem; min-height: var(--tap); font-weight: 800; }
.test-review-correct { border-color: color-mix(in srgb, #2e9d57 70%, transparent); }
.test-review-incorrect { border-color: color-mix(in srgb, #d64545 70%, transparent); }
.test-review-change, .test-results-earlier { margin: 0.6rem 0 0; }
.test-review-change summary, .test-results-earlier summary, .test-results-missing summary { cursor: pointer; color: var(--muted); font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.test-results-earlier-list { display: grid; gap: 0.6rem; margin: 0.4rem 0 0; padding-left: 1.1rem; }
.test-results-missing ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.test-results-link { margin: 0.25rem 0 0.75rem; }
.test-result-card .test-answer-facts { margin-top: 0.5rem; }
.test-result-card p.muted { margin: 0.6rem 0 0; }

/* Manage videos tabs at phone width: the count never splits ("Classroom 25",
   not "2 / 5"). Tabs size to their content and wrap to a second row rather
   than overflow when a long count would not fit. */
.clip-manager .category-page-tab { white-space: nowrap; }
.clip-manager .category-page-tab-count { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 400px) {
  .clip-manager .category-page-tabs { flex-wrap: wrap; }
  .clip-manager .category-page-tab { flex: 1 1 auto; min-width: auto; }
}
/* Test page answer box: the default 40-column textarea ran off a 320px phone. */
.video-test-card textarea, .video-test-card select { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
.video-test-card ul { padding-left: 0; list-style: none; overflow-wrap: anywhere; }

/* Account activity (admin) and "Was this you?" */
.account-activity { display: grid; gap: 1.25rem; min-width: 0; }
.account-activity-header h1, .account-activity-header p { margin: 0; }
.account-activity-header h1 { overflow-wrap: anywhere; }
.account-activity-header > p:last-child { margin-top: 0.35rem; color: var(--muted); }
.account-activity-filters input { min-width: 0; width: 100%; }
.account-activity-filters select { min-width: 0; width: 100%; }
.account-activity-metrics { grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); }
.account-activity-metrics strong { overflow-wrap: anywhere; }
.account-activity-metrics .account-activity-metric-time { font-size: 1.1rem; }
.account-activity-metric-alert { border-color: #ef4444 !important; background: rgb(239 68 68 / 10%) !important; }
.account-activity-section { display: grid; gap: 0.6rem; min-width: 0; }
.account-activity-section h2 { margin: 0; font-size: 1.1rem; }
.account-activity-section > p { margin: 0; }
.account-activity-rows { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.account-activity-row {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface-muted);
  overflow-wrap: anywhere;
}
.account-activity-row p { margin: 0; }
.account-activity-row-alert { border-color: #ef4444; background: rgb(239 68 68 / 10%); }
.account-activity-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; min-width: 0; }
.account-activity-row-main time { color: var(--muted); font-size: 0.85rem; }
.account-username { font-size: 0.85rem; overflow-wrap: anywhere; }
.account-ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; overflow-wrap: anywhere; word-break: break-all; }
.account-activity-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0; }
.account-tag, .account-flag, .account-check-status {
  display: inline-block;
  max-width: 100%;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.account-tag { border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.account-tag-muted { color: var(--muted); }
.account-flag, .account-check-status-waiting { background: rgb(245 184 75 / 18%); color: #f5c96f; }
.account-flag-danger, .account-check-status-denied { background: rgb(239 68 68 / 22%); color: #fca5a5; }
.account-check-status-confirmed { background: rgb(47 207 147 / 16%); color: #7ee2b8; }
.account-check-denied { border-color: #ef4444; background: rgb(239 68 68 / 10%); }
.account-activity-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr)); gap: 0.5rem; margin: 0; }
.account-activity-facts dt { color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.account-activity-facts dd { margin: 0; }
.account-activity-facts small { color: var(--muted); }
.account-activity-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.account-activity-buttons form { margin: 0; }
.account-activity-message { margin: 0; border: 1px solid #2fcf93; border-radius: 0.75rem; padding: 0.6rem 0.85rem; }
.account-activity-history-filters { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; font-size: 0.9rem; }
.account-activity-history-filters [aria-current] { font-weight: 800; }
.sign-in-check { max-width: 36rem; margin: 0 auto; overflow-wrap: anywhere; }
.sign-in-check h1 { margin-top: 0; }
.sign-in-check-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.sign-in-check-actions form { margin: 0; }
.sign-in-check-result { border-radius: 0.75rem; padding: 0.75rem 0.9rem; background: rgb(47 207 147 / 10%); }
.sign-in-check-denied { background: rgb(239 68 68 / 10%); border: 1px solid #ef4444; }
.sign-in-check-denied p { margin: 0.25rem 0; }
.sign-in-check .button-link { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; }

/* Classroom: built-in sections and coach PowerPoints/PDFs (documents app). */
.category-tile--section { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.document-section-head { flex-wrap: wrap; gap: 0.75rem; }
.document-section-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.document-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: 1rem; }
.document-card { min-width: 0; }
.document-card-link { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid rgb(255 255 255 / 10%); border-radius: 0.9rem; background: var(--surface-glass, var(--surface)); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
a.document-card-link:hover, a.document-card-link:focus-visible { border-color: var(--accent); }
.document-card-thumb { display: block; aspect-ratio: 16 / 9; background: #0b1020; }
.document-card-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.document-thumb-placeholder { display: grid; place-items: center; height: 100%; font-size: 2.5rem; }
.document-card-body { display: grid; gap: 0.25rem; min-width: 0; padding: 0.75rem 0.9rem 0.9rem; }
.document-card-title { font-size: 1.1rem; overflow-wrap: anywhere; }
.document-card-meta, .document-card-description { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.document-card-error { color: #fca5a5; }
.document-refresh-note { font-size: 0.85rem; }

.doc-viewer-head h1 { margin: 0; font-size: clamp(1.3rem, 4vw, 2rem); overflow-wrap: anywhere; }
.doc-viewer-meta { margin: 0.25rem 0 0; color: var(--muted); }
.doc-viewer { position: relative; min-width: 0; margin-top: 0.75rem; }
.doc-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; margin-bottom: 0.5rem; }
.doc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.5rem; margin-left: auto; min-width: 0; }
.doc-goto { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.doc-goto[hidden], .doc-tool-button[hidden] { display: none; }
/* 16px+ text so iPhones don't zoom when the field is focused. */
.doc-goto input { width: 5.5rem; min-width: 0; min-height: 44px; padding: 0.4rem 0.6rem; font-size: 1rem; text-align: center; font-variant-numeric: tabular-nums; }
.doc-goto button { min-height: 44px; padding-inline: 0.9rem; }
.doc-tool-button { min-height: 44px; padding-inline: 0.9rem; }
.doc-tool-button[aria-expanded="true"] { border-color: var(--accent); }
/* Phones: counter and Full screen on the first row, Go to / Jump to / Search below. */
@media (max-width: 560px) {
  .doc-tools { order: 3; margin-left: 0; width: 100%; }
}
/* "Jump to" and Search drop down over the deck, in the page and in full screen. */
.doc-panels { position: relative; z-index: 30; height: 0; }
.doc-panel, .doc-goto-hint {
  position: absolute; top: 0; right: 0;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 45%);
}
.doc-panel { width: min(100%, 28rem); max-height: min(70vh, 32rem); max-height: min(70dvh, 32rem); overflow: auto; overscroll-behavior: contain; padding-bottom: 0.4rem; }
.doc-panel[hidden], .doc-goto-hint[hidden] { display: none; }
.doc-panel-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.2rem 0.2rem 0.2rem 0.9rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.doc-panel-head h2 { margin: 0; font-size: 1rem; }
.doc-panel-close { min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.doc-jump-list, .doc-search-results { margin: 0; padding: 0; list-style: none; }
.doc-jump-list a { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; min-height: 44px; box-sizing: border-box; padding: 0.65rem 0.9rem; color: var(--text); text-decoration: none; }
.doc-jump-list a:hover, .doc-jump-list a:focus-visible, .doc-search-hit:hover, .doc-search-hit:focus-visible { background: var(--surface-muted); }
.doc-jump-list a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.doc-jump-level-0 .doc-jump-title { font-weight: 700; }
.doc-jump-level-1 a { padding-left: 1.9rem; }
.doc-jump-level-2 a { padding-left: 2.9rem; }
.doc-jump-title { min-width: 0; overflow-wrap: anywhere; }
.doc-jump-ref { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc-search-form { display: flex; gap: 0.35rem; padding: 0.6rem 0.9rem 0.3rem; }
.doc-search-form input { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 0.4rem 0.6rem; font-size: 1rem; }
.doc-search-form button { flex: none; min-height: 44px; padding-inline: 0.9rem; }
.doc-search-status { margin: 0.2rem 0.9rem 0.4rem; color: var(--muted); font-size: 0.9rem; }
.doc-search-status:empty { display: none; }
.doc-search-hit { display: grid; gap: 0.2rem; width: 100%; min-height: 44px; padding: 0.6rem 0.9rem; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.doc-search-where { font-weight: 700; font-size: 0.9rem; }
.doc-search-snippet { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.doc-search-snippet mark { padding: 0 0.1em; border-radius: 0.2em; background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--text); }
.doc-goto-hint { margin: 0; padding: 0.65rem 0.9rem; }
.doc-counter { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.doc-fullscreen-button { min-height: 44px; }
.video-library .video-sequence.doc-rail { grid-auto-columns: min(92%, var(--deck-max, 60rem)); margin: 0; padding-left: 0; padding-right: 0; list-style: none; }
/* padding-inline again: the plain .doc-rail rule above zeroes the padding,
   which left the deck's active page off-centre and its maths off by a few
   hundred pixels (a quick second Next could land on the same page). */
.video-library .video-sequence.doc-rail.is-deck { --deck-max: 960px; --deck-peek-1: 10px; --deck-peek-2: 6px; --deck-gap: 8px; grid-auto-columns: var(--deck-w, 92%); padding-inline: var(--deck-pad, 0); }
@media (min-width: 761px) {
  .video-library .video-sequence.doc-rail.is-deck { --deck-peek-1: 40px; --deck-peek-2: 22px; --deck-gap: 14px; }
}
.doc-slide .video-card-face { background: #0b1020; }
/* document-viewer.js loads the page images near the one being read; until
   one arrives (or if it fails) the card shows a message, never the browser's
   broken-image icon and alt text. */
.doc-slide .video-card-face { position: relative; }
.doc-viewer.has-page-loader .doc-slide-image:not(.is-loaded) { visibility: hidden; }
.doc-slide-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; color: var(--muted); font-size: 0.95rem; text-align: center; pointer-events: none; }
.doc-slide-status[hidden] { display: none; }
.doc-slide-retry { pointer-events: auto; min-height: 44px; max-width: 16rem; padding: 0.6rem 1rem; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.doc-slide-image { display: block; width: 100%; height: auto; aspect-ratio: var(--doc-ratio, 16 / 9); background: #0b1020; cursor: zoom-in; }
.doc-rail.is-deck .doc-slide:not(.is-active) .doc-slide-image { cursor: pointer; }
/* Full width set explicitly: with width auto, a max-height (full screen)
   shrinks an aspect-ratio box sideways, which left-aligned the video beside
   an empty block on phones held sideways. */
.doc-slide-video { display: grid; place-items: center; width: 100%; aspect-ratio: var(--doc-ratio, 16 / 9); background: #000; }
.doc-slide-video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.doc-slide-caption { margin: 0; padding: 0.4rem 0.75rem; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.doc-viewer.is-fullscreen .doc-slide-caption,
.doc-viewer.is-fitted .doc-slide-caption { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Slides with a video: a yellow "Play video" in the bottom row between
   Previous and Next (in place of the swipe hint), which opens the video in the
   slide's place; "Back to slide" takes the same spot while it plays. Nothing
   sits over the slide or the video (jjsmoker33, 2026-10-29). */
.video-carousel-controls .doc-play-button,
.video-carousel-controls .doc-player-close {
  flex: 0 1 auto; min-width: 0; min-height: 44px; padding: 0.45rem 1rem; border: 2px solid #150702; border-radius: 999px;
  background: #ffcc4a; color: #150702; font: inherit; font-size: 1rem; font-weight: 800; line-height: 1.1;
  white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.video-carousel-controls .doc-play-button[hidden],
.video-carousel-controls .doc-player-close[hidden],
.video-carousel-controls [data-doc-swipe-hint][hidden] { display: none; }
.doc-play-button:hover, .doc-play-button:focus-visible,
.doc-player-close:hover, .doc-player-close:focus-visible { background: #ffd970; }
.doc-play-button:focus-visible, .doc-player-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* A one-page file has no Previous/Next row; keep it for the video button. */
.video-carousel-controls.doc-has-video[hidden] { display: flex; }
.video-carousel-controls.doc-has-video[hidden] [data-video-back],
.video-carousel-controls.doc-has-video[hidden] [data-video-forward] { visibility: hidden; }
.doc-player { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: #000; }
.doc-player[hidden] { display: none; }
.doc-player video, .doc-player iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
@media (max-width: 480px) {
  .video-carousel-controls .doc-play-button,
  .video-carousel-controls .doc-player-close { padding: 0.4rem 0.7rem; font-size: 0.9rem; }
}
.doc-viewer-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.doc-viewer.is-fullscreen {
  position: fixed; inset: 0; top: var(--test-banner-h, 0px); z-index: 1000; margin: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  background: #000;
}
.doc-viewer.is-fullscreen .doc-viewer-bar { margin: 0; }
.doc-viewer.is-fullscreen .doc-carousel { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; min-height: 0; }
.doc-viewer.is-fullscreen .doc-slide-image,
.doc-viewer.is-fullscreen .doc-slide-video { max-height: calc(100vh - 8rem); max-height: calc(100dvh - 8rem); object-fit: contain; }
.doc-viewer.is-fullscreen .doc-slide-image { cursor: zoom-out; }
.doc-viewer.is-fullscreen .doc-panel { max-height: calc(100vh - 6rem); max-height: calc(100dvh - 6rem); }
html.doc-viewer-open { overflow: hidden; }

/* Edit page: videos on slides. */
.document-video-editor { max-width: 48rem; margin-top: 2rem; }
.doc-video-rows { display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.doc-video-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 0.4rem 0.5rem; padding: 0.5rem; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
.doc-video-row label { display: grid; gap: 0.2rem; min-width: 0; color: var(--muted); font-size: 0.85rem; }
.doc-video-row input, .doc-video-row select { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font-size: 1rem; }
.doc-video-row.has-error { border-color: var(--accent); }
.doc-video-note { grid-column: 1 / -1; margin: 0; font-size: 0.85rem; }
.doc-video-error { grid-column: 1 / -1; margin: 0; color: var(--accent-2); font-weight: 700; font-size: 0.9rem; }
@media (max-width: 640px) {
  .doc-video-row { grid-template-columns: 5rem minmax(0, 1fr); }
  .doc-video-youtube { grid-column: 1 / -1; }
}
/* Edit page: the coach's "Jump to" menu editor. */
.document-menu-editor { max-width: 48rem; margin-top: 2rem; }
.doc-menu-rows { display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.doc-menu-row { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem 9.5rem auto; align-items: end; gap: 0.4rem 0.5rem; padding: 0.5rem; border: 1px solid var(--border); border-radius: 0.6rem; background: var(--surface); }
.doc-menu-row label { display: grid; gap: 0.2rem; min-width: 0; color: var(--muted); font-size: 0.85rem; }
.doc-menu-row input, .doc-menu-row select { width: 100%; max-width: 100%; min-height: 44px; box-sizing: border-box; font-size: 1rem; }
.doc-menu-row-buttons { display: flex; gap: 0.3rem; }
.doc-menu-row-buttons[hidden] { display: none; }
.doc-menu-row-buttons .button { min-height: 44px; padding-inline: 0.7rem; }
.doc-menu-row.has-error { border-color: #f87171; }
.doc-menu-error { grid-column: 1 / -1; margin: 0; color: #fca5a5; font-size: 0.9rem; }
@media (max-width: 640px) {
  .doc-menu-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .doc-menu-title, .doc-menu-row-buttons { grid-column: 1 / -1; }
}

/* New-coach onboarding: "Name your team" prompt/form and empty-category tips. */
.home-alerts { margin: 0; }
.home-team-setup > div { min-width: 0; }
.home-team-setup p { overflow-wrap: anywhere; }
.home-team-setup-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.home-team-setup-list .button { min-height: var(--tap); }
/* "Skip for now" / "Hide" on the Name your teams box, and the small line it
   folds into (jjsmoker33, 2026-10-21). Quiet text buttons, no red. */
.home-team-setup[hidden],
.home-team-setup-reveal[hidden] { display: none; }
.home-team-setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin-top: 0.5rem; }
.home-team-setup-actions form { margin: 0; }
.home-team-setup-quiet,
.home-team-setup-reveal,
.notification-setup-skip button {
  border-color: transparent;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.home-team-setup-quiet { padding: 0 0.15rem; }
.home-team-setup-quiet:hover,
.home-team-setup-reveal:hover,
.notification-setup-skip button:hover { border-color: transparent; color: var(--text); }
.home-team-setup-reveal { justify-self: start; padding: 0 0.15rem; text-decoration: none; }
.home-team-setup-reveal:hover { text-decoration: underline; }
.notification-setup-skip { margin: 0; }
.notification-setup-skip button { min-height: 2rem; padding: 0.2rem 0.15rem; font-size: 0.78rem; }
.team-setup-form { max-width: 34rem; }
.team-setup-form input[type="text"],
.team-setup-form input[type="date"] { width: 100%; max-width: 100%; box-sizing: border-box; }
.team-setup-season { margin: 0 0 1rem; padding: 0.75rem 1rem 0.25rem; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.team-setup-season legend { padding: 0 0.35rem; font-weight: 700; }
.team-setup-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0 0.75rem; }
.team-setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.team-setup-logo-note { margin-top: 1rem; overflow-wrap: anywhere; }
.empty-category-tip { margin: 0.5rem 0 0; overflow-wrap: anywhere; }
.empty-category-tip .button { display: inline-block; max-width: 100%; margin-top: 0.35rem; white-space: normal; text-decoration: none; overflow-wrap: anywhere; }

/* Upload page: big PowerPoints/PDFs block the worker queue for a while. */
.document-big-file-notice { margin: 0 0 1rem; border-left-color: #f6b13b; background: color-mix(in srgb, var(--surface) 86%, #f6b13b); }
.document-big-file-notice p { color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.document-big-file-notice strong { font-weight: 900; }
.document-upload-form .upload-progress[hidden] { display: none; }
.document-upload-form .upload-progress progress { width: 100%; }
.document-upload-form .upload-keep-open { color: var(--text); font-weight: 700; }

/* Team invite link, join page, approvals, Add many and login cards. */
.invite-intro { max-width: 46rem; overflow-wrap: anywhere; }
.invite-team-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 1rem; }
.invite-team-picker select { min-width: 0; max-width: 100%; }
.invite-card, .invite-settings { margin: 1rem 0; max-width: 46rem; min-width: 0; }
.invite-card h3, .invite-settings h3 { margin: 0 0 0.75rem; font-size: 1.1rem; overflow-wrap: anywhere; }
.invite-card.is-off .invite-actions, .invite-card.is-off .invite-qr { opacity: 0.45; }
.invite-link { display: block; width: 100%; max-width: 100%; font-size: 0.95rem; }
.invite-message { margin: 0.5rem 0 0.75rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.invite-actions, .login-card-actions, .invite-settings-actions, .login-cards-toolbar, .join-waiting-actions, .bulk-preview-actions, .join-request-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.invite-actions .button, .invite-actions button { flex: 1 1 7rem; text-decoration: none; }
.invite-actions [hidden], .login-card-actions [hidden] { display: none !important; }
.invite-copy-status { min-height: 1.5em; margin: 0.4rem 0 0; }
.invite-copy-status:empty { min-height: 0; }
.invite-qr { margin: 1rem 0 0; display: grid; justify-items: center; gap: 0.5rem; text-align: center; }
.invite-qr-code { width: min(15rem, 100%); padding: 0.5rem; border-radius: 0.75rem; background: #fff; line-height: 0; }
.invite-qr-code svg { display: block; width: 100%; height: auto; }
.invite-qr figcaption { color: var(--muted); font-size: 0.9rem; }
.invite-settings p { margin: 0 0 0.75rem; }
.invite-settings-actions { margin-bottom: 1rem; }
.invite-expiry-form { display: grid; gap: 0.35rem; }
.invite-expiry-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.invite-expiry-row select { flex: 1 1 10rem; min-width: 0; }
.invite-alt { overflow-wrap: anywhere; }
.accounts-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.accounts-actions .button { text-decoration: none; }

.join-main { width: min(34rem, calc(100% - 2rem)); margin: 1.25rem auto 4rem; }
.join-page { display: grid; gap: 1rem; min-width: 0; overflow-wrap: anywhere; }
.join-team { display: grid; justify-items: center; gap: 0.25rem; text-align: center; }
.join-team h1 { margin: 0; font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.15; }
.join-team p { margin: 0; }
.join-team-logo { width: 5.5rem; height: 5.5rem; object-fit: contain; border-radius: 1rem; margin-bottom: 0.5rem; }
.join-kicker { color: var(--accent-2); font-weight: 800; }
.join-alert { margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); }
.join-form { display: grid; gap: 1rem; }
.join-role { margin: 0; padding: 0; border: 0; min-width: 0; }
.join-role legend { margin-bottom: 0.5rem; font-weight: 700; }
.join-role-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.6rem; }
.join-role-option { display: flex; align-items: center; gap: 0.6rem; min-height: var(--tap, 44px); padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--surface); font-weight: 700; cursor: pointer; }
.join-role-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.join-role-option input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--accent); }
.join-field { display: grid; gap: 0.3rem; min-width: 0; }
.join-field[hidden] { display: none; }
.join-field label { font-weight: 700; }
.join-field input { width: 100%; max-width: 100%; min-height: var(--tap, 44px); font-size: 1rem; }
.join-field .errorlist, .join-role .errorlist, .bulk-add-form .errorlist { margin: 0; padding: 0; list-style: none; color: #ffb4a8; font-weight: 600; }
.join-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.join-submit { width: 100%; font-size: 1.05rem; }
.join-note, .join-login-link { margin: 0; text-align: center; }
.join-signed-in { display: grid; gap: 0.75rem; justify-items: start; }
.join-signed-in p { margin: 0; }
.join-logout button { min-height: auto; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; }
.join-waiting-list { margin: 0; padding-left: 1.2rem; }

.join-request-list { display: grid; gap: 0.75rem; margin: 1rem 0; padding: 0; list-style: none; }
.join-request { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.join-request-who { min-width: 0; flex: 1 1 14rem; overflow-wrap: anywhere; }
.join-request-who h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.join-request-who p { margin: 0.15rem 0 0; }
.join-request-full { color: #ffb4a8; }

.bulk-add-form { max-width: 40rem; }
.bulk-add-form textarea { width: 100%; max-width: 100%; min-height: 12rem; font-size: 1rem; }
.bulk-add-form code { overflow-wrap: anywhere; }
.bulk-add-role { margin: 0 0 0.85rem; padding: 0; border: 0; min-width: 0; }
.bulk-add-role legend { margin-bottom: 0.4rem; font-weight: 700; }
.bulk-preview-form { max-width: 40rem; }
.bulk-preview-list { display: grid; gap: 0.5rem; margin: 1rem 0; padding-left: 1.5rem; }
.bulk-preview-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 12rem); align-items: center; gap: 0.25rem 0.75rem; overflow-wrap: anywhere; }
.bulk-preview-row input[type="text"] { width: 100%; min-width: 0; }
.bulk-preview-name { display: grid; min-width: 0; }
.bulk-preview-row.has-error input[type="text"] { border-color: #ff8a7a; }
.bulk-row-error { grid-column: 1 / -1; margin: 0; color: #ffb4a8; font-weight: 600; }
@media (max-width: 520px) {
  .bulk-preview-row { grid-template-columns: minmax(0, 1fr); }
}

.login-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.75rem; margin: 1rem 0; padding: 0; list-style: none; }
.login-card { display: grid; gap: 0.25rem; min-width: 0; padding: 1rem; border: 1px dashed var(--border); border-radius: var(--radius, 0.9rem); background: var(--surface); overflow-wrap: anywhere; }
.login-card p, .login-card h3 { margin: 0; }
.login-card-team { color: var(--muted); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.login-card-name { font-size: 1.15rem; }
.login-card-who { color: var(--muted); }
.login-card dl { display: grid; gap: 0; margin: 0.5rem 0; }
.login-card dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.login-card dd { margin: 0 0 0.45rem; font-size: 1.1rem; font-weight: 700; }
.login-cards-warning p { color: var(--text); }
.login-card-password { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.login-card-note { font-size: 0.85rem; color: var(--muted); }
.login-card-actions { margin-top: 0.5rem; }
.login-card-actions .button { flex: 1 1 4.5rem; text-decoration: none; }

@media print {
  .print-login-cards { background: #fff !important; color: #000; }
  .print-login-cards .site-header,
  .print-login-cards .bottom-nav,
  .print-login-cards .test-site-banner,
  .print-login-cards .page-breadcrumbs,
  .print-login-cards .coach-tool-guide,
  .print-login-cards .login-cards-intro,
  .print-login-cards #admin-dashboard-heading,
  .print-login-cards .login-card-actions,
  .print-login-cards [data-copy-status] { display: none !important; }
  .print-login-cards .site-main, .print-login-cards .admin-dashboard-shell, .print-login-cards .admin-dashboard-main { width: auto; margin: 0; padding: 0; background: #fff; border: 0; box-shadow: none; }
  .print-login-cards .login-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
  .print-login-cards .login-card { break-inside: avoid; page-break-inside: avoid; padding: 0.4in 0.3in; border: 1px dashed #555; border-radius: 0; background: #fff; color: #000; }
  .print-login-cards .login-card-team, .print-login-cards .login-card-who, .print-login-cards .login-card dt, .print-login-cards .login-card-note { color: #333; }
}
/* Player progress header: long usernames (e.g. from Add many) must wrap. */
.daily-progress-header > div { min-width: 0; overflow-wrap: anywhere; }

/* Account activity: provider, connection type and approximate place (DB-IP). */
.account-connection { display: block; min-width: 0; font-size: 0.85rem; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.account-connection .account-provider { color: var(--text); font-weight: 700; }
.account-connection > .account-flag { margin: 0 0.4rem; vertical-align: baseline; }
.account-connection > .account-flag:first-child { margin-left: 0; }
.account-connection > .account-conn-type + .account-location::before,
.account-connection > .account-provider + .account-conn-type::before,
.account-connection > .account-provider + .account-location::before { content: "·"; margin: 0 0.4rem; color: var(--muted); }
.account-activity-tags .account-conn-type { color: var(--muted); font-size: 0.85rem; }
.account-network-summary { display: grid; gap: 0.25rem; min-width: 0; padding-top: 0.4rem; border-top: 1px solid var(--border); }
.account-network-label { color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.account-network-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.8rem; }
.account-addresses summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.account-addresses ul { display: grid; gap: 0.2rem; margin: 0.35rem 0 0; padding-left: 1.1rem; }
.account-addresses p { margin-top: 0.35rem; font-size: 0.8rem; }
.account-network-help { margin: 0; }
.account-network-help .coach-tool-guide-body > p { margin: 0 0 0.65rem; }
.account-network-help .coach-tool-guide-body ul { display: grid; gap: 0.4rem; margin: 0 0 0.75rem; padding-left: 1.25rem; }
.account-ipinfo-credit { margin: 0; font-size: 0.8rem; }
@media (max-width: 480px) {
  .account-network-help .coach-tool-guide-body { padding: 0 0.85rem 0.85rem; }
}

/* Home screen ("Start here" / coach welcome) video watch lines and chips.
   Green for watched, amber for started, neutral otherwise: never red. */
.onboarding-watch {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface-muted);
  overflow-wrap: anywhere;
}
.onboarding-watch h2 { margin: 0; font-size: 1.05rem; }
.onboarding-watch-lines { display: grid; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.onboarding-watch-line { min-width: 0; padding-left: 0.6rem; border-left: 3px solid var(--border); }
.onboarding-watch-line-watched { border-left-color: #2fcf93; }
.onboarding-watch-line-started { border-left-color: #f5b84b; }
.onboarding-watch-line-not-watched { color: var(--muted); }
.onboarding-watch-line-not-watched strong { color: var(--text); }
.onboarding-watch-note { margin: 0; font-size: 0.8rem; }
.start-here-chip { white-space: normal; overflow-wrap: normal; word-break: normal; }
td .start-here-chip { margin-top: 0.3rem; border-radius: 0.6rem; }
.start-here-chip-watched { border-color: transparent; background: rgb(47 207 147 / 16%); color: #7ee2b8; }
.start-here-chip-started { border-color: transparent; background: rgb(245 184 75 / 18%); color: #f5c96f; }
.start-here-chip-not_watched { color: var(--muted); }

/* Classroom > Playbook: plays a coach published for players and parents. */
.pb-published-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr)); gap: 0.75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.pb-published-card { display: grid; gap: 0.35rem; min-height: 6rem; padding: 1rem; border: 1px solid rgb(255 255 255 / 10%); border-radius: 0.75rem; background: rgb(17 24 39 / 70%); color: var(--text); text-decoration: none; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.pb-published-card:hover, .pb-published-card:focus { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pb-published-card strong { font-size: 1.25rem; line-height: 1.15; }
.pb-published-kind { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pb-published-notes { color: var(--muted); font-size: 0.95rem; line-height: 1.35; }
.pb-published-item { display: grid; gap: 0.35rem; }
.pb-published-heading { margin: 1rem 0 0; font-size: 1.1rem; }
.pb-published-edit { justify-self: start; font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.pb-published-open { justify-self: start; margin-top: 0.25rem; font-weight: 800; color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; }

/* Category tiles: every tile in the grid is the same height, and a long name
   wraps beside its icon (never underneath it). */
.category-grid { grid-auto-rows: 1fr; }
.category-grid > li { display: flex; min-width: 0; }
.category-grid > li > .category-tile { flex: 1 1 auto; }
.video-library .category-tile { min-height: 6.75rem; }
.category-tile > span {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.45em;
  min-width: 0;
}
.category-tile > span > .category-icon { flex: 0 0 auto; margin-right: 0; }

/* Desktop header (jjsmoker33, 2026-10-28): logo + team name on the left;
   Training, Classroom, Profile, then the bell at the far right. The top row
   dissolves so the bell can follow the nav; the team name gets the room. */
@media (min-width: 1024px) and (pointer: fine) {
  .site-header .header-top-row { display: contents; }
  .site-header .header-identity,
  .site-header .header-team-switcher { order: 0; }
  .site-header .site-nav { order: 1; }
  .site-header .header-top-row .header-actions { order: 2; margin-left: 0; }
  .site-header .header-top-row .header-identity { max-width: min(40rem, 50vw); }
  .site-header .header-team-switcher { max-width: min(32rem, 40vw); }
}
.profile-link-list > li.profile-link-desktop-only { display: none; }
@media (min-width: 1024px) and (pointer: fine) {
  .profile-link-list > li.profile-link-desktop-only { display: list-item; }
}
