/* Shared lobby refinements; the draft table keeps its existing layout. */
@media (max-width: 680px) {
  body:not(.dc-draft-mode) .dc-tournament-tabs {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  body:not(.dc-draft-mode) .dc-tournament-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* Sorting remains keyboard-operable while keeping the compact table headings. */
body:not(.dc-draft-mode) #sec_shortlist .shsort-btn {
  padding: 3px 0; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: inherit; cursor: pointer;
}
body:not(.dc-draft-mode) #sec_shortlist .shsort-btn:focus-visible {
  outline: 2px solid #f0c85d; outline-offset: 2px;
}
/* White text on the shared green actions has sufficient contrast. */
body:not(.dc-draft-mode) :is(
  .dc-topup-btn, #secLobby .dc-mode-card .btn:not(:disabled),
  .dc-tournament-apply-btn, .dc-tournament-details-btn--settled,
  #secFantasy .fy-lobby-screen .fy-tournament-open, #sec_shortlist .btn.p
) { background: #0b8059; color: #fff; }
body:not(.dc-draft-mode) :is(
  .dc-topup-btn, #secLobby .dc-mode-card .btn:not(:disabled),
  .dc-tournament-apply-btn, .dc-tournament-details-btn--settled,
  #secFantasy .fy-lobby-screen .fy-tournament-open, #sec_shortlist .btn.p
):hover { background: #096f4e; color: #fff; }

/* On the narrowest phones the search gets its own row instead of disappearing. */
@media (max-width: 360px) {
  body:not(.dc-draft-mode) { --dc-topbar-h: 120px; }
  body:not(.dc-draft-mode):has(#backToDraftBtn[style*="inline"]) { --dc-topbar-h: 152px; }
  body:not(.dc-draft-mode) #topbar { align-items: flex-start; padding-top: 16px; }
  body:not(.dc-draft-mode) #topbar .dc-search {
    display: block; position: absolute; top: 64px; left: 8px; right: 8px;
    width: auto; max-width: none; z-index: 46;
  }
  body:not(.dc-draft-mode) #topbar .dc-search:not(:focus-within) input {
    padding: 0 42px; color: var(--dc-text); caret-color: auto; cursor: text;
  }
  body:not(.dc-draft-mode) #topbar .dc-search input::placeholder { color: var(--dc-muted); }
  body:not(.dc-draft-mode) #topbar #backToDraftBtn { top: 112px; }
}

/* Club-wide surfaces and status colours follow the Classic lobby. */
body:not(.dc-draft-mode) #secLobby .dc-mode-card[data-mode-card="fantasy"] {
  border-color: rgba(170,191,206,.6);
  background: linear-gradient(150deg,rgba(38,62,82,.72),rgba(5,20,35,.96));
}
body:not(.dc-draft-mode) #secPlay .dc-play-mode[onclick*="fantasy"] img,
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen :is(.fy-lobby-title img,.fy-lobby-stats .is-total img) {
  content: url('/brand/modes/fantasy-logo.png');
  filter: brightness(0) saturate(100%) invert(81%) sepia(12%) saturate(401%) hue-rotate(160deg) brightness(96%);
}
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen .fy-lobby-stats .is-total {
  border-color: rgba(170,191,206,.68); background: linear-gradient(135deg,rgba(63,91,111,.4),rgba(8,28,47,.96));
}
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen .fy-lobby-actions .dc-create-tournament {
  background: #aabfce; color: #101a25;
}
body:not(.dc-draft-mode) :is(#secStreet,#secMineStreet) .dc-tournament-section-title.done { color: #0d8c62; }
body:not(.dc-draft-mode) :is(#secStreet,#secMineStreet) .dc-tournament-section-title.played { color: #cea64e; }
body:not(.dc-draft-mode) #secPlay .dc-play-mode {
  border: 1px solid var(--dc-line); border-radius: 10px;
  background: rgba(7,25,44,.72); color: var(--dc-text);
}
body:not(.dc-draft-mode) #secPlay .dc-play-mode:hover { border-color: rgba(15,138,95,.75); }
body:not(.dc-draft-mode) #secPlay .dc-play-mode:focus-visible,
body:not(.dc-draft-mode) #secUpdates .dc-update > summary:focus-visible {
  outline: 2px solid #f0c85d; outline-offset: 2px;
}
body:not(.dc-draft-mode) #secUpdates .dc-update {
  margin-top: 12px; border-top-width: 1px; border-left: 4px solid var(--dc-gold);
  border-radius: 10px; background: rgba(7,25,44,.72); box-shadow: none;
}
body:not(.dc-draft-mode) #secUpdates .dc-update.is-optional { border-left-color: #89acc9; }
body:not(.dc-draft-mode) #secUpdates .dc-update-head { background: transparent; }
@media (max-width: 760px) {
  body:not(.dc-draft-mode) #secPlay .dc-play-mode { min-height: 64px; }
  body:not(.dc-draft-mode) #secUpdates .dc-update-head { padding: 16px 14px; }
}
@media (max-width: 400px) {
  body:not(.dc-draft-mode) #topbar { gap: 3px; padding-inline: 5px; }
  body:not(.dc-draft-mode) .dc-top-actions { gap: 2px; }
  body:not(.dc-draft-mode) .dc-search { flex-basis: 38px; width: 38px; max-width: 38px; }
  body:not(.dc-draft-mode) .dc-timezone-button { min-width: 49px; padding-inline: 4px; }
  body:not(.dc-draft-mode) .dc-bell { width: 38px; }
  body:not(.dc-draft-mode) #navCoin { padding-inline: 5px; }
  body:not(.dc-draft-mode) #navTicket { padding-inline: 6px; }
  body:not(.dc-draft-mode) .dc-topup-btn { padding-inline: 6px; }
  body:not(.dc-draft-mode) .dc-user { gap: 1px; padding-left: 3px; }
  body:not(.dc-draft-mode) .dc-avatar { width: 34px; height: 34px; }
  body:not(.dc-draft-mode) .dc-account-toggle { width: 20px; }
}
@media (max-width: 440px) {
  body:not(.dc-draft-mode) .sq-lobby .sq-game-entries { grid-template-columns: minmax(0, 1fr); }
  body:not(.dc-draft-mode) .sq-lobby .sq-game-entries > div + div {
    padding: 7px 0;
    border-left: 0;
    border-top: 1px solid rgba(208,224,240,.14);
  }
}

/* Shared page presentation, based on the Classic Draft lobby. */
body:not(.dc-draft-mode) :is(#secHelp,#secFaq,#sec_shortlist,#secFantasy,#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) {
  --visual-surface: rgba(7,25,44,.56);
  --visual-border: rgba(186,213,244,.16);
  --visual-muted: #8fb1cd;
}
/* The Fantasy component's general `font: inherit` previously cancelled the
   Classic create-button weight and size. Keep the action visually identical. */
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen .dc-create-tournament,
body:not(.dc-draft-mode) #secHelp .dc-help-score-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; height: auto; padding: 0 19px;
  border: 0; border-radius: 8px;
  background: linear-gradient(135deg,#d1a94f,var(--dc-gold));
  box-shadow: none; color: #101a25; font-family: inherit;
  font-size: 14px; font-weight: 900; line-height: 1.2; text-align: center;
}
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen .fy-lobby-actions .fy-btn {
  min-height: 44px; padding: 0 19px; border-radius: 8px;
  border: 1px solid var(--dc-line); background: rgba(7,25,44,.78);
  color: var(--dc-text); font-family: inherit; font-size: 14px; font-weight: 750; line-height: 1.2;
}
body:not(.dc-draft-mode) :is(#secHelp .dc-help-score-cta,#secFantasy .fy-lobby-actions button):focus-visible,
body:not(.dc-draft-mode) #sec_shortlist :is(button,input,select):focus-visible {
  outline: 2px solid #f0c85d; outline-offset: 2px;
}
/* Rules and FAQ use the same width, header surface and title hierarchy as Classic. */
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help { max-width: 1480px; padding-top: 0; }
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero {
  align-items: center; margin: 0 0 20px; padding: 18px 20px;
  border-bottom: 1px solid var(--visual-border); background: var(--visual-surface);
}
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero h2 { font-size: 27px; line-height: 1.1; }
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero p:not(.dc-help-kicker) {
  margin-top: 6px; color: var(--visual-muted); font-size: 14px; line-height: 1.45;
}
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-kicker { color: var(--dc-gold); }
body:not(.dc-draft-mode) #secHelp .dc-help-fact,
body:not(.dc-draft-mode) #secFaq .dc-help-details details {
  border: 1px solid var(--visual-border); border-radius: 9px; background: var(--visual-surface);
}
body:not(.dc-draft-mode) #secFaq .dc-help-details { border-top: 0; display: grid; gap: 6px; }
body:not(.dc-draft-mode) #secFaq .dc-help-details summary { padding: 17px 44px 17px 18px; }
body:not(.dc-draft-mode) #secFaq .dc-help-details summary:after { right: 16px; }
body:not(.dc-draft-mode) #secFaq .dc-help-details-body { padding: 0 18px 18px; }
/* Shortlist remains a working tool; only its presentation is unified. */
body:not(.dc-draft-mode) #sec_shortlist { max-width: 1480px; }
body:not(.dc-draft-mode) #sec_shortlist .card2 {
  border: 1px solid var(--visual-border); border-radius: 9px;
  background: rgba(7,25,44,.72); box-shadow: none;
}
body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) {
  border-top: 1px solid var(--visual-border); padding: 18px 20px;
}
body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2 {
  margin: 0 0 8px; color: var(--dc-text); font-size: 27px; line-height: 1.1;
}
body:not(.dc-draft-mode) #sec_shortlist .field label { color: var(--visual-muted); }
body:not(.dc-draft-mode) #sec_shortlist :is(select,input) {
  min-height: 40px; border: 1px solid var(--visual-border); border-radius: 8px;
  background: rgba(2,12,26,.86); color: var(--dc-text); font-family: inherit;
}
body:not(.dc-draft-mode) #sec_shortlist .btn { min-height: 40px; border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 800; }
body:not(.dc-draft-mode) #sec_shortlist .btn.p { border-color: transparent; background: #0f8a5f; color: #fff; }
body:not(.dc-draft-mode) #sec_shortlist .btn.r { border: 1px solid rgba(217,75,75,.7); background: rgba(127,38,45,.28); color: #ffd4d4; }
@media (max-width: 720px) {
  body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero { padding: 16px 14px; }
  body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero h2,
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2 { font-size: 23px; }
  body:not(.dc-draft-mode) #secHelp .dc-help-score-cta { width: 100%; margin-top: 14px; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) { padding: 16px 14px; }
}
/* Section headings use the same icon + title pattern as the Classic lobby. */
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-kicker { display: none; }
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero h2,
body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2 {
  display: flex; align-items: center; gap: 10px;
}
body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero h2::before,
body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2::before {
  content: ''; flex: 0 0 34px; width: 34px; height: 34px;
  background: var(--dc-gold); -webkit-mask: var(--visual-heading-icon) center/contain no-repeat;
  mask: var(--visual-heading-icon) center/contain no-repeat;
}
body:not(.dc-draft-mode) #secHelp .dc-help-hero h2 { --visual-heading-icon: url('/brand/nav/rules.png'); }
body:not(.dc-draft-mode) #secFaq .dc-help-hero h2 { --visual-heading-icon: url('/brand/nav/help.png'); }
body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2 { --visual-heading-icon: url('/brand/nav/shortlist.png'); }
@media (max-width: 720px) {
  body:not(.dc-draft-mode) :is(#secHelp,#secFaq) .dc-help-hero h2::before,
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > h2::before { flex-basis: 30px; width: 30px; height: 30px; }
}
/* Ratings keep medal colours, while their surfaces and type follow the lobby. */
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb {
  border-radius: 9px; background: rgba(7,25,44,.72);
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb h2 {
  color: var(--dc-text); font-family: inherit; font-size: 27px; font-weight: 700; letter-spacing: 0;
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb-meta select {
  min-height: 37px; border: 1px solid var(--dc-line); border-radius: 7px;
  background: rgba(2,12,26,.86); color: var(--dc-text); font-family: inherit;
}
@media (max-width: 680px) {
  body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb h2 { font-size: 23px; }
}
/* The shortlist filter row keeps both actions together at common desktop widths. */
@media (min-width: 1101px) {
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) #shClub { width: 110px; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) #shPos { width: 80px; }
}
/* Updates use the same page-header hierarchy as the other club sections. */
body:not(.dc-draft-mode) #secUpdates .dc-updates { max-width: 1480px; padding-top: 0; }
body:not(.dc-draft-mode) #secUpdates .dc-updates-hero {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  margin: 0 0 20px; padding: 18px 20px; border-bottom: 1px solid var(--dc-line);
  background: rgba(7,25,44,.56);
}
body:not(.dc-draft-mode) #secUpdates .dc-updates-kicker { display: none; }
body:not(.dc-draft-mode) #secUpdates .dc-updates-hero h2 {
  display: flex; align-items: center; gap: 10px; margin: 0;
  color: var(--dc-text); font-size: 27px; line-height: 1.1;
}
body:not(.dc-draft-mode) #secUpdates .dc-updates-hero h2::before {
  content: ''; flex: 0 0 34px; width: 34px; height: 34px; background: var(--dc-gold);
  -webkit-mask: url('/brand/nav/match-center.png') center/contain no-repeat;
  mask: url('/brand/nav/match-center.png') center/contain no-repeat;
}
body:not(.dc-draft-mode) #secUpdates .dc-updates-hero > p {
  max-width: 650px; margin: 0; color: #8fb1cd; font-size: 14px; line-height: 1.45;
}
@media (min-width: 1400px) {
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row {
    display: grid; grid-template-columns: minmax(150px,1.25fr) 130px minmax(180px,1.4fr) minmax(95px,1fr) 80px 130px auto auto;
    align-items: end; gap: 8px;
  }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row > .field { min-width: 0 !important; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) :is(#shTour,#shSlot,#shClub,#shPos,#shFind) { width: 100% !important; }
  body:not(.dc-draft-mode) #sec_shortlist #shMsg:not(:empty) { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  body:not(.dc-draft-mode) #secUpdates .dc-updates-hero { padding: 16px 14px; }
  body:not(.dc-draft-mode) #secUpdates .dc-updates-hero h2 { font-size: 23px; }
  body:not(.dc-draft-mode) #secUpdates .dc-updates-hero h2::before { flex-basis: 30px; width: 30px; height: 30px; }
}
/* Text controls inherit the surrounding club typeface; the game table and
   Squid-specific presentation retain their own local styles. */
body:not(.dc-draft-mode) #app > main .view:not(#secSquid) :is(button,input,select,textarea) {
  font-family: inherit;
}
/* The Fantasy lobby uses the same font stack as the Classic lobby. */
body:not(.dc-draft-mode) #secFantasy .fy-lobby-screen {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* The feature label duplicates the page title and is not a control. */
body:not(.dc-draft-mode) #sec_shortlist .f-feature > .f-head { display: none; }
/* Match the Classic content width on large screens without widening the game table. */
body:not(.dc-draft-mode) #app > main :is(#secHelp,#secFaq,#secFantasy,#secUpdates,#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) { max-width: 1480px; }
body:not(.dc-draft-mode) #app > main .dc-extra-views:has(#sec_shortlist.active) { max-width: 1480px; }
/* Profile statistics follow the same status colours and proportions as Classic. */
body:not(.dc-draft-mode) #app > main #secProfile { max-width: 1480px; }
body:not(.dc-draft-mode) #secProfile .dc-profile-hero-person h2 { font-size: 27px; }
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card {
  min-height: 100px; justify-content: center; padding: 16px 65px 16px 20px;
  border-color: rgba(137,172,201,.65); border-radius: 10px;
  background: linear-gradient(135deg,rgba(39,67,91,.38),rgba(8,28,47,.96));
}
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card::before { display: none; }
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 48px; height: 48px;
  transform: translateY(-50%); background: var(--profile-status-icon) center/contain no-repeat;
}
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card { --profile-status-icon: url('/brand/classic-status-upcoming.png'); }
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card.is-active {
  --profile-status-icon: url('/brand/classic-status-live.png');
  border-color: rgba(209,30,85,.68); background: linear-gradient(135deg,rgba(87,15,43,.34),rgba(8,28,47,.96));
}
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card.is-complete {
  --profile-status-icon: url('/brand/classic-status-finished.png');
  border-color: rgba(14,133,92,.68); background: linear-gradient(135deg,rgba(8,72,54,.34),rgba(7,27,45,.96));
}
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card.is-total {
  --profile-status-icon: url('/brand/classic-draft.png');
  border-color: rgba(206,166,78,.62); background: linear-gradient(135deg,rgba(50,40,19,.36),rgba(8,28,47,.96));
}
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card b { color: #fff; font-size: 28px; }
body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card span { color: var(--dc-text); font-size: 12px; font-weight: 400; }
@media (max-width: 760px) {
  body:not(.dc-draft-mode) #secProfile .dc-profile-hero-person h2 { font-size: 23px; }
  body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card { min-height: 88px; padding: 12px 42px 12px 12px; }
  body:not(.dc-draft-mode) #secProfile .dc-profile-stat-card::after { right: 8px; width: 30px; height: 30px; }
}

/* Header: one vertical rhythm and no stretching of the profile image. */
body:not(.dc-draft-mode) #topbar .dc-avatar { flex: 0 0 auto; aspect-ratio: 1 / 1; }
@media (min-width: 921px) {
  body:not(.dc-draft-mode) #topbar { gap: 10px; }
  body:not(.dc-draft-mode) #topbar .dc-search { flex: 1 1 300px; max-width: none; }
  body:not(.dc-draft-mode) #topbar .dc-search input { height: 44px; }
  body:not(.dc-draft-mode) #topbar .dc-timezone-wrap { flex: 0 0 auto; min-width: 0; }
  body:not(.dc-draft-mode) #topbar .dc-top-actions { flex: 0 0 auto; min-width: 0; }
  body:not(.dc-draft-mode) #topbar :is(.dc-bell-wrap,#navCoin,#navTicket,.dc-topup-btn) { flex-shrink: 0; }
  body:not(.dc-draft-mode) #topbar #navCoin { white-space: nowrap; }
  body:not(.dc-draft-mode) #topbar .dc-user { flex: 0 0 auto; min-width: 0; }
  body:not(.dc-draft-mode) #topbar .dc-user-link { flex: 0 0 auto; min-width: 0; }
}
@media (min-width: 921px) and (max-width: 1100px) {
  body:not(.dc-draft-mode) #topbar .dc-user-meta { display: none; }
  body:not(.dc-draft-mode) #topbar .dc-user { padding-left: 8px; }
  body:not(.dc-draft-mode) #topbar .dc-timezone-button { min-width: 112px; }
}
@media (max-width: 760px) {
  body:not(.dc-draft-mode) #topbar #navTicket { height: 40px; }
}
@media (min-width: 921px) and (max-width: 1100px) {
  body:not(.dc-draft-mode) #topbar .dc-search:focus-within {
    position: absolute; left: 28px; right: 28px; width: auto; max-width: none; z-index: 46;
  }
  body:not(.dc-draft-mode) #topbar .dc-search:focus-within input { box-shadow: 0 8px 28px rgba(0,0,0,.52); }
}
@media (min-width: 561px) and (max-width: 920px) {
  body:not(.dc-draft-mode) #topbar .dc-search input,
  body:not(.dc-draft-mode) #topbar :is(.dc-bell,#navCoin,#navTicket,.dc-topup-btn) { height: 40px; }
  body:not(.dc-draft-mode) #topbar .dc-bell { width: 40px; }
  body:not(.dc-draft-mode) #topbar .dc-avatar { width: 40px; height: 40px; }
}
@media (min-width: 921px) {
  body:not(.dc-draft-mode) #topbar #backToDraftBtn { height: 44px; flex-shrink: 0; }
}
@media (min-width: 921px) and (max-width: 1100px) {
  body:not(.dc-draft-mode) #topbar .dc-search-kbd { display: none; }
  body:not(.dc-draft-mode) #topbar #backToDraftBtn { width: 40px; padding: 0; font-size: 0; }
  body:not(.dc-draft-mode) #topbar #backToDraftBtn::before { content: '←'; font-size: 16px; }
  body:not(.dc-draft-mode) #topbar:has(#backToDraftBtn[style*="inline"]) .dc-timezone-label { display: none; }
  body:not(.dc-draft-mode) #topbar:has(#backToDraftBtn[style*="inline"]) .dc-timezone-button { min-width: 64px; }
}

/* Keep all header actions reachable on narrow phones while a draft is active. */
@media (max-width: 380px) {
  body:not(.dc-draft-mode):has(#backToDraftBtn[style*="inline"]) { --dc-topbar-h: 112px; }
  body:not(.dc-draft-mode) #topbar:has(#backToDraftBtn[style*="inline"]) {
    align-items: flex-start;
    padding-top: 16px;
  }
  body:not(.dc-draft-mode) #topbar #backToDraftBtn {
    position: absolute;
    top: 68px;
    left: 8px;
    width: auto;
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
  body:not(.dc-draft-mode) #topbar #backToDraftBtn::before { content: none; }
}

/* The rules switch uses the same navigation treatment as the Classic lobby. */
body:not(.dc-draft-mode) #secHelp .dc-help-switch {
  gap: 28px; min-height: 52px; margin: 0 0 20px; padding: 0 20px;
  border: 1px solid var(--dc-line); border-radius: 12px;
  background: rgba(6,22,40,.74);
}
body:not(.dc-draft-mode) #secHelp .dc-help-tab {
  flex: 0 0 auto; min-height: 50px; padding: 8px 0; border: 0;
  border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: #9eb7cf; font-size: 14px; line-height: 1.2;
}
body:not(.dc-draft-mode) #secHelp .dc-help-tab.active {
  border-bottom-color: var(--dc-emerald); background: transparent; color: #fff;
}
body:not(.dc-draft-mode) #secHelp .dc-help-tab small { font-size: 11px; }
body:not(.dc-draft-mode) #secHelp .dc-help-tab:focus-visible,
body:not(.dc-draft-mode) #secFaq summary:focus-visible,
body:not(.dc-draft-mode) .dc-lb :is(select,button,summary):focus-visible {
  outline: 2px solid #f0c85d; outline-offset: 2px;
}

/* The leaderboard is a page, not a card nested inside a second card. */
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) > .card2 {
  padding: 0; border: 0; background: transparent; box-shadow: none;
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb {
  padding: 0; border: 0; background: transparent;
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb-head {
  align-items: center; margin: 0 0 20px; padding: 18px 20px;
  border-bottom: 1px solid var(--dc-line); background: rgba(7,25,44,.56);
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb h2 {
  display: flex; align-items: center; gap: 10px; line-height: 1.1;
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb h2::before {
  content: ''; flex: 0 0 34px; width: 34px; height: 34px; background: var(--dc-gold);
  -webkit-mask: url('/brand/nav/rankings.png') center/contain no-repeat;
  mask: url('/brand/nav/rankings.png') center/contain no-repeat;
}
body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb-scroll {
  border: 1px solid var(--dc-line); border-radius: 10px; background: rgba(7,25,44,.72);
}

/* Keep filters aligned and the two shortlist actions together on phones. */
@media (max-width: 720px) {
  body:not(.dc-draft-mode) #secHelp .dc-help-switch {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px; padding: 0 14px; overflow: visible;
  }
  body:not(.dc-draft-mode) #secHelp .dc-help-tab { min-width: 0; min-height: 64px; font-size: 12px; }
  body:not(.dc-draft-mode) #secHelp .dc-help-tab small { font-size: 10px; }
  body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb-head {
    align-items: stretch; padding: 16px 14px;
  }
  body:not(.dc-draft-mode) :is(#secRatings,#secRatingsPro,#secRatingsGold,#secRatingsSilver) .dc-lb h2::before {
    flex-basis: 30px; width: 30px; height: 30px;
  }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 10px;
  }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row > .field { min-width: 0 !important; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row > .field:has(#shSlot) { grid-column: 1 / -1; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) :is(#shTour,#shSlot,#shClub,#shPos,#shFind) { width: 100% !important; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row > .field:has(#shFind) { grid-column: 1 / -1; }
  body:not(.dc-draft-mode) #sec_shortlist .card2:has(#shTour) > .row > button { width: 100%; min-height: 44px; }
  body:not(.dc-draft-mode) #sec_shortlist #shMsg { grid-column: 1 / -1; }
  body:not(.dc-draft-mode) #secFantasy .fy-lobby-actions > button { flex: 1 1 auto; min-height: 44px; }
}

/* Admin navigation and panels follow the same surfaces and active tabs as the lobby. */
body:not(.dc-draft-mode) #secAdmin { max-width: 1480px; }
body:not(.dc-draft-mode) #secAdmin #admSecBar {
  gap: 22px !important; padding: 0 20px; border: 1px solid var(--dc-line) !important;
  border-radius: 12px; background: rgba(6,22,40,.74); box-shadow: none;
}
body:not(.dc-draft-mode) #secAdmin #admSecBar button {
  min-height: 50px; padding: 0; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: transparent; color: #9eb7cf; opacity: 1 !important;
  font-family: inherit; font-size: 13px; font-weight: 750; white-space: nowrap;
}
body:not(.dc-draft-mode) #secAdmin #admSecBar button.p {
  border-bottom-color: var(--dc-emerald); background: transparent; color: #fff;
}
body:not(.dc-draft-mode) #secAdmin > .card2:not(#admSecBar),
body:not(.dc-draft-mode) #adminSquidGame .card2 {
  border-radius: 10px; background: rgba(7,25,44,.72); box-shadow: none;
}
body:not(.dc-draft-mode) #secAdmin :is(button,input,select,textarea):focus-visible,
body:not(.dc-draft-mode) #secProfile :is(button,input,select,summary,a):focus-visible {
  outline: 2px solid #f0c85d; outline-offset: 2px;
}
body:not(.dc-draft-mode) #secAdmin .dc-interface-item,
body:not(.dc-draft-mode) #secAdmin .dc-interface-preview { min-width: 0; max-width: 100%; }
body:not(.dc-draft-mode) #secAdmin .dc-interface-preview {
  width: 100%; height: auto; min-height: 280px; aspect-ratio: auto;
}
body:not(.dc-draft-mode) #secAdmin .dc-interface-preview :is(h3,p,.dc-mode-meta) { flex-shrink: 0; }
body:not(.dc-draft-mode) #secAdmin .dc-interface-preview .dc-mode-meta { min-height: 0; margin-top: 0; }
body:not(.dc-draft-mode) #secAdmin .dc-interface-copy-fields textarea {
  padding: 8px 10px; border: 1px solid var(--dc-line); border-radius: 7px;
  background: rgba(2,12,26,.86); color: var(--dc-text); font-family: inherit;
}

@media (max-width: 760px) {
  body:not(.dc-draft-mode) #secAdmin #admSecBar {
    display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 0 14px !important; padding: 8px 14px;
  }
  body:not(.dc-draft-mode) #secAdmin #admSecBar > span { grid-column: 1 / -1; padding-top: 4px; }
  body:not(.dc-draft-mode) #secAdmin #admSecBar button { min-width: 0; text-align: left; }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table,
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table tbody { display: block; }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table tr {
    display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px;
    padding: 10px 2px; border-bottom: 1px solid rgba(144,181,211,.14);
  }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table td {
    display: block; width: auto !important; min-width: 0; padding: 0 !important;
    overflow: visible; white-space: normal; text-overflow: clip; text-align: left;
    overflow-wrap: anywhere;
  }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
  body:not(.dc-draft-mode) #secProfile .dc-ledger-table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
}
@media (max-width: 680px) {
  body:not(.dc-draft-mode) :is(#allTournamentHub,#secStreet) .dc-tournament-filters {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
  }
  body:not(.dc-draft-mode) :is(#allTournamentHub,#secStreet) .dc-tournament-filters select {
    width: 100%; min-width: 0;
  }
  body:not(.dc-draft-mode) :is(#allTournamentHub,#secStreet) .dc-tournament-search {
    grid-column: 1 / -1; width: 100%; min-width: 0;
  }
  body:not(.dc-draft-mode) :is(#allTournamentHub,#secStreet) .dc-tournament-reset {
    justify-self: start; min-height: 40px;
  }
}
@media (max-width: 360px) {
  body:not(.dc-draft-mode):has(#topbar #backToDraftBtn[style*="inline"]) { --dc-topbar-h: 152px; }
  body:not(.dc-draft-mode) #topbar:has(#backToDraftBtn[style*="inline"]) #backToDraftBtn { top: 112px; }
}
@media (max-width: 680px) {
  body:not(.dc-draft-mode) :is(#classicTournamentHub,#allTournamentHub,#mineTournamentHub,#mineStreetHub,#secStreet,#secFantasy) .dc-mine-status-stat {
    min-width: 0; min-height: 88px; padding: 12px;
  }
  body:not(.dc-draft-mode) :is(#classicTournamentHub,#allTournamentHub,#mineTournamentHub,#mineStreetHub,#secStreet,#secFantasy) .dc-mine-status-stat b {
    padding-right: 34px; overflow-wrap: anywhere;
  }
  body:not(.dc-draft-mode) :is(#classicTournamentHub,#allTournamentHub,#mineTournamentHub,#mineStreetHub,#secStreet,#secFantasy) .dc-mine-status-stat span {
    white-space: normal; overflow-wrap: normal; font-size: 12px; line-height: 1.2;
  }
  body:not(.dc-draft-mode) :is(#classicTournamentHub,#allTournamentHub,#mineTournamentHub,#mineStreetHub,#secStreet,#secFantasy) .dc-mine-status-stat img {
    top: 14px; right: 8px; width: 30px; height: 30px; transform: none;
  }
}
