/* Public competition shell. Sport-specific scoring and private UI stay independent. */
body:has(.tennis-public-switch){font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif!important;background:#f5f7f3!important;color:#172a24!important}
body:has(.tennis-public-switch) h1{font-size:clamp(25px,3.2vw,36px)!important;font-weight:700!important;line-height:1.2!important;letter-spacing:-.4px!important}
body:has(.tennis-public-switch) h2{font-weight:650!important}
body:has(.tennis-public-switch) :is(.card,.pg-card){background:#fff!important;border-color:#dbe5df!important;border-radius:16px!important;box-shadow:0 3px 14px #173f2408!important}
body:has(.tennis-public-switch) :is(.main-nav button,.main-nav a,.pg-primary,.pg-secondary){font-weight:600!important}
.pub-nav{background:#fff!important;color:#172a24!important;border-bottom:1px solid #dbe5df!important;box-shadow:0 3px 14px #173f2410}
.pub-nav-inner{height:auto!important;min-height:62px;max-width:1440px!important;flex-wrap:wrap;padding:10px 20px!important;gap:12px!important}
.pub-nav-brand,.pub-nav-link,.pub-nav-user-chip{color:#174d36!important}.pub-nav-links[hidden]{display:none!important}
.pub-nav-actions{margin-left:auto;flex-wrap:wrap}.pub-nav-user-chip{background:#f4f8f5!important;border-color:#dbe5df!important}
.pub-nav-login-btn,.pub-nav-admin-btn{background:#166640!important;border-color:#166640!important;color:white!important}
.tennis-public-switch{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.tennis-public-label{font-size:14px;font-weight:600;color:#52675c}
.tennis-public-switch nav{display:flex;gap:6px;flex-wrap:wrap}.tennis-public-switch a,.tennis-public-sections a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;border-radius:11px;border:1px solid #d8e3dc;color:#174d36;text-decoration:none;font-size:14px;font-weight:600;line-height:1.25;background:#fff}
.tennis-public-switch a[aria-current=page]{background:#d9fa42;color:#183820;border-color:#b8d83a}.tennis-public-switch a:hover,.tennis-public-sections a:hover{background:#eaf5ed}
.tennis-public-switch a:focus-visible,.tennis-public-sections a:focus-visible{outline:3px solid #268453;outline-offset:3px}
.tennis-public-sections{display:flex;flex-wrap:wrap;gap:6px;max-width:1400px;margin:0 auto;padding:8px 20px;background:#f7faf8;border-top:1px solid #e4ebe7}.tennis-public-sections a{font-size:13px;min-height:36px;padding:7px 11px}
@media(max-width:600px){.pub-nav-inner{padding:8px 12px!important;gap:8px!important}.pub-nav-actions{padding-right:44px}.tennis-public-switch{order:3;flex-basis:100%}.tennis-public-switch nav{flex:1;display:grid;grid-template-columns:1fr 1fr}.tennis-public-switch a{padding:10px 8px;min-height:44px}.tennis-public-sections{padding:8px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.tennis-public-sections a{text-align:center;min-width:0;min-height:40px;font-size:12px}.pub-nav-brand-text{display:inline!important}.pub-nav-user-chip{max-width:125px!important}}

body:has(.tennis-public-switch) :is(.top-profile-avatar,.bests-avatar,.match-avatar,.bests-detail-avatar,.brand-mark img,.program-sponsor-logo)[hidden]{display:none!important}

body:has(.tennis-public-switch) :is(#pg-fixture,#pg-album,#pg-bests,#league-season-catalog,[id^="league-match-"]){scroll-margin-top:var(--tennis-public-nav-offset,160px)}

/* Avoid interpolating the legacy dark-shell colors while the shared sheet loads. */
.pub-nav :is(.pub-nav-login-btn,.pub-nav-admin-btn,.pub-nav-user-chip){transition:none!important}

/* Native public ranking navigation must remain readable without private UI CSS. */
body:has(.tennis-public-switch) .defi-product-nav{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 12px;padding:8px 0}
body:has(.tennis-public-switch) .defi-product-nav a{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;border:1px solid #d8e3dc;border-radius:10px;background:#fff;color:#174d36;text-decoration:none;font-size:14px;font-weight:600;line-height:1.3}
body:has(.tennis-public-switch) .defi-product-nav a[aria-current=page]{background:#d9fa42;color:#183820;border-color:#b8d83a}
body:has(.tennis-public-switch) .defi-product-nav a:focus-visible{outline:3px solid #268453;outline-offset:3px}
body:has(.tennis-public-switch) nav[aria-label="Lig alanları"]{display:none}

/* News and comments use readable text rather than dark-theme lime metadata. */
body:has(.tennis-public-switch) .news-comment-col{background:#f3f7f4!important;border:1px solid #dbe5df!important;border-radius:16px;padding:14px}
body:has(.tennis-public-switch) .news-comment-card{background:#fff!important;border-color:#dbe5df!important;border-radius:12px;color:#172a24!important;box-shadow:0 2px 8px #173f2406!important}
body:has(.tennis-public-switch) .news-comment-card button.news-card{background:transparent!important;border:0!important;box-shadow:none!important;color:#172a24!important}
body:has(.tennis-public-switch) :is(.news-date,.comment-mini-meta,.news-excerpt,.pager [data-page-label]){color:#52675c!important;font-size:12px;line-height:1.5}
body:has(.tennis-public-switch) .comment-mini-kind{color:#216347!important;font-size:11px;font-weight:650}
body:has(.tennis-public-switch) :is(.news-title,.comment-mini-author){color:#173b2a!important;font-weight:650}
body:has(.tennis-public-switch) .news-title{font-size:15px;line-height:1.4}
body:has(.tennis-public-switch) .comment-mini-author{font-size:14px}
body:has(.tennis-public-switch) .comment-mini-text{color:#172a24!important;font-size:14px;line-height:1.55}
body:has(.tennis-public-switch) .news-comment-head{color:#173b2a!important;font-size:17px;font-weight:650}
body:has(.tennis-public-switch) .news-card:focus-visible{outline:3px solid #268453!important;outline-offset:3px}
body:has(.tennis-public-switch) .pager button:disabled{color:#52675c!important;background:#edf1ee!important;opacity:1!important}

/* A survey column must not override the phone single-column news layout. */
@media(max-width:700px){body:has(.tennis-public-switch) :is(.news-comment-board,.news-comment-board.has-surveys){grid-template-columns:minmax(0,1fr)!important}body:has(.tennis-public-switch) .news-comment-head{flex-wrap:wrap}body:has(.tennis-public-switch) .news-comment-col .paged-list{max-height:none;overflow:visible}}

/* Tournament uses one native brand row and one right-aligned navigation/login area. */
body.tournament-defi-theme .tournament-topbar{flex-wrap:wrap;column-gap:16px}
body.tournament-defi-theme .tournament-topbar .top-left{flex:1 1 440px;min-width:0}
body.tournament-defi-theme .tournament-topbar .top-actions{flex:1 1 360px;min-width:0;max-width:100%;justify-items:end}
body.tournament-defi-theme .tournament-header-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;width:100%;min-width:0}
body.tournament-defi-theme .pub-nav-integrated{position:static!important;border:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important}
body.tournament-defi-theme .pub-nav-integrated .pub-nav-inner{min-height:0;height:auto;max-width:none!important;margin:0;padding:0!important;gap:8px!important;justify-content:flex-end}
body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch{flex:0 1 auto;flex-basis:auto;order:initial}
body.tournament-defi-theme .pub-nav-integrated .tennis-public-label{display:none}
body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch nav{display:flex;flex:initial;justify-content:flex-end;flex-wrap:wrap}
body.tournament-defi-theme .pub-nav-integrated .pub-nav-actions{margin:0;padding:0}
body.tournament-defi-theme .pub-nav-integrated .pub-nav-links{flex:initial;justify-content:flex-end;flex-wrap:wrap}
body.tournament-defi-theme .pub-nav-integrated :is(.pub-nav-link,.pub-nav-login-btn){display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 11px;border-radius:10px;font:600 13px/1.25 system-ui,sans-serif;cursor:pointer}
body.tournament-defi-theme .pub-nav-integrated .pub-nav-link{color:#174d36;background:#fff;border:1px solid #d8e3dc;text-decoration:none}
body.tournament-defi-theme .pub-nav-integrated .pub-nav-link.active{color:#183820;background:#d9fa42;border-color:#b8d83a}
body.tournament-defi-theme .pub-nav-integrated :is(a,button):focus-visible{outline:3px solid #268453;outline-offset:3px}

/* Native account actions stay legible and never nest a logout link inside a button. */
body.tournament-defi-theme .tournament-header-controls .top-profile{background:#f4f8f5;color:#173b2a;border:1px solid #d8e3dc;border-radius:12px;padding:6px;gap:10px;box-shadow:none;max-width:100%;min-width:0}
body.tournament-defi-theme .tournament-header-controls .top-profile-btn{gap:8px;min-height:44px;flex:1;min-width:0}
body.tournament-defi-theme .tournament-header-controls .top-profile-text{display:grid;gap:3px;min-width:0;text-align:left}
body.tournament-defi-theme .tournament-header-controls .top-profile-name{font:650 13px/1.3 system-ui,sans-serif;max-width:180px;color:#173b2a;white-space:normal;overflow-wrap:anywhere}
body.tournament-defi-theme .tournament-header-controls .top-profile-edit{font:400 12px/1.3 system-ui,sans-serif;color:#52675c}
body.tournament-defi-theme .tournament-header-controls .top-profile-avatar{width:36px;height:36px;flex:0 0 36px;box-shadow:none;background:#eaf2ed;border:1px solid #b9cfc0}
body.tournament-defi-theme .tournament-header-controls .top-profile-logout{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 10px;border-left:1px solid #d8e3dc;font:600 12px/1.3 system-ui,sans-serif;color:#174d36;text-decoration:none;white-space:nowrap}
body.tournament-defi-theme .tournament-header-controls :is(.top-profile-btn,.top-profile-logout):focus-visible{outline:3px solid #268453;outline-offset:2px;border-radius:8px}
body.tournament-defi-theme .tournament-header-controls .top-profile-btn:hover .top-profile-name{color:#166640}
body.tournament-defi-theme .top-actions .top-contact{font:500 11px/1.4 system-ui,sans-serif;gap:8px}
body.tournament-defi-theme .top-actions .top-contact a{color:#52675c}
@media(max-width:760px){
 body.tournament-defi-theme .tournament-topbar{display:grid;grid-template-columns:minmax(0,1fr);padding:12px 14px;gap:10px}
 body.tournament-defi-theme .tournament-topbar .top-left{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
 body.tournament-defi-theme .tournament-topbar .brand-unit{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;min-width:0}
 body.tournament-defi-theme .tournament-topbar .brand-unit + .brand-unit{padding-left:0;border-left:0}
 body.tournament-defi-theme .tournament-topbar .brand-mark{width:32px;height:32px;border-radius:8px}
 body.tournament-defi-theme .tournament-topbar .brand-copy{white-space:normal;gap:2px;line-height:1.2;overflow-wrap:anywhere}
 body.tournament-defi-theme .tournament-topbar .brand-copy strong{font:650 10px/1.2 system-ui,sans-serif}
 body.tournament-defi-theme .tournament-topbar .brand-copy span{font:500 9px/1.2 system-ui,sans-serif}
 body.tournament-defi-theme .tournament-topbar .top-actions{width:100%;gap:8px}
 body.tournament-defi-theme .tournament-header-controls{gap:8px}
 body.tournament-defi-theme .pub-nav-integrated{width:100%;min-width:0}
 body.tournament-defi-theme .pub-nav-integrated .pub-nav-inner{gap:6px!important}
 body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch a{font-size:12px;padding:9px}
 body.tournament-defi-theme .tournament-header-controls .top-profile{min-height:50px}
}

/* Reserve the fixed mobile menu corner, including tournaments without sponsor images. */
@media(max-width:768px){body.tournament-defi-theme .tournament-topbar .top-left{min-height:44px;padding-right:48px}}

@media(max-width:390px){
 body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch{flex:1 0 100%}
 body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch nav{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);width:100%}
 body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch a{min-width:0;padding-inline:4px;text-align:center}
}


/* Keep sponsor marks and account controls aligned on wide tournament headers. */
@media (min-width: 769px) {
 body.tournament-defi-theme .tournament-topbar .top-left {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 10px;
 }
 body.tournament-defi-theme .tournament-topbar .brand-unit { gap: 7px; }
 body.tournament-defi-theme .tournament-topbar .brand-unit + .brand-unit { padding-left: 10px; }
 body.tournament-defi-theme .tournament-topbar .brand-mark { width: 44px; height: 44px; }
 body.tournament-defi-theme .tournament-topbar .brand-copy {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
 }
 body.tournament-defi-theme .tournament-topbar .brand-copy strong { font-size: 13px; }
 body.tournament-defi-theme .tournament-topbar .brand-copy span { font-size: 10px; }
 body.tournament-defi-theme .tournament-topbar .top-actions {
  flex: 0 0 auto;
  margin-inline-start: auto;
 }
 body.tournament-defi-theme .tournament-header-controls { flex-wrap: nowrap; gap: 8px; }
 body.tournament-defi-theme .pub-nav-integrated .pub-nav-inner,
 body.tournament-defi-theme .pub-nav-integrated .tennis-public-switch nav,
 body.tournament-defi-theme .pub-nav-integrated .pub-nav-links { flex-wrap: nowrap; }
 body.tournament-defi-theme .pub-nav-integrated :is(.pub-nav-link, .pub-nav-login-btn) {
  padding-inline: 9px;
  white-space: nowrap;
 }
 body.tournament-defi-theme .tournament-header-controls .top-profile-name {
  max-width: 106px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
 }
 body.tournament-defi-theme .tournament-header-controls .top-profile-edit { white-space: nowrap; }
}
@media (min-width: 769px) and (max-width: 1099px) {
 body.tournament-defi-theme .tournament-topbar .top-left { flex-basis: 100%; }
}
@media (min-width: 1100px) {
 body.tournament-defi-theme .tournament-topbar { flex-wrap: nowrap; }
}

/* The profile header already identifies the signed-in account. */
body.tournament-defi-theme .hero div:has(> button[data-open-program]) > span.pill:has(> b) {
 display: none !important;
}


/* A native disclosure keeps tournament actions beside the section controls. */
body.tournament-defi-theme .hero > .main-nav {
 position: relative;
 grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr));
}
body.tournament-defi-theme .tournament-actions-menu > summary {
 display: flex;
 align-items: center;
 justify-content: center;
 gap: 8px;
 min-height: 44px;
 padding: 8px;
 border: 1px solid #8ebca5;
 border-radius: 10px;
 background: #fff;
 color: #174d36;
 font: 700 12px/1.2 system-ui, sans-serif;
 cursor: pointer;
 list-style: none;
}
body.tournament-defi-theme .tournament-actions-menu > summary::-webkit-details-marker { display: none; }
body.tournament-defi-theme .tournament-actions-menu > summary::after { content: "▾"; }
body.tournament-defi-theme .tournament-actions-menu[open] > summary::after { content: "▴"; }
body.tournament-defi-theme .tournament-actions-menu > summary:focus-visible {
 outline: 3px solid #268453;
 outline-offset: 2px;
}
body.tournament-defi-theme .tournament-actions-menu[open] > .tournament-actions-panel {
 position: absolute;
 z-index: 20;
 top: calc(100% + 6px);
 inset-inline-start: 0;
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
 gap: 6px;
 width: min(100%, 490px);
 padding: 10px;
 border: 1px solid #b9cfc0;
 border-radius: 12px;
 background: #fff;
 box-shadow: 0 10px 26px #10282026;
}
body.tournament-defi-theme .tournament-actions-panel > :is(a, button) {
 min-width: 0;
 white-space: normal;
}
@media (max-width: 760px) {
 body.tournament-defi-theme .hero > .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
