:root {
  --navy: #0d1420;
  --navy-deep: #06090f;
  --gold: #d4af5a;
  --gold-bright: #f0d68a;
  --blue-glow: #4fa8ff;
  --electric-blue: #2fd8ff;
  --electric-blue-bright: #7be9ff;
  --text: #eef1f8;
  --text-dim: #9aa4bd;
  /* Width of the cyan "neon" outline on cards and panels. */
  --neon-w: 1.5px;
  /* Channels behind the translucent greys / cyan / gold used across the CSS, so the
     light theme can swap them: ink = "foreground" colour for fills & borders. */
  --ink-rgb: 255, 255, 255;
  --cy-rgb: 47, 216, 255;
  --gold-rgb: 212, 175, 90;
  --gold-fill: #f0d68a;
  --gold-fill-2: #d4af5a;
  --ok: #5fd08a;
  --bad: #f0806a;
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23a3adc4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  /* Nextup Hub is a single dark design — tell the browser so native UI
     (form control popups, scrollbars, autofill, the mobile keyboard) renders
     dark too, instead of following the device's own light/dark setting and
     clashing with the app (e.g. a white <select> dropdown list). */
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Many close stops keep the fade smooth; the tiny SVG noise layer dithers out
     the banding that a 3-stop radial shows on 8-bit displays. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.09'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 18%,
      #131d30 0%, #101a2b 12%, #0e1626 24%, #0c1421 36%,
      var(--navy) 50%, #0a0f18 66%, #080b12 82%, var(--navy-deep) 100%);
  background-size: 160px 160px, 140% 140%;
  background-repeat: repeat, no-repeat;
  animation: drift 18s ease-in-out infinite;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

@keyframes drift {
  0%, 100% { background-position: 50% 20%; }
  50% { background-position: 42% 32%; }
}

/* subtle animated glow behind logo */
.glow {
  position: fixed;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  height: 620px;
  /* Gentle multi-stop ramp + heavy blur so the falloff reads as light, not rings. */
  background: radial-gradient(circle,
    rgba(79,168,255,0.24) 0%,
    rgba(79,168,255,0.17) 22%,
    rgba(79,168,255,0.10) 42%,
    rgba(79,168,255,0.045) 62%,
    rgba(79,168,255,0.014) 80%,
    transparent 100%);
  filter: blur(42px);
  animation: pulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

/* drifting network particles */
.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  left: var(--x);
  top: 100%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--c, var(--blue-glow));
  box-shadow: 0 0 8px 1px var(--c, var(--blue-glow));
  opacity: 0;
  animation: rise var(--dur) linear infinite;
  animation-delay: var(--delay);
}

@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 0.55; }
  92% { opacity: 0.35; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

/* top navigation */
.topnav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  width: 100%;
  flex: 0 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(6, 10, 22, 0.45);
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.18);
  box-shadow: 0 1px 20px rgba(var(--cy-rgb), 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.nav-logo::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(var(--cy-rgb), 0.28) 0%, transparent 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}

.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 14px rgba(var(--cy-rgb), 0.3));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.nav-logo:hover img {
  transform: scale(1.06);
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 20px rgba(var(--cy-rgb), 0.5));
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  color: var(--gold-bright);
  border-color: rgba(var(--gold-rgb), 0.6);
}

@media (max-width: 640px) {
  .nav-links {
    gap: 0.6rem 1rem;
  }
  .nav-link {
    font-size: 0.72rem;
  }
}

/* hero section shared by all pages */
.hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  text-align: center;
  width: 100%;
  padding: clamp(16px, 5vh, 48px) 20px;
}

.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 640px;
}

.logo-wrap {
  opacity: 0;
  animation: revealUp 0.8s ease-out forwards;
  position: relative;
}

.logo-wrap::before {
  content: '';
  position: absolute;
  inset: 10%;
  background: radial-gradient(circle, rgba(var(--cy-rgb), 0.3) 0%, transparent 70%);
  filter: blur(20px);
  z-index: 0;
  pointer-events: none;
}

.logo {
  width: min(260px, 60vw, 30vh);
  height: auto;
  margin-bottom: clamp(1rem, 4vh, 2.2rem);
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 30px rgba(var(--cy-rgb), 0.3));
  animation: float 6s ease-in-out infinite;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.logo:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 40px rgba(var(--cy-rgb), 0.45));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

.reveal {
  opacity: 0;
  animation: revealUp 0.8s ease-out forwards;
  animation-delay: var(--d, 0s);
}

.brand {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--gold-fill) 0%, var(--gold-fill-2) 60%, #b8903f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.tagline {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: clamp(1.2rem, 4vh, 2.6rem);
  font-weight: 500;
}

.description {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: clamp(0.7rem, 2.5vh, 1.2rem);
}

.description:last-of-type {
  margin-bottom: clamp(1.4rem, 4vh, 2.4rem);
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: clamp(1.2rem, 4vh, 2.8rem);
  background: rgba(var(--gold-rgb), 0.06);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.coming-soon:hover {
  border-color: rgba(var(--gold-rgb), 0.75);
  background: rgba(var(--gold-rgb), 0.12);
  transform: translateY(-1px);
}

.coming-soon .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-glow);
  box-shadow: 0 0 10px 2px rgba(79, 168, 255, 0.8);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

form.signup {
  display: flex;
  width: 100%;
  max-width: 420px;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

form.signup input[type="email"] {
  flex: 1;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

form.signup input[type="email"]::placeholder {
  color: var(--text-dim);
}

form.signup input[type="email"]:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.08);
}

form.signup button {
  padding: 0.9rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

form.signup button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.35);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: clamp(1.2rem, 3vh, 2.6rem);
}

/* registration form card (Sign Up page) */
.form-card {
  width: 100%;
  max-width: 560px;
  text-align: left;
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.25);
  border-radius: 16px;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: 0 0 0 1px rgba(var(--cy-rgb), 0.04), 0 0 24px rgba(var(--cy-rgb), 0.09);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.field .optional {
  text-transform: none;
  letter-spacing: normal;
  opacity: 0.65;
  font-size: 0.72rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

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

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.08);
}

.field textarea {
  resize: vertical;
  min-height: 90px;
}

/* Selects inside a .field pick up the same treatment as text inputs so filter /
   compose dropdowns stop looking like bare text. */
.field select,
.sk-filter-bar select {
  width: 100%;
  padding: 0.85rem 2.2rem 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background-color: rgba(var(--cy-rgb), 0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa4bd' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field select:focus,
.sk-filter-bar select:focus {
  border-color: var(--gold);
  background-color: rgba(var(--ink-rgb), 0.08);
}
.field select option,
.sk-filter-bar select option {
  background: #101a33;
  color: var(--text);
}

/* Every single-value dropdown shows a chevron so it reads as a dropdown. The
   later per-component rules set `background:` shorthands that would otherwise
   wipe the arrow, so the image is !important. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  background-image: var(--select-chevron) !important;
  background-repeat: no-repeat !important;
  background-position: right 0.7rem center !important;
  background-size: 12px 8px !important;
  padding-right: 2rem;
}
.field select,
.sk-filter-bar select { background-position: right 0.9rem center !important; padding-right: 2.2rem; }

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--cy-rgb), 0.2);
  background: rgba(var(--cy-rgb), 0.035);
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.checkbox-chip input[type="checkbox"] {
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
}

.checkbox-chip.is-checked {
  border-color: rgba(var(--gold-rgb), 0.6);
  background: rgba(var(--gold-rgb), 0.1);
  color: var(--text);
}

.btn-primary {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
}

.form-status.error {
  color: var(--bad, #f0806a);
}

/* success / confirmation pages */
.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(var(--gold-rgb), 0.5);
  background: rgba(var(--gold-rgb), 0.08);
  margin-bottom: 1.4rem;
}

.check svg {
  width: 22px;
  height: 22px;
}

.content h1.confirm-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(180deg, var(--gold-fill) 0%, var(--gold-fill-2) 60%, #b8903f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.9rem;
  text-transform: none;
}

p.message {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 2.4rem;
  max-width: 460px;
}

a.home-link {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, transform 0.15s ease;
}

a.home-link:hover {
  background: rgba(var(--gold-rgb), 0.08);
  transform: translateY(-1px);
}

footer {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: var(--text-dim);
  opacity: 0.7;
  margin-top: 1rem;
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  form.signup {
    flex-direction: column;
  }

  .coming-soon {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    padding: 0.55rem 1.1rem;
    white-space: nowrap;
  }
}

/* dashboard */
.dash-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  width: 100%;
  min-height: 0;
}

.sidebar {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.2rem;
  border-right: 1px solid rgba(var(--cy-rgb), 0.18);
  background: rgba(6, 10, 22, 0.35);
  box-shadow: 2px 0 20px rgba(var(--cy-rgb), 0.06);
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.16);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.profile-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.profile-uid {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-nav button,
.sidebar-nav a {
  display: block;
  text-align: left;
  text-decoration: none;
  padding: 0.7rem 0.8rem 0.7rem calc(0.8rem - 3px);
  border-radius: 10px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-nav button:hover,
.sidebar-nav a:hover {
  background: rgba(var(--ink-rgb), 0.05);
  color: var(--text);
}

.sidebar-nav button.active,
.sidebar-nav a.active {
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--gold-bright);
  border-left-color: var(--electric-blue);
}

.dash-main {
  flex: 1 1 auto;
  padding: 1.2rem var(--gutter);
  overflow-y: auto;
  text-align: left;
  min-width: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: revealUp 0.5s ease-out;
}

.dash-header {
  margin-bottom: 1.4rem;
}

.dash-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.dash-subtitle {
  font-size: 0.88rem;
  color: var(--text-dim);
}

.team-filter {
  margin-bottom: 1.4rem;
}

.team-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.team-filter-pills button {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--cy-rgb), 0.2);
  background: rgba(var(--cy-rgb), 0.035);
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-filter-pills button.active {
  border-color: rgba(var(--gold-rgb), 0.6);
  background: rgba(var(--gold-rgb), 0.12);
  color: var(--gold-bright);
}

/* Phone-only: big header + prev/next instead of a pill row. */
.team-filter-mobile { display: none; }
@media (max-width: 700px) {
  .team-filter-pills { display: none; }
  .team-filter-mobile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .team-filter-mobile .tfm-label {
    flex: 1 1 auto;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-bright);
  }
  .team-filter-mobile .tfm-arrow {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--cy-rgb), 0.25);
    background: rgba(var(--cy-rgb), 0.05);
    color: var(--text);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
  }
  .team-filter-mobile .tfm-arrow:disabled { opacity: 0.35; cursor: default; }
}

.team-filter--subtle button {
  padding: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 400;
  border-color: rgba(var(--cy-rgb), 0.12);
  background: transparent;
  opacity: 0.8;
}

.team-filter--subtle button.active {
  opacity: 1;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.dash-card {
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.25);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  box-shadow: 0 0 0 1px rgba(var(--cy-rgb), 0.04), 0 0 22px rgba(var(--cy-rgb), 0.09);
}

.dash-card h3 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.dash-card-h3-clickable {
  cursor: pointer;
  transition: color 0.2s ease;
}

.dash-card-h3-clickable::after {
  content: '›';
  margin-left: 0.3rem;
}

.dash-card-h3-clickable:hover {
  color: var(--gold-bright);
}

.next-match-subhead {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 1rem 0 0.5rem;
}

.next-game-card {
  grid-column: span 2;
}

@media (max-width: 700px) {
  .next-game-card {
    grid-column: span 1;
  }
}

.next-game-teams {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.next-game-meta {
  font-size: 0.83rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.insight-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 0.2rem;
}

.insight-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.mini-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.14);
}

.mini-list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mini-list-item .team-tag {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.coming-soon-panel {
  text-align: center;
  padding: 2.6rem 1rem;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid rgba(var(--cy-rgb), 0.22);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.view-toggle button {
  padding: 0.5rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}

.view-toggle button.active {
  background: rgba(var(--gold-rgb), 0.14);
  color: var(--gold-bright);
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-dow {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding-bottom: 0.4rem;
}

.calendar-day {
  min-height: 68px;
  border-radius: 8px;
  background: rgba(var(--cy-rgb), 0.025);
  border: 1px solid rgba(var(--cy-rgb), 0.15);
  padding: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-dim);
  position: relative;
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  min-height: 0;
}

.calendar-day.has-game {
  border-color: rgba(var(--gold-rgb), 0.5);
  color: var(--text);
}

.calendar-day-num {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-day-event {
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day-more {
  color: var(--text-dim);
}

.calendar-day-event.result-w { color: var(--ok, #5fd08a); }
.calendar-day-event.result-l { color: var(--bad, #f0806a); }
.calendar-day-event.result-t { color: var(--text-dim); }

.calendar-day.today {
  border-color: var(--blue-glow, #4fa8ff);
  box-shadow: inset 0 0 0 1px var(--blue-glow, #4fa8ff);
}
.calendar-day.today .calendar-day-num {
  color: var(--blue-glow, #4fa8ff);
}

.calendar-day .game-dot {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-glow);
  box-shadow: 0 0 6px 1px rgba(79, 168, 255, 0.8);
}

.calendar-month-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.calendar-nav button {
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.calendar-nav button:hover {
  background: rgba(var(--cy-rgb), 0.12);
}

.calendar-nav .calendar-month-label {
  min-width: 10rem;
}

.calendar-nav .calendar-today-btn {
  width: auto;
  padding: 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* result badges for past games in list rows */
.result-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.result-badge.result-w { color: var(--ok, #5fd08a); }
.result-badge.result-l { color: var(--bad, #f0806a); }
.result-badge.result-t,
.result-badge.result-pending { color: var(--text-dim); }

.schedule-list-item.is-past,
.compact-game-row.is-past { opacity: 0.82; }

.game-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.game-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.22);
  border-radius: 10px;
  font-size: 0.83rem;
  flex-wrap: wrap;
  gap: 0.4rem;
  box-shadow: 0 0 16px rgba(var(--cy-rgb), 0.06);
}

.game-list-item .game-date {
  font-weight: 700;
  color: var(--gold-bright);
  min-width: 130px;
}

.compact-game-row {
  align-items: flex-start;
}

.compact-game-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.compact-game-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.rsvp-updated {
  font-size: 0.68rem;
  color: var(--text-dim);
  min-height: 1em;
}

/* Check-in meta: team tally + last-updated + optional note */
.rsvp-meta { display: flex; flex-direction: column; gap: 0.15rem; margin-top: 0.25rem; }
.home-upcoming-row .rsvp-meta { flex-basis: 100%; align-items: flex-end; }
.rsvp-tally { font-size: 0.68rem; color: var(--text-dim); }
.rsvp-tally:empty { display: none; }
.rsvp-note-line { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.68rem; }
.rsvp-note-text { color: var(--text); font-style: italic; }
.rsvp-note-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 0.68rem; color: var(--electric-blue-bright, #7be9ff);
}
.rsvp-note-btn:hover { text-decoration: underline; }
.rsvp-note-input {
  flex: 1 1 140px; min-width: 120px; padding: 0.3rem 0.45rem; border-radius: 6px;
  font-size: 0.75rem; background: rgba(var(--ink-rgb), 0.05); color: var(--text);
  border: 1px solid rgba(var(--ink-rgb), 0.16);
}
.rsvp-note-input:focus { outline: none; border-color: var(--electric-blue); }
.rsvp-note-save, .rsvp-note-cancel {
  background: none; border: 0; padding: 0.15rem 0.3rem; cursor: pointer;
  font-size: 0.68rem; color: var(--electric-blue-bright, #7be9ff);
}
.rsvp-note-cancel { color: var(--text-dim); }

/* Shared schedule list (shared.js scheduleListHtml) — one grid so every row
   lines up across the dashboard, league, team and game-series views.
   Columns: Date · Matchup · Rink · Result · (Actions). */
.schedule-list { display: flex; flex-direction: column; gap: 0.55rem; }

.schedule-list-head,
.schedule-list-item {
  display: grid;
  /* Fixed date + result columns so the header row and every body row line up
     regardless of matchup length or badge width. */
  grid-template-columns: 132px minmax(0, 1.7fr) minmax(0, 1fr) 108px;
  align-items: center;
  gap: 0.5rem 1rem;
}
.schedule-list-head.has-actions,
.schedule-list-item.has-actions {
  grid-template-columns: 132px minmax(0, 1.7fr) minmax(0, 1fr) 108px minmax(120px, auto);
}

.schedule-list-head {
  padding: 0.2rem 1.1rem;
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); font-weight: 700;
}

.schedule-list-item {
  padding: 0.9rem 1.1rem;
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.22);
  border-radius: 10px;
  font-size: 0.83rem;
  box-shadow: 0 0 16px rgba(var(--cy-rgb), 0.06);
  text-align: left;
}

.schedule-list-item .game-date { font-weight: 700; color: var(--gold-bright); white-space: nowrap; }
.schedule-list-item .game-matchup { overflow: hidden; text-overflow: ellipsis; }
.schedule-list-item .game-loc {
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.schedule-list-item .game-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }

/* Short AI matchup note under a row (Workstream 6). */
.schedule-note {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.45;
}
.schedule-note[hidden] { display: none; }
.schedule-note::before {
  content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--electric-blue); margin: 0 0.5rem 0.15rem 0; vertical-align: middle;
}

@media (max-width: 640px) {
  .schedule-list-head { display: none; }
  .schedule-list-item,
  .schedule-list-item.has-actions {
    grid-template-columns: 1fr auto;
    row-gap: 0.3rem;
  }
  .schedule-list-item .game-matchup { grid-column: 1 / -1; order: 3; }
  .schedule-list-item .game-loc { order: 4; }
  .schedule-list-item .game-result { order: 2; text-align: right; }
  .schedule-list-item .game-actions { order: 5; grid-column: 1 / -1; justify-content: flex-start; }
}

.compact-game-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: flex-end;
}

.rsvp-btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.68rem;
}

.assignment-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(var(--gold-rgb), 0.1);
  color: var(--gold-bright);
  white-space: nowrap;
}

.create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.create-card {
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.25);
  border-radius: 14px;
  padding: 1.6rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(var(--cy-rgb), 0.04), 0 0 22px rgba(var(--cy-rgb), 0.09);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.create-card:hover {
  border-color: rgba(var(--gold-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.08), 0 0 22px rgba(var(--gold-rgb), 0.12);
  transform: translateY(-2px);
}

.create-card .icon {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
  color: var(--electric-blue-bright, #7be9ff);
}
.create-card .icon .ic { width: 1.7rem; height: 1.7rem; }

.create-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  text-transform: none;
  letter-spacing: normal;
}

.create-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.create-note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--gold-bright);
  text-align: center;
  min-height: 1.2em;
}

/* home tab: welcome banner */
.welcome-banner {
  position: relative;
  overflow: hidden;
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.25);
  border-radius: 14px;
  padding: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 1.4rem;
  box-shadow: 0 0 0 1px rgba(var(--cy-rgb), 0.04), 0 0 24px rgba(var(--cy-rgb), 0.09);
}

.welcome-text {
  position: relative;
  z-index: 1;
}

.welcome-text .team-filter--subtle {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* standings table (team.html, league.html) */
.standings-table {
  display: flex;
  flex-direction: column;
}

.standings-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.14);
  font-size: 0.83rem;
}

/* ESPN-style full standings table */
.standings-scroll { overflow-x: auto; }
.standings-table--full { min-width: 500px; }
/* minmax() with a real floor + min-width:0 on the cells: every row resolves to
   the same column widths, so header and rows line up even with long names. */
.standings-table--full .standings-row {
  grid-template-columns: minmax(9rem, 2.6fr) repeat(8, minmax(2.2rem, 1fr));
  text-align: right;
}
.standings-table--full .standings-row > span { min-width: 0; font-variant-numeric: tabular-nums; }
.standings-table--full .standings-team { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--sticky-bg, #090d14); padding-right: 0.4rem; }
.standings-table--full .standings-head .standings-team { background: var(--sticky-bg, #090d14); }
.standings-table--full .standings-pts { font-weight: 700; color: var(--gold-bright); }

.standings-row:last-child {
  border-bottom: none;
}

.standings-row.standings-head {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom-color: rgba(var(--cy-rgb), 0.22);
}

.standings-team {
  font-weight: 600;
  color: var(--text);
}

.standings-row.is-current-team {
  color: var(--gold-bright);
}

.standings-row.is-current-team .standings-team {
  color: var(--gold-bright);
}

/* home tab: featured team card */
.team-card {
  margin-bottom: 1.4rem;
}

.team-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.team-card-identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.team-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.team-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.team-card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(var(--gold-rgb), 0.06);
  white-space: nowrap;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 700px) {
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat .stat-value { overflow-wrap: anywhere; }
}

.stat .stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gold-bright);
  margin-bottom: 0.2rem;
}

.stat .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* home tab: team feed */
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.14);
}

.feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.feed-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(79, 168, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.feed-body {
  font-size: 0.84rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.feed-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* news feed tab */
.feed-composer {
  margin-bottom: 1.4rem;
  border: 1px solid rgba(var(--cy-rgb), 0.2); border-radius: 14px;
  background: rgba(var(--ink-rgb), 0.02); padding: 0.9rem 1rem;
}
.feed-composer-top { display: flex; align-items: center; gap: 0.7rem; }
.feed-composer-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 0.85rem;
}
.feed-composer-trigger {
  flex: 1; text-align: left; padding: 0.7rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(var(--ink-rgb), 0.18); background: transparent;
  color: var(--text-dim); font-family: inherit; font-size: 0.9rem; cursor: pointer;
}
.feed-composer-trigger:hover { background: rgba(var(--ink-rgb), 0.04); color: var(--text); }
.feed-composer-expand[hidden] { display: none; }
.feed-composer-expand { margin-top: 0.7rem; }
.feed-composer textarea {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
  font-family: inherit;
}

/* feed post cards */
.feed-list { display: flex; flex-direction: column; gap: 0.9rem; }
.feed-post {
  display: flex; gap: 0.8rem; padding: 1rem 1.1rem;
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.18); border-radius: 14px;
  background: rgba(var(--ink-rgb), 0.02);
}
.feed-post-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 0.82rem; text-decoration: none;
}
.feed-post-main { flex: 1; min-width: 0; }
.feed-post-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.35rem; }
.feed-post-author a, .feed-post-author { font-weight: 700; font-size: 0.88rem; color: var(--text); text-decoration: none; }
.feed-post-author a:hover { color: var(--gold-bright); }
.feed-post-time { font-size: 0.72rem; color: var(--text-dim); }
.feed-chip {
  font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem; border-radius: 999px; text-decoration: none;
  background: rgba(var(--cy-rgb), 0.12); color: var(--electric-blue-bright, #7be9ff);
}
a.feed-chip:hover { background: rgba(var(--cy-rgb), 0.22); }
.feed-post-body { font-size: 0.9rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ---- Home: middle chatter/notifications stream + right-hand check-in ---- */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}
.home-side { position: sticky; top: 1rem; }
@media (max-width: 900px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .home-side { position: static; order: -1; margin-bottom: 0.6rem; }
}

/* ---- Home activity stream (Slack/Discord-style) ---- */
.home-stream {
  display: flex; flex-direction: column;
  height: calc(100vh - 150px); min-height: 420px;
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.18); border-radius: 16px;
  background: rgba(var(--ink-rgb), 0.02); overflow: hidden;
}
/* iOS Safari: 100vh overshoots the visible area, hiding the composer and
   making the page feel stuck. Use the dynamic viewport unit where available. */
@supports (height: 100dvh) {
  .home-stream { height: calc(100dvh - 150px); }
}
/* Phones: let the feed flow with the page instead of trapping it in a fixed
   inner scroller (the composer/submit ends up unreachable otherwise). */
@media (max-width: 700px) {
  .home-stream { height: auto; min-height: 0; overflow: visible; }
  .home-stream .feed-list.home-channel { overflow: visible; }
}
.home-upcoming-strip {
  flex: 0 0 auto; padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  background: rgba(var(--cy-rgb), 0.05);
}
.home-upcoming-empty { font-size: 0.8rem; color: var(--text-dim); padding: 0.3rem 0 0.1rem; }
/* Check-in as its own boxed card in the right column. */
.home-side-card {
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.18);
  border-radius: 16px;
  background: rgba(var(--ink-rgb), 0.02);
}
.home-upcoming-strip.home-side-card {
  padding: 0.9rem 1rem;
  border-bottom: 0;
  background: rgba(var(--cy-rgb), 0.04);
}
.home-upcoming-head {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 0.3rem;
}
.home-upcoming-head-sub { margin-top: 0.6rem; }
.home-upcoming-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.4rem 0; font-size: 0.8rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.07);
}
.home-upcoming-head + .home-upcoming-row { border-top: 0; }
.home-upcoming-match { color: var(--text); font-weight: 600; text-decoration: none; }
.home-upcoming-match:hover { color: var(--gold-bright); }
.home-upcoming-when { color: var(--text-dim); font-size: 0.72rem; }
.home-upcoming-row .rsvp-buttons { margin-left: auto; }
.home-upcoming-done .home-upcoming-match { font-weight: 500; }
.home-upcoming-score { margin-left: auto; font-size: 0.78rem; color: var(--text-dim); }
.hu-res { font-weight: 800; }
.hu-res-w { color: var(--ok, #5fd08a); }
.hu-res-l { color: var(--bad, #f0806a); }
.hu-res-otl { color: var(--gold-bright); }

.feed-list.home-channel {
  flex: 1 1 auto; overflow-y: auto; gap: 0;
  padding: 0.4rem 0;
}
.stream-row {
  display: flex; gap: 0.7rem; padding: 0.5rem 1rem;
  text-decoration: none; color: inherit;
  border-left: 3px solid transparent;
}
.stream-row-post { flex-direction: column; gap: 0.25rem; }
.stream-row-head {
  display: flex; gap: 0.7rem; text-decoration: none; color: inherit;
}
a.stream-row:hover,
.stream-row-post:hover { background: rgba(var(--ink-rgb), 0.035); }
.stream-row-main { flex: 1; min-width: 0; }
.stream-row-line1 {
  font-size: 0.88rem; line-height: 1.45; color: var(--text);
  word-break: break-word;
}
.stream-row-line1 b { color: var(--text); font-weight: 700; }
.stream-row-line2 {
  margin-top: 0.15rem; font-size: 0.7rem; color: var(--text-dim);
}
.stream-icon { flex: 0 0 auto; }
.stream-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 0.66rem;
}
.stream-ev-icon {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
  background: rgba(var(--ink-rgb), 0.05); color: var(--text-dim);
}
.stream-ev-icon .ic { width: 16px; height: 16px; }
.stream-row-event[data-kind="rsvp_out"] .stream-ev-icon { color: var(--bad, #f0806a); }
.stream-row-event[data-kind="rsvp_in"] .stream-ev-icon,
.stream-row-event[data-kind="checked_in"] .stream-ev-icon { color: var(--ok, #5fd08a); }
.stream-row-event[data-kind="game_result"] .stream-ev-icon { color: var(--gold-bright); }
.stream-row-event[data-kind="game_scheduled"] .stream-ev-icon { color: var(--electric-blue-bright, #7be9ff); }
.stream-chip {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.08rem 0.4rem; border-radius: 999px;
  background: rgba(var(--cy-rgb), 0.12); color: var(--electric-blue-bright, #7be9ff);
}
.stream-row-event { align-items: flex-start; }
.stream-row-event[data-kind="rsvp_out"] { border-left-color: var(--bad, #f0806a); }
.stream-row-event[data-kind="rsvp_in"] { border-left-color: var(--ok, #5fd08a); }
.stream-row-event[data-kind="game_result"] { border-left-color: var(--gold); }
.stream-row-event[data-kind="game_scheduled"] { border-left-color: var(--electric-blue); }
.stream-row-event[data-kind="lines_set"],
.stream-row-event[data-kind="lineup_set"] { border-left-color: #9a7bd0; }
.stream-more { margin: 0.6rem auto; display: block; }

/* Feed welcome card (first visit) */
.stream-welcome {
  position: relative; margin: 0.6rem 1rem 0.4rem; padding: 0.9rem 1rem;
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.22); border-radius: 12px;
  background: rgba(var(--cy-rgb), 0.06);
}
.stream-welcome-title { font-weight: 700; margin-bottom: 0.35rem; }
.stream-welcome p { font-size: 0.82rem; line-height: 1.5; color: var(--text-dim); margin: 0 0 0.5rem; }
.stream-welcome .btn-secondary { margin: 0; }
.stream-welcome-dismiss {
  position: absolute; top: 0.4rem; right: 0.55rem;
  background: none; border: 0; color: var(--text-dim);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.stream-welcome-dismiss:hover { color: var(--text); }

/* Feed comments + reactions */
.stream-comments-wrap { padding: 0 1rem 0 3rem; }
.stream-post-actions { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.stream-comments-toggle {
  background: none; border: 0; padding: 0.1rem 0; cursor: pointer;
  font-size: 0.72rem; color: var(--electric-blue-bright, #7be9ff);
}
.stream-comments-toggle:hover { text-decoration: underline; }
.stream-comments { margin-top: 0.3rem; display: flex; flex-direction: column; gap: 0.45rem; }
.stream-comment {
  border-left: 2px solid rgba(var(--cy-rgb), 0.3); padding: 0.15rem 0 0.15rem 0.6rem;
}
.stream-comment-body { font-size: 0.83rem; line-height: 1.45; word-break: break-word; }
.stream-comment-body b { font-weight: 700; }
.stream-comment-foot {
  display: flex; align-items: center; gap: 0.6rem; margin-top: 0.2rem;
}
.stream-comment-when { font-size: 0.66rem; color: var(--text-dim); }
.reaction-row { display: flex; gap: 0.3rem; }
.reaction-btn {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: rgba(var(--ink-rgb), 0.04); border: 1px solid rgba(var(--ink-rgb), 0.12);
  border-radius: 999px; padding: 0.05rem 0.4rem; cursor: pointer;
  font-size: 0.68rem; color: var(--text-dim); line-height: 1.4;
}
.reaction-btn:hover { border-color: rgba(var(--ink-rgb), 0.28); }
.reaction-btn.is-active { color: var(--text); border-color: var(--electric-blue); background: rgba(var(--cy-rgb), 0.12); }
.reaction-btn.is-active .reaction-glyph-heart { color: var(--bad, #f0806a); }
.reaction-btn.is-active .reaction-glyph-up { color: var(--ok, #5fd08a); }
.reaction-btn.is-active .reaction-glyph-down { color: var(--bad, #f0806a); }
.stream-comment-form { display: flex; gap: 0.4rem; margin-top: 0.2rem; }
.stream-comment-input {
  flex: 1 1 auto; padding: 0.4rem 0.6rem; border-radius: 8px; font-size: 0.8rem;
  background: rgba(var(--ink-rgb), 0.04); color: var(--text);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
}
.stream-comment-input:focus { outline: none; border-color: var(--electric-blue); }
.stream-comment-form .btn-secondary { margin: 0; flex: 0 0 auto; }

.home-composer {
  flex: 0 0 auto; display: flex; gap: 0.5rem; align-items: center;
  padding: 0.6rem 0.8rem; border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
  background: rgba(var(--ink-rgb), 0.02);
}
/* Input, select, and Send all share one control height so the bar reads as
   one even row instead of three different-sized pieces. */
.home-composer input,
.home-composer select,
.home-composer .btn-primary {
  height: 2.6rem;
  box-sizing: border-box;
  border-radius: 8px;
}
.home-composer select {
  flex: 0 0 auto; width: auto; max-width: 40%;
  padding: 0 0.6rem;
  background: rgba(var(--ink-rgb), 0.04); color: var(--text);
  border: 1px solid rgba(var(--ink-rgb), 0.14); font-size: 0.8rem;
}
.home-composer input {
  flex: 1 1 auto; padding: 0 0.75rem;
  background: rgba(var(--ink-rgb), 0.04); color: var(--text);
  border: 1px solid rgba(var(--ink-rgb), 0.14); font-size: 0.88rem;
}
.home-composer input:focus { outline: none; border-color: var(--electric-blue); }
.home-composer input { min-width: 0; }
@media (max-width: 520px) {
  .home-composer { flex-wrap: wrap; }
  .home-composer input { flex: 1 1 100%; }
  .home-composer select { flex: 1 1 0; max-width: none; min-width: 0; }
}
.home-composer .btn-primary { margin: 0; width: auto; flex: 0 0 auto; padding: 0 1.2rem; font-size: 0.88rem; }
.home-composer .form-status { flex-basis: 100%; margin: 0.2rem 0 0; }
.home-composer .form-status[hidden] { display: none; }

/* user home page (player.html) */
.profile-hero { padding: 0; overflow: hidden; }
.profile-hero-banner { position: relative; height: 96px; }
.profile-avatar-wrap { position: relative; width: 84px; margin: -42px 0 0 1.4rem; }
.profile-avatar-wrap .profile-avatar { margin: 0; }
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: -42px 0 0 1.4rem;
  display: flex; align-items: center; justify-content: center; position: relative;
  border: 4px solid var(--navy);
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 1.5rem;
}
.profile-hero-body { padding: 0.6rem 1.4rem 1.4rem; }
.profile-name { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 800; }
.profile-loc { color: var(--text-dim); font-size: 0.86rem; margin-top: 0.2rem; }
.profile-desc { margin-top: 0.6rem; font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.9rem; }
.profile-actions .btn-primary, .profile-actions .btn-secondary { width: auto; margin: 0; flex: 0 0 auto; }
.jersey-tag {
  display: inline-block; min-width: 1.4rem; text-align: center;
  font-weight: 800; font-size: 0.72rem; color: var(--gold-bright);
}

/* team chat */
.team-chat-thread {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-height: 420px; overflow-y: auto; padding: 0.5rem 0.2rem 0.8rem;
}
.chat-msg { max-width: 78%; align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; }
.chat-msg.from-me { align-self: flex-end; align-items: flex-end; text-align: right; }
.chat-msg-bubble {
  display: inline-block; padding: 0.5rem 0.8rem;
  /* Quote-style point at the BOTTOM corner nearest the name/date underneath. */
  border-radius: 14px 14px 14px 4px;
  border-left: 2px solid rgba(var(--cy-rgb), 0.35);
  background: rgba(var(--ink-rgb), 0.06); font-size: 0.86rem; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; text-align: left;
}
.chat-msg.from-me .chat-msg-bubble {
  background: rgba(var(--gold-rgb), 0.18); color: var(--gold-bright);
  border-radius: 14px 14px 4px 14px;
  border-left: 0; border-right: 2px solid rgba(var(--gold-rgb), 0.45);
}
.chat-msg-foot {
  display: flex; gap: 0.4rem; align-items: baseline;
  margin-top: 0.2rem; padding: 0 0.3rem;
  font-size: 0.64rem; color: var(--text-dim);
}
.chat-msg-author { font-weight: 600; }
.chat-msg-foot .reaction-row { gap: 0.2rem; }
.chat-msg-foot .reaction-btn { padding: 0.02rem 0.3rem; font-size: 0.62rem; }
.team-chat-form { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.team-chat-form input {
  flex: 1; padding: 0.6rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(var(--ink-rgb), 0.18); background: rgba(var(--ink-rgb), 0.05);
  color: var(--text); font-family: inherit; font-size: 0.88rem; outline: none;
}
.team-chat-form input:focus { border-color: var(--gold); }
.team-chat-form .btn-primary { margin: 0; width: auto; flex: 0 0 auto; }

/* R3: team page header stats + half-and-half top row + jersey edit */
.team-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.team-header-stats { margin-top: 0.4rem; font-size: 0.82rem; color: var(--text-dim); }
.team-header-stats b { color: var(--text); }
.team-league-line {
  margin-top: 0.3rem; font-size: 0.8rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.team-league-line a {
  color: var(--gold-bright); font-weight: 700; text-decoration: none;
  text-transform: none; letter-spacing: normal;
}
.team-league-line a:hover { text-decoration: underline; }
.team-header-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.roster-jersey-edit { font-size: 0.72rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.25rem; }
.roster-jersey-edit input {
  width: 2.6rem; text-align: center; padding: 0.2rem 0.3rem; border-radius: 6px;
  border: 1px solid rgba(var(--cy-rgb), 0.24); background: rgba(var(--cy-rgb), 0.05); color: var(--text); font-family: inherit;
}

/* game page: merged box score + roster check-ins */
.game-details-inline {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1rem;
  padding-top: 0.9rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08);
}
.game-details-inline > div { display: flex; flex-direction: column; }
.game-details-inline span { font-size: 0.95rem; font-weight: 600; }
.game-details-inline label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-top: 0.15rem; }
.checkin-dot { font-size: 0.7rem; vertical-align: middle; }
.checkin-dot.in { color: var(--ok, #5fd08a); }
.checkin-dot.out { color: var(--bad, #f0806a); }
.checkin-dot.pending { color: var(--text-dim); }
.my-checkin { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; flex-wrap: wrap; }
.my-checkin-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }

/* R3: box score compact metric strip */
.box-strip {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 0.4rem 1.2rem; max-width: 420px; margin: 0.9rem auto 0; padding-top: 0.7rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08); font-variant-numeric: tabular-nums;
}
.box-strip-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; font-weight: 700; font-size: 0.9rem; }
.box-strip-away { text-align: left; }
.box-strip-home { text-align: right; }
.box-strip-labels { display: grid; grid-template-columns: repeat(3, 2.4rem); gap: 0.4rem; text-align: center;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); }

/* R3: game-page roster panel — clear away/home distinction */
.roster-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.roster-col { border: 1px solid rgba(var(--ink-rgb), 0.1); border-radius: 10px; padding: 0.7rem 0.8rem; min-width: 0; }
.roster-col-head {
  font-weight: 700; font-size: 0.92rem; padding-bottom: 0.5rem; margin-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
}
.roster-col-away { background: rgba(var(--cy-rgb), 0.04); }
.roster-col-away .roster-col-head { border-bottom-color: var(--electric-blue); }
.roster-col-home { background: rgba(var(--gold-rgb), 0.05); }
.roster-col-home .roster-col-head { border-bottom-color: var(--gold); }
.roster-list { display: flex; flex-direction: column; gap: 0.1rem; }
.roster-row { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.22rem 0; font-size: 0.85rem; flex-wrap: wrap; }
.roster-row .jersey-tag { flex: 0 0 auto; }
.roster-row .roster-name { font-weight: 600; }
.roster-row .roster-pos { font-size: 0.72rem; color: var(--text-dim); }
@media (max-width: 640px) { .roster-panel { grid-template-columns: 1fr; } }

/* league schedule editor (spreadsheet) */
.schedule-editor-wrap { overflow-x: auto; }
.schedule-editor { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.schedule-editor th {
  text-align: left; padding: 0.4rem 0.5rem; font-size: 0.64rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
.schedule-editor td { padding: 0.35rem 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: middle; }
.schedule-editor input[type="date"], .schedule-editor input[type="time"], .schedule-editor select {
  padding: 0.35rem 0.4rem; border-radius: 7px; border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04); color: var(--text); font-family: inherit; font-size: 0.8rem; width: 100%;
}
.schedule-editor .se-actions { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.schedule-editor .se-actions .btn-primary { margin: 0; width: auto; }
.schedule-editor .se-add-row td { border-top: 2px solid rgba(47,216,255,0.25); padding-top: 0.7rem; }
.se-status { font-size: 0.72rem; }
.se-status.ok { color: var(--ok, #5fd08a); }
.se-status.err { color: var(--bad, #f0806a); }
.feed-composer-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}
.feed-composer-scope {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.feed-composer-bar .btn-primary { margin: 0; width: auto; flex: 0 0 auto; }
.feed-composer-scope select { width: auto; }

/* clickable game rows */
.game-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(47,216,255,0.4); }
.game-link:hover { color: var(--blue-glow, #4fa8ff); }
a.calendar-day-event { text-decoration: none; display: block; }

/* league page tabs (ESPN-like) */
.league-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.22);
  margin: 1rem 0 1.2rem;
}
.league-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.league-tab.active { color: var(--text); border-bottom-color: var(--gold, #d4af5a); }
.league-tab-panel { display: none; }
.league-tab-panel.active { display: block; }

/* inline per-game admin controls */
.game-admin { width: 100%; margin-top: 0.5rem; }
.game-admin > summary {
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-glow, #4fa8ff);
}
.game-admin-body {
  margin-top: 0.7rem;
  padding: 0.8rem;
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.18);
  border-radius: 10px;
  background: rgba(var(--cy-rgb), 0.03);
}
.ga-section { padding: 0.5rem 0; border-bottom: 1px solid rgba(47,216,255,0.12); }
.ga-section:last-of-type { border-bottom: none; }
.ga-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 0.5rem; }
.ga-assign-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.4rem; font-size: 0.82rem; }
.ga-assign-row select, .ga-custom select, .ga-custom input { max-width: 12rem; }
.ga-custom { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 0.4rem; }
.form-card-h { text-transform: uppercase; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.9rem; }
.dash-shell.public-team .dash-main { max-width: 960px; margin: 0 auto; }
.feed-list .feed-item {
  background: rgba(var(--cy-rgb), 0.03);
  border: 1px solid rgba(var(--cy-rgb), 0.14);
  border-radius: 10px;
  padding: 0.9rem;
  margin-bottom: 0.8rem;
}

/* invites in the messages pane */
.invites-section:not(:empty) {
  padding: 0.6rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.16);
}
.invites-head {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.invite-card {
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  background: rgba(var(--gold-rgb), 0.06);
  border-radius: 10px;
  padding: 0.7rem;
  margin-bottom: 0.5rem;
}
.invite-text { font-size: 0.82rem; margin-bottom: 0.55rem; }
.invite-actions { display: flex; align-items: center; gap: 0.8rem; }
.invite-actions .btn-primary { padding: 0.35rem 0.9rem; font-size: 0.78rem; }

/* create-league division rows */
.league-division-row {
  border: 1px solid rgba(var(--cy-rgb), 0.16);
  border-radius: 10px;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

/* follow toggle button (team.html / league.html headers) */
.follow-btn {
  flex-shrink: 0;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--gold, #d4af5a);
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep, #060a16);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.follow-btn.is-following {
  background: transparent;
  color: var(--text);
}

/* home tab: profile progress */
.progress-card-body {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.progress-ring-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

.progress-ring-wrap svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-track {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.08);
  stroke-width: 8;
}

.progress-ring-value-circle {
  fill: none;
  stroke: var(--gold-bright);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.progress-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* home tab: action center (lives inside a .dash-card, in parallel with My Teams) */
.action-center {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1rem;
  background: rgba(var(--cy-rgb), 0.035);
  border: 1px solid rgba(var(--cy-rgb), 0.25);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(var(--cy-rgb), 0.04), 0 0 20px rgba(var(--cy-rgb), 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.action-btn:hover {
  border-color: rgba(var(--gold-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.08), 0 0 20px rgba(var(--gold-rgb), 0.12);
  transform: translateY(-2px);
}

.action-btn .icon {
  font-size: 1.4rem;
}

/* settings tab */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: 640px;
}

.field input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .dash-shell {
    flex-direction: column;
  }

  .sidebar {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(var(--cy-rgb), 0.18);
    box-shadow: 0 2px 20px rgba(var(--cy-rgb), 0.06);
    padding: 1rem;
  }

  .sidebar-profile {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    margin-right: 1rem;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* global "Discover" search bar, shown near the footer on most pages */
.global-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  max-width: 720px;
  min-height: 64px;
  margin: 2.4rem auto 1.2rem;
  padding: 1rem 1rem 1rem 1.6rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--cy-rgb), 0.3);
  background: rgba(var(--cy-rgb), 0.04);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 20px rgba(var(--cy-rgb), 0.09);
}

.global-search input[type="search"] {
  flex: 1 1 220px;
  min-width: 140px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.98rem;
  font-family: inherit;
  padding: 0.6rem 0;
}

.global-search input[type="search"]::placeholder {
  color: var(--text-dim);
}

.global-search button[type="submit"] {
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.global-search button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.35);
}

/* team.html */
.team-select-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}

.team-select-bar select {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.invited-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(var(--cy-rgb), 0.14);
  color: var(--electric-blue-bright);
  margin-left: 0.5rem;
}

.game-block {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.14);
}

.game-block:last-child {
  border-bottom: none;
}

.game-block-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.game-block-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.assignment-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 0.3rem 0;
}

.assignment-row .assigned {
  color: var(--text);
}

.rsvp-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.rsvp-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--cy-rgb), 0.2);
  background: rgba(var(--cy-rgb), 0.035);
  color: var(--text-dim);
  font-size: 0.76rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.rsvp-btn.active[data-status="in"] {
  border-color: rgba(90, 200, 120, 0.6);
  background: rgba(90, 200, 120, 0.12);
  color: #8fe3a8;
}

.rsvp-btn.active[data-status="out"] {
  border-color: rgba(240, 128, 106, 0.6);
  background: rgba(240, 128, 106, 0.12);
  color: var(--bad, #f0806a);
}

.rsvp-btn.active[data-status="pending"] {
  border-color: rgba(var(--gold-rgb), 0.5);
  background: rgba(var(--gold-rgb), 0.1);
  color: var(--gold-bright);
}

.owner-tools {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(var(--cy-rgb), 0.18);
}

.owner-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

/* Messages tab: full-page two-pane inbox */
.tab-panel.messages-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.messages-shell {
  display: flex;
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
  /* Match .home-stream's convention (header + dash-main padding + footer). */
  height: calc(100vh - 150px);
  min-height: 420px;
}
@supports (height: 100dvh) {
  .messages-shell { height: calc(100dvh - 150px); }
}
.messages-list-pane { flex: 0 0 320px; }
.messages-thread-pane { flex: 1 1 auto; min-width: 0; }

@media (max-width: 700px) {
  .messages-shell {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .messages-list-pane { flex: 0 0 auto; max-height: 45vh; }
  /* Real height so the compose box + Send button are always on screen. */
  .messages-thread-pane { flex: 0 0 auto; height: 70vh; min-height: 420px; }
}
@supports (height: 100dvh) {
  @media (max-width: 700px) {
    .messages-thread-pane { height: 70dvh; }
  }
}

.messages-list-pane,
.messages-thread-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(var(--cy-rgb), 0.035);
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.25);
  border-radius: 14px;
  overflow: hidden;
}

.messages-search {
  padding: 0.9rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.16);
  position: relative;
}

.messages-search input[type="search"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.messages-search-results {
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  top: 100%;
  z-index: 5;
  background: var(--navy);
  border: 1px solid rgba(var(--cy-rgb), 0.3);
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.messages-search-results:empty {
  border: none;
}

.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.83rem;
  font-family: inherit;
  cursor: pointer;
}

.search-result-item:hover {
  background: rgba(var(--cy-rgb), 0.08);
}

/* discover.html — Google-style line-by-line results */
.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-result-row {
  display: block;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.12);
  text-decoration: none;
  color: inherit;
}

.search-result-row:first-child {
  border-top: 1px solid rgba(var(--cy-rgb), 0.12);
}

.search-result-row:hover .search-result-title {
  text-decoration: underline;
}

.search-result-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue-glow, #4fa8ff);
  margin-bottom: 0.15rem;
}

.search-result-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.search-result-meta .type {
  color: var(--gold, #d4af5a);
  font-weight: 600;
}

/* inline member-search picker (roster / league admins) */
.inline-search-field {
  position: relative;
}

.inline-search-results {
  margin-top: 0.3rem;
  border-radius: 8px;
  overflow: hidden;
}

.inline-search-results:not(:empty) {
  border: 1px solid rgba(var(--cy-rgb), 0.28);
  background: rgba(6, 10, 22, 0.6);
}

.picked-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--cy-rgb), 0.28);
  background: rgba(var(--cy-rgb), 0.06);
  font-size: 0.85rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--blue-glow, #4fa8ff);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

/* red aggregate nav badge (distinct from the gold per-conversation .unread-badge) */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}
.nav-badge[hidden] { display: none; }

.conversation-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.4rem;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.conversation-item:hover {
  background: rgba(var(--ink-rgb), 0.05);
}

.conversation-item.active {
  background: rgba(var(--gold-rgb), 0.12);
}

.conversation-item-body {
  min-width: 0;
  flex: 1 1 auto;
}

.conversation-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.conversation-item-preview {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold-fill-2);
  color: var(--navy-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

.thread-header {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.16);
}

.thread-header-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.thread-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.thread-message {
  max-width: 75%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.05);
  align-self: flex-start;
}

.thread-message.from-me {
  align-self: flex-end;
  background: rgba(var(--gold-rgb), 0.14);
}

.thread-message-body {
  font-size: 0.85rem;
  color: var(--text);
  word-break: break-word;
}

.thread-message-time {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.compose-form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem;
  border-top: 1px solid rgba(var(--cy-rgb), 0.16);
}

.compose-form textarea {
  flex: 1 1 auto;
  resize: none;
  min-height: 44px;
  max-height: 100px;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.compose-form .btn-primary {
  width: auto;
  align-self: flex-end;
}

/* ============================================================
   Hockey stats layer: ticker, game preview, player stats, entry
   ============================================================ */

/* --- Secondary / small buttons --- */
.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 9px;
  border: 1px solid rgba(var(--cy-rgb), 0.35);
  background: rgba(var(--cy-rgb), 0.06);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-secondary:hover { background: rgba(var(--cy-rgb), 0.14); border-color: var(--electric-blue); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; border-radius: 7px; }

.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.card-head-row h3 { margin: 0; }

/* --- Scrolling score ticker --- */
.score-ticker {
  position: relative;
  overflow: hidden;
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.18);
  border-radius: 10px;
  background: rgba(10, 16, 26, 0.6);
  margin-bottom: 1.2rem;
  padding: 0.55rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.score-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .score-ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .score-ticker-track { animation: none; }
}
.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.4rem;
  border-right: 1px solid rgba(var(--ink-rgb), 0.08);
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
}
.tick-team { font-weight: 700; letter-spacing: 0.02em; }
.tick-sep { color: var(--text-dim); opacity: 0.5; }
.tick-dim { color: var(--text-dim); }
.tick-w { color: #6ee7a8; font-weight: 700; }
.tick-l { color: #ff8080; font-weight: 700; }
.tick-otl { color: var(--gold-bright); font-weight: 700; }

/* --- Game preview hero --- */
.game-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1rem;
  border: 1px solid rgba(var(--cy-rgb), 0.15);
  border-radius: 12px;
  background: rgba(10, 16, 26, 0.5);
  margin-bottom: 1.2rem;
}
.game-hero-team { display: flex; flex-direction: column; gap: 0.25rem; }
.game-hero-team.align-right { align-items: flex-end; text-align: right; }
.game-hero-name { font-size: 1.25rem; font-weight: 800; }
.game-hero-name a, .game-hero-name span {
  color: inherit; font-weight: inherit; text-decoration: none; border-bottom: none;
}
.game-hero-name a:hover { color: var(--gold-bright); }
.game-hero-rec { font-size: 0.82rem; color: var(--text-dim); }
.game-hero-center { text-align: center; }
.game-hero-meta { font-size: 0.76rem; color: var(--text-dim); margin-top: 0.35rem; }
.game-hero-score { font-size: 2.2rem; font-weight: 800; display: flex; align-items: baseline; gap: 0.5rem; justify-content: center; }
.game-hero-score span { font-size: 1.3rem; color: var(--text-dim); }
.game-hero-score--sched { color: var(--text-dim); font-size: 1.6rem; }
.game-hero-status { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.3rem; }
.ls-ot-tag { font-size: 0.7rem; color: var(--gold-bright); border: 1px solid var(--gold); border-radius: 5px; padding: 0.05rem 0.35rem; align-self: center; }

/* --- Line score --- */
.linescore { display: flex; flex-direction: column; gap: 0.3rem; max-width: 520px; }
.ls-row { display: flex; align-items: center; gap: 0.3rem; }
.ls-row > span { width: 2.4rem; text-align: center; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.ls-row .ls-team { flex: 1 1 auto; width: auto; min-width: 8rem; text-align: left; font-weight: 500; font-style: normal; }
.ls-total { border-left: 1px solid rgba(255,255,255,0.12); }
.ls-head { color: var(--text-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.ls-total { font-weight: 800; }

/* --- Side-by-side comparison columns --- */
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.leaders-col { min-width: 0; }
/* Per-game player box score tables */
.pbox-side { min-width: 0; }
.pbox-side .standings-scroll { margin-bottom: 0.9rem; }
.pbox-table { min-width: 330px; display: flex; flex-direction: column; }
.pbox-row {
  display: grid; grid-template-columns: minmax(7rem, 2.4fr) repeat(6, minmax(1.9rem, 1fr));
  gap: 0.4rem; padding: 0.4rem 0; font-size: 0.82rem; text-align: right;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.07); align-items: baseline;
}
.pbox-row > span { min-width: 0; font-variant-numeric: tabular-nums; }
.pbox-row:last-child { border-bottom: none; }
.pbox-row .pbox-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbox-row .pbox-name .team-link { color: var(--text); text-decoration: none; font-weight: 600; }
.pbox-row .pbox-name .team-link:hover { color: var(--gold-bright); }
.pbox-row.pbox-head {
  font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); border-bottom-color: rgba(var(--cy-rgb), 0.22);
}
.pbox-pts { font-weight: 700; color: var(--gold-bright); }
.pbox-row.pbox-head > span:first-child { text-align: left; }
.leaders-col-head { font-weight: 700; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.6rem; }
.leader-group { margin-bottom: 0.8rem; }
.leader-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.25rem; }
.leader-row { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.88rem; padding: 0.15rem 0; }
.leader-stat { color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.goalie-line { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.3rem 0; }
.goalie-line-sub { font-size: 0.72rem; color: var(--text-dim); }

/* --- Box score stat rows --- */
.box-stat-head { display: grid; grid-template-columns: 1fr auto 1fr; font-weight: 700; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.4rem; }
.box-stat-head span:first-child { text-align: left; }
.box-stat-head span:last-child { text-align: right; }
.box-stat-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.35rem 0; font-variant-numeric: tabular-nums; }
.box-stat-row span:first-child { text-align: left; font-weight: 600; }
.box-stat-row span:last-child { text-align: right; font-weight: 600; }
.box-stat-label { color: var(--text-dim); font-size: 0.82rem; padding: 0 1rem; }

.standings-row.is-dim { opacity: 0.5; }

/* --- Player stats tables (league page) --- */
.stats-filter-bar { margin-bottom: 1rem; }
.stats-filter-bar label { font-size: 0.82rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.5rem; }
.stats-filter-bar select {
  padding: 0.4rem 0.6rem; border-radius: 8px; border: 1px solid rgba(var(--cy-rgb), 0.25);
  background: rgba(var(--cy-rgb), 0.05); color: var(--text); font-family: inherit; font-size: 0.85rem;
}
.stats-scroll { overflow-x: auto; }
.stats-table { min-width: 720px; display: flex; flex-direction: column; }
.stats-table--goalie { min-width: 900px; }
.stats-row {
  display: grid;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.05);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.stats-table--skater .stats-row { grid-template-columns: minmax(150px, 1.7fr) minmax(110px, 1fr) repeat(7, minmax(2.6rem, 0.7fr)); }
.stats-table--goalie .stats-row { grid-template-columns: minmax(150px, 1.7fr) minmax(110px, 1fr) repeat(10, minmax(2.6rem, 0.7fr)); }
.stats-row > span { text-align: center; min-width: 0; }
.stats-row .stats-name, .stats-row .stats-team { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-row .stats-team { color: var(--text-dim); font-size: 0.8rem; }
.stats-head { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stats-pts { font-weight: 800; }

/* --- Schedule day grouping --- */
.schedule-day { margin-bottom: 1rem; }
.schedule-day-head {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--gold-bright); font-weight: 700; margin-bottom: 0.7rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid rgba(var(--gold-rgb), 0.25);
}
.schedule-list-item .game-when { color: var(--text-dim); }

/* --- Interim stat entry --- */
.game-entry > summary { cursor: pointer; font-weight: 700; }
.game-entry-body { margin-top: 1rem; }
.ent-side { min-width: 0; }
.ent-side-head { font-weight: 700; margin-bottom: 0.6rem; }
.ent-subhead { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 0.8rem 0 0.35rem; }
.ent-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ent-cell { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--text-dim); gap: 0.2rem; }
.ent-cell input { width: 3.2rem; text-align: center; }
.ent-skaters, .ent-goalies { display: flex; flex-direction: column; gap: 0.35rem; }
.ent-skater, .ent-goalie { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.ent-skater-name { flex: 1 1 8rem; font-size: 0.82rem; }
.ent-skater input, .ent-goalie input[type="number"] { width: 3rem; text-align: center; }
.ent-goalie select { padding: 0.2rem; }
.ent-so { font-size: 0.75rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 0.25rem; }
.game-entry input, .game-entry select {
  border-radius: 6px; border: 1px solid rgba(var(--cy-rgb), 0.25);
  background: rgba(var(--cy-rgb), 0.05); color: var(--text); font-family: inherit; padding: 0.3rem;
}
.ent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.ent-actions .btn-primary { width: auto; }

/* --- Dashboard: disabled sidebar link + coming-soon pill --- */
.sidebar-nav .sidebar-link.is-disabled {
  opacity: 0.45; cursor: not-allowed; display: flex; align-items: center; gap: 0.4rem;
}
.coming-soon-pill {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--text-dim); border-radius: 5px; padding: 0.05rem 0.3rem; color: var(--text-dim);
}
/* "Home" nav item is a team dropdown that lives in the sidebar */
.sidebar-home-select {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem 1.6rem 0.7rem calc(0.8rem - 3px);
  border-radius: 10px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa4bd' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar-home-select:hover { background-color: rgba(var(--ink-rgb), 0.05); color: var(--text); }
.sidebar-home-select.active {
  background-color: rgba(var(--gold-rgb), 0.12);
  color: var(--gold-bright);
  border-left-color: var(--electric-blue);
}
.sidebar-home-select option { background: var(--navy); color: var(--text); }

@media (max-width: 720px) {
  .game-hero { grid-template-columns: 1fr; gap: 0.8rem; text-align: center; }
  .game-hero-team.align-right { align-items: center; text-align: center; }
  .side-by-side { grid-template-columns: 1fr; }
}

/* ============ Overhaul additions ============ */

/* Custom Home dropdown in the sidebar */
.sidebar-home { position: relative; }
.sidebar-home-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; text-align: left;
  padding: 0.7rem 0.9rem 0.7rem calc(0.8rem - 3px);
  border-radius: 10px; border: none; border-left: 3px solid transparent;
  background: transparent; color: var(--text-dim);
  font-size: 0.86rem; font-family: inherit; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar-home-toggle:hover { background-color: rgba(var(--ink-rgb), 0.05); color: var(--text); }
.sidebar-home.active .sidebar-home-toggle {
  background-color: rgba(var(--gold-rgb), 0.12); color: var(--gold-bright);
  border-left-color: var(--electric-blue, #2fd8ff);
}
.sidebar-home-caret { font-size: 0.7rem; opacity: 0.7; }
.sidebar-home-menu {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--navy, #0b1226); border: 1px solid rgba(var(--ink-rgb), 0.12);
  border-radius: 10px; padding: 0.4rem; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  max-height: 60vh; overflow-y: auto;
}
.home-menu-item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left;
  padding: 0.5rem 0.6rem; border: none; background: transparent; color: var(--text);
  font-size: 0.84rem; font-family: inherit; border-radius: 8px; cursor: pointer;
}
.home-menu-item:hover { background: rgba(var(--ink-rgb), 0.06); }
.home-menu-item.is-active { background: rgba(var(--gold-rgb), 0.14); color: var(--gold-bright); }
.home-menu-badge {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep, #060a16);
}
.home-menu-group {
  padding: 0.5rem 0.6rem 0.25rem; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim);
}
.home-menu-sep { height: 1px; background: rgba(var(--ink-rgb), 0.1); margin: 0.35rem 0.3rem; }

/* Game status badge */
.game-status-badge {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid currentColor;
}
.game-status-upcoming { color: var(--text-dim); }
.game-status-live { color: var(--bad, #f0806a); }
.game-status-final { color: var(--ok, #5fd08a); }

/* Line combinations — compact */
.line-combo-compact { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.3rem; }
.line-combo-row { display: flex; gap: 0.5rem; font-size: 0.82rem; align-items: baseline; }
.line-combo-tag {
  flex: 0 0 auto; min-width: 2.2rem; font-weight: 800; font-size: 0.68rem;
  color: var(--gold-bright, #f0d68a); text-transform: uppercase; letter-spacing: 0.04em;
}

/* Next-match block inside the team top card */
.next-match-block {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(var(--ink-rgb), 0.1);
}
.next-match-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.next-match-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700;
}

/* Division selector pills */
.division-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.division-pill {
  padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), 0.16);
  background: transparent; color: var(--text-dim); font-size: 0.8rem; font-family: inherit; cursor: pointer;
}
.division-pill:hover { color: var(--text); border-color: rgba(var(--ink-rgb), 0.3); }
.division-pill.is-active {
  background: rgba(var(--gold-rgb), 0.15); color: var(--gold-bright); border-color: var(--gold, #d4af5a);
}

/* ScoreKeeper Admin game list */
.sk-game-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sk-game-row {
  border: 1px solid rgba(var(--ink-rgb), 0.1); border-radius: 10px; padding: 0.7rem 0.9rem;
}
.sk-game-main { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.sk-game-teams { font-weight: 700; flex: 1 1 200px; }
.sk-game-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.sk-quick-slot { margin-top: 0.6rem; }
.sk-quick-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; }
.sk-quick-form label { display: flex; flex-direction: column; font-size: 0.72rem; color: var(--text-dim); gap: 0.2rem; }
.sk-quick-form input[type="number"] { width: 4rem; }

/* League page shell (sidebar when signed in) */
.league-hero { padding-top: 1.5rem; }
.league-shell { width: 100%; max-width: 1100px; margin: 0 auto; }
.league-shell.has-sidebar { display: grid; grid-template-columns: 230px 1fr; gap: 1.6rem; align-items: start; }
.league-shell .sidebar { position: sticky; top: 1.5rem; }
.league-main { min-width: 0; }
@media (max-width: 900px) {
  .league-shell.has-sidebar { grid-template-columns: 1fr; }
  .league-shell .sidebar { position: static; }
}

/* Following list in settings */
.following-block { margin-top: 1rem; }
.following-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); font-weight: 700; margin-bottom: 0.4rem;
}

/* Misc */
.game-edit-bar { margin: 0.6rem 0 0.2rem; text-align: right; }
.stat-rank { color: var(--text-dim); font-variant-numeric: tabular-nums; margin-right: 0.3rem; }

/* "<rank> <team>" always on one line: fixed rank column, name truncates. */
.rank-cell { display: flex; align-items: baseline; gap: 0.55rem; min-width: 0; flex: 1 1 auto; }
.rank-cell .rank {
  flex: 0 0 1.6rem; text-align: right; color: var(--text-dim);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.rank-cell .team-link {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.rank-cell .team-link:hover { color: var(--gold-bright); }
.mini-list-item .stat-val {
  flex: 0 0 auto; min-width: 3.4rem; text-align: right;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.stats-division-note {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin: -0.4rem 0 0.8rem;
}

/* Search field restyle */
.nh-search,
.messages-search input[type="search"],
.inline-search-field input[type="search"] {
  width: 100%;
  padding: 0.6rem 0.8rem 0.6rem 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--cy-rgb), 0.28);
  background: rgba(var(--cy-rgb), 0.05);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%239aa4bd' stroke-width='2'/%3E%3Cpath d='M20 20l-3.5-3.5' stroke='%239aa4bd' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.7rem center;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.nh-search:hover,
.messages-search input[type="search"]:hover,
.inline-search-field input[type="search"]:hover {
  border-color: rgba(var(--cy-rgb), 0.5);
}
.nh-search:focus,
.messages-search input[type="search"]:focus,
.inline-search-field input[type="search"]:focus {
  border-color: var(--gold, #d4af5a);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.18);
  background-color: rgba(var(--cy-rgb), 0.08);
}
.global-search {
  border-color: rgba(var(--cy-rgb), 0.4);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.global-search:focus-within {
  border-color: var(--gold, #d4af5a);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(var(--gold-rgb), 0.18);
}
.global-search-hint {
  text-align: center; margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--text-dim);
}
.global-search-hint b { color: var(--text); font-weight: 600; }

/* ============ Round 2 additions ============ */

/* Home toggle label can get long ("Home - Metro Hockey League") */
.sidebar-home-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-menu-item { gap: 0.55rem; }
.home-menu-item > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Scroll-wheel number picker */
.nh-wheel-wrap {
  position: relative;
  width: 100%;
  max-width: 8.5rem;
  height: 170px; /* 5 items × 34px */
  border-radius: 12px;
  border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.04);
  overflow: hidden;
}
.nh-wheel-wrap::before,
.nh-wheel-wrap::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 68px;
  pointer-events: none; z-index: 2;
}
.nh-wheel-wrap::before { top: 0; background: linear-gradient(180deg, rgba(11,18,38,0.92), rgba(11,18,38,0)); }
.nh-wheel-wrap::after { bottom: 0; background: linear-gradient(0deg, rgba(11,18,38,0.92), rgba(11,18,38,0)); }
.nh-wheel-wrap > .nh-wheel-band {
  content: "";
  position: absolute; left: 6px; right: 6px; top: 50%; height: 34px;
  transform: translateY(-50%);
  border-top: 1px solid rgba(var(--gold-rgb), 0.5);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.5);
  pointer-events: none; z-index: 1;
}
.nh-wheel {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
  position: relative;
}
.nh-wheel::-webkit-scrollbar { display: none; }
.nh-wheel:focus-visible { box-shadow: inset 0 0 0 2px var(--gold, #d4af5a); border-radius: 12px; }
.nh-wheel-spacer { height: 68px; flex: 0 0 68px; }
.nh-wheel-item {
  height: 34px;
  display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center;
  font-size: 0.95rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.12s ease, font-size 0.12s ease;
}
.nh-wheel-item.is-selected { color: var(--gold-bright, #f0d68a); font-weight: 800; font-size: 1.15rem; }

/* Lightweight modal */
.nh-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 6, 16, 0.68);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.nh-modal {
  width: 100%; max-width: 420px;
  background: var(--navy, #0b1226);
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.nh-modal h3 { margin: 0 0 1rem; }
.nh-modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1rem; }
.nh-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nh-modal-head h3 { margin: 0; }
.nh-modal-x { background: none; border: none; color: var(--text-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.nh-modal-x:hover { color: var(--text); }

/* Quick Score popup */
.qs-modal { max-width: 420px; }
.qs-wheels { display: flex; gap: 1.4rem; justify-content: center; margin: 0.4rem 0 0.8rem; }
.qs-wheel-col { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.qs-wheel-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-dim); text-align: center; max-width: 8rem;
}
.qs-ot { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.2rem 0; }
.qs-modal .form-status[hidden] { display: none; }

/* OT vs Shootout — two mutually-exclusive checkboxes */
.ot-so-control { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0; }
.roster-position-select { width: 100%; }

/* Team-only standings — invite-your-league-admin CTA */
.league-inquiry-cta { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08); }
.league-inquiry-cta p { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 0.6rem; }

/* Discover tab — search-first */
.discover-panel { max-width: 640px; margin: 2.5rem auto 0; text-align: center; }
.discover-search input[type="search"] {
  width: 100%; padding: 0.95rem 1.1rem; font-size: 1.05rem; border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.05); color: var(--text);
  border: 1px solid rgba(var(--cy-rgb), 0.3); font-family: inherit; outline: none;
}
.discover-search input[type="search"]:focus { border-color: var(--electric-blue); }
.discover-hint { margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-dim); }
.discover-hint b { color: var(--text); font-weight: 600; }
.discover-panel .search-results-list { margin-top: 1.4rem; text-align: left; }

/* Scorekeeper view — neutral final line, winner first */
.sk-final { color: var(--text); font-variant-numeric: tabular-nums; }
.sk-final b { color: var(--green, var(--ok, #5fd08a)); font-weight: 700; }
.sk-assign-btn { font-size: 0.75rem; }

/* R3: game top action bar + full-page editor sections */
.game-action-bar { display: flex; gap: 0.5rem; margin: 0 0 1rem; justify-content: flex-end; }
/* Even vertical rhythm between the stacked game-page blocks. */
#gameContent > .dash-card,
#gameContent > .side-by-side { margin-bottom: 1.2rem; }
#gameContent > .dash-card:last-child { margin-bottom: 0; }
.ge-section { margin-bottom: 1.2rem; }
.ge-section .card-head-row { align-items: baseline; }

/* R3: line-combinations modal */
.lc-modal { max-width: 640px; }
.lc-body { max-height: 62vh; overflow-y: auto; margin: 0.6rem 0; }
.lc-group { margin-bottom: 1rem; }
.lc-group-title { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-bright); margin-bottom: 0.4rem; }
.lc-row { display: flex; align-items: flex-end; gap: 0.6rem; padding: 0.3rem 0; flex-wrap: wrap; }
.lc-row-label { flex: 0 0 5.5rem; font-size: 0.78rem; color: var(--text-dim); padding-bottom: 0.5rem; }
.lc-cell { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.66rem; color: var(--text-dim); flex: 1 1 8rem; min-width: 7rem; }
.lc-cell select {
  padding: 0.4rem 0.5rem; border-radius: 8px; border: 1px solid rgba(var(--cy-rgb), 0.24);
  background: rgba(var(--cy-rgb), 0.05); color: var(--text); font-family: inherit; font-size: 0.82rem;
}

/* Inline pencil edit */
.inline-edit { display: flex; align-items: flex-start; gap: 0.5rem; }
.inline-edit-value { flex: 1; min-width: 0; }
.inline-edit-pencil,
.inline-edit-ok,
.inline-edit-cancel {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  font-size: 0.95rem; color: var(--text-dim); padding: 0.15rem 0.35rem; border-radius: 6px;
}
.inline-edit-pencil:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.inline-edit-ok { color: var(--ok, #5fd08a); }
.inline-edit-cancel { color: var(--bad, #f0806a); }

/* Manage League screen */
.manage-titlebar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0 0.8rem; margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.1);
}
.manage-titlebar .dash-title { font-size: 1.1rem; }
.league-details-slim h3 { font-size: 0.95rem; }
.divisions-summary { color: var(--text-dim); font-size: 0.85rem; margin: 0.6rem 0; }
.divisions-summary .div-name { color: var(--text); }

/* Give the league main column the dashboard's measure so it reads as one board */
.league-shell { max-width: 1180px; }
#leagueContent .dash-grid { margin-top: 1rem; }

/* Discover showcase */
.showcase {
  align-self: stretch;
  width: min(980px, 92vw);
  max-width: 980px;
  margin: 2.6rem auto 0;
  text-align: left;
}
.showcase-h {
  font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; text-align: center;
  margin-bottom: 1.6rem; color: var(--text);
}
.showcase-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.showcase-shot figure { margin: 0; }
.showcase-shot img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid rgba(var(--cy-rgb), 0.22); box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.showcase-shot figcaption {
  margin-top: 0.6rem; text-align: center; color: var(--text-dim); font-size: 0.85rem;
  letter-spacing: 0.03em;
}
@media (max-width: 720px) { .showcase-shots { grid-template-columns: 1fr; } }

.showcase-community {
  margin-top: 2.6rem; border-radius: 16px;
  border: 1px solid rgba(var(--cy-rgb), 0.22);
  background: rgba(var(--cy-rgb), 0.03);
  padding: 1.2rem;
}
.showcase-community-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.showcase-community-tabs button {
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.16);
  background: transparent; color: var(--text-dim); font-family: inherit; font-size: 0.8rem; cursor: pointer;
}
.showcase-community-tabs button.is-active {
  background: rgba(212,175,90,0.15); color: var(--gold-bright, #f0d68a); border-color: var(--gold, #d4af5a);
}
.showcase-post {
  display: flex; gap: 0.9rem; padding: 0.9rem; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08); margin-bottom: 0.7rem;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.showcase-post:hover { transform: translateY(-2px); border-color: rgba(47,216,255,0.4); background: rgba(47,216,255,0.05); }
.showcase-post-avatar {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2)); color: var(--navy-deep, #060a16);
}
.showcase-post-body { flex: 1; min-width: 0; }
.showcase-post-meta { color: var(--text-dim); font-size: 0.75rem; margin-top: 0.25rem; }
.showcase-join {
  margin-top: 0.5rem; padding: 0.3rem 0.9rem; border-radius: 999px; border: 1px solid var(--gold, #d4af5a);
  background: transparent; color: var(--gold-bright, #f0d68a); font-family: inherit; font-size: 0.75rem; cursor: pointer;
  transition: transform 0.1s ease, background 0.14s ease, color 0.14s ease;
}
.showcase-join:hover { background: rgba(212,175,90,0.15); }
.showcase-join.is-joined { background: var(--gold-fill-2, #d4af5a); color: var(--navy-deep, #060a16); }
.showcase-join:active { transform: scale(0.94); }

/* ============================================================================
   App shell — shared chrome for every page (appshell.js), logged in or out.
   Sticky top bar (icon-over-label nav) + left rail w/ profile card + mobile
   drawer + mobile bottom tab bar.
   ========================================================================== */
:root { --app-top-h: 58px; --gutter: clamp(0.9rem, 3vw, 2.2rem); }

.ic {
  width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em;
  flex-shrink: 0; overflow: visible;
}

#appShellRoot { display: contents; }

.app-shell {
  display: flex; flex-direction: column; flex: 1 1 auto;
  width: 100%; min-width: 0; text-align: left;
}

/* ---- top bar ---- */
.app-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--app-top-h);
  padding: 0.4rem var(--gutter);
  background: rgba(6, 10, 22, 0.82);
  border-bottom: 1px solid rgba(var(--cy-rgb), 0.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.app-top-left { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
/* brand left, section icons pushed right, profile dropdown at the far right */
.app-top > .app-sections { margin-left: auto; }
.app-top > .app-profile-wrap { margin-left: 0.4rem; }
.app-hamburger { display: none; }
.app-brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.app-brand img { height: 30px; width: auto; display: block; }

.app-profile-wrap { position: relative; }
.app-profile {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.22rem 0.55rem 0.22rem 0.28rem;
  border-radius: 999px; border: 1px solid rgba(var(--ink-rgb), 0.12);
  background: transparent; color: var(--text); font-family: inherit; cursor: pointer;
}
.app-profile:hover { border-color: rgba(var(--cy-rgb), 0.4); }
.app-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 0.72rem;
}
.app-profile-name {
  font-size: 0.8rem; font-weight: 600; white-space: nowrap;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.app-caret { width: 14px; height: 14px; color: var(--text-dim); }

.app-profile-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; z-index: 60;
  padding: 0.4rem; border-radius: 12px;
  background: var(--navy); border: 1px solid rgba(var(--cy-rgb), 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-profile-menu-head {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.5rem 0.6rem 0.6rem; margin-bottom: 0.3rem;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}
.app-profile-menu-name { font-weight: 700; font-size: 0.86rem; }
.app-profile-menu-desc { font-size: 0.74rem; color: var(--text-dim); margin-top: 0.15rem; line-height: 1.4; }
.app-profile-menu a, .app-profile-menu button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.55rem 0.6rem; border-radius: 8px; text-align: left;
  background: transparent; border: none; color: var(--text);
  font-family: inherit; font-size: 0.85rem; text-decoration: none; cursor: pointer;
}
.app-profile-menu a:hover, .app-profile-menu button:hover { background: rgba(var(--ink-rgb), 0.06); }
.app-profile-menu .ic { width: 15px; height: 15px; color: var(--text-dim); }

/* icon-over-label nav (desktop reads like an app tab bar) */
.app-sections { display: flex; align-items: stretch; gap: clamp(0.1rem, 0.8vw, 0.6rem); }
.app-section {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0.3rem 0.6rem; border-radius: 8px; min-width: 58px;
  color: var(--text-dim); text-decoration: none;
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
  border-bottom: 2px solid transparent; position: relative;
}
.app-section .ic { width: 20px; height: 20px; }
.app-section:hover { color: var(--text); }
.app-section.is-active { color: var(--gold-bright); border-bottom-color: rgba(var(--gold-rgb), 0.6); }
.app-section.is-disabled { opacity: 0.45; cursor: default; }
.app-soon {
  position: absolute; top: -2px; right: 2px;
  font-size: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(var(--ink-rgb), 0.12); padding: 0.02rem 0.24rem; border-radius: 4px;
}
.app-badge {
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bad, #f0806a); color: var(--navy-deep); font-size: 0.58rem; font-weight: 800;
  position: absolute; top: 2px; right: 6px;
}
.app-badge[hidden] { display: none; }

.app-auth-btn {
  display: inline-flex; align-items: center; padding: 0.4rem 0.9rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  align-self: center;
}
.app-auth-login { color: var(--text); border: 1px solid rgba(var(--ink-rgb), 0.2); }
.app-auth-login:hover { border-color: var(--gold); color: var(--gold-bright); }
.app-auth-signup { color: var(--navy-deep); background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2)); }

/* Discover typeahead popover */
.app-discover { position: relative; display: inline-flex; }
.app-discover-pop {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  width: min(340px, 80vw); z-index: 70;
  padding: 0.5rem; border-radius: 12px;
  background: var(--navy); border: 1px solid rgba(var(--cy-rgb), 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.app-discover-pop[hidden] { display: none; }
.app-discover-input {
  width: 100%; padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid rgba(var(--ink-rgb), 0.16); background: rgba(var(--ink-rgb), 0.05);
  color: var(--text); font-family: inherit; font-size: 0.85rem; outline: none;
}
.app-discover-input:focus { border-color: var(--gold); }
.app-discover-results { margin-top: 0.35rem; max-height: 320px; overflow-y: auto; }
.app-discover-row {
  display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.5rem; align-items: baseline;
  padding: 0.45rem 0.5rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 0.82rem;
}
.app-discover-row:hover { background: rgba(var(--ink-rgb), 0.06); }
.app-discover-type {
  grid-row: span 2; align-self: center;
  font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--navy-deep);
  background: var(--gold-fill-2); padding: 0.08rem 0.35rem; border-radius: 4px; font-weight: 800;
}
.app-discover-sub { grid-column: 2; font-size: 0.72rem; color: var(--text-dim); }
.app-discover-empty { padding: 0.5rem; font-size: 0.8rem; color: var(--text-dim); text-align: center; }

/* ---- body: rail + content ---- */
.app-main { display: flex; align-items: stretch; width: 100%; flex: 1 1 auto; min-height: 0; }
/* The rail itself is the sticky, independently scrolling column: it always
   fills the viewport under the header, so it never ends early on short pages
   or while the page scrolls. */
.app-rail {
  flex: 0 0 250px;
  position: sticky; top: var(--app-top-h); align-self: flex-start;
  height: calc(100vh - var(--app-top-h));
  overflow-y: auto;
  border-right: 1px solid rgba(var(--cy-rgb), 0.14);
  background: rgba(6, 10, 22, 0.3);
}
@supports (height: 100dvh) {
  .app-rail { height: calc(100dvh - var(--app-top-h)); }
}
.app-rail-inner { padding: 1rem 0.8rem; }

/* rail profile card (LinkedIn-style) */
.app-rail-profile {
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.16); border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.02); overflow: hidden;
  margin-bottom: 1.1rem; padding-bottom: 0.8rem; text-align: center;
}
.app-rail-banner { position: relative; height: 48px; }
.app-rail-avatarwrap { position: relative; width: 56px; margin: -28px auto 0.4rem; }
.app-rail-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%; margin: 0;
  border: 3px solid var(--navy);
  background: linear-gradient(180deg, var(--gold-fill), var(--gold-fill-2));
  color: var(--navy-deep); font-weight: 800; font-size: 1.05rem; text-decoration: none;
}
.app-rail-pname { display: block; font-weight: 700; font-size: 0.92rem; color: var(--text); text-decoration: none; padding: 0 0.6rem; }
.app-rail-pname:hover { color: var(--gold-bright); }
.app-rail-descwrap { position: relative; padding: 0.25rem 1.4rem 0; }
.app-rail-desc { font-size: 0.76rem; color: var(--text-dim); line-height: 1.4; }
.app-rail-desc-empty { color: var(--text-dim); opacity: 0.7; font-style: italic; }
.app-rail-pencil {
  position: absolute; top: 0; right: 0.35rem;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 2px;
}
.app-rail-pencil:hover { color: var(--gold-bright); }
.app-rail-pencil .ic { width: 13px; height: 13px; }
.app-rail-desc-input {
  width: 100%; margin-top: 0.2rem; padding: 0.4rem 0.5rem; border-radius: 8px;
  border: 1px solid rgba(var(--ink-rgb), 0.16); background: rgba(var(--ink-rgb), 0.05);
  color: var(--text); font-family: inherit; font-size: 0.78rem; resize: vertical;
}
.app-rail-desc-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.4rem; }
.app-rail-loc {
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  font-size: 0.72rem; color: var(--text-dim); margin-top: 0.4rem;
}
.app-rail-loc .ic { width: 12px; height: 12px; }
.app-rail-counts { font-size: 0.68rem; color: var(--text-dim); margin-top: 0.35rem; }

.app-rail-showall {
  width: 100%; margin-top: 0.2rem; padding: 0.35rem; border-radius: 8px;
  background: transparent; border: none; color: var(--electric-blue);
  font-family: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; text-align: left;
}
.app-rail-showall:hover { background: rgba(var(--ink-rgb), 0.05); }
.app-rail-more[hidden] { display: none; }

.app-rail-group { margin-bottom: 1.1rem; }
.app-rail-label {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0 0.55rem 0.4rem;
  font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim);
}
.app-rail-label .ic { width: 13px; height: 13px; }
.app-rail-item {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.55rem; border-radius: 9px;
  color: var(--text-dim); text-decoration: none; font-size: 0.82rem;
  border-left: 2px solid transparent;
}
.app-rail-item:hover { background: rgba(var(--ink-rgb), 0.05); color: var(--text); }
.app-rail-item.is-active {
  background: rgba(var(--gold-rgb), 0.14); color: var(--gold-bright);
  border-left-color: var(--electric-blue);
}
.app-rail-badge {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--ink-rgb), 0.08); color: var(--text);
  font-size: 0.6rem; font-weight: 800;
}
.app-rail-badge .ic { width: 13px; height: 13px; }
.app-rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- rail cards (LinkedIn-style stacked boxes) ---- */
.app-rail-inner { display: flex; flex-direction: column; gap: 0.65rem; }
.app-rail-card {
  border: var(--neon-w) solid rgba(var(--cy-rgb), 0.4); border-radius: 12px;
  background: rgba(var(--ink-rgb), 0.025);
  padding: 0.7rem 0.55rem;
}
/* rail-inner is a height-capped flex column: without this, overflow:hidden cards
   (the profile card) shrink on short viewports and clip their content. */
.app-rail-card { flex: 0 0 auto; }
.app-rail-card .app-rail-label { padding: 0 0.3rem 0.4rem; }
.app-rail-card.app-rail-profile { padding: 0 0 0.8rem; margin-bottom: 0; }
.app-rail-empty { padding: 0.2rem 0.4rem 0.3rem; font-size: 0.78rem; color: var(--text-dim); }
.app-rail-game { padding: 0.45rem 0.4rem; border-top: 1px solid rgba(var(--ink-rgb), 0.07); }
.app-rail-card .app-rail-label + .app-rail-game { border-top: none; }
.app-rail-game-match {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-rail-game-match:hover { color: var(--gold-bright); }
.app-rail-game-when { font-size: 0.7rem; color: var(--text-dim); margin: 0.1rem 0 0.35rem; }
.app-rail-game .rsvp-buttons { display: flex; flex-wrap: wrap; gap: 0.3rem; }

/* ---- black / greyscale theme for the logged-in app ---- */
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) {
  --navy: #080809;
  --navy-deep: #000000;
  --text-dim: #a3a3ab;
  --app-card: #0a0a0b;
  --app-card-2: #0e0e10;
  --sticky-bg: #0a0a0b;
  --app-glow: 0 0 0 1px rgba(var(--cy-rgb), 0.03), 0 4px 18px rgba(0, 0, 0, 0.6);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 10%,
      #0f0f11 0%, #0b0b0d 18%, #070708 38%, #040405 60%, #020203 80%, #000000 100%);
  background-size: 160px 160px, 140% 140%;
  background-repeat: repeat, no-repeat;
  animation: none;
}
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .glow { display: none; }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-top { background: rgba(0, 0, 0, 0.9); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-rail { background: transparent; border-right-color: rgba(var(--cy-rgb), 0.18); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .banner-default { background: linear-gradient(120deg, #1a1a1d, #131316 60%, #1c1c20); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-rail-avatar { border-color: var(--app-card); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-rail-badge { background: rgba(var(--ink-rgb), 0.08); }

/* Signed-in visitors never see the bare, shell-less page: the body stays hidden
   (on the black backdrop) until appshell.js has built the shell. The animation is
   a safety net that reveals the page after 2.5s if the shell never mounts. */
html.nh-app body[data-app-shell]:not(.has-app-shell) { visibility: hidden; animation: nh-reveal 0s linear 2.5s forwards; }
@keyframes nh-reveal { to { visibility: visible; } }

/* cards: near-black fill, vivid blue edge, no blue glow */
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-rail-card,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .dash-card,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .home-side-card,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .form-card,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .create-card,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .welcome-banner,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .home-stream,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .game-hero,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .score-ticker {
  background: var(--app-card);
  box-shadow: var(--app-glow);
}
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .game-list-item,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .schedule-list-item,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .feed-list .feed-item,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .stream-welcome,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .home-upcoming-strip,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .messages-thread-pane,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .roster-col-head,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .calendar-day { background: var(--app-card-2); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .rsvp-btn,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .btn-secondary,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .action-btn,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .global-search,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .team-select-bar select,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .team-filter-pills button { background: rgba(var(--ink-rgb), 0.04); }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .field input,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .field textarea,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .field select,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .compose-form textarea,
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .messages-search input { background-color: #060607; }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .inline-search-results { background: #060607; }
:is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .sidebar { background: rgba(0, 0, 0, 0.45); }

/* gutter: league + game pages lose their padded wrapper when the shell moves
   them into .app-content, so give them the same side padding .dash-main has. */
.app-content > .league-shell,
.app-content > #gameContent { padding: 1.2rem var(--gutter); }

/* Between phone and wide desktop the six icons + profile pill crowd the brand. */
@media (min-width: 821px) and (max-width: 1000px) {
  .app-section { min-width: 46px; padding: 0.3rem 0.4rem; }
  .app-sections { gap: 0.1rem; }
  .app-profile-name { display: none; }
}

@media (max-width: 820px) {
  :is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-drawer-panel { background: #050506; }
  :is(body.has-app-shell:not(.app-logged-out), html.nh-app body) .app-tabbar { background: rgba(0, 0, 0, 0.94); }
  .app-drawer-rail .app-rail-card { margin-bottom: 0.6rem; }
  .app-content > .league-shell,
  .app-content > #gameContent { padding: 1rem var(--gutter); }
}

.app-content { flex: 1 1 auto; min-width: 0; width: 100%; }
.app-content .dash-shell { display: block; }
.app-content .dash-main { overflow: visible; height: auto; }
.app-content .league-shell,
.app-content .league-shell.has-sidebar { display: block; }
.app-content .sidebar,
.app-content #leagueSidebar { display: none !important; }
/* logged-out: marketing pages keep their centered hero inside the shell */
body.app-logged-out .app-content { display: flex; flex-direction: column; }
body.app-logged-out .app-content > main.hero { min-height: 0; flex: 1 1 auto; }

/* ---- mobile drawer + bottom tab bar (hidden on desktop) ---- */
.app-tabbar { display: none; }
.app-drawer { display: none; }
.app-drawer[hidden] { display: none; }
body.app-drawer-open { overflow: hidden; }

@media (max-width: 820px) {
  .app-top { gap: 0.6rem; }
  .app-sections { display: none; }
  .app-shell-out .app-sections { display: flex; }
  .app-profile-name { display: none; }
  .app-top > .app-profile-wrap { display: none; }
  .app-rail { display: none; }
  .app-hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    background: transparent; border: 1px solid rgba(var(--ink-rgb), 0.14);
    color: var(--text); cursor: pointer; margin-left: auto;
  }
  .app-hamburger .ic { width: 19px; height: 19px; }
  /* 72px clears the tab bar's own content; add the home-indicator safe area on
     top of that or the last bit of a scrolled page sits behind the bar. */
  .app-content { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.app-logged-out .app-content { padding-bottom: 0; }

  .app-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(6, 10, 22, 0.94);
    border-top: 1px solid rgba(var(--cy-rgb), 0.18);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 0.3rem 0.3rem calc(0.3rem + env(safe-area-inset-bottom, 0px));
  }
  body.app-logged-out .app-tabbar { display: none; }
  .app-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 0.35rem 0.15rem; border-radius: 8px; position: relative;
    color: var(--text-dim); text-decoration: none;
    font-size: 0.6rem; font-weight: 600; letter-spacing: 0.01em;
    border-bottom: none; min-width: 0;
  }
  .app-tab .ic { width: 21px; height: 21px; }
  .app-tab.is-active { color: var(--gold-bright); }
  .app-tab .app-soon { display: none; }
  .app-tab .app-badge { top: 0; right: calc(50% - 16px); }

  .app-drawer { display: block; position: fixed; inset: 0; z-index: 80; }
  .app-drawer[hidden] { display: none; }
  .app-drawer-backdrop { position: absolute; inset: 0; z-index: 0; background: rgba(0, 0, 0, 0.55); }
  .app-drawer-panel {
    position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 330px); z-index: 1;
    display: flex; flex-direction: column; gap: 0.3rem;
    padding: 0.9rem; overflow-y: auto;
    background: var(--navy); border-left: 1px solid rgba(var(--cy-rgb), 0.22);
  }
  .app-drawer-close {
    align-self: flex-end; width: 34px; height: 34px; border-radius: 8px;
    background: transparent; border: 1px solid rgba(var(--ink-rgb), 0.14);
    color: var(--text); cursor: pointer;
  }
  .app-drawer-close .ic { width: 18px; height: 18px; }
  .app-drawer-sections {
    display: flex; flex-direction: column; gap: 0.1rem;
    margin: 0.2rem 0 0.6rem; padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.1);
  }
  .app-drawer-link {
    display: flex; flex-direction: row; align-items: center; gap: 0.6rem;
    padding: 0.6rem 0.5rem; border-radius: 8px; min-width: 0;
    color: var(--text); text-decoration: none; font-size: 0.9rem; font-weight: 600;
    border-bottom: none;
  }
  .app-drawer-link .ic { width: 18px; height: 18px; color: var(--text-dim); }
  .app-drawer-link.is-active { color: var(--gold-bright); }
  .app-drawer-link.is-disabled { opacity: 0.45; }
  .app-drawer-link .app-soon { position: static; margin-left: auto; }
  .app-drawer-link .app-badge { position: static; margin-left: auto; }
  .app-drawer-rail .app-rail-group { margin-bottom: 0.8rem; }
  .app-drawer-rail .app-rail-profile { display: none; }
  .app-drawer-account {
    display: flex; flex-direction: column; gap: 0.1rem;
    margin: 0.2rem 0 0.4rem; padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.1);
  }
  .app-drawer-me {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.5rem;
    border-radius: 10px; text-decoration: none; color: var(--text);
    background: rgba(var(--ink-rgb), 0.04); margin-bottom: 0.3rem;
  }
  .app-drawer-me .app-avatar { width: 40px; height: 40px; font-size: 0.85rem; }
  .app-drawer-me-text { display: flex; flex-direction: column; min-width: 0; }
  .app-drawer-me-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-drawer-me-sub { font-size: 0.74rem; color: var(--text-dim); }
  button.app-drawer-link { width: 100%; background: transparent; border: none; font-family: inherit; text-align: left; cursor: pointer; }
}

/* League season filter (ESPN-style) */
.season-select { display: inline-flex; align-items: center; gap: 0.45rem; }
.season-select-label {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim);
}
.season-select select {
  padding: 0.35rem 0.6rem; border-radius: 8px;
  background: rgba(var(--ink-rgb), 0.05); color: var(--text);
  border: 1px solid rgba(var(--cy-rgb), 0.28); font-family: inherit; font-size: 0.82rem;
}

/* Manage-schedule per-row scorekeeper assign line */
.schedule-list-item .mg-sk-line {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; margin-top: 0.45rem;
}
.schedule-list-item .mg-sk-line select {
  max-width: 240px; padding: 0.3rem 0.5rem; border-radius: 7px;
  background: rgba(var(--ink-rgb), 0.05); color: var(--text);
  border: 1px solid rgba(var(--ink-rgb), 0.16); font-family: inherit; font-size: 0.8rem;
}
.schedule-list-item .mg-edit-slot { grid-column: 1 / -1; }

/* Schedule row meta line (e.g. "Scorekeeper: …") */
.schedule-meta {
  grid-column: 1 / -1; margin-top: 0.3rem;
  font-size: 0.74rem; color: var(--text-dim);
}
.sk-filter-bar { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1rem; }
.sk-filter-bar .field { max-width: 220px; margin: 0; }
.sk-filter-bar .field > span {
  display: block; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 0.25rem;
}
.sk-filter-bar select { width: 100%; }

@media (max-width: 700px) {
  /* Stack the filters full-width so the labels/selects aren't jammed against
     the screen edge. */
  #skFilterBar { gap: 0.6rem; }
  #skFilterBar .field { max-width: none; width: 100%; }
  [data-tab-panel="scorekeeper"] .schedule-list-head { display: none; }
  [data-tab-panel="scorekeeper"] .sk-final { white-space: normal; }
}

/* ---- profile look: banner colours, avatars, presence, pencils ---- */
.banner-default { background: linear-gradient(120deg, #1b2b52, #123b4a 60%, #2a2140); }
.banner-slate { background: linear-gradient(120deg, #3b4a63, #566580); }
.banner-navy { background: linear-gradient(120deg, #1b2b52, #2c4a8a); }
.banner-ocean { background: linear-gradient(120deg, #0f5f8a, #1fa3c4); }
.banner-teal { background: linear-gradient(120deg, #0e6b66, #19a89a); }
.banner-forest { background: linear-gradient(120deg, #1e5a34, #3b9a5c); }
.banner-gold { background: linear-gradient(120deg, #8a6a1f, #d4af5a); }
.banner-amber { background: linear-gradient(120deg, #9a5a12, #e0902a); }
.banner-crimson { background: linear-gradient(120deg, #6e1626, #c2344a); }
.banner-plum { background: linear-gradient(120deg, #4a2160, #8a4bb0); }
.banner-graphite { background: linear-gradient(120deg, #1a1a1d, #3a3a42); }

.app-avatar, .avatar, .stream-avatar, .feed-post-avatar, .profile-avatar { position: relative; }
.av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av-ico { width: 58%; height: 58%; }

.presence-dot {
  position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; box-sizing: border-box; border: 2px solid var(--app-card, #0a0a0b);
}
.presence-dot.is-inline { position: static; display: inline-block; width: 9px; height: 9px; border: none; flex-shrink: 0; }
.presence-online { background: #3ecf6e; }
.presence-away { background: #f0b429; }
.presence-dnd { background: #e5484d; }
.presence-offline { background: #7a8194; }
.app-rail-avatarwrap .presence-dot { right: 2px; bottom: 2px; width: 13px; height: 13px; }
.profile-avatar-wrap .presence-dot { right: 6px; bottom: 6px; width: 16px; height: 16px; }

.app-edit-btn {
  width: 22px; height: 22px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(var(--ink-rgb), 0.28); color: var(--text);
}
.app-edit-btn:hover { color: var(--gold-bright); border-color: var(--gold); }
.app-edit-btn .ic { width: 12px; height: 12px; }
.app-banner-pencil { position: absolute; top: 6px; right: 6px; }
.app-avatar-pencil { position: absolute; right: -12px; top: -2px; }
.profile-avatar-wrap .app-avatar-pencil { right: -2px; top: 2px; }
.app-rail-status {
  display: inline-flex; align-items: center; gap: 0.35rem; margin: 0.15rem auto 0;
  background: transparent; border: none; color: var(--text-dim);
  font-family: inherit; font-size: 0.72rem; cursor: pointer; padding: 0.1rem 0.3rem; border-radius: 6px;
}
.app-rail-status:hover { color: var(--text); background: rgba(var(--ink-rgb), 0.05); }
.app-rail-status .app-caret { width: 11px; height: 11px; }

.app-status-pop {
  position: fixed; z-index: 95; width: 240px; padding: 0.4rem;
  background: var(--navy); border: 1px solid rgba(var(--cy-rgb), 0.28); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.app-status-opt {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0.6rem;
  background: transparent; border: none; border-radius: 8px; color: var(--text);
  font-family: inherit; font-size: 0.85rem; cursor: pointer; text-align: left;
}
.app-status-opt:hover { background: rgba(var(--ink-rgb), 0.06); }
.app-status-opt.is-active { background: rgba(var(--gold-rgb), 0.12); color: var(--gold-bright); }
.app-status-text { display: flex; gap: 0.4rem; padding: 0.4rem 0.3rem 0.2rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08); margin-top: 0.3rem; }
.app-status-text input {
  flex: 1; min-width: 0; padding: 0.4rem 0.5rem; border-radius: 8px; font-family: inherit; font-size: 0.8rem;
  background: rgba(var(--ink-rgb), 0.05); color: var(--text); border: 1px solid rgba(var(--ink-rgb), 0.16);
}
.app-status-text .btn-primary { margin: 0; width: auto; }

.pc-modal { max-width: 420px; }
.pc-section { margin-bottom: 1rem; }
.pc-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; margin-bottom: 0.5rem; }
.pc-upload { cursor: pointer; display: inline-block; }
.pc-icon-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
.pc-icon {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 0;
  background: rgba(var(--ink-rgb), 0.05); border: 1px solid rgba(var(--ink-rgb), 0.14);
  border-radius: 10px; color: var(--text); cursor: pointer;
}
.pc-icon:hover, .pc-icon.is-active { border-color: var(--gold); color: var(--gold-bright); }
.pc-icon .ic { width: 55%; height: 55%; }
.pc-swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.pc-swatch { height: 44px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.pc-swatch:hover { border-color: var(--text-dim); }
.pc-swatch.is-active { border-color: var(--gold-bright); }

/* ==========================================================================
   Light theme (signed-in only; Settings → Appearance). Dark stays the default.
   html[data-theme="light"] is set by appshell.js (and the inline first-paint
   script on every page) only for signed-in visitors. Everything here is a
   variable swap or a handful of explicit surfaces — see :root for the channels.
   ========================================================================== */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body.has-app-shell:not(.app-logged-out),
html[data-theme="light"].nh-app body {
  --navy: #ffffff;
  --navy-deep: #0b1220;           /* only used as dark text on gold fills */
  --text: #111827;
  --text-dim: #5a6376;
  --gold-bright: #7a5710;
  --gold: #a07a1c;
  --electric-blue: #0b88a8;
  --electric-blue-bright: #0a7894;
  --blue-glow: #1b6fd1;
  --ink-rgb: 17, 24, 39;
  --cy-rgb: 11, 136, 168;
  --gold-rgb: 160, 118, 30;
  --ok: #1c8a4b;
  --bad: #c8402b;
  --app-card: #ffffff;
  --app-card-2: #f4f6fa;
  --sticky-bg: #ffffff;
  --app-glow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 14px rgba(16, 24, 40, 0.06);
  --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235a6376' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background: #edf0f5;
  color: var(--text);
}
html[data-theme="light"] body.has-app-shell .app-top { background: rgba(255, 255, 255, 0.92); }
html[data-theme="light"] body.has-app-shell .app-tabbar { background: rgba(255, 255, 255, 0.96); }
html[data-theme="light"] body.has-app-shell .app-drawer-panel { background: #ffffff; }
html[data-theme="light"] body.has-app-shell .app-drawer-backdrop { background: rgba(15, 23, 42, 0.35); }
html[data-theme="light"] body.has-app-shell .app-rail { border-right-color: rgba(var(--cy-rgb), 0.22); }
html[data-theme="light"] body.has-app-shell .banner-default { background: linear-gradient(120deg, #3c5aa8, #2b8aa6); }
html[data-theme="light"] body.has-app-shell .app-rail-badge { background: rgba(var(--ink-rgb), 0.07); }
html[data-theme="light"] body.has-app-shell .field input,
html[data-theme="light"] body.has-app-shell .field textarea,
html[data-theme="light"] body.has-app-shell .field select,
html[data-theme="light"] body.has-app-shell .compose-form textarea,
html[data-theme="light"] body.has-app-shell .messages-search input,
html[data-theme="light"] body.has-app-shell .inline-search-results { background-color: #ffffff; color: var(--text); }
html[data-theme="light"] body.has-app-shell .field select option,
html[data-theme="light"] body.has-app-shell .sk-filter-bar select option,
html[data-theme="light"] body.has-app-shell .sidebar-home-select option { background: #ffffff; color: var(--text); }
html[data-theme="light"] body.has-app-shell .nh-modal,
html[data-theme="light"] body.has-app-shell .app-profile-menu,
html[data-theme="light"] body.has-app-shell .app-discover-pop,
html[data-theme="light"] body.has-app-shell .app-status-pop { background: #ffffff; color: var(--text); box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18); }
html[data-theme="light"] body.has-app-shell .nh-modal-overlay { background: rgba(15, 23, 42, 0.4); }
html[data-theme="light"] body.has-app-shell .score-ticker { background: var(--app-card); }
html[data-theme="light"] body.has-app-shell .btn-secondary,
html[data-theme="light"] body.has-app-shell .action-btn,
html[data-theme="light"] body.has-app-shell .global-search,
html[data-theme="light"] body.has-app-shell .rsvp-btn { background: rgba(var(--ink-rgb), 0.04); color: var(--text); }
html[data-theme="light"] body.has-app-shell .app-edit-btn { background: rgba(255, 255, 255, 0.92); color: var(--text); border-color: rgba(var(--ink-rgb), 0.25); }
html[data-theme="light"] body.has-app-shell .app-avatar-pencil { background: #ffffff; }
html[data-theme="light"] body.has-app-shell input,
html[data-theme="light"] body.has-app-shell textarea,
html[data-theme="light"] body.has-app-shell select { color: var(--text); }
html[data-theme="light"] body.has-app-shell ::placeholder { color: rgba(var(--ink-rgb), 0.45); }

/* ---- Chatter: rail card + the channel / hub views in the Home middle column ---- */
.app-chat-item {
  display: flex; align-items: center; gap: 0.55rem; min-width: 0;
  padding: 0.38rem 0.45rem; border-radius: 8px;
  color: var(--text-dim); text-decoration: none; font-size: 0.84rem;
}
.app-chat-item:hover { background: rgba(var(--ink-rgb), 0.06); color: var(--text); }
.app-chat-item.is-active { background: rgba(var(--gold-rgb), 0.14); color: var(--gold-bright); font-weight: 700; }
.app-chat-item:has(.app-chat-badge) { color: var(--text); font-weight: 700; }
.app-chat-lead { flex: 0 0 22px; display: flex; align-items: center; justify-content: center; }
.app-chat-lead .ic { width: 15px; height: 15px; }
.app-chat-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-chat-badge {
  flex: 0 0 auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bad, #f0806a); color: #fff; font-size: 0.62rem; font-weight: 800;
}
.app-chat-avatar { width: 22px; height: 22px; font-size: 0.55rem; }
.app-chat-avatar .presence-dot { width: 9px; height: 9px; border-width: 1.5px; }
.app-chat-sub {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.45rem 0.25rem; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
}
.app-chat-new { display: flex; color: var(--text-dim); text-decoration: none; }
.app-chat-new:hover { color: var(--gold-bright); }
.app-chat-new .ic { width: 15px; height: 15px; }

.chat-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 1rem; border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
}
.chat-head-title { display: flex; align-items: center; gap: 0.55rem; min-width: 0; font-weight: 800; font-size: 1rem; }
.chat-head-title .ic { width: 18px; height: 18px; color: var(--text-dim); }
.chat-head-avatar { width: 30px; height: 30px; font-size: 0.7rem; }
.chat-head-status { font-weight: 500; font-size: 0.76rem; color: var(--text-dim); }
.chat-head-link { font-size: 0.78rem; color: var(--gold-bright); text-decoration: none; white-space: nowrap; }
.chat-head-link:hover { text-decoration: underline; }
.chat-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.6rem 1rem; display: flex; flex-direction: column; gap: 0.1rem; }
.chat-row { display: flex; gap: 0.7rem; padding: 0.45rem 0.3rem; border-radius: 8px; }
.chat-row:hover { background: rgba(var(--ink-rgb), 0.04); }
.chat-row-avatar { width: 36px; height: 36px; font-size: 0.78rem; text-decoration: none; }
.chat-row-main { flex: 1 1 auto; min-width: 0; }
.chat-row-head { display: flex; align-items: baseline; gap: 0.5rem; }
.chat-row-name { font-weight: 700; font-size: 0.88rem; }
.chat-row-time { font-size: 0.68rem; color: var(--text-dim); }
.chat-row-body { font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-row .reaction-row { margin-top: 0.25rem; }
.chat-compose { flex: 0 0 auto; display: flex; gap: 0.5rem; padding: 0.7rem 1rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08); }
.chat-compose[hidden] { display: none; }
.chat-compose input {
  flex: 1 1 auto; min-width: 0; height: 2.6rem; box-sizing: border-box; padding: 0 0.8rem;
  border-radius: 8px; font-family: inherit; font-size: 0.9rem;
  background: rgba(var(--ink-rgb), 0.04); color: var(--text); border: 1px solid rgba(var(--ink-rgb), 0.14);
}
.chat-compose input:focus { outline: none; border-color: var(--electric-blue); }
.chat-compose .btn-primary { margin: 0; width: auto; height: 2.6rem; padding: 0 1.2rem; }
.chat-hub-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1rem; }
.home-stream[hidden] { display: none; }
a.conversation-item { text-decoration: none; color: inherit; }
.conv-avatar { width: 36px; height: 36px; font-size: 0.8rem; }
.conv-sm { width: 26px; height: 26px; font-size: 0.62rem; margin-right: 0.5rem; }
.conv-hash { background: rgba(var(--ink-rgb), 0.08); color: var(--text-dim); }
.conv-hash .ic { width: 16px; height: 16px; }
.search-result-item { display: flex; align-items: center; }
@media (max-width: 900px) {
  .home-layout.is-chat .home-side { display: none; }
}
@media (max-width: 700px) {
  .chat-view, .chat-hub { height: calc(100dvh - var(--app-top-h) - 130px); min-height: 360px; overflow: hidden; }
}

/* ---- notifications bell ---- */
.app-bell-wrap { position: relative; margin-left: 0.4rem; }
.app-bell {
  position: relative; width: 38px; height: 38px; border-radius: 10px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
}
.app-bell:hover, .app-bell[aria-expanded="true"] { color: var(--text); background: rgba(var(--ink-rgb), 0.06); }
.app-bell .ic { width: 21px; height: 21px; }
.app-bell .app-badge { top: 2px; right: 1px; }
.app-bell-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; width: 380px; max-height: min(70vh, 540px); overflow-y: auto;
  padding: 0.4rem; border-radius: 12px; background: var(--navy);
  border: 1px solid rgba(var(--cy-rgb), 0.28); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.app-bell-pop[hidden] { display: none; }
.app-bell-head {
  padding: 0.55rem 0.6rem 0.3rem; font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
}
.app-bell-item {
  display: flex; gap: 0.65rem; padding: 0.55rem 0.6rem; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 0.84rem; line-height: 1.4;
}
a.app-bell-item:hover { background: rgba(var(--ink-rgb), 0.06); }
.app-bell-item.is-unread { background: rgba(var(--gold-rgb), 0.08); }
.app-bell-ic {
  flex: 0 0 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(var(--ink-rgb), 0.07); color: var(--text-dim);
}
.app-bell-ic .ic { width: 16px; height: 16px; }
.app-bell-ic.is-win { color: var(--ok, #5fd08a); }
.app-bell-ic.is-loss { color: var(--bad, #f0806a); }
.app-bell-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.app-bell-time { font-size: 0.68rem; color: var(--text-dim); }
.app-bell-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.25rem; }
.app-bell-actions .btn-primary { margin: 0; width: auto; }
.app-bell-empty { padding: 0.9rem 0.6rem; font-size: 0.8rem; color: var(--text-dim); text-align: center; }
.app-bell-tag, .stream-outcome {
  display: inline-block; margin-right: 0.35rem; padding: 0.02rem 0.35rem; border-radius: 5px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; background: rgba(var(--ink-rgb), 0.1);
}
.app-bell-tag.is-win, .stream-outcome-W { color: var(--ok, #5fd08a); background: rgba(95, 208, 138, 0.14); }
.app-bell-tag.is-loss, .stream-outcome-L, .stream-outcome-OTL { color: var(--bad, #f0806a); background: rgba(240, 128, 106, 0.14); }
.stream-row-event[data-outcome="W"] { border-left-color: var(--ok, #5fd08a); }
.stream-row-event[data-outcome="L"], .stream-row-event[data-outcome="OTL"] { border-left-color: var(--bad, #f0806a); }
.stream-row-event[data-kind="player_stat"] { border-left-color: var(--gold); }
@media (max-width: 820px) {
  .app-bell-wrap { margin-left: auto; position: static; }
  .app-bell-wrap + .app-profile-wrap + .app-hamburger, .app-hamburger { margin-left: 0.4rem; }
  .app-bell-pop { position: fixed; top: calc(var(--app-top-h) + 4px); left: 0.5rem; right: 0.5rem; width: auto; }
}

/* ---- collapsible schedule sections (Next game / Upcoming / Completed) ---- */
.sched-section { margin-bottom: 0.9rem; }
.sched-section > summary {
  display: flex; align-items: center; gap: 0.6rem; cursor: pointer; list-style: none;
  padding: 0.65rem 0.9rem; border-radius: 12px; user-select: none;
  background: rgba(var(--cy-rgb), 0.06); border: 1px solid rgba(var(--cy-rgb), 0.2);
  font-weight: 800; font-size: 0.9rem;
}
.sched-section > summary::-webkit-details-marker { display: none; }
.sched-section > summary:hover { border-color: rgba(var(--cy-rgb), 0.4); }
.sched-title { flex: 1 1 auto; }
.sched-count {
  min-width: 22px; padding: 0.05rem 0.45rem; border-radius: 999px; text-align: center;
  font-size: 0.7rem; font-weight: 800; background: rgba(var(--ink-rgb), 0.1); color: var(--text-dim);
}
.sched-chevron { width: 16px; height: 16px; color: var(--text-dim); transition: transform 0.2s ease; }
.sched-section[open] > summary .sched-chevron { transform: rotate(180deg); }
.sched-body { padding-top: 0.7rem; }

/* ---- admin / health page ---- */
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.adm-head-actions { display: flex; align-items: center; gap: 0.6rem; }
.adm-h { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin: 1.6rem 0 0.7rem; }
.adm-health { margin-bottom: 0.4rem; }
.adm-health-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.adm-health-title { font-weight: 800; font-size: 1.15rem; }
.adm-health-sub { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.15rem; }
.adm-health-ok { border-color: rgba(95, 208, 138, 0.45); }
.adm-health-warn { border-color: rgba(240, 180, 41, 0.55); }
.adm-health-bad { border-color: rgba(229, 72, 77, 0.6); }
.adm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.adm-dot-lg { width: 16px; height: 16px; }
.adm-ok { background: #3ecf6e; box-shadow: 0 0 0 3px rgba(62, 207, 110, 0.18); }
.adm-warn { background: #f0b429; box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18); }
.adm-bad { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.2); }
.adm-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.4rem 1.5rem; }
.adm-check { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.3rem 0; font-size: 0.86rem; min-width: 0; }
.adm-check-label { font-weight: 700; }
.adm-check-detail { color: var(--text-dim); font-size: 0.78rem; overflow-wrap: anywhere; }
.adm-meta { margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid rgba(var(--ink-rgb), 0.08); font-size: 0.76rem; color: var(--text-dim); }
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; }
.adm-tile {
  padding: 0.95rem 1rem; border-radius: 12px; min-width: 0;
  background: var(--app-card, rgba(var(--ink-rgb), 0.03)); border: var(--neon-w) solid rgba(var(--cy-rgb), 0.22);
}
.adm-tile.is-good { border-color: rgba(95, 208, 138, 0.5); }
.adm-tile.is-warn { border-color: rgba(240, 180, 41, 0.55); }
.adm-tile-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--gold-bright); }
.adm-tile-label { margin-top: 0.25rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; }
.adm-tile-sub { margin-top: 0.3rem; font-size: 0.74rem; color: var(--text-dim); overflow-wrap: anywhere; }
.adm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; margin-top: 1rem; }
.adm-two > .dash-card, #adminContent > .dash-card { margin-top: 0; }
#adminContent > .dash-card:last-child { margin-top: 1rem; }
.adm-chart svg { width: 100%; height: 130px; display: block; }
.adm-chart-axis { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.68rem; color: var(--text-dim); }
.adm-list { display: flex; flex-direction: column; }
.adm-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(var(--ink-rgb), 0.07); font-size: 0.84rem; }
.adm-row:last-child { border-bottom: none; }
.adm-row-main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.adm-row-sub { font-size: 0.72rem; color: var(--text-dim); }
.adm-row-side { text-align: right; font-size: 0.78rem; white-space: nowrap; }
.adm-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.2rem 1.6rem; }
.adm-table-row { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(var(--ink-rgb), 0.07); font-size: 0.82rem; }
.adm-table-row b { font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .adm-two { grid-template-columns: minmax(0, 1fr); } }
.adm-row .team-link { color: var(--text); text-decoration: none; font-weight: 600; }
.adm-row .team-link:hover { color: var(--gold-bright); }
