/* Shared site chrome — The Lemonade Game (lavender top bar) */

.tlgSiteHdr {
    flex-shrink: 0;
    background: #a685c4;
    color: #fff;
    padding: 0 18px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 200;
}
.tlgSiteHdrInner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}
.tlgBrand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    min-width: 0;
}
.tlgBrand:hover { filter: brightness(1.05); }
.tlgLogoImg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}
.tlgBrandText { white-space: nowrap; }
.tlgLemonEmoji { font-style: normal; }

.tlgNav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 8px;
    flex: 1 1 auto;
}
.tlgNavlink {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.tlgNavlink:hover {
    background: rgba(255, 255, 255, 0.18);
}
.tlgNavlink--active {
    background: rgba(255, 255, 255, 0.28);
}

/* Mobile: flat Game Board list (no dropdown) */
.tlgNavHubMobile {
    display: none;
}

.navDropdown {
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
}
.navDropBtn {
    background: transparent;
    border: none;
    color: #fff;
    font: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    width: auto;
    max-width: none;
    line-height: 1.2;
    vertical-align: middle;
    box-sizing: border-box;
}
.navDropBtn:hover { background: rgba(255, 255, 255, 0.18); }
.tlgCaret { font-size: 0.65rem; opacity: 0.95; }

/* Dropdown panel — desktop only (see min-width below) */
.navDropMenu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 12px 6px;
    background:
        linear-gradient(180deg, #ffffff 0%, #fcfafd 55%, #f7f2fb 100%);
    color: #1e293b;
    border-radius: 14px;
    box-shadow:
        0 18px 40px rgba(61, 42, 79, 0.16),
        0 2px 0 rgba(255, 255, 255, 0.9) inset;
    border: 1px solid #e4d6f0;
    z-index: 400;
}
.navDropMenu.show {
    display: block;
    columns: 3;
    column-gap: 0;
    column-rule: 1px solid #e8dff0;
}
.navDropItem {
    display: block;
    padding: 8px 12px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: normal;
    border-radius: 8px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}
.navDropItem:hover { background: #f1f5f9; }
.navDropHeading {
    column-span: all;
    padding: 6px 12px 8px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}
.navDropDivider {
    height: 1px;
    margin: 6px 8px;
    background: #e2e8f0;
    column-span: all;
}
.navDropItem--hub {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    margin: 0 4px;
    border-radius: 10px;
    border-bottom: none;
    font-weight: 700;
    box-sizing: border-box;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.navDropItem--hub + .navDropItem--hub {
    margin-top: 2px;
}
.navDropItem--hub:hover {
    background: linear-gradient(90deg, #f4ecfb 0%, #faf6ff 100%);
    box-shadow: 0 1px 0 rgba(166, 133, 196, 0.18);
    transform: translateY(-0.5px);
}
.navDropItem--hub:focus-visible {
    outline: 2px solid #a685c4;
    outline-offset: 1px;
}
.navDropLemon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff7c2 0%, #fde68a 55%, #f6d15a 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 6px rgba(202, 138, 4, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        inset 0 0 0 1px rgba(202, 138, 4, 0.22);
}
.navDropItem--hub:hover .navDropLemon {
    background: linear-gradient(145deg, #fff9d6 0%, #fde047 55%, #f0c42e 100%);
    box-shadow:
        0 3px 8px rgba(202, 138, 4, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.navDropLemon svg {
    display: block;
}
.navDropHubBody {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}
.navDropHubTitle {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    color: #3d2a4f;
    letter-spacing: -0.01em;
}
.navDropItem--hub:hover .navDropHubTitle {
    color: #6d2896;
}
.navDropHubSub {
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.35;
    color: #7c6b8a;
}

.tlgHdrActions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}
.tlgHdrBtn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-weight: 800;
    font-size: 0.86rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.tlgHdrBtn:hover { filter: brightness(0.97); }
.tlgUserHi {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.88);
    margin-right: 4px;
}
.tlgUserHi strong { color: #fff; }
.tlgUserOut {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.tlgUserOut:hover { text-decoration: underline; }

.tlgMenuToggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.tlgMenuToggle:hover { background: rgba(255, 255, 255, 0.28); }
.tlgMenuIcon {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    position: relative;
}
.tlgMenuIcon::before,
.tlgMenuIcon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease;
}
.tlgMenuIcon::before { top: -7px; }
.tlgMenuIcon::after { top: 7px; }
.tlgSiteHdr.isMenuOpen .tlgMenuIcon { background: transparent; }
.tlgSiteHdr.isMenuOpen .tlgMenuIcon::before {
    top: 0;
    transform: rotate(45deg);
}
.tlgSiteHdr.isMenuOpen .tlgMenuIcon::after {
    top: 0;
    transform: rotate(-45deg);
}

.tlgHdrPanel {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 20px;
    min-width: 0;
}

/* Desktop: floating Game Board dropdown — centered under the header */
@media (min-width: 901px) {
    .tlgNavHubMobile {
        display: none !important;
    }
    .navDropMenu {
        position: fixed;
        top: 62px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: min(92vw, 640px);
        width: min(94vw, 860px);
        max-width: min(96vw, 980px);
        max-height: min(72vh, 560px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }
    .navDropMenu.show {
        columns: 3;
    }
}
@media (min-width: 1100px) {
    .navDropMenu.show {
        columns: 4;
        width: min(94vw, 920px);
        max-width: min(96vw, 980px);
    }
}

/* Mobile: hamburger drawer + stacked Game Board links */
@media (max-width: 900px) {
    .tlgSiteHdr {
        padding: 8px 12px;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .tlgSiteHdrInner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 8px 10px;
        width: 100%;
    }
    .tlgBrand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
    .tlgMenuToggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
    }
    .tlgHdrPanel {
        display: none;
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 10px 0 12px;
        gap: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.25);
        margin-top: 2px;
        max-height: calc(100dvh - 64px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .tlgSiteHdr.isMenuOpen .tlgHdrPanel {
        display: flex;
    }
    .tlgNav {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        width: 100%;
        gap: 2px;
    }
    .tlgNavlink {
        width: 100%;
        box-sizing: border-box;
        border-radius: 8px;
        white-space: normal;
    }
    /* Hide desktop dropdown entirely on mobile */
    .tlgNavHubDesktop {
        display: none !important;
    }
    .tlgNavHubMobile {
        display: block;
        width: 100%;
        box-sizing: border-box;
        margin: 6px 0 4px;
    }
    .tlgNavHubMobileLabel {
        font-weight: 700;
        font-size: 0.92rem;
        padding: 8px 14px 4px;
        color: #fff;
    }
    .tlgNavHubMobileList {
        width: 100%;
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 8px;
        max-height: min(55vh, 420px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
        columns: 2;
        column-gap: 0;
        column-rule: 1px solid #e8dff0;
        padding: 4px;
    }
    .tlgNavHubMobileList .navDropHeading {
        column-span: all;
        padding: 8px 10px 6px;
        margin-bottom: 2px;
    }
    .tlgNavHubMobileList .navDropItem--hub {
        padding: 8px 10px;
    }
    .tlgNavHubMobileList .navDropLemon {
        width: 30px;
        height: 30px;
    }
    .tlgNavHubMobileList .navDropHubTitle {
        font-size: 0.8rem;
    }
    .tlgNavHubMobileList .navDropHubSub {
        font-size: 0.7rem;
    }
    .tlgHdrActions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    .tlgHdrBtn,
    .tlgUserOut {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    .tlgUserHi {
        margin-right: 0;
        text-align: center;
    }
    .tlgBrandText {
        font-size: 0.92rem;
    }
}
