/* =====================================================================
   Cue1860 — /discover pages (public playlists + artist requests)
   Loaded on top of layouts/public.blade.php. Uses the landing page's
   variables (--bg, --bg-2, --bg-card, --text, --muted, --violet, --pink,
   --display, --body) and classes (.wrap, .btn-primary, .btn-secondary,
   .badge-outline, .text-gradient, .glow-violet, .glow-pink).
   Everything here is scoped under .disc so the landing page is untouched.
   ===================================================================== */

.disc {
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .12);
    --field: rgba(255, 255, 255, .03);
    --field-hover: rgba(255, 255, 255, .05);
    --grad: linear-gradient(90deg, var(--violet), var(--pink));
    --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .16), rgba(236, 72, 153, .10));
    --ring: 0 0 0 4px rgba(139, 92, 246, .18);
    --error: #FB7185;
    --ok: #6EE7B7;
    --violet-soft: #C4B5FD;
    position: relative;
    overflow-x: clip;
}
[hidden] { display: none !important; }
.disc :focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
/* zero-specificity reset (:where) so component classes like .btn-primary keep their own font */
:where(.disc) :where(button, input, textarea, select) { font: inherit; color: inherit; }
.disc img { max-width: 100%; display: block; }

.sr-only, .disc .hp {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Background glows (same recipe as the landing hero) */
.d-glow-1, .d-glow-2 { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; z-index: 0; }
.d-glow-1 { top: -128px; left: -128px; width: 480px; height: 480px; opacity: .8; }
.d-glow-2 { top: 80px; right: -80px; width: 520px; height: 520px; opacity: .55; }
.disc .wrap { position: relative; z-index: 1; }

/* Page offset for the fixed 80px header */
.d-page { padding: 112px 0 96px; }

.btn-primary { border: 0; cursor: pointer; }
.btn-primary.d-block { width: 100%; justify-content: center; padding: 16px 26px; font-size: 15px; }
.btn-primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-secondary.is-off { opacity: .35; pointer-events: none; }

/* =========================== HERO =========================== */
.d-hero { position: relative; padding: 152px 0 72px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.d-hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: end; }
@media (min-width: 1024px) { .d-hero-grid { grid-template-columns: 7fr 5fr; } }

.d-hero h1 {
    margin-top: 24px; font-family: var(--display); font-weight: 700; color: #fff;
    font-size: clamp(40px, 7vw, 68px); line-height: .98; letter-spacing: -.03em; max-width: 14ch;
}
.d-sub { margin-top: 24px; max-width: 540px; font-size: 18px; line-height: 1.7; color: var(--muted); }

.d-search {
    margin-top: 32px; max-width: 560px;
    display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px;
    border: 1px solid var(--line-2); border-radius: 999px;
    background: rgba(255, 255, 255, .03); backdrop-filter: blur(20px);
    transition: border-color .2s, box-shadow .2s;
}
.d-search:focus-within { border-color: rgba(139, 92, 246, .6); box-shadow: var(--ring); }
.d-search svg { color: var(--muted); flex: none; }
.d-search input { flex: 1; min-width: 0; padding: 10px 6px; border: 0; background: transparent; outline: none; font-size: 15px; }
.d-search input::placeholder { color: #6B7280; }
.d-search .btn-primary { padding: 12px 22px; }

/* Level meter — the one moving thing on the page */
.eq { display: flex; align-items: flex-end; gap: 7px; height: 220px; }
.eq span {
    flex: 1; height: var(--h, 60%); border-radius: 6px;
    background: linear-gradient(to top, var(--violet), var(--pink));
    opacity: .85; transform-origin: bottom;
    animation: d-level 1.6s ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * -0.23s);
}
@keyframes d-level { 0% { transform: scaleY(.35); } 50% { transform: scaleY(1); } 100% { transform: scaleY(.6); } }

/* =========================== SHELF =========================== */
.d-shelf { padding-top: 56px; padding-bottom: 96px; }
.d-shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.d-shelf-head h2 { font-family: var(--display); font-size: clamp(26px, 4vw, 36px); font-weight: 700; letter-spacing: -.02em; color: #fff; line-height: 1.1; }
.d-count { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

.d-sort { display: flex; align-items: center; gap: 12px; }
.d-sort > label { color: var(--muted); font-size: 14px; white-space: nowrap; }
.d-sort .cs { min-width: 200px; }
.d-sort .cs-btn { border-radius: 999px; padding: 11px 18px; }
.d-sort .cs-list { left: auto; right: 0; min-width: 220px; }

.d-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 36px 24px; }
.d-tile { display: block; }
.d-tile-art {
    position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 24px;
    border: 1px solid var(--line); background: var(--grad-soft);
    display: grid; place-items: center; margin-bottom: 14px;
    transition: transform .3s, border-color .3s, box-shadow .3s;
}
.d-tile-art img { width: 100%; height: 100%; object-fit: cover; }
.d-tile:hover .d-tile-art { transform: translateY(-4px); border-color: rgba(139, 92, 246, .45); box-shadow: 0 18px 44px rgba(139, 92, 246, .25); }
.d-tile h3 { font-family: var(--display); font-size: 18px; font-weight: 600; color: #fff; line-height: 1.25; }
.d-tile p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.d-tile.is-closed .d-tile-art { opacity: .5; }
.d-flag { display: block; font-style: italic; }
.d-tag {
    position: absolute; top: 12px; left: 12px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(10, 14, 26, .65); backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, .45);
}
.d-initial { font-family: var(--display); font-weight: 800; font-size: 64px; color: var(--violet-soft); }

.d-pager { margin-top: 56px; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.d-pager-now { color: var(--muted); font-size: 14px; }
.d-empty { padding: 48px 0; color: var(--muted); }
.d-empty p { margin-bottom: 18px; }

/* ======================== PLAYLIST PAGE ======================== */
.d-back { display: inline-flex; margin-bottom: 28px; color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s; }
.d-back::before { content: "‹"; margin-right: 6px; }
.d-back:hover { color: #fff; }

.d-pl-head { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: end; margin-bottom: 44px; }
.d-pl-art {
    aspect-ratio: 1; overflow: hidden; border-radius: 28px;
    border: 1px solid var(--line); background: var(--grad-soft);
    display: grid; place-items: center;
    box-shadow: 0 24px 70px rgba(139, 92, 246, .25);
}
.d-pl-art img { width: 100%; height: 100%; object-fit: cover; }
.d-pl-info h1 {
    margin-top: 18px; font-family: var(--display); font-weight: 700; color: #fff;
    font-size: clamp(32px, 5vw, 56px); line-height: 1; letter-spacing: -.03em;
}
.d-pl-desc { margin-top: 14px; max-width: 60ch; color: var(--muted); line-height: 1.7; }
.d-pl-meta { margin: 10px 0 22px; color: var(--muted); font-size: 14px; }

.d-pl-body { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: start; }
.d-player iframe { width: 100%; height: 620px; border: 0; border-radius: 24px; background: var(--bg-card); }

/* Glass panel: request form + email code (no hover lift, no clipping so dropdowns can open) */
.d-panel {
    position: sticky; top: 104px;
    padding: 30px; border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(139, 92, 246, .08), transparent 160px), rgba(255, 255, 255, .02);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.d-panel h1, .d-panel h2 { font-family: var(--display); font-weight: 700; color: #fff; letter-spacing: -.02em; }
.d-panel h2 { font-size: 26px; line-height: 1.15; }
.d-panel h1 { margin-top: 16px; font-size: 34px; line-height: 1.1; }
.d-lead { margin: 8px 0 24px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.d-lead strong { color: #fff; }

.d-done p { margin-top: 10px; color: var(--muted); line-height: 1.6; }
.d-done .btn-secondary { margin-top: 22px; }
.d-ref { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: .06em; }

.d-alert, .d-notice { padding: 12px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 14px; }
.d-alert { background: rgba(251, 113, 133, .08); border: 1px solid rgba(251, 113, 133, .35); color: var(--error); }
.d-notice { background: rgba(110, 231, 183, .08); border: 1px solid rgba(110, 231, 183, .35); color: var(--ok); }

/* ============================ FORM ============================ */
.disc .field { margin-bottom: 18px; }
.disc .field > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.disc .opt { color: var(--muted); font-weight: 500; }
.disc .field input, .disc .field textarea {
    width: 100%; padding: 13px 16px; border-radius: 14px;
    border: 1px solid var(--line-2); background: var(--field); color: var(--text);
    font-size: 15px; outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.disc .field input::placeholder, .disc .field textarea::placeholder { color: #6B7280; }
.disc .field input:hover, .disc .field textarea:hover { background: var(--field-hover); }
.disc .field input:focus, .disc .field textarea:focus { border-color: rgba(139, 92, 246, .7); box-shadow: var(--ring); background: var(--field-hover); }
.disc .field input[readonly] { color: var(--muted); }
.disc .field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.disc .field small { display: block; margin-top: 7px; color: var(--muted); font-size: 12.5px; }
.disc .has-error input, .disc .has-error textarea, .disc .has-error .cs-btn { border-color: var(--error) !important; }
.disc .err { display: block; margin-top: 7px; color: var(--error); font-size: 13px; }
.d-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

#lookup-status.is-busy  { color: var(--violet-soft); }
#lookup-status.is-ok    { color: var(--ok); }
#lookup-status.is-error { color: var(--error); }

.d-song {
    display: flex; align-items: center; gap: 14px; padding: 12px; margin: -4px 0 18px;
    border-radius: 16px; background: var(--grad-soft); border: 1px solid rgba(139, 92, 246, .4);
}
.d-song img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.d-song-meta { min-width: 0; }
.d-song-meta strong { display: block; color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-song-meta span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.d-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 22px; cursor: pointer; font-size: 14px; color: var(--text); }
.d-check input { accent-color: var(--violet); width: 18px; height: 18px; margin-top: 2px; flex: none; }

/* ======================= CUSTOM DROPDOWN ======================= */
.cs { position: relative; }
.cs-native {
    position: absolute !important; opacity: 0; pointer-events: none;
    width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important;
}
.cs-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 13px 16px; border-radius: 14px; cursor: pointer; text-align: left;
    border: 1px solid var(--line-2, rgba(255,255,255,.12)); background: rgba(255, 255, 255, .03);
    color: var(--text); font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.cs-btn:hover { background: rgba(255, 255, 255, .05); }
.cs-btn:focus-visible { outline: none; border-color: rgba(139, 92, 246, .7); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.cs-btn.is-empty .cs-value { color: #6B7280; }
.cs-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-chev { flex: none; color: var(--muted); transition: transform .25s ease, color .2s; }
.cs.is-open .cs-btn { border-color: rgba(139, 92, 246, .7); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); background: rgba(255, 255, 255, .05); }
.cs.is-open .cs-chev { transform: rotate(180deg); color: #C4B5FD; }

.cs-list {
    position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 8px);
    margin: 0; padding: 6px; list-style: none;
    background: rgba(18, 22, 35, .97); backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, .10); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px rgba(139, 92, 246, .12);
    max-height: 300px; overflow-y: auto; overscroll-behavior: contain; outline: none;
    animation: cs-in .16s ease-out;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.cs-list.is-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cs-list[hidden] { display: none !important; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.cs-list [role="option"] {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border-radius: 12px; cursor: pointer;
    color: #D1D5DB; font-size: 14px;
    transition: background .12s;
}
.cs-text { min-width: 0; display: flex; flex-direction: column; }
.cs-label { font-weight: 600; }
.cs-hint { margin-top: 2px; color: var(--muted); font-size: 12px; }
.cs-check { flex: none; color: var(--pink); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.cs-list [role="option"].is-active { background: rgba(139, 92, 246, .14); color: #fff; }
.cs-list [role="option"][aria-selected="true"] { background: rgba(139, 92, 246, .10); color: #fff; }
.cs-list [role="option"][aria-selected="true"].is-active { background: rgba(139, 92, 246, .18); }
.cs-list [role="option"][aria-selected="true"] .cs-check { opacity: 1; transform: none; }
.cs-list [role="option"][aria-selected="true"] .cs-label {
    background: linear-gradient(90deg, var(--violet), var(--pink));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ========================= EMAIL CODE ========================= */
.d-verify { max-width: 560px; }
.d-verify .d-panel { position: relative; top: 0; }
.d-verify-song { display: flex; align-items: center; gap: 12px; padding: 10px; margin-bottom: 22px; border-radius: 16px; background: var(--grad-soft); }
.d-verify-song img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.d-verify-song strong { display: block; color: #fff; }
.d-verify-song span { color: var(--muted); font-size: 13px; }
.disc .field input.d-otp {
    font-family: var(--display); font-size: 34px; font-weight: 800; color: #fff;
    letter-spacing: .5em; text-align: center; padding: 16px 16px 16px calc(16px + .5em);
}
.d-resend { margin-top: 18px; color: var(--muted); font-size: 14px; }
.d-link { background: none; border: 0; padding: 0; color: #C4B5FD; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.d-link:hover { color: #fff; }
.d-link:disabled { color: var(--muted); cursor: default; text-decoration: none; }

/* ========================= MOTION / RESPONSIVE ========================= */
@media (prefers-reduced-motion: reduce) {
    .eq span, .cs-list { animation: none; }
    .d-tile-art, .cs-chev, .cs-check { transition: none; }
}

@media (max-width: 1023px) {
    .eq { height: 120px; }
    .d-pl-body { grid-template-columns: 1fr; }
    .d-panel { position: relative; top: 0; }
    .d-player iframe { height: 460px; }
}
@media (max-width: 767px) {
    .d-hero { padding: 116px 0 48px; }
    .eq { height: 72px; order: -1; }
    .d-sub { font-size: 16px; }
    .d-search { padding-left: 14px; }
    .d-search .btn-primary { padding: 11px 16px; }
    .d-page { padding: 100px 0 64px; }
    .d-pl-head { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; }
    .d-pl-art { border-radius: 20px; }
    .d-row { grid-template-columns: 1fr; }
    .d-panel { padding: 22px; border-radius: 20px; }
    .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
    .d-tile-art { border-radius: 18px; }
    .d-sort { width: 100%; }
    .d-sort .cs { flex: 1; min-width: 0; }
    .cs-list { max-height: 50vh; }
}
@media (max-width: 380px) {
    .cs-list.is-grid { grid-template-columns: 1fr; }
}

/* ===================== BECOME A COLLABORATOR ===================== */
.d-hero-collab { margin-top: 18px; color: var(--muted); font-size: 14px; }
.d-hero-collab .d-link { margin-left: 4px; }

.d-collab { padding-bottom: 96px; }
.d-collab-box {
    position: relative; overflow: hidden; border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, .10); background: var(--bg-card);
    padding: 64px 32px; text-align: center;
}
.d-collab-g1, .d-collab-g2 { position: absolute; width: 280px; height: 280px; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.d-collab-g1 { top: -100px; left: 20%; }
.d-collab-g2 { bottom: -100px; right: 20%; }
.d-collab-inner { position: relative; max-width: 680px; margin: 0 auto; }
.d-collab-inner h2 {
    margin-top: 20px; font-family: var(--display); font-weight: 700; color: #fff;
    font-size: clamp(30px, 5vw, 50px); line-height: 1.08; letter-spacing: -.02em;
}
.d-collab-inner > p { margin-top: 18px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.d-collab-points {
    list-style: none; margin: 26px 0 32px; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
    color: var(--text); font-size: 14px; font-weight: 600;
}
.d-collab-points li { display: inline-flex; align-items: center; gap: 8px; }
.d-collab-points li::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--violet), var(--pink));
}
.d-collab-inner .btn-primary { font-size: 15px; }

/* ----- Popup ----- */
.d-modal {
    margin: auto; padding: 0; border: 0; background: transparent; color: var(--text);
    width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
    overflow: visible;
}
.d-modal::backdrop { background: rgba(5, 7, 14, .72); backdrop-filter: blur(6px); }
.d-modal[open] { animation: d-modal-in .2s ease-out; }
@keyframes d-modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
html.d-modal-open { overflow: hidden; }

.d-modal-card {
    position: relative; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 34px 30px 30px; border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(139, 92, 246, .10), transparent 180px), #0F1322;
    box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.d-modal-card h2 { margin-top: 14px; font-family: var(--display); font-weight: 700; color: #fff; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; }
.d-modal-close {
    position: absolute; top: 16px; right: 16px; width: 38px; height: 38px;
    display: grid; place-items: center; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .10); background: rgba(255, 255, 255, .04); color: var(--muted);
    transition: background .2s, color .2s;
}
.d-modal-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.d-done-icon {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--violet), var(--pink)); box-shadow: 0 0 28px rgba(139, 92, 246, .5);
}
.d-modal [data-step="done"] .btn-secondary { margin-top: 20px; cursor: pointer; }

@media (max-width: 767px) {
    .d-collab-box { padding: 44px 20px; border-radius: 24px; }
    .d-collab-inner > p { font-size: 15px; }
    .d-modal-card { padding: 28px 18px 22px; border-radius: 22px; }
    .d-modal-card h2 { font-size: 24px; padding-right: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .d-modal[open] { animation: none; }
}

/* =========================== SHARE =========================== */
.d-pl-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.d-pl-actions .btn-primary { border: 0; cursor: pointer; }

.d-share { width: min(820px, calc(100vw - 24px)); }
.d-share-body { margin-top: 22px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; align-items: start; }

.d-share-preview {
    position: relative; width: 100%; aspect-ratio: 9 / 16;
    border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10); background: var(--bg-card);
    display: grid; place-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
    transition: aspect-ratio .2s;
}
.d-share-preview[data-format="square"] { aspect-ratio: 1 / 1; }
.d-share-preview img { width: 100%; height: 100%; object-fit: cover; }
.d-share-loading { color: var(--muted); font-size: 13px; padding: 12px; text-align: center; }

.d-share-formats {
    display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .10); background: rgba(255, 255, 255, .03);
}
.d-share-formats button {
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
    padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700;
    transition: background .2s, color .2s;
}
.d-share-formats button[aria-pressed="true"] { color: #fff; background: linear-gradient(90deg, var(--violet), var(--pink)); }

.d-share-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-share-btn {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border-radius: 14px; border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03); color: #fff; cursor: pointer;
    font-size: 14px; font-weight: 600; text-align: left;
    transition: background .2s, border-color .2s, transform .15s;
}
.d-share-btn:hover { background: rgba(255, 255, 255, .06); border-color: rgba(139, 92, 246, .45); }
.d-share-btn:active { transform: translateY(1px); }
.d-share-btn .ic {
    width: 34px; height: 34px; flex: none; border-radius: 10px;
    display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #E5E7EB;
}
.d-share-btn.is-ig { grid-column: 1 / -1; border-color: rgba(236, 72, 153, .45); background: linear-gradient(90deg, rgba(139, 92, 246, .16), rgba(236, 72, 153, .14)); }
.d-share-btn.is-ig .ic { background: linear-gradient(135deg, #F59E0B, #EC4899 50%, #8B5CF6); color: #fff; }
.d-share-btn.is-wa .ic { background: rgba(37, 211, 102, .16); color: #4ADE80; }
.d-share-tip { margin-top: 14px; min-height: 20px; color: var(--violet-soft, #C4B5FD); font-size: 13.5px; line-height: 1.5; }

@media (max-width: 680px) {
    .d-share-body { grid-template-columns: 1fr; }
    .d-share-preview { width: 62%; margin: 0 auto; }
    .d-share-preview[data-format="square"] { width: 78%; }
}
@media (max-width: 380px) {
    .d-share-grid { grid-template-columns: 1fr; }
}

/* ---------- Instagram steps in the share popup ---------- */
.d-share-steps {
    margin-top: 14px; padding: 14px 16px; border-radius: 14px;
    border: 1px dashed rgba(139, 92, 246, .40); background: rgba(139, 92, 246, .06);
    font-size: 13px; color: var(--muted); line-height: 1.5;
}
.d-share-steps strong { display: block; color: #fff; font-size: 13.5px; margin-bottom: 6px; }
.d-share-steps ol { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.d-share-steps b { color: #E5E7EB; }

/* =====================================================================
   PLAYLIST PAGE — MOBILE
   ===================================================================== */
.d-mbar { display: none; }
.d-pl-info h1 { overflow-wrap: anywhere; }
#request { scroll-margin-top: 100px; }

@media (max-width: 767px) {
    /* Header: big cover on top, centred info below */
    .d-page { padding-top: 96px; }
    .d-back { margin-bottom: 16px; }
    .d-pl-head {
        grid-template-columns: 1fr; justify-items: center; text-align: center;
        gap: 18px; margin-bottom: 26px;
    }
    .d-pl-art { width: min(72vw, 290px); border-radius: 22px; }
    .d-pl-info { display: flex; flex-direction: column; align-items: center; }
    .d-pl-info h1 { margin-top: 12px; font-size: clamp(28px, 8vw, 38px); line-height: 1.08; }
    .d-pl-desc { margin-top: 10px; font-size: 15px; }
    .d-pl-meta { margin: 8px 0 0; }
    .d-pl-actions { display: none; } /* the bottom bar replaces these on phones */

    /* Player + form */
    .d-pl-body { gap: 20px; }
    .d-player iframe { height: 380px; border-radius: 18px; }

    /* iOS zooms into inputs under 16px — keep them at 16px */
    .disc .field input, .disc .field textarea, .cs-btn, .d-search input { font-size: 16px; }

    /* Sticky action bar */
    .d-mbar {
        display: flex; gap: 8px; padding: 8px;
        position: fixed; z-index: 45; left: 12px; right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px; border: 1px solid rgba(255, 255, 255, .10);
        background: rgba(15, 19, 34, .90);
        -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    }
    .d-mbar-btn {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        min-height: 54px; padding: 8px 4px; border: 0; border-radius: 14px;
        background: transparent; color: #E5E7EB; cursor: pointer; text-decoration: none;
        font: 700 12px/1.1 var(--body);
    }
    .d-mbar-btn:active { background: rgba(255, 255, 255, .07); }
    .d-mbar-btn.is-main {
        color: #fff; background: linear-gradient(90deg, var(--violet), var(--pink));
        box-shadow: 0 6px 18px rgba(139, 92, 246, .35);
    }
    body:has(.d-mbar) footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

    /* Popups become bottom sheets */
    .d-modal { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; }
    .d-modal-card {
        max-height: 92dvh; border-radius: 24px 24px 0 0; border-bottom: 0;
        padding: 26px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    }
    .d-modal-card::before {
        content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
        width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18);
    }
    .d-modal[open] { animation: d-sheet-in .25s ease-out; }

    /* Share sheet sizing */
    .d-share-body { margin-top: 16px; gap: 16px; }
    .d-share-preview { width: 46%; margin: 0 auto; }
    .d-share-preview[data-format="square"] { width: 64%; }
    .d-share-formats { display: flex; }
    .d-share-formats button { flex: 1; }
    .d-share-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
    .d-share-btn { padding: 10px; gap: 8px; font-size: 13px; }
    .d-share-btn .ic { width: 30px; height: 30px; border-radius: 9px; }
}
@keyframes d-sheet-in { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .d-modal[open] { animation: none; } }

/* =====================================================================
   MOBILE HARDENING (iOS Safari / older Android browsers)
   ===================================================================== */

/* Browsers without overflow:clip (iOS < 16) — stop the glows from causing sideways scroll */
@supports not (overflow: clip) {
    .disc { overflow-x: hidden; }
}

/* Footer room for the sticky bar (class added by JS, works where :has() doesn't) */
body.has-mbar footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 767px) {
    /* Glows stay inside the screen */
    .d-glow-1 { width: 320px; height: 320px; left: -120px; top: -80px; }
    .d-glow-2 { width: 300px; height: 300px; right: 0; top: 40px; }

    /* Even spacing between stacked fields */
    .d-row { gap: 0; }

    /* Bottom sheets: vh fallback before dvh */
    .d-modal { max-height: 92vh; max-height: 92dvh; }
    .d-modal-card { max-height: 92vh; max-height: 92dvh; -webkit-overflow-scrolling: touch; }
    .d-modal::backdrop { -webkit-backdrop-filter: blur(6px); }

    /* Comfortable tap targets */
    .d-share-btn, .d-mbar-btn, .cs-btn { min-height: 48px; }
    .d-back { padding: 6px 0; }
}