:root { --studio-accent: #9875f5; --studio-accent-hover: #7c5cdb; }
body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 12% 5%, rgba(152,117,245,.13), transparent 38%), var(--bs-body-bg);
    transition: background-color .2s, color .2s;
}
a { color: var(--studio-accent); }
a:hover { color: var(--studio-accent-hover); }
.brand { color: var(--studio-accent); font-size: 1.35rem; font-weight: 800; letter-spacing: -.04em; }
.hero {
    border: 1px solid var(--bs-border-color);
    background: linear-gradient(135deg, var(--bs-secondary-bg), rgba(152,117,245,.09));
    box-shadow: 0 20px 60px rgba(0,0,0,.08);
}
.hero h1 { max-width: 900px; letter-spacing: -.045em; }
.eyebrow { color: var(--studio-accent); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.feature-card, .auth-card {
    padding: 1.4rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    background: var(--bs-secondary-bg);
}
.feature-icon { color: var(--studio-accent); font-size: 1.8rem; margin-bottom: .8rem; }
.auth-wrap { display: flex; justify-content: center; padding: 1.5rem 0 3rem; }
.auth-card { width: 100%; max-width: 520px; padding: clamp(1.4rem, 4vw, 2.2rem); }
.form-control { background-color: var(--bs-body-bg); }
.btn-primary { --bs-btn-bg: var(--studio-accent); --bs-btn-border-color: var(--studio-accent); --bs-btn-hover-bg: var(--studio-accent-hover); --bs-btn-hover-border-color: var(--studio-accent-hover); --bs-btn-active-bg: var(--studio-accent-hover); }


.album-card {
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.album-card:hover { transform: translateY(-3px); border-color: var(--studio-accent); color: var(--bs-body-color); box-shadow: 0 14px 35px rgba(0,0,0,.10); }
.album-cover { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--bs-tertiary-bg); }
.album-cover-empty { display: grid; place-items: center; background: linear-gradient(135deg, rgba(152,117,245,.28), var(--bs-tertiary-bg)); }
.album-cover-empty span { color: var(--studio-accent); font-size: 5rem; }
.empty-state { padding: clamp(2rem, 6vw, 4rem) 1.5rem; border: 1px dashed var(--bs-border-color); border-radius: 1rem; background: var(--bs-secondary-bg); }
.empty-icon { color: var(--studio-accent); font-size: 3rem; margin-bottom: .75rem; }
.form-page { max-width: 760px; margin: 0 auto; }
.style-picker { display: flex; flex-wrap: wrap; gap: .5rem; }
.style-option { cursor: pointer; }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-option span, .tag-chip { display: inline-flex; border: 1px solid var(--bs-border-color); border-radius: 999px; padding: .45rem .8rem; color: var(--bs-body-color); background: var(--bs-body-bg); font-size: .875rem; }
.style-option input:checked + span { border-color: var(--studio-accent); color: var(--studio-accent); background: rgba(152,117,245,.12); }
.album-detail { position: relative; }
.detail-cover { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.edit-cover { display: block; width: 150px; aspect-ratio: 1; object-fit: cover; border-radius: .75rem; }


/* Album artwork sizing: never exceed its parent container. */
.album-cover,
.detail-cover,
.edit-cover {
    box-sizing: border-box;
    max-width: 100%;
}
.album-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.detail-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: cover;
}
.edit-cover {
    display: block;
    width: min(150px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Album collection: grid/list view switch. */
.album-view-toolbar .btn[aria-pressed="true"] {
    color: var(--studio-accent);
    border-color: var(--studio-accent);
    background: rgba(152,117,245,.12);
}
.album-grid.is-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.album-grid.is-list > [class*="col-"] {
    width: 100%;
}
.album-grid.is-list .album-card {
    display: flex !important;
    flex-direction: row;
    align-items: center;
}
.album-grid.is-list .album-cover {
    width: 112px;
    min-width: 112px;
    height: 112px;
    aspect-ratio: 1 / 1;
}
.album-grid.is-list .album-card > .p-3 {
    flex: 1;
    min-width: 0;
}
@media (max-width: 420px) {
    .album-grid.is-list .album-cover {
        width: 84px;
        min-width: 84px;
        height: 84px;
    }
}

/* v0.4 song editor */
.song-toolbar{display:flex;flex-wrap:wrap;gap:.5rem}
.song-blocks{display:grid;gap:1rem}
.song-block{border:1px solid var(--bs-border-color,#555);border-radius:12px;padding:1rem;background:rgba(127,127,127,.05)}
.song-block-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.75rem;flex-wrap:wrap}
.song-block-actions{display:flex;flex-wrap:wrap;gap:.35rem}
.song-block textarea{width:100%;min-height:120px;resize:vertical}
@media(max-width:576px){.song-block{padding:.75rem}.song-block-actions .btn{min-width:32px}}

/* v0.4.1: desktop two-column editor; mobile retains stacked layout. */
.song-editor-layout { display: block; }
.song-editor-settings, .song-editor-content { min-width: 0; }
@media (min-width: 992px) {
  .song-editor-layout { display: grid; grid-template-columns: minmax(290px, .85fr) minmax(0, 1.65fr); gap: 1.25rem; align-items: start; }
  .song-editor-content .auth-card { margin-bottom: 0 !important; }
  .song-editor-content .song-block textarea { min-height: 150px; }
}

/* v0.4.2 — wide desktop editor and auto-growing lyric fields */
.song-block textarea {
    min-height: 84px;
    height: 84px;
    max-height: 120px;
    resize: vertical;
    overflow-y: hidden;
}
@media (min-width: 992px) {
    .song-editor-layout {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
        width: 100%;
    }
    .song-editor-layout .auth-card {
        max-width: none;
    }
    .song-editor-content {
        width: 100%;
    }
    .song-editor-content .song-block textarea {
        min-height: 84px;
        max-height: 150px;
    }
}

/* v0.4.3: at Bootstrap lg breakpoint, all song editor cards fill the available row. */
@media (max-width: 991.98px) {
  .song-editor-layout,
  .song-editor-settings,
  .song-editor-content {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .song-editor-layout .auth-card,
  .song-editor-layout .song-blocks,
  .song-editor-layout .song-block {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }
}

/* v0.5 song workflow */
.song-drag-handle{display:inline-flex;align-items:center;justify-content:center;cursor:grab;touch-action:pan-x;user-select:none;padding:.2rem .5rem;border:1px solid var(--bs-border-color,#777);border-radius:6px;margin-right:auto}
.song-drag-handle:active{cursor:grabbing}
.song-lyrics-preview{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.65;margin:0}

.song-preview-dialog{width:min(760px,calc(100vw - 2rem));max-height:85vh;overflow:auto;background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#222);border:1px solid var(--bs-border-color,#aaa);border-radius:14px;padding:1.25rem}
.song-preview-dialog::backdrop{background:rgba(0,0,0,.65)}

/* v0.5.1 compact selectable chips */
.style-picker { gap: .3rem; }
.style-option span, .tag-chip { padding: .26rem .52rem; font-size: .78rem; line-height: 1.25; }
.style-option input:focus-visible + span { outline: 2px solid var(--studio-accent); outline-offset: 2px; }

/* v0.5.2 — compact, accessible scrolling genre list */
.style-picker-scroll {
  max-height: 414px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--bs-secondary-color, #888) transparent;
  padding: .2rem .3rem .6rem .1rem;
  mask-image: linear-gradient(to bottom, #000 0%, #000 calc(100% - 22px), transparent 100%);
}
.style-picker-scroll:focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 2px; }
.style-scroll-hint {
  text-align: center; font-size: .75rem; color: var(--bs-secondary-color, #888);
  padding-top: .35rem; user-select: none;
}
.style-scroll-hint span { display: inline-block; margin-left: .2rem; animation: studio-scroll-nudge 1.7s ease-in-out infinite; }
@keyframes studio-scroll-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* Keep drag handle and tag name together on the left; controls stay right. */
.song-block-head .song-drag-handle { margin-right: 0; flex: 0 0 auto; }
.song-block-head > strong { margin-right: auto; }
@media (max-width: 991.98px) {
  .style-picker-scroll { max-height: 400px; scrollbar-width: none; -ms-overflow-style: none; }
  .style-picker-scroll::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .style-scroll-hint span { animation: none; } }

/* v0.6: compact, searchable, responsive Styles Builder */
#stylesBuilder .style-picker { gap: .35rem; }
#stylesBuilder .style-option[hidden] { display: none !important; }
#stylesBuilder .style-option { max-width: 100%; }
#stylesBuilder .style-option span { overflow-wrap: anywhere; }
#stylesBuilder .style-picker-scroll { max-height: 414px; }
@media (max-width: 991px) {
 #stylesBuilder .style-picker-scroll { max-height: 400px; }
}

/* v0.6.1 — Midnight Studio concept: quiet, restrained and accessible. */
:root { --studio-accent: #a68af2; --studio-accent-hover: #8e70db; }
body { isolation:isolate; background:var(--bs-body-bg); }
body::before { content:"";position:fixed;inset:-30%;z-index:-1;pointer-events:none;
 background:radial-gradient(ellipse at 22% 30%,rgba(130,92,215,.12),transparent 38%),radial-gradient(ellipse at 82% 72%,rgba(54,133,167,.09),transparent 38%);
 animation:studio-ambient 28s ease-in-out infinite alternate; }
@keyframes studio-ambient {from{transform:translate3d(-1.5%,0,0) scale(1)}to{transform:translate3d(2%,1.5%,0) scale(1.035)}}
.hero,.auth-card,.feature-card,.album-card{border-radius:18px;box-shadow:0 12px 38px rgba(0,0,0,.035)}
.hero{position:relative;overflow:hidden}
.hero::after{content:'♫';position:absolute;right:5%;top:6%;font-size:clamp(5rem,13vw,12rem);opacity:.045;pointer-events:none;transform:rotate(-15deg)}
.song-editor-settings .auth-card{max-width:none}
/* Every option collection on the left has a bounded scroll area. */
.song-editor-settings .studio-scroll-panel,
#stylesBuilder .style-picker-scroll {height:auto;max-height:400px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
 scrollbar-width:thin;scrollbar-color:var(--bs-border-color) transparent;padding:.25rem .35rem .9rem .1rem;
 -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 calc(100% - 24px),transparent 100%);
 mask-image:linear-gradient(to bottom,#000 0%,#000 calc(100% - 24px),transparent 100%)}
.studio-scroll-caption{font-size:.7rem;color:var(--bs-secondary-color);text-align:center;margin:.25rem 0 0}
#stylesBuilder .mt-3>.studio-scroll-panel{max-height:210px}
@media(min-width:992px){.song-editor-settings .studio-scroll-panel,#stylesBuilder .style-picker-scroll{max-height:414px}}
@media(max-width:991.98px){.song-editor-settings .studio-scroll-panel,#stylesBuilder .style-picker-scroll{scrollbar-width:none;-ms-overflow-style:none}
 .song-editor-settings .studio-scroll-panel::-webkit-scrollbar,#stylesBuilder .style-picker-scroll::-webkit-scrollbar{display:none}}
.studio-action-dialog{width:min(430px,calc(100vw - 2rem));border:1px solid var(--bs-border-color);border-radius:20px;
 padding:1.6rem;background:var(--bs-secondary-bg);color:var(--bs-body-color);box-shadow:0 28px 100px rgba(0,0,0,.3)}
.studio-action-dialog::backdrop{background:rgba(5,8,18,.65);backdrop-filter:blur(6px)}
.studio-dialog-mark{display:grid;place-items:center;width:42px;height:42px;margin-bottom:1rem;border-radius:12px;
 background:rgba(166,138,242,.14);color:var(--studio-accent);font-size:1.5rem}
@media(prefers-reduced-motion:reduce){body::before{animation:none}}

/* v0.6.2: cap the WHOLE left card, not only an internal tag list. */
.song-editor-settings .studio-bounded-card {
 display:flex !important;flex-direction:column !important;
 height:414px !important;max-height:414px !important;min-height:0 !important;
 overflow:hidden !important;box-sizing:border-box;
}
.song-editor-settings .studio-bounded-card > h2 {flex:0 0 auto;}
.song-editor-settings .studio-bounded-card > .studio-card-scroll {
 display:block;flex:1 1 auto;min-height:0 !important;max-height:none !important;
 overflow-y:auto !important;overflow-x:hidden;overscroll-behavior:contain;
 scrollbar-width:thin;scrollbar-color:var(--studio-accent) transparent;
 padding:0 .4rem .8rem 0;
}
/* Remove competing inner scrolling so the entire builder scrolls as one unit. */
.song-editor-settings .studio-card-scroll .studio-scroll-panel,
.song-editor-settings .studio-card-scroll .style-picker-scroll,
#stylesBuilder .studio-card-scroll .studio-scroll-panel,
#stylesBuilder .studio-card-scroll .style-picker-scroll {
 height:auto !important;max-height:none !important;min-height:0 !important;
 overflow:visible !important;mask-image:none !important;-webkit-mask-image:none !important;
}
.studio-scroll-indicator {position:relative;flex:0 0 34px;display:flex;align-items:center;justify-content:center;
 gap:8px;pointer-events:none;border-top:1px solid var(--bs-border-color);margin-top:5px;
 color:var(--studio-accent);opacity:.85;}
.studio-mouse {width:17px;height:24px;border:1.6px solid currentColor;border-radius:10px;display:block;position:relative;}
.studio-wheel {position:absolute;left:50%;top:5px;width:2px;height:5px;border-radius:2px;background:currentColor;
 transform:translateX(-50%);animation:studio-wheel-scroll 1.9s ease-in-out infinite;}
.studio-chevron {width:7px;height:7px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;
 transform:rotate(45deg);animation:studio-chevron-scroll 1.9s ease-in-out infinite;}
@keyframes studio-wheel-scroll {0%,100%{opacity:.3;transform:translate(-50%,0)}50%{opacity:1;transform:translate(-50%,6px)}}
@keyframes studio-chevron-scroll {0%,100%{opacity:.35;transform:translateY(-3px) rotate(45deg)}50%{opacity:1;transform:translateY(2px) rotate(45deg)}}
@media(max-width:991.98px){
 .song-editor-settings .studio-bounded-card{height:400px !important;max-height:400px !important;}
 .song-editor-settings .studio-bounded-card > .studio-card-scroll{scrollbar-width:none;-ms-overflow-style:none;}
 .song-editor-settings .studio-bounded-card > .studio-card-scroll::-webkit-scrollbar{display:none;}
}
@media(prefers-reduced-motion:reduce){.studio-wheel,.studio-chevron{animation:none !important;}}

/* v0.6.3 — compact Styles output aligned with other sidebar cards */
.song-editor-settings .studio-style-output {padding: .9rem 1rem;}
.song-editor-settings .studio-style-output .form-label {font-size: .875rem;}
.song-editor-settings .studio-style-output .btn {font-size: .75rem;padding: .25rem .5rem;}
.song-editor-settings .studio-style-output #styleText {font-size: .82rem;line-height: 1.4;min-height: 72px;height: 84px;}
.song-editor-settings .studio-style-help {font-size: .72rem;line-height: 1.4;margin-top: .4rem;}
#lyricsPreviewSongName {font-weight: 500;overflow-wrap: anywhere;}

/* v0.6.4: one scrolling content area, persistent horizontal tabs */
#stylesBuilder.studio-builder-tabs{display:flex;flex-direction:column;overflow:hidden;height:414px!important;max-height:414px!important;min-height:0}
#stylesBuilder.studio-builder-tabs>.studio-tabs{flex:0 0 auto;display:flex;gap:.35rem;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;padding:0 0 .65rem;scroll-snap-type:x proximity}
#stylesBuilder.studio-builder-tabs>.studio-tabs::-webkit-scrollbar{display:none}
#stylesBuilder .studio-tab{appearance:none;white-space:nowrap;flex:0 0 auto;border:1px solid var(--studio-border,rgba(130,130,150,.35));border-radius:999px;background:transparent;color:inherit;font-size:.76rem;padding:.38rem .7rem;opacity:.76;scroll-snap-align:start}
#stylesBuilder .studio-tab:hover,#stylesBuilder .studio-tab:focus-visible{opacity:1;border-color:var(--studio-accent,#a68af2)}
#stylesBuilder .studio-tab.is-active{opacity:1;background:var(--studio-accent,#a68af2);border-color:var(--studio-accent,#a68af2);color:#15121f;font-weight:600}
#stylesBuilder.studio-builder-tabs>.studio-tab-content{flex:1 1 auto;min-height:0;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain}
#stylesBuilder .studio-tab-panel[hidden]{display:none!important}
#stylesBuilder .studio-tab-panel>.style-picker{max-height:none!important;overflow:visible!important}
#stylesBuilder.studio-builder-tabs>.studio-scroll-indicator{flex:0 0 auto}
@media(max-width:991.98px){#stylesBuilder.studio-builder-tabs{height:400px!important;max-height:400px!important}#stylesBuilder.studio-builder-tabs>.studio-tab-content{scrollbar-width:none}#stylesBuilder.studio-builder-tabs>.studio-tab-content::-webkit-scrollbar{display:none}}

/* v0.6.5: content-first sidebar cards, capped only when necessary. */
.song-editor-settings .studio-bounded-card,
#stylesBuilder.studio-builder-tabs {
 height:auto !important; min-height:0 !important; max-height:414px !important;
 display:flex !important; flex-direction:column !important; overflow:hidden !important;
}
.song-editor-settings .studio-bounded-card > .studio-card-scroll,
#stylesBuilder.studio-builder-tabs > .studio-tab-content {
 flex:0 1 auto !important; min-height:0 !important; overflow-y:auto !important;
}
.song-editor-settings .studio-scroll-indicator {display:none !important;}
.song-editor-settings .studio-bounded-card.is-overflowing > .studio-scroll-indicator {display:flex !important;}
#stylesBuilder.studio-builder-tabs > .studio-tabs {
 display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr));
 gap:4px; overflow:visible !important; padding:0 0 .55rem !important;
}
#stylesBuilder .studio-tab {
 min-width:0; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center;
 gap:4px; padding:8px 2px 5px; border:0; border-radius:10px; white-space:normal;
 background:transparent; color:var(--bs-secondary-color); opacity:1; transition:background .18s,color .18s;
}
#stylesBuilder .studio-tab:hover {background:rgba(166,138,242,.1);}
#stylesBuilder .studio-tab.is-active {background:rgba(166,138,242,.19);color:var(--bs-body-color);font-weight:600;}
#stylesBuilder .studio-tab:focus-visible {outline:2px solid var(--studio-accent);outline-offset:2px;}
#stylesBuilder .studio-tab-icon {width:21px;height:21px;flex:none;}
#stylesBuilder .studio-tab-label {font-size:clamp(.53rem,1.5vw,.63rem);line-height:1.15;text-align:center;overflow-wrap:anywhere;}
#stylesBuilder .studio-tab-dot {width:5px;height:5px;border-radius:50%;background:transparent;}
#stylesBuilder .studio-tab.has-selection .studio-tab-dot {background:var(--studio-accent);}
@media(max-width:991.98px){.song-editor-settings .studio-bounded-card,#stylesBuilder.studio-builder-tabs{height:auto !important;max-height:400px !important;}}
@media(prefers-reduced-motion:reduce){#stylesBuilder .studio-tab{transition:none;}}

/* v0.6.6 — song editor action buttons fit within the available width */
.song-editor-actions {display:flex;flex-wrap:wrap;gap:.5rem;max-width:100%;min-width:0;}
.song-editor-actions > .btn {font-size:.875rem;line-height:1.35;padding:.65rem .85rem;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center;}
@media(max-width:480px) {
 .song-editor-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 .song-editor-actions > .btn {width:100%;font-size:.8125rem;padding:.6rem .35rem;}
}
@media(max-width:340px) { .song-editor-actions {grid-template-columns:minmax(0,1fr);} }


/* v0.6.7: remove inherited viewport-height whitespace below the editor.
   Content controls page height, not a forced editor minimum. */
.song-editor-layout, .song-editor-settings, .song-editor-content,
#songForm, #lyricsBlocks { min-height:0; }
.song-editor-layout { height:auto; }
.song-editor-content { align-self:start; }
.song-editor-content > .auth-card { height:auto; min-height:0; }
.song-editor-actions { margin-top: .75rem; }

/* v0.6.8: more space for the sidebar on wide desktops.
   Keep all five tab captions on a single line from 1200px. */
@media (min-width:1200px) {
  .song-editor-layout {
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  }
  #stylesBuilder .studio-tab-label {
    white-space:nowrap;
    overflow-wrap:normal;
    word-break:normal;
    font-size:10px;
    letter-spacing:-.12px;
  }
  #stylesBuilder .studio-tab {padding-inline:1px;}
}

/* v0.6.9: three compact template shortcuts beside song blocks heading */
.song-template-actions {display:inline-flex;gap:5px;align-items:center}
.song-template-button {width:29px;height:29px;display:inline-grid;place-items:center;
 border:1px solid rgba(154,134,201,.42);border-radius:9px;background:rgba(155,129,215,.10);
 color:inherit;font-size:12px;font-weight:700;line-height:1;cursor:pointer;
 transition:background .15s ease,border-color .15s ease}
.song-template-button:hover,.song-template-button:focus-visible {background:rgba(155,129,215,.24);border-color:#a68af2;outline-offset:2px}

/* v0.7.0: aligned footer actions with copy shortcuts on the right */
.song-editor-actions {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;width:100%}
.song-editor-actions-primary,.song-editor-actions-copy {display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.song-editor-actions-copy {margin-left:auto}
.song-editor-actions .btn {font-size:14px;line-height:1.35;padding:.65rem .8rem;white-space:normal;max-width:100%}
@media(max-width:760px){.song-editor-actions-primary,.song-editor-actions-copy{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.song-editor-actions-copy{margin-left:0}.song-editor-actions .btn{width:100%;font-size:13px;padding:.6rem .4rem}}
@media(max-width:340px){.song-editor-actions-primary,.song-editor-actions-copy{grid-template-columns:minmax(0,1fr)}}
/* Drag feedback for native HTML drag and drop; works without a CDN on HTTP. */
.song-block {position:relative;transition:box-shadow .16s ease,border-color .16s ease,background-color .16s ease}
.song-drag-handle {cursor:grab;touch-action:pan-x}
.song-dragging {opacity:.56;border-color:#a68af2!important;box-shadow:0 10px 32px rgba(112,77,189,.25);background:rgba(166,138,242,.10)!important}
.song-drop-before::before,.song-drop-after::after {content:'';position:absolute;left:12px;right:12px;height:4px;border-radius:8px;background:#a68af2;box-shadow:0 0 0 3px rgba(166,138,242,.15);z-index:2;pointer-events:none}
.song-drop-before::before{top:-11px}.song-drop-after::after{bottom:-11px}
@media(prefers-reduced-motion:reduce){.song-block{transition:none}}

/* v0.8 Midnight Studio design system — decorative effects never cover controls. */
:root {
 --studio-accent:#ad92ff;--studio-accent-hover:#9375ec;
 --studio-surface:#1b1d29;--studio-outline:rgba(181,171,220,.15);
}
[data-bs-theme="dark"] {
 --bs-body-bg:#0d1019;--bs-body-color:#f1eff9;
 --bs-secondary-bg:#1b1d29;--bs-tertiary-bg:#252838;
 --bs-border-color:rgba(180,175,215,.16);
 --bs-secondary-color:#a8aabd;
 --bs-primary-rgb:173,146,255;
}
[data-bs-theme="light"] {
 --studio-accent:#7958c9;--studio-accent-hover:#6544af;
 --bs-body-bg:#f8f7fb;--bs-body-color:#222231;
 --bs-secondary-bg:#fff;--bs-tertiary-bg:#f0eef7;
 --bs-border-color:#e4e0ee;
}
body {position:relative;isolation:isolate;background:var(--bs-body-bg);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:-.012em;}
body > header,body > main,body > footer {position:relative;z-index:1;}
.studio-ambient {position:fixed;inset:0;overflow:hidden;z-index:0;pointer-events:none;opacity:.6;}
.studio-ambient span {position:absolute;display:block;width:42vw;height:42vw;min-width:350px;min-height:350px;border-radius:50%;filter:blur(90px);opacity:.16;animation:studio-drift 26s ease-in-out infinite alternate;}
.studio-ambient span:nth-child(1){top:-20%;left:-12%;background:#8d67eb;}
.studio-ambient span:nth-child(2){top:24%;right:-24%;background:#4669bb;animation-delay:-8s;animation-duration:31s;}
.studio-ambient span:nth-child(3){bottom:-35%;left:20%;background:#bb6baf;animation-delay:-15s;animation-duration:37s;}
[data-bs-theme="light"] .studio-ambient {opacity:.32;}
@keyframes studio-drift {from{transform:translate3d(-4%,0,0) scale(.94)}to{transform:translate3d(8%,9%,0) scale(1.12)}}
.studio-header {border-bottom:1px solid var(--bs-border-color);margin-bottom:1.25rem;}
.studio-header nav {min-height:38px;}
.brand {display:inline-flex;align-items:center;gap:.65rem;color:var(--bs-body-color);font-weight:750;font-size:1.2rem;letter-spacing:-.045em;}
.brand:hover {color:var(--bs-body-color);}
.studio-brand-accent {color:var(--studio-accent);}
.studio-brand-mark {display:inline-grid;place-items:center;width:35px;height:35px;border-radius:11px;background:linear-gradient(135deg,#bda7ff,#8668d9);color:#181322;font-size:1.25rem;box-shadow:0 6px 24px rgba(133,93,222,.22);}
.hero.studio-hero {position:relative;overflow:hidden;isolation:isolate;min-height:300px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
 background:linear-gradient(110deg,var(--bs-secondary-bg) 0%,var(--bs-secondary-bg) 55%,rgba(125,99,184,.12) 100%);
 border:1px solid var(--bs-border-color);box-shadow:0 24px 80px rgba(0,0,0,.09);}
.studio-hero::before {content:"";position:absolute;z-index:-1;width:420px;height:420px;right:-140px;top:-190px;border-radius:50%;background:radial-gradient(circle,rgba(173,146,255,.20),transparent 68%);pointer-events:none;}
.studio-hero h1 {max-width:800px;font-weight:780;line-height:1.09;letter-spacing:-.055em;}
.studio-hero .lead {max-width:680px;color:var(--bs-secondary-color);font-size:clamp(1rem,1.6vw,1.18rem);line-height:1.65;}
.studio-gradient-text {background:linear-gradient(95deg,#b79dff,#8f9fff);background-clip:text;-webkit-background-clip:text;color:transparent;}
[data-bs-theme="light"] .studio-gradient-text {background-image:linear-gradient(95deg,#7551be,#5b69b7);}
.studio-wave {position:absolute;right:-4%;bottom:5%;width:min(50%,550px);color:var(--studio-accent);opacity:.23;pointer-events:none;transform:rotate(-5deg);}
.studio-wave svg {width:100%;height:auto;filter:drop-shadow(0 0 12px rgba(173,146,255,.5));animation:studio-wave-float 10s ease-in-out infinite alternate;}
@keyframes studio-wave-float {to{transform:translateY(-13px) scaleY(.87);opacity:.5}}
.feature-card,.auth-card,.album-card,.empty-state {border:1px solid var(--bs-border-color);border-radius:18px;background:var(--bs-secondary-bg);box-shadow:0 12px 36px rgba(0,0,0,.035);}
.feature-card {transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;}
.feature-card:hover {transform:translateY(-3px);border-color:rgba(173,146,255,.45);box-shadow:0 14px 36px rgba(0,0,0,.10);}
.feature-icon {display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:rgba(173,146,255,.10);font-size:1.35rem;color:var(--studio-accent);}
.btn {border-radius:10px;font-weight:550;transition:background-color .16s,border-color .16s,transform .16s;}
.btn:active {transform:scale(.985);}
.btn-primary {color:#181321;--bs-btn-color:#181321;--bs-btn-hover-color:#181321;--bs-btn-active-color:#181321;}
.form-control,.form-select {border-radius:11px;border-color:var(--bs-border-color);}
.form-control:focus,.form-select:focus {border-color:var(--studio-accent);box-shadow:0 0 0 .2rem rgba(173,146,255,.12);}
.song-block {border-radius:15px;}
.style-option span {transition:background-color .15s,border-color .15s;}
@media(max-width:767px){.studio-hero{min-height:0!important}.studio-wave{width:75%;opacity:.13}.studio-header nav{row-gap:.75rem}.studio-header nav>.d-flex{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.studio-ambient span,.studio-wave svg{animation:none!important}.feature-card,.btn,.style-option span{transition:none!important}}

/* v0.8.1: original local artwork, editorial hero and album art */
.studio-hero {padding-right:clamp(2rem,34%,31rem)!important;min-height:385px!important;}
.studio-hero > :not(.studio-hero-art) {position:relative;z-index:2;}
.studio-hero-art {position:absolute;inset:0 0 0 auto;width:63%;height:100%;z-index:0;overflow:hidden;pointer-events:none;opacity:.95;}
.studio-hero-art::before {content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,var(--bs-secondary-bg) 0%,rgba(25,25,40,.30) 44%,transparent 100%);}
.studio-hero-art img {width:100%;height:100%;object-fit:cover;object-position:64% center;transform:scale(1.05);animation:studio-art-float 18s ease-in-out infinite alternate;}
[data-bs-theme="light"] .studio-hero-art {opacity:.58;}
[data-bs-theme="light"] .studio-hero-art::before {background:linear-gradient(90deg,var(--bs-secondary-bg) 0%,rgba(255,255,255,.4) 60%,transparent 100%);}
.studio-hero .lead {max-width:540px;}
@keyframes studio-art-float {to{transform:scale(1.12) translate(-1.5%,1%)}}
.studio-album-art {position:relative;background-size:cover;background-position:center;overflow:hidden;}
.studio-album-art-1 {background-image:url('/assets/img/album-art-1.webp');}
.studio-album-art-2 {background-image:url('/assets/img/album-art-2.webp');}
.studio-album-art-3 {background-image:url('/assets/img/album-art-3.webp');}
.album-card {overflow:hidden;transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;}
.album-card:hover {transform:translateY(-4px);border-color:rgba(173,146,255,.4);box-shadow:0 18px 45px rgba(0,0,0,.17);}
.album-card .album-cover {transition:transform .5s ease;}
.album-card:hover .album-cover {transform:scale(1.025);}
@media(max-width:991px){
 .studio-hero {padding-right:2rem!important;min-height:340px!important;}
 .studio-hero-art {width:100%;opacity:.30;}
 .studio-hero-art::before {background:linear-gradient(90deg,var(--bs-secondary-bg) 0%,rgba(24,24,39,.75) 45%,rgba(24,24,39,.20) 100%);}
 [data-bs-theme="light"] .studio-hero-art {opacity:.20;}
}
@media(max-width:575px){.studio-hero{min-height:0!important}.studio-hero-art img{object-position:70% center}}
@media(prefers-reduced-motion:reduce){.studio-hero-art img{animation:none!important}.album-card,.album-card .album-cover{transition:none!important}}

/* v0.8.2 — animated local SVG art on the three workspace tiles. */
.studio-feature-card {
 position:relative;isolation:isolate;overflow:hidden;min-height:185px;
 transition:transform .32s cubic-bezier(.2,.8,.2,1),border-color .3s,box-shadow .3s,background-color .3s;
}
.studio-feature-card::before {
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background-image:var(--studio-hover-art);background-position:right -75px center;
 background-size:auto 125%;background-repeat:no-repeat;
 opacity:0;transform:translateX(28px) scale(1.06) rotate(2deg);
 transition:opacity .48s ease,transform .75s cubic-bezier(.18,.8,.25,1);
}
.studio-feature-card::after {
 content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
 background:linear-gradient(90deg,var(--bs-secondary-bg) 0%,var(--bs-secondary-bg) 34%,transparent 100%);
 opacity:0;transition:opacity .4s ease;
}
.studio-feature-albums {--studio-hover-art:url('/assets/img/albums-hover.svg');}
.studio-feature-songs {--studio-hover-art:url('/assets/img/songs-hover.svg');}
.studio-feature-styles {--studio-hover-art:url('/assets/img/styles-hover.svg');}
.studio-feature-card:is(:hover,:focus-within)::before {opacity:.85;transform:translateX(0) scale(1) rotate(0);}
.studio-feature-card:is(:hover,:focus-within)::after {opacity:.76;}
.studio-feature-card:is(:hover,:focus-within) {transform:translateY(-5px);border-color:rgba(173,146,255,.58);box-shadow:0 18px 46px rgba(91,63,157,.17);}
.studio-feature-card > * {position:relative;z-index:1;}
.studio-feature-card h2,.studio-feature-card p {max-width:78%;}
.studio-feature-card .feature-icon {transition:transform .35s,box-shadow .35s;}
.studio-feature-card:is(:hover,:focus-within) .feature-icon {transform:translateY(-2px) rotate(-5deg);box-shadow:0 5px 22px rgba(173,146,255,.2);}
[data-bs-theme="light"] .studio-feature-card:is(:hover,:focus-within)::before {opacity:.42;}
@media(max-width:767px){.studio-feature-card{min-height:155px}.studio-feature-card::before{background-position:right -65px center}.studio-feature-card h2,.studio-feature-card p{max-width:80%;}}
@media(prefers-reduced-motion:reduce){
 .studio-feature-card,.studio-feature-card::before,.studio-feature-card::after,.studio-feature-card .feature-icon{transition:none!important;}
 .studio-feature-card:is(:hover,:focus-within){transform:none;}
 .studio-feature-card:is(:hover,:focus-within)::before{transform:none;}
}

/* v0.8.3 — destructive action in lyrics toolbar */
#clearLyricsBlocks {border-color:rgba(227,117,145,.45);color:var(--bs-danger-text-emphasis,#d87993);}
#clearLyricsBlocks:hover,#clearLyricsBlocks:focus-visible {background:rgba(220,65,105,.12);border-color:#d87993;color:var(--bs-body-color);}
#clearLyricsDialog .btn {white-space:normal;}

/* v0.8.4 — MuzHunter genre mascot, placed above action buttons. */
.muzhunter-genre-teaser {
 display:flex;align-items:center;gap:14px;position:relative;
 width:min(100%,520px);min-height:112px;margin-top:22px;
 padding:10px 18px 10px 8px;border-radius:18px;
 background:#fff;color:#20202b;border:1px solid rgba(153,129,205,.22);
 box-shadow:0 12px 38px rgba(50,29,99,.12);
 overflow:hidden;animation:muzhunter-slide .7s cubic-bezier(.2,.8,.2,1) both;
}
.muzhunter-genre-teaser[hidden] {display:none!important;}
.muzhunter-genre-teaser img {
 width:108px;height:108px;object-fit:contain;flex:none;
 mix-blend-mode:multiply;animation:muzhunter-bob 5s ease-in-out infinite alternate;
}
.muzhunter-genre-copy {min-width:0;position:relative;z-index:1;}
.muzhunter-eyebrow {font-size:10px;letter-spacing:.12em;font-weight:800;color:#8263c5;}
.muzhunter-genre-copy p {font-size:clamp(14px,1.4vw,18px);font-weight:650;line-height:1.35;margin:6px 0;}
.muzhunter-genre-copy strong {color:#7951c4;}
.muzhunter-genre-copy small {color:#777585;font-size:11px;}
.muzhunter-editor-teaser {width:100%;margin:0 0 1rem;min-height:112px;}
.muzhunter-editor-teaser img {width:95px;height:95px;}
@keyframes muzhunter-slide {from{opacity:0;transform:translateX(-28px)}to{opacity:1;transform:translateX(0)}}
@keyframes muzhunter-bob {to{transform:translateY(-5px) rotate(1deg)}}
@media(max-width:575px){.muzhunter-genre-teaser{gap:8px;padding:8px 12px 8px 4px}.muzhunter-genre-teaser img{width:83px;height:83px}}
@media(prefers-reduced-motion:reduce){.muzhunter-genre-teaser,.muzhunter-genre-teaser img{animation:none!important}}

/* v0.8.5 Drag & Drop Pro: pointer-driven, smooth, no external library. */
.song-drag-handle {touch-action:none;cursor:grab;min-width:36px;min-height:34px;border-radius:10px;background:rgba(167,140,247,.08);transition:background .18s,border-color .18s,transform .18s;}
.song-drag-handle:hover,.song-drag-handle:focus-visible {background:rgba(167,140,247,.23);border-color:#ad92ff;outline:2px solid transparent;}
.song-is-sorting,.song-is-sorting * {cursor:grabbing!important;user-select:none!important;}
.song-drag-source {display:none!important;}
.song-drag-placeholder {min-height:85px;border:2px dashed #b99bff;border-radius:16px;background:rgba(167,140,247,.12);box-shadow:inset 0 0 30px rgba(167,140,247,.07),0 0 18px rgba(167,140,247,.11);animation:song-placeholder-in .17s ease-out;}
.song-drag-ghost {margin:0!important;opacity:.94;transform:rotate(-1deg) scale(1.015);border:1px solid #bea9ff!important;border-radius:16px;box-shadow:0 24px 64px rgba(25,13,61,.42),0 0 0 3px rgba(173,146,255,.17)!important;background:var(--bs-secondary-bg)!important;overflow:hidden;transition:none!important;}
.song-drag-ghost textarea {pointer-events:none;resize:none;}
@keyframes song-placeholder-in {from{opacity:.5;transform:scaleY(.92)}to{opacity:1;transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.song-drag-placeholder{animation:none}.song-drag-ghost{transform:none}.song-drag-handle{transition:none}}

/* v0.8.6 MuzHunter Characters 2.0 */
.muzhunter-stats-card{width:min(100%,720px);align-items:center;padding:14px;gap:14px;}
.muzhunter-stats-mascots{display:flex;flex:none;align-items:center;justify-content:center;min-width:90px;max-width:170px;}
.muzhunter-stats-mascots img{width:100px;height:100px;object-fit:contain;mix-blend-mode:multiply;animation:muzhunter-bob 5s ease-in-out infinite alternate;}
.muzhunter-stats-mascots img+img{width:75px;height:75px;margin-left:-35px;transform:rotate(8deg);}
.muzhunter-stats-content{flex:1;}
.muzhunter-stats-track{display:flex;width:100%;height:10px;border-radius:30px;overflow:hidden;background:#e7e3ee;margin:13px 0 8px;}
.muzhunter-stat-segment{display:block;height:100%;}
.genre-rock{background:#d85e65}.genre-rap{background:#c09a48}.genre-electro{background:#6f9fe4}.genre-pop{background:#e27cb9}
.muzhunter-stats-legend{display:flex;flex-wrap:wrap;gap:5px 13px;color:#6b6678;font-size:11px;}
.muzhunter-stats-legend span{display:inline-flex;align-items:center;gap:5px;}
.muzhunter-stats-legend i{display:inline-block;width:8px;height:8px;border-radius:50%;}
.muzhunter-editor-teaser .muzhunter-stats-mascots{min-width:80px;max-width:130px;}
.muzhunter-editor-teaser .muzhunter-stats-mascots img{width:85px;height:85px;}
.muzhunter-editor-teaser .muzhunter-stats-mascots img+img{width:65px;height:65px;margin-left:-28px;}
.muzhunter-reveal{animation:muzhunter-slide .5s cubic-bezier(.2,.8,.2,1) both;}
@media(max-width:575px){.muzhunter-stats-card{gap:7px;padding:10px}.muzhunter-stats-mascots{min-width:66px;max-width:100px}.muzhunter-stats-mascots img{width:75px;height:75px}.muzhunter-stats-mascots img+img{width:52px;height:52px;margin-left:-26px}}
@media(prefers-reduced-motion:reduce){.muzhunter-reveal,.muzhunter-stats-mascots img{animation:none!important}}

/* v0.8.7 — album create/edit forms fill the available Bootstrap container. */
.album-form-page {width:100%;max-width:none;margin-inline:0;}
.album-form-page .album-form-card {width:100%;max-width:none;}
.album-form-page .style-picker {width:100%;align-content:flex-start;}
.album-form-page .form-control {width:100%;}

/* v0.8.8: align header and footer with the current page's main container */
.studio-footer {border-top:1px solid var(--bs-border-color-translucent);}
.studio-footer-copyright {margin-left:auto;text-align:right;}
@media(max-width:575px){.studio-footer-copyright{margin-left:0;text-align:left;}}

/* v0.9.0 */
.studio-presets .form-select {background-color:var(--bs-body-bg);color:var(--bs-body-color);border-color:var(--bs-border-color);}
.studio-presets .btn {white-space:nowrap;}
@media(max-width:575px){.studio-presets .form-select{width:100%;}}

/* v0.9.1 — compact clear selection control in Styles Builder */
.studio-clear-builder {font-size:.75rem;line-height:1.25;white-space:nowrap;padding:.28rem .58rem;border-radius:.55rem;opacity:.8;transition:opacity .2s,background-color .2s,border-color .2s;}
.studio-clear-builder:hover,.studio-clear-builder:focus-visible{opacity:1;border-color:rgba(200,140,255,.7);background:rgba(150,105,220,.12);}

/* v0.9.2 — Song Library Pro */
.studio-library-toolbar{display:grid;grid-template-columns:minmax(220px,2fr) minmax(160px,1fr) minmax(190px,1fr);gap:12px;padding:18px;background:var(--bs-secondary-bg);border:1px solid var(--bs-border-color);border-radius:18px}
.studio-library-song{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:17px 20px;background:var(--bs-secondary-bg);border:1px solid var(--bs-border-color);border-radius:16px;transition:border-color .2s,transform .2s}
.studio-library-song:hover{border-color:rgba(165,133,241,.55);transform:translateY(-2px)}
.studio-library-results{display:grid;gap:10px}
.studio-library-song-main{min-width:0;flex:1}
.studio-library-song-title{font-size:1.06rem;font-weight:650;text-decoration:none}
.studio-library-meta{color:var(--bs-secondary-color);font-size:.77rem;margin-top:3px}
.studio-library-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.studio-library-preview{width:min(760px,calc(100vw - 32px));max-width:760px}
.studio-library-preview-tabs{display:flex;gap:8px}
.studio-library-preview .song-lyrics-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:min(55vh,520px);overflow:auto}
@media(max-width:850px){.studio-library-toolbar{grid-template-columns:1fr 1fr}.studio-library-search{grid-column:1/-1}}
@media(max-width:600px){.studio-library-toolbar{grid-template-columns:1fr}.studio-library-search{grid-column:auto}.studio-library-song{align-items:flex-start;flex-direction:column}.studio-library-actions{width:100%}}
@media(prefers-reduced-motion:reduce){.studio-library-song{transition:none}.studio-library-song:hover{transform:none}}

/* v0.9.3 — creation and last edit metadata */
.studio-date-stack{display:flex;flex-wrap:wrap;column-gap:16px;row-gap:4px;font-size:.78rem;color:var(--bs-secondary-color);line-height:1.55}
.studio-date-stack .studio-date-label{opacity:.85}
.album-card .studio-date-stack{flex-direction:column;gap:1px;font-size:.75rem}
.studio-album-dates{font-size:.86rem}

/* v0.9.4 — song history */
.studio-history-list{display:grid;gap:9px;max-height:390px;overflow-y:auto}
.studio-history-item{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 15px;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-secondary-bg)}
.studio-history-dialog{width:min(900px,calc(100vw - 32px));max-width:900px}
.studio-history-preview-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:14px}
.studio-history-preview-grid pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:50vh;overflow:auto;padding:14px;border:1px solid var(--bs-border-color);border-radius:12px;background:var(--bs-secondary-bg)}
@media(max-width:650px){.studio-history-item{align-items:flex-start;flex-direction:column}.studio-history-preview-grid{grid-template-columns:1fr}}

/* v0.9.5 — compact album card metadata: dates on the right */
.album-card .studio-album-card-meta{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.album-card .studio-album-card-summary{min-width:0;flex:1 1 auto;overflow-wrap:anywhere}
.album-card .studio-album-card-meta .studio-date-stack{flex:0 1 auto;min-width:0;max-width:55%;text-align:right;align-items:flex-end;gap:3px;font-size:.69rem;line-height:1.4}
.album-card .studio-album-card-meta .studio-date-stack>span{overflow-wrap:anywhere}
@media(max-width:440px){.album-card .studio-album-card-meta{gap:8px}.album-card .studio-album-card-meta .studio-date-stack{font-size:.63rem;max-width:59%}}

/* v0.9.7: dates aligned to the right of the album title */
.studio-album-heading-row{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}
.studio-album-heading-title{min-width:0;overflow-wrap:anywhere}
.studio-album-heading-dates{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:0 0 auto;margin:0;text-align:right;white-space:nowrap}
@media(max-width:650px){.studio-album-heading-row{align-items:flex-start;flex-direction:column;gap:12px}.studio-album-heading-dates{align-items:flex-start;text-align:left;white-space:normal}}

/* v0.9.8: compact per-category selected-item counters in Styles Builder tabs */
#stylesBuilder .studio-tab{position:relative;}
#stylesBuilder .studio-tab-count{
 position:absolute;right:3px;top:3px;display:grid;place-items:center;
 min-width:17px;height:17px;padding:0 4px;border-radius:999px;
 background:#a78bfa;color:#161222;border:1px solid rgba(255,255,255,.18);
 font-size:10px;line-height:1;font-weight:800;font-variant-numeric:tabular-nums;
 box-shadow:0 1px 5px rgba(0,0,0,.18);
}
#stylesBuilder .studio-tab-count[hidden]{display:none!important;}
#stylesBuilder .studio-tab-dot{display:none!important;}

/* v0.9.9: persistent full-width header, content aligned with main */
:root{--studio-fixed-header-height:84px}
body{padding-top:calc(var(--studio-fixed-header-height) + 20px)}
body > header.studio-header{
 position:fixed;inset:0 0 auto;z-index:1050;
 width:100%;margin:0;
 background:rgba(18,18,29,.94);
 border-bottom:1px solid var(--bs-border-color);
 box-shadow:0 8px 30px rgba(0,0,0,.13);
 -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
}
[data-bs-theme="light"] body > header.studio-header{background:rgba(255,255,255,.94)}
.studio-header-inner{width:100%}
html{scroll-padding-top:calc(var(--studio-fixed-header-height) + 16px)}
@media(max-width:575px){body{padding-top:calc(var(--studio-fixed-header-height) + 12px)}}

/* v1.0.0: context-sensitive actions in the persistent header */
.studio-header-controls{min-width:0;flex-wrap:wrap;justify-content:flex-end}
.studio-header-context{display:flex;align-items:center;gap:6px;padding-right:10px;margin-right:2px;border-right:1px solid var(--bs-border-color)}
.studio-header-context .btn{white-space:nowrap}
@media(max-width:760px){
 .studio-header nav{align-items:flex-start!important}
 .studio-header-controls{width:100%;justify-content:flex-start}
 .studio-header-context{padding-right:8px}
}

/* v0.9.11: search stays outside the scrolling genre chips area */
#stylesBuilder .studio-builder-search{flex:0 0 auto;min-height:0;padding:0 0 .65rem;}
#stylesBuilder .studio-builder-search[hidden]{display:none!important;}
#stylesBuilder.studio-builder-tabs>.studio-tab-content{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;}
#stylesBuilder .studio-tab-content>.studio-tab-panel{min-height:0;}

/* v0.9.13: friendly unavailable/unauthorized page */
.studio-noaccess{min-height:calc(100svh - var(--studio-fixed-header-height) - 130px);display:grid;place-items:center;padding:24px 0 48px}
.studio-noaccess-stage{position:relative;width:min(100%,850px);margin-inline:auto;text-align:center;isolation:isolate;animation:studio-noaccess-enter .6s ease-out both}
.studio-noaccess-mascot{display:block;width:min(100%,660px);height:auto;margin:0 auto -15px;border-radius:22px 22px 0 0;object-fit:contain}
.studio-noaccess-message{position:relative;z-index:1;margin:-4px auto 0;padding:22px 22px 28px;width:min(92%,690px);border:1px solid rgba(166,136,249,.55);border-radius:20px;background:linear-gradient(130deg,#211b37,#121827);box-shadow:0 18px 55px rgba(0,0,0,.27);color:#f6f2ff}
.studio-noaccess-eyebrow{display:block;font-size:.75rem;letter-spacing:.16em;font-weight:800;color:#b79bff;margin-bottom:10px}
.studio-noaccess-message h1{font-size:clamp(1.5rem,4vw,2.3rem);font-weight:800;margin-bottom:12px}
.studio-noaccess-message p{color:#c9c3dc;max-width:510px;margin:0 auto 20px}
.studio-noaccess-button{font-weight:700}
@keyframes studio-noaccess-enter{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.studio-noaccess{padding:10px 0 30px}.studio-noaccess-mascot{width:100%;margin-bottom:0}.studio-noaccess-message{width:100%;padding:20px 14px}}
@media(prefers-reduced-motion:reduce){.studio-noaccess-stage{animation:none}}

/* v0.9.15: real alpha mascot with text inside the illustrated sign */
.studio-noaccess{padding:12px 16px 38px;min-height:calc(100svh - var(--studio-fixed-header-height) - 110px);display:grid;place-items:center}
.studio-error-stage{position:relative;width:min(100%,620px);margin:0 auto;isolation:isolate;animation:studio-noaccess-enter .6s ease-out both}
.studio-error-illustration{display:block;width:100%;height:auto;filter:drop-shadow(0 16px 28px rgba(0,0,0,.2))}
.studio-error-sign-content{position:absolute;z-index:2;left:6%;top:54%;width:78%;height:29%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:#fff;padding:6px 7px 8px}
.studio-error-eyebrow{color:#c7a7ff;font-size:clamp(8px,1.25vw,11px);font-weight:800;letter-spacing:.12em;margin-bottom:5px}
.studio-error-sign-content h1{font-size:clamp(16px,2.4vw,26px);line-height:1.1;font-weight:850;margin:0 0 8px;color:#fff;text-shadow:0 2px 5px #090614}
.studio-error-sign-content p{font-size:clamp(10px,1.25vw,13px);line-height:1.35;color:#ddd6ee;max-width:400px;margin:0 0 10px}
.studio-error-cta{font-size:clamp(10px,1.25vw,13px);padding:6px 13px;border-radius:9px;white-space:nowrap;font-weight:700}
@media(max-width:520px){
 .studio-noaccess{padding:10px 0 30px;display:block}
 .studio-error-stage{width:100%;max-width:420px}
 .studio-error-sign-content{top:53%;height:32%;left:5%;width:80%;padding:2px}
 .studio-error-eyebrow{font-size:8px;margin-bottom:3px}
 .studio-error-sign-content h1{font-size:clamp(14px,4vw,19px);margin-bottom:4px}
 .studio-error-sign-content p{font-size:10px;margin-bottom:6px;line-height:1.2}
 .studio-error-cta{font-size:10px;padding:4px 9px}
}
@media(prefers-reduced-motion:reduce){.studio-error-stage{animation:none}}

/* v0.9.16: text is baked into the compact artwork; no overlapping HTML labels */
.studio-error-page{min-height:calc(100svh - var(--studio-fixed-header-height, 80px) - 70px);display:grid;place-items:center;padding:10px 16px 20px}
.studio-error-poster{display:flex;flex-direction:column;align-items:center;gap:10px;width:min(100%,500px);margin-inline:auto}
.studio-error-poster img{display:block;width:auto;max-width:100%;height:auto;max-height:calc(100svh - var(--studio-fixed-header-height, 80px) - 145px);object-fit:contain}
.studio-error-return{font-weight:750;max-width:100%;text-align:center}
@media(max-height:570px) and (min-width:700px){
 .studio-error-poster{width:min(100%,800px);flex-direction:row;justify-content:center}
 .studio-error-poster img{max-width:70%;max-height:calc(100svh - var(--studio-fixed-header-height,80px) - 25px)}
}

/* v0.9.17: fresh comic posters; fit fully below the fixed header */
.studio-error-page{min-height:0;padding:12px 16px 24px;display:flex;align-items:center;justify-content:center}
.studio-error-poster{width:min(100%,570px);gap:12px}
.studio-error-poster img{max-width:100%;max-height:calc(100dvh - 175px);width:auto;height:auto;object-fit:contain;border-radius:10px}
@media(max-width:600px){.studio-error-poster img{max-height:calc(100dvh - 160px)}}

/* v0.9.19: private-by-default read-only song sharing */
.studio-sharing-setting .form-check-input{cursor:pointer}
.studio-library-public-link{display:inline-block;margin-top:.35rem;font-size:.8rem;color:#bba0ff;text-decoration:none}
.studio-library-public-link:hover{text-decoration:underline}
.studio-shared-song{max-width:1500px;margin:2rem auto 0}
.studio-shared-heading{margin-bottom:1.5rem}
.studio-shared-heading h1{font-size:clamp(1.8rem,3vw,2.8rem);font-weight:800;margin:.6rem 0}
.studio-shared-layout{display:grid;grid-template-columns:minmax(250px,390px) minmax(0,1fr);align-items:start;gap:1.25rem}
.studio-shared-sidebar{display:grid;gap:1rem}
.studio-shared-parameter h2,.studio-shared-lyrics h2{font-size:1.15rem;font-weight:750;margin-bottom:1rem}
.studio-shared-chips{display:flex;flex-wrap:wrap;gap:.45rem}
.studio-shared-lyrics{min-height:260px}
.studio-shared-lyrics-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.9;font-size:1.05rem}
.studio-shared-return{margin:1.5rem 0 2rem}
@media(max-width:780px){.studio-shared-layout{grid-template-columns:minmax(0,1fr)}.studio-shared-song{margin-top:1.25rem}}

/* v0.9.21: compact public-visibility eye next to song title */
.studio-library-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-width:0}
.studio-library-title-row .studio-library-song-title{min-width:0;overflow-wrap:anywhere}
.studio-library-visibility{position:relative;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:28px;height:28px;border-radius:9px;border:1px solid rgba(174,143,255,.35);color:#b79bff;background:rgba(160,119,255,.09);text-decoration:none;transition:background .2s,color .2s}
.studio-library-visibility:hover,.studio-library-visibility:focus-visible{background:rgba(160,119,255,.2);color:#e1d4ff}
.studio-library-visibility::after{content:attr(data-tooltip);position:absolute;z-index:20;bottom:calc(100% + 9px);left:50%;transform:translate(-50%,5px);opacity:0;pointer-events:none;white-space:nowrap;max-width:min(85vw,320px);padding:7px 10px;border-radius:8px;background:#302842;color:#fff;font-size:12px;font-weight:500;box-shadow:0 8px 25px rgba(0,0,0,.3);transition:opacity .18s,transform .18s}
.studio-library-visibility:hover::after,.studio-library-visibility:focus-visible::after{opacity:1;transform:translate(-50%,0)}
@media(max-width:480px){.studio-library-visibility::after{left:auto;right:0;transform:translateY(5px)}.studio-library-visibility:hover::after,.studio-library-visibility:focus-visible::after{transform:translateY(0)}}

/* v0.9.22: закрытый просмотр обозначается перечёркнутым глазом */
.studio-library-visibility-closed{color:#8c899c;background:rgba(130,127,145,.06);border-color:rgba(145,141,159,.25);cursor:help}
.studio-library-visibility-closed:hover,.studio-library-visibility-closed:focus-visible{color:#c2bdd2;background:rgba(145,141,159,.12)}

/* v0.9.23 — full-text Lyrics editor */
.lyrics-text-editor-dialog{width:min(980px,calc(100vw - 2rem));max-height:calc(100dvh - 2rem)}
.lyrics-text-editor-input{min-height:280px;max-height:55dvh;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.55;white-space:pre;tab-size:2}

/* v0.9.25: history stays at bottom of the left editor column */
.song-editor-settings > .studio-history { margin-top: 1rem; min-width: 0; }
.song-editor-settings .studio-history-list { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.song-editor-settings .studio-history-item { gap: .65rem; flex-wrap: wrap; }
.song-editor-settings .studio-history-item > div { min-width: 0; }

/* v0.9.26: compact, collapsible revision history */
.studio-history-disclosure > summary{cursor:pointer;list-style:revert;padding:10px 12px;border:1px solid var(--bs-border-color);border-radius:10px;background:var(--bs-secondary-bg);font-weight:600;margin-bottom:0}
.studio-history-disclosure[open] > summary{margin-bottom:10px}
.studio-history-disclosure > summary:hover{filter:brightness(1.07)}

/* v0.9.27: delete button in history preview */
.studio-history-delete{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:31px;border-color:var(--bs-danger);color:var(--bs-danger)}
.studio-history-delete:hover,.studio-history-delete:focus-visible{background:var(--bs-danger);color:#fff}

/* v0.9.28: non-blocking copy feedback above the editor */
.studio-copy-toast{position:fixed;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:11000;max-width:min(92vw,540px);width:max-content;box-sizing:border-box;padding:13px 20px;border:1px solid #4b5563;border-radius:12px;background:#202332;color:#f6f7fb;box-shadow:0 12px 36px rgba(0,0,0,.42);font-size:14px;line-height:1.5;text-align:center;cursor:pointer;overflow-wrap:anywhere;animation:studio-copy-toast-in .18s ease-out}
.studio-copy-toast[hidden]{display:none!important}
.studio-copy-toast[data-kind="success"]{border-color:#29966b}
.studio-copy-toast[data-kind="warning"]{border-color:#c79a3e}
.studio-copy-toast[data-kind="error"]{border-color:#d65c64}
@keyframes studio-copy-toast-in{from{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%,0)}}
@media(max-width:575px){.studio-copy-toast{top:max(10px,env(safe-area-inset-top));width:calc(100vw - 24px);max-width:calc(100vw - 24px)}}

/* v0.9.29 — align history with bottom of lyrics column on desktop.
   The sidebar grows to the grid row height; the history card consumes spare space
   above it, without changing the position of the form action buttons. */
@media (min-width: 992px) {
  .song-editor-layout { align-items: stretch; }
  .song-editor-layout > .song-editor-settings {
    display: flex;
    flex-direction: column;
    min-height: 0;
    align-self: stretch;
  }
  .song-editor-settings > .studio-history {
    margin-top: auto;
    margin-bottom: 0 !important;
  }
}


/* v0.9.31 — unified, filled status notifications */
:root{--studio-toast-success-bg:#123e32;--studio-toast-success-border:#35c48b;--studio-toast-success-text:#e0fff2;--studio-toast-warning-bg:#4c3514;--studio-toast-warning-border:#f2b94b;--studio-toast-warning-text:#fff2cf;--studio-toast-error-bg:#4d202a;--studio-toast-error-border:#f16d82;--studio-toast-error-text:#ffe5e9}
.studio-copy-toast,.studio-page-flash{position:fixed!important;top:max(18px,env(safe-area-inset-top))!important;left:50%!important;transform:translateX(-50%);z-index:20000!important;width:max-content;max-width:min(92vw,580px);box-sizing:border-box;padding:15px 42px 15px 20px;border:1px solid;border-radius:13px;font-weight:600;line-height:1.45;box-shadow:0 16px 48px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.07) inset;cursor:pointer;text-align:left;overflow-wrap:anywhere;animation:studio-toast-tada .65s both}
.studio-copy-toast[data-kind="success"],.studio-page-flash.alert-success{background:var(--studio-toast-success-bg)!important;border-color:var(--studio-toast-success-border)!important;color:var(--studio-toast-success-text)!important}
.studio-copy-toast[data-kind="warning"],.studio-page-flash.alert-warning{background:var(--studio-toast-warning-bg)!important;border-color:var(--studio-toast-warning-border)!important;color:var(--studio-toast-warning-text)!important}
.studio-copy-toast[data-kind="error"],.studio-page-flash.alert-danger{background:var(--studio-toast-error-bg)!important;border-color:var(--studio-toast-error-border)!important;color:var(--studio-toast-error-text)!important}
.studio-copy-toast::after,.studio-page-flash::after{content:'\00d7';position:absolute;right:12px;top:50%;transform:translateY(-50%);font-family:Arial,sans-serif;font-size:20px;line-height:1;font-weight:400;opacity:.75;pointer-events:none}
.studio-copy-toast[hidden],.studio-page-flash[hidden]{display:none!important}
.studio-copy-toast.studio-toast-leaving,.studio-page-flash.studio-toast-leaving{animation:studio-toast-out .2s ease-in forwards}
@keyframes studio-toast-tada{0%{opacity:0;transform:translate(-50%,-24px) scale(.92)}45%{opacity:1;transform:translate(-50%,0) scale(1.07) rotate(-1deg)}65%{transform:translate(-50%,0) scale(.97) rotate(1deg)}82%{transform:translate(-50%,0) scale(1.025)}100%{transform:translate(-50%,0) scale(1)}}
@keyframes studio-toast-out{to{opacity:0;transform:translate(-50%,-12px) scale(.97)}}
@media(max-width:575px){.studio-copy-toast,.studio-page-flash{max-width:calc(100vw - 24px);width:calc(100vw - 24px);top:max(10px,env(safe-area-inset-top))!important}}
@media(prefers-reduced-motion:reduce){.studio-copy-toast,.studio-page-flash,.studio-copy-toast.studio-toast-leaving,.studio-page-flash.studio-toast-leaving{animation:none!important}}

/* v0.9.32 — consistent in-app revision deletion confirmation */
.studio-history-confirm{width:min(440px,calc(100vw - 32px));max-width:440px;padding:24px;border-radius:18px}
.studio-history-confirm-heading{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.studio-history-confirm-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex-shrink:0;border-radius:50%;background:rgba(220,53,69,.16);border:1px solid rgba(220,53,69,.6);color:#ff8794;font-weight:800}
.studio-history-confirm::backdrop{background:rgba(0,0,0,.72)}
.studio-history-item .studio-history-delete{padding:5px 9px}

/* v0.9.33: asynchronous revision deletion notifications */
.studio-history-ajax-notice{position:fixed;z-index:2147483647;top:24px;left:50%;transform:translate(-50%,-15px) scale(.94);opacity:0;pointer-events:none;max-width:min(90vw,480px);padding:13px 20px;border:1px solid #35c48b;border-radius:12px;background:#123e32;color:#e0fff2;box-shadow:0 12px 40px #0008;transition:opacity .2s,transform .25s;font-weight:600;text-align:center;cursor:pointer}
.studio-history-ajax-notice.is-visible{opacity:1;transform:translate(-50%,0) scale(1);pointer-events:auto;animation:studio-history-pop .42s ease-out}
.studio-history-ajax-notice[data-type="error"]{background:#4d202a;color:#ffe5e9;border-color:#f16d82}
@keyframes studio-history-pop{0%{transform:translate(-50%,-15px) scale(.85)}55%{transform:translate(-50%,0) scale(1.06)}100%{transform:translate(-50%,0) scale(1)}}
@media(prefers-reduced-motion:reduce){.studio-history-ajax-notice{transition:none}.studio-history-ajax-notice.is-visible{animation:none}}

/* v0.9.36: ASCII-safe close glyph and spacing for notification text. */
.studio-copy-toast,.studio-page-flash{padding-right:48px!important;min-height:48px}
.studio-copy-toast::after,.studio-page-flash::after{display:flex;align-items:center;justify-content:center;width:24px;height:24px;right:10px;white-space:nowrap}

/* v0.9.39: lyrics controls divider and always-accessible editor shortcut */
.song-editor-content > .auth-card {position:relative;}
.song-toolbar-divider {border:0;height:1px;opacity:1;margin:0 0 1.15rem;background:linear-gradient(90deg,transparent,rgba(174,157,219,.24) 12%,rgba(174,157,219,.24) 88%,transparent);}
.lyrics-editor-float {position:fixed;z-index:1020;top:37%;right:12px;display:flex;align-items:center;gap:8px;padding:11px 12px;border:1px solid rgba(177,151,255,.65);border-radius:12px 0 0 12px;background:rgba(39,31,63,.96);color:#e9dcff;box-shadow:0 7px 24px rgba(0,0,0,.34);cursor:pointer;font-size:12px;font-weight:700;line-height:1.25;transition:background .18s,transform .18s,box-shadow .18s;backdrop-filter:blur(8px);}
.lyrics-editor-float:hover,.lyrics-editor-float:focus-visible {background:#55407f;color:#fff;transform:translateX(-2px);box-shadow:0 8px 28px rgba(0,0,0,.4);}
.lyrics-editor-float-icon {font-size:19px;line-height:1;}
@media(max-width:991.98px){.lyrics-editor-float{top:38%;right:0;padding:10px 9px;max-width:42px;overflow:hidden;white-space:nowrap}.lyrics-editor-float span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.lyrics-editor-float{transition:none}}


/* v0.9.40 — separate controls and keep song tags accessible while scrolling. */
.song-controls-divider {
  border: 0;
  height: 1px;
  opacity: 1;
  margin: .15rem 0 .75rem;
  background: linear-gradient(90deg, transparent, rgba(167,140,244,.42) 18%, rgba(167,140,244,.25) 82%, transparent);
}
.song-editor-content .song-toolbar-sticky {
  position: sticky;
  top: calc(var(--studio-fixed-header-height, 84px) + 8px);
  z-index: 1010;
  padding: .7rem .65rem;
  margin: 0 -.65rem 1rem;
  border: 1px solid rgba(167,140,244,.17);
  border-radius: 12px;
  background: var(--bs-secondary-bg);
  box-shadow: 0 7px 20px rgba(0,0,0,.13);
}
.song-editor-content .song-toolbar-sticky .btn {white-space:nowrap;}
@media (max-width: 767.98px) {
  .song-editor-content .song-toolbar-sticky {
    top: calc(var(--studio-fixed-header-height, 84px) + 8px);
    max-height: min(35vh, 170px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

/* v0.9.41: compact mobile header with expandable navigation */
.studio-mobile-header-actions{display:flex;align-items:center;gap:.5rem;order:3}
.studio-mobile-menu-toggle{display:none}
@media(min-width:761px){.studio-mobile-header-actions{order:3}.studio-header-controls{order:2;margin-left:auto}.studio-header nav{flex-wrap:nowrap!important}}
@media(max-width:760px){
 .studio-header .studio-header-inner{padding-top:.75rem!important;padding-bottom:.75rem!important}
 .studio-header nav{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:.5rem!important}
 .studio-mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:34px}
 .studio-mobile-header-actions{margin-left:auto;order:1}
 .studio-header-controls{order:2;display:none!important;flex:0 0 100%;width:100%;margin:0!important;padding:.75rem 0 .15rem;border-top:1px solid var(--bs-border-color);gap:.5rem!important;align-items:flex-start!important}
 .studio-header-controls.is-open{display:flex!important}
 .studio-header-context{flex-wrap:wrap;max-width:100%;border-right:0;padding-right:0;margin-right:0}
 .studio-header-controls form{margin:0!important}
 .studio-header-controls .btn{white-space:nowrap}
 .studio-menu-icon{font-size:1.1rem;line-height:1}
}

/* v0.9.42: mobile workspace tabs; desktop layout remains unchanged. */
.song-mobile-workspace-tabs{display:none}
@media(max-width:991.98px){
 .song-mobile-workspace-tabs{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;position:sticky;top:calc(var(--studio-fixed-header-height, 72px) + 6px);z-index:35;padding:7px;margin-bottom:14px;border:1px solid rgba(167,139,250,.22);border-radius:13px;background:var(--bs-secondary-bg);box-shadow:0 6px 18px rgba(0,0,0,.18)}
 .song-mobile-workspace-tab{min-width:0;padding:11px 7px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--bs-secondary-color);font-size:.88rem;font-weight:650;line-height:1.25;cursor:pointer}
 .song-mobile-workspace-tab.is-active{background:#a78bfa;color:#171124;box-shadow:0 2px 9px rgba(167,139,250,.2)}
 .song-mobile-workspace-tab:focus-visible{outline:2px solid #c7b6ff;outline-offset:2px}
 .song-editor-layout[data-mobile-workspace-active="styles"] > .song-editor-content{display:none!important}
 .song-editor-layout[data-mobile-workspace-active="lyrics"] > .song-editor-settings{display:none!important}
 .song-editor-layout[data-mobile-workspace-active="lyrics"] .song-editor-content{display:block}
}
@media(prefers-reduced-motion:reduce){.song-mobile-workspace-tab{transition:none}}

/* v0.9.43 — quieter desktop picker, one-row expandable mobile tag navigation */
.song-tag-picker-actions{display:flex;flex-wrap:wrap;gap:.45rem;min-width:0}
.song-tag-picker-toggle{display:none}
@media (min-width: 992px){
 .song-editor-content .song-toolbar-sticky{opacity:.68;transition:opacity .2s ease,box-shadow .2s ease}
 .song-editor-content .song-toolbar-sticky:hover,.song-editor-content .song-toolbar-sticky:focus-within{opacity:1}
}
@media (max-width: 991.98px){
 .song-editor-content .song-toolbar-sticky{display:flex;align-items:flex-start;gap:.4rem;max-height:none;overflow:visible;padding:.5rem;z-index:1010}
 .song-tag-picker-actions{flex:1 1 auto;min-width:0;flex-wrap:nowrap;overflow:hidden;max-height:34px;gap:.4rem}
 .song-tag-picker-actions .btn{flex:0 0 auto}
 .song-tag-picker-toggle{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:.25rem;min-height:32px;padding:.25rem .5rem;border:1px solid rgba(167,140,244,.4);border-radius:8px;background:var(--bs-secondary-bg);color:var(--bs-body-color);font-size:.8rem;font-weight:600;cursor:pointer}
 .song-tag-picker-chevron{font-size:1.15rem;line-height:1;transition:transform .2s ease}
 .song-toolbar-sticky.is-expanded{align-items:flex-start;box-shadow:0 12px 25px rgba(0,0,0,.24)}
 .song-toolbar-sticky.is-expanded .song-tag-picker-actions{flex-wrap:wrap;max-height:min(42vh,300px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .song-toolbar-sticky.is-expanded .song-tag-picker-chevron{transform:rotate(180deg)}
}
@media (prefers-reduced-motion:reduce){.song-editor-content .song-toolbar-sticky,.song-tag-picker-chevron{transition:none}}


/* v0.9.44 — robust mobile header and animated compact tag picker */
@media (max-width: 760px) {
  .studio-header .studio-header-inner { width:100%; max-width:100%; }
  .studio-header nav { display:grid!important; grid-template-columns:minmax(0,1fr) auto; align-items:center!important; gap:.5rem!important; }
  .studio-header .brand { min-width:0; grid-column:1; grid-row:1; }
  .studio-header .studio-mobile-header-actions { display:flex!important; grid-column:2; grid-row:1; order:unset; margin-left:0; flex-shrink:0; }
  .studio-header .studio-mobile-menu-toggle { display:inline-flex!important; visibility:visible!important; opacity:1!important; }
  .studio-header .studio-header-controls { grid-column:1/-1; grid-row:2; order:unset; min-width:0; }
  .studio-header .studio-header-controls:not(.is-open) { display:none!important; }
  .studio-header .studio-header-controls.is-open { display:flex!important; }
}
@media (max-width:991.98px) {
  .song-editor-content .song-toolbar-sticky {
    display:grid; grid-template-columns:minmax(0,1fr) auto;
    align-items:start; column-gap:.5rem; row-gap:0;
    max-height:none; overflow:visible;
  }
  .song-tag-picker-actions {
    grid-column:1; grid-row:1; width:100%;
    display:flex; flex-wrap:nowrap; align-items:flex-start;
    max-height:34px; overflow:hidden;
    transition:max-height .32s cubic-bezier(.22,1,.36,1),opacity .24s ease;
  }
  .song-tag-picker-toggle {
    grid-column:2; grid-row:1;
    white-space:nowrap; align-self:start;
    transition:background-color .2s ease,border-color .2s ease;
  }
  .song-toolbar-sticky.is-expanded .song-tag-picker-actions {
    flex-wrap:wrap; max-height:min(42vh,300px); overflow-y:auto;
  }
  .song-toolbar-sticky.is-expanded .song-tag-picker-toggle {
    background:rgba(167,139,250,.17);border-color:rgba(167,139,250,.7);
  }
}
@media (max-width:480px) {
  .song-editor-content .song-toolbar-sticky { grid-template-columns:minmax(0,1fr) auto; }
  .song-tag-picker-toggle { font-size:.76rem; padding:.25rem .45rem; }
}
@media (prefers-reduced-motion:reduce) {
  .song-tag-picker-actions,.song-tag-picker-toggle {transition:none!important}
}

/* v0.9.45: header mobile controls remain in view across tablet/mobile widths.
   Position actions independently from nav flex/grid wrapping. */
@media (max-width: 991.98px) {
  .studio-header .studio-header-inner { position:relative; width:100%; max-width:100%; }
  .studio-header nav { display:flex!important; flex-wrap:wrap!important; align-items:center!important; justify-content:space-between!important; position:relative; gap:8px!important; padding-right:96px; min-height:40px; }
  .studio-header nav > .brand { display:inline-flex!important; min-width:0; max-width:100%; flex:0 1 auto; order:0; grid-column:auto; grid-row:auto; }
  .studio-header nav > .studio-mobile-header-actions { display:flex!important; position:absolute!important; right:0!important; top:50%; transform:translateY(-50%); margin:0!important; flex:0 0 auto!important; order:1; grid-column:auto; grid-row:auto; z-index:5; gap:6px; }
  .studio-header .studio-mobile-menu-toggle { display:inline-flex!important; visibility:visible!important; opacity:1!important; align-items:center; justify-content:center; min-width:38px; min-height:36px; }
  .studio-header nav > .studio-header-controls { display:none!important; flex:0 0 100%; width:calc(100% + 96px)!important; margin:0 -96px 0 0!important; padding:12px 0 3px!important; border-top:1px solid var(--bs-border-color); order:2; grid-column:auto; grid-row:auto; flex-wrap:wrap!important; }
  .studio-header nav > .studio-header-controls.is-open { display:flex!important; }
  .studio-header .studio-header-context { flex-wrap:wrap; }
}
@media (max-width: 380px) { .studio-header nav { padding-right:90px; } .studio-header nav > .studio-header-controls { width:calc(100% + 90px)!important; margin-right:-90px!important; } }

/* v0.9.46 — stable, centered chevron in mobile tag picker.
   CSS border icon avoids font glyph baseline and fallback font artifacts. */
@media (max-width: 991.98px) {
  .song-tag-picker-toggle {
    display:inline-flex; align-items:center; justify-content:center;
    flex-direction:row; flex-wrap:nowrap; gap:7px;
    height:34px; min-height:34px; padding:0 11px;
    line-height:1; vertical-align:middle; white-space:nowrap;
  }
  .song-tag-picker-toggle-text {display:block;line-height:1.2;}
  .song-tag-picker-chevron {
    display:block; position:relative; flex:none;
    width:7px; height:7px; font-size:0; line-height:0;
    border-right:2px solid currentColor; border-bottom:2px solid currentColor;
    transform:translateY(-2px) rotate(45deg);
    transform-origin:center;
    transition:transform .22s ease;
  }
  .song-toolbar-sticky.is-expanded .song-tag-picker-chevron {
    transform:translateY(2px) rotate(225deg);
  }
}
@media (prefers-reduced-motion:reduce) {
  .song-tag-picker-chevron {transition:none!important;}
}

/* v0.9.47: definitive responsive header layout. Keep controls in the first row. */
@media (max-width: 991.98px) {
  body > header.studio-header .studio-header-inner > nav {
    display:grid!important; grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto; align-items:center!important;
    gap:0.5rem!important; padding:0!important; min-width:0;
    justify-content:stretch!important; flex-wrap:initial!important;
  }
  body > header.studio-header .studio-header-inner > nav > .brand {
    grid-column:1!important;grid-row:1!important;max-width:100%;min-width:0;
    display:inline-flex!important;position:static!important;order:initial!important;
  }
  body > header.studio-header .studio-header-inner > nav > .studio-mobile-header-actions {
    grid-column:2!important;grid-row:1!important;display:flex!important;
    align-items:center!important;justify-content:flex-end!important;
    position:static!important;top:auto!important;right:auto!important;
    transform:none!important;visibility:visible!important;opacity:1!important;
    margin:0!important;padding:0!important;order:initial!important;z-index:2;
  }
  body > header.studio-header .studio-header-inner > nav > .studio-mobile-header-actions > button {
    display:inline-flex!important;align-items:center;justify-content:center;
    flex:0 0 auto!important;visibility:visible!important;opacity:1!important;
    min-width:38px;min-height:36px;
  }
  body > header.studio-header .studio-header-inner > nav > .studio-header-controls {
    grid-column:1/-1!important;grid-row:2!important;position:static!important;
    display:none!important;width:100%!important;min-width:0!important;
    margin:0!important;padding:12px 0 4px!important;order:initial!important;
    flex-wrap:wrap!important;justify-content:flex-start!important;
  }
  body > header.studio-header .studio-header-inner > nav > .studio-header-controls.is-open {display:flex!important;}
}

/* v0.9.50 — compact mobile lyrics actions. Desktop is untouched. */
.song-mobile-quickbar{display:none}
@media(max-width:991.98px){
 .song-editor-layout[data-mobile-workspace-active="lyrics"] ~ .song-mobile-quickbar{display:flex}
 .song-mobile-quickbar{position:fixed;left:50%;transform:translateX(-50%);bottom:0;bottom:env(safe-area-inset-bottom,0px);width:min(100%,720px);z-index:1040;gap:.5rem;padding:.65rem max(.75rem,env(safe-area-inset-left,0px));background:var(--bs-body-bg);border-top:1px solid var(--bs-border-color);box-shadow:0 -7px 24px rgba(0,0,0,.25)}
 .song-mobile-quickbar-button{flex:1;min-width:0;min-height:43px;padding:.55rem .4rem;border:1px solid var(--bs-border-color);border-radius:9px;background:var(--bs-secondary-bg);color:var(--bs-body-color);font-weight:650;font-size:.88rem}
 .song-mobile-quickbar-save{background:#a78bfa;border-color:#a78bfa;color:#171124}
 .song-mobile-quickbar-button:focus-visible{outline:2px solid #c7b6ff;outline-offset:2px}
 .song-editor-layout[data-mobile-workspace-active="lyrics"] ~ .song-mobile-quickbar ~ .song-editor-actions{margin-bottom:85px}
 .song-editor-content .song-block-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.5rem;align-items:center}
 .song-editor-content .song-block-head>strong{min-width:0;overflow-wrap:anywhere;margin:0}
 .song-editor-content .song-block-actions{grid-column:1/-1;display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:.4rem;width:100%}
 .song-editor-content .song-block-actions .btn{flex:1 1 0;min-width:0;min-height:38px;padding:.4rem .2rem;font-size:1rem}
 .song-editor-content .song-block textarea{scroll-margin-top:175px}
 .song-editor-content .song-block{scroll-margin-top:175px}
 .song-editor-content #songTagPicker{scroll-margin-top:calc(var(--studio-fixed-header-height,72px) + 85px)}
}
@media(prefers-reduced-motion:reduce){.song-mobile-quickbar-button{transition:none}}


/* v0.9.52 — avoid obscuring text while the mobile keyboard is open. */
@media(max-width:991.98px){
 .song-mobile-quickbar.is-editing{display:none!important}
 .song-editor-content textarea,
 .song-editor-content input:not([type="checkbox"]):not([type="radio"]){scroll-margin-top:calc(var(--studio-fixed-header-height,72px) + 105px);scroll-margin-bottom:24px}
}

/* v0.9.53 — mobile song library: clear information hierarchy.
   Grid rows keep title + visibility + dates together, genres below and actions last. */
@media (max-width: 991.98px) {
  .studio-library-song {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 16px;
  }
  .studio-library-song-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title dates" "genres genres";
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .studio-library-title-row {
    grid-area: title;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 8px;
  }
  .studio-library-title-row .studio-library-song-title {
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .studio-library-meta {
    grid-area: dates;
    margin: 0;
    text-align: right;
    max-width: 270px;
    line-height: 1.5;
  }
  .studio-library-genres {
    grid-area: genres;
    margin-top: 0 !important;
    min-width: 0;
  }
  .studio-library-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 3px;
  }
}
/* Narrow phones: don't squeeze the title or dates into a tiny column. */
@media (max-width: 575.98px) {
  .studio-library-song-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "dates" "genres";
    row-gap: 6px;
  }
  .studio-library-meta { text-align: left; max-width: none; }
  .studio-library-actions .btn { white-space: normal; }
}

/* v0.9.54 — compact title/visibility row and stacked dates on mobile. */
@media (max-width: 991.98px) {
  .studio-library-song-main { grid-template-columns: minmax(0,1fr) max-content; column-gap: 12px; }
  .studio-library-title-row { display: flex; flex-wrap: nowrap; gap: 5px; min-width: 0; max-width: 100%; align-items: center; }
  .studio-library-title-row .studio-library-song-title { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .studio-library-title-row .studio-library-visibility { flex: 0 0 auto; }
  .studio-library-meta { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; white-space: nowrap; line-height: 1.45; }
  .studio-library-meta > span { display: block; }
}
@media (max-width: 575.98px) {
  .studio-library-song-main { grid-template-columns: minmax(0,1fr); grid-template-areas: "title" "dates" "genres"; }
  .studio-library-meta { align-items: flex-start; white-space: normal; }
}

/* v0.9.56 — album card: full-width title and dates below on narrow screens */
@media (max-width: 767.98px) {
  .album-grid:not(.is-list) .album-card .studio-album-card-meta {
    display: flex; flex-direction: column; align-items: stretch; gap: .55rem;
  }
  .album-grid:not(.is-list) .album-card .studio-album-card-summary {
    width: 100%; min-width: 0; flex: none; overflow-wrap: normal;
  }
  .album-grid:not(.is-list) .album-card .studio-album-card-summary h2 {
    width: 100%; max-width: 100%; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; overflow-wrap: normal; word-break: normal;
  }
  .album-grid:not(.is-list) .album-card .studio-album-card-meta .studio-date-stack {
    width: 100%; max-width: 100%; flex: none; align-items: flex-start;
    text-align: left; font-size: .72rem; gap: 3px;
  }
  .album-grid:not(.is-list) .album-card .studio-album-card-meta .studio-date-stack > span {
    overflow-wrap: normal;
  }
}

/* v0.9.58: saved/unsaved state indicator for the song editor */
.studio-save-state{display:inline-flex;align-items:center;gap:.55rem;margin:.35rem 0 .8rem;padding:.4rem .75rem;border-radius:999px;border:1px solid rgba(52,211,153,.35);background:rgba(16,185,129,.10);color:#86efac;font-size:.83rem;font-weight:600;line-height:1.4;max-width:100%;transition:background-color .2s,border-color .2s,color .2s}
.studio-save-state-dot{display:block;width:.5rem;height:.5rem;flex:none;border-radius:50%;background:#34d399;box-shadow:0 0 0 3px rgba(52,211,153,.12)}
.studio-save-state[data-state="dirty"]{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.45);color:#fbbf24}
.studio-save-state[data-state="dirty"] .studio-save-state-dot{background:#fbbf24;box-shadow:0 0 0 3px rgba(245,158,11,.14)}
[data-bs-theme="light"] .studio-save-state{color:#047857;background:#ecfdf5}
[data-bs-theme="light"] .studio-save-state[data-state="dirty"]{color:#92400e;background:#fffbeb}
@media(max-width:575.98px){.studio-save-state{font-size:.76rem;padding:.38rem .65rem}}

/* v0.9.62 — keyboard shortcut reference */
.lyrics-shortcuts-dialog{max-width:min(94vw,570px)}
.lyrics-shortcuts-list{display:grid;gap:0;margin:0 0 1rem}
.lyrics-shortcuts-list>div{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.75rem 0;border-bottom:1px solid var(--bs-border-color,rgba(160,150,190,.18))}
.lyrics-shortcuts-list dt{flex:0 0 auto;font-weight:500}
.lyrics-shortcuts-list dd{margin:0;text-align:right;color:var(--bs-secondary-color,#a9a5b7)}
.lyrics-shortcuts-list kbd{font-size:.78rem;padding:.22rem .38rem;border-radius:.35rem;background:var(--bs-tertiary-bg,#292737);border:1px solid var(--bs-border-color,#4a455d);color:var(--bs-body-color,#eee)}
@media(max-width:575px){.lyrics-shortcuts-list>div{align-items:flex-start;flex-direction:column;gap:.3rem}.lyrics-shortcuts-list dd{text-align:left}}

/* v0.9.63: searchable Lyrics block navigator */
.lyrics-block-navigator{width:min(620px,calc(100vw - 28px));max-height:min(80dvh,720px)}
.lyrics-block-navigator-results{display:grid;gap:8px;max-height:45dvh;overflow-y:auto;overscroll-behavior:contain;padding:2px}
.lyrics-block-navigator-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;padding:11px 13px;border:1px solid var(--bs-border-color,#494558);border-radius:11px;background:var(--bs-tertiary-bg,#242331);color:var(--bs-body-color,#eee);text-align:left;cursor:pointer}
.lyrics-block-navigator-item:hover,.lyrics-block-navigator-item:focus-visible{border-color:#a78bfa;outline:2px solid transparent;background:rgba(167,139,250,.12)}
.lyrics-block-navigator-excerpt{font-size:.82rem;color:var(--bs-secondary-color,#aaa);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lyrics-block-navigator-highlight{animation:lyrics-nav-pulse 1.6s ease-out}
@keyframes lyrics-nav-pulse{0%,50%{outline:3px solid #a78bfa;outline-offset:3px}100%{outline:3px solid transparent;outline-offset:3px}}
@media(prefers-reduced-motion:reduce){.lyrics-block-navigator-highlight{animation:none;outline:2px solid #a78bfa;outline-offset:2px}}

/* v0.9.64: mobile tabs and tag picker form a measured, non-overlapping sticky stack. */
@media (max-width:991.98px) {
  .song-mobile-workspace-tabs {
    top:calc(var(--studio-fixed-header-height, 72px) + 6px);
    z-index:1050;
    transition:padding .24s ease, gap .24s ease, box-shadow .24s ease;
  }
  .song-mobile-workspace-tab {
    transition:padding .24s ease, min-height .24s ease, font-size .24s ease, background-color .2s ease;
    min-height:44px;
  }
  .song-mobile-workspace-tabs.is-compact {padding:4px;gap:4px;box-shadow:0 4px 12px rgba(0,0,0,.17)}
  .song-mobile-workspace-tabs.is-compact .song-mobile-workspace-tab {
    min-height:30px;padding:5px 5px;font-size:.79rem;line-height:1.15;
  }
  .song-editor-content .song-toolbar-sticky {
    top:calc(var(--studio-fixed-header-height, 72px) + 6px + var(--studio-workspace-tabs-height, 66px) + 6px);
    z-index:1040;
    scroll-margin-top:calc(var(--studio-fixed-header-height, 72px) + var(--studio-workspace-tabs-height, 66px) + 18px);
  }
  .song-blocks .song-block {scroll-margin-top:calc(var(--studio-fixed-header-height, 72px) + var(--studio-workspace-tabs-height, 66px) + 90px)}
}
@media (prefers-reduced-motion:reduce) {
 .song-mobile-workspace-tabs,.song-mobile-workspace-tab {transition:none!important}
}

/* v0.9.65 — compact Lyrics blocks, UI state only */
.song-block .song-block-collapse{white-space:nowrap;font-size:.78rem;line-height:1.2}
.song-block.song-block-collapsed{padding-bottom:.7rem}
.song-block.song-block-collapsed .song-block-head{margin-bottom:0}
.song-block.song-block-collapsed textarea{display:none!important}
@media(max-width:991.98px){
 .song-editor-content .song-block-head .song-block-collapse{grid-column:1/-1;justify-self:start;min-height:34px}
 .song-editor-content .song-block.song-block-collapsed .song-block-actions{margin-top:.15rem}
}

/* v0.9.66: expanded MuzHunter music families */
.genre-classical{background:#a57bdb}.genre-jazz{background:#d5a94f}.genre-folk{background:#70a978}.genre-world{background:#d98a55}

/* v0.9.71: central MuzHunter Styles celebration */
.muzhunter-build-overlay[hidden]{display:none!important}
.muzhunter-build-overlay{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(10,9,23,.68);backdrop-filter:blur(5px);opacity:0;transition:opacity .26s ease}
.muzhunter-build-overlay.is-visible{opacity:1}
.muzhunter-build-card{position:relative;width:min(440px,100%);max-height:calc(100dvh - 40px);overflow:auto;padding:24px 24px 26px;border:1px solid rgba(172,146,236,.4);border-radius:24px;background:#fff;color:#26213c;text-align:center;box-shadow:0 24px 90px rgba(0,0,0,.42);transform:translateY(22px) scale(.86);opacity:0;transition:transform .35s cubic-bezier(.2,1.5,.4,1),opacity .26s ease}
.muzhunter-build-overlay.is-visible .muzhunter-build-card{transform:translateY(0) scale(1);opacity:1}
.muzhunter-build-images{display:flex;justify-content:center;align-items:center;min-height:175px;max-height:240px;margin:0 auto 10px}
.muzhunter-build-images img{width:min(235px,72%);height:235px;max-height:30dvh;object-fit:contain;mix-blend-mode:multiply;filter:none;box-shadow:none}
.muzhunter-build-images img+img{width:min(180px,55%);margin-left:-62px;transform:rotate(8deg)}
.muzhunter-build-eyebrow{font-size:.68rem;font-weight:800;letter-spacing:.12em;color:#8861d2;margin-bottom:7px}
.muzhunter-build-card h2{font-size:clamp(1.12rem,4vw,1.45rem);line-height:1.3;font-weight:850;color:#6745bb;margin:0 0 8px}
.muzhunter-build-detail{font-size:.86rem;line-height:1.5;color:#666079;margin:0}
.muzhunter-build-close{position:absolute;top:12px;right:12px;display:flex;align-items:center;justify-content:center;padding:0;width:34px;height:34px;border:1px solid #ddd7e9;border-radius:10px;background:#fff;color:#696078;font-size:20px;font-weight:400;line-height:1;cursor:pointer;z-index:2;transition:background .18s,border-color .18s,color .18s}
.muzhunter-build-close:hover{background:#f3edff;color:#5d3ba4}
@media(max-width:575.98px){.muzhunter-build-card{padding:20px 16px}.muzhunter-build-images{min-height:130px}.muzhunter-build-images img{height:185px}}
@media(prefers-reduced-motion:reduce){.muzhunter-build-overlay,.muzhunter-build-card{transition:none!important}}

/* v0.9.75: unobtrusive seven-second countdown on the MuzHunter reveal. */
.muzhunter-build-progress{height:4px;margin:18px auto 0;width:min(270px,85%);border-radius:999px;background:#eee9f7;overflow:hidden}
.muzhunter-build-progress-fill{width:100%;height:100%;border-radius:inherit;background:linear-gradient(90deg,#a78bfa,#7d4bc5);transform:scaleX(1);transform-origin:left center}
@media(prefers-reduced-motion:reduce){.muzhunter-build-progress-fill{transition:none!important}}

/* v0.9.76: geometrically centered, font-independent close icon */
.muzhunter-build-close{display:grid;place-items:center;appearance:none;-webkit-appearance:none;flex:none;line-height:0}
.muzhunter-build-close svg{display:block;width:18px;height:18px;flex:none;pointer-events:none}

/* v0.9.77 — MuzHunter gallery */
.muzhunter-gallery-intro{padding:clamp(20px,4vw,42px);border:1px solid var(--bs-border-color);border-radius:24px;background:var(--bs-tertiary-bg)}
.muzhunter-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,255px),1fr));gap:18px}
.muzhunter-gallery-card{min-width:0;border:1px solid var(--bs-border-color);border-radius:20px;overflow:hidden;background:var(--bs-tertiary-bg);transition:transform .2s ease,border-color .2s ease}
.muzhunter-gallery-card:hover{transform:translateY(-3px);border-color:#a78bfa}
.muzhunter-gallery-art{background:#fff;aspect-ratio:1.2;display:flex;align-items:center;justify-content:center;padding:12px}
.muzhunter-gallery-art img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;mix-blend-mode:multiply}
.muzhunter-gallery-art-pair img{width:57%;max-width:57%;margin:0 -6%;}
.muzhunter-gallery-info{padding:18px}
.muzhunter-gallery-info h3{font-size:1.08rem;font-weight:750;margin:0 0 9px}
.muzhunter-gallery-info p{color:var(--bs-secondary-color);font-size:.9rem;line-height:1.5;margin-bottom:12px}
.muzhunter-gallery-pair-name{color:#a78bfa;font-size:.76rem;font-weight:750;margin-bottom:9px}
.muzhunter-gallery-tags{display:flex;flex-wrap:wrap;gap:6px}
.muzhunter-gallery-tags span{font-size:.72rem;border:1px solid var(--bs-border-color);padding:3px 8px;border-radius:999px}
@media(prefers-reduced-motion:reduce){.muzhunter-gallery-card{transition:none}.muzhunter-gallery-card:hover{transform:none}}

/* v0.9.78 — MuzHunter presets gallery in song editor */
.muzhunter-preset-trigger{color:#bba0ff}
.muzhunter-preset-trigger svg{display:block}
.muzhunter-presets-dialog{width:min(1050px,calc(100vw - 24px));max-width:1050px;max-height:min(88dvh,900px);padding:0;border:1px solid rgba(164,141,214,.35);border-radius:20px;background:#1c1d2a;color:#f3f0fa;box-shadow:0 28px 80px rgba(0,0,0,.55);overflow:auto}
.muzhunter-presets-dialog::backdrop{background:rgba(5,4,15,.78);backdrop-filter:blur(5px)}
.muzhunter-presets-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px 24px 16px;background:#1c1d2a;border-bottom:1px solid rgba(164,141,214,.18)}
.muzhunter-presets-eyebrow{font-size:11px;letter-spacing:.13em;font-weight:800;color:#ae8cf5}
.muzhunter-presets-head h2{font-size:23px;margin:6px 0}
.muzhunter-presets-head p{font-size:13px;color:#b6b0c7;margin:0}
.muzhunter-presets-close{flex:0 0 36px;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;border:1px solid #514866;background:transparent;color:#d8d0eb;cursor:pointer}
.muzhunter-presets-close:hover{background:#322b44}
.muzhunter-presets-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(195px,1fr));gap:14px;padding:20px 24px 26px}
.muzhunter-preset-card{min-width:0;display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:8px;padding:12px;border-radius:15px;border:1px solid #393548;background:#242431;color:#f5f0ff;cursor:pointer;transition:transform .16s,border-color .16s,background .16s}
.muzhunter-preset-card:hover,.muzhunter-preset-card:focus-visible{transform:translateY(-3px);border-color:#aa87ef;background:#30293f}
.muzhunter-preset-art{display:flex;align-items:center;justify-content:center;height:150px;border-radius:11px;background:#fff;overflow:hidden}
.muzhunter-preset-art img{height:100%;max-width:100%;width:auto;object-fit:contain;flex:1;min-width:0}
.muzhunter-preset-card strong{font-size:15px}
.muzhunter-preset-description{font-size:12px;color:#c2b9d0}
.muzhunter-preset-tags{font-size:11px;line-height:1.5;color:#a99bbd;flex:1}
.muzhunter-preset-apply{font-size:12px;font-weight:700;color:#b99aff;margin-top:4px}
@media(max-width:575px){.muzhunter-presets-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:12px}.muzhunter-presets-head{padding:15px}.muzhunter-presets-head h2{font-size:18px}.muzhunter-preset-art{height:110px}.muzhunter-preset-card{padding:9px}}
@media(max-width:380px){.muzhunter-presets-grid{grid-template-columns:1fr}}

/* v0.9.81: official MuzHunter skull in preset button */
.muzhunter-preset-trigger{overflow:hidden;padding:2px;display:inline-grid;place-items:center}
.muzhunter-preset-skull{display:block;width:23px;height:23px;object-fit:contain;filter:drop-shadow(0 0 2px rgba(175,140,255,.25));pointer-events:none}

/* v0.9.83: MuzHunter preset tuning dialog */
.muzhunter-preset-configure{width:min(640px,calc(100vw - 24px));max-width:640px;max-height:90dvh;overflow:auto;padding:0;border:1px solid #55476c;border-radius:19px;background:#1c1d2a;color:#f4f0ff;box-shadow:0 25px 75px #0009}
.muzhunter-preset-configure::backdrop{background:rgba(5,4,15,.76);backdrop-filter:blur(4px)}
.muzhunter-config-top{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:20px 22px;border-bottom:1px solid #413b53}
.muzhunter-config-top h2{font-size:21px;margin:5px 0 0}
.muzhunter-config-body{padding:20px 22px 22px}
.muzhunter-config-genres{font-size:13px;color:#bcb2cd;margin:0 0 20px}
.muzhunter-config-fieldset{border:0;margin:0 0 20px;padding:0}
.muzhunter-config-fieldset legend{font-weight:700;font-size:14px;margin-bottom:10px}
.muzhunter-intensity-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.muzhunter-intensity-choices label{cursor:pointer;min-width:0}
.muzhunter-intensity-choices input{position:absolute;opacity:0}
.muzhunter-intensity-choices span{display:block;height:100%;padding:12px 9px;border:1px solid #4c455c;border-radius:12px;font-weight:700;font-size:13px;transition:.15s}
.muzhunter-intensity-choices small{display:block;color:#bcb3cc;font-weight:400;font-size:11px;margin-top:5px}
.muzhunter-intensity-choices input:checked+span{border-color:#ac8aff;background:#392d57}
.muzhunter-intensity-choices input:focus-visible+span{outline:2px solid #d2baff;outline-offset:2px}
.muzhunter-config-check{display:flex;align-items:baseline;gap:9px;font-size:13px;margin-bottom:10px;cursor:pointer}
.muzhunter-config-check input{accent-color:#a78bfa}
.muzhunter-config-preview-label{font-size:14px;font-weight:700;display:block;margin-bottom:8px}
#hunterConfigPreview{display:block;width:100%;resize:vertical;min-height:105px;background:#0d0e18;border:1px solid #514862;border-radius:11px;color:#eee7ff;padding:12px;font-size:13px;line-height:1.55}
.muzhunter-config-note{font-size:12px;color:#bdb4ce;margin:10px 0 18px}
.muzhunter-config-actions{display:flex;gap:10px;justify-content:flex-end}
@media(max-width:575px){.muzhunter-config-top,.muzhunter-config-body{padding:15px}.muzhunter-intensity-choices{grid-template-columns:1fr}.muzhunter-intensity-choices span{padding:10px}.muzhunter-intensity-choices small{display:inline;margin-left:8px}}

/* v0.9.85: active MuzHunter atmosphere status */
.hunter-active-preset:not([hidden]){display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:11px;padding:8px 11px;border:1px solid rgba(167,139,250,.36);border-radius:10px;background:rgba(167,139,250,.09);color:var(--bs-body-color);font-size:12px}
.hunter-active-preset button{border:1px solid rgba(167,139,250,.45);background:transparent;color:#b49af6;border-radius:7px;padding:4px 8px;cursor:pointer}
.hunter-active-preset button:hover{background:rgba(167,139,250,.14)}

/* v0.9.87: editorial guide shared by landing page and dashboard */
.studio-guide{border:1px solid var(--bs-border-color-translucent);background:linear-gradient(140deg,rgba(157,124,240,.065),transparent 52%),var(--bs-tertiary-bg);border-radius:22px;padding:clamp(20px,3vw,38px);overflow:hidden}
.studio-guide-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}
.studio-guide-heading h2{font-size:clamp(1.55rem,2.5vw,2.25rem);font-weight:800;letter-spacing:-.035em;margin:12px 0}
.studio-guide-heading p{color:var(--bs-secondary-color);line-height:1.65;max-width:740px;margin:0}
.studio-guide-mark{width:68px;height:68px;display:grid;place-items:center;flex-shrink:0;border-radius:20px;background:linear-gradient(135deg,#b19aff,#7151c9);color:#211833;font-size:36px;box-shadow:0 12px 36px rgba(131,91,226,.16)}
.studio-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.studio-guide-item{border:1px solid var(--bs-border-color-translucent);border-radius:16px;padding:21px;background:var(--bs-body-bg)}
.studio-guide-number{display:inline-flex;font-size:12px;font-weight:800;letter-spacing:.12em;color:#a88aff;margin-bottom:14px}
.studio-guide-item h3{font-size:1.06rem;font-weight:750;margin-bottom:10px}
.studio-guide-item p{color:var(--bs-secondary-color);font-size:.93rem;line-height:1.65;margin:0}
.studio-guide-rights{display:flex;gap:17px;margin-top:17px;padding:24px;border-radius:17px;background:linear-gradient(115deg,rgba(161,126,248,.13),rgba(161,126,248,.025));border:1px solid rgba(161,126,248,.28)}
.studio-guide-rights-icon{display:grid;place-items:center;flex:0 0 42px;height:42px;border-radius:12px;background:rgba(168,138,255,.17);color:#b79aff;font-size:22px}
.studio-guide-rights h3{font-size:1.1rem;font-weight:750;margin:0 0 10px}
.studio-guide-rights p{font-size:.94rem;line-height:1.7;margin:0 0 10px}
.studio-guide-rights .studio-guide-disclaimer{font-size:.83rem;color:var(--bs-secondary-color);margin-bottom:0}
.studio-guide-bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding-top:22px;color:var(--bs-secondary-color);font-size:.91rem}
@media(max-width:767px){.studio-guide-grid{grid-template-columns:1fr}.studio-guide-mark{display:none}.studio-guide-rights{padding:17px;gap:12px}.studio-guide-rights-icon{flex-basis:32px;height:32px}.studio-guide-bottom .btn{width:100%}}

/* v0.9.88 — author settings and public contacts */
.studio-settings-page{max-width:920px;padding-top:26px}.studio-settings-card{padding:clamp(20px,3vw,32px)}.studio-settings-card h2{margin-bottom:12px}.studio-shared-author{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:20px 24px;margin-bottom:18px}.studio-shared-author-links{display:flex;flex-wrap:wrap;gap:8px}@media(max-width:575px){.studio-shared-author{padding:16px}}

/* v0.9.92: two-column author settings */
.studio-settings-page{max-width:1120px}
.studio-settings-form .studio-settings-card{height:100%;margin:0}
.studio-settings-form .form-control{min-width:0}
.studio-settings-actions{display:flex;justify-content:flex-start}
@media(max-width:767.98px){.studio-settings-actions{justify-content:stretch}.studio-settings-actions .btn{width:100%}}

/* RC3: consistent button geometry and readable primary actions in both themes. */
.btn:not(.btn-sm):not(.btn-close) {
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  min-height:40px;padding:.5rem .9rem;line-height:1.25;
  border-radius:12px;vertical-align:middle;text-align:center;
}
.btn.btn-lg {min-height:46px;padding:.65rem 1.1rem;font-size:1.05rem;}
.btn.btn-sm {border-radius:9px;line-height:1.3;}
.btn-primary {
  --bs-btn-color:#fff;--bs-btn-hover-color:#fff;--bs-btn-active-color:#fff;
  --bs-btn-disabled-color:#fff;color:#fff;
}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active {color:#fff;}
.btn:focus-visible {outline:2px solid var(--studio-accent);outline-offset:3px;}
@media(max-width:767.98px){.studio-settings-actions .btn{width:100%;}}

/* RC5 — signature balance: quiet satin glass, subtle rim and light typography. */
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark) {
  position:relative;
  overflow:hidden;
  border-radius:12px;
  border-width:1px;
  font-weight:400;
  letter-spacing:.005em;
  text-shadow:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 2px 7px rgba(23,16,48,.10);
  transition:background-color .17s ease,border-color .17s ease,box-shadow .17s ease,transform .17s ease;
}
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark)::before {
  content:"";position:absolute;inset:1px;border-radius:10px;pointer-events:none;
  border:1px solid rgba(255,255,255,.11);
  background:linear-gradient(160deg,rgba(255,255,255,.095),transparent 46%,rgba(255,255,255,.035));
}
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark)::after {
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.11;
  background:repeating-linear-gradient(147deg,transparent 0 28px,rgba(255,255,255,.12) 29px,transparent 30px 54px);
}
.btn-primary {
  --bs-btn-color:#fff;--bs-btn-hover-color:#fff;--bs-btn-active-color:#fff;
  --bs-btn-bg:#7954cb;--bs-btn-border-color:#8f68df;
  --bs-btn-hover-bg:#845de0;--bs-btn-hover-border-color:#a58bf0;
  --bs-btn-active-bg:#6842bd;--bs-btn-active-border-color:#7955cf;
  color:#fff;
  background-image:linear-gradient(155deg,#9a70e6 0%,#8054d2 55%,#7045c3 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 3px 10px rgba(99,58,170,.17);
}
.btn-primary:hover,.btn-primary:focus-visible {
  color:#fff;background-image:linear-gradient(155deg,#a47af0,#875bdc 55%,#754cc8);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.34),0 4px 13px rgba(105,64,180,.24);
}
.btn-primary:active,.btn-primary.active,.btn-primary.show {
  color:#fff;background-image:linear-gradient(155deg,#6e48bd,#8559d4);
}
.btn:is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark,.btn-secondary) {
  background-image:linear-gradient(155deg,rgba(156,125,217,.075),rgba(127,99,191,.025) 75%);
}
[data-bs-theme="dark"] .btn:is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark,.btn-secondary) {
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 2px 8px rgba(0,0,0,.13);
}
[data-bs-theme="light"] .btn:is(.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark,.btn-secondary) {
  box-shadow:inset 0 1px 0 rgba(255,255,255,.60),0 2px 8px rgba(59,42,104,.08);
}
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark):not(:disabled):not(.disabled):hover {
  transform:translateY(-1px);
}
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark):not(:disabled):not(.disabled):active {
  transform:translateY(0);
  box-shadow:inset 0 1px 4px rgba(20,11,45,.17);
}
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark):disabled,
.btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark).disabled {
  transform:none;box-shadow:none;opacity:.55;
}
@media(prefers-reduced-motion:reduce) {
  .btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark) {transition:none}
  .btn:is(.btn-primary,.btn-secondary,.btn-outline-primary,.btn-outline-secondary,.btn-outline-light,.btn-outline-dark):hover {transform:none}
}

/* RC6 — quiet active Lyrics card and persistent filled-content marker. */
.song-block{isolation:isolate;overflow:hidden}
.song-block::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0;
 background:radial-gradient(ellipse at 100% 0%,rgba(163,119,245,.16),transparent 48%),
 repeating-linear-gradient(145deg,transparent 0 27px,rgba(170,132,245,.035) 28px,transparent 29px 53px);
 transition:opacity .2s ease}
.song-block:focus-within{border-color:rgba(168,128,246,.74);box-shadow:0 0 0 1px rgba(151,111,231,.14),0 8px 25px rgba(87,55,158,.09)}
.song-block:focus-within::before{opacity:1}
.song-block:focus-within .song-block-head>strong{color:#bb9afc}
.song-block-filled-mark{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
 font-size:.72rem;line-height:1;color:#a98bea;background:rgba(150,109,235,.13);
 border:1px solid rgba(169,139,250,.32);border-radius:999px;width:20px;height:20px;
 margin-inline-start:.15rem;margin-inline-end:.25rem}
.song-block-filled-mark[hidden]{display:none!important}
.song-block.song-block-collapsed.song-block-filled{border-left:2px solid rgba(167,139,250,.65)}
[data-bs-theme="light"] .song-block:focus-within .song-block-head>strong{color:#6845ac}
[data-bs-theme="light"] .song-block-filled-mark{color:#7046bd;background:rgba(120,76,200,.10)}
@media(prefers-reduced-motion:reduce){.song-block::before{transition:none}}
