:root {
    /* Content row height only; safe-area padding is added separately */
    --bottom-nav-content-height: 60px;
    --bottom-nav-height: var(--bottom-nav-content-height);
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-content-max-width: 600px;
    --bottom-nav-content-width: 95vw;
    --bottom-nav-bg: rgba(17, 24, 39, 0.92);
    --bottom-nav-border: rgba(222, 184, 135, 0.2);
    --bottom-nav-inactive: rgba(156, 163, 175, 0.88);
    --bottom-nav-active: #DEB887;
    --bottom-nav-active-glow: rgba(222, 184, 135, 0.28);
    --table-border-brown: var(--brown, #deb887);
}

bottom-nav {
    display: block;
    width: 100%;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: visible;
    z-index: 10001;
    pointer-events: none;
}

/* Keep room/global styles from overriding nav chrome on game pages */
bottom-nav .bottom-nav__play-logo {
    width: 22px !important;
    height: auto !important;
    filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.25)) !important;
}

bottom-nav .bottom-nav__item--active .bottom-nav__play-logo {
    filter: brightness(0) saturate(100%) invert(78%) sepia(18%) saturate(687%) hue-rotate(346deg) brightness(95%) contrast(90%) drop-shadow(0 0 6px var(--bottom-nav-active-glow)) !important;
}

bottom-nav .bottom-nav__tables-icon {
    width: 23px !important;
    height: 23px !important;
    display: block !important;
    object-fit: contain !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.72;
}

bottom-nav .bottom-nav__item--active .bottom-nav__tables-icon {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(78%) sepia(18%) saturate(687%) hue-rotate(346deg) brightness(95%) contrast(90%) !important;
}

nav.bottom-nav,
.bottom-nav {
    --nav-safe-bottom: max(3.5px, var(--safe-area-inset-bottom));
    /* Hang 2x the bar height below the viewport so browser chrome show/hide cannot flash a gap. */
    --bottom-nav-overhang: calc(2 * var(--bottom-nav-content-height));
    --bottom-nav-visible-height: calc(var(--bottom-nav-content-height) + 3.5px + var(--nav-safe-bottom));
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    z-index: 10000;
    display: block;
    margin: 0;
    pointer-events: auto;
    overflow: visible;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Pin the fade to the button row. The hang below the screen is opaque so the page cannot flash through. */
    background: linear-gradient(
        180deg,
        rgba(36, 48, 68, 0.97) 0,
        var(--bottom-nav-bg) var(--bottom-nav-visible-height),
        #111827 var(--bottom-nav-visible-height),
        #111827 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--bottom-nav-border);
    padding: 3.5px 0 0;
    bottom: calc(-1 * var(--bottom-nav-overhang));
    padding-bottom: calc(var(--nav-safe-bottom) + var(--bottom-nav-overhang));
    box-sizing: border-box;
    min-height: calc(var(--bottom-nav-visible-height) + var(--bottom-nav-overhang));
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.04) inset,
        0 -8px 32px rgba(0, 0, 0, 0.4);
}

.bottom-nav__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    width: var(--bottom-nav-content-width, 95vw);
    max-width: var(--bottom-nav-content-max-width, 600px);
    min-height: var(--bottom-nav-content-height);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    text-decoration: none;
    color: var(--bottom-nav-inactive);
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 1.5px 2px;
    position: relative;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.bottom-nav__item:hover,
.bottom-nav__item:visited {
    color: rgba(209, 213, 219, 0.95);
    text-decoration: none;
}

.bottom-nav__item:active {
    transform: scale(0.96);
}

.bottom-nav__item:focus-visible {
    outline: 2px solid var(--bottom-nav-active);
    outline-offset: 2px;
    border-radius: 3.5px;
}

.bottom-nav__item--active {
    color: var(--bottom-nav-active);
}

.bottom-nav__item--active:hover,
.bottom-nav__item--active:visited {
    color: var(--bottom-nav-active);
}

.bottom-nav__item--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1.8px;
    background: linear-gradient(90deg, transparent, var(--bottom-nav-active), transparent);
    border-radius: 0 0 1.2px 1.2px;
    box-shadow: 0 0 10px var(--bottom-nav-active-glow);
}

.bottom-nav__item--active .bottom-nav__icon {
    color: var(--bottom-nav-active);
    filter: drop-shadow(0 0 6px var(--bottom-nav-active-glow));
}

.bottom-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    color: #e5e7eb;
    transition: color 0.2s ease, filter 0.2s ease;
}

.bottom-nav__label {
    font-size: clamp(7.5px, 2.6vw, 9.5px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
    transition: color 0.2s ease;
}

.bottom-nav__learn-icon,
.bottom-nav__account-icon,
.bottom-nav__standings-icon {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.bottom-nav__tables-icon {
    width: 23px;
    height: 23px;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.72;
}

.bottom-nav__item--active .bottom-nav__tables-icon {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(78%) sepia(18%) saturate(687%) hue-rotate(346deg) brightness(95%) contrast(90%);
}

.bottom-nav__learn-icon {
    display: block;
    shape-rendering: geometricPrecision;
}

.bottom-nav .bottom-nav__play-logo {
    width: 22px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
    transition: filter 0.2s ease;
}

.bottom-nav__item--active .bottom-nav__play-logo {
    filter: brightness(0) saturate(100%) invert(78%) sepia(18%) saturate(687%) hue-rotate(346deg) brightness(95%) contrast(90%) drop-shadow(0 0 6px var(--bottom-nav-active-glow));
}

.bottom-nav__account-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    border: 2px solid var(--bottom-nav-active);
    font-size: 9.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DEB887 0%, #D2B48C 100%);
    color: #8B4513;
}

/* Pending friend requests / table invites: red dot on the avatar's top-right. */
.bottom-nav .bottom-nav-account-icon-slot {
    position: relative;
}

.bottom-nav .bottom-nav__badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid rgba(17, 24, 39, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    line-height: 0;
}

.bottom-nav .bottom-nav__account-btn {
    all: unset;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5px;
    cursor: pointer;
    color: var(--bottom-nav-inactive);
    padding: 3px 1.5px 2px;
    position: relative;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    letter-spacing: inherit !important;
    transition: color 0.2s ease;
}

.bottom-nav .bottom-nav__account-btn:hover {
    color: rgba(209, 213, 219, 0.95);
    transform: none;
    background: none !important;
    box-shadow: none !important;
}

.bottom-nav .bottom-nav__account-btn:active {
    transform: scale(0.96);
    background: none !important;
    box-shadow: none !important;
}

.bottom-nav .bottom-nav__account-btn:focus-visible {
    outline: 2px solid var(--bottom-nav-active);
    outline-offset: 2px;
    border-radius: 3.5px;
    box-shadow: none !important;
}

.bottom-nav .bottom-nav__account-btn.bottom-nav__item--active,
.bottom-nav .bottom-nav__account-btn.bottom-nav__item--active:hover {
    color: var(--bottom-nav-active);
}

.bottom-nav .bottom-nav__account-btn.bottom-nav__item--active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 1.8px;
    background: linear-gradient(90deg, transparent, var(--bottom-nav-active), transparent);
    border-radius: 0 0 1.2px 1.2px;
    box-shadow: 0 0 10px var(--bottom-nav-active-glow);
}

.bottom-nav .bottom-nav__account-btn.bottom-nav__item--active .bottom-nav__icon {
    color: var(--bottom-nav-active);
    filter: drop-shadow(0 0 6px var(--bottom-nav-active-glow));
}

body.body-iframe-mode bottom-nav {
    display: none !important;
}

.bottom-nav__inner:has(.bottom-nav__item--back-game:not(.display-none)) {
    max-width: min(var(--bottom-nav-content-max-width, 600px), 100vw);
    align-items: center;
    overflow: visible;
}

.bottom-nav__item--back-game {
    --bottom-nav-preview-size: 76px;
    flex: 1.35 1 0;
    min-width: 0;
    flex-direction: column;
    align-self: stretch;
    justify-content: flex-end;
    gap: 1px;
    margin: 3px 2px 2px;
    padding: 3px 4px 7px;
    position: relative;
    overflow: visible;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e 0%, #059669 100%);
    border: 1px solid rgba(167, 243, 208, 0.55);
    border-radius: 14px;
    box-shadow:
        0 4px 14px rgba(5, 150, 105, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.bottom-nav__item--back-game:hover,
.bottom-nav__item--back-game:visited {
    color: #ffffff;
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow:
        0 6px 18px rgba(5, 150, 105, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.bottom-nav__item--back-game:active {
    transform: scale(0.97);
}

.bottom-nav__item--back-game::before {
    display: none;
}

.bottom-nav__preview-slot {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    width: var(--bottom-nav-preview-size);
    height: var(--bottom-nav-preview-size);
    transform: translate(-50%, -58%);
    pointer-events: auto;
    cursor: pointer;
}

.bottom-nav__preview-wrap {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 5px;
    border: 1.5px solid color-mix(in srgb, var(--table-border-brown) 38%, rgba(255, 255, 255, 0.45));
    background: rgba(0, 0, 0, 0.22);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    pointer-events: auto;
    cursor: pointer;
}

.bottom-nav__preview-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    background: var(--brown, #5c4033);
}

.bottom-nav__item--back-game .bottom-nav__label {
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.03em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav__item--back-game:focus-visible {
    outline: 2px solid #bbf7d0;
    outline-offset: 2px;
}

.display-none {
    display: none !important;
}

/* Play and Standings slide up over the current page so a game room stays put. */
.nav-sheet {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}
.nav-sheet[hidden] { display: none !important; }
.nav-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 14, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.nav-sheet.is-closing .nav-sheet__backdrop {
    opacity: 0;
    transition: opacity .28s ease;
}
.nav-sheet__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100% - (var(--bottom-nav-content-height, 60px) + 3.5px + max(3.5px, env(safe-area-inset-bottom, 0px))) - max(28px, env(safe-area-inset-top, 0px)));
    margin-bottom: calc(var(--bottom-nav-content-height, 60px) + 3.5px + max(3.5px, env(safe-area-inset-bottom, 0px)));
    background: #151a24;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    animation: nav_sheet_in .34s cubic-bezier(.22, 1, .36, 1);
}
.nav-sheet.is-closing .nav-sheet__panel {
    animation: nav_sheet_out .28s cubic-bezier(.32, .72, 0, 1) forwards;
}
.nav-sheet.nav-sheet--instant .nav-sheet__panel {
    animation: none;
}
.nav-sheet__panel.is-dragging {
    animation: none;
}
@keyframes nav_sheet_in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes nav_sheet_out {
    from { transform: translateY(0); }
    to { transform: translateY(110%); }
}
.nav-sheet__stack {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.nav-sheet__tab {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #151a24;
}
.nav-sheet__tab[hidden] { display: none !important; }
.nav-sheet__stack.is-swapping > .nav-sheet__tab {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
}
.nav-sheet__tab.is-animating {
    transition: transform .34s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}
/* Account keeps its own grip and close, and only grows as tall as its content. */
.nav-sheet--account .nav-sheet__panel {
    height: auto;
    max-height: calc(100% - (var(--bottom-nav-content-height, 60px) + 3.5px + max(3.5px, env(safe-area-inset-bottom, 0px))) - max(28px, env(safe-area-inset-top, 0px)));
}
.nav-sheet--account .nav-sheet__bar {
    display: none;
}
.nav-sheet--account .nav-sheet__stack,
.nav-sheet--account .nav-sheet__tab,
.nav-sheet--account .nav-sheet__body {
    height: auto;
    flex: 0 0 auto;
    overflow: hidden;
}
.nav-sheet--account .nav-sheet__body > user-window.is-account-tab {
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    background: #151a24;
    overflow: hidden;
}
.nav-sheet--account user-window.is-account-tab .acct_overlay,
.nav-sheet--account user-window.is-account-tab .acct_overlay.active {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    display: flex !important;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.nav-sheet--account user-window.is-account-tab .acct_sheet {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto;
    min-height: 0;
    margin: 0;
    padding-bottom: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    animation: none !important;
    transform: none !important;
    overflow: hidden !important;
}
.nav-sheet--account user-window.is-account-tab .sheet_grip {
    display: flex !important;
}
.nav-sheet--account user-window.is-account-tab .profile_view,
.nav-sheet--account user-window.is-account-tab .guest_view,
.nav-sheet--account user-window.is-account-tab .friends_view,
.nav-sheet--account user-window.is-account-tab .account_management,
.nav-sheet--account user-window.is-account-tab .settings_view {
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(100dvh - (var(--bottom-nav-content-height, 60px) + 3.5px + max(3.5px, env(safe-area-inset-bottom, 0px))) - max(28px, env(safe-area-inset-top, 0px)) - 28px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.nav-sheet--account user-window.is-account-tab .profile_view .tab_content {
    overflow: visible;
    min-height: 0;
    flex: 0 0 auto;
}
.nav-sheet--account user-window.is-account-tab .profile_header,
.nav-sheet--account user-window.is-account-tab .edit_header {
    padding-right: 72px;
}
.nav-sheet--account user-window.is-account-tab .profile_top {
    padding-right: 0;
}
.nav-sheet__bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
    height: 76px;
    min-height: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    touch-action: none;
    cursor: grab;
}
.nav-sheet__grip,
.nav-sheet__close {
    pointer-events: auto;
}
.nav-sheet__grip {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    touch-action: none;
}
.nav-sheet__grip::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 36px;
    transform: translate(-50%, -50%);
}
.nav-sheet__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.nav-sheet__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
    box-shadow: none;
    transform: none;
    cursor: pointer;
    transition: background .15s ease;
}
.nav-sheet__close:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    transform: none;
}
.nav-sheet__close svg { width: 18px; height: 18px; }
.nav-sheet__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
}
.nav-sheet__body--frame { overflow: hidden; }
.nav-sheet__body > .app-view {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
}
.nav-sheet__body > .app-view > main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}
/* First line of each tab sits on the same row as the close button.
   The column itself collapses to the sheet and scrolls inside it. */
.nav-sheet__tab #view-tables .main-content,
.nav-sheet__tab #view-standings .main-content,
.nav-sheet__tab #view-learn .main-content,
html.nav-sheet-embed #view-tables .main-content,
html.nav-sheet-embed #view-standings .main-content {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.nav-sheet__body > #view-learn > main {
    align-items: stretch;
}
.nav-sheet__tab #view-learn .main-content {
    align-self: stretch;
    padding: 14px 16px 24px;
    background: #151a24;
    gap: 0.85rem;
}
.nav-sheet__tab #view-learn .info-page-header {
    align-self: stretch;
    width: 100%;
    max-width: none;
    height: 48px;
    min-height: 48px;
    margin: 0 0 8px;
    padding: 0 60px 0 0;
    border-bottom: none;
    gap: 10px;
}
.nav-sheet__tab #view-learn .info-page-title {
    height: 48px;
    font-size: clamp(1.35rem, 4.2vw, 1.7rem);
    line-height: 48px;
    text-align: left;
}
.nav-sheet__tab #view-learn .info-page-logo img {
    width: 32px;
    height: 32px;
}
.nav-sheet__tab #view-tables .main-content,
.nav-sheet__tab #view-standings .main-content,
.nav-sheet__tab #view-learn .main-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.nav-sheet__tab #view-standings .main-content,
html.nav-sheet-embed #view-standings .main-content {
    padding: 0 16px 16px;
    background: #151a24;
}
.nav-sheet__tab .community-tables-section,
html.nav-sheet-embed .community-tables-section {
    padding: 14px 16px 16px;
    box-sizing: border-box;
    background: #151a24;
}
.nav-sheet__tab .ways-to-play-heading-row,
html.nav-sheet-embed .ways-to-play-heading-row {
    justify-content: flex-start;
    text-align: left;
    height: 48px;
    min-height: 48px;
    margin: 0 0 8px;
    padding: 0 60px 0 0;
    box-sizing: border-box;
}
.nav-sheet__tab #ways-to-play-heading,
html.nav-sheet-embed #ways-to-play-heading {
    text-align: left;
}
.nav-sheet__tab #view-standings .leaderboard-account-callout,
html.nav-sheet-embed #view-standings .leaderboard-account-callout {
    align-items: flex-start;
    text-align: left;
    margin: 14px 0 10px;
    padding: 0 60px 0 0;
    gap: 8px;
    box-sizing: border-box;
}
.nav-sheet__tab #view-standings .leaderboard-account-note,
html.nav-sheet-embed #view-standings .leaderboard-account-note {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
}
.nav-sheet__tab #view-standings .leaderboard-account-note .leaderboard-account-symbol,
html.nav-sheet-embed #view-standings .leaderboard-account-note .leaderboard-account-symbol {
    --leaderboard-account-symbol-size: 16px;
    width: 16px;
    height: 16px;
}
.nav-sheet__status {
    margin: 0;
    padding: 2.5rem 1rem;
    text-align: center;
    color: rgba(243, 244, 246, 0.72);
    font-size: 16px;
}
#app-tab-views { display: none !important; }
.nav-sheet__frame {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #151a24;
    pointer-events: auto;
    overflow: auto;
}
.nav-sheet__frame[hidden] { display: none !important; }
html.nav-sheet-open,
html.nav-sheet-open body {
    overflow: hidden;
}
html.nav-sheet-embed body {
    padding-top: 0.5rem;
    padding-bottom: 1.25rem;
}
html.install-sheet-embed body {
    min-height: 100%;
    background: #151a24;
    padding-bottom: 1.25rem !important;
}
html.install-sheet-embed .install-page {
    padding-top: 4.5rem;
}
html.install-sheet-embed bottom-nav,
html.install-sheet-embed login-manager,
html.install-sheet-embed user-window {
    display: none !important;
}
@media (min-width: 900px) {
    .nav-sheet__panel {
        width: min(960px, 100%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .nav-sheet__panel,
    .nav-sheet.is-closing .nav-sheet__panel,
    .nav-sheet.is-closing .nav-sheet__backdrop,
    .nav-sheet__tab.is-animating {
        animation: none;
        transition: none;
    }
}

/* Centered confirm before Home leaves a live game. */
.leave-game {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    pointer-events: auto;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.leave-game__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 14, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.leave-game__card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    padding: 28px 22px 22px;
    background: #151a24;
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    text-align: center;
    animation: leave_game_card_in .28s cubic-bezier(.22, 1, .36, 1);
}
.leave-game__title {
    margin: 0;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: none;
}
.leave-game__actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}
.leave-game__btn {
    appearance: none;
    flex: 1 1 0;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    cursor: pointer;
    transform: none;
    box-shadow: none;
}
.leave-game__btn--stay {
    background: rgba(255, 255, 255, 0.05);
    color: #f3f4f6;
}
.leave-game__btn--stay:hover,
.leave-game__btn--stay:focus-visible {
    background: rgba(255, 255, 255, 0.09);
    transform: none;
    box-shadow: none;
}
.leave-game__btn--leave {
    background: #ef4444;
    color: #fff;
    border-color: transparent;
}
.leave-game__btn--leave:hover,
.leave-game__btn--leave:focus-visible {
    background: #dc2626;
    transform: none;
    box-shadow: none;
}
.leave-game__btn:focus-visible {
    outline: 2px solid #F5DEB3;
    outline-offset: 2px;
}
html.leave-game-open,
html.leave-game-open body {
    overflow: hidden;
}
@keyframes leave_game_card_in {
    from { transform: translateY(10px) scale(.985); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .leave-game__card { animation: none; }
}
