/*
 * Approved Mem-Moo-Ree Match Mania landing page.
 *
 * This file is intentionally self-contained and theme-isolated. It is loaded
 * only by the plugin-owned full-canvas page template and cannot alter Loot
 * Scoot or any other WordPress page.
 */
html,
body.tbmm-landing-page {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: #163b2b;
}

body.tbmm-landing-page,
body.tbmm-landing-page * {
    box-sizing: border-box;
}

body.tbmm-landing-page {
    position: relative;
    isolation: isolate;
    color: #2f211a;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

/*
 * Commercial full-browser backdrop. The approved landing artwork itself is
 * reused only as a heavily enlarged, softened environmental wash behind the
 * live artboard. The approved composition remains untouched and readable.
 */
body.tbmm-landing-page::before {
    position: fixed;
    z-index: -2;
    inset: -48px;
    content: "";
    background-image: url("../images/TBMM_Landing_Desktop_Approved_v075.webp");
    background-position: center center;
    background-size: cover;
    filter: blur(24px) saturate(.82) brightness(.66);
    transform: scale(1.08);
}

body.tbmm-landing-page::after {
    position: fixed;
    z-index: -1;
    inset: 0;
    content: "";
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 248, 207, .22), transparent 44%),
        linear-gradient(180deg, rgba(13, 61, 49, .18), rgba(9, 38, 29, .58));
}

body.tbmm-landing-page button,
body.tbmm-landing-page input,
body.tbmm-landing-page select,
body.tbmm-landing-page textarea {
    font: inherit;
}

.tbmm-skip-link {
    position: fixed;
    z-index: 100000;
    top: 8px;
    left: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: #08477e;
    font-weight: 900;
    text-decoration: none;
    transform: translateY(-160%);
}

.tbmm-skip-link:focus {
    transform: translateY(0);
}

.tbmm-approved-landing {
    display: grid;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: clamp(14px, 2.2vw, 34px);
    place-items: start center;
    background: transparent;
}

.tbmm-approved-artboard {
    position: relative;
    width: min(100%, 1448px);
    margin: 0 auto;
    aspect-ratio: 1448 / 1086;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: clamp(10px, 1.2vw, 20px);
    background: #eaf5ff;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, .32) inset,
        0 18px 52px rgba(5, 27, 20, .46),
        0 4px 14px rgba(5, 27, 20, .30);
}

.tbmm-approved-picture,
.tbmm-approved-picture img {
    display: block;
    width: 100%;
    height: 100%;
}

.tbmm-approved-picture img {
    object-fit: contain;
    object-position: center top;
    user-select: none;
    -webkit-user-drag: none;
}

.tbmm-approved-hotspots,
.tbmm-approved-live-stats {
    position: absolute;
    inset: 0;
}

.tbmm-hotspot {
    position: absolute;
    z-index: 3;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    outline: 0;
    background: transparent;
    box-shadow: none;
    color: transparent;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/*
 * The illustrated buttons already provide their own visual hover affordance.
 * Mouse hover therefore stays visually transparent; the pointer cursor is the
 * only mouse-over cue. Keyboard users still receive a restrained inset focus
 * ring so the controls remain navigable without exposing the old hotspot box.
 */
.tbmm-hotspot:hover {
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

.tbmm-hotspot:focus-visible {
    outline: 2px solid rgba(245, 180, 0, .72);
    outline-offset: -4px;
    background: transparent;
}

/* Desktop hotspot geometry, recalibrated to the locked 1448 × 1086 artwork. */
.tbmm-hotspot-play-free       { left: 41.644%; top: 32.781%; width: 20.994%; height: 6.262%; }
.tbmm-hotspot-play-solo       { left: 6.077%;  top: 54.328%; width: 19.337%; height: 4.788%; }
.tbmm-hotspot-play-friend     { left: 6.077%;  top: 59.208%; width: 19.337%; height: 4.788%; }
.tbmm-hotspot-kinder          { left: 6.077%;  top: 63.904%; width: 19.337%; height: 4.788%; }
.tbmm-hotspot-half            { left: 6.077%;  top: 68.600%; width: 19.337%; height: 4.788%; }
.tbmm-hotspot-full            { left: 6.077%;  top: 73.297%; width: 19.337%; height: 4.788%; }
.tbmm-hotspot-how             { left: 27.348%; top: 2.486%;  width: 7.735%;  height: 4.236%; }
.tbmm-hotspot-invite          { left: 38.536%; top: 2.486%;  width: 12.983%; height: 4.236%; }
.tbmm-hotspot-feedback-top    { left: 54.972%; top: 2.486%;  width: 9.945%;  height: 4.236%; }
.tbmm-hotspot-about           { left: 66.713%; top: 2.486%;  width: 17.956%; height: 4.236%; }
.tbmm-hotspot-feedback-bottom { left: 62.845%; top: 82.873%; width: 17.127%; height: 5.709%; }
.tbmm-hotspot-facebook        { left: 66.644%; top: 91.989%; width: 3.660%;  height: 4.880%; border-radius: 50%; }
.tbmm-hotspot-instagram       { left: 70.511%; top: 91.989%; width: 3.660%;  height: 4.880%; border-radius: 50%; }
.tbmm-hotspot-youtube         { left: 74.309%; top: 91.989%; width: 3.660%;  height: 4.880%; border-radius: 50%; }
.tbmm-hotspot-email           { left: 78.246%; top: 91.989%; width: 3.660%;  height: 4.880%; border-radius: 50%; }

.tbmm-approved-live-stats {
    z-index: 2;
    pointer-events: none;
}

.tbmm-approved-stat {
    position: absolute;
    display: flex;
    width: 10.2%;
    height: 2.35%;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #2f211a;
    font-size: clamp(12px, 1.25vw, 20px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
}

/* Values align with the printed placeholders in the approved desktop art. */
.tbmm-approved-stat-time  { left: 85.5%; top: 60.0%; }
.tbmm-approved-stat-score { left: 85.5%; top: 65.0%; }
.tbmm-approved-stat-pairs { left: 85.5%; top: 70.0%; }

/* Game modal. */
.tbmm-game-layer,
.tbmm-feedback-layer {
    position: fixed;
    z-index: 99990;
    inset: 0;
    display: grid;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    place-items: center;
}

.tbmm-game-layer[hidden],
.tbmm-feedback-layer[hidden] {
    display: none !important;
}

.tbmm-game-layer-backdrop,
.tbmm-feedback-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 36, 53, .84);
    backdrop-filter: blur(6px);
}

.tbmm-game-layer-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 1280px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    border: 4px solid #fff;
    border-radius: 24px;
    background: #fffaf0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
    overscroll-behavior: contain;
}

.tbmm-game-layer-panel .tbmm-app {
    max-width: none;
}

.tbmm-game-layer-panel .tbmm-shell {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
}

.tbmm-game-layer-close,
.tbmm-feedback-close {
    position: sticky;
    z-index: 50;
    top: 8px;
    float: right;
    display: grid;
    width: 44px;
    height: 44px;
    margin: 8px 8px -52px 0;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #c62b20;
    color: #fff;
    box-shadow: 0 4px 0 #82180f;
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.tbmm-game-layer-close:focus-visible,
.tbmm-feedback-close:focus-visible {
    outline: 4px solid #f5b400;
    outline-offset: 3px;
}

/* Feedback form modal. */
.tbmm-feedback-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 820px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: clamp(20px, 4vw, 40px);
    border: 5px solid #f5b400;
    border-radius: 26px;
    background: #fffaf0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
    overscroll-behavior: contain;
}

.tbmm-feedback-panel h2 {
    margin: 0 56px 8px 0;
    color: #c62b20;
    font-size: clamp(27px, 4vw, 42px);
    line-height: 1.05;
}

.tbmm-feedback-panel > p {
    margin: 0 0 22px;
    color: #4a3b32;
    font-size: 17px;
    font-weight: 700;
}

.tbmm-feedback-form,
.tbmm-feedback-form label {
    display: grid;
    gap: 7px;
}

.tbmm-feedback-form {
    gap: 16px;
}

.tbmm-feedback-form label {
    color: #2f211a;
    font-weight: 900;
}

.tbmm-feedback-form label span {
    color: #6b5e56;
    font-size: 13px;
    font-weight: 700;
}

.tbmm-feedback-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tbmm-feedback-form input,
.tbmm-feedback-form select,
.tbmm-feedback-form textarea {
    width: 100%;
    min-width: 0;
    border: 2px solid #d6b66f;
    border-radius: 11px;
    background: #fff;
    color: #2f211a;
    padding: 11px 12px;
    font-size: 16px;
}

.tbmm-feedback-form textarea {
    resize: vertical;
}

.tbmm-feedback-form input:focus,
.tbmm-feedback-form select:focus,
.tbmm-feedback-form textarea:focus {
    border-color: #1264ae;
    outline: 3px solid rgba(18, 100, 174, .22);
}

.tbmm-feedback-submit {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: #4d9d31;
    color: #fff;
    box-shadow: 0 5px 0 #2f651e;
    font-size: 19px;
    font-weight: 900;
    cursor: pointer;
}

.tbmm-feedback-submit:disabled {
    opacity: .6;
    cursor: wait;
}

.tbmm-feedback-status {
    min-height: 24px;
    margin: 0;
    color: #1264ae;
    font-weight: 900;
}

.tbmm-feedback-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.tbmm-modal-open {
    overflow: hidden !important;
}

@media (max-width: 760px) {
    .tbmm-approved-artboard {
        width: min(100%, 941px);
        aspect-ratio: 941 / 1672;
    }

    /* Mobile hotspot geometry, recalibrated to the locked 941 × 1672 artwork. */
    .tbmm-hotspot-play-free       { left: 47.184%; top: 21.830%; width: 34.006%; height: 4.605%; }
    .tbmm-hotspot-play-solo       { left: 4.251%;  top: 41.268%; width: 36.663%; height: 3.768%; }
    .tbmm-hotspot-play-friend     { left: 4.251%;  top: 45.156%; width: 36.663%; height: 3.768%; }
    .tbmm-hotspot-kinder          { left: 4.251%;  top: 48.864%; width: 36.663%; height: 3.768%; }
    .tbmm-hotspot-half            { left: 4.251%;  top: 52.691%; width: 36.663%; height: 3.768%; }
    .tbmm-hotspot-full            { left: 4.251%;  top: 56.459%; width: 36.663%; height: 3.768%; }
    .tbmm-hotspot-how             { left: 4.251%;  top: 60.287%; width: 36.663%; height: 3.230%; }
    .tbmm-hotspot-invite          { left: 4.251%;  top: 63.636%; width: 36.663%; height: 3.230%; }
    .tbmm-hotspot-feedback-top    { left: 4.251%;  top: 66.986%; width: 36.663%; height: 3.230%; }
    .tbmm-hotspot-about           { display: none; }
    .tbmm-hotspot-feedback-bottom { left: 62.912%; top: 86.423%; width: 27.949%; height: 4.127%; }
    .tbmm-hotspot-facebook        { left: 34.963%; top: 95.514%; width: 4.570%;  height: 2.572%; }
    .tbmm-hotspot-instagram       { left: 42.402%; top: 95.514%; width: 4.570%;  height: 2.572%; }
    .tbmm-hotspot-youtube         { left: 49.947%; top: 95.514%; width: 4.570%;  height: 2.572%; }
    .tbmm-hotspot-email           { left: 57.492%; top: 95.514%; width: 4.570%;  height: 2.572%; }

    .tbmm-approved-stat {
        width: 12.0%;
        height: 2.05%;
        padding: 0;
        border-radius: 0;
        background: rgba(252, 244, 220, .98);
        box-shadow: none;
        font-size: clamp(10px, 3.2vw, 19px);
    }

    /* Cover the printed mobile placeholders and render one centered live value. */
    .tbmm-approved-stat-time  { left: 14.6%; top: 76.35%; }
    .tbmm-approved-stat-score { left: 48.4%; top: 76.35%; }
    .tbmm-approved-stat-pairs { left: 73.2%; top: 76.35%; }

    .tbmm-game-layer,
    .tbmm-feedback-layer {
        padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    }

    .tbmm-game-layer-panel {
        max-height: calc(100dvh - 12px);
        border-width: 2px;
        border-radius: 16px;
    }

    .tbmm-feedback-panel {
        max-height: calc(100dvh - 12px);
        padding: 20px 14px 24px;
        border-width: 3px;
        border-radius: 18px;
    }

    .tbmm-feedback-grid {
        grid-template-columns: 1fr;
    }

    .tbmm-game-layer-close,
    .tbmm-feedback-close {
        width: 42px;
        height: 42px;
        margin: 7px 7px -49px 0;
    }
}

@media (max-width: 430px) {
    .tbmm-hotspot {
        border-radius: 9px;
    }

    .tbmm-approved-stat {
        font-size: clamp(9px, 3.0vw, 14px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tbmm-game-layer-backdrop,
    .tbmm-feedback-backdrop {
        backdrop-filter: none;
    }
}

@media (max-width: 760px) {
    body.tbmm-landing-page::before {
        background-image: url("../images/TBMM_Landing_Mobile_Approved_v075.webp");
        filter: blur(18px) saturate(.82) brightness(.64);
    }

    .tbmm-approved-landing {
        padding: 0;
    }

    .tbmm-approved-artboard {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

/* v0.7.9: slim sticky global Adventure Club header + in-place sign-in */
:root {
    --tbmm-club-header-height: var(--tbac-global-header-height, 44px);
}

.tbmm-club-header {
    position: sticky;
    z-index: 100050;
    top: 0;
    display: flex;
    width: 100%;
    min-height: var(--tbmm-club-header-height);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    border-bottom: 1px solid rgba(42, 77, 53, .22);
    background: rgba(255, 250, 235, .97);
    box-shadow: 0 2px 10px rgba(17, 45, 34, .18);
    backdrop-filter: blur(10px);
}

.admin-bar .tbmm-club-header {
    top: 32px;
}

.tbmm-club-header-brand {
    min-width: 0;
    color: #235b38;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.tbmm-club-header-brand-short {
    display: none;
}

.tbmm-club-header-account {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.tbmm-club-header-status {
    max-width: 330px;
    overflow: hidden;
    color: #584437;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbmm-club-header-signed-out {
    display: flex;
    align-items: center;
    gap: 7px;
}

.tbmm-club-header-signed-out[hidden],
.tbmm-club-header-menu-wrap[hidden],
.tbmm-club-header-menu[hidden] {
    display: none !important;
}

.tbmm-club-header-link,
.tbmm-club-header-profile {
    min-height: 32px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid rgba(25, 93, 57, .28);
    border-radius: 9px;
    background: #fff;
    color: #1e6339;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
}

.tbmm-club-header-join {
    background: #2d7b42;
    color: #fff;
}

.tbmm-club-header-link:hover,
.tbmm-club-header-link:focus-visible,
.tbmm-club-header-profile:hover,
.tbmm-club-header-profile:focus-visible {
    outline: 3px solid #f5b400;
    outline-offset: 2px;
}

.tbmm-club-header-menu-wrap {
    position: relative;
}

.tbmm-club-header-profile {
    display: inline-flex;
    max-width: min(48vw, 260px);
    align-items: center;
    gap: 7px;
    background: #2d7b42;
    color: #fff;
}

.tbmm-club-header-profile > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbmm-club-header-caret {
    flex: 0 0 auto;
    font-size: 14px;
}

.tbmm-club-header-menu {
    position: absolute;
    z-index: 100060;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: min(280px, calc(100vw - 20px));
    overflow: hidden;
    border: 1px solid rgba(55, 76, 45, .25);
    border-radius: 12px;
    background: #fffaf0;
    box-shadow: 0 12px 34px rgba(18, 36, 24, .25);
}

.tbmm-club-header-menu a,
.tbmm-club-header-menu button {
    display: block;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(55, 76, 45, .12);
    border-radius: 0;
    background: transparent;
    color: #2f4f37;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.tbmm-club-header-menu > :last-child {
    border-bottom: 0;
}

.tbmm-club-header-menu a:hover,
.tbmm-club-header-menu a:focus-visible,
.tbmm-club-header-menu button:hover,
.tbmm-club-header-menu button:focus-visible {
    background: #eef8ed;
    outline: 0;
}

/* The Club header occupies its own row, so approved artwork is never covered. */
.tbmm-approved-landing {
    min-height: calc(100vh - var(--tbmm-club-header-height));
}

/* Keep the same global header visible while the game modal is open. */
.tbmm-game-layer,
.tbmm-feedback-layer {
    padding-top: calc(var(--tbmm-club-header-height) + max(12px, env(safe-area-inset-top)));
}

.admin-bar .tbmm-game-layer,
.admin-bar .tbmm-feedback-layer {
    padding-top: calc(var(--tbmm-club-header-height) + 32px + max(12px, env(safe-area-inset-top)));
}

/* The global header replaces the duplicate account strip inside the game shell. */
.tbmm-game-layer-panel .tbmm-club-bar {
    display: none !important;
}

.tbmm-account-layer {
    position: fixed;
    z-index: 100040;
    inset: 0;
    display: grid;
    padding: calc(var(--tbmm-club-header-height) + max(12px, env(safe-area-inset-top))) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    place-items: center;
}

.admin-bar .tbmm-account-layer {
    padding-top: calc(var(--tbmm-club-header-height) + 32px + max(12px, env(safe-area-inset-top)));
}

.tbmm-account-layer[hidden] {
    display: none !important;
}

.tbmm-account-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 36, 53, .84);
    backdrop-filter: blur(6px);
}

.tbmm-account-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: calc(100dvh - var(--tbmm-club-header-height) - 28px);
    overflow: auto;
    padding: clamp(18px, 3vw, 30px);
    border: 5px solid #f5b400;
    border-radius: 24px;
    background: #fffaf0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
    overscroll-behavior: contain;
}

.tbmm-account-close {
    position: sticky;
    z-index: 8;
    top: 0;
    float: right;
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0 0 -42px 12px;
    place-items: center;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #c62b20;
    color: #fff;
    box-shadow: 0 4px 0 #82180f;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.tbmm-account-close:focus-visible {
    outline: 4px solid #1264ae;
    outline-offset: 3px;
}

.tbmm-account-eyebrow {
    margin: 0 54px 5px 0;
    color: #21683b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tbmm-account-panel > h2 {
    margin: 0 54px 8px 0;
    color: #522d1d;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.05;
}

.tbmm-account-intro {
    margin: 0 0 14px;
    color: #4a3b32;
    font-weight: 700;
}

.tbmm-account-login-embed .tbac-shell {
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.tbmm-account-login-embed .tbac-panel {
    max-width: none;
    padding: clamp(16px, 3vw, 26px);
    border-width: 3px;
    box-shadow: none;
}

/* Match Mania owns the return path while this embedded sign-in is open. */
.tbmm-account-login-embed [data-tbac-child-actions] > a:nth-child(2) {
    display: none !important;
}

@media (max-width: 782px) {
    :root {
        --tbmm-club-header-height: 48px;
    }
    .admin-bar .tbmm-club-header {
        top: 46px;
    }
    .admin-bar .tbmm-game-layer,
    .admin-bar .tbmm-feedback-layer,
    .admin-bar .tbmm-account-layer {
        padding-top: calc(var(--tbmm-club-header-height) + 46px + max(10px, env(safe-area-inset-top)));
    }
}

@media (max-width: 760px) {
    .tbmm-club-header {
        gap: 8px;
        padding-block: 6px;
    }

    .tbmm-club-header-brand-full {
        display: none;
    }

    .tbmm-club-header-brand-short {
        display: inline;
    }

    .tbmm-club-header-status {
        display: none;
    }

    .tbmm-club-header-link,
    .tbmm-club-header-profile {
        min-height: 34px;
        padding: 7px 9px;
        font-size: 11px;
    }

    .tbmm-club-header-profile {
        max-width: 52vw;
    }

    .tbmm-game-layer,
    .tbmm-feedback-layer,
    .tbmm-account-layer {
        padding-top: calc(var(--tbmm-club-header-height) + max(10px, env(safe-area-inset-top)));
    }
}

@media (max-width: 430px) {
    .tbmm-club-header-join {
        padding-inline: 8px;
    }

    .tbmm-club-header-brand {
        font-size: 12px;
    }

    .tbmm-club-header-link,
    .tbmm-club-header-profile {
        font-size: 10.5px;
    }
}

/* v0.7.12: continuous, multi-message Club News ticker in the sticky header. */
.tbmm-club-header {
    display: grid;
    grid-template-columns: max-content minmax(120px, 1fr) max-content;
    gap: clamp(10px, 2vw, 22px);
}

.tbmm-club-header-news {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    color: #365a3c;
    font-size: 12px;
    font-weight: 800;
}

.tbmm-club-header-news-label {
    flex: 0 0 auto;
    color: #1e6339;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .025em;
    white-space: nowrap;
}

.tbmm-club-header-news-window {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    border-left: 1px solid rgba(35, 91, 56, .18);
    padding-left: 9px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.tbmm-club-header-news-track {
    --tbmm-news-duration: 28s;
    display: flex;
    width: max-content;
    will-change: transform;
    animation: tbmm-news-ticker var(--tbmm-news-duration) linear infinite;
}

.tbmm-club-header-news-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
}

.tbmm-club-header-news-entry {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.tbmm-club-header-news-item {
    display: inline-block;
    color: #4e3c31;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.tbmm-club-header-news-separator {
    display: inline-block;
    margin: 0 18px;
    color: #b48a24;
    font-size: 10px;
}

.tbmm-club-header-news-item[href]:hover,
.tbmm-club-header-news-item[href]:focus-visible {
    color: #1264ae;
    text-decoration: underline;
    outline: 0;
}

.tbmm-club-header-news:hover .tbmm-club-header-news-track,
.tbmm-club-header-news:focus-within .tbmm-club-header-news-track {
    animation-play-state: paused;
}

@keyframes tbmm-news-ticker {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .tbmm-club-header-news-track {
        animation: none;
        transform: none;
    }
    .tbmm-club-header-news-group[aria-hidden="true"] {
        display: none;
    }
}

@media (max-width: 900px) {
    .tbmm-club-header { gap: 8px; }
    .tbmm-club-header-news-label { font-size: 0; }
    .tbmm-club-header-news-label::before { content: "☘"; font-size: 13px; }
    .tbmm-club-header-news-separator { margin-inline: 12px; }
}

@media (max-width: 620px) {
    .tbmm-club-header {
        grid-template-columns: max-content minmax(36px, 1fr) max-content;
    }
    .tbmm-club-header-news-window {
        padding-left: 6px;
    }
}


/* v0.7.15: unmistakable Adventure Profile save state before gameplay. */
.tbmm-save-state {
    box-sizing: border-box;
    width: min(1120px, calc(100% - 24px));
    margin: 12px auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 2px solid rgba(77, 53, 29, .42);
    border-radius: 12px;
    background: #fff7df;
    color: #3b2a1d;
    font: 800 14px/1.3 Arial, sans-serif;
    text-align: center;
}
.tbmm-save-state.is-signed-in { background: #eef8e9; }
.tbmm-save-state.is-guest { background: #fff0d8; }
.tbmm-save-state-login {
    min-height: 38px;
    padding: 7px 12px;
    border: 2px solid #25552f;
    border-radius: 9px;
    background: #34723e;
    color: #fff;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.tbmm-save-state-login:hover,
.tbmm-save-state-login:focus-visible { background: #285c32; outline: 3px solid #e4bc59; outline-offset: 2px; }
@media (max-width: 620px) {
    .tbmm-save-state { align-items: stretch; flex-direction: column; gap: 8px; font-size: 13px; }
    .tbmm-save-state-login { width: 100%; }
}
