/**
 * Global chrome of layout-site/master.blade.php (docs/revamp/README.md): the header with the main
 * navigation, the modules mega-menu and the account menu (layout-site/header.blade.php), its mobile panel,
 * the favorite routes drawer (layout-site/partials/routes-drawer.blade.php) and the footer
 * (layout-site/footer.blade.php).
 *
 * Only the semantic tokens of master.css and the page gutter of media-kit.css (loaded on every page), so it
 * renders in every theme.
 * Behavior: public/js/components/site-chrome.js; the dropdowns are Bootstrap's.
 */

/* ================== HEADER ================== */
.app-header {
    --header-h: 72px;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface-0) 94%, transparent);
    backdrop-filter: saturate(140%) blur(12px);
    transition: box-shadow 0.2s ease;
}

.app-header.is-scrolled {
    box-shadow: 0 16px 28px -18px rgba(0, 0, 0, 0.95);
}

.app-header-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    height: var(--header-h);
    padding-inline: var(--page-inset);
}

.app-brand {
    display: flex;
    flex: none;
    align-items: center;
    gap: 10px;
    color: var(--text-1);
    text-decoration: none;
}

.app-brand:hover {
    color: var(--text-1);
}

.app-brand:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.app-brand-icon {
    display: block;
    width: 34px;
    height: 34px;
}

.app-brand-name {
    padding-top: 4px;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: var(--font-display-weight);
    line-height: 30px;
    letter-spacing: 0.06em;
}

.app-header-menu {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

/* ================== NAVIGATION ================== */
.app-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-nav-item {
    position: relative;
}

/* The mega-menu spans the header, so its item does not hold the panel */
.app-nav-item.is-mega {
    position: static;
}

.app-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 20px;
    background: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    color: var(--text-secondary, var(--text-2));
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

/* Icons only in the mobile panel */
.app-nav-link > i:first-child {
    display: none;
}

.app-nav-link:hover,
.app-nav-link[aria-expanded="true"] {
    color: var(--text-1);
}

.app-nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-nav-link.is-active {
    font-weight: 700;
    color: var(--text-1);
}

/* The current area is underlined on the header's bottom edge */
.app-nav-link.is-active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: calc((40px - var(--header-h)) / 2);
    left: 12px;
    height: 2px;
    border-radius: 1px;
    background: var(--accent);
}

.app-caret {
    font-size: 10px;
    transition: transform 0.15s ease;
}

[aria-expanded="true"] > .app-caret {
    transform: rotate(180deg);
}

/* Number badge (social unread, friend requests) */
.app-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--on-accent);
}

/* ================== MENUS ================== */
/* Bootstrap dropdowns with data-bs-display="static": the panel sits right under the header's edge */
.app-header .app-menu {
    min-width: 236px;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.85);
    font-size: 14px;
    color: var(--text-1);
}

.app-header .app-menu[data-bs-popper] {
    top: calc(100% + (var(--header-h) - 40px) / 2);
    margin: 0;
}

.app-menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-header .app-menu .app-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: none;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    color: var(--text-secondary, var(--text-2));
    text-decoration: none;
}

.app-header .app-menu .app-menu-item > i:first-child {
    flex: none;
    width: 18px;
    font-size: 13px;
    text-align: center;
    color: var(--text-2);
}

.app-header .app-menu .app-menu-item:hover,
.app-header .app-menu .app-menu-item:focus {
    background: var(--surface-3);
    color: var(--text-1);
}

.app-header .app-menu .app-menu-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.app-header .app-menu .app-menu-item[aria-current] {
    color: var(--text-1);
}

.app-header .app-menu .app-menu-item[aria-current] > i:first-child,
.app-header .app-menu .app-menu-item.is-accent > i:first-child {
    color: var(--accent);
}

.app-header .app-menu .app-menu-item.is-disabled {
    opacity: 0.55;
    cursor: default;
}

.app-header .app-menu .app-menu-item.is-disabled:hover {
    background: none;
    color: var(--text-secondary, var(--text-2));
}

.app-header .app-menu .app-menu-item.is-danger,
.app-header .app-menu .app-menu-item.is-danger > i:first-child {
    color: var(--danger);
}

.app-header .app-menu .app-menu-item.is-danger:hover,
.app-header .app-menu .app-menu-item.is-danger:focus {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
}

.app-menu-item .app-count,
.app-menu-note,
.app-menu-external {
    margin-left: auto;
}

.app-menu-note {
    font-size: 12px;
    color: var(--text-2);
}

.app-menu-external {
    font-size: 11px;
    color: var(--text-2);
}

.app-menu-divider {
    margin: 6px 4px;
    border: 0;
    border-top: 1px solid var(--line);
    opacity: 1;
}

/* ================== MODULES MEGA-MENU ================== */
.app-header .app-mega {
    width: 100%;
    padding: 0;
    border-width: 0 0 1px;
    border-color: var(--line);
    border-radius: 0;
    background: var(--surface-1);
    box-shadow: 0 32px 60px -24px rgba(0, 0, 0, 0.9);
}

.app-header .app-mega[data-bs-popper] {
    top: 100%;
    right: 0;
    left: 0;
}

.app-mega-inner {
    padding: 16px var(--page-inset) 18px;
}

.app-mega-kicker {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-2);
}

.app-mega-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-mega-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-0);
    transition: border-color 0.15s ease;
}

/* Module color along the left edge */
.app-mega-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--module);
    pointer-events: none;
}

.app-mega-card:hover,
.app-mega-card:focus-within {
    border-color: color-mix(in srgb, var(--module) 65%, transparent);
}

.app-header .app-mega .app-mega-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 14px;
    border-radius: 0;
    background: none;
    white-space: normal;
    color: var(--text-1);
    text-decoration: none;
}

.app-header .app-mega a.app-mega-link:hover,
.app-header .app-mega a.app-mega-link:focus {
    background: var(--surface-2);
    color: var(--text-1);
}

.app-mega-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 2px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: var(--font-display-weight);
    line-height: 1;
    letter-spacing: 0.02em;
}

.app-mega-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--module);
}

.app-mega-meta {
    font-size: 12.5px;
    line-height: 18px;
    color: var(--text-2);
}

.app-mega-card.is-locked .app-mega-link {
    opacity: 0.5;
    cursor: default;
}

.app-header .app-mega .app-mega-top {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: none;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 18px;
    white-space: normal;
    color: var(--text-2);
    text-decoration: none;
}

.app-mega-top i {
    font-size: 11px;
    color: var(--accent);
}

.app-header .app-mega .app-mega-top:hover,
.app-header .app-mega .app-mega-top:focus {
    background: var(--surface-2);
    color: var(--text-1);
}

.app-header .app-mega .app-mega-link:focus-visible,
.app-header .app-mega .app-mega-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* ================== TOOLS: LANGUAGE, ACCOUNT, GUEST ================== */
.app-header-tools {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.app-account-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-1);
    cursor: pointer;
}

.app-account-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 24px;
}

.app-account-avatar {
    --avatar-size: 38px;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--text-1) 55%, transparent);
    transition: box-shadow 0.15s ease;
}

.app-account-button:hover .app-account-avatar,
.app-account-button[aria-expanded="true"] .app-account-avatar {
    box-shadow: 0 0 0 2px var(--accent);
}

/* The red dot of the photo (M-012, M-013): an unread notification or a pending friend request; the counts are
   inside the account menu, on "Notificações" and "Amigos" (js/site/social/notifications.js lights it live) */
.app-account-dot {
    position: absolute;
    top: -3px;
    left: 30px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--surface-0);
    pointer-events: none;
}

/* The same dot on the menu button, which shows only below 992px, where the photo is inside the panel; out while the
   panel is open, since the photo there carries it */
.app-menu-button {
    position: relative;
}

.app-menu-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--surface-0);
    pointer-events: none;
}

.app-account-dot[hidden],
.app-menu-dot[hidden],
.app-menu-button[aria-expanded="true"] .app-menu-dot,
.app-count[hidden] {
    display: none;
}

.app-account-label {
    display: none;
}

.app-header .app-account-menu {
    min-width: 280px;
}

.app-account-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 10px 10px 14px;
    border-bottom: 1px solid var(--line);
}

.app-account-head .account-avatar {
    --avatar-size: 44px;
}

.app-account-who {
    min-width: 0;
}

.app-account-name,
.app-account-email {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-account-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
    color: var(--text-1);
}

.app-account-email {
    font-size: 12.5px;
    line-height: 18px;
    color: var(--text-2);
}

.app-guest {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-menu-button {
    display: none;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: none;
    font-size: 18px;
    color: var(--text-1);
    cursor: pointer;
}

.app-menu-button:hover,
.app-menu-button[aria-expanded="true"] {
    border-color: var(--text-2);
    background: var(--surface-2);
}

.app-menu-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ================== QUICK SEARCH BUTTONS ================== */
/* Open components/dialogs/quick-search: a field-like pill among the tools and, below 992px, an icon next to
   the menu button (the tools move into the menu panel there) */
.app-search-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 10px;
    height: 40px;
    margin: 0;
    padding: 0 10px 0 17px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface-1) 70%, transparent);
    font-family: var(--font-body);
    font-size: 13.5px;
    color: var(--text-2);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.app-search-button:hover {
    border-color: var(--text-2);
    color: var(--text-1);
}

.app-search-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.app-search-label {
    min-width: 96px;
    text-align: left;
}

.app-search-kbd {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 7px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--surface-2);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: var(--text-2);
}

/* The two shortcuts in bold, the "or" between them in the text weight */
.app-search-kbd b {
    font-weight: 700;
}

.app-search-kbd-or {
    text-transform: lowercase;
}

.app-search-button.is-compact {
    display: none;
}

@media (max-width: 1279.98px) {
    .app-header-tools .app-search-button {
        justify-content: center;
        width: 40px;
        padding: 0;
    }

    .app-search-label,
    .app-search-kbd {
        display: none;
    }
}

@media (max-width: 1279.98px) {
    .app-header-inner {
        gap: 24px;
    }

    .app-nav-link {
        padding: 0 10px;
    }

    .app-header-tools {
        gap: 16px;
    }

    .app-lang > i {
        display: none;
    }

    .app-mega-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ================== MOBILE PANEL ================== */
@media (max-width: 991.98px) {
    .app-header {
        --header-h: 64px;
    }

    .app-header-inner {
        gap: 16px;
    }

    .app-brand-name {
        font-size: 26px;
        line-height: 26px;
    }

    .app-brand-icon {
        width: 30px;
        height: 30px;
    }

    .app-menu-button {
        display: inline-flex;
    }

    .app-header-tools .app-search-button {
        display: none;
    }

    .app-search-button.is-compact {
        display: inline-flex;
        justify-content: center;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 0;
        border-radius: 22px;
        background: none;
        font-size: 16px;
        color: var(--text-1);
    }

    .app-search-button.is-compact + .app-menu-button {
        margin-left: 0;
    }

    .app-header-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - var(--header-h));
        max-height: calc(100dvh - var(--header-h));
        padding: 4px var(--page-inset) 28px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-bottom: 1px solid var(--line);
        background: var(--surface-0);
        box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.9);
    }

    .app-header-menu.is-open {
        display: flex;
    }

    .app-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .app-nav-link {
        width: 100%;
        height: 54px;
        padding: 0 4px;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        font-size: 16px;
    }

    .app-nav-link > i:first-child {
        display: inline-block;
        width: 26px;
        font-size: 15px;
        color: var(--text-2);
    }

    .app-nav-link.is-active > i:first-child {
        color: var(--accent);
    }

    .app-nav-link.is-active::after {
        display: none;
    }

    .app-nav-link .app-caret {
        margin-left: auto;
    }

    .app-header .app-menu[data-bs-popper] {
        position: static;
        width: 100%;
        margin: 8px 0 12px;
        border-color: var(--line);
        background: var(--surface-1);
        box-shadow: none;
    }

    .app-header .app-mega {
        border-width: 1px;
        border-radius: var(--radius);
    }

    .app-mega-inner {
        padding: 12px;
    }

    .app-mega-kicker {
        display: none;
    }

    .app-mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .app-mega-name {
        font-size: 21px;
    }

    .app-header .app-mega .app-mega-link {
        padding: 14px 12px 12px;
    }

    .app-header .app-mega .app-mega-top {
        padding: 8px 12px;
    }

    .app-header-tools {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
    }

    .app-account {
        order: -1;
    }

    .app-account-button {
        width: 100%;
        height: 64px;
        gap: 12px;
        padding: 0 4px;
        border-bottom: 1px solid var(--line);
    }

    .app-account-label {
        display: block;
        min-width: 0;
        overflow: hidden;
        font-size: 16px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-account-button .app-caret {
        margin-left: auto;
    }

    .app-account-dot {
        top: 6px;
        left: 32px;
    }

    .app-account-head {
        display: none;
    }

    .app-header .app-account-menu {
        min-width: 0;
    }

    .app-lang {
        justify-content: center;
        padding: 20px 0 4px;
        font-size: 13px;
    }

    .app-lang > i {
        display: inline-block;
    }

    .app-guest {
        order: -1;
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
    }

    .app-guest .kit-button {
        flex: 1;
        justify-content: center;
    }
}

/* ================== FAVORITE ROUTES DRAWER ================== */
.routes-drawer-toggle {
    position: fixed;
    top: 50%;
    left: 0;
    z-index: 1025;
    display: grid;
    place-items: center;
    width: 24px;
    height: 64px;
    margin: -32px 0 0;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: var(--surface-2);
    font-size: 12px;
    color: var(--text-1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: width 0.15s ease, color 0.15s ease;
}

.routes-drawer-toggle:hover,
.routes-drawer-toggle:focus-visible {
    width: 30px;
    color: var(--accent);
}

.routes-drawer-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.routes-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    width: min(320px, 86vw);
    border-right: 1px solid var(--line);
    background: var(--surface-1);
    box-shadow: 24px 0 48px -24px rgba(0, 0, 0, 0.9);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

.routes-drawer.is-open {
    visibility: visible;
    transform: none;
    transition: transform 0.25s ease;
}

.routes-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 16px 22px;
    border-bottom: 1px solid var(--line);
}

.routes-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding-top: 3px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: var(--font-display-weight);
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--text-1);
}

.routes-drawer-title i {
    font-size: 16px;
    color: var(--accent);
}

.routes-drawer-close {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: none;
    color: var(--text-1);
    cursor: pointer;
}

.routes-drawer-close:hover {
    background: var(--surface-3);
}

.routes-drawer-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.routes-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 10px 24px;
}

.routes-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 18px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: var(--text-2);
}

.routes-drawer-empty i {
    font-size: 26px;
    color: var(--line-strong);
}

.routes-drawer-empty p {
    margin: 0;
}

.routes-drawer-game {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: left;
    color: var(--text-1);
    cursor: pointer;
}

.routes-drawer-game > i:first-child {
    color: var(--module-game);
}

.routes-drawer-game span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.routes-drawer-game .app-caret {
    color: var(--text-2);
}

.routes-drawer-game:hover {
    background: var(--surface-2);
}

.routes-drawer-game:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.routes-drawer-game.is-current {
    color: var(--accent);
}

.routes-drawer-tabs {
    margin: 0 0 6px;
    padding: 0 0 0 20px;
    list-style: none;
}

.routes-drawer-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-left: 1px solid var(--line);
    font-size: 13.5px;
    line-height: 20px;
    color: var(--text-secondary, var(--text-2));
    text-decoration: none;
}

.routes-drawer-tab i {
    width: 16px;
    font-size: 12px;
    text-align: center;
    color: var(--text-2);
}

.routes-drawer-tab:hover {
    color: var(--text-1);
    background: var(--surface-2);
}

.routes-drawer-tab[aria-current] {
    border-left: 2px solid var(--accent);
    color: var(--text-1);
    font-weight: 600;
}

.routes-drawer-tab:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.routes-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(5, 5, 7, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.routes-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

@media (max-width: 767.98px) {
    .routes-drawer-toggle {
        width: 18px;
        height: 56px;
        margin-top: -28px;
        font-size: 10px;
    }

    .routes-drawer-toggle:hover {
        width: 18px;
    }
}

/* ================== FOOTER ================== */
.app-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: var(--surface-0);
    color: var(--text-2);
}

.app-footer-inner {
    padding: 56px var(--page-inset) 28px;
}

.app-footer-top {
    display: grid;
    grid-template-columns: minmax(240px, 1.3fr) minmax(0, 4fr);
    gap: 48px 64px;
}

.app-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.app-footer-brand .app-brand-icon {
    width: 40px;
    height: 40px;
}

.app-footer-brand .app-brand-name {
    font-size: 28px;
    line-height: 28px;
}

.app-footer-about {
    max-width: 320px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.app-footer-support i {
    color: var(--accent);
}

.app-footer-social {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer-social a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    color: var(--text-secondary, var(--text-2));
    text-decoration: none;
}

.app-footer-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.app-footer-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 32px 24px;
}

.app-footer-title {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-1);
}

.app-footer-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-footer-link,
.app-footer-muted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    font-size: 14px;
    line-height: 20px;
}

.app-footer-link {
    color: var(--text-2);
    text-decoration: none;
}

.app-footer-link:hover {
    color: var(--text-1);
}

.app-footer-link:focus-visible,
.app-footer-social a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.app-footer-link[aria-current] {
    color: var(--text-1);
}

.app-footer-link .app-menu-external {
    margin: 0;
    font-size: 10px;
}

.app-footer-muted {
    color: color-mix(in srgb, var(--text-2) 60%, transparent);
}

.app-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 28px;
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    line-height: 20px;
}

.app-footer-bottom p {
    margin: 0;
}

.app-footer-version {
    font-variant-numeric: tabular-nums;
}

.app-footer-credits {
    flex: 1 0 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 11px;
    line-height: 16px;
    color: var(--text-2);
    text-align: right;
}

.app-footer-credits-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-footer-credits-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-footer-credit {
    display: inline-flex;
    align-items: center;
    color: var(--text-2);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.app-footer-credit:hover,
.app-footer-credit:focus-visible {
    opacity: 1;
    color: var(--text-1);
}

.app-footer-credit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.app-footer-credit-logo {
    display: block;
    width: auto;
    height: 10px;
}

.app-footer-credits-note {
    max-width: 640px;
    opacity: 0.75;
}

@media (max-width: 1199.98px) {
    .app-footer-top {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-footer-about {
        max-width: 560px;
    }
}

@media (max-width: 767.98px) {
    .app-footer {
        margin-top: 56px;
    }

    .app-footer-inner {
        padding-top: 40px;
    }

    .app-footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 16px;
    }

    .app-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-footer-credits {
        align-items: flex-start;
        text-align: left;
    }
}
