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

:root {
    --bg-main: #0f172a;
    --accent-primary: #10b981;
    --accent-secondary: #3b82f6;
    --surface: #1e293b;
    --surface-soft: #172338;
    --border: rgba(248, 250, 252, 0.16);
    --border: color-mix(in srgb, var(--text-main) 16%, transparent);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode {
    --bg-main: #f1f5f9;
    --surface: #ffffff;
    --surface-soft: #e2e8f0;
    --border: rgba(15, 23, 42, 0.1);
    --text-main: #0f172a;
    --text-muted: #475569;
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }

[v-cloak] { display: none; }

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

a { color: inherit; }

.wrap {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.public-page .wrap { width: auto; }

.songbook-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

.songbook-hero {
    grid-column: 1 / -1;
    padding: 38px 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.songbook-hero h1 {
    margin: 0;
    color: var(--accent-primary);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: .95;
}

.songbook-hero p {
    margin: 10px 0 0;
    color: var(--text-muted);
}

.hero-side {
    display: flex;
    gap: 14px;
    align-items: center;
}

.hero-side a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, .04);
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
}

.hero-side a:hover {
    border-color: var(--accent-primary);
    color: var(--text-main);
}

.songbook-hero img,
.hero-side img {
    width: 96px;
    height: auto;
}

.mobile-brand {
    display: none;
}

.mobile-admin-link {
    display: none;
}

.songbook-toolbar {
    grid-column: 1 / -1;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    padding: 14px 0;
    background: color-mix(in srgb, var(--bg-main) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.controls-panel {
    display: flex;
    gap: 12px;
}

.dashboard-input,
.dashboard-select {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--surface);
    color: var(--text-main);
    font: 700 1rem Inter, sans-serif;
}

.dashboard-input:focus,
.dashboard-select:focus {
    border-color: var(--accent-primary);
}

.dashboard-select { min-width: 220px; }

select,
.dashboard-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 23px) 50%,
        calc(100% - 15px) 50%;
    background-size: 8px 8px, 8px 8px;
    background-repeat: no-repeat;
}

select::-ms-expand {
    display: none;
}

.btn-primary,
.btn-secondary,
.btn-icon,
.song-actions button,
.song-actions a,
.nav a,
.nav button,
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-main);
    font: 800 .94rem Inter, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.admin-page .btn,
.admin-page .nav a,
.admin-page .nav button,
.admin-page button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--text-main) 22%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 90%, #ffffff 4%);
    box-shadow: none;
    font-size: .9rem;
}

.admin-page .btn:hover,
.admin-page .nav a:hover,
.admin-page .nav button:hover,
.admin-page button:hover {
    border-color: var(--accent-primary);
    background: color-mix(in srgb, var(--surface) 84%, var(--accent-primary));
}

.admin-page .btn:focus-visible,
.admin-page .nav a:focus-visible,
.admin-page .nav button:focus-visible,
.admin-page button:focus-visible,
.admin-page input:focus-visible,
.admin-page select:focus-visible,
.admin-page textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent-primary) 38%, transparent);
    outline-offset: 2px;
}

.btn-primary {
    height: 54px;
    padding: 0 28px;
    border: none;
    background: var(--accent-primary);
    color: #fff;
    text-transform: uppercase;
}

.btn-primary.blue { background: var(--accent-secondary); }

.btn-secondary {
    padding: 0 16px;
    background: rgba(255, 255, 255, .06);
}

.btn-icon {
    width: 54px;
    height: 54px;
    padding: 0;
    font-size: 1.25rem;
}

.btn-icon:hover,
.btn-primary:hover,
.song-actions button:hover,
.song-actions a:hover {
    transform: translateY(-1px);
    border-color: var(--accent-primary);
}

.mobile-menu-btn { display: none; }

.suggestions-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: min(360px, calc(100vh - 220px));
    overflow: auto;
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .48);
}

.suggestion-item {
    width: 100%;
    padding: 15px 18px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    text-align: left;
    font: 800 .95rem Inter, sans-serif;
    cursor: pointer;
}

.suggestion-item:hover {
    background: rgba(16, 185, 129, .12);
}

.songbook-layout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

.song-sidebar {
    height: calc(100vh - 150px);
    position: sticky;
    top: 104px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-weight: 900;
    text-transform: uppercase;
}

.song-sidebar nav {
    flex: 1;
    overflow: auto;
    padding: 10px;
}

.song-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: .9rem;
    text-decoration: none;
}

.song-sidebar a:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--text-main);
}

.song-results {
    display: grid;
    gap: 20px;
}

.result-summary,
.load-more-btn {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 84%, var(--accent-secondary));
    color: var(--text-muted);
    font-weight: 800;
}

.load-more-btn {
    color: var(--text-main);
    cursor: pointer;
}

.load-sentinel {
    height: 1px;
}

.public-song-card {
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.public-song-card.highlighted-song {
    border-color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 12%, var(--surface));
    transform: translateY(-2px);
}

.song-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.song-badges span,
.badge {
    display: inline-flex;
    padding: 5px 11px;
    border-radius: 8px;
    background: rgba(16, 185, 129, .12);
    color: var(--accent-primary);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.song-badges span + span {
    background: rgba(59, 130, 246, .12);
    color: var(--accent-secondary);
}

.public-song-card h2 {
    margin: 0 0 16px;
    color: var(--accent-primary);
    font-size: clamp(1.28rem, 2.2vw, 1.62rem);
    line-height: 1.12;
    cursor: pointer;
}

.public-song-card pre {
    margin: 0 0 22px;
    white-space: pre-wrap;
    color: var(--text-main);
    font: 1.08rem/1.62 Lora, Georgia, serif;
}

.song-comment {
    margin: -6px 0 20px;
    color: var(--text-muted);
    font-style: italic;
}

.song-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.song-actions button,
.song-actions a {
    min-height: 42px;
    padding: 0 14px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 54px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: var(--text-muted);
    text-align: center;
    font-weight: 800;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .76);
}

.modal.open { display: flex; }

.modal-content {
    position: relative;
    width: min(880px, 100%);
    max-height: 84vh;
    overflow: auto;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.jam-modal {
    width: min(640px, 100%);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

.print-controls {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 10px;
    margin: 18px 0 12px;
}

.print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.print-song-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
    max-height: 42vh;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.print-option {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    cursor: pointer;
    font-size: .9rem;
    font-weight: 800;
}

.print-option input {
    width: auto;
    min-height: 0;
}

.print-option small {
    display: block;
    color: var(--text-muted);
    font-weight: 600;
}

.selected-count {
    align-self: center;
    color: var(--accent-primary);
    font-weight: 900;
}

.quick-top-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1200;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
    font: 900 1.4rem/1 Inter, sans-serif;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .2s ease, transform .2s ease;
}

.quick-top-button.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 11000;
    display: none;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--accent-secondary);
    color: #fff;
    font-weight: 900;
}

.toast.visible { display: block; }

.print-area { display: none; }

.ai-result {
    max-height: 40vh;
    overflow: auto;
    margin: 16px 0 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
    white-space: pre-wrap;
    color: var(--text-main);
    font: .98rem/1.55 Lora, Georgia, serif;
}

.admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-main) 92%, transparent);
    backdrop-filter: blur(14px);
}

.admin-top-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.brand {
    color: var(--accent-primary);
    font-weight: 900;
    text-decoration: none;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.nav form { margin: 0; }

.admin-main {
    padding: 24px 0 56px;
}

.admin-hero {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--accent-primary) 20%, transparent), transparent 34%),
        var(--surface);
    box-shadow: var(--card-shadow);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-secondary);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.admin-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stats-grid article {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 88%, var(--accent-primary));
    box-shadow: 0 10px 26px rgba(0, 0, 0, .14);
}

.stats-grid span {
    display: block;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 800;
}

.stats-grid strong {
    display: block;
    margin-top: 4px;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.metric-row:last-child {
    border-bottom: 0;
}

.metric-row span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-row strong {
    color: var(--accent-primary);
}

.elevated-panel {
    border-radius: 18px;
    padding: 24px;
}

.admin-list-head {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-search {
    max-width: 340px;
    background: var(--surface-soft);
}

.admin-song-list {
    display: grid;
    gap: 10px;
}

.admin-song-row {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 76%, transparent);
}

.admin-song-row[hidden] {
    display: none !important;
}

.category-row {
    grid-template-columns: 58px 1fr auto;
}

.song-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(16, 185, 129, .12);
    color: var(--accent-primary);
    font-weight: 900;
}

.song-row-main strong,
.identity-preview strong {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
}

.song-row-main span,
.identity-preview span,
.field-help {
    display: block;
    color: var(--text-muted);
    font-size: .88rem;
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

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

.table-actions form {
    margin: 0;
}

.row-actions form {
    margin: 0;
}

.row-actions .btn {
    min-width: 84px;
    min-height: 34px;
    padding: 0 12px;
}

.admin-page button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.identity-preview {
    min-width: 220px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .05);
    text-align: center;
}

.identity-preview img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.login-panel {
    max-width: 460px;
    margin: 8vh auto 0;
}

.inline-edit {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.settings-subsection {
    display: grid;
    gap: 16px;
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.toggle-row {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.toggle-row input {
    width: auto;
    min-height: 0;
}

input[type="color"] {
    min-height: 52px;
    padding: 6px;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}

.color-presets button {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.color-presets span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--c);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 24%, transparent);
}

.panel,
.song-card {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
}

h1,
h2,
h3 {
    margin: 0 0 12px;
    line-height: 1.12;
}

h1 {
    color: var(--accent-primary);
    font-size: clamp(1.6rem, 4vw, 2.45rem);
}

.muted { color: var(--text-muted); }

.flash {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(16, 185, 129, .28);
    border-radius: 12px;
    background: rgba(16, 185, 129, .13);
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--text-main);
    font: inherit;
}

textarea {
    min-height: 240px;
    resize: vertical;
    font-family: Lora, Georgia, serif;
}

label {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 800;
}

.grid { display: grid; gap: 16px; }
.two { grid-template-columns: 1fr 1fr; }
.three { grid-template-columns: repeat(3, 1fr); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.secondary-actions {
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.danger {
    background: color-mix(in srgb, var(--danger) 18%, var(--surface));
    border-color: color-mix(in srgb, var(--danger) 46%, transparent);
    color: #fecaca;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-size: .9rem;
}

@media print {
    @page { size: A4; margin: 8mm; }

    body {
        background: #fff !important;
        color: #000 !important;
        font-family: Georgia, "Times New Roman", serif !important;
        line-height: 1.18 !important;
    }

    body.printing .songbook-shell {
        display: block !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    body.printing .songbook-shell > :not(.print-area) { display: none !important; }
    body.printing .print-area { display: block !important; }

    .print-document-title {
        margin: 0 0 2mm;
        color: #000 !important;
        text-align: center;
        font-size: 16pt;
    }

    .print-document-note {
        margin: 0 0 4mm;
        color: #444 !important;
        text-align: center;
        font-size: 7pt;
    }

    .print-songs-grid {
        column-count: 2;
        column-gap: 8mm;
    }

    .print-song {
        break-inside: avoid;
        page-break-inside: avoid;
        display: inline-block;
        width: 100%;
        margin: 0 0 3.5mm;
        padding: 0 0 2mm;
        border-bottom: .15mm solid #d8d8d8;
    }

    .print-song h2 {
        margin: 0 0 1mm;
        color: #000 !important;
        font-size: 10pt;
    }

    .print-song-category {
        margin: 0 0 1.3mm;
        color: #555 !important;
        font-size: 6.5pt;
    }

    .print-song-text {
        margin: 0;
        white-space: pre-wrap;
        color: #000 !important;
        font: 7.3pt/1.18 Georgia, "Times New Roman", serif !important;
    }

    .print-song-comment {
        margin-top: 1.5mm;
        color: #444 !important;
        font-size: 6.5pt;
        font-style: italic;
    }

    .print-title-card {
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 4mm 0;
        border-bottom: .35mm solid #000;
        text-align: center;
    }

    .print-title-card:first-child { border-top: .35mm solid #000; }

    .print-title-card h2 {
        margin: 0;
        color: #000 !important;
        font-size: 28pt;
        line-height: 1.08;
        text-transform: uppercase;
        letter-spacing: .03em;
    }

    .print-title-card span {
        margin-right: 3mm;
        font-size: .72em;
        font-weight: 400;
    }
}

@media (max-width: 780px) {
    .songbook-shell {
        display: block;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 0 10px 32px;
    }

    .songbook-hero,
    .song-sidebar {
        display: none;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: space-between;
        padding: 10px 2px 8px;
        border-bottom: 1px solid var(--border);
    }

    .mobile-brand img {
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

    .mobile-brand strong {
        display: block;
        color: var(--accent-primary);
        font-size: 1.06rem;
        line-height: 1.1;
        font-weight: 900;
    }

    .mobile-brand span {
        display: block;
        color: var(--text-muted);
        font-size: .78rem;
        font-weight: 700;
    }

    .mobile-brand > div {
        min-width: 0;
        flex: 1;
    }

    .mobile-admin-link {
        min-height: 34px;
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(255, 255, 255, .05);
        color: var(--text-main);
        font-size: .78rem;
        font-weight: 900;
        text-decoration: none;
    }

    .songbook-toolbar {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }

    .controls-panel {
        display: grid;
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr) repeat(3, 46px);
        gap: 8px;
        min-width: 0;
    }

    .dashboard-input,
    .dashboard-select,
    .btn-primary,
    .btn-icon {
        height: 46px;
        min-height: 46px;
        border-radius: 12px;
    }

    .dashboard-input {
        padding: 0 14px;
        font-size: 1rem;
    }

    .dashboard-select {
        min-width: 0;
        grid-column: 1 / -1;
    }

    .btn-primary {
        grid-column: 1;
        padding: 0 10px;
        font-size: .78rem;
        min-width: 0;
    }

    .btn-icon {
        width: 46px;
        min-width: 46px;
        font-size: 1.08rem;
    }

    .mobile-menu-btn { display: none; }

    .songbook-toolbar.is-compact {
        grid-template-columns: 1fr 46px;
    }

    .songbook-toolbar.is-compact .search-box {
        grid-column: 1;
    }

    .songbook-toolbar.is-compact .mobile-menu-btn {
        display: inline-flex;
        grid-column: 2;
    }

    .songbook-toolbar.is-compact .controls-panel {
        display: none;
    }

    .songbook-toolbar.is-compact.controls-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1190;
        background: rgba(0, 0, 0, .28);
    }

    .songbook-toolbar.is-compact.controls-open .controls-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: var(--surface);
        box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
    }

    .songbook-toolbar.is-compact.controls-open .controls-panel::before {
        content: "Ovládání";
        grid-column: 1 / -1;
        color: var(--text-muted);
        font-size: .82rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .songbook-toolbar.is-compact.controls-open .dashboard-select,
    .songbook-toolbar.is-compact.controls-open .btn-primary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .songbook-toolbar.is-compact.controls-open .btn-icon {
        width: 100%;
    }

    .songbook-layout {
        display: block;
    }

    .song-results {
        gap: 12px;
        padding-top: 10px;
    }

    .public-song-card {
        width: 100%;
        max-width: 100%;
        padding: 16px 14px;
        border-radius: 16px;
    }

    .public-song-card h2 {
        font-size: 1.08rem;
    }

    .public-song-card pre {
        font-size: .92rem;
        line-height: 1.48;
    }

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

    .song-actions button,
    .song-actions a {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 0 10px;
        font-size: .78rem;
        line-height: 1.15;
        text-align: center;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-height: 88vh;
        padding: 22px 16px;
        border-radius: 18px 18px 0 0;
    }

    .jam-modal {
        width: 100%;
        padding: 24px;
        border-radius: 22px 22px 0 0;
    }

    .jam-modal-head {
        margin-bottom: 20px;
        padding-right: 48px;
    }

    .jam-choice-button {
        min-height: 92px;
        padding: 17px 18px;
        border-radius: 18px;
    }

    .jam-choice-button strong {
        font-size: .98rem;
    }

    .jam-choice-button span {
        font-size: .86rem;
    }

    .print-controls,
    .print-song-list {
        grid-template-columns: 1fr;
    }

    .admin-top-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nav a,
    .nav button {
        white-space: nowrap;
    }
    .two,
    .three { grid-template-columns: 1fr; }

    .admin-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 20px;
    }

    .admin-quick-actions,
    .admin-list-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-search {
        max-width: none;
    }

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

    .stats-grid article {
        padding: 14px;
    }

    .stats-grid strong {
        font-size: 1.55rem;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .admin-song-row {
        grid-template-columns: 46px 1fr;
    }

    .song-number {
        width: 40px;
        height: 40px;
    }

    .row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .admin-song-row {
        align-items: start;
    }

    .admin-song-row .btn {
        min-width: 0;
        flex: 1 1 auto;
    }

    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .table-actions .btn {
        width: 100%;
    }

    .inline-edit {
        grid-template-columns: 1fr;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
    }

    tr {
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
    }

    th { display: none; }
    td {
        padding: 7px 0;
        border-bottom: 0;
    }
}


/* v6 additions: newer functions on original v1 visual theme */
.jam-glow-button,
.mobile-jam-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 55%, var(--border));
    border-radius: 999px;
    color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}
.mobile-jam-link { display: none; }
.jam-glow-button:hover,
.mobile-jam-link:hover { transform: translateY(-1px); }
.version-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}
.version-switcher button {
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-main);
    font: 800 .82rem Inter, sans-serif;
    cursor: pointer;
}
.version-switcher button.active {
    border-color: var(--accent-primary);
    background: color-mix(in srgb, var(--accent-primary) 16%, var(--surface));
    color: var(--accent-primary);
}
.jam-status-panel,
.jam-shuffle-deck {
    grid-column: 1 / -1;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--card-shadow);
}
.jam-status-panel strong,
.jam-current-box strong {
    display: block;
    color: var(--accent-primary);
    font-size: 1.1rem;
}
.jam-status-panel small,
.jam-current-box small,
.shuffle-card small {
    display: block;
    color: var(--text-muted);
    font-weight: 700;
}
.jam-kicker,
.jam-current-box span,
.shuffle-card span {
    color: var(--accent-secondary);
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
}
.jam-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.jam-leader-select {
    width: auto;
    min-width: 180px;
    height: 42px;
}
.jam-shuffle-deck {
    align-items: stretch;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-secondary) 10%, transparent), var(--surface));
}
.shuffle-card {
    flex: 1;
    min-height: 118px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 18px;
    border: 1px dashed color-mix(in srgb, var(--accent-secondary) 42%, transparent);
    border-radius: 18px;
    background: var(--surface-soft);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    transition: transform .16s ease, opacity .16s ease, border-color .16s ease;
}
.shuffle-card.swiping { border-color: var(--accent-primary); opacity: .92; }
.shuffle-card strong {
    color: var(--text-main);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}
.jam-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 18px;
}
.jam-create-box,
.jam-list-box,
.jam-current-box,
.pending-jam {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}
.jam-list-head,
.jam-current-box {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.jam-list-item {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
}
.jam-list-item strong { color: var(--accent-primary); }
.jam-list-item span,
.empty-jams { color: var(--text-muted); font-size: .88rem; font-weight: 700; }
.song-version-editor { display: grid; gap: 12px; }
.song-version-list { display: grid; gap: 14px; }
.song-version-block {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}
.version-block-head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}
.shuffle-single-mode .songbook-layout { grid-template-columns: 1fr; }
.shuffle-single-mode .song-sidebar { display: none; }
.shuffle-single-mode .song-results { max-width: 860px; width: 100%; margin: 0 auto; }
.shuffle-single-mode .public-song-card.shuffle-song-card {
    min-height: min(72vh, 760px);
    cursor: default;
    touch-action: pan-y;
    user-select: none;
    transition: border-color .16s ease, background .16s ease;
}
.shuffle-single-mode .public-song-card.shuffle-song-card::before {
    content: none;
}
.mobile-bottom-actions { display: none; }
@media (max-width: 780px) {
    .mobile-jam-link { display: inline-flex; }
    .jam-status-panel,
    .jam-shuffle-deck,
    .jam-list-head,
    .jam-current-box { align-items: stretch; flex-direction: column; }
    .jam-controls { justify-content: stretch; }
    .jam-controls > *, .jam-leader-select { width: 100%; }
    .jam-modal-grid { grid-template-columns: 1fr; }
    .version-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .version-switcher button { width: 100%; min-width: 0; }
    .mobile-bottom-nav-on { padding-bottom: 92px; }
    .mobile-bottom-actions {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1200;
        display: flex;
        justify-content: space-between;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 24px;
        background: var(--surface);
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        box-shadow: 0 18px 45px rgba(0,0,0,.34);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
    @supports (bottom: max(10px, env(safe-area-inset-bottom))) {
        .mobile-bottom-actions {
            bottom: max(10px, env(safe-area-inset-bottom));
        }
    }
    .mobile-bottom-actions button {
        min-height: 48px;
        flex: 1 1 0;
        display: grid;
        place-items: center;
        gap: 2px;
        border: 0;
        border-radius: 18px;
        background: transparent;
        color: var(--text-muted);
        font: 800 .66rem Inter, sans-serif;
        cursor: pointer;
    }
    .mobile-bottom-actions button:disabled {
        cursor: not-allowed;
        opacity: .55;
    }
    .mobile-bottom-actions button strong { display: block; color: var(--text-main); font-size: 1.05rem; line-height: 1; }
    .mobile-bottom-actions button.active,
    .mobile-bottom-actions button:active {
        background: rgba(16, 185, 129, .14);
        background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
        color: var(--accent-primary);
    }
}

/* v10 mobile Jam UX refinement */
.mobile-search-panel { display: none; }
.jam-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-right: 48px;
}
.jam-modal-head h2 { margin-bottom: 4px; }
.jam-list-full,
.jam-create-panel { margin-top: 14px; }
.jam-choice-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 18px 0 4px;
}
.jam-choice-button {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 94px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.jam-choice-button strong {
    display: block;
    color: var(--accent-primary);
    font: 900 1.04rem Inter, sans-serif;
    text-transform: uppercase;
}
.jam-choice-button span {
    display: block;
    color: var(--text-muted);
    font: 800 .9rem/1.45 Inter, sans-serif;
}
.jam-choice-button:hover,
.jam-choice-button:focus-visible {
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, .08);
    outline: none;
}
.jam-step-panel {
    display: grid;
    gap: 12px;
}
.jam-step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
}
.jam-step-head h3 {
    margin: 0;
    flex: 1 1 auto;
    color: var(--text-main);
}
.shuffle-hint {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin: 14px 0 4px;
    padding: 10px 12px;
    border: 1px dashed color-mix(in srgb, var(--accent-secondary) 42%, transparent);
    border-radius: 14px;
    color: var(--text-muted);
    font: 800 .78rem Inter, sans-serif;
}
.shuffle-hint strong { color: var(--accent-primary); text-align: center; }
.shuffle-controls {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 4px;
}
.shuffle-controls button {
    min-height: 52px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--text-main);
    font: 900 .95rem Inter, sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.shuffle-controls .btn-primary {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
}
.shuffle-controls button:disabled {
    cursor: not-allowed;
    opacity: .42;
    box-shadow: none;
}
.single-jam-song-mode .songbook-layout { grid-template-columns: 1fr; }
.single-jam-song-mode .song-sidebar { display: none; }
.single-jam-song-mode .song-results { max-width: 900px; width: 100%; margin: 0 auto; }
.single-jam-song-mode .public-song-card.shuffle-song-card {
    min-height: min(74vh, 780px);
    cursor: default;
    touch-action: pan-y;
    user-select: none;
    transition: border-color .16s ease, background .16s ease;
}
.shuffle-single-mode .public-song-card.shuffle-song-card::before { content: none; }
.jam-viewer-mode .public-song-card.shuffle-song-card::before { content: none; }

@media (max-width: 780px) {
    .mobile-bottom-nav-on .songbook-toolbar {
        display: none;
    }
    .mobile-search-panel {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 112px;
        bottom: calc(112px + env(safe-area-inset-bottom));
        z-index: 1199;
        gap: 8px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: var(--surface);
        background: color-mix(in srgb, var(--surface) 96%, transparent);
        box-shadow: 0 18px 45px rgba(0,0,0,.34);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        max-height: calc(100vh - 148px);
        overflow: auto;
    }
    @supports (bottom: calc(max(10px, env(safe-area-inset-bottom)) + 98px)) {
        .mobile-search-panel {
            bottom: calc(max(10px, env(safe-area-inset-bottom)) + 98px);
        }
    }
    .mobile-search-panel {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .mobile-search-panel.open {
        display: grid;
    }
    .mobile-search-panel .dashboard-input { min-width: 0; }
    .mobile-search-panel .suggestions-box {
        grid-column: 1 / -1;
        position: static;
        max-height: 42vh;
        overflow: auto;
    }
    .mobile-actions-open .mobile-bottom-actions {
        border-color: var(--accent-primary);
        border-color: color-mix(in srgb, var(--accent-primary) 44%, var(--border));
    }
    .mobile-search-open .mobile-bottom-actions {
        border-color: var(--accent-primary);
        border-color: color-mix(in srgb, var(--accent-primary) 44%, var(--border));
    }
    .mobile-bottom-nav-on .song-actions {
        display: none;
    }
    .single-jam-song-mode .songbook-hero,
    .single-jam-song-mode .mobile-brand,
    .single-jam-song-mode .jam-status-panel,
    .single-jam-song-mode .song-actions {
        display: none !important;
    }
    .single-jam-song-mode.songbook-shell {
        padding-top: 12px;
    }
    .single-jam-song-mode .public-song-card.shuffle-song-card {
        min-height: calc(100vh - 118px);
        min-height: calc(100dvh - 118px);
        border-radius: 24px;
        display: flex;
        flex-direction: column;
    }
    .single-jam-song-mode .public-song-card.shuffle-song-card pre {
        flex: 1;
        font-size: clamp(1.06rem, 5vw, 1.45rem);
        line-height: 1.55;
        white-space: pre-wrap;
    }
    .single-jam-song-mode .song-results { max-width: none; }
    .shuffle-hint { margin-top: auto; }
    .jam-modal .jam-create-box { order: 3; }
    .jam-list-full { order: 1; }
    .jam-current-box { order: 2; }
    .jam-choice-box { grid-template-columns: 1fr; }
    .jam-step-head {
        align-items: center;
    }
    .jam-step-head .btn-secondary { flex: 0 0 auto; }
    .jam-step-head h3 {
        min-width: 150px;
        text-align: left;
    }
    .mobile-bottom-actions button strong { font-size: 1.22rem; }
}

/* v11 fixes: mobile Jam overlap + stable shuffle card */
.single-jam-song-mode .songbook-hero,
.single-jam-song-mode .mobile-brand,
.single-jam-song-mode .songbook-toolbar,
.single-jam-song-mode .jam-status-panel,
.single-jam-song-mode .song-actions {
    display: none !important;
}
.single-jam-song-mode .songbook-layout {
    margin-top: 0;
}
.single-jam-song-mode .public-song-card.shuffle-song-card {
    touch-action: pan-y;
    overscroll-behavior: contain;
}
.single-jam-song-mode .quick-top-button {
    display: none !important;
}
@media (max-width: 780px) {
    .mobile-bottom-actions {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 7px;
    }
    .mobile-bottom-actions button {
        min-width: 0;
        overflow: hidden;
        font-size: .58rem;
        white-space: nowrap;
    }
    .mobile-bottom-actions button strong {
        font-size: 1.05rem;
    }
    .single-jam-song-mode.mobile-bottom-nav-on {
        padding-bottom: 86px;
    }
    .single-jam-song-mode .public-song-card.shuffle-song-card {
        min-height: calc(100vh - 104px);
        min-height: calc(100dvh - 104px);
        margin: 0;
    }
}

/* v12: stable shuffle controls, no per-song actions on shuffle cards */
.single-jam-song-mode .song-actions,
.shuffle-single-mode .song-actions,
.jam-viewer-mode .song-actions {
    display: none !important;
}

.single-jam-song-mode .load-sentinel,
.shuffle-single-mode .load-sentinel,
.jam-viewer-mode .load-sentinel,
.single-jam-song-mode .public-song-card.shuffle-song-card ~ .public-song-card,
.shuffle-single-mode .public-song-card.shuffle-song-card ~ .public-song-card,
.jam-viewer-mode .public-song-card.shuffle-song-card ~ .public-song-card {
    display: none !important;
}

.shuffle-controls {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
}

.shuffle-controls .shuffle-nav-btn {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 18px;
    font: 900 .94rem/1 Inter, sans-serif;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

.shuffle-controls .shuffle-prev-btn {
    order: 1;
    grid-column: 1;
}

.shuffle-controls .shuffle-next-btn {
    order: 2;
    grid-column: 2;
}

.shuffle-controls .btn-secondary.shuffle-nav-btn {
    border-color: color-mix(in srgb, var(--text-muted) 36%, transparent);
    background: color-mix(in srgb, var(--surface-soft) 82%, #fff 3%);
    color: var(--text-main);
}

.shuffle-controls .btn-primary.shuffle-nav-btn {
    border: 1px solid color-mix(in srgb, var(--accent-primary) 70%, #fff 12%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent-primary) 94%, #fff 10%), var(--accent-primary));
    color: #fff;
}

.shuffle-controls .shuffle-nav-btn:disabled {
    cursor: not-allowed;
    opacity: .5;
    transform: none;
    box-shadow: none;
}

.shuffle-controls .shuffle-nav-btn:not(:disabled):hover,
.shuffle-controls .shuffle-nav-btn:not(:disabled):active {
    transform: translateY(-1px);
}

.shuffle-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.shuffle-card-actions .btn-secondary {
    min-height: 48px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--text-main);
    font: 900 .86rem/1 Inter, sans-serif;
    text-align: center;
    text-decoration: none;
}

.shuffle-card-actions .btn-secondary.danger {
    border-color: rgba(239, 68, 68, .34);
    color: var(--danger);
}

@media (max-width: 780px) {
    .shuffle-controls {
        margin-top: 16px;
    }

    .shuffle-controls .shuffle-nav-btn {
        min-height: 56px;
        border-radius: 18px;
        font-size: .88rem;
    }

    .shuffle-card-actions {
        grid-template-columns: 1fr;
        margin-bottom: 8px;
    }
}

/* v13: explicit spacer keeps shuffle card controls clear of the fixed mobile bar */
.mobile-bottom-spacer {
    display: none;
}

@media (max-width: 780px) {
    .single-jam-song-mode.mobile-bottom-nav-on {
        padding-bottom: 0;
    }

    .single-jam-song-mode .song-results,
    .shuffle-single-mode .song-results {
        padding-bottom: 0;
    }

    .single-jam-song-mode .public-song-card.shuffle-song-card,
    .shuffle-single-mode .public-song-card.shuffle-song-card {
        margin-bottom: 0;
    }

    .mobile-bottom-spacer {
        display: block;
        height: 124px;
        height: calc(124px + env(safe-area-inset-bottom));
        flex: 0 0 auto;
        pointer-events: none;
    }

    .mobile-bottom-nav-on .quick-top-button {
        right: 18px;
        bottom: 104px;
        bottom: calc(104px + env(safe-area-inset-bottom));
        z-index: 1300;
    }
}
