/* =====================================================================================================================
   LL-LIBRARY (2026-10-09): the look of the shared client (ll-library.js): the heart, the save button, the "Save to"
   sheet, the question asked first and the toast. Only .lll-* lives here. Code/my/README.md, "The shared client".
   THE RULES IT KEEPS (design-system.md, site-art.md): dark; #ef4444 the accent; #c41e3a only as a fill; glows are
   drop-shadow or gradients; drawn icons; a heart sits at a picture's top right, never its bottom-right corner (the
   mark's); every picture whole; reduced motion: no pop, no slide, fades of 150 ms or less.
   ================================================================================================================== */

/* ---- THE HEART: drawn, glass, red when kept -------------------------------------------------------------------------- */
.lll-heart, .lll-save {
    position: relative; display: inline-grid; place-items: center; flex: none;
    width: 40px; height: 40px; padding: 0; margin: 0; border-radius: 50%; cursor: pointer;
    color: #fff; background: rgba(10, 10, 10, .48); border: 1px solid rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
    transition: background-color 150ms ease, border-color 150ms ease;
}
.lll-heart svg { width: 19px; height: 19px; overflow: visible; }
.lll-heart path { fill: transparent; stroke: #fff; stroke-width: 2; stroke-linejoin: round; transition: fill 200ms ease, stroke 200ms ease; }
.lll-heart:hover, .lll-save:hover { background: rgba(10, 10, 10, .7); border-color: rgba(255, 255, 255, .45); }
.lll-heart[aria-pressed="true"] { border-color: rgba(239, 68, 68, .7); }
.lll-heart[aria-pressed="true"] path { fill: #ef4444; stroke: #ef4444; }
.lll-heart[aria-pressed="true"] svg { filter: drop-shadow(0 0 6px rgba(239, 68, 68, .9)); }
.lll-heart:focus-visible, .lll-save:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lll-heart.is-busy { pointer-events: none; opacity: .7; }
.lll-heart.is-pop svg { animation: lll-pop 420ms var(--ll-ease-settle, cubic-bezier(.2, .8, .2, 1)); }
.lll-embers { position: absolute; inset: 0; pointer-events: none; }
.lll-embers i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: #ef4444;
    filter: drop-shadow(0 0 4px #ef4444); opacity: 0; }
.lll-heart.is-pop .lll-embers i { animation: lll-ember 560ms var(--ll-ease-handoff, ease-out) forwards; }
.lll-embers i:nth-child(1) { --dx: 0; --dy: -26px; }
.lll-embers i:nth-child(2) { --dx: 22px; --dy: -14px; }
.lll-embers i:nth-child(3) { --dx: 22px; --dy: 12px; }
.lll-embers i:nth-child(4) { --dx: 0; --dy: 24px; }
.lll-embers i:nth-child(5) { --dx: -22px; --dy: 12px; }
.lll-embers i:nth-child(6) { --dx: -22px; --dy: -14px; }
@keyframes lll-pop { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 70% { transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes lll-ember { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }

/* ---- SAVE TO: a list with a plus; a tick once it is in a playlist ------------------------------------------------------ */
.lll-save { width: 36px; height: 36px; }
.lll-save svg { width: 17px; height: 17px; }
.lll-save.is-saved { border-color: rgba(239, 68, 68, .7); color: #fff; }
.lll-save.is-saved svg { color: #ef4444; filter: drop-shadow(0 0 5px rgba(239, 68, 68, .8)); }

/* ---- buttons inside the client's own dialogs (LL-UI's shape, so they read as the site's) ------------------------------- */
.lll-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; color: #fff;
    font: 700 .8125rem/1 var(--font-body, 'Plus Jakarta Sans', sans-serif); letter-spacing: .06em; text-transform: uppercase;
    transition: background-color 150ms ease, border-color 150ms ease; }
.lll-btn--primary { background: #c41e3a; }
.lll-btn--primary:hover { background: #d42d4a; }
.lll-btn--glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
.lll-btn--glass:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); }
.lll-btn:focus-visible, .lll-iconbtn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lll-btn[disabled] { opacity: .6; pointer-events: none; }
.lll-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .2); }
.lll-iconbtn:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); }
.lll-iconbtn svg { width: 18px; height: 18px; }

/* ---- THE SHEET: centred on a screen, a bottom sheet on a phone -------------------------------------------------------- */
.lll-sheet { padding: 0; border: 0; margin: auto; inset: 0; width: min(440px, 92vw); max-width: none; max-height: min(640px, 86svh);
    background: transparent; color: #fff; overflow: visible; }
.lll-sheet::backdrop { background: rgba(5, 5, 6, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lll-sheet__box { display: flex; flex-direction: column; max-height: min(640px, 86svh); border-radius: 18px; overflow: hidden;
    background: #0f0f12; border: 1px solid rgba(255, 255, 255, .12); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6)); }
.lll-sheet[open] .lll-sheet__box { animation: lll-rise 280ms var(--ll-ease-settle, cubic-bezier(.2, .8, .2, 1)); }
.lll-sheet__head { position: relative; padding: 20px 64px 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.lll-sheet__title { margin: 0; font: 800 1.35rem/1.15 var(--font-heading, 'Plus Jakarta Sans', sans-serif); letter-spacing: -.02em; color: #fff; }
.lll-sheet__sub { margin: 6px 0 0; font: 400 .875rem/1.4 var(--font-body, sans-serif); color: rgba(255, 255, 255, .62);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lll-sheet__close { position: absolute; top: 14px; right: 14px; }
.lll-sheet__rows { list-style: none; margin: 0; padding: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.lll-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: #fff; text-align: left; font: 600 .9375rem/1.3 var(--font-body, sans-serif); }
.lll-row:hover { background: rgba(255, 255, 255, .06); }
.lll-row:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.lll-row__art { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
    background: radial-gradient(90% 90% at 50% 100%, rgba(196, 30, 58, .32), #17171b 72%); color: #fff; }
.lll-row__art svg { width: 20px; height: 20px; }
.lll-row__art.has-pic { background: #17171b; }
.lll-row__art img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }   /* whole, never cropped */
.lll-row__art--new { background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .3); }
.lll-row__art--liked { background: radial-gradient(90% 90% at 30% 20%, #ef4444, #8b1528 70%); }
.lll-row__art--liked svg { width: 20px; height: 20px; }
.lll-row__art--liked path { fill: #fff; stroke: #fff; }
.lll-row__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lll-row__tick { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .35); color: transparent; }
.lll-row__tick svg { width: 15px; height: 15px; }
.lll-row[aria-pressed="true"] .lll-row__tick { background: #ef4444; border-color: #ef4444; color: #fff; filter: drop-shadow(0 0 6px rgba(239, 68, 68, .7)); }
.lll-new__form { display: flex; gap: 8px; padding: 4px 12px 12px 70px; }
.lll-new__form[hidden] { display: none; }
.lll-new__input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06); color: #fff; font: 500 .9375rem/1.2 var(--font-body, sans-serif); }
.lll-new__input:focus { outline: 2px solid #fff; outline-offset: 1px; border-color: transparent; }
.lll-new__input::placeholder { color: rgba(255, 255, 255, .45); }
.lll-new__go { flex: none; padding: 0 16px; }
.lll-sheet__foot { margin: 0; padding: 12px 20px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font: 600 .8125rem/1.3 var(--font-body, sans-serif); }
.lll-sheet__foot a { color: #ef4444; text-decoration: none; }
.lll-sheet__foot a:hover { color: #fff; }

/* ---- ASKED FIRST ---------------------------------------------------------------------------------------------------- */
.lll-ask { padding: 0; border: 0; margin: auto; inset: 0; background: transparent; color: #fff; max-width: min(520px, 92vw); }
.lll-ask::backdrop { background: rgba(5, 5, 6, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lll-ask__box { position: relative; padding: 30px 30px 26px; border-radius: 18px; background: #0f0f12; border: 1px solid rgba(255, 255, 255, .12);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6)); }
.lll-ask[open] .lll-ask__box { animation: lll-rise 320ms var(--ll-ease-settle, cubic-bezier(.2, .8, .2, 1)); }
.lll-ask__heart { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .4); }
.lll-ask__heart svg { width: 24px; height: 24px; filter: drop-shadow(0 0 8px rgba(239, 68, 68, .8)); }
.lll-ask__heart path { fill: #ef4444; stroke: #ef4444; }
.lll-ask__title { margin: 18px 0 0; font: 800 1.5rem/1.15 var(--font-heading, 'Plus Jakarta Sans', sans-serif); letter-spacing: -.02em; color: #fff; }
.lll-ask__line { margin: 10px 0 0; color: rgba(255, 255, 255, .84); font: 400 1rem/1.6 var(--font-body, sans-serif); }
.lll-ask__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.lll-ask__more { display: inline-block; margin-top: 16px; font: 600 .8125rem/1 var(--font-body, sans-serif); color: #ef4444; text-decoration: none; }
.lll-ask__more:hover { color: #fff; }

/* ---- THE TOAST ------------------------------------------------------------------------------------------------------ */
.lll-toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 10050; transform: translate(-50%, 12px); opacity: 0;
    display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: min(560px, calc(100vw - 32px));
    padding: 12px 18px; border-radius: 999px; background: rgba(16, 16, 19, .94); border: 1px solid rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font: 600 .875rem/1.3 var(--font-body, sans-serif); color: #fff;
    transition: opacity 200ms var(--ll-ease-settle, ease), transform 240ms var(--ll-ease-settle, ease); }
.lll-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.lll-toast[hidden] { display: none; }
.lll-toast__link { color: #ef4444; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; }
.lll-toast__link:hover { color: #fff; }

@keyframes lll-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 699px) {
    .lll-sheet { width: 100vw; max-height: 88svh; margin: auto 0 0; }
    .lll-sheet__box { max-height: 88svh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .lll-sheet[open] .lll-sheet__box { animation-name: lll-up; }
    .lll-new__form { padding-left: 12px; }
    .lll-ask__box { padding: 24px 20px 22px; }
    .lll-toast { border-radius: 16px; }
}
@keyframes lll-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .lll-heart.is-pop svg, .lll-heart.is-pop .lll-embers i { animation: none !important; }
    .lll-sheet[open] .lll-sheet__box, .lll-ask[open] .lll-ask__box { animation: none; }
    .lll-toast { transition-duration: 120ms; transform: translate(-50%, 0); }
}
