/*
 * The bracket maker (templates/tournaments/): the wizard on the SEO pages, a bracket's page, the embed, "my
 * brackets" and the gallery. Scoped to .bm-page; the same tokens as the landing pages (css/landing.css .lp),
 * so it reads as part of Grundee's public site. The SVG bracket carries its own styles (partials/bracket_svg.html).
 * Contrast: green fills (#54a300) always have dark text on them; green text is #3d7a00.
 */
.bm-page {
    --paper: #f7f8f5;
    --surface: #ffffff;
    --field: #eceee8;
    --stage: #e9f5db;
    --ink: #17211a;
    --soft: #4d574f;
    --muted: #6b746d;
    --accent: #54a300;
    --accent-hover: #62b80a;
    --accent-text: #3d7a00;
    --accent-ink: #0d1608;
    --line: #e1e6dc;
    --warn: #b45309;
    --danger: #b42318;
    --radius: 22px;
    --radius-s: 14px;
    --shadow: 0 1px 2px rgba(23, 33, 26, 0.05), 0 12px 32px -18px rgba(23, 33, 26, 0.25);

    font-family: 'Outfit', sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 64px;
}
.bm-page *, .bm-page *::before, .bm-page *::after { box-sizing: border-box; }
.bm-page :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bm-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .bm-wrap { padding: 0 28px; } }
.bm-page h1, .bm-page h2, .bm-page h3 { font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; color: var(--ink); }
.bm-soft { color: var(--soft); }
.bm-muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.bm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
    padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600;
    background: var(--accent); color: var(--accent-ink); text-decoration: none; white-space: nowrap;
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.bm-btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(84, 163, 0, 0.75); }
.bm-btn:active { transform: none; }
.bm-btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.bm-btn--lg { min-height: 56px; padding: 0 32px; font-size: 17px; }
.bm-btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.bm-btn--ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.bm-btn--ghost:hover { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px #b9c4b0; }
.bm-btn--dark { background: var(--ink); color: #f1f4ee; }
.bm-btn--dark:hover { background: #2a372d; color: #fff; box-shadow: 0 10px 22px -12px rgba(13, 22, 8, 0.7); }
.bm-btn--danger { background: var(--surface); color: var(--danger); box-shadow: inset 0 0 0 1.5px #f1c6c1; }
.bm-btn--danger:hover { background: #fff5f4; color: var(--danger); }
.bm-link-btn {
    border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--accent-text);
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline;
    text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.bm-link-btn:hover { color: var(--ink); }
.bm-icon-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--soft);
    display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.bm-icon-btn:hover { background: var(--field); color: var(--ink); }
.bm-mini-btn {
    min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line);
    background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.bm-mini-btn:hover { border-color: #b9c4b0; }
.bm-mini-btn--go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bm-mini-btn--go:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Chips, segmented controls ---------- */
.bm-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; background: var(--field); color: var(--soft); white-space: nowrap;
    vertical-align: middle;
}
.bm-chip--ready { background: var(--stage); color: var(--accent-text); }
.bm-chip--done { background: var(--stage); color: var(--accent-text); }
.bm-chip--out { background: #fdecea; color: var(--danger); }
.bm-chip--tie { background: #fff3db; color: var(--warn); }
.bm-seg {
    display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--field);
}
.bm-seg__btn {
    border: 0; background: transparent; border-radius: 999px; min-height: 38px; padding: 0 16px; font: inherit;
    font-size: 15px; font-weight: 600; color: var(--soft); cursor: pointer; display: inline-flex; align-items: center; min-width: 44px;
    gap: 6px;
}
.bm-seg__btn[aria-pressed="true"], .bm-seg__btn.is-active {
    background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(23, 33, 26, 0.12);
}
.bm-count { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(23, 33, 26, 0.08); }

/* ---------- Hero (SEO pages) ---------- */
.bm-hero { padding-top: 40px; padding-bottom: 28px; text-align: center; }
.bm-hero__kicker {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: var(--stage); color: var(--accent-text); font-weight: 600; font-size: 14px;
}
.bm-hero h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.035em; margin: 18px auto 14px; max-width: 900px; }
.bm-hero__lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--soft); max-width: 700px; margin: 0 auto; }
.bm-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--soft); font-weight: 500; }
.bm-checks li { display: inline-flex; align-items: center; gap: 8px; }
.bm-checks i { color: var(--accent-text); }

/* ---------- Wizard ---------- */
.bm-wizard {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
    overflow: clip; /* not hidden: that would stop the sticky Next/Create bar from sticking to the screen */
}
.bm-steps {
    display: flex; gap: 4px; padding: 12px; border-bottom: 1px solid var(--line); overflow-x: auto;
    scrollbar-width: none; background: #fbfcfa;
}
.bm-steps::-webkit-scrollbar { display: none; }
.bm-step-tab {
    display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: 12px;
    padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.bm-step-tab__n {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
    background: var(--field); color: var(--soft);
}
.bm-step-tab[aria-current="step"] { background: var(--stage); color: var(--ink); }
.bm-step-tab[aria-current="step"] .bm-step-tab__n { background: var(--accent); color: var(--accent-ink); }
.bm-step-tab.is-done .bm-step-tab__n { background: var(--ink); color: #fff; }
.bm-step { padding: 26px 22px 8px; }
@media (min-width: 768px) { .bm-step { padding: 34px 40px 12px; } }
.bm-step__title { font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 6px; }
.bm-step__lead { color: var(--soft); margin: 0 0 22px; }
.bm-wizard__foot {
    position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
}
@media (min-width: 768px) { .bm-wizard__foot { padding: 16px 40px; } }
@media (max-width: 575.98px) {
    .bm-step { padding: 22px 16px 8px; }
    .bm-wizard__foot { padding: 12px 16px; }
    /* Last step: the Create button takes the room of the summary */
    .bm-wizard__foot.is-last .bm-wizard__summary { display: none; }
    .bm-wizard__foot .bm-btn--lg { flex: 1 1 auto; min-width: 0; padding: 0 16px; font-size: 16px; }
    /* A segmented control that wraps on a narrow screen: full width, equal buttons, no pill shape */
    .bm-seg { display: flex; border-radius: 16px; }
    .bm-seg__btn { flex: 1 1 auto; justify-content: center; border-radius: 12px; text-align: center; padding: 6px 12px; }
}
.bm-wizard__summary { font-size: 14px; color: var(--soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bm-field { margin-bottom: 20px; }
.bm-label { display: block; font-weight: 600; margin-bottom: 8px; }
.bm-hint { font-size: 14px; color: var(--muted); margin-top: 6px; }
.bm-input, .bm-select, .bm-textarea {
    width: 100%; min-height: 50px; padding: 10px 16px; border-radius: var(--radius-s); border: 1.5px solid var(--line);
    background: var(--surface); font: inherit; color: var(--ink); transition: border-color 140ms ease, box-shadow 140ms ease;
}
.bm-textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.bm-input:focus, .bm-select:focus, .bm-textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(84, 163, 0, 0.18); }
.bm-input--lg { font-size: 20px; font-weight: 600; min-height: 58px; }
.bm-error { color: var(--danger); font-weight: 500; font-size: 15px; display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; }
.bm-grid-2 { display: grid; gap: 16px; }
@media (min-width: 768px) { .bm-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Choice cards (entrant type, formats) */
.bm-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.bm-cards--formats { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.bm-card-choice {
    position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px;
    border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font: inherit;
    color: var(--ink); transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.bm-card-choice:hover { border-color: #b9c4b0; transform: translateY(-1px); }
.bm-card-choice[aria-pressed="true"], .bm-card-choice[aria-checked="true"] {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(84, 163, 0, 0.2); background: #fbfef7;
}
.bm-card-choice__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--stage); color: var(--accent-text); font-size: 20px; }
.bm-card-choice__title { font-weight: 650; font-size: 17px; }
.bm-card-choice__text { font-size: 14px; color: var(--soft); line-height: 1.45; }
.bm-card-choice__badge {
    position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px; background: var(--ink); color: #fff;
}
.bm-card-choice svg.bm-format-art { width: 100%; height: 54px; color: var(--accent-text); margin-bottom: 4px; }

/* Step 0: the sport, as picture cards like the explore pages (teams/explore_router.html, css/wizard-ui.css) */
.bm-sport-search { position: relative; margin-bottom: 18px; }
.bm-sport-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.bm-sport-search .bm-input { padding-left: 44px; }
.bm-sports { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.bm-sport {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden;
    border: 2px solid transparent; border-radius: 14px; background: var(--surface); box-shadow: 0 1px 4px rgba(23, 33, 26, 0.08);
    font: inherit; color: var(--ink); cursor: pointer; transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.bm-sport:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(23, 33, 26, 0.07); border-color: #d9edc2; }
.bm-sport:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bm-sport[aria-pressed="true"] { border-color: var(--accent); background: var(--stage); }
.bm-sport__img { height: 96px; display: flex; align-items: center; justify-content: center; padding: 12px; background: #fcfcfc; color: var(--muted); font-size: 30px; }
.bm-sport__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bm-sport__name { padding: 10px 8px 12px; font-weight: 700; font-size: 15px; text-align: center; line-height: 1.25; }
.bm-sports--compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bm-sports--compact .bm-sport { flex-direction: row; align-items: center; }
.bm-sports--compact .bm-sport__img { width: 52px; height: 52px; flex-shrink: 0; padding: 6px; font-size: 20px; }
.bm-sports--compact .bm-sport__name { padding: 8px 10px; text-align: left; font-size: 14px; }
.bm-more-sports { margin-top: 18px; }
.bm-more-sports summary { cursor: pointer; font-weight: 650; color: var(--accent-text); padding: 8px 0; margin-bottom: 8px; }
@media (max-width: 575.98px) {
    .bm-sports { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .bm-sport__img { height: 68px; padding: 8px; font-size: 24px; }
    .bm-sport__name { padding: 8px 4px 10px; font-size: 13.5px; }
    .bm-sports--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Step 1: the picked sport, tap to change it */
.bm-sport-chip {
    display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 5px 14px 5px 5px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; max-width: 100%;
}
.bm-sport-chip:hover { border-color: var(--accent); }
.bm-sport-chip__img { width: 34px; height: 34px; border-radius: 50%; background: var(--stage); display: grid; place-items: center; color: var(--accent-text); flex-shrink: 0; overflow: hidden; }
.bm-sport-chip__img img { width: 26px; height: 26px; object-fit: contain; }
.bm-sport-chip__name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-sport-chip__change { font-size: 14px; font-weight: 650; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* QR code: in the share dialog, and full screen to show the phone to someone */
.bm-qr { display: flex; align-items: center; gap: 18px; }
.bm-qr img { width: 148px; height: 148px; flex-shrink: 0; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 4px; }
@media (max-width: 400px) { .bm-qr { flex-direction: column; align-items: flex-start; } }
.bm-qr-full .modal-content { background: #fff; color: #17211a; }
.bm-qr-full__close { position: absolute; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px; }
.bm-qr-full__body { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 56px 20px 32px; text-align: center; }
.bm-qr-full__title { font-size: clamp(22px, 5vw, 34px); margin: 0; max-width: 680px; overflow-wrap: anywhere; }
.bm-qr-full__code { width: min(84vw, 62vh, 520px); height: auto; aspect-ratio: 1; }
.bm-qr-full__hint { max-width: 420px; font-size: 17px; color: var(--soft); margin: 0; }
.bm-qr-full__hint i { margin-right: 8px; color: var(--accent-text); }
.bm-qr-full__brand { width: min(56vw, 220px); height: auto; }

/* Step 4: the scoring of a known sport, shown, not chosen */
.bm-scoring-fixed { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: #fbfcfa; border: 1px solid var(--line); }
.bm-scoring-fixed .bm-label { display: block; font-size: 13px; color: var(--muted); }

/* Entrant list editor */
.bm-entrants { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bm-entrant {
    display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 6px 6px 6px 4px;
    border-radius: 14px; background: #fbfcfa; border: 1px solid var(--line);
}
.bm-entrant.sortable-ghost { opacity: 0.35; }
.bm-entrant.sortable-chosen { box-shadow: var(--shadow); background: var(--surface); }
.bm-entrant__handle { cursor: grab; color: var(--muted); padding: 8px 6px; touch-action: none; border: 0; background: none; }
.bm-entrant__seed { width: 30px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.bm-entrant__fields { display: grid; gap: 6px; min-width: 0; }
.bm-entrant__fields--pair { grid-template-columns: 1fr 1fr; }
.bm-entrant .bm-input { min-height: 42px; padding: 6px 12px; border-radius: 10px; }
.bm-entrant.is-dupe .bm-input { border-color: var(--warn); }
.bm-entrant__roster { grid-column: 3 / 4; }
.bm-add-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.bm-add-row .bm-input { flex: 1; }
.bm-add-pair { display: flex; gap: 8px; flex: 1; min-width: 0; }
.bm-add-pair .bm-input { min-width: 0; }
@media (max-width: 575.98px) {
    /* Phones: a pair's two names stack, so each name gets the full width instead of 5 visible letters */
    .bm-entrant__fields--pair { grid-template-columns: 1fr; }
    .bm-add-pair { flex-direction: column; }
    .bm-entrant { gap: 4px; }
    .bm-entrant__seed { width: 22px; }
}
.bm-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

/* Toggles */
.bm-toggle { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.bm-toggle:last-child { border-bottom: 0; }
.bm-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.bm-toggle__track {
    flex-shrink: 0; width: 46px; height: 28px; border-radius: 999px; background: #cfd6c9; position: relative;
    transition: background-color 160ms ease; margin-top: 2px;
}
.bm-toggle__track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 160ms ease;
}
.bm-toggle input:checked + .bm-toggle__track { background: var(--accent); }
.bm-toggle input:checked + .bm-toggle__track::after { transform: translateX(18px); }
.bm-toggle input:focus-visible + .bm-toggle__track { outline: 3px solid var(--accent); outline-offset: 2px; }
.bm-toggle__title { font-weight: 600; display: block; }
.bm-toggle__text { font-size: 14px; color: var(--muted); }

.bm-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.bm-stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; color: var(--ink); cursor: pointer; border-radius: 999px; }
.bm-stepper button:hover:not([disabled]) { background: var(--field); }
.bm-stepper button[disabled] { color: #c3cbbf; cursor: default; }
.bm-stepper output, .bm-stepper input { min-width: 44px; text-align: center; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; border: 0; background: none; padding: 0; }
.bm-stepper input { width: 64px; -moz-appearance: textfield; }
.bm-stepper input::-webkit-outer-spin-button, .bm-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.bm-options { border: 1px solid var(--line); border-radius: 18px; padding: 4px 18px; margin-top: 18px; background: #fbfcfa; }
.bm-options__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bm-options__row:last-child { border-bottom: 0; }
.bm-options__label { font-weight: 600; }
.bm-options__sub { font-size: 14px; color: var(--muted); display: block; font-weight: 400; }
.bm-points { display: flex; gap: 10px; flex-wrap: wrap; }
.bm-points label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; }
.bm-points input { width: 70px; min-height: 42px; text-align: center; border-radius: 10px; border: 1.5px solid var(--line); font: inherit; font-weight: 700; }
.bm-sortable { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: tb; }
.bm-sortable li {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface);
    border: 1px solid var(--line); counter-increment: tb; font-weight: 500;
}
.bm-sortable li::before { content: counter(tb); font-weight: 700; color: var(--muted); width: 18px; font-variant-numeric: tabular-nums; }
.bm-sortable li > span:first-child { flex: 1; min-width: 0; }
.bm-sortable li .bm-icon-btn { width: 32px; height: 32px; }

.bm-summary { display: grid; gap: 10px; margin: 0 0 22px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.bm-summary div { background: #fbfcfa; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.bm-summary dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.bm-summary dd { margin: 2px 0 0; font-weight: 650; }

/* Live preview */
.bm-preview { margin-top: 28px; }
.bm-preview__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bm-preview__head h2 { font-size: 20px; margin: 0; }
/* The bracket in the preview is its own card (.bm-scroller): no second one around it */
.bm-preview__frame { position: relative; min-height: 160px; }
.bm-preview__frame.is-empty { border: 1.5px dashed var(--line); border-radius: var(--radius); }
.bm-preview__frame.is-loading::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, 0.55);
}
.bm-preview__empty { display: grid; place-items: center; min-height: 140px; color: var(--muted); text-align: center; }

/* ---------- Bracket page ---------- */
.bm-head { padding: 28px 0 18px; }
.bm-head__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bm-head h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; margin: 0 0 10px; overflow-wrap: anywhere; }
.bm-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; padding: 0; list-style: none; }
.bm-meta li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--soft); font-weight: 500; }
.bm-meta i { color: var(--accent-text); }
.bm-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-description { color: var(--soft); max-width: 760px; white-space: pre-line; margin: 6px 0 0; overflow-wrap: anywhere; }
.bm-description.bm-rich { white-space: normal; }
.bm-status { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; font-weight: 600; color: var(--soft); }
.bm-status--won { color: var(--ink); padding: 8px 16px; border-radius: 999px; background: var(--stage); }
.bm-status--won i { color: var(--accent-text); }
.bm-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(84, 163, 0, 0.6); animation: bm-pulse 1.8s infinite; }
@keyframes bm-pulse { 70% { box-shadow: 0 0 0 10px rgba(84, 163, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(84, 163, 0, 0); } }

.bm-owner-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 20px; border-radius: 18px;
    background: var(--ink); color: #eef2ea; margin: 0 0 18px;
}
.bm-owner-bar__text { flex: 1 1 320px; }
.bm-owner-bar strong { color: #fff; }
.bm-owner-bar__text p { margin: 2px 0 0; color: #c4cec0; font-size: 15px; }
.bm-owner-bar .bm-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.bm-owner-bar .bm-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1.5px #9be22d; }
.bm-owner-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.bm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 22px; overflow-x: auto; scrollbar-width: none; }
.bm-tabs::-webkit-scrollbar { display: none; }
.bm-tab {
    border: 0; background: none; padding: 12px 16px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px;
}
.bm-tab:hover { color: var(--ink); }
.bm-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 575.98px) {
    /* Phones: all four tabs fit; Settings becomes a gear (its label stays for screen readers) */
    .bm-tab { padding: 12px 9px; gap: 6px; }
    .bm-tab:not(#tab-settings) > i { display: none; }
    #tab-settings { margin-left: auto; }
    #tab-settings .bm-tab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.bm-panel[hidden] { display: none; }

.bm-stage { margin-bottom: 30px; }
.bm-stage__title { font-size: 22px; margin: 0 0 14px; }
.bm-scroller {
    position: relative; overflow: auto; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line);
    box-shadow: var(--shadow); cursor: grab; max-height: 78vh; overscroll-behavior: contain;
}
.bm-scroller.is-dragging { cursor: grabbing; user-select: none; }
.bm-scroller svg text { user-select: none; -webkit-user-select: none; }
.bm-scroller:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bm-svg { display: block; transform-origin: 0 0; }
.bm-svg .bm-m--edit { cursor: pointer; }
.bm-svg .bm-m--edit:hover .bm-box-line, .bm-svg .bm-m--edit:focus .bm-box-line { stroke: #3d7a00; stroke-width: 2.5; }
.bm-svg .bm-m--edit:focus { outline: none; }
.bm-svg .bm-m.is-highlight .bm-box-line { stroke: #17211a; stroke-width: 2.5; }
.bm-ko { position: relative; }
.bm-zoom { position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 2px 10px rgba(23, 33, 26, 0.15); }
.bm-svg .bm-slot.is-path .bm-name { fill: #3d7a00; font-weight: 700; }
.bm-svg .bm-m.is-path .bm-box-line { stroke: #54a300; stroke-width: 2.5; }
.bm-zoom button { width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; color: var(--ink); cursor: pointer; }
.bm-zoom button:hover { background: var(--field); }
@media (max-width: 575.98px) {
    /* Phones: the zoom buttons sit above the bracket instead of covering its last round */
    .bm-zoom { position: static; display: flex; width: fit-content; margin: 0 0 8px auto; box-shadow: none; border: 1px solid var(--line); }
}

.bm-groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.bm-groups--single { grid-template-columns: minmax(0, 1fr); }
.bm-group { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px 16px 12px; min-width: 0; }
.bm-group__title { font-size: 18px; margin: 2px 4px 10px; display: flex; align-items: center; gap: 8px; }
.bm-group__note { font-size: 13.5px; color: var(--muted); margin: 10px 4px 0; display: flex; align-items: center; gap: 8px; }
.bm-through-mark { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); display: inline-block; }
.bm-group__matches { margin: 10px 4px 0; }
.bm-group__matches summary { cursor: pointer; font-weight: 600; color: var(--accent-text); padding: 6px 0; }
.bm-table-wrap { overflow-x: auto; }
.bm-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.bm-table th, .bm-table td { padding: 9px 8px; text-align: center; border-bottom: 1px solid #eef1eb; white-space: nowrap; }
.bm-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 650; }
.bm-table abbr { text-decoration: none; cursor: help; }
.bm-table .bm-table__name { text-align: left; width: 100%; white-space: normal; font-weight: 600; }
.bm-table tbody .bm-table__name { min-width: 140px; }
.bm-table__entrant { overflow-wrap: anywhere; margin-right: 6px; }
.bm-table__rank { width: 34px; color: var(--muted); font-weight: 700; }
.bm-table__pts { font-weight: 800; color: var(--ink); }
.bm-table tbody tr:last-child th, .bm-table tbody tr:last-child td { border-bottom: 0; }
.bm-table tr.is-through .bm-table__rank { box-shadow: inset 4px 0 0 var(--accent); color: var(--accent-text); }
.bm-table tr.is-out { color: var(--muted); }
@media (max-width: 575.98px) {
    /* Phones: the whole table, points column included, fits without sideways scrolling */
    .bm-table { font-size: 14px; }
    .bm-table th, .bm-table td { padding: 8px 4px; }
    .bm-table thead th { font-size: 12px; letter-spacing: 0; }
    .bm-table tbody .bm-table__name { min-width: 96px; }
    .bm-table__rank { width: 24px; }
}
@media (max-width: 575px) { .bm-hide-sm { display: none; } }

/* Match list */
.bm-matches[data-filter="ready"] .bm-mrow:not([data-state="ready"]) { display: none; }
.bm-matches[data-filter="done"] .bm-mrow:not([data-state="done"]) { display: none; }
.bm-matches .bm-seg { margin-bottom: 16px; }
.bm-matches__empty { display: none; color: var(--muted); padding: 18px; background: var(--surface); border-radius: 16px; border: 1px dashed var(--line); }
.bm-matches[data-filter="ready"].is-empty-ready [data-empty="ready"], .bm-matches[data-filter="done"].is-empty-done [data-empty="done"] { display: block; }
.bm-round { margin-bottom: 18px; }
.bm-round.is-empty { display: none; }
.bm-round__title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.bm-mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bm-mrow {
    /* Fixed columns: every score sits on the same centre line, whatever each row's status or button. The first
       column holds the number and, when the tournament plans courts, when and where (bm-matches--courts). */
    display: grid; grid-template-columns: var(--bm-left-w) minmax(0, 1fr) var(--bm-score-w, 96px) minmax(0, 1fr) 128px;
    align-items: center; gap: 6px 16px;
    padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.bm-matches { --bm-left-w: 34px; }
.bm-matches--courts { --bm-left-w: 240px; }
.bm-mrow--ready { border-color: #cfe5b4; }
.bm-mrow__when { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.bm-mrow__info { display: grid; gap: 1px; min-width: 0; }
.bm-mrow__head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
/* The day as a little calendar leaf, like the event page's */
.bm-leaf {
    flex: none; display: grid; width: 46px; text-align: center; border-radius: 9px; overflow: hidden; background: var(--surface);
    border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(23, 33, 26, 0.06); line-height: 1.1;
}
.bm-leaf__month { padding: 2px 0; background: #dc3545; color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.bm-leaf__day { padding-top: 3px; font-size: 19px; font-weight: 800; color: var(--ink); }
.bm-leaf__weekday { padding-bottom: 3px; font-size: 9.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.bm-mrow__num { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.bm-matches:not(.bm-matches--courts) .bm-mrow__head { justify-content: center; }
.bm-mrow__time { font-size: 16px; font-weight: 750; color: var(--ink); white-space: nowrap; }
.bm-mrow__time i, .bm-mrow__place i { color: var(--accent-text); margin-right: 5px; font-size: 0.9em; }
.bm-mrow__court { color: var(--soft); font-weight: 600; }
.bm-mrow__court, .bm-mrow__place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-mrow__place { color: var(--muted); text-decoration: none; }
.bm-mrow__place:hover { color: var(--accent-text); text-decoration: underline; }
.bm-mrow__side { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.bm-mrow__side--a { justify-content: flex-end; text-align: right; }
.bm-mrow__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-mrow__side em { color: var(--muted); font-size: 14px; }
.bm-mrow__side.is-winner { font-weight: 750; color: var(--accent-text); }
.bm-mrow__side.is-loser { color: var(--soft); }
.bm-mrow__score { justify-self: center; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }
.bm-mrow__result { display: inline-block; min-width: 64px; padding: 3px 10px; border-radius: 999px; background: var(--field); color: var(--ink); }
.bm-mrow__vs { color: var(--muted); font-weight: 500; font-size: 14px; }
.bm-mrow__action { justify-self: end; }
.bm-mrow__group { grid-column: 1 / -1; order: -1; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: -4px; }
/* Tablets: a narrower when-and-where column */
@media (max-width: 991.98px) and (min-width: 576px) {
    .bm-matches--courts { --bm-left-w: 176px; }
    .bm-mrow { gap: 6px 12px; grid-template-columns: var(--bm-left-w) minmax(0, 1fr) var(--bm-score-w, 96px) minmax(0, 1fr) 96px; }
}
/* Phones: when and where as one line over the two sides, the result beside them */
@media (max-width: 575px) {
    .bm-mrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "g g" "i i" "a s" "b s" "m m" "act act"; row-gap: 4px; }
    .bm-mrow__group { grid-area: g; margin-bottom: 2px; }
    .bm-mrow__when { grid-area: i; }
    .bm-mrow__info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
    .bm-matches--courts .bm-mrow__when { padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px dashed var(--line); }
    .bm-mrow__place { flex-basis: 100%; }
    .bm-mrow__side { white-space: normal; overflow-wrap: anywhere; }
    .bm-mrow__side--a { grid-area: a; text-align: left; }
    .bm-mrow__side--b { grid-area: b; }
    .bm-mrow__score { grid-area: s; align-self: center; }
    .bm-mrow__action { grid-area: act; }
    .bm-mrow__action:empty { display: none; }
    .bm-mrow__action .bm-mini-btn { width: 100%; margin-top: 8px; }
}

/* Entrants tab */
.bm-entrant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bm-entrant-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-radius: 14px; border: 1px solid var(--line); }
.bm-entrant-item__seed { width: 28px; color: var(--muted); font-weight: 700; text-align: center; }
.bm-entrant-item__name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bm-entrant-item__members { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.bm-entrant-item.is-out .bm-entrant-item__name { color: var(--muted); text-decoration: line-through; }

/* Settings tab */
.bm-settings, .bm-settings__main, .bm-settings__side { display: grid; gap: 18px; align-content: start; }
/* Settings: what the tournament is on the left; who runs it, who sees it and deleting it on the right */
@media (min-width: 992px) { .bm-settings { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: start; } }
.bm-panel-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow); }
.bm-panel-card h2 { font-size: 20px; margin: 0 0 6px; }
.bm-panel-card > p { color: var(--soft); margin: 0 0 16px; }
.bm-copy { display: flex; gap: 8px; }
.bm-copy .bm-input { flex: 1; min-width: 0; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bm-danger-zone { border-color: #f1c6c1; }

/* CTA cards */
.bm-ctas { display: grid; gap: 14px; margin-top: 34px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.bm-cta { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform 160ms ease, box-shadow 160ms ease; }
.bm-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.bm-cta--dark { background: var(--ink); color: #eef2ea; border-color: var(--ink); }
.bm-cta--dark:hover { color: #fff; }
.bm-cta__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--stage); color: var(--accent-text); font-size: 20px; }
.bm-cta--dark .bm-cta__icon { background: var(--accent); color: var(--accent-ink); }
.bm-cta h3 { font-size: 19px; margin: 6px 0 0; color: inherit; }
.bm-cta p { margin: 0; color: var(--soft); font-size: 15px; }
.bm-cta--dark p { color: #c4cec0; }
.bm-cta__go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--accent-text); display: inline-flex; gap: 6px; align-items: center; }
.bm-cta--dark .bm-cta__go { color: #9be22d; }
.bm-cta--accent { background: var(--stage); border-color: #cfe5b4; }
.bm-cta--accent .bm-cta__icon { background: var(--accent); color: var(--accent-ink); }

/* Dialogs (Bootstrap modals restyled) */
.bm-modal .modal-content { border: 0; border-radius: var(--radius); font-family: 'Outfit', sans-serif; color: var(--ink); }
.bm-modal .modal-header { border: 0; padding: 22px 24px 4px; align-items: flex-start; }
.bm-modal .modal-title { font-weight: 700; font-size: 20px; }
.bm-modal .modal-body { padding: 12px 24px; }
.bm-modal .modal-footer { border: 0; padding: 8px 24px 22px; gap: 8px; }
.bm-modal__sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.bm-versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 10px 0 18px; }
.bm-versus__name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.bm-versus__name--b { text-align: right; }
.bm-versus__vs { color: var(--muted); font-weight: 600; }
.bm-score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.bm-score-row__label { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: -4px; }
.bm-score-row .bm-stepper { justify-self: start; }
.bm-score-row .bm-stepper:last-child { justify-self: end; }
.bm-score-row__dash { color: var(--muted); font-weight: 700; }
.bm-score-row .bm-stepper { min-width: 0; }
@media (max-width: 575.98px) {
    /* Phones: two score steppers and the colon fit in the dialog (360 px wide screens included) */
    .bm-score-row { gap: 6px; }
    .bm-score-row .bm-stepper button { width: 38px; height: 46px; }
    .bm-score-row .bm-stepper input { width: 46px; min-width: 0; height: 40px; font-size: 20px; }
}
.bm-set-inputs { display: grid; grid-template-columns: 80px 1fr 16px 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.bm-set-inputs__label { font-size: 14px; font-weight: 600; color: var(--soft); }
.bm-num-input {
    width: 100%; min-height: 50px; text-align: center; font: inherit; font-size: 20px; font-weight: 700; border-radius: 12px;
    border: 1.5px solid var(--line); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.bm-num-input::-webkit-outer-spin-button, .bm-num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bm-num-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(84, 163, 0, 0.18); }
.bm-num-input.is-win { background: var(--stage); border-color: #b6d98d; }
.bm-tb-inputs { grid-column: 2 / -1; display: grid; grid-template-columns: 1fr 16px 1fr; gap: 8px; align-items: center; }
.bm-tb-inputs .bm-num-input { min-height: 38px; font-size: 15px; }
.bm-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bm-pick__btn {
    min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); font: inherit;
    font-weight: 700; color: var(--ink); cursor: pointer; padding: 10px; overflow-wrap: anywhere;
}
.bm-pick__btn[aria-pressed="true"] { border-color: var(--accent); background: var(--stage); box-shadow: 0 0 0 3px rgba(84, 163, 0, 0.18); }
.bm-pick__btn--draw { grid-column: 1 / -1; min-height: 46px; }
.bm-confirm { padding: 14px 16px; border-radius: 14px; background: #fff7e8; border: 1px solid #f7d79c; margin-top: 12px; }
.bm-confirm ul { margin: 6px 0 0; padding-left: 18px; }

/* Toast */
.bm-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 1090; opacity: 0; pointer-events: none;
    display: inline-flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 999px;
    background: var(--ink, #17211a); color: #fff; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
    transition: opacity 180ms ease, transform 180ms ease; max-width: calc(100vw - 32px);
}
.bm-toast.is-shown { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.bm-toast button { border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font: inherit; font-weight: 700; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
@media (max-width: 991px) { .bm-toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* SEO content */
.bm-content { padding-top: 54px; }
.bm-content h2 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 14px; }
.bm-how { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: how; margin: 22px 0 0; padding: 0; list-style: none; }
.bm-how li { counter-increment: how; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.bm-how li::before { content: counter(how); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 12px; }
.bm-how h3 { font-size: 18px; margin: 0 0 6px; }
.bm-how p { margin: 0; color: var(--soft); }
.bm-formats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 22px; }
.bm-formats article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.bm-formats h3 { font-size: 19px; margin: 10px 0 6px; }
.bm-formats p { color: var(--soft); margin: 0; }
.bm-formats svg { width: 100%; height: 64px; color: var(--accent-text); }
.bm-faq { max-width: 820px; }
.bm-faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.bm-faq summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.bm-faq summary::-webkit-details-marker { display: none; }
.bm-faq summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--accent-text); }
.bm-faq details[open] summary::after { content: '−'; }
.bm-faq details p { margin: 10px 0 0; color: var(--soft); }
.bm-band { margin-top: 54px; padding: 34px; border-radius: var(--radius); background: var(--ink); color: #eef2ea; display: grid; gap: 18px; align-items: center; }
@media (min-width: 900px) { .bm-band { grid-template-columns: 1fr auto; padding: 44px; } }
.bm-band h2 { color: #fff; margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 34px); }
.bm-band p { margin: 0; color: #c4cec0; }
.bm-band__actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
.bm-band__more { color: #c4cec0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bm-band__more:hover { color: #fff; }

/* The free maker → a Grundee tournament (maker.html: the hero link, the organiser section; wizard.html: the upsell) */
.bm-hero__org {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 22px;
    padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; box-shadow: var(--shadow);
    transition: transform 160ms ease;
}
.bm-hero__org:hover { color: var(--ink); transform: translateY(-1px); }
.bm-hero__org-tag { padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.bm-hero__org i { color: var(--accent-text); }
.bm-organise { padding: 34px 22px; border-radius: var(--radius); background: var(--stage); border: 1px solid #cfe5b4; }
@media (min-width: 768px) { .bm-organise { padding: 44px; } }
.bm-organise__head { max-width: 760px; }
.bm-organise__kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.bm-organise__head p { color: var(--soft); font-size: 17px; margin: 0; }
.bm-organise__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); margin: 26px 0 0; padding: 0; list-style: none; }
.bm-organise__grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 20px; }
.bm-organise__grid h3 { font-size: 18px; margin: 12px 0 6px; }
.bm-organise__grid p { margin: 0; color: var(--soft); font-size: 15px; }
.bm-organise__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 18px; }
.bm-organise__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.bm-organise__note { margin: 0; color: var(--soft); font-size: 15px; }
@media (max-width: 575px) { .bm-organise__foot .bm-btn { width: 100%; } }
.bm-upsell {
    display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 14px 16px; border-radius: var(--radius-s);
    background: var(--stage); border: 1px solid #cfe5b4; color: var(--ink); text-decoration: none;
    transition: box-shadow 160ms ease;
}
.bm-upsell:hover { color: var(--ink); box-shadow: var(--shadow); }
.bm-upsell__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.bm-upsell__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bm-upsell__text span { color: var(--soft); font-size: 14.5px; }
.bm-upsell__go { flex: none; margin-left: auto; color: var(--accent-text); }

.bm-empty { text-align: center; padding: 48px 20px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }
.bm-sport-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.bm-sport-chips a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--soft); text-decoration: none; font-weight: 600; font-size: 14px; }
.bm-sport-chips a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Embed */
.bm-embed { margin: 0; padding: 12px; background: var(--paper); }
.bm-embed .bm-scroller { max-height: none; }
.bm-embed__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.bm-embed__head h1 { font-size: 20px; margin: 0; }
.bm-embed__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.bm-embed__foot a { color: var(--accent-text); font-weight: 600; }
.bm-made-with { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.bm-made-with img { height: 18px; width: auto; }

@media (prefers-reduced-motion: reduce) {
    .bm-page *, .bm-page *::before, .bm-page *::after { transition: none !important; animation: none !important; }
}

[x-cloak] { display: none !important; }

/* Grundee tournaments (phase 2): the in-app wizard's header, linked entrants, the link dialog */
.bm-page--app { padding-top: 24px; }
.bm-app-head { margin-bottom: 18px; }
.bm-app-head h1 { margin: 8px 0 4px; font-size: clamp(26px, 4vw, 34px); }
.bm-entrant__linked { color: var(--accent-text); font-size: 14px; padding: 0 4px; }
.bm-grundee-pick { padding: 14px; border-radius: var(--radius-s); background: var(--stage); }
.bm-grundee-pick .bm-select { background-color: var(--surface); }
.bm-link-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bm-link-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fbfcfa; }
.bm-link-row__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 10px; margin: 0; }
.bm-link-row__pair { display: grid; gap: 8px; }
.bm-link-row__name { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .bm-link-row__item { grid-template-columns: 1fr; gap: 4px; }
}

/* An entrant picked from Grundee: green, with a tick (white on the dark green #3d7a00, which passes AA) */
.bm-page .bm-input.is-linked {
    border-color: var(--accent); background-color: #f4faec; padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%233d7a00'/%3E%3Cpath d='M4.6 8.3l2.1 2.1 4.7-4.8' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.bm-linked-legend { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--soft); }
.bm-linked-legend__mark {
    width: 16px; height: 16px; flex: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%233d7a00'/%3E%3Cpath d='M4.6 8.3l2.1 2.1 4.7-4.8' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.bm-grundee-pick .bm-label { display: flex; align-items: center; gap: 8px; }
.bm-grundee-pick .bm-label i { color: var(--accent-text); }
/* The app's bottom menu (phones) is fixed over the page: the wizard's Back/Next bar sits just above it */
@media (max-width: 991.98px) {
    body:has(> .mobile-bottom-nav) .bm-wizard__foot { bottom: calc(75px + env(safe-area-inset-bottom)); }
}

/* A Grundee tournament's header: who runs it, and the signed-in player's own entrant */
.bm-meta li.bm-meta__organiser { background: var(--stage); border-color: #cfe6b4; color: var(--ink); font-weight: 600; }
.bm-meta li.bm-meta__mine { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.bm-meta li.bm-meta__mine i { color: #a3e05f; }
.bm-chip--linked { display: inline-flex; align-items: center; gap: 6px; background: var(--stage); color: var(--accent-text); font-weight: 600; }
.bm-chip--rating { display: inline-flex; align-items: center; gap: 6px; background: var(--field); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-chip--suggested { background: #fff4d6; color: #7a4b00; font-size: 12px; font-weight: 600; padding: 2px 8px; }
.bm-link-bar { padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.bm-link-bar p { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.bm-link-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; padding: 0 12px 6px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
}
.bm-link-row { background: var(--surface); }
.bm-page .bm-select.is-linked { border-color: var(--accent); background-color: #f4faec; }
@media (max-width: 575.98px) { .bm-link-head { display: none; } }
/* One choice out of a few, each with a line of explanation (who can see a Grundee tournament) */
.bm-choices { display: grid; gap: 8px; }
.bm-choice {
    display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
    border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); cursor: pointer;
}
.bm-choice i { color: var(--muted); margin-top: 3px; width: 18px; text-align: center; }
.bm-choice strong { display: block; font-weight: 650; }
.bm-choice span span { display: block; font-size: 14px; color: var(--soft); }
.bm-choice:hover { border-color: var(--accent); }
.bm-choice[aria-checked="true"] { border-color: var(--accent); background: var(--stage); box-shadow: 0 0 0 3px rgba(84, 163, 0, 0.16); }
.bm-choice[aria-checked="true"] i { color: var(--accent-text); }
.bm-benefits { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.bm-benefits li { display: flex; gap: 10px; align-items: baseline; }
.bm-benefits i { color: var(--accent-text); }
.bm-summary-org {
    display: flex; flex-wrap: wrap; gap: 8px 22px; margin: -8px 0 18px; padding: 12px 14px; border-radius: 14px;
    background: var(--stage); color: var(--ink); font-size: 15px;
}
.bm-summary-org > span { display: inline-flex; align-items: baseline; gap: 8px; }
.bm-summary-org i { color: var(--accent-text); }

/* A Grundee tournament taking sign-ups (signup.html), signing up (register.html), the partner's page (partner.html) */
.bm-signup { display: grid; gap: 18px; }
.bm-signup .bm-head { margin-bottom: 0; }
.bm-signup__state {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}
.bm-signup__state.is-closed { background: var(--field); color: var(--soft); }
.bm-facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.bm-fact { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.bm-fact__label { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.bm-fact strong { font-size: 20px; font-weight: 700; }
.bm-fact__sub { font-size: 14px; color: var(--soft); }
/* How full the tournament is (signup.html) */
.bm-bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bm-bar span { display: block; height: 100%; min-width: 6px; border-radius: inherit; background: var(--accent); }
.bm-reg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bm-reg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fbfcfa; }
.bm-reg__main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.bm-reg__main strong { overflow-wrap: anywhere; }
.bm-reg__next { flex: 1 0 100%; margin: 0; color: var(--soft); font-size: 15px; }
.bm-reg__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bm-reg__actions form { margin: 0; }
.bm-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--field); color: var(--soft); }
.bm-status--confirmed { background: var(--stage); color: var(--accent-text); }
.bm-status--pending, .bm-status--payment, .bm-status--partner { background: #fff4d6; color: #7a4b00; }
.bm-status--waitlist { background: #e8eef9; color: #2c4a7a; }
.bm-status--rejected, .bm-status--expired, .bm-status--withdrawn { background: #fbecea; color: var(--danger); }
.bm-signup-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 22px 24px;
    border-radius: var(--radius); background: var(--ink); color: #fff;
}
.bm-signup-cta h2 { color: #fff; font-size: 22px; margin: 0 0 4px; }
.bm-signup-cta p { margin: 0; color: #d6ddd6; }
.bm-in-list { margin: 8px 0 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; }
.bm-in-list li { padding: 3px 0; break-inside: avoid; }
.bm-organiser { display: grid; gap: 14px; margin-top: 8px; padding-top: 18px; border-top: 2px dashed var(--line); }
.bm-organiser__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.bm-organiser__head h2 { margin: 0; font-size: 24px; display: flex; gap: 10px; align-items: center; }
.bm-organiser__head h2 i, .bm-organiser h3 i { color: var(--accent-text); }
.bm-organiser h3 { font-size: 18px; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.bm-entries .bm-add-row { margin-top: 12px; }
.bm-ended summary { cursor: pointer; font-weight: 600; color: var(--soft); }
.bm-ended .bm-reg-list { margin-top: 12px; }
.bm-confirm-inline { display: inline-block; }
.bm-confirm-inline > summary { list-style: none; cursor: pointer; }
.bm-confirm-inline > summary::-webkit-details-marker { display: none; }
.bm-confirm-inline[open] > summary { opacity: 0.6; }
.bm-confirm-inline form { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--paper); border: 1px solid var(--line); max-width: 420px; }
.bm-confirm-inline form p { margin: 0 0 10px; font-size: 15px; }
.bm-link-btn--danger { color: var(--danger); }
/* Co-organisers (partials/co_organisers_card.html): who helps run it, and the invitations still open */
.bm-organisers { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.bm-organisers__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.bm-organisers__item.is-pending { border-style: dashed; }
.bm-organisers__item form { margin-left: auto; flex: none; }
.bm-organisers__who { display: grid; min-width: 0; }
.bm-organisers__who strong, .bm-organisers__who span { overflow-wrap: anywhere; }
.bm-organisers__who span { font-size: 14px; color: var(--soft); }
.bm-organisers__invite { display: flex; gap: 8px; margin-top: 8px; }
.bm-organisers__invite .bm-input { flex: 1; min-width: 0; }
.bm-narrow { max-width: 760px; }
.bm-form-title { font-size: clamp(28px, 4vw, 38px); margin: 12px 0 6px; }
.bm-form fieldset { border: 0; padding: 0; margin: 0; }
.bm-form legend { font-size: 17px; margin-bottom: 10px; }
.bm-choice--radio { cursor: pointer; align-items: center; }
.bm-choice--radio input { accent-color: var(--accent-text); width: 18px; height: 18px; margin: 0; flex: none; }
.bm-choice--radio:has(input:checked) { border-color: var(--accent); background: var(--stage); box-shadow: 0 0 0 3px rgba(84, 163, 0, 0.16); }
.bm-choice--radio:has(input:checked) i { color: var(--accent-text); }
.bm-new-player { margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--paper); }
.bm-seg label.bm-seg__btn { cursor: pointer; margin: 0; }

/* The sign-up page's head: the sport's picture by the title; top right the sharing and the organiser's draw */
.bm-head__main { display: flex; align-items: flex-start; gap: 18px; min-width: 0; flex: 1 1 480px; }
.bm-head__text { min-width: 0; flex: 1; }
.bm-head__side { display: grid; justify-items: end; gap: 14px; }
.bm-sport-art {
    flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--accent-text); font-size: 26px;
}
.bm-sport-art img { width: 80%; height: 80%; object-fit: contain; }
.bm-sport-art--lg { width: 104px; height: 104px; border-radius: 26px; font-size: 40px; }
.bm-draw-cta { display: grid; justify-items: end; gap: 6px; text-align: right; }
.bm-draw-cta__hint { margin: 0; font-size: 14px; font-weight: 500; color: var(--soft); }
.bm-draw-note { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-s); background: #fff4d6; color: #7a4b00; font-size: 15px; }
.bm-description-edit { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 15px; }
@media (max-width: 575.98px) {
    .bm-head__main { gap: 14px; }
    .bm-sport-art--lg { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }
    .bm-head__side { justify-items: stretch; width: 100%; }
    .bm-draw-cta { justify-items: stretch; text-align: left; }
}

/* Rich text written by the organiser (the description; core.html.clean_html) and its editor (Quill) */
.bm-rich { white-space: normal; }
.bm-rich p { margin: 0 0 8px; }
.bm-rich > :last-child { margin-bottom: 0; }
.bm-rich ul, .bm-rich ol { margin: 0 0 8px; padding-left: 22px; }
.bm-rich a { color: var(--accent-text); font-weight: 600; }
.bm-rich li[data-list="bullet"] { list-style-type: disc; }  /* Quill 2 keeps every list in an <ol> */
.bm-rich .ql-ui { display: none; }
.bm-rich-editor .ql-toolbar.ql-snow { border: 1px solid var(--line); border-radius: var(--radius-s) var(--radius-s) 0 0; font-family: inherit; }
.bm-rich-editor .ql-container.ql-snow { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-s) var(--radius-s); font-family: inherit; font-size: 16px; }
.bm-rich-editor .ql-editor { min-height: 180px; }
.bm-rich-editor .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }

/* What someone signs up for (partials/signup_summary.html) and the sign-up form's pictures */
.bm-summary-card { display: grid; gap: 16px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.bm-summary-card__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bm-summary-card__title { min-width: 0; }
.bm-summary-card__org { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--soft); }
.bm-summary-card__org i { color: var(--accent-text); }
.bm-summary-card h2 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.bm-summary-card h2 a { color: inherit; text-decoration: none; }
.bm-summary-card h2 a:hover { color: var(--accent-text); }
.bm-keyfacts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); margin: 0; }
.bm-keyfacts > div { padding: 10px 12px; border-radius: var(--radius-s); background: var(--paper); }
.bm-keyfacts dt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.bm-keyfacts dt i { color: var(--accent-text); }
.bm-keyfacts dd { margin: 2px 0 0; font-size: 16px; font-weight: 650; color: var(--ink); }
.bm-keyfacts dd span { display: block; font-size: 13px; font-weight: 500; color: var(--soft); }
.bm-summary-card__about { margin: 0; max-width: none; }
.bm-summary-card__note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--soft); }
.bm-summary-card__note i { color: var(--accent-text); }
.bm-choice--pic { align-items: center; }
.bm-choice__pic { flex: none; display: inline-flex; width: 40px; height: 40px; }
.bm-choice__pic--new { align-items: center; justify-content: center; border-radius: 50%; background: var(--field); }
.bm-choice.bm-choice--pic .bm-choice__pic i { width: auto; margin: 0; color: var(--accent-ink); }  /* dark on the green badge */
.bm-choice.bm-choice--pic .bm-choice__pic--new i { color: var(--soft); }
.bm-choice__warn { font-style: normal; font-weight: 600; color: var(--warn); }
.bm-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* The countdown to the sign-up's close (js/tournaments/signup.js) */
.bm-countdown { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0; font-variant-numeric: tabular-nums; }
.bm-countdown > span { display: grid; justify-items: center; min-width: 48px; padding: 6px 6px 4px; border-radius: 10px; background: var(--stage); }
.bm-countdown > span[hidden] { display: none; }
.bm-countdown b { font-size: 22px; line-height: 1.1; font-weight: 700; color: var(--accent-text); }
.bm-countdown small { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.bm-countdown.is-soon > span { background: #fff4d6; }
.bm-countdown.is-soon b { color: #7a4b00; }
.bm-countdown.is-urgent > span { background: #fbecea; }
.bm-countdown.is-urgent b { color: var(--danger); }

/* The in-app wizard's "They sign up" settings */
.bm-choices--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.bm-signup-setup { margin: 0 0 18px; padding: 16px 18px 6px; border-radius: var(--radius-s); background: #fbfcfa; border: 1px solid var(--line); }
.bm-fee { display: flex; gap: 8px; }
.bm-fee .bm-input { flex: 1; min-width: 0; }
.bm-fee .bm-select { width: auto; flex: none; }
.bm-check { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-weight: 500; cursor: pointer; }
.bm-check input { accent-color: var(--accent-text); width: 18px; height: 18px; }
.bm-check.is-off { color: var(--muted); cursor: not-allowed; }
.bm-seg__btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* The Schedule tab (partials/schedule.html): courts, timing, the order of play board */
.bm-schedule { display: grid; gap: 16px; }
.bm-schedule.is-busy { opacity: 0.6; pointer-events: none; }
.bm-court { padding: 14px 16px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fbfcfa; }
.bm-court__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bm-court__head strong { margin-right: 8px; }
.bm-court__blocks { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.bm-court__blocks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bm-court__blocks li > span:first-child { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.bm-court__name { display: grid; gap: 2px; min-width: 0; }
.bm-court__more summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
.bm-court__more summary::-webkit-details-marker { display: none; }
.bm-court__more[open] summary { margin-bottom: 10px; }
.bm-court__add { display: grid; gap: 10px; justify-items: start; }

/* A day and a from-until time on the wheel pickers (partials/when.html) */
.bm-when { display: grid; gap: 10px; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr); width: 100%; max-width: 760px; }
.bm-when .bm-label { font-size: 13px; margin-bottom: 4px; color: var(--soft); }
.bm-when .gw-group--time { min-width: 0; }
@media (max-width: 575.98px) {
    .bm-when { grid-template-columns: 1fr 1fr; }
    .bm-when__part--day { grid-column: 1 / -1; }
}

/* "Add courts": at a venue on Grundee, or somewhere else */
.bm-court-new .bm-seg { margin-bottom: 14px; flex-wrap: wrap; }
.bm-book { display: grid; gap: 12px; }
.bm-venues { display: grid; gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; }
.bm-venue {
    display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 12px; border-radius: var(--radius-s);
    border: 1px solid var(--line); background: var(--surface);
}
.bm-venue__img {
    grid-row: span 2; width: 64px; height: 64px; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
    background: var(--stage); color: var(--accent-text); font-size: 22px;
}
.bm-venue__img img { width: 100%; height: 100%; object-fit: cover; }
.bm-venue__body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.bm-venue__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex-basis: 100%; }
.bm-venue__where, .bm-venue__price { color: var(--muted); font-size: 14px; }
.bm-venue__price { font-weight: 600; color: var(--soft); }
.bm-venue__link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.bm-venue__fields { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-field-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; margin: 0; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--line); background: #fbfcfa; font-size: 14px; font-weight: 600;
}
.bm-field-chip small { color: var(--muted); font-weight: 500; }
.bm-field-chip input { width: 16px; height: 16px; accent-color: #3d7a00; }
.bm-field-chip:has(input:checked) { border-color: var(--accent); background: var(--stage); }
.bm-field-chip.is-taken { cursor: default; opacity: 0.6; }
.bm-book__bar {
    position: sticky; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 0 2px; background: var(--surface);
}
.bm-court-other { display: grid; gap: 4px; }
.bm-addresses { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.bm-address {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin: 0; border-radius: var(--radius-s); cursor: pointer;
    border: 1.5px solid var(--line); background: var(--surface); font: inherit; text-align: left; color: var(--ink);
}
.bm-address > span { display: grid; min-width: 0; }
.bm-address > span > span { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.bm-address input { margin-top: 4px; accent-color: #3d7a00; }
.bm-address:has(input:checked) { border-color: var(--accent); background: var(--stage); }
.bm-address--new { border-style: dashed; }
.bm-address--new i { margin-top: 4px; color: var(--accent-text); }
.bm-court-new { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.bm-court-new h3 { font-size: 17px; margin: 0 0 10px; }
.bm-status--block-booked { background: var(--stage); color: var(--accent-text); }
.bm-status--block-requested { background: #fff4d6; color: #7a4b00; }
.bm-status--block-declined { background: #fbecea; color: var(--danger); }
.bm-plan__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bm-plan__head p { color: var(--soft); max-width: 640px; }
.bm-warning { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-s); background: #fff4d6; color: #7a4b00; }
.bm-oop__day { font-size: 17px; margin: 20px 0 10px; }
.bm-oop { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.bm-oop__court h4 { font-size: 15px; margin: 0 0 6px; }
.bm-oop__block { padding: 8px; border-radius: var(--radius-s); background: var(--paper); border: 1px solid var(--line); margin-bottom: 8px; }
.bm-oop__block.is-off { opacity: 0.55; }
.bm-oop__time { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 2px; }
.bm-oop__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 44px; }
.bm-oop__list--unplanned { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); padding: 8px; border: 2px dashed var(--line); border-radius: var(--radius-s); }
.bm-oop__card { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); cursor: grab; touch-action: none; }
.bm-oop__card.sortable-ghost { opacity: 0.35; }
.bm-oop__card.is-clash { border-color: #e7b450; background: #fffaf0; }
.bm-oop__card.is-done { opacity: 0.7; }
.bm-oop__top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.bm-oop__at { font-size: 15px; font-variant-numeric: tabular-nums; }
.bm-oop__pin { margin-left: auto; color: var(--muted); font-size: 12px; }
.bm-oop__names { font-weight: 600; overflow-wrap: anywhere; }
.bm-oop__score { font-size: 13px; color: var(--accent-text); font-weight: 600; }
.bm-oop__clash { font-size: 12px; font-weight: 700; color: #7a4b00; display: inline-flex; gap: 4px; align-items: center; }
.bm-oop-public__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bm-oop-public__list li { display: grid; grid-template-columns: 56px minmax(80px, 140px) 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.bm-oop-public__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-oop-public__court { color: var(--soft); }
@media (max-width: 575.98px) {
    .bm-oop-public__list li { grid-template-columns: 52px 1fr; }
    .bm-oop-public__match { grid-column: 1 / -1; }
}

/* Reported scores (2d): My matches, the organisers' list on the Matches tab */
.bm-reports { margin-bottom: 16px; }
.bm-reports h2 { margin-bottom: 10px; }
.bm-reg__next[data-report-status="disputed"] { color: var(--danger); }


/* ---------- Pictures in lists: organisers, players, teams ---------- */
.bm-ava {
    flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    background: var(--stage); color: var(--accent-text); font-weight: 700; font-size: 14px;
}
.bm-ava img { width: 100%; height: 100%; object-fit: cover; }
.bm-ava--venue, .bm-ava--club { border-radius: 12px; }
.bm-dd__text { display: grid; min-width: 0; text-align: left; line-height: 1.25; }
.bm-dd__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.bm-dd__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13.5px; }

/* "Organised by": a list with pictures instead of a plain select */
.bm-dd__anchor { position: relative; }
.bm-dd__btn {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; padding: 8px 14px 8px 9px; font: inherit;
    border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); cursor: pointer;
}
.bm-dd__btn:hover, .bm-dd__btn[aria-expanded="true"] { border-color: var(--accent); }
.bm-dd__item { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.bm-dd__chev { margin-left: auto; color: var(--muted); transition: transform 140ms ease; }
.bm-dd__btn[aria-expanded="true"] .bm-dd__chev { transform: rotate(180deg); }
.bm-dd__list {
    /* In the page's flow, not floating: the wizard card clips what sticks out of it */
    margin-top: 6px; display: grid; gap: 2px; padding: 6px;
    max-height: 340px; overflow-y: auto; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 18px 40px -16px rgba(23, 33, 26, 0.35);
}
.bm-dd__opt {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; font: inherit;
    background: none; color: var(--ink); cursor: pointer; text-align: left;
}
.bm-dd__opt:hover, .bm-dd__opt:focus-visible { background: #f3f6ef; }
.bm-dd__opt[aria-pressed="true"] { background: var(--stage); }
.bm-dd__tick { margin-left: auto; color: var(--accent-text); }

/* "Add your players": search, a list with pictures, add all */
.bm-pick__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bm-pick__search { margin-bottom: 8px; background-color: var(--surface); }
.bm-pick__list {
    list-style: none; margin: 0 0 8px; padding: 4px; display: grid; gap: 2px; max-height: 288px; overflow-y: auto;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
}
.bm-pick__opt {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 9px; font: inherit;
    background: none; color: var(--ink); cursor: pointer; text-align: left;
}
.bm-pick__opt:hover, .bm-pick__opt:focus-visible { background: #f3f6ef; }
.bm-pick__opt .bm-ava { width: 34px; height: 34px; font-size: 12.5px; }
.bm-pick__plus {
    margin-left: auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--stage); color: var(--accent-text); font-size: 13px;
}
.bm-pick__opt:hover .bm-pick__plus { background: var(--accent); color: var(--accent-ink); }
.bm-pick__none { padding: 10px; }

/* "+4 +8 +16 +32": numbered places */
.bm-quick-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.bm-chip-btn {
    min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
    color: var(--ink); font: inherit; font-weight: 650; cursor: pointer;
}
.bm-chip-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.bm-quick-add__custom { display: inline-flex; align-items: center; gap: 6px; }
.bm-quick-add__custom .bm-input { width: 76px; min-height: 36px; padding: 4px 10px; }

/* The scroll-wheel picker in a form (static/css/components/wheel-picker.css) */
.bm-wheel { display: grid; gap: 8px; margin-top: 10px; }

/* While a part of the page is fetched again (BM.swap) */
.is-swapping { position: relative; opacity: 0.55; pointer-events: none; transition: opacity 120ms ease; }
.is-swapping::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
    border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: bm-spin 0.7s linear infinite;
}
@keyframes bm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-swapping::after { animation-duration: 2s; } }
.bm-wheel .gw-picker { max-width: 640px; }
.bm-modal__where { display: flex; gap: 8px; margin: 8px 0 0; font-size: 14px; color: var(--soft); }
.bm-modal__where i { color: var(--accent-text); margin-top: 3px; }
.bm-retired { color: var(--muted); font-size: 0.85em; }

/* The matches list: pictures, sets, a winner-only result, the viewer's own matches */
.bm-mini-ava {
    flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
    background: var(--stage); color: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
.bm-mini-ava img { width: 100%; height: 100%; object-fit: cover; }
.bm-mrow__result--sets { display: inline-flex; gap: 4px; padding: 3px 6px; }
.bm-set { display: inline-flex; align-items: baseline; gap: 1px; padding: 0 5px; color: var(--soft); font-weight: 600; }
.bm-set + .bm-set { border-left: 1px solid #d6ddd0; }
.bm-set .is-won { color: var(--ink); font-weight: 750; }
.bm-set sup { font-size: 0.68em; top: -0.55em; margin-left: 1px; font-weight: 600; color: var(--muted); }
.bm-set__dash { color: var(--muted); font-weight: 500; padding: 0 1px; }
.bm-mrow__result--winner { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent-text); background: var(--stage); }
.bm-mrow.is-mine { border-color: #cfe5b4; box-shadow: inset 3px 0 0 var(--accent); }
/* The match a link points at (#match-<code>: the calendar): lit up for a moment */
.bm-mrow.is-target { animation: bm-target 2.4s ease-out 1; scroll-margin: 96px; }
@keyframes bm-target { 0%, 40% { background: var(--stage, #e9f5db); box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .bm-mrow.is-target { animation: none; box-shadow: 0 0 0 3px var(--accent); } }
.bm-chip--mine { background: var(--stage); color: var(--accent-text); }
.bm-mrow__mine {
    grid-column: 2 / -1; order: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px;
    padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--line);
}
.bm-mrow__report { font-size: 14px; color: var(--soft); }
.bm-mrow__report[data-report-status="disputed"] { color: var(--danger); }
.bm-matches__mine-hint { margin: 10px 0 16px; }
@media (max-width: 575px) {
    .bm-mrow__side--a { justify-content: flex-start; }
    .bm-mrow__side--a .bm-mini-ava { order: -1; }
    .bm-mrow__mine { grid-area: m; justify-content: flex-start; }
    .bm-mrow__result--sets { flex-direction: column; gap: 2px; }
    .bm-set + .bm-set { border-left: 0; }
}

/* Where a Grundee tournament is played (partials/place_picker.html, place_card.html, place_meta.html) */
.bm-place { display: grid; gap: 12px; }
.bm-seg--place { justify-self: start; }
.bm-place__results { margin-top: 8px; }
.bm-place__chosen {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-s);
    background: var(--stage); border: 1px solid #cfe5b4;
}
.bm-place__chosen .bm-link-btn { margin-left: auto; flex: none; }
.bm-place__address { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 576px) { .bm-place__address { grid-template-columns: minmax(0, 1fr) 160px; } }
.bm-place__address .bm-field, .bm-place .bm-field { margin-bottom: 0; }
.bm-place__now { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.bm-place__now i, .bm-meta__place i { color: var(--accent-text); }
.bm-meta__place a { color: inherit; text-decoration: underline; text-decoration-color: rgba(23, 33, 26, 0.3); text-underline-offset: 3px; }
.bm-meta__place a:hover { color: var(--accent-text); }

/* A Grundee tournament's payments page (payments.html) and invitations (signup.html, wizard.html) */
.bm-money { padding-bottom: 32px; }
.bm-money__totals { margin-top: 8px; }
.bm-fact--warn strong { color: var(--warn); }
.bm-money__grid { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 992px) { .bm-money__grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.bm-money__main, .bm-money__side { display: grid; gap: 18px; min-width: 0; }
.bm-money h2 { font-size: 20px; margin: 0 0 6px; }
.bm-money__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.bm-money__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--paper); }
.bm-money__list .bm-check { margin: 0; flex: 1 1 200px; min-width: 0; }
.bm-money__amount { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bm-money__warn { border-color: #f3d19c; }
.bm-money__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bm-money__table th { font-size: 13px; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.bm-money__table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bm-money__table td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.bm-money__state--paid_online, .bm-money__state--paid_on_site { background: var(--stage); color: var(--accent-text); }
.bm-money__state--paying_online, .bm-money__state--on_site { background: #fff4d6; color: #7a4b00; }
.bm-money__state--give_back { background: #fdecea; color: var(--danger); }
.bm-money__state--refunded, .bm-money__state--cancelled { background: var(--field); color: var(--muted); }
.bm-fee__currency { display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-s); background: var(--field); font-weight: 600; }
.bm-invite-pick__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.bm-invite-pick__list .bm-check { margin: 0; }
.bm-answer { display: grid; gap: 10px; margin-top: 8px; }
.bm-answer__pay { border: 0; padding: 0; margin: 0; }
.bm-status--invited { background: #e8eef9; color: #2c4a7a; }
.bm-todo { margin-bottom: 18px; }
.bm-todo h2 { font-size: 20px; margin: 0; display: flex; gap: 10px; align-items: center; }
.bm-todo h2 i { color: var(--accent-text); }
.bm-todo__text { min-width: 0; flex: 1 1 260px; }

/* Open for sign-up on the Tournaments page (mine.html) */
.bm-open { margin-bottom: 34px; }
.bm-open h2, .bm-section-title { font-size: 22px; margin: 0 0 6px; display: flex; gap: 10px; align-items: center; }
.bm-open h2 i { color: var(--accent-text); }
.bm-open .bm-sport-chips { margin: 14px 0 16px; }
.bm-section-title { margin-bottom: 14px; }

/* How a rated match moved each side's rating (partials/match_row.html, ratings/): a pill next to its name */
.bm-mrow__elo { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--field); font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.bm-mrow__elo.is-up { background: var(--stage); color: var(--accent-text); }
.bm-mrow__elo.is-down { background: #fde8e6; color: var(--danger); }

/* ---------- Final standings (partials/standings.html): the podium, then every place ---------- */
.bm-results { margin: 0 0 28px; padding: 22px 22px 8px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.bm-results__title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.bm-results__title .fa-ranking-star { color: #c99400; }

/* Gold in the middle and highest, silver left, bronze right; in the page's order for screen readers */
.bm-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "silver gold bronze"; align-items: end; gap: 12px; max-width: 720px; margin: 0 auto 22px; padding: 0; list-style: none; }
.bm-podium__place { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bm-podium__place--gold { grid-area: gold; --medal: #f2b705; --medal-ink: #3b2a00; --medal-step: linear-gradient(180deg, #ffe58a, #f2b705); --step-h: 118px; }
.bm-podium__place--silver { grid-area: silver; --medal: #a7b0b8; --medal-ink: #1f262c; --medal-step: linear-gradient(180deg, #eef1f4, #b5bec6); --step-h: 86px; }
.bm-podium__place--bronze { grid-area: bronze; --medal: #c77b30; --medal-ink: #2e1700; --medal-step: linear-gradient(180deg, #f3c69a, #cd8540); --step-h: 64px; }
.bm-podium__people { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin-bottom: 10px; }
.bm-podium__entrant { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 180px; text-align: center; }
.bm-podium__name { margin-top: 6px; font-weight: 800; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.bm-podium__members { font-size: 12.5px; color: var(--muted); }
.bm-podium__crown { position: absolute; top: -18px; color: #f2b705; font-size: 20px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)); }
.bm-podium__step { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; width: 100%; height: var(--step-h); padding-top: 12px; border-radius: 14px 14px 4px 4px; background: var(--medal-step); color: var(--medal-ink); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.06); }
.bm-podium__step .fa-medal { font-size: 22px; }
.bm-podium__rank { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }

/* Pictures: a photo or badge, else initials (a team's on a shield) */
.bm-pic { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 64px; height: 64px; overflow: hidden; border: 3px solid var(--medal, var(--line)); border-radius: 50%; background: var(--stage); font-weight: 800; font-size: 20px; color: var(--accent-text); }
.bm-pic img { width: 100%; height: 100%; object-fit: cover; }
.bm-pic--team { border-radius: 16px; }
.bm-pic--team .fa-shield-halved { position: absolute; font-size: 40px; color: rgba(61, 122, 0, 0.18); }
.bm-pic__initials { position: relative; }
.bm-podium__place--gold .bm-pic { width: 84px; height: 84px; font-size: 26px; box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.25); }
.bm-pic--sm { width: 32px; height: 32px; border-width: 2px; font-size: 12px; }
.bm-pic--sm.bm-pic--team { border-radius: 9px; }

.bm-results__table th.bm-table__name { text-align: left; }
.bm-results__who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.bm-results__names { display: flex; flex-direction: column; min-width: 0; white-space: normal; }
.bm-results__members { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.bm-results__reached { text-align: left !important; color: var(--soft); }
.bm-results__reached-sm { display: none; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.bm-results__rank { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; font-weight: 800; }
.bm-results__rank--gold { background: #f2b705; color: #3b2a00; }
.bm-results__rank--silver { background: #c9d0d6; color: #1f262c; }
.bm-results__rank--bronze { background: #d99055; color: #2e1700; }
.bm-results__table tr.is-gold .bm-pic { border-color: #f2b705; }
.bm-results__table tr.is-silver .bm-pic { border-color: #b5bec6; }
.bm-results__table tr.is-bronze .bm-pic { border-color: #cd8540; }

@media (max-width: 575px) {
    .bm-results { padding: 16px 12px 4px; }
    .bm-podium { gap: 6px; }
    .bm-pic { width: 48px; height: 48px; font-size: 16px; }
    .bm-podium__place--gold .bm-pic { width: 60px; height: 60px; font-size: 20px; }
    .bm-podium__name { font-size: 14px; }
    .bm-podium__rank { font-size: 11px; }
    .bm-results__reached-sm { display: block; }
}
