/* =========================================
   8bit Studio - Retro Modern CSS System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;700;900&display=swap');

:root {
    /* --- Rich Color Palette (BLUE THEME) --- */
    --primary: #00e5ff;
    --primary-glow: #00e5ffcc;
    --secondary: #2979ff;
    --secondary-glow: #2979ffcc;
    --accent: #00e676;
    /* Green Accent */

    /* --- Deep & Glass Backgrounds --- */
    --bg-dark: #050510;
    --bg-panel: rgba(10, 25, 40, 0.7);
    --bg-card: rgba(20, 40, 60, 0.5);
    --glass-blur: blur(20px);
    --glass-border: 1px solid rgba(0, 229, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* --- Typography --- */
    --text-main: #ffffff;
    --text-dim: #88aabb;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* --- Layout Dimensions --- */
    --sidebar-width: 260px;
    --player-height: 90px;
    --header-height: 70px;
    /* Slightly taller */

    /* --- Animations --- */
    --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset Overlay */
.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga' !important;
    font-variant-ligatures: contextual !important;
}

.material-icons-outlined {
    font-family: 'Material Icons Outlined' !important;
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga' !important;
    font-variant-ligatures: contextual !important;
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(41, 121, 255, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    /* App container handles scroll */
}

/* --- LOADING OVERLAY --- */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#loading.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite alternate;
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--primary);
}

.loading-sub {
    color: var(--text-dim);
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

/* --- MAIN LAYOUT --- */
#app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    grid-template-rows: 1fr var(--player-height);
    height: 100vh;
}

/* --- 1. SIDEBAR --- */
#sidebar {
    grid-row: 1 / 2;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.sidebar-toggle-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.brand-icon {
    font-size: 2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.brand-sub {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* --- PROFILE HUB --- */
#view-profile {
    --profile-accent: var(--primary);
    --profile-secondary: var(--secondary);
    --profile-surface: rgba(0, 229, 255, 0.16);
}

.profile-header-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-header-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-hub-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 4px 40px;
}

.profile-hero,
.profile-section,
.profile-stat-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.profile-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 24px;
    padding: 24px;
    background:
        radial-gradient(circle at top right, var(--profile-surface), transparent 50%),
        linear-gradient(145deg, rgba(8, 16, 28, 0.96), rgba(9, 18, 30, 0.88));
}

.profile-hero::after {
    content: '';
    position: absolute;
    inset: auto -40px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 72%);
    pointer-events: none;
}

.profile-hero-copy {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    min-width: 0;
}

.profile-avatar-wrapper {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 30px;
    overflow: hidden;
    border: 3px solid var(--profile-accent);
    box-shadow: 0 0 26px color-mix(in srgb, var(--profile-accent) 42%, transparent);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-identity-stack {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-chip-row,
.profile-chip-list,
.profile-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-chip.subtle {
    color: var(--text-dim);
}

.profile-name {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    line-height: 1.05;
}

.profile-headline {
    font-size: 1rem;
    color: var(--profile-accent);
    font-weight: 600;
}

.profile-bio {
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 720px;
    white-space: pre-wrap;
}

.profile-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.84rem;
}

.profile-link-pill:hover {
    border-color: var(--profile-accent);
    color: var(--profile-accent);
}

.profile-hero-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-meta-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-meta-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.05rem;
}

.profile-meta-label {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.profile-section {
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(10, 18, 32, 0.92), rgba(10, 18, 30, 0.72));
}

.profile-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-section-heading h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.profile-section-heading p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.profile-featured-note {
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-wrap;
}

.profile-featured-card {
    display: grid;
    gap: 12px;
}

.profile-featured-entry,
.profile-media-card,
.profile-post-card,
.profile-prompt-card {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.profile-card-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--profile-accent);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.profile-card-body {
    color: var(--text-dim);
    line-height: 1.65;
    white-space: pre-wrap;
}

.profile-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.profile-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    font-size: 0.76rem;
}

.profile-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.profile-card-action {
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.82rem;
}

.profile-card-action:hover {
    border-color: var(--profile-accent);
    color: var(--profile-accent);
}

.song-browse-card,
.profile-song-card {
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.profile-song-cover {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 300px;
    padding: 18px;
    overflow: hidden;
}

.profile-song-cover-img,
.profile-song-cover-fallback,
.profile-song-cover-scrim {
    position: absolute;
    inset: 0;
}

.profile-song-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-song-cover-fallback {
    background:
        radial-gradient(circle at 78% 24%, var(--song-cover-glow, rgba(255, 255, 255, 0.18)) 0%, rgba(0, 0, 0, 0) 34%),
        linear-gradient(145deg, var(--song-cover-start, rgba(0, 198, 255, 0.85)), var(--song-cover-end, rgba(18, 31, 63, 0.98)));
}

.profile-song-cover-scrim {
    background: linear-gradient(180deg, rgba(6, 10, 20, 0.08) 0%, rgba(6, 10, 20, 0.28) 32%, rgba(6, 10, 20, 0.92) 100%);
}

.profile-song-topline,
.profile-song-main {
    position: relative;
    z-index: 1;
}

.profile-song-topline {
    position: absolute;
    inset: 16px 16px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.profile-song-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 14, 28, 0.52);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.profile-song-chip.is-ghost {
    color: rgba(226, 238, 255, 0.9);
}

.profile-song-main {
    display: grid;
    gap: 8px;
    max-width: 24rem;
}

.profile-song-title {
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 1.5vw, 1.45rem);
    line-height: 1.18;
    color: #fff;
    text-shadow: 0 14px 28px rgba(0, 0, 0, 0.42);
}

.profile-song-author-link {
    width: fit-content;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(232, 242, 255, 0.92);
    font-size: 0.98rem;
    cursor: pointer;
    text-align: left;
}

.profile-song-author-link:hover {
    color: var(--profile-accent);
}

.profile-song-author-link.is-static {
    cursor: default;
}

.profile-song-metrics {
    color: rgba(226, 238, 255, 0.78);
    font-size: 0.84rem;
    line-height: 1.55;
}

.profile-song-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.82), rgba(7, 11, 20, 0.96));
}

.profile-song-date {
    color: var(--text-dim);
    font-size: 0.84rem;
}

.profile-song-play {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.song-browse-card.is-featured .profile-song-cover,
.profile-song-card.is-featured .profile-song-cover {
    min-height: 340px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.profile-stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 120px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.profile-stat-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--profile-accent);
}

.profile-stat-label {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.profile-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.profile-achievement-chip {
    min-width: 180px;
    max-width: 100%;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-achievement-chip strong {
    display: block;
    margin-bottom: 6px;
}

.profile-achievement-chip p {
    color: var(--text-dim);
    font-size: 0.84rem;
    line-height: 1.55;
}

.profile-dynamic-sections {
    display: grid;
    gap: 18px;
}

.profile-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

#profile-songs-list.profile-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.profile-post-card {
    grid-column: span 2;
}

.profile-inline-note {
    margin-bottom: 14px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.profile-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-toggle-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 12px;
}

.profile-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 0.84rem;
}

.profile-danger-zone {
    margin-top: 24px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 94, 127, 0.34);
    background:
        radial-gradient(circle at top right, rgba(255, 94, 127, 0.18), transparent 42%),
        linear-gradient(155deg, rgba(36, 10, 18, 0.95), rgba(20, 8, 14, 0.9));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 18px 38px rgba(0, 0, 0, 0.28);
}

.profile-danger-zone-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.profile-danger-zone-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 154, 171, 0.92);
}

.profile-danger-zone-header h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #fff5f7;
}

.profile-danger-zone-body {
    margin: 0 0 14px;
    color: rgba(255, 228, 233, 0.84);
    line-height: 1.7;
}

.profile-billing-shortcut {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-danger-zone-target {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 236, 240, 0.96);
    font-size: 0.92rem;
    word-break: break-word;
}

.profile-danger-note {
    display: block;
    margin-top: 8px;
    color: rgba(255, 191, 204, 0.8);
    line-height: 1.6;
    font-size: 0.84rem;
}

.profile-danger-actions {
    margin-top: 14px;
}

.profile-secondary-btn {
    width: 100%;
    margin-top: 12px;
    border: 1px solid rgba(0, 229, 255, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(180deg, rgba(15, 46, 78, 0.95), rgba(6, 25, 44, 0.94));
    color: #dffbff;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.profile-secondary-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.profile-danger-btn {
    width: 100%;
    border: 1px solid rgba(255, 130, 156, 0.48);
    border-bottom-width: 3px;
    border-radius: 16px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #ff6f8e 0%, #db375f 55%, #8d1733 100%);
    color: #fff;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow:
        0 14px 28px rgba(141, 23, 51, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.profile-danger-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 18px 32px rgba(141, 23, 51, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.profile-danger-btn:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    box-shadow: none;
}

@media (max-width: 720px) {
    .pricing-billing-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .pricing-billing-actions {
        align-items: stretch;
    }

    .pricing-billing-status-badge,
    .pricing-manage-btn {
        width: 100%;
    }
}

.profile-toggle-item input {
    accent-color: var(--profile-accent);
}

.profile-prompt-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#profile-follow-btn.active {
    background: var(--profile-accent);
    color: #041019;
}

#view-profile[data-layout-mode="compact"] .profile-card-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#view-profile[data-layout-mode="compact"] .profile-post-card {
    grid-column: span 1;
}

#view-profile[data-layout-mode="stacked"] .profile-hero {
    grid-template-columns: 1fr;
}

@media (max-width: 1100px) {
    .profile-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #profile-songs-list.profile-card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-post-card {
        grid-column: span 1;
    }

    .profile-toggle-group,
    .profile-modal-grid,
    .profile-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .profile-header-container {
        flex-wrap: wrap;
    }

    .profile-header-actions {
        width: 100%;
        margin-left: 0;
    }

    .profile-hero-copy {
        flex-direction: column;
    }

    .profile-avatar-wrapper {
        width: 104px;
        height: 104px;
        flex-basis: 104px;
    }

    .profile-toggle-group,
    .profile-modal-grid,
    .profile-stats-grid,
    .profile-card-list {
        grid-template-columns: 1fr;
    }

    .profile-song-cover {
        min-height: 250px;
    }

    .profile-song-card.is-featured .profile-song-cover {
        min-height: 280px;
    }

    .profile-danger-zone {
        padding: 16px;
    }

    .profile-danger-btn {
        font-size: 10px;
        padding: 13px 14px;
    }
}

.nav-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-dim);
    text-align: left;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.1), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item .icon {
    font-size: 1.2rem;
}

.user-area {
    margin-top: auto;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.user-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.user-rank {
    font-family: var(--font-heading);
    color: var(--secondary);
    font-size: 0.7rem;
    margin-bottom: 5px;
}

.user-credits {
    font-weight: bold;
    margin-bottom: 10px;
}

#upgrade-btn {
    width: 100%;
    background: linear-gradient(45deg, var(--secondary), #aa00aa);
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 0, 255, 0.3);
}

/* --- 2. CONTENT AREA --- */
#content-area {
    grid-column: 2;
    grid-row: 1;
    overflow-y: auto;
    padding: 30px;
    background: radial-gradient(circle at top right, #1a1a3a 0%, var(--bg-dark) 60%);
}

.sidebar-reopen-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1200;
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 204, 0.22);
    background: rgba(10, 16, 25, 0.9);
    color: var(--primary);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.sidebar-reopen-btn:hover {
    background: rgba(14, 24, 36, 0.96);
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
    opacity: 1 !important;
    /* Force visibility even if anim fails */
    animation: fadeIn 0.3s ease;
}

#view-wave-editor,
.wave-editor-main-shell,
.wave-editor-main-host {
    min-height: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
}

.section-header h2 {
    font-family: var(--font-heading);
    color: #fff;
    letter-spacing: 1px;
}

/* --- DASHBOARD: AI PANEL --- */
.ai-architect-panel {
    background: linear-gradient(135deg, rgba(0, 40, 60, 0.8), rgba(0, 10, 20, 0.9));
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1);
}

.action-panel {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.ai-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-toggles {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-actions {
    display: flex;
    justify-content: center;
}

.primary-btn.huge {
    width: 100%;
    padding: 20px;
    font-size: 1.2rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 0 15px var(--primary);
    transition: all 0.2s;
}

/* --- NEW CONTROL TOOLBAR (Suno Style) --- */
.control-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-group.right {
    margin-left: auto;
}

/* Compact Selects for Toolbar */
.retro-select.compact {
    padding: 5px 8px;
    font-size: 0.8rem;
    height: 32px;
    border-color: #666;
    background: #000;
    color: #ffffff;
    /* Pure White for max contrast */
    font-weight: 500;
    max-width: 150px;
}

.retro-select.compact:focus {
    border-color: var(--primary);
    color: #ffffff;
}

.check-box-input.compact {
    font-size: 0.8rem;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #333;
}

.prompt-bar-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Prompt Input */
.prompt-wrapper {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

#ai-prompt-input {
    width: 100%;
    height: auto;
    min-height: 80px;
    max-height: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    color: #fff;
    padding: 15px;
    font-size: 1rem;
    font-family: var(--font-body);
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    line-height: 1.5;
    overflow-y: auto;
}

#ai-prompt-input::-webkit-scrollbar {
    width: 8px;
}

#ai-prompt-input::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

#ai-prompt-input::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

#ai-prompt-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    outline: none;
}

.prompt-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.8;
}

/* --- PROMPT BAR LAYOUT --- */
.prompt-bar-container {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 10px;
}

.prompt-input-area {
    flex-grow: 1;
}

.prompt-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 160px;
}

.action-panel.suno-layout {
    padding: 0 10px;
}

#ai-prompt-input {
    min-height: 80px;
}

.hidden {
    display: none !important;
}

.hidden-mobile {
    display: block;
}

.playlist-layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.playlist-left-panel {
    min-width: 0;
}

.playlist-right-panel {
    position: sticky;
    top: 16px;
    min-height: 560px;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(0, 255, 204, 0.12);
    background:
        radial-gradient(circle at top, rgba(0, 255, 204, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(8, 12, 20, 0.96), rgba(6, 10, 16, 0.96));
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.34);
}

.rp-placeholder {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
}

.rp-empty-icon {
    font-size: 3.4rem;
}

.rp-detail-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rp-header-section {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.rp-artwork {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(28, 38, 54, 0.95), rgba(10, 14, 22, 0.98));
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rp-artwork-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rp-track-info h2 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.2;
}

.rp-track-info h3 {
    margin: 10px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
}

.rp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 204, 0.14);
    background: rgba(0, 255, 204, 0.07);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.84rem;
}

.rp-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
}

.rp-actions-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rp-btn-primary,
.rp-btn-small,
.rp-btn-icon,
.library-primary-btn,
.playlist-action-btn,
.playlist-danger-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rp-btn-primary:hover,
.rp-btn-small:hover,
.rp-btn-icon:hover,
.library-primary-btn:hover,
.playlist-action-btn:hover,
.playlist-danger-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 204, 0.26);
    background: rgba(0, 255, 204, 0.1);
}

.rp-btn-primary {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.26), rgba(64, 214, 255, 0.18));
    border-color: rgba(0, 255, 204, 0.28);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.rp-btn-icon {
    min-width: 54px;
    font-size: 1.1rem;
}

.rp-btn-icon.active {
    color: #ff78b9;
    border-color: rgba(255, 120, 185, 0.28);
    background: rgba(255, 120, 185, 0.12);
}

.rp-btn-icon.danger,
.playlist-danger-btn {
    color: #ff8f8f;
}

.rp-meta-section,
.rp-progression-section {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
}

.rp-meta-section h4,
.rp-progression-section h4 {
    margin: 0 0 14px;
    font-size: 0.96rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.rp-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rp-progression-box {
    min-height: 76px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
    white-space: pre-wrap;
}

.library-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.library-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.library-toolbar h3 {
    margin: 0;
    font-size: 1.4rem;
}

.library-toolbar p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.68);
}

.library-primary-btn {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.24), rgba(64, 214, 255, 0.18));
    border-color: rgba(0, 255, 204, 0.24);
    font-weight: 700;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.playlist-library-shell {
    min-height: 360px;
}

.playlist-library-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 18px;
}

.playlist-library-list,
.playlist-song-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playlist-library-card,
.playlist-library-detail,
.playlist-song-item {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(7, 11, 18, 0.9);
}

.playlist-library-card {
    padding: 16px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.playlist-library-card:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 204, 0.18);
}

.playlist-library-card.active {
    border-color: rgba(0, 255, 204, 0.28);
    box-shadow: 0 20px 28px rgba(0, 0, 0, 0.2);
}

.playlist-library-card-header,
.playlist-song-main,
.playlist-library-actions,
.playlist-song-actions {
    display: flex;
    gap: 10px;
}

.playlist-library-card-header,
.playlist-song-item {
    justify-content: space-between;
}

.playlist-library-card-header {
    align-items: flex-start;
}

.playlist-library-name,
.playlist-song-title {
    margin: 0;
    font-weight: 700;
    color: #fff;
}

.playlist-library-meta,
.playlist-song-sub {
    margin-top: 8px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.68);
}

.playlist-library-actions {
    margin-top: 14px;
}

.playlist-library-detail {
    min-height: 320px;
    padding: 18px;
}

.playlist-library-detail h4 {
    margin: 0;
}

.playlist-song-item {
    align-items: center;
    padding: 14px 16px;
}

.playlist-song-main {
    min-width: 0;
    flex-direction: column;
}

.playlist-song-title,
.playlist-song-sub {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-action-btn,
.playlist-danger-btn {
    padding: 10px 14px;
    border-radius: 12px;
}

@media (max-width: 980px) {

    .playlist-layout-wrapper,
    .playlist-library-layout {
        grid-template-columns: 1fr;
    }

    .playlist-right-panel {
        position: static;
        min-height: 0;
    }

    .hidden-mobile {
        display: none !important;
    }
}

@media (max-width: 720px) {
    .prompt-bar-container {
        flex-direction: column;
    }

    .prompt-actions {
        min-width: 0;
    }

    .action-toggles {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .rp-header-section,
    .rp-actions,
    .rp-actions-secondary {
        grid-template-columns: 1fr;
    }

    .library-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}

.model-selector-fixed {
    width: 100%;
    text-align: right;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.model-selector-fixed:hover {
    color: var(--primary);
}

.action-toggles {
    display: flex;
    justify-content: flex-end;
    /* Align right */
    gap: 10px;
    width: 100%;
}

.check-box-input.compact span {
    font-size: 0.75rem;
}

/* --- PLAYLIST: LIST VIEW (Suno Style) --- */
/* Completely Override Grid */
.playlist-grid {
    display: flex !important;
    /* Force Flex */
    flex-direction: column !important;
    gap: 6px;
    /* Reduced gap */
    overflow-y: auto;
    /* Limit height if needed or let it scroll with content-area */
    padding-bottom: 20px;
    grid-template-columns: none !important;
    /* Reset Grid */
}

/*
   Playlist Item Structure Refactor
   .song-card (Wrapper, Overflow Hidden, PADDING for border)
     -> ::before (Rotating Gradient)
     -> .card-inner (Flex Content, Black Background, Z-Index Top)
*/

/* 
   ZERO-BASE IMPLEMENTATION: Robust Animated Border
   Strategy: Brute Force Reliability
   1. Card: Simple container with overflow hidden.
   2. Rotator: Absurdly large fixed pixel size (2500px) to guarantee coverage.
   3. Inner: Flex container with background to hide the center of rotator.
*/

.song-card {
    position: relative;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    overflow: visible;
    /* ★FIX: サブメニュー表示のためにvisibleに変更 */

    /* Create the "border width" via padding */
    padding: 2px;

    /* Default State (Not Playing) */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.song-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- PLAYING STATE --- */
.song-card.is-playing {
    /* Remove default border so the padding+rotator acts as border */
    border: none;
    background: transparent;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.15);
    overflow: hidden;
    /* ★FIX: カラフルライト演出をカード内に封じ込め */
}

/* THE ROTATOR (Replacing ::before) */
.song-card.is-playing::before {
    content: '';
    position: absolute;

    /* Center setup */
    top: 50%;
    left: 50%;

    /* 
       ROBUST SIZING: 300vmax
       This guarantees the square is at least 3x the largest screen dimension,
       ensuring 'flat' rotation edges passing through the card.
    */
    width: 300vmax;
    height: 300vmax;

    /* The Rainbow (Full Loop) */
    background: conic-gradient(from 0deg,
            #ff0055 0deg,
            #ff00cc 90deg,
            #3333ff 180deg,
            #00ccff 270deg,
            #ff0055 360deg);

    /* Animation */
    transform-origin: center;
    animation: rotate-hero 4s linear infinite;

    /* Layering: Behind Inner */
    z-index: 0;

    /* Centering with classic margin method */
    margin-top: -150vmax;
    /* Half of height */
    margin-left: -150vmax;
    /* Half of width */
}

@keyframes rotate-hero {
    100% {
        transform: rotate(360deg);
    }
}

/* 
   THE MASK (Restored ::after) 
   This ensures a black background exists regardless of HTML structure (JS cache issues).
   It sits ON TOP of the rotator but BELOW the content.
*/
.song-card.is-playing::after {
    content: '';
    position: absolute;

    /* 
       Border Width Simulation:
       inset: 3px creates a 3px transparency gap around the edges,
       revealing the rotating ::before underneath.
    */
    inset: 3px;

    background: #14141e;
    /* Opaque Black/Blue */
    border-radius: 4px;

    /* Layer 1: Middle */
    z-index: 1;
}

/* --- ACTIVE STATE (Selection) --- */
.song-card.active .card-inner {
    background: transparent;
    /* Let ::after or parent bg show */
}

/* Fallback if not playing */
.song-card.active:not(.is-playing) {
    background: rgba(255, 255, 255, 0.05);
}

/* --- INNER CONTENT --- */
/* 
   We keep card-inner styles for layout, but rely on ::after for background 
   to be safe against JS cache issues.
*/
.card-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;

    /* Transparent so ::after shows through */
    background: transparent;
    border-radius: 4px;
    /* Match parent minus padding */
    padding: 8px 20px 8px 12px;
    /* ★FIX: 右側のレインボー枠被り防止のため右パディングを拡張 */

    /* Layer 2: Top */
    z-index: 10;
}

/* Ensure Inner Elements are definitely visible above ::after (z:1) */
.card-thumb,
.card-info,
.card-actions {
    position: relative;
    z-index: 20;
    pointer-events: auto;
}

/* Visualizer Container */
.card-visualizer {
    flex-grow: 1;
    height: 48px;
    margin: 0 16px;
    position: relative;
    z-index: 100;
    pointer-events: none;

    /* DOM Visualizer Flex Layout */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
}

/* Bright Cyan Bars */
.viz-bar {
    width: 6px;
    background: #00ffcc;
    border-radius: 2px;
    transition: height 0.05s linear;
    /* Smooth animation */
    min-height: 4px;
    /* Ensure visibility even when silent */
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
}

/* Typography Overrides */
.card-thumb {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.card-title {
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.card-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.card-meta span {
    margin-right: 8px;
}

.card-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.card-btn:hover {
    color: #ff4444;
}

/* Content Text Shadows / Colors */
.card-inner .card-thumb {
    color: rgba(255, 255, 255, 0.7);
}

.card-inner .card-title {
    color: #fff;
}

.card-inner .card-meta {
    color: rgba(255, 255, 255, 0.5);
}

/* Visualizer Canvas Fix */
.card-visualizer {
    flex-grow: 1;
    height: 36px;
    margin-right: 10px;
    position: relative;
    /* Ensure transparency so canvas shows */
    background: transparent;
}

.card-visualizer canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Make sure canvas is visible */
    display: block;
}

.card-thumb {
    width: 32px;
    /* Smaller icon */
    height: 32px;
    margin-right: 12px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

/* Global Reset for Layout Safety */
* {
    box-sizing: border-box;
}

/* Info Area (Title & Meta) */
.card-info {
    width: 200px;
    /* Fixed width for info to allow visualizer space? Or flex? */
    flex-shrink: 0;
    /* Prevent shrinking */
    display: flex;
    flex-direction: column;
    /* Stack Title and Meta for compactness */
    justify-content: center;
    gap: 2px;
    margin-right: 15px;
    min-width: 0;
}

.card-title {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
    /* CRITICAL: Required for ellipsis in nested flex */
}

.card-meta {
    display: flex;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-family: monospace;
    flex-shrink: 0;
}

.card-meta span {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

.card-meta button.card-meta-prompt,
.card-prompt-row {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(0, 255, 204, 0.18);
    background: rgba(0, 0, 0, 0.32);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 2px 6px;
    font: inherit;
    line-height: 1.35;
    cursor: pointer;
    min-width: 0;
    max-width: min(100%, 28ch);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-meta button.card-meta-prompt {
    display: inline-flex;
    align-items: center;
}

.card-meta button.card-meta-prompt:hover,
.card-prompt-row:hover {
    background: rgba(0, 255, 204, 0.14);
    border-color: rgba(0, 255, 204, 0.32);
    color: #fff;
}

.card-prompt-row {
    display: block;
    width: 100%;
    margin-top: 6px;
    text-align: left;
    font-size: 0.68rem;
}

.card-prompt-row:focus,
.card-meta button.card-meta-prompt:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.32), 0 0 12px rgba(0, 255, 204, 0.12);
}

/* INLINE VISUALIZER AREA */
.card-visualizer {
    flex-grow: 1;
    /* Take remaining space */
    height: 36px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Canvas styling inside inline container */
.card-visualizer canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or cover */
    opacity: 0.8;
}

/* Actions Area */
.card-actions {
    margin-left: 20px;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.card-btn {
    width: 28px;
    /* Smaller buttons */
    height: 28px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid #444;
    border-radius: 4px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-btn:hover {
    color: #ff4444;
    border-color: #ff4444;
    background: rgba(255, 0, 0, 0.1);
}

/* --- PARAMETER PANEL (Collapsible) --- */
.parameter-panel {
    background: var(--bg-panel);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
}

.parameter-panel summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
    user-select: none;
}

.parameter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.retro-select {
    background: #0b1118;
    background-color: #0b1118;
    color: #f7fbff;
    color-scheme: dark;
    border: 1px solid #444;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* --- 3. EDITOR VIEW --- */
.editor-container {
    background: var(--bg-panel);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.editor-tabs {
    display: flex;
    background: #000;
    border-bottom: 1px solid #333;
}

.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--font-body);
    border-right: 1px solid #222;
}

.tab-btn.active {
    background: var(--bg-panel);
    color: #fff;
    border-bottom: 2px solid var(--secondary);
}

.tab-content {
    padding: 20px;
}

.control-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-row label {
    width: 100px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.retro-input {
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 8px;
    flex-grow: 1;
}

/* VALUE DISPLAYS */
.pan-value-disp,
.vol-value-disp {
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.65rem;
    color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #333;
    z-index: 20;
    pointer-events: none;
    min-width: 45px;
    text-align: center;
}

.pan-value-disp {
    margin-bottom: 5px;
}

.vol-value-disp {
    margin-bottom: 10px;
    color: #f0f;
    /* Volume distinct color */
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.editor-footer {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #151525;
}

.primary-btn {
    background: var(--secondary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.secondary-btn {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- MIXER PANEL (Legacy, kept for structure but mostly handled by overlay now) --- */
.mixer-panel {
    background: #000;
    border: 2px solid #333;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.fader-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
}

/* ネオンスクロールバースタイル */
.fader-container::-webkit-scrollbar {
    height: 8px;
}

.fader-container::-webkit-scrollbar-track {
    background: rgba(0, 50, 100, 0.3);
    border-radius: 4px;
}

.fader-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #00e5ff, #00a0c0);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

.fader-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #00ffff, #00c8e0);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}

.fader-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    height: 220px;
    flex-shrink: 0;
}

.fader-strip label {
    white-space: nowrap;
    font-size: 0.75rem;
    text-align: center;
}

/* チャンネル別MIDIダウンロードは右ラックの Export に集約 */
.ch-midi-btn {
    display: none !important;
}

/* Vertical Slider (Standardized) */
.v-fader {
    /* Removed deprecated appearance: slider-vertical */
    /* Use standard writing-mode */
    writing-mode: vertical-lr;
    direction: rtl;
    /* To make Up = High Volume */
    width: 20px;
    height: 120px;
    cursor: pointer;
    /* Basic cross-browser reset */
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

/* Track & Thumb Styling for Vertical Slider (Cross-browser tricky) */
.v-fader::-webkit-slider-runnable-track {
    width: 6px;
    background: #444;
    border-radius: 3px;
}

.v-fader::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #00FFFF;
    margin-top: -5px;
    /* (16 - 6) / 2 = 5, but negative for center? Track is 6px. */
    /* writing-mode vertical-lr means width is height visually? No, standard range input logic applies locally. */
    /* Empirically, if track is 6px and thumb is 16px, difference is 10px. Margin should be approx -5px */
    transform: translateX(-5px);
    /* Center horizontally relative to track */
    box-shadow: 0 0 5px #00FFFF;
}


/* --- 4. PLAYER BAR (FOOTER) --- */
#player-bar {
    grid-column: 1 / 3;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(300px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 12px 22px 14px;
    background: linear-gradient(180deg, rgba(13, 18, 26, 0.98) 0%, rgba(10, 12, 18, 0.98) 100%);
    border-top: 1px solid rgba(0, 255, 204, 0.18);
    z-index: 100;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.42);
}

#player-bar .player-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    height: auto;
    flex-shrink: 0;
}

#player-bar .player-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(86, 206, 255, 0.18);
    background: radial-gradient(circle at 35% 35%, rgba(40, 53, 78, 0.78), rgba(12, 17, 28, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 8px 18px rgba(0, 0, 0, 0.3);
}

#player-bar .player-btn:hover {
    background: radial-gradient(circle at 35% 35%, rgba(58, 75, 104, 0.88), rgba(18, 24, 38, 0.98));
    border-color: rgba(135, 230, 255, 0.46);
    transform: translateY(-1px);
}

#player-bar .player-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 1;
    filter: brightness(1.45) contrast(1.18) drop-shadow(0 0 8px rgba(151, 247, 255, 0.2));
}

#player-bar .player-btn.main-play {
    width: 60px;
    height: 60px;
    border-color: rgba(0, 255, 204, 0.58);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 0 22px rgba(0, 255, 204, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#player-bar .player-btn.main-play img {
    width: 34px;
    height: 34px;
}

#player-bar .mixer-toggle img {
    width: 24px;
    height: 24px;
    filter: brightness(1.28) contrast(1.08) drop-shadow(0 0 6px rgba(151, 247, 255, 0.16));
}

#player-bar .visualizer-bar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#player-bar .player-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
}

#player-bar .player-progress-label {
    color: rgba(167, 193, 213, 0.82);
    font-size: 0.64rem;
    font-family: var(--font-heading);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#player-bar .seek-container {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 8px;
    margin: 0;
    background: linear-gradient(180deg, rgba(18, 25, 37, 0.96), rgba(11, 17, 26, 0.96));
    border: 1px solid rgba(0, 255, 204, 0.12);
    border-radius: 999px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 0 1px rgba(55, 90, 122, 0.2);
}

#player-bar #position-display {
    min-width: 104px;
    text-align: right;
    color: #d6f4ff;
    font-size: 0.88rem;
    font-family: monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

#player-bar #seek-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 40px;
    background: transparent;
    cursor: pointer;
    outline: none;
    margin: 0;
    padding: 0;
}

/* Webkit系 (Chrome, Edge, Safari) トラック */
#player-bar #seek-bar::-webkit-slider-runnable-track {
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, rgba(0, 207, 255, 0.72), rgba(60, 131, 255, 0.9));
    border-radius: 999px;
}

/* Webkit系 サム (つまみ) */
#player-bar #seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f5fbff;
    border: 1px solid rgba(9, 19, 31, 0.45);
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.12),
        0 0 18px rgba(0, 255, 204, 0.42);
    margin-top: -6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Firefox トラック */
#player-bar #seek-bar::-moz-range-track {
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, rgba(0, 207, 255, 0.72), rgba(60, 131, 255, 0.9));
    border-radius: 999px;
    border: none;
}

/* Firefox サム */
#player-bar #seek-bar::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f5fbff;
    border: 1px solid rgba(9, 19, 31, 0.45);
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.12),
        0 0 18px rgba(0, 255, 204, 0.42);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* ホバー時エフェクト */
#player-bar #seek-bar:hover::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow:
        0 0 0 5px rgba(255, 255, 255, 0.14),
        0 0 22px rgba(0, 255, 204, 0.48);
}

#player-bar #seek-bar:hover::-moz-range-thumb {
    transform: scale(1.3);
    box-shadow:
        0 0 0 5px rgba(255, 255, 255, 0.14),
        0 0 22px rgba(0, 255, 204, 0.48);
}

/* フォーカス時 (アクセシビリティ) */
#player-bar #seek-bar:focus::-webkit-slider-thumb {
    box-shadow:
        0 0 0 6px rgba(0, 255, 204, 0.18),
        0 0 18px rgba(0, 255, 204, 0.42);
}

#player-bar #seek-bar:focus::-moz-range-thumb {
    box-shadow:
        0 0 0 6px rgba(0, 255, 204, 0.18),
        0 0 18px rgba(0, 255, 204, 0.42);
}

#player-bar .player-legacy-volume {
    display: none;
}

/* Main Control Group */
.player-controls {
    display: flex;
    justify-content: center;
    /* Center horizontally if container allows */
    align-items: center;
    /* Center vertically */
    gap: 15px;
    height: 100%;
    /* Ensure it uses full height for centering */
}

/* Ensure images don't cause baseline shift */
.player-btn img {
    vertical-align: middle;
}

.player-btn {
    background: #222;
    border: 1px solid #444;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.player-btn:hover {
    background: #333;
    border-color: #fff;
}

/* Playing Indicator (Spectrum) -> Replaced/Overlayed by Image */
.card-thumb {
    width: 60px;
    height: 60px;
    background: #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Default Play Icon Image */
.card-thumb::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background-image: url('assets/images/icon_play.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.song-card.active .card-thumb {
    border: 1px solid var(--primary);
}

.song-card.active .card-thumb::before {
    /* Hide play icon when playing (show spectrum instead) */
    display: none;
}

/* --- Card Visualizer (Waveform) --- */
.card-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    /* Behind text but above background? No, keep it subtle. */
    opacity: 0.8;
    pointer-events: none;
    mix-blend-mode: screen;
    /* Cool effect */
}

/* Ensure Song Info is readable over visualizer */
.song-info,
.song-meta {
    position: relative;
    z-index: 20;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.check-box-input {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-dim);
}

.check-box-input input:checked+span {
    color: var(--accent);
    text-shadow: 0 0 5px var(--accent);
}

/* =========================================
   PHASE 6: ROUTING BAY (3-PANE LAYOUT)
   ========================================= */
.routing-bay {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    background: linear-gradient(180deg, #0d0d14 0%, #050508 100%);
    border: 1px solid #222;
    border-top: 2px solid var(--primary);
    border-radius: 8px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    transition: all 0.3s ease;
    height: 520px;
    /* 固定高にしてスクロール可能にする */
}

.routing-bay.hidden {
    display: none;
}

.routing-bay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #333;
    background: rgba(0, 0, 0, 0.3);
}

.rb-title-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.inspector-badge {
    background: var(--primary);
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

#rb-main-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.4);
}

.inspector-close-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.inspector-close-btn:hover {
    color: #ff4444;
}

/* 3 Pane Flexbox Layout */
.routing-bay-body {
    display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.rb-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #333;
    background: rgba(255, 255, 255, 0.01);
}

.rb-pane:last-child {
    border-right: none;
}

.pane-assignments {
    flex: 1.2;
    border-right: 2px solid #222;
}

.pane-editor {
    flex: 1.5;
}

.pane-detail {
    flex: 2;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 5px 0 15px rgba(0, 0, 0, 0.5);
}

.pane-header {
    padding: 8px 15px;
    background: #111;
    border-bottom: 1px solid #333;
}

.pane-header h4 {
    margin: 0;
    font-size: 0.75rem;
    color: #aaa;
    letter-spacing: 1px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    transform: scale(0.9);
    transform-origin: left center;
}

.pane-content {
    padding: 15px;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 204, 0.78) rgba(255, 255, 255, 0.08);
}

.pane-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.pane-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.pane-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(0, 255, 204, 0.92), rgba(0, 168, 255, 0.88));
}

.pane-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(91, 255, 224, 0.98), rgba(78, 190, 255, 0.94));
}

/* Empty State / Defaults */
.rb-assignment-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #555;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    font-style: italic;
}

/* Base structural module for elements within panes (if needed) */
.inspector-module {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.module-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.module-title {
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.55rem;
    color: #aaa;
    letter-spacing: 1px;
}

.module-controls {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    justify-content: flex-start;
}

.module-controls.horizontal-layout {
    justify-content: space-around;
}

/* Parameter Knobs Re-implementation targeting new context */
.retro-knob.amp-style .knob-body {
    background: linear-gradient(135deg, #4a1c1c, #1a0a0a);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.8), 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 1px solid #633;
}

.retro-knob.amp-style .knob-indicator {
    background: #ff5555;
    box-shadow: 0 0 5px #ff0000;
}

.retro-knob.send-style .knob-body {
    background: linear-gradient(135deg, #1c3a4a, #0a151a);
    border: 1px solid #356;
}

.retro-knob.send-style .knob-indicator {
    background: #55aaff;
    box-shadow: 0 0 5px #0088ff;
}

.retro-knob.eq-style .knob-body {
    background: linear-gradient(135deg, #2a332a, #0f140f);
    border: 1px solid #353;
}

.retro-knob.eq-style .knob-indicator {
    background: #55ff55;
    box-shadow: 0 0 5px #00ff00;
}

/* Strip selection highlight */
.console-strip.selected-strip {
    border-left: 2px solid var(--primary);
    background: rgba(0, 255, 204, 0.05);
    box-shadow: inset 0 0 15px rgba(0, 255, 204, 0.1);
}

.rb-assignment-row {
    width: 100%;
    border: 1px solid #2a2f38;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(18, 20, 28, 0.96), rgba(10, 12, 18, 0.94));
    color: var(--text-main);
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rb-assignment-row:hover {
    border-color: rgba(0, 255, 204, 0.45);
    transform: translateY(-1px);
}

.rb-assignment-row.is-selected {
    border-color: rgba(0, 255, 204, 0.75);
    box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.25), inset 0 0 0 1px rgba(0, 255, 204, 0.12);
}

.rb-assignment-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.rb-assignment-name {
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

.rb-assignment-meta {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.rb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rb-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

.rb-chip.is-active {
    color: #d8fffa;
    border-color: rgba(0, 255, 204, 0.35);
    background: rgba(0, 255, 204, 0.12);
}

.rb-chip.is-accent {
    color: #ffe1d9;
    border-color: rgba(255, 120, 92, 0.35);
    background: rgba(255, 120, 92, 0.12);
}

.rb-card {
    border: 1px solid #29303a;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(20, 23, 31, 0.96), rgba(9, 11, 16, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rb-card-head,
.rb-bus-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rb-card-head h5,
.rb-bus-card h6 {
    margin: 4px 0 0;
    font-size: 0.98rem;
    color: #fff;
}

.rb-bus-card h6 {
    font-size: 0.88rem;
}

.rb-bus-card p,
.rb-summary-copy,
.rb-inline-note,
.rb-empty-detail {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.75rem;
    line-height: 1.5;
}

.rb-eyebrow {
    display: inline-block;
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);
}

.rb-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 255, 204, 0.14);
    border: 1px solid rgba(0, 255, 204, 0.28);
    color: #d8fffa;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.rb-grid {
    display: grid;
    gap: 12px;
}

.rb-grid.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rb-bus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rb-bus-card {
    border: 1px solid #2b3139;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rb-bus-card.is-focused {
    border-color: rgba(0, 255, 204, 0.58);
    box-shadow: 0 0 0 1px rgba(0, 255, 204, 0.18), inset 0 0 20px rgba(0, 255, 204, 0.04);
}

.rb-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rb-control-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.rb-control-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.03em;
}

.rb-control-value {
    font-size: 0.72rem;
    color: var(--primary);
}

.rb-control-note {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.45;
}

.rb-range,
.rb-number,
.rb-select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #303743;
    background: rgba(7, 8, 12, 0.8);
    color: var(--text-main);
}

.rb-range {
    appearance: none;
    height: 8px;
    padding: 0;
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.28), rgba(0, 168, 255, 0.22));
    border: none;
}

.rb-range::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #071018;
    background: #d5fff8;
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.18);
    cursor: pointer;
}

.rb-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #071018;
    background: #d5fff8;
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.18);
    cursor: pointer;
}

.rb-control.is-vertical {
    align-items: center;
    justify-content: flex-start;
}

.rb-control.is-vertical .rb-control-top {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.rb-range.is-vertical {
    width: 18px;
    min-width: 18px;
    height: 148px;
    min-height: 148px;
    writing-mode: vertical-lr;
    direction: rtl;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(0, 255, 204, 0.16), rgba(0, 168, 255, 0.3));
}

.rb-range.is-vertical::-webkit-slider-runnable-track {
    width: 6px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.rb-range.is-vertical::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 0;
    border-radius: 50%;
    border: 2px solid #071018;
    background: #f6fffc;
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.14), 0 0 14px rgba(0, 255, 204, 0.28);
    transform: translateX(-6px);
}

.rb-range.is-vertical::-moz-range-track {
    width: 6px;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.rb-range.is-vertical::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #071018;
    background: #f6fffc;
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.14), 0 0 14px rgba(0, 255, 204, 0.28);
}

.rb-number,
.rb-select {
    padding: 10px 12px;
    font-size: 0.84rem;
}

.rb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.82);
}

.rb-toggle input {
    accent-color: var(--primary);
}

.rb-toggle small {
    color: rgba(255, 255, 255, 0.4);
}

.rb-detail-link {
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 8px;
    background: rgba(0, 255, 204, 0.08);
    color: #d8fffa;
    padding: 9px 12px;
    font-size: 0.73rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rb-detail-link:hover,
.rb-detail-link.is-active {
    background: rgba(0, 255, 204, 0.16);
    border-color: rgba(0, 255, 204, 0.42);
}

.rb-summary-copy,
.rb-inline-note,
.rb-empty-detail {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rb-empty-detail {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 1180px) {
    .routing-bay {
        height: auto;
    }

    .routing-bay-body {
        flex-direction: column;
    }

    .rb-pane {
        min-height: 220px;
        border-right: none;
        border-bottom: 1px solid #333;
    }

    .rb-pane:last-child {
        border-bottom: none;
    }

    .rb-grid.two-cols,
    .rb-bus-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MIXER OVERLAY (Desktop Master Volume Popover) --- */
.mixer-overlay {
    position: fixed;
    left: clamp(18px, 3vw, 40px);
    right: auto;
    bottom: calc(var(--player-height) + 18px);
    width: min(360px, calc(100vw - 36px));
    min-width: 280px;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, rgba(8, 18, 36, 0.96) 0%, rgba(4, 8, 18, 0.99) 100%);
    border: 1px solid rgba(23, 205, 255, 0.56);
    border-radius: 24px;
    transform: translateY(18px) scale(0.98);
    transform-origin: bottom left;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, visibility 0s linear 0.22s, opacity 0.22s ease;
    z-index: 620;
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* デスクトップ：全チャンネル表示 */
@media (min-width: 1200px) {
    .mixer-overlay {
        width: 360px;
    }

    .fader-container {
        flex-wrap: nowrap;
        overflow-x: visible;
    }

    .fader-strip {
        min-width: 55px;
    }
}

.mixer-overlay.active {
    transform: translateY(0) scale(1);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.22s ease, visibility 0s linear 0s, opacity 0.22s ease;
}

.mixer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(92, 129, 170, 0.34);
    padding-bottom: 14px;
}

.mixer-heading {
    display: grid;
    gap: 6px;
}

.mixer-kicker {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: rgba(150, 181, 208, 0.7);
}

.mixer-header h3 {
    font-family: var(--font-heading);
    margin: 0;
    font-size: 1.02rem;
    letter-spacing: 0.12em;
    color: var(--text-main);
}

.mixer-body {
    display: grid;
    gap: 12px;
}

.master-volume-row {
    display: grid;
    gap: 12px;
}

.mixer-volume-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.mixer-volume-meta label {
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    color: rgba(193, 222, 247, 0.8);
}

.mixer-volume-readout {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    letter-spacing: 0.08em;
    color: var(--primary);
    text-shadow: 0 0 18px rgba(18, 224, 255, 0.3);
}

.mixer-volume-note {
    margin: 0;
    text-align: right;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: rgba(159, 190, 214, 0.62);
}

.mixer-overlay #overlay-master-vol {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    height: 24px;
    width: 100%;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.mixer-overlay #overlay-master-vol::-webkit-slider-runnable-track {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(16, 179, 221, 0.96) 0%, rgba(26, 116, 255, 0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.mixer-overlay #overlay-master-vol::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: linear-gradient(180deg, #ffffff 0%, #9ceeff 100%);
    box-shadow: 0 0 0 4px rgba(18, 224, 255, 0.16);
}

.mixer-overlay #overlay-master-vol::-moz-range-track {
    height: 12px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(16, 179, 221, 0.96) 0%, rgba(26, 116, 255, 0.96) 100%);
}

.mixer-overlay #overlay-master-vol::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: linear-gradient(180deg, #ffffff 0%, #9ceeff 100%);
    box-shadow: 0 0 0 4px rgba(18, 224, 255, 0.16);
}

.mixer-overlay .close-btn {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    background: rgba(11, 22, 40, 0.9);
    border: 1px solid rgba(121, 154, 187, 0.45);
    border-radius: 50%;
    color: #ebfbff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.mixer-overlay .close-btn:hover {
    transform: translateY(-1px);
    background: rgba(13, 28, 52, 0.96);
    border-color: rgba(23, 205, 255, 0.72);
    color: var(--primary);
}

.mixer-toggle {
    color: var(--accent);
    font-size: 1.2rem;
}

@media (max-width: 900px) {
    .mixer-overlay {
        left: 16px;
        width: min(340px, calc(100vw - 32px));
        bottom: calc(var(--player-height) + 12px);
    }
}

@media (max-width: 767px) {
    .mixer-overlay {
        display: none;
    }
}

/* Fader Strip Updates for/* Mute/Solo Buttons */
.sm-btns {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
    z-index: 20;
    /* Ensure above slider hit area */
    position: relative;
    pointer-events: auto;
    /* Force clickable */
}

.sm-btns button {
    flex: 1;
    min-width: 24px;
    /* Ensure minimum click area */
    border: 1px solid #666;
    background: #333;
    color: #fff;
    font-size: 11px;
    /* Reduced size per user request */
    padding: 4px 0;
    /* Reduced padding */
    cursor: pointer;
    border-radius: 4px;
    pointer-events: auto;
    transition: all 0.2s;
    font-weight: bold;
}

.sm-btns button:hover {
    background: #555;
    color: #fff;
    border-color: #aaa;
}

.sm-btns button:first-child:hover {
    border-color: #ff0;
    color: #ff0;
}

/* Solo Hover */
.sm-btns button:last-child:hover {
    border-color: #f00;
    color: #f00;
}

/* Mute Hover */

/* Active States (Added by JS) */
/* Active States (Secure Selectors via ID) */
.sm-btns button[id^="btn-solo"].active {
    background: #ff0 !important;
    color: #000 !important;
    /* Black text on yellow */
    border-color: #ff0 !important;
    box-shadow: 0 0 8px #ff0 !important;
}

.sm-btns button[id^="btn-mute"].active {
    background: #f00 !important;
    color: #fff !important;
    /* White text on red */
    border-color: #f00 !important;
    box-shadow: 0 0 8px #f00 !important;
}

.separator {
    width: 1px;
    background: #333;
    margin: 0 10px;
    min-width: 1px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    #app-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 60px 80px;
        /* Content, Nav, Player */
    }

    #sidebar {
        grid-row: 2;
        grid-column: 1;
        flex-direction: row;
        width: 100%;
        padding: 10px;
        overflow-x: auto;
        border-right: none;
        border-top: 1px solid #333;
    }

    .brand-area,
    .user-area {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }

    .nav-item {
        padding: 5px 10px;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 5px;
    }

    #content-area {
        grid-row: 1;
        padding: 15px;
    }

    #player-bar {
        grid-row: 3;
    }

    .mixer-overlay {
        width: 100vw;
    }

    /* =========================================
   AUTH MODAL STYLES — 8BIT PREMIUM EDITION
   ========================================= */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 10000;
    }

    .modal-overlay.active {
        display: flex;
    }

    /* 8bit風ウィンドウ: ピクセルボーダー + グロー */
    .modal-window {
        background: #060612;
        border: 3px solid var(--primary);
        width: 420px;
        max-width: 94vw;
        box-shadow:
            0 0 0 1px #050510,
            0 0 0 4px rgba(0, 229, 255, 0.3),
            0 0 40px rgba(0, 229, 255, 0.25),
            inset 0 0 60px rgba(0, 0, 40, 0.8);
        animation: authModalIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        image-rendering: pixelated;
        position: relative;
    }

    /* コーナースクリューエフェクト（仮想ピクセルコーナー） */
    .modal-window::before {
        content: '';
        position: absolute;
        inset: -3px;
        background:
            linear-gradient(var(--primary), var(--primary)) top left / 12px 3px no-repeat,
            linear-gradient(var(--primary), var(--primary)) top left / 3px 12px no-repeat,
            linear-gradient(var(--primary), var(--primary)) top right / 12px 3px no-repeat,
            linear-gradient(var(--primary), var(--primary)) top right / 3px 12px no-repeat,
            linear-gradient(var(--primary), var(--primary)) bottom left / 12px 3px no-repeat,
            linear-gradient(var(--primary), var(--primary)) bottom left / 3px 12px no-repeat,
            linear-gradient(var(--primary), var(--primary)) bottom right / 12px 3px no-repeat,
            linear-gradient(var(--primary), var(--primary)) bottom right / 3px 12px no-repeat;
        pointer-events: none;
        z-index: 1;
        filter: drop-shadow(0 0 6px var(--primary));
    }

    @keyframes authModalIn {
        from {
            transform: scale(0.85) translateY(-20px);
            opacity: 0;
        }

        to {
            transform: scale(1) translateY(0);
            opacity: 1;
        }
    }

    /* ヘッダー：8bitタイトルバー */
    .modal-header {
        background: linear-gradient(90deg, #000428 0%, #00162d 50%, #000428 100%);
        padding: 14px 18px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid var(--primary);
        position: relative;
        overflow: hidden;
    }

    /* スキャンライン風ストライプ */
    .modal-header::after {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(0deg,
                transparent,
                transparent 2px,
                rgba(0, 229, 255, 0.03) 2px,
                rgba(0, 229, 255, 0.03) 4px);
        pointer-events: none;
    }

    .modal-header h3 {
        margin: 0;
        font-family: 'Press Start 2P', cursive;
        font-size: 13px;
        letter-spacing: 3px;
        color: var(--primary);
        text-shadow:
            0 0 8px var(--primary),
            0 0 20px rgba(0, 229, 255, 0.5);
    }

    .close-btn {
        background: none;
        border: 1px solid rgba(0, 229, 255, 0.3);
        color: var(--text-dim);
        font-size: 18px;
        cursor: pointer;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        line-height: 1;
    }

    .close-btn:hover {
        border-color: #ff4444;
        color: #ff4444;
        box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
    }

    .modal-body {
        padding: 24px 22px 20px;
    }

    /* タブ：ゲームセレクト風 */
    .auth-tabs {
        display: flex;
        margin-bottom: 22px;
        gap: 4px;
        background: rgba(0, 0, 0, 0.4);
        padding: 4px;
        border: 1px solid rgba(0, 229, 255, 0.15);
        border-radius: 2px;
    }

    .auth-tab {
        flex: 1;
        background: transparent;
        border: none;
        padding: 10px 8px;
        color: rgba(0, 229, 255, 0.35);
        font-family: 'Press Start 2P', cursive;
        font-size: 9px;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.15s;
        position: relative;
    }

    .auth-tab::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        right: 50%;
        height: 2px;
        background: var(--primary);
        transition: all 0.2s;
    }

    .auth-tab.active {
        color: var(--primary);
        text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
        background: rgba(0, 229, 255, 0.07);
    }

    .auth-tab.active::after {
        left: 0;
        right: 0;
        box-shadow: 0 0 8px var(--primary);
    }

    .auth-form {
        display: none;
    }

    .auth-form.active {
        display: block;
        animation: fadeInForm 0.2s ease;
    }

    @keyframes fadeInForm {
        from {
            opacity: 0;
            transform: translateY(6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* フォームグループ：8bitラベル */
    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-family: 'Press Start 2P', cursive;
        font-size: 8px;
        letter-spacing: 1px;
        color: rgba(0, 229, 255, 0.6);
    }

    .form-group input {
        width: 100%;
        padding: 11px 12px;
        background: rgba(0, 5, 20, 0.8);
        border: 1px solid rgba(0, 229, 255, 0.2);
        border-left: 3px solid rgba(0, 229, 255, 0.4);
        color: #e0f8ff;
        font-family: 'Press Start 2P', cursive;
        font-size: 9px;
        outline: none;
        transition: all 0.2s;
        letter-spacing: 0.5px;
    }

    .form-group input::placeholder {
        color: rgba(0, 229, 255, 0.2);
        font-size: 8px;
    }

    .form-group input:focus {
        border-color: var(--primary);
        border-left-width: 3px;
        background: rgba(0, 10, 30, 0.9);
        box-shadow:
            0 0 0 1px rgba(0, 229, 255, 0.15),
            inset 0 0 20px rgba(0, 229, 255, 0.04);
        color: #fff;
    }

    .form-note {
        font-family: 'Press Start 2P', cursive;
        font-size: 7px;
        color: rgba(0, 229, 255, 0.35);
        margin-bottom: 14px;
        line-height: 1.8;
        letter-spacing: 0.5px;
    }

    .form-actions {
        text-align: center;
        margin-bottom: 4px;
    }

    /* 送信ボタン：8bitゲームスタート風 */
    .auth-submit-btn {
        background: linear-gradient(180deg, #00c2db 0%, #007899 50%, #004d63 100%);
        color: #000;
        border: none;
        border-bottom: 3px solid #003a4d;
        border-right: 2px solid #003a4d;
        padding: 13px 20px;
        font-family: 'Press Start 2P', cursive;
        font-size: 10px;
        letter-spacing: 2px;
        cursor: pointer;
        width: 100%;
        transition: all 0.1s;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
        box-shadow:
            0 4px 0 #002d3d,
            0 0 20px rgba(0, 194, 219, 0.3);
        position: relative;
        top: 0;
    }

    .auth-submit-btn:hover {
        background: linear-gradient(180deg, #00e5ff 0%, #009ab8 50%, #005f78 100%);
        box-shadow:
            0 4px 0 #002d3d,
            0 0 30px rgba(0, 229, 255, 0.5);
    }

    .auth-submit-btn:active {
        top: 3px;
        border-bottom-width: 1px;
        box-shadow:
            0 1px 0 #002d3d,
            0 0 15px rgba(0, 229, 255, 0.3);
    }

    .form-msg {
        margin-top: 10px;
        text-align: center;
        font-family: 'Press Start 2P', cursive;
        font-size: 8px;
        min-height: 1.4em;
        line-height: 1.8;
        letter-spacing: 0.5px;
    }

    .form-msg.error {
        color: #ff5555;
        text-shadow: 0 0 8px rgba(255, 85, 85, 0.5);
    }

    .form-msg.success {
        color: #55ff55;
        text-shadow: 0 0 8px rgba(85, 255, 85, 0.5);
    }

    @keyframes slideDown {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL GLOBAL STYLES — 8BIT PREMIUM EDITION (PC/ALL)
   ═══════════════════════════════════════════════════════════════ */

/* オーバーレイ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 2, 10, 0.88);
    backdrop-filter: blur(10px);
    display: none !important;
    justify-content: center;
    align-items: center;
    z-index: 20000 !important;
}

.modal-overlay.active {
    display: flex !important;
}

/* ═══ ウィンドウ本体：8bitピクセルボーダー ═══ */
.modal-window {
    background: #05060f;
    border: 3px solid var(--primary);
    width: 520px;
    max-width: 96vw;
    box-shadow:
        0 0 0 1px #020308,
        0 0 0 5px rgba(0, 229, 255, 0.25),
        0 0 60px rgba(0, 229, 255, 0.22),
        inset 0 0 80px rgba(0, 0, 60, 0.6);
    animation: authModalIn 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* ピクセルコーナー装飾 */
.modal-window::before {
    content: '';
    position: absolute;
    inset: -3px;
    background:
        linear-gradient(var(--primary), var(--primary)) top left / 14px 3px no-repeat,
        linear-gradient(var(--primary), var(--primary)) top left / 3px 14px no-repeat,
        linear-gradient(var(--primary), var(--primary)) top right / 14px 3px no-repeat,
        linear-gradient(var(--primary), var(--primary)) top right / 3px 14px no-repeat,
        linear-gradient(var(--primary), var(--primary)) bottom left / 14px 3px no-repeat,
        linear-gradient(var(--primary), var(--primary)) bottom left / 3px 14px no-repeat,
        linear-gradient(var(--primary), var(--primary)) bottom right / 14px 3px no-repeat,
        linear-gradient(var(--primary), var(--primary)) bottom right / 3px 14px no-repeat;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 8px var(--primary));
}

@keyframes authModalIn {
    from {
        transform: scale(0.82) translateY(-25px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ═══ ヘッダー：タイトルバー ═══ */
.modal-header {
    background: linear-gradient(90deg, #000520 0%, #00122a 50%, #000520 100%);
    padding: 15px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

/* スキャンラインエフェクト */
.modal-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            transparent 0px, transparent 3px,
            rgba(0, 229, 255, 0.04) 3px, rgba(0, 229, 255, 0.04) 4px);
    pointer-events: none;
}

.modal-header h3 {
    margin: 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--primary);
    text-shadow:
        0 0 10px var(--primary),
        0 0 25px rgba(0, 229, 255, 0.4);
    position: relative;
    z-index: 1;
}

/* ×ボタン */
.close-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: rgba(0, 229, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.close-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.35);
}

/* ═══ ボディ / フォーム ═══ */
.modal-body {
    padding: 28px 28px 22px;
    position: relative;
    z-index: 1;
}

/* タブ：ゲームセレクト型 */
.auth-tabs {
    display: flex;
    margin-bottom: 22px;
    gap: 3px;
    background: rgba(0, 10, 25, 0.6);
    padding: 4px;
    border: 1px solid rgba(0, 229, 255, 0.12);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 13px 8px;
    color: rgba(0, 229, 255, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--primary);
    transition: all 0.2s;
    box-shadow: none;
}

.auth-tab.active {
    color: var(--primary);
    background: rgba(0, 229, 255, 0.06);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.auth-tab.active::after {
    left: 0;
    right: 0;
    box-shadow: 0 0 8px var(--primary);
}

/* フォームアニメーション */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInForm8 0.2s ease;
}

@keyframes fadeInForm8 {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フォームグループ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(0, 229, 255, 0.65);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 5, 18, 0.85);
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-left: 4px solid rgba(0, 229, 255, 0.5);
    color: #e8fbff;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.form-group input::placeholder {
    color: rgba(0, 229, 255, 0.22);
    font-size: 14px;
    font-style: italic;
}

.form-group input:focus {
    border-color: var(--primary);
    border-left-color: var(--primary);
    background: rgba(0, 12, 30, 0.95);
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.12),
        inset 0 0 20px rgba(0, 229, 255, 0.03);
    color: #fff;
}

/* フォームノート */
.form-note {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: rgba(0, 229, 255, 0.4);
    margin-bottom: 16px;
    line-height: 1.7;
    letter-spacing: 0.3px;
}

/* フォームアクション */
.form-actions {
    text-align: center;
    margin-bottom: 4px;
}

/* ═══ 送信ボタン：8bitゲームスタート ═══ */
.auth-submit-btn {
    background: linear-gradient(180deg, #00c8e0 0%, #007a96 50%, #004d63 100%);
    color: #e8ffff;
    border: none;
    border-bottom: 4px solid #002d3d;
    padding: 16px 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    letter-spacing: 3px;
    cursor: pointer;
    width: 100%;
    transition: all 0.08s;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6), 0 1px 0 rgba(0, 0, 0, 0.4);
    box-shadow:
        0 4px 0 #001e28,
        0 0 25px rgba(0, 200, 224, 0.25);
    position: relative;
    top: 0;
}

.auth-submit-btn:hover {
    background: linear-gradient(180deg, #00e5ff 0%, #009ab8 50%, #005f78 100%);
    box-shadow:
        0 4px 0 #001e28,
        0 0 35px rgba(0, 229, 255, 0.45);
}

.auth-submit-btn:active {
    top: 4px;
    border-bottom-width: 0;
    box-shadow:
        0 0 0 #001e28,
        0 0 15px rgba(0, 229, 255, 0.2);
}

/* フォームメッセージ */
.form-msg {
    margin-top: 10px;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    min-height: 1.5em;
    line-height: 2;
    letter-spacing: 0.3px;
    color: rgba(0, 229, 255, 0.5);
}

.form-msg.error {
    color: #ff5555;
    text-shadow: 0 0 8px rgba(255, 85, 85, 0.5);
}

.form-msg.success {
    color: #55ff55;
    text-shadow: 0 0 8px rgba(85, 255, 85, 0.5);
}

/* Ensure Main Button Visibility & Clickability */
#btn-generate-main {
    pointer-events: auto !important;
    cursor: pointer !important;

    position: relative;
    z-index: 500;
}

/* --- Player Control Buttons (Image Icons) --- */
.player-btn {
    background: transparent;
    /* Removed double circle bg */
    border: none;
    /* Removed double circle border */
    color: var(--text-main);
    font-size: 24px;
    /* For Mixer Icon */
    cursor: pointer;
    width: 64px;
    /* Slightly larger area for hit target */
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 0;
    margin: 0 4px;
    /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); Removed double shadow */
}

.player-btn img {
    width: 48px;
    /* Larger image */
    height: 48px;
    object-fit: contain;
    pointer-events: none;
    transition: all 0.2s;
    /* Neon Glow Effect on Image Itself */
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.6));
}

.player-btn:hover {
    background: rgba(0, 255, 255, 0.05);
    /* Very subtle hover bg */
    /* No border on hover to avoid circle appearing again */
    /* border-color: #00FFFF; */
    transform: translateY(-2px) scale(1.1);
}

.player-btn:hover img {
    filter: drop-shadow(0 0 10px #00FFFF);
    /* Stronger glow */
    transform: scale(1.1);
}

.player-btn:active {
    transform: scale(0.95);
    filter: brightness(0.8);
}

/* Specific: Main Play Button */
.player-btn.main-play {
    width: 80px;
    height: 80px;
    border: none;
    /* Removed border */
    background: transparent;
    /* Removed bg */
}

.player-btn.main-play img {
    width: 64px;
    height: 64px;
}

.player-btn.main-play:hover {
    background: transparent;
    /* box-shadow: 0 0 25px var(--primary); Removed box shadow */
}

.player-btn.main-play:hover img {
    filter: drop-shadow(0 0 15px #00FFFF);
}

/* Mixer Button (Image) Adjustment */
/* Now purely alignment, no borders */
.mixer-toggle {
    /* Reset text styles just in case, though img will be used */
    padding: 0;
    background: transparent;
    border: none;
    width: 64px;
    /* Match other buttons */
    height: 64px;
}

.action-panel.suno-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    border: none;
    padding: 0 10px;
    margin-bottom: 20px;
}

.prompt-bar-group {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #0a0a0f;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.prompt-bar-group .retro-input {
    border: none;
    background: transparent;
    flex-grow: 1;
    font-size: 1rem;
    outline: none;
}

.suno-create-btn {
    background: linear-gradient(135deg, #FF00FF, #00FFFF);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suno-create-btn img.btn-icon-img {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
}

.suno-create-btn .btn-icon {
    display: none;
    /* Hide text icon if present */
}

.suno-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}

.suno-create-btn .btn-icon {
    font-size: 1.2rem;
}

/* Playlist Grid */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
}

.song-card {
    background: #151520;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    position: relative;
    overflow: visible;
    /* ★FIX: サブメニュー表示のため */
}

.song-card:hover {
    background: #1e1e2e;
    border-color: #555;
    transform: translateY(-2px);
}

.song-card.active {
    border-color: #00FFFF;
    background: #1a1a35;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.card-thumb {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #333, #111);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    gap: 10px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.card-btn:hover {
    background: #fff;
    color: #000;
}


.playing-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    display: none;
    z-index: 50;
}

.song-card.is-playing .playing-indicator {
    display: block;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--primary);
    }

    to {
        opacity: 1.0;
        box-shadow: 0 0 15px var(--primary);
    }
}

/* --- SONG STATUS & INFO GRID (Added for Contrast Fix) --- */
.song-status-card {
    background: rgba(255, 255, 255, 0.05);
    /* Slight bright bg */
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.status-indicator {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.status-indicator.stopped {
    color: #aaaaaa;
}

.status-indicator.playing {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
}

.info-grid {
    display: flex;
    gap: 30px;
}

.info-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-cell .label {
    font-size: 0.75rem;
    color: #ffffff;
    /* Force White as requested */
    opacity: 0.9;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-cell .value {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: #ffffff;
    /* Pure White */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    min-width: 60px;
}

/* Force override for section header if needed */
.section-header h2 {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

/* Prompt input color fix just in case */
#ai-prompt-input {
    color: #ffffff;
}

#ai-prompt-input::placeholder {
    color: #aaaaaa;
}


/* =========================================
   RESTORED & FIXED SUNO STYLE EXTENSIONS
   (Fixing nested CSS syntax error and restoring lost styles)
   ========================================= */

/* --- AUTH MODAL OVERRIDES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none !important;
    justify-content: center;
    align-items: center;
    z-index: 20000 !important;
}

.modal-overlay.active {
    display: flex !important;
}

/* --- MAIN GENERATE BUTTON VISIBILITY --- */
#btn-generate-main {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 500;
}

/* --- ACTION PANEL & PROMPT --- */
.action-panel.suno-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: transparent;
    border: none;
    padding: 0 10px;
    margin-bottom: 20px;
}

.prompt-bar-group {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #0a0a0f;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.prompt-bar-group .retro-input {
    border: none;
    background: transparent;
    flex-grow: 1;
    font-size: 1rem;
    outline: none;
    color: #ffffff;
}

/* --- SUNO CREATE BUTTON --- */
.suno-create-btn {
    background: linear-gradient(135deg, #FF00FF, #00FFFF);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suno-create-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.4);
}

.suno-create-btn .btn-icon {
    font-size: 1.2rem;
}

/* --- PLAYLIST GRID & CARDS --- */
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    margin-top: 10px;
    padding: 10px;
}

.song-card {
    background: #151520;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    position: relative;
    overflow: visible;
    /* ★FIX: サブメニュー表示のため */
}

.song-card:hover {
    background: #1e1e2e;
    border-color: #555;
    transform: translateY(-2px);
}

.song-card.active {
    border-color: #00FFFF;
    background: #1a1a35;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.card-thumb {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #333, #111);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #ffffff;
    /* ENSURE WHITE */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.card-meta {
    font-size: 0.85rem;
    color: #cccccc;
    /* LIGHTER GRAY */
    display: flex;
    gap: 10px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.card-btn:hover {
    background: #fff;
    color: #000;
}


/* --- PLAYING INDICATOR --- */
.playing-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00FFFF;
    animation: glow 1.5s infinite alternate;
    display: none;
    /* Hidden by default */
}

.song-card.is-playing .playing-indicator {
    display: block;
}

/* Force Re-apply of Previous Fixes */
.info-cell .label {
    color: #ffffff !important;
    opacity: 1 !important;
}

.info-cell .value {
    color: #ffffff !important;
}


/* =========================================
   ULTIMATE CONTRAST FIX (Specificity Overkill)
   ========================================= */

/* Use ID selectors to guarantee priority over any library class */
#view-dashboard .song-status-card .info-grid .info-cell .label,
#view-dashboard .song-status-card .info-grid .info-cell .value,
.song-status-card .info-grid .info-cell .label,
.song-status-card .info-grid .info-cell .value,
.label,
.value {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    /* Ensure they aren't hidden */
}

/* Ensure the container doesn't hide them */
.info-cell {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    height: auto !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Specific fix for labels to be readable */
#view-dashboard .info-cell .label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    color: #e0e0e0 !important;
    /* Slightly off-white for label distinction */
}

/* Specific fix for values to be readable */
#view-dashboard .info-cell .value {
    font-size: 1.0rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-top: 2px !important;
}

/* Ensure Song Status Card background provides contrast */
.song-status-card {
    background-color: rgba(30, 30, 40, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* --- BUTTON SPINNER --- */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   CREATION STATUS & EFFECTS
   ========================================= */

/* --- インライン生成中表示 (プロンプト下) --- */
.creation-status {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 18px 25px;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.08), rgba(255, 0, 255, 0.08));
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 12px;
    margin-top: 15px;
}

.creation-status.active {
    display: flex;
    animation: slideDown 0.4s ease;
}

.creation-status .status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.creation-status .pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 1.2s infinite;
    box-shadow: 0 0 10px var(--primary);
}

.creation-status #loading-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    letter-spacing: 0.5px;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creation-status .loading-ops-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.creation-status .loading-ops-inline::-webkit-scrollbar {
    display: none;
}

.creation-status .loading-ops-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.84);
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    line-height: 1;
    flex: 0 0 auto;
}

.creation-status .loading-ops-pill.is-warn {
    border-color: rgba(255, 184, 77, 0.35);
    background: rgba(255, 184, 77, 0.12);
    color: #ffdca0;
}

.creation-status .loading-ops-pill.is-active {
    border-color: rgba(0, 255, 204, 0.28);
    background: rgba(0, 255, 204, 0.12);
    color: rgba(210, 255, 246, 0.92);
}

.creation-status .loading-ops-pill.is-muted {
    color: rgba(255, 255, 255, 0.68);
}

.creation-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    flex: 0 0 auto;
}

.creation-wave span {
    display: block;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
    animation: creationWave 1s ease-in-out infinite;
}

.creation-wave span:nth-child(1) {
    animation-delay: 0s;
    height: 8px;
}

.creation-wave span:nth-child(2) {
    animation-delay: 0.1s;
    height: 14px;
}

.creation-wave span:nth-child(3) {
    animation-delay: 0.2s;
    height: 20px;
}

.creation-wave span:nth-child(4) {
    animation-delay: 0.3s;
    height: 14px;
}

.creation-wave span:nth-child(5) {
    animation-delay: 0.4s;
    height: 8px;
}

@keyframes creationWave {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.6;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 完了通知 --- */
.creation-complete {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 25px;
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.15), rgba(0, 255, 204, 0.15));
    border: 1px solid rgba(0, 255, 100, 0.4);
    border-radius: 12px;
    margin-top: 15px;
}

.creation-complete.active {
    display: flex;
    animation: celebrateIn 0.5s ease;
}

.creation-complete .complete-icon {
    font-size: 1.8rem;
    animation: iconPop 0.6s ease;
}

.creation-complete .complete-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 150, 0.5);
}

@keyframes celebrateIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes iconPop {
    0% {
        transform: scale(0) rotate(-30deg);
    }

    60% {
        transform: scale(1.3) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* --- グローバル生成インジケータ (プレイヤーバー) --- */
.global-gen-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 0, 255, 0.15);
    border: 1px solid rgba(255, 0, 255, 0.4);
    border-radius: 20px;
    margin-right: 15px;
}

.global-gen-indicator.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.global-gen-indicator .mini-wave {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}

.global-gen-indicator .mini-wave span {
    display: block;
    width: 3px;
    background: var(--secondary);
    border-radius: 1px;
    animation: miniWave 0.8s ease-in-out infinite;
}

.global-gen-indicator .mini-wave span:nth-child(1) {
    animation-delay: 0s;
    height: 6px;
}

.global-gen-indicator .mini-wave span:nth-child(2) {
    animation-delay: 0.15s;
    height: 10px;
}

.global-gen-indicator .mini-wave span:nth-child(3) {
    animation-delay: 0.3s;
    height: 6px;
}

.global-gen-indicator .gen-text {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

@keyframes miniWave {

    0%,
    100% {
        transform: scaleY(0.6);
    }

    50% {
        transform: scaleY(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.compose-progress-toast {
    position: fixed;
    top: 92px;
    right: 24px;
    width: min(360px, calc(100vw - 32px));
    z-index: 11020;
    pointer-events: none;
}

.compose-progress-toast.active {
    display: block;
}

.compose-progress-toast-panel {
    position: relative;
    overflow: hidden;
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(99, 224, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(10, 19, 34, 0.82), rgba(7, 12, 24, 0.76)),
        radial-gradient(circle at top right, rgba(44, 204, 255, 0.14), transparent 36%),
        radial-gradient(circle at left center, rgba(0, 255, 194, 0.12), transparent 44%);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 24px rgba(0, 255, 204, 0.12);
    backdrop-filter: blur(22px) saturate(1.35);
    pointer-events: auto;
    animation: composeProgressToastIn 0.28s ease;
}

.compose-progress-toast-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 30%),
        radial-gradient(circle at 78% 18%, rgba(86, 234, 255, 0.18), transparent 24%);
    pointer-events: none;
}

.compose-progress-toast-panel::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 244, 255, 0.34), transparent);
    pointer-events: none;
}

.compose-progress-toast-head,
.compose-progress-toast-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.compose-progress-toast-head {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.compose-progress-toast-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(112, 231, 255, 0.24);
    background: rgba(61, 209, 255, 0.14);
    color: rgba(214, 248, 255, 0.92);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.compose-progress-toast-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.92), rgba(0, 255, 204, 0.7) 48%, rgba(0, 255, 204, 0.12) 100%);
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.08), 0 0 16px rgba(0, 255, 204, 0.46);
    animation: pulse 1.2s infinite;
}

.compose-progress-toast-body {
    position: relative;
    z-index: 1;
}

.compose-progress-toast-title,
.compose-progress-toast-detail {
    margin: 0;
}

.compose-progress-toast-title {
    padding-right: 34px;
    color: rgba(245, 250, 255, 0.96);
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.compose-progress-toast-detail {
    margin-top: 6px;
    color: rgba(190, 213, 229, 0.88);
    font-size: 0.9rem;
    line-height: 1.5;
}

.compose-progress-toast-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.compose-progress-toast .loading-ops-pill {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.74rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.compose-progress-toast-footer {
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.compose-progress-toast-footnote {
    color: rgba(162, 190, 208, 0.78);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.compose-progress-toast-wave {
    display: inline-flex;
    align-items: flex-end;
    gap: 4px;
    height: 18px;
}

.compose-progress-toast-wave span {
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(79, 233, 255, 0.88), rgba(0, 255, 204, 0.32));
    animation: composeProgressToastWave 1.1s ease-in-out infinite;
}

.compose-progress-toast-wave span:nth-child(1) {
    height: 7px;
    animation-delay: 0s;
}

.compose-progress-toast-wave span:nth-child(2) {
    height: 16px;
    animation-delay: 0.12s;
}

.compose-progress-toast-wave span:nth-child(3) {
    height: 11px;
    animation-delay: 0.24s;
}

.compose-progress-toast-wave span:nth-child(4) {
    height: 14px;
    animation-delay: 0.36s;
}

.compose-progress-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(223, 244, 255, 0.82);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.compose-progress-toast-close:hover {
    transform: translateY(-1px);
    border-color: rgba(106, 236, 255, 0.32);
    background: rgba(106, 236, 255, 0.1);
    color: #ffffff;
}

.compose-progress-toast.is-queued .compose-progress-toast-status {
    border-color: rgba(255, 196, 92, 0.3);
    background: rgba(255, 196, 92, 0.12);
    color: rgba(255, 230, 176, 0.94);
}

.compose-progress-toast.is-queued .compose-progress-toast-live-dot {
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 196, 92, 0.84) 48%, rgba(255, 196, 92, 0.12) 100%);
    box-shadow: 0 0 0 4px rgba(255, 196, 92, 0.08), 0 0 16px rgba(255, 196, 92, 0.34);
}

.compose-progress-toast.is-processing .compose-progress-toast-status {
    border-color: rgba(75, 241, 222, 0.3);
    background: rgba(0, 255, 204, 0.12);
    color: rgba(216, 255, 248, 0.95);
}

@keyframes composeProgressToastIn {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes composeProgressToastWave {
    0%,
    100% {
        transform: scaleY(0.55);
        opacity: 0.62;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* =========================================
   CARD SUBMENU & DRAG HANDLE
   ========================================= */

/* ドラッグハンドル */
.card-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 100%;
    cursor: grab;
    color: var(--text-dim);
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    user-select: none;
}

.card-drag-handle:hover {
    opacity: 1;
    color: var(--primary);
}

.card-drag-handle:active {
    cursor: grabbing;
}

/* ドラッグ中の状態 */
.song-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
    z-index: 1000;
}

.song-card.drag-over {
    border-top: 2px solid var(--primary);
}

/* メニューボタン（⋯） */
.card-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.card-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* サブメニューコンテナ */
.card-actions {
    position: relative;
}

.card-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 150px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    /* ★FIX: 他の要素の上に表示 */
    display: none;
    flex-direction: column;
    padding: 6px 0;
    animation: menuSlide 0.15s ease;
}

.card-menu.active {
    display: flex;
}

/* ★FIX: サブメニューが開いている時、カード自体を最前面に */
.card-actions:has(.card-menu.active) {
    z-index: 10000;
}

.song-card:has(.card-menu.active) {
    z-index: 10000;
}

@keyframes menuSlide {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* メニュー項目 */
.card-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
    width: 100%;
}

.card-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.card-menu-item.danger {
    color: #ff4444;
}

.card-menu-item.danger:hover {
    background: rgba(255, 68, 68, 0.15);
}

.card-menu-item.disabled {
    color: var(--text-dim);
    cursor: not-allowed;
    opacity: 0.5;
}

.card-menu-item.disabled:hover {
    background: transparent;
}

.card-menu-item .menu-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* 削除確認ダイアログ */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.confirm-dialog-overlay.active {
    display: flex;
}

.confirm-dialog {
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 25px 30px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    animation: dialogPop 0.2s ease;
}

@keyframes dialogPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-dialog h3 {
    color: #ff4444;
    margin-bottom: 15px;
    font-family: var(--font-body);
    font-size: 1.2rem;
}

.confirm-dialog p {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.confirm-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-dialog-actions button {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.confirm-dialog-actions .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.confirm-dialog-actions .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.confirm-dialog-actions .btn-delete {
    background: #ff4444;
    color: #fff;
}

.confirm-dialog-actions .btn-delete:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.song-prompt-modal-body {
    display: grid;
    gap: 12px;
}

.song-prompt-modal-song {
    font-size: 0.74rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.song-prompt-modal-text {
    max-height: min(60vh, 480px);
    overflow: auto;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ★NEW: Tier Badge Styles */
.user-rank.free {
    color: #888;
}

.user-rank.standard {
    color: #00ccff;
    text-shadow: 0 0 8px rgba(0, 204, 255, 0.5);
}

.user-rank.premium {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* ★NEW: MIDI Download Button */
.midi-dl-btn {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.midi-dl-btn:hover {
    background: linear-gradient(135deg, #6b7280, #4a5568);
    transform: scale(1.05);
}

.midi-dl-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.midi-dl-btn.premium-only {
    border-color: #ffd700;
}

/* Player MIDI Download Button */
#midi-download-btn {
    background: linear-gradient(135deg, #2a4a2a, #1a3a1a);
    border: 1px solid #4ade80;
    border-radius: 8px;
    color: #4ade80;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

#midi-download-btn:hover {
    background: linear-gradient(135deg, #3a5a3a, #2a4a2a);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

#midi-download-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =========================================
   AI ADVISOR UI (PATCHED)
   ========================================= */
/* AI ADVISOR UI (PATCHED) */
.ai-advisor-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 204, 0.1);
    z-index: 2147483647 !important;
    /* 絶対的最前面 */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* ★FIX: hiddenクラスがない場合は確実に表示 */
.ai-advisor-panel:not(.hidden) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.ai-advisor-panel.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    visibility: hidden;
    display: none !important;
    /* Force hide to prevent clicking invisible element */
}

.advisor-header {
    padding: 15px 20px;
    background: rgba(0, 255, 204, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.advisor-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-premium {
    background: linear-gradient(90deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    margin-left: 5px;
}

#advisor-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
}

#advisor-close-btn:hover {
    opacity: 1;
}

.advisor-chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.advisor-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    /* メッセージの折り返し */
}

.advisor-msg.user {
    align-self: flex-end;
    background: var(--primary);
    color: #000;
    border-bottom-right-radius: 2px;
}

.advisor-msg.ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.advisor-msg.system {
    align-self: center;
    max-width: 95%;
    background: rgba(0, 255, 204, 0.05);
    color: rgba(0, 255, 204, 0.8);
    text-align: center;
    border: 1px dashed rgba(0, 255, 204, 0.3);
    font-size: 0.8rem;
}

.advisor-input-area {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#advisor-input {
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    padding: 10px;
    resize: none;
    font-family: inherit;
    font-size: 0.9rem;
}

#advisor-input:focus {
    outline: none;
    border-color: var(--primary);
}

#advisor-send-btn {
    align-self: flex-end;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#advisor-send-btn:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.advisor-ok-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.advisor-ok-btn:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--primary);
}

/* =============================================
   ★NEW: 高度エディタタブスタイル
   ============================================= */

/* エディタタブバー */
.editor-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 15px;
    align-items: center;
}

.editor-tabs .tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.editor-tabs .tab-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    font-weight: 600;
}

/* ネオンタブ（Motif/Pattern/Envelope用） */
.editor-tabs .tab-btn.neon-tab {
    background: rgba(0, 200, 255, 0.1);
    border-color: rgba(0, 200, 255, 0.3);
    color: #00e5ff;
}

.editor-tabs .tab-btn.neon-tab:hover {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.editor-tabs .tab-btn.neon-tab.active {
    background: linear-gradient(135deg, #00e5ff, #0080aa);
    border-color: #00e5ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

/* タブセパレーター */
.tab-separator {
    color: rgba(255, 255, 255, 0.2);
    padding: 0 8px;
    user-select: none;
}

/* タブコンテンツ */
.tab-content {
    padding: 15px;
}

.neon-tab-content {
    min-height: 350px;
    padding: 0;
}

/* フルサイズエディタコンテナ */
.full-editor-container {
    width: 100%;
    height: 400px;
    min-height: 350px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .editor-tabs {
        gap: 2px;
        padding: 8px;
    }

    .editor-tabs .tab-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .tab-separator {
        display: none;
    }

    .full-editor-container {
        height: 300px;
        min-height: 280px;
    }
}

/* =============================================
   ★NEW: ミキサーコンソールスタイル (Full Screen)
   ============================================= */

/* MIXER LAYOUT */
.mixer-board-layout {
    display: flex;
    flex-direction: row-reverse;
    /* FX Rack Right, Faders Left */
    gap: 30px;
    height: calc(100vh - 120px);
    padding-bottom: 20px;
}

/* --- FX RACK (Right Side) --- */
.fx-rack-container {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    background: linear-gradient(180deg, rgba(13, 18, 29, 0.98), rgba(8, 10, 17, 0.98));
    border: 1px solid rgba(98, 121, 152, 0.3);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 40px rgba(0, 0, 0, 0.28);
}

.global-toggles {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.global-toggles .toggle-switch-label {
    width: 100%;
    justify-content: space-between;
    color: #eff8ff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.snapshot-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: 0;
}

.snapshot-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.snapshot-card-song {
    border-color: rgba(86, 229, 191, 0.22);
}

.snapshot-card-global {
    border-color: rgba(255, 201, 110, 0.22);
}

.snapshot-card-preset {
    border-color: rgba(132, 222, 255, 0.26);
}

.snapshot-card-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.snapshot-kicker {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(143, 221, 255, 0.72);
}

.snapshot-section .panel-label {
    margin: 0;
    font-size: 1rem;
    color: #f7fbff;
    letter-spacing: 0.02em;
}

.snapshot-copy {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.55;
    color: rgba(215, 227, 236, 0.68);
}

.snapshot-divider {
    margin: 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.snapshot-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.snapshot-preset-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.snapshot-preset-select {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border-color: rgba(112, 135, 163, 0.24);
    background: linear-gradient(180deg, rgba(16, 22, 31, 0.98), rgba(9, 13, 20, 0.98));
    background-color: #0d131b;
    color: #f7fbff;
    color-scheme: dark;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.retro-select option,
.snapshot-preset-select option,
.fx-preset-select option,
.adv-select option {
    background: #0d131b;
    color: #f7fbff;
}

.snapshot-preset-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.snapshot-preset-description-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.snapshot-preset-description-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.snapshot-preset-description-label .snapshot-copy {
    font-size: 0.72rem;
    line-height: 1.5;
}

.snapshot-preset-description {
    width: 100%;
    min-height: 88px;
    padding: 12px 14px;
    border-radius: 12px;
    border-color: rgba(112, 135, 163, 0.24);
    background: linear-gradient(180deg, rgba(18, 26, 39, 0.98), rgba(10, 15, 24, 0.98));
    color: #ecf6ff;
    line-height: 1.55;
    resize: vertical;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.snapshot-preset-description::placeholder {
    color: rgba(236, 246, 255, 0.42);
}

.snapshot-card-export {
    border-color: rgba(255, 162, 94, 0.28);
}

.snapshot-export-target {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 176, 110, 0.08), rgba(255, 176, 110, 0.02));
    border: 1px solid rgba(255, 190, 130, 0.14);
}

.snapshot-export-song-label {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    color: #fff4e7;
}

.snapshot-export-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.snapshot-export-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.snapshot-export-actions {
    grid-template-columns: minmax(0, 1fr);
}

.snapshot-export-actions .btn-retro {
    width: 100%;
}

.export-modal-overlay {
    padding: 20px;
}

.export-modal-window {
    width: min(92vw, 760px);
    max-width: 760px;
    max-height: min(86vh, 820px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    overflow: hidden;
}

.export-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.export-modal-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.export-modal-close {
    min-width: 48px;
    padding-inline: 0;
}

.export-modal-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-track-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    max-height: min(48vh, 420px);
    overflow: auto;
    padding-right: 4px;
}

.export-track-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(17, 25, 38, 0.96), rgba(9, 14, 22, 0.98));
    border: 1px solid rgba(124, 148, 176, 0.18);
}

.export-track-item input[type="checkbox"] {
    margin-top: 4px;
}

.export-track-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.export-track-title {
    font-size: 0.95rem;
    color: #f5fbff;
}

.export-track-meta {
    font-size: 0.74rem;
    color: rgba(209, 223, 235, 0.62);
}

.export-modal-actions {
    margin-top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 860px) {
    .snapshot-export-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .export-track-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

.snapshot-section .btn-retro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(112, 135, 163, 0.24);
    background: linear-gradient(180deg, rgba(30, 43, 60, 0.96), rgba(16, 23, 34, 0.98));
    color: #ecf6ff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.snapshot-section .btn-retro:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(132, 222, 255, 0.42);
    background: linear-gradient(180deg, rgba(38, 56, 77, 0.96), rgba(19, 28, 41, 0.98));
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.24);
}

.snapshot-section .btn-retro:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    box-shadow: none;
}

.snapshot-section .btn-retro .btn-retro-icon {
    font-size: 0.95rem;
}

.snapshot-section .btn-retro .btn-retro-label {
    min-width: 0;
}

.snapshot-section .btn-save {
    border-color: rgba(70, 228, 176, 0.28);
    background: linear-gradient(180deg, rgba(18, 67, 59, 0.96), rgba(10, 33, 30, 0.98));
}

.snapshot-section .btn-danger {
    border-color: rgba(255, 109, 121, 0.28);
    background: linear-gradient(180deg, rgba(88, 29, 43, 0.96), rgba(36, 13, 20, 0.98));
}

.snapshot-section .btn-warn {
    border-color: rgba(255, 201, 110, 0.28);
    background: linear-gradient(180deg, rgba(92, 61, 19, 0.96), rgba(39, 26, 10, 0.98));
}

.fx-unit {
    background: #222;
    border: 2px solid #555;
    border-radius: 4px;
    padding: 15px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.fx-unit.space-echo {
    background: linear-gradient(135deg, #1a2a2a, #0d1212);
    border-color: var(--primary);
}

.fx-unit.analog-comp {
    background: linear-gradient(135deg, #2a1a2a, #120d12);
    border-color: var(--secondary);
}

.fx-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.fx-title {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 0 5px currentColor;
}

.space-echo .fx-title {
    color: var(--primary);
}

.analog-comp .fx-title {
    color: var(--secondary);
}

.fx-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fx-led.on {
    background: #ff3333;
    box-shadow: 0 0 8px #ff3333;
}

/* RETRO KNOBS */
.fx-controls {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.knob-group label {
    font-family: monospace;
    font-size: 0.7rem;
    color: #aaa;
}

.retro-knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #444, #111);
    position: relative;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.knob-body {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 5px;
    left: 5px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, #333, #222, #333);
    /* TRANSFORM will be applied by JS for rotation */
    transform: rotate(-135deg);
    /* Min position */
    transition: transform 0.1s;
}

.knob-indicator {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 4px;
    height: 10px;
    background: #fff;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* COMPRESSOR LAYOUT */
.comp-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.vu-meter {
    height: 40px;
    background: #000;
    border: 1px solid #444;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.vu-scale {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            transparent, transparent 19px, #333 20px);
    opacity: 0.5;
}

.vu-needle {
    position: absolute;
    bottom: -10px;
    left: 10px;
    width: 2px;
    height: 40px;
    background: #ff3333;
    transform-origin: bottom center;
    transform: rotate(-45deg);
    transition: transform 0.1s cubic-bezier(0.1, 0.5, 0.1, 1);
    box-shadow: 0 0 5px #ff0000;
}

/* --- FADER CONSOLE (Left Side) --- */
.console-strips-container {
    flex-grow: 1;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    background: #15151a;
    border-radius: 8px;
}

.console-group {
    display: flex;
    flex-direction: column;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
}

.group-label {
    text-align: center;
    background: #222;
    color: #888;
    font-size: 0.7rem;
    padding: 4px;
    border-bottom: 1px solid #333;
    font-family: var(--font-heading);
}

.strip-pair {
    display: flex;
    /* height: 100%; */
}

/* Individual Strip */
.console-strip {
    width: 100px;
    /* Expanded from 70px */
    /* Wider for Pan Pot */
    display: flex;
    flex-direction: column;
    align-items: center;
    border-right: 1px solid #222;
    padding: 10px 5px;
    background: linear-gradient(180deg, #1a1a20, #111);
    position: relative;
}

.console-strip:last-child {
    border-right: none;
}

.strip-name {
    margin-top: auto;
    background: #000;
    color: #fff;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    padding: 4px 0;
    border-radius: 2px;
    margin-bottom: 0;
    border-top: 2px solid var(--primary);
}

/* PAN SLIDER (Horizontal) */
.pan-pot-area {
    width: 100%;
    height: auto;
    /* Flexible height */
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: #111;
    border-radius: 4px;
    border: 1px solid #333;
}

.pan-value-disp {
    font-family: monospace;
    font-size: 0.8rem;
    color: #0ff;
    /* Bright Cyan for visibility */
    margin-bottom: 10px;
    /* Increased to prevent overlap */
    z-index: 10;
    position: relative;
    font-weight: bold;
    text-shadow: 0 0 2px #000;
}

.pan-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    /* Wider */
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
}

.pan-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 14px;
    background: #888;
    border: 1px solid #000;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.pan-label {
    font-size: 0.6rem;
    color: #555;
    margin-top: 2px;
    font-family: monospace;
}

/* VOLUME FADER (Vertical Native) */
.strip-fader {
    height: 160px;
    /* Fixed height container */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    /* Removed Gradient ticks for native look compatibility */
    background: #15151a;
    border-radius: 4px;
    padding: 5px 0;
}

input[type=range].v-fader {
    -webkit-appearance: slider-vertical;
    /* Modern Vertical Slider */
    appearance: slider-vertical;
    width: 30px;
    height: 100%;
    /* Fill container */
    background: transparent;
    cursor: pointer;
    margin: 0;
}

/* NOTE: ::-webkit-slider-runnable-track and ::-webkit-slider-thumb 
   styling is limited when using appearance: slider-vertical on some browsers.
   We accept native look for better usability (vertical drag). */

.vol-value-disp {
    font-family: monospace;
    font-size: 0.7rem;
    color: #0ff;
    margin-bottom: 8px;
    background: rgba(34, 34, 34, 0.9);
    padding: 2px 5px;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
    z-index: 10;
    position: relative;
    font-weight: bold;
    border: 1px solid #444;
    text-shadow: 0 0 2px #000;
}

/* Custom Fader Caps Colors */
#vol-pulse1::-webkit-slider-thumb,
#vol-pulse2::-webkit-slider-thumb {
    background: linear-gradient(180deg, var(--primary), #008866);
    box-shadow: 0 0 10px var(--primary);
}

#vol-triangle::-webkit-slider-thumb {
    background: linear-gradient(180deg, var(--accent), #aa8800);
    box-shadow: 0 0 10px var(--accent);
}

#vol-noise::-webkit-slider-thumb,
#vol-dpcm::-webkit-slider-thumb {
    background: linear-gradient(180deg, #fff, #888);
}

.console-group:nth-child(2) input[type=range].v-fader::-webkit-slider-thumb {
    background: linear-gradient(180deg, var(--secondary), #880088);
}

/* BUTTONS */
.strip-btns {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.strip-btns button {
    width: 20px;
    height: 20px;
    border: none;
    background: #333;
    color: #888;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
}

.strip-btns .btn-solo.active {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 5px var(--accent);
}

.strip-btns .btn-mute.active {
    background: #ff3333;
    color: #fff;
    box-shadow: 0 0 5px #ff3333;
}

/* ★ FX PRESET SELECT スタイル */
.fx-preset-select {
    background: linear-gradient(180deg, #2a2a3e, #1a1a2e);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 0.7rem;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.fx-preset-select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

.fx-preset-select option {
    background: var(--bg-panel);
    color: var(--text-main);
}

/* ★ FX HEADER フレックス調整 */
.fx-header {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.1), transparent);
    border-radius: 4px 4px 0 0;
}

.fx-title {
    font-family: var(--font-heading);
    font-size: 0.6rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

/* ★ FX CONTROLS 3列対応 */
.fx-controls {
    display: flex;
    gap: 16px;
    padding: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.fx-controls.comp {
    gap: 8px;
}

/* ★ retro-knob ノブスタイル */
.retro-knob {
    width: 48px;
    height: 48px;
    cursor: grab;
    user-select: none;
}

.retro-knob:active {
    cursor: grabbing;
}

.knob-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #3a3a5e, #1a1a2e);
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 204, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s;
}

.retro-knob:hover .knob-body {
    border-color: var(--primary);
}

.knob-indicator {
    width: 4px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
    transform-origin: center 22px;
    box-shadow: 0 0 8px var(--primary);
}

.knob-group {
    text-align: center;
}

.knob-group label {
    display: block;
    margin-top: 6px;
    font-size: 0.55rem;
    color: var(--text-dim);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.knob-group.sm .retro-knob {
    width: 38px;
    height: 38px;
}

.knob-group.sm .knob-indicator {
    width: 3px;
    height: 10px;
    transform-origin: center 16px;
}

/* ★ FX ON/OFF トグルスイッチ */
.fx-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    cursor: pointer;
}

.fx-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fx-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #333;
    border-radius: 18px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fx-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background: #666;
    border-radius: 50%;
    transition: all 0.3s;
}

.fx-toggle input:checked+.fx-toggle-slider {
    background: rgba(0, 255, 204, 0.3);
    border-color: var(--primary);
}

.fx-toggle input:checked+.fx-toggle-slider:before {
    transform: translateX(14px);
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* ★ Eボタン（エフェクトセンド）スタイル */
.btn-send {
    width: 20px;
    height: 20px;
    border: none;
    background: #333;
    color: #666;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}

.btn-send:hover {
    background: #444;
    color: #888;
}

.btn-send.active {
    background: #2a5a4a;
    color: var(--primary);
    box-shadow: 0 0 3px var(--primary);
}

.btn-send.off {
    background: #222;
    color: #444;
    opacity: 0.6;
}

/* ★ センドスライダーエリア */
.send-slider-area {
    width: 100%;
    padding: 4px 2px;
    margin-top: 4px;
}

.send-slider {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #1a1a2e, #2a2a4e);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    cursor: pointer;
}

.send-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), #00aa88);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    box-shadow: 0 0 6px var(--primary);
}

.send-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), #00aa88);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    box-shadow: 0 0 6px var(--primary);
}

/* --- MIXER OVERLAY --- */
.mixer-overlay {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 280px;
    background: var(--bg-panel);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 15px;
    z-index: 999;
    display: none;
    /* 初期状態は非表示 */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.mixer-overlay.active {
    display: block;
}

.mixer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.mixer-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary);
    font-family: var(--font-heading);
}

.mixer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mixer-row label {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.small-toggle {
    transform: scale(0.8);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Save Button in Mixer Overlay */
#mixer-save-btn {
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(45deg, var(--primary), #00aa88);
    color: #000;
    font-weight: bold;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

#mixer-save-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
}

#mixer-save-btn:active {
    transform: scale(0.98);
}

/* --- Structure Section Tags --- */
.section-tag {
    display: inline-block;
    padding: 2px 6px;
    margin-right: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.section-tag.active {
    background: var(--primary);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 8px var(--primary);
    transform: scale(1.05);
}


/* --- Play Button Animation --- */
/* 再生中の基本状態 */
.player-btn.main-play.playing {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

.player-btn.main-play.playing img {
    animation: pulse-beat 1s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

/* 低音エネルギー検知時の発光（vibrateの代替） */
.glow-pulse {
    animation: glow-pulse-anim 0.8s infinite alternate cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

@keyframes pulse-beat {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px var(--primary));
    }

    100% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 10px var(--primary));
    }
}

@keyframes glow-pulse-anim {
    0% {
        box-shadow: 0 0 10px rgba(0, 255, 204, 0.3), inset 0 0 10px rgba(0, 255, 204, 0.2);
        filter: brightness(1) drop-shadow(0 0 2px var(--primary));
    }

    100% {
        box-shadow: 0 0 30px rgba(0, 255, 204, 0.8), inset 0 0 20px rgba(0, 255, 204, 0.5);
        filter: brightness(1.4) drop-shadow(0 0 8px var(--primary));
    }
}

/* =========================================
   UI FIX 2025-12-28: Playlist Visualizer Logic (Rainbow & Rich Pulse)
   ========================================= */

/* 1. Hide visualizer by default (Idle state) */
.card-visualizer {
    display: none !important;
}

/* 2. Show visualizer only when playing */
.song-card.is-playing .card-visualizer {
    display: flex !important;
}

/* 3. Idle Glow Animation for Thumbnail (Anti-Flicker: Breathing Mode) */
.song-card:not(.is-playing) .card-thumb {
    /* 8秒かけてゆっくり呼吸するように */
    animation: idle-breathing 8s infinite alternate ease-in-out;
    animation-delay: calc(var(--index, 0) * -1s);

    /* レインボーカラー: 落ち着いた色味 */
    --base-hue: 180;
    --hue-offset: calc(var(--index, 0) * 20);
    --rainbow-color: hsl(calc(var(--base-hue) + var(--hue-offset)), 70%, 60%);

    color: var(--rainbow-color);
    border: 1px solid var(--rainbow-color);

    /* ベースシャドウ: サイズ固定 (チカチカ防止の鍵) */
    box-shadow: 0 0 6px var(--rainbow-color);
    background: rgba(0, 0, 0, 0.6);

    /* スムーズ化 */
    will-change: opacity, transform;
    transform: translateZ(0);
}

@keyframes idle-breathing {
    0% {
        /* 呼気: 少し暗く */
        opacity: 0.5;
        transform: scale(1) translateZ(0);
    }

    100% {
        /* 吸気: 少し明るく、わずかに浮く */
        opacity: 0.8;
        transform: scale(1.02) translateZ(0);
    }
}

/* =========================================
   NOW PLAYING CARD (Desktop)
   ========================================= */
.now-playing-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.08), rgba(0, 136, 255, 0.08));
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    margin-right: 20px;
    min-width: 200px;
    max-width: 300px;
}

.np-thumbnail {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.np-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.np-title {
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.np-meta {
    color: var(--primary);
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Hide Mobile Header/Drawer/Mini-Player/Fullscreen-Player on Desktop */
#mobile-header,
.mobile-drawer,
.drawer-backdrop,
.mini-player {
    display: none;
}

body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #app-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100dvh;
}

body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #sidebar,
body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #mobile-header,
body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #mobile-drawer,
body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #drawer-backdrop,
body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #player-bar {
    display: none !important;
}

body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] #content-area {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body[data-active-view="view-editor"][data-editor-layout-mode="mobile-landscape"] {
    overscroll-behavior: none;
}

body[data-active-view="view-wave-editor"] #app-container {
    height: 100dvh;
}

body[data-active-view="view-wave-editor"] #content-area {
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

body[data-active-view="view-wave-editor"] #player-bar {
    display: none !important;
}

body[data-active-view="view-wave-editor"] #view-wave-editor,
body[data-active-view="view-wave-editor"] #view-wave-editor.active {
    display: block;
    height: 100%;
    min-height: 0;
    animation: none;
}

body[data-active-view="view-wave-editor"] .wave-editor-main-shell,
body[data-active-view="view-wave-editor"] .wave-editor-main-host {
    height: 100%;
    min-height: 0;
}

@media (min-width: 901px) {
    body[data-sidebar-collapsed="true"] #app-container {
        grid-template-columns: 1fr;
    }

    body[data-sidebar-collapsed="true"] #sidebar {
        display: none;
    }

    body[data-sidebar-collapsed="true"] #content-area {
        grid-column: 1;
    }

    body[data-sidebar-collapsed="true"] .sidebar-reopen-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🎆 PREMIUM VISUAL EFFECTS - Commercial Grade UI Enhancement                 */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* --- 1. Main Play Button Enhanced Glow --- */
.player-btn.main-play {
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.player-btn.main-play:hover {
    transform: scale(1.1);
    box-shadow:
        0 0 20px rgba(0, 255, 204, 0.5),
        0 0 40px rgba(0, 255, 204, 0.3),
        0 0 60px rgba(0, 255, 204, 0.15);
}

.player-btn.main-play.playing {
    animation: main-play-glow 2s infinite ease-in-out;
}

@keyframes main-play-glow {

    0%,
    100% {
        box-shadow:
            0 0 15px rgba(0, 255, 204, 0.4),
            0 0 30px rgba(0, 255, 204, 0.2);
    }

    50% {
        box-shadow:
            0 0 25px rgba(0, 255, 204, 0.6),
            0 0 50px rgba(0, 255, 204, 0.4),
            0 0 80px rgba(0, 255, 204, 0.2);
    }
}

/* --- 2. Song Card Premium Hover Effect --- */
.song-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.song-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(0, 255, 204, 0.3);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 204, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.song-card:active {
    transform: translateY(-2px) scale(1.01);
}

/* --- 3. Playing Card Enhanced Rainbow Border --- */
.song-card.is-playing {
    border-color: transparent;
    box-shadow:
        0 0 30px rgba(0, 255, 204, 0.25),
        0 0 60px rgba(0, 255, 204, 0.1);
}

/* --- 4. Structure Badges (Section Tags) --- */
.structure-badge,
.section-tag,
.genre-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.15), rgba(0, 255, 204, 0.05));
    border: 1px solid rgba(0, 255, 204, 0.3);
    color: #00ffc8;
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.5);
    transition: all 0.2s ease;
}

.structure-badge:hover,
.section-tag:hover {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.25), rgba(0, 255, 204, 0.1));
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    transform: scale(1.05);
}

/* Section-specific colors */
.structure-badge.intro,
.section-tag.intro {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.2), rgba(100, 150, 255, 0.05));
    border-color: rgba(100, 150, 255, 0.4);
    color: #88aaff;
}

.structure-badge.verse,
.section-tag.verse {
    background: linear-gradient(135deg, rgba(150, 255, 150, 0.15), rgba(150, 255, 150, 0.05));
    border-color: rgba(150, 255, 150, 0.3);
    color: #88ff88;
}

.structure-badge.chorus,
.section-tag.chorus {
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.2), rgba(255, 200, 100, 0.05));
    border-color: rgba(255, 200, 100, 0.4);
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.structure-badge.bridge,
.section-tag.bridge {
    background: linear-gradient(135deg, rgba(255, 100, 150, 0.15), rgba(255, 100, 150, 0.05));
    border-color: rgba(255, 100, 150, 0.3);
    color: #ff88aa;
}

.structure-badge.outro,
.section-tag.outro {
    background: linear-gradient(135deg, rgba(200, 150, 255, 0.15), rgba(200, 150, 255, 0.05));
    border-color: rgba(200, 150, 255, 0.3);
    color: #cc99ff;
}

/* --- 5. Navigation Items Glow --- */
.nav-item {
    position: relative;
    transition: all 0.25s ease;
}

.nav-item:hover {
    color: #00ffc8;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.nav-item.active {
    color: #00ffc8;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.6);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffc8, transparent);
    box-shadow: 0 0 10px #00ffc8;
}

/* --- 6. Primary Buttons Neon Effect --- */
.primary-btn,
.primary-btn.huge {
    position: relative;
    background: linear-gradient(135deg, #00ffc8, #00d9a8);
    border: none;
    color: #000;
    font-weight: bold;
    overflow: hidden;
    transition: all 0.3s ease;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.primary-btn:hover::before {
    left: 100%;
}

.primary-btn:hover {
    box-shadow:
        0 0 20px rgba(0, 255, 204, 0.5),
        0 0 40px rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

/* --- 7. Card Thumbnail Glow on Hover --- */
.card-thumb {
    transition: all 0.3s ease;
}

.song-card:hover .card-thumb {
    box-shadow:
        0 0 15px rgba(0, 255, 204, 0.3),
        inset 0 0 20px rgba(0, 255, 204, 0.1);
}

/* --- 8. Input Focus Glow --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00ffc8 !important;
    box-shadow:
        0 0 0 3px rgba(0, 255, 204, 0.1),
        0 0 15px rgba(0, 255, 204, 0.2) !important;
}

/* --- 9. Modal/Overlay Backdrop Enhancement --- */
.modal-overlay,
.mixer-overlay {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.75);
}

/* --- 10. Progress/Seek Bar Glow --- */
#seek-bar::-webkit-slider-thumb {
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

#seek-bar:hover::-webkit-slider-thumb {
    box-shadow:
        0 0 15px rgba(0, 255, 204, 0.7),
        0 0 30px rgba(0, 255, 204, 0.4);
}

/* --- 11. Subtle Background Animation (Content Area) --- */
#content-area {
    position: relative;
}

#content-area::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(0, 255, 204, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(100, 150, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: ambient-shift 20s infinite ease-in-out alternate;
}

@keyframes ambient-shift {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* --- 12. Card Buttons (Play/Menu) Glow --- */
.card-btn {
    transition: all 0.2s ease;
}

.card-btn:hover {
    color: #00ffc8;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.6);
    transform: scale(1.15);
}

/* --- 13. Generating/Loading State Pulse --- */
.generating,
.is-generating {
    animation: generating-pulse 1.5s infinite ease-in-out;
}

@keyframes generating-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 200, 100, 0.3);
        border-color: rgba(255, 200, 100, 0.4);
    }

    50% {
        box-shadow:
            0 0 20px rgba(255, 200, 100, 0.5),
            0 0 40px rgba(255, 200, 100, 0.3);
        border-color: rgba(255, 200, 100, 0.7);
    }
}

/* --- 14. Visualizer Bar Enhanced --- */
.viz-bar {
    background: linear-gradient(to top, #00ffc8, #00d9a8, #1DB954);
    box-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
}

/* --- 15. Footer Player Bar Glow --- */
#player-bar {
    border-top: 1px solid rgba(0, 255, 204, 0.15);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
}

/* --- 16. Mobile Optimization (Max Width 480px) --- */
@media (max-width: 480px) {

    /* Song Card Mobile Layout - Grid Redesign */
    #playlist-container .song-card {
        margin-bottom: 12px;
        display: grid !important;
        grid-template-columns: 50px 1fr 32px;
        /* 1frでINFOエリアを柔軟に広げる */
        grid-template-areas:
            "thumb info menu"
            "viz viz viz";
        align-items: center;
        gap: 10px;
        /* 左右の要素間の距離を少し広げてバランスを整える */
        padding: 8px 12px;
        /* 左右パディングを微調整 */
        height: auto;
        min-height: 64px;
        overflow: hidden;
        position: relative;
        /* 状態変化によるズレ防止 */
    }

    /* 待機カード（.is-playingがない場合）でもメニュー位置を再生中と完全に一致させる */
    #playlist-container .song-card .card-actions {
        grid-area: menu;
        display: flex;
        justify-content: flex-end;
        /* 右端に寄せて安定させる */
        align-items: center;
        height: 100%;
        min-width: 32px;
    }

    .card-menu-btn {
        padding: 4px !important;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem !important;
    }

    /* ドラッグハンドルはモバイルでは不要（タップ操作主体のため）且つ、レイアウトを崩す原因になるため非表示 */
    /* ★FIX: シームレス無限ループアニメーション */
    @keyframes marquee-loop {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-50%);
        }

        /* 全体の半分（1個分）移動したら最初に戻る */
    }

    #playlist-container .song-card .card-info .card-title {
        overflow: hidden;
        /* はみ出し部分を隠す */
        position: relative;
        width: 100%;
        mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
        /* 端をフェード */
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 5%, black 95%, transparent 100%);
    }

    /* 内部のトラックスタイル */
    #playlist-container .song-card .card-info .card-title .marquee-track {
        display: flex;
        width: fit-content;
        /* デフォルトはアニメーション停止（画面酔い防止） */
        animation: marquee-loop 10s linear infinite;
        animation-play-state: paused;
        will-change: transform;
        transform: translateZ(0);
    }

    /* 再生中、ホバー時、タップ（Active）時のみ動かす */
    #playlist-container .song-card.is-playing .card-info .card-title .marquee-track,
    #playlist-container .song-card:hover .card-info .card-title .marquee-track,
    #playlist-container .song-card:active .card-info .card-title .marquee-track {
        animation-play-state: running;
    }

    /* 各スパンのスタイル */
    #playlist-container .song-card .card-info .card-title .marquee-track span {
        white-space: nowrap;
        padding-right: 40px;
        /* ループの繋ぎ目の余白 */
        display: inline-block;
    }

    #playlist-container .song-card .card-info {
        overflow: hidden;
        position: relative;
    }

    /* .card-inner はデスクトップ用の名残であるため、モバイル Grid レイアウトを破壊しないよう無効化 */
    .card-inner {
        display: contents !important;
        /* 子要素を直接 Grid 親（.song-card）に従わせる */
    }

    /* Area Assignments (song-card直下の子要素に適用) */
    .song-card>.card-thumb {
        grid-area: thumb;
        width: 36px;
        height: 36px;
        margin: 0;
        align-self: center;
    }

    .song-card>.card-info {
        grid-area: info;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .song-card>.card-actions {
        grid-area: menu;
        margin: 0 !important;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        height: 100%;
        min-width: 32px;
    }

    .song-card>.card-visualizer {
        grid-area: viz;
        margin: 8px 0 0 0;
        height: 25px;
        width: 100%;
        border-top: none !important;
        /* 確実に除去 */
    }

    .card-title {
        font-size: 0.9rem;
        font-weight: 700;
    }

    .card-meta {
        font-size: 0.7rem;
        display: flex;
        gap: 6px;
        opacity: 0.8;
    }
}

/* =========================================
   FULLSCREEN PLAYER (Main Playback View)
   ========================================= */

.fullscreen-player {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 18px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.26s ease, transform 0.3s ease;
}

.fullscreen-player.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.fp-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(0, 255, 204, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(4, 8, 12, 0.88), rgba(2, 4, 8, 0.96));
    backdrop-filter: blur(28px);
}

.fp-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1420px);
    display: flex;
}

.fp-container {
    width: 100%;
    border-radius: 34px;
    border: 1px solid rgba(0, 255, 204, 0.14);
    background:
        radial-gradient(circle at top left, rgba(0, 255, 204, 0.08), transparent 34%),
        linear-gradient(160deg, rgba(11, 16, 24, 0.97), rgba(3, 6, 11, 0.98));
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.44);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.fp-header-spacer {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

.fp-icon-btn,
.fp-pill-btn,
.fp-primary-btn,
.fp-secondary-btn,
.fp-chip {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fp-icon-btn:hover,
.fp-pill-btn:hover,
.fp-primary-btn:hover,
.fp-secondary-btn:hover,
.fp-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 204, 0.24);
}

.fp-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fp-icon-glyph {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    color: currentColor;
    flex: 0 0 auto;
}

.fp-icon-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fp-icon-btn.small {
    width: 54px;
    height: 54px;
}

.fp-icon-btn.medium {
    width: 62px;
    height: 62px;
}

.fp-icon-btn.large {
    width: 82px;
    height: 82px;
}

.fp-icon-btn.large .fp-icon-glyph {
    width: 1.7rem;
    height: 1.7rem;
}

.fp-icon-btn.circle-filled {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(223, 255, 249, 0.92));
    color: #001416;
    box-shadow: 0 20px 32px rgba(0, 255, 204, 0.12);
}

.fp-pill-btn,
.fp-primary-btn,
.fp-secondary-btn,
.fp-chip {
    min-height: 44px;
    border-radius: 999px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
}

.fp-pill-btn.active,
.fp-chip.active {
    border-color: rgba(0, 255, 204, 0.3);
    background: rgba(0, 255, 204, 0.16);
}

.like-btn.active {
    color: #ff8ab8;
    border-color: rgba(255, 138, 184, 0.28);
    background: rgba(255, 138, 184, 0.12);
}

.fp-context-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.context-subtitle {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.context-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 700;
}

.fp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
    gap: 28px;
    align-items: start;
}

.fp-main-panel,
.fp-side-panel {
    display: flex;
    flex-direction: column;
}

.fp-main-panel {
    gap: 20px;
    min-width: 0;
}

.fp-side-panel {
    gap: 16px;
}

.fp-side-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.fp-side-tab {
    flex: 1;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.fp-side-tab:hover {
    transform: translateY(-1px);
    color: #fff;
}

.fp-side-tab.active {
    border-color: rgba(0, 255, 204, 0.22);
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.18), rgba(64, 214, 255, 0.14));
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 255, 204, 0.08);
}

.fp-side-panel-content {
    position: relative;
}

.fp-panel-stack {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.fp-panel-stack.active {
    display: flex;
}

.fp-artwork {
    width: min(100%, 620px);
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(28, 38, 54, 0.94), rgba(10, 14, 22, 0.98));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.fp-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fp-track-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.fp-titles {
    min-width: 0;
    flex: 1;
}

.fp-overline {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.fp-titles h2 {
    margin: 0;
    font-size: clamp(2rem, 3.1vw, 3.6rem);
    line-height: 1.08;
}

.fp-titles h3 {
    margin: 10px 0 0;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
}

.fp-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fp-progress-card,
.fp-repeat-summary,
.fp-panel-section {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.fp-progress-card {
    padding: 20px;
}

.fp-slider,
.fp-slider-group input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.52), rgba(255, 255, 255, 0.2));
    outline: none;
    cursor: pointer;
}

.fp-slider::-webkit-slider-thumb,
.fp-slider-group input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.12);
}

.fp-time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-family: monospace;
    font-size: 0.84rem;
}

.fp-controls-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.loop-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    color: #001214;
    font-size: 0.66rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fp-repeat-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.68);
}

.fp-repeat-btn {
    min-width: 148px;
}

.fp-repeat-btn strong {
    color: #fff;
    font-size: 0.96rem;
}

.fp-panel-section {
    display: flex;
    flex-direction: column;
    padding: 18px;
    gap: 14px;
}

.fp-panel-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.fp-panel-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fp-panel-title-row h4 {
    margin: 0;
    font-size: 1rem;
}

.fp-panel-hint {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
}

.fp-fx-switch {
    min-width: 92px;
}

.fp-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fp-field span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
}

.fp-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 10, 16, 0.96);
    color: #fff;
}

.fp-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.fp-primary-btn {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.22), rgba(64, 214, 255, 0.18));
}

.fp-secondary-btn {
    background: rgba(255, 255, 255, 0.04);
}

.fp-slider-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fp-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fp-chip {
    min-width: 0;
}

.fp-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-item {
    padding: 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.meta-item span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.meta-item strong {
    color: #fff;
    font-size: 1rem;
}

.fp-detail-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.72);
}

.fp-detail-box>span {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#fp-progression {
    margin-top: 8px;
    color: #fff;
    line-height: 1.55;
    cursor: pointer;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    word-break: break-word;
}

.song-prompt-preview {
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    word-break: break-word;
}

.song-prompt-preview:hover,
.song-prompt-preview:focus {
    color: #fff;
}

@media (max-width: 1080px) {
    .fullscreen-player {
        padding: 12px;
    }

    .fp-layout {
        grid-template-columns: 1fr;
    }

    .fp-artwork {
        width: min(100%, 520px);
    }
}

@media (max-width: 720px) {
    .fp-container {
        border-radius: 26px;
        padding: 18px;
    }

    .fp-track-header,
    .fp-header {
        flex-direction: column;
        align-items: stretch;
    }

    .fp-context-info {
        align-items: flex-start;
    }

    .fp-controls-main {
        justify-content: space-between;
    }

    .fp-inline-form,
    .fp-toggle-grid,
    .fp-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .prompt-bar-container {
        width: 100%;
    }

    .playlist-header-controls {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .playlist-right-panel {
        padding: 18px;
    }

    .playlist-library-actions,
    .playlist-song-actions {
        flex-direction: column;
        width: 100%;
    }

    .playlist-song-item {
        flex-direction: column;
        align-items: stretch;
    }

    .playlist-action-btn,
    .playlist-danger-btn,
    .fp-pill-btn.like-btn,
    .fp-primary-btn,
    .fp-secondary-btn {
        width: 100%;
    }

    .fullscreen-player {
        padding: 8px;
    }

    .fp-icon-btn.medium {
        width: 56px;
        height: 56px;
    }

    .fp-icon-btn.large {
        width: 74px;
        height: 74px;
    }

    .fp-titles h2 {
        font-size: 1.9rem;
    }
}

/* =========================================
   FULLSCREEN PLAYER REBUILD OVERRIDE
   ========================================= */

body.fp-open #player-bar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(32px);
}

.fullscreen-player .fp-container.fp-rebuild-layout {
    width: min(100%, 1080px);
    margin: 0 auto;
    padding: clamp(18px, 3vw, 28px);
    gap: 18px;
}

.fullscreen-player .fp-shell {
    align-items: center;
}

.fullscreen-player .fp-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fullscreen-player .fp-topbar-btn {
    width: 48px;
    height: 48px;
}

.fullscreen-player .fp-topbar-btn .fp-icon-glyph {
    width: 1.4rem;
    height: 1.4rem;
}

.fullscreen-player .fp-topbar-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.fullscreen-player .fp-topbar-label {
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.fullscreen-player .fp-topbar-value {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.fullscreen-player .fp-hero {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: clamp(18px, 3vw, 28px);
    align-items: center;
}

.fullscreen-player .fp-hero-copy {
    display: grid;
    gap: 14px;
    min-width: 0;
    position: relative;
}

.fullscreen-player .fp-title-row {
    position: relative;
    display: block;
    min-width: 0;
    padding-right: 78px;
}

.fullscreen-player .fp-title-marquee {
    min-width: 0;
    display: block;
    overflow: hidden;
}

.fullscreen-player .fp-title-marquee-track {
    display: block;
}

.fullscreen-player .fp-hero-copy h2 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.1rem);
    line-height: 1.02;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.fullscreen-player #fp-title-ghost {
    display: none;
}

.fullscreen-player .fp-like-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    flex: 0 0 56px;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.fullscreen-player .fp-like-button.active {
    color: #ff8ab8;
    border-color: rgba(255, 138, 184, 0.3);
    background: rgba(255, 138, 184, 0.12);
}

.fullscreen-player .fp-like-button .fp-icon-glyph {
    width: 1.36rem;
    height: 1.36rem;
}

.fullscreen-player .fp-like-button:hover {
    transform: translateY(-1px);
}

.fullscreen-player .fp-artist-link {
    justify-self: start;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.22);
    text-underline-offset: 0.22em;
    cursor: pointer;
}

.fullscreen-player .fp-artwork {
    width: min(100%, 360px);
    margin: 0;
    justify-self: center;
    position: relative;
    isolation: isolate;
    background: radial-gradient(circle at 20% 20%, rgba(64, 214, 255, 0.18), transparent 46%), linear-gradient(145deg, rgba(28, 38, 54, 0.94), rgba(10, 14, 22, 0.98));
}

.fullscreen-player .fp-artwork img,
.fullscreen-player .fp-artwork-image {
    position: relative;
    z-index: 1;
}

.fullscreen-player .fp-artwork-note {
    position: relative;
    z-index: 2;
}

.fullscreen-player .fp-artwork-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(3, 5, 10, 0.08), rgba(3, 5, 10, 0.34)),
        radial-gradient(circle at 50% 78%, rgba(0, 255, 204, 0.18), transparent 42%);
    pointer-events: none;
}

.fullscreen-player .fp-artwork-visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    opacity: 0.88;
    mix-blend-mode: screen;
}

.fullscreen-player .fp-artwork-aura {
    --fp-energy: 0.08;
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 8%;
    height: 28%;
    z-index: 2;
    pointer-events: none;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.52) 0%, rgba(64, 214, 255, 0.2) 38%, rgba(64, 214, 255, 0) 74%);
    filter: blur(30px);
    opacity: calc(0.18 + var(--fp-energy) * 0.5);
    transform: scale(calc(0.84 + var(--fp-energy) * 0.44));
    transition: opacity 120ms linear, transform 120ms linear;
}

.fullscreen-player .fp-energy-strip {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    align-items: end;
    gap: 6px;
    min-height: 44px;
    padding-top: 4px;
}

.fullscreen-player .fp-energy-bar {
    --fp-bar-level: 0.16;
    height: calc(8px + var(--fp-bar-level) * 30px);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(156, 255, 241, 0.96), rgba(0, 255, 204, 0.16));
    box-shadow: 0 0 16px rgba(0, 255, 204, 0.18);
    opacity: calc(0.3 + var(--fp-bar-level) * 0.72);
    transform-origin: center bottom;
    transform: scaleY(calc(0.86 + var(--fp-bar-level) * 0.22));
    transition: height 90ms linear, opacity 90ms linear, transform 90ms linear;
}

.fullscreen-player .fp-meta-strip .meta-badge {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 0.8rem;
}

.fullscreen-player #fp-genre {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
}

.fullscreen-player .fp-playback-card,
.fullscreen-player .fp-panel-shell,
.fullscreen-player .fp-panel-card {
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

.fullscreen-player .fp-playback-card,
.fullscreen-player .fp-panel-shell {
    padding: 18px;
}

.fullscreen-player .fp-playback-card {
    display: grid;
    gap: 16px;
}

.fullscreen-player .fp-slider,
.fullscreen-player .fp-slider-block input {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 255, 204, 0.56), rgba(255, 255, 255, 0.18));
    outline: none;
    cursor: pointer;
}

.fullscreen-player .fp-slider::-webkit-slider-thumb,
.fullscreen-player .fp-slider-block input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f2fffe;
    box-shadow: 0 0 0 4px rgba(0, 255, 204, 0.12);
}

.fullscreen-player .fp-action-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.fullscreen-player .fp-mode-toggle {
    position: relative;
    min-height: 74px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fullscreen-player .fp-mode-toggle:hover {
    transform: translateY(-1px);
}

.fullscreen-player .fp-mode-toggle .material-icons {
    font-size: 1.28rem;
}

.fullscreen-player .fp-mode-toggle .fp-icon-glyph {
    width: 1.28rem;
    height: 1.28rem;
}

.fullscreen-player .fp-mode-toggle.active {
    border-color: rgba(0, 255, 204, 0.28);
    background: rgba(0, 255, 204, 0.14);
}

.fullscreen-player .fp-mode-label {
    font-size: 0.84rem;
    line-height: 1;
}

.fullscreen-player .fp-panel-toggle-row {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.fullscreen-player .fp-panel-toggle {
    min-width: 88px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fullscreen-player .fp-panel-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 204, 0.24);
}

.fullscreen-player .fp-panel-toggle.active {
    border-color: rgba(0, 255, 204, 0.28);
    background: rgba(0, 255, 204, 0.14);
}

.fullscreen-player .fp-panel-toggle .material-icons {
    font-size: 1.1rem;
}

.fullscreen-player .fp-panel-toggle .fp-icon-glyph {
    width: 1.1rem;
    height: 1.1rem;
}

.fullscreen-player .fp-chip .fp-icon-glyph {
    width: 1rem;
    height: 1rem;
}

.fullscreen-player .fp-drawer-shell {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.fullscreen-player .fp-drawer-shell.hidden {
    display: none;
}

.fullscreen-player .fp-drawer-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 0;
}

.fullscreen-player .fp-drawer-handle {
    width: 64px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.fullscreen-player .fp-drawer-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.fullscreen-player .fp-drawer-tab {
    min-height: 44px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fullscreen-player .fp-drawer-tab.active {
    border-color: rgba(0, 255, 204, 0.28);
    background: rgba(0, 255, 204, 0.14);
    color: #fff;
}

.fullscreen-player .fp-drawer-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fullscreen-player .fp-drawer-shell .fp-side-panel-content {
    min-height: 0;
}

.fullscreen-player .fp-drawer-shell .fp-panel-card {
    padding: 0;
    border: none;
    background: transparent;
}

@keyframes fp-title-marquee-scroll {

    0%,
    14% {
        transform: translateX(0);
    }

    86%,
    100% {
        transform: translateX(calc(-1 * var(--fp-title-scroll, 0px)));
    }
}

.fullscreen-player .loop-indicator {
    top: 8px;
    right: 8px;
}

.fullscreen-player .fp-panel-shell {
    display: grid;
    gap: 14px;
}

.fullscreen-player .fp-side-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
}

.fullscreen-player .fp-side-tab {
    min-height: 50px;
    border-radius: 18px;
}

.fullscreen-player .fp-side-panel-content {
    min-height: 280px;
}

.fullscreen-player .fp-panel-stack {
    display: none;
}

.fullscreen-player .fp-panel-stack.active {
    display: block;
}

.fullscreen-player .fp-panel-card {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.fullscreen-player .fp-inline-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.fullscreen-player .fp-inline-title {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fullscreen-player .fp-switch-btn {
    min-width: 88px;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 204, 0.3);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.fullscreen-player .fp-switch-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.2), rgba(64, 214, 255, 0.16));
}

.fullscreen-player .fp-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fullscreen-player .fp-pill-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.fullscreen-player .fp-pill-btn.active {
    border-color: rgba(0, 255, 204, 0.3);
    background: rgba(0, 255, 204, 0.14);
}

.fullscreen-player .fp-pill-btn:disabled {
    opacity: 0.38;
    cursor: default;
}

.fullscreen-player .fp-levels-panel {
    display: grid;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.fullscreen-player .fp-levels-panel.hidden {
    display: none;
}

.fullscreen-player .fp-levels-panel.fx-disabled {
    border-color: rgba(255, 255, 255, 0.05);
}

.fullscreen-player .fp-slider-block {
    display: grid;
    gap: 10px;
}

.fullscreen-player .fp-slider-block.is-disabled {
    opacity: 0.42;
}

.fullscreen-player .fp-field-stack {
    display: grid;
    gap: 8px;
}

.fullscreen-player .fp-panel-heading h4 {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 1080px) {
    .fullscreen-player .fp-container.fp-rebuild-layout {
        width: min(100%, 920px);
    }

    .fullscreen-player .fp-hero {
        grid-template-columns: 1fr;
    }

    .fullscreen-player .fp-artwork {
        width: min(100%, 420px);
    }
}

@media (max-width: 720px) {
    .fullscreen-player .fp-container.fp-rebuild-layout {
        padding: 16px;
        gap: 14px;
    }

    .fullscreen-player .fp-topbar-btn {
        width: 44px;
        height: 44px;
    }

    .fullscreen-player .fp-title-row {
        align-items: center;
    }

    .fullscreen-player .fp-hero-copy h2 {
        font-size: clamp(1.9rem, 9vw, 2.9rem);
    }

    .fullscreen-player .fp-action-row {
        gap: 8px;
    }

    .fullscreen-player .fp-energy-strip {
        gap: 4px;
        min-height: 38px;
    }

    .fullscreen-player .fp-mode-toggle {
        min-height: 58px;
    }

    .fullscreen-player .fp-mode-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .fullscreen-player .fp-container.fp-rebuild-layout {
        padding: 12px;
    }

    .fullscreen-player .fp-topbar {
        gap: 10px;
    }

    .fullscreen-player .fp-topbar-label {
        font-size: 0.64rem;
    }

    .fullscreen-player .fp-topbar-value {
        font-size: 0.88rem;
    }

    .fullscreen-player .fp-title-row {
        padding-right: 62px;
    }

    .fullscreen-player .fp-like-button {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .fullscreen-player .fp-mode-label {
        font-size: 0.76rem;
    }

    .fullscreen-player .fp-panel-toggle {
        min-width: 78px;
        min-height: 34px;
    }

    .fullscreen-player .fp-drawer-tabs {
        gap: 6px;
    }

    .fullscreen-player .fp-drawer-shell {
        padding: 10px 12px 12px;
        border-radius: 20px;
    }

    .fullscreen-player .fp-title-marquee {
        overflow: hidden;
    }

    .fullscreen-player .fp-title-marquee.marquee-active {
        mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    }

    .fullscreen-player .fp-title-marquee.marquee-active .fp-title-marquee-track {
        display: flex;
        align-items: center;
        gap: 42px;
        width: max-content;
        animation: fp-title-marquee-scroll var(--fp-title-duration, 12s) linear infinite;
    }

    .fullscreen-player .fp-title-marquee.marquee-active h2,
    .fullscreen-player .fp-title-marquee.marquee-active #fp-title-ghost {
        display: block;
        white-space: nowrap;
        word-break: normal;
        flex: 0 0 auto;
    }

    .fullscreen-player .fp-meta-strip {
        gap: 6px;
    }

    .fullscreen-player .fp-meta-strip .meta-badge {
        min-height: 32px;
        padding: 5px 9px;
        font-size: 0.69rem;
        gap: 4px;
    }

    .fullscreen-player #fp-genre {
        font-size: 0.66rem;
        max-width: min(100%, 180px);
    }

    .fullscreen-player .fp-artwork-aura {
        left: 10%;
        right: 10%;
        bottom: 10%;
        height: 24%;
    }

    .fullscreen-player .fp-energy-strip {
        grid-template-columns: repeat(16, minmax(0, 1fr));
        min-height: 34px;
        gap: 4px;
    }

    .fullscreen-player .fp-inline-form {
        grid-template-columns: 1fr;
    }

    .fullscreen-player .fp-pill-row {
        gap: 8px;
    }

    .fullscreen-player .fp-pill-btn,
    .fullscreen-player .fp-drawer-tab {
        min-height: 40px;
        font-size: 0.82rem;
    }
}

/* =========================================
   FULLSCREEN PLAYER ART FUSION OVERRIDE
   ========================================= */

body.fp-open {
    overflow: hidden;
}

.fullscreen-player .fp-container.fp-rebuild-layout.fp-art-fusion-layout {
    width: min(100%, 1080px);
    height: min(100%, calc(100dvh - 36px));
    max-height: calc(100dvh - 36px);
    padding: clamp(14px, 2.1vw, 24px);
    display: grid;
    grid-template-rows: auto minmax(0, 1.8fr) auto auto auto minmax(0, 1.04fr);
    gap: 14px;
    overflow: hidden;
}

.fullscreen-player .fp-visual-stage {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    padding: clamp(14px, 2vw, 22px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top left, rgba(64, 214, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(6, 10, 18, 0.92), rgba(3, 6, 11, 0.98));
    overflow: hidden;
}

.fullscreen-player .fp-stage-visualizer {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.94;
}

.fullscreen-player.fp-performance-mode .fp-stage-visualizer {
    opacity: 0.82;
}

.fullscreen-player .fp-stage-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(40px) saturate(1.1);
    transform: scale(1.12);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.fullscreen-player .fp-stage-backdrop.has-artwork {
    opacity: 0.24;
}

.fullscreen-player .fp-stage-main {
    position: relative;
    z-index: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(240px, 0.82fr);
    gap: clamp(14px, 2.2vw, 26px);
    align-items: center;
}

.fullscreen-player .fp-topbar .fp-topbar-copy {
    margin-right: auto;
}

.fullscreen-player .fp-topbar .fp-like-button {
    position: static;
    margin-left: auto;
}

.fullscreen-player .fp-stage-copy .fp-title-row {
    padding-right: 0;
}

.fullscreen-player .fp-stage-copy {
    position: relative;
    z-index: 3;
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 14px;
}

.fullscreen-player .fp-stage-artwork {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 14px;
}

.fullscreen-player .fp-stage-artwork .fp-artwork {
    width: min(100%, 340px);
    box-shadow: 0 22px 54px rgba(2, 6, 12, 0.42);
}

.fullscreen-player .fp-stage-copy #fp-title,
.fullscreen-player .fp-stage-copy #fp-title-ghost {
    margin: 0;
    font-size: clamp(2.3rem, 6vw, 4.8rem);
    line-height: 0.94;
    letter-spacing: -0.03em;
}

.fullscreen-player .fp-progress-stage,
.fullscreen-player .fp-main-controls-stage {
    padding: 14px 18px;
}

.fullscreen-player .fp-lyrics-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.fullscreen-player .fp-lyrics-line,
.fullscreen-player .fp-lyrics-subcopy {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fullscreen-player .fp-lyrics-line {
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.fullscreen-player .fp-lyrics-subcopy {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.76rem;
}

.fullscreen-player .fp-structure-lane {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    min-height: 34px;
    overflow: hidden;
    isolation: isolate;
    contain: layout paint;
}

.fullscreen-player .fp-structure-caption {
    display: none;
}

.fullscreen-player .fp-structure-track {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 30px;
    overflow-x: auto;
    width: 100%;
    padding: 0 45%;
    scroll-padding-inline: 45%;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    pointer-events: none;
    user-select: none;
    scroll-behavior: smooth;
    contain: layout paint;
}

.fullscreen-player .fp-structure-track::-webkit-scrollbar {
    display: none;
}

.fullscreen-player .fp-structure-track .mobile-section-item {
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0;
    scroll-snap-align: center;
    background: none;
    border: 0;
    color: rgba(255, 255, 255, 0.36);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.fullscreen-player .fp-structure-track .mobile-section-item.active {
    color: var(--primary);
    opacity: 1;
    font-size: 1.04rem;
    font-weight: 700;
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.42);
}

.fullscreen-player .fp-structure-track .mobile-section-item.waiting {
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.8rem;
    opacity: 0.62;
    text-shadow: none;
}

.fullscreen-player .fp-main-controls-stage {
    display: grid;
    gap: 12px;
}

.fullscreen-player .fp-main-controls-stage .fp-controls-main {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    justify-items: center;
    width: min(920px, 100%);
    margin: 0 auto;
    gap: 14px;
    align-items: center;
}

.fullscreen-player .fp-fx-dock-shell {
    position: relative;
    display: grid;
    gap: 8px;
}

.fullscreen-player .fp-fx-dock {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.fullscreen-player .fp-fx-status {
    justify-self: end;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.fullscreen-player .fp-levels-popover {
    position: absolute;
    inset: auto 0 calc(100% + 10px) 0;
    z-index: 4;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
}

.fullscreen-player .fp-drawer-shell {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

.fullscreen-player .fp-side-panel-content {
    min-height: 0;
    overflow: hidden;
}

.fullscreen-player .fp-panel-stack {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.fullscreen-player .fp-panel-stack.active {
    display: block;
}

.fullscreen-player .fp-lyrics-panel {
    display: grid;
    gap: 14px;
    align-content: start;
}

.fullscreen-player .fp-lyrics-panel-line {
    margin: 0;
    color: #fff;
    font-size: clamp(1.12rem, 2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
}

.fullscreen-player .fp-lyrics-panel-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    line-height: 1.55;
}

.fullscreen-player .fp-queue-status {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
    letter-spacing: 0.04em;
}

@media (max-width: 900px) {
    .fullscreen-player .fp-container.fp-rebuild-layout.fp-art-fusion-layout {
        grid-template-rows: auto minmax(0, 1.55fr) auto auto auto minmax(0, 1.1fr);
    }

    .fullscreen-player .fp-stage-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fullscreen-player .fp-stage-artwork {
        order: -1;
    }

    .fullscreen-player .fp-stage-artwork .fp-artwork {
        width: min(100%, 300px);
    }
}

@media (max-width: 640px) {
    .fullscreen-player .fp-container.fp-rebuild-layout.fp-art-fusion-layout {
        height: min(100%, calc(100dvh - 18px));
        max-height: calc(100dvh - 18px);
        padding: 12px;
        gap: 10px;
        grid-template-rows: auto minmax(0, 1.48fr) auto auto auto minmax(0, 0.96fr);
    }

    .fullscreen-player .fp-visual-stage {
        padding: 12px;
        gap: 10px;
        border-radius: 24px;
    }

    .fullscreen-player .fp-stage-copy {
        gap: 10px;
    }

    .fullscreen-player .fp-stage-copy #fp-title,
    .fullscreen-player .fp-stage-copy #fp-title-ghost {
        font-size: clamp(2rem, 11vw, 3.25rem);
    }

    .fullscreen-player .fp-stage-artwork .fp-artwork {
        width: min(100%, min(44vh, 272px));
        border-radius: 26px;
    }

    .fullscreen-player .fp-lyrics-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .fullscreen-player .fp-progress-stage,
    .fullscreen-player .fp-main-controls-stage {
        padding: 12px 14px;
    }

    .fullscreen-player .fp-main-controls-stage .fp-controls-main {
        gap: 8px;
    }

    .fullscreen-player .fp-fx-dock {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .fullscreen-player .fp-fx-status {
        justify-self: start;
        font-size: 0.66rem;
    }

    .fullscreen-player .fp-levels-popover {
        inset: auto 0 calc(100% + 8px) 0;
    }

    .fullscreen-player .fp-structure-track {
        min-height: 30px;
        gap: 18px;
        padding: 0 42%;
        scroll-padding-inline: 42%;
    }

    .fullscreen-player .fp-structure-track .mobile-section-item {
        font-size: 0.8rem;
    }

    .fullscreen-player .fp-panel-stack {
        padding-right: 0;
    }

    .fullscreen-player .fp-lyrics-panel-line {
        font-size: 1.02rem;
    }

    .fullscreen-player .fp-lyrics-panel-copy {
        font-size: 0.82rem;
    }
}

/* --- HOME TABS & DISCOVERY UI --- */
.home-nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.home-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 16px;
    position: relative;
    transition: all 0.2s;
}

.home-tab-btn:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.home-tab-btn.active {
    color: var(--secondary);
    text-shadow: 0 0 10px var(--secondary-glow);
}

.home-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    box-shadow: 0 0 8px var(--secondary);
}

/* Discovery Section */
.discovery-header {
    margin-bottom: 20px;
    text-align: center;
}

.discovery-header h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.discovery-header p {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    /* 横2つ並ぶように調整 */
    gap: 15px;
    padding-bottom: 40px;
}

/* Override song-card for Discovery to look distinct? Or reuse? */
/* Reusing .song-card logic but maybe adding a badge */
.public-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: #000;
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 30;
    box-shadow: 0 0 5px var(--secondary);
}

/* Public Toggle Switch */
.public-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.public-label {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Toggle Switch Style */
.toggle-switch-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

input:checked+.toggle-switch {
    background: var(--secondary);
    box-shadow: 0 0 8px var(--secondary-glow);
}

input:checked+.toggle-switch::after {
    transform: translateX(16px);
}

/* --- Discovery Shelf UI (SUNO Style) --- */

/* Parent Container */
#discovery-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-bottom: 40px;
    width: 100%;
}

/* Shelf Section */
.discovery-shelf {
    width: 100%;
    margin-bottom: 10px;
}

.shelf-title {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Horizontal Scroll Area */
.shelf-scroll-area {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 10px 20px 10px;
    /* Bottom padding for scrollbar space */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    /* Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-dark);
}

.shelf-scroll-area::-webkit-scrollbar {
    height: 8px;
}

.shelf-scroll-area::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

.shelf-scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 4px;
}

/* Rich Card Design */
.rich-card {
    flex: 0 0 auto;
    width: 260px;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
    display: block;
}

.rich-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}

.rich-card .profile-song-cover {
    min-height: 240px;
}

.library-grid .rich-card {
    width: 100%;
}

/* Artwork Area (Square) */
.rich-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #333, #111);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Overlay Play Button */
.rich-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.rich-card:hover .rich-play-overlay {
    opacity: 1;
}

.rich-play-btn {
    font-size: 3rem;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Card Info */
.rich-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    flex-grow: 1;
}

.rich-title {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rich-author {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.rich-meta {
    font-size: 0.7rem;
    color: var(--accent);
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.rich-meta span {
    white-space: nowrap;
}

/* Genre/Theme Badge styles for Art */
.art-badge {
    font-size: 2rem;
    opacity: 0.3;
}

/* Featured Shelf adjustments (Optional: Make first shelf cards bigger) */
.discovery-shelf.featured .rich-card {
    width: 320px;
}

.discovery-shelf.featured .rich-card .profile-song-cover {
    min-height: 280px;
}

/* --- Sticky Player Area --- */

#sticky-player-area {
    width: 100%;
    margin-bottom: 2px;
    z-index: 1000;
}

.active-sticky-card.expanded {
    display: flex;
    align-items: center;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    gap: 16px;
}

.active-sticky-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg, #222);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.sticky-play-icon {
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.active-sticky-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 150px;
    max-width: 250px;
}

.active-sticky-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.active-sticky-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
    align-items: center;
}

.meta-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.active-sticky-viz {
    flex-grow: 1;
    height: 40px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.active-sticky-viz canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.active-sticky-controls {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .active-sticky-card.expanded {
        padding: 8px 12px;
        gap: 10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .active-sticky-art {
        width: 40px;
        height: 40px;
    }

    .active-sticky-title {
        font-size: 0.9rem;
        max-width: 140px;
    }

    .active-sticky-meta {
        font-size: 0.7rem;
    }

    .active-sticky-meta .meta-tag:nth-child(2) {
        display: none;
    }

    .active-sticky-viz {
        min-width: 60px;
        height: 32px;
    }

    .active-sticky-controls {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★NEW: Google Login Button & Auth Divider — 8BIT EDITION
   ═══════════════════════════════════════════════════════════════════════════ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: rgba(0, 229, 255, 0.3);
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    letter-spacing: 2px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.2), transparent);
}

/* 8bit Googleボタン：ピクセル感 + ネオン */
.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    top: 0;
    text-shadow: none;
}

.google-login-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.08);
}

.google-login-btn:active {
    top: 2px;
    border-bottom-width: 1px;
}

.google-login-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.2));
}

/* ═══════════════════════════════════════════════════════════════════════════
   ★NEW: Pricing Modal
   ═══════════════════════════════════════════════════════════════════════════ */
.pricing-modal-window {
    max-width: 1040px !important;
    width: 95vw !important;
}

.pricing-billing-panel {
    margin: 18px 20px 0;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    background:
        radial-gradient(circle at top right, rgba(0, 229, 255, 0.14), transparent 36%),
        linear-gradient(155deg, rgba(8, 18, 32, 0.96), rgba(11, 25, 42, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 14px 34px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.pricing-billing-copy {
    min-width: 0;
}

.pricing-billing-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(124, 240, 255, 0.86);
}

.pricing-billing-copy h4 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #f3fdff;
}

.pricing-billing-summary {
    margin: 0;
    color: rgba(229, 246, 255, 0.92);
    line-height: 1.7;
}

.pricing-billing-detail {
    margin: 10px 0 0;
    color: rgba(176, 216, 235, 0.86);
    font-size: 0.92rem;
}

.pricing-billing-feedback {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.pricing-billing-feedback.info {
    background: rgba(0, 229, 255, 0.08);
    color: rgba(202, 246, 255, 0.94);
}

.pricing-billing-feedback.success {
    background: rgba(42, 220, 170, 0.12);
    color: rgba(191, 255, 231, 0.96);
}

.pricing-billing-feedback.error {
    background: rgba(255, 110, 141, 0.1);
    color: rgba(255, 205, 217, 0.96);
}

.pricing-billing-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.pricing-billing-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #f8feff;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pricing-billing-status-badge.standard {
    border-color: rgba(0, 229, 255, 0.34);
    background: rgba(0, 229, 255, 0.12);
    color: #aef7ff;
}

.pricing-billing-status-badge.premium {
    border-color: rgba(255, 0, 128, 0.32);
    background: rgba(255, 0, 128, 0.14);
    color: #ffd1eb;
}

.pricing-billing-status-badge.scheduled-cancel {
    border-color: rgba(255, 189, 89, 0.32);
    background: rgba(255, 189, 89, 0.14);
    color: #ffe2a6;
}

.pricing-manage-btn {
    min-width: 220px;
    border: 1px solid rgba(0, 229, 255, 0.34);
    border-bottom-width: 3px;
    border-radius: 16px;
    padding: 13px 16px;
    background: linear-gradient(180deg, rgba(36, 168, 255, 0.98), rgba(0, 104, 199, 0.94));
    color: #effcff;
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow:
        0 14px 28px rgba(0, 86, 165, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.pricing-manage-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
        0 18px 32px rgba(0, 86, 165, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pricing-manage-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.pricing-card {
    background: rgba(10, 25, 40, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
    transform: scale(1.03);
}

.pricing-card.featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.pricing-card-header {
    padding: 24px 20px;
    text-align: center;
    position: relative;
}

.pricing-card-header.free {
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(50, 50, 50, 0.5));
}

.pricing-card-header.standard {
    background: linear-gradient(135deg, rgba(0, 100, 200, 0.3), rgba(0, 229, 255, 0.15));
}

.pricing-card-header.premium {
    background: linear-gradient(135deg, rgba(170, 0, 170, 0.3), rgba(255, 0, 128, 0.15));
}

.pricing-card-header.credit-pack {
    background: linear-gradient(135deg, rgba(0, 180, 120, 0.3), rgba(255, 196, 0, 0.18));
}

.pricing-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 8px;
}

.pricing-popular {
    display: block;
    font-size: 0.65rem;
    color: #ffd700;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.pricing-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.pricing-price small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
}

.pricing-subprice {
    margin-top: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 1px;
}

.pricing-features {
    list-style: none;
    padding: 20px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li.highlight {
    color: var(--accent);
    font-weight: 600;
}

.pricing-features li.disabled {
    color: rgba(255, 255, 255, 0.2);
}

.pricing-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pricing-btn.current {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    cursor: default;
}

.pricing-btn.upgrade {
    background: linear-gradient(45deg, var(--secondary), #aa00ff);
    color: #fff;
    box-shadow: 0 4px 15px rgba(170, 0, 255, 0.3);
}

.pricing-btn.upgrade:hover {
    box-shadow: 0 6px 25px rgba(170, 0, 255, 0.5);
    transform: translateY(-1px);
}

.pricing-btn.buy {
    background: linear-gradient(45deg, #00b47a, #ffc400);
    color: #102030;
    box-shadow: 0 4px 15px rgba(0, 180, 122, 0.28);
}

.pricing-btn.buy:hover {
    box-shadow: 0 6px 25px rgba(255, 196, 0, 0.32);
    transform: translateY(-1px);
}

.checkout-modal-window {
    max-width: 920px !important;
    width: 92vw !important;
}

.checkout-modal-body {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
    gap: 20px;
    padding: 20px;
}

.checkout-hero,
.checkout-summary-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 22, 36, 0.9);
}

.checkout-hero {
    padding: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.checkout-hero.standard {
    background: linear-gradient(145deg, rgba(0, 88, 175, 0.28), rgba(8, 20, 34, 0.92));
}

.checkout-hero.premium {
    background: linear-gradient(145deg, rgba(139, 0, 139, 0.28), rgba(25, 10, 30, 0.92));
}

.checkout-hero.credit-pack {
    background: linear-gradient(145deg, rgba(0, 143, 96, 0.28), rgba(36, 24, 8, 0.92));
}

.checkout-hero-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.checkout-hero-badge,
.checkout-hero-billing {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 1px;
}

.checkout-hero-badge {
    font-family: var(--font-heading);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.checkout-hero-billing {
    color: rgba(255, 255, 255, 0.78);
    background: rgba(0, 0, 0, 0.25);
}

.checkout-item-name {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.35rem;
}

.checkout-item-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    font-size: 0.92rem;
}

.checkout-price-stack {
    margin-top: 26px;
}

.checkout-item-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #fff;
    letter-spacing: 1px;
}

.checkout-item-subprice {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
}

.checkout-plan-status {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--accent);
    font-size: 0.85rem;
}

.checkout-summary-card {
    padding: 24px;
}

.checkout-summary-card h4 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 1rem;
}

.checkout-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checkout-feature-list li {
    padding: 10px 0;
    color: var(--text-dim);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.88rem;
}

.checkout-feature-list li:last-child {
    border-bottom: none;
}

.checkout-feature-list li.highlight {
    color: var(--accent);
    font-weight: 600;
}

.checkout-feature-list li.disabled {
    color: rgba(255, 255, 255, 0.28);
}

.checkout-secure-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-secure-box strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.checkout-secure-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.6;
    font-size: 0.86rem;
}

.checkout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 20px 20px;
}

.checkout-back-btn {
    min-width: 140px;
}

.checkout-primary-btn {
    min-width: 220px;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.checkout-primary-btn.plan {
    background: linear-gradient(45deg, var(--secondary), #aa00ff);
    color: #fff;
    box-shadow: 0 6px 24px rgba(170, 0, 255, 0.28);
}

.checkout-primary-btn.buy {
    background: linear-gradient(45deg, #00b47a, #ffc400);
    color: #102030;
    box-shadow: 0 6px 24px rgba(0, 180, 122, 0.24);
}

.checkout-primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.checkout-primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* レスポンシブ: モバイル対応 */
@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-modal-window {
        width: 95vw !important;
    }

    .checkout-modal-body {
        grid-template-columns: 1fr;
    }

    .checkout-actions {
        flex-direction: column-reverse;
    }

    .checkout-back-btn,
    .checkout-primary-btn {
        width: 100%;
    }
}

.composer-section-header {
    max-width: min(1180px, 100%);
    margin: 0 auto 12px;
    padding: 0 6px 12px;
    border-bottom: 1px solid rgba(0, 255, 204, 0.18);
}

.composer-title-stack {
    display: grid;
    gap: 6px;
}

.composer-kicker,
.composer-panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(0, 255, 204, 0.78);
}

.composer-kicker::before,
.composer-panel-kicker::before {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    opacity: 0.65;
}

.composer-section-header h2 {
    margin: 0;
    font-size: clamp(1.85rem, 3.4vw, 2.9rem);
    line-height: 0.94;
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.2);
}

.composer-section-header p {
    margin: 0;
    max-width: 560px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.45;
    font-size: 0.88rem;
}

.composer-studio-shell {
    max-width: min(1180px, 100%);
    margin: 0 auto 18px;
    display: grid;
    gap: 12px;
}

.song-status-card.composer-status-card {
    margin-bottom: 0;
    padding: 12px 16px;
    gap: 12px;
    justify-content: flex-start;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 204, 0.14) !important;
    background: linear-gradient(135deg, rgba(15, 26, 40, 0.95), rgba(8, 11, 18, 0.92)) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.song-status-card.composer-status-card .status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 126px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.song-status-card.composer-status-card .composer-info-grid {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(72px, 92px) minmax(0, 1.25fr);
    gap: 10px;
}

.song-status-card.composer-status-card .composer-info-cell {
    min-width: 0;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.song-status-card.composer-status-card .composer-info-cell .value {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-status-card.composer-status-card .composer-info-cell--bpm {
    padding-left: 10px;
    padding-right: 10px;
}

.song-status-card.composer-status-card .composer-info-cell--bpm .value {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.action-panel.suno-layout.composer-action-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    padding: clamp(16px, 2.2vw, 22px);
    border: 1px solid rgba(0, 255, 204, 0.14);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(0, 255, 204, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(0, 136, 255, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(8, 12, 22, 0.96), rgba(4, 7, 14, 0.98));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.action-panel.suno-layout.composer-action-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 38%),
        linear-gradient(180deg, transparent, rgba(0, 255, 204, 0.02));
    pointer-events: none;
}

.action-panel.suno-layout.composer-action-panel>* {
    position: relative;
    z-index: 1;
}

.action-panel.suno-layout.composer-action-panel .ai-controls {
    gap: 12px;
    margin-bottom: 0;
}

.action-panel.suno-layout.composer-action-panel .composer-control-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.composer-field {
    grid-column: span 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(18, 26, 38, 0.94), rgba(9, 12, 20, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.16);
}

.composer-field--time {
    grid-column: span 2;
}

.composer-field-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.composer-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.composer-field-meta {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.52);
}

.composer-field .retro-select.compact,
.composer-field .retro-input.compact-num,
.action-panel.suno-layout.composer-action-panel .composer-config-btn {
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 12px;
    box-sizing: border-box;
}

.composer-field .retro-select.compact,
.composer-field .retro-input.compact-num {
    background: rgba(5, 9, 16, 0.94);
    border: 1px solid rgba(0, 255, 204, 0.15);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.composer-field .retro-input.compact-num {
    padding: 0 14px;
    text-align: center;
}

.composer-model-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
}

.action-panel.suno-layout.composer-action-panel .composer-config-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.composer-time-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(0, 255, 204, 0.12);
    background: rgba(5, 9, 16, 0.94);
}

.composer-time-caption {
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.52);
}

.composer-time-toggle {
    margin: 0;
}

.composer-time-manual {
    display: flex;
    align-items: center;
    gap: 8px;
}

.composer-time-manual .compact-num {
    width: 62px;
}

.composer-time-manual .retro-select.compact {
    width: 72px;
}

.composer-time-divider {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.composer-quick-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.composer-toggle-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.composer-toggle-wrap {
    width: 100%;
    margin: 0;
    display: flex;
}

.composer-toggle-wrap .ai-mode-btn {
    width: 100%;
    min-height: 50px;
    height: auto;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.composer-toggle-wrap .ai-mode-btn span {
    width: 100%;
    text-align: center;
}

.composer-toggle-wrap--accent .ai-mode-btn {
    padding: 0 56px 0 40px;
    background: linear-gradient(135deg, rgba(68, 50, 7, 0.92), rgba(132, 93, 0, 0.88));
    border-color: rgba(255, 208, 78, 0.42);
    color: rgba(255, 236, 175, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.24);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.composer-toggle-wrap--accent .ai-mode-btn::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(255, 236, 175, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 236, 175, 0.16);
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.composer-toggle-wrap--accent .ai-mode-btn::after {
    content: 'OFF';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: rgba(255, 236, 175, 0.54);
    transition: color 0.18s ease, text-shadow 0.18s ease;
}

.composer-toggle-wrap--accent .ai-mode-btn span {
    text-shadow: 0 0 10px rgba(255, 214, 102, 0.24);
}

.composer-toggle-wrap--accent .ai-mode-chk-input:not(:checked)+.ai-mode-btn {
    background: linear-gradient(135deg, rgba(40, 30, 8, 0.88), rgba(70, 48, 8, 0.84));
    border-color: rgba(255, 208, 78, 0.26);
    color: rgba(255, 232, 174, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 18px rgba(0, 0, 0, 0.24);
    filter: saturate(0.68) brightness(0.78);
    opacity: 0.76;
}

.composer-toggle-wrap--accent .ai-mode-chk-input:not(:checked)+.ai-mode-btn::before {
    background: rgba(255, 236, 175, 0.18);
    box-shadow: 0 0 0 1px rgba(255, 236, 175, 0.2);
}

.composer-toggle-wrap--accent .ai-mode-chk-input:not(:checked)+.ai-mode-btn::after {
    content: 'OFF';
    color: rgba(255, 236, 175, 0.5);
}

.composer-toggle-wrap--accent .ai-mode-chk-input:checked+.ai-mode-btn {
    background: linear-gradient(135deg, #fff08a, #ffbf2a);
    border-color: #fff08a;
    color: #171000;
    text-shadow: none;
    box-shadow: 0 0 0 1px rgba(255, 248, 196, 0.36), 0 0 28px rgba(255, 208, 78, 0.48), 0 12px 28px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
    filter: saturate(1.08) brightness(1.02);
    opacity: 1;
}

.composer-toggle-wrap--accent .ai-mode-chk-input:checked+.ai-mode-btn::before {
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.36), 0 0 18px rgba(255, 232, 140, 0.88);
}

.composer-toggle-wrap--accent .ai-mode-chk-input:checked+.ai-mode-btn::after {
    content: 'ON';
    color: #352600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.composer-toggle-wrap--accent .ai-mode-chk-input:focus-visible+.ai-mode-btn {
    outline: 2px solid rgba(255, 232, 140, 0.76);
    outline-offset: 2px;
}

.composer-prompt-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: stretch;
    margin-top: 0;
}

.composer-prompt-panel {
    min-width: 0;
    padding: 14px 16px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(17, 27, 40, 0.94), rgba(8, 12, 20, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.composer-prompt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.composer-prompt-head h3 {
    margin: 4px 0 0;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    color: #fff;
}

.composer-prompt-head p {
    margin: 0;
    max-width: 220px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    font-size: 0.8rem;
}

.composer-prompt-panel #ai-prompt-input {
    width: 100%;
    min-height: 148px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 204, 0.16);
    background: rgba(4, 7, 14, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    resize: vertical;
}

.composer-prompt-panel #ai-prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.composer-prompt-actions {
    min-width: 0;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(13, 20, 31, 0.96), rgba(7, 11, 19, 0.96));
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.composer-delivery-compact {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(18, 26, 38, 0.92), rgba(8, 12, 19, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.composer-delivery-compact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.composer-delivery-select {
    width: 100%;
    min-width: 0;
    height: 46px;
    border-radius: 12px;
    box-sizing: border-box;
    background: rgba(5, 9, 16, 0.94);
    border: 1px solid rgba(0, 255, 204, 0.15);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.composer-prompt-actions .suno-create-btn {
    width: 100%;
    min-height: 64px;
    justify-content: center;
    border-radius: 18px;
    letter-spacing: 0.14em;
    font-size: 0.94rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(120deg, #1bf5d8 0%, #20c4ff 52%, #2b8cff 100%);
    color: #03131c;
    box-shadow:
        0 18px 30px rgba(0, 136, 255, 0.28),
        0 0 24px rgba(0, 242, 255, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
    animation: composerGenerateBreath 2.3s ease-in-out infinite;
}

.composer-prompt-actions #btn-generate-main .btn-text {
    position: relative;
    z-index: 2;
    font-weight: 900;
}

.composer-prompt-actions #btn-generate-main::before {
    content: "";
    position: absolute;
    inset: -38%;
    z-index: 0;
    background: linear-gradient(120deg, transparent 16%, rgba(255, 255, 255, 0.85) 50%, transparent 84%);
    transform: translateX(-86%) rotate(7deg);
    animation: composerGenerateSweep 2.4s linear infinite;
    opacity: 0.72;
    pointer-events: none;
}

.composer-prompt-actions #btn-generate-main::after {
    content: "";
    position: absolute;
    inset: -24%;
    z-index: 0;
    background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.06) 44%, transparent 70%);
    animation: composerGenerateSpin 4.2s linear infinite;
    pointer-events: none;
}

.composer-prompt-actions #btn-generate-main:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow:
        0 20px 36px rgba(0, 153, 255, 0.34),
        0 0 32px rgba(0, 255, 214, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.composer-prompt-actions #btn-generate-main:active {
    transform: translateY(1px) scale(0.985);
}

.composer-prompt-actions #btn-generate-main:disabled {
    cursor: wait;
    filter: saturate(1.1);
}

.composer-prompt-actions #btn-generate-main.is-generating {
    animation: composerGenerateBreath 0.9s ease-in-out infinite;
}

.composer-prompt-actions #btn-generate-main.is-generating .btn-text {
    animation: composerGenerateTextPulse 0.6s ease-in-out infinite;
}

@keyframes composerGenerateBreath {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }

    50% {
        transform: translateY(-1px) scale(1.015);
        filter: brightness(1.08);
    }
}

@keyframes composerGenerateSweep {
    0% {
        transform: translateX(-86%) rotate(7deg);
    }

    100% {
        transform: translateX(86%) rotate(7deg);
    }
}

@keyframes composerGenerateSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes composerGenerateTextPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.72;
    }
}

.composer-action-toggles {
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.composer-secondary-toggles {
    min-width: max-content;
}

.composer-advanced-panel {
    margin-top: 0;
}

.action-panel.suno-layout.composer-action-panel #btn-generate-classic-nes {
    align-self: flex-start;
    min-width: 152px;
    border-radius: 999px;
}

@media (max-width: 1120px) {
    .action-panel.suno-layout.composer-action-panel .composer-control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .composer-field {
        grid-column: auto;
    }

    .composer-field--time {
        grid-column: 1 / -1;
    }

    .composer-quick-row {
        grid-template-columns: 1fr;
    }

    .composer-secondary-toggles {
        min-width: 0;
    }

    .composer-action-toggles {
        justify-content: flex-start;
    }

    .composer-prompt-bar {
        grid-template-columns: 1fr;
    }

    .composer-prompt-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .composer-delivery-compact {
        flex: 1 1 0;
    }

    .composer-prompt-actions .suno-create-btn {
        flex: 0 0 260px;
    }

    .composer-action-toggles {
        width: auto;
        justify-content: flex-start;
    }
}

@media (max-width: 820px) {
    .composer-section-header p {
        max-width: none;
    }

    .song-status-card.composer-status-card {
        flex-direction: column;
        align-items: stretch;
    }

    .song-status-card.composer-status-card .status-indicator {
        min-width: 0;
    }

    .action-panel.suno-layout.composer-action-panel .composer-control-grid,
    .composer-toggle-row,
    .composer-quick-row {
        grid-template-columns: 1fr;
    }

    .composer-prompt-head,
    .composer-prompt-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .composer-action-toggles {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .song-status-card.composer-status-card .composer-info-grid {
        grid-template-columns: 1fr;
    }

    .composer-time-control {
        align-items: stretch;
    }

    .composer-time-manual {
        width: 100%;
    }

    .composer-time-manual .compact-num,
    .composer-time-manual .retro-select.compact {
        flex: 1;
        width: auto;
    }
}

/* --- Landing Page (Guest Portal) --- */
body.guest-mode #sidebar,
body.guest-mode #mobile-header {
    display: none !important;
}

body.guest-mode #content-area {
    overflow: hidden;
    grid-column: 1 / -1;
}

body.guest-mode #content-area>.view-section {
    filter: blur(18px) saturate(0.65);
}

body.guest-mode .nav-item[data-target]:not([data-target="view-dashboard"]),
body.guest-mode .drawer-item[data-target]:not([data-target="view-dashboard"]) {
    opacity: 0.35;
}

/* === LP ルート === */
.lp-root {
    position: absolute;
    inset: 0;
    z-index: 18;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background: linear-gradient(175deg, #030816, #06122e 40%, #22072a 80%, #0a0e1a);
}

.lp-root::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 255, 204, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(0, 255, 204, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.9));
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.9));
    opacity: 0.82;
    pointer-events: none;
    z-index: 0;
}

.lp-root > * {
    position: relative;
    z-index: 1;
}

/* === スティッキーナビ === */
.lp-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 28px;
    background: rgba(3, 8, 22, 0.72);
    backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid rgba(0, 255, 204, 0.12);
}

.lp-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
}

.lp-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-nav-icon {
    font-size: 1.6rem;
}

.lp-nav-logo {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: #91fff0;
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.3);
}

.lp-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lp-nav-lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.lp-nav-lang-btn:hover {
    border-color: rgba(0, 255, 204, 0.4);
    color: #fff;
}

.lp-nav-login-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 204, 0.3);
    color: #91fff0;
    padding: 8px 20px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s;
}

.lp-nav-login-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: rgba(0, 255, 204, 0.5);
}

.lp-nav-register-btn {
    background: linear-gradient(135deg, #00ffc8, #00d4a8);
    border: none;
    color: #04111f;
    padding: 8px 22px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 18px rgba(0, 255, 204, 0.25);
}

.lp-nav-register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 255, 204, 0.35);
}

/* === ヒーローセクション === */
.lp-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 28px 60px;
    overflow: hidden;
}

.lp-hero-particles {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 255, 204, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 60%, rgba(255, 0, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(41, 121, 255, 0.06) 0%, transparent 35%);
    animation: lp-drift 12s ease-in-out infinite alternate;
}

@keyframes lp-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-20px, 15px) scale(1.05);
    }
}

.lp-hero-grid-overlay {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 255, 204, 0.02) 3px, rgba(0, 255, 204, 0.02) 4px);
    pointer-events: none;
}

.lp-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.lp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.2);
    margin-bottom: 28px;
    font-family: var(--font-heading);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: #91fff0;
}

.lp-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ffc8;
    box-shadow: 0 0 8px #00ffc8;
    animation: lp-pulse 2s ease-in-out infinite;
}

@keyframes lp-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.lp-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 24px;
    text-shadow: 0 0 40px rgba(0, 255, 204, 0.15);
}

.lp-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(230, 247, 255, 0.78);
    margin: 0 0 36px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.lp-hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.lp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    border: none;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #04111f;
    background: linear-gradient(135deg, #00ffc8, #ffe45f);
    box-shadow: 0 8px 30px rgba(0, 255, 204, 0.3);
    cursor: pointer;
    transition: all 0.25s;
}

.lp-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 204, 0.4);
}

.lp-btn-icon {
    font-size: 0.9rem;
}

.lp-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 36px;
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #ecf8ff;
    background: rgba(0, 255, 204, 0.06);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.lp-btn-secondary:hover {
    transform: translateY(-3px);
    background: rgba(0, 255, 204, 0.12);
    border-color: rgba(0, 255, 204, 0.5);
}

.lp-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.lp-stat {
    text-align: center;
}

.lp-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #00ffc8;
    text-shadow: 0 0 16px rgba(0, 255, 204, 0.4);
}

.lp-stat-label {
    display: block;
    font-size: 0.78rem;
    color: rgba(230, 247, 255, 0.6);
    margin-top: 4px;
}

.lp-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(0, 255, 204, 0.15);
}

/* イコライザー装飾 */
.lp-hero-eq {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 80px;
    padding: 0 10%;
    opacity: 0.3;
    filter: drop-shadow(0 0 12px rgba(0, 255, 204, 0.12));
}

.lp-hero-eq span {
    flex: 1;
    max-width: 24px;
    background: linear-gradient(180deg, #00ffc8 0%, #0066ff 50%, #330066 100%);
    border-radius: 999px 999px 6px 6px;
    height: 24px;
    box-shadow: 0 0 14px rgba(0, 255, 204, 0.28);
    animation: lp-eq 1.5s steps(3, end) infinite;
    transform: scaleY(0.35);
    transform-origin: bottom center;
    opacity: 0.55;
}

.lp-hero-eq span:nth-child(2n) {
    animation-duration: 0.9s;
}

.lp-hero-eq span:nth-child(3n) {
    animation-duration: 1.5s;
}

.lp-hero-eq span:nth-child(4n+1) {
    animation-duration: 1.1s;
}

.lp-hero-eq span:nth-child(5n) {
    animation-duration: 0.7s;
}

@keyframes lp-eq {
    0%,
    100% {
        transform: scaleY(0.35);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.lp-hero-eq span:nth-child(2) {
    animation-delay: 0.12s;
}

.lp-hero-eq span:nth-child(3) {
    animation-delay: 0.24s;
}

.lp-hero-eq span:nth-child(4) {
    animation-delay: 0.36s;
}

.lp-hero-eq span:nth-child(5) {
    animation-delay: 0.48s;
}

.lp-hero-eq span:nth-child(6) {
    animation-delay: 0.6s;
}

.lp-hero-eq span:nth-child(7) {
    animation-delay: 0.72s;
}

.lp-hero-eq span:nth-child(8) {
    animation-delay: 0.84s;
}

.lp-hero-eq span:nth-child(9) {
    animation-delay: 0.96s;
}

.lp-hero-eq span:nth-child(10) {
    animation-delay: 1.08s;
}

.lp-hero-eq span:nth-child(11) {
    animation-delay: 1.2s;
}

.lp-hero-eq span:nth-child(12) {
    animation-delay: 1.32s;
}

.lp-hero-eq span:nth-child(13) {
    animation-delay: 1.44s;
}

.lp-hero-eq span:nth-child(14) {
    animation-delay: 1.56s;
}

.lp-hero-eq span:nth-child(15) {
    animation-delay: 1.68s;
}

.lp-hero-eq span:nth-child(16) {
    animation-delay: 1.8s;
}

@keyframes lp-eq {

    0%,
    100% {
        transform: scaleY(0.35);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* === 共通セクションスタイル === */
.lp-features,
.lp-workflow,
.lp-brief,
.lp-plans {
    position: relative;
    z-index: 1;
    padding: 80px 28px;
    max-width: 1200px;
    margin: 0 auto;
}

.lp-section-header {
    text-align: center;
    margin-bottom: 52px;
}

.lp-kicker {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    color: #00ffc8;
    padding: 6px 16px;
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 999px;
    background: rgba(0, 255, 204, 0.06);
    margin-bottom: 18px;
}

.lp-section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    line-height: 1.5;
    color: #ffffff;
    margin: 0;
}

/* === 機能カード === */
.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.lp-feature-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 204, 0.12);
    background: linear-gradient(180deg, rgba(7, 16, 40, 0.88), rgba(4, 9, 24, 0.92));
    backdrop-filter: blur(12px);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.lp-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffc8, #ff00ff);
    opacity: 0;
    transition: opacity 0.3s;
}

.lp-feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 204, 0.28);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 255, 204, 0.06);
}

.lp-feature-card:hover::before {
    opacity: 1;
}

.lp-feature-icon {
    font-size: 2.4rem;
    margin-bottom: 16px;
}

.lp-feature-index {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    color: rgba(0, 255, 204, 0.5);
    margin-bottom: 10px;
}

.lp-feature-card h3 {
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0 0 12px;
}

.lp-feature-card p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(230, 247, 255, 0.72);
    margin: 0;
}

/* === ワークフロー === */
.lp-workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.lp-brief-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.lp-brief-card {
    position: relative;
    padding: 30px 24px 26px;
    border-radius: 24px;
    border: 1px solid rgba(255, 228, 95, 0.14);
    background: linear-gradient(180deg, rgba(19, 20, 47, 0.92), rgba(8, 11, 28, 0.96));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.lp-brief-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 228, 95, 0.9), rgba(0, 255, 200, 0.72));
    opacity: 0.8;
}

.lp-brief-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 28px;
    padding: 0 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    color: #ffe45f;
    border: 1px solid rgba(255, 228, 95, 0.22);
    background: rgba(255, 228, 95, 0.08);
}

.lp-brief-card h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.04rem;
    line-height: 1.55;
}

.lp-brief-card p {
    margin: 0;
    color: rgba(230, 247, 255, 0.74);
    line-height: 1.76;
    font-size: 0.92rem;
}

.lp-workflow-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 24px;
    border: 1px solid rgba(96, 179, 255, 0.15);
    background: linear-gradient(180deg, rgba(6, 16, 38, 0.9), rgba(5, 10, 24, 0.94));
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.lp-workflow-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 255, 204, 0.25);
}

.lp-workflow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 204, 0.3);
    background: rgba(0, 255, 204, 0.06);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: #00ffc8;
    margin-bottom: 16px;
}

.lp-workflow-bar {
    width: 40px;
    height: 3px;
    margin: 0 auto 18px;
    background: linear-gradient(90deg, #00ffc8, transparent);
    border-radius: 999px;
}

.lp-workflow-card h3 {
    font-size: 1.05rem;
    color: #ffffff;
    margin: 0 0 10px;
}

.lp-workflow-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(230, 247, 255, 0.72);
    margin: 0;
}

/* === プランカード === */
.lp-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    align-items: start;
}

.lp-plan-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 24px;
    border: 1px solid rgba(96, 179, 255, 0.15);
    background: linear-gradient(180deg, rgba(7, 16, 40, 0.9), rgba(4, 9, 24, 0.94));
    text-align: center;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.lp-plan-card:hover {
    transform: translateY(-4px);
}

.lp-plan-card.featured {
    border-color: rgba(0, 255, 204, 0.3);
    box-shadow: 0 0 40px rgba(0, 255, 204, 0.08);
    transform: scale(1.04);
}

.lp-plan-card.featured:hover {
    transform: scale(1.04) translateY(-4px);
}

.lp-plan-card.credit-pack {
    border-color: rgba(255, 228, 95, 0.18);
    background: linear-gradient(180deg, rgba(35, 31, 11, 0.88), rgba(10, 11, 24, 0.95));
}

.lp-plan-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #00ffc8, #ffe45f);
    color: #04111f;
    font-family: var(--font-heading);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.lp-plan-badge {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.lp-plan-badge.free {
    color: #9ef6ff;
}

.lp-plan-badge.standard {
    color: #00ffc8;
}

.lp-plan-badge.premium {
    color: #ff80ff;
}

.lp-plan-badge.credit-pack {
    color: #ffe45f;
}

.lp-plan-price {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 24px;
}

.lp-plan-subcopy {
    margin: -12px 0 20px;
    color: rgba(230, 247, 255, 0.64);
    font-size: 0.82rem;
    line-height: 1.6;
}

.lp-plan-price span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
}

.lp-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.lp-plan-features li {
    font-size: 0.88rem;
    color: rgba(230, 247, 255, 0.82);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lp-plan-disabled {
    opacity: 0.4;
}

.lp-plan-highlight {
    color: #00ffc8 !important;
}

.lp-plan-btn {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 999px;
    background: rgba(0, 255, 204, 0.06);
    color: #91fff0;
    font-family: var(--font-heading);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s;
}

.lp-plan-btn:hover {
    background: rgba(0, 255, 204, 0.14);
    border-color: rgba(0, 255, 204, 0.45);
}

.lp-plan-btn.primary {
    background: linear-gradient(135deg, #00ffc8, #00d4a8);
    color: #04111f;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 18px rgba(0, 255, 204, 0.2);
}

.lp-plan-btn.primary:hover {
    box-shadow: 0 6px 24px rgba(0, 255, 204, 0.35);
}

/* === フッター === */
.lp-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(0, 255, 204, 0.1);
    background: rgba(3, 6, 16, 0.6);
    padding: 40px 28px;
}

.lp-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.lp-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    color: #91fff0;
    margin-bottom: 14px;
}

.lp-footer-copy {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(230, 247, 255, 0.6);
    margin: 0 0 20px;
}

.lp-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.lp-footer-link {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(96, 179, 255, 0.18);
    background: rgba(9, 25, 54, 0.6);
    color: #d8f8ff;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lp-footer-link:hover {
    border-color: rgba(0, 255, 204, 0.3);
    background: rgba(0, 255, 204, 0.08);
    transform: translateY(-1px);
}

/* === スクロールアニメーション === */
.lp-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lp-reveal.lp-visible {
    opacity: 1;
    transform: translateY(0);
}

.lp-features-grid .lp-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.lp-features-grid .lp-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.lp-workflow-grid .lp-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.lp-workflow-grid .lp-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.lp-plans-grid .lp-reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.lp-plans-grid .lp-reveal:nth-child(3) {
    transition-delay: 0.2s;
}

/* === Legal モーダル (維持) === */
.legal-modal-window {
    width: min(92vw, 920px);
    max-width: 920px;
    border: 1px solid rgba(0, 255, 204, 0.28);
    background: linear-gradient(180deg, rgba(5, 13, 34, 0.98), rgba(3, 7, 19, 0.96));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.legal-modal-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 72vh;
    overflow-y: auto;
}

.legal-modal-notice {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(255, 228, 95, 0.26);
    background: rgba(255, 228, 95, 0.08);
    color: #f7f1c6;
}

.legal-modal-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.legal-doc-lead,
.legal-doc-section p,
.legal-doc-list li,
.legal-fact-grid dd {
    color: rgba(230, 247, 255, 0.86);
    line-height: 1.75;
}

.legal-doc-lead {
    margin: 0;
}

.legal-fact-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    border: 1px solid rgba(96, 179, 255, 0.18);
    background: rgba(5, 16, 38, 0.8);
}

.legal-fact-grid dt,
.legal-fact-grid dd {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(96, 179, 255, 0.12);
}

.legal-fact-grid dt {
    font-weight: 700;
    color: #99fff0;
    background: rgba(0, 255, 204, 0.05);
}

.legal-doc-section {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(96, 179, 255, 0.16);
    background: rgba(6, 15, 36, 0.72);
}

.legal-doc-section h4 {
    font-family: var(--font-heading);
    font-size: 0.78rem;
}

.legal-doc-list {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 8px;
}

/* === レスポンシブ === */
@media (max-width: 1100px) {

    .lp-features-grid,
    .lp-workflow-grid,
    .lp-brief-grid,
    .lp-plans-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }

    .lp-plan-card.featured {
        transform: none;
    }

    .lp-plan-card.featured:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 768px) {
    .lp-nav {
        padding: 0 16px;
    }

    .lp-nav-inner {
        height: 56px;
    }

    .lp-nav-login-btn {
        display: none;
    }

    .lp-hero {
        padding: 100px 16px 40px;
        min-height: auto;
    }

    .lp-hero-title {
        font-size: clamp(1.4rem, 5vw, 2.2rem);
    }

    .lp-hero-subtitle {
        font-size: 0.92rem;
    }

    .lp-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .lp-btn-primary,
    .lp-btn-secondary {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .lp-features,
    .lp-workflow,
    .lp-brief,
    .lp-plans {
        padding: 48px 16px;
    }

    .lp-footer {
        padding: 28px 16px;
    }

    .lp-footer-links {
        flex-direction: column;
        align-items: center;
    }

    .legal-fact-grid {
        grid-template-columns: 1fr;
    }

    .legal-fact-grid dt,
    .legal-fact-grid dd {
        border-bottom: none;
    }

    .legal-fact-grid dd {
        padding-top: 0;
        margin-bottom: 12px;
    }
}

/* =========================================
   LOCAL PROJECT / MY SONGS BRIDGE
   ========================================= */
.playlist-inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.song-card.local-project-card {
    border-color: rgba(255, 214, 102, 0.24);
    background: linear-gradient(135deg, rgba(255, 214, 102, 0.08), rgba(0, 255, 204, 0.04));
}

.song-card.local-project-card:hover {
    border-color: rgba(255, 214, 102, 0.48);
    box-shadow: 0 8px 20px rgba(255, 214, 102, 0.08);
}

.song-card.local-project-card .card-thumb {
    color: #ffd966;
}

.public-toggle-wrapper.local-project {
    flex-wrap: wrap;
    align-items: center;
}

.public-status-text.local-project-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 214, 102, 0.24);
    background: rgba(255, 214, 102, 0.12);
    color: #ffe7a3;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.public-status-text.local-project-badge.saved {
    border-color: rgba(0, 255, 204, 0.22);
    background: rgba(0, 255, 204, 0.12);
    color: #b8fff0;
}

.public-status-text.local-project-badge.draft {
    border-color: rgba(255, 106, 106, 0.22);
    background: rgba(255, 106, 106, 0.12);
    color: #ffd0d0;
}

.rp-btn-icon.is-hidden {
    display: none !important;
}

@media (max-width: 720px) {
    .playlist-inline-actions {
        width: 100%;
    }

    .playlist-inline-actions .playlist-action-btn {
        flex: 1 1 180px;
    }
}


/* Read-only editor mode */
.editor-readonly-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 196, 0, 0.45);
    border-radius: 12px;
    background: rgba(255, 196, 0, 0.10);
    color: #ffd86b;
    font-size: 13px;
    line-height: 1.5;
}

body.editor-readonly-mode #editor-save-all-btn,
body.editor-readonly-mode #btn-mixer-save-song,
.console-view-readonly #cv-add-track-btn,
.console-view-readonly #cv-add-clip-btn,
.console-view-readonly #cv-add-chord-btn,
.score-editor-readonly #se-clear-btn {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: auto;
}

.console-view-readonly .console-context-menu-item.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


#visual-editor {
    position: relative;
}

.editor-readonly-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 10, 18, 0.78);
    backdrop-filter: blur(3px);
    pointer-events: auto;
}

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

.editor-readonly-overlay-card {
    width: min(520px, calc(100% - 32px));
    padding: 24px 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 196, 0, 0.38);
    background: rgba(18, 24, 36, 0.94);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.editor-readonly-overlay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 196, 0, 0.16);
    color: #ffd86b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.editor-readonly-overlay-title {
    margin-bottom: 10px;
    color: #f5f7fb;
    font-size: 24px;
    font-weight: 700;
}

.editor-readonly-overlay-text {
    color: rgba(245, 247, 251, 0.86);
    font-size: 14px;
    line-height: 1.7;
}


/* Read-only preview v2: hide all editor content and handles under the overlay */
body.editor-readonly-mode #visual-editor {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.08), transparent 42%),
        radial-gradient(circle at 80% 25%, rgba(41, 121, 255, 0.10), transparent 40%),
        linear-gradient(180deg, rgba(4, 10, 18, 0.96), rgba(2, 6, 12, 0.98));
}

body.editor-readonly-mode #visual-editor> :not(#editor-readonly-overlay) {
    visibility: hidden !important;
}

body.editor-readonly-mode #visual-editor .editor-resize-handle,
body.editor-readonly-mode #visual-editor .editor-split-handle,
body.editor-readonly-mode #visual-editor #editor-bottom-resize-handle,
body.editor-readonly-mode #visual-editor .splitter-horizontal,
body.editor-readonly-mode #visual-editor #se-resize-handle,
body.editor-readonly-mode #visual-editor #pe-resize-handle,
body.editor-readonly-mode #visual-editor #se-split-handle {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.editor-readonly-overlay {
    z-index: 9999;
    background: rgba(3, 8, 15, 0.88);
    backdrop-filter: blur(6px);
}

.editor-readonly-overlay-card {
    width: min(560px, calc(100% - 32px));
}

/* 2026-03-25: card visualizer stabilization */
.song-card > .card-visualizer {
    display: none !important;
    flex: 1 1 180px;
    min-width: 120px;
    height: 40px;
    margin: 8px 12px 0 0;
    align-self: center;
    position: relative;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(7, 20, 28, 0.48), rgba(9, 34, 42, 0.22), rgba(7, 20, 28, 0.48));
    box-shadow: inset 0 0 0 1px rgba(0, 255, 204, 0.08);
    pointer-events: none;
}

.song-card.is-playing > .card-visualizer {
    display: block !important;
}

.song-card > .card-visualizer > .card-visualizer-canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 1;
}

.song-card > .card-visualizer > .viz-bar {
    display: none !important;
}

#sticky-player-area .song-card > .card-visualizer {
    min-width: 180px;
    height: 48px;
}

/* 2026-03-25: restore desktop full-width card visualizer */
@media (min-width: 481px) {
    #playlist-container .song-card,
    #sticky-player-area .song-card {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 14px 16px;
    }

    #playlist-container .song-card > .card-info,
    #sticky-player-area .song-card > .card-info {
        flex: 1 1 320px;
        min-width: 220px;
        width: auto;
        margin-right: 0;
    }

    #playlist-container .song-card > .public-toggle-wrapper,
    #sticky-player-area .song-card > .public-toggle-wrapper {
        flex: 0 0 auto;
        margin-top: 0;
        align-self: center;
    }

    #playlist-container .song-card > .card-actions,
    #sticky-player-area .song-card > .card-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    #playlist-container .song-card > .card-visualizer,
    #sticky-player-area .song-card > .card-visualizer {
        order: 20;
        flex: 1 0 100%;
        width: 100%;
        min-width: 0;
        height: 58px;
        margin: 2px 0 0 0;
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(8, 18, 29, 0.78), rgba(10, 24, 36, 0.34)),
            linear-gradient(90deg, rgba(0, 255, 204, 0.06), rgba(0, 179, 255, 0.10), rgba(0, 255, 204, 0.06));
        box-shadow:
            inset 0 0 0 1px rgba(0, 255, 204, 0.10),
            inset 0 10px 22px rgba(255, 255, 255, 0.02);
    }

    #sticky-player-area .song-card > .card-visualizer {
        height: 64px;
    }
}
