/* ==========================================================================
   User pages — the modern skin (Oct 2026)
   --------------------------------------------------------------------------
   user/attendance.php, badges.php, messages.php, wrapped.php, fanmap.php,
   security.php, data-export.php and the sign-in family (login, register,
   reset-password, resend-verification, verify, two-factor).

   THE standard is My Benfica (owner, 5 Oct 2026): every page carries
   .benfica-layout.mb-modern and links mybenfica-modern.css FIRST, so the
   cards (.mb-box), rows (.mb-row), pills (.mb-pill), switches (.mb-seg),
   chips (.mb-chip), icon tiles (.mb-ico), tiles (.mb-tile) and empty states
   (.mb-empty) are My Benfica's own classes and values. This file only adds
   what My Benfica has no class for. Every selector starts at .up-page (the
   layout) or .uph (the hero); the --mb-* tokens come from .mb-modern.
   Colours are theme tokens (literals only as var() fallbacks and neutral
   black/white alphas). No box-shadow on buttons.

   Layers: A. hero  B. page frame + sidebar  C. shared bits (chips, crests,
           stats strip, stepper, rings)  D. sign-in family  E. security +
           data export  F. attendance  G. badges  H. messages  I. wrapped
           J. fan map  K. phones  L. reduced motion
   ========================================================================== */

/* ==========================================================================
   A. The hero (hero.php user-pages branch -> upHeroHtml()). Sizes come from
      the page-hero block at the end of style.css (.hero-pv2--page); these are
      the same values as the Friends / Notifications hero (.soch).
   ========================================================================== */
.uph.hero-pv2--page .pv2 { grid-template-columns: auto minmax(0, 1fr) minmax(0, 30rem); }
.uph.hero-pv2--page.uph--solo .pv2 { grid-template-columns: auto minmax(0, 1fr); }
.uph.hero-pv2--page .uph-badge { place-items: center; }
.uph.hero-pv2--page .uph-badge > i { opacity: 1; align-self: center; color: var(--theme-accent-on-primary, var(--theme-accent, #F4B223)); }
.uph.hero-pv2--page .uph-sub { margin: 0; max-width: 40rem; color: color-mix(in oklab, var(--theme-on-primary, #fff) 82%, transparent); }
.uph.hero-pv2--page .uph-panel { display: flex; flex-direction: column; gap: .55rem; }
.uph.hero-pv2--page .uph-side .pv2-stat { flex: 1 1 0; }
.uph.hero-pv2--page .uph-side .pv2-stat-label { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: none; line-height: 1.1; }
.uph.hero-pv2--page .pv2-stat-num small { font-size: .62em; font-weight: 800; opacity: .75; }
@media (max-width: 1199.98px) {
    .uph.hero-pv2--page .pv2 { grid-template-columns: auto minmax(0, 1fr); }
    .uph.hero-pv2--page .uph-side { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
    .uph.hero-pv2--page .uph-side .pv2-stat-label { font-size: .5rem !important; letter-spacing: .02em; }
}

/* ==========================================================================
   B. Page frame + sidebar (the #mbAside look for every page's own aside)
   ========================================================================== */
.benfica-layout.up-page .bn-main > .bn-section:first-child { margin-top: 0; }
.benfica-layout.up-page .up-flash { margin: 0 0 0; border-radius: var(--mb-radius-sm); font-size: .84rem; padding: .6rem .85rem; }
.benfica-layout.up-page .bn-main > .up-flash + .bn-section,
.benfica-layout.up-page .bn-main > #sb-top + .up-flash { margin-top: 1rem; }
.benfica-layout.up-page .up-flash-wrap { margin-top: 1rem; }
.benfica-layout.up-page .up-flash-wrap .up-notice { margin: 0; }
.benfica-layout.up-page .bn-main > .up-flash-wrap:first-child { margin-top: 0; }
.benfica-layout.up-page .bn-aside .bn-panel { padding-bottom: .75rem; }
.benfica-layout.up-page .bn-aside .mb-side-tiles {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem;
    margin: 0 0 .6rem; padding: 0; list-style: none;
}
.benfica-layout.up-page .bn-aside .mb-side-tiles:last-child { margin-bottom: 0; }
.benfica-layout.up-page .bn-aside .mb-side-tiles li {
    display: flex; flex-direction: column; gap: .1rem; min-width: 0;
    padding: .35rem .5rem; border-radius: .6rem; background: var(--mb-soft);
}
.benfica-layout.up-page .bn-aside .mb-side-tiles span { color: var(--mb-muted); font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; }
.benfica-layout.up-page .bn-aside .mb-side-tiles b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mb-ink); font-size: 1rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.benfica-layout.up-page .bn-aside .mb-side-tiles b small { color: var(--mb-muted); font-size: .68em; font-weight: 800; }
.benfica-layout.up-page .bn-aside .mb-side-tiles b.is-text { font-size: .78rem; line-height: 1.5; }
.benfica-layout.up-page .bn-aside .mb-side-note { margin: 0; color: var(--mb-muted); font-size: .78rem; line-height: 1.45; }
.benfica-layout.up-page .bn-aside .mb-side-note + .mb-side-note { margin-top: .5rem; }
.benfica-layout.up-page .bn-aside .mb-side-links { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .7rem; padding-top: .5rem; border-top: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); }
.benfica-layout.up-page .bn-aside .mb-side-links a { color: var(--mb-primary-ink); font-size: .74rem; font-weight: 800; text-decoration: none; }
.benfica-layout.up-page .bn-aside .mb-side-links a:hover { text-decoration: underline; }
.benfica-layout.up-page .bn-aside .bn-cta .bn-cta-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
.benfica-layout.up-page .bn-aside .bn-cta .bn-cta-links a {
    margin: 0; padding: .3rem .55rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: .72rem; box-shadow: none;
}
/* An explanation list in a side panel: icon | bold line over a muted one. */
.benfica-layout.up-page .up-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.benfica-layout.up-page .up-side-list li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); column-gap: .5rem; align-items: start; font-size: .76rem; line-height: 1.4; }
.benfica-layout.up-page .up-side-list li > i, .benfica-layout.up-page .up-side-list li > a > i { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: var(--mb-soft); color: var(--mb-primary-ink); font-size: .72rem; }
.benfica-layout.up-page .up-side-list b { display: block; color: var(--mb-ink); font-weight: 800; font-size: .78rem; }
.benfica-layout.up-page .up-side-list span { color: var(--mb-muted); }

/* ==========================================================================
   C. Shared bits
   ========================================================================== */
/* Status chips (On / Off / Pending / Ready...). */
.mb-modern .up-chip {
    display: inline-flex; align-items: center; gap: .3rem; flex: 0 0 auto;
    padding: .14rem .55rem; border-radius: 999px;
    background: var(--mb-soft); color: var(--mb-muted);
    font-size: .68rem; font-weight: 800; line-height: 1.3; white-space: nowrap;
}
.mb-modern .up-chip i { font-size: .85em; }
.mb-modern .up-chip--ok { background: rgba(var(--mb-ok-rgb), .14); color: var(--mb-ok-ink); }
.mb-modern .up-chip--warn { background: rgba(var(--mb-accent-rgb), .2); color: var(--mb-accent-ink); }
.mb-modern .up-chip--bad { background: rgba(var(--mb-bad-rgb), .12); color: var(--mb-bad-ink); }
.mb-modern .up-chip--info { background: rgba(var(--mb-info-rgb), .14); color: color-mix(in oklab, var(--mb-info) 60%, var(--mb-ink)); }
.mb-modern .up-chip--primary { background: rgba(var(--mb-primary-rgb), .1); color: var(--mb-primary-ink); }

/* Crests: bare, never on a disc. */
.mb-modern .up-crest { display: inline-block; flex: 0 0 auto; object-fit: contain; vertical-align: middle; }
.mb-modern .up-crest--none { display: inline-grid; place-items: center; color: var(--mb-muted); font-size: .8rem; opacity: .6; }

/* Green / red pills (save, confirm / remove) — flat, as the owner asked. */
.mb-modern .mb-pill.up-pill--go { background: var(--mb-ok); border-color: transparent; color: #fff; }
.mb-modern .mb-pill.up-pill--go:hover { background: color-mix(in oklab, var(--mb-ok) 88%, black); color: #fff; }
.mb-modern .mb-pill.up-pill--bad { background: transparent; border-color: rgba(var(--mb-bad-rgb), .45); color: var(--mb-bad-ink); }
.mb-modern .mb-pill.up-pill--bad:hover { background: rgba(var(--mb-bad-rgb), .1); color: var(--mb-bad-ink); }
.mb-modern .mb-pill.up-pill--bad-solid { background: var(--mb-bad); border-color: transparent; color: #fff; }
.mb-modern .mb-pill.up-pill--bad-solid:hover { background: color-mix(in oklab, var(--mb-bad) 88%, black); color: #fff; }
.mb-modern button.mb-pill { cursor: pointer; font-family: inherit; }
.mb-modern .mb-pill[disabled], .mb-modern .mb-pill[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.mb-modern .mb-pill--lg { padding: .45rem 1.1rem; font-size: .82rem; }

/* A stats strip: tiles of number over label inside one card (My Benfica side-tiles). */
.mb-modern .up-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .45rem; padding: .45rem 0; }
.mb-modern .up-stat { display: flex; align-items: center; gap: .55rem; min-width: 0; padding: .45rem .55rem; border-radius: .7rem; background: var(--mb-soft); }
.mb-modern .up-stat .mb-ico { width: 1.9rem; height: 1.9rem; font-size: .8rem; }
.mb-modern .up-stat-main { display: flex; flex-direction: column; min-width: 0; }
.mb-modern .up-stat-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.02rem; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mb-modern .up-stat-main b small { color: var(--mb-muted); font-size: .7em; font-weight: 800; }
.mb-modern .up-stat-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mb-muted); font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* A stepper: numbered dots on a rail, done / current / to come. */
.mb-modern .up-stepper { list-style: none; margin: 0; padding: .55rem 0 .4rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); counter-reset: upstep; }
.mb-modern .up-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; padding: 0 .25rem; text-align: center; counter-increment: upstep; }
.mb-modern .up-step::before {
    content: counter(upstep); position: relative; z-index: 1;
    display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    background: var(--mb-soft-2); color: var(--mb-muted); font-size: .74rem; font-weight: 900;
    box-shadow: 0 0 0 3px var(--mb-card-bg);
    transition: background-color .3s var(--mb-ease), color .3s ease;
}
.mb-modern .up-step::after {
    content: ""; position: absolute; top: .85rem; left: calc(50% + .85rem); right: calc(-50% + .85rem);
    height: 2px; border-radius: 2px; background: var(--mb-soft-2);
}
.mb-modern .up-step:last-child::after { display: none; }
.mb-modern .up-step > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; font-size: .72rem; font-weight: 800; color: var(--mb-muted); }
.mb-modern .up-step > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; color: var(--mb-muted); font-size: .62rem; }
.mb-modern .up-step.is-done::before { content: "\f00c"; font-family: "Font Awesome 7 Free", "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; background: var(--mb-ok); color: #fff; }
.mb-modern .up-step.is-done::after { background: var(--mb-ok); }
.mb-modern .up-step.is-done > b { color: var(--mb-ink); }
.mb-modern .up-step.is-current::before { background: var(--mb-primary); color: var(--mb-on); box-shadow: 0 0 0 3px var(--mb-card-bg), 0 0 0 5px rgba(var(--mb-primary-rgb), .25); }
.mb-modern .up-step.is-current > b { color: var(--mb-ink); }
.mb-modern .up-step.is-bad::before { content: "!"; background: var(--mb-bad); color: #fff; }
.mb-modern .up-step.is-busy::before { animation: upPulse 1.4s ease-in-out infinite; }
@keyframes upPulse { 50% { box-shadow: 0 0 0 3px var(--mb-card-bg), 0 0 0 7px rgba(var(--mb-primary-rgb), .18); } }

/* A progress ring (conic, from --up-pct). */
.mb-modern .up-ring {
    --up-ring-size: 2.9rem;
    position: relative; display: grid; place-items: center; flex: 0 0 auto;
    width: var(--up-ring-size); height: var(--up-ring-size); border-radius: 50%;
    background: conic-gradient(var(--up-ring-col, var(--mb-primary)) calc(var(--up-pct, 0) * 1%), var(--mb-soft-2) 0);
}
.mb-modern .up-ring > span {
    display: grid; place-items: center;
    width: calc(var(--up-ring-size) - .5rem); height: calc(var(--up-ring-size) - .5rem); border-radius: 50%;
    background: var(--mb-card-bg); color: var(--mb-ink);
    font-size: .8rem; line-height: 1;
}

/* Section-head picker: a rounded pill like the season picker. */
.mb-modern .up-pick {
    appearance: none; -webkit-appearance: none;
    max-width: 12rem; padding: .22rem 1.6rem .22rem .7rem;
    border: 1px solid color-mix(in oklab, var(--mb-line) 70%, transparent); border-radius: 999px;
    background: var(--mb-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23888' d='M0 0h10L5 6z'/%3E%3C/svg%3E") no-repeat right .6rem center / .5rem;
    color: var(--mb-ink); font-size: .74rem; font-weight: 800; line-height: 1.3; cursor: pointer;
}
.mb-modern .up-pick:focus-visible { outline: 2px solid var(--mb-primary); outline-offset: 1px; }

/* A card footer line (the dashed .mb-foot) with a note and pills. */
.mb-modern .up-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .45rem .6rem; padding: .5rem .1rem .45rem; border-top: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); }
.mb-modern .up-foot .mb-foot-note { flex: 1 1 12rem; min-width: 0; }
.mb-modern .up-foot-acts { display: inline-flex; flex-wrap: wrap; gap: .4rem; margin-left: auto; }

/* Forms inside the modern cards: the inputs the profile page uses. */
.mb-modern .up-form .form-control,
.mb-modern .up-form .form-select {
    min-height: 2.35rem; padding-top: .35rem; padding-bottom: .35rem;
    border-radius: .8rem; border-color: var(--theme-border-strong, var(--bs-border-color));
    background-color: var(--mb-card-bg); color: var(--mb-ink); font-size: .88rem;
}
.mb-modern .up-form textarea.form-control { min-height: 7rem; line-height: 1.5; }
.mb-modern .up-form .form-control:focus,
.mb-modern .up-form .form-select:focus { border-color: var(--mb-primary); box-shadow: var(--theme-focus-ring, 0 0 0 .2rem rgba(var(--mb-primary-rgb), .2)); }
.mb-modern .up-form .form-control:hover:not(:focus),
.mb-modern .up-form .form-select:hover:not(:focus) { border-color: color-mix(in oklab, var(--mb-primary) 35%, var(--theme-border-strong, var(--bs-border-color))); }
.mb-modern .up-form .form-check-input:checked { background-color: var(--mb-primary); border-color: var(--mb-primary); }
.mb-modern .up-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.mb-modern .up-field + .up-field { margin-top: .7rem; }
.mb-modern .up-field-label { display: flex; align-items: center; gap: .45rem; margin: 0; color: var(--mb-ink); font-size: .8rem; font-weight: 800; }
/* The site gold, as on the profile rows (owner, 6 Oct 2026), not the darker accent ink. */
.mb-modern .up-field-label > i { width: 1.1em; color: var(--theme-accent, var(--mb-accent)); text-align: center; font-size: .9em; }
.mb-modern .up-field .acc-row-help { display: block; color: var(--mb-muted); font-size: .72rem; line-height: 1.4; }
.mb-modern .up-field .acc-row-help.text-success { color: var(--mb-ok-ink) !important; }
.mb-modern .up-field .acc-row-help.text-danger { color: var(--mb-bad-ink) !important; }
.mb-modern .up-req { color: var(--mb-bad-ink); font-weight: 900; }
/* The password field with its eye inside the box. */
.mb-modern .up-pw { position: relative; }
.mb-modern .up-pw .form-control { padding-right: 2.6rem; }
.mb-modern .up-pw-toggle {
    position: absolute; top: .2rem; right: .25rem; bottom: .2rem;
    display: grid; place-items: center; width: 2.1rem;
    border: 0; border-radius: .6rem; background: transparent; color: var(--mb-muted);
    box-shadow: none; cursor: pointer;
}
.mb-modern .up-pw-toggle:hover { background: var(--mb-soft); color: var(--mb-ink); }
.mb-modern .up-pw-toggle:focus-visible { outline: 2px solid var(--mb-primary); outline-offset: 0; }
.mb-modern .up-pw-toggle[aria-pressed="true"] { color: var(--mb-primary-ink); }
.mb-modern .was-validated .up-pw .form-control:invalid,
.mb-modern .was-validated .up-pw .form-control:valid { background-position: right 2.7rem center; padding-right: 4.6rem; }
.mb-modern .up-pw ~ .invalid-feedback { display: none; }
.mb-modern .was-validated .up-pw:has(.form-control:invalid) ~ .invalid-feedback { display: block; }

/* Notices: clear, compact, one line of icon + text. */
.mb-modern .up-notice {
    display: flex; align-items: flex-start; gap: .55rem;
    margin: 0 0 .75rem; padding: .55rem .7rem;
    border: 1px solid transparent; border-radius: .8rem;
    font-size: .8rem; line-height: 1.45;
}
.mb-modern .up-notice > i { flex: 0 0 auto; margin-top: .15rem; }
.mb-modern .up-notice-txt { flex: 1 1 auto; min-width: 0; }
.mb-modern .up-notice-txt a { font-weight: 800; color: inherit; }
.mb-modern .up-notice--danger { background: rgba(var(--mb-bad-rgb), .08); border-color: rgba(var(--mb-bad-rgb), .3); color: var(--mb-bad-ink); }
.mb-modern .up-notice--success { background: rgba(var(--mb-ok-rgb), .1); border-color: rgba(var(--mb-ok-rgb), .3); color: var(--mb-ok-ink); }
.mb-modern .up-notice--warning { background: rgba(var(--mb-accent-rgb), .14); border-color: rgba(var(--mb-accent-rgb), .4); color: var(--mb-accent-ink); }
.mb-modern .up-notice--info { background: var(--mb-soft); border-color: var(--mb-line); color: var(--mb-ink); }
.mb-modern .up-notice.is-shake { animation: upShake .4s ease; }
@keyframes upShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ==========================================================================
   D. The sign-in family: one centred card under the hero, help tiles below.
   ========================================================================== */
/* The site's standard two-column layout (owner, 5 Oct 2026: "also no sidebar"): the card
   fills the main column, brand on the left and the form on the right; the sidebar carries
   the panels; on phones the sidebar is the usual drawer. */
.mb-modern .up-auth-wrap { display: flex; flex-direction: column; gap: 1rem; }
.mb-modern .up-auth-card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr);
    border: 1px solid var(--mb-ring); border-radius: var(--mb-radius);
    background: var(--mb-card-bg); box-shadow: var(--mb-shadow); color: var(--mb-ink);
    overflow: hidden;
}
/* No red-to-gold stripe (owner, 6 Oct 2026): no other card on the site carries one. */
.mb-modern .up-auth-card::before { content: none; }
.mb-modern .up-auth-body { padding: 1rem 1.2rem 1rem; min-width: 0; }
.mb-modern .up-auth-card .up-notice:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
    .mb-modern .up-auth-card { grid-template-columns: minmax(13rem, .8fr) minmax(0, 1.2fr); }
    .mb-modern .up-auth-body { padding: 1.4rem 1.6rem 1.2rem; display: flex; flex-direction: column; justify-content: center; }
    .mb-modern .up-auth-body > * { width: 100%; max-width: 36rem; margin-left: auto; margin-right: auto; }
    .mb-modern .up-auth-body > .up-auth-foot { max-width: none; width: auto; }
}
.mb-modern .up-auth-submit { display: flex; width: 100%; margin-top: 1rem; padding: .55rem 1rem; font-size: .86rem; }
.mb-modern .up-auth-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .75rem; }
.mb-modern .up-auth-row .form-check { display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; min-height: 0; }
.mb-modern .up-auth-row .form-check-input { float: none; margin: 0; }
.mb-modern .up-auth-row .form-switch .form-check-input { width: 2.4em; height: 1.35em; }
.mb-modern .up-auth-row label { color: var(--mb-ink); font-size: .8rem; font-weight: 700; cursor: pointer; }
.mb-modern .up-auth-link { color: var(--mb-primary-ink); font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.mb-modern .up-auth-link:hover { text-decoration: underline; color: var(--mb-primary-ink); }
.mb-modern .up-auth-alt { display: grid; gap: .5rem; margin-top: .85rem; }
.mb-modern .up-auth-alt .mb-pill { display: flex; width: 100%; padding: .45rem .8rem; }
.mb-modern .up-or { display: flex; align-items: center; gap: .6rem; color: var(--mb-muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mb-modern .up-or::before, .mb-modern .up-or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--mb-line); }
.mb-modern .up-auth-alt .apple-signin-btn { border-radius: 999px; }
/* No passkey on this device and no Apple set-up: no "or" either. */
.mb-modern .up-auth-alt:not(:has(> a, > button:not([hidden]))) { display: none; }
.mb-modern .up-auth-card #passkey-status { margin-top: .4rem; font-size: .74rem; text-align: center; }
.mb-modern .up-auth-card #passkey-status:empty { display: none; }
.mb-modern .up-auth-foot { margin: .9rem -1.2rem -1rem; padding: .65rem 1.2rem; border-top: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); background: var(--mb-soft); text-align: center; color: var(--mb-muted); font-size: .78rem; }
.mb-modern .up-auth-foot a { color: var(--mb-primary-ink); font-weight: 800; text-decoration: none; }
.mb-modern .up-auth-foot a:hover { text-decoration: underline; }
@media (min-width: 768px) { .mb-modern .up-auth-foot { margin: 1rem -1.6rem -1.2rem; padding: .7rem 1.6rem; } }
@media (min-width: 1600px) { .mb-modern .up-auth-card { grid-template-columns: minmax(13rem, .65fr) minmax(0, 1.35fr); } }
.mb-modern .up-auth-note { margin: .65rem 0 0; color: var(--mb-muted); font-size: .7rem; line-height: 1.45; text-align: center; }
.mb-modern .up-auth-note a { color: inherit; font-weight: 800; }
.mb-modern .up-auth-note:empty { display: none; }
.mb-modern .up-code-input { text-align: center; font-size: 1.35rem !important; font-weight: 800; letter-spacing: .32em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mb-modern .up-auth-state { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .3rem 0 .2rem; text-align: center; }
.mb-modern .up-auth-state .mb-ico { width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.2rem; }
.mb-modern .up-auth-state b { font-size: .95rem; font-weight: 900; }
.mb-modern .up-auth-state span { color: var(--mb-muted); font-size: .8rem; line-height: 1.45; max-width: 24rem; }
.mb-modern .up-auth-state.is-in .mb-ico { animation: upPop .5s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
@keyframes upPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.mb-modern .up-field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .7rem; }
.mb-modern .up-field-pair + .up-field { margin-top: .7rem; }
.mb-modern .up-field-pair .up-field + .up-field { margin-top: 0; }
.mb-modern .up-terms .form-check { align-items: flex-start; flex-wrap: wrap; }
.mb-modern .up-terms .form-check-input { margin-top: .15rem; flex: 0 0 auto; }
.mb-modern .up-terms .form-check-label { flex: 1 1 0; min-width: 0; font-weight: 600; line-height: 1.45; }
.mb-modern .up-terms .invalid-feedback { flex: 1 0 100%; }
/* The strength meter under the new password. */
.mb-modern .password-strength-meter .progress { height: 5px; border-radius: 999px; background: var(--mb-soft-2); overflow: hidden; }
.mb-modern .password-strength-meter .progress-bar { transition: width .35s ease; }
.mb-modern .password-strength-meter small { font-size: .7rem; font-weight: 700; }
/* ==========================================================================
   D2. The splash (owner, 6 Oct 2026: "make the splash more modern and dynamic"):
       our ground's photo with a slow Ken Burns drift under the club-red tint (an
       animated gradient mesh with a crest watermark when there is no photo), the
       crest floating with a soft glow, the page's title and line in white, and a
       rotating strip of club facts (next match + countdown, last result, On This
       Day). Desktop: the form drives the card's height (the splash has no size of
       its own, contain:size) and the splash fills it. Phones: a compact band
       above the form with the next-match chip only.
   ========================================================================== */
.mb-modern .up-splash {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    color: #fff; text-align: center;
    background: var(--theme-gradient-end, var(--mb-primary));
}
.mb-modern .up-sp-photo {
    position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%;
    object-fit: cover; object-position: center 40%;
    transform-origin: 60% 45%;
    animation: upKenBurns 26s ease-in-out infinite alternate;
}
@keyframes upKenBurns { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.2) translate3d(-3%, -2%, 0); } }
.mb-modern .up-sp-mesh {
    position: absolute; inset: -20%; z-index: -3;
    background:
        radial-gradient(40% 50% at 20% 30%, color-mix(in oklab, var(--theme-gradient-start, var(--mb-primary)) 90%, white), transparent 70%),
        radial-gradient(45% 55% at 80% 20%, var(--theme-gradient-end, var(--mb-primary)), transparent 70%),
        radial-gradient(50% 60% at 60% 85%, var(--theme-gradient-start, var(--mb-primary)), transparent 70%),
        var(--theme-gradient-end, var(--mb-primary));
    animation: upMesh 18s ease-in-out infinite alternate;
}
@keyframes upMesh { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(-6%, 4%, 0) rotate(8deg); } }
.mb-modern .up-sp-mark { position: absolute; right: -2.5rem; bottom: -2.5rem; z-index: -2; opacity: .12; line-height: 0; }
.mb-modern .up-sp-mark img, .mb-modern .up-sp-mark .up-crest { width: 13rem; height: 13rem; }
.mb-modern .up-sp-tint {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(165deg,
            color-mix(in oklab, var(--theme-gradient-start, var(--mb-primary)) 70%, transparent) 0%,
            color-mix(in oklab, var(--theme-gradient-end, var(--mb-primary)) 52%, transparent) 50%,
            color-mix(in oklab, var(--theme-gradient-end, var(--mb-primary)) 90%, transparent) 100%);
}
.mb-modern .up-splash.is-mesh .up-sp-tint { opacity: .45; }
.mb-modern .up-sp-in { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1.5rem 1.4rem; min-width: 0; }
.mb-modern .up-sp-crest { margin: 0; line-height: 0; animation: upFloat 6s ease-in-out infinite alternate; }
.mb-modern .up-sp-crest img, .mb-modern .up-sp-crest .up-crest {
    width: 4.5rem; height: 4.5rem; object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, .35)) drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}
@keyframes upFloat { from { transform: translateY(0); } to { transform: translateY(-7px); } }
.mb-modern .up-sp-text { display: flex; flex-direction: column; align-items: center; min-width: 0; width: 100%; }
.mb-modern .up-splash .up-auth-title { margin: 0; color: #fff; font-size: 1.35rem; font-weight: 900; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.mb-modern .up-splash .up-auth-desc { margin: .3rem auto 0; max-width: 24rem; color: rgba(255, 255, 255, .86); font-size: .84rem; line-height: 1.45; }
/* The facts strip: a glass card, one fact at a time, dots under it. */
.mb-modern .up-sp-facts {
    width: 100%; max-width: 23rem; margin-top: .85rem; padding: .7rem .8rem .55rem;
    border: 1px solid rgba(255, 255, 255, .18); border-radius: .95rem;
    background: rgba(0, 0, 0, .22); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
    text-align: left;
}
.mb-modern .up-sp-slides { display: grid; }
.mb-modern .up-sp-fact {
    grid-area: 1 / 1; display: flex; flex-direction: column; gap: .35rem; min-width: 0;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .45s var(--mb-ease), transform .45s var(--mb-ease), visibility 0s linear .45s;
}
.mb-modern .up-sp-fact.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--mb-ease), transform .45s var(--mb-ease), visibility 0s; }
.mb-modern .up-sp-label { color: var(--theme-accent-on-primary, var(--slb-gold, #F4B223)); font-size: .62rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.mb-modern .up-sp-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .5rem; }
.mb-modern .up-sp-team { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.mb-modern .up-sp-pair > .up-sp-team:first-child { justify-content: flex-start; flex-direction: row-reverse; text-align: right; } /* row-reverse: flex-start = the right edge, so the home crest sits next to the score like the away one (owner, 6 Oct 2026) */
.mb-modern .up-sp-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 800; }
.mb-modern .up-sp-team .up-crest { width: 1.9rem; height: 1.9rem; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.mb-modern .up-sp-team .up-crest--none { color: rgba(255, 255, 255, .7); }
.mb-modern .up-sp-mid { display: flex; justify-content: center; }
.mb-modern .up-sp-vs { color: rgba(255, 255, 255, .7); font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.mb-modern .up-sp-score {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.8rem; padding: .16rem .5rem;
    border-radius: .25rem; color: #fff; font-size: .9rem; font-weight: 900; font-variant-numeric: tabular-nums;
    background: color-mix(in oklab, #fff 28%, transparent);
}
.mb-modern .up-sp-score.is-w { background: var(--mb-ok); }
.mb-modern .up-sp-score.is-l { background: var(--mb-bad); }
.mb-modern .up-sp-cd { align-self: center; font-size: 1.35rem; font-weight: 900; line-height: 1.1; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.mb-modern .up-sp-cd small { margin: 0 .12rem 0 .05rem; color: rgba(255, 255, 255, .7); font-size: .58em; font-weight: 800; }
.mb-modern .up-sp-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .78); font-size: .7rem; text-align: center; }
.mb-modern .up-sp-dots { display: flex; justify-content: center; gap: .35rem; margin-top: .55rem; }
.mb-modern .up-sp-dot {
    width: .45rem; height: .45rem; padding: 0; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, .4); cursor: pointer; box-shadow: none;
    transition: width .3s var(--mb-ease), background-color .3s ease;
}
.mb-modern .up-sp-dot.is-on { width: 1.2rem; background: #fff; }
.mb-modern .up-sp-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (min-width: 768px) {
    /* The form sets the height; the splash fills it (no size of its own). */
    .mb-modern .up-auth-card { min-height: 24rem; }
    .mb-modern .up-splash { contain: size; }
    .mb-modern .up-auth-card:has(.up-sp-facts) { min-height: 27rem; }
}
@media (max-width: 767.98px) {
    /* The band: crest | title over the next-match chip; photo + tint behind. */
    .mb-modern .up-splash { text-align: left; min-height: 9rem; }
    .mb-modern .up-sp-in { flex-direction: row; align-items: center; gap: .8rem; padding: 1.1rem .95rem 1rem; }
    .mb-modern .up-sp-crest img, .mb-modern .up-sp-crest .up-crest { width: 3.1rem; height: 3.1rem; }
    .mb-modern .up-sp-text { align-items: flex-start; flex: 1 1 auto; }
    .mb-modern .up-splash .up-auth-title { font-size: 1.12rem; }
    .mb-modern .up-splash .up-auth-desc { display: none; }
    .mb-modern .up-sp-facts { max-width: none; margin-top: .5rem; padding: .3rem .55rem; border-radius: 999px; }
    .mb-modern .up-sp-dots, .mb-modern .up-sp-fact:not([data-kind="next"]) { display: none; }
    .mb-modern .up-sp-fact[data-kind="next"] { opacity: 1; visibility: visible; transform: none; flex-direction: row; align-items: center; gap: .5rem; }
    .mb-modern .up-sp-facts:not(:has([data-kind="next"])) { display: none; }
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-label,
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-meta,
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-team b { display: none; }
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-pair { display: flex; gap: .3rem; flex: 0 0 auto; }
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-team .up-crest { width: 1.35rem; height: 1.35rem; }
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-cd { font-size: .9rem; align-self: auto; white-space: nowrap; }
}
@media (max-width: 379.98px) {
    .mb-modern .up-sp-crest img, .mb-modern .up-sp-crest .up-crest { width: 2.6rem; height: 2.6rem; }
    .mb-modern .up-splash .up-auth-title { font-size: 1.02rem; }
    .mb-modern .up-sp-fact[data-kind="next"] .up-sp-cd { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
    .mb-modern .up-sp-photo, .mb-modern .up-sp-mesh, .mb-modern .up-sp-crest { animation: none !important; }
    .mb-modern .up-sp-fact, .mb-modern .up-sp-dot { transition: none !important; }
}

/* The sign-in sidebar: a green call to action under a list, a small note. */
.benfica-layout.up-auth .bn-aside .up-side-list li > a { display: contents; color: inherit; text-decoration: none; }
.benfica-layout.up-auth .bn-aside .up-side-list a:hover b { text-decoration: underline; }
.benfica-layout.up-auth .bn-aside .mb-pill--block { margin-top: .7rem; }
.benfica-layout.up-auth .bn-aside .up-side-list + .mb-side-note { margin-top: .6rem; }
/* Sections under the card (How It Works) keep the site's 1rem rhythm. */
.mb-modern .up-auth-wrap > .bn-section { margin-top: 0; }
.mb-modern .up-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.mb-modern .up-auth-steps { list-style: none; margin: 0; padding: .55rem .2rem .5rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
/* The honeypot stays off-screen whatever the skin does. */
.mb-modern .up-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   E. Security + data export: setting rows with status chips, the stepper.
   ========================================================================== */
.mb-modern .up-set .mb-row { grid-template-columns: 2rem minmax(0, 1fr) auto; padding: .6rem .1rem; }
.mb-modern .up-set .mb-row-meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mb-modern .up-set .mb-row-side { gap: .45rem; }
.mb-modern .up-set .mb-row-title { display: flex; align-items: center; gap: .45rem; }
.mb-modern .up-set .mb-row-title > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-modern .up-set form { margin: 0; }
.mb-modern .up-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .25rem 0 .6rem 2.6rem; }
.mb-modern .up-inline-form .form-control { flex: 1 1 11rem; max-width: 16rem; min-height: 2.1rem; padding: .3rem .7rem; font-size: .82rem; border-radius: 999px; }
.mb-modern .up-inline-form .up-pw { flex: 1 1 11rem; max-width: 16rem; }
.mb-modern .up-inline-form .up-pw .form-control { max-width: none; width: 100%; }
.mb-modern .up-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .4rem; padding: .5rem 0; }
.mb-modern .up-code {
    padding: .45rem .3rem; border-radius: .6rem; background: var(--mb-soft);
    border: 1px dashed color-mix(in oklab, var(--mb-line) 80%, transparent);
    text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; font-weight: 700; letter-spacing: .06em;
}
.mb-modern .up-setup-step { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: .6rem; padding: .7rem .1rem; border-bottom: 1px solid color-mix(in oklab, var(--mb-line) 60%, transparent); }
.mb-modern .up-setup-step:last-child { border-bottom: 0; }
.mb-modern .up-setup-step > .up-step-n {
    display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%;
    background: var(--mb-primary); color: var(--mb-on); font-size: .78rem; font-weight: 900;
}
.mb-modern .up-setup-step.is-done > .up-step-n { background: var(--mb-ok); color: #fff; }
.mb-modern .up-setup-step > div { min-width: 0; }
.mb-modern .up-setup-step b { display: block; font-size: .86rem; font-weight: 900; line-height: 1.3; }
.mb-modern .up-setup-step p { margin: .1rem 0 .45rem; color: var(--mb-muted); font-size: .76rem; line-height: 1.45; }
.mb-modern .up-setup-step p:last-child { margin-bottom: 0; }
/* The QR + key block (includes/qr_encoder.php draws the SVG; black on white always). */
.mb-modern .up-add { display: flex; align-items: center; gap: .85rem; flex-wrap: nowrap; }
.mb-modern .up-qr { flex: 0 0 auto; line-height: 0; padding: .35rem; border-radius: .75rem; background: #fff; border: 1px solid var(--mb-ring); }
.mb-modern .up-qr svg { display: block; width: 8rem; height: 8rem; }
.mb-modern .up-add-alt { flex: 1 1 0; min-width: 0; display: grid; gap: .45rem; }
.mb-modern .up-key {
    display: block; padding: .4rem .55rem; border-radius: .6rem;
    border: 1px dashed color-mix(in oklab, var(--mb-line) 90%, transparent); background: var(--mb-soft);
    color: var(--mb-ink); text-align: center; word-break: break-all;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; letter-spacing: .04em;
}
.mb-modern .up-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.mb-modern .up-add-hint { color: var(--mb-muted); font-size: .68rem; }
.mb-modern .up-confirm { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.mb-modern .up-confirm .form-control { flex: 0 1 11rem; min-height: 2.3rem; border-radius: 999px; }
.mb-modern .up-confirm .up-code-input { font-size: 1.05rem !important; letter-spacing: .25em; }
/* Data export: what is included (chips). */
.mb-modern .up-incl { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 0 .55rem; }
.mb-modern .up-incl .mb-chip i { color: var(--mb-ok-ink); }
.mb-modern .up-export-state { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; align-items: center; column-gap: .7rem; padding: .7rem .1rem .55rem; }
.mb-modern .up-export-state .mb-ico { width: 2.6rem; height: 2.6rem; border-radius: .75rem; font-size: 1.05rem; }
.mb-modern .up-export-state b { display: block; font-size: .92rem; font-weight: 900; line-height: 1.3; }
.mb-modern .up-export-state small { display: block; color: var(--mb-muted); font-size: .74rem; line-height: 1.4; }
.mb-modern .up-export-state.is-busy .mb-ico i { animation: upSpin 2.4s linear infinite; }
@keyframes upSpin { to { transform: rotate(360deg); } }

/* ==========================================================================
   F. Attendance
   ========================================================================== */
.mb-modern .up-wdl { display: flex; height: .55rem; margin: .1rem 0 .35rem; border-radius: 999px; overflow: hidden; background: var(--mb-soft-2); }
.mb-modern .up-wdl > span { display: block; height: 100%; transition: width .9s var(--mb-ease); }
.mb-modern .up-wdl .is-w { background: var(--mb-ok); }
.mb-modern .up-wdl .is-d { background: color-mix(in oklab, var(--mb-muted) 55%, var(--mb-soft-2)); }
.mb-modern .up-wdl .is-l { background: var(--mb-bad); }
.mb-modern .up-wdl-key { display: flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--mb-muted); font-size: .7rem; font-weight: 700; padding-bottom: .45rem; }
.mb-modern .up-wdl-key b { color: var(--mb-ink); font-weight: 900; font-variant-numeric: tabular-nums; }
.mb-modern .up-wdl-key i { display: inline-block; width: .55rem; height: .55rem; margin-right: .3rem; border-radius: .15rem; vertical-align: .02em; }
.mb-modern .up-wdl-key .k-w { background: var(--mb-ok); }
.mb-modern .up-wdl-key .k-d { background: color-mix(in oklab, var(--mb-muted) 55%, var(--mb-soft-2)); }
.mb-modern .up-wdl-key .k-l { background: var(--mb-bad); }
.mb-modern .up-charm { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; margin-bottom: .45rem; border-radius: .7rem; background: linear-gradient(135deg, rgba(var(--mb-ok-rgb), .1), var(--mb-soft) 60%); }
.mb-modern .up-charm.is-bad { background: linear-gradient(135deg, rgba(var(--mb-bad-rgb), .09), var(--mb-soft) 60%); }
.mb-modern .up-charm-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mb-modern .up-charm-main b { font-size: .84rem; font-weight: 900; }
.mb-modern .up-charm-main small { color: var(--mb-muted); font-size: .7rem; }
.mb-modern .up-charm-vs { display: flex; align-items: baseline; gap: .3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-modern .up-charm-vs b { font-size: 1.15rem; font-weight: 900; }
.mb-modern .up-charm-vs small { color: var(--mb-muted); font-size: .68rem; font-weight: 700; }
/* A match row: date tile | crests + "vs X" over one meta line | score square. */
.mb-modern .up-mrow { grid-template-columns: 2.3rem minmax(0, 1fr) auto; }
.mb-modern .up-mrow .mb-row-title { display: flex; align-items: center; gap: .4rem; }
.mb-modern .up-mrow .mb-row-title .up-crest { width: 1.35rem; height: 1.35rem; }
.mb-modern .up-mrow .mb-row-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-modern .up-venue { flex: 0 0 auto; display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: .25rem; background: var(--mb-soft-2); color: var(--mb-muted); font-size: .58rem; font-weight: 900; }
.mb-modern .up-res { display: inline-flex; align-items: center; gap: .35rem; }
.mb-modern .up-res-l { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: .25rem; font-size: .62rem; font-weight: 900; color: #fff; background: color-mix(in oklab, var(--mb-muted) 70%, var(--mb-soft-2)); }
.mb-modern .up-res-l.is-w { background: var(--mb-ok); }
.mb-modern .up-res-l.is-l { background: var(--mb-bad); }
.mb-modern .up-cmp-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .5rem 0 .2rem; }
.mb-modern .up-more-row { display: flex; justify-content: center; padding: .45rem 0 .35rem; }
.mb-modern .mb-row.is-hidden { display: none; }
/* Grounds: name over city, a heat bar and the count. */
.mb-modern .up-heat { display: flex; align-items: center; gap: .4rem; min-width: 6rem; }
.mb-modern .up-heat-bar { position: relative; flex: 1 1 auto; width: 4.5rem; height: .35rem; border-radius: 999px; background: var(--mb-soft-2); overflow: hidden; }
.mb-modern .up-heat-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--mb-primary), color-mix(in oklab, var(--mb-primary) 55%, var(--mb-accent))); }
.mb-modern .up-heat b { min-width: 1.2rem; text-align: right; font-size: .78rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.mb-modern .up-map { --up-pin: var(--theme-primary, #cc0000); }
.mb-modern .up-map { height: 300px; margin: .45rem 0; border-radius: var(--mb-radius-sm); overflow: hidden; background: var(--mb-soft); }
.mb-modern .up-pp { display: grid; gap: .3rem; padding: .55rem 0 .45rem; }
.mb-modern .up-pp-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.mb-modern .up-pp-top b { font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.mb-modern .up-pp-top b small { color: var(--mb-muted); font-size: .66em; font-weight: 800; }
.mb-modern .up-pp-top span { color: var(--mb-muted); font-size: .72rem; font-weight: 800; }
.mb-modern .up-pp-track { position: relative; height: .55rem; border-radius: 999px; background: var(--mb-soft-2); overflow: hidden; }
.mb-modern .up-pp-track > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--mb-primary), color-mix(in oklab, var(--mb-primary) 45%, var(--mb-accent))); transition: width .9s var(--mb-ease); }
.mb-modern .up-pp-note { color: var(--mb-muted); font-size: .68rem; line-height: 1.4; }

/* ==========================================================================
   G. Badges: unlocked / locked grid with progress rings.
   ========================================================================== */
.mb-modern .up-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: .6rem; }
.mb-modern .up-badge {
    position: relative; display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); align-items: center; column-gap: .65rem;
    padding: .6rem .7rem; min-width: 0;
    border: 1px solid var(--mb-ring); border-radius: var(--mb-radius);
    background: var(--mb-card-bg); box-shadow: var(--mb-shadow); color: var(--mb-ink);
    transition: transform .2s var(--mb-ease), border-color .2s ease;
}
.mb-modern .up-badge:hover { transform: translateY(-2px); border-color: rgba(var(--mb-primary-rgb), .3); }
.mb-modern .up-badge .up-ring { --up-ring-size: 2.9rem; }
.mb-modern .up-badge .up-ring > span { font-size: 1rem; }
.mb-modern .up-badge.is-earned .up-ring { --up-ring-col: var(--mb-accent); background: conic-gradient(var(--mb-accent) 100%, var(--mb-soft-2) 0); }
.mb-modern .up-badge.is-earned .up-ring > span { background: linear-gradient(145deg, var(--theme-gradient-start, var(--mb-primary)), var(--theme-gradient-end, var(--mb-primary))); color: var(--theme-accent-on-primary, var(--mb-on)); }
.mb-modern .up-badge.is-locked .up-ring > span { color: var(--mb-muted); }
.mb-modern .up-badge.is-locked .up-ring > span i { filter: grayscale(1); opacity: .75; }
.mb-modern .up-badge-main { display: flex; flex-direction: column; min-width: 0; }
.mb-modern .up-badge-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; font-weight: 900; line-height: 1.25; }
.mb-modern .up-badge-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mb-muted); font-size: .7rem; line-height: 1.35; }
.mb-modern .up-badge-meta { display: flex; align-items: center; flex-wrap: nowrap; gap: .3rem .5rem; margin-top: .22rem; min-width: 0; overflow: hidden; color: var(--mb-muted); font-size: .64rem; font-weight: 700; white-space: nowrap; }
.mb-modern .up-badge-meta > span { overflow: hidden; text-overflow: ellipsis; }
.mb-modern .up-badge-meta .is-earned { color: var(--mb-ok-ink); font-weight: 800; }
.mb-modern .up-badge-meta .is-rare { color: var(--mb-accent-ink); font-weight: 800; }
.mb-modern .up-badge.is-earned::after {
    content: "\f00c"; position: absolute; top: .45rem; right: .5rem;
    display: grid; place-items: center; width: 1.05rem; height: 1.05rem; border-radius: 50%;
    background: var(--mb-ok); color: #fff;
    font-family: "Font Awesome 7 Free", "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; font-size: .52rem;
}
.mb-modern .up-badge.is-earned .up-badge-main { padding-right: .8rem; }
.mb-modern .up-badge.is-locked { background: color-mix(in oklab, var(--mb-card-bg) 92%, var(--mb-soft)); }
.mb-modern .up-badge.is-new { animation: upPop .5s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
.mb-modern .up-badge[hidden] { display: none; }
.mb-modern .up-bgroup[hidden] { display: none; }
.mb-modern .up-gap { height: .55rem; }
.mb-modern .up-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.mb-modern .up-total { display: flex; align-items: center; gap: .8rem; padding: .55rem .2rem .5rem; }
.mb-modern .up-total .up-ring { --up-ring-size: 3.6rem; }
.mb-modern .up-total .up-ring > span { font-size: .88rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.mb-modern .up-total-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.mb-modern .up-total-main b { font-size: .92rem; font-weight: 900; }
.mb-modern .up-total-main small { color: var(--mb-muted); font-size: .74rem; line-height: 1.4; }
.mb-modern .up-rules { list-style: none; margin: 0; padding: .2rem 0; }
.mb-modern .up-rules li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: .6rem; align-items: start; padding: .45rem .1rem; border-bottom: 1px solid color-mix(in oklab, var(--mb-line) 60%, transparent); font-size: .78rem; line-height: 1.45; color: var(--mb-muted); }
.mb-modern .up-rules li:last-child { border-bottom: 0; }
.mb-modern .up-rules b { display: block; color: var(--mb-ink); font-weight: 800; font-size: .82rem; }
.mb-modern .up-rules a { font-weight: 800; }

/* ==========================================================================
   H. Messages: inbox rows + the open message as a thread.
   ========================================================================== */
.mb-modern .up-inbox .mb-row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; padding: .55rem .1rem; }
.mb-modern .up-inbox .mb-row .mb-row-vis { position: relative; }
.mb-modern .up-av { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: var(--up-av, 2.3rem); height: var(--up-av, 2.3rem); border-radius: 50%; overflow: hidden; background: rgba(var(--mb-primary-rgb), .12); color: var(--mb-primary-ink); font-size: calc(var(--up-av, 2.3rem) * .4); font-weight: 900; }
.mb-modern .up-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mb-modern .up-inbox .mb-row.is-unread .mb-row-title { color: var(--mb-ink); }
.mb-modern .up-inbox .mb-row:not(.is-unread) .mb-row-title { font-weight: 700; }
.mb-modern .up-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--mb-primary); flex: 0 0 auto; }
.mb-modern .up-inbox .mb-row-title { display: flex; align-items: center; gap: .4rem; }
.mb-modern .up-inbox .mb-row-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mb-modern .up-inbox .mb-row-title .up-from { flex: 0 1 auto; color: var(--mb-muted); font-weight: 700; font-size: .74rem; }
.mb-modern .up-row-wrap { position: relative; }
.mb-modern .up-row-acts { display: inline-flex; align-items: center; gap: .2rem; }
.mb-modern .up-iconbtn {
    display: inline-grid; place-items: center; width: 1.85rem; height: 1.85rem;
    border: 1px solid transparent; border-radius: 50%; background: transparent;
    color: var(--mb-muted); font-size: .76rem; cursor: pointer; box-shadow: none; text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}
.mb-modern .up-iconbtn:hover { background: var(--mb-soft-2); color: var(--mb-ink); }
.mb-modern .up-iconbtn.is-bad:hover { background: rgba(var(--mb-bad-rgb), .12); color: var(--mb-bad-ink); }
.mb-modern .up-iconbtn:focus-visible { outline: 2px solid var(--mb-primary); outline-offset: 1px; }
.mb-modern .up-inbox .mb-row { padding-right: 0; }
.mb-modern .up-inbox-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .3rem; border-bottom: 1px solid color-mix(in oklab, var(--mb-line) 60%, transparent); }
.mb-modern .up-inbox-line:last-child { border-bottom: 0; }
.mb-modern .up-inbox-line > .mb-row { border-bottom: 0; }
.mb-modern .up-inbox-line.is-unread { background: linear-gradient(90deg, rgba(var(--mb-primary-rgb), .07), transparent 70%); box-shadow: inset 3px 0 0 var(--mb-primary); }
.mb-modern .up-inbox-line.is-unread > .mb-row { padding-left: .6rem; }
[data-bs-theme="dark"] .mb-modern .up-inbox-line.is-unread { background: linear-gradient(90deg, rgba(var(--mb-primary-rgb), .18), transparent 70%); }
.mb-modern .up-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem; padding: .5rem 0 .4rem; }
.mb-modern .up-pages a, .mb-modern .up-pages span { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .45rem; border-radius: 999px; background: var(--mb-soft); color: var(--mb-ink); font-size: .74rem; font-weight: 800; text-decoration: none; }
.mb-modern .up-pages .is-on { background: var(--mb-primary); color: var(--mb-on); }
.mb-modern .up-pages a:hover { background: var(--mb-soft-2); }
/* The open message. */
.mb-modern .mb-box.up-thread { padding: .75rem .9rem .3rem; }
.mb-modern .up-thread-head { display: flex; align-items: center; gap: .65rem; padding-bottom: .65rem; border-bottom: 1px solid color-mix(in oklab, var(--mb-line) 60%, transparent); }
.mb-modern .up-thread-head .up-av { --up-av: 2.6rem; }
.mb-modern .up-thread-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mb-modern .up-thread-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 900; }
.mb-modern .up-thread-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mb-muted); font-size: .7rem; }
.mb-modern .up-thread-subject { margin: .7rem 0 .55rem; font-size: 1rem; font-weight: 900; line-height: 1.3; overflow-wrap: anywhere; }
.mb-modern .up-bubble {
    position: relative; max-width: min(100%, 40rem); padding: .65rem .85rem;
    border-radius: 1rem 1rem 1rem .3rem; background: var(--mb-soft); color: var(--mb-ink);
    font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere;
}
.mb-modern .up-bubble.is-mine { margin-left: auto; border-radius: 1rem 1rem .3rem 1rem; background: rgba(var(--mb-primary-rgb), .1); }
.mb-modern .up-bubble-meta { margin-top: .35rem; color: var(--mb-muted); font-size: .68rem; display: flex; gap: .3rem; align-items: center; }
.mb-modern .up-bubble.is-mine + .up-bubble-meta { justify-content: flex-end; }
.mb-modern .up-quote { margin: .6rem 0 0; padding: .5rem .7rem; border-left: 3px solid color-mix(in oklab, var(--mb-line) 90%, transparent); border-radius: 0 .6rem .6rem 0; background: var(--mb-soft); color: var(--mb-muted); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.mb-modern .up-quote small { display: block; margin-bottom: .2rem; font-size: .7rem; font-weight: 800; }
.mb-modern .up-quick { display: flex; gap: .45rem; align-items: flex-end; margin-top: .75rem; padding-top: .7rem; border-top: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); }
.mb-modern .up-quick textarea.form-control { flex: 1 1 auto; min-height: 2.6rem; max-height: 12rem; padding: .5rem .85rem; border-radius: 1.2rem; resize: none; font-size: .86rem; line-height: 1.45; }
.mb-modern .up-send { flex: 0 0 auto; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; border: 0; border-radius: 50%; background: var(--mb-ok); color: #fff; font-size: .95rem; box-shadow: none; cursor: pointer; }
.mb-modern .up-send:hover { background: color-mix(in oklab, var(--mb-ok) 88%, black); }
.mb-modern .up-send:focus-visible { outline: 2px solid var(--mb-ok); outline-offset: 2px; }
.mb-modern .up-send[disabled] { opacity: .5; cursor: progress; }
.mb-modern .up-compose { padding: .7rem .2rem .55rem; }
.mb-modern .up-compose .up-field + .up-field { margin-top: .65rem; }
.mb-modern .up-compose-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.mb-modern .up-count { color: var(--mb-muted); font-size: .68rem; text-align: right; }

/* ==========================================================================
   I. Season Wrapped: animated story cards.
   ========================================================================== */
.mb-modern .up-wr { --up-wr-gold: var(--theme-accent, #F4B223); }
.mb-modern .up-wr-bar { display: flex; gap: .3rem; margin: 0 0 .55rem; }
.mb-modern .up-wr-seg { position: relative; flex: 1 1 0; height: .3rem; padding: 0; border: 0; border-radius: 999px; background: var(--mb-soft-2); cursor: pointer; overflow: hidden; }
.mb-modern .up-wr-seg > span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--mb-primary); }
.mb-modern .up-wr-seg.is-past > span { width: 100%; }
.mb-modern .up-wr-seg.is-on > span { width: var(--up-wr-p, 100%); }
.mb-modern .up-wr-seg:focus-visible { outline: 2px solid var(--mb-primary); outline-offset: 2px; }
.mb-modern .up-wr-deck {
    position: relative; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: .2rem .2rem 1rem; margin: 0 -.2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.mb-modern .up-wr-deck::-webkit-scrollbar { display: none; }
.mb-modern .up-wr-card {
    position: relative; flex: 0 0 min(78vw, 17rem); aspect-ratio: 3 / 4; min-height: 21rem;
    scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 1.6rem 1.2rem; overflow: hidden; text-align: center; color: #fff;
    border-radius: var(--mb-radius);
    background: linear-gradient(160deg, var(--theme-gradient-start, var(--mb-primary)) 0%, var(--theme-gradient-end, var(--mb-primary)) 62%, var(--theme-primary-900, #33000a) 100%);
    box-shadow: var(--mb-shadow);
    transform: scale(.94); opacity: .72;
    transition: transform .45s var(--mb-ease), opacity .45s ease;
}
.mb-modern .up-wr-card:nth-child(3n+2) { background: linear-gradient(200deg, var(--theme-primary-900, #33000a) 0%, var(--theme-gradient-end, var(--mb-primary)) 48%, var(--theme-gradient-start, var(--mb-primary)) 100%); }
.mb-modern .up-wr-card:nth-child(3n) { background: radial-gradient(120% 90% at 50% 0%, var(--theme-gradient-start, var(--mb-primary)) 0%, var(--theme-primary-900, #33000a) 78%); }
.mb-modern .up-wr-card.is-on { transform: none; opacity: 1; }
.mb-modern .up-wr-card::before {
    content: ""; position: absolute; width: 16rem; height: 16rem; right: -6rem; top: -6rem; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 70%); pointer-events: none;
}
.mb-modern .up-wr-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--up-wr-gold), var(--slb-red, var(--mb-primary))); }
.mb-modern .up-wr-card > * { position: relative; z-index: 1; }
.mb-modern .up-wr-ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .14); color: var(--up-wr-gold); font-size: 1.1rem; }
.mb-modern .up-wr-eyebrow { margin-bottom: .6rem; color: var(--up-wr-gold); font-size: .62rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.mb-modern .up-wr-big { font-size: 3.4rem; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mb-modern .up-wr-big small { font-size: .4em; font-weight: 800; margin-left: .05em; opacity: .85; }
.mb-modern .up-wr-mid { font-size: 1.45rem; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.mb-modern .up-wr-label { margin-top: .45rem; color: rgba(255, 255, 255, .86); font-size: .82rem; font-weight: 600; line-height: 1.4; }
.mb-modern .up-wr-sub { margin-top: .75rem; color: rgba(255, 255, 255, .72); font-size: .76rem; line-height: 1.45; }
.mb-modern .up-wr-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .9rem 1.4rem; margin-top: 1rem; }
.mb-modern .up-wr-row > div { min-width: 4rem; }
.mb-modern .up-wr-row b { display: block; font-size: 1.5rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.mb-modern .up-wr-row small { display: block; margin-top: .25rem; color: rgba(255, 255, 255, .72); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.mb-modern .up-wr-cmp { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .45rem .7rem; width: 100%; margin-top: .9rem; }
.mb-modern .up-wr-cmp-heads { display: grid; grid-template-columns: 1fr auto 1fr; gap: .7rem; width: 100%; margin-top: .4rem; color: var(--up-wr-gold); font-size: .74rem; font-weight: 900; }
.mb-modern .up-wr-cmp-heads span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-modern .up-wr-cmp-val { font-size: 1.3rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mb-modern .up-wr-cmp-val.is-win { color: var(--up-wr-gold); }
.mb-modern .up-wr-cmp-lbl { color: rgba(255, 255, 255, .72); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.mb-modern .up-wr-share { margin-top: 1rem; background: var(--up-wr-gold) !important; border-color: transparent !important; color: #1b1b1b !important; }
/* The card's parts enter one after another when it becomes the current card. */
.mb-modern .up-wr-card.is-on > * { animation: upWrIn .55s var(--mb-ease) both; }
.mb-modern .up-wr-card.is-on > *:nth-child(2) { animation-delay: .06s; }
.mb-modern .up-wr-card.is-on > *:nth-child(3) { animation-delay: .12s; }
.mb-modern .up-wr-card.is-on > *:nth-child(4) { animation-delay: .18s; }
.mb-modern .up-wr-card.is-on > *:nth-child(5) { animation-delay: .24s; }
@keyframes upWrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.mb-modern .up-wr-nav { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.mb-modern .up-wr-nav .up-iconbtn { width: 2.1rem; height: 2.1rem; border: 1px solid var(--mb-line); background: var(--mb-card-bg); color: var(--mb-ink); }
.mb-modern .up-wr-nav .up-iconbtn[disabled] { opacity: .35; cursor: default; }
.mb-modern .up-wr-nav .up-wr-count { min-width: 3rem; color: var(--mb-muted); font-size: .74rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.mb-modern .up-wr-status:empty { display: none; }
.mb-modern .up-wr-status { margin-top: .4rem; color: var(--mb-muted); font-size: .74rem; text-align: center; }
.mb-modern .up-friends { display: flex; flex-wrap: wrap; gap: .45rem; padding: .5rem 0 .4rem; }
.mb-modern .up-friend { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .65rem .2rem .2rem; border: 1px solid color-mix(in oklab, var(--mb-line) 70%, transparent); border-radius: 999px; background: var(--mb-soft); color: var(--mb-ink); font-size: .76rem; font-weight: 800; text-decoration: none; }
.mb-modern .up-friend .up-av { --up-av: 1.6rem; }
.mb-modern .up-friend:hover { background: var(--mb-soft-2); color: var(--mb-ink); }
.mb-modern .up-friend.is-on { background: var(--mb-primary); border-color: transparent; color: var(--mb-on); }

/* ==========================================================================
   J. Fan Map: the page's own markup + the rows fanmap.js prints (skinned,
      the script is unchanged).
   ========================================================================== */
.mb-modern .up-fm-pick { display: inline-flex; align-items: center; gap: .3rem; }
.mb-modern .up-fm-pick .up-pick { max-width: 15rem; }
.mb-modern .up-fm-match { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .65rem .2rem .6rem; }
.mb-modern .up-fm-side { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.mb-modern .up-fm-side.is-home { justify-content: flex-end; }
.mb-modern .up-fm-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; font-weight: 900; }
.mb-modern .up-fm-side .up-crest { width: 2.2rem; height: 2.2rem; }
.mb-modern .up-fm-vs { color: var(--mb-muted); font-size: .62rem; font-weight: 900; letter-spacing: .08em; }
.mb-modern .up-fm-when { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; padding-left: .6rem; border-left: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); white-space: nowrap; }
.mb-modern .up-fm-when b { font-size: .84rem; font-weight: 900; }
.mb-modern .up-fm-when small { color: var(--mb-muted); font-size: .68rem; font-weight: 700; }
.mb-modern .fanmap-name-short { display: none; }
.mb-modern .up-fm-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0 .5rem; border-top: 1px solid color-mix(in oklab, var(--mb-line) 60%, transparent); }
.mb-modern .up-fm-tools .mb-seg { flex: 0 1 auto; flex-wrap: wrap; }
.mb-modern .up-fm-tools .fanmap-filter.active { background: var(--mb-primary); color: var(--mb-on); }
.mb-modern .up-fm-search { display: flex; align-items: center; gap: .25rem; flex: 1 1 14rem; max-width: 22rem; padding: .15rem .15rem .15rem .7rem; border: 1px solid color-mix(in oklab, var(--mb-line) 70%, transparent); border-radius: 999px; background: var(--mb-soft); }
.mb-modern .up-fm-search input { flex: 1 1 auto; min-width: 0; padding: .2rem 0; border: 0; background: transparent; color: var(--mb-ink); font-size: .78rem; outline: none; }
.mb-modern .up-fm-search .up-iconbtn { width: 1.8rem; height: 1.8rem; }
.mb-modern #fanmap { height: 460px; border-radius: var(--mb-radius-sm); overflow: hidden; background: var(--mb-soft); }
.mb-modern .up-fm-hint { display: flex; align-items: center; gap: .4rem; padding: .45rem .1rem .2rem; color: var(--mb-muted); font-size: .72rem; }
.mb-modern #fanmap-form { margin-top: .5rem; padding: .7rem; border: 1px dashed color-mix(in oklab, var(--mb-line) 90%, transparent); border-radius: var(--mb-radius-sm); background: var(--mb-soft); }
.mb-modern .up-fm-form-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: .45rem; }
.mb-modern .up-fm-form-grid .is-wide { grid-column: span 2; }
.mb-modern .up-fm-form-grid .form-control, .mb-modern .up-fm-form-grid .form-select { min-height: 2.15rem; border-radius: 999px; font-size: .8rem; }
.mb-modern .up-fm-form-grid #fanmap-save { width: 100%; justify-content: center; }
/* The live chips (fanmap.js renderStats) — hidden while the hero carries the same counts. */
.benfica-layout.up-fm.up-hero-on #fanmap-stats { display: none !important; }
.mb-modern #fanmap-stats { gap: .35rem !important; }
.mb-modern #fanmap-stats .badge { font-size: .7rem !important; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; }
.mb-modern #fanmap-list { margin-top: 1rem !important; }
.mb-modern #fanmap-list > .row { --bs-gutter-x: .6rem; --bs-gutter-y: .6rem; }
.mb-modern #fanmap-list .fanmap-card {
    display: flex; flex-direction: column; gap: .25rem; height: 100%; padding: .65rem .75rem;
    border: 1px solid var(--mb-ring); border-radius: var(--mb-radius);
    background: var(--mb-card-bg); box-shadow: var(--mb-shadow); color: var(--mb-ink);
    transition: transform .2s var(--mb-ease), border-color .2s ease;
}
.mb-modern #fanmap-list .fanmap-card:hover { transform: translateY(-2px); border-color: rgba(var(--mb-primary-rgb), .3); box-shadow: var(--mb-shadow); }
.mb-modern #fanmap-list .fanmap-card-type { display: inline-flex; align-items: center; gap: .35rem; color: var(--mb-primary-ink); font-size: .62rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.mb-modern #fanmap-list .fanmap-card-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 900; }
.mb-modern #fanmap-list .fanmap-card-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mb-muted); font-size: .72rem; }
.mb-modern #fanmap-list .fanmap-card-actions { display: flex; align-items: center; gap: .35rem; margin-top: auto; padding-top: .35rem; }
.mb-modern #fanmap-list .badge,
.mb-modern .leaflet-popup .badge { padding: .2rem .55rem; border-radius: 999px; background: var(--mb-soft-2) !important; color: var(--mb-ink) !important; font-size: .66rem; font-weight: 800; }
.mb-modern #fanmap-list .btn,
.mb-modern .leaflet-popup .btn {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .24rem .7rem !important; border: 1px solid var(--mb-line); border-radius: 999px !important;
    background: var(--mb-soft); color: var(--mb-ink); font-size: .72rem !important; font-weight: 800; line-height: 1.25;
    box-shadow: none !important;
}
.mb-modern #fanmap-list .btn-success, .mb-modern .leaflet-popup .btn-success { background: var(--mb-ok); border-color: transparent; color: #fff; }
.mb-modern #fanmap-list .btn-outline-success, .mb-modern .leaflet-popup .btn-outline-success { border-color: rgba(var(--mb-ok-rgb), .5); color: var(--mb-ok-ink); background: transparent; }
.mb-modern #fanmap-list .btn-outline-danger, .mb-modern .leaflet-popup .btn-outline-danger { border-color: rgba(var(--mb-bad-rgb), .45); color: var(--mb-bad-ink); background: transparent; }
.mb-modern #fanmap-list .alert { margin: 0; padding: .6rem .8rem; border: 1px solid var(--mb-ring); border-radius: var(--mb-radius); background: var(--mb-card-bg); box-shadow: var(--mb-shadow); color: var(--mb-muted); font-size: .8rem; }
.mb-modern .up-fm-up .mb-row { grid-template-columns: 2.3rem minmax(0, 1fr) auto; }
.mb-modern .up-fm-up .mb-row.is-current { background: color-mix(in oklab, var(--mb-soft) 80%, transparent); box-shadow: inset 3px 0 0 var(--mb-primary); padding-left: .55rem; }

/* ==========================================================================
   K. Phones (767 / 575 / 439 / 379 — My Benfica's breakpoints)
   ========================================================================== */
@media (max-width: 991.98px) {
    .benfica-layout.up-page .bn-aside .mb-side-tiles { margin-bottom: .6rem; }
}
@media (max-width: 767.98px) {
    /* Head switches keep their title; the decorative rule gives way (as on My Benfica). */
    body .benfica-layout.mb-modern.up-page .bn-section-head:has(.mb-seg, .up-pick) > h2 { flex: 1 1 auto !important; min-width: min-content !important; white-space: nowrap !important; overflow: visible !important; text-overflow: clip !important; }
    .benfica-layout.mb-modern.up-page .bn-section-head:has(.mb-seg, .up-pick)::after { display: none; }
    .benfica-layout.mb-modern.up-page .bn-section-head:has(.mb-seg, .up-pick) .bn-head-actions { margin-left: auto; }
    .mb-modern .up-mrow:has(.mb-when) { grid-template-columns: 2.3rem minmax(0, 1fr) auto; }
    .mb-modern .up-fm-match { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .mb-modern .up-fm-when { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: .5rem; padding: .35rem 0 0; border-left: 0; border-top: 1px dashed color-mix(in oklab, var(--mb-line) 70%, transparent); }
    .mb-modern .fanmap-name-full { display: none; }
    .mb-modern .fanmap-name-short { display: inline; }
    .mb-modern .up-fm-form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .mb-modern .up-fm-form-grid .is-wide, .mb-modern .up-fm-form-grid .is-full { grid-column: 1 / -1; }
    .mb-modern #fanmap { height: 360px; }
}
@media (max-width: 575.98px) {
    .mb-modern .up-auth-body { padding: .9rem .9rem .9rem; }
    .mb-modern .up-auth-foot { margin: .85rem -.9rem -.9rem; padding: .6rem .9rem; }
    .mb-modern .up-add { flex-wrap: wrap; }
    .mb-modern .up-qr svg { width: 9rem; height: 9rem; }
    .mb-modern .up-add-alt { flex: 1 1 100%; }
    .mb-modern .up-inline-form { padding-left: 0; }
    .mb-modern .up-set .mb-row { grid-template-columns: 2rem minmax(0, 1fr); }
    .mb-modern .up-set .mb-row-side { grid-column: 2; justify-content: flex-start; margin-top: .35rem; }
    .mb-modern .up-export-state { grid-template-columns: 2.6rem minmax(0, 1fr); }
    .mb-modern .up-export-state > .up-export-act { grid-column: 1 / -1; margin-top: .55rem; }
    .mb-modern .up-export-state > .up-export-act .mb-pill { display: flex; width: 100%; }
    .mb-modern .up-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mb-modern .up-charm { flex-wrap: wrap; }
    .mb-modern .up-stats > .up-stat:nth-child(odd):last-child { grid-column: 1 / -1; }
    .mb-modern .up-charm-main { flex: 1 1 calc(100% - 3rem); }
    .mb-modern .up-charm-vs { flex: 1 0 100%; flex-wrap: wrap; white-space: normal; padding-left: 2.6rem; }
    .mb-modern .up-bgrid { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
    .mb-modern .up-mrow .mb-row-side .mb-when { display: none; }
    .mb-modern .up-stepper .up-step > small { display: none; }
    .mb-modern .up-thread-subject { font-size: .94rem; }
    .mb-modern .up-wr-card { flex-basis: 82vw; }
    .mb-modern .up-wr-big { font-size: 3rem; }
}
@media (max-width: 439.98px) {
    .mb-modern .up-hide-xs { display: none; }
    .mb-modern .up-field-pair { grid-template-columns: minmax(0, 1fr); }
    .mb-modern .up-step > b { white-space: normal; overflow: visible; font-size: .68rem; line-height: 1.2; }
    /* A crowded head switch drops to its own full row (My Benfica's #mb-follow rule). */
    .mb-modern .up-auth-row { flex-wrap: wrap; }
    .mb-modern .up-inbox .up-row-acts .up-iconbtn:not(.is-keep) { display: none; }
}
@media (max-width: 379.98px) {
    .benfica-layout.mb-modern.up-page .bn-section-head { gap: .6rem; }
    .benfica-layout.mb-modern.up-page .bn-section-head:has(.mb-seg, .up-pick)::before { display: none; }
    .mb-modern .up-pick { max-width: 8.5rem; }
    .mb-modern .up-stat { padding: .4rem .45rem; gap: .4rem; }
    .mb-modern .up-stat .mb-ico { display: none; }
    .mb-modern .up-heat-bar { width: 2.6rem; }
    .mb-modern .up-fm-side .up-crest { width: 1.8rem; height: 1.8rem; }
    .mb-modern .up-wr-card { padding: 1.3rem .9rem; }
}

/* The account bar has no Online pill; on phones it keeps the social bar's height. */
@media (max-width: 767.98px) {
    .benfica-layout.up-page .sb-topbar:not(:has(.sb-online)) { min-height: 38px; }
}
@media (max-width: 379.98px) {
    .benfica-layout.up-page .sb-topbar:not(:has(.sb-online)) { min-height: 37px; }
}

/* ==========================================================================
   K2. Phone section heads with controls (owner, 5 Oct 2026): the title never
       truncates; below 440px the controls drop to their own full-width row
       under it — a stretched .mb-seg with equal buttons, pickers as compact
       pills at the right end. style.css forces every head to one row with
       !important, so these id-scoped rules are there to win.
   ========================================================================== */
@media (max-width: 439.98px) {
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form, #wr-deck, #fanmap-section) > .bn-section-head:has(> .bn-head-actions) {
        flex-wrap: wrap !important; row-gap: .5rem !important;
    }
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form, #wr-deck, #fanmap-section) > .bn-section-head > h2 {
        flex: 0 1 auto !important; white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
    }
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form, #wr-deck, #fanmap-section) > .bn-section-head::after { display: block !important; }
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form, #wr-deck, #fanmap-section) > .bn-section-head > .bn-head-actions {
        order: 12 !important; flex: 1 0 100% !important; width: 100% !important;
        justify-content: flex-end !important; gap: .4rem !important; padding: 0 !important;
    }
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form) > .bn-section-head > .bn-head-actions > .mb-seg {
        flex: 1 1 auto !important; width: auto !important; max-width: none !important; overflow: visible !important;
    }
    body .benfica-layout.up-page :is(#bc-summary-section, #message-list, #view-message, #compose-message, #reply-form) > .bn-section-head > .bn-head-actions > .mb-seg > .mb-seg-btn {
        flex: 1 1 0 !important; justify-content: center;
    }
    body .benfica-layout.up-page :is(#wr-deck, #fanmap-section) > .bn-section-head > .bn-head-actions > :is(.up-pick, .up-fm-pick) { flex: 1 1 0 !important; max-width: none !important; min-width: 0; }
    body .benfica-layout.up-page #fanmap-section .up-fm-pick .up-pick { flex: 1 1 auto; max-width: none; width: 100%; }
}

/* ==========================================================================
   L. Reduced motion: no entrances, lifts, pulses or count-ups.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .mb-modern .up-wr-card, .mb-modern .up-wr-card.is-on > *, .mb-modern .up-badge, .mb-modern .up-badge.is-new,
    .mb-modern .up-step.is-busy::before, .mb-modern .up-auth-state.is-in .mb-ico,
    .mb-modern .up-export-state.is-busy .mb-ico i, .mb-modern .up-notice.is-shake { animation: none !important; transition: none !important; }
    .mb-modern .up-wr-card { transform: none; opacity: 1; }
    .mb-modern .up-badge:hover, .mb-modern #fanmap-list .fanmap-card:hover { transform: none; }
}
