:root {
  --blue: #0c479d;
  --blue-light: #e0f2fe;
  --green: #16a34a;
  --green-bg: #e8f5e9;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-800: #1e293b;
  --radius: 10px;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.45;
  padding: 0 0 48px;
}
.tournament-header {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid #e0f2fe;
  text-align: center;
  padding: 28px 16px 20px;
}
.header-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}
.tournament-header h1 {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.subtitle {
  font-size: 16px;
  color: #334155;
  margin-bottom: 4px;
}
.date {
  font-size: 14px;
  color: var(--gray-500);
  font-style: italic;
}
.tour-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 24px auto 28px;
  padding: 0 16px;
}
.nav-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-btn,
.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid var(--gray-200);
  background: white;
  color: var(--blue);
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-btn:hover,
.round-btn:hover {
  background: var(--blue-light);
  border-color: #93c5fd;
}
.nav-btn.active,
.round-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(12, 71, 157, 0.25);
}
.rounds {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.rounds-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  margin-right: 4px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.15s;
}
.download-btn:hover {
  background: #15803d;
}
.table-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.table-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 16px;
}
.table-title span {
  display: inline-block;
  background: var(--blue);
  color: white;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  font-size: 15px;
  margin-left: 4px;
}
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  background: white;
}
table.results {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14.5px;
  min-width: 720px;
}
table.results thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--green-bg);
  color: #1a3a5c;
  font-weight: 600;
  padding: 9px 10px;
  border-bottom: 2px solid var(--blue);
  white-space: nowrap;
  text-align: center;
}
table.results thead th:nth-child(3) {
  text-align: left;
  padding-left: 14px;
}
table.results tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  text-align: center;
}
table.results tbody td:nth-child(3) {
  text-align: left;
  padding-left: 14px;
}
table.results tbody tr:nth-child(even) {
  background: #f8fafc;
}
table.results tbody tr:hover {
  background: #e0f2fe;
}
table.results tr.rank-1 {
  background: #fef9c3 !important;
}
table.results tr.rank-2 {
  background: #f1f5f9 !important;
}
table.results tr.rank-3 {
  background: #fff7ed !important;
}
table.results tr.rank-1:hover,
table.results tr.rank-2:hover,
table.results tr.rank-3:hover {
  filter: brightness(0.97);
}
.pair-names a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.pair-names a:hover {
  text-decoration: underline;
}
.pair-names .sep {
  color: #94a3b8;
  margin: 0 2px;
}
.percent,
.mp {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.num {
  font-variant-numeric: tabular-nums;
}
.pair-num a {
  color: var(--blue);
  font-style: italic;
  text-decoration: none;
}
.tour-nav-secondary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 0 16px;
  font-size: 15px;
}
.tour-nav-secondary a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.tour-nav-secondary a:hover {
  text-decoration: underline;
}
.tour-number {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  min-width: 70px;
  text-align: center;
}
table.tour-table {
  width: 100% !important;
  max-width: none;
  margin: 0 auto;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  font-size: 12.5px !important;
  background: #fff !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}
table.tour-table thead th {
  background: #e8f5e9 !important;
  color: #1a3a5c !important;
  font-weight: 600 !important;
  padding: 6px 5px !important;
  border-bottom: 2px solid #0c479d !important;
  text-align: center !important;
  font-size: 11.5px !important;
}
table.tour-table tbody td {
  padding: 3px 5px !important;
  border-bottom: 1px solid #e5e7eb !important;
  vertical-align: middle !important;
  text-align: center !important;
  line-height: 1.25 !important;
  font-size: 12.5px !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border: none !important;
}
table.tour-table .table-num {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  width: 32px;
  min-width: 32px;
  max-width: 36px;
  padding: 3px 2px !important;
}
table.tour-table .pair-cell {
  text-align: left !important;
  padding-left: 6px !important;
}
table.tour-table .pair-cell a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
table.tour-table .pair-cell a:hover {
  text-decoration: underline;
}
table.tour-table .score {
  text-align: center;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  color: #0c479d !important;
}
table.history {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 900px;
}
table.history thead th {
  background: var(--green-bg);
  color: #1a3a5c;
  font-weight: 600;
  padding: 9px 6px;
  border-bottom: 2px solid var(--blue);
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
}
table.history thead th.group {
  border-left: 2px solid #94a3b8;
}
table.history tbody td {
  padding: 5px 6px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  text-align: center;
}
table.history tbody tr.round-odd {
  background: #f8fafc;
}
table.history tbody tr.round-hover {
  background: #e0f2fe !important;
}
.round-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}
.round-num a {
  color: var(--blue);
  text-decoration: none;
}
.round-num a:hover {
  text-decoration: underline;
}
.opponent a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  display: block;
  line-height: 1.3;
}
.opponent a:hover {
  text-decoration: underline;
}
.contract {
  font-weight: 600;
  white-space: nowrap;
}
.suit-s, .suit-c {
  color: #1e293b;
}
.suit-h, .suit-d {
  color: #dc2626;
}
.score-plus {
  color: var(--green);
  font-weight: 600;
}
.score-minus {
  color: #dc2626;
  font-weight: 600;
}
.mp {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.running {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue);
}
.pct-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 42px;
}
.pct-val {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pct-val.good {
  color: var(--green);
}
.pct-val.bad {
  color: #dc2626;
}
.pct-bar {
  width: 36px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.pct-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
}
.pct-bar > span.good {
  background: var(--green);
}
.pct-bar > span.bad {
  background: #dc2626;
}
.board-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.board-link:hover {
  text-decoration: underline;
}
.bbo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 16px;
  background: #2563eb;
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: 3px;
  text-decoration: none;
  margin-left: 4px;
  vertical-align: middle;
}
.bbo-btn:hover {
  background: #1d4ed8;
}
.deal-tooltip {
  display: none;
  position: fixed !important;
  z-index: 10000 !important;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  font-size: 12px;
  line-height: 1.25;
  min-width: 220px;
  pointer-events: auto !important;
  font-family: Arial, Helvetica, sans-serif;
  max-width: min(320px, calc(100vw - 16px)) !important;
  color: #1e293b;
  max-height: calc(100vh - 16px) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}
.deal-tooltip.visible {
  display: block;
}
.deal-tooltip .deal-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px !important;
  color: #64748b;
  font-size: 10px !important;
  gap: 8px !important;
}
.deal-tooltip table.dd {
  border-collapse: collapse;
  width: 100%;
  margin-top: 6px;
}
.deal-tooltip table.dd th,
.deal-tooltip table.dd td {
  border: 1px solid #cbd5e1;
  padding: 2px 5px;
  text-align: center;
  font-size: 11px;
}
.deal-tooltip table.dd th {
  background: #e8f5e9;
}
.deal-tooltip .minimax {
  text-align: center;
  font-weight: 600;
  margin-top: 6px;
  color: var(--blue);
}
.tour-nav-secondary > a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  min-width: 90px;
}
.tour-nav-secondary > a:hover {
  text-decoration: underline;
}
.tour-nav-secondary > a:last-child {
  text-align: right;
}
.tour-switcher {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tour-arrow {
  color: var(--blue);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.tour-arrow:hover {
  background: var(--blue-light);
}
.tour-arrow.disabled {
  color: #cbd5e1;
  pointer-events: none;
}
.deal-tooltip img {
  vertical-align: middle;
  width: 10px;
  height: 8px;
  margin-right: 1px;
}
table.protocol-results {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.protocol-results th {
  background: #f1f5f9;
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #cbd5e1;
}
table.protocol-results td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}
table.protocol-results td.left {
  text-align: left;
}
table.protocol-results a {
  color: var(--blue);
  text-decoration: none;
}
table.protocol-results a:hover {
  text-decoration: underline;
}
.tour-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 12px;
  align-items: start;
}
.block-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #0c479d;
  margin-bottom: 12px;
  margin: 0 0 8px;
}
table.rank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
table.rank-table thead th {
  background: var(--green-bg);
  color: #1a3a5c;
  font-weight: 600;
  padding: 9px 8px;
  border-bottom: 2px solid var(--blue);
  text-align: center;
  white-space: nowrap;
}
table.rank-table tbody td {
  padding: 3px 5px !important;
  border-bottom: 1px solid #e8e8e8 !important;
  vertical-align: middle;
  text-align: center;
  line-height: 1.25 !important;
  font-size: 12.5px !important;
}
table.rank-table tbody tr:nth-child(even) {
  background: #f8fafc;
}
table.rank-table tbody tr:hover {
  background: #e0f2fe;
}
table.rank-table tr.rank-1 {
  background: #fef9c3 !important;
}
table.rank-table tr.rank-2 {
  background: #f1f5f9 !important;
}
table.rank-table tr.rank-3 {
  background: #fff7ed !important;
}
table.rank-table .pair-cell {
  text-align: left !important;
  padding-left: 10px !important;
}
table.tour-table .pair-names a {
  color: #0c479d !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}
table.rank-table .pair-names a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}
.deal-tooltip table {
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 11px;
}
.deal-tooltip .north,
.deal-tooltip .south,
.deal-tooltip .east,
.deal-tooltip .west {
  background: palegreen !important;
}
table.tour-table,
table.rank-table {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
  table-layout: auto !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
  font-family: inherit !important;
  border-spacing: 0;
}
table.tour-table thead th,
table.rank-table thead th {
  background: #e8f5e9;
  color: #1a3a5c;
  font-weight: 600;
  padding: 5px 4px;
  border-bottom: 2px solid #0c479d;
  text-align: center;
  white-space: nowrap;
  font-size: 11.5px;
  line-height: 1.2;
  border-right: none !important;
  height: 26px;
  border-top: none !important;
  box-sizing: border-box;
}
table.tour-table tbody td,
table.rank-table tbody td {
  padding: 2px 5px !important;
  border-bottom: 1px solid #e5e7eb !important;
  vertical-align: middle !important;
  text-align: center !important;
  line-height: 1.2 !important;
  background: #ffffff !important;
  height: 26px !important;
  min-height: 0 !important;
  border-right: none !important;
  font-size: 12.5px !important;
  box-sizing: border-box !important;
  border-top: none !important;
  max-height: 26px !important;
}
table.tour-table tbody tr:hover td,
table.rank-table tbody tr:hover td {
  background: #e0f2fe;
}
table.rank-table tr.rank-1 td {
  background: #fef9c3;
}
table.rank-table tr.rank-2 td {
  background: #f1f5f9;
}
table.rank-table tr.rank-3 td {
  background: #fff7ed;
}
table.tour-table .pair-cell,
table.rank-table .pair-cell {
  text-align: left;
  padding-left: 6px;
  padding-right: 4px !important;
  white-space: normal !important;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 32px !important;
  max-height: none !important;
  line-height: 1.2;
}
table.rank-table .pair-num {
  width: 28px;
  min-width: 28px;
  font-style: italic;
  color: #64748b;
  font-weight: 500 !important;
}
table.rank-table td.num:first-child {
  width: 28px;
  min-width: 28px;
  font-weight: 600;
}
table.tour-table .score,
table.rank-table .score,
table.tour-table .num,
table.rank-table .num {
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  color: #0c479d !important;
  white-space: nowrap !important;
  width: 48px;
  min-width: 44px;
  padding-left: 2px !important;
  padding-right: 2px !important;
}
table.tour-table .pair-names,
table.rank-table .pair-names {
  display: block !important;
  line-height: 1.2 !important;
  overflow: hidden;
}
table.tour-table .pair-names a,
table.rank-table .pair-names a {
  color: #0c479d;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap !important;
  font-size: 12.5px;
}
table.tour-table .pair-names .sep,
table.rank-table .pair-names .sep {
  margin: 0 2px;
  color: #94a3b8;
}
table.tour-table tbody tr.table-b td.table-num {
  background-color: #c5cedb !important;
}
table.tour-table tbody tr.table-a td {
  background-color: #ffffff;
  background: #ffffff !important;
  border-top: none !important;
}
table.tour-table tbody tr.table-b td {
  background-color: #eef1f6;
  background: #f0f3f7 !important;
  border-top: none !important;
}
table.tour-table tbody tr.table-a:first-child td,
table.tour-table tbody tr.table-b + tr.table-a td {
  border-top: none !important;
}
table.tour-table tbody tr:first-child td {
  border-top: none !important;
}
table.tour-table tbody tr:hover td {
  background-color: #dbeafe !important;
  background: #e0f2fe !important;
}
table.tour-table tbody tr.table-a td.table-num {
  background-color: #d7dee8 !important;
}
.cross-layout {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  background: #fff;
  border: 1px solid #cbd5e1;
}
.cross-fixed {
  flex: 0 0 auto;
  background: #fff;
  z-index: 5;
  box-shadow: 4px 0 10px -2px rgba(0,0,0,0.12);
  border-right: 2px solid #94a3b8;
}
.cross-scroll {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
table.cross-left,
table.cross-right {
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
}
table.cross-left {
  width: auto;
}
table.cross-right {
  min-width: max-content;
  width: max-content;
}
table.cross-left th,
table.cross-right th {
  background: #e8f5e9;
  color: #1a3a5c;
  font-weight: 600;
  padding: 6px 5px;
  border-bottom: 2px solid #0c479d;
  border-right: 1px solid #cbd5e1;
  text-align: center;
  white-space: nowrap;
  height: 36px;
  box-sizing: border-box;
}
table.cross-left td,
table.cross-right td {
  padding: 4px 5px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  white-space: nowrap;
  height: 44px;
  box-sizing: border-box;
  vertical-align: middle;
  background: #fff;
}
table.cross-left tbody tr:nth-child(even) td,
table.cross-right tbody tr:nth-child(even) td {
  background: #f8fafc;
}
table.cross-left .rank-col {
  width: 40px;
  min-width: 40px;
  font-weight: 700;
}
table.cross-left .pair-col {
  text-align: left;
  min-width: 160px;
  max-width: 190px;
  padding-left: 8px;
  line-height: 1.25;
}
table.cross-left .pair-col a {
  color: #0c479d;
  text-decoration: none;
  font-weight: 500;
}
table.cross-left .pair-col a:hover {
  text-decoration: underline;
}
table.cross-left .num-col {
  width: 36px;
  min-width: 36px;
  background: #f1f5f9 !important;
  font-weight: 600;
  color: #475569;
}
table.cross-right .self {
  background: #3498db !important;
  color: #fff !important;
  font-size: 14px;
}
table.cross-right .res.win,
table.cross-right .res.win a {
  color: #16a34a;
  font-weight: 600;
}
table.cross-right .res.lose,
table.cross-right .res.lose a {
  color: #dc2626;
  font-weight: 600;
}
table.cross-right .res a {
  text-decoration: none;
}
table.cross-right .res a:hover {
  text-decoration: underline;
}
table.cross-left tbody tr.hl td,
table.cross-right tbody tr.hl td {
  background: #e0f2fe !important;
}
table.tour-table tbody tr.table-b + tr.table-a td {
  border-top: none !important;
}
table.tour-table td.table-num {
  width: 28px;
  min-width: 28px !important;
  font-size: 12.5px !important;
  font-weight: 600;
  color: #334155;
  vertical-align: middle;
  max-width: 32px !important;
  background: inherit !important;
  /* same as row, not a grey block */
  vertical-align: middle !important;
  box-shadow: none !important;
  border-right: none !important;
  text-align: center;
}
table.tour-table tr.table-a td.table-num {
  background: #ffffff !important;
}
table.tour-table tr.table-b td.table-num {
  background: #f0f3f7 !important;
}
table.rank-table tbody tr:nth-child(odd) td {
  background: #ffffff !important;
  background-color: #ffffff;
}
table.rank-table tbody tr:nth-child(even) td {
  background: #f0f3f7 !important;
  background-color: #eef1f6;
}
table.rank-table tbody tr:hover td {
  background: #e0f2fe !important;
  background-color: #dbeafe;
}
table.tour-table .score,
table.rank-table .score,
table.rank-table .num,
table.tour-table .num {
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  color: #0c479d !important;
  white-space: nowrap !important;
}
table.cross-left th.pct-col,
table.cross-left td.pct-col {
  width: 52px !important;
  min-width: 52px !important;
  font-weight: 700 !important;
  color: #0c479d !important;
  background: #f0f9ff !important;
  font-variant-numeric: tabular-nums !important;
}
table.cross-left thead th.pct-col {
  background: #e8f5e9 !important;
  color: #1a3a5c !important;
}
table.cross-left tbody tr.hl td.pct-col {
  background: #e0f2fe !important;
}
table.cross-left tbody tr.hl-opp td,
table.cross-right tbody tr.hl-opp td {
  background: #fef3c7 !important;
}
table.tour-table tbody tr:hover td.table-num {
  background: #e0f2fe !important;
}
table.tour-table tbody tr td {
  border-top-width: 0 !important;
  box-shadow: none !important;
  border-top: none !important;
}
table.tour-table tbody tr.table-a td,
table.tour-table tbody tr.table-a td.table-num,
table.tour-table tbody tr.table-a td.pair-cell,
table.tour-table tbody tr.table-a td.score,
table.tour-table tbody tr.table-a td.num {
  background-color: #ffffff !important;
  border-top: none !important;
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-b td,
table.tour-table tbody tr.table-b td.table-num,
table.tour-table tbody tr.table-b td.pair-cell,
table.tour-table tbody tr.table-b td.score,
table.tour-table tbody tr.table-b td.num {
  background-color: #eef1f6 !important;
  border-top: none !important;
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-a:hover td,
table.tour-table tbody tr.table-a:hover td.table-num,
table.tour-table tbody tr.table-b:hover td,
table.tour-table tbody tr.table-b:hover td.table-num {
  background-color: #e0f2fe !important;
}
table.tour-table tbody tr.table-a td,
table.tour-table tbody tr.table-b td {
  border-top: none !important;
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-a td.table-num,
table.tour-table tbody tr.table-b td.table-num {
  border-top: 1px solid #64748b !important;
}
table.tour-table tbody tr:has(td.table-num) td {
  border-top: 1px solid #64748b !important;
}
table.tour-table tbody tr.table-start td {
  border-top: 1px solid #64748b !important;
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-start:first-child td,
table.tour-table tbody tr:first-child.table-start td {
  border-top: none !important;
}
table.tour-table tbody tr.table-a > td {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-b > td {
  background: #eef1f6 !important;
  background-color: #eef1f6 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}
table.tour-table tbody td.table-num {
  background: inherit !important;
  font-weight: 600 !important;
  color: #334155 !important;
  width: 28px !important;
  box-shadow: none !important;
  border: none !important;
  border-bottom: 1px solid #e8e8e8 !important;
  vertical-align: middle !important;
  text-align: center !important;
}
table.tour-table tbody tr.table-a > td.table-num {
  background: #ffffff !important;
}
table.tour-table tbody tr.table-b > td.table-num {
  background: #eef1f6 !important;
}
table.tour-table tbody tr.table-end > td {
  border-bottom: 1px solid #475569 !important;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-start > td {
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}
table.tour-table tbody tr:hover > td {
  background: #e0f2fe !important;
}
table.rank-table tbody tr:nth-child(odd) > td {
  background: #ffffff !important;
}
table.rank-table tbody tr:nth-child(even) > td {
  background: #eef1f6 !important;
}
table.rank-table tbody tr:hover > td {
  background: #e0f2fe !important;
}
table.tour-table tr.table-a > td.table-num {
  background-color: #ffffff !important;
}
table.tour-table tr.table-b > td.table-num {
  background-color: #eef1f6 !important;
}
table.tour-table tbody tr.table-end {
  box-shadow: none !important;
}
table.tour-table tbody tr.table-start > td.table-num {
  border-bottom: 1px solid #475569 !important;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-end > td,
table.tour-table tbody tr.table-start > td,
table.tour-table tbody tr.table-start > td.table-num,
table.tour-table tbody tr.table-a > td,
table.tour-table tbody tr.table-b > td {
  box-shadow: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}
table.tour-table tbody tr.table-start > td:not(.table-num) {
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-end td,
table.tour-table tbody tr.table-start td,
table.tour-table tbody tr.table-start td.table-num,
table.tour-table tbody tr.table-a td,
table.tour-table tbody tr.table-b td {
  box-shadow: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}
table.tour-table tbody tr.table-end td {
  border-bottom: none !important;
}
table.tour-table tbody tr.table-start td.table-num {
  border-bottom: 1px solid #e5e7eb !important;
}
table.tour-table tbody tr.table-a td,
table.tour-table tbody tr.table-b td,
table.rank-table tbody td {
  padding: 2px 5px;
  line-height: 1.2;
  height: 24px;
  box-sizing: border-box;
  vertical-align: middle;
  text-align: center;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12.5px;
  box-shadow: none;
}
table.tour-table tr.table-end td {
  border-bottom: 1px solid #475569;
  box-shadow: 0 1px 0 0 #64748b !important;
}
table.tour-table tr.table-start td {
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}
table.tour-table tr.table-start td.table-num {
  border-bottom: 1px solid #475569;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-end.table-a > td,
table.tour-table tbody tr.table-end.table-b > td {
  border-bottom: 1px solid #475569 !important;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-start.table-a > td.table-num,
table.tour-table tbody tr.table-start.table-b > td.table-num {
  border-bottom: 1px solid #475569 !important;
  box-shadow: none !important;
}
table.tour-table tbody tr.table-start.table-a > td:not(.table-num),
table.tour-table tbody tr.table-start.table-b > td:not(.table-num) {
  border-bottom: 1px solid #e5e7eb !important;
}
table.results th.col-player {
  text-align: left;
  padding-left: 8px;
  white-space: nowrap;
}
.player-tip {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 8px;
  max-width: 320px;
  pointer-events: none;
  font-size: 13px;
  color: #1e293b;
}
.player-tip[hidden] {
  display: none !important;
}
.player-tip .tip-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.player-tip .tip-foto {
  width: 54px;
  /* 9 units */
  height: 78px;
  ratio 9: 13 */
  object-fit: contain;
  /* no crop */
  object-position: center top;
  border-radius: 4px;
  background: #e2e8f0;
  flex-shrink: 0;
}
.player-tip .tip-info {
  min-width: 0;
}
.player-tip .tip-name {
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.25;
}
.player-tip .tip-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}
table.results th.col-players {
  text-align: left;
  padding-left: 8px;
  min-width: 200px;
}
table.results th.col-players .players-head-desktop {
  display: inline-block;
  width: 50%;
  box-sizing: border-box;
  padding-right: 8px;
}
table.results th.col-players .players-head-mobile {
  display: none;
}
table.results td.players-cell {
  text-align: left;
  padding: 2px 6px !important;
  vertical-align: middle;
}
table.results .players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  align-items: center;
}
table.results .players-grid a.player-link {
  color: #0c479d;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.results .players-grid a.player-link:hover {
  text-decoration: underline;
}
.player-tip .tip-open {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0c479d;
  text-decoration: none;
}
.player-tip .tip-open:hover {
  text-decoration: underline;
}
.deal-tooltip .north,
.deal-tooltip .east,
.deal-tooltip .south,
.deal-tooltip .west {
  font-weight: 700;
}
.deal-tooltip td.north,
.deal-tooltip .north {
  background: #98fb98 !important;
  /* palegreen */
  border-radius: 10px 10px 0 0;
  padding: 1px 8px !important;
  background-color: #98fb98;
  overridden by bgcolor attr */
  border-radius: 10px 10px 0 0 !important;
  line-height: 1.1 !important;
  height: auto !important;
  border-radius: 11px 11px 0 0 !important;
}
.deal-tooltip td.south,
.deal-tooltip .south {
  background: #98fb98 !important;
  border-radius: 0 0 11px 11px !important;
  padding: 1px 8px !important;
  background-color: #98fb98;
  line-height: 1.1 !important;
}
.deal-tooltip td.west,
.deal-tooltip .west {
  background: #98fb98 !important;
  border-radius: 11px 0 0 11px !important;
  padding: 4px 3px !important;
  background-color: #98fb98;
  line-height: 1.1 !important;
  width: 1.2em !important;
  max-width: 1.4em !important;
  font-size: 11px !important;
}
.deal-tooltip td.east,
.deal-tooltip .east {
  background: #98fb98 !important;
  border-radius: 0 11px 11px 0 !important;
  padding: 4px 3px !important;
  background-color: #98fb98;
  line-height: 1.1 !important;
  width: 1.2em !important;
  max-width: 1.4em !important;
  font-size: 11px !important;
}
.deal-tooltip td.north font,
.deal-tooltip td.south font,
.deal-tooltip td.east font,
.deal-tooltip td.west font {
  color: #000 !important;
}
.deal-tooltip td[bgcolor="palegreen"],
.deal-tooltip td[bgcolor=palegreen] {
  background-color: #98fb98 !important;
}
.deal-tooltip td[bgcolor="tomato"],
.deal-tooltip td[bgcolor=tomato] {
  background-color: #ff6347 !important;
}
table.history td.contract {
  padding: 2px 4px !important;
  vertical-align: middle !important;
}
table.history .contract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px !important;
  min-width: 0 !important;
}
table.history .contract-bid {
  font-weight: 600;
  white-space: nowrap;
  flex: 1 1 auto;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.history .contract-decl {
  font-weight: 600;
  width: 1.2em;
  text-align: center;
  flex: 0 0 auto;
}
table.history .bbo-btn {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto;
  line-height: 0 !important;
  border: 1px solid #4CAF50 !important;
  background: #ddffdd !important;
  padding: 1px 1px !important;
  justify-content: center !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  box-shadow: none !important;
  color: #0c479d !important;
  cursor: pointer !important;
}
table.history .bbo-btn img {
  display: block !important;
  width: 22px !important;
  height: 10px !important;
}
.deal-tooltip td.north,
.deal-tooltip .north,
.deal-tooltip td.south,
.deal-tooltip .south {
  padding: 3px 10px !important;
  min-width: 1.6em;
  text-align: center !important;
}
.deal-tooltip td.west,
.deal-tooltip .west,
.deal-tooltip td.east,
.deal-tooltip .east {
  padding: 8px 4px !important;
  min-width: 1.4em;
  text-align: center !important;
  vertical-align: middle !important;
}
.deal-tooltip td.north,
.deal-tooltip td.south,
.deal-tooltip td.east,
.deal-tooltip td.west,
.deal-tooltip .north,
.deal-tooltip .south,
.deal-tooltip .east,
.deal-tooltip .west {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  padding: 0 !important;
  line-height: 22px !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}
.suit-s {
  color: #1a1a1a !important;
}
.suit-h {
  color: #c41e3a !important;
}
.suit-d {
  color: #e67e22 !important;
}
.suit-c {
  color: #6b7280 !important;
}
table.history .suit-s {
  color: #1a1a1a !important;
}
table.history .suit-h {
  color: #c41e3a !important;
}
table.history .suit-d {
  color: #e67e22 !important;
}
table.history .suit-c {
  color: #6b7280 !important;
}
table.history .bbo-btn:hover {
  background: #aaffaa !important;
  box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19) !important;
}
.deal-tooltip .north,
.deal-tooltip td.north {
  border-radius: 45% 45% 5% 5% !important;
}
.deal-tooltip .south,
.deal-tooltip td.south {
  border-radius: 5% 5% 45% 45% !important;
}
.deal-tooltip .west,
.deal-tooltip td.west {
  border-radius: 45% 5% 5% 45% !important;
}
.deal-tooltip .east,
.deal-tooltip td.east {
  border-radius: 5% 45% 45% 5% !important;
}
table.history a.player-link {
  color: #0c479d;
  text-decoration: none;
  font-weight: 500;
  display: block;
  line-height: 1.25;
}
table.history a.player-link:hover {
  text-decoration: underline;
}
table.history td.opponent {
  line-height: 1.3;
  text-align: left !important;
  vertical-align: middle !important;
  padding: 2px 6px !important;
}
table.history .opp-block {
  display: flex;
  align-items: center;
  gap: 8px;
}
table.history .opp-hist {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #0c479d;
  flex: 0 0 auto;
  min-width: 32px;
  line-height: 1.1;
}
table.history .opp-hist img {
  display: block;
  width: 28px;
  height: 28px;
}
table.history .opp-pair-num {
  font-size: 11px;
  font-weight: 600;
  color: #0c479d;
}
table.history .opp-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 1px;
  min-width: 0;
}
table.history .opp-names a.player-link {
  display: block;
  text-align: left !important;
  white-space: nowrap;
}
table.history thead th.running-group {
  background: #e8f5e9 !important;
  border-left: 1px solid #0c479d !important;
  text-align: center !important;
  font-weight: 700 !important;
  color: #0c479d !important;
  border-bottom: none !important;
  border-right: none !important;
}
table.history thead th.running-col {
  background: #e8f5e9 !important;
  border-left: 1px solid #93c5fd !important;
  border-top: none !important;
  font-size: 11px !important;
  color: #0c479d !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #0c479d !important;
}
table.history thead th.running-col:first-of-type,
table.history thead tr:last-child th.running-col:first-child {
  border-left: 2px solid #0c479d !important;
}
table.history tbody td.running {
  background: inherit !important;
  border-left: 1px solid #e2e8f0 !important;
  font-weight: 600 !important;
}
table.history tbody td.running:first-of-type,
table.history tbody tr td.running:nth-last-child(3) {
  border-left: 2px solid #0c479d !important;
}
table.history thead th.running-col:first-child {
  border-left: 2px solid #0c479d !important;
}
table.history tbody tr td.running:nth-last-child(3) {
  border-left: 2px solid #0c479d !important;
}
table.history tbody tr.round-hover td {
  background-color: #dbeafe !important;
}
table.history tbody tr.round-hover td.running {
  background-color: #dbeafe !important;
}
.th-short, .pos-short {
  display: none;
}
.th-full, .pos-full {
  display: inline;
}
table.history td.contract,
table.history th:nth-child(5) {
  max-width: 88px;
  width: 88px;
}
table.history .th-short,
table.history .pos-short {
  display: none !important;
}
table.history .th-full,
table.history .pos-full {
  display: inline !important;
}
table.history thead th.running-col:first-child,
table.history thead tr:last-child th.running-col:first-child {
  border-left: 1px solid #0c479d !important;
}
table.history tbody tr td.running:nth-last-child(3),
table.history tbody td.running.col-mps-run {
  border-left: 1px solid #0c479d !important;
}
.protocol-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1140px;
  margin: 0 auto 12px;
  padding: 0 12px;
  flex-wrap: wrap;
}
.board-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.board-nav-label {
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
  font-size: 14px;
}
.board-nav-btn, .board-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #4CAF50;
  background: #f4f4f4;
  color: #0c479d;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.board-nav-btn:hover, .board-nav-arrow:hover {
  background: #e0e0e0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.board-nav-btn.active {
  background: #008000;
  color: #fff;
  border-color: #006600;
}
.board-nav-arrow.disabled {
  opacity: 0.35;
  pointer-events: none;
}
.protocol-layout {
  display: flex !important;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 20px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 12px 24px;
  align-items: flex-start;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}
.protocol-deal {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  flex: 0 0 320px;
  overflow-x: auto;
}
.protocol-deal table.deal {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px;
  font-family: Verdana, Arial, sans-serif;
  max-width: 100%;
  margin: 0 auto;
  border-spacing: 2px !important;
  table-layout: auto !important;
}
.protocol-deal table.deal td {
  border: none !important;
  padding: 1px 3px !important;
  vertical-align: middle !important;
  background: transparent !important;
}
.protocol-deal .north {
  background: #98fb98;
  border-radius: 45% 45% 5% 5%;
  text-align: center;
  font-weight: 700;
}
.protocol-deal .south {
  background: #98fb98;
  border-radius: 5% 5% 45% 45%;
  text-align: center;
  font-weight: 700;
}
.protocol-deal .west {
  background: #98fb98;
  border-radius: 45% 5% 5% 45%;
  text-align: center;
  font-weight: 700;
}
.protocol-deal .east {
  background: #98fb98;
  border-radius: 5% 45% 45% 5%;
  text-align: center;
  font-weight: 700;
}
.protocol-deal td[bgcolor="tomato"],
.protocol-deal td[bgcolor=tomato] {
  background-color: #ff6347 !important;
}
.protocol-deal td[bgcolor="palegreen"],
.protocol-deal td[bgcolor=palegreen] {
  background-color: #98fb98 !important;
}
table.protocol {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
}
table.protocol thead th {
  background: #e8f5e9;
  color: #0c479d;
  font-weight: 600;
  font-size: 11.5px;
  padding: 5px 4px;
  border-bottom: 2px solid #0c479d;
  text-align: center;
  white-space: nowrap;
}
table.protocol tbody td {
  padding: 3px 5px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
table.protocol tbody tr.odd td {
  background: #fff;
}
table.protocol tbody tr.even td {
  background: #f4f4f4;
}
table.protocol tbody tr:hover td {
  background: #dbeafe !important;
}
table.protocol .pair-cell {
  text-align: left;
  padding-left: 6px;
}
table.protocol .pair-num-link {
  display: none;
  font-weight: 700;
  color: #0c479d;
  text-decoration: none;
}
table.protocol .pair-names-full {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}
table.protocol .pair-name-line {
  color: #0c479d;
  font-weight: 500;
}
table.protocol .contract {
  white-space: nowrap;
}
table.protocol .score-plus {
  color: #0c479d !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
table.protocol .score-minus {
  color: #b91c1c !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
table.protocol thead tr:last-child th,
table.protocol td.pct {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  white-space: nowrap;
}
table.protocol .pct {
  font-weight: 600;
  line-height: 1.2;
}
a.board-nav-btn:hover, a.board-nav-arrow:hover {
  background: #e0e0e0;
}
.protocol-results {
  flex: 1 1 auto;
  min-width: 0;
}
.protocol-deal table.deal img {
  vertical-align: middle;
  margin-right: 1px;
}
.protocol-deal table.deal .north,
.protocol-deal table.deal .south,
.protocol-deal table.deal .east,
.protocol-deal table.deal .west {
  display: inline-block;
  width: 22px !important;
  height: 22px !important;
  line-height: 22px !important;
  padding: 0 !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  box-sizing: border-box !important;
}
.protocol-deal table.deal .north {
  border-radius: 45% 45% 5% 5%;
}
.protocol-deal table.deal .south {
  border-radius: 5% 5% 45% 45%;
}
.protocol-deal table.deal .west {
  border-radius: 45% 5% 5% 45%;
}
.protocol-deal table.deal .east {
  border-radius: 5% 45% 45% 5%;
}
.protocol-deal table.deal td[bgcolor="palegreen"],
.protocol-deal table.deal td[bgcolor=palegreen],
.protocol-deal table.deal .north,
.protocol-deal table.deal .south {
  background-color: #98fb98 !important;
}
.protocol-deal table.deal td[bgcolor="tomato"],
.protocol-deal table.deal td[bgcolor=tomato] {
  background-color: #ff6347 !important;
}
.protocol-deal table.deal .east[bgcolor="tomato"],
.protocol-deal table.deal .west[bgcolor="tomato"],
.protocol-deal table.deal .north[bgcolor="tomato"],
.protocol-deal table.deal .south[bgcolor="tomato"] {
  background-color: #ff6347 !important;
}
table.protocol .pct-val {
  display: block;
  font-weight: 700;
  color: #0c479d;
}
table.protocol .mp-under {
  display: block;
  font-size: 10px;
  color: #64748b;
  font-weight: 400;
}
table.protocol .pair-names-full a.pair-name-line {
  color: #0c479d;
  text-decoration: none;
  font-weight: 500;
}
table.protocol .pair-names-full a.pair-name-line:hover {
  text-decoration: underline;
}
.protocol-deal button {
  color: #0c479d;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #4CAF50;
  padding: 1px 4px;
  background: #ddffdd;
  cursor: pointer;
}
.protocol-deal button:hover {
  background: #aaffaa;
}
table.protocol td.contract {
  padding: 2px 4px !important;
  vertical-align: middle !important;
}
table.protocol .contract-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  min-width: 0 !important;
}
table.protocol .contract-bid {
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex: 1 1 auto !important;
  text-align: left !important;
}
table.protocol .contract-decl {
  font-weight: 600 !important;
  width: 1.2em !important;
  text-align: center !important;
  flex: 0 0 auto !important;
}
table.protocol .bbo-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ddffdd !important;
  border: 1px solid #4CAF50 !important;
  border-radius: 8px !important;
  padding: 1px 1px !important;
  line-height: 0 !important;
  text-decoration: none !important;
  flex: 0 0 auto !important;
  cursor: pointer !important;
}
table.protocol .bbo-btn:hover {
  background: #aaffaa !important;
  box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19) !important;
}
table.protocol .bbo-btn img {
  display: block !important;
  width: 22px !important;
  height: 10px !important;
}
table.protocol .contract-bid .suit-s,
table.protocol .contract-bid .suit-h,
table.protocol .contract-bid .suit-d,
table.protocol .contract-bid .suit-c,
table.history .contract-bid .suit-s,
table.history .contract-bid .suit-h,
table.history .contract-bid .suit-d,
table.history .contract-bid .suit-c {
  display: inline !important;
  width: auto !important;
  text-align: center;
  margin: 0 !important;
  font-size: 1em !important;
  line-height: 1;
  padding: 0 !important;
}
table.protocol td.score-plus,
table.protocol td.score-minus,
table.protocol td.score-other,
table.history td.score-plus,
table.history td.score-minus,
table.history td.score-other {
  font-weight: 700 !important;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
  min-width: 5.5em !important;
  width: 5.5em !important;
  box-sizing: border-box !important;
  max-width: 6.5em !important;
}
table.protocol td.score-plus,
table.history td.score-plus {
  color: #16a34a !important;
  /* green */
  text-align: left !important;
  padding-left: 4px !important;
  text-align: left !important;
  padding-right: 4px !important;
}
table.protocol td.score-minus,
table.history td.score-minus {
  color: #dc2626 !important;
  /* red */
  text-align: right !important;
  padding-right: 4px !important;
  text-align: right !important;
  padding-left: 4px !important;
}
table.protocol td.score-other,
table.history td.score-other {
  color: #475569 !important;
  text-align: center !important;
}
table.protocol .contract-row,
table.history .contract-row {
  display: grid !important;
  align-items: center !important;
  gap: 4px !important;
  justify-content: flex-start !important;
  min-width: 96px !important;
  line-height: 1.2 !important;
  grid-template-columns: 1fr auto 1fr !important;
  justify-items: center !important;
  width: 100% !important;
}
table.protocol .contract-bid,
table.history .contract-bid {
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  margin-right: 0 !important;
  letter-spacing: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  line-height: 1.2 !important;
  justify-self: start !important;
  text-align: left !important;
  margin: 0 !important;
}
table.protocol .contract-decl,
table.history .contract-decl {
  font-weight: 600 !important;
  flex: 0 0 auto !important;
  margin-left: 3px !important;
  text-align: center !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1.2 !important;
  height: 1.2em !important;
  justify-self: center !important;
  justify-content: center !important;
  margin: 0 !important;
  min-width: 1.1em !important;
}
table.protocol .bbo-btn,
table.history .bbo-btn {
  margin-left: auto !important;
  justify-self: end !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
table.protocol .contract-bid img,
table.history .contract-bid img {
  vertical-align: middle !important;
  margin: 0 1px !important;
}
.protocol-deal table.deal .north,
.protocol-deal table.deal .south,
.protocol-deal table.deal .east,
.protocol-deal table.deal .west,
.protocol-deal table.deal td.north,
.protocol-deal table.deal td.south,
.protocol-deal table.deal td.east,
.protocol-deal table.deal td.west {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  line-height: 28px !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
.protocol-deal table.deal .north,
.protocol-deal table.deal td.north {
  border-radius: 45% 45% 5% 5% !important;
}
.protocol-deal table.deal .south,
.protocol-deal table.deal td.south {
  border-radius: 5% 5% 45% 45% !important;
}
.protocol-deal table.deal .west,
.protocol-deal table.deal td.west {
  border-radius: 45% 5% 5% 45% !important;
}
.protocol-deal table.deal .east,
.protocol-deal table.deal td.east {
  border-radius: 5% 45% 45% 5% !important;
}
.protocol-deal table.deal td.north + td,
.protocol-deal table.deal tr td[align=center]:not(.north):not(.south):not(.east):not(.west) {
  text-align: center !important;
  vertical-align: middle !important;
}
.protocol-deal table.deal table.deal {
  margin: 0 auto !important;
}
.protocol-deal table.deal table.deal td {
  text-align: center !important;
  vertical-align: middle !important;
}
.protocol-deal table.deal table.deal font {
  line-height: 1 !important;
}
.protocol-deal table.deal table.deal tr td:not([bgcolor]):not(.north):not(.south):not(.east):not(.west) {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  text-align: center !important;
  vertical-align: middle !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0c479d !important;
}
table.protocol td.contract,
table.history td.contract {
  min-width: 100px !important;
  padding: 2px 4px !important;
  vertical-align: middle !important;
}
table.protocol th:nth-child(2),
table.protocol th:nth-child(3),
table.protocol td.pair-cell {
  max-width: 160px !important;
  width: 140px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
  min-width: 120px !important;
}
table.protocol td.contract,
table.protocol th:nth-child(4) {
  max-width: 92px !important;
  width: 88px !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
}
table.protocol td.score-plus,
table.protocol td.score-minus,
table.protocol td.score-other {
  min-width: 6.5em !important;
  width: 6.5em !important;
  max-width: 7.5em !important;
}
table.protocol thead tr:first-child th[colspan] {
  border-bottom: none !important;
}
table.protocol thead tr:last-child th {
  border-top: none !important;
  border-bottom: 2px solid #0c479d !important;
}
.pair-name-popup {
  display: none;
  position: absolute;
  z-index: 1000;
  background: #ffffff;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
}
.pair-name-popup.visible {
  display: block;
}
.pair-name-popup a {
  display: block;
  color: var(--blue);
  text-decoration: none;
}
.pair-name-popup a:hover,
.pair-name-popup a:active {
  text-decoration: underline;
}
.round-switcher,
.board-switcher {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}
.view-toggle {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.view-toggle:hover {
  background: var(--blue-light);
}
table.tour-table tr.table-start td:not(.table-num) {
  border-bottom: 1px solid #e5e7eb;
}
table.tour-table .score,
table.rank-table .score,
table.rank-table .num {
  font-weight: 700;
  color: #0c479d;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.deal-minimax {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  text-align: center;
  color: #334155;
}
.deal-actions {
  margin-top: 8px;
  text-align: center;
}
.deal-open-btn {
  display: inline-block;
  padding: 6px 12px;
  background: #0c479d;
  color: #fff !important;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 600;
}
.deal-box {
  font-family: Verdana, Arial, sans-serif;
  font-size: 12px;
  min-width: 200px;
  display: block;
  flex-direction: column;
  align-items: center;
}
.deal-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #334155;
  width: 100%;
  max-width: 280px;
}
.deal-grid {
  display: grid !important;
  grid-template-columns: minmax(70px, auto) auto minmax(70px, auto) !important;
  grid-template-rows: auto auto auto !important;
  gap: 4px 10px !important;
  align-items: center !important;
  justify-items: center !important;
  flex-direction: column !important;
}
.deal-N {
  grid-column: 2;
  grid-row: 1;
}
.deal-W {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
}
.deal-compass {
  grid-column: 2;
  grid-row: 2;
  display: grid !important;
  grid-template-columns: 28px 28px 28px !important;
  grid-template-rows: 28px 28px 28px !important;
  gap: 0 !important;
  align-items: center !important;
  justify-items: center !important;
  flex-direction: column !important;
  justify-content: center !important;
  width: auto !important;
}
.deal-E {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
}
.deal-S {
  grid-column: 2;
  grid-row: 3;
}
.deal-hand {
  text-align: left;
  line-height: 1.35;
}
.dh-line {
  white-space: nowrap;
}
.cmp {
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  box-sizing: border-box;
}
.cmp.north {
  grid-column: 2;
  grid-row: 1;
  border-radius: 45% 45% 5% 5%;
}
.cmp.south {
  grid-column: 2;
  grid-row: 3;
  border-radius: 5% 5% 45% 45%;
}
.cmp.west {
  grid-column: 1;
  grid-row: 2;
  border-radius: 45% 5% 5% 45%;
}
.cmp.east {
  grid-column: 3;
  grid-row: 2;
  border-radius: 5% 45% 45% 5%;
}
.cmp.board-num {
  grid-column: 2;
  grid-row: 2;
  color: #0c479d !important;
  font-size: 13px;
  background: transparent !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
.cmp.nv {
  background: #98fb98 !important;
  /* palegreen */
  color: #000 !important;
}
.cmp.vul {
  background: #ff6347 !important;
  /* tomato / red zone */
  color: #000 !important;
}
.protocol-deal .deal-box {
  margin: 0 auto;
}
.protocol-deal .cmp {
  width: 28px;
  height: 28px;
  line-height: 28px;
  font-size: 13px;
}
.protocol-deal .deal-compass {
  grid-template-columns: 32px 32px 32px !important;
  grid-template-rows: 32px 32px 32px !important;
  width: 96px !important;
}
.protocol-deal .deal-hand {
  font-size: 13px;
}
.deal-dd {
  margin-top: 8px;
}
.dd-table {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 11px;
  font-family: Verdana, Arial, sans-serif;
  table-layout: fixed;
}
.dd-table th, .dd-table td {
  padding: 1px 3px;
  text-align: center;
  border: none;
  font-size: 12px;
}
.dd-table .dd-head th {
  background: transparent !important;
  border: none !important;
  border-radius: 3px;
  font-weight: 600;
  color: #000;
  padding: 1px 3px;
}
.dd-table .dd-gap {
  width: 8px !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-width: 8px !important;
}
.dd-table th:first-child {
  font-weight: 700;
  color: #0c479d;
}
.deal-hand .dh-line {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1.35;
  font-family: Verdana, Arial, sans-serif;
  font-size: 13px;
}
.deal-hand .dh-suit {
  display: inline-block;
  width: 1.35em;
  min-width: 1.35em;
  text-align: center;
  flex: 0 0 1.35em;
  font-size: 15px;
  line-height: 1.35 !important;
}
.deal-hand .dh-cards {
  font-family: Verdana, Arial, sans-serif;
  letter-spacing: 0.02em;
}
.cmp.dealer {
  font-weight: 700 !important;
  text-decoration: underline !important;
}
.protocol-deal .deal-hand .dh-line {
  font-size: 14px !important;
}
.protocol-deal .deal-hand .dh-suit {
  width: 1.4em !important;
  min-width: 1.4em !important;
  flex-basis: 1.15em;
  font-size: 17px !important;
}
.deal-compass .cmp.north {
  grid-column: 2 !important;
  grid-row: 1 !important;
  border-radius: 45% 45% 5% 5% !important;
}
.deal-compass .cmp.west {
  grid-column: 1 !important;
  grid-row: 2 !important;
  border-radius: 45% 5% 5% 45% !important;
}
.deal-compass .cmp.board-num {
  grid-column: 2 !important;
  grid-row: 2 !important;
  background: transparent !important;
  color: darkblue !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  text-decoration: none !important;
  border-radius: 0 !important;
  line-height: 28px !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.deal-compass .cmp.east {
  grid-column: 3 !important;
  grid-row: 2 !important;
  border-radius: 5% 45% 45% 5% !important;
}
.deal-compass .cmp.south {
  grid-column: 2 !important;
  grid-row: 3 !important;
  border-radius: 5% 5% 45% 45% !important;
}
.deal-compass .cmp {
  width: 28px !important;
  height: 28px !important;
  line-height: 1 !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
.deal-compass .cmp.nv {
  background: #98fb98 !important;
  color: #000 !important;
}
.deal-compass .cmp.vul {
  background: #ff6347 !important;
  color: #000 !important;
}
.deal-compass .cmp.dealer {
  font-weight: 700 !important;
  text-decoration: underline !important;
}
.deal-minimax .bbo-btn {
  vertical-align: middle;
  margin-left: 6px;
}
.deal-tooltip .deal-box {
  min-width: 0 !important;
  font-size: 11px !important;
}
.deal-tooltip .deal-grid {
  gap: 2px 6px !important;
  grid-template-columns: minmax(56px, auto) auto minmax(56px, auto) !important;
}
.deal-tooltip .deal-hand .dh-line {
  font-size: 11px !important;
  line-height: 1.2 !important;
}
.deal-tooltip .deal-hand .dh-suit {
  width: 1.25em !important;
  min-width: 1.25em !important;
  font-size: 14px !important;
}
.deal-tooltip .deal-compass {
  grid-template-columns: 24px 24px 24px !important;
  grid-template-rows: 24px 24px 24px !important;
  gap: 0 !important;
  display: grid !important;
  align-items: center !important;
  justify-items: center !important;
  width: 72px !important;
}
.deal-tooltip .deal-compass .cmp {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  font-size: 11px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
}
.deal-tooltip .deal-compass .cmp.board-num {
  font-size: 12px !important;
  line-height: 24px !important;
  width: 24px !important;
  height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 !important;
}
.deal-tooltip .deal-dd {
  margin-top: 4px !important;
}
.deal-tooltip .dd-table {
  font-size: 10px !important;
}
.deal-tooltip .dd-table th,
.deal-tooltip .dd-table td {
  padding: 0 2px !important;
}
.deal-tooltip .deal-minimax {
  margin-top: 4px !important;
  font-size: 10px !important;
}
.deal-tooltip .deal-minimax .bbo-btn {
  display: none !important;
}
.deal-tooltip .deal-actions {
  margin-top: 6px !important;
}
.dd-table .dd-val {
  width: 1.35em !important;
  min-width: 1.35em !important;
  max-width: 1.5em !important;
  text-align: center !important;
  padding: 1px 1px !important;
  box-sizing: border-box !important;
  font-size: 11px !important;
}
.dd-table .dd-seat {
  width: 1.1em !important;
  min-width: 1.1em !important;
  text-align: center !important;
  padding: 1px 1px !important;
  font-weight: 700;
  color: #0c479d;
  font-size: 11px !important;
}
tr.cross-hl td,
th.cross-hl,
td.cross-hl,
.cross-left tr.cross-hl td {
  background-color: #dbeafe !important;
}
tr.cross-hl-opp td,
th.cross-hl-opp,
td.cross-hl-opp {
  background-color: #ffedd5 !important;
}
.protocol-deal .deal-compass .cmp {
  width: 32px !important;
  height: 32px !important;
  line-height: 34px !important;
  font-size: 14px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}
.protocol-deal .deal-compass .cmp.board-num {
  font-size: 17px !important;
  line-height: 34px !important;
}
.deal-compass .cmp.north,
.deal-compass .cmp.south,
.deal-compass .cmp.east,
.deal-compass .cmp.west {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  aspect-ratio: 1 / 1 !important;
  line-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-weight: 600 !important;
}
.protocol-deal .deal-compass .cmp.north,
.protocol-deal .deal-compass .cmp.south,
.protocol-deal .deal-compass .cmp.east,
.protocol-deal .deal-compass .cmp.west,
.protocol-deal .deal-compass .cmp.board-num {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  line-height: 32px !important;
  font-size: 14px !important;
}
.deal-tooltip .deal-compass .cmp.north,
.deal-tooltip .deal-compass .cmp.south,
.deal-tooltip .deal-compass .cmp.east,
.deal-tooltip .deal-compass .cmp.west,
.deal-tooltip .deal-compass .cmp.board-num {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  line-height: 24px !important;
  font-size: 11px !important;
}
.deal-tooltip .deal-compass .cmp.north,
.deal-tooltip .deal-compass .cmp.south,
.deal-tooltip .deal-compass .cmp.east,
.deal-tooltip .deal-compass .cmp.west {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  aspect-ratio: 1 / 1 !important;
  line-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-size: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.deal-tooltip .deal-compass .cmp.north {
  border-radius: 45% 45% 5% 5% !important;
}
.deal-tooltip .deal-compass .cmp.south {
  border-radius: 5% 5% 45% 45% !important;
}
.deal-tooltip .deal-compass .cmp.west {
  border-radius: 45% 5% 5% 45% !important;
}
.deal-tooltip .deal-compass .cmp.east {
  border-radius: 5% 45% 45% 5% !important;
}
.deal-N, .deal-S {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.deal-W, .deal-E {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.protocol-deal .deal-dd {
  margin-top: 10px;
}
.protocol-deal .dd-table {
  font-size: 14px !important;
  border-collapse: collapse !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}
.protocol-deal .dd-table th,
.protocol-deal .dd-table td {
  border: none !important;
  outline: none !important;
  font-size: 14px !important;
  padding: 2px 4px !important;
}
.protocol-deal .dd-table .dd-val {
  width: 1.6em !important;
  min-width: 1.6em !important;
  max-width: 1.8em !important;
  font-size: 14px !important;
}
.protocol-deal .dd-table .dd-seat {
  width: 1.3em !important;
  font-size: 14px !important;
  font-weight: 700;
  border-left: none !important;
}
.protocol-deal .dd-table .dd-head th {
  background: transparent !important;
  border: none !important;
  font-size: 13px !important;
  border-top: none !important;
}
.protocol-deal .dd-table .dd-gap {
  width: 10px !important;
  min-width: 10px !important;
  max-width: 14px !important;
  padding: 0 !important;
  border: none !important;
  border-left: none !important;
  background: transparent !important;
  border-right: none !important;
  border-bottom: none !important;
}
.protocol-deal .dd-table .dd-val,
.protocol-deal .dd-table .dd-seat {
  border-right: 1px dotted rgba(12, 71, 157, 0.18) !important;
  border-bottom: 1px dotted rgba(12, 71, 157, 0.18) !important;
}
.protocol-deal .dd-table tr td.dd-val:last-of-type,
.protocol-deal .dd-table tr th.dd-val:last-of-type {
}
.protocol-deal .dd-table tr:first-child th {
  border-top: none !important;
}
.protocol-deal .dd-table tr:last-child .dd-val,
.protocol-deal .dd-table tr:last-child .dd-seat {
  border-bottom: none !important;
}
@media (max-width: 768px) {
  .tour-nav {
    flex-direction: column;
    gap: 14px;
  }
  .rounds {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
  }
  .rounds-label {
    flex-shrink: 0;
  }
  table.results {
    font-size: 13px;
    min-width: 0;
  }
  table.results thead th,
  table.results tbody td {
    padding: 7px 7px;
  }
  .col-pair-num,
  .col-adj,
  .col-mb {
    display: none;
  }
  .pair-names {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
  }
  .pair-names .sep {
    display: none;
  }
  .pair-names a {
    display: block;
  }
  table.tour-table {
    max-width: 100%;
  }
  table.history {
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  .col-opp {
    display: none;
  }
}
@media (max-width: 900px) {
  .tour-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
@media (max-width: 1100px) {
  .tour-content {
    grid-template-columns: 1fr;
    max-width: 640px;
  }
}
@media (max-width: 600px) {
  table.tour-table .pair-names,
  table.rank-table .pair-names {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }
  table.tour-table .pair-names .sep,
  table.rank-table .pair-names .sep {
    display: none !important;
  }
  table.tour-table .pair-names a,
  table.rank-table .pair-names a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tour-content {
    grid-template-columns: 1fr !important;
    padding: 0 8px !important;
  }
  table.rank-table {
    font-size: 12px !important;
  }
}
@media (max-width: 960px) {
  .tour-content {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 24px !important;
  }
}
@media (max-width: 700px) {
  table.results th.col-player {
    white-space: normal;
    max-width: 120px;
  }
  table.results thead th.col-player:nth-of-type(3) {
  }
  table.results thead th.col-player + th.col-player {
    display: none;
  }
  table.results thead th.col-player:first-of-type,
  table.results thead th.col-player {
  }
  table.results thead tr th.col-player ~ th.col-player {
    display: none !important;
  }
  table.results tbody tr {
  }
  .player-tip {
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 12px !important;
    top: auto !important;
    max-width: none !important;
    width: auto !important;
    z-index: 10000 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2) !important;
    pointer-events: auto !important;
  }
  table.results th.col-players .players-head-desktop {
    display: none !important;
  }
  table.results th.col-players .players-head-mobile {
    display: inline !important;
  }
  table.results .players-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  table.results .players-grid a.player-link {
    white-space: nowrap !important;
    line-height: 1.2 !important;
    display: block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    font-size: 12px !important;
  }
  .table-wrapper {
    overflow-x: hidden !important;
  }
  table.results {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 12px !important;
  }
  table.results .col-pair-num,
  table.results .col-opp,
  table.results .col-adj,
  table.results th:nth-child(6),
  table.results td.mp {
    display: none !important;
  }
  table.results .col-mb {
    display: table-cell !important;
    width: 36px !important;
    padding: 2px 3px !important;
  }
  table.results th:first-child,
  table.results td.num:first-child {
    width: 28px !important;
    padding: 2px 2px !important;
  }
  table.results th.col-players,
  table.results td.players-cell {
    width: auto !important;
    max-width: none !important;
    padding: 2px 4px !important;
  }
  table.results .percent,
  table.results th:nth-child(4) {
    width: 48px !important;
    padding: 2px 2px !important;
  }
  table.results th:last-child,
  table.results td.num:last-child {
    width: 36px !important;
    padding: 2px 2px !important;
  }
  .cross-layout {
    max-width: 100vw !important;
    display: flex !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }
  .cross-fixed {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto !important;
    box-shadow: 2px 0 6px -2px rgba(0,0,0,0.12) !important;
    z-index: 2 !important;
    position: relative !important;
  }
  table.cross-left th.pct-col,
  table.cross-left td.pct-col {
    display: none !important;
  }
  table.cross-left th.rank-col,
  table.cross-left td.rank-col {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    padding: 1px 0 !important;
    font-size: 10px !important;
  }
  table.cross-left th.pair-col,
  table.cross-left td.pair-col {
    width: 120px !important;
    min-width: 100px !important;
    max-width: 130px !important;
    padding: 3px 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    overflow: hidden !important;
  }
  table.cross-left td.pair-col a {
    font-size: 11px !important;
    line-height: 1.2 !important;
    display: -webkit-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important;
    max-width: 100% !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }
  table.cross-left th.num-col,
  table.cross-left td.num-col {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    padding: 1px 0 !important;
    font-size: 10px !important;
  }
  table.cross-left {
    font-size: 11px !important;
    width: auto !important;
  }
  table.cross-left th,
  table.cross-left td {
    height: auto !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
  }
  table.cross-right {
    font-size: 11px !important;
  }
  table.cross-right th,
  table.cross-right td {
    padding: 1px 2px !important;
    min-width: 32px !important;
    height: auto !important;
    font-size: 10px !important;
  }
  .cross-scroll {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    /* critical: allow shrink so matrix scrolls */
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 1 !important;
  }
  table.cross-left th.rank-col,
  table.cross-left td.rank-col,
  table.cross-left th.num-col,
  table.cross-left td.num-col {
    width: 20px !important;
    min-width: 20px !important;
    max-width: 22px !important;
    padding: 3px 1px !important;
    font-size: 11px !important;
  }
  table.cross-left tbody td,
  table.cross-right tbody td {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
  }
  table.cross-left thead th,
  table.cross-right thead th {
    height: 28px !important;
    min-height: 28px !important;
    padding: 3px 2px !important;
    font-size: 10px !important;
    box-sizing: border-box !important;
  }
  table.cross-right tbody td,
  table.cross-right thead th {
    min-width: 34px !important;
    font-size: 11px !important;
  }
  table.history {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    font-size: 11px !important;
  }
  table.history th:nth-child(3),
  table.history td.opponent {
    display: none !important;
  }
  table.history td.opponent,
  table.history .opp-block {
    display: none !important;
  }
  table.history thead tr:first-child th:nth-child(3),
  table.history thead tr:first-child th:nth-child(6),
  table.history thead tr:first-child th:nth-child(9),
  table.history thead tr:first-child th:nth-child(11),
  table.history thead tr:first-child th:nth-child(12),
  table.history thead tr:first-child th:nth-child(13) {
    display: none !important;
  }
  table.history thead tr:last-child th.running-col:first-child {
    display: none !important;
  }
  table.history tbody td.opponent {
    display: none !important;
  }
  table.history tbody tr td.round-num ~ td:nth-child(6),  /* lead - unreliable */
  table.history tbody tr:not(:has(td.round-num)) {
  }
  table.history tbody td.mp {
    display: none !important;
  }
  table.history tbody tr:has(td.round-num) > td:nth-child(6),   /* Lead */
  table.history tbody tr:has(td.round-num) > td:nth-child(9),   /* board MP - also .mp */
  table.history tbody tr:has(td.round-num) > td:nth-child(11),  /* Adj */
  table.history tbody tr:has(td.round-num) > td:nth-child(12),  /* round MP */
  table.history tbody tr:has(td.round-num) > td:nth-child(13),  /* round % */
  table.history tbody tr:has(td.round-num) > td:nth-child(14) {
    /* running MPs */
    display: none !important;
  }
  table.history tbody tr:not(:has(td.round-num)) > td:nth-child(3), /* lead */
  table.history tbody tr:not(:has(td.round-num)) > td:nth-child(6) {
    /* mp */
    display: none !important;
  }
  table.history .contract-row {
    min-width: 0 !important;
    gap: 3px !important;
  }
  table.history .bbo-btn img {
    width: 18px !important;
    height: 8px !important;
  }
  table.history td, table.history th {
    padding: 2px 3px !important;
  }
  table.history td.opponent,
  table.history th:nth-child(3),
  table.history thead tr:first-child th:nth-child(3),
  table.history .col-lead,
  table.history thead tr:first-child th:nth-child(6),
  table.history td.mp,
  table.history thead tr:first-child th:nth-child(9),
  table.history .col-adj,
  table.history thead tr:first-child th:nth-child(11),
  table.history .col-mp-round,
  table.history thead tr:first-child th:nth-child(12),
  table.history .col-pct-round,
  table.history thead tr:first-child th:nth-child(13),
  table.history .col-mps-run,
  table.history thead tr:last-child th.running-col:first-child {
    display: none !important;
  }
  .th-full, .pos-full {
    display: none !important;
  }
  .th-short, .pos-short {
    display: inline !important;
  }
  table.history thead th {
    font-size: 10px !important;
    padding: 3px 2px !important;
    white-space: nowrap !important;
  }
  table.history td.pos-cell {
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
  table.history td.contract {
    max-width: 72px !important;
    width: 72px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  table.history td.col-lead {
    display: none !important;
  }
  table.history td.col-trick {
    display: table-cell !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
  table.history .th-full,
  table.history .pos-full {
    display: none !important;
  }
  table.history .th-short,
  table.history .pos-short {
    display: inline !important;
  }
  table.history thead tr:last-child th.running-col {
    display: table-cell !important;
  }
  table.history thead tr:last-child th.running-col .th-short {
    display: inline !important;
  }
  table.history thead tr:last-child th.running-col .th-full {
    display: none !important;
  }
  table.history thead th.running-group {
    border-left: 1px solid #0c479d !important;
    border-bottom: none !important;
    border-right: none !important;
    box-shadow: none !important;
    border: none !important;
    color: #0c479d !important;
    font-weight: 700 !important;
  }
  table.history thead th.running-col {
    border-left: 1px solid #93c5fd !important;
    border-top: none !important;
    border-bottom: 2px solid #0c479d !important;
    color: #0c479d !important;
    font-weight: 700 !important;
  }
  table.history tbody td.running {
    border-left: 1px solid #e2e8f0 !important;
  }
  table.history tbody tr td.running:nth-last-child(3) {
    border-left: none !important;
  }
  table.history thead th.running-rank {
    display: table-cell !important;
    visibility: visible !important;
    min-width: 28px !important;
    width: 28px !important;
    font-size: 10px !important;
    color: #0c479d !important;
    background: #e8f5e9 !important;
    border-left: 1px solid #93c5fd !important;
  }
  table.history thead th.running-rank .th-short {
    display: inline !important;
  }
  table.history thead th.running-rank .th-full {
    display: none !important;
  }
  table.history thead th.running-group,
  table.history thead th.running-col,
  table.history thead th.running-rank {
    color: #0c479d !important;
    font-weight: 700 !important;
    border-left: none !important;
  }
  table.history thead tr:last-child th.running-col:not([style*="display: none"]):first-of-type,
  table.history thead th.running-col + th.running-col {
  }
  table.history thead tr:last-child th.running-col:nth-child(2) {
    border-left: 1px solid #0c479d !important;
  }
  table.history tbody td.running.col-mps-run {
    display: none !important;
  }
  table.history tbody td.running:not(.col-mps-run) {
    border-left: 1px solid #e2e8f0 !important;
  }
  table.history tbody tr td.running.col-mps-run + td.running {
    border-left: 1px solid #0c479d !important;
  }
}
@media (max-width: 800px) {
  .protocol-layout {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .protocol-deal {
    max-width: 320px !important;
    margin: 0 auto 12px !important;
    flex: 0 0 auto;
    width: 100% !important;
  }
  table.protocol .pair-names-full {
    display: none !important;
  }
  table.protocol .pair-num-link {
    display: inline !important;
    font-size: 13px !important;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
  }
  table.protocol th:nth-child(4),
  table.protocol td.contract {
    max-width: 64px;
  }
  table.protocol .col-lead {
    display: none !important;
  }
  table.protocol thead tr:first-child th:nth-child(5) {
    display: none !important;
  }
  table.protocol .col-lead,
  table.protocol thead tr:first-child th:nth-child(5) {
    display: none !important;
  }
  table.protocol th:nth-child(2),
  table.protocol th:nth-child(3),
  table.protocol td.pair-cell {
    max-width: 36px !important;
    width: 32px !important;
    min-width: 28px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: center !important;
  }
  table.protocol thead tr:last-child th,
  table.protocol td.pct {
    min-width: 42px !important;
    width: auto !important;
    max-width: none !important;
    padding: 2px 4px !important;
    white-space: nowrap !important;
  }
  table.protocol thead tr:first-child th[colspan] {
    min-width: 84px !important;
  }
  table.protocol .pct-val {
    font-size: 12px !important;
  }
  table.protocol .mp-under {
    font-size: 9px !important;
  }
  table.protocol td.score-plus,
  table.protocol td.score-minus,
  table.protocol td.score-other,
  table.history td.score-plus,
  table.history td.score-minus,
  table.history td.score-other {
    min-width: 3.2em !important;
    width: 3.2em !important;
    max-width: 3.6em !important;
    text-align: center !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
  .protocol-results {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
  }
  .protocol-results .table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  table.protocol {
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    font-size: 11px !important;
  }
  .download-btn {
    display: none !important;
  }
}
@media (min-width: 801px) {
  .protocol-nav .board-nav-btn,
  .protocol-nav .board-nav-arrow {
    min-width: 44px !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
  }
  .protocol-nav .board-nav {
    gap: 10px !important;
  }
  .protocol-nav .board-nav-label {
    font-size: 15px !important;
    margin-right: 8px !important;
  }
}

/* Кнопка BBO в тексте (картинки bbo.png в проекте нет) */
.bbo-btn.bbo-text,
table.protocol .bbo-btn.bbo-text,
table.history .bbo-btn.bbo-text {
  width: auto !important;
  height: auto !important;
  padding: 1px 5px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: #0c479d !important;
  font-family: inherit;
}
.deal-minimax .bbo-btn.bbo-text {
  background: #ddffdd;
  border: 1px solid #4CAF50;
  border-radius: 8px;
  cursor: pointer;
}

/* Всё в одну строку: Результаты, Кросс, туры/сдачи, Скачать PBN. Не поместились номера — переносятся под первую кнопку */
.tour-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tour-nav .nav-group, .tour-nav .download-btn, .tour-nav .view-toggle { flex: none; }
.tour-nav .rounds {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: visible;
}
.tour-nav .rounds .rounds-label, .proto-nav .rounds .rounds-label { flex: none; line-height: 40px; margin-right: 0; }
.rs-list {
  display: flex;
  flex-wrap: wrap;           /* вторая строка начинается под первой кнопкой */
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
/* сдачи текущего тура в протоколах — отдельной строкой по центру */
.proto-nav {
  display: flex;
  justify-content: center;
  max-width: 1100px;
  margin: -4px auto 22px;
  padding: 0 16px;
}
.proto-nav .rounds { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
@media (max-width: 700px) {
  .tour-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 12px auto 8px;
    padding: 0 10px;
  }
  .tour-nav .nav-btn { min-width: 0; height: 34px; padding: 0 12px; font-size: 14px; }
  .tour-nav .download-btn { display: none; }                 /* на телефоне PBN не скачиваем */
  .tour-nav .view-toggle { height: 34px; padding: 0 10px; font-size: 13px; }
  .tour-nav .rounds { flex: 1 1 100%; order: 5; justify-content: center; width: 100%; gap: 6px; }
  .proto-nav { margin-bottom: 14px; padding: 0 10px; }
  .tour-nav .rounds .rounds-label, .proto-nav .rounds .rounds-label { line-height: 34px; font-size: 12px; }
  .tour-nav .round-btn, .proto-nav .round-btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: 14px; }
  .rs-list { gap: 4px; }
}

/* Синяя плашка вверху — название турнира; клуб показан слева вверху в верхней панели */
.tournament-header h1.header-badge {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 8px 26px;
  border-radius: 28px;
  background: var(--blue);
  color: #fff;
  font-size: clamp(18px, 4vw, 26px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

/* белый текст на синей плашке не должен перебиваться другими правилами h1 */
.tournament-header h1.header-badge { color: #fff !important; background: var(--blue) !important; }

/* Навигация протокола (◀ ТУР N ▶ и «Сдачи: ◀ 7 8 9 ▶») — только по центру */
.protocol-nav { justify-content: center; }
.protocol-nav .board-nav { justify-content: center; gap: 6px 22px; width: auto; max-width: 100%; }
.protocol-nav .round-switcher, .protocol-nav .board-switcher { justify-content: center; }
@media (max-width: 700px) {
  .protocol-nav .board-nav { gap: 6px 12px; }
  .protocol-nav .board-switcher { white-space: normal; flex-wrap: wrap; }
}
