:root {
  --green: #92d050;
  --red: #ff5b5b;
  --yellow: #ffec3d;
  --ink: #221f1a;
  --line: #ddd6c8;
  --paper: #f3efe6;
  --card: #fffdf7;
  --field: #1d5732;
  --field-dark: #123a22;
  --accent: #b8002e;
  --accent-dark: #8f0024;
  --gold: #d9a62e;
  --muted: #6f6a5e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(rgba(35, 31, 26, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(180deg, var(--field) 0%, var(--field-dark) 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  color: #fff; font-weight: 800; letter-spacing: 0.16em; text-decoration: none;
}
.brand .logo { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4)); }
.logo.big { width: 96px; height: 96px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.topbar nav { display: flex; align-items: center; gap: 1.1rem; }
.topbar a { color: #fff; text-decoration: none; opacity: 0.9; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.topbar a:hover { opacity: 1; border-bottom-color: var(--gold); }
.topbar .who {
  font-weight: 600; font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.14); padding: 0.2rem 0.65rem; border-radius: 999px;
}
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: none; color: #fff; cursor: pointer; opacity: 0.85; font: inherit; padding: 0; }
.linkbtn:hover { opacity: 1; text-decoration: underline; }

/* ---- layout ---- */
.content { max-width: 1000px; margin: 1.6rem auto; padding: 0 1rem; }
/* The play page uses the full window (minus a small gutter) so wide
   monitors give the field and play-by-play the extra room. */
.content.content-wide { max-width: 1500px; }
.lobby-tagline {
  margin: 0 0 1rem; text-align: center;
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 1.05rem; color: var(--field);
}
.lobby-tagline::before, .lobby-tagline::after { content: " ~ "; color: var(--gold); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.4rem 1.6rem; margin-bottom: 1.4rem;
  box-shadow: 0 1px 3px rgba(35, 31, 26, 0.06), 0 8px 24px rgba(35, 31, 26, 0.05);
}
.card.narrow { max-width: 400px; margin-left: auto; margin-right: auto; margin-top: 2.5rem; }
.card.wide { max-width: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lobby-actions { display: flex; gap: 0.6rem; align-items: center; }
.ai-form { display: flex; gap: 0.5rem; align-items: center; }
.ai-skill { margin: 0.4rem 0 0.8rem; }
.skill-label { margin: 0; font-weight: 600; font-size: 0.9rem; }
.lvlselect {
  padding: 0.45rem 0.5rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 0.9rem; background: #fff;
}
h1 {
  margin: 0.2rem 0 0.8rem; font-size: 1.6rem;
  font-family: Georgia, "Times New Roman", serif; letter-spacing: 0.01em;
}
h2 {
  margin: 1.3rem 0 0.5rem; font-size: 1.05rem;
  font-family: Georgia, "Times New Roman", serif;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.kicker {
  margin: 0; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent);
}
.muted { color: var(--muted); }

.footer {
  text-align: center; color: var(--muted); font-size: 0.8rem;
  padding: 1.2rem 1rem 2.2rem;
}

/* ---- hero / landing ---- */
.hero-field {
  position: relative; overflow: hidden; text-align: center;
  margin-top: 0.4rem; padding: 4.2rem 1.5rem 4.8rem;
  border-radius: 16px; color: #fff;
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0 calc(10% - 2px),
      rgba(255, 255, 255, 0.13) calc(10% - 2px) 10%),
    linear-gradient(180deg, #236b3c, #133c24);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.28), 0 10px 30px rgba(18, 58, 34, 0.25);
}
.hero-field .kicker { color: var(--gold); }
.hero-field h1 {
  margin: 0.4rem 0 0; font-size: 3.1rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.hero-field .tagline { margin: 0.8rem auto 0; max-width: 34rem; color: #ece5cd; font-size: 1.05rem; }
.cta { margin-top: 1.8rem; display: flex; gap: 0.8rem; justify-content: center; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-top: 1.4rem;
}
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(35, 31, 26, 0.06);
}
.feature h3 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---- forms & buttons ---- */
label { display: block; margin: 0.8rem 0; font-weight: 600; font-size: 0.95rem; }
input {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.55rem 0.65rem;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem;
  background: #fff; transition: border-color 0.12s, box-shadow 0.12s;
}
input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 0, 46, 0.12);
}
.btn {
  display: inline-block; padding: 0.5rem 1.1rem;
  border: 1px solid transparent; border-radius: 8px;
  background: linear-gradient(180deg, #cf0f3d, var(--accent));
  color: #fff; font-weight: 700; cursor: pointer;
  text-decoration: none; font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(143, 0, 36, 0.35);
  transition: transform 0.08s, box-shadow 0.12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(143, 0, 36, 0.3); }
.btn.secondary {
  background: #fff; color: var(--ink); border-color: var(--line);
  box-shadow: 0 1px 2px rgba(35, 31, 26, 0.1);
}
.btn.secondary:hover { border-color: var(--field); color: var(--field); }
.btn.small { padding: 0.3rem 0.75rem; font-size: 0.85rem; }
.btn:disabled {
  background: #b3ac9e; border-color: transparent; color: #fff;
  cursor: default; transform: none; box-shadow: none;
}

/* The registration honeypot: parked far off-screen (display:none is easier
   for bots to detect), never reachable by keyboard or screen reader. */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.flash { background: #e9f5ec; border: 1px solid #9fd9b4; color: #1c6b3c;
  padding: 0.6rem 0.9rem; border-radius: 8px; margin-bottom: 1rem; }
.error { background: #fdebec; border: 1px solid #f1a7ad; color: #9b2330;
  padding: 0.6rem 0.9rem; border-radius: 8px; margin-bottom: 1rem; }

/* ---- tables / lists ---- */
table.list { width: 100%; border-collapse: collapse; margin-top: 0.6rem; }
table.list th, table.list td {
  text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line);
}
table.list thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); border-bottom: 2px solid var(--line);
}
table.list tbody tr:hover { background: rgba(29, 87, 50, 0.05); }
.you { color: var(--accent); font-weight: 600; }
.admin-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; align-items: center; }
.pw-form { display: flex; gap: 0.3rem; align-items: center; }
.pw-input {
  width: 9.5rem; margin: 0; padding: 0.3rem 0.45rem; font-size: 0.8rem;
  display: inline-block;
}
.results .res-date { white-space: nowrap; color: var(--muted); font-size: 0.85rem; }
.results .res-score { white-space: nowrap; font-weight: 700; }
.results .res-winner { font-weight: 700; }
.forfeit-row { margin-top: 0.8rem; text-align: right; }
.forfeitbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--muted); text-decoration: underline;
}
.forfeitbtn:hover { color: var(--accent); }
.detail-footer { margin-top: 1rem; }
.cancelbtn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.85rem; color: var(--muted); text-decoration: underline;
}
.cancelbtn:hover { color: var(--accent); }
.ready { color: #1c6b3c; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; padding: 0.18rem 0.6rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge::before {
  content: ""; width: 0.5em; height: 0.5em; border-radius: 50%;
  background: currentColor; margin-right: 0.4em;
}
.s-open { background: #e6eef7; color: #2e5a8f; }
.s-selecting { background: #fdf1d2; color: #8a5a00; }
.s-ready { background: #e9f5ec; color: #1c6b3c; }

/* ---- matchup panel ---- */
.matchup-panel { display: flex; align-items: stretch; gap: 1rem; margin: 1.3rem 0; }
.matchup-panel .side {
  flex: 1; text-align: center; padding: 1rem 1.1rem;
  background: #faf7ef; border: 1px solid var(--line); border-radius: 10px;
}
.matchup-panel .side.me { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(184, 0, 46, 0.12); }
.side-label {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem;
}
.matchup-panel .player { font-weight: 700; font-size: 1.05rem; }
.matchup-panel .teamname { margin-top: 0.35rem; color: var(--field); font-weight: 700; }
.matchup-panel .teamname.unset { color: var(--muted); font-weight: 400; font-style: italic; }
.matchup-panel .vs {
  align-self: center; flex: none; width: 2.6rem; height: 2.6rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.95rem; letter-spacing: 0.05em;
  color: var(--accent); background: #fff;
  border: 2px solid var(--accent); border-radius: 50%;
}

/* ---- team grid ---- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.9rem; margin-top: 1rem; }
.team-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 0.9rem 0.75rem;
  background: #fff; text-decoration: none; color: inherit;
  transition: transform 0.1s, box-shadow 0.12s, border-color 0.12s;
}
.team-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--field), var(--gold));
}
.team-card .jersey {
  position: absolute; right: 0.45rem; bottom: -0.65rem;
  font-size: 2.7rem; font-weight: 900; font-style: italic; line-height: 1;
  color: rgba(29, 87, 50, 0.1); pointer-events: none;
}
.team-card.link:hover, .team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(35, 31, 26, 0.12);
}
.team-card.link:hover { border-color: var(--field); }
.team-card.chosen { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(184, 0, 46, 0.18); }
.team-card.chosen::before { background: var(--accent); }
.team-name { font-weight: 700; position: relative; }
.team-rating { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.55rem; position: relative; }
.team-actions { display: flex; gap: 0.4rem; align-items: center; position: relative; }
.team-actions form { margin: 0; }

/* ---- chart grids (Bowl Bound style) ---- */
.chart-block { overflow-x: auto; margin-bottom: 1.4rem; }
table.chart { border-collapse: collapse; font-size: 0.72rem; }
table.chart th, table.chart td {
  border: 1px solid #333; text-align: center; padding: 6px 4px; min-width: 30px;
  white-space: nowrap;
}
table.chart thead th { background: #e9ecef; font-weight: 700; }
table.chart .group { background: #dde1e6; font-weight: 700; }
table.chart .num { background: #eef1f4; }
table.chart .rowhead { background: #e9ecef; font-weight: 700; }
table.chart .formation { background: #d7dbe0; font-weight: 700; padding: 2px 5px; vertical-align: middle; }
.formation .fletter { display: block; font-size: 1.1rem; line-height: 1.1; }
.formation .fname { display: block; font-size: 0.6rem; font-weight: 600; max-width: 64px;
  white-space: normal; color: #444; }
/* Gap between the play columns (1-9) and the QT/QR/B re-roll columns: a narrow
   white channel that keeps the black border on both sections it separates. */
table.chart .gap-col {
  width: 8px; min-width: 8px; padding: 0;
  background: #fff; border-top: none; border-bottom: none;
}
.cell { font-weight: 600; }
.c-green { background: var(--green); }
.c-red { background: var(--red); }
.c-yellow { background: var(--yellow); }
.c-white { background: #fff; }
.c-black { background: #1a1a1a; color: #1a1a1a; }

.legend { display: flex; gap: 0.5rem; margin: 0.6rem 0 1rem; align-items: center; }
.legend .cell { padding: 2px 10px; border: 1px solid #333; font-size: 0.72rem; }

/* ---- live gameplay ---- */
.gamewrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 1.2rem;
  align-items: start;
}
.gamemain { min-width: 0; }
/* The whole sidebar (chat + box score) sticks and scrolls as one unit. */
.gamechat {
  min-width: 0; position: sticky; top: 1rem;
  max-height: calc(100vh - 2rem); overflow-y: auto;
}
@media (max-width: 950px) {
  .gamewrap { grid-template-columns: 1fr; }
  .gamechat { position: static; max-height: none; overflow: visible; }
  .gamechat .chat-list { max-height: 220px; }
}

.scoreboard {
  position: relative;
  display: flex; align-items: stretch; justify-content: space-between; gap: 0.8rem;
  background: linear-gradient(180deg, #262c26, #131713); color: #fff;
  border: 2px solid #0c0f0c; border-radius: 12px; padding: 0.8rem 1.1rem;
}
.mutebtn {
  position: absolute; top: 0.35rem; right: 0.45rem;
  width: 1.7rem; height: 1.7rem; padding: 0; font-size: 0.85rem; line-height: 1;
  background: rgba(255, 255, 255, 0.08); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; cursor: pointer;
}
.mutebtn:hover { background: rgba(255, 255, 255, 0.18); }
.sb-team { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.sb-namewrap { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.sb-away .sb-namewrap { align-items: flex-end; }
.sb-name {
  font-weight: 700; letter-spacing: 0.04em; font-size: 0.95rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-level { font-size: 0.68rem; font-weight: 700; color: #ffd97a; letter-spacing: 0.05em; }
.sb-to { display: flex; gap: 0.25rem; }
.to-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  border: 1px solid rgba(255, 225, 77, 0.7); background: transparent;
}
.to-dot.full { background: #ffe14d; }
.sb-score {
  font-family: Georgia, serif; font-size: 2rem; font-weight: 700;
  color: #ffe14d; min-width: 2.2rem; text-align: center;
  background: rgba(255, 255, 255, 0.06); border-radius: 8px; padding: 0 0.4rem;
}
.sb-center { text-align: center; flex: none; }
.sb-clock {
  font-family: "Courier New", monospace; font-size: 1.9rem; font-weight: 700;
  color: #ffb400; line-height: 1; letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(255, 180, 0, 0.45);
}
.sb-quarter { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.2em; color: #9fe3b1; }
.sb-situation { font-size: 0.78rem; color: #cfd6cf; margin-top: 0.15rem; }
.poss { color: var(--gold); font-size: 0.8rem; visibility: hidden; }

.fieldbox { padding: 0.7rem; }
#field { display: block; width: 100%; height: auto; }
.ez-label {
  fill: #ffffff; opacity: 0.85; font-weight: 800; font-size: 17px;
  letter-spacing: 0.25em; text-anchor: middle; dominant-baseline: middle;
}
.yard-num {
  fill: #ffffff; opacity: 0.7; font-size: 13px; font-weight: 700;
  text-anchor: middle;
}
#field .slider { transition: transform 0.7s ease, opacity 0.4s ease; will-change: transform; }
#ballg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45)); }

.actionbox { min-height: 5rem; }
.actionbox .prompt { margin: 0 0 0.7rem; font-weight: 700; }
.actionbox .waiting { color: var(--muted); font-style: italic; }
.playstrip { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.stripbtn {
  width: 2.4rem; height: 2.4rem; padding: 0; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--field); color: #fff;
  border: 1px solid #14432a; border-radius: 50%;
  transition: transform 0.08s, box-shadow 0.1s;
}
.stripbtn:hover:not(:disabled) {
  transform: translateY(-1px); box-shadow: 0 3px 8px rgba(29, 87, 50, 0.35);
}
.stripbtn:disabled { opacity: 0.55; cursor: default; }
.stripbtn.defbtn { background: var(--accent); border-color: #8f0024; }
.stripbtn.defbtn:hover:not(:disabled) { box-shadow: 0 3px 8px rgba(184, 0, 46, 0.35); }
.playrow { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.playbtn {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.5rem 0.7rem; cursor: pointer; font: inherit; font-weight: 600;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color 0.1s, box-shadow 0.1s, transform 0.08s;
}
.playbtn:hover:not(:disabled) {
  border-color: var(--field); box-shadow: 0 2px 8px rgba(29, 87, 50, 0.18);
  transform: translateY(-1px);
}
.playbtn:disabled { opacity: 0.55; cursor: default; }
.playbtn.special {
  width: auto; justify-content: center;
  background: var(--paper); border-color: #c9c1ae; font-weight: 700;
}
.to-row { margin-top: 0.6rem; }
.playbtn.timeout {
  background: #fdf1d2; border-color: #d9a62e; color: #7a5200; font-size: 0.85rem;
}
.playbtn.timeout:hover:not(:disabled) { border-color: #b7860e; box-shadow: 0 2px 8px rgba(217, 166, 46, 0.3); }
.final-banner {
  font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.08em;
}
.final-score { margin-top: 0.3rem; font-weight: 600; }

/* ---- play-by-play table ---- */
.pbp-scroll { max-height: 420px; overflow-y: auto; margin-top: 0.4rem; }
.pbp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.pbp-table thead th {
  position: sticky; top: 0; background: var(--card);
  text-align: left; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
  padding: 0.35rem 0.5rem; border-bottom: 2px solid var(--line);
}
.pbp-table td {
  padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.pbp-table .col-clock {
  white-space: nowrap; width: 4.6rem;
  font-size: 0.72rem; font-weight: 700; color: var(--muted);
}
.rc-head { font-weight: 700; font-size: 0.78rem; margin-bottom: 0.15rem; }
.who-chip {
  display: inline-block; margin-right: 0.35rem; padding: 0 0.3rem;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em;
  border-radius: 3px; vertical-align: 1px;
}
.who-you { background: var(--accent); color: #fff; }
.who-opp { background: #5a6470; color: #fff; }
.rc-roll { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.rc-reroll {
  display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
  margin: 0.2rem 0 0 0.55rem;
}
.rc-chain { font-size: 0.72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rc-total { color: var(--muted); font-size: 0.75rem; }
.rc-token {
  font-weight: 700; background: var(--paper); border: 1px solid #333;
  border-radius: 3px; padding: 0 0.35rem; font-size: 0.78rem; color: #1a1a1a;
}
/* Chart-cell colors on the token chip, so it reads exactly like the box on
   the team chart. The compound selectors out-rank .rc-token's own background
   (which would otherwise win by source order). */
.rc-token.c-green { background: var(--green); }
.rc-token.c-red { background: var(--red); }
.rc-token.c-yellow { background: var(--yellow); }
.rc-token.c-white { background: #fff; }
.rc-token.c-black { background: #1a1a1a; color: #f2f2f2; }
.dice { display: inline-flex; gap: 2px; }
.die {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15rem; height: 1.15rem; border-radius: 4px;
  font-size: 0.7rem; font-weight: 800; border: 1px solid rgba(0, 0, 0, 0.35);
}
.die-black { background: #17191c; color: #fff; }
.die-white { background: #fff; color: #17191c; border-color: #9a9a9a; }
.die-red { background: #c92a2a; color: #fff; }
.die-green { background: #2b8a3e; color: #fff; }

.ev-score td { background: rgba(28, 107, 60, 0.07); }
.ev-turnover td { background: rgba(184, 0, 46, 0.06); }
.ev-score .ev-text, .ev-score .ev-res { color: #1c6b3c; font-weight: 700; }
.ev-turnover .ev-text, .ev-turnover .ev-res { color: var(--accent); font-weight: 700; }
.ev-penalty .ev-text, .ev-penalty .ev-res { color: #8a5a00; font-weight: 600; }
.ev-info .ev-text { color: var(--muted); font-style: italic; }
.ev-timeout td { background: rgba(255, 180, 0, 0.09); }
.ev-timeout .ev-text { color: #7a5200; font-weight: 700; }
.ev-res { font-weight: 600; }

/* ---- sideline chat (IM-style sidebar) ---- */
.chatbox {
  display: flex; flex-direction: column;
  padding: 0.9rem 1rem;
}
.chat-list {
  list-style: none; margin: 0.4rem 0 0.55rem; padding: 0;
  max-height: 42vh; min-height: 140px; overflow-y: auto;
}
.chat-msg {
  padding: 0.16rem 0; font-size: 0.76rem; line-height: 1.35;
}
.chat-msg .who-chip { font-size: 0.55rem; vertical-align: 1px; }
.chat-msg .chat-text { overflow-wrap: anywhere; }
.chat-msg .chat-time { font-size: 0.62rem; color: var(--muted); margin-left: 0.3rem; }
.chat-form { display: flex; gap: 0.4rem; }
.chat-form input {
  flex: 1; margin: 0; padding: 0.35rem 0.5rem; font-size: 0.8rem;
}

/* ---- box score (sidebar, chat-sized type) ---- */
.boxscore-card { padding: 0.9rem 1rem; }
.boxscore { border-collapse: collapse; margin-top: 0.35rem; width: 100%; }
.boxscore th, .boxscore td { padding: 0.18rem 0 0.18rem 0.5rem; text-align: right; }
.boxscore tbody th {
  text-align: left; font-weight: 600; font-size: 0.72rem; color: var(--muted);
  padding-left: 0; white-space: nowrap;
}
.boxscore thead th {
  text-align: right; font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.07em; border-bottom: 2px solid var(--line); padding-bottom: 0.3rem;
  overflow: hidden; text-overflow: ellipsis; max-width: 5.5rem;
}
.boxscore thead th:first-child { text-align: left; padding-left: 0; }
.boxscore td {
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.76rem;
  white-space: nowrap;
}

/* ---- help pages ---- */
.help-steps li, .help-list li { margin: 0.45rem 0; line-height: 1.5; }
.help-list { padding-left: 1.2rem; }
.prioritychart td { min-width: 44px; font-size: 0.7rem; }
.pc-add { background: #fff; }
.pc-off { background: var(--green); }
.pc-def { background: #ffd2d2; }
.pc-bad { background: var(--red); color: #fff; }
.pc-good { background: var(--green); font-weight: 800; }
.pc-inc { background: #eef1f4; color: #444; }
.pc-pen { background: var(--yellow); }
.pc-reroll { background: #d7dbe0; font-weight: 700; }

/* ---- in-game chart panes ---- */
.chartpane .chart-block { margin-bottom: 0.4rem; }
