:root {
    --bg-0: #0f0f0f;
    --bg-1: #181818;
    --bg-2: #212121;
    --bg-3: #282828;
    --chrome-surface: transparent;
    --frame-surface: transparent;
    --frame-border: transparent;
    --copy: #ffffff;
    --pure-white: #ffffff;
    --muted: #b3b3b3;
    --soft: #8a8a8a;
    --accent: #e6e6e6;
    --accent-soft: #ffffff;
    --accent-faint: rgba(255, 255, 255, 0.12);
    --surface-02: rgba(255, 255, 255, 0.025);
    --surface-03: rgba(255, 255, 255, 0.03);
    --surface-04: rgba(255, 255, 255, 0.04);
    --surface-05: rgba(255, 255, 255, 0.05);
    --surface-06: rgba(255, 255, 255, 0.06);
    --surface-08: rgba(255, 255, 255, 0.08);
    --surface-12: rgba(255, 255, 255, 0.12);
    --surface-14: rgba(255, 255, 255, 0.14);
    --surface-16: rgba(255, 255, 255, 0.16);
    --surface-float: rgba(24, 24, 24, 0.94);
    --panel-surface: rgba(255, 255, 255, 0.055);
    --panel-surface-hover: rgba(255, 255, 255, 0.09);
    --panel-surface-active: rgba(255, 255, 255, 0.14);
    --scrollbar-size: 0.8rem;
    --dragbar-size: 0.5rem;
    --scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --scrollbar-thumb-strong: rgba(255, 255, 255, 0.28);
    --loop-accent: #9c6cff;
    --loop-accent-copy: #d6c0ff;
    --loop-accent-bed: rgba(92, 56, 164, 0.75);
    --loop-accent-soft: rgba(156, 108, 255, 0.14);
    --loop-accent-strong: rgba(156, 108, 255, 0.18);
    --auto-speed-accent: #57a8ff;
    --auto-speed-accent-copy: #d9ecff;
    --auto-speed-accent-soft: rgba(87, 168, 255, 0.14);
    --auto-speed-accent-strong: rgba(87, 168, 255, 0.2);
    --ambient-rgb: 76, 76, 76;
    --ambient-rgb-soft: 104, 104, 104;
    --ambient-rgb-deep: 42, 42, 42;
    --danger-copy: #ffd5d5;
    --danger-copy-muted: #ffb4b4;
    --danger-surface: rgba(201, 69, 69, 0.12);
    --danger-surface-strong: rgba(201, 69, 69, 0.18);
    --line: transparent;
    --shadow: none;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    color: var(--copy);
    background: var(--bg-0);
    font-family: "Aptos", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body::before {
    content: none;
}

body[data-playback-state="playing"]::before {
    opacity: 0.24;
}

.app-shell {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    height: 100dvh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
}

body[data-stage-resizing="true"] {
    cursor: col-resize;
    user-select: none;
}

body[data-player-enabled="false"] .app-shell {
    grid-template-rows: minmax(0, 1fr);
}

.app-header,
.app-player {
    position: relative;
    z-index: 2;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem 0.9rem;
    border-bottom: 0;
    background: transparent;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.95rem;
    background: var(--surface-04);
    border: 0;
    box-shadow: none;
}

.brand-copy {
    min-width: 0;
}

.eyebrow {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--soft);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

.brand-copy strong {
    display: block;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.nav-pill,
.status-pill,
.utility-pill,
.speed-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--copy);
    text-decoration: none;
}

button.nav-pill,
button.utility-pill,
button.speed-chip,
.menu-button,
.menu-item,
.track-row,
.transport-button,
.chapter-jump,
.chapter-step,
.loop-button,
.queue-row,
.speed-adjust,
.speed-value,
.speed-step-button,
.timeline-label,
.timeline-user-marker {
    cursor: pointer;
}

.nav-pill {
    padding: 0.6rem 0.9rem;
    font-size: 0.84rem;
    color: var(--copy);
}

.nav-pill.is-active {
    background: var(--surface-14);
    color: var(--copy);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

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

.status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: none;
}

.app-main {
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.content-frame {
    position: relative;
    display: grid;
    align-content: start;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0;
    border: 0;
    background:
        linear-gradient(
            0deg,
            rgba(var(--ambient-rgb-soft), 0.11) 0,
            rgba(var(--ambient-rgb), 0.08) 12%,
            rgba(var(--ambient-rgb-deep), 0.045) 24%,
            rgba(var(--ambient-rgb-deep), 0.02) 34%,
            transparent 50%
        );
    background-repeat: no-repeat;
    background-position: center calc(100% + 4.5rem);
    background-size: 100vw 100vh;
    background-attachment: fixed;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-strong) transparent;
    scrollbar-gutter: stable;
}

.content-frame::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

.content-frame::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.content-frame::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    border: 0.16rem solid transparent;
    background-clip: padding-box;
}

.content-frame::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-strong);
}

.content-stack {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}

.editor-panel {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    border-radius: 1.2rem;
    background: rgba(87, 168, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(87, 168, 255, 0.14);
}

.editor-panel[hidden] {
    display: none;
}

.editor-panel-copy {
    min-width: 0;
}

.editor-panel-eyebrow {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--auto-speed-accent-copy);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.editor-panel strong {
    display: block;
    color: var(--pure-white);
    font-size: 1rem;
    font-weight: 700;
}

.editor-panel p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.stage-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.practice-stage {
    --stage-divider-width: 1rem;
    --stage-rail-min: 18rem;
    --stage-video-default-width: calc((100% - var(--stage-divider-width)) * 0.7);
    --stage-video-max-width: calc(100% - var(--stage-rail-min) - var(--stage-divider-width));
    --stage-video-min-width: min(20rem, var(--stage-video-max-width));
    --stage-video-width: clamp(var(--stage-video-min-width), var(--stage-video-target-width, var(--stage-video-default-width)), var(--stage-video-max-width));
    --stage-video-height: calc(var(--stage-video-width) * 9 / 16);
    display: grid;
    grid-template-columns: var(--stage-video-width) var(--stage-divider-width) minmax(var(--stage-rail-min), 1fr);
    gap: 0;
    align-items: stretch;
    min-height: 0;
}

.video-card {
    position: relative;
    display: block;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    align-self: start;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    contain: paint;
    background: var(--panel-surface);
    box-shadow: none;
    border-radius: 1.2rem;
    border: 0;
}

.video-embed {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
}

.video-overlay-badges {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
}

.video-loop-overlay,
.video-speed-overlay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.2rem;
    min-height: 2.3rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--surface-float);
    border: 0;
    box-shadow: none;
    color: var(--copy);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.video-loop-overlay {
    max-width: 13rem;
    font-size: 0.84rem;
    color: var(--accent-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-loop-overlay::before {
    content: "∞";
    margin-right: 0.42rem;
    font-size: 0.95rem;
    line-height: 1;
}

.video-loop-overlay[hidden] {
    display: none !important;
}

.video-loop-overlay::before {
    content: "∞";
}

.player-host,
.video-embed iframe,
.player-host iframe,
#youtube-player {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit;
}

.video-embed iframe,
.player-host iframe,
#youtube-player {
    display: block;
    max-width: none;
}

.video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.player-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 1.5rem;
    color: var(--muted);
    text-align: center;
}

.player-placeholder strong {
    color: var(--copy);
    font-size: 1rem;
}

.chapter-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    height: var(--stage-video-lock-height, auto);
    max-height: var(--stage-video-lock-height, none);
    align-self: stretch;
    border-radius: 1.35rem;
    border: 0;
    background: var(--panel-surface);
    box-shadow: none;
}

.stage-resizer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--stage-divider-width);
    height: var(--stage-video-lock-height, auto);
    align-self: stretch;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
}

.stage-resizer::before {
    content: none;
}

.stage-resizer-handle {
    position: relative;
    z-index: 1;
    width: var(--dragbar-size);
    height: 12rem;
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    box-shadow: none;
}

.rail-scroll {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    overflow: hidden;
}

.rail-tabs {
    display: inline-flex;
    align-items: center;
    width: 100%;
    gap: 0.55rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: var(--surface-06);
    border: 0;
}

.rail-tab {
    display: inline-flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0.55rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
}

.rail-tab.is-active {
    background: var(--panel-surface-active);
    color: var(--copy);
}

.rail-panel {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-strong) transparent;
    scrollbar-gutter: stable;
}

.rail-panel.is-active {
    display: grid;
    align-content: start;
    gap: 0.9rem;
}

.rail-panel::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

.rail-panel::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

.rail-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    border: 0.16rem solid transparent;
    background-clip: padding-box;
}

.rail-panel::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-strong);
}

.chapter-list {
    display: grid;
    gap: 0.55rem;
}

.chapter-empty-state {
    padding: 0.9rem 0.2rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.chapter-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 0.82rem;
    margin-left: calc(var(--chapter-depth, 0) * 1.38rem);
    border: 0;
    border-radius: 1rem;
    background: transparent;
    --chapter-progress: 0;
}

.chapter-row.is-active {
    background: var(--surface-12);
}

.chapter-row:not(.is-active):not(.is-loop-selected):hover {
    background: var(--surface-03);
}

.chapter-row.is-loop-selected {
    background: linear-gradient(180deg, var(--loop-accent-strong), rgba(156, 108, 255, 0.08));
}

.chapter-row::after {
    content: "";
    position: absolute;
    left: 0.82rem;
    right: 0.82rem;
    bottom: 0;
    height: 0.14rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    opacity: 0;
    transform: scaleX(var(--chapter-progress));
    transform-origin: left center;
    pointer-events: none;
}

.chapter-row.is-active::after {
    opacity: 1;
}

.chapter-row.is-active.is-loop-selected::after {
    background: linear-gradient(90deg, var(--loop-accent-copy), var(--loop-accent));
}

.chapter-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.chapter-jump {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.chapter-jump:hover .chapter-title {
    color: var(--muted);
}

.chapter-row:hover .chapter-title {
    color: var(--muted);
}

.chapter-index {
    color: var(--soft);
    font-size: 0.75rem;
}

.chapter-title {
    display: block;
    color: var(--soft);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chapter-row.is-active .chapter-title {
    color: var(--copy);
}

.chapter-loop-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--copy);
    font: inherit;
}

.chapter-loop-toggle .loop-symbol {
    font-size: 1rem;
    line-height: 1;
}

.chapter-loop-toggle.is-active,
.chapter-loop-toggle:hover {
    color: var(--loop-accent-copy);
    background: var(--loop-accent-soft);
}

.chapter-menu {
    position: relative;
}

.chapter-menu::before {
    content: "";
    position: absolute;
    left: -0.2rem;
    right: -0.2rem;
    top: 100%;
    height: 0.55rem;
}

.chapter-menu[open] > .chapter-menu-button {
    background: var(--surface-08);
}

.chapter-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    list-style: none;
    border: 0;
    border-radius: 999px;
    background: var(--surface-03);
    color: var(--muted);
    cursor: pointer;
}

.chapter-menu-button::-webkit-details-marker {
    display: none;
}

.chapter-menu-button svg {
    width: 1.02rem;
    height: 1.02rem;
    fill: currentColor;
}

.chapter-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 40;
    display: grid;
    gap: 0.35rem;
    min-width: 9rem;
    padding: 0.45rem;
    border: 0;
    border-radius: 1rem;
    background: var(--surface-float);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.chapter-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.42rem;
    justify-self: end;
}

.chapter-time-editor {
    position: relative;
}

.chapter-range-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.74rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-03);
    color: var(--soft);
    font: inherit;
    font-variant-numeric: tabular-nums;
    list-style: none;
}

.chapter-range-button::-webkit-details-marker {
    display: none;
}

.chapter-time-editor[open] > .chapter-range-button {
    background: var(--surface-08);
}

.chapter-range-text {
    color: inherit;
    white-space: nowrap;
}

.chapter-time-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    z-index: 42;
    display: grid;
    gap: 0.65rem;
    min-width: 20rem;
    max-width: min(22rem, calc(100vw - 3rem));
    padding: 0.75rem;
    border-radius: 1rem;
    background: var(--surface-float);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.chapter-time-row {
    display: grid;
    gap: 0.38rem;
}

.chapter-time-label {
    color: var(--muted);
    font-size: 0.75rem;
}

.chapter-time-actions {
    display: grid;
    grid-template-columns: auto auto minmax(5.8rem, 1fr) auto auto;
    align-items: center;
    gap: 0.35rem;
}

.chapter-step,
.chapter-time-input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-03);
    color: var(--copy);
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.chapter-step {
    min-width: 2.65rem;
    padding: 0 0.5rem;
}

.chapter-time-input {
    width: 100%;
    padding: 0 0.7rem;
    text-align: center;
}

.chapter-time-input:focus {
    outline: 1px solid var(--surface-16);
    outline-offset: 0;
}

.speed-adjust svg {
    width: 1.02rem;
    height: 1.02rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.loop-panel {
    display: grid;
    gap: 0.8rem;
    padding-top: 0.15rem;
    border-top: 0;
}

.rail-header h2 {
    margin: 0;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.loop-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.loop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.65rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-03);
    color: var(--copy);
    font: inherit;
}

.loop-button.is-primary {
    background: var(--surface-14);
}

.speed-panel {
    display: grid;
    gap: 0.85rem;
    padding: 0.95rem;
    border: 0;
    border-radius: 1.1rem;
    background: var(--surface-03);
}

.speed-limit-note {
    padding: 0 0.15rem;
    color: var(--soft);
    font-size: 0.8rem;
    line-height: 1.45;
}

.speed-panel.is-disabled {
    opacity: 0.48;
}

.speed-panel.is-disabled .speed-step-button,
.speed-panel.is-disabled .speed-value-panel,
.speed-panel.is-disabled .speed-slider-panel,
.speed-panel.is-disabled .loop-button {
    pointer-events: none;
}

.speed-panel [disabled] {
    cursor: default;
}

.speed-setting-controls strong {
    color: var(--copy);
    font-variant-numeric: tabular-nums;
}

.speed-setting-row {
    display: grid;
    grid-template-columns: minmax(0, 8.4rem) auto;
    align-items: center;
    gap: 0.8rem;
}

.speed-setting-label {
    color: var(--muted);
    font-size: 0.84rem;
}

.speed-setting-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    justify-self: start;
}

.speed-panel-controls {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.45rem;
}

.speed-step-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.72rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-03);
    color: var(--copy);
    font: inherit;
    font-variant-numeric: tabular-nums;
}

.speed-value-panel {
    width: 100%;
}

.speed-slider-panel {
    display: block;
    width: 100%;
    max-width: none;
}

.queue-list {
    display: grid;
    gap: 0.35rem;
}

.queue-row {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 0.85rem;
    border: 0;
    border-radius: 1rem;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.queue-row:hover {
    background: var(--surface-02);
}

.queue-row.is-active {
    background: var(--surface-12);
}

.queue-copy {
    min-width: 0;
}

.queue-index {
    color: var(--soft);
    font-size: 0.8rem;
    text-align: center;
}

.queue-title {
    display: block;
    font-weight: 600;
}

.queue-artist,
.queue-length {
    color: var(--muted);
}

.charts-panel {
    border-radius: 1.35rem;
    border: 0;
    background: var(--panel-surface);
    box-shadow: none;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.charts-toolbar {
    display: grid;
    gap: 0.9rem;
}

.charts-toolbar-main {
    display: grid;
    grid-template-columns: minmax(16rem, 1.3fr) minmax(0, 2fr);
    gap: 0.85rem;
    align-items: end;
}

.charts-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.charts-control {
    display: grid;
    gap: 0.36rem;
    min-width: 0;
}

.charts-control-label {
    color: var(--soft);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.charts-toolbar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.charts-results {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.charts-toolbar-actions,
.charts-display-toggles {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.charts-more-filters {
    position: relative;
    padding-bottom: 1.1rem;
    margin-bottom: -1.1rem;
}

.charts-more-filters[hidden] {
    display: none;
}

.charts-more-button,
.charts-reset-button,
.charts-source-link,
.chart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-05);
    color: var(--copy);
    text-decoration: none;
    font: inherit;
}

.charts-more-button {
    list-style: none;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.charts-more-button::-webkit-details-marker {
    display: none;
}

.charts-source-link,
.chart-link {
    color: var(--muted);
}

.charts-toggle-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.55rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    transition: background 140ms ease, color 140ms ease;
}

.charts-toggle-chip.is-active,
.charts-toggle-chip[aria-pressed="true"] {
    background: var(--surface-05);
    color: var(--copy);
}

.charts-toggle-chip.is-active:hover,
.charts-toggle-chip.is-active:focus-visible,
.charts-toggle-chip[aria-pressed="true"]:hover,
.charts-toggle-chip[aria-pressed="true"]:focus-visible {
    background: rgba(255, 255, 255, 0.055);
    color: var(--copy);
}

.charts-toggle-chip:hover,
.charts-toggle-chip:focus-visible {
    background: transparent;
    color: var(--copy);
}

.charts-more-button:hover,
.charts-more-button:focus-visible,
.charts-reset-button:hover,
.charts-source-link:hover,
.chart-link:hover {
    background: rgba(255, 255, 255, 0.055);
    color: var(--copy);
}

.charts-more-filters[open] .charts-more-button {
    background: var(--surface-10);
    color: var(--copy);
}

.charts-more-panel {
    position: absolute;
    top: calc(100% - 0.7rem);
    right: 0;
    z-index: 18;
    display: grid;
    gap: 0.9rem;
    width: min(32rem, calc(100vw - 4rem));
    padding: 0.95rem;
    border-radius: 1.1rem;
    background: var(--surface-float);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.charts-more-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 1.2rem;
}

.charts-more-group {
    display: grid;
    gap: 0.7rem;
}

.charts-more-group[hidden] {
    display: none;
}

.charts-more-label {
    color: var(--soft);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.charts-filter-grid-popover {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.charts-display-toggles-popover {
    gap: 0.55rem;
}

.charts-table-scroll {
    overflow: auto;
    min-height: 26rem;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb-strong) transparent;
}

.charts-table-scroll::-webkit-scrollbar {
    width: var(--scrollbar-size);
    height: var(--scrollbar-size);
}

.charts-table-scroll::-webkit-scrollbar-button {
    display: none;
}

.charts-table-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--scrollbar-thumb);
    border: 0.16rem solid transparent;
    background-clip: padding-box;
}

.charts-table {
    width: auto;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.35rem;
    table-layout: fixed;
}

.charts-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0;
    background: transparent;
    box-shadow: inset 0 -1px 0 var(--surface-08);
}

.sort-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.42rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.7rem 1.7rem 0.7rem 0.2rem;
    border: 0;
    border-radius: 0.9rem;
    background: transparent;
    color: var(--soft);
    font: inherit;
    font-weight: 400;
    text-align: left;
}

.sort-button:hover {
    color: var(--muted);
}

.sort-button.is-active {
    color: var(--copy);
}

.sort-button.is-static {
    cursor: default;
    padding-right: 1.7rem;
    color: var(--soft);
    font-weight: 400;
}

.sort-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.92rem;
    min-width: 0.92rem;
    color: var(--copy);
}

.sort-indicator svg {
    width: 0.92rem;
    height: 0.68rem;
    fill: currentColor;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.sort-indicator.direction-asc svg {
    transform: rotate(180deg);
}

.column-resizer {
    position: absolute;
    top: 0.55rem;
    right: -0.48rem;
    bottom: 0.55rem;
    z-index: 3;
    width: 0.6rem;
    cursor: col-resize;
}

.column-resizer::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    border-radius: 999px;
    background: var(--surface-08);
    transform: translateX(-50%);
    transition: background 140ms ease;
}

.column-resizer:hover::before {
    background: var(--surface-12);
}

.charts-table thead th:last-child .column-resizer {
    display: none;
}

.charts-table td {
    padding: 0.82rem 0.8rem;
    vertical-align: middle;
    background: transparent;
}

.charts-table tbody tr:hover td {
    background: var(--surface-03);
}

.charts-table tbody tr:hover td:first-child {
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.charts-table tbody tr:hover td:last-child {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.charts-index-cell {
    width: 2.4rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.charts-play-trigger {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--soft);
    font: inherit;
}

.charts-index-number,
.charts-index-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.charts-index-play {
    display: none;
}

.charts-index-play svg {
    width: 1.12rem;
    height: 1.12rem;
    fill: currentColor;
}

.charts-table tbody tr.is-playable:hover .charts-index-number,
.charts-play-trigger:focus-visible .charts-index-number {
    display: none;
}

.charts-table tbody tr.is-playable:hover .charts-index-play,
.charts-play-trigger:focus-visible .charts-index-play {
    display: inline-flex;
}

.charts-table tbody tr.is-playable:hover .charts-play-trigger,
.charts-play-trigger:focus-visible {
    color: var(--copy);
    outline: none;
}

.charts-image-cell {
    width: 4.1rem;
}

.chart-title-cell {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.chart-cover-art,
.chart-cover-fallback {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 0.72rem;
}

.chart-cover-art {
    display: block;
    object-fit: cover;
    background: var(--surface-05);
}

.chart-cover-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--surface-12), var(--surface-03) 58%, rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.chart-title-copy {
    min-width: 0;
}

.chart-song-title {
    display: block;
    color: var(--copy);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.chart-song-artist {
    display: block;
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.cell-right {
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.charts-empty-state {
    padding: 1.4rem 0.8rem;
    color: var(--muted);
    text-align: center;
}

.charts-select-wrap {
    position: relative;
    display: block;
}

.charts-search-input,
.charts-select {
    width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 1rem;
    background: var(--surface-05);
    color: var(--copy);
    font: inherit;
    box-shadow: inset 0 0 0 1px transparent;
    transition: background 140ms ease, box-shadow 140ms ease, color 140ms ease;
}

.charts-search-input:focus-visible,
.charts-select:focus-visible {
    outline: none;
    background: var(--surface-08);
    box-shadow: inset 0 0 0 1px var(--surface-12);
}

.charts-search-input::placeholder {
    color: var(--soft);
}

.charts-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.65rem;
    cursor: pointer;
}

.charts-select-caret {
    position: absolute;
    top: 50%;
    right: 0.95rem;
    width: 0.82rem;
    height: 0.54rem;
    pointer-events: none;
    transform: translateY(-50%);
}

.charts-select-caret::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--soft);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.charts-select option {
    background: var(--bg-1);
    color: var(--copy);
}

body.is-resizing-columns,
body.is-resizing-columns * {
    cursor: col-resize !important;
    user-select: none !important;
}

.app-player {
    display: block;
    padding: 0.95rem 1rem 1rem;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

body[data-player-enabled="false"] .app-player {
    display: none;
}

.player-timeline {
    position: relative;
    height: 2.85rem;
    margin-bottom: 0.25rem;
}

.timeline-hover-preview {
    position: absolute;
    top: 0.18rem;
    z-index: 9;
    min-width: 3.4rem;
    padding: 0.26rem 0.48rem;
    border-radius: 999px;
    background: var(--surface-float);
    color: var(--copy);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    transform: translateX(-50%);
    white-space: nowrap;
}

.timeline-hover-preview[hidden] {
    display: none !important;
}

.timeline-rail,
.timeline-progress,
.timeline-section-layer,
.timeline-gap-layer,
.timeline-loop-layer,
.timeline-label-layer,
.timeline-marker-layer,
.timeline-scrubber {
    position: absolute;
    left: 0;
    right: 0;
}

.timeline-rail,
.timeline-progress {
    top: 1.62rem;
    height: 0.34rem;
    border-radius: 999px;
}

.timeline-rail {
    background: rgba(255, 0, 0, 0);
    z-index: 1;
}

.timeline-progress {
    right: auto;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    z-index: 2;
    display: none;
}

.timeline-section-layer,
.timeline-gap-layer,
.timeline-loop-layer,
.timeline-label-layer,
.timeline-marker-layer {
    inset: 0;
}

.timeline-section-span {
    position: absolute;
    top: 1.62rem;
    left: var(--start);
    width: var(--width);
    height: 0.34rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-12);
    z-index: 3;
}

.timeline-section-span::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--fill, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

.timeline-section-span.is-hovered {
    background: rgba(255, 255, 255, 0.4);
}

.timeline-gap-layer {
    display: none;
}

.timeline-loop-layer {
    z-index: 4;
    pointer-events: none;
}

.timeline-loop-span {
    position: absolute;
    top: 1.62rem;
    height: 0.34rem;
    border-radius: 999px;
    overflow: hidden;
    background: var(--loop-accent-bed);
}

.timeline-loop-span::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--loop-fill, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--loop-accent-copy), var(--loop-accent));
}

.timeline-loop-span.is-active {
    background: var(--loop-accent-bed);
}

.timeline-loop-marker,
.timeline-user-marker {
    position: absolute;
    top: 0.82rem;
    transform: translateX(-50%);
    width: 0.9rem;
    height: 0.78rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.timeline-loop-marker {
    top: 0.86rem;
    height: 0.72rem;
    color: rgba(255, 255, 255, 0.72);
}

.timeline-loop-marker svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.28));
}

.timeline-loop-marker.is-active {
    color: var(--loop-accent);
}

.timeline-user-marker::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    left: 50%;
    width: 0.28rem;
    height: 1.02rem;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62));
}

.timeline-label-layer {
    z-index: 6;
}

.timeline-label {
    position: absolute;
    top: 0.05rem;
    min-height: 1.1rem;
    padding-left: 0.12rem;
    pointer-events: none;
}

.timeline-label-button {
    display: inline-block;
    max-width: 100%;
    padding: 0.08rem 0.2rem 0.08rem 0;
    border: 0;
    background: transparent;
    color: var(--soft);
    font: inherit;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: auto;
}

.timeline-label.is-active,
.timeline-label.is-hovered,
.timeline-label:hover .timeline-label-button,
.timeline-label.is-active .timeline-label-button,
.timeline-label.is-hovered .timeline-label-button {
    color: var(--copy);
}

.timeline-marker-layer {
    z-index: 7;
    pointer-events: none;
}

.timeline-user-marker {
    pointer-events: auto;
}

.timeline-scrubber {
    top: 1.16rem;
    height: 1rem;
    margin: 0;
    z-index: 8;
    appearance: none;
    background: transparent;
}

.timeline-scrubber::-webkit-slider-runnable-track {
    height: 1rem;
    background: transparent;
}

.timeline-scrubber::-webkit-slider-thumb {
    appearance: none;
    width: 1.12rem;
    height: 1.12rem;
    margin-top: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: var(--copy);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transition: opacity 120ms ease;
}

.timeline-scrubber::-moz-range-track {
    height: 1rem;
    background: transparent;
}

.timeline-scrubber::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background: var(--copy);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transition: opacity 120ms ease;
}

.player-timeline:hover .timeline-scrubber::-webkit-slider-thumb,
.timeline-scrubber:focus-visible::-webkit-slider-thumb {
    opacity: 1;
}

.player-timeline:hover .timeline-scrubber::-moz-range-thumb,
.timeline-scrubber:focus-visible::-moz-range-thumb {
    opacity: 1;
}

.player-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.85rem;
}

.player-now {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    justify-self: start;
}

.player-now img {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 1rem;
    background: linear-gradient(160deg, var(--surface-12), var(--surface-03) 58%, rgba(255, 255, 255, 0.015));
    border: 0;
    object-fit: cover;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.player-now img.is-missing {
    opacity: 1;
}

.player-now strong {
    display: block;
    margin-bottom: 0.18rem;
    font-size: 0.98rem;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
}

.player-copy {
    min-width: 0;
}

.player-copy span,
.player-copy .eyebrow {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    justify-self: center;
}

.section-chip {
    padding: 0.42rem 0.76rem;
    border-radius: 999px;
    background: var(--surface-08);
    border: 0;
    color: var(--copy);
    font: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.section-chip[data-empty="true"] {
    display: none;
}

.time-readout {
    color: var(--copy);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.utility-pill,
.speed-chip {
    gap: 0.4rem;
    padding: 0.45rem 0.78rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.utility-pill.is-active,
.speed-chip.is-active {
    background: var(--accent-faint);
    color: var(--copy);
}

.utility-pill[data-loop-state="active"],
.utility-pill[data-loop-state="armed"] {
    background: var(--loop-accent-soft);
    color: var(--loop-accent-copy);
}

.utility-pill[data-loop-state="active"]:hover,
.utility-pill[data-loop-state="active"]:focus-visible,
.utility-pill[data-loop-state="armed"]:hover,
.utility-pill[data-loop-state="armed"]:focus-visible {
    background: var(--loop-accent-strong);
    color: var(--loop-accent-copy);
}

.transport {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    width: min(100%, 56rem);
}

.transport-side {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.transport-side-left {
    justify-content: flex-end;
}

.transport-side-right {
    justify-content: flex-start;
}

.transport-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pure-white);
    flex: none;
}

.transport-button[disabled],
.utility-pill[disabled],
.speed-chip[disabled],
.chapter-jump[disabled],
.chapter-step[disabled],
.loop-button[disabled],
.speed-adjust[disabled],
.speed-value[disabled],
.speed-step-button[disabled] {
    opacity: 0.55;
    cursor: default;
}

.transport-button.is-primary {
    width: 3.2rem;
    height: 3.2rem;
    background: transparent;
    box-shadow: none;
}

.transport-button svg {
    width: 1.28rem;
    height: 1.28rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.35;
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.transport-button.is-primary svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2.5;
}

.speed-control {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
}

.speed-adjust,
.speed-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--copy);
    font: inherit;
}

.speed-adjust {
    width: 2.15rem;
    padding: 0;
    color: var(--pure-white);
}

.speed-slider,
.volume-cluster input {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    accent-color: var(--accent);
}

.speed-control .speed-slider {
    width: 5.5rem;
}

.speed-slider::-webkit-slider-runnable-track,
.volume-cluster input::-webkit-slider-runnable-track {
    height: 0.34rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0 var(--range-fill, 0%), var(--surface-08) var(--range-fill, 0%) 100%);
}

.speed-slider::-webkit-slider-thumb,
.volume-cluster input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 0;
    height: 0;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.speed-slider::-moz-range-track,
.volume-cluster input::-moz-range-track {
    height: 0.34rem;
    border-radius: 999px;
    background: var(--surface-08);
}

.speed-slider::-moz-range-progress,
.volume-cluster input::-moz-range-progress {
    height: 0.34rem;
    border-radius: 999px;
    background: var(--accent);
}

.speed-slider::-moz-range-thumb,
.volume-cluster input::-moz-range-thumb {
    width: 0;
    height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.speed-slider-panel::-webkit-slider-thumb {
    width: 0.88rem;
    height: 0.88rem;
    margin-top: -0.27rem;
    border-radius: 50%;
    background: var(--accent);
}

.speed-slider-panel::-moz-range-thumb {
    width: 0.88rem;
    height: 0.88rem;
    border-radius: 50%;
    background: var(--accent);
}

.speed-value {
    min-width: 3.5rem;
    padding: 0 0.78rem;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.acceleration-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 24;
}

.acceleration-control::before {
    content: "";
    position: absolute;
    left: -0.15rem;
    right: -0.15rem;
    bottom: 100%;
    height: 0.7rem;
}

.acceleration-button.is-active {
    background: transparent;
    color: var(--auto-speed-accent-copy);
}

.acceleration-button.is-active:hover,
.acceleration-button.is-active:focus-visible {
    background: transparent;
    color: var(--auto-speed-accent-copy);
}

.acceleration-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.35;
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.acceleration-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.2rem);
    z-index: 40;
    display: grid;
    gap: 0.45rem;
    min-width: 10.5rem;
    padding: 0.65rem;
    border: 0;
    border-radius: 0.95rem;
    background: var(--surface-float);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(0.25rem);
    transition: opacity 140ms ease, transform 140ms ease;
}

.acceleration-control:hover .acceleration-popover,
.acceleration-control:focus-within .acceleration-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.acceleration-popover span {
    color: var(--muted);
    font-size: 0.76rem;
}

.acceleration-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-04);
    color: var(--copy);
    font: inherit;
}

.player-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: nowrap;
    justify-self: end;
}

.volume-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.volume-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pure-white);
    font: inherit;
}

.volume-button svg {
    width: 1.12rem;
    height: 1.12rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-opacity: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: inherit;
}

.volume-button.is-muted {
    color: var(--danger-copy-muted);
}

.volume-button.is-muted::after {
    content: "";
    position: absolute;
    width: 1.1rem;
    height: 0.12rem;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(-45deg);
}

.volume-cluster input {
    width: 5.5rem;
}

.player-menu {
    position: relative;
    z-index: 24;
}

.player-menu::before {
    content: "";
    position: absolute;
    left: -0.2rem;
    right: -0.2rem;
    bottom: 100%;
    height: 0.7rem;
}

.menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    list-style: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pure-white);
    cursor: pointer;
}

.menu-button::-webkit-details-marker {
    display: none;
}

.menu-button svg {
    width: 1.12rem;
    height: 1.12rem;
    fill: currentColor;
    fill-opacity: 1;
}

.player-menu-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.55rem);
    z-index: 40;
    display: grid;
    gap: 0.35rem;
    min-width: 10.5rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 1rem;
    background: var(--surface-float);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-radius: 0.8rem;
    background: var(--surface-03);
    color: var(--copy);
    font: inherit;
    text-align: left;
}

.menu-item:hover {
    background: var(--surface-06);
}

.menu-item.is-danger {
    color: var(--danger-copy);
    background: var(--danger-surface);
}

.loop-button.is-danger {
    background: var(--danger-surface-strong);
    color: var(--danger-copy);
}

@media (max-width: 960px) {
    .practice-stage {
        grid-template-columns: 1fr;
        --stage-video-target-width: 100%;
        --stage-video-width: 100%;
        --stage-video-height: auto;
        height: auto;
        max-height: none;
        min-height: 0;
    }

    .player-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .player-now,
    .player-center,
    .player-tools {
        justify-content: center;
    }

    .transport {
        width: 100%;
    }

    .video-card {
        height: auto;
        min-height: 0;
    }

    .chapter-card {
        height: auto;
        max-height: none;
    }

    .stage-resizer {
        display: none;
    }

    .hide-first {
        display: none;
    }
}

@media (max-width: 720px) {
    .app-header {
        padding: 0.95rem 0.9rem 0.85rem;
    }

    .app-main {
        padding: 0.75rem;
    }

    .content-stack {
        padding: 0.8rem;
    }

    .content-frame {
        border-radius: 1.55rem;
    }

    .stage-card,
    .video-card,
    .chapter-card {
        padding: 0;
    }

    .header-nav,
    .header-meta,
    .volume-cluster {
        display: none;
    }

    .app-player {
        padding: 0.65rem 0.85rem calc(env(safe-area-inset-bottom) + 0.8rem);
    }

    .transport {
        gap: 0.35rem;
    }

    .hide-second,
    .hide-third {
        display: none;
    }

    .charts-toolbar-main {
        grid-template-columns: 1fr;
    }

    .charts-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charts-table {
        min-width: 38rem;
    }

    .speed-control {
        order: 5;
    }

    .speed-panel-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .timeline-label {
        font-size: 0.62rem;
    }
}

@media (max-width: 560px) {
    .video-card {
        min-height: 0;
    }

    .rail-tabs {
        width: 100%;
    }

    .rail-tab {
        flex: 1;
    }

    .time-readout {
        display: none;
    }

    .charts-panel {
        padding: 0.85rem;
    }

    .charts-filter-grid {
        grid-template-columns: 1fr;
    }

    .queue-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .queue-index {
        display: none;
    }
}

@media (max-width: 1180px) {
    .chapter-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .chapter-controls {
        justify-self: start;
    }
}
