/* catalog.css — everything that renders the library itself: the album/hero
   head, the public account screens, covers, the album grid, mood chips, the
   horizontal track rails and the track list. */

/* ---- Hero / album head ---- */

.mu-hero, .mu-album-head {
    display: flex;
    align-items: flex-end;
    gap: clamp(18px, 3vw, 32px);
    flex-wrap: wrap;
}

.mu-hero__eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--label);
}

.mu-hero__title {
    margin: 0;
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1.05;
    text-wrap: balance;
}

.mu-hero__sub { margin: 8px 0 18px; color: var(--blurb); font-size: 13px; }
.mu-album__desc { margin: 0 0 18px; color: var(--text); font-size: 14px; line-height: 1.5; max-width: 60ch; }

.mu-album__actions { display: flex; align-items: center; gap: 12px; margin: 0; }

.mu-story-like {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--line); border-radius: 999px;
    color: var(--blurb); font-family: inherit; font-size: 13px;
    padding: 6px 14px; cursor: pointer;
    transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.mu-story-like:hover { color: var(--text); border-color: var(--focus); }
.mu-story-like.is-liked { color: #e25555; border-color: #e25555; }
.mu-story-like__icon { font-size: 16px; line-height: 1; }

.mu-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: var(--tap);
    padding: 0 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(74, 127, 181, 0.16);
    color: var(--text);
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.mu-cta:hover { background: rgba(74, 127, 181, 0.3); border-color: var(--focus); }

/* ---- Public account screens ---- */

.mu-auth {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
    gap: clamp(32px, 7vw, 100px);
    max-width: 980px;
    min-height: min(620px, calc(100dvh - 180px));
    margin: 0 auto;
    padding: clamp(28px, 6vw, 74px) 0;
    align-items: center;
}
.mu-auth__orbit {
    position: absolute;
    width: min(58vw, 540px);
    aspect-ratio: 1;
    left: -14%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid color-mix(in srgb, var(--mu-accent) 32%, transparent);
    border-radius: 50%;
    box-shadow: inset 0 0 80px color-mix(in srgb, var(--mu-accent) 7%, transparent), 0 0 120px color-mix(in srgb, var(--mu-accent) 8%, transparent);
    pointer-events: none;
}
.mu-auth__intro, .mu-auth__form { position: relative; }
.mu-auth__mark { display: inline-flex; align-items: center; gap: 9px; color: var(--mu-accent); font-size: 11px; font-weight: 600; letter-spacing: 0.17em; text-transform: uppercase; }
.mu-auth__intro h1 { max-width: 9ch; margin: 20px 0 14px; font-size: clamp(42px, 6vw, 70px); font-weight: 300; letter-spacing: 0.03em; line-height: 0.98; text-wrap: balance; }
.mu-auth__intro p { max-width: 35ch; margin: 0; color: var(--blurb); font-size: 15px; line-height: 1.65; }
.mu-auth__intro .mu-auth__aside { margin-top: 38px; color: var(--label); font-size: 12px; }
.mu-auth__form { display: grid; gap: 17px; padding: clamp(22px, 3.5vw, 34px); border: 1px solid var(--rule); border-radius: 10px; background: rgba(11, 14, 22, 0.78); box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2); backdrop-filter: blur(14px); }
.mu-auth__field { display: grid; gap: 7px; color: var(--blurb); font-size: 12px; letter-spacing: 0.04em; }
.mu-auth__field > input, .mu-auth__password-wrap input { width: 100%; min-height: 46px; border: 1px solid var(--rule); border-radius: 5px; background: rgba(232, 234, 237, 0.04); color: var(--text); font: inherit; font-size: 14px; padding: 0 13px; }
.mu-auth__field input:focus { outline: 1px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.mu-auth__field input[aria-invalid="true"] { border-color: #e78b8b; }
.mu-auth__password-wrap { position: relative; }
.mu-auth__password-wrap input { padding-right: 58px; }
.mu-auth__reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--mu-accent); font: inherit; font-size: 11px; letter-spacing: 0.06em; cursor: pointer; }
.mu-auth__error { min-height: 16px; color: #ffabab; font-size: 11px; letter-spacing: 0; }
.mu-auth__status { margin: 0; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--mu-accent) 42%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--mu-accent) 10%, transparent); color: var(--text); font-size: 12px; line-height: 1.5; }
.mu-auth__submit { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border: 1px solid var(--mu-accent); border-radius: 5px; background: var(--mu-accent); color: var(--mu-accent-ink); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: filter 160ms var(--ease), transform 160ms var(--ease); }
.mu-auth__submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.mu-auth__switch { margin: 1px 0 0; color: var(--label); font-size: 12px; text-align: center; }
.mu-auth__switch button, .mu-auth__back { border: 0; background: none; color: var(--mu-accent); font: inherit; cursor: pointer; }
.mu-auth__switch button { padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.mu-auth__back { justify-self: start; padding: 4px 0; color: var(--blurb); font-size: 12px; }
.mu-auth__back:hover { color: var(--text); }
.mu-auth__section-label { margin: 0; color: var(--label); font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.mu-auth__projects { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.mu-auth__projects li { display: flex; justify-content: space-between; gap: 14px; padding: 13px; background: rgba(232, 234, 237, 0.03); color: var(--text); font-size: 13px; }
.mu-auth__projects li + li { border-top: 1px solid var(--rule); }
.mu-auth__projects li span:last-child { color: var(--label); font-size: 11px; }
.mu-auth__empty { margin: 0; color: var(--blurb); font-size: 13px; line-height: 1.6; }

/* ---- Covers ---- */

.mu-cover {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 4px;
    overflow: hidden;
    background: #101014;
    flex: none;
}

.mu-cover span {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.82);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.mu-cover--hero { width: clamp(150px, 22vw, 220px); aspect-ratio: 1; }
.mu-cover--hero span { font-size: 2rem; }
.mu-cover--card { width: 100%; aspect-ratio: 1; }
.mu-cover--sm { width: 44px; height: 44px; }
.mu-cover--sm span { font-size: 0.8rem; }

/* ---- Album grid ---- */

.mu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px;
}

.mu-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(232, 234, 237, 0.03);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.mu-card:hover { background: rgba(232, 234, 237, 0.07); border-color: var(--rule); transform: translateY(-2px); }

.mu-card__name { font-size: 14px; font-weight: 400; }
.mu-card__meta { font-size: 11px; letter-spacing: 0.08em; color: var(--label); }

/* ---- Mood chips (home page filter) ---- */

.mu-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.mu-chip {
    min-height: 30px;
    padding: 0 16px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: transparent;
    color: var(--label);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.mu-chip:hover { color: var(--text); border-color: var(--line); }
.mu-chip.is-on { color: var(--text); background: rgba(74, 127, 181, 0.24); border-color: var(--focus); }
.mu-chip--more { border-style: dashed; opacity: 0.8; }

/* ---- Track rail (horizontal-scroll row, the home page's album rows) ---- */

.mu-rail {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 4px 4px 12px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
}

.mu-rail__item {
    flex: none;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-snap-align: start;
}

.mu-rail__play {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.mu-rail__playglyph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.32);
    opacity: 0;
    border-radius: 4px;
    transition: opacity 160ms var(--ease);
}
.mu-rail__play:hover .mu-rail__playglyph,
.mu-rail__play:focus-visible .mu-rail__playglyph { opacity: 1; }

.mu-rail__title {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mu-rail__artist { font-size: 11px; color: var(--label); }

/* ---- Track list ---- */

.mu-tracks { list-style: none; margin: 0; padding: 0; }

.mu-track {
    display: grid;
    /* play | # | title | mood | votes | share | duration */
    grid-template-columns: 40px 28px minmax(0, 1fr) 100px auto 32px 52px;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 140ms var(--ease);
}
.mu-track:hover { background: rgba(232, 234, 237, 0.05); }
.mu-track.is-active .mu-track__title { color: var(--focus); }

.mu-track__play {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    opacity: 0;
    transition: opacity 140ms var(--ease), border-color 140ms var(--ease);
}
.mu-track:hover .mu-track__play,
.mu-track.is-active .mu-track__play,
.mu-track__play:focus-visible { opacity: 1; }
.mu-track__play:hover { border-color: var(--text); }

.mu-track__index { font-size: 12px; color: var(--label); text-align: right; }
.mu-track:hover .mu-track__index { opacity: 0; }

.mu-track__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mu-track__title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-track__artist { font-size: 11px; color: var(--label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-track__mood { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--label); }
.mu-track__dur { font-size: 12px; color: var(--label); text-align: right; font-variant-numeric: tabular-nums; }

.mu-empty { color: var(--blurb); max-width: 60ch; line-height: 1.8; }
.mu-empty p { margin: 0 0 10px; }
