:root {
  --field: #203731;
  --field-2: #2d4f47;
  --chalk: #f4f1e8;
  --ink: #14251f;
  --muted: #5d7068;
  --line: rgba(32, 55, 49, 0.14);
  --accent: #ffb612;
  --accent-2: #ffd35a;
  --good: #203731;
  --bad: #b33a2b;
  --panel: rgba(244, 241, 232, 0.94);
  --shadow: 0 18px 50px rgba(20, 37, 31, 0.16);
  --radius: 18px;
  --font-display: "Archivo Black", Impact, sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: #e6eee8;
  line-height: 1.5;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(255, 182, 18, 0.28), transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(32, 55, 49, 0.28), transparent 50%),
    linear-gradient(180deg, #cfdcd4 0%, #e8efe9 42%, #e3ebe6 100%);
}
.bg-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    -12deg,
    transparent 0 10px,
    rgba(32, 55, 49, 0.38) 10px 11px
  );
  pointer-events: none;
}

a { color: var(--field-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  backdrop-filter: blur(14px);
  background: rgba(243, 239, 228, 0.82);
  border-bottom: 1px solid var(--line);
}
.pick-live-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(180deg, #203731 0%, #2d4f47 100%);
  color: var(--chalk);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}
.pick-live-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
}
.pick-live-match {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.pick-live-match img {
  height: 1.35rem;
  width: auto;
}
.pick-live-team.is-pick {
  color: var(--accent);
}
.pick-live-score {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  min-width: 3.2rem;
  text-align: center;
}
.pick-live-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}
.pick-live-bar .badge-live {
  background: var(--accent);
  color: var(--field);
}
.pick-live-margin {
  font-family: var(--font-display);
  font-size: 0.95rem;
}
.pick-live-bar .points-pos { color: #b8e0c4; }
.pick-live-bar .points-neg { color: #ffb4a8; }

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand-logo {
  display: block;
  height: 2.6rem;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
}

.nav-toggle {
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(255,255,255,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}
.nav-toggle span {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin: 2px 0;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
  flex: 0 0 auto;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.15rem;
  border-bottom: 2px solid transparent;
}
.nav a.btn {
  color: #f7f4ea;
  border-bottom: none;
}
.nav a.btn:hover,
.nav a.btn:focus {
  color: #ffffff;
}
.nav a.is-active { border-bottom-color: var(--accent); }
.nav a.nav-muted { color: var(--muted); font-weight: 500; }
.nav a.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #d32f2f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  vertical-align: middle;
  border-bottom: none;
}

.main {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.4rem 0 3rem;
}

.footer {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.footer-note { margin: 0.2rem 0 0; font-size: 0.8rem; }

.flash {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 182, 18, 0.22);
  border: 1px solid rgba(32, 55, 49, 0.22);
  animation: rise 0.45s ease both;
}

.hero {
  display: grid;
  gap: 1.25rem;
  padding: 1.6rem 0 0.5rem;
  animation: rise 0.55s ease both;
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--field);
}
.hero-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1.08rem;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem;
  animation: rise 0.5s ease both;
}
.panel + .panel { margin-top: 1rem; }
.panel h2, .panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-weight: 400;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .grid-2 { grid-template-columns: 1.2fr 0.8fr; }
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
@media (min-width: 640px) {
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, var(--field-2), var(--field));
  color: #f7f4ea;
  box-shadow: 0 10px 22px rgba(32, 55, 49, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); color: #ffffff; }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.btn-ghost {
  background: transparent;
  color: var(--field);
  border: 1px solid rgba(32, 55, 49, 0.25);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--field); background: rgba(255,255,255,0.45); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #203731;
}

.form { display: grid; gap: 0.85rem; }
.form label, .form .field { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
.form .field { font-weight: 400; }
.form .hint { font-weight: 500; color: var(--muted); font-size: 0.85rem; }
.form label.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.form label.remember input { width: auto; }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(32, 55, 49, 0.2);
  background: rgba(255,255,255,0.75);
  font: inherit;
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid rgba(255, 182, 18, 0.55);
  border-color: transparent;
}

/* Week filters / selects outside .form (player pages) */
.inline-actions label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}
select {
  appearance: auto;
  -webkit-appearance: menulist;
  font: inherit;
  color: var(--ink);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(32, 55, 49, 0.2);
  background-color: rgba(255, 255, 255, 0.9);
  background-image: none;
  line-height: 1.3;
  max-width: 100%;
  cursor: pointer;
}
select:focus {
  outline: 2px solid rgba(255, 182, 18, 0.55);
  border-color: transparent;
}
select option {
  color: var(--ink);
  background: #fff;
}
.error {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(179, 58, 43, 0.12);
  color: var(--bad);
  border: 1px solid rgba(179, 58, 43, 0.25);
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
table.data th, table.data td {
  padding: 0.7rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
table.data tr.is-me { background: rgba(255, 182, 18, 0.18); }
.points-pos { color: var(--good); font-weight: 700; }
.points-neg { color: var(--bad); font-weight: 700; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.5rem;
}
.team-option {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  min-height: 3.1rem;
}
.form label.team-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  grid-template-columns: none;
  font-weight: 600;
}
.team-option:hover { transform: translateY(-1px); border-color: rgba(20,53,42,0.35); }
.team-option.is-used {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.team-option.is-selected {
  border-color: var(--accent);
  background: rgba(255, 182, 18, 0.2);
  box-shadow: inset 0 0 0 1px rgba(32, 55, 49, 0.28);
}
.team-option input { position: absolute; opacity: 0; pointer-events: none; }
.team-option img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}
.team-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  line-height: 1.15;
}
.team-abbr {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1;
}
.team-vs {
  font-size: 10pt;
  font-weight: 500;
  color: #8a9790;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-name {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mult-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.mult-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  font-weight: 700;
}
.form label.mult-chip {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  grid-template-columns: none;
  font-weight: 700;
}
.mult-chip.is-selected {
  background: var(--field);
  color: var(--chalk);
  border-color: transparent;
}
.mult-chip.is-disabled { opacity: 0.4; cursor: not-allowed; }
.mult-chip input {
  accent-color: var(--accent);
  margin: 0;
  width: auto;
  flex: 0 0 auto;
}

.game-list { display: grid; gap: 0.65rem; }
.game-list-2col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.scores-week-heading {
  margin: 1.15rem 0 0.55rem;
  font-size: 1rem;
  font-weight: 700;
}
.scores-week-heading:first-of-type {
  margin-top: 0.35rem;
}
.game {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.35rem 0.65rem;
  align-items: center;
  justify-items: center;
  padding: 1rem 0.85rem 0.85rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: auto 8.5rem;
}
.game-team-colors {
  overflow: hidden;
  border: none;
  /* Hard diagonal split with a plain white slash (no soft blend) */
  background: linear-gradient(
    135deg,
    var(--away-color, #2d4f47) 0 calc(50% - 1.5px),
    #fff calc(50% - 1.5px) calc(50% + 1.5px),
    var(--home-color, #203731) calc(50% + 1.5px) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  contain: layout style paint;
}
.game-compact {
  padding: 0.85rem 0.7rem 0.75rem;
  contain-intrinsic-size: auto 7.25rem;
}
.game-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
  text-align: center;
}
.game-side.away {
  color: var(--away-text, #f4f1e8);
}
.game-side.home {
  color: var(--home-text, #f4f1e8);
}
.game-logo {
  display: block;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}
.game-compact .game-logo {
  width: 56px;
  height: 56px;
}
.game-team-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  min-width: 0;
}
.game-team-label strong {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.game-compact .game-team-label strong {
  font-size: 1.02rem;
}
.game-team-city {
  font-size: 0.74rem;
  opacity: 0.9;
  line-height: 1.2;
  max-width: 9rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.game-score {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-align: center;
  min-width: 4.5rem;
}
.game-score-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20,37,31,0.14);
  font-weight: 700;
  white-space: nowrap;
}
.game-meta {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}
.game-team-colors .game-meta {
  color: rgba(255,255,255,0.92);
}
.game-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20,37,31,0.12);
  font-size: 0.76rem;
  font-weight: 600;
}
.game-meta-final {
  gap: 0.45rem;
  padding-left: 0.55rem;
  padding-right: 0.55rem;
}
.game-meta-final .game-margin {
  min-width: 2.1rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.game-meta-pill .badge {
  margin: 0;
}
.game-meta-pill.muted-pill {
  background: rgba(255,255,255,0.82);
  color: var(--muted);
  font-weight: 500;
}
.pick-save-hint {
  margin: 0.85rem 0 0.35rem;
}
.pick-save-status {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.pick-save-status.is-saving {
  background: rgba(32,55,49,0.08);
  color: var(--muted);
}
.pick-save-status.is-ok {
  background: rgba(31,122,76,0.12);
  border: 1px solid rgba(31,122,76,0.22);
  color: var(--good);
}
.pick-save-status.is-error {
  background: rgba(179,58,43,0.1);
  border: 1px solid rgba(179,58,43,0.22);
  color: var(--bad);
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(20,53,42,0.1);
}
.badge-live { background: rgba(255, 182, 18, 0.22); color: #203731; }
.badge-final { background: #1a8f4c; color: #fff; }
.badge-win { background: rgba(31,122,76,0.18); color: var(--good); font-weight: 700; }
.badge-loss { background: rgba(179,58,43,0.16); color: var(--bad); font-weight: 700; }
.badge-tie { background: rgba(32,55,49,0.12); color: var(--muted); font-weight: 700; }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.admin-tabs a, .admin-tabs button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.admin-tabs .is-active {
  background: var(--field);
  color: var(--chalk);
  border-color: transparent;
}

.muted { color: var(--muted); }
.pay-box {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.5);
}
.pay-details {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.pay-details dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.15rem;
}
.pay-details dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.stack { display: grid; gap: 0.85rem; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.week-links {
  max-width: 100%;
}
.week-links .btn {
  min-width: 2.4rem;
  padding: 0.4rem 0.55rem;
}

.hero-with-avatar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-with-avatar .avatar {
  flex-shrink: 0;
}

.week-pick {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-top: 0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 182, 18, 0.14), transparent 55%),
    rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}
.week-pick-logo {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(20, 37, 31, 0.12));
}
.week-pick-logo-fallback {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(32, 55, 49, 0.1);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--field);
}
.week-pick-body {
  min-width: 0;
  flex: 1;
}
.week-pick-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.week-pick-team-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.week-pick-title {
  font-size: 1.15rem;
  line-height: 1.25;
}
.week-pick-result {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
}
.week-pick-empty,
.week-pick-missed {
  background: rgba(255, 255, 255, 0.45);
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(32, 55, 49, 0.14);
  flex-shrink: 0;
}
.avatar-sm { width: 1.65rem; height: 1.65rem; }
.avatar-lg { width: 4.5rem; height: 4.5rem; }
.avatar-fallback {
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85em;
  color: var(--field);
}
.avatar-lg.avatar-fallback { font-size: 1.4rem; }

.player-link,
.player-link-static {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  min-width: 0;
}
.player-link:hover { color: var(--accent); }
.player-link-static { font-weight: inherit; }

.player-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topic-list {
  display: grid;
  gap: 0.55rem;
}
.badge-pin {
  background: rgba(255, 182, 18, 0.28);
  color: #203731;
  vertical-align: middle;
}
.topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.45);
  text-decoration: none;
  color: inherit;
}
.topic-row.is-pinned {
  border-color: rgba(255, 182, 18, 0.55);
  background: rgba(255, 182, 18, 0.12);
}
.topic-row-main {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.topic-row-main:hover .topic-title { color: var(--accent); }
.topic-pin-form { flex-shrink: 0; margin: 0; }
.topic-title {
  font-size: 1.02rem;
}
.topic-meta {
  font-size: 0.85rem;
}
.topic-row-go {
  color: var(--muted);
  flex-shrink: 0;
}

.chirp-list {
  display: grid;
  gap: 0.85rem;
}
.chirp {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.45);
}
.chirp-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.chirp-author {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}
.chirp-author:hover { color: var(--accent); }
.chirp-body {
  margin: 0;
  word-break: break-word;
  font-weight: 400;
}
.wysiwyg-surface {
  font-weight: 400;
}
.chirp-body b, .chirp-body strong,
.wysiwyg-surface b, .wysiwyg-surface strong {
  font-weight: 700;
  font-family: inherit;
}
.chirp-body i, .chirp-body em,
.wysiwyg-surface i, .wysiwyg-surface em {
  font-style: italic;
}
.chirp-body u, .wysiwyg-surface u {
  text-decoration: underline;
}
.chirp-body p { margin: 0 0 0.55em; }
.chirp-body p:last-child { margin-bottom: 0; }
.chirp-body ul, .chirp-body ol { margin: 0.2rem 0 0.55rem 1.2rem; padding: 0; }
.chirp-body blockquote {
  margin: 0.4rem 0;
  padding: 0.2rem 0.75rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.chirp-body a { text-decoration: underline; }

.wysiwyg {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.72);
  overflow: hidden;
}
.wysiwyg-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--line);
  background: rgba(32, 55, 49, 0.05);
}
.wysiwyg-bar button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.28rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}
.wysiwyg-bar button:hover,
.wysiwyg-bar button.is-on {
  background: rgba(32, 55, 49, 0.12);
}
.wysiwyg-surface {
  min-height: 6.5rem;
  padding: 0.7rem 0.8rem;
  outline: none;
}
.wysiwyg-surface:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.wysiwyg-surface p { margin: 0 0 0.5em; }
.wysiwyg-surface p:last-child { margin-bottom: 0; }
.wysiwyg-surface ul, .wysiwyg-surface ol { margin: 0.2rem 0 0.5rem 1.2rem; }

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: rgba(255,255,255,0.72);
  resize: vertical;
  min-height: 5rem;
}

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

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    top: calc(100% + 0.4rem);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    border-radius: 16px;
    background: rgba(243, 239, 228, 0.97);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.65rem 0.4rem; border-bottom: none; }
  .site-chrome { position: sticky; }
  .topbar { position: relative; }
  .game-list-2col {
    grid-template-columns: 1fr;
  }
}

.account-panel {
  padding: 0;
}
.account-layout {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  min-height: 26rem;
}
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 0.7rem;
  border-right: 1px solid var(--line);
  background: rgba(32, 55, 49, 0.05);
  border-radius: var(--radius) 0 0 var(--radius);
}
.account-nav-label {
  margin: 0 0.45rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.account-nav-item {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}
a.account-nav-item:hover {
  color: inherit;
  text-decoration: none;
}
.account-nav-item:hover {
  background: rgba(255, 255, 255, 0.55);
}
.account-nav-item.is-active {
  background: var(--field);
  color: #f7f4ea;
}
a.account-nav-item.is-active:hover {
  color: #f7f4ea;
}
.account-main {
  padding: 1.15rem 1.25rem 1.35rem;
  min-width: 0;
}
.account-pane[hidden] { display: none; }
.account-pane h2 { margin-top: 0; }

.settings-section {
  margin: 0 0 1.35rem;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
.settings-section:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}
.settings-section h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.settings-section-lead {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .account-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.75rem 0.75rem 0.65rem;
  }
  .account-nav-label {
    width: 100%;
    margin: 0 0 0.25rem;
  }
  .account-nav-item {
    width: auto;
    padding: 0.4rem 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Team profile */
body.page-team {
  background: var(--team-color, #203731);
  color: var(--ink);
}
body.page-team .bg-mesh {
  background:
    radial-gradient(900px 480px at 12% -8%, color-mix(in srgb, #fff 22%, transparent), transparent 55%),
    radial-gradient(800px 420px at 100% 0%, color-mix(in srgb, #000 28%, transparent), transparent 52%),
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--team-color, #203731) 88%, #fff) 0%,
      var(--team-color, #203731) 42%,
      color-mix(in srgb, var(--team-color, #203731) 82%, #000) 100%
    );
}
body.page-team .topbar,
body.page-team .footer {
  background: color-mix(in srgb, var(--team-color, #203731) 78%, #000 22%);
  border-color: color-mix(in srgb, #fff 18%, transparent);
}
body.page-team .nav a,
body.page-team .footer,
body.page-team .footer a {
  color: var(--team-on, #f4f1e8);
}
body.page-team .nav a.is-active {
  color: #fff;
  border-bottom-color: #fff;
}

.team-hero {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, #fff 14%, transparent), transparent 55%),
    color-mix(in srgb, var(--team-color, #203731) 92%, #000);
  color: var(--team-on, #f4f1e8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.team-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.team-hero-logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}
.team-hero-copy {
  min-width: 0;
  flex: 1 1 16rem;
}
.team-hero-abbr {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
}
.team-hero-name {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.team-hero-meta {
  margin: 0.45rem 0 0;
  opacity: 0.88;
  font-size: 0.95rem;
}

.team-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}
.team-inline:hover {
  text-decoration: underline;
}
.team-inline img {
  flex: 0 0 auto;
}

.game-logo-link {
  display: block;
  line-height: 0;
}
.game-team-name-link {
  color: inherit;
  text-decoration: none;
}
.game-team-name-link:hover {
  text-decoration: underline;
}

.week-pick-logo-link {
  display: block;
  line-height: 0;
}
.week-pick-title a {
  color: inherit;
  text-decoration: none;
}
.week-pick-title a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .team-hero-logo {
    width: 84px;
    height: 84px;
  }
}

/* Teams directory */
.teams-conf-heading {
  margin: 1.35rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.teams-conf-heading:first-of-type {
  margin-top: 0.85rem;
}
.teams-division-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.teams-division-heading {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.teams-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.team-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--team-on, #f4f1e8);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--team-color, #203731) 88%, #fff) 0%,
    var(--team-color, #203731) 55%,
    color-mix(in srgb, var(--team-color, #203731) 82%, #000) 100%
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 14%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.team-card:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #fff 22%, transparent),
    0 10px 22px rgba(20, 37, 31, 0.16);
}
.team-card-logo {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.team-card-abbr {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.team-card-record {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0.95;
}
.team-card-name {
  grid-column: 2;
  font-size: 0.78rem;
  opacity: 0.9;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .teams-division-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .teams-grid {
    grid-template-columns: 1fr;
  }
}
