/* TopMid brand system v1.8.42. ALWAYS dark-first; light only via explicit toggle. */
:root {
    --tmg-teal: #2EC4B6;
    --tmg-teal-deep: #1A9B8E;
    /* Brand anchors (dark shell default): ink = page bg, mist = page text */
    --tmg-ink: #0B1214;
    --tmg-panel: #142026;
    --tmg-mist: #E8EEF0;
    --tmg-muted: #A8BCC4;
    --tmg-danger: #E85D4C;
    --tmg-bg: var(--tmg-ink);
    --tmg-fg: var(--tmg-mist);
    --tmg-text: var(--tmg-mist);
    --tmg-border: color-mix(in srgb, var(--tmg-mist) 16%, transparent);
    --tmg-shadow: 0 12px 30px rgb(0 0 0 / 22%);
    --tmg-header-bg: rgba(11, 18, 20, .92);
    --tmg-header-border: #1e2a30;
}

/* Light theme ONLY when user toggled (data-theme / body class). Never OS prefers-color-scheme. */
html[data-theme="light"],
body.tmg-theme-light {
    /* Invert: page bg becomes light, text becomes dark; teal accents stay. */
    --tmg-ink: #E8EEF0;
    --tmg-panel: #FFFFFF;
    --tmg-mist: #0B1214;
    --tmg-muted: #3A4A50;
    --tmg-bg: var(--tmg-ink);
    --tmg-fg: var(--tmg-mist);
    --tmg-text: var(--tmg-mist);
    --tmg-border: color-mix(in srgb, var(--tmg-mist) 18%, transparent);
    --tmg-shadow: 0 12px 30px rgb(11 18 20 / 12%);
    --tmg-header-bg: rgba(232, 238, 240, .94);
    --tmg-header-border: #c5d0d4;
}

html[data-theme="dark"],
body.tmg-theme-dark {
    --tmg-ink: #0B1214;
    --tmg-panel: #142026;
    --tmg-mist: #E8EEF0;
    --tmg-muted: #A8BCC4;
    --tmg-bg: var(--tmg-ink);
    --tmg-fg: var(--tmg-mist);
    --tmg-text: var(--tmg-mist);
    --tmg-border: color-mix(in srgb, var(--tmg-mist) 16%, transparent);
    --tmg-shadow: 0 12px 30px rgb(0 0 0 / 22%);
    --tmg-header-bg: rgba(11, 18, 20, .92);
    --tmg-header-border: #1e2a30;
}

/* Kill TT5 / block theme light canvas — dark shell is the product. */
html {
    background-color: var(--tmg-bg) !important;
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

body,
body.wp-theme-twentytwentyfive,
.wp-site-blocks,
.wp-site-blocks > main,
main,
main.wp-block-group,
.wp-block-post-content,
.entry-content,
.wp-block-group:not(.has-background) {
    background-color: var(--tmg-bg) !important;
    color: var(--tmg-fg) !important;
}

body {
    background-color: var(--tmg-bg);
    color: var(--tmg-fg);
}

body,
button,
input,
select,
textarea {
    color: var(--tmg-mist);
}

a {
    color: var(--tmg-teal);
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

a:hover,
a:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
    color: var(--tmg-teal-deep);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tmg-mist);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    background: var(--tmg-teal);
    border: 1px solid var(--tmg-teal);
    border-radius: .45rem;
    color: #0B1214;
    cursor: pointer;
    font-weight: 700;
    padding: .65rem 1rem;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible,
input[type="button"]:hover,
input[type="button"]:focus-visible,
input[type="reset"]:hover,
input[type="reset"]:focus-visible {
    background: var(--tmg-teal-deep);
    border-color: var(--tmg-teal-deep);
    color: #fff;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
select,
textarea {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-border);
    border-radius: .4rem;
    box-sizing: border-box;
    color: var(--tmg-mist);
    padding: .6rem .7rem;
}

::placeholder {
    color: var(--tmg-muted);
    opacity: 1;
}

/* Shared shortcode panels. */
.tmg-panel,
.tmg-form,
.tmg-leaderboard,
.tmg-recent-matches,
.tmg-tournament,
.tmg-matches,
.tmg-tournament-standings,
.tmg-tournament-bracket,
.tmg-card:not(article) {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-border);
    border-radius: .7rem;
    box-shadow: var(--tmg-shadow);
}

.tmg-panel,
.tmg-form,
.tmg-tournament,
.tmg-matches,
.tmg-card:not(article) {
    padding: clamp(1rem, 2.5vw, 1.5rem);
}

.tmg-form label {
    color: var(--tmg-mist);
}

.tmg-form .description,
.tmg-tournament-meta,
.tmg-round-status,
.tmg-slot,
.tmg-date,
.tmg-vs {
    color: var(--tmg-muted);
}

.tmg-msg {
    background: var(--tmg-panel);
    border-left: 3px solid var(--tmg-teal);
    border-radius: .35rem;
    padding: .75rem 1rem;
}

.tmg-msg.tmg-ok {
    border-left-color: var(--tmg-teal);
    color: var(--tmg-teal);
}

.tmg-msg.tmg-err {
    border-left-color: var(--tmg-danger);
    color: var(--tmg-danger);
}

.tmg-leaderboard {
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    width: 100%;
}

.tmg-leaderboard th,
.tmg-leaderboard td {
    border: 0;
    border-bottom: 1px solid var(--tmg-border);
    padding: .75rem .85rem;
    text-align: left;
}

.tmg-leaderboard th {
    background: rgb(46 196 182 / 10%);
    color: var(--tmg-teal);
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.tmg-leaderboard tbody tr:last-child td {
    border-bottom: 0;
}

.tmg-leaderboard tbody tr:hover {
    background: rgb(46 196 182 / 6%);
}

.tmg-recent-matches {
    list-style: none;
    margin: 0;
    padding: .35rem 1rem;
}

.tmg-recent-matches li {
    border-bottom: 1px solid var(--tmg-border);
    padding: .7rem 0;
}

.tmg-recent-matches li:last-child {
    border-bottom: 0;
}

.tmg-tournament {
    margin: 1.25rem 0;
}

.tmg-tournament-header {
    border-bottom: 1px solid var(--tmg-border);
    margin-bottom: 1.25rem;
    padding-bottom: .9rem;
}

.tmg-tournament-title {
    margin-top: 0;
}

.tmg-tournament-notes {
    color: var(--tmg-muted);
    font-style: italic;
}

.tmg-tournament-standings,
.tmg-tournament-bracket {
    margin: 1.25rem 0;
    padding: 1rem;
}

.tmg-tournament-standings .tmg-leaderboard {
    box-shadow: none;
}

.tmg-round {
    border-top: 1px solid var(--tmg-border);
    margin: 1.25rem 0 0;
    padding-top: 1rem;
}

.tmg-round h4 {
    align-items: baseline;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
}

.tmg-match-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-match {
    align-items: center;
    background: color-mix(in srgb, var(--tmg-ink) 55%, var(--tmg-panel));
    border: 1px solid var(--tmg-border);
    border-radius: .45rem;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: .55rem;
    padding: .7rem .85rem;
}

.tmg-match:last-child {
    margin-bottom: 0;
}

.tmg-side {
    font-weight: 600;
}

.tmg-side.tmg-winner {
    color: var(--tmg-teal);
}

.tmg-side em {
    color: var(--tmg-mist);
    font-style: normal;
    margin-left: .25rem;
}

.tmg-match-link {
    font-size: .9rem;
    margin-left: auto;
}

@media (max-width: 40rem) {
    .tmg-leaderboard {
        display: block;
        overflow-x: auto;
    }

    .tmg-match-link {
        flex-basis: 100%;
        margin-left: 2.65rem;
    }
}


/* -------------------------------------------------------------------------- */
/* Homepage shortcode [tmg_home] — Captain-approved mockup layout             */
/* -------------------------------------------------------------------------- */
.tmg-home {
    --tmg-home-max: 1240px;
    --tmg-home-radius: 16px;
    --tmg-home-border: #243038;
    --tmg-home-line: #1e2a30;
    box-sizing: border-box;
    color: var(--tmg-mist);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    margin: 0 auto;
    max-width: var(--tmg-home-max);
    padding: 0 24px 40px;
}

html[data-theme="light"] .tmg-home,
body.tmg-theme-light .tmg-home {
    --tmg-home-border: #c5d0d4;
    --tmg-home-line: #d5dee2;
}

.tmg-home *,
.tmg-home *::before,
.tmg-home *::after {
    box-sizing: border-box;
}

.tmg-home a {
    color: var(--tmg-teal);
    text-decoration: none;
}

.tmg-home-badge {
    background: rgba(46, 196, 182, .15);
    border: 1px solid rgba(46, 196, 182, .35);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 10px;
    padding: 4px 8px;
    text-transform: uppercase;
}

.tmg-home-btn {
    align-items: center;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    padding: 10px 16px;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}

.tmg-home-btn:hover {
    transform: translateY(-1px);
}

.tmg-home-btn-primary {
    background: var(--tmg-teal);
    box-shadow: 0 8px 24px rgba(46, 196, 182, .25);
    color: #062 !important;
}

.tmg-home-btn-primary:hover,
.tmg-home-btn-primary:focus-visible {
    background: var(--tmg-teal-deep);
    box-shadow: 0 0 24px rgba(46, 196, 182, .45);
    color: #fff !important;
}

.tmg-home-btn-ghost {
    background: transparent;
    border: 1px solid #2a3a40;
    color: var(--tmg-mist) !important;
}

.tmg-home-btn-ghost:hover,
.tmg-home-btn-ghost:focus-visible {
    border-color: var(--tmg-teal);
    color: var(--tmg-teal) !important;
}

/* Hero */
.tmg-home-hero {
    padding: 40px 0 28px;
}

.tmg-home-hero-grid {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: 1.1fr .9fr;
}

.tmg-home-hero-copy h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.02em;
    line-height: 1.05;
    margin: 0 0 12px;
}

.tmg-home-hero-copy p {
    color: var(--tmg-muted);
    margin: 0 0 22px;
    max-width: 42ch;
}

.tmg-home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Spark graphic slot — 720×640 hero; ~120px clear bottom for Login/Sign up. */
.tmg-hero-spark-slot {
    display: block;
    margin: 12px 0 8px;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
}

.tmg-hero-spark-img {
    display: block;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    width: 100%;
}

.tmg-home-hero-auth {
    margin-top: 4px;
}

/* Hot Off The Press featured card (upper right). */
.tmg-hot-press-card {
    isolation: isolate;
}

.tmg-hot-press-thumb {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.tmg-hot-press-mark {
    left: 10px;
    padding: 4px;
    pointer-events: none;
    position: absolute;
    top: 10px;
    z-index: 2;
}

.tmg-hot-press-mark-img {
    display: block;
    height: auto;
    max-height: 110px;
    max-width: min(48%, 220px);
    object-fit: contain;
    width: auto;
}

.tmg-hot-press-mark-fallback {
    background: rgba(46, 196, 182, .18);
    border: 1px solid rgba(46, 196, 182, .45);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    padding: 5px 9px;
    text-transform: uppercase;
}

.tmg-hot-press-title,
.tmg-home-hero-card h2 {
    color: #E8EEF0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

.tmg-home-hero-card .tmg-home-meta {
    color: rgba(232, 238, 240, .82) !important;
}

.tmg-home-hero-card .tmg-home-badge {
    color: var(--tmg-teal);
}

.tmg-hot-press-empty {
    cursor: default;
    pointer-events: none;
}

.tmg-home-hero-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    color: inherit !important;
    display: block;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.tmg-home-hero-card:hover,
.tmg-home-hero-card:focus-visible {
    border-color: rgba(46, 196, 182, .5);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45), 0 0 40px rgba(46, 196, 182, .15);
    color: inherit !important;
    transform: translateY(-4px);
}

.tmg-home-hero-art {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.tmg-home-hero-card:hover .tmg-home-hero-art {
    transform: scale(1.06);
}

.tmg-home-hero-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 22px;
    position: relative;
    z-index: 1;
}

.tmg-home-hero-card h2 {
    font-size: 22px;
    margin: 0 0 6px;
}

.tmg-home-meta {
    color: var(--tmg-muted);
    font-size: 13px;
}

/* Sections */
.tmg-home-section {
    padding: 28px 0 8px;
}

.tmg-home-section-head {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tmg-home-section-head h3 {
    font-size: 20px;
    letter-spacing: -.01em;
    margin: 0;
}

.tmg-home-section-head a {
    font-size: 13px;
    font-weight: 600;
}

/* Competition strip (Ladder + Submit; Preview Cup lives in hero + #preview) */
.tmg-home-comp {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}

.tmg-home-comp-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    display: block;
    padding: 18px;
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.tmg-home-comp-card:hover,
.tmg-home-comp-card:focus-visible {
    border-color: rgba(46, 196, 182, .45);
    box-shadow: 0 0 28px rgba(46, 196, 182, .12);
    color: inherit !important;
    transform: translateY(-3px);
}

.tmg-home-comp-card h4 {
    font-size: 15px;
    margin: 0 0 8px;
}

.tmg-home-comp-card ul {
    color: var(--tmg-muted);
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-home-comp-card li {
    border-bottom: 1px solid var(--tmg-home-line);
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.tmg-home-comp-card li:last-child {
    border: 0;
}

.tmg-home-elo {
    color: var(--tmg-teal);
    font-weight: 700;
}

/* News & Reviews grid — 2×2 so 4 home cards fill evenly (S4); /news/ uses other classes */
.tmg-home-news {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
}

.tmg-home-news.tmg-card-grid--2x3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
}

.tmg-home-article {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    cursor: pointer;
    display: block;
    isolation: isolate;
    min-height: 180px;
    overflow: hidden;
    position: relative;
    transition: border-color .3s, box-shadow .3s;
}

.tmg-home-article-featured {
    grid-row: span 2;
    min-height: 380px;
}

.tmg-home-article-wide {
    grid-column: 2 / span 2;
}

.tmg-home-article-thumb {
    background-position: center;
    background-size: cover;
    inset: 0;
    position: absolute;
    transition: transform .45s ease, filter .3s;
}

.tmg-home-article-a .tmg-home-article-placeholder,
.tmg-home-article-a .tmg-home-article-thumb.tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #234, #0b1214 60%),
        radial-gradient(circle at 70% 30%, rgba(46, 196, 182, .5), transparent 45%);
}

.tmg-home-article-b .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #2a2030, #0b1214 65%),
        radial-gradient(circle at 40% 40%, rgba(232, 93, 76, .35), transparent 40%);
}

.tmg-home-article-c .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #203040, #0b1214 60%),
        radial-gradient(circle at 60% 60%, rgba(46, 196, 182, .3), transparent 45%);
}

.tmg-home-article-d .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #1a2830, #0b1214 70%),
        radial-gradient(circle at 20% 80%, rgba(26, 155, 142, .4), transparent 40%);
}

.tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 30%, rgba(11, 18, 20, .92));
    inset: 0;
    position: absolute;
    transition: opacity .3s;
}

.tmg-home-article-overlay {
    background: rgba(46, 196, 182, 0);
    inset: 0;
    pointer-events: none;
    position: absolute;
    transition: background .3s;
}

.tmg-home-article-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 18px;
    position: relative;
    z-index: 2;
}

.tmg-home-article-tag {
    color: var(--tmg-teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* Overlay sits on dark shade — keep high-contrast light type in both themes. */
.tmg-home-article-content {
    color: #E8EEF0;
}

.tmg-home-article h4 {
    color: #E8EEF0 !important;
    font-size: 16px;
    margin: 0 0 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    transition: color .2s;
}

.tmg-home-article-featured h4 {
    font-size: 26px;
    line-height: 1.15;
}

.tmg-home-article-by {
    color: rgba(232, 238, 240, .82) !important;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

html[data-theme="light"] .tmg-home-article-shade,
body.tmg-theme-light .tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 22%, rgba(11, 18, 20, .88));
}

.tmg-home-article:hover,
.tmg-home-article:focus-visible {
    border-color: rgba(46, 196, 182, .55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4), 0 0 32px rgba(46, 196, 182, .18);
    color: inherit !important;
}

.tmg-home-article:hover .tmg-home-article-thumb,
.tmg-home-article:focus-visible .tmg-home-article-thumb {
    filter: brightness(1.08);
    transform: scale(1.08);
}

.tmg-home-article:hover .tmg-home-article-overlay,
.tmg-home-article:focus-visible .tmg-home-article-overlay {
    background: rgba(46, 196, 182, .12);
}

.tmg-home-article:hover h4,
.tmg-home-article:focus-visible h4 {
    color: var(--tmg-teal);
}

.tmg-home-article:hover .tmg-home-article-shade,
.tmg-home-article:focus-visible .tmg-home-article-shade {
    opacity: .85;
}

.tmg-home-preview .tmg-tournament {
    margin-top: .5rem;
}

@media (max-width: 900px) {
    .tmg-home-hero-grid,
    .tmg-home-comp,
    .tmg-home-news {
        grid-template-columns: 1fr;
    }

    .tmg-home-article-featured {
        grid-row: auto;
        min-height: 260px;
    }

    .tmg-home-article-wide {
        grid-column: auto;
    }
}

/* Sitewide nav — match approved mock (sticky, blur, tight GameBattles chrome) */
body header,
body .wp-block-template-part[area="header"],
header.wp-block-template-part,
.wp-block-template-part[class*="header"],
body .wp-site-blocks > header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: var(--tmg-header-bg) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--tmg-header-border) !important;
  min-height: 64px;
  box-shadow: none !important;
  color: var(--tmg-fg) !important;
}

header.wp-block-template-part .wp-block-group,
.wp-block-template-part[area="header"] .wp-block-group,
.wp-block-template-part[class*="header"] .wp-block-group,
body .wp-site-blocks > header .wp-block-group {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center !important;
  gap: 1.25rem !important;
  min-height: 64px;
  max-width: 1240px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body .wp-block-site-logo {
  order: -1;
  margin-right: auto !important;
  margin-bottom: 0 !important;
}

body .wp-block-site-logo a.custom-logo-link {
  display: inline-flex;
}

body .wp-block-site-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Primary nav links — muted, weight 600; hover mist; current teal */
body header .wp-block-navigation,
body .wp-block-template-part[area="header"] .wp-block-navigation,
body .wp-site-blocks > header .wp-block-navigation {
  gap: 18px !important;
  background: transparent !important;
}

body header .wp-block-navigation .wp-block-navigation-item,
body .wp-block-template-part[area="header"] .wp-block-navigation-item {
  margin: 0 !important;
}

body header .wp-block-navigation-item a,
body header .wp-block-navigation-item__content,
body .wp-block-template-part[area="header"] .wp-block-navigation-item a,
body .wp-block-template-part[area="header"] .wp-block-navigation-item__content,
body .wp-site-blocks > header .wp-block-navigation-item a,
body header .wp-block-navigation a {
  color: var(--tmg-muted) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  padding: .35rem .15rem !important;
  background: transparent !important;
  text-decoration: none !important;
  transition: color .2s ease;
}

body header .wp-block-navigation-item a:hover,
body header .wp-block-navigation-item a:focus-visible,
body .wp-block-template-part[area="header"] .wp-block-navigation-item a:hover,
body .wp-block-template-part[area="header"] .wp-block-navigation-item a:focus-visible,
body .wp-site-blocks > header .wp-block-navigation-item a:hover {
  color: var(--tmg-mist) !important;
  background: transparent !important;
}

body header .wp-block-navigation-item.current-menu-item > a,
body header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
body header .wp-block-navigation-item.current-menu-ancestor > a,
body header .wp-block-navigation-item[aria-current="page"] > a,
body header .wp-block-navigation-item .current-menu-item > a,
body .wp-block-template-part[area="header"] .wp-block-navigation-item.current-menu-item > a,
body .wp-block-template-part[area="header"] .wp-block-navigation-item[aria-current="page"] > a {
  color: var(--tmg-teal) !important;
}

/* Kill giant TT5 header padding / white chrome on nav wrappers */
body header .wp-block-group.has-background,
body header .wp-block-group[style*="background"],
body .wp-block-template-part[area="header"] .wp-block-group.has-background,
body .wp-site-blocks > header .has-background,
body header .has-global-padding,
body header .wp-block-group-is-layout-constrained {
  background: transparent !important;
  background-color: transparent !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body header .wp-block-buttons,
body header .wp-block-button {
  margin: 0 !important;
}

body header .wp-block-button__link {
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}

/* Theme toggle (injected by tmg-theme.js) */
.tmg-theme-toggle {
  appearance: none;
  border: 1px solid #2a3a40 !important;
  background: var(--tmg-panel) !important;
  color: var(--tmg-mist) !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: .35rem;
}

html[data-theme="light"] .tmg-theme-toggle,
body.tmg-theme-light .tmg-theme-toggle {
  border-color: #c5d0d4 !important;
}

.tmg-theme-toggle:hover,
.tmg-theme-toggle:focus-visible {
  border-color: var(--tmg-teal) !important;
  color: var(--tmg-teal) !important;
}


/* Person / account control (injected by tmg-theme.js) — upper-right platform chrome */
.tmg-account-menu {
  position: relative;
  flex-shrink: 0;
  margin-left: .25rem;
}

.tmg-account-btn {
  appearance: none;
  align-items: center;
  background: var(--tmg-panel) !important;
  border: 1px solid #2a3a40 !important;
  border-radius: 999px !important;
  color: var(--tmg-mist) !important;
  cursor: pointer;
  display: inline-flex !important;
  flex-shrink: 0;
  height: 34px;
  justify-content: center;
  line-height: 1;
  margin-left: .25rem;
  padding: 0 !important;
  text-decoration: none !important;
  width: 34px;
}

html[data-theme="light"] .tmg-account-btn,
body.tmg-theme-light .tmg-account-btn {
  border-color: #c5d0d4 !important;
}

.tmg-account-btn:hover,
.tmg-account-btn:focus-visible,
.tmg-account-menu.is-open > .tmg-account-btn {
  border-color: var(--tmg-teal) !important;
  color: var(--tmg-teal) !important;
}

.tmg-account-btn svg {
  display: block;
}

.tmg-account-dropdown {
  background: var(--tmg-panel);
  border: 1px solid var(--tmg-border);
  border-radius: .55rem;
  box-shadow: var(--tmg-shadow);
  display: none;
  min-width: 11.5rem;
  padding: .35rem 0;
  position: absolute;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 200;
}

.tmg-account-menu.is-open .tmg-account-dropdown {
  display: block;
}

.tmg-account-dropdown a {
  color: var(--tmg-mist) !important;
  display: block;
  font-size: .9rem;
  font-weight: 600;
  padding: .55rem .9rem;
  text-decoration: none !important;
}

.tmg-account-dropdown a:hover,
.tmg-account-dropdown a:focus-visible {
  background: rgb(46 196 182 / 10%);
  color: var(--tmg-teal) !important;
}

/* Hide separate Account / Login / Register text nav items — person icon replaces them */
body header .wp-block-navigation-item:has(> a[href*="/account"]),
body header .wp-block-navigation-item:has(> a[href*="/login"]),
body header .wp-block-navigation-item:has(> a[href*="/register"]),
body .wp-site-blocks > header .wp-block-navigation-item:has(> a[href*="/account"]),
body .wp-site-blocks > header .wp-block-navigation-item:has(> a[href*="/login"]),
body .wp-site-blocks > header .wp-block-navigation-item:has(> a[href*="/register"]) {
  display: none !important;
}

/* [tmg_auth] combined login/register */
.tmg-auth {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 28rem;
  width: 100%;
}

.tmg-auth-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.tmg-auth-tab {
  background: var(--tmg-panel);
  border: 1px solid var(--tmg-border);
  border-radius: .45rem;
  color: var(--tmg-muted) !important;
  flex: 1;
  font-size: .9rem;
  font-weight: 700;
  padding: .65rem .75rem;
  text-align: center;
  text-decoration: none !important;
}

.tmg-auth-tab.is-active,
.tmg-auth-tab:hover,
.tmg-auth-tab:focus-visible {
  border-color: var(--tmg-teal);
  color: var(--tmg-teal) !important;
}

.tmg-auth-logged-in .tmg-auth-hello {
  color: var(--tmg-mist);
  font-weight: 600;
  margin: 0 0 .75rem;
}

.tmg-auth-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tmg-auth-links li {
  border-bottom: 1px solid var(--tmg-border);
  margin: 0;
}

.tmg-auth-links li:last-child {
  border-bottom: 0;
}

.tmg-auth-links a {
  display: block;
  font-weight: 600;
  padding: .7rem 0;
}



/* -------------------------------------------------------------------------- */
/* Competition page shell — match homepage max-width / spacing / palette      */
/* -------------------------------------------------------------------------- */
:root {
    --tmg-content-max: 1240px;
    --tmg-content-pad-x: 24px;
    --tmg-content-pad-y: 2.5rem;
}

body .wp-block-post-title,
body .entry-title,
body h1.wp-block-post-title {
    box-sizing: border-box;
    color: var(--tmg-mist);
    letter-spacing: -.02em;
    line-height: 1.15;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--tmg-content-max);
    padding-left: var(--tmg-content-pad-x);
    padding-right: var(--tmg-content-pad-x);
}

body .entry-content,
body .wp-block-post-content {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--tmg-content-max);
    padding-bottom: var(--tmg-content-pad-y);
    padding-left: var(--tmg-content-pad-x);
    padding-right: var(--tmg-content-pad-x);
}

/* Homepage shortcode already owns its own max-width + horizontal padding. */
body .entry-content:has(.tmg-home),
body .wp-block-post-content:has(.tmg-home) {
    max-width: none;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Shortcode panels share homepage rhythm. */
.tmg-leaderboard,
.tmg-recent-matches,
.tmg-form,
.tmg-tournament,
.tmg-empty-card,
.tmg-matches {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--tmg-content-max);
}

.tmg-form,
.tmg-tournament,
.tmg-empty-card {
    margin-bottom: 1.25rem;
    margin-top: 1.25rem;
}


/* -------------------------------------------------------------------------- */
/* Vertically centered page bodies (v1.4.3)                                   */
/* Short inner pages: content block centered in the viewport between header   */
/* and footer. Tall pages / home: top-anchored scroll (no mid-screen float).  */
/* -------------------------------------------------------------------------- */
:root {
    --tmg-header-h: 64px;
    --tmg-footer-h: 5rem;
}

/* Column shell so main can flex-grow into leftover viewport height. */
body .wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Main flex-grows into leftover viewport (≈ calc(100vh - header - footer)). */
/* Vertical center REMOVED (Captain: wrong axis; caused layout fallout).
   Main is a normal block flow; horizontal centering is handled below. */
body .wp-site-blocks > main,
body .wp-site-blocks > main.wp-block-group {
    box-sizing: border-box;
    display: block;
    flex: 1 1 auto;
    width: 100%;
}

/* Home stays top-anchored like the mock (long scroll, not vertically centered). */

/* Inner content keeps horizontal max-width centering from page shell rules. */
body .wp-site-blocks > main > .wp-block-group,
body .wp-site-blocks > main > article,
body .wp-site-blocks > main > .entry-content,
body .wp-site-blocks > main > .wp-block-post-content {
    width: 100%;
}

/* News page [tmg_news] — newspaper hierarchy (no new brand art). */
.tmg-news-page {
    box-sizing: border-box;
    color: var(--tmg-mist);
    margin: 0 auto;
    max-width: var(--tmg-content-max, 1240px);
    padding: 0 var(--tmg-content-pad-x, 24px) 2rem;
    width: 100%;
}

.tmg-news-page *,
.tmg-news-page *::before,
.tmg-news-page *::after {
    box-sizing: border-box;
}

.tmg-news-masthead {
    border-bottom: 2px solid var(--tmg-teal);
    margin: 0 0 1.35rem;
    padding: 0 0 .85rem;
}

.tmg-news-kicker {
    color: var(--tmg-teal);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .14em;
    margin: 0 0 .35rem;
    text-transform: uppercase;
}

.tmg-news-mast-title {
    color: var(--tmg-mist);
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 0;
}

.tmg-news-layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1.35fr 1fr;
}

.tmg-news-feature {
    margin: 0;
}

.tmg-news-feature-link {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-border);
    border-radius: .75rem;
    box-shadow: var(--tmg-shadow);
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 22rem;
    overflow: hidden;
    text-decoration: none !important;
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.tmg-news-feature-link:hover,
.tmg-news-feature-link:focus-visible {
    border-color: rgba(46, 196, 182, .5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28), 0 0 28px rgba(46, 196, 182, .14);
    color: inherit !important;
    transform: translateY(-3px);
}

.tmg-news-feature-media {
    background-position: center;
    background-size: cover;
    display: block;
    flex: 0 0 auto;
    min-height: 12rem;
    transition: transform .45s ease, filter .3s ease;
}

.tmg-news-feature-placeholder {
    background:
        linear-gradient(135deg, #1a3035, #0b1214 65%),
        radial-gradient(circle at 30% 30%, rgba(46, 196, 182, .35), transparent 50%);
}

.tmg-news-feature-link:hover .tmg-news-feature-media,
.tmg-news-feature-link:focus-visible .tmg-news-feature-media {
    filter: brightness(1.06);
    transform: scale(1.04);
}

.tmg-news-feature-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: .45rem;
    padding: 1.15rem 1.25rem 1.35rem;
}

.tmg-news-tag {
    color: var(--tmg-teal);
    display: inline-block;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0;
}

.tmg-news-title,
.tmg-news-feature-title,
a.tmg-news-title,
.tmg-news-card .tmg-news-title {
    color: var(--tmg-mist) !important;
    display: block;
    font-size: 1.05rem;
    font-weight: 760;
    letter-spacing: -.015em;
    line-height: 1.25;
    margin: 0;
    text-decoration: none;
    transition: color .2s ease;
}

.tmg-news-feature-title {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 800;
}

.tmg-news-feature-link:hover .tmg-news-feature-title,
.tmg-news-feature-link:focus-visible .tmg-news-feature-title,
.tmg-news-card:hover .tmg-news-title,
.tmg-news-card:focus-visible .tmg-news-title {
    color: var(--tmg-teal) !important;
}

.tmg-news,
.tmg-news-secondary {
    box-sizing: border-box;
    display: grid;
    gap: .85rem;
    grid-template-columns: 1fr;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.tmg-news-item {
    margin: 0;
    padding: 0;
}

.tmg-news-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-border);
    border-radius: .65rem;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    height: 100%;
    padding: 1rem 1.1rem 1.15rem;
    text-decoration: none !important;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tmg-news-card:hover,
.tmg-news-card:focus-visible {
    border-color: rgba(46, 196, 182, .45);
    box-shadow: 0 0 24px rgba(46, 196, 182, .12);
    color: inherit !important;
    transform: translateY(-2px);
}

.tmg-news-meta {
    color: var(--tmg-muted) !important;
    font-size: .82rem;
    margin: 0;
}

.tmg-news-excerpt {
    color: var(--tmg-mist) !important;
    display: -webkit-box;
    font-size: .92rem;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    margin: .15rem 0 0;
    overflow: hidden;
    opacity: .92;
}

.tmg-news-excerpt p {
    margin: 0;
}

.tmg-news-empty {
    margin: 1rem 0;
}

@media (min-width: 1100px) {
    .tmg-news-secondary {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: minmax(0, auto);
    }

    .tmg-news-layout {
        align-items: stretch;
        grid-template-columns: 1.4fr 1fr;
    }

    .tmg-news-feature {
        grid-row: span 1;
    }
}

@media (max-width: 900px) {
    .tmg-news-layout {
        grid-template-columns: 1fr;
    }

    .tmg-news-feature-link {
        min-height: 0;
    }
}

/* Light-mode news: high-contrast titles/bylines/excerpts/tags on light panels. */
html[data-theme="light"] .tmg-news-page,
body.tmg-theme-light .tmg-news-page,
html[data-theme="light"] .tmg-news-card,
body.tmg-theme-light .tmg-news-card,
html[data-theme="light"] .tmg-news-feature-link,
body.tmg-theme-light .tmg-news-feature-link {
    color: #0B1214;
}

html[data-theme="light"] .tmg-news-mast-title,
body.tmg-theme-light .tmg-news-mast-title,
html[data-theme="light"] .tmg-news-title,
body.tmg-theme-light .tmg-news-title,
html[data-theme="light"] .tmg-news-feature-title,
body.tmg-theme-light .tmg-news-feature-title,
html[data-theme="light"] .tmg-news-card .tmg-news-title,
body.tmg-theme-light .tmg-news-card .tmg-news-title,
html[data-theme="light"] .tmg-news-excerpt,
body.tmg-theme-light .tmg-news-excerpt {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-news-meta,
body.tmg-theme-light .tmg-news-meta {
    color: var(--tmg-muted) !important;
}

html[data-theme="light"] .tmg-news-tag,
body.tmg-theme-light .tmg-news-tag,
html[data-theme="light"] .tmg-news-kicker,
body.tmg-theme-light .tmg-news-kicker {
    color: var(--tmg-teal-deep, #1A9B8E) !important;
}

html[data-theme="light"] .tmg-news-feature-link,
body.tmg-theme-light .tmg-news-feature-link,
html[data-theme="light"] .tmg-news-card,
body.tmg-theme-light .tmg-news-card {
    background: #FFFFFF;
    border-color: #c5d0d4;
    box-shadow: 0 10px 28px rgba(11, 18, 20, .08);
}

/* -------------------------------------------------------------------------- */
/* Empty-state cards — ladder / leaderboard / tournament / matches            */
/* -------------------------------------------------------------------------- */
.tmg-empty-card {
    align-items: center;
    background: var(--tmg-panel);
    border: 1px dashed color-mix(in srgb, var(--tmg-teal) 35%, var(--tmg-border));
    border-radius: .7rem;
    box-shadow: var(--tmg-shadow);
    color: var(--tmg-muted);
    display: flex;
    flex-direction: column;
    gap: .35rem;
    justify-content: center;
    min-height: 8.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    text-align: center;
}

.tmg-empty-card .tmg-empty-title,
.tmg-empty-card > p:first-child {
    color: var(--tmg-mist);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0;
}

.tmg-empty-card .tmg-empty-hint,
.tmg-empty-card > p.tmg-empty-hint {
    color: var(--tmg-muted);
    font-size: .9rem;
    margin: 0;
    max-width: 36ch;
}

/* Empty row inside a still-rendered leaderboard table. */
.tmg-leaderboard tr.tmg-empty td {
    background: color-mix(in srgb, var(--tmg-ink) 40%, var(--tmg-panel));
    border-bottom: 0;
    color: var(--tmg-muted);
    padding: 1.75rem 1rem;
    text-align: center;
}

.tmg-leaderboard tr.tmg-empty .tmg-empty-title {
    color: var(--tmg-mist);
    display: block;
    font-weight: 700;
    margin-bottom: .25rem;
}

.tmg-recent-matches.tmg-empty-list,
.tmg-recent-matches li.tmg-empty {
    border: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-msg.tmg-empty-card {
    border-left: 0;
}


/* -------------------------------------------------------------------------- */
/* Phase B — Competitive profile sections (UM profile shortcodes)             */
/* Dark-first panels, teal accents, empty cards reuse .tmg-empty-card.        */
/* -------------------------------------------------------------------------- */
.tmg-profile-competition,
.tmg-profile-section {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--tmg-content-max, 1240px);
    width: 100%;
}

.tmg-profile-competition {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.tmg-profile-section {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-border);
    border-radius: .7rem;
    box-shadow: var(--tmg-shadow);
    padding: clamp(1rem, 2.5vw, 1.35rem);
}

.tmg-profile-heading {
    border-bottom: 1px solid color-mix(in srgb, var(--tmg-teal) 28%, var(--tmg-border));
    color: var(--tmg-mist);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0 0 1rem;
    padding-bottom: .55rem;
}

.tmg-profile-elo-table {
    margin: 0;
    width: 100%;
}

.tmg-elo-value {
    color: var(--tmg-teal);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.tmg-mode-pill,
.tmg-source-pill {
    background: color-mix(in srgb, var(--tmg-teal) 14%, var(--tmg-ink));
    border: 1px solid color-mix(in srgb, var(--tmg-teal) 35%, var(--tmg-border));
    border-radius: 999px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    padding: .15rem .55rem;
    text-transform: uppercase;
}

.tmg-profile-match-list,
.tmg-profile-tourney-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-profile-match,
.tmg-profile-tourney {
    align-items: flex-start;
    border-bottom: 1px solid var(--tmg-border);
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    justify-content: space-between;
    padding: .85rem 0;
}

.tmg-profile-match:last-child,
.tmg-profile-tourney:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tmg-profile-match:first-child,
.tmg-profile-tourney:first-child {
    padding-top: 0;
}

.tmg-profile-match-result {
    align-items: center;
    background: color-mix(in srgb, var(--tmg-ink) 55%, var(--tmg-panel));
    border: 1px solid var(--tmg-border);
    border-radius: .45rem;
    color: var(--tmg-muted);
    display: inline-flex;
    flex: 0 0 2.1rem;
    font-size: .85rem;
    font-weight: 800;
    height: 2.1rem;
    justify-content: center;
    letter-spacing: .02em;
    width: 2.1rem;
}

.tmg-profile-match-result.tmg-result-w {
    background: color-mix(in srgb, var(--tmg-teal) 22%, var(--tmg-ink));
    border-color: color-mix(in srgb, var(--tmg-teal) 55%, var(--tmg-border));
    color: var(--tmg-teal);
}

.tmg-profile-match-result.tmg-result-l {
    background: color-mix(in srgb, #c45c5c 18%, var(--tmg-ink));
    border-color: color-mix(in srgb, #c45c5c 40%, var(--tmg-border));
    color: #e8a0a0;
}

.tmg-profile-match-body {
    display: flex;
    flex: 1 1 12rem;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.tmg-profile-match-context,
.tmg-profile-tourney-name {
    color: var(--tmg-mist);
    font-weight: 650;
    text-decoration: none;
}

a.tmg-profile-tourney-name:hover,
a.tmg-profile-tourney-name:focus-visible,
a.tmg-player-link:hover,
a.tmg-player-link:focus-visible {
    color: var(--tmg-teal);
}

a.tmg-player-link {
    color: var(--tmg-mist);
    text-decoration: none;
}

.tmg-profile-match-vs {
    color: var(--tmg-muted);
    font-size: .9rem;
}

.tmg-profile-match-meta,
.tmg-profile-tourney-meta {
    align-items: center;
    color: var(--tmg-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .8rem;
    gap: .45rem .75rem;
}

.tmg-profile-match .tmg-match-link,
.tmg-profile-section .tmg-match-link {
    color: var(--tmg-teal);
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 600;
    margin-left: auto;
    text-decoration: none;
    white-space: nowrap;
}

.tmg-profile-match .tmg-match-link:hover,
.tmg-profile-match .tmg-match-link:focus-visible {
    text-decoration: underline;
}

.tmg-profile-tourney-result {
    color: var(--tmg-teal);
    font-size: .9rem;
    font-weight: 650;
}

.tmg-profile-section .tmg-empty-card,
.tmg-profile-empty {
    margin: 0;
    min-height: 6.5rem;
}

.tmg-leaderboard a.tmg-player-link,
.tmg-tournament a.tmg-player-link,
.tmg-side a.tmg-player-link {
    color: inherit;
    text-decoration: none;
}

.tmg-leaderboard a.tmg-player-link:hover,
.tmg-tournament a.tmg-player-link:hover,
.tmg-side a.tmg-player-link:hover {
    color: var(--tmg-teal);
}


/* -------------------------------------------------------------------------- */
/* Phase C — Tournament registration (dark-first)                             */
/* -------------------------------------------------------------------------- */

.tmg-tournament-register {
    margin: 1.25rem 0 1.5rem;
}

.tmg-register-card {
    padding: 1.1rem 1.25rem;
    border-radius: .65rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 28, 0.72);
    color: var(--tmg-mist, #e8eef0);
}

.tmg-register-eligible {
    border-color: rgba(13, 148, 136, 0.45);
    box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.tmg-register-status {
    border-color: rgba(13, 148, 136, 0.35);
}

.tmg-register-title {
    margin: 0 0 .35rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--tmg-mist, #e8eef0);
}

.tmg-register-hint {
    margin: 0 0 .85rem;
    color: rgba(232, 238, 240, 0.82);
    line-height: 1.45;
}

.tmg-register-spots,
.tmg-register-meta {
    margin: .25rem 0 .5rem;
    font-size: .88rem;
    color: rgba(232, 238, 240, 0.65);
}

.tmg-register-btn,
button.tmg-register-btn,
a.tmg-register-btn,
a.tmg-register-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .6rem 1.35rem;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .01em;
    border: none;
    border-radius: .45rem;
    cursor: pointer;
    text-decoration: none;
    background: var(--tmg-teal, #0d9488);
    color: #061014 !important;
    transition: filter .15s ease, transform .15s ease;
}

.tmg-register-btn:hover,
a.tmg-register-btn-link:hover {
    filter: brightness(1.1);
    color: #061014 !important;
}

.tmg-register-form {
    margin: 0;
}

.tmg-tournament-reg-meta {
    margin: .35rem 0 0;
    font-size: .88rem;
    color: rgba(232, 238, 240, 0.7);
}

.tmg-register-empty {
    min-height: 5.5rem;
}

html[data-theme="light"] .tmg-register-card,
body.tmg-theme-light .tmg-register-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 28, 0.12);
    color: #0b1214;
}

html[data-theme="light"] .tmg-register-title,
body.tmg-theme-light .tmg-register-title {
    color: #0b1214;
}

html[data-theme="light"] .tmg-register-hint,
body.tmg-theme-light .tmg-register-hint,
html[data-theme="light"] .tmg-register-spots,
body.tmg-theme-light .tmg-register-spots,
html[data-theme="light"] .tmg-register-meta,
body.tmg-theme-light .tmg-register-meta,
html[data-theme="light"] .tmg-tournament-reg-meta,
body.tmg-theme-light .tmg-tournament-reg-meta {
    color: rgba(11, 18, 20, 0.72);
}

/* -------------------------------------------------------------------------- */
/* TT5 / demo chrome — hide if present (surgical; prefer template removal)    */
/*                                                                            */
/* What the WP template should remove (Site Editor → Templates / Parts):      */
/*   1. Header & Footer: WooCommerce Mini-Cart / Cart Drawer blocks when      */
/*      WooCommerce storefront is not in use.                                 */
/*   2. Footer: Pattern Library sample blocks — newsletter CTAs, “Designed    */
/*      with WordPress” credit rows, placeholder social strips, demo promo    */
/*      columns that are not site content.                                    */
/*   3. Keep a simple footer: logo, primary nav links, copyright only.        */
/*                                                                            */
/* These rules only hide known Woo / TT5 demo chrome. They are a stopgap;     */
/* remove the blocks from the template so the markup is gone, not just CSS.   */
/* DO NOT hide header primary nav or a real copyright line.                   */
/* -------------------------------------------------------------------------- */

/*
 * WooCommerce mini-cart button + slide-out drawer (“Your cart”, “Start shopping”).
 * Selectors: .wp-block-woocommerce-mini-cart, .wc-block-mini-cart,
 * .wc-block-mini-cart__button, .wc-block-mini-cart__drawer,
 * .wc-block-mini-cart__overlay, .wc-block-components-drawer,
 * .wc-block-components-drawer__screen-overlay, aside.wc-block-mini-cart__drawer,
 * filled/empty mini-cart contents, shopping-button / empty-cart wrappers,
 * interactive/router overlays for the drawer.
 */
body .wp-block-woocommerce-mini-cart,
body .wc-block-mini-cart,
body .wc-block-mini-cart__button,
body .wc-block-mini-cart__drawer,
body .wc-block-mini-cart__overlay,
body .wc-block-mini-cart__template-part,
body .wc-block-mini-cart__empty-cart-wrapper,
body .wc-block-mini-cart__shopping-button,
body .wc-block-components-drawer,
body .wc-block-components-drawer__screen-overlay,
body .wc-block-components-drawer__screen-overlay--is-hidden,
body aside.wc-block-mini-cart__drawer,
body .wp-block-woocommerce-filled-mini-cart-contents-block,
body .wp-block-woocommerce-empty-mini-cart-contents-block,
body .wp-block-woocommerce-mini-cart-contents,
body .wp-block-woocommerce-mini-cart-title-label-block,
body .wp-block-woocommerce-mini-cart-shopping-button-block,
body [data-block-name="woocommerce/mini-cart"],
body [data-wp-interactive="woocommerce/mini-cart"],
body [data-wp-router-region*="mini-cart"],
body [data-wp-key="wc-mini-cart-overlay"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/*
 * Footer # stubs (1.8.42): tmg-theme.js scrubFooterDeadHashes rewrites Blog→/news/,
 * Authors→/players/, Events→/tournaments/; hides About/FAQs/Shop/Patterns/Themes,
 * remaining dead href="#", TT5 + WordPress credits; dedupes Players/League.
 * CSS below hides # stubs (pre-JS flash) and credit rows.
 */
footer .wp-block-navigation-item:has(> a[href="#"]),
footer .wp-block-navigation-item:has(> a[href=""]),
footer.wp-block-template-part .wp-block-navigation-item:has(> a[href="#"]),
footer.wp-block-template-part .wp-block-navigation-item:has(> a[href=""]),
#colophon .wp-block-navigation-item:has(> a[href="#"]),
#colophon .wp-block-navigation-item:has(> a[href=""]),
.wp-block-template-part[area="footer"] .wp-block-navigation-item:has(> a[href="#"]),
.wp-block-template-part[area="footer"] .wp-block-navigation-item:has(> a[href=""]),
.wp-site-blocks > footer .wp-block-navigation-item:has(> a[href="#"]),
.wp-site-blocks > footer .wp-block-navigation-item:has(> a[href=""]) {
    display: none !important;
}

/* TT5 theme name + "Designed with WordPress" credit rows (whole flex group) */
footer .wp-block-group:has(a[href*="wordpress.org"]),
footer p.has-small-font-size:has(a[href*="wordpress.org"]),
footer .wp-block-paragraph:has(a[href*="wordpress.org"]),
footer.wp-block-template-part .wp-block-group:has(a[href*="wordpress.org"]),
footer.wp-block-template-part p.has-small-font-size:has(a[href*="wordpress.org"]),
.wp-block-template-part[area="footer"] .wp-block-group:has(a[href*="wordpress.org"]),
.wp-site-blocks > footer .wp-block-group:has(a[href*="wordpress.org"]),
footer a[href*="wordpress.org"],
footer [data-tmg-footer-hide="1"] {
    display: none !important;
}

/*
 * Pattern-library footer junk often ships as wide footer groups with sample
 * newsletter / promo columns. Prefer deleting those blocks in the footer
 * template part. Optional class hooks if editors mark leftovers:
 *   .tmg-hide-demo  — hide any leftover demo block after template edit
 */
body .tmg-hide-demo,
body footer.wp-block-template-part .tmg-hide-demo,
body .wp-site-blocks > footer .tmg-hide-demo,
body #colophon .tmg-hide-demo {
    display: none !important;
}


/* -------------------------------------------------------------------------- */
/* HORIZONTAL centering (left-right) — Captain 2026-09-19                      */
/* Content was flush left because TT5 uses alignfull / full-bleed groups.     */
/* Force page bodies to the same max-width + auto margins as the header.      */
/* -------------------------------------------------------------------------- */
body .wp-site-blocks > main > .wp-block-group.alignfull,
body .wp-site-blocks > main > .wp-block-group.alignwide,
body .entry-content.alignfull,
body .entry-content.alignwide,
body .wp-block-post-content.alignfull,
body .wp-block-post-content.alignwide,
body main .wp-block-post-content,
body main .entry-content {
    box-sizing: border-box !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: var(--tmg-content-max, 1240px) !important;
    padding-left: var(--tmg-content-pad-x, 24px);
    padding-right: var(--tmg-content-pad-x, 24px);
    width: 100%;
}

body .wp-block-post-title,
body h1.wp-block-post-title {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: var(--tmg-content-max, 1240px) !important;
    padding-left: var(--tmg-content-pad-x, 24px);
    padding-right: var(--tmg-content-pad-x, 24px);
    width: 100%;
}

/* Keep homepage shortcode owning its own width (already centered via .wrap). */
body .entry-content:has(.tmg-home),
body .wp-block-post-content:has(.tmg-home) {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* -------------------------------------------------------------------------- */
/* UNIFIED HEADER — identical chrome every page (Captain 2026-09-19)          */
/* -------------------------------------------------------------------------- */
body .wp-site-blocks > header,
body header.wp-block-template-part {
    /* Shared sticky dark bar — do not per-page override */
    position: sticky;
    top: 0;
    z-index: 100;
}


/* -------------------------------------------------------------------------- */
/* Phase E — Activity feed [tmg_activity] (dark-first, home card language)    */
/* -------------------------------------------------------------------------- */
.tmg-activity {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--tmg-home-max, var(--tmg-content-max, 1240px));
    width: 100%;
}

.tmg-activity-head {
    margin-bottom: 12px;
}

.tmg-activity-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-activity-item {
    margin: 0;
    padding: 0;
}

.tmg-activity-card {
    align-items: flex-start;
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border, var(--tmg-border, #243038));
    border-radius: var(--tmg-home-radius, 16px);
    color: inherit !important;
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    text-decoration: none !important;
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.tmg-activity-card-static {
    cursor: default;
}

a.tmg-activity-card:hover,
a.tmg-activity-card:focus-visible {
    border-color: rgba(46, 196, 182, .45);
    box-shadow: 0 0 28px rgba(46, 196, 182, .12);
    color: inherit !important;
    transform: translateY(-3px);
}

.tmg-activity-type {
    flex: 0 0 auto;
    margin-top: 2px;
}

.tmg-activity-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tmg-activity-title {
    color: var(--tmg-mist, #e8eef0);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.tmg-activity-summary {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 13px;
    line-height: 1.45;
}

.tmg-activity-when {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 12px;
    margin-top: 2px;
}

.tmg-activity-upcoming_match .tmg-activity-type {
    background: color-mix(in srgb, var(--tmg-teal) 22%, var(--tmg-ink));
}

.tmg-activity-empty {
    margin: 0;
}

@media (max-width: 640px) {
    .tmg-activity-card {
        flex-direction: column;
        gap: 8px;
    }
}


/* -------------------------------------------------------------------------- */
/* v1.8.0 — Light-mode competition UI readability (empty cards, forms, etc.)  */
/* -------------------------------------------------------------------------- */
html[data-theme="light"] .tmg-empty-card,
body.tmg-theme-light .tmg-empty-card {
    background: #FFFFFF;
    border-color: color-mix(in srgb, var(--tmg-teal) 40%, #c5d0d4);
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-empty-card .tmg-empty-title,
body.tmg-theme-light .tmg-empty-card .tmg-empty-title,
html[data-theme="light"] .tmg-empty-card > p:first-child,
body.tmg-theme-light .tmg-empty-card > p:first-child {
    color: #0B1214;
}

html[data-theme="light"] .tmg-empty-card .tmg-empty-hint,
body.tmg-theme-light .tmg-empty-card .tmg-empty-hint {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-form,
body.tmg-theme-light .tmg-form,
html[data-theme="light"] .tmg-card:not(article),
body.tmg-theme-light .tmg-card:not(article),
html[data-theme="light"] .tmg-panel,
body.tmg-theme-light .tmg-panel,
html[data-theme="light"] .tmg-msg,
body.tmg-theme-light .tmg-msg {
    background: #FFFFFF;
    color: #0B1214;
}

html[data-theme="light"] .tmg-form label,
body.tmg-theme-light .tmg-form label {
    color: #0B1214;
}

html[data-theme="light"] .tmg-form .description,
body.tmg-theme-light .tmg-form .description {
    color: var(--tmg-muted);
}

html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="url"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="password"],
html[data-theme="light"] select,
html[data-theme="light"] textarea,
body.tmg-theme-light input[type="text"],
body.tmg-theme-light input[type="url"],
body.tmg-theme-light input[type="email"],
body.tmg-theme-light input[type="number"],
body.tmg-theme-light input[type="search"],
body.tmg-theme-light input[type="password"],
body.tmg-theme-light select,
body.tmg-theme-light textarea {
    background: #FFFFFF;
    border-color: #c5d0d4;
    color: #0B1214;
}

html[data-theme="light"] .tmg-activity-title,
body.tmg-theme-light .tmg-activity-title {
    color: #0B1214;
}

html[data-theme="light"] .tmg-activity-summary,
body.tmg-theme-light .tmg-activity-summary,
html[data-theme="light"] .tmg-activity-when,
body.tmg-theme-light .tmg-activity-when {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-activity-card,
body.tmg-theme-light .tmg-activity-card {
    background: #FFFFFF;
    border-color: #c5d0d4;
}

html[data-theme="light"] .tmg-home-comp-card,
body.tmg-theme-light .tmg-home-comp-card,
html[data-theme="light"] .tmg-home-hero-card,
body.tmg-theme-light .tmg-home-hero-card {
    border-color: #c5d0d4;
}

html[data-theme="light"] .tmg-home-comp-card h4,
body.tmg-theme-light .tmg-home-comp-card h4,
html[data-theme="light"] .tmg-home-section-head h3,
body.tmg-theme-light .tmg-home-section-head h3,
html[data-theme="light"] .tmg-home-hero-copy h1,
body.tmg-theme-light .tmg-home-hero-copy h1 {
    color: #0B1214;
}

html[data-theme="light"] .tmg-auth-hello,
body.tmg-theme-light .tmg-auth-hello {
    color: #0B1214;
}

html[data-theme="light"] .tmg-leaderboard th,
body.tmg-theme-light .tmg-leaderboard th,
html[data-theme="light"] .tmg-leaderboard td,
body.tmg-theme-light .tmg-leaderboard td {
    color: #0B1214;
}

html[data-theme="light"] .tmg-leaderboard tr.tmg-empty td,
body.tmg-theme-light .tmg-leaderboard tr.tmg-empty td {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-leaderboard tr.tmg-empty .tmg-empty-title,
body.tmg-theme-light .tmg-leaderboard tr.tmg-empty .tmg-empty-title {
    color: #0B1214;
}


/* Frame HOTP / bubble boxes — never crop ribbon (8–10% inset in assets). */
.tmg-hot-press-card .tmg-home-hero-art.tmg-hot-press-thumb {
    background-size: contain;
}
.tmg-news-card-thumb,
.tmg-news-featured-art {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    object-fit: contain;
}

/* -------------------------------------------------------------------------- */
/* HTML/CSS article cards (1.8.6) — interactive TMG teal components           */
/* Spec: ARCHITECT-HTML-COMPONENTS.md                                         */
/* -------------------------------------------------------------------------- */
article.tmg-card {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-home-border, #243038);
    border-radius: 22px;
    box-shadow: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-decoration: none;
    transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

article.tmg-card:hover,
article.tmg-card:focus-within {
    border-color: rgba(0, 201, 177, .5);
    box-shadow: 0 0 28px rgba(0, 201, 177, .14);
    transform: translateY(-2px);
}

.tmg-card__media {
    background: #0a0c0e;
    display: block;
    isolation: isolate;
    overflow: hidden;
    padding: 8% 8% 10%;
    position: relative;
    text-decoration: none !important;
    width: 100%;
}

.tmg-card__media > img {
    aspect-ratio: 16 / 10;
    background-color: #0a0c0e;
    border-radius: 10px;
    display: block;
    height: auto;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.tmg-card__media-placeholder {
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(135deg, #1a2830, #0b1214 65%),
        radial-gradient(circle at 60% 40%, rgba(0, 201, 177, .28), transparent 50%);
    border-radius: 10px;
    display: block;
    width: 100%;
}

/* CSS text ribbon — readable white on teal, rotated, inset so never cropped */
.tmg-ribbon {
    background: #00C9B1;
    box-shadow:
        0 2px 0 #005A52,
        0 0 0 2px #005A52;
    color: #FFFFFF;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(1.1rem, 2.8vw, 2.4rem);
    font-stretch: condensed;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.15;
    max-width: 72%;
    padding: .42em .85em .48em;
    pointer-events: none;
    position: absolute;
    right: 10%;
    text-align: center;
    text-shadow:
        0 0 2px #000,
        0 1px 0 #000,
        1px 0 0 #000,
        -1px 0 0 #000,
        0 -1px 0 #000,
        1px 1px 0 #000,
        -1px 1px 0 #000;
    text-transform: uppercase;
    top: 12%;
    transform: rotate(-12deg);
    transform-origin: center center;
    -webkit-text-stroke: .35px #000;
    z-index: 2;
}

.tmg-ribbon--hotp {
    font-size: clamp(1rem, 2.5vw, 2.1rem);
    letter-spacing: .06em;
    max-width: 85%;
}

.tmg-ribbon--review,
.tmg-ribbon--news {
    letter-spacing: .12em;
}
/* Larger ribbon on hero / single featured overlays (Captain) */
.tmg-card--hero .tmg-ribbon,
.tmg-card--featured .tmg-ribbon,
.single .tmg-card__media .tmg-ribbon,
.tmg-post-ribbon {
    font-size: clamp(1.6rem, 4vw, 3.2rem);
}


/* Optional PNG ribbon fallback (filter tmg_bubble_use_png_ribbon / .tmg-ribbon--png) */
.tmg-ribbon--png {
    background: transparent;
    box-shadow: none;
    color: transparent;
    font-size: 0;
    letter-spacing: 0;
    max-width: none;
    padding: 0;
    right: 0;
    text-shadow: none;
    top: 0;
    transform: none;
    -webkit-text-stroke: 0;
    width: 100%;
}

.tmg-ribbon--png img {
    display: block;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    width: 100%;
}

.tmg-score {
    background: #0b1214;
    border: 1.5px solid #00C9B1;
    border-radius: 999px;
    color: #E8EEF0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    padding: 7px 12px;
    pointer-events: none;
    position: absolute;
    right: 10%;
    top: 10%;
    z-index: 3;
}

.tmg-score span {
    color: rgba(232, 238, 240, .72);
    font-size: .78em;
    font-weight: 700;
    margin-left: 1px;
}

.tmg-card__slash {
    background: #00C9B1;
    bottom: 0;
    clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 100%);
    height: 18px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    z-index: 2;
}

.tmg-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 20px;
}

.tmg-card__by {
    color: rgba(232, 238, 240, .88);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    margin: 0;
}

.tmg-card__by a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(0, 201, 177, .45);
    text-underline-offset: 2px;
}

.tmg-card__by a:hover,
.tmg-card__by a:focus-visible {
    color: #00C9B1;
    text-decoration-color: #00C9B1;
}

.tmg-card__date {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0;
    text-transform: uppercase;
}

.tmg-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
}

.tmg-card__tags li {
    margin: 0;
    padding: 0;
}

.tmg-card__tags a,
.tmg-card__tags li {
    border: 1px solid #00C9B1;
    border-radius: 999px;
    color: #00C9B1;
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 4px 10px;
    text-decoration: none;
    text-transform: uppercase;
}

.tmg-card__tags a:hover,
.tmg-card__tags a:focus-visible {
    background: rgba(0, 201, 177, .12);
    color: #E8EEF0;
}

.tmg-card__title {
    color: var(--tmg-mist, #E8EEF0) !important;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
    margin: 4px 0 0;
}

.tmg-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.tmg-card__title a:hover,
.tmg-card__title a:focus-visible {
    color: #00C9B1 !important;
}

article.tmg-card.tmg-card--featured .tmg-card__title,
article.tmg-card.tmg-card--hero .tmg-card__title,
article.tmg-card.tmg-bubble-card--featured .tmg-card__title,
article.tmg-card.tmg-bubble-card--hero .tmg-card__title {
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

article.tmg-card.tmg-card--hero,
article.tmg-card.tmg-bubble-card--hero {
    height: 100%;
    min-height: 100%;
}

/* Home news grid keeps prior spanning; cards fill cells. */
.tmg-home-news.tmg-bubble-grid article.tmg-card.tmg-home-article {
    min-height: 0;
}

.tmg-home-news.tmg-bubble-grid article.tmg-card.tmg-home-article-featured {
    grid-row: span 2;
}

.tmg-home-news.tmg-bubble-grid article.tmg-card.tmg-home-article-wide {
    grid-column: 2 / span 2;
}

/* News page card layout */
.tmg-news-bubble-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: 1.15fr .85fr;
}

.tmg-news-bubble-layout .tmg-news-feature {
    margin: 0;
}

.tmg-news-secondary.tmg-bubble-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-news-secondary.tmg-bubble-grid .tmg-news-item {
    margin: 0;
}

@media (max-width: 900px) {
    .tmg-news-bubble-layout {
        grid-template-columns: 1fr;
    }

    .tmg-home-news.tmg-bubble-grid article.tmg-card.tmg-home-article-featured,
    .tmg-home-news.tmg-bubble-grid article.tmg-card.tmg-home-article-wide {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Light mode readability */
html[data-theme="light"] article.tmg-card,
body.tmg-theme-light article.tmg-card {
    background: #FFFFFF;
    border-color: #c5d0d4;
}

html[data-theme="light"] .tmg-card__by,
body.tmg-theme-light .tmg-card__by,
html[data-theme="light"] .tmg-card__title,
body.tmg-theme-light .tmg-card__title {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-card__date,
body.tmg-theme-light .tmg-card__date {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-score,
body.tmg-theme-light .tmg-score {
    background: #FFFFFF;
    color: #0B1214;
}

html[data-theme="light"] .tmg-score span,
body.tmg-theme-light .tmg-score span {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-card__media,
body.tmg-theme-light .tmg-card__media {
    background: #E8EEF0;
}

html[data-theme="light"] .tmg-card__tags a:hover,
body.tmg-theme-light .tmg-card__tags a:hover {
    color: #0B1214;
}


/* -------------------------------------------------------------------------- */
/* 1.8.8 — Hero Preview Cup (upper-right) + square card grids                 */
/* -------------------------------------------------------------------------- */

/* Hero right: competition / Preview Cup highlight (not HOTP bubble) */
.tmg-home-hero-cup {
    background:
        radial-gradient(circle at 70% 30%, rgba(0, 201, 177, .22), transparent 55%),
        linear-gradient(145deg, #142026 0%, #0a1014 70%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 240px;
    text-decoration: none !important;
}

.tmg-home-hero-cup .tmg-home-hero-card-body {
    gap: 8px;
}

.tmg-home-hero-cup-rounds {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 13px;
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    width: 100%;
}

.tmg-home-hero-cup-rounds li {
    border-bottom: 1px solid var(--tmg-home-line, rgba(255, 255, 255, .08));
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.tmg-home-hero-cup-rounds li:last-child {
    border: 0;
}

.tmg-home-cup-cta {
    color: var(--tmg-teal, #00C9B1);
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
    text-decoration: none;
}
a.tmg-home-cup-cta:hover,
a.tmg-home-cup-cta:focus-visible {
    color: var(--tmg-teal, #00C9B1);
    text-decoration: underline;
}

/* 2×3 equal square article cards */
.tmg-card-grid {
    display: grid;
    gap: 16px;
}

.tmg-card-grid--2x3 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
}

.tmg-card-grid--2x3 > .tmg-msg {
    grid-column: 1 / -1;
}

.tmg-news-layout.tmg-card-grid--2x3 {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

/* Square media: featured/header image ONLY — no diagonal ribbon overlay */
.tmg-card-grid article.tmg-card.tmg-card--square,
article.tmg-card.tmg-card--square {
    height: 100%;
    min-height: 0;
}

.tmg-card-grid .tmg-card__media,
article.tmg-card.tmg-card--square .tmg-card__media {
    aspect-ratio: 1 / 1;
    padding: 0;
}

.tmg-card-grid .tmg-card__media > img,
.tmg-card-grid .tmg-card__media-placeholder,
article.tmg-card.tmg-card--square .tmg-card__media > img,
article.tmg-card.tmg-card--square .tmg-card__media-placeholder {
    aspect-ratio: 1 / 1;
    border-radius: 0;
    height: 100%;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.tmg-card-grid .tmg-card__slash,
article.tmg-card.tmg-card--square .tmg-card__slash {
    height: 12px;
}

/* Single type bubble (pill) in card body — not a second banner on the image */
.tmg-type-badge-wrap {
    margin: 0 0 2px;
}

.tmg-type-badge,
a.tmg-type-badge {
    background: rgba(0, 201, 177, .14);
    border: 1px solid #00C9B1;
    border-radius: 999px;
    color: #00C9B1 !important;
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.2;
    padding: 4px 10px;
    text-decoration: none !important;
    text-transform: uppercase;
}

a.tmg-type-badge:hover,
a.tmg-type-badge:focus-visible {
    background: rgba(0, 201, 177, .22);
    color: #E8EEF0 !important;
}

.tmg-type-badge--hotp {
    letter-spacing: .04em;
}

/* Single post HOTP: ribbon overlays featured banner; image remains visible */
.tmg-single-hotp-media {
    display: block;
    isolation: isolate;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tmg-single-hotp-media img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.tmg-single-hotp-media .tmg-ribbon,
.tmg-single-hotp-media .tmg-post-ribbon {
    max-width: 78%;
    pointer-events: none;
    right: 8%;
    top: 10%;
    z-index: 2;
}

@media (max-width: 900px) {
    .tmg-card-grid--2x3,
    .tmg-home-news.tmg-card-grid--2x3,
    .tmg-news-layout.tmg-card-grid--2x3 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
}

@media (max-width: 560px) {
    .tmg-card-grid--2x3,
    .tmg-home-news.tmg-card-grid--2x3,
    .tmg-news-layout.tmg-card-grid--2x3 {
        grid-template-columns: 1fr;
    }
}

/* Light mode — type badge + hero cup */
html[data-theme="light"] .tmg-type-badge,
body.tmg-theme-light .tmg-type-badge,
html[data-theme="light"] a.tmg-type-badge,
body.tmg-theme-light a.tmg-type-badge {
    background: rgba(0, 201, 177, .1);
    color: #007A6E !important;
}

html[data-theme="light"] a.tmg-type-badge:hover,
body.tmg-theme-light a.tmg-type-badge:hover {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-hero-art,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-hero-art {
    background:
        radial-gradient(circle at 70% 30%, rgba(0, 201, 177, .22), transparent 55%),
        linear-gradient(145deg, #E8EEF0 0%, #D5DEE2 70%);
}

/* Force high-contrast text on pale cup art (was white-on-pale). */
html[data-theme="light"] .tmg-home-hero-cup,
body.tmg-theme-light .tmg-home-hero-cup,
html[data-theme="light"] .tmg-home-hero-cup .tmg-home-hero-card-body,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-hero-card-body {
    color: #0B1214 !important;
}

html[data-theme="light"] .tmg-home-hero-cup h2,
body.tmg-theme-light .tmg-home-hero-cup h2,
html[data-theme="light"] .tmg-home-hero-cup .tmg-home-hero-card h2,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-hero-card h2,
html[data-theme="light"] a.tmg-home-hero-cup h2,
body.tmg-theme-light a.tmg-home-hero-cup h2 {
    color: #0B1214 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-meta,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-meta {
    color: #3A4A50 !important;
    text-shadow: none !important;
}

html[data-theme="light"] .tmg-home-hero-cup .tmg-home-badge,
body.tmg-theme-light .tmg-home-hero-cup .tmg-home-badge {
    color: #007A6E !important;
}

html[data-theme="light"] .tmg-home-hero-cup-rounds,
body.tmg-theme-light .tmg-home-hero-cup-rounds,
html[data-theme="light"] .tmg-home-hero-cup-rounds li,
body.tmg-theme-light .tmg-home-hero-cup-rounds li {
    color: #3A4A50 !important;
    border-color: rgba(11, 18, 20, .12);
}

html[data-theme="light"] .tmg-home-cup-cta,
body.tmg-theme-light .tmg-home-cup-cta {
    color: #007A6E !important;
}


/* -------------------------------------------------------------------------- */
/* 1.8.10 — Home title flush, Spark-only hero, sitewide chrome / dark-first   */
/* -------------------------------------------------------------------------- */

/* Hide theme "Home" (and other redundant) page titles on front page. */
body.home .wp-block-post-title,
body.home .entry-title,
body.home h1.wp-block-post-title,
body.home .wp-block-post-title.alignwide,
body.home .wp-block-post-title.alignfull,
body.front-page .wp-block-post-title,
body.front-page .entry-title,
body.front-page h1.wp-block-post-title,
body:has(.tmg-home) .wp-block-post-title,
body:has(.tmg-home) .entry-title,
body:has(.tmg-home) h1.wp-block-post-title {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
}

/* Sitewide: hide flush-left duplicate page titles when TMG shortcode owns chrome. */
body:has(.tmg-news-page) .wp-block-post-title,
body:has(.tmg-news-page) .entry-title,
body:has(.tmg-leaderboard-live) .wp-block-post-title,
body:has(table.tmg-leaderboard) .wp-block-post-title,
body:has(.tmg-activity) .wp-block-post-title,
body:has(.tmg-tournament) .wp-block-post-title,
body:has(.tmg-form.tmg-submit-match) .wp-block-post-title {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Prefer hiding page titles on competition shell pages (slug-based). */
body.page-ladder .wp-block-post-title,
body.page-standings .wp-block-post-title,
body.page-tournaments .wp-block-post-title,
body.page-members .wp-block-post-title,
body.page-account .wp-block-post-title,
body.page-news .wp-block-post-title,
.page-slug-ladder .wp-block-post-title,
.page-slug-standings .wp-block-post-title,
.page-slug-tournaments .wp-block-post-title,
.page-slug-members .wp-block-post-title,
.page-slug-account .wp-block-post-title,
.page-slug-news .wp-block-post-title,
body.page-ladder .entry-title,
body.page-standings .entry-title,
body.page-tournaments .entry-title {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Pull main content up flush under sticky nav on home. */
body.home .wp-site-blocks > main,
body.home main.wp-block-group,
body.front-page .wp-site-blocks > main,
body:has(.tmg-home) .wp-site-blocks > main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.home .entry-content,
body.home .wp-block-post-content,
body:has(.tmg-home) .entry-content,
body:has(.tmg-home) .wp-block-post-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.tmg-home {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.tmg-home-hero {
    margin-top: 0 !important;
    padding-top: 8px;
}

/* Dark-first reinforcement — never OS prefers-color-scheme; honor data-theme only. */
html:not([data-theme="light"]) {
    color-scheme: dark;
}

html:not([data-theme="light"]) body,
html[data-theme="dark"] body,
body.tmg-theme-dark {
    background-color: var(--tmg-ink, #0B1214) !important;
    color: var(--tmg-mist, #E8EEF0) !important;
}

/* Standings / ladder pages: kill accidental light canvas from TT5 groups. */
body.page-standings .wp-site-blocks,
body.page-ladder .wp-site-blocks,
body.page-tournaments .wp-site-blocks,
.page-slug-standings .wp-site-blocks,
.page-slug-ladder .wp-site-blocks,
html[data-theme="dark"] .wp-site-blocks,
html:not([data-theme="light"]) .wp-site-blocks {
    background-color: var(--tmg-bg) !important;
    color: var(--tmg-fg) !important;
}

html:not([data-theme="light"]) .wp-block-group:not(.has-background),
html[data-theme="dark"] .wp-block-group:not(.has-background) {
    background-color: transparent !important;
}

/* Chrome slot + fallback — sitewide Dark/Light when header host is late/missing. */
.tmg-chrome-slot {
    align-items: center;
    display: flex;
    gap: 8px;
    pointer-events: none;
    position: fixed;
    right: 24px;
    top: 14px;
    z-index: 120;
}

.tmg-chrome-slot:empty,
.tmg-chrome-slot[aria-hidden="true"]:empty {
    display: none;
}

.tmg-chrome-slot:not(:empty) {
    pointer-events: auto;
}

.tmg-chrome-fallback.tmg-theme-toggle,
.tmg-chrome-fallback.tmg-account-btn,
.tmg-chrome-fallback.tmg-account-menu {
    position: fixed;
    right: 24px;
    top: 14px;
    z-index: 120;
}

.tmg-chrome-fallback.tmg-account-btn,
.tmg-chrome-fallback.tmg-account-menu {
    right: 140px;
}

@media (max-width: 720px) {
    .tmg-chrome-slot,
    .tmg-chrome-fallback.tmg-theme-toggle,
    .tmg-chrome-fallback.tmg-account-btn,
    .tmg-chrome-fallback.tmg-account-menu {
        right: 12px;
        top: 10px;
    }
}


/* -------------------------------------------------------------------------- */
/* 1.8.12 — Functional layout lock: cup contrast, auth chrome, chooser/dir    */
/* -------------------------------------------------------------------------- */

/* UM login/register: product dark canvas (not bare TT5 light shell). */
body.um.um-page-login,
body.um.um-page-register,
body.page-slug-login-2,
body.page-slug-register,
body.page-id-login,
html[data-theme="dark"] body.um,
body.tmg-theme-dark.um,
body.tmg-theme-dark.page-template-default:has(.um),
body.tmg-theme-dark:has(.um-login),
body.tmg-theme-dark:has(.um-register) {
    background: var(--tmg-bg, #0B1214) !important;
    color: var(--tmg-text, #E8EEF0) !important;
}

body.tmg-theme-dark .um .um-form,
body.tmg-theme-dark .um-login,
body.tmg-theme-dark .um-register,
html[data-theme="dark"] .um .um-form {
    background: transparent;
    color: var(--tmg-text, #E8EEF0);
}

/* Extra cart kill on auth shells (Woo sometimes re-injects). */
body.um .wp-block-woocommerce-mini-cart,
body.um .wc-block-mini-cart,
body.um .wc-block-mini-cart__button,
body.page-slug-login-2 .wc-block-mini-cart,
body.page-slug-register .wc-block-mini-cart,
body.tmg-auth-page .wc-block-mini-cart,
body.tmg-auth-page .wp-block-woocommerce-mini-cart {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Contextual rules links (ladder / tournament / league) */
.tmg-rules-link-wrap {
    margin: 0 0 0.85rem;
}
.tmg-rules-link {
    color: var(--tmg-teal, #00C9B1) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}
.tmg-rules-link:hover,
.tmg-rules-link:focus-visible {
    text-decoration: underline !important;
}
.tmg-rules-link.is-placeholder {
    cursor: default;
}
.tmg-ladder-welcome {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0 0 0.75rem;
}
.tmg-ladder-login-hint {
    margin: 0 0 1rem;
}
.tmg-ladder-login-hint a {
    color: var(--tmg-teal, #00C9B1) !important;
    font-weight: 700;
    text-decoration: none !important;
}
.tmg-ladder-login-hint a:hover,
.tmg-ladder-login-hint a:focus-visible {
    text-decoration: underline !important;
}
.tmg-tournament-header .tmg-rules-link-wrap,
.tmg-tournaments-list > .tmg-rules-link-wrap {
    margin-top: 0.25rem;
}
.tmg-rules-anchors {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* Ladder mode chooser */
.tmg-ladder-chooser {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 1.25rem;
}
.tmg-ladder-chooser-label {
    color: var(--tmg-muted, #A8BCC4);
    flex: 0 0 100%;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
}
.tmg-ladder-tab {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 999px;
    color: var(--tmg-muted, #A8BCC4) !important;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    text-decoration: none !important;
}
.tmg-ladder-tab.is-active,
.tmg-ladder-tab:hover,
.tmg-ladder-tab:focus-visible {
    border-color: var(--tmg-teal, #00C9B1);
    color: var(--tmg-teal, #00C9B1) !important;
}
html[data-theme="light"] .tmg-ladder-tab,
body.tmg-theme-light .tmg-ladder-tab {
    background: #fff;
    border-color: #c5d0d4;
    color: #3A4A50 !important;
}
html[data-theme="light"] .tmg-ladder-tab.is-active,
body.tmg-theme-light .tmg-ladder-tab.is-active {
    color: #007A6E !important;
}

/* Tournaments list */
.tmg-tournaments-list {
    display: grid;
    gap: 16px;
}
.tmg-tournaments-card {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 12px;
    color: inherit !important;
    display: block;
    padding: 18px 20px;
    text-decoration: none !important;
}
.tmg-tournaments-card h3 {
    color: var(--tmg-text, #E8EEF0);
    font-size: 1.15rem;
    margin: 0 0 6px;
}
.tmg-tournaments-meta {
    color: var(--tmg-muted, #A8BCC4);
    font-size: 13px;
}
html[data-theme="light"] .tmg-tournaments-card,
body.tmg-theme-light .tmg-tournaments-card {
    background: #fff;
    border-color: #c5d0d4;
}
html[data-theme="light"] .tmg-tournaments-card h3,
body.tmg-theme-light .tmg-tournaments-card h3 {
    color: #0B1214;
}

/* Members directory */
.tmg-members {
    margin: 0 auto;
    max-width: 720px;
}
.tmg-members-head h2 {
    color: var(--tmg-text, #E8EEF0);
    font-size: 1.35rem;
    margin: 0 0 12px;
}
.tmg-members-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tmg-members-item a,
.tmg-members-item span {
    align-items: center;
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 10px;
    color: var(--tmg-text, #E8EEF0) !important;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
    text-decoration: none !important;
}
.tmg-members-tag {
    color: var(--tmg-teal, #00C9B1);
    font-size: 13px;
    font-weight: 700;
}
html[data-theme="light"] .tmg-members-head h2,
body.tmg-theme-light .tmg-members-head h2 {
    color: #0B1214;
}
html[data-theme="light"] .tmg-members-item a,
body.tmg-theme-light .tmg-members-item a,
html[data-theme="light"] .tmg-members-item span,
body.tmg-theme-light .tmg-members-item span {
    background: #fff;
    border-color: #c5d0d4;
    color: #0B1214 !important;
}

/* 1.8.16 — hide the empty Ultimate Member members shell behind TMG directory. */
.um-page-members .um-members-wrapper:empty,
.um-page-members .um-members-overlay {
    display: none !important;
}

/* 1.8.15 — auth shell: hide cart chrome, keep toggle slot, dark-first canvas */
body.tmg-auth-page .wp-block-woocommerce-mini-cart,
body.tmg-auth-page .wc-block-mini-cart,
body.tmg-auth-page .wc-block-mini-cart__button,
body.tmg-auth-page a[href*="cart"],
body.tmg-auth-page .wp-block-navigation-item a[href*="cart"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
body.tmg-auth-page #tmg-chrome-slot.tmg-chrome-slot:not(:empty) {
    display: flex !important;
    visibility: visible !important;
}
body.tmg-auth-page {
    background: var(--tmg-bg, #0B1214);
    color: var(--tmg-text, #E8EEF0);
}


/* 1.8.19 — Player directory + card + per-ladder panels (functional only) */
.tmg-players,
.tmg-players.tmg-members {
    margin: 0 auto;
    max-width: 720px;
}
.tmg-players-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.tmg-players-head h2 {
    margin: 0;
}
.tmg-players-search {
    display: flex;
    gap: 8px;
    flex: 1 1 220px;
    max-width: 360px;
}
.tmg-players-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 8px;
    color: var(--tmg-text, #E8EEF0);
    padding: 8px 10px;
}
.tmg-players-search button {
    background: var(--tmg-teal, #00C9B1);
    border: 0;
    border-radius: 8px;
    color: #0B1214;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 12px;
}
.tmg-players-list {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tmg-players-handle {
    font-weight: 600;
}

.tmg-player-card {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 12px;
    margin: 0 0 20px;
    padding: 16px 18px;
}
.tmg-player-card-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.tmg-player-card-avatar img,
.tmg-player-card-avatar-img {
    border-radius: 50%;
    display: block;
    height: 72px;
    width: 72px;
}
.tmg-player-card-handle {
    color: var(--tmg-text, #E8EEF0);
    font-size: 1.35rem;
    margin: 0 0 6px;
}
.tmg-player-card-gamertag {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.95rem;
    margin: 0 0 10px;
}
.tmg-player-card-gamertag .tmg-stat-label {
    color: var(--tmg-teal, #00C9B1);
    font-weight: 700;
    margin-right: 6px;
}
.tmg-player-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tmg-player-link-chip {
    background: rgba(0, 201, 177, 0.12);
    border: 1px solid var(--tmg-teal, #00C9B1);
    border-radius: 999px;
    color: var(--tmg-teal, #00C9B1) !important;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    text-decoration: none !important;
}
.tmg-player-card-placements {
    border-top: 1px solid var(--tmg-border, #243038);
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 14px 0 0;
}
.tmg-player-card-place {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tmg-player-card-place-rank {
    color: var(--tmg-teal, #00C9B1);
    font-weight: 800;
    min-width: 2.5rem;
}
.tmg-player-card-place-ladder {
    flex: 1 1 auto;
    font-weight: 600;
}
.tmg-player-card-place-elo {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.9rem;
}

.tmg-ladder-panels-grid {
    display: grid;
    gap: 14px;
}
.tmg-ladder-panel {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 12px;
    padding: 14px 16px;
}
.tmg-ladder-panel-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.tmg-ladder-panel-title {
    color: var(--tmg-text, #E8EEF0);
    font-size: 1.1rem;
    margin: 0;
}
.tmg-ladder-panel-stats {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}
.tmg-ladder-panel-stats li {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 8px;
    padding: 8px 10px;
}
.tmg-stat-label {
    color: var(--tmg-muted, #9AA8AE);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.tmg-stat-value {
    color: var(--tmg-text, #E8EEF0);
    font-size: 1.05rem;
    font-weight: 700;
}
.tmg-ladder-panel-empty {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.9rem;
    margin: 0;
}
.tmg-ladder-panel-matches {
    margin-top: 4px;
}

html[data-theme="light"] .tmg-players-search input[type="search"],
body.tmg-theme-light .tmg-players-search input[type="search"] {
    background: #fff;
    border-color: #c5d0d4;
    color: #0B1214;
}
html[data-theme="light"] .tmg-player-card,
body.tmg-theme-light .tmg-player-card,
html[data-theme="light"] .tmg-ladder-panel,
body.tmg-theme-light .tmg-ladder-panel {
    background: #fff;
    border-color: #c5d0d4;
}
html[data-theme="light"] .tmg-player-card-handle,
body.tmg-theme-light .tmg-player-card-handle,
html[data-theme="light"] .tmg-ladder-panel-title,
body.tmg-theme-light .tmg-ladder-panel-title,
html[data-theme="light"] .tmg-stat-value,
body.tmg-theme-light .tmg-stat-value {
    color: #0B1214;
}
html[data-theme="light"] .tmg-ladder-panel-stats li,
body.tmg-theme-light .tmg-ladder-panel-stats li {
    background: #f3f6f7;
}


/* === 1.8.21 player avatar + team logo === */
.tmg-players-link {
    align-items: center;
    display: flex;
    gap: 10px;
    text-decoration: none;
}
.tmg-players-thumb {
    border-radius: 50%;
    display: block;
    flex: 0 0 auto;
    height: 36px;
    object-fit: cover;
    width: 36px;
}
.tmg-avatar-upload,
.tmg-team-logo-upload {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 10px;
    margin: 12px 0 0;
    padding: 12px 14px;
}
.tmg-avatar-upload-title,
.tmg-team-logo-upload-title {
    font-size: 1rem;
    margin: 0 0 8px;
}
.tmg-avatar-upload-msg {
    color: var(--tmg-teal, #00C9B1);
    font-size: 0.9rem;
    margin: 0 0 8px;
}
.tmg-avatar-upload-preview,
.tmg-team-logo-preview {
    border-radius: 50%;
    display: block;
    height: 72px;
    margin: 0 0 10px;
    object-fit: cover;
    width: 72px;
}
.tmg-team-logo-preview {
    border-radius: 8px;
}
.tmg-avatar-upload-hint,
.tmg-avatar-upload-hint {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.8rem;
    margin: 6px 0 10px;
}
.tmg-avatar-upload-form input[type="file"],
.tmg-team-logo-form input[type="file"] {
    display: block;
    margin: 0 0 6px;
    max-width: 100%;
}
.tmg-btn-secondary {
    background: transparent;
    border: 1px solid var(--tmg-border, #243038);
    color: var(--tmg-muted, #9AA8AE);
    cursor: pointer;
    margin-top: 8px;
    padding: 6px 12px;
}
.tmg-teams-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tmg-teams-item {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 10px;
    padding: 10px 12px;
}
.tmg-team-label {
    align-items: center;
    display: inline-flex;
    gap: 10px;
}
.tmg-team-logo {
    border-radius: 6px;
    display: block;
    height: 32px;
    object-fit: cover;
    width: 32px;
}
.tmg-team-name {
    font-weight: 700;
}
.tmg-team-logo-upload-block {
    border-top: 1px solid var(--tmg-border, #243038);
    margin-top: 12px;
    padding-top: 12px;
}
.tmg-team-logo-upload-block:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

/* 1.8.22 — Privacy: hide UM legal-name fields on public profiles */
body.tmg-privacy-profile .um-field-first_name,
body.tmg-privacy-profile .um-field-last_name,
body.tmg-privacy-profile .um-field-full_name,
body.tmg-privacy-profile .um-field[data-key="first_name"],
body.tmg-privacy-profile .um-field[data-key="last_name"],
body.tmg-privacy-profile .um-field[data-key="full_name"],
body.um-page-user .um-field-first_name,
body.um-page-user .um-field-last_name,
body.um-page-user .um-field-full_name {
    display: none !important;
}

/* 1.8.22 — Aggregate stat badges */
.tmg-stat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.tmg-stat-badge {
    align-items: center;
    background: rgba(0, 201, 177, 0.1);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 999px;
    display: inline-flex;
    gap: 8px;
    padding: 6px 12px;
}
.tmg-stat-badge-label {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tmg-stat-badge-value {
    color: var(--tmg-text, #E8EEF0);
    font-weight: 800;
}
.tmg-stat-badge-w {
    border-color: rgba(0, 201, 177, 0.45);
}
.tmg-stat-badge-l {
    border-color: rgba(220, 80, 80, 0.4);
}

/* 1.8.22 — Ladder context from leaderboard deep-link */
.tmg-ladder-context-card {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-teal, #00C9B1);
    border-radius: 12px;
    padding: 14px 16px;
}
.tmg-ladder-context-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

/* 1.8.22 — Match history search */
.tmg-profile-matches-head {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tmg-profile-matches-head .tmg-profile-heading {
    margin: 0;
}
.tmg-match-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 420px;
}
.tmg-match-search input[type="search"] {
    background: var(--tmg-panel, #142026);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 8px;
    color: var(--tmg-text, #E8EEF0);
    flex: 1 1 160px;
    min-width: 0;
    padding: 8px 10px;
}
.tmg-match-search button {
    background: var(--tmg-teal, #00C9B1);
    border: 0;
    border-radius: 8px;
    color: #0B1214;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 12px;
}
.tmg-match-search-clear {
    align-self: center;
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.9rem;
}

/* 1.8.22 — Bio */
.tmg-player-card-bio {
    color: var(--tmg-text, #E8EEF0);
    line-height: 1.45;
    margin: 12px 0 0;
    white-space: pre-wrap;
}
.tmg-bio-edit {
    border-top: 1px solid var(--tmg-border, #243038);
    margin-top: 14px;
    padding-top: 12px;
}
.tmg-bio-edit-title {
    font-size: 0.95rem;
    margin: 0 0 8px;
}
.tmg-bio-edit textarea {
    background: var(--tmg-bg, #0B1214);
    border: 1px solid var(--tmg-border, #243038);
    border-radius: 8px;
    color: var(--tmg-text, #E8EEF0);
    display: block;
    max-width: 100%;
    padding: 8px 10px;
    width: 100%;
}
.tmg-bio-edit-hint {
    color: var(--tmg-muted, #9AA8AE);
    font-size: 0.85rem;
    margin: 6px 0 8px;
}
.tmg-bio-edit-form button {
    background: var(--tmg-teal, #00C9B1);
    border: 0;
    border-radius: 8px;
    color: #0B1214;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 12px;
}
.tmg-bio-edit-msg {
    color: var(--tmg-teal, #00C9B1);
    font-weight: 600;
}


/* 1.8.26 / 1.8.30 — Hide Rules + Standings nav chrome (header/footer). Ladder stays. */
header .wp-block-navigation-item:has(> a[href*="/standings"]),
header .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
.site-header .wp-block-navigation-item:has(> a[href*="/standings"]),
.site-header .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
nav.wp-block-navigation .wp-block-navigation-item:has(> a[href*="/standings"]),
nav.wp-block-navigation .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
footer .wp-block-navigation-item:has(> a[href*="/standings"]),
footer .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
.site-footer .wp-block-navigation-item:has(> a[href*="/standings"]),
.site-footer .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
.wp-block-template-part[area="footer"] .wp-block-navigation-item:has(> a[href*="/standings"]),
.wp-block-template-part[area="footer"] .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
.wp-block-template-part[area="header"] .wp-block-navigation-item:has(> a[href*="/standings"]),
.wp-block-template-part[area="header"] .wp-block-navigation-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
header .menu-item:has(> a[href*="/standings"]),
header .menu-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
.site-header .menu-item:has(> a[href*="/standings"]),
.site-header .menu-item:has(> a[href*="/rules"]:not([href*="/league/rules"])),
/* Class / data attr set by PHP filter or JS backup */
header .wp-block-navigation-item[data-tmg-nav-hide],
header .menu-item[data-tmg-nav-hide],
.site-header .wp-block-navigation-item[data-tmg-nav-hide],
.site-header .menu-item[data-tmg-nav-hide],
nav .wp-block-navigation-item[data-tmg-nav-hide],
nav .menu-item[data-tmg-nav-hide],
header .tmg-nav-hide,
.site-header .tmg-nav-hide,
nav .tmg-nav-hide,
footer .wp-block-navigation-item[data-tmg-nav-hide],
footer .tmg-nav-hide,
/* Aria-label / title fallbacks when href is relative without path match */
header .wp-block-navigation-item:has(> a[aria-label="Rules"]),
header .wp-block-navigation-item:has(> a[aria-label="Standings"]),
header .wp-block-navigation-item:has(> a[title="Rules"]),
header .wp-block-navigation-item:has(> a[title="Standings"]) {
	display: none !important;
}

/* 1.8.29 — League hub (/league/ · [tmg_league]) */
.tmg-league {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--tmg-mist, #E8EEF0);
}
.tmg-league-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid color-mix(in srgb, var(--tmg-teal, #00C9B1) 28%, transparent);
	border-radius: 12px;
}
.tmg-league-kicker {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tmg-teal, #00C9B1);
	font-weight: 700;
}
.tmg-league-title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	line-height: 1.15;
}
.tmg-league-status {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
}
.tmg-league-status-pill,
.tmg-league-tier-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
}
.tmg-league-status-pill {
	background: color-mix(in srgb, var(--tmg-teal, #00C9B1) 22%, transparent);
	color: var(--tmg-teal, #00C9B1);
}
.tmg-league-tier-badge {
	background: color-mix(in srgb, var(--tmg-mist, #E8EEF0) 10%, transparent);
	border: 1px solid color-mix(in srgb, var(--tmg-mist, #E8EEF0) 18%, transparent);
}
.tmg-league-header-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: stretch;
}
.tmg-league-stat {
	min-width: 5.5rem;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	background: color-mix(in srgb, var(--tmg-mist, #E8EEF0) 6%, transparent);
	text-align: center;
}
.tmg-league-stat-val {
	display: block;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--tmg-teal, #00C9B1);
	line-height: 1.1;
}
.tmg-league-stat-label {
	display: block;
	font-size: 0.7rem;
	opacity: 0.75;
	margin-top: 0.2rem;
}
.tmg-league-signup,
.tmg-league-panel {
	padding: 1.15rem 1.35rem;
	border-radius: 12px;
}
.tmg-league-section-title {
	margin: 0 0 0.5rem;
	font-size: 1.1rem;
}
.tmg-league-section-lead {
	margin: 0 0 1rem;
	opacity: 0.85;
	font-size: 0.95rem;
}
.tmg-league-flash {
	padding: 0.75rem 1rem;
	border-radius: 10px;
	font-weight: 600;
}
.tmg-league-flash--ok {
	background: color-mix(in srgb, var(--tmg-teal, #00C9B1) 18%, transparent);
	border: 1px solid color-mix(in srgb, var(--tmg-teal, #00C9B1) 40%, transparent);
}
.tmg-league-flash--err {
	background: color-mix(in srgb, #ff5c5c 16%, transparent);
	border: 1px solid color-mix(in srgb, #ff5c5c 40%, transparent);
	color: #ffb4b4;
}
.tmg-league-form .tmg-req {
	color: var(--tmg-teal, #00C9B1);
}
.tmg-league-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 600;
	cursor: pointer;
}
.tmg-league-check input {
	margin-top: 0.2rem;
}
.tmg-league-lead-toggle .description {
	display: block;
	margin: 0.35rem 0 0 1.4rem;
}
.tmg-league-signup-meta {
	margin: 0.5rem 0 0;
	padding-left: 1.1rem;
}
.tmg-league-pending {
	color: var(--tmg-teal, #00C9B1);
	font-weight: 600;
}
.tmg-league-login-cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
}
.tmg-league-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
}
.tmg-league-rules-copy ul {
	margin: 0.5rem 0 0.75rem;
	padding-left: 1.2rem;
}
.tmg-league-rules-copy li {
	margin: 0.35rem 0;
}
.tmg-league-rules-note {
	margin: 0;
	opacity: 0.8;
	font-size: 0.9rem;
}

/* 1.8.31 — League Phase 2 M1 draft / captains */
.tmg-league-admin-note {
	font-size: 0.9rem;
	opacity: 0.85;
	border-left: 3px solid #f0a000;
	padding-left: 0.6rem;
	margin: 0.5rem 0 1rem;
}
.tmg-league-captain-list,
.tmg-league-poll-tallies,
.tmg-league-roster-summary,
.tmg-league-draft-teams,
.tmg-league-draft-pool,
.tmg-league-draft-picks {
	margin: 0.5rem 0 1rem;
	padding-left: 1.2rem;
}
.tmg-league-draft-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	margin-bottom: 0.75rem;
}
.tmg-league-draft-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
@media (max-width: 720px) {
	.tmg-league-draft-cols {
		grid-template-columns: 1fr;
	}
}
.tmg-league-draft-teams li.is-on-clock {
	font-weight: 700;
	outline: 1px solid currentColor;
	padding: 0.15rem 0.35rem;
	border-radius: 4px;
}
.tmg-league-draft-pool .tmg-muted {
	opacity: 0.7;
	font-size: 0.85em;
}
.tmg-league-pick-form {
	margin-top: 0.75rem;
}


/* League M2 — teams/rosters + waitlist offers (1.8.32) */
.tmg-league-team-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}
.tmg-league-team-card {
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 10px;
	padding: .85rem 1rem;
	background: rgba(0,0,0,.18);
}
.tmg-league-team-card-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: .75rem;
	margin-bottom: .35rem;
}
.tmg-league-team-fill {
	opacity: .75;
	font-size: .9em;
}
.tmg-league-team-captains {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1.25rem;
	margin: 0 0 .65rem;
	font-size: .92em;
}
.tmg-league-team-roles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .75rem;
}
@media (max-width: 640px) {
	.tmg-league-team-roles { grid-template-columns: 1fr; }
}
.tmg-league-role-label {
	margin: 0 0 .25rem;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	opacity: .8;
}
.tmg-league-role-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tmg-league-role-list li {
	display: flex;
	align-items: center;
	gap: .35rem;
	padding: .15rem 0;
}
.tmg-league-inline-form {
	display: inline;
	margin: 0;
}
.tmg-league-drop-btn {
	border: 0;
	background: transparent;
	color: #f88;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0 .2rem;
}
.tmg-league-team-offer-note {
	margin: .65rem 0 0;
	font-size: .9em;
	opacity: .85;
}
.tmg-league-offer-cta {
	border: 1px solid rgba(80, 200, 120, .45);
	background: rgba(40, 120, 70, .18);
	border-radius: 10px;
	padding: .85rem 1rem;
	margin: 0 0 1rem;
}
.tmg-league-offer-cta-title {
	margin: 0 0 .35rem;
}
.tmg-league-waitlist {
	margin: 0;
	padding-left: 0;
	list-style: none;
	counter-reset: none;
}
.tmg-league-waitlist li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
	padding: .4rem 0;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.tmg-league-waitlist li.has-offer {
	background: rgba(80, 160, 220, .08);
	margin: 0 -.5rem;
	padding-left: .5rem;
	padding-right: .5rem;
	border-radius: 6px;
}
.tmg-league-wait-pos {
	font-variant-numeric: tabular-nums;
	opacity: .7;
	min-width: 2.2em;
}
.tmg-league-wait-you {
	opacity: .7;
	font-size: .9em;
}

/* ---- League M3: availability + match lobby + ready (1.8.33) ---- */
.tmg-league-avail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: .75rem 1rem;
	margin: .75rem 0 1rem;
}
.tmg-league-avail-day {
	margin: 0;
	padding: .5rem .65rem;
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 8px;
	background: rgba(0,0,0,.2);
}
.tmg-league-avail-day legend {
	padding: 0 .25rem;
	font-size: .85rem;
	font-weight: 600;
}
.tmg-league-avail-slot {
	display: flex;
	align-items: center;
	gap: .4rem;
	font-size: .85rem;
	margin: .2rem 0;
}
.tmg-league-avail-meta,
.tmg-league-avail-team {
	opacity: .85;
	margin: 0 0 .5rem;
}
.tmg-league-match-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tmg-league-match-row {
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.tmg-league-match-row.is-conflict {
	background: rgba(220, 80, 60, .08);
}
.tmg-league-match-link {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .85rem;
	align-items: baseline;
	padding: .55rem 0;
	text-decoration: none;
	color: inherit;
}
.tmg-league-match-teams { font-weight: 600; }
.tmg-league-match-when { opacity: .8; font-size: .92em; }
.tmg-league-match-modes { opacity: .65; font-size: .85em; }
.tmg-league-match-lobby-meta { margin: 0 0 .75rem; }
.tmg-league-grace {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .35rem .6rem;
	margin: 0 0 1rem;
	padding: .55rem .75rem;
	border-radius: 8px;
	background: rgba(255, 180, 40, .1);
	border: 1px solid rgba(255, 180, 40, .25);
}
.tmg-league-grace strong[data-tmg-grace-countdown] {
	font-variant-numeric: tabular-nums;
	font-size: 1.15em;
}
.tmg-league-ready-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}
@media (max-width: 640px) {
	.tmg-league-ready-cols { grid-template-columns: 1fr; }
}
.tmg-league-ready-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tmg-league-ready-list li {
	display: flex;
	justify-content: space-between;
	gap: .5rem;
	padding: .35rem 0;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.tmg-league-ready-list li.is-ready {
	color: #8fd18f;
}
.tmg-league-inline-form { margin-top: .75rem; }
.tmg-muted { opacity: .65; font-size: .9em; }

.tmg-league-grace strong[data-tmg-grace-countdown]{font-variant-numeric:tabular-nums;font-size:1.15em;}


/* ---- League M4: standings + DE bracket + tracker report (1.8.34) ---- */
.tmg-league-standings-wrap { overflow-x: auto; margin: .5rem 0 1rem; }
.tmg-league-standings-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
}
.tmg-league-standings-table th,
.tmg-league-standings-table td {
	padding: .4rem .55rem;
	text-align: left;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.tmg-league-standings-table th { opacity: .75; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.tmg-league-standings-table td strong { font-variant-numeric: tabular-nums; }
.tmg-league-bracket { display: grid; gap: 1.25rem; margin: .75rem 0 1rem; }
.tmg-league-bracket-track-title { margin: 0 0 .5rem; font-size: 1rem; }
.tmg-league-bracket-round { margin-bottom: .75rem; }
.tmg-league-bracket-round h4 { margin: 0 0 .35rem; font-size: .95rem; }
.tmg-league-bracket-matches { list-style: none; margin: 0; padding: 0; }
.tmg-league-bracket-matches li {
	display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: baseline;
	padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.tmg-league-subsection-title { margin: 1.25rem 0 .5rem; font-size: 1.05rem; }
.tmg-league-series-games { list-style: none; margin: .75rem 0 0; padding: 0; }
.tmg-league-series-game {
	padding: .75rem .85rem;
	margin-bottom: .65rem;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,.1);
	background: rgba(0,0,0,.18);
}
.tmg-league-series-game.status-accepted { border-color: rgba(100,180,100,.35); }
.tmg-league-series-game.status-review { border-color: rgba(220,160,60,.45); background: rgba(220,160,60,.08); }
.tmg-league-series-game-head {
	display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: baseline; margin-bottom: .35rem;
}
.tmg-league-tracker-url { margin: .25rem 0; word-break: break-all; font-size: .9em; }
.tmg-league-tracker-form { margin-top: .5rem; }
.tmg-league-tracker-form input[type="url"] { width: 100%; max-width: 36rem; }

/* Phase 2 M5 — trades / succession / lineup swap */
.tmg-league-trade-window-meta { margin: .35rem 0 .75rem; display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: center; }
.tmg-league-trade-form select,
.tmg-league-lineup-swap select { max-width: 28rem; }
.tmg-league-trade-pending,
.tmg-league-pass-cta,
.tmg-league-co-vote {
	margin: .75rem 0;
	padding: .75rem 1rem;
	border: 1px solid rgba(100,160,220,.35);
	border-radius: 8px;
	background: rgba(80,140,220,.08);
}
.tmg-league-trade-log { list-style: none; margin: .75rem 0 0; padding: 0; }
.tmg-league-trade-log li { margin: .25rem 0; display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; }
.tmg-league-lineup-swap { margin: 1rem 0; padding: .75rem 0; border-top: 1px solid rgba(255,255,255,.08); }

/* —— 1.8.36 League IA sub-nav + Draft Day —— */
.tmg-league-subnav {
	margin: 0 0 1.25rem;
	padding: .35rem 0 .65rem;
	border-bottom: 1px solid rgba(255,255,255,.1);
}
.tmg-league-subnav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .15rem;
	align-items: center;
}
.tmg-league-subnav-item { margin: 0; }
.tmg-league-subnav-link {
	display: inline-block;
	padding: .45rem .9rem;
	border-radius: 999px;
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--tmg-muted);
	text-decoration: none;
	border: 1px solid transparent;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.tmg-league-subnav-link:hover,
.tmg-league-subnav-link:focus {
	color: var(--tmg-mist);
	background: rgba(255,255,255,.06);
	border-color: rgba(255,255,255,.12);
}
/* Light shell: use ink alpha for chrome and keep hover text dark/readable. */
html[data-theme="light"] .tmg-league-subnav,
body.tmg-theme-light .tmg-league-subnav {
	border-bottom-color: rgba(11,18,20,.14);
}
html[data-theme="light"] .tmg-league-subnav-link:hover,
html[data-theme="light"] .tmg-league-subnav-link:focus,
body.tmg-theme-light .tmg-league-subnav-link:hover,
body.tmg-theme-light .tmg-league-subnav-link:focus {
	color: var(--tmg-mist);
	background: rgba(11,18,20,.06);
	border-color: rgba(11,18,20,.14);
}
.tmg-league-subnav-item.is-active .tmg-league-subnav-link {
	color: #0b0f14;
	background: linear-gradient(135deg, #7dd3fc, #38bdf8);
	border-color: transparent;
}
.tmg-league-subnav-item:last-child {
	margin-left: auto;
}
.tmg-league--overview .tmg-league-header,
.tmg-league--teams .tmg-league-header,
.tmg-league--rules .tmg-league-header,
.tmg-league--seasons .tmg-league-header {
	margin-bottom: 1rem;
}
.tmg-league--draft-day .tmg-league-draft-day-hero {
	border: 1px solid rgba(56, 189, 248, .35);
	background:
		radial-gradient(120% 80% at 10% 0%, rgba(56,189,248,.18), transparent 55%),
		rgba(0,0,0,.28);
	box-shadow: 0 0 0 1px rgba(56,189,248,.08) inset;
}
.tmg-league--draft-day .tmg-league-kicker {
	color: #7dd3fc;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .75rem;
}
.tmg-league-draft-day-grid {
	margin-top: .5rem;
}
.tmg-league-finals-placeholder {
	padding: 1.5rem 1rem;
	border: 1px dashed rgba(255,255,255,.18);
	border-radius: 10px;
	text-align: center;
	background: rgba(0,0,0,.15);
}
.tmg-league-manage-hint {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem 1rem;
	align-items: center;
	margin-bottom: 1rem;
}
.tmg-league-prev-link { margin: 1rem 0 0; }
.tmg-league-team-cards--public .tmg-league-team-card {
	transition: border-color .15s ease, transform .15s ease;
}
.tmg-league-team-cards--public .tmg-league-team-card:hover {
	border-color: rgba(56,189,248,.35);
}
.tmg-league-seasons-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tmg-league-seasons-list li {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem .75rem;
	align-items: center;
	padding: .65rem 0;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.tmg-profile-league-manage { margin-top: 1rem; }
@media (max-width: 640px) {
	.tmg-league-subnav-item:last-child { margin-left: 0; }
	.tmg-league-subnav-list { gap: .25rem; }
	.tmg-league-subnav-link { padding: .4rem .7rem; font-size: .85rem; }
}

/* —— 1.8.38 League Calendar + My Team hub —— */
.tmg-league--calendar .tmg-league-header { margin-bottom: 1rem; }
.tmg-league-cal-nav {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem 1rem;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}
.tmg-league-cal-month { font-size: 1.1rem; }
.tmg-league-cal-grid { padding: .75rem; }
.tmg-league-cal-head,
.tmg-league-cal-body {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
}
.tmg-league-cal-dow {
	text-align: center;
	font-size: .75rem;
	opacity: .7;
	padding: .35rem 0;
	font-weight: 600;
}
.tmg-league-cal-cell {
	min-height: 5.5rem;
	padding: .35rem;
	border: 1px solid rgba(255,255,255,.08);
	border-radius: 6px;
	background: rgba(0,0,0,.18);
}
.tmg-league-cal-cell.is-outside { opacity: .35; background: transparent; }
.tmg-league-cal-cell.has-events { border-color: rgba(56,189,248,.28); }
.tmg-league-cal-daynum { font-weight: 700; font-size: .85rem; }
.tmg-league-cal-events { list-style: none; margin: .25rem 0 0; padding: 0; }
.tmg-league-cal-events li { font-size: .72rem; margin: .15rem 0; line-height: 1.25; }
.tmg-league-cal-events .type-draft a,
.tmg-league-cal-events .type-draft span { color: #7dd3fc; }
.tmg-league-cal-events .type-trade a,
.tmg-league-cal-events .type-trade span { color: #fbbf24; }
.tmg-league-cal-events .type-lock span { color: #f87171; }
.tmg-league-cal-list { list-style: none; margin: 0; padding: 0; }
.tmg-league-cal-list li {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .65rem;
	align-items: center;
	padding: .5rem 0;
	border-bottom: 1px solid rgba(255,255,255,.08);
}
.tmg-league-cal-widget-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.tmg-league-cal-widget-item {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem .65rem;
	padding: .35rem 0;
	border-bottom: 1px solid rgba(255,255,255,.06);
}
.tmg-league-cal-date { font-variant-numeric: tabular-nums; opacity: .8; min-width: 6.5rem; }
.tmg-league--manage-main .tmg-league-match-list--upcoming { margin: 0; padding: 0; list-style: none; }
.tmg-league-team-ops summary {
	cursor: pointer;
	list-style: none;
}
.tmg-league-team-ops summary::-webkit-details-marker { display: none; }
.tmg-league-ops-block { margin: 1rem 0; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.08); }
.tmg-league-hub-back { margin: 0 0 .75rem; }
.tmg-league-propose-slots { list-style: none; margin: .5rem 0 1rem; padding: 0; }
.tmg-league-propose-slots li {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	align-items: center;
	margin: .35rem 0;
}
.tmg-league-dual-sides {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	font-size: .9rem;
}
.tmg-league-admin-note {
	padding: .5rem .75rem;
	border-left: 3px solid rgba(251,191,36,.5);
	background: rgba(251,191,36,.06);
}
.tmg-league-series-game.status-match { border-color: rgba(52,211,153,.35); }
.tmg-league-series-game.status-mismatch { border-color: rgba(248,113,113,.45); }
@media (max-width: 720px) {
	.tmg-league-cal-cell { min-height: 3.5rem; }
	.tmg-league-cal-events { display: none; }
	.tmg-league-cal-cell.has-events .tmg-league-cal-daynum::after {
		content: '•';
		color: #38bdf8;
		margin-left: .2rem;
	}
}


/* -------------------------------------------------------------------------- */
/* 1.8.40 — Home title regression hotfix                                  */
/* -------------------------------------------------------------------------- */

/* Shared page-title typography = News mast (.tmg-news-mast-title). Home hero kept. */
body:not(.home):not(.front-page) .wp-block-post-title,
body:not(.home):not(.front-page) h1.wp-block-post-title,
body:not(.home):not(.front-page) .entry-title,
.tmg-players-head h2,
.tmg-members-head h2,
.tmg-league-title {
    color: var(--tmg-mist);
    font-family: inherit;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}

/* Show WP page titles on shell pages that have no shortcode mast (override 1.8.10 hides). */
body.page-slug-ladder .wp-block-post-title,
body.page-slug-standings .wp-block-post-title,
body.page-slug-tournaments .wp-block-post-title,
body.page-slug-account .wp-block-post-title,
body.page-ladder .wp-block-post-title,
body.page-standings .wp-block-post-title,
body.page-tournaments .wp-block-post-title,
body.page-account .wp-block-post-title,
.page-slug-ladder .wp-block-post-title,
.page-slug-standings .wp-block-post-title,
.page-slug-tournaments .wp-block-post-title,
.page-slug-account .wp-block-post-title,
body.page-slug-ladder .entry-title,
body.page-slug-standings .entry-title,
body.page-slug-tournaments .entry-title,
body:not(.home):not(.front-page):not(:has(.tmg-home)):has(table.tmg-leaderboard):not(:has(.tmg-news-page)) .wp-block-post-title,
body:not(.home):not(.front-page):not(:has(.tmg-home)):has(.tmg-tournament):not(:has(.tmg-news-page)) .wp-block-post-title,
body:not(.home):not(.front-page):not(:has(.tmg-home)):has(.tmg-leaderboard-live):not(:has(.tmg-news-page)) .wp-block-post-title {
    clip: auto !important;
    color: var(--tmg-mist);
    display: block !important;
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 800;
    height: auto !important;
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 0 0 0.65rem !important;
    overflow: visible !important;
    /* Keep existing shell padding/max-width rules; only restore visibility + mast type. */
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Shortcode-owned chrome: hide duplicate WP title on players (news/ladder already). */
body:has(.tmg-players) .wp-block-post-title,
body:has(.tmg-players) .entry-title,
body:has(.tmg-league) .wp-block-post-title,
body:has(.tmg-league) .entry-title,
.page-slug-players .wp-block-post-title,
.page-slug-league .wp-block-post-title {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Content H1s used as page intros (ladder/tournaments) — demote vs page title. */
.page-slug-ladder .entry-content > h1:first-child,
.page-slug-tournaments .entry-content > h1:first-child,
.page-slug-standings .entry-content > h1:first-child,
body.page-slug-ladder .wp-block-post-content > h1:first-child,
body.page-slug-tournaments .wp-block-post-content > h1:first-child {
    color: var(--tmg-muted);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.45;
    margin: 0 0 0.75rem;
}

/* Shrink TT5 spacing-60 gap under sticky nav (main margin + inner group pad). */
body:not(.home):not(.front-page) .wp-site-blocks > main,
body:not(.home):not(.front-page) .wp-site-blocks > main.wp-block-group {
    margin-top: 0.35rem !important;
    padding-top: 0 !important;
}

body:not(.home):not(.front-page) .wp-site-blocks > main > .wp-block-group,
body:not(.home):not(.front-page) .wp-site-blocks > main > .wp-block-group.alignfull {
    padding-top: 0.65rem !important;
}

/* Keep bottom breathing room without the double spacing-60 stack. */
body:not(.home):not(.front-page) .wp-site-blocks > main > .wp-block-group.alignfull {
    padding-bottom: clamp(1.25rem, 3vw, 2rem) !important;
}

/* News shortcode already owns title — tighten masthead under nav. */
.tmg-news-page {
    padding-top: 0.15rem;
}

.tmg-news-masthead {
    margin-top: 0;
}

/* Functional readability: tables / cards inherit fg; muted secondary clearer. */
.tmg-panel,
.tmg-form,
.tmg-leaderboard,
.tmg-player-card,
.tmg-league-panel,
.tmg-league-signup,
table.tmg-leaderboard,
.tmg-leaderboard th,
.tmg-leaderboard td {
    color: var(--tmg-fg);
}

.tmg-leaderboard th,
.tmg-form .description,
.tmg-empty-hint,
.tmg-league-stat-label,
.tmg-league-section-lead {
    color: var(--tmg-muted);
}

html[data-theme="light"] .tmg-league,
body.tmg-theme-light .tmg-league {
    color: var(--tmg-mist, #0B1214);
}

