body.rhythm-mode {
    --sh-ground: #090E18;
    --sh-panel: #131C2B;
    --sh-stage-lift: #0C1220;
    --sh-card: #1B2536;
    --sh-control-rgb: 36, 48, 68;
    --sh-control-hi-rgb: 47, 62, 86;
    --sh-scrim-rgb: 6, 10, 18;
    --sh-on-light: #0B1119;
    --sh-line: rgba(198, 216, 244, 0.14);
    --sh-line-2: rgba(198, 216, 244, 0.28);
    --sh-text: #F1F5FB;
    --sh-dim: rgba(226, 235, 248, 0.72);
    --sh-faint: rgba(226, 235, 248, 0.56);
    --sh-gold: #D9B87C;
    --sh-ok: #5FCB8A;
    --sh-warn: #E5B45C;
    --sh-alert: #E08A4A;
    --sh-radius: 10px;
    --sh-radius-sm: 6px;
}

/* ============================================================
   1. HEADER AND STAGE TABS
   ============================================================ */

body.rhythm-mode .start-header {
    background: transparent;
    border-bottom: 1px solid var(--sh-line);
    box-shadow: none;
    padding: 10px 0 14px;
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
}

body.rhythm-mode .start-header__title {
    color: var(--sh-text);
    font-weight: 600;
    letter-spacing: 0.22em;
}

body.rhythm-mode .bible-progress-link {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.55);
    color: var(--sh-dim);
    box-shadow: none;
    opacity: 1;
    font-size: 0.78rem;
}

body.rhythm-mode .bible-progress-link:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.9);
    border-color: var(--sh-line-2);
    color: var(--sh-text);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .stage-tab {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.5);
    color: var(--sh-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 8px 15px;
}

body.rhythm-mode .stage-tab:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.92);
    border-color: var(--sh-line-2);
    color: var(--sh-text);
    transform: none;
}

body.rhythm-mode .stage-tabs {
    justify-content: safe center;
}

body.rhythm-mode .stage-tab--active,
body.rhythm-mode .stage-tab.active {
    background: var(--sh-gold);
    border-color: var(--sh-gold);
    color: var(--sh-on-light);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body.rhythm-mode .stage-tab--active:hover,
body.rhythm-mode .stage-tab.active:hover {
    background: var(--sh-gold);
    border-color: var(--sh-gold);
    color: var(--sh-on-light);
}

body.rhythm-mode .stage-tab--locked {
    opacity: 0.42;
}

body.rhythm-mode .start-screen {
    background: linear-gradient(168deg, #111A28 0%, var(--sh-ground) 100%);
}

body.rhythm-mode .song-section-title {
    color: var(--sh-text);
}

body.rhythm-mode .song-section-count,
body.rhythm-mode .start-footer__hint {
    color: var(--sh-faint);
}

/* ============================================================
   2. STAGE BANNER
   ============================================================ */

body.rhythm-mode .start-screen-inner {
    gap: 8px;
}

body.rhythm-mode .start-header {
    padding: 6px 0 8px;
}

body.rhythm-mode .stage-tabs {
    padding: 4px 0;
    margin-bottom: 2px;
}

body.rhythm-mode #beatmapContainer,
body.rhythm-mode .song-grid-container {
    align-items: stretch;
}

body.rhythm-mode .song-grid {
    align-self: stretch;
    width: 100%;
    align-content: safe center;
    padding: 10px 8px 14px;
}

body.rhythm-mode .stage-banner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    column-gap: 14px;
    row-gap: 2px;
    min-height: 0;
    height: auto;
    padding: 11px 24px 10px;
    margin-bottom: 0;
    background: linear-gradient(180deg, rgba(var(--sh-scrim-rgb), 0.6) 0%, rgba(var(--sh-scrim-rgb), 0.12) 100%);
    border-bottom: 1px solid var(--sh-line);
}

body.rhythm-mode .stage-banner__title {
    color: var(--sh-gold);
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0;
}

body.rhythm-mode .stage-banner__subtitle {
    color: var(--sh-dim);
    font-size: 0.76rem;
    margin: 0;
}

body.rhythm-mode .song-grid-container.has-stage-background {
    border-radius: var(--sh-radius);
    border: 1px solid var(--sh-line);
    background-color: var(--sh-stage-lift);
    background-blend-mode: screen;
}

/* ============================================================
   3. THE SONG TILE
   ============================================================ */

body.rhythm-mode .beatmap-tile {
    position: relative;
    height: auto;
    max-height: none;
    min-height: 232px;
    overflow: hidden;
    border-radius: var(--sh-radius);
    border: 1px solid var(--sh-line);
    padding: 0 13px 13px;
    gap: 0;
    justify-content: flex-start;
    background-color: var(--sh-card);
    background-image: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

body.rhythm-mode .beatmap-tile>* {
    flex-shrink: 0;
}

body.rhythm-mode .beatmap-tile::before {
    content: '';
    display: block;
    flex: 0 0 172px;
    margin: 0 -13px;
    background-color: var(--sh-card);
    background-image: var(--tile-art, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--sh-line);
}

body.rhythm-mode .beatmap-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 173px;
    pointer-events: none;
    background: linear-gradient(180deg,
            rgba(6, 10, 16, 0) 0%,
            rgba(6, 10, 16, 0) 34%,
            rgba(8, 13, 20, 0.62) 66%,
            rgba(9, 14, 21, 0.9) 100%);
}

body.rhythm-mode .beatmap-tile:hover {
    border-color: var(--sh-line-2);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

body.rhythm-mode .song-grid-container.has-stage-background .beatmap-tile,
body.rhythm-mode .song-grid-container.has-stage-background .beatmap-tile:hover {
    border: 1px solid var(--sh-line);
}

body.rhythm-mode .song-grid-container.has-stage-background .beatmap-tile:hover {
    border-color: var(--sh-line-2);
}

/* ---- title and duration ride the foot of the artwork ---- */

body.rhythm-mode .beatmap-info {
    position: static;
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 0;
}

body.rhythm-mode .beatmap-title {
    position: absolute;
    bottom: calc(100% - 144px);
    left: 13px;
    right: 13px;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    max-height: 2.56em;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.28;
    text-align: left;
    margin: 0;
    text-shadow: 0 1px 7px rgba(0, 0, 0, 0.9);
}

body.rhythm-mode .beatmap-meta {
    position: absolute;
    top: 146px;
    left: 13px;
    right: 13px;
    z-index: 2;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    width: auto;
    pointer-events: none;
}

body.rhythm-mode .beatmap-meta-row {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
    gap: 6px;
    justify-content: flex-start;
}

body.rhythm-mode .beatmap-meta-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.56rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95);
}

body.rhythm-mode .beatmap-meta-value {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.95);
}

/* ---- difficulty as one segmented control ---- */

body.rhythm-mode .beatmap-tile .beatmap-difficulty-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-height: 0;
    gap: 5px;
    margin-top: 2px;
}

body.rhythm-mode .beatmap-tile .beatmap-difficulty-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: nowrap;
    height: 15px;
    min-height: 15px;
    max-height: 15px;
    overflow: hidden;
    margin-bottom: 0;
    gap: 10px;
}

body.rhythm-mode .beatmap-difficulty-label {
    color: var(--sh-faint);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
}

body.rhythm-mode .beatmap-difficulty-level {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
}

body.rhythm-mode .difficulty-level-stars {
    color: var(--song-accent, var(--sh-text));
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}

body.rhythm-mode .difficulty-level-score {
    color: var(--sh-faint);
    font-size: 0.6rem;
    font-variant-numeric: tabular-nums;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.rhythm-mode .beatmap-difficulty-label {
    flex: 0 0 auto;
}

body.rhythm-mode .beatmap-difficulty-level,
body.rhythm-mode .difficulty-level-name {
    color: var(--sh-dim);
    font-size: 0.64rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.06em;
    text-shadow: none;
    opacity: 1;
}

body.rhythm-mode .difficulty-level-name.is-placeholder {
    color: var(--sh-faint);
    font-weight: 500;
}

body.rhythm-mode .beatmap-difficulty-toggle {
    display: flex;
    gap: 0;
    padding: 0;
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius-sm);
    background: rgba(var(--sh-scrim-rgb), 0.55);
    overflow: hidden;
}

body.rhythm-mode .difficulty-toggle-option {
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    border-radius: 0;
    border-right: 1px solid var(--sh-line);
    background: transparent;
    color: var(--sh-dim);
}

body.rhythm-mode .difficulty-toggle-option:last-child {
    border-right: 0;
}

body.rhythm-mode .difficulty-toggle-option:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--sh-text);
    transform: none;
}

body.rhythm-mode .difficulty-toggle-option.selected,
body.rhythm-mode .difficulty-toggle-option[aria-checked="true"] {
    background: var(--sh-text);
}

body.rhythm-mode .difficulty-toggle-option.selected .difficulty-toggle-option-text,
body.rhythm-mode .difficulty-toggle-option[aria-checked="true"] .difficulty-toggle-option-text {
    color: var(--sh-on-light);
}

body.rhythm-mode .difficulty-toggle-option.disabled {
    opacity: 0.34;
}

body.rhythm-mode .difficulty-toggle-option-text {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

body.rhythm-mode .difficulty-toggle-option-input:focus-visible+.difficulty-toggle-option-text {
    outline: 2px solid var(--sh-text);
    outline-offset: 2px;
    border-radius: 3px;
    padding: 0;
}

/* ---- tile actions: two icon actions and one primary ---- */

body.rhythm-mode .beatmap-buttons {
    display: grid;
    grid-template-columns: 34px 34px minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    margin-top: auto;
}

body.rhythm-mode .tile-button {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.85);
    color: var(--sh-dim);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 8px;
    height: 34px;
    text-shadow: none;
    box-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.rhythm-mode .tile-button.is-icon-action {
    padding: 0;
}

body.rhythm-mode .tile-button:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-line-2);
    color: var(--sh-text);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .scriptures-button {
    background: rgba(var(--sh-control-rgb), 0.85);
    border-color: var(--sh-line);
    color: var(--sh-dim);
}

body.rhythm-mode .play-button {
    background: color-mix(in srgb, var(--song-accent, var(--sh-text)) 92%, #FFFFFF);
    border: 1px solid color-mix(in srgb, var(--song-accent, var(--sh-text)) 92%, #FFFFFF);
    color: var(--sh-on-light);
    box-shadow: none;
    text-shadow: none;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

body.rhythm-mode .play-button:hover {
    filter: brightness(1.08);
    background: color-mix(in srgb, var(--song-accent, var(--sh-text)) 92%, #FFFFFF);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .play-button.awaiting-difficulty {
    background: rgba(var(--sh-control-rgb), 0.5);
    border: 1px dashed var(--sh-line-2);
    color: var(--sh-dim);
    opacity: 1;
    box-shadow: none;
}

body.rhythm-mode .tile-button .icon-inline,
body.rhythm-mode .tile-button img {
    width: 15px;
    height: 15px;
    margin: 0;
}

body.rhythm-mode .tile-button.is-icon-action .icon-inline,
body.rhythm-mode .tile-button.is-icon-action img {
    width: 17px;
    height: 17px;
    opacity: 0.82;
}

body.rhythm-mode .tile-button.is-icon-action:hover .icon-inline,
body.rhythm-mode .tile-button.is-icon-action:hover img {
    opacity: 1;
}

/* ============================================================
   4. THE STATS SCREEN
   ============================================================ */

body.rhythm-mode .stats-screen::before {
    opacity: 0.5;
    filter: blur(14px) saturate(1.1);
}

body.rhythm-mode .stats-screen::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(6, 10, 16, 0.62) 0%, rgba(6, 10, 16, 0.86) 100%);
}

body.rhythm-mode .stats-content {
    position: relative;
    z-index: 1;
}

body.rhythm-mode .stats-card {
    height: 100%;
    border-radius: var(--sh-radius);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.82);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

body.rhythm-mode .stats-score-highlight {
    border-radius: var(--sh-radius);
    border: 1px solid var(--sh-line-2);
    background: rgba(var(--sh-control-rgb), 0.86);
}

body.rhythm-mode .end-song-button {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.8);
    color: var(--sh-dim);
    box-shadow: none;
    letter-spacing: 0.1em;
}

body.rhythm-mode .end-song-button:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-line-2);
    color: var(--sh-text);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .play-again-button {
    background: var(--song-accent, var(--sh-text));
    border-color: var(--song-accent, var(--sh-text));
    color: var(--sh-on-light);
}

body.rhythm-mode .play-again-button:hover {
    filter: brightness(1.12);
    background: var(--song-accent, var(--sh-text));
    color: var(--sh-on-light);
}

/* ============================================================
   5. SHARED MODAL SURFACE
   ============================================================ */

body.rhythm-mode .unlock-modal,
body.rhythm-mode .difficulty-select-modal,
body.rhythm-mode .rhythm-daily-limit-modal,
body.rhythm-mode .premium-upgrade-modal-overlay .premium-upgrade-modal,
body.rhythm-mode .rhythm-settings-modal,
body.rhythm-mode .tutorial-card {
    background: linear-gradient(165deg, rgba(35, 47, 67, 0.985) 0%, rgba(19, 28, 43, 0.99) 100%);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.7);
    backdrop-filter: none;
    color: var(--sh-dim);
}

body.rhythm-mode .pause-modal,
body.rhythm-mode .scriptures-modal {
    border-radius: var(--sh-radius);
    border: 1px solid var(--sh-line-2);
}

body.rhythm-mode .unlock-modal-overlay,
body.rhythm-mode .difficulty-select-overlay,
body.rhythm-mode .rhythm-daily-limit-modal-overlay,
body.rhythm-mode .premium-upgrade-modal-overlay,
body.rhythm-mode .rhythm-settings-overlay,
body.rhythm-mode .scriptures-modal-overlay,
body.rhythm-mode .pause-modal-overlay,
body.rhythm-mode .calibration-overlay {
    background: rgba(4, 8, 13, 0.9);
    backdrop-filter: blur(10px);
}

body.rhythm-mode .premium-upgrade-modal-overlay .premium-upgrade-modal {
    display: block;
    position: static;
    inset: auto;
    z-index: auto;
}

body.rhythm-mode .unlock-modal-title,
body.rhythm-mode .difficulty-select-title,
body.rhythm-mode .rhythm-daily-limit-modal-title,
body.rhythm-mode .premium-modal-title,
body.rhythm-mode .pause-modal-title,
body.rhythm-mode .tutorial-card-title {
    color: var(--sh-text);
    letter-spacing: 0.12em;
}

body.rhythm-mode .unlock-modal-button,
body.rhythm-mode .rhythm-daily-limit-btn,
body.rhythm-mode .premium-cancel-btn,
body.rhythm-mode .pause-modal-button,
body.rhythm-mode .scriptures-button,
body.rhythm-mode .difficulty-select-cancel {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.8);
    color: var(--sh-dim);
    box-shadow: none;
    letter-spacing: 0.08em;
}

body.rhythm-mode .unlock-modal-button:hover,
body.rhythm-mode .rhythm-daily-limit-btn:hover,
body.rhythm-mode .premium-cancel-btn:hover,
body.rhythm-mode .pause-modal-button:hover,
body.rhythm-mode .difficulty-select-cancel:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-line-2);
    color: var(--sh-text);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .premium-upgrade-btn,
body.rhythm-mode .premium-upgrade-button,
body.rhythm-mode .premium-upgrade-button-large,
body.rhythm-mode .rhythm-daily-limit-btn-upgrade,
body.rhythm-mode .unlock-modal-button.primary,
body.rhythm-mode .pause-modal .resume-button,
body.rhythm-mode .difficulty-select-play {
    background: var(--sh-gold);
    border: 1px solid var(--sh-gold);
    color: var(--sh-on-light);
    box-shadow: none;
}

body.rhythm-mode .premium-upgrade-btn:hover,
body.rhythm-mode .premium-upgrade-button:hover,
body.rhythm-mode .premium-upgrade-button-large:hover,
body.rhythm-mode .rhythm-daily-limit-btn-upgrade:hover,
body.rhythm-mode .unlock-modal-button.primary:hover,
body.rhythm-mode .pause-modal .resume-button:hover,
body.rhythm-mode .difficulty-select-play:hover {
    filter: brightness(1.08);
    background: var(--sh-gold);
    border-color: var(--sh-gold);
    color: var(--sh-on-light);
    transform: none;
    box-shadow: none;
}

body.rhythm-mode .pause-modal .back-button {
    background: rgba(var(--sh-control-rgb), 0.8);
    border-color: rgba(255, 122, 106, 0.3);
    color: rgba(255, 150, 136, 0.9);
}

body.rhythm-mode .pause-modal .back-button:hover {
    background: rgba(255, 122, 106, 0.14);
    border-color: rgba(255, 122, 106, 0.6);
    color: #FF9688;
}

body.rhythm-mode .keyboard-hint,
body.rhythm-mode .tutorial-key {
    background: transparent;
    border: 1px solid var(--sh-line-2);
    border-radius: 4px;
    color: var(--sh-faint);
    box-shadow: none;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
}

body.rhythm-mode .premium-features,
body.rhythm-mode .unlock-stage-info,
body.rhythm-mode .premium-feature,
body.rhythm-mode .stat-item,
body.rhythm-mode .difficulty-select-modal .difficulty-btn {
    border-radius: var(--sh-radius-sm);
}

body.rhythm-mode .premium-features,
body.rhythm-mode .unlock-stage-info {
    background: rgba(var(--sh-control-rgb), 0.6);
    border: 1px solid var(--sh-line);
}

body.rhythm-mode .unlock-modal-button::before,
body.rhythm-mode .end-song-button::before,
body.rhythm-mode .pause-modal-button::before {
    display: none;
}

body.rhythm-mode .tutorial-card {
    border-color: var(--sh-line-2);
}

@media (prefers-reduced-motion: reduce) {

    body.rhythm-mode .unlock-modal,
    body.rhythm-mode .difficulty-select-modal,
    body.rhythm-mode .premium-upgrade-modal-overlay .premium-upgrade-modal,
    body.rhythm-mode .rhythm-daily-limit-modal,
    body.rhythm-mode .tutorial-card,
    body.rhythm-mode .pause-modal {
        animation: none;
    }
}

/* ============================================================
   6. PAUSE MODAL
   The artwork sat behind the text at almost full strength (the scrim was only
   15-25% black), the song title carried a backdrop-filter blur that read as a
   smear, and the buttons were too transparent to register as surfaces.
   ============================================================ */

body.rhythm-mode .pause-modal {
    aspect-ratio: auto;
    min-height: min(80vh, calc(min((100vw - 40px) * 0.9, 720px) * 9 / 16));
    max-width: 720px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
    gap: 22px;
    overflow: hidden;
}

body.rhythm-mode .pause-modal-overlay-gradient {
    background:
        radial-gradient(ellipse at 50% 45%, rgba(6, 10, 16, 0.93) 0%, rgba(6, 10, 16, 0.74) 55%, rgba(6, 10, 16, 0.88) 100%),
        linear-gradient(180deg, rgba(6, 10, 16, 0.5) 0%, rgba(6, 10, 16, 0.74) 100%);
}

body.rhythm-mode .pause-modal-header {
    margin-bottom: 0;
}

body.rhythm-mode .pause-modal-icon {
    display: none;
}

body.rhythm-mode .pause-modal-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    gap: 22px;
}

body.rhythm-mode .pause-modal-song-info {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--sh-line);
    border-radius: 0;
    backdrop-filter: none;
    padding: 0 0 18px;
}

body.rhythm-mode .pause-song-title {
    color: var(--sh-text);
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(4, 8, 13, 0.9);
}

body.rhythm-mode .pause-song-difficulty {
    color: var(--sh-faint);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(4, 8, 13, 0.9);
}

body.rhythm-mode .pause-modal-buttons {
    gap: 9px;
}

body.rhythm-mode .pause-modal-button {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 14px 18px;
    font-size: 0.76rem;
    background: rgba(6, 10, 16, 0.9);
}

body.rhythm-mode .pause-modal .button-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

body.rhythm-mode .stats-screen::before {
    opacity: 0.72;
    filter: blur(8px) saturate(1.15);
}

body.rhythm-mode .stats-screen::after {
    background: linear-gradient(180deg, rgba(6, 10, 16, 0.5) 0%, rgba(6, 10, 16, 0.78) 100%);
}

body.rhythm-mode .play-again-button .keyboard-hint,
body.rhythm-mode .pause-modal .resume-button .keyboard-hint,
body.rhythm-mode .premium-upgrade-btn .keyboard-hint,
body.rhythm-mode .unlock-modal-button.primary .keyboard-hint,
body.rhythm-mode .rhythm-daily-limit-btn-upgrade .keyboard-hint,
body.rhythm-mode .difficulty-select-play .keyboard-hint {
    border-color: rgba(11, 17, 25, 0.32);
    color: rgba(11, 17, 25, 0.72);
}

/* ============================================================
   7. SETTINGS AND CALIBRATION
   ============================================================ */

body.rhythm-mode .rhythm-settings-overlay {
    background: rgba(var(--sh-scrim-rgb), 0.9);
    backdrop-filter: blur(3px);
}

body.rhythm-mode .rhythm-settings-modal {
    background: linear-gradient(165deg, rgba(35, 47, 67, 0.985) 0%, rgba(19, 28, 43, 0.99) 100%);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

body.rhythm-mode .rhythm-settings-header {
    background: transparent;
    border-bottom: 1px solid var(--sh-line);
}

body.rhythm-mode .rhythm-settings-title {
    color: var(--sh-text);
    text-shadow: none;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

body.rhythm-mode .rhythm-settings-close {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.7);
    color: var(--sh-dim);
}

body.rhythm-mode .rhythm-settings-close:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-line-2);
}

body.rhythm-mode .rhythm-settings-footer {
    background: transparent;
    border-top: 1px solid var(--sh-line);
}

body.rhythm-mode .calibration-description,
body.rhythm-mode .calibration-hint {
    color: var(--sh-dim);
}

body.rhythm-mode .calibration-status {
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.6);
}

body.rhythm-mode .calibration-status .status-text {
    color: var(--sh-dim);
}

body.rhythm-mode .calibration-status.warning {
    background: color-mix(in srgb, var(--sh-warn) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-warn) 45%, transparent);
}

body.rhythm-mode .calibration-status.warning .status-text {
    color: var(--sh-warn);
}

body.rhythm-mode .calibration-status.calibrated {
    background: color-mix(in srgb, var(--sh-ok) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-ok) 45%, transparent);
}

body.rhythm-mode .calibration-status.calibrated .status-text {
    color: var(--sh-ok);
}

body.rhythm-mode .calibration-manual {
    background: rgba(var(--sh-control-rgb), 0.45);
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius);
}

body.rhythm-mode .calibration-manual h4 {
    color: var(--sh-text);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

body.rhythm-mode .calibration-label {
    color: var(--sh-dim);
    font-size: 0.85rem;
}

body.rhythm-mode #calibrationValue {
    color: var(--sh-gold);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

body.rhythm-mode .slider-marker {
    color: var(--sh-faint);
}

body.rhythm-mode .slider-marker small {
    color: var(--sh-faint);
}

body.rhythm-mode .calibration-slider {
    background: linear-gradient(to right,
            var(--sh-alert) 0%,
            var(--sh-warn) 25%,
            var(--sh-ok) 50%,
            var(--sh-warn) 75%,
            var(--sh-alert) 100%);
    border-radius: 3px;
}

body.rhythm-mode .calibration-slider::-webkit-slider-thumb {
    background: var(--sh-text);
    border: 3px solid var(--sh-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.rhythm-mode .calibration-slider::-moz-range-thumb {
    background: var(--sh-text);
    border: 3px solid var(--sh-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.rhythm-mode .indicator-bar {
    background: rgba(var(--sh-scrim-rgb), 0.55);
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius-sm);
}

body.rhythm-mode .indicator-fill {
    background: var(--sh-ok);
}

body.rhythm-mode .indicator-fill.is-tight {
    background: var(--sh-ok);
}

body.rhythm-mode .indicator-fill.is-loose {
    background: var(--sh-warn);
}

body.rhythm-mode .indicator-fill.is-off {
    background: var(--sh-alert);
}

body.rhythm-mode .indicator-center {
    background: var(--sh-text);
    box-shadow: none;
}

body.rhythm-mode .indicator-labels span:first-child,
body.rhythm-mode .indicator-labels span:last-child {
    color: var(--sh-alert);
}

body.rhythm-mode .indicator-labels span:nth-child(2) {
    color: var(--sh-ok);
}

body.rhythm-mode .rhythm-settings-modal .btn-primary {
    background: rgba(var(--sh-control-hi-rgb), 0.9);
    border: 1px solid var(--sh-line-2);
    color: var(--sh-text);
    border-radius: var(--sh-radius-sm);
    box-shadow: none;
}

body.rhythm-mode .rhythm-settings-modal .btn-primary:hover {
    background: rgba(var(--sh-control-hi-rgb), 1);
    border-color: var(--sh-gold);
    box-shadow: none;
}

body.rhythm-mode .rhythm-settings-modal .btn-save {
    background: var(--sh-gold);
    border: 1px solid var(--sh-gold);
    color: var(--sh-on-light);
    border-radius: var(--sh-radius-sm);
    box-shadow: none;
}

body.rhythm-mode .rhythm-settings-modal .btn-save:hover {
    filter: brightness(1.08);
    box-shadow: none;
}

body.rhythm-mode .rhythm-settings-content::-webkit-scrollbar-track {
    background: rgba(var(--sh-scrim-rgb), 0.4);
}

body.rhythm-mode .rhythm-settings-content::-webkit-scrollbar-thumb {
    background: var(--sh-line-2);
    border-radius: 4px;
}

body.rhythm-mode .rhythm-settings-content::-webkit-scrollbar-thumb:hover {
    background: var(--sh-faint);
}

/* ============================================================
   8. TUTORIAL
   ============================================================ */

body.rhythm-mode .tutorial-card-title {
    color: var(--sh-text);
    text-shadow: none;
}

body.rhythm-mode .tutorial-card-description {
    color: var(--sh-dim);
}

body.rhythm-mode .tutorial-progress-text {
    color: var(--sh-faint);
}

body.rhythm-mode .tutorial-progress-bar-container {
    background: rgba(var(--sh-scrim-rgb), 0.6);
    border-radius: 999px;
}

body.rhythm-mode .tutorial-progress-bar {
    background: var(--sh-gold);
}

body.rhythm-mode .tutorial-close-btn {
    background: rgba(var(--sh-control-rgb), 0.7);
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-dim);
}

body.rhythm-mode .tutorial-close-btn:hover {
    background: color-mix(in srgb, var(--sh-alert) 22%, transparent);
    border-color: color-mix(in srgb, var(--sh-alert) 55%, transparent);
    color: var(--sh-text);
}

body.rhythm-mode .tutorial-btn-back,
body.rhythm-mode .tutorial-play-btn {
    background: rgba(var(--sh-control-rgb), 0.8);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-text);
    box-shadow: none;
}

body.rhythm-mode .tutorial-btn-back:hover:not(:disabled),
body.rhythm-mode .tutorial-play-btn:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-gold);
    box-shadow: none;
}

body.rhythm-mode .tutorial-btn-next,
body.rhythm-mode .tutorial-btn-complete {
    background: var(--sh-gold);
    border: 1px solid var(--sh-gold);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-on-light);
    box-shadow: none;
}

body.rhythm-mode .tutorial-btn-next:hover:not(:disabled),
body.rhythm-mode .tutorial-btn-complete:hover:not(:disabled) {
    background: var(--sh-gold);
    filter: brightness(1.08);
    box-shadow: none;
}

body.rhythm-mode .tutorial-audio-toggle:hover {
    background: rgba(var(--sh-control-rgb), 0.8);
}

body.rhythm-mode .tutorial-dismiss-option {
    border-top: 1px solid var(--sh-line);
}

body.rhythm-mode .tutorial-dismiss-label {
    color: var(--sh-dim);
}

body.rhythm-mode .tutorial-arrow {
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--sh-gold) 75%, transparent));
}

body.rhythm-mode .tutorial-highlight-wrapper::before {
    background: color-mix(in srgb, var(--sh-gold) 10%, transparent);
    border: 3px solid color-mix(in srgb, var(--sh-gold) 90%, transparent);
    box-shadow:
        0 0 0 9999px rgba(var(--sh-scrim-rgb), 0.72),
        0 0 40px color-mix(in srgb, var(--sh-gold) 70%, transparent),
        inset 0 0 20px color-mix(in srgb, var(--sh-gold) 18%, transparent);
}

@keyframes tutorial-highlight-pulse {

    0%,
    100% {
        border-color: color-mix(in srgb, var(--sh-gold) 90%, transparent);
        box-shadow:
            0 0 0 9999px rgba(var(--sh-scrim-rgb), 0.72),
            0 0 40px color-mix(in srgb, var(--sh-gold) 70%, transparent),
            inset 0 0 20px color-mix(in srgb, var(--sh-gold) 18%, transparent);
    }

    50% {
        border-color: var(--sh-gold);
        box-shadow:
            0 0 0 9999px rgba(var(--sh-scrim-rgb), 0.72),
            0 0 60px var(--sh-gold),
            inset 0 0 30px color-mix(in srgb, var(--sh-gold) 36%, transparent);
    }
}

body.rhythm-mode .tutorial-trigger-btn,
body.rhythm-mode .inline-tutorial-trigger {
    background: rgba(var(--sh-control-rgb), 0.8);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-dim);
    box-shadow: none;
}

body.rhythm-mode .tutorial-trigger-btn:hover,
body.rhythm-mode .inline-tutorial-trigger:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-gold);
    color: var(--sh-text);
    box-shadow: none;
}

body.rhythm-mode .rhythm-settings-tab.active {
    color: var(--sh-gold);
    border-bottom-color: var(--sh-gold);
    background: color-mix(in srgb, var(--sh-gold) 10%, transparent);
}

body.rhythm-mode .calibration-auto,
body.rhythm-mode .audio-tips {
    background: rgba(var(--sh-control-rgb), 0.45);
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-radius);
}

body.rhythm-mode .calibration-auto h4,
body.rhythm-mode .audio-tips h4 {
    color: var(--sh-text);
}

body.rhythm-mode .calibration-auto p {
    color: var(--sh-dim);
}

body.rhythm-mode .rhythm-settings-modal .btn-secondary {
    background: rgba(var(--sh-control-rgb), 0.8);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-text);
}

body.rhythm-mode .rhythm-settings-modal .btn-secondary:hover {
    background: rgba(var(--sh-control-hi-rgb), 0.95);
    border-color: var(--sh-gold);
}

body.rhythm-mode .rhythm-settings-modal .btn-reset {
    background: color-mix(in srgb, var(--sh-alert) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-alert) 50%, transparent);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-alert);
}

body.rhythm-mode .rhythm-settings-modal .btn-reset:hover {
    background: color-mix(in srgb, var(--sh-alert) 24%, transparent);
}

body.rhythm-mode .setting-select:focus {
    border-color: var(--sh-gold);
    outline: none;
}

body.rhythm-mode .audio-warning {
    background: color-mix(in srgb, var(--sh-warn) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-warn) 45%, transparent);
    border-radius: var(--sh-radius);
}

body.rhythm-mode .warning-content h4 {
    color: var(--sh-warn);
}

body.rhythm-mode .info-item.info-total {
    background: color-mix(in srgb, var(--sh-gold) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-gold) 45%, transparent);
}

body.rhythm-mode .info-total .info-value {
    color: var(--sh-gold);
}

body.rhythm-mode .feedback-timing.timing-excellent {
    color: var(--sh-ok);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

body.rhythm-mode .feedback-timing.timing-good {
    color: var(--sh-warn);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

body.rhythm-mode .feedback-timing.timing-fair {
    color: var(--sh-alert);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

body.rhythm-mode .calibration-hit-count {
    color: var(--sh-gold);
}

body.rhythm-mode .calibration-progress-fill {
    background: var(--sh-gold);
}

body.rhythm-mode .tutorial-arrow path {
    stroke: var(--sh-gold);
}

body.rhythm-mode .tutorial-arrow-head {
    fill: var(--sh-gold);
}

/* ============================================================
   9. TILE STATUS BADGES
   ============================================================ */

body.rhythm-mode .beatmap-status-badge {
    top: 10px;
    border-radius: 999px;
    border: 1px solid var(--sh-line-2);
    background: rgba(var(--sh-scrim-rgb), 0.88);
    color: var(--sh-dim);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 4px 11px;
}

body.rhythm-mode .beatmap-status-badge.completed {
    color: var(--sh-ok);
    border-color: color-mix(in srgb, var(--sh-ok) 55%, transparent);
}

body.rhythm-mode .beatmap-status-badge.partial {
    color: var(--sh-warn);
    border-color: color-mix(in srgb, var(--sh-warn) 55%, transparent);
}

body.rhythm-mode .beatmap-status-badge.premium {
    background: rgba(var(--sh-scrim-rgb), 0.88);
    color: var(--sh-gold);
    border-color: color-mix(in srgb, var(--sh-gold) 55%, transparent);
}

body.rhythm-mode .beatmap-status-badge.missing {
    color: var(--sh-alert);
    border-color: color-mix(in srgb, var(--sh-alert) 55%, transparent);
}

body.rhythm-mode .beatmap-status-badge.locked {
    color: var(--sh-faint);
    border-color: var(--sh-line);
}

body.rhythm-mode .beatmap-status-badge .icon-inline {
    opacity: 0.9;
}

/* ============================================================
   10. PREMIUM, SCRIPTURES AND STATUS COLOUR
   ============================================================ */

body.rhythm-mode .stage-badge {
    background: rgba(var(--sh-control-hi-rgb), 0.9);
    border-radius: 999px;
    color: var(--sh-text);
    box-shadow: none;
}

body.rhythm-mode .stage-badge.premium-badge,
body.rhythm-mode .tile-button.premium-button {
    background: var(--sh-gold);
    border: 1px solid var(--sh-gold);
    color: var(--sh-on-light);
    text-shadow: none;
    box-shadow: none;
}

body.rhythm-mode .stage-badge.premium-badge-clickable {
    border: 1px solid var(--sh-gold);
    box-shadow: none;
}

body.rhythm-mode .stage-badge.premium-badge-clickable:hover,
body.rhythm-mode .tile-button.premium-button:hover {
    filter: brightness(1.08);
    border-color: var(--sh-gold);
    box-shadow: none;
}

body.rhythm-mode .stage-badge.free-badge {
    background: var(--sh-ok);
    color: var(--sh-on-light);
    text-shadow: none;
}

body.rhythm-mode .difficulty-btn.active.easy {
    background: var(--sh-ok);
    color: var(--sh-on-light);
    border: none;
    box-shadow: none;
}

body.rhythm-mode .difficulty-btn.active.medium {
    background: var(--sh-warn);
    color: var(--sh-on-light);
    border: none;
    box-shadow: none;
}

body.rhythm-mode .difficulty-btn.active.hard {
    background: var(--sh-alert);
    color: var(--sh-on-light);
    border: none;
    box-shadow: none;
}

body.rhythm-mode .stat-value.success {
    color: var(--sh-ok);
    text-shadow: none;
}

body.rhythm-mode .stat-value.info {
    color: var(--sh-gold);
}

body.rhythm-mode .stat-value.caution {
    color: var(--sh-warn);
}

body.rhythm-mode .stat-value.danger {
    color: var(--sh-alert);
    text-shadow: none;
}

body.rhythm-mode .premium-lock-container,
body.rhythm-mode .unlock-premium-notice,
body.rhythm-mode .premium-features-list {
    background: color-mix(in srgb, var(--sh-gold) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-gold) 35%, transparent);
    border-radius: var(--sh-radius);
}

body.rhythm-mode .premium-lock-text,
body.rhythm-mode .premium-lock-title,
body.rhythm-mode .premium-lock-description strong,
body.rhythm-mode .unlock-premium-notice .premium-lock-text {
    color: var(--sh-gold);
    text-shadow: none;
}

body.rhythm-mode .premium-songs-locked {
    background: linear-gradient(165deg, rgba(35, 47, 67, 0.985) 0%, rgba(19, 28, 43, 0.99) 100%);
    border: 1px solid color-mix(in srgb, var(--sh-gold) 40%, transparent);
    border-radius: var(--sh-radius);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
}

body.rhythm-mode .unlock-modal .dismiss-button {
    background: color-mix(in srgb, var(--sh-alert) 12%, transparent);
    border-color: color-mix(in srgb, var(--sh-alert) 45%, transparent);
    color: var(--sh-alert);
}

body.rhythm-mode .unlock-modal .dismiss-button:hover {
    background: color-mix(in srgb, var(--sh-alert) 22%, transparent);
    border-color: color-mix(in srgb, var(--sh-alert) 65%, transparent);
    box-shadow: none;
}

body.rhythm-mode .scriptures-message {
    background: rgba(var(--sh-control-rgb), 0.7);
    border: 1px solid var(--sh-line-2);
    border-radius: var(--sh-radius);
    color: var(--sh-text);
    text-shadow: none;
    box-shadow: none;
}

body.rhythm-mode .scriptures-reference {
    background: rgba(var(--sh-scrim-rgb), 0.6);
    border: 1px solid var(--sh-line);
    border-bottom: none;
    color: var(--sh-gold);
    text-shadow: none;
}

body.rhythm-mode .scripture-play-button-compact {
    background: var(--sh-gold);
    border: 1px solid var(--sh-gold);
    color: var(--sh-on-light);
    box-shadow: none;
}

body.rhythm-mode .scripture-play-button-compact:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: none;
}

body.rhythm-mode .progress-fill-compact {
    background: var(--sh-gold);
    box-shadow: none;
}

body.rhythm-mode .scripture-completion-badge.completed {
    color: var(--sh-ok);
    background: color-mix(in srgb, var(--sh-ok) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-ok) 40%, transparent);
}

body.rhythm-mode .scripture-completion-badge.pending {
    color: var(--sh-warn);
    background: color-mix(in srgb, var(--sh-warn) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-warn) 40%, transparent);
}

body.rhythm-mode .rhythm-daily-limit-badge.is-warning {
    background: color-mix(in srgb, var(--sh-warn) 16%, transparent);
    border-color: color-mix(in srgb, var(--sh-warn) 40%, transparent);
    color: var(--sh-warn);
}

body.rhythm-mode .rhythm-daily-limit-badge.is-limit {
    background: color-mix(in srgb, var(--sh-alert) 16%, transparent);
    border-color: color-mix(in srgb, var(--sh-alert) 40%, transparent);
    color: var(--sh-alert);
}

body.rhythm-mode .rhythm-daily-limit-scripture-note {
    background: color-mix(in srgb, var(--sh-gold) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--sh-gold) 28%, transparent);
    border-radius: var(--sh-radius-sm);
    color: var(--sh-gold);
}

body.rhythm-mode .scriptures-modal-content::-webkit-scrollbar-thumb,
body.rhythm-mode .scriptures-text::-webkit-scrollbar-thumb {
    background: var(--sh-line-2);
    border: 1px solid var(--sh-line);
}

body.rhythm-mode .scriptures-modal-content::-webkit-scrollbar-thumb:hover,
body.rhythm-mode .scriptures-text::-webkit-scrollbar-thumb:hover {
    background: var(--sh-faint);
}

/* ============================================================
   11. IN-CARD DIFFICULTY PICKER
   ============================================================ */

body.rhythm-mode .beatmap-tile .beatmap-difficulty-card {
    display: none;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}

body.rhythm-mode .beatmap-tile.is-picking .beatmap-difficulty-card {
    display: grid;
    margin-top: auto;
}

body.rhythm-mode .beatmap-tile.is-picking .beatmap-buttons {
    display: none;
}

body.rhythm-mode .beatmap-tile .beatmap-difficulty-card .beatmap-difficulty-toggle {
    height: 34px;
    align-items: stretch;
}

body.rhythm-mode .beatmap-tile .beatmap-difficulty-card .difficulty-toggle-option {
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

body.rhythm-mode .difficulty-back-button {
    height: 34px;
    padding: 0;
}

body.rhythm-mode .beatmap-tile.is-picking {
    border-color: var(--sh-line-2);
}

body.rhythm-mode .beatmap-tile.is-launching {
    cursor: progress;
}

body.rhythm-mode .beatmap-tile.is-launching .beatmap-difficulty-toggle,
body.rhythm-mode .beatmap-tile.is-launching .difficulty-back-button {
    pointer-events: none;
}

body.rhythm-mode .beatmap-tile.is-launching .difficulty-back-button {
    opacity: 0.28;
}

body.rhythm-mode .beatmap-tile.is-launching .difficulty-toggle-option.selected,
body.rhythm-mode .beatmap-tile.is-launching .difficulty-toggle-option[aria-checked="true"] {
    background: color-mix(in srgb, var(--song-accent, var(--sh-text)) 92%, #FFFFFF);
    animation: rhythm-tile-launching 1.1s ease-in-out infinite;
}

body.rhythm-mode .beatmap-tile.is-launching .difficulty-toggle-option:not(.selected) {
    opacity: 0.3;
}

@keyframes rhythm-tile-launching {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.62;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.rhythm-mode .beatmap-tile.is-launching .difficulty-toggle-option.selected,
    body.rhythm-mode .beatmap-tile.is-launching .difficulty-toggle-option[aria-checked="true"] {
        animation: none;
    }
}

body.rhythm-mode .tutorial-spotlight {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    border-radius: 12px;
    border: 3px solid color-mix(in srgb, var(--sh-gold) 90%, transparent);
    background: color-mix(in srgb, var(--sh-gold) 8%, transparent);
    box-shadow:
        0 0 34px color-mix(in srgb, var(--sh-gold) 60%, transparent),
        inset 0 0 18px color-mix(in srgb, var(--sh-gold) 16%, transparent);
    animation: tutorial-spotlight-pulse 2s ease-in-out infinite;
}

@keyframes tutorial-spotlight-pulse {

    0%,
    100% {
        border-color: color-mix(in srgb, var(--sh-gold) 80%, transparent);
        box-shadow:
            0 0 30px color-mix(in srgb, var(--sh-gold) 50%, transparent),
            inset 0 0 16px color-mix(in srgb, var(--sh-gold) 14%, transparent);
    }

    50% {
        border-color: var(--sh-gold);
        box-shadow:
            0 0 48px color-mix(in srgb, var(--sh-gold) 80%, transparent),
            inset 0 0 26px color-mix(in srgb, var(--sh-gold) 26%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.rhythm-mode .tutorial-spotlight {
        animation: none;
    }
}

/* ============================================================
   12. FIRST-LOAD SCREEN
   ============================================================ */

body.rhythm-mode .rhythm-loading-overlay {
    background: linear-gradient(168deg, #111A28 0%, var(--sh-ground) 100%);
}

body.rhythm-mode .rhythm-loading-content {
    gap: 20px;
    max-width: 420px;
}

body.rhythm-mode .rhythm-loading-logo {
    animation: none;
    text-shadow: none;
    color: var(--sh-text);
}

body.rhythm-mode .rhythm-loading-logo .type-by-faith-logo {
    height: 74px;
    margin-bottom: 14px;
}

body.rhythm-mode .rhythm-loading-logo .rhythm-mode-subtitle {
    color: var(--sh-gold);
    font-size: 1.15rem;
    letter-spacing: 0.26em;
    text-shadow: none;
}

body.rhythm-mode .rhythm-loading-spinner {
    width: 40px;
    height: 40px;
}

body.rhythm-mode .loading-spinner-ring {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border: 2px solid var(--sh-line);
    border-top-color: var(--sh-gold);
    animation: spin 0.9s linear infinite;
}

body.rhythm-mode .loading-spinner-ring:nth-child(2),
body.rhythm-mode .loading-spinner-ring:nth-child(3) {
    display: none;
}

body.rhythm-mode .rhythm-loading-text {
    color: var(--sh-text);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body.rhythm-mode .rhythm-loading-progress {
    width: 100%;
    max-width: 320px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-scrim-rgb), 0.65);
    overflow: hidden;
}

body.rhythm-mode .rhythm-loading-progress-bar {
    background: var(--sh-gold);
    border-radius: 999px;
    transition: width 0.35s ease;
}

body.rhythm-mode .rhythm-loading-details {
    color: var(--sh-faint);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    body.rhythm-mode .loading-spinner-ring {
        animation-duration: 2.4s;
    }
}

body.rhythm-mode .start-header__right {
    gap: 10px;
}

body.rhythm-mode .rhythm-daily-limit-badge:not(.hidden-element) {
    margin-right: 6px;
    padding-right: 16px;
    border-right: 1px solid var(--sh-line);
    border-radius: 0;
}

body.rhythm-mode .stats-judgement {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

body.rhythm-mode .judgement-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 6px;
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-line);
    background: rgba(var(--sh-control-rgb), 0.55);
}

body.rhythm-mode .judgement-value {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: lining-nums tabular-nums;
    line-height: 1.1;
}

body.rhythm-mode .judgement-label {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sh-faint);
}

body.rhythm-mode .stats-hero .star-icon {
    width: 40px !important;
    height: 40px !important;
}

body.rhythm-mode .stats-content {
    gap: 12px;
}

body.rhythm-mode .stats-grid {
    scrollbar-width: thin;
    scrollbar-color: var(--sh-line-2) transparent;
}

body.rhythm-mode .stats-grid::-webkit-scrollbar {
    width: 8px;
}

body.rhythm-mode .stats-grid::-webkit-scrollbar-thumb {
    background: var(--sh-line-2);
    border-radius: 999px;
}

body.rhythm-mode .stats-grid::-webkit-scrollbar-track {
    background: rgba(var(--sh-scrim-rgb), 0.4);
    border-radius: 999px;
}

body.rhythm-mode .stats-content {
    justify-content: safe center;
}

body.rhythm-mode .stats-grid {
    flex: 0 1 auto;
}

