.tg-prototype {
  --tg-green: #206020;
  --tg-accent: #70a070;
  --tg-ink: #213b34;
  --tg-line: #dce5e0;
  --tg-muted: #4d6152;
  --tg-header-bg: #164816;
  --tg-header-text: #f3f8f1;
  --tg-header-muted: #c5dfbd;
  --tg-modified-color: #c73535;
  color: var(--tg-ink);
  font-family: Arial, sans-serif;
  max-width: 1100px;
  margin: 0 auto 32px;
  font-size: 14px;
  line-height: 1.45;
}
.tg-prototype.tg-read-only {
  --tg-modified-color: #a77e7e;
}
.tg-prototype * {
  box-sizing: border-box;
}
.tg-prototype button,
.tg-prototype input,
.tg-prototype select {
  font: inherit;
}
.tg-prototype button {
  cursor: pointer;
}
.tg-prototype button:disabled {
  cursor: default;
  opacity: 0.5;
}
.tg-prototype button:focus-visible,
.tg-prototype input:not(.tg-live-score):focus-visible,
.tg-prototype select:focus-visible {
  outline: 3px solid #80b980;
  outline-offset: 2px;
}
.tg-prototype h1,
.tg-prototype h2,
.tg-prototype h3,
.tg-prototype p {
  margin: 0;
}
.tg-prototype h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -1px;
}
.tg-prototype h1 span {
  font-weight: 400;
  color: #62776e;
}
.tg-prototype h2 {
  font-size: 18px;
  font-weight: 700;
}
.tg-prototype h3 {
  font-size: 17px;
  font-weight: 700;
}
.tg-prototype .tg-muted {
  color: var(--tg-muted);
}
.tg-lab-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff4da;
  border: 1px solid #e9d29e;
  border-radius: 8px 8px 0 0;
  padding: 12px 16px;
  color: #6e521e;
}
.tg-lab-banner strong {
  letter-spacing: 1px;
  font-size: 11px;
  margin-right: 12px;
}
.tg-lab-banner button {
  border: 0;
  background: none;
  text-decoration: underline;
  color: inherit;
  white-space: nowrap;
  min-height: 36px;
}
.tg-lab-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  background: #f5f8f4;
  border: 1px solid var(--tg-line);
  border-top: 0;
  padding: 12px;
  border-radius: 0 0 8px 8px;
}
.tg-lab-tools label {
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}
.tg-lab-tools select {
  display: block;
  min-height: 40px;
  background: white;
  border: 1px solid #d5dcd7;
  border-radius: 5px;
  padding: 7px 28px 7px 9px;
  color: var(--tg-ink);
  margin-top: 5px;
}
.tg-lab-tools p {
  width: 100%;
  font-size: 12px;
  color: #627762;
}
.tg-event-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 14px;
  border-bottom: 2px solid var(--tg-accent);
  margin-bottom: 12px;
}
.tg-event-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.tg-event-logo {
  display: block;
  grid-column: 1 / -1;
  width: 430px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.tg-group-trs {
  border: 1px solid #b5cfad;
  border-top: 3px solid var(--tg-accent);
  background: #eef5ea;
  border-radius: 5px;
  padding: 8px 12px;
  text-align: center;
  flex-shrink: 0;
}
.tg-sheet-header .tg-group-trs {
  width: 118px;
  justify-self: end;
}
.tg-group-trs > span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #35532f;
}
.tg-group-trs > strong {
  display: block;
  font-size: 32px;
  line-height: 1.15;
  color: var(--tg-green);
}
.tg-player-identity small {
  display: block;
  font-size: 10px;
  color: var(--tg-muted);
  margin-top: 3px;
  font-weight: 400;
}
.tg-mobile-ratings {
  display: block;
  color: var(--tg-muted);
  font-size: 10px;
  font-weight: 400;
  margin-top: 3px;
}
.tg-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: #60786c;
  margin-bottom: 7px;
}
.tg-event-header p {
  color: #64786e;
  margin-top: 7px;
}
.tg-event-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.tg-event-actions small {
  width: 100%;
  text-align: right;
  color: var(--tg-muted);
}
.tg-event-progress {
  grid-column: 1 / -1;
  border-left: 3px solid var(--tg-green);
  padding: 4px 10px;
}
.tg-sheet-header .tg-event-progress {
  grid-column: 1;
}
.tg-event-progress > span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--tg-muted);
}
.tg-event-progress > strong {
  display: block;
  margin-top: 3px;
  color: var(--tg-green);
  font-size: 15px;
}
.tg-status {
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  padding: 5px 10px;
  background: #d5e2d1;
  color: var(--tg-muted);
  border-radius: 30px;
  white-space: nowrap;
}
.tg-status-live {
  background: #cedfc8;
  color: var(--tg-green);
}
.tg-status-done {
  background: #c5d9bf;
  color: var(--tg-green);
}
.tg-button {
  border: 1px solid var(--tg-green);
  border-radius: 5px;
  background: var(--tg-green);
  color: white;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 700 !important;
}
.tg-button-quiet {
  background: white;
  color: var(--tg-green);
  border-color: #c9d8d0;
}
.tg-rules-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 10px 14px;
  background: #edf3ef;
  border-left: 3px solid var(--tg-green);
  font-size: 12px;
}
.tg-rules-strip strong {
  margin-right: 7px;
}
.tg-feedback {
  padding: 6px 0;
  min-height: 34px;
  font-size: 12px;
  color: var(--tg-muted);
}
.tg-feedback p {
  padding: 7px 10px;
}
.tg-error {
  background: #fff1ea;
  border-left: 3px solid #ad522f;
  color: #914322;
}
.tg-saved {
  background: #eaf4ed;
  color: #326c4d;
}
.tg-champion {
  background: var(--tg-header-bg);
  color: white;
  padding: 22px;
  text-align: center;
  margin-top: 20px;
  border-radius: 8px;
}
.tg-champion span {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--tg-header-muted);
}
.tg-champion strong {
  display: block;
  font-size: 27px;
  margin: 8px;
}
.tg-champion p {
  font-size: 12px;
  color: #c8dacf;
}
.tg-standings {
  margin-top: 14px;
  width: 100%;
  max-width: 720px;
  background: white;
  border: 1px solid var(--tg-line);
  border-radius: 8px;
  overflow: hidden;
}
.tg-section-heading {
  background: var(--tg-header-bg);
  color: var(--tg-header-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.tg-section-heading > span {
  font-size: 12px;
  color: var(--tg-header-muted);
}
.tg-section-heading .tg-eyebrow {
  color: var(--tg-header-muted);
}
.tg-table-wrap {
  overflow-x: auto;
}
.tg-standings table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.tg-standings thead {
  background: var(--tg-header-bg);
  color: var(--tg-header-text);
  font-size: 10px;
  letter-spacing: 0.7px;
}
.tg-standings th,
.tg-standings td {
  padding: 6px 10px;
  border-bottom: 1px solid #edf1ee;
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.tg-standings thead th {
  border-bottom: 2px solid var(--tg-accent);
  text-align: center;
}
.tg-standings thead th:nth-child(2),
.tg-standings tbody th {
  text-align: left;
}
.tg-standings th:first-child,
.tg-standings td:first-child {
  text-align: center;
  width: 48px;
}
.tg-standings tbody th {
  font-weight: 500;
}
.tg-standings th:nth-child(2) {
  position: sticky;
  left: 0;
  z-index: 1;
  background: white;
  box-shadow: 3px 0 4px #16481618;
}
.tg-standings thead th:nth-child(2) {
  background: var(--tg-header-bg);
  z-index: 2;
}
.tg-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tg-green);
  color: white;
  font-weight: 700;
}
.tg-rank-first {
  background: var(--tg-green);
  color: white;
}
.tg-roster-number {
  color: var(--tg-muted);
  margin-right: 5px;
  font-size: 11px;
}
.tg-positive {
  color: #20704e;
}
.tg-table-legend {
  font-size: 11px;
  color: var(--tg-muted);
  padding: 9px 14px !important;
}
.tg-table-legend p {
  margin: 0;
}
.tg-table-legend p + p {
  margin-top: 4px;
}
.tg-tiebreak {
  margin: 12px 14px 0;
  padding: 10px 12px;
  background: #f2f7ef;
  border: 1px solid #c7d8c2;
  border-left: 3px solid var(--tg-green);
  border-radius: 5px;
  font-size: 12px;
}
.tg-tiebreak > strong {
  color: var(--tg-green);
}
.tg-tiebreak ol {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 28px;
  margin: 8px 0 0;
  padding-left: 18px;
}
.tg-tiebreak li::marker {
  color: var(--tg-green);
  font-weight: 700;
}
.tg-section-nav {
  display: flex;
  gap: 6px;
  padding: 5px;
  max-width: 720px;
  background: #e7eee4;
  border: 1px solid #b7cdb2;
  border-radius: 8px;
  margin: 22px 0 5px;
}
.tg-section-nav button {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #f7faf5;
  border: 1px solid #c1d3bc;
  border-radius: 5px;
  padding: 12px 10px;
  color: var(--tg-green);
  font-size: 15px;
  font-weight: 700;
  min-height: 52px;
}
.tg-section-nav button.tg-active {
  background: var(--tg-green);
  color: white;
  border-color: var(--tg-green);
  box-shadow: 0 2px 4px #16481625;
}
.tg-section-nav button:not(.tg-active):hover {
  background: #eef6e9;
  border-color: var(--tg-green);
}
.tg-section-nav button span {
  display: inline-block;
  margin-left: 0;
  font-size: 10px;
  padding: 3px 7px;
  background: #e7eee8;
  border-radius: 5px;
}
.tg-section-nav button.tg-active span {
  background: #ffffff24;
  color: white;
}
.tg-round-heading.tg-elimination-heading {
  margin-top: 30px;
}
.tg-round {
  margin: 30px 0;
}
.tg-round + .tg-round {
  border-top: 1px solid var(--tg-line);
  padding-top: 22px;
}
.tg-round-heading {
  background: var(--tg-header-bg);
  color: var(--tg-header-text);
  border-left: 3px solid var(--tg-accent);
  border-radius: 5px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0 0 10px;
}
.tg-round-heading > span {
  font-size: 12px;
  color: var(--tg-header-muted);
}
.tg-matches {
  max-width: 780px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.tg-match {
  background: white;
  border: 1px solid var(--tg-line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}
.tg-match-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f0f4ed;
  color: var(--tg-ink);
  padding: 7px 12px;
  border-bottom: 1px solid var(--tg-line);
}
.tg-match-heading > span:first-child {
  font-weight: 700;
  color: var(--tg-green);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: auto;
}
.tg-match-body {
  padding: 10px;
}
.tg-score-scroll {
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.tg-score-scroll:focus-visible {
  outline: 2px solid var(--tg-accent);
  outline-offset: 2px;
}
.tg-score-scroll-hint {
  display: none;
}
.tg-mobile-match {
  display: none;
}
.tg-score-grid {
  display: grid;
  grid-template-columns:
    minmax(120px, 1.8fr) repeat(var(--tg-games), minmax(32px, 42px))
    48px;
  gap: 4px;
  align-items: center;
}
.tg-grid-label {
  background: #e3ece1;
  border-radius: 3px;
  padding-left: 4px;
  font-weight: 600;
  font-size: 10px;
  color: var(--tg-muted);
  padding: 3px 0;
}
.tg-game-number {
  text-align: center;
}
.tg-player {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.3;
  min-width: 0;
}
.tg-player-number {
  font-size: inherit;
  color: inherit;
}
.tg-player-name {
  display: flex;
  align-items: center;
  gap: 5px;
}
.tg-player-winner {
  font-weight: 700;
  color: #17644c;
}
.tg-score-cell {
  position: relative;
  padding-bottom: 13px;
}
.tg-prototype :is(input, .tg-static-score) {
  width: 100%;
  min-width: 0;
  height: 42px;
  text-align: center;
  border: 1px solid #cfdbd1;
  border-radius: 4px;
  background: white;
  color: #314a3d;
  font-size: 17px;
  font-weight: 600;
  padding: 0;
}
.tg-prototype :is(input:disabled, .tg-static-score) {
  background: #f5f7f5;
  color: var(--tg-muted);
  border-color: #e4eae4;
  opacity: 1;
}
.tg-prototype .tg-static-score {
  display: grid;
  place-items: center;
  cursor: default;
  user-select: none;
}
.tg-prototype :is(input:disabled, .tg-static-score).tg-temporarily-disabled {
  background: white;
  border-color: #cfdbd1;
}
.tg-prototype :is(input, .tg-static-score).tg-score-win {
  background: white;
  color: #17623e;
  border-color: #cfdbd1;
}
.tg-prototype :is(input, .tg-static-score).tg-live-score {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 400;
  color: blue;
  outline: none;
  -webkit-text-fill-color: currentColor;
}
.tg-prototype input.tg-live-score:enabled {
  cursor: pointer;
}
.tg-prototype.tg-read-only :is(input, .tg-static-score).tg-live-score {
  color: #000;
}
.tg-score-cell:has(> .tg-break-caption)::after {
  content: 'BRIS';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 11px;
  line-height: 11px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #949e94;
  pointer-events: none;
}
.tg-prototype :is(input, .tg-static-score).tg-score-modified {
  border-bottom: 2px solid var(--tg-modified-color);
}
.tg-prototype :is(input:disabled, .tg-static-score).tg-score-modified.tg-temporarily-disabled {
  border-bottom-color: var(--tg-modified-color);
}
.tg-prototype :is(input, .tg-static-score).tg-score-invalid {
  border: 2px solid #c73535;
}
.tg-modified-legend > span {
  display: inline-block;
  width: 14px;
  border-bottom: 2px solid var(--tg-modified-color);
  vertical-align: middle;
}
.tg-player-total {
  text-align: center;
  align-self: start;
  padding-top: 5px;
}
.tg-player-total strong {
  display: block;
  font-size: 18px;
}
.tg-player-total small {
  font-size: 12px;
  font-weight: 400;
  color: var(--tg-ink);
  white-space: nowrap;
}
.tg-review-note {
  background: #fff8e5;
  border-left: 3px solid var(--tg-accent);
  color: var(--tg-muted);
  padding: 8px 10px;
  margin-top: 8px !important;
  font-size: 11px;
}
.tg-status-review {
  background: #fff4d4;
  color: #6e521e;
}
.tg-indicator {
  min-height: 29px;
  padding: 2px 0;
  border: 1px solid #e1e9e1;
  border-radius: 3px;
  background: #f8faf7;
  color: var(--tg-muted);
  font-size: 10px !important;
}
.tg-indicator-set {
  background: #deedde;
  color: var(--tg-green);
  border-color: #a5c9a5;
}
.tg-prototype button.tg-indicator-temporarily-disabled:disabled {
  opacity: 1;
}
.tg-match-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 10px;
  border-top: 1px solid #edf0eb;
  margin-top: 12px;
  padding-top: 8px;
  font-size: 11px;
  color: var(--tg-muted);
}
.tg-break-rule {
  flex-basis: 100%;
}
.tg-prototype .tg-automatic-cell :is(input:disabled, .tg-static-score) {
  background-color: #e9eee7;
  border-color: #bccbb8;
  color: var(--tg-green);
  font-size: 23px;
  font-weight: 700;
}
.tg-special-panel {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  background: white;
  color: var(--tg-ink);
  border: 1px solid #b5cbb0;
  border-top: 3px solid var(--tg-green);
  border-radius: 7px;
  box-shadow: 0 8px 28px #18331d30;
  padding: 14px;
  font-size: 13px;
}
.tg-special-panel > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.tg-special-panel button {
  min-height: 40px;
  background: white;
  border: 1px solid #d0ddd0;
  padding: 6px 12px;
  border-radius: 4px;
  color: #47654f;
}
.tg-special-panel .tg-selected {
  background: var(--tg-green);
  color: white;
}
.tg-phase-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #eaf1ec;
  padding: 22px;
  margin-top: 22px;
  border-radius: 8px;
}
.tg-phase-action p {
  font-size: 12px;
  color: var(--tg-muted);
  margin-top: 6px;
}
.tg-phase-action .tg-button {
  flex-shrink: 0;
}
.tg-round-confirmation-tied {
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.tg-tie-notice {
  margin-top: 10px;
  padding: 10px 12px;
  color: var(--tg-ink);
  background: #fff5f4;
  border: 1px solid #eccac7;
  border-left: 3px solid #b52828;
  border-radius: 5px;
  font-size: 13px;
}
.tg-tie-notice > strong {
  color: #a41f24;
}
.tg-tie-notice p {
  color: inherit;
  font-size: inherit;
}
.tg-tie-notice ul {
  margin: 6px 0;
  padding-left: 20px;
}
.tg-tie-order {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  max-width: 22rem;
}
.tg-tie-order label {
  display: grid;
  grid-template-columns: 2ch minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
}
.tg-tie-order select {
  appearance: auto;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 2px 6px;
  color: var(--tg-ink);
  background: white !important;
  border: 1px solid #9db598;
  border-radius: 4px !important;
}
.tg-ladder {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 0;
  font-size: 13px;
}
.tg-ladder strong {
  color: var(--tg-green);
}
.tg-elimination-matches {
  margin-top: 6px;
}
.tg-pending-match {
  border: 1px dashed #cddbcf;
  border-radius: 8px;
  padding: 22px;
  background: #f5f8f5;
  color: var(--tg-muted);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tg-pending-match > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.tg-pending-match strong {
  font-size: 17px;
  color: #4e6c57;
}
.tg-pending-match p {
  font-size: 12px;
  margin-top: 5px;
}
.tg-empty {
  text-align: center;
  padding: 45px 20px;
  border: 1px dashed #cddbcf;
  border-radius: 8px;
  background: #f5f8f5;
}
.tg-empty p {
  margin: 12px 0 20px;
  color: var(--tg-muted);
}
.tg-page-foot {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--tg-line);
  font-size: 11px;
  color: var(--tg-muted);
}

/* Use the available sheet width, including when Statelo's sidebar is visible. */
.tg-prototype {
  container-type: inline-size;
  container-name: tg-sheet;
}
@container tg-sheet (min-width:1080px) {
  .tg-matches {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tg-prototype :is(input, .tg-static-score) {
    height: 34px;
    font-size: 15px;
  }
}
@container tg-sheet (max-width:800px) {
  .tg-event-identity {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .tg-event-logo {
    width: 330px;
  }
  .tg-event-header {
    align-items: flex-start;
  }
  .tg-event-header h1 {
    font-size: 25px;
  }
  .tg-event-actions {
    max-width: 150px;
    gap: 8px;
  }
  .tg-rules-strip {
    gap: 6px 16px;
  }
  .tg-phase-action {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }
  .tg-section-heading {
    padding: 15px;
  }
  .tg-lab-tools {
    gap: 10px;
  }
  .tg-score-grid {
    grid-template-columns:
      minmax(100px, 1.8fr) repeat(var(--tg-games), minmax(28px, 42px))
      40px;
  }
  .tg-player {
    font-size: 11px;
  }
}
@container tg-sheet (max-width:600px) {
  .tg-event-identity {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .tg-event-logo {
    width: 270px;
  }
  .tg-group-trs {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    border-top: 1px solid #b5cfad;
    border-left: 3px solid var(--tg-accent);
  }
  .tg-sheet-header .tg-group-trs {
    width: 100%;
  }
  .tg-group-trs > span {
    font-size: 11px;
  }
  .tg-group-trs > strong {
    font-size: 28px;
  }
  .tg-prototype {
    font-size: 13px;
  }
  .tg-lab-banner {
    align-items: flex-start;
    padding: 10px;
    gap: 5px;
  }
  .tg-lab-banner span {
    font-size: 11px;
  }
  .tg-lab-banner strong {
    display: block;
  }
  .tg-lab-banner button {
    font-size: 10px;
    white-space: normal;
    max-width: 90px;
  }
  .tg-lab-tools {
    padding: 12px;
  }
  .tg-lab-tools label {
    flex: 1 1 42%;
  }
  .tg-lab-tools select {
    width: 100%;
    padding-right: 5px;
  }
  .tg-lab-tools .tg-button {
    width: 100%;
  }
  .tg-event-header {
    padding: 22px 0 16px;
    flex-direction: column;
    gap: 14px;
  }
  .tg-event-header h1 {
    font-size: 25px;
  }
  .tg-event-header h1 span {
    display: block;
    font-size: 20px;
    margin-top: 2px;
  }
  .tg-event-actions {
    max-width: none;
    width: 100%;
    justify-content: flex-start;
  }
  .tg-event-actions small {
    width: auto;
    margin-left: auto;
    font-size: 10px;
    text-align: right;
  }
  .tg-eyebrow {
    font-size: 9px;
  }
  .tg-rules-strip {
    font-size: 11px;
    padding: 11px;
  }
  .tg-rules-strip span {
    flex: 1 1 42%;
  }
  .tg-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .tg-prototype h2 {
    font-size: 19px;
  }
  .tg-standings th,
  .tg-standings td {
    padding: 9px 8px;
  }
  .tg-standings th:first-child,
  .tg-standings td:first-child {
    width: auto;
  }
  .tg-standings th:nth-child(2) {
    min-width: 150px;
  }
  .tg-table-legend {
    padding: 10px !important;
    font-size: 10px;
  }
  .tg-section-nav {
    gap: 6px;
  }
  .tg-section-nav button {
    font-size: 13px;
  }
  .tg-section-nav button span {
    margin-left: 0;
  }
  .tg-round-heading {
    align-items: flex-start;
  }
  .tg-round-heading > span {
    font-size: 10px;
    max-width: 100%;
    text-align: left;
  }
  .tg-desktop-scores {
    display: none;
  }
  .tg-mobile-match {
    display: block;
  }
  .tg-mobile-roster {
    margin: 0 0 9px;
  }
  .tg-mobile-player-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    padding: 4px 0;
    font-size: 12px;
  }
  .tg-mobile-player-heading > div {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
  }
  .tg-mobile-player-heading strong {
    color: var(--tg-ink);
  }
  .tg-mobile-trs {
    font-size: 10px;
    color: var(--tg-muted);
  }
  .tg-mobile-player-heading small {
    font-size: 13px;
    color: var(--tg-ink);
  }
  .tg-player-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 3px 4px;
    border-radius: 4px;
    background: #e3ece1;
    color: var(--tg-green);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
  }
  .tg-mobile-unified-scroll {
    overflow-x: auto;
    max-width: 100%;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  .tg-mobile-unified-scroll:focus-visible {
    outline: 2px solid var(--tg-accent);
  }
  .tg-mobile-unified-grid {
    display: grid;
    grid-template-columns: 40px repeat(var(--tg-games), minmax(44px, 1fr));
    min-width: calc(var(--tg-games) * 48px + 40px);
    gap: 4px;
    align-items: center;
  }
  .tg-mobile-tag-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: white;
    box-shadow: 3px 0 4px #16481618;
  }
  .tg-mobile-grid-corner {
    background: #e3ece1;
  }
  .tg-mobile-tag-cell .tg-player-tag {
    margin-bottom: 13px;
  }
  .tg-mobile-perf-label {
    color: var(--tg-muted);
    font-size: 9px;
    font-weight: 700;
  }
  .tg-score-scroll-hint {
    display: block;
    color: var(--tg-muted);
    font-size: 10px;
    margin-top: 7px !important;
  }
  .tg-match-body {
    padding: 12px;
  }
  .tg-match-foot {
    font-size: 10px;
  }
  .tg-phase-action .tg-button {
    width: 100%;
  }
  .tg-ladder {
    gap: 6px;
    flex-direction: column;
    font-size: 12px;
  }
  .tg-page-foot {
    font-size: 10px;
  }
}
.tg-real-preview .tg-preview-round { margin-top: 24px; }
.tg-real-preview .tg-preview-round > h2 { background: #174f20; color: #fff; padding: 10px 14px; border-radius: 4px; font-size: 1.15rem; }
.tg-real-preview .tg-preview-matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr)); gap: 14px; }
.tg-real-preview .tg-preview-players { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tg-real-preview .tg-preview-players b { display: inline-block; min-width: 38px; color: #174f20; }
.tg-real-preview .tg-preview-players small { margin-left: 5px; color: #3e5a49; }
.tg-real-preview .tg-preview-scroll { overflow-x: auto; }
.tg-real-preview .tg-preview-scores { border-collapse: separate; border-spacing: 3px; width: 100%; text-align: center; }
.tg-real-preview .tg-preview-scores th { background: #e1ebdf; padding: 4px; white-space: nowrap; }
.tg-real-preview .tg-preview-scores td { min-width: 34px; height: 32px; background: #f4f7f3; border: 1px solid #d2ded3; }
.tg-real-preview .tg-preview-scores .tg-preview-score { color: #000; font-size: 1.2rem; font-style: italic; }
.tg-real-preview .tg-preview-score input { width: 38px; height: 32px; padding: 0; border: 0; background: transparent; color: inherit; text-align: center; font: inherit; }
.tg-real-preview .tg-preview-score input:disabled { opacity: 1; }
.tg-real-preview .tg-match-foot { display: flex; flex-direction: column; }
