/* Homepage chart tracker: desktop card and a compact mobile disclosure. */
.gh-rak {
    box-sizing: border-box;
    width: clamp(210px, 17vw, 240px);
    margin: 0;
    color: #fff;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
    pointer-events: auto;
}
.gh-rak[hidden], .gh-rak [hidden] { display: none !important; }
.gh-rak-toggle, .gh-rak-close { display: none; }
.gh-rak-content:focus { outline: none; }
#home-hero .gh-rak {
    position: absolute;
    top: clamp(18px, 2vw, 34px);
    right: max(clamp(18px, 3vw, 44px), env(safe-area-inset-right));
    z-index: 5;
}
.gh-rak-logo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 10px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.85));
}
.gh-rak-panel {
    padding: 10px 12px 9px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    background: rgba(19,12,24,.88);
    box-shadow: 0 3px 15px rgba(0,0,0,.12);
}
.gh-rak-table { width: 100%; border-collapse: collapse; color: inherit; }
.gh-rak-table th, .gh-rak-table td { padding: 5px 0; border: 0; line-height: 1.2; vertical-align: middle; }
.gh-rak-table th { text-align: left; font-size: 12px; font-weight: 600; white-space: nowrap; }
.gh-rak-table th small { display: block; color: #d6cddc; font-size: 9px; font-weight: 400; margin-top: 2px; }
.gh-rak-rank { text-align: right; font-size: 20px; font-weight: 750; min-width: 36px; }
.gh-rak-position { text-align: right; }
.gh-rak-position .gh-rak-rank { display: inline-block; }
.gh-rak-peak { display: block; margin-top: 3px; color: #d3c9db; font-size: 10px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
.gh-rak-rank.is-first { color: #7ff3a5; }
.gh-rak-rank.is-unknown { color: #bcb3c3; }
.gh-rak-change { width: 48px; padding-left: 10px !important; text-align: right; font-size: 15px; font-weight: 650; color: #c8bdcf; white-space: nowrap; }
.gh-rak-change.is-up { color: #8beab0; }
.gh-rak-change.is-down { color: #f6a4b2; }
.gh-rak-note { margin: 8px 0 0; color: #d3c9db; font-size: 10px; line-height: 1.5; text-align: center; }
.gh-rak-note.is-warning { color: #f3d29b; }
.gh-rak-result { margin: 9px 0 0; padding: 7px 1px 0; border-top: 1px solid rgba(127,243,165,.35); color: #7ff3a5; font-size: 11px; line-height: 1.35; font-weight: 800; text-align: center; letter-spacing: .035em; }
.gh-rak-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.gh-rak-mobile-slot { display: none; }
@media (max-width: 800px) {
    body.gh-rak-mobile .gh-rak-mobile-slot {
        display: block;
        position: fixed;
        right: max(12px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        z-index: 100;
        box-sizing: border-box;
        pointer-events: none;
    }
    body.gh-menu-open .gh-rak-mobile-slot { visibility: hidden; }
    .gh-rak-mobile-slot .gh-rak { position: relative; width: auto; margin: 0; }
    .gh-rak-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 44px;
        margin: 0;
        padding: 0 14px;
        border: 1px solid rgba(255,255,255,.3);
        border-radius: 999px;
        background: #25162e;
        color: #fff;
        font: 650 13px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        box-shadow: 0 4px 18px rgba(20,10,30,.28);
        cursor: pointer;
        touch-action: manipulation;
    }
    .gh-rak-toggle svg { width: 17px; height: 17px; color: #fff344; flex: 0 0 auto; }
    .gh-rak-toggle.is-rak { border-color: #7ff3a5; color: #7ff3a5; }
    .gh-rak-mobile-slot .gh-rak-content {
        box-sizing: border-box;
        position: absolute;
        right: 0;
        bottom: calc(100% + 10px);
        width: min(272px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));
        max-height: calc(100vh - 148px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
        max-height: calc(100dvh - 148px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px 12px 12px;
        border: 1px solid rgba(255,255,255,.2);
        border-radius: 16px;
        background: #1c111f;
        box-shadow: 0 8px 32px rgba(15,7,25,.3);
    }
    .gh-rak-mobile-slot .gh-rak-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
    .gh-rak-mobile-slot .gh-rak-logo { width: 146px; max-width: calc(100% - 56px); margin: 0; }
    .gh-rak-close {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        margin: 0 -5px 0 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #e4dbe9;
        font: 400 25px/1 sans-serif;
        cursor: pointer;
        touch-action: manipulation;
    }
    .gh-rak-toggle:focus-visible, .gh-rak-close:focus-visible { outline: 2px solid #fff344; outline-offset: 3px; }
    .gh-rak-close:hover { background: rgba(255,255,255,.08); }
    .gh-rak-mobile-slot .gh-rak-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .gh-rak-mobile-slot .gh-rak-table th { font-size: 12px; }
    .gh-rak-mobile-slot .gh-rak-table th small { font-size: 9px; }
    .gh-rak-mobile-slot .gh-rak-table th small:not([data-rak-period]) { display: inline; margin-left: 4px; }
    .gh-rak-mobile-slot .gh-rak-table th, .gh-rak-mobile-slot .gh-rak-table td { padding-block: 5px; }
    .gh-rak-mobile-slot .gh-rak-rank { font-size: 20px; }
    .gh-rak-mobile-slot .gh-rak-change { width: 44px; font-size: 13px; }
}
@media print { .gh-rak, .gh-rak-mobile-slot { display: none !important; } }
