/* ============================================================
   TNMobileMenu - Modern Mobile Menu
   Bottom-sheet, drill-down, iOS Settings + Spotify aesthetic.
   Paired with portal/web/js/mobile-menu.js.
   ============================================================ */

:root {
    /* Sheet sits ABOVE every typical adhesion ad (PubNation tops out around
       ~999998 in practice; we go one higher). */
    --tn-mm-z-overlay: 1499998;
    --tn-mm-z-sheet:   1499999;

    /* Apple spring physics */
    --tn-mm-spring: cubic-bezier(0.32, 0.72, 0, 1);

    /* Geometry */
    --tn-mm-radius:        14px;
    --tn-mm-radius-sheet:  22px;
    --tn-mm-row-h:         52px;
    --tn-mm-gap:           12px;

    /* Surfaces (light) */
    --tn-mm-bg:            #f5f4f8;
    --tn-mm-card:          #ffffff;
    --tn-mm-card-hover:    #f5f5f7;
    --tn-mm-card-active:   #ececef;
    --tn-mm-text:          #111;
    --tn-mm-text-dim:      #6b6b76;
    --tn-mm-divider:       rgba(0, 0, 0, 0.07);
    --tn-mm-shadow:        0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.03);
    --tn-mm-shadow-elev:   0 -16px 48px rgba(0,0,0,0.35);
    --tn-mm-icon-color:    var(--site-primary, #522D80);
    --tn-mm-accent:        var(--site-secondary, #F56600);
}

html.dark-mode {
    --tn-mm-bg:            #14101c;
    --tn-mm-card:          #1f1a2c;
    --tn-mm-card-hover:    #271f38;
    --tn-mm-card-active:   #2d2440;
    --tn-mm-text:          #f4f3f8;
    --tn-mm-text-dim:      rgba(255, 255, 255, 0.55);
    --tn-mm-divider:       rgba(255, 255, 255, 0.07);
    --tn-mm-shadow:        0 1px 2px rgba(0,0,0,0.4);
    --tn-mm-shadow-elev:   0 -24px 64px rgba(0,0,0,0.6);
    /* Icon color: slightly lightened brand-secondary so the row icons clear
       WCAG AA against the dark `#14101c` surface. Brand purple (#522D80) on
       this background renders ~3:1, which is muddy. We mix 60% brand + 40%
       white to lift it to ~6:1 while staying unmistakably "in family."
       The plain hex line is a fallback for browsers without color-mix(). */
    --tn-mm-icon-color:    #9b7fc7;
    --tn-mm-icon-color:    color-mix(in srgb, var(--site-secondary, #522D80) 60%, white);
    --tn-mm-accent:        var(--site-secondary, #522D80);
}

/* ============================================================
   Material Symbols Outlined — base class. Falls back to the
   already-loaded Material Icons font (same icon name set) until
   Material Symbols arrives over the wire, so we never flash
   placeholder text.
   ============================================================ */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined', 'Material Icons', 'Arial Unicode MS', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================================================
   Source markup is never rendered. The TNMobileMenu engine
   parses #my-menu (kept in the DOM for SEO + the legacy markup
   contract), then renders a fresh sheet into <body>. Hiding it
   unconditionally avoids a one-frame flash of the bare <ul>
   between paint and DOMContentLoaded.
   ============================================================ */
#my-menu,
nav#my-menu { display: none !important; }

/* ============================================================
   Wrapper
   ============================================================ */
.tn-mm {
    position: fixed;
    inset: 0;
    z-index: var(--tn-mm-z-sheet);
    visibility: hidden;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
}
.tn-mm[data-state="opening"],
.tn-mm[data-state="open"],
.tn-mm[data-state="closing"] {
    visibility: visible;
    pointer-events: auto;
}

.tn-mm * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   Backdrop
   ============================================================ */
.tn-mm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 400ms var(--tn-mm-spring);
    z-index: 1;
}
.tn-mm[data-state="open"] .tn-mm__backdrop { opacity: 1; }
.tn-mm[data-state="closing"] .tn-mm__backdrop { opacity: 0; }

/* ============================================================
   Sheet
   ============================================================ */
.tn-mm__sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    /* Explicit height (not just max-height) so the inner flex column has
       a real container to fill — `.tn-mm__panels` holds absolutely
       positioned children, so it has zero intrinsic height and would
       otherwise collapse, leaving the sheet looking like just a header. */
    height: 92vh;
    height: 92dvh;
    max-height: 92vh;
    max-height: 92dvh;
    background: var(--tn-mm-bg);
    color: var(--tn-mm-text);
    border-radius: var(--tn-mm-radius-sheet) var(--tn-mm-radius-sheet) 0 0;
    box-shadow: var(--tn-mm-shadow-elev);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 500ms var(--tn-mm-spring);
    overflow: hidden;
    /* Safe area for the iPhone home indicator */
    padding-bottom: env(safe-area-inset-bottom, 0px);
    will-change: transform;
}
.tn-mm[data-state="open"] .tn-mm__sheet { transform: translateY(0); }

/* Pill handle */
.tn-mm__handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.18);
    z-index: 3;
}
html.dark-mode .tn-mm__handle { background: rgba(255, 255, 255, 0.22); }

/* ============================================================
   Header
   ============================================================ */
.tn-mm__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 12px 10px;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
}

.tn-mm__back,
.tn-mm__close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 0;
    background: rgba(0, 0, 0, 0.05);
    color: var(--tn-mm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 150ms ease, transform 100ms ease;
    flex: 0 0 auto;
    padding: 0;
}
/* The HTML `hidden` attribute is normally `display: none` from the UA
   stylesheet, but any explicit `display` rule beats it. Force it back so
   the back chevron is actually invisible on the root panel. */
.tn-mm__back[hidden],
.tn-mm__close[hidden] {
    display: none !important;
}
html.dark-mode .tn-mm__back,
html.dark-mode .tn-mm__close {
    background: rgba(255, 255, 255, 0.08);
}
.tn-mm__back:hover,
.tn-mm__close:hover { background: rgba(0, 0, 0, 0.1); }
html.dark-mode .tn-mm__back:hover,
html.dark-mode .tn-mm__close:hover { background: rgba(255, 255, 255, 0.14); }
.tn-mm__back:active,
.tn-mm__close:active { transform: scale(0.94); }

.tn-mm__back .material-symbols-outlined,
.tn-mm__close .material-symbols-outlined {
    font-size: 22px;
    line-height: 1;
}

.tn-mm__title {
    flex: 1 1 auto;
    margin: 0;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--tn-mm-text);
    letter-spacing: -0.01em;
    line-height: 1.2;
    /* Prevent header rocking when title swaps */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

/* Root-level title ("Menu") is redundant visually, but we keep the H2 text
   in DOM for screen readers because the dialog uses aria-labelledby. */
.tn-mm__title--root {
    color: transparent;
}

/* ============================================================
   Search
   ============================================================ */
.tn-mm__search-wrap {
    position: relative;
    margin: 4px 16px 12px;
    flex: 0 0 auto;
}
.tn-mm__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tn-mm-text-dim);
    font-size: 22px;
    pointer-events: none;
    line-height: 1;
}
.tn-mm__search {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 44px;
    border-radius: 12px;
    border: 0;
    background: rgba(0, 0, 0, 0.05);
    color: var(--tn-mm-text);
    font-family: inherit;
    /* 16px prevents iOS Safari from auto-zooming on focus */
    font-size: 16px;
    line-height: 1.2;
    outline: 0;
    transition: background 150ms ease, box-shadow 150ms ease;
    -webkit-appearance: none;
    appearance: none;
}
html.dark-mode .tn-mm__search {
    background: rgba(255, 255, 255, 0.06);
}
.tn-mm__search::placeholder { color: var(--tn-mm-text-dim); opacity: 1; }
.tn-mm__search::-webkit-search-cancel-button { display: none; }
.tn-mm__search:focus {
    background: var(--tn-mm-card);
    box-shadow: 0 0 0 3px var(--tn-mm-accent);
}

.tn-mm__search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    border: 0;
    color: var(--tn-mm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
html.dark-mode .tn-mm__search-clear { background: rgba(255, 255, 255, 0.12); }
.tn-mm__search-clear .material-symbols-outlined { font-size: 16px; line-height: 1; }

/* ============================================================
   Panels container — drill-down stage
   ============================================================ */
.tn-mm__panels {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
}

.tn-mm__panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 4px 16px 24px;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 350ms var(--tn-mm-spring), opacity 250ms ease;
    pointer-events: none;
    will-change: transform, opacity;
}
.tn-mm__panel--active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}
.tn-mm__panel--leaving-left {
    transform: translateX(-25%);
    opacity: 0;
}
.tn-mm__panel--leaving-right {
    transform: translateX(25%);
    opacity: 0;
}
.tn-mm__panel--entering-right {
    transform: translateX(100%);
    opacity: 0;
    transition: none !important;
}
.tn-mm__panel--entering-left {
    transform: translateX(-100%);
    opacity: 0;
    transition: none !important;
}

/* ============================================================
   User card (top of root panel)
   ============================================================ */
.tn-mm__user-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin: 8px 0 var(--tn-mm-gap);
    border-radius: var(--tn-mm-radius);
    background: linear-gradient(
        135deg,
        var(--site-primary, #522D80) 0%,
        var(--site-primary-dark, #3d2160) 100%
    );
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(82, 45, 128, 0.25);
    transition: transform 150ms ease, box-shadow 150ms ease;
}
.tn-mm__user-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(82, 45, 128, 0.32);
}
.tn-mm__user-card:active { transform: scale(0.99); }

.tn-mm__user-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}
.tn-mm__user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: block;
}
.tn-mm__user-avatar--default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tn-mm__user-avatar--default .material-symbols-outlined {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.85);
}

.tn-mm__user-tmail-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: var(--tn-mm-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
    padding: 0 6px;
    box-shadow: 0 0 0 2px var(--site-primary, #522D80);
}

.tn-mm__user-meta {
    flex: 1 1 auto;
    min-width: 0;
}
.tn-mm__user-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.tn-mm__user-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
}
.tn-mm__user-level {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--tn-mm-accent);
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
    line-height: 1.4;
}
.tn-mm__user-xp {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
    min-width: 40px;
}
.tn-mm__user-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #fff, var(--tn-mm-accent));
    border-radius: 3px;
    transition: width 600ms ease;
}
.tn-mm__user-xp-text {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    flex: 0 0 auto;
}

.tn-mm__user-card .tn-mm__row-chevron {
    color: rgba(255, 255, 255, 0.55);
    flex: 0 0 auto;
}

/* ============================================================
   Auth (logged-out) buttons
   ============================================================ */
.tn-mm__auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 8px 0 var(--tn-mm-gap);
}
.tn-mm__auth-btn {
    height: 48px;
    border-radius: var(--tn-mm-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.tn-mm__auth-btn--primary {
    background: var(--site-primary, #522D80);
    color: #fff;
    box-shadow: 0 4px 12px rgba(82, 45, 128, 0.25);
}
.tn-mm__auth-btn--primary:hover { transform: translateY(-1px); }
.tn-mm__auth-btn--ghost {
    background: var(--tn-mm-card);
    color: var(--tn-mm-text);
    box-shadow: var(--tn-mm-shadow);
}

/* ============================================================
   Group cards
   ============================================================ */
.tn-mm__group {
    margin-bottom: var(--tn-mm-gap);
    border-radius: var(--tn-mm-radius);
    background: var(--tn-mm-card);
    overflow: hidden;
    box-shadow: var(--tn-mm-shadow);
}
.tn-mm__group-title {
    padding: 14px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tn-mm-text-dim);
}
.tn-mm__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tn-mm__item + .tn-mm__item .tn-mm__row {
    border-top: 1px solid var(--tn-mm-divider);
}

/* ============================================================
   Rows (links and drill buttons share .tn-mm__row)
   ============================================================ */
.tn-mm__row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: var(--tn-mm-row-h);
    padding: 11px 14px;
    background: transparent;
    border: 0;
    color: var(--tn-mm-text);
    font: inherit;
    font-size: 16px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: background 100ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.tn-mm__row:hover { background: var(--tn-mm-card-hover); }
.tn-mm__row:active { background: var(--tn-mm-card-active); }
.tn-mm__row:focus-visible {
    outline: 2px solid var(--tn-mm-accent);
    outline-offset: -2px;
}

/* Override site-wide link colors that would otherwise paint our row labels
   orange. common.css sets `html.dark-mode a { color: var(--dm-accent-text) }`
   (specificity 0,1,2) and `a { color: var(--site-secondary) }` (0,0,1), so we
   need to win in both light and dark with a class-bumped selector. */
.tn-mm__sheet a.tn-mm__row,
.tn-mm__sheet a.tn-mm__row:link,
.tn-mm__sheet a.tn-mm__row:visited,
.tn-mm__sheet a.tn-mm__row:hover,
.tn-mm__sheet a.tn-mm__row:focus,
.tn-mm__sheet a.tn-mm__row:active {
    color: var(--tn-mm-text);
}
html.dark-mode .tn-mm__sheet a.tn-mm__row,
html.dark-mode .tn-mm__sheet a.tn-mm__row:link,
html.dark-mode .tn-mm__sheet a.tn-mm__row:visited,
html.dark-mode .tn-mm__sheet a.tn-mm__row:hover,
html.dark-mode .tn-mm__sheet a.tn-mm__row:focus,
html.dark-mode .tn-mm__sheet a.tn-mm__row:active {
    color: var(--tn-mm-text);
}

/* Same site-link override for the branded anchor surfaces (user card + upgrade
   banner). They carry their own background and need to stay white. */
.tn-mm__sheet a.tn-mm__user-card,
.tn-mm__sheet a.tn-mm__user-card:link,
.tn-mm__sheet a.tn-mm__user-card:visited,
.tn-mm__sheet a.tn-mm__user-card:hover,
.tn-mm__sheet a.tn-mm__upgrade,
.tn-mm__sheet a.tn-mm__upgrade:link,
.tn-mm__sheet a.tn-mm__upgrade:visited,
.tn-mm__sheet a.tn-mm__upgrade:hover,
html.dark-mode .tn-mm__sheet a.tn-mm__user-card,
html.dark-mode .tn-mm__sheet a.tn-mm__user-card:link,
html.dark-mode .tn-mm__sheet a.tn-mm__user-card:visited,
html.dark-mode .tn-mm__sheet a.tn-mm__user-card:hover,
html.dark-mode .tn-mm__sheet a.tn-mm__upgrade,
html.dark-mode .tn-mm__sheet a.tn-mm__upgrade:link,
html.dark-mode .tn-mm__sheet a.tn-mm__upgrade:visited,
html.dark-mode .tn-mm__sheet a.tn-mm__upgrade:hover {
    color: #fff;
}

.tn-mm__row-icon {
    flex: 0 0 auto;
    width: 28px;
    text-align: center;
    color: var(--tn-mm-icon-color);
    font-size: 22px;
    line-height: 1;
    /* Material Symbols Outlined axes */
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.tn-mm__row-label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tn-mm__row-crumb {
    font-size: 12px;
    color: var(--tn-mm-text-dim);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-mm__row-chevron {
    flex: 0 0 auto;
    font-size: 22px;
    color: var(--tn-mm-text-dim);
    line-height: 1;
}

/* Active page accent (left brand-secondary bar — purple on TigerNet) */
.tn-mm__row[aria-current="page"] {
    background: var(--tn-mm-card-hover);
}
.tn-mm__row[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--tn-mm-accent);
}
.tn-mm__row[aria-current="page"] .tn-mm__row-label {
    font-weight: 700;
}

/* ============================================================
   Upgrade banner (orange CTA)
   ============================================================ */
.tn-mm__upgrade {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 0 0 var(--tn-mm-gap);
    border-radius: var(--tn-mm-radius);
    background: linear-gradient(135deg, var(--site-secondary, #F56600), #ff8a3a);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(245, 102, 0, 0.32);
    transition: transform 150ms ease, box-shadow 150ms ease;
    min-height: var(--tn-mm-row-h);
}
.tn-mm__upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(245, 102, 0, 0.4);
}
.tn-mm__upgrade:active { transform: scale(0.99); }
.tn-mm__upgrade-icon {
    font-size: 24px;
    line-height: 1;
}
.tn-mm__upgrade-text {
    flex: 1 1 auto;
    line-height: 1.2;
}
.tn-mm__upgrade-arrow {
    font-size: 20px;
    line-height: 1;
    opacity: 0.85;
    transition: transform 150ms ease;
}
.tn-mm__upgrade:hover .tn-mm__upgrade-arrow { transform: translateX(2px); }

/* ============================================================
   Search empty state
   ============================================================ */
.tn-mm__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--tn-mm-text-dim);
    padding: 40px 16px;
    font-size: 14px;
    gap: 12px;
}
.tn-mm__empty .material-symbols-outlined {
    font-size: 40px;
    opacity: 0.5;
}
/* When the empty state is followed by the persistent site-search row, we
   trim the vertical padding so the user's eye flows from "no menu match"
   straight into the escalation CTA without a yawning gap. */
.tn-mm__empty--compact {
    padding: 28px 16px 16px;
}
.tn-mm__empty--compact .material-symbols-outlined {
    font-size: 32px;
}

/* ============================================================
   Site-search escape hatch (Spotlight-style "Search <site> for X")
   Rendered as the last group inside the search results panel. We
   intentionally drop the surrounding card chrome (no background, no
   shadow, no border) and rely on a single hairline top divider plus
   brand-purple text to signal "this is an exit ramp, not another menu
   item." Mirrors the macOS Spotlight / Slack quickswitcher convention.
   ============================================================ */
.tn-mm__group--site-search {
    margin-top: 8px;
    padding-top: 8px;
    background: transparent;
    box-shadow: none;
    border: 0;
    border-top: 1px solid var(--tn-mm-divider);
    border-radius: 0;
}
.tn-mm__row--site-search {
    color: var(--tn-mm-icon-color);
    font-weight: 600;
}
.tn-mm__row--site-search .tn-mm__row-label {
    color: inherit;
}
.tn-mm__row--site-search .tn-mm__row-icon {
    color: var(--tn-mm-icon-color);
}
.tn-mm__row--site-search .tn-mm__row-chevron {
    color: var(--tn-mm-icon-color);
    opacity: 0.85;
    transition: transform 150ms ease;
}
.tn-mm__row--site-search:hover .tn-mm__row-chevron,
.tn-mm__row--site-search:focus-visible .tn-mm__row-chevron {
    transform: translateX(3px);
}

/* ============================================================
   Footer (sign out)
   ============================================================ */
.tn-mm__footer {
    margin-top: 6px;
    padding: 8px 0 4px;
    text-align: center;
}
.tn-mm__footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--tn-mm-text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 150ms ease, background 150ms ease;
}
.tn-mm__footer-link:hover {
    color: var(--tn-mm-text);
    background: var(--tn-mm-card);
}
.tn-mm__footer-link .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

/* ============================================================
   Body lock while open
   ============================================================ */
body.tn-mm-open {
    overflow: hidden !important;
    /* Prevent iOS Safari rubber-banding the page underneath */
    position: relative;
    touch-action: none;
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .tn-mm__sheet,
    .tn-mm__backdrop,
    .tn-mm__panel {
        transition: opacity 200ms ease !important;
    }
    .tn-mm__sheet { transform: translateY(0) !important; }
    .tn-mm[data-state="closed"] .tn-mm__sheet,
    .tn-mm[data-state="closing"] .tn-mm__sheet {
        opacity: 0;
        pointer-events: none;
    }
    .tn-mm[data-state="opening"] .tn-mm__sheet,
    .tn-mm[data-state="open"] .tn-mm__sheet {
        opacity: 1;
    }
    .tn-mm__panel {
        transform: translateX(0) !important;
    }
    .tn-mm__panel:not(.tn-mm__panel--active) {
        opacity: 0;
        pointer-events: none;
    }
    .tn-mm__upgrade-arrow { transition: none !important; }
}

/* ============================================================
   Hide above tablet — desktop has its own nav
   ============================================================ */
@media (min-width: 1025px) {
    .tn-mm { display: none !important; }
    body.tn-mm-open {
        overflow: auto !important;
        touch-action: auto;
    }
}

/* ============================================================
   Tablet width clamp — keep the sheet from spanning too wide,
   but stay anchored to the bottom edge so swipe-to-dismiss
   (which writes translateY inline) keeps working.
   ============================================================ */
@media (min-width: 600px) {
    .tn-mm__sheet {
        max-width: 540px;
        left: 50%;
        right: auto;
        margin-left: -270px;
    }
}
