/* Public score centre: app-style bottom navigation. No fixed top header. */
.atd-bottom-nav {
    display: none;
    position: fixed;
    inset: auto 0 0;
    z-index: 50;
    background: #fffdf8;
    border-top: 1px solid #d8cfbb;
    padding: 3px env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    box-shadow: 0 -4px 18px rgba(24,20,12,.10);
    color: #5e594f;
}
.atd-bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
}
.atd-bottom-nav .atd-bottom-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    min-height: 64px;
    min-width: 0;
    padding: 8px 2px 6px;
    color: inherit;
    text-decoration: none;
    text-align: center;
    font-size: .75rem;
    line-height: 1.15;
    font-weight: 700;
    -webkit-tap-highlight-color: transparent;
}
.atd-bottom-nav-icon {display: inline-flex;position: relative;flex: none;line-height: 0;}
.atd-bottom-nav-label {max-width: 100%;overflow-wrap: anywhere;}
.atd-bottom-nav .is-current {color: #765310;background: #f6edd8;}
.atd-bottom-nav .is-current::before {content: '';position: absolute;top: 0;left: calc(50% - 12px);width: 24px;height: 3px;border-radius: 0 0 3px 3px;background: currentColor;}
.atd-bottom-nav-link:focus-visible {outline: 2px solid var(--gold-deep,#9b7426);outline-offset: -3px;border-radius: 5px;}
.atd-bottom-live-count {position: absolute;top: -7px;left: calc(100% - 4px);min-width: 19px;height: 19px;padding: 0 4px;display: inline-flex;align-items: center;justify-content: center;background: #b42630;color: white;border: 1px solid #fffdf8;border-radius: 20px;font-size: 10px;font-weight: 850;line-height: 1;white-space: nowrap;}
.atd-bottom-live-count[hidden] {display: none !important;}
html[data-theme="dark"] .atd-bottom-nav {background: #17191e;border-top-color: #494139;color: #c9c5bd;box-shadow: 0 -4px 18px rgba(0,0,0,.30);}
html[data-theme="dark"] .atd-bottom-nav .is-current {background: #29251b;color: #e9c363;}
html[data-theme="dark"] .atd-bottom-live-count {background:#c7353c;border-color:#17191e;}
/* Reserve real space below all pages, including their footer. ResizeObserver refines
   the CSS fallback for zoom/large text. Safe areas are included in the nav height. */
@media (max-width: 980px), (display-mode: standalone), (display-mode: fullscreen) {
    .atd-bottom-nav {display: block;}
    html body.atd-bottom-nav-page {padding-bottom: var(--atd-bottom-nav-height,calc(76px + env(safe-area-inset-bottom,0px)));}
    html {scroll-padding-bottom: var(--atd-bottom-nav-height,calc(76px + env(safe-area-inset-bottom,0px)));}
    .site-header {position: static;top: auto;}
}
/* Older iOS home-screen apps expose navigator.standalone instead of display-mode. */
html.atd-standalone .atd-bottom-nav {display: block;}
html.atd-standalone body.atd-bottom-nav-page {padding-bottom: var(--atd-bottom-nav-height,calc(76px + env(safe-area-inset-bottom,0px)));}
html.atd-standalone {scroll-padding-bottom: var(--atd-bottom-nav-height,calc(76px + env(safe-area-inset-bottom,0px)));}
html.atd-standalone .site-header {position: static;top: auto;}
@media (max-width: 360px) {
    .atd-bottom-nav .atd-bottom-nav-link {font-size: .68rem;gap: 4px;}
}
