@import url("./common-overrides.css");
@import url("./cn-vs-worlds-table-fix.css");

/* CN vs JP 1:3 homepage banner */
body #past-tournaments .cn-jp-card.gradient-banner-card::before {
  background-image:
    linear-gradient(90deg, rgba(7,14,28,.68), rgba(7,14,28,.34) 52%, rgba(7,14,28,.10)),
    url('/tournaments/cn-vs-jp/blab13.webp?v=20260613-cnvsjp-blab13') !important;
  background-size: cover, cover !important;
  background-position: center, center center !important;
  background-repeat: no-repeat !important;
}

/* CN vs JP 1:4 page header */
body:has(a[href="https://www.iyingdi.com/tz/post/5609636"]) .tournament-hero {
  background: #071421 !important;
}

body:has(a[href="https://www.iyingdi.com/tz/post/5609636"]) .tournament-hero-image {
  display: block !important;
  content: url('/tournaments/cn-vs-jp/blab14.webp?v=20260613-cnvsjp-blab14-direct') !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Keep every page's return link label consistent. */
.back-link {
  font-size: 0 !important;
}

.back-link::after {
  content: "メインページに戻る";
  font-size: 12px;
  line-height: 1.4;
}

/* Remove redundant tournament category labels from these archive headers. */
body:has(a[href="https://tonamel.com/competition/cC1Zi"]) .archive-hero .eyebrow-wrap,
body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .archive-hero > .eyebrow {
  display: none !important;
}

/* About cards should use solid black rather than muted gray. */
#about .profile-card h2,
#about .profile-card p,
#about .contact-card h2,
#about .contact-card p {
  color: #111 !important;
}

#about .contact-card .contact-ja-title {
  margin: 6px 0 14px;
  font-weight: 900;
}

/* Choujousen overview and rules copy should use solid black. */
body:has(.choujousen-hero) .overview-text p,
body:has(.choujousen-hero) .overview-text strong {
  color: #111 !important;
}

/* Timewalk Dream Match overview heading cleanup. */
body:has(a[href="https://tonamel.com/competition/cC1Zi"]) .score-card:has(.archive-rule-list) > .section-title {
  font-size: 0 !important;
}

body:has(a[href="https://tonamel.com/competition/cC1Zi"]) .score-card:has(.archive-rule-list) > .section-title::after {
  content: "大会概要とルール";
  font-size: 16px;
}

body:has(a[href="https://tonamel.com/competition/cC1Zi"]) .overview-subsection > .mini-section-title {
  display: none !important;
}

/* Ura Choujousen overview cleanup. */
body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .score-card:has(.archive-rule-list) > .section-title {
  font-size: 0 !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .score-card:has(.archive-rule-list) > .section-title::after {
  content: "大会概要とルール";
  font-size: 16px;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .overview-subsection > .mini-section-title {
  display: none !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .overview-subsection {
  margin-top: 18px;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .overview-subsection:first-child {
  margin-top: 0;
}

/* Restore the Players heading and the original closed accordion. */
body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .overview-subsection:last-child > .mini-section-title {
  display: block !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details {
  width: calc(100% - 28px) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  background: #fffaf2 !important;
  border: 1px solid rgba(24,33,40,.12) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-soft) !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details::before {
  content: none !important;
  display: none !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details > summary {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details:not([open]) > .players-details-body {
  display: none !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details[open] > .players-details-body {
  display: block !important;
  padding: 0 0 16px !important;
  border-top: 1px solid rgba(24,33,40,.1) !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details .table-wrap {
  width: calc(100% - 28px) !important;
  margin: 0 auto !important;
  overflow-x: auto !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details table {
  display: table !important;
  width: 100% !important;
  min-width: 760px !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
  background: transparent !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details thead {
  display: table-header-group !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) #players-body {
  display: table-row-group !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) #players-body tr {
  display: table-row !important;
  box-shadow: var(--shadow-soft) !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) #players-body td {
  display: table-cell !important;
  padding: 12px !important;
  color: var(--text-primary) !important;
  background: #fffaf2 !important;
  border-top: 1px solid rgba(24,33,40,.08) !important;
  border-bottom: 1px solid rgba(24,33,40,.16) !important;
  text-align: center !important;
  white-space: nowrap !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) #players-body td:first-child {
  text-align: left !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) #players-body td.info-cell {
  white-space: normal !important;
}

body:has(a[href="https://docs.google.com/spreadsheets/d/e/2PACX-1vQaazuDWzeaqukUZLdh5o-bB-k52toXUy_P6KDx7XxNPl_RX4o0xUSeZdhiyOObu_z1ij9cjvpdumBf/pubhtml"]) .players-details .archive-note {
  margin: 10px 14px 0 !important;
  color: var(--text-muted) !important;
}
