/* app/styles/foundation.css */
.checkbox-label { display: flex; align-items: center; gap: 10px; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; flex: 0 0 18px; }
:root {
  font-family: 'DM Sans', 'Noto Sans TC', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
  font-feature-settings:
    'lnum' 1,
    'tnum' 1;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
button {
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
}
small {
  font-size: 12px;
}
.app-shell {
  min-height: 900px;
  display: flex;
}
.sidebar {
  width: 234px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--forest);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 34px 19px 22px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.8px;
}
.brand > span:last-child {
  text-align: center;
}
.brand .sidebar-wordmark {
  margin-right: -0.035em;
}
.brand small {
  display: block;
  font-weight: 400;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--sidebar-muted);
  margin-top: 5px;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  padding-left: 3px;
}
.sidebar-label {
  font-size: 10px;
  color: var(--sidebar-section);
  letter-spacing: 2px;
  margin: 46px 13px 14px;
}
.sidebar-label.second {
  margin-top: 31px;
}
.workspace-button,
.nav-item {
  font-size: 14px;
}
.workspace-button {
  width: 100%;
  background: var(--sidebar-group-bg);
  border: 1px solid var(--sidebar-group-border);
  border-radius: 7px;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-group-text);
}
.workspace-button span {
  flex: 1;
  text-align: left;
}
.nav-item {
  background: transparent;
  border: none;
  color: var(--sidebar-icon);
  width: 100%;
  padding: 15px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 6px;
  text-align: left;
  margin-bottom: 5px;
}
.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--text-on-action);
}
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--text-on-action);
}
.active-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sidebar-active-marker);
  margin-left: auto;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.sidebar-bottom > .workspace-button {
  margin-bottom: 32px;
}
.sidebar-bottom > .workspace-button svg:last-child {
  margin-left: auto;
}
.sidebar-note {
  padding: 0 0 27px 13px;
}
.sidebar-note p {
  font-size: 11px;
  white-space: nowrap;
  color: var(--theme-muted, #b1c1b6);
  margin: 12px 0 10px;
}
.sidebar-note small {
  font-size: 10px;
  color: var(--theme-muted, #809a8a);
}
.tiny-suits {
  font-size: 20px;
  letter-spacing: 7px;
  color: var(--theme-muted, #adc1af);
}
.tiny-suits b {
  font-weight: 400;
  color: var(--theme-negative, #cd9789);
}
.main-shell {
  margin-left: 234px;
  width: calc(100% - 234px);
  min-width: 0;
}
.topbar {
  height: 72px;
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--theme-surface, #fbfbf8);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--theme-muted, #929b93);
}
.breadcrumb span {
  color: var(--ink);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.online-indicator {
  font-size: 11px;
  color: var(--theme-muted, #737f77);
  display: flex;
  align-items: center;
  gap: 7px;
}
.online-indicator i,
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-solid, #6c977a);
}
.avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--theme-surface-muted, #e8e9e2);
  font: italic 16px 'Source Serif 4';
  color: var(--theme-muted, #5d6d5f);
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 7px;
  color: var(--theme-muted, #738176);
}
.icon-button:hover {
  background: var(--theme-surface-muted, #e9ece5);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 27px;
  gap: 20px;
}
.session-control {
  display: flex;
  align-items: stretch;
  width: 112px;
  height: 32px;
  border-radius: 12px;
  background: var(--theme-surface-muted, #edf1eb);
  overflow: hidden;
  transition: width 180ms ease;
}
.session-control.expanded {
  width: 132px;
}
.session-control .session-role {
  flex-basis: 112px;
  white-space: nowrap;
}
.session-control.expanded .session-role {
  flex-basis: 68px;
}
.session-role {
  flex: 0 0 56px;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: var(--theme-muted, #65766b);
  background: transparent;
  border-radius: 12px;
  padding: 5px 12px;
}
.password-input {
  display: block;
  position: relative;
}
.password-input input {
  width: 100%;
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  top: 0;
  right: 2px;
  bottom: 0;
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--theme-muted, #65766b);
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--theme-text, #294b3e);
}
.session-logout {
  flex: 0 0 64px;
  border: 0;
  border-radius: 12px;
  background: var(--theme-solid, #27332f);
  color: var(--text-on-action);
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  visibility: hidden;
}
.session-control.expanded .session-logout {
  visibility: visible;
}
.session-logout:hover {
  background: var(--theme-solid, #18231e);
}
.page-heading {
  position: relative;
}
.page-heading > .admin-menu-button {
  flex-shrink: 0;
  margin-right: 12px;
}
.page-heading > div {
  min-width: 0;
}
.eyebrow {
  color: var(--theme-muted, #92968c);
  letter-spacing: 2.5px;
  font-size: 9px;
  font-weight: 600;
  margin-bottom: 11px;
}
.heading-dot {
  color: var(--accent);
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 11px;
  letter-spacing: 0.4px;
}
main {
  max-width: 1550px;
  margin: 0 auto;
  padding: 38px 44px 20px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}
.button.primary {
  background: var(--accent);
  color: var(--text-on-action);
  border-color: var(--accent);
}
.button.primary:hover {
  background: var(--action-primary-hover);
}
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--text-on-action); }
.button.danger:hover { background: var(--action-primary-hover); }
.admin-version { justify-self: end; margin-left: 24px; }
.button.subtle {
  background: var(--surface-bg);
  border-color: var(--border-control);
  color: var(--theme-text, #596b60);
}
.button.subtle:hover {
  background: var(--surface-control-hover);
}
.full {
  width: 100%;
}
.event-strip {
  display: flex;
  gap: 13px;
  overflow: auto;
  padding-bottom: 5px;
  margin-bottom: 31px;
}
.event-option {
  min-width: 310px;
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--theme-border, #e2e5dc);
  border-radius: 7px;
  padding: 18px 17px;
}
.event-option.selected {
  background: var(--surface-bg);
  border-color: var(--theme-border, #819585);
  box-shadow: 0 2px 6px var(--theme-shadow, #25392e06);
}
.event-option strong {
  display: block;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
}
.event-option small {
  display: block;
  color: var(--theme-muted, #929a91);
  font-size: 10px;
  margin-top: 7px;
}
.event-icon {
  width: 38px;
  height: 38px;
  background: var(--theme-surface-muted, #e9efe5);
  color: var(--theme-text, #57705c);
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.event-icon.pairs {
  background: var(--theme-surface-muted, #f2eae4);
  color: var(--theme-negative, #a17962);
}
.event-status {
  color: var(--theme-muted, #638768);
  border: 1px solid var(--theme-border, #d9e5d3);
  border-radius: 20px;
  font-size: 9px;
  padding: 4px 7px;
  white-space: nowrap;
  margin-left: auto;
  background: var(--theme-surface-muted, #f2f6ee);
}
.event-status.done {
  color: var(--theme-muted, #79857e);
  background: var(--theme-surface-muted, #f0f1ed);
}

/* app/styles/colors.css */
/* Shared by the application and the static manual. */
@import '../../public/theme-colors.css';

/* app/styles/scoreboard.css */
.event-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-kicker {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--theme-muted, #8c948b);
  margin-bottom: 10px;
}
.section-kicker span {
  color: var(--theme-muted, #c7cbbf);
  margin: 0 5px;
}
.event-meta,
.table-footer {
  font-size: 11px;
  font-weight: 400;
  color: var(--theme-muted, #7f897e);
}
.event-meta {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 13px;
}
.event-meta span + span:before {
  content: '·';
  margin: 0 12px;
  color: var(--theme-muted, #b5bbae);
}
.demo-banner {
  font-size: 11px;
  color: var(--theme-muted, #8c7e66);
  background: var(--theme-surface-muted, #f3f0e7);
  border: 1px solid var(--theme-border, #eae4d5);
  border-radius: 5px;
  padding: 10px 13px;
  margin-bottom: 20px;
  line-height: 1.8;
}
.demo-banner > span {
  display: inline-block;
  font-weight: 600;
  margin-right: 10px;
  color: var(--theme-warning, #8a7258);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--surface-bg);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px 20px 14px;
  min-height: 94px;
}
.stat-detail {
  color: var(--theme-muted, #929d8e);
  font-size: 11px;
  margin-left: 8px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}
.interactive-stat {
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.interactive-stat:hover {
  border-color: var(--theme-border, #849a7b);
}
.section-collapse {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  margin-bottom: 8px;
  border: 0;
  background: transparent;
  color: var(--theme-muted, #738176);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.section-collapse svg {
  transition: transform 150ms ease;
}
.section-collapse svg.collapsed {
  transform: rotate(-90deg);
}
#event-switcher[hidden],
#event-dashboard[hidden] {
  display: none;
}
.round-settings-form + .round-settings-form {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 24px;
}
.round-settings-form h4 {
  margin-bottom: 16px;
}
.player-detail-popover {
  max-height: 630px;
  overflow-y: auto;
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 20px;
  line-height: 20px;
  font-size: 14px;
  color: var(--theme-muted, #7d877c);
}
.stat-top svg {
  width: 16px;
  height: 16px;
  color: var(--theme-muted, #a3afa1);
}
.stat-value {
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  margin-left: 9px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--theme-muted, #a1a99f);
}
.progress-track {
  height: 3px;
  background: var(--theme-surface-muted, #edf0e8);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 11px;
}
.progress-track span {
  height: 100%;
  display: block;
  background: var(--theme-solid, #7a977e);
}
.panel {
  background: var(--surface-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px var(--theme-shadow, #2f413003);
}
.panel-heading {
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-heading p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--theme-muted, #8e968b);
  margin-top: 7px;
}
.badge {
  font-size: 9px;
  font-weight: 400;
  color: var(--theme-muted, #8a9684);
  background: var(--theme-surface-muted, #f2f5ed);
  border: 1px solid var(--theme-border, #e9ecdf);
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.search {
  border: 1px solid var(--theme-border, #e4e7de);
  border-radius: 5px;
  background: var(--surface-table-stripe);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  color: var(--theme-muted, #a4ae9f);
  width: 226px;
  flex-shrink: 0;
}
.search input {
  border: none;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 11px;
  outline: none;
}
.search input::placeholder {
  color: var(--theme-muted, #a2aa9c);
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  text-align: left;
}
th {
  background: var(--surface-table-heading);
  color: var(--theme-muted, #8b9485);
  font-size: 10px;
  font-weight: 500;
  padding: 13px 23px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 17px 23px;
  border-bottom: 1px solid var(--theme-border, #edf0e8);
  font-size: 12px;
}
/* Keep the final row border by default, including mixed th/td rows.
   Tables that intentionally omit it must opt in with a component-scoped rule. */
tbody tr:hover {
  background: var(--theme-surface, #fcfcf8);
}
tbody tr.followed {
  background: var(--theme-surface-muted, #f5f6eb);
}
.ranking-table .rank-col {
  width: 95px;
}
.ranking-table .score-col {
  text-align: right;
}
.ranking-table td:last-child {
  width: 45px;
  padding-left: 0;
}
.rank {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--theme-muted, #a0a99a);
  font-variant-numeric: tabular-nums;
  min-width: 39px;
}
.rank-1 {
  color: var(--theme-warning, #a58547);
}
.rank-2 {
  color: var(--theme-muted, #89958e);
}
.rank-3 {
  color: var(--theme-negative, #aa886e);
}
.participant-link {
  display: flex;
  align-items: center;
  gap: 13px;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  color: var(--theme-text, #35483b);
  font-size: 13px;
  font-weight: 500;
}
.participant-link small {
  font-size: 9px;
  color: var(--theme-muted, #a1a99b);
  display: block;
  font-weight: 400;
  margin-top: 5px;
  letter-spacing: 0.5px;
}
.participant-emblem {
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  background: var(--theme-surface-muted, #eef1e9);
  border-radius: 6px;
  font-size: 12px;
  color: var(--theme-muted, #7c8a70);
  flex-shrink: 0;
}
.big-score {
  font-size: 23px;
  text-align: right;
  letter-spacing: -0.6px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.big-score small {
  font-size: 11px;
  margin-left: 2px;
  color: var(--theme-muted, #a0a78e);
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: 'DM Sans', ui-monospace, monospace;
}
.team-raw-score {
  white-space: nowrap;
  overflow-wrap: normal;
}
.butler-total {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.butler-imp {
  display: inline-block;
  margin-left: 5px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.block {
  display: block;
  margin-top: 5px;
}
.accent {
  color: var(--accent);
  font-weight: 600;
}
.red {
  color: var(--theme-negative, #aa4c4c);
}
.follow-button {
  color: var(--theme-muted, #c5ccbf);
}
.follow-button.on {
  color: var(--follow-star);
}
.follow-button.on svg {
  fill: currentColor;
}
.table-footer {
  padding: 16px 24px;
  background: var(--theme-surface, #fcfcf9);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.live-dot {
  margin-right: 7px;
  width: 5px;
  height: 5px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 29px 0 7px;
  font-size: 9px;
  color: var(--theme-muted, #a2aa99);
  letter-spacing: 0.6px;
}
.page-footer span span {
  margin: 0 7px;
  color: var(--theme-muted, #b8bdad);
}
.app-version { color: inherit; font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.hcp-fields { grid-column: 1 / -1; min-width: 0; border: 1px solid var(--theme-border, #dce4d4); border-radius: 8px; padding: 12px; margin: 0 0 16px; }
.hcp-cross { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; max-width: 360px; margin: auto; }
.hcp-cross .field { text-align: center; margin: 0; }
.hcp-cross input { text-align: center; }
.hcp-N { grid-area: 1 / 2; } .hcp-W { grid-area: 2 / 1; } .hcp-E { grid-area: 2 / 3; } .hcp-S { grid-area: 3 / 2; }
.page-footer .app-version { margin: 0; color: inherit; }
a.app-version { text-decoration: none; }
a.app-version:hover { text-decoration: underline; }
.page-footer > span:last-child {
  letter-spacing: 1.4px;
}
.mobile-tabs {
  display: none;
}
.round-select {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
select {
  background: var(--surface-bg);
  border: 1px solid var(--theme-border, #dfe5d9);
  border-radius: 5px;
  padding: 9px 12px;
  color: var(--ink);
  max-width: 100%;
}
.match-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.match-card {
  border: 1px solid var(--theme-border, #e3e8dd);
  border-radius: 6px;
  overflow: hidden;
}
.match-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--theme-muted, #8a9685);
  padding: 13px 15px;
  background: var(--theme-surface, #f9faf5);
}
.match-team {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.match-team strong {
  font-size: 13px;
  font-weight: 500;
}
.team-home { color: var(--team-home); }
.team-away { color: var(--team-away); }
.match-team-link { min-width: 0; border: 0; padding: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.match-team-link strong { display: block; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.match-team-link small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.5; }
.match-team { gap: 12px; }
.match-team > b { flex-shrink: 0; }
.match-team b {
  font-size: 25px;
  font-weight: 500;
}
.match-bottom {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  align-items: center;
}
.match-bottom > span {
  font-size: 14px;
}
.match-bottom b {
  font-weight: 500;
  color: var(--theme-text, #465b47);
  margin-left: 4px;
}
.match-bottom button,
.text-button {
  background: none;
  border: 0;
  color: var(--theme-negative, #93605a);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.board-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 19px;
}
.board-pills {
  display: flex;
  gap: 7px;
  overflow: auto;
  padding: 3px;
  flex: 1;
}
.board-pills button {
  border: 1px solid var(--theme-border, #e0e4da);
  background: var(--surface-bg);
  color: var(--theme-muted, #7c8c78);
  border-radius: 5px;
  min-width: 34px;
  height: 34px;
  font-size: 11px;
}
.board-pills button.selected {
  background: var(--forest);
  color: var(--text-on-action);
  border-color: var(--forest);
}
.board-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.25fr);
  gap: 20px;
  align-items: start;
}
.deal-panel .panel-heading {
  padding: 19px;
}

.ranking-group-title { text-align: left; padding: 18px 24px; font-size: 18px; font-weight: 600; color: var(--forest); background: var(--theme-surface-muted, #f4f7f1); border-bottom: 1px solid var(--line); }
.double-winner-ranking > .panel-heading { border-bottom: 0; padding: 0 0 20px; }
.double-winner-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 540px), 1fr)); align-items: start; gap: 20px; }
.double-winner-tables > .table-scroll { min-width: 0; }

/* app/styles/boards-and-forms.css */
.deal-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  padding: 21px 15px;
  gap: 12px 6px;
  min-height: 345px;
}
.hand {
  font-size: 12px;
}
.hand-N {
  grid-area: 1/2;
}
.hand-W {
  grid-area: 2/1;
}
.hand-E {
  grid-area: 2/3;
}
.hand-S {
  grid-area: 3/2;
}
.seat-label {
  font-size: 10px;
  color: var(--theme-muted, #6a7d66);
  font-weight: 600;
  margin-bottom: 7px;
}
.seat-label span {
  font-weight: 400;
  color: var(--theme-muted, #a1aa99);
  margin-left: 4px;
}
.suit-line {
  display: flex;
  gap: 6px;
  min-height: 20px;
  white-space: nowrap;
  font-size: 11px;
}
.suit-line b {
  width: 10px;
}
.suit-line span {
  letter-spacing: 0.4px;
}
.deal-center {
  grid-area: 2/2;
  border: 1px solid var(--theme-border, #dae2d2);
  background: var(--theme-surface-muted, #f2f6ed);
  border-radius: 8px;
  align-self: center;
  height: 85px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--theme-muted, #7a8b6e);
}
.deal-center > span {
  font-size: 7px;
  letter-spacing: 1.5px;
}
.deal-center strong {
  font-family: 'Source Serif 4', serif;
  font-size: 34px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--theme-text, #4b6144);
}
.deal-center small {
  font-size: 7px;
  letter-spacing: 1px;
}
.deal-caption {
  font-size: 10px;
  text-align: center;
  color: var(--theme-muted, #8b9881);
  padding: 10px 10px 23px;
}
.deal-panel > .button {
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 15px;
}
.hidden-deal {
  min-height: 330px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: var(--theme-muted, #8a997f);
}
.hidden-deal strong {
  font-size: 14px;
}
.hidden-deal span {
  font-size: 11px;
}
.contract {
  font-weight: 500;
  font-size: 13px;
}
.contract small {
  font-size: 10px;
  font-weight: 400;
  color: var(--theme-muted, #949e8b);
}
.board-results th,
.board-results td {
  padding: 16px;
}
.footnote {
  font-size: 11px;
  line-height: 1.9;
  color: var(--theme-muted, #919886);
  margin: 15px 0;
}
.board-results > .footnote {
  padding: 0 18px;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 70px 20px;
  color: var(--theme-muted, #8e9c81);
}
.empty.compact {
  padding: 30px;
}
.empty h2 {
  font-size: 20px;
  color: var(--theme-text, #52664c);
}
.empty p {
  font-size: 13px;
}
.alert {
  background: var(--theme-surface-muted, #f4f1e7);
  color: var(--theme-muted, #7f7051);
  border: 1px solid var(--theme-border, #e7deca);
  padding: 13px 15px;
  border-radius: 6px;
  line-height: 1.8;
  font-size: 12px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.alert.error {
  color: var(--theme-negative, #9b4d45);
  background: var(--theme-negative-bg, #fff4ee);
  border-color: var(--theme-border, #ecd2c6);
}
.alert.success {
  color: var(--theme-positive, #57734f);
  background: var(--theme-positive-bg, #eef5e8);
  border-color: var(--theme-border, #d9e6cd);
}
.alert button {
  border: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--muted);
  padding: 0;
}
.error-text {
  color: var(--theme-negative, #ad4b45);
  margin: 15px 0;
  font-size: 12px;
  line-height: 1.8;
}
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.modal {
  border: 1px solid var(--theme-border, #e1e5da);
  background: var(--theme-surface, #fdfefa);
  border-radius: 12px;
  padding: 25px;
  width: min(560px, calc(100% - 30px));
  max-height: 810px;
  color: var(--ink);
  box-shadow: 0 24px 100px var(--theme-shadow, #13291b30);
}
.modal::backdrop {
  background: var(--theme-backdrop, #17281ec0);
  backdrop-filter: blur(3px);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-heading h2 {
  font-size: 21px;
}
.modal > p {
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--theme-muted, #718064);
  margin-bottom: 17px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--theme-border, #dce4d4);
  border-radius: 5px;
  padding: 10px 12px;
  background: var(--surface-bg);
  color: var(--theme-text, #31432b);
  min-width: 0;
}
.field textarea {
  resize: vertical;
  line-height: 1.7;
  font-family: inherit;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--theme-muted, #b1bba7);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.segmented {
  display: flex;
  gap: 4px;
  background: var(--theme-surface-muted, #eef2e7);
  border-radius: 6px;
  padding: 4px;
  margin-bottom: 20px;
}
.segmented button {
  flex: 1;
  padding: 9px;
  border: 0;
  background: none;
  border-radius: 4px;
  color: var(--theme-muted, #899780);
  font-size: 12px;
}
.segmented button.selected {
  background: var(--surface-bg);
  color: var(--theme-text, #344b2c);
  box-shadow: 0 1px 4px var(--theme-shadow, #13291b12);
}
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  gap: 24px;
  overflow: visible;
}
.admin-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  white-space: nowrap;
  padding: 17px 0;
  color: var(--theme-muted, #87947b);
  font-size: 12px;
}
.admin-tabs button.selected {
  color: var(--accent);
  border-color: var(--accent);
}
.admin-content {
  padding: 24px;
}
.admin-content > form {
  max-width: 850px;
}
.seating-note {
  display: flex;
  gap: 25px;
  padding: 14px;
  background: var(--theme-surface-muted, #f5f7f0);
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 12px;
  flex-wrap: wrap;
}
.seating-note b {
  color: var(--theme-muted, #879d73);
  letter-spacing: 0.5px;
  margin-right: 8px;
  font-size: 10px;
}
.score-preview {
  background: var(--theme-surface-muted, #f0f4e9);
  border: 1px solid var(--theme-border, #dee7d2);
  border-radius: 6px;
  margin-bottom: 17px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.score-preview span {
  font-size: 10px;
  color: var(--theme-muted, #8d9e7b);
}
.score-preview strong {
  font-size: 25px;
  font-weight: 500;
  color: var(--theme-text, #4b6b38);
}
.score-preview small {
  font-size: 9px;
  color: var(--theme-muted, #8f9f80);
}
.export-row {
  margin-bottom: 25px;
}
.import-preview {
  white-space: pre-wrap;
  background: var(--theme-surface-muted, #f1f5eb);
  color: var(--theme-muted, #627b4e);
  padding: 15px;
  border: 1px solid var(--theme-border, #dce6d0);
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.8;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 15px 0 22px;
  margin-bottom: 12px;
  gap: 20px;
}
.setting-row strong {
  font-size: 13px;
  font-weight: 500;
}
.setting-row p {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 8px;
  color: var(--theme-muted, #8c997f);
}
.audit-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 12px;
}
.audit-dot {
  height: 8px;
  width: 8px;
  background: var(--theme-solid, #92a77c);
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.audit-item strong {
  font-size: 13px;
  font-weight: 500;
}
.audit-item p {
  margin: 8px 0;
  color: var(--theme-muted, #8b987e);
  line-height: 1.8;
}
.audit-item small {
  color: var(--theme-muted, #a5af9a);
  font-size: 10px;
}

/* app/styles/responsive.css */

/* app/styles/results.css */
/* Interactive results, director tools and board analysis. */
.participant-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--theme-text, #183c30);
  font-size: 12px;
  font-weight: 600;
}
.participant-picker select {
  width: 260px;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-bg);
  border: 1px solid var(--theme-border, #84918a);
  border-radius: 6px;
  box-shadow: 0 2px 5px var(--theme-shadow, #27332f12);
  cursor: pointer;
}
.player-result-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.player-result-filters.pairs-result-filters {
  grid-template-columns: minmax(0, 1fr);
}
.player-round-context {
  width: 100%;
  min-width: 0;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.player-round-context small {
  color: var(--muted);
}
.player-results .panel-heading > div:first-child > p {
  margin-bottom: 0;
  line-height: 1.5;
}
.player-results .panel-heading > div:first-child > p + p {
  margin-top: 4px;
}
.player-result-filters .participant-picker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}
.player-result-filters .participant-picker-trigger,
.player-result-filters .participant-picker select {
  width: 100%;
  min-width: 0;
  height: 42px;
  flex: none;
}
.participant-picker select:hover {
  border-color: var(--theme-border, #294b3e);
}
.participant-picker-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  gap: 6px;
  width: 260px;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  text-align: left;
  background: var(--surface-bg);
  border: 1px solid var(--theme-border, #84918a);
  border-radius: 6px;
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
}
.participant-picker-trigger > span,
.participant-options button > span {
  font-size: inherit;
  line-height: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.participant-picker-trigger > svg {
  align-self: center;
}
.participant-picker-number {
  display: inline-block;
  width: 3ch;
  margin-right: 3px;
}
.participant-options {
  width: 280px;
  max-height: min(360px, 585px);
  overflow-y: auto;
}
.participant-options button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 10px 8px;
  font: inherit;
  text-align: left;
}
.participant-options button:hover,
.participant-options button[aria-pressed='true'] {
  background: var(--theme-surface-muted, #e8f0ea);
}
.import-export-section + .import-export-section {
  border-top: 1px solid var(--border-control);
  margin-top: 24px;
  padding-top: 20px;
}
.import-export-section h4 {
  margin-bottom: 8px;
}
.import-export-section > p {
  margin: 12px 0 20px;
  line-height: 1.7;
}
.import-export-section .export-row {
  gap: 12px;
}
.import-export-section > .button {
  margin-bottom: 16px;
}
.player-results .player-points {
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings:
    'lnum' 1,
    'tnum' 1;
}
.player-results .panel-heading {
  flex-wrap: wrap;
  gap: 16px;
}
.player-results .even-round {
  background: var(--theme-surface-muted, #f1f2f1);
}
.player-results th,
.player-results td {
  border-bottom: 0;
}
.contract-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.contract-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
table .participant-link:hover,
table .participant-link:focus-visible,
table .text-button:hover,
table .text-button:focus-visible,
table .contract-link:focus-visible,
table a:hover,
table a:focus-visible {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.contract-link:focus-visible {
  outline: 2px solid var(--selection-indicator);
  outline-offset: 4px;
  border-radius: 2px;
}
.team-player-results .contract-link:hover,
.team-player-results .contract-link:focus-visible {
  text-decoration: none;
}
.team-player-results .contract-link:hover > span,
.team-player-results .contract-link:focus-visible > span {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.player-results th:nth-child(-n + 3),
.player-results td:nth-child(-n + 3) {
  width: 1%;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}
.player-results td:first-child {
  font-size: 11px;
  color: var(--theme-muted, #6d7872);
}
.player-results .player-round {
  color: var(--theme-text, #27332f);
  font-size: 1.1em;
  font-weight: 600;
}
.player-results .score-low {
  color: var(--score-negative);
}
.player-results .score-high {
  color: var(--score-positive);
}
.player-results .score-neutral {
  color: var(--theme-text, #27332f);
}
/* Share content-proportional columns across every viewport. */
.datum-popover { width: max-content; text-align: left; }
.datum-popover > div { white-space: nowrap; }
.player-detail-popover {
  margin: 0;
  inset: auto;
  position: fixed;
  max-width: calc(1280px - 32px);
  padding: 16px 20px;
  border: 1px solid var(--theme-border, #cbd8cf);
  border-radius: 8px;
  background: var(--surface-bg);
  color: var(--theme-text, #27332f);
  font:
    14px/1.6 'DM Sans',
    sans-serif;
  white-space: normal;
  box-shadow: 0 6px 24px var(--theme-shadow, #27332f26);
}
.player-results table {
  table-layout: auto;
  display: table;
  width: 100%;
  white-space: normal;
}
.player-results thead {
  display: table-header-group;
}
.player-results .team-player-results {
  table-layout: fixed;
}
.team-player-results > thead > tr > th:first-child,
.team-player-results > thead > tr > th:last-child {
  width: 16%;
}
.team-player-results > thead > tr > th:nth-child(2),
.team-player-results > thead > tr > th:nth-child(3) {
  width: 34%;
}
.team-player-results tfoot td {
  background: var(--surface-table-heading);
}
.player-results .team-player-results > thead > tr > th:first-child,
.player-results .team-player-results > tbody > tr > td:first-child {
  padding-left: 14px;
  padding-right: 8px;
}
.team-match-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 80%;
  max-width: 300px;
  margin-inline: auto;
  align-items: center;
  gap: 8px 20px;
  font-size: 12px;
}
.team-match-summary > :nth-child(odd) {
  text-align: center;
  color: var(--muted);
}
.team-match-summary > :nth-child(even) {
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.vp-scale-popover {
  width: 320px;
  text-align: left;
}
.vp-scale-popover p {
  margin: 6px 0;
  font-size: 12px;
}
.vp-scale-scroll {
  max-height: min(340px, 405px);
  overflow: auto;
  margin-top: 12px;
}
.player-results .vp-scale-popover table tr > :nth-child(n) {
  padding: 7px 8px;
  font-size: 12px;
}
.vp-scale-popover thead th {
  position: sticky;
  top: 0;
}
.vp-scale-popover .vp-scale-current td {
  background: var(--theme-surface-selected, #e5eee8);
  font-weight: 700;
}
.player-results tbody {
  display: table-row-group;
}
.player-results tr {
  display: table-row;
}
.player-results table tr > :nth-child(n) {
  display: table-cell;
  width: auto;
  padding: 14px 8px;
  text-align: center;
  transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.player-results table tr > :nth-child(1),
.player-results table tr > :nth-child(2),
.player-results table tr > :nth-child(3),
.player-results table tr > :nth-child(5),
.player-results table tr > :nth-child(6),
.player-results table tr > :nth-child(7) {
  white-space: nowrap;
}
.player-results .contract-link {
  text-align: center;
}
.player-results .player-points-value,
.player-results .player-raw-score {
  display: inline;
  width: auto;
  text-align: center;
  transform: none;
}
.player-results .opponent-number {
  display: none;
}
.player-results .opponent-name small {
  font-size: 0.75em;
}

.win-awards {
  padding: 24px;
  border-top: 1px solid var(--theme-border, #e3e7df);
}
.win-awards h3 {
  margin: 0 0 12px;
}

.knockout-grid {
  display: flex;
  gap: 20px;
  padding: 24px;
  overflow-x: auto;
  align-items: flex-start;
}

.knockout-decision { display: block; }
.knockout-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  margin-block: 16px;
}
.knockout-controls form { min-width: 0; border: 1px solid var(--line); padding: 14px; }
.knockout-controls h5 { font-size: 13px; margin-bottom: 12px; }
.knockout-controls .button { margin-top: 12px; }
.knockout-match-summary { margin-block: 12px; overflow-wrap: anywhere; }
.knockout-stage {
  flex: 1 0 240px;
  min-width: 0;
}
.knockout-stage h3 {
  margin-top: 0;
}
.knockout-card {
  background: var(--theme-surface-muted, #f7f8f4);
  border: 1px solid var(--theme-border, #e3e7df);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.knockout-card h4 {
  margin: 0 0 12px;
}

.movement-session-note {
  margin-block: 1rem;
  padding: 1rem;
  border-left: 3px solid var(--primary, var(--theme-border, #24483c));
  background: var(--theme-surface-muted, #f0f4ef);
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.movement-session-note p { margin: .5rem 0 0; }

/* Team result controls: selection, display preferences, then match context. */
.player-results .team-results-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.team-results-heading .team-result-intro { width: auto; }
.team-results-heading .participant-picker { color: var(--muted); font-weight: 400; }
.team-results-heading .participant-picker-trigger,
.team-results-heading .participant-picker select {
  border-color: var(--line);
  box-shadow: none;
  color: var(--forest);
  background: var(--white);
  border-radius: 8px;
}
.butler-display-toggle, .team-perspective-switch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 6px 0; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; cursor: pointer;
}
.butler-toggle-track { width: 30px; height: 18px; border-radius: 12px; background: var(--switch-off); padding: 3px; box-sizing: border-box; flex-shrink: 0; }
.butler-toggle-track > span { display: block; height: 12px; width: 12px; border-radius: 50%; background: var(--switch-thumb); transition: transform .15s; }
.butler-display-toggle[aria-checked='true'] .butler-toggle-track { background: var(--forest); }
.butler-display-toggle[aria-checked='true'] .butler-toggle-track > span { transform: translateX(12px); }
.team-results-heading .player-round-context { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 0; }
.match-perspective-action { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.match-perspective-action .team-perspective-switch, .match-perspective-action .team-perspective-switch:hover { margin-left: 0; color: var(--muted); text-decoration: none; }
.match-context-trigger { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; min-width: 0; min-height: 40px; padding: 8px 0; border: 0; background: transparent; color: var(--forest); font: inherit; font-size: 12px; line-height: 24px; text-align: left; cursor: pointer; }
.match-context-label, .match-context-separator { color: var(--muted); white-space: nowrap; }
.match-context-opponent { overflow-wrap: anywhere; }
.match-context-trigger:hover .match-context-opponent { text-decoration: underline; text-underline-offset: 3px; }
.match-context-trigger:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }
.team-perspective-switch { color: var(--forest); flex-shrink: 0; white-space: nowrap; }
.team-perspective-switch:hover { text-decoration: underline; text-underline-offset: 3px; }
.butler-display-toggle:focus-visible, .team-perspective-switch:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }
.match-bottom .match-vp-trigger { font-size: 14px; min-height: 32px; padding-block: 6px; box-sizing: border-box; cursor: pointer; border-radius: 4px; align-items: baseline; }
.match-vp-trigger:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.match-vp-dialog.vp-scale-popover { width: min(390px, calc(1280px - 32px)); box-sizing: border-box; }
.match-vp-dialog .modal-heading h2 { font-size: 18px; margin: 0; }
.match-vp-dialog table tr > :nth-child(n) { padding: 7px 8px; font-size: 12px; }

.team-results-heading .team-result-intro { flex-wrap: nowrap; gap: 12px; align-items: flex-start; }
.team-result-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.team-result-title-action { display: inline-flex; align-items: baseline; gap: 8px; }
.team-butler-title-link { border: 0; background: transparent; padding: 4px 0; color: var(--muted); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.team-butler-title-link:hover { color: var(--forest); }
.team-butler-title-link:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 4px; }
.team-imp-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; width: 100%; text-align: center; }
.team-imp-labels { font-size: 10px; margin-top: 4px; }
.team-imp-neutral { display: block; text-align: center; font-size: 11px; white-space: nowrap; }

.team-results-heading .team-result-intro { flex-wrap: wrap; }
.team-result-intro > .butler-display-toggle { flex-shrink: 0; margin-left: auto; white-space: nowrap; }
/* Compact two-line team scores without changing text size or column widths. */
.player-results .team-player-results > tbody > tr > td:nth-child(n) {
  padding-top: 8px;
  padding-bottom: 8px;
}
.team-player-results .team-raw-score { margin-top: 2px; }


.team-imp-columns { font-size: 15px; font-weight: 400; }
.score-placeholder { color: var(--muted); font-weight: 300; }
.team-imp-average-trigger { display: block; width: 100%; text-align: center; }
.round-pairs-table .round-table-number { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.player-results-view { container-type: inline-size; container-name: player-results-layout; min-width: 0; }
.player-results-layout { display: grid; gap: 24px; align-items: start; }
.player-results-layout > * { min-width: 0; }
.pair-picker-panel { display: none; padding: 24px; }
.pair-picker-panel .participant-picker { width: 100%; flex-direction: column; align-items: stretch; font-size: 15px; }
.pair-picker-panel .participant-picker-trigger { width: 100%; min-width: 0; }
@container player-results-layout (min-width: 1100px) {
  .pair-picker-panel { display: block; }
  .player-results > .panel-heading.pair-results-mobile-heading { display: none; }
  .player-results-layout:has(> .pair-picker-panel) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    grid-template-rows: auto 1fr;
  }
  .player-results-layout:has(> .pair-picker-panel) > .player-results { grid-column: 1; grid-row: 1 / 3; }
  .player-results-layout > .pair-picker-panel { grid-column: 2; grid-row: 1; }
  .player-results-layout > .pair-score-chart { grid-column: 2; grid-row: 2; }
}
.pair-score-chart { padding: 24px; }
.pair-score-chart-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.pair-score-chart-heading h3 { flex: 0 0 max-content; font-size: 18px; font-weight: 600; }
.pair-score-chart-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.pair-score-chart-heading p span { margin: 0 5px; }
.pair-chart-latest { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin-left: auto; max-width: 100%; font-variant-numeric: tabular-nums; }
.pair-chart-latest strong { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -.04em; }
.pair-chart-latest small { font-size: 11px; letter-spacing: 0; margin-left: 4px; color: var(--muted); }
.pair-chart-latest > span { font-size: 10px; color: var(--muted); }
.pair-score-chart-scroll { overflow-x: hidden; margin-top: 8px; }
/* Plot only. The heading help icon keeps its own 15px size. */
.pair-score-chart-scroll svg { display: block; width: 100%; }
.pair-chart-grid { stroke: var(--line); stroke-dasharray: 2 4; }
.pair-chart-axis { stroke: var(--line); }
.pair-chart-round { stroke: var(--muted); stroke-opacity: .35; }
.pair-chart-baseline { stroke: var(--muted); stroke-opacity: .6; stroke-dasharray: 5 4; }
.pair-chart-label { fill: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.pair-chart-candle { cursor: pointer; color: var(--text-muted); }
.pair-chart-candle.gain { color: var(--score-positive); }
.pair-chart-candle.loss { color: var(--score-negative); }
.pair-chart-hit { fill: transparent; }
.pair-chart-candle:hover .pair-chart-hit, .pair-chart-candle.selected .pair-chart-hit { fill: var(--surface-control-hover); }
.pair-chart-candle:focus-visible { outline: none; }
.pair-chart-candle:focus-visible .pair-chart-hit { stroke: var(--focus-ring); stroke-width: 2; }
.pair-chart-wick { stroke: currentColor; stroke-width: 1.5; }
.pair-chart-axis-titles { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0 8px; color: var(--muted); font-size: 10px; }
.pair-chart-volume { fill: var(--action-secondary); opacity: .16; pointer-events: none; }
.pair-chart-volume.highlighted { opacity: .3; }
.pair-chart-volume-summary { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.pair-chart-body { fill: currentColor; stroke: var(--surface-bg); stroke-width: .5; }
.pair-chart-body.provisional { fill-opacity: .55; stroke: currentColor; stroke-dasharray: 2 2; }
.pair-chart-detail { display: flex; align-items: center; gap: 20px; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.pair-chart-board { display: flex; flex-direction: column; gap: 4px; min-width: 70px; }
.pair-chart-board strong { font-size: 12px; font-weight: 500; }
.pair-chart-board > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.pair-chart-detail dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1; gap: 12px; margin: 0; }
.pair-chart-detail dt { font-size: 10px; color: var(--muted); }
.pair-chart-detail dd { margin: 3px 0 0; font-size: 13px; white-space: nowrap; }
.pair-chart-detail dd { color: var(--text-primary); }
.pair-chart-detail.gain dd.pair-chart-close { color: var(--score-positive); }
.pair-chart-detail.loss dd.pair-chart-close { color: var(--score-negative); }
.pair-chart-crosshair { pointer-events: none; }
.pair-chart-crosshair line { stroke: var(--muted); stroke-dasharray: 3 3; stroke-opacity: .65; }
.pair-chart-crosshair circle { fill: var(--text-primary); stroke: var(--surface-bg); stroke-width: 1.5; }
.pair-chart-crosshair rect { fill: var(--text-primary); }
.pair-chart-crosshair text { fill: var(--surface-bg); font-size: 10px; font-variant-numeric: tabular-nums; }
.pair-chart-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--muted); padding: 12px 0; }
.pair-chart-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.pair-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pair-chart-legend i { display: inline-block; width: 7px; height: 10px; border-radius: 1px; }
.pair-chart-legend .gain { background: var(--score-positive); }
.pair-chart-legend .loss { background: var(--score-negative); }
.pair-chart-legend .flat { background: var(--muted); height: 2px; }
.round-pairs-table .round-board-numbers { color: var(--forest); font-family: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.team-player-results .team-imp-average-trigger:is(:hover, :focus-visible) > span,
.team-player-results .team-match-summary .contract-link:is(:hover, :focus-visible) > span {
  text-decoration: none;
}
.team-player-results .team-imp-average-trigger:hover,
.team-player-results .team-match-summary .contract-link:nth-child(even):hover {
  background: var(--theme-surface-muted, rgb(32 60 50 / 5%));
  border-radius: 4px;
}
/* Board links use the same readable, neutral treatment in team and pair results. */
.player-results tbody .text-button {
  color: var(--forest);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.player-results tbody .text-button:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 3px;
}
.player-results .team-player-results > tfoot > tr > td:nth-child(n) { padding-left: 0; padding-right: 0; }
.team-match-summary { width: 100%; max-width: none; grid-template-columns: 84% 16%; column-gap: 0; }
.team-match-summary > :nth-child(odd) { text-align: right; padding-right: 16px; }
.team-match-summary > :nth-child(even) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; padding-inline: 8px; }
.team-match-summary > :nth-child(even) > span:last-child { font-weight: 400; }
.compact-imp { white-space: nowrap; font-variant-numeric: tabular-nums; }
.compact-imp-fraction { display: inline-block; font-size: .7em; font-weight: 400; position: relative; top: -.15em; transform: scaleX(.9); transform-origin: left center; margin-right: -.2ch; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.compact-imp-separator { visibility: hidden; }
.match-bottom .match-results-link { color: var(--forest); cursor: pointer; }
.match-bottom { align-items: baseline; }



.score-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.score-unit { margin-inline-start: .2em; font-size: .8em; }

.pair-chart-notes-popover { width: min(420px, calc(1280px - 32px)); box-sizing: border-box; font-size: 13px; line-height: 1.8; }
.pair-chart-notes-popover p { margin: 0; }

.pair-chart-title-button { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 8px; width: max-content; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: nowrap; cursor: pointer; text-align: left; -webkit-appearance: none; appearance: none; }
.pair-chart-title-button svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.pair-chart-title-button:hover { color: var(--theme-solid); }
.pair-chart-title-button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 5px; border-radius: 3px; }
.pair-picker-panel .participant-picker-label { font-size: 18px; font-weight: 600; }
.pair-chart-notes-popover { max-height: calc(900px - 32px); overflow-y: auto; }
.pair-chart-notes-popover p + p { margin-top: 12px; }

/* app/styles/board-tools.css */
.traveler-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 20px 18px;
}
.selected-result {
  background: var(--theme-surface-selected, #e5eee8) !important;
  box-shadow: inset 4px 0 var(--theme-focus, #285746);
}
.publication-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 10px;
  margin: 20px 0 30px;
}
.director-controls {
  background: var(--theme-surface-muted, #fff3e7);
  border: 1px solid var(--theme-border, #c89760);
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
}
.director-controls p {
  margin: 8px 0 16px;
}
.deal-explorer {
  min-width: 0;
}
.deal-explorer .deal-diagram {
  min-height: 360px;
}
.deal-explorer .suit-line > span {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.playing-card {
  position: relative;
  display: inline-grid;
  justify-items: center;
  min-width: 22px;
  padding: 2px 3px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.playing-card:disabled {
  opacity: 1;
  cursor: default;
}
.playing-card:not(:disabled) {
  background: var(--surface-bg);
  border-color: var(--theme-border, #80a992);
  cursor: pointer;
}
.playing-card small {
  font:
    10px ui-monospace,
    monospace;
  color: var(--theme-text, #285746);
}
.playing-card.opening-lead {
  background: var(--theme-surface-muted, #ffe59a);
  border: 2px solid var(--theme-border, #a16b00);
  color: var(--theme-warning, #392800);
  box-shadow: 0 0 0 2px var(--theme-shadow, #fff1be);
}
.lead-note,
.trick-strip {
  padding: 10px;
  background: var(--theme-surface-muted, #fff3cf);
  border-radius: 6px;
  font-size: 13px;
}
.deal-explorer .button-row {
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.deal-explorer h4 {
  margin: 20px 0 10px;
}
.dd-table {
  width: 100%;
  table-layout: fixed;
}
.dd-table td,
.dd-table th {
  padding: 5px;
  text-align: center;
}
.dd-table button {
  width: 100%;
  padding: 9px 3px;
  border: 1px solid var(--theme-border, #c1d4c8);
  border-radius: 6px;
  background: var(--theme-surface-muted, #e8f0ea);
  color: var(--theme-text, #173f31);
  font:
    700 16px ui-monospace,
    monospace;
  cursor: pointer;
}
.dd-table button:hover {
  background: var(--theme-surface-muted, #cadfd0);
}

table th[aria-sort='ascending'] > button,
table th[aria-sort='descending'] > button {
  text-decoration: underline; text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}

.round-pairs-table {
  width: 100%;
  table-layout: fixed;
  white-space: normal;
  overflow-wrap: anywhere;
}
.round-pairs-table th,
.round-pairs-table td {
  padding: 14px 6px;
  text-align: center;
}
.round-pairs-table th:first-child {
  width: 12%;
}
.round-pairs-table th:nth-child(2),
.round-pairs-table th:nth-child(3) {
  width: 29%;
}
.round-pairs-table th:nth-child(4) {
  width: 17%;
}
.round-pairs-table th:last-child {
  width: 13%;
}
.round-pairs-table .participant-link {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.round-pairs-table .participant-link > span {
  min-width: 0;
  text-align: left;
}
.round-pairs-table .round-pair-summary {
  white-space: nowrap;
  letter-spacing: 0;
  font-size: clamp(8px, 28.16px, 9px);
}
.round-pairs-table .text-button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ranking-table .participant-link > span {
  text-align: left;
}
.ranking-table .participant-link small {
  text-align: left;
  min-height: 1.4em;
}
.ranking-table {
  table-layout: auto;
  white-space: normal;
}
.ranking-table th:nth-child(n),
.ranking-table td:nth-child(n) {
  width: auto;
  padding: 16px 8px;
  text-align: center;
}
.ranking-table .participant-link {
  justify-content: center;
  text-align: center;
  width: 100%;
  overflow-wrap: anywhere;
}
.ranking-table .rank {
  justify-content: center;
}
.ranking-table th:nth-child(3),
.ranking-table td:nth-child(1),
.ranking-table td:nth-child(3),
.ranking-table td:nth-child(4) {
  white-space: nowrap;
}
.ranking-table td.big-score {
  font-size: clamp(16px, 28.16px, 26px);
}

/* app/styles/deal-viewer.css */
/* Compact four-hand board. Each suit stays on one line, including 13-card suits. */
.board-layout {
  grid-template-columns: minmax(0, 1fr);
}
.deal-panel {
  max-width: none !important;
}
.deal-explorer {
  padding: 14px;
}
.rank-line-fit {
  min-width: 0;
  width: 100%;
}
.compass-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-template-areas: 'par north spare' 'west center east' 'hcp south dd';
  gap: clamp(3px, 8.96px, 8px);
  align-items: stretch;
}
.compass-board > * {
  min-width: 0;
  min-height: 0;
}
.bridge-hand,
.analysis-corner {
  container-type: inline-size;
  border-radius: 6px;
  border: 1px solid var(--theme-border, #dbe4dc);
  background: var(--surface-table-stripe);
  padding: clamp(2px, 7.68px, 8px);
}
.bridge-hand-N {
  grid-area: north;
}
.bridge-hand-W {
  grid-area: west;
}
.bridge-hand-E {
  grid-area: east;
}
.bridge-hand-S {
  grid-area: south;
}
.par-corner {
  grid-area: par;
  align-items: center;
  text-align: center;
}
.hcp-corner {
  grid-area: hcp;
}
.dd-corner {
  grid-area: dd;
}
.compass-spare {
  grid-area: spare;
}
.board-information {
  grid-area: spare;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  color: var(--theme-text, #34473d);
  font-family: 'DM Sans', sans-serif;
}
.board-information .board-number {
  font: 700 min(20px, 18cqw) / 1.15 'Source Serif 4', serif;
  color: inherit;
}
.board-information .board-average {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: min(14px, 13cqw);
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.board-information .board-average:focus-visible {
  outline: 2px solid var(--theme-focus, #728b7b);
  outline-offset: 3px;
}
.board-information > small {
  font-size: min(12px, 11cqw);
  color: var(--theme-negative, #7b5847);
  white-space: nowrap;
}
.board-information .board-nav.board-jump {
  width: 100%;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0;
  margin: 0;
}
.board-information .board-nav .board-number-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  cursor: pointer;
  border-radius: 3px;
}
.board-information .board-number-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.board-information .board-number-picker:focus-within {
  outline: 2px solid var(--theme-focus, #728b7b);
  outline-offset: 2px;
}
.board-information .board-nav button {
  padding: 0;
  width: 18px;
  height: 23px;
  min-height: 0;
  color: var(--theme-muted, #728b7b);
}
.board-information .board-nav button svg {
  width: 14px;
}
.unpublished-board {
  padding: 16px;
}
.unpublished-board .board-information {
  max-width: 240px;
  margin: 0 auto;
  padding: 12px;
}
.compass-center button.trick-card {
  color: inherit;
  cursor: pointer;
}
.compass-center button.trick-card.red-suit {
  color: var(--theme-negative, #b54843);
}
.compass-center button.trick-card:hover {
  border-color: var(--theme-border, #658670);
}
.analysis-corner.board-metadata {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: min(18px, 10cqw);
}
.board-metadata span {
  white-space: nowrap;
}
.deal-panel .panel-heading .board-summary {
  display: block;
  line-height: 1.5;
}
.board-summary > span {
  font-size: 12px;
  font-weight: 400;
  color: var(--theme-muted, #788478);
}
.board-results .table-round {
  white-space: nowrap;
}
.board-results table {
  table-layout: auto;
  width: 100%;
}
.board-results table th,
.board-results table td {
  padding: 14px 8px;
  text-align: center;
}
.board-results .traveller-sort {
  justify-content: center;
  margin-inline: auto;
}
.board-results table td:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
}
.board-results th:first-child,
.board-results .table-round {
  width: 1%;
  padding-left: 10px;
  padding-right: 6px;
  white-space: nowrap;
}
.board-results tbody tr > td:nth-child(n),
.board-results tbody .contract,
.board-results tbody .cancelled-contract {
  font-size: 13px;
}
.board-results .table-round small {
  font-size: 9px;
}
.board-results .score-neutral {
  color: var(--theme-text, #27332f);
}
.board-results .score-low {
  color: var(--score-negative);
}
.board-results .score-high {
  color: var(--score-positive);
}
.compass-center {
  grid-area: center;
  position: relative;
  container-type: inline-size;
}
.trick-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 30%;
  height: 44%;
  border: 1px solid var(--theme-border, #c9d6cd);
  border-radius: min(5px, 4cqw);
  background: var(--theme-surface, #fffefa);
  box-shadow: 0 2px 3px var(--theme-shadow, #244b3814);
  font:
    700 min(24px, 20cqw)/1.05 'Source Serif 4',
    serif;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--theme-text, #244b38);
}
.trick-card-N {
  top: 0;
  left: 35%;
}
.trick-card-S {
  bottom: 0;
  left: 35%;
}
.trick-card-W {
  left: 0;
  top: 28%;
}
.trick-card-E {
  right: 0;
  top: 28%;
}
.trick-card.red-suit {
  color: var(--theme-negative, #b54843);
}
.bridge-hand header.vulnerable {
  background: var(--theme-negative-bg, #f5dfdd);
  color: var(--theme-negative, #863630);
}
.bridge-hand header.vulnerable b {
  background: var(--theme-negative, #a84540);
}
.bridge-hand header {
  display: flex;
  align-items: center;
  gap: min(6px, 5cqw);
  height: min(29px, 23cqw);
  margin-bottom: min(10px, 7cqw);
  border-radius: 3px;
  background: var(--theme-surface-muted, #e7efe9);
  white-space: nowrap;
  font-size: min(13px, 13cqw);
}
.bridge-hand header b {
  display: grid;
  place-items: center;
  flex: 0 0 min(29px, 23cqw);
  height: 100%;
  background: var(--theme-solid, #2b5a48);
  color: var(--text-on-action);
  border-radius: 3px 0 0 3px;
  font-size: min(18px, 18cqw);
}
.hand-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bridge-suit {
  padding-left: 0.5em;
  display: grid;
  grid-template-columns: min(24px, 18cqw) minmax(0, 1fr);
  align-items: center;
  min-height: min(32px, 24cqw);
  padding-bottom: min(9px, 6.3cqw);
  line-height: 1.1;
}
.bridge-suit > b {
  font-family: 'Source Serif 4', 'Times New Roman', serif;
  font-size: min(26px, 20cqw);
  line-height: 1;
}
.bridge-suit .red {
  color: var(--theme-negative, #b54843);
}
.bridge-ranks {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  font-family: 'IBM Plex Mono', monospace;
  font-size: min(22px, 14cqw);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  font-variant-ligatures: none;
}
.bridge-ranks span {
  display: inline;
}
.bridge-ranks .rank-string {
  display: inline-flex;
  vertical-align: middle;
  white-space: nowrap;
  transform-origin: left center;
  /* Width-only fit. IBM Plex Mono has no wdth axis, so an overflowing line
     drops slot padding via --rank-slot and, if it still spills, scaleX.
     Font-size (the height) stays on .bridge-ranks. */
  transform: scaleX(var(--rank-scale, 1)) !important;
}
.bridge-ranks .hand-card {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  display: inline-block;
  position: relative;
  width: min(30px, 10cqw);
  text-align: center;
}
.bridge-ranks .rank-string > .hand-card,
.bridge-ranks .rank-string > .void-rank {
  width: min(30px, 10cqw, var(--rank-slot, 1000px));
}
.bridge-ranks .hand-card:disabled {
  opacity: 1;
}
.bridge-ranks .hand-card:not(:disabled) {
  cursor: pointer;
}
.bridge-ranks .hand-card:not(:disabled):hover,
.bridge-ranks .hand-card:focus-visible {
  background: var(--theme-surface-muted, #dcebe0);
  outline: 1px solid var(--selection-indicator);
  border-radius: 2px;
}
.card-dd-value {
  position: absolute;
  bottom: -0.55em;
  left: 72%;
  transform: translateX(-50%);
  min-width: 1em;
  padding: 0.05em;
  border-radius: 1px;
  background: var(--theme-positive-bg, #b4d77980);
  color: var(--theme-positive, #27401c);
  font:
    500 0.55em/1.1 'DM Sans',
    sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: center;
  letter-spacing: 0;
}
.card-dd-value.dd-inferior {
  background: var(--theme-negative-bg, #e8a19a80);
  color: var(--theme-negative, #9c302a);
}
.par-corner .par-reference {
  font-size: min(11px, 10cqw);
  white-space: normal;
}
.side-active {
  color: var(--theme-text, #294b3e);
  font-weight: 600;
}
.side-muted {
  color: var(--theme-muted, #939b94);
  font-weight: 400;
}
.bridge-ranks .opening-lead {
  background: var(--theme-warning-bg, #ffda6d);
  color: var(--theme-text, #2b2619);
  border-radius: 2px;
}
.analysis-corner {
  display: flex;
  flex-direction: column;
  gap: min(5px, 4cqw);
  justify-content: center;
  font-size: min(14px, 14cqw);
}
.analysis-corner.par-corner,
.analysis-corner.board-information {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: min(14px, 13cqw) min(34px, 32cqw) min(40px, 38cqw);
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: min(12px, 8cqw);
}
.analysis-corner.par-corner .corner-kicker,
.analysis-corner.board-information .corner-kicker {
  font: 800 min(10px, 9cqw)/1.2 'DM Sans', sans-serif;
  letter-spacing: 0.04em;
  color: var(--theme-muted, #728b7b);
}
.par-heading {
  display: flex;
  align-items: center;
}
.par-corner > .par-heading,
.board-information > .corner-kicker,
.par-corner > strong,
.board-information > .board-nav,
.board-information > .board-number {
  position: relative;
  top: 4px;
}
.par-corner > .par-heading,
.board-information > .corner-kicker {
  top: 10px;
}
.corner-kicker {
  color: var(--theme-muted, #728b7b);
  font-size: min(10px, 9cqw);
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.par-corner strong,
.board-metadata span {
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: min(20px, 18cqw);
}
.par-corner strong.your-contract,
.board-metadata span.your-contract {
  white-space: nowrap;
}
.your-contract .contract-outcome {
  font-size: 0.55em;
  font-weight: 400;
}
.analysis-corner.par-corner strong.your-contract {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.12em;
  font-size: min(28px, 24cqw);
  max-width: 100%;
  padding-inline: 0.2em;
  box-sizing: border-box;
  white-space: nowrap;
}
.your-contract > span {
  white-space: nowrap;
}
.par-corner .contract-score {
  margin-top: 0;
  align-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.analysis-corner.par-corner .contract-score,
.analysis-corner.board-information .board-average {
  font-family: 'DM Sans', sans-serif;
  font-size: min(14px, 13cqw);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.par-corner .contract-score:focus-visible {
  outline: 2px solid var(--theme-focus, #728b7b);
  outline-offset: 3px;
}
.par-corner small {
  font-size: min(12px, 11cqw);
  color: var(--theme-negative, #7b5847);
  white-space: nowrap;
}
.hcp-compass {
  display: grid;
  grid-template: repeat(3, min(22px, 20cqw)) / repeat(3, min(22px, 20cqw));
  align-self: center;
  justify-items: center;
  align-items: center;
  font:
    700 min(17px, 16cqw) 'Source Serif 4',
    serif;
}
.hcp-compass span:nth-child(1) {
  grid-area: 1 / 2;
}
.hcp-compass span:nth-child(2) {
  grid-area: 2 / 1;
}
.hcp-compass span:nth-child(3) {
  grid-area: 2 / 3;
}
.hcp-compass span:nth-child(4) {
  grid-area: 3 / 2;
}
.compact-dd {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font:
    700 min(13px, 12cqw) 'Source Serif 4',
    serif;
}
.compact-dd th,
.compact-dd td {
  padding: 0;
  text-align: center;
  font-size: inherit;
  white-space: nowrap;
}
.compact-dd tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}
.hcp-corner .hcp-metadata {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: min(3px, 2cqw);
  margin-bottom: min(7px, 5cqw);
  font:
    700 min(19px, 15cqw)/1.2 'Source Serif 4',
    serif;
  white-space: nowrap;
}
.compact-dd button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: min(28px, 23cqw);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--theme-text, #1d4d39);
  font: inherit;
  cursor: pointer;
}
.compact-dd button:hover,
.compact-dd button[aria-pressed='true'] {
  background: var(--theme-surface-muted, #c4dbca);
  border-color: var(--theme-border, #579673);
}
.deal-explorer .hcp-compass,
.deal-explorer .hcp-metadata,
.deal-explorer .compact-dd,
.deal-explorer .compact-dd button,
.deal-explorer .par-corner strong {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings:
    'lnum' 1,
    'tnum' 1;
}
.play-keyboard {
  margin: 10px 0 2px;
  padding: 8px;
  border: 1px solid var(--theme-border, #bad2c0);
  border-radius: 8px;
  background: var(--theme-surface-muted, #f1f7f2);
  min-width: 0;
}
.play-keyboard-heading {
  display: flex;
  align-items: center;
  gap: 5px;
}
.play-keyboard-heading strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.play-keyboard-heading button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--theme-border, #bad2c0);
  background: var(--surface-bg);
  border-radius: 5px;
  cursor: pointer;
}
.play-context {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin: 5px 0 8px;
  color: var(--theme-text, #567161);
  font-size: 11px;
}
.play-context > span {
  white-space: nowrap;
}
.play-rack {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
}
.rack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 74px;
  height: auto;
  padding: 11px 0;
  gap: 3px;
  border: 1px solid var(--theme-border, #9dbcaa);
  border-bottom: 3px solid var(--selection-indicator);
  border-radius: 4px;
  background: var(--theme-surface, #fffefa);
  color: var(--theme-text, #244b38);
  box-shadow: 0 2px 2px var(--theme-shadow, #244b3814);
  cursor: pointer;
}
.rack-card > span {
  font:
    700 clamp(12px, 5cqw, 22px)/1.1 'Source Serif 4',
    serif;
}
.rack-card > b {
  font:
    700 clamp(12px, 5cqw, 22px)/1.1 'Source Serif 4',
    serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.rack-card.red-suit {
  color: var(--theme-negative, #b54843);
}
.rack-card:disabled {
  opacity: 0.4;
  cursor: default;
}
.rack-card:not(:disabled):hover {
  background: var(--theme-surface-muted, #e2f0df);
  border-color: var(--theme-border, #356b4f);
}
.rack-card:focus-visible {
  outline: 2px solid var(--theme-focus, #356b4f);
  outline-offset: 1px;
}

/* Match the standings' two-column threshold using the available content width. */
.board-view { container-type: inline-size; }
.board-detail-layout > * { min-width: 0; }
.board-detail-layout > .board-discussion { margin-top: 0; }
@container (min-width: 1100px) {
  .board-view > .board-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "deal results" "discussion results";
  }
  .board-view > .board-detail-layout.has-split-result {
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "split results" "deal results" "discussion results";
  }
  .board-detail-layout > .board-split-result { grid-area: split; }
  .board-detail-layout > .deal-panel { grid-area: deal; }
  .board-detail-layout > .board-results { grid-area: results; }
  .board-detail-layout > .board-discussion { grid-area: discussion; }
}

/* app/styles/event-controls.css */
.traveller-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.traveller-sort:hover,
.traveller-sort:focus-visible {
  color: var(--theme-text, #285946);
}
.board-jump {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 7px;
}
.board-jump.pairs-board-jump {
  grid-template-columns: 36px minmax(0, 148px) 36px;
  justify-content: center;
  gap: 10px;
}
.event-heading {
  display: grid;
  margin-bottom: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 14px;
}
.event-intro {
  display: contents;
}
.event-heading .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: 0;
}
.event-heading h1 {
  font-size: 28px;
  line-height: 1.25;
  text-wrap: balance;
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
.event-name-part {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: baseline;
  white-space: pre-wrap;
}
.event-title-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.event-title-button:hover {
  text-decoration: underline; text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}
.event-information {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.event-information strong {
  display: block;
  margin-bottom: 6px;
}
.event-refresh-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  margin-right: 12px;
}

.event-refresh-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
}
.event-refresh-live::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--score-positive);
  animation: event-refresh-live-pulse 2.8s ease-in-out infinite;
}
@keyframes event-refresh-live-pulse {
  50% { opacity: 0.65; }
}
.event-refresh-button {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.event-heading .event-meta {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: start;
  min-width: 0;
  overflow-wrap: anywhere;
  display: block;
  margin-top: 0;
  line-height: 1.8;
}
.event-meta span {
  display: inline;
}
.compact-page-heading {
  justify-content: flex-end;
  margin-bottom: 16px;
}
.compact-page-heading > .admin-menu-button {
  margin-top: 0;
}
.event-strip.compact-event-strip {
  display: flex;
  overflow-x: auto;
  gap: 8px;
}
main > .page-heading {
  margin-bottom: 10px;
}
main > .section-collapse {
  padding: 4px 0;
  margin-bottom: 4px;
}
main > .section-collapse[aria-controls='event-dashboard'][aria-expanded='false'] {
  margin-bottom: 0;
}
.compact-event-strip .event-option,
.all-events-list .event-option {
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
}
.compact-event-strip .event-option {
  flex: 0 0 300px;
  width: 300px;
}
.compact-event-strip .event-option > span:nth-child(2),
.all-events-list .event-option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.compact-event-strip .event-status {
  flex-shrink: 0;
  margin-left: auto;
}
.compact-event-strip .more-events {
  justify-content: flex-start;
  padding: 14px 16px;
  background: var(--theme-surface-muted, #f1f5ee);
  border-color: var(--theme-border, #d5dfcf);
}
.more-events .more-events-icon {
  background: var(--theme-surface-muted, #dfe9da);
  color: var(--theme-text, #56714e);
}
.more-events-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--theme-text, #56714e);
}
.compact-event-strip .more-events:hover {
  background: var(--theme-surface-muted, #e8f0e3);
  border-color: var(--theme-border, #849a7b);
}
.all-events-list {
  display: grid;
  gap: 8px;
  max-height: 585px;
  overflow-y: auto;
}
.event-identity-form {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-control);
}
.event-heading .event-meta span + span:before {
  content: '·';
  margin: 0 5px;
}
.event-heading .event-meta .event-format {
  display: inline;
}
.event-heading .event-meta .event-format:before {
  content: none;
}
.top-actions .login-button {
  white-space: nowrap;
  padding: 8px 10px;
  font-size: 12px;
}
.top-actions .logout-button {
  background: transparent;
  border: 0;
  box-shadow: none;
  font-weight: 400;
  color: var(--theme-muted, #65766b);
  padding: 8px 6px;
}
.top-actions .logout-button:hover {
  color: var(--theme-text, #294b3e);
  text-decoration: underline; text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}
.board-jump label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.board-jump select {
  min-width: 0;
  width: 100%;
  padding: 9px 7px;
  border: 1px solid var(--theme-border, #cbd8cf);
  border-radius: 6px;
  background: var(--surface-bg);
  font: inherit;
}
.board-team-name {
  display: block;
  max-width: 68px;
  margin-inline: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-results table .selectable-result > td:first-child {
  padding-left: 12px;
  padding-right: 8px;
}
.selectable-result {
  cursor: pointer;
}
.selectable-result:hover {
  background: var(--theme-surface-muted, #edf5ef);
}
.selectable-result:focus-visible {
  outline: 2px solid var(--theme-focus, #356b4f);
  outline-offset: -2px;
}
.par-corner {
    font-size: min(18px, 10cqw);
  }
.par-corner .corner-kicker {
    font-size: min(12px, 7cqw);
  }
.par-corner strong,
  .par-corner strong.your-contract {
    font-size: min(28px, 14cqw);
  }
.par-corner small,
  .par-corner .par-reference {
    font-size: min(14px, 8cqw);
  }
.hcp-corner .hcp-metadata {
    font-size: min(24px, 13cqw);
  }
.hcp-compass {
    font-size: min(23px, 13cqw);
    grid-template: repeat(3, min(28px, 16cqw)) / repeat(3, min(30px, 17cqw));
  }

.board-export-actions {
  display: flex;
  border-top: 1px solid var(--theme-border, #e3e7df);
}
.board-export-actions > .button {
  flex: 1;
  min-width: 0;
  padding: 14px 6px;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  text-decoration: none;
}
.board-export-actions > .button + .button {
  border-left: 1px solid var(--theme-border, #e3e7df);
}
.analysis-corner.par-corner,
  .analysis-corner.board-information {
    grid-template-rows: min(22px, 14cqw) min(52px, 33cqw) min(58px, 36cqw);
    gap: min(16px, 9cqw);
  }
.analysis-corner.par-corner .corner-kicker,
  .analysis-corner.board-information .corner-kicker {
    font-size: min(14px, 8cqw);
  }
.analysis-corner.par-corner > strong,
  .analysis-corner.par-corner strong.your-contract,
  .analysis-corner.board-information .board-number {
    font-size: min(40px, 24cqw);
  }
.analysis-corner.par-corner .contract-score,
  .analysis-corner.board-information .board-average {
    font-size: min(21px, 12cqw);
  }
.board-information .board-nav.board-jump {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
  }
.board-information .board-nav button {
    width: 26px;
    height: 32px;
  }
.board-information .board-nav button svg {
    width: 20px;
    height: 20px;
  }

.analysis-corner .corner-score-value {
  font-size: 1.2em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.your-contract .contract-bid.red-suit {
  color: var(--theme-negative, #bd4944);
}
.your-contract .contract-seat,
.your-contract .contract-outcome {
  color: var(--theme-muted, #8c948b);
  font-family: 'DM Sans', 'Noto Sans TC', sans-serif;
  font-size: 0.55em;
  font-weight: 400;
}
.your-contract .contract-seat {
  margin-left: 0.2em;
}
.cancelled-contract {
  font: inherit;
  color: inherit;
}
.description-text {
  white-space: pre-wrap;
}
.form-grid > *,
.field {
  min-width: 0;
}
.field input[type='date'],
.field input[type='time'],
.field input[type='datetime-local'] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.field input::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1.4em;
}
.event-description-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.event-description-settings textarea {
  width: 100%;
  min-height: 80px;
  box-sizing: border-box;
}

.seating-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}
.seating-participant {
  min-width: 0;
}
.seating-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
}
.seating-name b {
  flex-shrink: 0;
  font-size: 10px;
  margin: 0;
}
.seating-name span,
.seating-participant small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seating-participant small {
  margin-top: 4px;
  font-size: 10px;
  color: var(--theme-muted, #8c948b);
}


/* app/styles/collection.css */
.club-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.club-page header { margin-bottom: 24px; }
.club-page h1 { font-size: 26px; }
.club-page h2 { font-size: 20px; margin: 0 0 12px; }
.club-section { padding: 20px; margin-bottom: 16px; }
.club-section p { line-height: 1.7; }
.club-board-list { display: grid; gap: 10px; margin: 16px 0; }
.club-board-list > button { display: flex; justify-content: space-between; flex-wrap: wrap; min-height: 52px; }
.club-page .field select, .club-page .field input { min-height: 48px; font-size: 16px; }
.club-admin h4 { margin: 24px 0 12px; }
.club-admin p { line-height: 1.6; }

.round-workflow { padding: 20px; margin-bottom: 24px; }
.round-workflow-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.round-workflow-heading .eyebrow { margin: 0 0 8px; color: var(--muted); }
.round-workflow-heading h4 { margin: 0; font-size: 20px; }
.round-workflow-heading .badge { font-size: 12px; line-height: 1.5; padding: 8px 12px; }
.round-workflow-description { margin: 12px 0 16px; color: var(--muted); line-height: 1.7; }
.round-workflow-actions { flex-wrap: wrap; }
.round-workflow-actions .button { max-width: 100%; white-space: normal; min-height: 44px; }
.club-admin-tools { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.club-force-list { padding-left: 20px; line-height: 1.8; }
.club-force-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.club-force-table th, .club-force-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; line-height: 1.6; }
.club-force-table thead th { color: var(--muted); font-size: 13px; }
.club-force-table tr > :first-child { width: 1%; text-align: center; white-space: nowrap; }
.club-force-table td { overflow-wrap: anywhere; }
.club-pair-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 8px; margin: 16px 0; }
.club-pair-links button { width: 100%; height: 44px; min-width: 0; max-width: 100%; padding: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.club-pair-label { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.club-link-card { display: flex; flex-direction: column; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 16px; border-radius: 8px; }
.club-link-card img { max-width: 100%; height: auto; }
.club-link-card input { width: 100%; min-width: 0; }
.club-progress-list { margin: 16px 0 24px; }
.club-progress-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.club-progress-info { flex: 1 1 240px; min-width: 0; }
.club-progress-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.club-progress-status { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--theme-surface-muted, #f3f1ea); color: var(--theme-muted, #716b59); white-space: nowrap; }
.club-progress-status.accepted { background: var(--theme-surface-muted, #eaf1ec); color: var(--theme-text, #345c49); }
.club-progress-details { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.club-progress-details > span { white-space: nowrap; }
.club-progress-action { flex: 0 1 auto; margin-left: auto; max-width: 100%; font-size: 13px; line-height: 1.5; }
.club-progress-action-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }

.score-actions .button { font-size: 14px; min-height: 44px; padding: 10px 12px; }
.score-actions .button.danger { background: var(--theme-negative-bg, #f7efed); border-color: var(--theme-border, #e5d4d0); color: var(--theme-negative, #895b56); }
.score-actions .button.danger:hover { background: var(--theme-negative-bg, #f0e4e1); }

.panel-heading.admin-panel-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 8px; }
.admin-panel-heading > h3 { margin: 0; white-space: nowrap; }
.admin-panel-heading > .button-row { flex-wrap: nowrap; }
.admin-panel-heading .button { white-space: nowrap; }
.admin-panel-heading > .admin-panel-description { grid-column: 1 / -1; margin: 0; }

/* Keep result rows at one readable size; contract annotations stay smaller. */
.player-results tbody tr > td:nth-child(n),
.player-results tbody .text-button,
.player-results tbody .contract-link,
.player-results tbody .player-round,
.player-results tbody .player-points-value,
.player-results tbody .contract,
.player-results tbody .cancelled-contract {
  font-size: 13px;
}

.club-board-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.club-board-result small { margin-left: auto; white-space: nowrap; }
.club-board-result > button { margin-left: 12px; flex-shrink: 0; }
.club-admin .field small { overflow-wrap: anywhere; }


.hcp-cross input[aria-invalid="true"] { border-color: var(--theme-border, #a4323e); background: var(--theme-surface, #fff0f1); }
.score-preview .declarer-warning { background: var(--theme-warning-bg, #fbe3e5); color: var(--theme-warning, #8c2430); border: 1px solid var(--theme-border, #d98e98); border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.6; }
.club-score-preview { align-items: center; text-align: center; padding: 20px; gap: 10px; border-radius: 12px; background: var(--theme-surface, #f8faf7); }
.club-score-preview > strong { font-size: clamp(20px, 64px, 28px); color: var(--forest); }
.club-score-preview > span { font-size: 12px; letter-spacing: 0.08em; }
.score-preview-value { font-size: 16px; color: var(--ink); }
.score-preview-value b { font-size: 28px; margin-left: 8px; font-variant-numeric: tabular-nums; }

.club-progress-trigger { appearance: none; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; padding: 6px; border-radius: 6px; cursor: pointer; }
.club-progress-trigger:hover { background: var(--theme-surface-muted, #f3f5f1); }
.club-progress-trigger:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.club-progress-trigger strong { text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.table-score-review { min-width: 0; }
.table-score-review-names { display: grid; grid-template-columns: 2em 1em minmax(0, 1fr); row-gap: 4px; margin: 1em 0; }
.table-score-review-name { overflow-wrap: anywhere; }
.table-score-review-board { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.table-score-review-scores { margin: 8px 0; font-variant-numeric: tabular-nums; }
.table-score-review-board small { color: var(--muted); }

.mini-score-reference { margin: 20px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.mini-score-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mini-score-heading h3 { margin: 4px 0 0; font-size: 20px; }
.mini-score-heading .eyebrow { font-size: 10px; letter-spacing: .18em; color: var(--muted); }
.mini-score-badge { font-size: 12px; color: var(--forest); border: 1px solid var(--theme-border, #d6e1d8); border-radius: 20px; padding: 5px 10px; white-space: nowrap; }
.mini-score-reference > p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.mini-score-reference table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface-bg); }
.mini-score-reference th, .mini-score-reference td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.mini-score-reference thead th { font-size: 12px; font-weight: 500; color: var(--muted); background: var(--soft); }
.mini-score-reference th:first-child { width: 13%; }
.mini-score-reference tbody th { font-size: 22px; font-weight: 500; }
.mini-score-reference .mini-red-suit { color: var(--suit-red); }
.mini-score-contract { display: block; font-size: 12px; white-space: nowrap; }
.mini-score-contract small { font-size: 11px; color: var(--muted); }
.mini-score-reference td strong { display: block; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.mini-score-reference .mini-score-selected { background: var(--mini-score-selected-bg); box-shadow: inset 0 -2px var(--selection-indicator); }
.mini-overtrick { font-size: 14px; color: var(--muted); }
.mini-score-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; padding: 12px 0 0; font-size: 13px; }
.mini-score-note > span:last-child { white-space: nowrap; }
.mini-score-penalty { font-variant-numeric: tabular-nums; font-weight: 400; }
.mini-score-note, .mini-score-note strong { font-weight: 400; }
.mini-score-reference .mini-score-footnote { margin: 8px 0 0; font-size: 12px; line-height: 1.7; }
.mini-score-current { display: block; font-size: 10px; color: var(--forest); }
.mini-score-trigger { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0; }
.mini-score-reference.mini-score-popover { position: fixed; inset: 0; margin: auto; width: min(600px, calc(1280px - 24px)); max-height: calc(900px - 32px); overflow: auto; padding: 24px; box-shadow: 0 16px 60px var(--theme-shadow, #203c3230); }
.mini-score-popover::backdrop { background: var(--theme-backdrop, rgb(32 60 50 / 18%)); }
.mini-score-close { position: absolute; right: 10px; top: 10px; }
.mini-score-popover .mini-score-heading { padding-right: 24px; }

.club-page .club-page-heading { padding: 4px 0 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.club-page-heading > .eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .18em; }
.club-page-heading h1 { margin: 8px 0 4px; font-size: 28px; line-height: 1.3; font-weight: 600; }
.club-page-heading .club-event-name { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.club-heading-tools { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; }
.club-heading-tools > span { color: var(--muted); }
.club-heading-tools a, .mini-score-inline-trigger { color: var(--forest); font: inherit; text-decoration: none; }
.mini-score-inline-trigger { border: 0; padding: 4px 0; background: transparent; cursor: pointer; }
.club-heading-tools a:hover, .mini-score-inline-trigger:hover { color: var(--muted); }
.mini-score-inline-trigger:focus-visible { outline: 2px solid var(--selection-indicator); outline-offset: 4px; border-radius: 2px; }
.club-heading-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.club-heading-meta .club-heading-tools { margin-top: 0; }
.club-heading-separator { color: var(--muted); }

.club-matchup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 16px 0 8px; padding: 14px 16px; background: var(--theme-surface-muted, #f5f6ef); border-radius: 8px; }
.club-matchup > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.club-seat-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.club-matchup-name { display: flex; align-items: baseline; gap: 6px; }
.club-matchup small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.club-seat-label > span { margin-left: 4px; font-size: 11px; }
.club-matchup strong { font-size: 15px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
.club-section .club-entry-hint { margin: 10px 0 12px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.pair-name-separator { color: inherit; font-weight: 400; }
.club-results-link { color: inherit; text-decoration: none; border-radius: 3px; }
.club-results-link:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.club-results-link:focus-visible { outline: 2px solid var(--selection-indicator); outline-offset: 4px; }

/* Joined tactile keys: square contact edges, rounded outer corners. */
.round-console { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 6px 0; }
.round-console > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-width: 0; min-height: 76px; padding: 12px 3px; border: 1px solid var(--border-control); border-bottom-width: 3px; border-radius: 0; background: linear-gradient(var(--surface-bg), var(--surface-soft)); color: var(--ink); font-size: 13px; font-weight: 500; box-shadow: 0 2px 2px color-mix(in srgb, var(--ink) 7%, transparent); transition: background .12s, transform .12s, box-shadow .12s; }
.round-console > button:first-of-type { border-radius: 7px 0 0 7px; }
.round-console > button:last-of-type { border-radius: 0 7px 7px 0; }
.round-console > button:not(:first-of-type) { border-left: 0; }
.round-console > button:hover:not(:disabled) { background: var(--surface-control-hover); }
.round-console > button:first-child { background: var(--danger); border-color: color-mix(in srgb, var(--danger) 76%, var(--ink)); color: var(--surface-bg); }
.round-console > button:first-child:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 90%, var(--ink)); }
.round-console > button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.round-console > button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.round-console > button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.round-console svg { width: 21px; height: 21px; stroke-width: 1.6; }
.round-console span { white-space: nowrap; }
.club-admin .round-console-caption { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: right; }
.round-workflow-actions:empty { display: none; }

.round-workflow-heading .round-settings-trigger { gap: 7px; padding: 8px 12px; min-height: 40px; font-size: 12px; font-weight: 400; white-space: nowrap; background: transparent; }
.round-settings-trigger svg { width: 16px; height: 16px; }

.club-review-acknowledgment { display: block; margin: 16px 0; line-height: 1.7; }
.club-review-acknowledgment input { width: 16px; height: 16px; margin-right: 8px; vertical-align: middle; accent-color: var(--text); }

.contract-entry {
  container: contract / inline-size;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  margin: 4px 0 18px;
  border: 0;
  padding: 0;
}
.contract-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contract-group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}
.contract-range { color: var(--text-primary); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; white-space: nowrap; }
.contract-held { color: var(--text-primary); }
.contract-level-set { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contract-chip-row { display: grid; gap: 6px; }
.contract-chip-row.levels { grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 4px; }
.contract-chip-row.suits { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
.contract-chip-row.suits .contract-chip { font-size: 22px; }
.contract-chip-row.seats { grid-template-columns: repeat(4, minmax(44px, 1fr)); }
.contract-chip-row.doubles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contract-chip-row.doubles .contract-chip { padding: 0 8px; }
.contract-chip-row.doubles .contract-chip > span { height: auto; white-space: nowrap; transform: none; }
.contract-chip {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border-control);
  border-radius: 6px;
  background: var(--surface-bg);
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  box-shadow: none;
  touch-action: manipulation;
  user-select: none;
  transition: none;
}
.contract-chip > span {
  display: grid;
  place-items: center;
  height: 1em;
  line-height: 1;
  transform: translateY(0.06em);
}
.contract-chip .suit-symbol {
  display: inline-grid;
  place-items: center;
  height: 1em;
  line-height: 1;
}
.contract-pass {
  width: 100%;
  height: 48px;
  min-height: 48px;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.contract-chip[data-suit="H"],
.contract-chip[data-suit="D"] { color: var(--entry-suit-red); }
.contract-chip[data-suit="S"],
.contract-chip[data-suit="C"],
.contract-chip[data-suit="NT"] { color: var(--entry-suit-black); }
.contract-chip[aria-checked="true"],
.contract-chip[aria-pressed="true"] {
  border-color: var(--action-primary);
  background: color-mix(in srgb, var(--action-primary) 14%, var(--surface-bg));
  color: var(--action-primary);
  box-shadow: none;
  font-weight: 600;
}
.contract-chip[aria-checked="true"][data-suit="H"],
.contract-chip[aria-checked="true"][data-suit="D"] { color: var(--entry-suit-red); }
.contract-chip[aria-checked="true"][data-suit="S"],
.contract-chip[aria-checked="true"][data-suit="C"],
.contract-chip[aria-checked="true"][data-suit="NT"] { color: var(--entry-suit-black); }
.contract-chip:focus-visible { outline-offset: 2px; }
.contract-chip:hover:not(:disabled):not([aria-checked="true"]):not([aria-pressed="true"]) { background: var(--surface-control-hover); }
.contract-chip[aria-checked="true"]:hover:not(:disabled),
  .contract-chip[aria-pressed="true"]:hover:not(:disabled) {
    background: color-mix(in srgb, var(--action-primary) 20%, var(--surface-bg));
  }
.contract-trick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  min-width: 0;
  container: trick-row / inline-size;
}
.contract-trick-row[data-pager-start="true"] { grid-template-columns: 44px minmax(0, 1fr); }
.contract-trick-row[data-pager-end="true"] { grid-template-columns: minmax(0, 1fr) 44px; }
.contract-trick-row[data-pager-start="true"][data-pager-end="true"] { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.contract-trick-values { display: flex; justify-content: center; gap: 3px; min-width: 0; }
.contract-trick-row[data-pager-start="true"][data-pager-end="false"] .contract-trick-values { justify-content: flex-start; }
.contract-trick-row[data-pager-start="false"][data-pager-end="true"] .contract-trick-values { justify-content: flex-end; }
.contract-trick-values > .contract-chip {
  flex: 0 0 calc((100cqw - 2 * 44px - 6 * 3px) / 5);
  width: calc((100cqw - 2 * 44px - 6 * 3px) / 5);
}
.contract-pager { width: 44px; min-width: 44px; padding: 0; color: var(--text-primary); font-size: 22px; }
#club-score-editor.panel { overflow: visible; }
#club-score-editor .button-row .button { min-height: 48px; padding: 12px 16px; font-size: 16px; }
#club-score-editor .button-row .button.primary { flex: 1; }
#club-score-editor .button.primary:not(:disabled) {
  background: color-mix(in srgb, var(--action-primary) 14%, var(--surface-bg));
  border-color: var(--action-primary);
  color: var(--action-primary);
  opacity: 1;
  font-weight: 600;
  transition: none;
}
#club-score-editor .button.primary:not(:disabled):hover {
  background: color-mix(in srgb, var(--action-primary) 20%, var(--surface-bg));
}
#club-score-editor .button.primary:disabled {
  background: var(--surface-bg);
  border-color: var(--border-control);
  color: var(--text-muted);
  opacity: 1;
  font-weight: 500;
}

/* app/styles/competitions.css */
/* Competition entrance and stage selection. */
.stage-navigation { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.competition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.competition-card { display: flex; flex-direction: column; padding: 24px; min-height: 190px; color: var(--ink); text-decoration: none; transition: border-color 150ms ease; }
.competition-card:hover, .competition-card:focus-visible { border-color: var(--theme-border, #789781); }
.competition-card h2, .competition-card h3 { margin: 12px 0; font-size: 22px; overflow-wrap: anywhere; }
.competition-card p { color: var(--theme-muted, #758478); line-height: 1.7; }
.competition-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; font-size: 13px; }
.competition-card-bottom > span:last-child { display: flex; align-items: center; gap: 8px; }
.competition-hero { padding: 30px 0; }
.competition-hero h1 { font-size: clamp(28px, 51.2px, 40px); margin: 8px 0 20px; overflow-wrap: anywhere; }
.competition-facts { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-bottom: 24px; }
.competition-facts span, .hub-back { display: inline-flex; align-items: center; gap: 8px; }
.hub-back { color: var(--theme-text, #496b58); font-size: 14px; }
.hub-section-heading { margin: 18px 0; }
.hub-section-heading h2 { font-size: 21px; }
.hub-section-heading p { color: var(--theme-muted, #7d897d); }
.hub-search { max-width: 460px; margin-bottom: 24px; }
.paste-stage-form .footnote { margin: 0; }
.paste-stage-form fieldset { min-inline-size: 0; margin: 0 0 17px; padding: 0; border: 0; }
.paste-stage-form legend { margin: 0 0 8px; padding: 0; }
.paste-stage-form .checkbox-label + .checkbox-label { margin-top: 8px; }
.delete-competition-list { max-height: 405px; overflow-y: auto; margin: 16px 0; }
.delete-competition-option { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.delete-competition-option input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; }
.delete-competition-option > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.delete-competition-option input:not([type="checkbox"]) { width: 100%; min-width: 0; margin-top: 8px; }
.delete-competition-option strong { display: block; font-size: 14px; }
.delete-competition-option small { display: block; margin-top: 4px; color: var(--muted); }
.valet-system-title { white-space: nowrap; }
.valet-wordmark { font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; letter-spacing: 0.035em; }
.valet-wordmark sub, .valet-wordmark sup { position: relative; vertical-align: baseline; font-size: 0.72em; line-height: 0; }
.valet-wordmark sub { bottom: -0.22em; margin-left: -0.08em; margin-right: -0.03em; }
.valet-wordmark sup { top: -0.25em; margin-left: -0.08em; margin-right: -0.05em; }
.hub-search > .field { margin-bottom: 8px; }
.hub-search-input { position: relative; }
.hub-search-input > input { width: 100%; min-width: 0; padding-right: 52px; }
.hub-date-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; border: 0; border-radius: 4px; background: transparent; color: var(--theme-text, #596b60); }
.hub-date-toggle:hover { background: var(--theme-surface-muted, #edf2ed); }
.hub-search-input > input.hub-native-date { position: absolute; right: 4px; bottom: 0; width: 44px; height: 1px; min-height: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.hub-date-filter { display: flex; align-items: end; gap: 12px; margin-top: 12px; }
.hub-form { padding: 24px; margin-bottom: 24px; }
.competition-hub .topbar { gap: 12px; }
.competition-hub input[type="checkbox"] { width: auto; min-height: auto; }

.hub-session { width: auto; flex-shrink: 0; white-space: nowrap; border: 0; border-radius: 20px; padding: 9px 12px; background: var(--theme-surface-muted, #edf1eb); color: var(--theme-muted, #718375); font: inherit; font-size: 12px; cursor: pointer; }

.stage-mode { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.stage-mode input[type=checkbox] { width: 18px; height: 18px; min-height: 0; }

/* Compact event navigation and connected identity menu. */
.topbar { gap: 16px; }
.breadcrumb { min-width: 0; flex: 1; gap: 8px; }
.breadcrumb .breadcrumb-step { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.breadcrumb-step > svg { flex-shrink: 0; }
.breadcrumb-step > a, .breadcrumb-step > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-decoration-color: var(--muted); }
.breadcrumb > a, .breadcrumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb .breadcrumb-root, .breadcrumb > svg { flex-shrink: 0; }
.top-actions { flex-shrink: 0; }
.session-control { position: relative; overflow: visible; z-index: 30; }
.session-control.expanded { width: 112px; border-radius: 12px 12px 0 0; }
.session-control.expanded .session-role { flex-basis: 112px; }
.session-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; min-height: 40px; padding: 10px 8px; border: 0; border-top: 1px solid var(--theme-border, #cdd7ce); border-radius: 0 0 12px 12px; background: var(--theme-surface-muted, #edf1eb); color: var(--theme-text, #415b4b); font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.session-control.expanded .session-menu { display: block; }
.session-menu:hover { background: var(--theme-surface-muted, #e0e9df); }

.event-calendar { width: min(344px, calc(1280px - 32px)); padding: 20px; border: 1px solid var(--theme-border, #d8e1d8); border-radius: 18px; background: var(--surface-bg); color: var(--ink); box-shadow: 0 18px 70px var(--theme-shadow, #18382b30); }
.event-calendar::backdrop { background: var(--theme-backdrop, #18382b30); }
.calendar-heading, .calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calendar-heading { margin-bottom: 16px; }
.calendar-heading button, .calendar-month button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.calendar-month select { min-width: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 8px; }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; text-align: center; }
.calendar-week { margin: 14px 0 10px; color: var(--theme-muted, #7b877e); font-size: 12px; }
.calendar-days button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 50%; font: inherit; font-size: 14px; background: transparent; }
.calendar-days button:disabled { color: var(--theme-muted, #b5bdb7); opacity: 1; cursor: default; }
.calendar-days .has-events { background: var(--theme-surface-muted, #e0eee4); color: var(--theme-text, #24533e); font-weight: 700; cursor: pointer; }
.calendar-days .has-events:hover { background: var(--theme-surface-muted, #c9e0d0); }
.calendar-days .has-events[aria-pressed='true'] { background: var(--theme-solid, #285b43); color: var(--text-on-action); border-color: var(--theme-border, #193d2c); }
.calendar-days i, .calendar-legend i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.calendar-legend { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--theme-text, #52755f); font-size: 12px; }
.calendar-clear { width: 100%; margin-top: 16px; }

.competition-grid.competition-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.competition-card.competition-card-compact { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 20px; min-height: 112px; border-radius: 8px; background: var(--surface-table-stripe); }
.competition-card-compact:hover, .competition-card-compact:focus-visible { background: var(--surface-bg); }
.competition-card-copy { flex: 1; min-width: 0; }
.competition-card-compact h2, .competition-card-compact h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.5; }
.competition-card-compact p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 12px; line-height: 1.4; color: var(--theme-muted, #89958b); }
.competition-card-compact time { white-space: nowrap; }
.competition-card-compact .event-icon { flex-shrink: 0; }
.competition-status { flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--theme-border, #dce5d5); border-radius: 20px; background: var(--theme-surface-muted, #f1f5ee); color: var(--theme-muted, #7c927a); font-size: 11px; white-space: nowrap; }
.breadcrumb > .valet-brand { display: inline-flex; align-items: center; gap: 7px; overflow: visible; color: var(--theme-text, #203f33); text-decoration: none; font-size: 30px; font-weight: 700; line-height: 1.2; padding: 6px 0; }
.valet-brand .valet-brand-diamond { color: var(--theme-negative, #b88370); font-size: 25px; line-height: 1; }
.valet-brand:hover { opacity: 0.8; }

.valet-brand .valet-wordmark, .sidebar-wordmark { display: inline-block; font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; letter-spacing: 0.035em; }
.hub-account { position: relative; flex-shrink: 0; z-index: 30; background: var(--theme-surface-muted, #edf1eb); border-radius: 12px; }
.hub-account.expanded { border-radius: 12px 12px 0 0; }
.hub-account .hub-session { border-radius: inherit; }
.hub-account-menu { position: absolute; top: 100%; right: 0; width: 100%; border-top: 1px solid var(--theme-border, #cdd7ce); border-radius: 0 0 12px 12px; background: var(--theme-surface-muted, #edf1eb); overflow: hidden; box-shadow: 0 8px 12px var(--theme-shadow, #203f3310); }
.hub-account-menu button { width: 100%; min-height: 40px; border: 0; background: transparent; color: var(--theme-text, #415b4b); font: inherit; font-size: 12px; cursor: pointer; }
.hub-account-menu button:hover { background: var(--theme-surface-muted, #e0e9df); }
.hub-account-menu p { margin: 0; padding: 10px 12px; font-size: 11px; line-height: 1.6; color: var(--theme-muted, #65766b); }

.identity-control { display: flex; align-items: stretch; flex-shrink: 0; width: 112px; height: 36px; overflow: hidden; border-radius: 12px; background: var(--theme-surface-muted, #edf1eb); transition: width 180ms ease; }
.identity-control.expanded { width: 148px; }
.identity-control button { flex-shrink: 0; border: 0; border-radius: 0; padding: 0 8px; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.identity-control .identity-role { width: 112px; color: var(--theme-muted, #65766b); background: var(--theme-surface-muted, #edf1eb); }
.identity-control.expanded .identity-role { width: 56px; }
.identity-control .identity-logout { width: 76px; color: var(--theme-text, #35533f); background: var(--theme-surface-muted, #edf1eb); }
.identity-control .identity-logout:hover { background: var(--theme-surface-muted, #e0e9df); }
.identity-control .identity-menu { width: 72px; color: var(--sidebar-text); background: var(--sidebar-bg, var(--forest)); }
.identity-control .identity-menu:hover { background: var(--sidebar-active-bg); }
.identity-control .identity-menu-danger { color: var(--text-on-action); background: var(--danger); }
.identity-control .identity-menu-danger:hover { background: var(--action-primary-hover); }

.valet-brand-icon { width: 28px; height: 28px; flex-shrink: 0; object-fit: contain; }


/* app/styles/viewer-overrides.css */
.brand .sidebar-wordmark { font-family: 'Libertinus Serif', serif; font-weight: 600; }
.sidebar-wordmark { font-size: 36px; line-height: 1.2; letter-spacing: 0.09em; transform: none; margin-right: 0; }

.competition-home main { padding-top: 16px; }
.competition-hub .page-heading h1 { line-height: 1.25; }
.competition-hub .page-heading p { margin-top: 4px; }
.competition-home .competition-hero { padding-top: 0; padding-bottom: 12px; }
.competition-card-copy p + p { margin-top: 4px; }

.scoring-label { display: flex; align-items: center; gap: 4px; min-height: 24px; }
.scoring-info-button { display: inline-grid; place-items: center; width: 28px; height: 24px; border: 0; padding: 0; background: transparent; color: var(--theme-muted, #718375); cursor: pointer; }
.scoring-help { width: min(360px, calc(1280px - 40px)); padding: 20px; border: 1px solid var(--theme-border, #dce4d8); border-radius: 12px; background: var(--surface-bg); color: var(--ink); box-shadow: 0 12px 40px var(--theme-shadow, #203f3326); font-size: 14px; line-height: 1.7; }
.scoring-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scoring-help p { margin-top: 12px; }

.calendar-date-field { display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 4px; width: 100%; min-width: 0; height: 44px; padding: 10px 8px; border: 1px solid var(--theme-border, #dce4d4); border-radius: 5px; background: var(--surface-bg); color: var(--theme-text, #31432b); font: inherit; font-size: 14px; letter-spacing: -0.3px; white-space: nowrap; }
.calendar-date-field > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.calendar-date-field svg { flex-shrink: 0; width: 18px; }
.create-details-grid > .field > input:not([type='hidden']) { height: 44px; }
.create-details-grid > .create-details-help,
.create-details-grid > .create-details-wide { grid-column: 1 / -1; }
.create-details-grid > .create-details-help { margin: 0 0 17px; }

.team-ranking-table th:nth-child(2), .team-ranking-table td:nth-child(2) { text-align: left; }
.team-ranking-table .participant-link { display: block; width: 100%; text-align: left; padding: 0; }
.team-ranking-table .participant-link > span { display: block; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.team-ranking-table .participant-link small { display: block; text-align: left; margin-top: 5px; line-height: 1.3; font-size: 10px; font-weight: 400; }
.team-ranking-table .standing-name {
  display: block;
  max-width: clamp(68px, 294.4px, 240px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.split-contract-editor { margin-block: 20px; }
.editor-popover { width: min(640px, calc(1280px - 32px)); max-height: calc(900px - 32px); overflow-y: auto; overscroll-behavior: contain; }
.editor-popover .scoring-help-heading > strong { min-width: 0; overflow-wrap: anywhere; }
.editor-popover .scoring-help-heading > button { flex-shrink: 0; }
.editor-popover .score-preview strong { font-variant-numeric: tabular-nums; }
.split-contract-editor fieldset { min-width: 0; margin-block: 12px; border: 1px solid var(--theme-border, #dbe2d8); border-radius: 8px; padding: 12px; }
.hand-perspective-button {
  display: flex;
  align-items: center;
  gap: min(6px, 5cqw);
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hand-perspective-button[aria-pressed="true"] { outline: 2px solid var(--theme-focus, #628672); outline-offset: 1px; }
.hand-content { position: relative; }
.hidden-hand { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.hcp-compass .hcp-partial { color: var(--theme-negative, #b54843); }
.hcp-compass .hcp-partial-value { position: relative; display: inline-block; }
.hcp-partial-value sup {
  position: absolute;
  left: 100%;
  top: -0.15em;
  margin-left: 0.08em;
  font-size: 0.65em;
  line-height: 1;
}
.rack-card.played-card:disabled {
  opacity: 1;
}
.rack-card.played-card:disabled > span,
.rack-card.played-card:disabled > b {
  opacity: 0.45;
}


/* app/styles/team-butler.css */
.team-result-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.team-result-intro > div { min-width: 0; }
.player-results { container-type: inline-size; container-name: team-result-heading; }
@container team-result-heading (max-width: 520px) {
  .team-butler-title-prefix { display: none; }
}
.team-result-intro p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.team-butler-trigger { flex-shrink: 0; }
.team-butler-popover { width: min(1240px, calc(1280px - 32px)); max-height: calc(900px - 32px); padding: 0; border: 1px solid var(--theme-border, #dce4d8); border-radius: 14px; background: var(--surface-bg); color: var(--ink); box-shadow: 0 16px 60px var(--theme-shadow, #203f3340); overflow-y: auto; overscroll-behavior: contain; }
.team-butler-popover::backdrop { background: var(--theme-backdrop, #203f3326); }
.team-butler-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.team-butler-heading h3 { margin: 0; font-size: 19px; }
.team-butler-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.team-butler-heading button { flex-shrink: 0; }
.team-butler-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px 0; }
.team-butler-controls .field { margin: 0; min-width: 180px; }
.team-butler-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 9px; background: var(--theme-surface-muted, #f3f5ef); }
.team-butler-tabs button { border: 0; padding: 10px 14px; border-radius: 6px; color: var(--theme-muted, #667d70); background: transparent; cursor: pointer; }
.team-butler-tabs button[aria-pressed="true"] { color: var(--text-on-action); background: var(--theme-solid, #284f40); }
.team-butler-scope { padding: 0 24px; font-size: 13px; line-height: 1.8; }
.team-butler-scope span { display: block; color: var(--muted); font-size: 12px; }
.team-butler-scroll { overflow: auto; max-height: 432px; border-block: 1px solid var(--theme-border, #e2e7dd); }
.team-butler-scroll table { width: 100%; min-width: 1000px; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.team-butler-scroll th, .team-butler-scroll td { padding: 13px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--theme-border, #edf0e8); }
.team-butler-scroll thead th { position: sticky; top: 0; z-index: 2; background: var(--theme-surface-muted, #f4f6ef); color: var(--theme-muted, #728574); font-size: 12px; font-weight: 500; }
.team-butler-scroll .butler-player { position: sticky; left: 0; width: 96px; min-width: 96px; max-width: 96px; box-sizing: border-box; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.team-butler-scroll .butler-player-second { left: 96px; }
.team-butler-scroll tbody .butler-player { background: var(--surface-bg); z-index: 1; font-family: inherit; font-size: 13px; font-weight: 400; color: var(--ink); }
.team-butler-scroll thead .butler-player { z-index: 3; }
.team-butler-scroll tbody tr:nth-child(even) { background: var(--surface-table-stripe); }
.team-butler-scroll tbody tr:nth-child(even) .butler-player { background: var(--surface-table-stripe); }
.butler-positive { color: var(--theme-positive, #28634c); font-weight: 600; }
.butler-negative { color: var(--danger); font-weight: 600; }
.team-butler-notes { padding: 12px 24px 20px; color: var(--theme-muted, #768779); font-size: 12px; line-height: 1.8; }
.team-butler-notes p { margin: 8px 0; }
.team-butler-empty { padding: 24px; text-align: center; color: var(--muted); }
.clear-results-control > div > .button { color: var(--danger); background: var(--theme-surface-muted, #f8eeee); border-color: var(--theme-border, #e6cbcb); }
.clear-results-control > div > .button:hover { background: var(--theme-surface-muted, #f2dfdf); }
.bridge-ranks .hand-card.played-card:disabled {
  color: var(--theme-muted, #9aa49f);
  background: transparent;
  text-shadow: none;
}


.team-butler-roster { margin: 0 20px 16px; padding: 14px 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; }
.team-butler-roster > strong { font-size: 14px; font-weight: 600; }
.team-butler-roster dl { margin: 10px 0 0; display: grid; gap: 6px; font-size: 13px; }
.team-butler-roster dl > div { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 10px; }
.team-butler-roster dt { color: var(--muted); }
.team-butler-roster dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* app/styles/interleaved.css */
.topbar .home-navigation { gap: 18px; }
.interleaved-round > .footnote, .team-bye-note { margin: 0; padding: 16px 24px; }
.interleaved-round > section { padding-top: 20px; border-top: 1px solid var(--line); }
.interleaved-round > section > h4 { margin: 0 24px 8px; }
.interleaved-round > section > p { margin: 0 24px 16px; color: var(--muted); font-size: 14px; }
.interleaved-round table { min-width: 440px; }

/* app/styles/discussion.css */
.board-discussion {
  margin-top: 24px;
  min-width: 0;
}
.discussion-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.discussion-heading > div:first-child {
  flex: 1 1 180px;
  min-width: 0;
}
.discussion-description .discussion-close-control {
  display: inline;
  min-height: 0;
  padding: 3px 0;
  font: inherit;
  color: var(--muted);
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.discussion-description .discussion-close-control:hover {
  color: var(--forest);
  text-decoration-color: currentColor;
}
.discussion-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.discussion-body {
  padding: 0 24px 24px;
}
.discussion-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.discussion-action:hover {
  color: var(--forest);
}
.discussion-action:focus-visible,
.discussion-menu button:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}
.discussion-action:disabled {
  opacity: 0.45;
  cursor: wait;
}
.discussion-delete:hover {
  color: var(--accent);
}
.discussion-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}
.discussion-meta {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.discussion-meta strong {
  min-width: 0;
  font-size: 14px;
  color: var(--forest);
  font-weight: 600;
}
.discussion-meta time,
.discussion-meta .discussion-action {
  flex-shrink: 0;
  white-space: nowrap;
}
.discussion-actions:empty {
  display: none;
}
.discussion-meta time,
.discussion-count {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.discussion-text {
  margin: 12px 0 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.discussion-reference {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.discussion-badge {
  color: var(--accent);
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.discussion-hidden .discussion-text {
  color: var(--muted);
}
.discussion-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 0;
  color: var(--muted);
}
.discussion-empty p {
  margin: 0;
}
.discussion-status {
  padding: 24px 0 0;
  color: var(--muted);
}
.discussion-composer {
  padding-top: 24px;
  margin-top: 0;
}
.discussion-composer h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.discussion-composer .field {
  margin: 0 0 16px;
}
.discussion-nickname {
  max-width: 300px;
}
.board-discussion input,
.board-discussion textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.board-discussion textarea {
  resize: vertical;
  min-height: 110px;
}
.discussion-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.discussion-submit {
  min-height: 40px;
}
.discussion-help {
  font-size: 11px;
  line-height: 1.8;
  margin: 16px 0 0;
  color: var(--muted);
}
.discussion-reply-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-left: 2px solid var(--forest);
  background: var(--soft);
  padding: 10px 14px;
  margin-bottom: 18px;
}
.discussion-reply-context > div {
  min-width: 0;
}
.discussion-reply-context span {
  font-size: 12px;
  font-weight: 600;
  color: var(--forest);
}
.discussion-reply-context p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discussion-menu {
  width: min(320px, calc(1280px - 32px));
  max-height: 720px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 40px var(--theme-shadow, #203c3220);
  background: var(--white);
  color: var(--ink);
}
.discussion-menu-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
}
.discussion-menu-heading strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.discussion-menu > button {
  display: block;
  width: 100%;
  padding: 12px 10px;
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.discussion-menu > button:hover {
  background: var(--soft);
  color: var(--forest);
}
.discussion-menu > button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.discussion-suit {
  color: var(--ink);
  font-weight: 600;
}
.discussion-suit-red {
  color: var(--accent);
}
.danmaku-stage {
  position: relative;
  min-width: 0;
}
.board-share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.board-share-options > .button {
  flex: 1 1 180px;
}
.danmaku-toggle[aria-pressed='true'] {
  color: var(--forest);
  background: var(--soft);
}
.board-danmaku {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
  container-type: inline-size;
}
.danmaku-message {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.5;
  font-synthesis: none;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--theme-surface, rgba(255, 255, 255, 0.8));
  color: var(--forest);
  opacity: 0.72;
  box-shadow: 0 1px 5px var(--theme-shadow, #203c3214);
  animation: board-danmaku-travel 7.5s linear forwards;
}
.danmaku-author {
  font-weight: 600;
}
@keyframes board-danmaku-travel {
  to {
    transform: translateX(calc(-100cqw - 100%));
  }
}

.discussion-list > li { scroll-margin-top: 24px; }


/* Reuse the site's outlined controls, including theme and hover colors. */
.board-discussion .button.discussion-action {
  border: 1px solid var(--border-control);
  background: var(--surface-bg);
  color: var(--theme-text, #596b60);
  padding: 7px 10px;
  border-radius: 5px;
  min-height: 36px;
  text-decoration: none;
}
.board-discussion .button.discussion-action:hover { background: var(--surface-control-hover); }
.board-discussion .discussion-delete { color: var(--danger); }
.discussion-actions { margin-top: 12px; }
.discussion-status { margin: 0; line-height: 1.7; font-size: 13px; }

.discussion-meta { gap: 4px 8px; }
.board-discussion .discussion-meta > .button.discussion-action {
  border: 0; background: transparent; color: var(--ink); padding: 2px 0;
  min-height: 28px; font-weight: 400; gap: 8px;
}
.discussion-meta > .discussion-action::before { content: '·'; color: currentColor; }
.board-discussion .discussion-meta > .discussion-action:hover { background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.discussion-permalink { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.discussion-permalink:hover { text-decoration: underline; text-underline-offset: 3px; }


/* A compact header and a quiet paper surface keep each reply readable. */
.board-discussion { container-type: inline-size; container-name: discussion-thread; }
.discussion-list > .discussion-comment {
  position: relative;
  margin: 0 0 12px calc(var(--reply-depth, 0) * 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-bg);
  box-shadow: 0 1px 2px var(--theme-shadow, #203c3210);
}
.discussion-list > .discussion-comment:not(.discussion-thread-reply) { margin-top: 24px; }
.discussion-list > .discussion-comment:first-child { margin-top: 0; }
.discussion-comment > .discussion-meta {
  padding: 8px 14px;
  background: var(--surface-table-heading);
  border-radius: 4px 4px 0 0;
  border-bottom: 1px solid var(--line);
  gap: 2px 8px;
}
.discussion-comment > .discussion-text { margin: 0; padding: 14px 16px 16px; line-height: 1.8; }
.discussion-comment > .discussion-reference { margin: 12px 16px 0; }
.discussion-thread-reply::before {
  content: ''; position: absolute; left: -13px; top: -13px; bottom: -1px;
  border-left: 1px solid var(--line); pointer-events: none;
}
.discussion-thread-reply::after {
  content: ''; position: absolute; left: -13px; top: 22px;
  width: 12px; border-top: 1px solid var(--line); pointer-events: none;
}
/* End each sibling branch at its final card's header, including nested replies. */
.discussion-thread-last::before { bottom: auto; height: 35px; }
.discussion-list > .discussion-comment:target {
  border-color: var(--selection-indicator, var(--forest));
  box-shadow: 0 0 0 1px var(--selection-indicator, var(--forest));
}
@container discussion-thread (max-width: 520px) {
  .discussion-list > .discussion-comment { margin-left: calc(var(--reply-depth-mobile, 0) * 14px); }
  .discussion-comment > .discussion-meta { padding: 8px 10px; }
  .discussion-comment > .discussion-text { padding: 12px; }
  .discussion-permalink { flex-basis: 100%; margin-left: 0; }
  .discussion-thread-reply::before, .discussion-thread-reply::after { left: -8px; }
  .discussion-thread-reply::after { width: 7px; }
}

.discussion-heading > div:first-child { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* app/styles/viewer-theme.css */
/* Color adapter for @valet/deal-viewer. Keep vendor layout untouched. */
:root[data-theme]:not([data-theme="forest"]) .bridge-hand,
:root[data-theme]:not([data-theme="forest"]) .analysis-corner {
  border: 1px solid var(--theme-border, #dbe4dc);
  background: var(--theme-surface, #fafbf8);
}
:root[data-theme]:not([data-theme="forest"]) .board-information {
  color: var(--theme-text, #34473d);
}
:root[data-theme]:not([data-theme="forest"]) .board-information .board-average:focus-visible {
  outline: 2px solid var(--theme-focus, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .board-information > small {
  color: var(--theme-negative, #7b5847);
}
:root[data-theme]:not([data-theme="forest"]) .board-information .board-number-picker:focus-within {
  outline: 2px solid var(--theme-focus, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .board-information .board-nav button {
  color: var(--theme-muted, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .compass-center button.trick-card.red-suit {
  color: var(--theme-negative, #b54843);
}
:root[data-theme]:not([data-theme="forest"]) .compass-center button.trick-card:hover {
  border-color: var(--theme-border, #658670);
}
:root[data-theme]:not([data-theme="forest"]) .board-summary > span {
  color: var(--theme-muted, #788478);
}
:root[data-theme]:not([data-theme="forest"]) .board-results .score-neutral {
  color: var(--theme-text, #27332f);
}
:root[data-theme]:not([data-theme="forest"]) .board-results .score-low {
  color: var(--theme-negative, #b33a3d);
}
:root[data-theme]:not([data-theme="forest"]) .board-results .score-high {
  color: var(--theme-text, #28784f);
}
:root[data-theme]:not([data-theme="forest"]) .trick-card {
  border: 1px solid var(--theme-border, #c9d6cd);
  background: var(--theme-surface, #fffefa);
  box-shadow: 0 2px 3px var(--theme-shadow, #244b3814);
  color: var(--theme-text, #244b38);
}
:root[data-theme]:not([data-theme="forest"]) .trick-card.red-suit {
  color: var(--theme-negative, #b54843);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-hand header {
  background: var(--seat-nonvul-bg);
  color: var(--seat-nonvul-text);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-hand header b {
  background: var(--seat-nonvul-badge);
  color: var(--seat-nonvul-badge-text);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-hand header.vulnerable {
  background: var(--seat-vul-bg);
  color: var(--seat-vul-text);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-hand header.vulnerable b {
  background: var(--seat-vul-badge);
  color: var(--seat-vul-badge-text);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-suit .red {
  color: var(--theme-negative, #b54843);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-ranks .hand-card:not(:disabled):hover,
:root[data-theme]:not([data-theme="forest"]) .bridge-ranks .hand-card:focus-visible {
  background: var(--theme-surface-muted, #dcebe0);
  outline: 1px solid var(--theme-focus, #7a9c85);
}
:root[data-theme]:not([data-theme="forest"]) .card-dd-value {
  background: var(--theme-positive-bg, #b4d77980);
  color: var(--theme-positive, #27401c);
}
:root[data-theme]:not([data-theme="forest"]) .card-dd-value.dd-inferior {
  background: var(--theme-negative-bg, #e8a19a80);
  color: var(--theme-negative, #9c302a);
}
:root[data-theme]:not([data-theme="forest"]) .side-active {
  color: var(--theme-text, #294b3e);
}
:root[data-theme]:not([data-theme="forest"]) .side-muted {
  color: var(--theme-muted, #939b94);
}
:root[data-theme]:not([data-theme="forest"]) .bridge-ranks .opening-lead {
  background: var(--theme-warning-bg, #ffda6d);
  color: var(--theme-text, #2b2619);
}
:root[data-theme]:not([data-theme="forest"]) .analysis-corner.par-corner .corner-kicker,
:root[data-theme]:not([data-theme="forest"]) .analysis-corner.board-information .corner-kicker {
  color: var(--theme-muted, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .corner-kicker {
  color: var(--theme-muted, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .par-corner .contract-score:focus-visible {
  outline: 2px solid var(--theme-focus, #728b7b);
}
:root[data-theme]:not([data-theme="forest"]) .par-corner small {
  color: var(--theme-negative, #7b5847);
}
/* Match Valet's shared table styling within this standalone component. */
:root[data-theme]:not([data-theme="forest"]) .compact-dd th {
  background: var(--theme-surface, #fafbf7);
  color: var(--theme-muted, #8b9485);
}
:root[data-theme]:not([data-theme="forest"]) .compact-dd td {
  border-bottom: 1px solid var(--theme-border, #edf0e8);
}
:root[data-theme]:not([data-theme="forest"]) .compact-dd tbody tr:hover {
  background: var(--theme-surface, #fcfcf8);
}
:root[data-theme]:not([data-theme="forest"]) .compact-dd button {
  color: var(--theme-text, #1d4d39);
}
:root[data-theme]:not([data-theme="forest"]) .compact-dd button:hover,
:root[data-theme]:not([data-theme="forest"]) .compact-dd button[aria-pressed='true'] {
  background: var(--theme-surface-muted, #c4dbca);
  border-color: var(--theme-border, #579673);
}
:root[data-theme]:not([data-theme="forest"]) .play-keyboard {
  border: 1px solid var(--theme-border, #bad2c0);
  background: var(--theme-surface-muted, #f1f7f2);
}
:root[data-theme]:not([data-theme="forest"]) .play-keyboard-heading button {
  border: 1px solid var(--theme-border, #bad2c0);
  background: var(--theme-surface, white);
}
:root[data-theme]:not([data-theme="forest"]) .play-context {
  color: var(--theme-text, #567161);
}
:root[data-theme]:not([data-theme="forest"]) .rack-card {
  border: 1px solid var(--theme-border, #9dbcaa);
  border-bottom: 3px solid var(--theme-border, #7a9c85);
  background: var(--theme-surface, #fffefa);
  color: var(--theme-text, #244b38);
  box-shadow: 0 2px 2px var(--theme-shadow, #244b3814);
}
:root[data-theme]:not([data-theme="forest"]) .rack-card.red-suit {
  color: var(--theme-negative, #b54843);
}
:root[data-theme]:not([data-theme="forest"]) .rack-card:not(:disabled):hover {
  background: var(--theme-surface-muted, #e2f0df);
  border-color: var(--theme-border, #356b4f);
}
:root[data-theme]:not([data-theme="forest"]) .rack-card:focus-visible {
  outline: 2px solid var(--theme-focus, #356b4f);
}

:root[data-theme]:not([data-theme="forest"]) .board-export-actions {
  border-top: 1px solid var(--theme-border, #e3e7df);
}

:root[data-theme]:not([data-theme="forest"]) .your-contract .contract-bid.red-suit {
  color: var(--theme-negative, #bd4944);
}
:root[data-theme]:not([data-theme="forest"]) .your-contract .contract-seat,
:root[data-theme]:not([data-theme="forest"]) .your-contract .contract-outcome {
  color: var(--theme-muted, #8c948b);
}
:root[data-theme]:not([data-theme="forest"]) .hand-perspective-button[aria-pressed='true'] {
  outline: 2px solid var(--theme-focus, #628672);
}
:root[data-theme]:not([data-theme="forest"]) .hcp-compass .hcp-partial {
  color: var(--theme-negative, #b54843);
}

:root[data-theme]:not([data-theme="forest"]) .bridge-ranks .hand-card.played-card:disabled {
  color: var(--theme-muted, #9aa49f);
}

/* Keep corner suits monochrome, including mobile emoji-capable browsers. */
.analysis-corner { font-variant-emoji: text; }
:root[data-theme] .analysis-corner .your-contract .contract-bid.red-suit { color: inherit; }

/* Keyboard cards use traditional two-color suits in every theme. */
:root[data-theme] .play-keyboard .rack-card[data-suit] {
  color: var(--text-primary);
  font-variant-emoji: text;
}
:root[data-theme] .play-keyboard .rack-card[data-suit="H"],
:root[data-theme] .play-keyboard .rack-card[data-suit="D"] {
  color: var(--suit-red);
}

/* app/styles/theme-integration.css */
/* Sidebar surfaces are intentionally independent of action/link colors. */
.sidebar { background: var(--sidebar-bg, var(--forest)); }
.nav-item:hover, .nav-item.active { color: var(--sidebar-on-active, #fff); }
:root[data-theme]:not([data-theme="forest"]) .sidebar-bottom { color: var(--sidebar-muted); }
:root[data-theme]:not([data-theme="forest"]) .sidebar-note p,
:root[data-theme]:not([data-theme="forest"]) .sidebar-note small,
:root[data-theme]:not([data-theme="forest"]) .tiny-suits { color: var(--sidebar-muted); }
:root[data-theme]:not([data-theme="forest"]) .tiny-suits b { color: var(--sidebar-brand); }
:root[data-theme="sepia"] .sidebar [data-suit="H"],
:root[data-theme="sepia"] .sidebar [data-suit="D"] { color: var(--suit-red); }
:root[data-theme]:not([data-theme="forest"]) input,
:root[data-theme]:not([data-theme="forest"]) select,
:root[data-theme]:not([data-theme="forest"]) textarea { color: var(--text-primary); }
/* Leave space at the document end so the floating control cannot hide the last action. */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

/* Semantic suit marks keep the Dracula palette consistent across viewer and host. */
:root:is([data-theme="dracula"], [data-theme="light"]) [data-suit="S"] { --suit-color: var(--suit-S); }
:root:is([data-theme="dracula"], [data-theme="light"]) [data-suit="H"] { --suit-color: var(--suit-H); }
:root:is([data-theme="dracula"], [data-theme="light"]) [data-suit="D"] { --suit-color: var(--suit-D); }
:root:is([data-theme="dracula"], [data-theme="light"]) [data-suit="C"] { --suit-color: var(--suit-C); }
/* Match legacy viewer red-card specificity; analysis labels stay monochrome. */
:root:is([data-theme="dracula"], [data-theme="light"]) :is(
  [data-suit="S"], [data-suit="H"], [data-suit="D"], [data-suit="C"],
  .compass-center button.trick-card[data-suit]
):not(.compact-dd *, .your-contract *, .play-keyboard *, .contract-entry *) { color: var(--suit-color); }

/* Nord keeps its palette, with bolder open suit shapes outside analysis labels. */
.suit-symbol { font-variant-emoji: text; }
.suit-symbol-solid { display: var(--suit-solid-display); }
.suit-symbol-outline {
  display: var(--suit-outline-display);
  font-size: var(--suit-outline-size);
  font-weight: 700;
  -webkit-text-stroke: var(--suit-outline-stroke) currentColor;
}
:root[data-theme="nord"] .sidebar [data-suit="S"],
:root[data-theme="nord"] .sidebar [data-suit="C"] { color: var(--text-primary); }
:root[data-theme="nord"] .sidebar [data-suit="H"],
:root[data-theme="nord"] .sidebar [data-suit="D"],
:root[data-theme="nord"] .discussion-suit-red { color: var(--suit-red); }
/* Both Par Contract and Table Result share this presentation. */
:root[data-theme="dracula"] .your-contract .contract-bid[data-suit] {
  color: var(--text-primary);
}

/* Light theme uses traditional pure red/black; analysis labels keep their tone. */
:root[data-theme="light"] .sidebar [data-suit="S"],
:root[data-theme="light"] .sidebar [data-suit="C"] { --suit-color: var(--sidebar-text); }

/* node_modules/@valet/deal-viewer/dist/style.css */
.deal-explorer {
  padding: 14px;
}
.compass-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-template-areas: 'par north spare' 'west center east' 'hcp south dd';
  gap: clamp(3px, 8.96px, 8px);
  align-items: stretch;
}
.compass-board > * {
  min-width: 0;
  min-height: 0;
}
.bridge-hand,
.analysis-corner {
  container-type: inline-size;
  border-radius: 6px;
  border: 1px solid #dbe4dc;
  background: #fafbf8;
  padding: clamp(2px, 7.68px, 8px);
}
.bridge-hand-N {
  grid-area: north;
}
.bridge-hand-W {
  grid-area: west;
}
.bridge-hand-E {
  grid-area: east;
}
.bridge-hand-S {
  grid-area: south;
}
.par-corner {
  grid-area: par;
  align-items: center;
  text-align: center;
}
.hcp-corner {
  grid-area: hcp;
}
.dd-corner {
  grid-area: dd;
}
.compass-spare {
  grid-area: spare;
}
.board-information {
  grid-area: spare;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  color: #34473d;
  font-family: 'DM Sans', sans-serif;
}
.board-information .board-number {
  font:
    700 min(20px, 18cqw) / 1.15 'Source Serif 4',
    serif;
  color: inherit;
}
.board-information .board-average {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: min(14px, 13cqw);
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.board-information .board-average:focus-visible {
  outline: 2px solid #728b7b;
  outline-offset: 3px;
}
.board-information > small {
  font-size: min(12px, 11cqw);
  color: #7b5847;
  white-space: nowrap;
}
.board-information .board-nav.board-jump {
  width: 100%;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 0;
  margin: 0;
}
.board-information .board-nav .board-number-picker {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  cursor: pointer;
  border-radius: 3px;
}
.board-information .board-number-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.board-information .board-number-picker:focus-within {
  outline: 2px solid #728b7b;
  outline-offset: 2px;
}
.board-information .board-nav button {
  padding: 0;
  width: 18px;
  height: 23px;
  min-height: 0;
  color: #728b7b;
}
.board-information .board-nav button svg {
  width: 14px;
}
.unpublished-board {
  padding: 16px;
}
.unpublished-board .board-information {
  max-width: 240px;
  margin: 0 auto;
  padding: 12px;
}
.compass-center button.trick-card {
  color: inherit;
  cursor: pointer;
}
.compass-center button.trick-card.red-suit {
  color: #b54843;
}
.compass-center button.trick-card:hover {
  border-color: #658670;
}
.analysis-corner.board-metadata {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: min(18px, 10cqw);
}
.board-metadata span {
  white-space: nowrap;
}
.deal-panel .panel-heading .board-summary {
  display: block;
  line-height: 1.5;
}
.board-summary > span {
  font-size: 12px;
  font-weight: 400;
  color: #788478;
}
.board-results .table-round {
  white-space: nowrap;
}
.board-results table {
  table-layout: auto;
  width: 100%;
}
.board-results table th,
.board-results table td {
  padding: 14px 8px;
  text-align: center;
}
.board-results .traveller-sort {
  justify-content: center;
  margin-inline: auto;
}
.board-results table td:nth-child(2) {
  white-space: normal;
  overflow-wrap: anywhere;
}
.board-results th:first-child,
.board-results .table-round {
  width: 1%;
  padding-left: 10px;
  padding-right: 6px;
  white-space: nowrap;
}
.board-results .table-round small {
  font-size: 9px;
}
.board-results .score-neutral {
  color: #27332f;
}
.board-results .score-low {
  color: #b33a3d;
}
.board-results .score-high {
  color: #28784f;
}
.compass-center {
  grid-area: center;
  position: relative;
  container-type: inline-size;
}
.trick-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 30%;
  height: 44%;
  border: 1px solid #c9d6cd;
  border-radius: min(5px, 4cqw);
  background: #fffefa;
  box-shadow: 0 2px 3px #244b3814;
  font:
    700 min(24px, 20cqw)/1.05 'Source Serif 4',
    serif;
  font-variant-numeric: lining-nums tabular-nums;
  color: #244b38;
}
.trick-card-N {
  top: 0;
  left: 35%;
}
.trick-card-S {
  bottom: 0;
  left: 35%;
}
.trick-card-W {
  left: 0;
  top: 28%;
}
.trick-card-E {
  right: 0;
  top: 28%;
}
.trick-card.red-suit {
  color: #b54843;
}
.bridge-hand header.vulnerable {
  background: #f5dfdd;
  color: #863630;
}
.bridge-hand header.vulnerable b {
  background: #a84540;
}
.bridge-hand header {
  display: flex;
  align-items: center;
  gap: min(6px, 5cqw);
  height: min(29px, 23cqw);
  margin-bottom: min(10px, 7cqw);
  border-radius: 3px;
  background: #e7efe9;
  white-space: nowrap;
  font-size: min(13px, 13cqw);
}
.bridge-hand header b {
  display: grid;
  place-items: center;
  flex: 0 0 min(29px, 23cqw);
  height: 100%;
  background: #2b5a48;
  color: white;
  border-radius: 3px 0 0 3px;
  font-size: min(18px, 18cqw);
}
.hand-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bridge-suit {
  padding-left: 0.5em;
  display: grid;
  grid-template-columns: min(24px, 18cqw) minmax(0, 1fr);
  align-items: center;
  min-height: min(32px, 24cqw);
  padding-bottom: min(9px, 6.3cqw);
  line-height: 1.1;
}
.bridge-suit > b {
  font-family: 'Source Serif 4', 'Times New Roman', serif;
  font-size: min(26px, 20cqw);
  line-height: 1;
}
.bridge-suit .red {
  color: #b54843;
}
.bridge-ranks {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  font-family: 'IBM Plex Mono', monospace;
  font-size: min(22px, 14cqw);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: lining-nums tabular-nums;
  font-variant-ligatures: none;
}
.bridge-ranks span {
  display: inline;
}
.bridge-ranks .rank-string {
  display: inline-flex;
  vertical-align: middle;
  white-space: nowrap;
  transform-origin: left center;
}
.bridge-ranks .hand-card {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  display: inline-block;
  position: relative;
  width: min(30px, 10cqw);
  text-align: center;
}
.bridge-ranks .hand-card:disabled {
  opacity: 1;
}
.bridge-ranks .hand-card:not(:disabled) {
  cursor: pointer;
}
.bridge-ranks .hand-card:not(:disabled):hover,
.bridge-ranks .hand-card:focus-visible {
  background: #dcebe0;
  outline: 1px solid #7a9c85;
  border-radius: 2px;
}
.card-dd-value {
  position: absolute;
  bottom: -0.55em;
  left: 72%;
  transform: translateX(-50%);
  min-width: 1em;
  padding: 0.05em;
  border-radius: 1px;
  background: #b4d77980;
  color: #27401c;
  font:
    500 0.55em/1.1 'DM Sans',
    sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  text-align: center;
  letter-spacing: 0;
}
.card-dd-value.dd-inferior {
  background: #e8a19a80;
  color: #9c302a;
}
.par-corner .par-reference {
  font-size: min(11px, 10cqw);
  white-space: normal;
}
.side-active {
  color: #294b3e;
  font-weight: 600;
}
.side-muted {
  color: #939b94;
  font-weight: 400;
}
.bridge-ranks .opening-lead {
  background: #ffda6d;
  color: #2b2619;
  border-radius: 2px;
}
.analysis-corner {
  display: flex;
  flex-direction: column;
  gap: min(5px, 4cqw);
  justify-content: center;
  font-size: min(14px, 14cqw);
}
.analysis-corner.par-corner,
.analysis-corner.board-information {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: min(14px, 13cqw) min(34px, 32cqw) min(40px, 38cqw);
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: min(12px, 8cqw);
}
.analysis-corner.par-corner .corner-kicker,
.analysis-corner.board-information .corner-kicker {
  font:
    800 min(10px, 9cqw)/1.2 'DM Sans',
    sans-serif;
  letter-spacing: 0.04em;
  color: #728b7b;
}
.par-heading {
  display: flex;
  align-items: center;
}
.par-corner > .par-heading,
.board-information > .corner-kicker,
.par-corner > strong,
.board-information > .board-nav,
.board-information > .board-number {
  position: relative;
  top: 4px;
}
.par-corner > .par-heading,
.board-information > .corner-kicker {
  top: 10px;
}
.corner-kicker {
  color: #728b7b;
  font-size: min(10px, 9cqw);
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.par-corner strong,
.board-metadata span {
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  font-size: min(20px, 18cqw);
}
.par-corner strong.your-contract,
.board-metadata span.your-contract {
  white-space: nowrap;
}
.your-contract .contract-outcome {
  font-size: 0.55em;
  font-weight: 400;
}
.analysis-corner.par-corner strong.your-contract {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 0.12em;
  font-size: min(28px, 24cqw);
  max-width: 100%;
  padding-inline: 0.2em;
  box-sizing: border-box;
  white-space: nowrap;
}
.your-contract > span {
  white-space: nowrap;
}
.par-corner .contract-score {
  margin-top: 0;
  align-self: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.analysis-corner.par-corner .contract-score,
.analysis-corner.board-information .board-average {
  font-family: 'DM Sans', sans-serif;
  font-size: min(14px, 13cqw);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.par-corner .contract-score:focus-visible {
  outline: 2px solid #728b7b;
  outline-offset: 3px;
}
.par-corner small {
  font-size: min(12px, 11cqw);
  color: #7b5847;
  white-space: nowrap;
}
.hcp-compass {
  display: grid;
  grid-template: repeat(3, min(22px, 20cqw)) / repeat(3, min(22px, 20cqw));
  align-self: center;
  justify-items: center;
  align-items: center;
  font:
    700 min(17px, 16cqw) 'Source Serif 4',
    serif;
}
.hcp-compass span:nth-child(1) {
  grid-area: 1 / 2;
}
.hcp-compass span:nth-child(2) {
  grid-area: 2 / 1;
}
.hcp-compass span:nth-child(3) {
  grid-area: 2 / 3;
}
.hcp-compass span:nth-child(4) {
  grid-area: 3 / 2;
}
.compact-dd {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font:
    700 min(13px, 12cqw) 'Source Serif 4',
    serif;
}
.compact-dd th,
.compact-dd td {
  padding: 0;
  text-align: center;
  font-size: inherit;
  white-space: nowrap;
}
/* Match Valet's shared table styling within this standalone component. */
.compact-dd th {
  background: #fafbf7;
  color: #8b9485;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--line);
}
.compact-dd td {
  border-bottom: 1px solid #edf0e8;
}
.compact-dd tbody tr:hover {
  background: #fcfcf8;
}
.compact-dd tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}
.hcp-corner .hcp-metadata {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: min(3px, 2cqw);
  margin-bottom: min(7px, 5cqw);
  font:
    700 min(19px, 15cqw)/1.2 'Source Serif 4',
    serif;
  white-space: nowrap;
}
.compact-dd button {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: min(28px, 23cqw);
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #1d4d39;
  font: inherit;
  cursor: pointer;
}
.compact-dd button:hover,
.compact-dd button[aria-pressed='true'] {
  background: #c4dbca;
  border-color: #579673;
}
.deal-explorer .hcp-compass,
.deal-explorer .hcp-metadata,
.deal-explorer .compact-dd,
.deal-explorer .compact-dd button,
.deal-explorer .par-corner strong {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings:
    'lnum' 1,
    'tnum' 1;
}
.play-keyboard {
  margin: 10px 0 2px;
  padding: 8px;
  border: 1px solid #bad2c0;
  border-radius: 8px;
  background: #f1f7f2;
  min-width: 0;
}
.play-keyboard-heading {
  display: flex;
  align-items: center;
  gap: 5px;
}
.play-keyboard-heading strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.play-keyboard-heading button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #bad2c0;
  background: white;
  border-radius: 5px;
  cursor: pointer;
}
.play-context {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin: 5px 0 8px;
  color: #567161;
  font-size: 11px;
}
.play-context > span {
  white-space: nowrap;
}
.play-rack {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 1px;
  min-width: 0;
}
.rack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 74px;
  height: auto;
  padding: 11px 0;
  gap: 3px;
  border: 1px solid #9dbcaa;
  border-bottom: 3px solid #7a9c85;
  border-radius: 4px;
  background: #fffefa;
  color: #244b38;
  box-shadow: 0 2px 2px #244b3814;
  cursor: pointer;
}
.rack-card > span {
  font:
    700 clamp(12px, 5cqw, 22px)/1.1 'Source Serif 4',
    serif;
}
.rack-card > b {
  font:
    700 clamp(12px, 5cqw, 22px)/1.1 'Source Serif 4',
    serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.rack-card.red-suit {
  color: #b54843;
}
.rack-card:disabled {
  opacity: 0.4;
  cursor: default;
}
.rack-card:not(:disabled):hover {
  background: #e2f0df;
  border-color: #356b4f;
}
.rack-card:focus-visible {
  outline: 2px solid #356b4f;
  outline-offset: 1px;
}
.par-corner {
    font-size: min(18px, 10cqw);
  }
.par-corner .corner-kicker {
    font-size: min(12px, 7cqw);
  }
.par-corner strong,
  .par-corner strong.your-contract {
    font-size: min(28px, 14cqw);
  }
.par-corner small,
  .par-corner .par-reference {
    font-size: min(14px, 8cqw);
  }
.hcp-corner .hcp-metadata {
    font-size: min(24px, 13cqw);
  }
.hcp-compass {
    font-size: min(23px, 13cqw);
    grid-template: repeat(3, min(28px, 16cqw)) / repeat(3, min(30px, 17cqw));
  }

.board-export-actions {
  display: flex;
  border-top: 1px solid #e3e7df;
}
.analysis-corner.par-corner,
  .analysis-corner.board-information {
    grid-template-rows: min(22px, 14cqw) min(52px, 33cqw) min(58px, 36cqw);
    gap: min(16px, 9cqw);
  }
.analysis-corner.par-corner .corner-kicker,
  .analysis-corner.board-information .corner-kicker {
    font-size: min(14px, 8cqw);
  }
.analysis-corner.par-corner > strong,
  .analysis-corner.par-corner strong.your-contract,
  .analysis-corner.board-information .board-number {
    font-size: min(40px, 24cqw);
  }
.analysis-corner.par-corner .contract-score,
  .analysis-corner.board-information .board-average {
    font-size: min(21px, 12cqw);
  }
.board-information .board-nav.board-jump {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
  }
.board-information .board-nav button {
    width: 26px;
    height: 32px;
  }
.board-information .board-nav button svg {
    width: 20px;
    height: 20px;
  }

.analysis-corner .corner-score-value {
  font-size: 1.2em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.your-contract .contract-bid.red-suit {
  color: #bd4944;
}
.your-contract .contract-seat,
.your-contract .contract-outcome {
  color: #8c948b;
  font-family: 'DM Sans', 'Noto Sans TC', sans-serif;
  font-size: 0.55em;
  font-weight: 400;
}
.hand-perspective-button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: min(6px, 5cqw);
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hand-perspective-button[aria-pressed='true'] {
  outline: 2px solid #628672;
  outline-offset: 1px;
}
.hand-content {
  position: relative;
}
.hidden-hand {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.hcp-compass .hcp-partial {
  color: #b54843;
}
.hcp-compass .hcp-partial-value {
  position: relative;
  display: inline-block;
}
.hcp-partial-value sup {
  position: absolute;
  left: 100%;
  top: -0.15em;
  margin-left: 0.08em;
  font-size: 0.65em;
  line-height: 1;
}
.rack-card.played-card:disabled {
  opacity: 1;
}
.rack-card.played-card:disabled > span,
.rack-card.played-card:disabled > b {
  opacity: 0.45;
}

.bridge-ranks .hand-card.played-card:disabled {
  color: #9aa49f;
  background: transparent;
  text-shadow: none;
}
.par-corner .contract-score,
.board-information .board-average {
  display: block;
}

.bridge-ranks .void-rank {
  display: inline-block;
  flex-shrink: 0;
  width: min(30px, 10cqw);
  text-align: center;
}
