/* Shared readability and interaction rules, after both theme palettes. */
:root {
  --readable-secondary: #42594b;
  --keyboard-focus: #0b563b;
  --keyboard-focus-gap: #ffffff;
}

html[data-theme="dark"] {
  --readable-secondary: #bfd0c3;
  --keyboard-focus: #dcf878;
  --keyboard-focus-gap: #171c1b;
}

.card-circuit,
.row-title > span:first-child,
footer,
footer .footer-brand span {
  color: var(--readable-secondary);
}

.main-tabs [role="tab"]:not([data-state="active"]) {
  color: var(--readable-secondary) !important;
}

html :is(input, textarea)::placeholder {
  color: var(--readable-secondary);
  opacity: 1;
}

.background-live .row-title > .row-range {
  font-size: 13px;
  line-height: 1.5;
}

footer {
  font-size: 13px;
  line-height: 1.5;
}

footer a {
  min-height: 44px;
  align-content: center;
}

.tournament-card h3 a {
  display: inline-block;
  padding-block: 2px;
}

@media (max-width: 640px) {
  .app-shell footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
  }

  .app-shell footer .footer-brand {
    grid-column: 1 / -1;
  }
}

/* A two-color focus indicator remains clear on light and dark controls. */
html :where(a, button, input, textarea, select, summary, [role="tab"], [role="combobox"]):focus-visible {
  outline: 3px solid var(--keyboard-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 3px var(--keyboard-focus-gap) !important;
}

/* The search wrapper supplies the ring, avoiding a clipped inner outline. */
html .search-field input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

html .search-field:has(input:focus-visible) {
  outline: 3px solid var(--keyboard-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--keyboard-focus-gap);
}

@media (forced-colors: active) {
  html :where(a, button, input, textarea, select, summary, [role="tab"], [role="combobox"]):focus-visible,
  html .search-field:has(input:focus-visible) {
    outline-color: Highlight !important;
    box-shadow: none !important;
  }
}

/* Keep search next to the calendar; place supporting data after its results. */
.workspace .calendar-tabs > .filters {
  margin-bottom: 4px;
}

.workspace .calendar-tabs > [data-slot="tabs-content"] > .live-section {
  margin-top: 8px;
}

.workspace .calendar-metadata {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.workspace .calendar-result-count {
  margin: 0;
  color: var(--readable-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.workspace .calendar-metadata .data-status {
  margin: 0;
}

@media (max-width: 640px) {
  .workspace .calendar-metadata {
    margin-top: 16px;
    padding-top: 12px;
  }
}

/* Compact tournament cards without shortening names or hiding information. */
@media (max-width: 640px) {
  .workspace .live-section .tournament-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    column-gap: 8px;
  }

  .workspace .live-section .tournament-card h3 {
    font-size: 20px;
    line-height: 1.25;
  }

  .workspace .live-section .tournament-card h3 a {
    max-width: 100%;
    padding-block: 0;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .workspace .upcoming-section .row-title h3 {
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .workspace .live-section .card-date,
  .workspace .live-section .card-action {
    min-width: 0;
    margin: 8px 0 0;
    align-self: center;
  }

  .workspace .live-section .card-date {
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
  }

  .workspace .live-section .card-action {
    width: 100%;
    padding-inline: 10px;
    gap: 6px;
    white-space: normal;
  }

  .workspace .live-section .card-current-program {
    margin-top: 6px;
  }
}

/* Clearer tournament navigation, with the same content and actions. */
.event-dialog .detail-tabs [role="tab"] {
  border: 2px solid transparent;
  border-radius: 8px;
}

html:not([data-theme="dark"]) .event-dialog .detail-tabs [role="tab"][data-state="active"] {
  border-color: #b9ec39;
  background: #075637;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 2px 5px rgb(15 62 40 / 16%);
}

html[data-theme="dark"] .event-dialog .detail-tabs [role="tab"][data-state="active"] {
  border-color: #c8f85a;
  background: #36583e;
  color: #efffd3;
  font-weight: 750;
  box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
}

.event-dialog .tournament-documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted);
}

.event-dialog .tournament-documents > a.small-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.event-dialog .source-original,
.event-dialog .watch-other-sources {
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--readable-secondary);
}

.event-dialog .source-original > summary,
.event-dialog .watch-other-sources > summary {
  display: list-item;
  min-height: 44px;
  padding-block: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.event-dialog .tournament-secondary {
  gap: 4px 16px;
  padding-top: 8px;
  color: var(--readable-secondary);
}

.event-dialog .tournament-secondary > a,
.event-dialog .tournament-secondary > details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 640px) {
  .event-dialog {
    gap: 12px !important;
  }

  .event-dialog [data-slot="dialog-header"] {
    gap: 6px;
    padding-right: 0;
  }

  .event-dialog .dialog-kicker {
    min-height: 24px;
    margin-bottom: 0;
    padding-right: 44px;
  }

  .event-dialog .dialog-title {
    font-size: 20px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .event-dialog .tournament-state {
    padding: 3px 8px;
  }

  .event-dialog .detail-tabs {
    margin-bottom: 4px;
  }

  .event-dialog .tournament-documents {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }
}

/* One compact row for tournament sections on wider screens. */
@media (min-width: 641px) {
  .event-dialog .detail-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .event-dialog .detail-tabs [role="tab"],
  .event-dialog .detail-tabs [role="tab"]:nth-child(n+4) {
    grid-column: auto;
    font-size: 14px;
  }
}

/* Shared hierarchy for existing primary and secondary actions. */
:root {
  --action-primary-bg: #075637;
  --action-primary-fg: #fff;
  --action-primary-border: #064a30;
  --action-primary-hover: #06452d;
  --action-secondary-bg: #f9fcf6;
  --action-secondary-border: #92ad8a;
}

html[data-theme="dark"] {
  --action-primary-bg: #d5f98c;
  --action-primary-fg: #173723;
  --action-primary-border: #b6d771;
  --action-primary-hover: #c4ec76;
  --action-secondary-bg: #232c28;
  --action-secondary-border: #647a64;
}

html .event-dialog .tournament-documents > .small-button,
html .event-dialog .watch-heading > .small-button,
html .workspace .ranking-pagination .small-button,
html .player-dialog .profile-links > a.small-button,
html .favorite-player-alerts > summary {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--action-secondary-border);
  border-radius: 8px;
  background: var(--action-secondary-bg);
  color: var(--readable-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

html .primary-link,
html[data-theme="dark"] .primary-link,
html .background-live .tournament-card .card-action,
html .workspace .favorites-section .favorite-results,
html .workspace .followed-player-actions > button.small-button,
html :is(.event-dialog, .workspace) .watch-open.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--action-primary-border);
  border-radius: 8px;
  background: var(--action-primary-bg);
  color: var(--action-primary-fg) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
}

html .background-live .tournament-card .card-action > svg {
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

@media (hover: hover) {
  html .primary-link:hover,
  html[data-theme="dark"] .primary-link:hover,
  html .background-live .tournament-card .card-action:hover,
  html .workspace .favorites-section .favorite-results:hover,
  html .workspace .followed-player-actions > button.small-button:hover,
  html :is(.event-dialog, .workspace) .watch-open.small-button:hover {
    background: var(--action-primary-hover);
    border-color: var(--action-primary-border);
  }
}

/* Keep names, dates and direct actions prominent in favorites. */
.favorites-section .favorite-tournament-card {
  padding: 16px;
}

.favorite-tournament-top {
  gap: 10px;
}

.favorite-tournament-open {
  gap: 10px;
}

.favorite-tournament-open .row-title {
  min-width: 0;
}

.favorite-tournament-open h3 {
  line-height: 1.3;
  text-wrap: balance;
}

.favorite-tournament-meta {
  gap: 8px;
  margin-top: 8px;
}

.favorite-verified {
  margin: 6px 0 8px;
  line-height: 1.5;
}

.favorite-tournament-actions,
.followed-player-actions {
  gap: 8px;
  padding-top: 8px;
}

.followed-player-card {
  padding: 16px;
}

.followed-player-stats {
  gap: 8px;
  margin-top: 10px;
}

.followed-player-stats > div {
  padding: 8px 10px;
}

.followed-player-stats dd {
  margin-top: 2px;
  font-size: 22px;
}

@media (max-width: 640px) {
  .favorites-section .favorite-tournament-card,
  .followed-player-card {
    padding: 12px;
  }

  .favorite-tournament-open h3 {
    font-size: 17px;
    margin: 3px 0;
  }

  .favorite-tournament-open .row-title > span:not(.row-range) {
    font-size: 11px;
  }

  .favorite-tournament-actions {
    display: grid;
    grid-template-columns: minmax(88px, .75fr) minmax(0, 1.25fr);
    align-items: center;
  }

  .favorite-tournament-actions > .tournament-alerts {
    min-width: 0;
    padding: 8px;
  }

  .favorite-tournament-actions > .tournament-alerts[open] {
    grid-column: 1 / -1;
  }

  .favorite-tournament-actions > .tournament-alerts summary {
    gap: 4px 6px;
    min-height: 44px;
    font-size: 13px;
    line-height: 1.35;
  }

  .favorite-tournament-actions > .tournament-alerts summary small {
    width: 100%;
    margin-left: 0;
    padding-left: 22px;
    font-size: 12px;
    line-height: 1.35;
  }

  html .workspace .favorites-section .favorite-results {
    width: 100%;
    padding-inline: 8px;
    font-size: 13px;
  }

  .followed-player-stats dd {
    font-size: 20px;
  }
}

/* Keep the mobile dialog heading and native close control in the scrollport. */
@media (max-width: 640px) {
  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) {
    padding-top: 16px !important;
    padding-inline: 16px !important;
    scroll-padding-top: 200px;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] {
    position: sticky;
    top: -16px;
    z-index: 3;
    grid-row: 1;
    grid-column: 1;
    align-self: start;
    margin: -16px -16px 0;
    padding: 16px 60px 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #fff;
    text-align: left;
  }

  .padel-dialog-position.event-dialog .dialog-kicker {
    padding-right: 0;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] .share-title-row {
    padding-right: 0;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-close"] {
    position: sticky !important;
    top: 8px;
    right: auto;
    z-index: 4;
    grid-row: 1;
    grid-column: 1;
    align-self: start;
    justify-self: end;
    width: 44px;
    height: 44px;
    margin-top: -8px;
    margin-right: -8px;
    opacity: 1;
  }

  html[data-theme="dark"] .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"],
  html[data-theme="dark"] .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-close"] {
    background: #232c28;
    color: #edf5e8;
  }
}

/* Reserve the same content area before source data and lazy panels arrive. */
.event-dialog > [data-slot="tabs"] > [data-slot="tabs-content"][data-state="active"] {
  min-block-size: min(320px, 60dvh);
}

.event-dialog > [data-slot="tabs"] > [data-slot="tabs-content"][aria-labelledby$="-trigger-program"][data-state="active"] {
  min-block-size: min(540px, 60dvh);
}

.event-dialog > [data-slot="tabs"] > [data-slot="tabs-content"][data-state="active"]:has(> .results-toolbar) {
  min-block-size: 700px;
}

.event-dialog .results-toolbar > div {
  min-height: 44px;
}

.event-dialog .score-loading {
  min-height: 610px;
}

@media (max-width: 640px) {
  .event-dialog > [data-slot="tabs"] > [data-slot="tabs-content"][data-state="active"]:has(> .results-toolbar) {
    min-block-size: calc(max(300px, 60dvh) + 250px);
  }

  .event-dialog .score-loading {
    min-height: calc(max(300px, 60dvh) + 140px);
  }

  .event-dialog .results-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .event-dialog .results-toolbar > div {
    width: 100%;
  }

  .event-dialog .results-toolbar > div > .icon-button:last-child {
    margin-left: auto;
  }
}

/* Brief visual acknowledgement, without changing handlers or layout. */
:is(.app-shell, .padel-dialog-position) :is(
  .card-action, .event-row-main, .favorite-tournament-open, .favorite-button,
  .small-button, .primary-link, .text-button, .notification-button, .account-button,
  .player-name-button, .share-icon, .icon-button, [data-slot="tabs-trigger"], [data-slot="dialog-close"]
) {
  transition: scale 120ms ease-out, filter 120ms ease-out, background-color 150ms ease-out,
    border-color 150ms ease-out, box-shadow 150ms ease-out;
}

:is(.app-shell, .padel-dialog-position) :is(
  .card-action, .event-row-main, .favorite-tournament-open, .favorite-button,
  .small-button, .primary-link, .text-button, .notification-button, .account-button,
  .player-name-button, .share-icon, .icon-button, [data-slot="tabs-trigger"], [data-slot="dialog-close"]
):not(:disabled):not([aria-disabled="true"]):active {
  transform: none;
  scale: .985;
  filter: brightness(.92);
}

@media (prefers-reduced-motion: reduce) {
  :is(.app-shell, .padel-dialog-position) :is(
    .card-action, .event-row-main, .favorite-tournament-open, .favorite-button,
    .small-button, .primary-link, .text-button, .notification-button, .account-button,
    .player-name-button, .share-icon, .icon-button, [data-slot="tabs-trigger"], [data-slot="dialog-close"]
  ) {
    transition: none;
  }

  :is(.app-shell, .padel-dialog-position) :is(
    .card-action, .event-row-main, .favorite-tournament-open, .favorite-button,
    .small-button, .primary-link, .text-button, .notification-button, .account-button,
    .player-name-button, .share-icon, .icon-button, [data-slot="tabs-trigger"], [data-slot="dialog-close"]
  ):not(:disabled):not([aria-disabled="true"]):active {
    scale: none;
  }
}

/* Give the selected tournament section a distinct, consistent appearance. */
html:not([data-theme="dark"]) .event-dialog .detail-tabs [role="tab"][data-state="active"] {
  background: #064c31;
  color: #e0ff9e;
  border-color: #83b934;
  font-weight: 800;
  box-shadow: inset 0 -3px #c8ff38, 0 2px 4px rgb(15 62 40 / 12%);
}

html[data-theme="dark"] .event-dialog .detail-tabs [role="tab"][data-state="active"] {
  background: #dcff9f;
  color: #153724;
  border-color: #b7e86b;
  font-weight: 800;
  box-shadow: inset 0 -3px #a4d95c, 0 2px 4px rgb(0 0 0 / 20%);
}

/* Compact sticky headings without hiding names, dates or close/share actions. */
@media (max-width: 640px) {
  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] {
    gap: 5px;
    padding: 12px 16px 10px;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] .share-title-row {
    padding-right: 48px;
    align-items: flex-start;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] [data-slot="dialog-title"] {
    font-size: 20px !important;
    line-height: 1.2 !important;
    letter-spacing: -.3px;
  }

  .padel-dialog-position.account-dialog > [data-slot="dialog-header"] [data-slot="dialog-title"] {
    padding-right: 48px;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog) .dialog-kicker {
    min-height: 0;
    padding-right: 48px;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: .9px;
  }

  .padel-dialog-position:is(.event-dialog, .player-dialog, .account-dialog) > [data-slot="dialog-header"] [data-slot="dialog-description"] {
    font-size: 12px !important;
    line-height: 1.4;
  }

  .event-dialog .tournament-description {
    flex-direction: row;
    gap: 4px 12px;
  }

  .event-dialog .tournament-description > span {
    gap: 4px;
  }

  .event-dialog .tournament-state {
    font-size: 11px;
    padding: 3px 7px;
  }
}

/* Lay out the published source rows without assigning a new day or time. */
.source-schedule .program-days {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

.source-schedule .program-day {
  min-width: 0;
  padding: 8px 4px;
  border-bottom: 1px solid #cbdcc2;
}

.source-schedule .program-day:last-child {
  border-bottom: 0;
}

.source-schedule .program-entry,
.source-schedule .program-day-heading {
  margin: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.source-schedule .program-day-heading,
.source-schedule .program-round {
  font-weight: 750;
  color: #164f34;
}

.source-schedule .program-section {
  padding: 7px 10px;
  margin-top: 10px;
  border: 1px solid #bdd4b3;
  border-left: 3px solid #518645;
  border-radius: 6px;
  background: #e2f1d7;
}

.source-schedule .program-section:first-child {
  margin-top: 0;
}

.source-schedule .program-time {
  display: inline-block;
  max-width: 100%;
  margin: 2px 0;
  padding: 2px 6px;
  border: 1px solid #b9d39e;
  border-radius: 5px;
  background: #e6f8d1;
  color: #244925;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .source-schedule .program-day {
  border-bottom-color: #45594b;
}

html[data-theme="dark"] .source-schedule :is(.program-day-heading, .program-round) {
  color: #dbf5ba;
}

html[data-theme="dark"] .source-schedule .program-section {
  background: #2e4431;
  border-color: #5c7657;
  border-left-color: #b2dd6c;
}

html[data-theme="dark"] .source-schedule .program-time {
  background: #384e2c;
  border-color: #69854a;
  color: #ecffd7;
}

/* Compact published programs; source order and clock notation are unchanged. */
.source-schedule .program-day {
  padding: 5px 3px;
}
.source-schedule :is(.program-entry, .program-day-heading) {
  line-height: 1.45;
}
.source-schedule .program-section {
  padding: 6px 9px;
  margin-top: 7px;
}
.source-schedule .program-time {
  margin: 1px 0;
  padding: 1px 6px;
}

/* Shared secondary-action surface, scoped to tournament details. */
html .event-dialog .share-title-row .share-icon,
html .event-dialog .tournament-calendar-secondary .add-calendar,
html .event-dialog .tournament-secondary > a,
html .tournament-document-link {
  border: 1px solid var(--action-secondary-border);
  border-radius: 8px;
  background: var(--action-secondary-bg);
  color: var(--readable-secondary);
  box-shadow: 0 2px 4px rgb(20 52 34 / 7%);
}
html .event-dialog .share-title-row .share-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}
html .event-dialog .tournament-calendar-secondary .add-calendar > summary,
html .event-dialog .tournament-secondary > a {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 650;
}
html .event-dialog .tournament-secondary > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
html .event-dialog :is(.share-icon, .tournament-secondary > a, .tournament-document-link):focus-visible {
  outline: 2px solid var(--action-secondary-border);
  outline-offset: 3px;
}

/* Official documents: title and an explicitly published date, never inferred. */
html .event-dialog .tournament-documents > a.tournament-document-link,
html .tournament-public-page .tournament-document-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
}
html .tournament-document-link > svg.tournament-document-icon {
  width: 28px;
  height: 32px;
  flex-shrink: 0;
  color: var(--readable-secondary);
}
.tournament-document-copy {
  display: grid;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.tournament-document-title {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.tournament-document-date {
  font-size: 12px;
  line-height: 1.35;
  color: var(--readable-secondary);
  font-variant-numeric: tabular-nums;
}
html .tournament-document-link > svg.tournament-document-arrow {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
@media (hover: hover) {
  html .event-dialog .share-title-row .share-icon:hover,
  html .event-dialog .tournament-secondary > a:hover,
  html .event-dialog .tournament-documents > a.tournament-document-link:hover,
  html .event-dialog .tournament-calendar-secondary .add-calendar > summary:hover {
    filter: brightness(.97);
    border-color: var(--readable-secondary);
  }
}
@media (max-width: 640px) {
  html .event-dialog .tournament-documents {
    gap: 7px;
    padding: 8px;
  }
  html .event-dialog .tournament-documents > a.tournament-document-link,
  html .tournament-public-page .tournament-document-link {
    min-height: 52px;
    padding: 9px 10px;
  }
}

/* The same document/actions style on the public tournament page. */
html .tournament-public-page .share-title-row .share-icon,
html .tournament-public-page .add-calendar,
html .tournament-public-page .tournament-official-source {
  border: 1px solid var(--action-secondary-border);
  border-radius: 8px;
  background: var(--action-secondary-bg);
  color: var(--readable-secondary);
  box-shadow: 0 2px 4px rgb(20 52 34 / 7%);
}
html .tournament-public-page .share-title-row .share-icon {
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
}
html .tournament-public-page .add-calendar > summary,
html .tournament-public-page .tournament-official-source {
  min-height: 44px; padding: 9px 12px; font-size: 14px;
  line-height: 1.45; font-weight: 650;
}
html .tournament-public-page .tournament-official-source {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
html .tournament-public-page .tournament-document-link + .tournament-document-link {
  margin-top: 7px;
}
html .tournament-public-page :is(.share-icon, .tournament-official-source, .tournament-document-link):focus-visible {
  outline: 2px solid var(--action-secondary-border); outline-offset: 3px;
}

/* Typing must keep the search/results area free of phone navigation. */
@media (max-width: 640px) {
  html[data-phone="true"][data-phone-keyboard="true"] .phone-navigation-slot,
  html[data-phone="true"][data-phone-keyboard="true"] .main-tabs,
  html[data-phone="true"][data-phone-keyboard="true"] .theme-toggle {
    display: none !important;
  }
  html[data-phone="true"][data-phone-keyboard="true"] .workspace {
    padding-bottom: 20px;
  }
}

/* Search rows remain readable and compact while ranking data arrives. */
.unified-search-results .unified-search-player-status {
  min-height: 42px;
  padding: 3px 0 5px;
}
.unified-search-results .unified-search-player-status p {
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 20px;
}
.unified-search-results .unified-search-player-status button {
  min-height: 44px;
  padding: 4px 8px;
}
.unified-search-results .unified-search-note {
  margin: 0 0 5px;
}
.unified-search-results .unified-search-list {
  margin-top: 4px;
}
.unified-search-results .unified-search-result {
  min-height: 44px;
  padding: 14px 0;
}
.unified-search-results .unified-search-body {
  gap: 3px;
}
.unified-search-results .unified-search-body > strong {
  font-weight: 750;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .unified-search-results .unified-search-result {
    padding: 11px 0;
    gap: 9px;
  }
  .unified-search-results .unified-search-body {
    gap: 2px;
  }
  .unified-search-results .unified-search-body > strong {
    font-size: 17px;
  }
  .unified-search-results .unified-search-body > span {
    font-size: 13px;
    line-height: 1.4;
  }
  .unified-search-results .unified-search-calendar {
    width: 40px;
  }
  .unified-search-results .unified-search-avatar {
    width: 34px;
    height: 34px;
  }
}

/* Decorative motion runs only while its scene can be seen. */
.intro-ball-scene[data-motion-paused="true"] .intro-padel-ball,
.intro-ball-scene[data-motion-paused="true"] .intro-ball-shadow,
.intro-ball-scene[data-motion-paused="true"]::before,
.padel-ambient[data-motion-paused="true"] .padel-wash {
 animation-play-state: paused !important;
}

/* A compact entry to comparison keeps rankings immediately available. */
.ranking-comparison{margin:0 0 20px}
.ranking-comparison-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:12px 16px;border:2px solid #173e30;border-radius:12px;background:linear-gradient(120deg,#effbe6,#fff);color:#173e30;font-size:16px;font-weight:650;text-align:left}
.ranking-comparison-toggle:focus-visible{outline:3px solid #57b65d;outline-offset:3px}
.ranking-comparison-action{margin-left:auto;font-size:13px;font-weight:600;white-space:nowrap}
.ranking-comparison .player-comparison{margin:12px 0 0}
html[data-theme="dark"] .ranking-comparison-toggle{background:linear-gradient(120deg,#243e30,#202724);color:#dafaaf;border-color:#94c579}
@media(max-width:640px){.ranking-comparison{margin-bottom:16px}.ranking-comparison-toggle{padding:10px 12px;font-size:15px}}

/* Consistent tournament opening, explicit saved/alert states and quiet utilities. */
html .workspace .tournament-open-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid #145339;
  border-radius: 9px;
  background: #164e38;
  color: #edffcd;
  box-shadow: 0 2px 5px rgb(20 52 34 / 12%);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
}
html .workspace .tournament-open-action > svg {
  width: 17px;
  height: 17px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
}
html .workspace .event-row-main > .row-open-action {
  margin-left: auto;
  flex-shrink: 0;
}
html .workspace .tournament-open-action:focus-visible,
html .workspace .event-row-main:focus-visible {
  outline: 3px solid #289953;
  outline-offset: 3px;
}
html .event-dialog .tournament-follow .favorite-with-label {
  border: 1.5px solid #63846c;
  background: #f7faf5;
  color: #254c35;
  box-shadow: none;
}
html .event-dialog .tournament-follow .favorite-with-label.is-saved {
  border-color: #497c35;
  background: #ddf6b9;
  color: #214b2a;
}
html :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts {
  border: 1.5px solid #bdcdbf;
  background: #f7faf7;
  box-shadow: none;
}
html :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts summary {
  color: #294c38;
}
html :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts summary small {
  padding: 3px 7px;
  border: 1px solid #c9d4ca;
  border-radius: 6px;
  background: #eef3ed;
  color: #49604c;
  font-weight: 650;
  line-height: 1.4;
}
html :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts[data-alert-state="active"] summary small {
  background: #def4bc;
  border-color: #90af72;
  color: #264b27;
}
html :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts[data-alert-state="unavailable"] summary small {
  background: #fff3dd;
  border-color: #c4a16a;
  color: #654714;
}
html :is(.event-dialog, .player-dialog, .tournament-public-page) .share-title-row .share-icon,
html :is(.event-dialog, .tournament-public-page) .add-calendar,
html .event-dialog .tournament-secondary > a,
html .tournament-public-page .tournament-official-source {
  border: 1px solid #aebfb1;
  background: #f7faf5;
  color: #3a5943;
  box-shadow: none;
}
html .event-dialog .upcoming-detail > a[target="_blank"],
html .event-dialog .result-empty > a[target="_blank"],
html .player-dialog .profile-links > a[target="_blank"] {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #aebfb1;
  background: #f7faf5;
  color: #3a5943;
  box-shadow: none;
  font-weight: 600;
}
html[data-theme="dark"] .workspace .tournament-open-action {
  border-color: #a3d772;
  background: #d5f99f;
  color: #14281b;
}
html[data-theme="dark"] .event-dialog .tournament-follow .favorite-with-label,
html[data-theme="dark"] :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts {
  border-color: #647867;
  background: #242f28;
  color: #daead7;
}
html[data-theme="dark"] .event-dialog .tournament-follow .favorite-with-label.is-saved {
  border-color: #a1ca76;
  background: #354b29;
  color: #d6f7b5;
}
html[data-theme="dark"] :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts summary {
  color: #daead7;
}
html[data-theme="dark"] :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts summary small {
  border-color: #657468;
  background: #2c372e;
  color: #d0deca;
}
html[data-theme="dark"] :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts[data-alert-state="active"] summary small {
  border-color: #96b573;
  background: #36502c;
  color: #daf8bb;
}
html[data-theme="dark"] :is(.tournament-follow, .favorite-tournament-actions) .tournament-alerts[data-alert-state="unavailable"] summary small {
  border-color: #b69459;
  background: #4b3923;
  color: #ffe2a8;
}
html[data-theme="dark"] :is(.event-dialog, .player-dialog, .tournament-public-page) .share-title-row .share-icon,
html[data-theme="dark"] :is(.event-dialog, .tournament-public-page) .add-calendar,
html[data-theme="dark"] .event-dialog .tournament-secondary > a,
html[data-theme="dark"] .tournament-public-page .tournament-official-source,
html[data-theme="dark"] .event-dialog .upcoming-detail > a[target="_blank"],
html[data-theme="dark"] .event-dialog .result-empty > a[target="_blank"],
html[data-theme="dark"] .player-dialog .profile-links > a[target="_blank"] {
  border-color: #637566;
  background: #242f28;
  color: #d5e2ce;
}
@media (hover: hover) {
  html .workspace .tournament-open-action:hover,
  html .workspace .event-row-main:hover > .row-open-action {
    filter: brightness(1.08);
  }
}
@media (max-width: 640px) {
  html .workspace .event-row-main > .row-open-action {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 13px;
  }
  html .workspace .favorite-tournament-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }
  html .workspace .favorites-section .favorite-results {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 10px;
  }
  html .workspace .favorite-tournament-actions > .tournament-alerts {
    flex: 1 1 165px;
    min-width: 0;
  }
  html .workspace .favorite-tournament-actions > .tournament-alerts[open] {
    flex-basis: 100%;
  }
}

/* Individual removable calendar filters and honest refresh notices. */
.calendar-selection .filter-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0;border:0}
.calendar-selection .filter-chip{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:6px 10px;background:#e9f6db;color:#234a32;border:1.5px solid #6a8b56;border-radius:9px;font-size:13px;font-weight:650;line-height:1.3;text-align:left;max-width:100%}
.filter-chip>span:first-child{overflow-wrap:anywhere}
.filter-chip-remove{flex-shrink:0;font-size:20px;line-height:1}
.filter-chip:hover{background:#d9efc4}
.filter-chip:focus-visible{outline:3px solid #39885d;outline-offset:3px}
.resource-updating{font-size:13px;color:#375a43;line-height:1.5;padding:8px 10px;background:#eef7e6;border-left:3px solid #749b4c;border-radius:5px;margin:8px 0}
html[data-theme="dark"] .calendar-selection .filter-chip{background:#2f4029;border-color:#85a568;color:#edffda}
html[data-theme="dark"] .filter-chip:hover{background:#3b5232}
html[data-theme="dark"] .resource-updating{color:#d6e8c8;background:#293828;border-color:#9abc68}
@media(max-width:640px){.calendar-selection{gap:6px;margin:8px 0 12px}.calendar-selection .filter-chip{min-height:40px;padding:6px 9px;font-size:12px}}

/* Compact mobile results without hiding names, scores or source status. */
@media(max-width:640px){html ._panel_p4co2_1{padding:16px;margin:16px 0}html ._matches_p4co2_1{gap:10px;margin:12px 0}html ._match_p4co2_1{padding:11px}html ._heading_p4co2_1{gap:4px 8px}html ._panel_p4co2_1 h2{font-size:21px;margin-bottom:10px}}

/* Compact rows while retaining readable set scores and winner labels. */
@media(max-width:640px){html ._wrap_fwwm3_1{margin-top:6px}html ._board_fwwm3_2{border-spacing:0 4px}html ._pair_fwwm3_4{padding:8px;line-height:1.3}html ._pair_fwwm3_4 small{margin-top:3px}html ._score_fwwm3_11{min-height:34px;font-size:18px;padding:4px 2px}}
@media(max-width:420px){html ._pair_fwwm3_4{padding:7px 6px}html ._score_fwwm3_11{font-size:17px;min-height:32px}}

/* Compact existing daily match blocks on phones. */
@media(max-width:640px){html ._matchBlock_1ehwd_48{padding:10px 0;margin-top:10px}html ._matchBlock_1ehwd_48 h3{margin-bottom:6px;font-size:15px}}

@media(max-width:640px){html .workspace .upcoming-section .event-list{gap:9px}html .workspace .upcoming-section .event-row{position:relative;padding:10px;gap:0!important;align-items:stretch}html .workspace .upcoming-section .event-row-main{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:9px;row-gap:7px;width:100%}html .workspace .upcoming-section .event-row-main .date-block{grid-column:1;grid-row:1;align-self:center;width:48px;min-width:48px}html .workspace .upcoming-section .date-block strong{padding:6px 2px;font-size:24px!important}html .workspace .upcoming-section .date-block span{padding:4px 2px;font-size:11px;letter-spacing:.5px}html .workspace .upcoming-section .row-title{grid-column:2;grid-row:1;display:flex;flex-wrap:wrap;align-items:center;gap:3px 7px;min-width:0}html .workspace .upcoming-section .row-title>span:first-child{flex-basis:100%;font-size:10px;line-height:1.25;letter-spacing:.4px}html .workspace .upcoming-section .row-title h3{flex-basis:100%;font-size:16px;line-height:1.25;margin:0;overflow-wrap:anywhere}html .workspace .upcoming-section .row-title>.row-range{margin:0;font-size:14px;font-weight:600;line-height:1.4}html .workspace .upcoming-section .row-title>.tournament-countdown{margin:0;padding:3px 6px;font-size:13px;font-weight:700;line-height:1.3;gap:4px}html .workspace .upcoming-section .tournament-countdown>svg{width:14px;height:14px}html .workspace .upcoming-section .event-row-main>.tier{grid-column:1/-1;grid-row:2;justify-self:start;align-self:center;max-width:calc(100% - 164px);font-size:11px;padding:3px 6px;white-space:normal}html .workspace .upcoming-section .event-row-main>.row-open-action{grid-column:1/-1;grid-row:2;justify-self:end;align-self:center;margin:0 52px 0 0;min-height:36px;padding:6px 9px;font-size:12px}html .workspace .upcoming-section .event-row>.favorite-button{position:absolute;right:10px;bottom:8px;width:44px;height:44px}html .workspace .upcoming-section>.section-heading{margin-bottom:10px}html .workspace .live-section+.upcoming-section{margin-top:22px;padding-top:16px}}

/* Favorites refinement: shared actions, readable compact cards and expandable verification. */
html .workspace :is(.tournament-open-action, .primary-entry-action) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid var(--action-primary-border);
  border-radius: 9px;
  background: var(--action-primary-bg);
  color: var(--action-primary-fg) !important;
  font-size: .875rem !important;
  font-weight: 750;
  line-height: 1.4;
  white-space: normal;
}
html .workspace :is(.tournament-open-action, .primary-entry-action) > svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
html .workspace :is(.favorite-tournament-actions, .followed-player-actions) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  align-items: start;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
}
html .workspace .favorites-section .favorite-results {
  width: 100%;
}
html .workspace :is(.favorite-tournament-actions, .followed-player-actions) > details {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--action-secondary-border);
  border-radius: 9px;
  background: var(--action-secondary-bg);
}
html .workspace :is(.favorite-tournament-actions, .followed-player-actions) > details[open] {
  grid-column: 1 / -1;
}
html .workspace :is(.favorite-tournament-actions, .followed-player-actions) > details > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--readable-secondary);
  font-size: .875rem;
  line-height: 1.4;
  font-weight: 650;
  overflow-wrap: anywhere;
  cursor: pointer;
}
html .workspace .favorite-tournament-actions > details > summary small {
  width: auto;
  margin: 0;
  padding: 1px 5px;
  font-size: .75rem;
}
html .workspace :is(.favorite-tournament-actions, .followed-player-actions) > details[open] > :not(summary) {
  margin-inline: 10px;
  margin-block: 8px;
}
.favorite-verification {
  margin-top: 4px;
  min-width: 0;
  color: var(--readable-secondary);
}
.favorite-verification > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  min-height: 44px;
  font-size: .75rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.favorite-verification > summary::-webkit-details-marker { display: none; }
.favorite-verification > summary::after { content: '⌄'; margin-left: auto; font-size: 1rem; }
.favorite-verification[open] > summary::after { content: '⌃'; }
.favorite-verification > summary > span:first-child { font-weight: 650; }
.favorite-verification .favorite-verified { margin: 0 0 6px; font-size: .75rem; line-height: 1.5; }
html :is(.favorite-button, .share-icon, .icon-button, .filter-chip) {
  min-width: 44px;
  min-height: 44px;
}
html :is(.small-button, .tournament-alerts > summary, .favorite-player-alerts > summary) { min-height: 44px; }
html :is(.favorite-button, .share-icon, .icon-button, .filter-chip, .favorite-verification > summary) {
  scroll-margin-block: 100px;
}
@media (hover: hover) {
  html .workspace :is(.tournament-open-action, .primary-entry-action):hover {
    background: var(--action-primary-hover);
    filter: none;
  }
}
@media (max-width: 640px) {
  html .workspace .favorites-section .event-list { gap: 10px; }
  html .workspace :is(.favorite-tournament-card, .followed-player-card) { padding: 12px; }
  html .workspace :is(.favorite-tournament-top, .followed-player-top) { gap: 8px; align-items: flex-start; }
  html .workspace .favorite-tournament-open { gap: 9px; align-items: center; }
  html .workspace .favorite-tournament-open .date-block {
    display: flex;
    flex-direction: column;
    width: 3rem;
    min-width: 3rem;
    padding: 0;
    box-sizing: border-box;
  }
  html .workspace .favorite-tournament-open .date-block strong { padding: 5px 2px; font-size: 1.5rem !important; }
  html .workspace .favorite-tournament-open .date-block span { width: 100%; padding: 4px 2px; font-size: .6875rem; letter-spacing: .4px; }
  html .workspace .favorite-tournament-open h3 { margin: 2px 0 3px; font-size: 1.0625rem; line-height: 1.3; text-wrap: pretty; }
  html .workspace .favorite-tournament-open .row-title > .row-range { margin-top: 2px; font-size: .8125rem; line-height: 1.4; }
  html .workspace .favorite-tournament-meta { margin-top: 8px; gap: 6px; }
  html .workspace .favorite-tournament-meta .favorite-state { font-size: .875rem; }
  html .workspace .followed-player-top .player-name-button { gap: 8px; min-height: 44px; }
  html .workspace .followed-player-top .player-name-button > span { font-size: 1rem; line-height: 1.35; }
  html .workspace .followed-player-top .player-name-button small { margin-top: 2px; font-size: .75rem; line-height: 1.4; }
  html .workspace .followed-player-stats { margin: 8px 0 0; gap: 8px; }
  html .workspace .followed-player-stats > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 8px; padding: 6px 9px; }
  html .workspace .followed-player-stats dt { font-size: .75rem; line-height: 1.4; }
  html .workspace .followed-player-stats dd { margin: 0; font-size: 1.125rem; line-height: 1.4; }
  html .workspace .followed-player-cards { gap: 10px; }
  html .workspace :is(.favorite-tournament-actions, .followed-player-actions) { margin-top: 8px; padding-top: 8px; }
}

/* Complete tournament names, contextual empty responses and consistent dark metadata. */
html .workspace :is(.tournament-card h3, .row-title h3, .unified-search-body > strong) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
  line-height: 1.3;
}
html .workspace .tournament-card h3 { margin-block: 12px 8px; }
html .workspace .tournament-card h3 > a { max-width: 100%; }
html .workspace :is(.row-title, .unified-search-body) { min-width: 0; }
html .workspace .location { min-width: 0; overflow-wrap: anywhere; line-height: 1.45; }
html .workspace .live-grid { align-items: stretch; }
@media (min-width: 641px) {
  html .workspace .live-grid .tournament-card { display: flex; flex-direction: column; }
  html .workspace .live-grid .card-date { margin-top: auto; padding-top: 14px; }
  html .workspace .live-grid .card-action { margin-top: 12px; }
}
@media (max-width: 640px) {
  html .workspace .tournament-card h3 { margin-block: 4px 6px; font-size: 1.125rem; }
  html .workspace .upcoming-section .row-title h3 { line-height: 1.3; }
}
.empty-context { max-width: 65ch; line-height: 1.55; }
html[data-theme="dark"] :is(.score-note, .score-foot, .data-status, .calendar-result-count,
  .coverage-note, .location, .card-date, .row-range, .row-location, .favorite-verified,
  .favorite-verification, .card-circuit, .player-facts dt, .ongoing-date-note-desktop,
  .ongoing-date-note-mobile, .upcoming-date-note-mobile) {
  color: var(--readable-secondary) !important;
  opacity: 1;
}
html[data-theme="dark"] :is(.row-location strong, .player-facts dd) { color: var(--foreground); }
html[data-theme="dark"] :is(.score-note, .score-foot, .coverage-note) a {
  color: #e4ffa8;
  text-decoration: underline;
  text-underline-offset: 3px;
}
html[data-theme="dark"] :is(.data-status, .score-foot) button {
  color: #e4ffa8;
}
html[data-theme="dark"] :is(.empty-state, .result-empty) [data-slot="empty-description"] {
  color: var(--readable-secondary);
  opacity: 1;
}

/* Simpler tournament details, live-first broadcasts and compact mobile filters. */
.watch-alternatives { border-block: 1px solid var(--border); margin-block: 14px; }
.watch-alternatives > summary { cursor: pointer; padding-block: 14px; font-weight: 650; line-height: 1.4; }
.watch-alternatives > summary:focus-visible { outline: 2px solid var(--action-primary-bg); outline-offset: 3px; border-radius: 4px; }
.watch-alternatives > summary > span { color: var(--readable-secondary); font-weight: 500; }
.watch-now-confirmed .watch-open { min-height: 44px; font-weight: 750; }
.mobile-filter-apply { display: none; }
@media (max-width: 640px) {
  html .workspace .filter-options.is-open .mobile-filter-apply { display: flex; grid-column: 1 / -1; justify-content: center; min-height: 44px; background: var(--action-primary-bg); color: var(--action-primary-fg); font-weight: 700; }
  .watch-alternatives > summary { padding-block: 12px; }
}

/* Clear touch feedback and stable card details without adding controls. */
.resource-refresh-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; font-weight: 650; }
.resource-refresh-action > svg { flex-shrink: 0; }
.resource-refresh-action[aria-busy="true"] { cursor: progress; opacity: .8; }
.favorite-button[aria-busy="true"] { position: relative; cursor: progress; }
.favorite-button[aria-busy="true"] > svg { opacity: .2; }
.favorite-button[aria-busy="true"]::after { content: ''; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); width: 18px; height: 18px; box-sizing: border-box; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: touch-pending-spin .8s linear infinite; pointer-events: none; }
.favorite-button.favorite-with-label[aria-busy="true"]::after { left: 12px; }
html .workspace .date-block { flex-shrink: 0; font-variant-numeric: tabular-nums; }
html .workspace .date-block :is(strong, span) { white-space: nowrap; text-align: center; }
html .workspace :is(.row-range, .card-date, .tournament-countdown) { font-variant-numeric: tabular-nums; }
html .workspace .country-flag { display: inline-block; font-size: .9em; line-height: 1; vertical-align: baseline; white-space: nowrap; }
@media (max-width: 640px) {
 html .workspace :is(.tournament-card, .event-row, .favorite-tournament-card) { min-width: 0; }
 html .workspace :is(.row-title h3, .tournament-card h3) { hyphens: manual; }
 html .workspace :is(.row-range, .card-date) { line-height: 1.5; overflow-wrap: normal; word-break: normal; }
 .watch-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
 .watch-heading > div { min-width: 0; flex: 1 1 10rem; }
 .watch-heading > .resource-refresh-action { flex: 0 0 auto; margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
 .favorite-button[aria-busy="true"]::after, .resource-refresh-action .spin { animation: none !important; }
}

@keyframes touch-pending-spin { to { transform: rotate(360deg); } }

/* Stable resource feedback and readable mobile scoreboards. */
.resource-status{box-sizing:border-box;display:flex;align-items:center;min-width:0;height:64px;margin:0!important;padding:8px 0;font-size:13px;line-height:1.4;color:#365a42;overflow-wrap:break-word}
.overview-check-status{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
.overview-check-status>.small-button{min-height:44px;margin:0}
html[data-theme="dark"] .resource-status{color:#d6e8c8}
[data-scoreboard]{overscroll-behavior-x:contain;scrollbar-width:thin;scroll-padding-left:160px}
[data-scoreboard] table thead th:not(:first-child){width:42px}
[data-scoreboard] tbody th{position:sticky;left:0;z-index:1;overflow-wrap:break-word}
[data-scoreboard] thead th:first-child{position:sticky;left:0;z-index:2;background:var(--surface,#fff)}
[data-scoreboard] tbody td>span{white-space:nowrap;overflow-wrap:normal}
@media(max-width:640px){.resource-status{height:80px}[data-scoreboard] tbody th{font-size:14px;line-height:1.4}[data-scoreboard] tbody th small{font-size:11px;line-height:1.3}}

/* Refined card hierarchy, shared secondary actions and dark-state contrast. */
html .workspace .live-grid .card-top { margin-bottom: 10px; }
html .workspace .live-grid .card-circuit { font-size: 11px; letter-spacing: .06em; line-height: 1.4; }
html .workspace .live-grid .tournament-card h3 { min-height: 0; margin-block: 8px; }
html .workspace .live-grid .location { margin-block: 0; }
html .workspace .live-grid .card-date { font-size: 14px; font-weight: 600; }
html :is(.watch-section, .tournament-overview, .result-empty) .small-button:not(.watch-open):not(.tournament-document-link),
html .result-empty > .primary-link:last-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--action-secondary-border);
  border-radius: 9px;
  background: var(--action-secondary-bg);
  color: var(--readable-secondary) !important;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  white-space: normal;
}
html :is(.watch-section, .tournament-overview, .result-empty) :is(.small-button, .primary-link) > svg { flex-shrink: 0; }
html[data-theme="dark"] :is(.watch-status:not(.watch-live), .watch-scheduled) {
  background: #344238;
  color: #e8f2e4;
  border: 1px solid #75876b;
}
html[data-theme="dark"] .event-dialog .source-schedule { background: #293b2f; border-color: #789675; }
html[data-theme="dark"] .event-dialog .source-schedule h4 { color: #d6f4ad; }
html[data-theme="dark"] :is(.watch-original, .watch-eyebrow, .watch-source-details, .dialog-kicker) { color: #cadbcf; }
html[data-theme="dark"] .filter-select.filter-active { background: #34472e !important; color: #edffda !important; border-color: #b6d771 !important; }
html[data-theme="dark"] :is(.small-button, .primary-link, .icon-button, .filter-select, .mobile-filter-toggle, .tournament-open-action):focus-visible {
  outline: 3px solid #d5f98c;
  outline-offset: 3px;
}
@media (hover: hover) {
  html :is(.watch-section, .tournament-overview, .result-empty) .small-button:not(.watch-open):not(.tournament-document-link):not(:disabled):hover,
  html .result-empty > .primary-link:last-child:hover { background: var(--muted); border-color: var(--action-secondary-border); }
}
html :is(.watch-section, .tournament-overview, .result-empty) .small-button:not(:disabled):active { box-shadow: inset 0 0 0 2px var(--action-secondary-border); }
@media (max-width: 640px) {
  html .workspace .live-grid .card-top { margin-bottom: 4px; }
  html .workspace .live-grid .tournament-card h3 { margin-block: 4px 6px; }
}

/* Enlarged text, distinct search groups and field-level form feedback. */
.form-field-error { display:block; margin:4px 0 8px; color:#a5232d; font-size:.875rem; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
html[data-theme="dark"] .form-field-error { color:#ffb5b9; }
html :is(.review-form, .google-login) { min-width:0; max-width:100%; }
html .review-form :is(input, textarea), html form textarea { min-width:0; max-width:100%; font-size:1rem; }
html .review-form fieldset { min-width:0; }
html .review-stars { flex-wrap:wrap; }
html .review-actions { flex-wrap:wrap; }
html .review-actions button, html .google-login button { max-width:100%; white-space:normal; height:auto; line-height:1.4; }
html :is(input,textarea)[aria-invalid="true"] { border-color:#a5232d; box-shadow:0 0 0 1px #a5232d; }
html[data-theme="dark"] :is(input,textarea)[aria-invalid="true"] { border-color:#ffb5b9; box-shadow:0 0 0 1px #ffb5b9; }
html .unified-search-results [data-search-kind] > h3 { flex-wrap:wrap; font-size:1.125rem; line-height:1.4; padding-bottom:9px; border-bottom:2px solid #6b9753; }
html .unified-search-results [data-search-kind="players"] > h3 { border-color:#8094a0; }
html .unified-search-results [data-search-kind] > h3 > svg { width:32px; height:32px; padding:6px; border-radius:8px; background:#e6f5d9; color:#254c30; }
html .unified-search-results [data-search-kind="players"] > h3 > svg { background:#edf1f5; color:#354957; border-radius:50%; }
html .unified-search-results [data-search-kind] > h3 > span { font-size:.75rem; }
html .unified-search-results .unified-search-body > strong { font-size:1.0625rem; }
html .unified-search-results :is(.unified-search-body > span,.unified-search-note,.unified-search-player-status p) { font-size:.8125rem; line-height:1.5; }
html .unified-search-results .unified-search-calendar { width:2.75rem; }
html .unified-search-results .unified-search-calendar strong { font-size:1.4375rem; }
html .unified-search-results .unified-search-calendar > span { font-size:.6875rem; }
html .unified-search-results .unified-search-player-status { height:auto; min-height:64px; }
html[data-theme="dark"] .unified-search-results [data-search-kind] > h3 > svg { background:#34472e; color:#edffda; }
html[data-theme="dark"] .unified-search-results [data-search-kind="players"] > h3 > svg { background:#34434c; color:#e0eaf2; }
html .resource-status { height:auto; min-height:64px; font-size:.8125rem; }
html .workspace :is(.card-top,.section-heading,.card-action) { flex-wrap:wrap; }
html .workspace .section-count { height:auto; min-height:24px; }
html .workspace :is(.card-date,.row-range,.location,.tournament-countdown,.card-action) { overflow-wrap:anywhere; line-height:1.45; }
@media(max-width:640px) {
 html .resource-status { min-height:80px; }
 html .workspace .live-grid .card-date { font-size:.875rem; }
 html .workspace :is(.location,.card-action,.row-range) { font-size:.875rem; }
 html .workspace .upcoming-section .row-title h3 { font-size:1rem; }
 html .workspace .upcoming-section .row-title > .row-range { font-size:.875rem; }
 html .workspace .upcoming-section .row-title > .tournament-countdown { font-size:.8125rem; }
 html .workspace .upcoming-section .event-row-main { grid-template-columns:auto minmax(0,1fr); }
 html .workspace .upcoming-section .event-row-main .date-block { width:3rem; min-width:3rem; }
 html .workspace .upcoming-section .date-block strong { font-size:1.5rem!important; }
 html .workspace .upcoming-section .date-block span { font-size:.6875rem; }
 html .workspace .favorite-tournament-top { flex-wrap:wrap; }
 html .workspace .favorite-tournament-open { flex:1 1 10rem; min-width:0; }
 html .workspace .favorite-tournament-top > .favorite-button { margin-left:auto; }
 html .workspace .favorite-tournament-open .date-block { width:3rem; min-width:3rem; }
 html .workspace .favorite-tournament-open .row-title { min-width:0; }
 html .workspace :is(.tournament-open-action,.small-button,.primary-link) { max-width:100%; height:auto; white-space:normal; line-height:1.4; }
 html .workspace .card-action { font-size:.875rem; }
 html .unified-search-results .unified-search-body > strong { font-size:1rem; }
}
@media(max-width:640px) {
 /* Give category and opening action separate grid cells, leaving room for the star. */
 html .workspace .upcoming-section .event-row-main > .tier { grid-column:1; grid-row:2; max-width:100%; font-size:.6875rem; overflow-wrap:anywhere; }
 html .workspace .upcoming-section .event-row-main > .row-open-action { grid-column:2; grid-row:2; justify-self:stretch; min-width:0; max-width:100%; margin-right:52px; font-size:.75rem; overflow-wrap:anywhere; }
}
@media(max-width:640px) {
 html .workspace .live-section .tournament-card h3 { font-size:1.25rem!important; }
 html .workspace :is(.small-button,.primary-link) { font-size:.875rem; }
 html .review-form :is(.small-button,.primary-link), html .google-login .small-button { font-size:.875rem; }
}

/* Ordered tournament documents, concise broadcast choices and compact scores. */
.tournament-document-groups{display:grid;gap:18px;min-width:0}
.tournament-document-group{min-width:0}
.tournament-document-group h4{font-size:1rem;line-height:1.4;font-weight:750;margin:0 0 8px}
.tournament-document-group>.score-note{margin:0 0 8px}
.tournament-document-group .tournament-documents{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html .tournament-document-group .tournament-documents>a.tournament-document-link{width:100%;height:auto;white-space:normal;min-width:0}
.watch-platform .watch-open{margin-top:8px;min-height:44px}
.watch-now-confirmed>.score-note{margin-top:6px}
@media(max-width:640px){
 .tournament-document-groups{gap:14px}
 .tournament-document-group .tournament-documents{grid-template-columns:1fr}
 #risultati ol:has(>[class] [data-scoreboard]){gap:8px;margin:10px 0}
 #risultati li:has(>[data-scoreboard]){padding:9px}
 :is(#risultati,section) li>[data-scoreboard]{margin-top:4px}
 [data-scoreboard] table{border-spacing:0 3px}
 [data-scoreboard] tbody th{padding:6px;font-size:.875rem;line-height:1.35}
 [data-scoreboard] tbody th small{margin-top:2px;font-size:.6875rem}
 [data-scoreboard] tbody td>span{min-height:32px;padding:3px 2px;font-size:1.0625rem}
 div:has(>h3):has(>[data-scoreboard]){padding-top:8px;padding-bottom:8px;margin-top:8px}
 div:has(>h3):has(>[data-scoreboard])>h3{margin-bottom:4px}
}
html[data-theme="dark"] [data-scoreboard] thead th:first-child{background:#28322b;color:#becdb7}

/* Clear comparison prompts, grouped saved alerts and published result dates. */
.saved-alert-groups{max-height:35dvh;overflow-y:auto;display:grid;gap:14px;padding:2px}
.saved-alert-group{border:1px solid var(--border);border-radius:12px;padding:12px;background:var(--surface,#fff);min-width:0}
.saved-alert-group header{display:flex;justify-content:space-between;align-items:start;gap:10px}
.saved-alert-group header small{font-size:.75rem;color:var(--muted,#56665a)}
.saved-alert-group h4{font-size:1rem;margin:4px 0 8px;overflow-wrap:anywhere}
.saved-alert-group header>span{font-size:.75rem;white-space:nowrap;color:var(--muted,#56665a);padding-top:3px}
.saved-alert-group .alert-rule-list{max-height:none;overflow:visible}
.saved-alert-group .alert-rule-list li{padding:9px 0;min-width:0;font-size:.875rem}
.saved-alert-group .alert-rule-list li>span{overflow-wrap:anywhere;min-width:0}
.saved-alert-group .alert-rule-list li:last-child{border-bottom:0;padding-bottom:0}
.saved-alert-group .small-button{flex-shrink:0}
.results-toolbar [role=combobox]{font-weight:700;background:#e6f7c8!important;border-color:#4f7735!important;min-width:0;width:auto;max-width:100%}
html[data-theme=dark] .saved-alert-group{background:#202923}
html[data-theme=dark] .results-toolbar [role=combobox]{background:#2b4026;color:#e2ffc0;border-color:#92b873}
@media(max-width:640px){.results-toolbar>div{max-width:100%;min-width:0}.results-toolbar [role=combobox]{white-space:normal;height:auto;min-height:44px}.saved-alert-group{padding:10px}}
