/* DiscoFunkProject — design system
   Palette taken from the "French Funk Database" logo (yellow) and the 2019 book (orange on charcoal). */

@font-face {
    font-family: 'Righteous';
    src: url("../fonts/righteous-latin-400-normal-rgOAUEX.woff2") format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url("../fonts/inter-latin-wght-normal-XNcuA7u.woff2") format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    src: url("../fonts/inter-latin-ext-wght-normal-KweUqRv.woff2") format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;
    --bg: #faf6f0;
    --bg-soft: #f2ece2;
    --surface: #ffffff;
    --surface-2: #f7f2ea;
    --border: #e6ddcf;
    --border-strong: #d3c6b3;
    --text: #1f1b17;
    --text-muted: #6d645a;
    --accent: #c25208;      /* white text on it: 4.7:1 (WCAG AA) */
    --accent-strong: #a94405; /* orange text on light backgrounds: ≥ 4.5:1 */
    --accent-soft: #fde9d9;
    --accent-contrast: #ffffff;
    --gold: #f5c400;
    --gold-soft: #fff4c2;
    --success: #17703d;
    --success-soft: #dcf3e5;
    --success-contrast: #ffffff;
    --danger: #b02a24;
    --danger-soft: #fbe2e0;
    --info: #2463b5;
    --info-soft: #e1ecfa;
    --vinyl: #1b1917;
    --shadow-sm: 0 1px 2px rgb(31 27 23 / .06), 0 1px 3px rgb(31 27 23 / .08);
    --shadow: 0 4px 12px rgb(31 27 23 / .08), 0 2px 4px rgb(31 27 23 / .05);
    --shadow-lg: 0 18px 40px rgb(31 27 23 / .14);

    --font-display: 'Righteous', 'Arial Rounded MT Bold', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --container: 1240px;
    --header-h: 64px;
    --gap: clamp(16px, 2.5vw, 28px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme='light']) {
        color-scheme: dark;
        --bg: #131210;
        --bg-soft: #1a1816;
        --surface: #1e1c19;
        --surface-2: #26231f;
        --border: #34302a;
        --border-strong: #48423a;
        --text: #f3eee6;
        --text-muted: #a89f93;
        --accent: #ff8a3d;
        --accent-strong: #ffa466;
        --accent-soft: #3a2414;
        --accent-contrast: #1a0f05;
        --gold: #ffd21f;
        --gold-soft: #3a3210;
        --success: #4cc27f;
        --success-soft: #16301f;
        --success-contrast: #0b1f12;
        --danger: #ff6b62;
        --danger-soft: #3b1a18;
        --info: #6ea8ff;
        --info-soft: #172438;
        --vinyl: #0b0a09;
        --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
        --shadow: 0 4px 14px rgb(0 0 0 / .35);
        --shadow-lg: 0 18px 40px rgb(0 0 0 / .5);
    }
}
:root[data-theme='dark'] {
    color-scheme: dark;
    --bg: #131210;
    --bg-soft: #1a1816;
    --surface: #1e1c19;
    --surface-2: #26231f;
    --border: #34302a;
    --border-strong: #48423a;
    --text: #f3eee6;
    --text-muted: #a89f93;
    --accent: #ff8a3d;
    --accent-strong: #ffa466;
    --accent-soft: #3a2414;
    --accent-contrast: #1a0f05;
    --gold: #ffd21f;
    --gold-soft: #3a3210;
    --success: #4cc27f;
    --success-soft: #16301f;
    --success-contrast: #0b1f12;
    --danger: #ff6b62;
    --danger-soft: #3b1a18;
    --info: #6ea8ff;
    --info-soft: #172438;
    --vinyl: #0b0a09;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 4px 14px rgb(0 0 0 / .35);
    --shadow-lg: 0 18px 40px rgb(0 0 0 / .5);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.6 var(--font-body);
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img, svg, video, audio { display: block; max-width: 100%; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--gold); color: #1f1b17; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* "Aller au contenu": hidden until reached with Tab */
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 1000; padding: .6rem 1rem; border-radius: var(--radius); background: var(--accent); color: var(--accent-contrast); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; color: var(--accent-contrast); }
main:focus { outline: none; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 24px; } }

.stack > * + * { margin-top: var(--stack, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, .5rem); align-items: center; }
.spread { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.section { padding: clamp(28px, 4vw, 48px) 0; }

svg.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* ------------------------------------------------------------------ header */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 1.2rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-disc {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    background: radial-gradient(circle, var(--gold) 0 18%, var(--vinyl) 19% 22%, #3b3732 23% 30%, var(--vinyl) 31% 100%);
    box-shadow: inset 0 0 0 2px rgb(255 255 255 / .06);
    transition: transform .6s ease;
}
.brand:hover .brand-disc { transform: rotate(200deg); }
.brand small { color: var(--accent-strong); }

.main-nav { display: flex; gap: .15rem; margin-left: .5rem; }
.main-nav a {
    color: var(--text-muted); text-decoration: none; font-weight: 550; font-size: .95rem;
    padding: .45rem .7rem; border-radius: var(--radius-sm);
}
.main-nav a:hover { color: var(--text); background: var(--bg-soft); }
.main-nav a[aria-current='page'] { color: var(--text); background: var(--accent-soft); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.header-search { position: relative; }
.header-search input[type=search] {
    width: 220px; height: 38px; min-height: 0; padding: 0 .9rem 0 2.3rem;
    border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text);
    font: inherit; font-size: .92rem; transition: width .2s, border-color .2s;
}
.header-search input[type=search]:focus { width: 280px; border-color: var(--accent); outline: none; box-shadow: none; }
.header-search .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-hint { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.header-search input:focus ~ .search-hint, .header-search input:not(:placeholder-shown) ~ .search-hint { display: none; }

/* Results as you type */
.suggest {
    position: absolute; right: 0; top: calc(100% + 8px); width: min(440px, 92vw); max-height: min(70vh, 560px); overflow-y: auto;
    padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.suggest[hidden] { display: none; }
.suggest-group { padding: .6rem .6rem .25rem; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.suggest-item { display: flex; align-items: center; gap: .7rem; padding: .45rem .6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.suggest-item:hover, .suggest-item[aria-selected='true'], .suggest-all:hover, .suggest-all[aria-selected='true'] { background: var(--accent-soft); color: var(--text); }
.suggest-item img, .suggest-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; flex: none; background: var(--surface-2); }
.suggest-item .round { border-radius: 50%; }
.suggest-thumb { display: grid; place-items: center; font-family: var(--font-display); color: var(--accent); }
.suggest-text { display: grid; min-width: 0; line-height: 1.3; }
.suggest-text strong, .suggest-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-text span { font-size: .84rem; color: var(--text-muted); }
.suggest-all { display: block; margin-top: .3rem; padding: .6rem; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 600; font-size: .9rem; text-decoration: none; }
.suggest-empty { margin: 0; padding: .8rem; color: var(--text-muted); font-size: .92rem; }

.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn .dot {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--accent); color: var(--accent-contrast);
    font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}

.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: var(--bg-soft); }
.user-menu .menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: .4rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu a, .menu button {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--bg-soft); color: var(--text); }
.menu .menu-head { padding: .5rem .7rem .6rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.menu hr { margin: .3rem 0; }
.menu [hidden] { display: none; }

/* Installed app (PWA): back button, since there is no browser toolbar */
.app-back { display: none; margin-right: .25rem; }
@media (display-mode: standalone) { .app-back { display: inline-flex; } }
.dialog { margin: auto; max-width: min(30rem, calc(100vw - 32px)); padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgb(0 0 0 / .45); }
.dialog h2 { font-size: 1.25rem; margin-top: 0; }
.dialog ol { padding-left: 1.2rem; }
.dialog li + li { margin-top: .5rem; }
.dialog .icon { vertical-align: -3px; }

.nav-toggle { display: none; }

@media (max-width: 1080px) {
    .header-search input[type=search] { width: 170px; }
    .header-search input[type=search]:focus { width: 200px; }
}
@media (max-width: 920px) {
    .nav-toggle { display: inline-grid; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
        flex-direction: column; padding: .75rem 16px 1rem; margin: 0;
        background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    }
    .main-nav.open { display: flex; }
    .main-nav a { padding: .7rem .8rem; font-size: 1rem; }
    .header-search { display: none; }
    .main-nav .mobile-search { display: block; margin-bottom: .5rem; }
}
/* Phones: logo + theme + admin + account + menu must fit in 358 px (390 px screen minus the gutters) */
@media (max-width: 480px) {
    .site-header .container { gap: .5rem; }
    .brand { gap: .4rem; font-size: 1.02rem; }
    .brand-disc { width: 28px; height: 28px; }
    .header-actions { gap: .1rem; }
    .header-actions .icon-btn { width: 36px; height: 36px; }
    .user-menu > summary { padding-right: .25rem; }
}
/* Installed app on a phone: the back button takes the room of the logo's name */
@media (display-mode: standalone) and (max-width: 480px) {
    .brand > span:last-child { display: none; }
}
.mobile-search { display: none; }
.mobile-search input { width: 100%; height: 44px; padding: 0 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; }

/* ------------------------------------------------------------------ footer */

.site-footer { margin-top: 3rem; border-top: 1px solid var(--border); background: var(--bg-soft); color: var(--text-muted); font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 1.75rem; padding-bottom: 1.75rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ------------------------------------------------------------------ buttons, badges */

.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 40px; padding: .5rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
    font: 600 .93rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { --btn-bg: var(--bg-soft); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-contrast); --btn-border: var(--accent); }
.btn-primary:hover { --btn-bg: var(--accent-strong); --btn-border: var(--accent-strong); }
.btn-ghost { --btn-border: transparent; --btn-bg: transparent; }
.btn-danger { --btn-fg: var(--danger); --btn-border: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger:hover { --btn-bg: var(--danger-soft); }
.btn-success { --btn-bg: var(--success); --btn-fg: var(--success-contrast); --btn-border: var(--success); }
.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .85rem; }
.btn-lg { min-height: 48px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
form.inline { display: inline; }

.badge {
    display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px;
    font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
    background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border);
}
.badge-accent { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.badge-gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 45%, var(--text)); border-color: transparent; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.chip {
    display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 500;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-current='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { color: var(--text-muted); font-size: .8rem; }
.chip[aria-current='true'] .count { color: inherit; opacity: .7; }

/* ------------------------------------------------------------------ flash messages */

.flashes { position: fixed; z-index: 100; top: calc(var(--header-h) + 12px); right: 16px; display: grid; gap: .5rem; width: min(420px, calc(100vw - 32px)); }
.flash {
    display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--info); box-shadow: var(--shadow-lg);
    animation: flash-in .25s ease-out;
}
.flash-success { border-left-color: var(--success); }
.flash-danger, .flash-error { border-left-color: var(--danger); }
.flash-warning { border-left-color: var(--gold); }
.flash p { margin: 0; flex: 1; }
.flash button { background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 0; font-size: 1.2rem; line-height: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }

/* ------------------------------------------------------------------ cards and grids */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(16px, 2.5vw, 24px); }
.card-title { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .9rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-title a { font: 500 .85rem var(--font-body); }

.grid { display: grid; gap: var(--gap); align-items: start; }
.grid-covers { grid-template-columns: repeat(auto-fill, minmax(min(160px, 42vw), 1fr)); gap: clamp(14px, 2vw, 24px); }
.grid-people { grid-template-columns: repeat(auto-fill, minmax(min(150px, 42vw), 1fr)); gap: clamp(14px, 2vw, 22px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }

/* Record card: the sleeve, with the disc sliding out on hover */
.record { position: relative; }
.record-link { display: block; color: var(--text); text-decoration: none; }
.record-link:hover { color: var(--text); }
.record:focus-within .sleeve { --s: 1.06; z-index: 3; }

/* Play button over the bottom-right corner of the sleeve
   (margin-top in % is relative to the width: the sleeve is a square as wide as the card) */
.play-btn {
    position: absolute; z-index: 5; right: 10px; top: 0; margin-top: calc(100% - 56px);
    width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; background: var(--accent); color: var(--accent-contrast);
    box-shadow: 0 6px 18px rgb(0 0 0 / .35); opacity: 0; transform: translateY(6px) scale(.9);
    transition: opacity .2s, transform .2s, background .15s;
}
.play-btn .icon { width: 20px; height: 20px; }
.record:hover .play-btn, .play-btn:focus-visible, .play-btn.is-current { opacity: 1; transform: none; }
.play-btn:hover { background: var(--accent-strong); }
@media (hover: none) { .play-btn { opacity: 1; transform: none; width: 40px; height: 40px; margin-top: calc(100% - 48px); right: 8px; } }
.when-playing { display: none; }
.is-playing > .when-paused, .is-playing .player-toggle .when-paused { display: none; }
.is-playing > .when-playing, .is-playing .player-toggle .when-playing { display: inline-flex; }
.when-paused, .when-playing { align-items: center; }

/* Persistent player bar */
.player-bar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 2fr) auto; align-items: center; gap: 1rem;
    padding: .55rem 1rem; padding-bottom: calc(.55rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px) saturate(1.3);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgb(0 0 0 / .12);
}
.player-bar[hidden] { display: none; }
body.has-player { padding-bottom: 76px; }
body.has-player .scroll-top { bottom: 90px; }
.player-track { display: flex; align-items: center; gap: .7rem; min-width: 0; color: var(--text); text-decoration: none; }
.player-track img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex: none; }
.player-text { display: grid; min-width: 0; line-height: 1.25; }
.player-text strong, .player-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-text span { color: var(--text-muted); font-size: .85rem; }
.player-controls { display: flex; align-items: center; gap: .25rem; }
.player-toggle {
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
    background: var(--text); color: var(--bg);
}
.player-toggle:hover { background: var(--accent); color: var(--accent-contrast); }
.player-bar.is-playing .player-toggle .when-paused { display: none; }
.player-bar.is-playing .player-toggle .when-playing { display: inline-flex; }
.player-progress { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.player-progress input[type=range] { flex: 1; accent-color: var(--accent); min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; }
@media (max-width: 720px) {
    .player-bar { grid-template-columns: minmax(0, 1fr) auto auto; gap: .5rem; }
    .player-progress { grid-column: 1 / -1; grid-row: 2; }
    body.has-player { padding-bottom: 110px; }
}
/* The sleeve tilts towards the pointer (tilt_controller.js sets --rx/--ry), grows slightly,
   catches the light (--gx/--gy) and darkens on the side that bends away (--shade-l/-r). */
.sleeve {
    position: relative; aspect-ratio: 1; margin-bottom: .6rem;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
    transform-style: preserve-3d;
    transition: transform .55s cubic-bezier(.2, .8, .2, 1);
}
.sleeve.is-tilting { transition-duration: .12s; }
.record:hover .sleeve { --s: 1.06; z-index: 3; }
.sleeve::before {
    content: ''; position: absolute; inset: 4%; border-radius: 50%; z-index: 0;
    background:
        radial-gradient(circle, var(--accent) 0 15%, var(--vinyl) 16% 17%, transparent 18%),
        repeating-radial-gradient(circle, #2a2724 0 1px, var(--vinyl) 1px 3px);
    box-shadow: var(--shadow);
    transform: translateZ(-2px);
    transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
.record:hover .sleeve::before, .record:focus-within .sleeve::before { transform: translateZ(-2px) translateX(18%) rotate(40deg); }
.sleeve::after {
    content: ''; position: absolute; inset: 0; z-index: 2; border-radius: var(--radius-sm); pointer-events: none;
    background:
        radial-gradient(circle at var(--gx, 50%) var(--gy, 25%), rgb(255 255 255 / .42), rgb(255 255 255 / 0) 55%),
        linear-gradient(90deg, rgb(0 0 0 / var(--shade-l, 0)), rgb(0 0 0 / 0) 38%, rgb(0 0 0 / 0) 62%, rgb(0 0 0 / var(--shade-r, 0)));
    opacity: 0; transition: opacity .35s;
    transform: translateZ(1px);
}
.record:hover .sleeve::after, .sleeve.is-tilting::after { opacity: 1; }
.sleeve img, .sleeve .placeholder {
    position: relative; z-index: 1; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: var(--radius-sm); box-shadow: var(--shadow); background: var(--surface-2);
    transition: box-shadow .35s;
}
.record:hover .sleeve img { box-shadow: 0 22px 40px -12px rgb(0 0 0 / .45), var(--shadow); }
@media (prefers-reduced-motion: reduce) { .sleeve, .sleeve::before { transition: none; } .record:hover .sleeve { --s: 1; } }
.placeholder {
    display: grid; place-items: center; color: var(--text-muted); text-align: center; padding: 1rem;
    font-family: var(--font-display); font-size: .95rem; line-height: 1.2;
    background: linear-gradient(135deg, var(--surface-2), var(--bg-soft));
}
.sleeve .tags { position: absolute; z-index: 2; left: 6px; top: 6px; display: flex; gap: 4px; transform: translateZ(2px); }
.sleeve .tags .badge { background: rgb(0 0 0 / .65); color: #fff; border: 0; backdrop-filter: blur(4px); }
.record-title { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.record-meta { color: var(--text-muted); font-size: .88rem; line-height: 1.35; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Person / artist card: round portrait */
.profile-card { display: block; text-align: center; color: var(--text); text-decoration: none; }
.profile-card:hover { color: var(--text); }
.portrait {
    width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: .6rem;
    background: var(--surface-2); border: 3px solid var(--surface); box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.profile-card:hover .portrait { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.portrait.placeholder { font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--accent); }
.profile-name { font-weight: 650; line-height: 1.3; }
.profile-meta { color: var(--text-muted); font-size: .85rem; line-height: 1.35; margin-top: .1rem; }

/* Compact list rows (labels, studios, search results) */
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.rows > li + li { border-top: 1px solid var(--border); }
.row-link { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; color: var(--text); text-decoration: none; }
.row-link:hover { background: var(--bg-soft); color: var(--text); }
.row-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); flex: none; }
.row-thumb.round { border-radius: 50%; }
.row-thumb.placeholder { font-size: 1.1rem; padding: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { display: block; color: var(--text-muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { color: var(--text-muted); font-size: .86rem; white-space: nowrap; }

/* ------------------------------------------------------------------ page heads, toolbars */

.page-head { padding: clamp(24px, 4vw, 40px) 0 1.25rem; }
.page-head h1 { margin-bottom: .25rem; }
.page-head .lead { color: var(--text-muted); font-size: 1.05rem; margin: 0; max-width: 70ch; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .88rem; color: var(--text-muted); margin-bottom: .6rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb span[aria-hidden] { opacity: .5; }

.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.toolbar .grow { flex: 1; min-width: 200px; }

.alphabet { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 1.25rem; }
.alphabet a {
    min-width: 32px; height: 32px; padding: 0 .4rem; display: grid; place-items: center; border-radius: var(--radius-sm);
    color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .88rem;
}
.alphabet a:hover { background: var(--bg-soft); color: var(--text); }
.alphabet a[aria-current='true'] { background: var(--accent); color: var(--accent-contrast); }

.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1.25rem; }
.filters > summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .5rem; list-style: none; }
.filters > summary::-webkit-details-marker { display: none; }
.filters[open] > summary { margin-bottom: 1rem; }
.filters-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); align-items: end; }
.result-count { color: var(--text-muted); font-size: .9rem; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty .icon { width: 40px; height: 40px; margin: 0 auto .75rem; opacity: .6; }

/* Infinite loading: each page of results is a Turbo Frame that lazily loads the next one.
   Frames are transparent to the grid layout. */
turbo-frame.page-frame { display: contents; }
/* …except while waiting to load: it needs a box for the browser to notice it scrolling into view */
turbo-frame.page-frame[src]:not([complete]) { display: block; grid-column: 1 / -1; }
.page-loader {
    grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: .6rem;
    padding: 1.5rem 0; color: var(--text-muted); font-size: .92rem;
}
.page-loader .spinner {
    width: 26px; height: 26px; border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0 18%, var(--vinyl) 20% 23%, transparent 24%), repeating-radial-gradient(circle, #2a2724 0 1px, var(--vinyl) 1px 3px);
    animation: spin 1.1s linear infinite;
}
.list-end { grid-column: 1 / -1; text-align: center; color: var(--text-muted); font-size: .88rem; padding: 1.5rem 0 .5rem; }
.rows .page-loader, .rows .list-end { list-style: none; }

.scroll-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text);
    box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .2s, transform .2s;
}
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { border-color: var(--accent); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 2rem 0 0; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; padding: 0 .6rem; display: grid; place-items: center; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none; font-weight: 550; font-size: .92rem;
}
.pagination a { border: 1px solid var(--border); background: var(--surface); }
.pagination a:hover { border-color: var(--accent); }
.pagination [aria-current='page'] { background: var(--accent); color: var(--accent-contrast); border: 1px solid var(--accent); }

/* ------------------------------------------------------------------ detail pages */

.detail { display: grid; gap: clamp(20px, 4vw, 48px); grid-template-columns: minmax(0, 1fr); padding-top: clamp(20px, 3vw, 36px); }
@media (min-width: 860px) { .detail { grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); } }
.detail-media { position: relative; }
@media (min-width: 860px) { .detail-media { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }
.detail-media .sleeve { margin: 0 8% 0 0; }
.detail-media .sleeve::before { transform: translateZ(-2px) translateX(14%) rotate(20deg); }
.detail-media .sleeve:hover { --s: 1.02; }
.detail-media .portrait { max-width: 320px; margin: 0 auto; display: block; }
.detail h1 { margin-bottom: .35rem; }
.detail .subtitle { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 1rem; }
.detail .subtitle a { color: var(--text); font-weight: 600; text-decoration: none; }
.detail .subtitle a:hover { color: var(--accent-strong); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: .5rem; margin: 1.25rem 0; }
.facts > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .85rem; }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.facts dd { margin: .1rem 0 0; font-weight: 550; }
.facts dd a { color: var(--text); }

.credits { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin: 1.5rem 0; }
.credits h3 { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.credits ul { list-style: none; margin: 0; padding: 0; }
.credits li { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem .4rem; }
.credits li + li { margin-top: .3rem; }
.credits a { color: var(--text); text-decoration: none; font-weight: 550; display: inline-flex; align-items: center; gap: .5rem; }
.credits a:hover { color: var(--accent-strong); }
.credits .avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-2); font-size: .75rem; }

.prose { max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }
.links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0; }

.player { margin: 1.25rem 0; padding: 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.player audio { width: 100%; height: 44px; }
.player .note { margin: .5rem 0 0; font-size: .85rem; color: var(--text-muted); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 56px 1fr; gap: .9rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.timeline li:last-child { border-bottom: 0; }
.timeline .year { font-family: var(--font-display); color: var(--accent-strong); font-size: 1.05rem; }
.timeline a { color: var(--text); text-decoration: none; font-weight: 600; }
.timeline a:hover { color: var(--accent-strong); }
.timeline img, .timeline .placeholder { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; }

/* ------------------------------------------------------------------ forms */

.form { display: grid; gap: 1.1rem; }
.form-section { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(16px, 2.5vw, 24px); }
.form-section > h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.form-section > h2 + .help { margin-top: -.6rem; margin-bottom: 1rem; }
.form-section > .help { margin-bottom: 1rem; }
.form-section > * + .form-row, .form-section > * + .field { margin-top: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.field { display: grid; gap: .35rem; align-content: start; }
.field > label, .field legend { font-weight: 600; font-size: .92rem; }
label.required::after { content: ' *'; color: var(--accent-strong); }
.help, .field .help { color: var(--text-muted); font-size: .84rem; margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], input[type=date], select, textarea {
    width: 100%; min-height: 42px; padding: .55rem .8rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; font-size: .97rem;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=file] { font: inherit; font-size: .9rem; color: var(--text-muted); }
input[type=file]::file-selector-button { font: 600 .88rem var(--font-body); padding: .45rem .9rem; margin-right: .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg-soft); color: var(--text); cursor: pointer; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 500; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.checks-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.checks-pills .check { padding: .35rem .8rem .35rem .55rem; border: 1px solid var(--border-strong); border-radius: 999px; font-size: .9rem; align-items: center; }
.checks-pills .check input { margin: 0; }
.checks-pills .check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form-errors, .field .errors { color: var(--danger); font-size: .86rem; margin: 0; padding: 0; list-style: none; }
.field:has(.errors) input, .field:has(.errors) select, .field:has(.errors) textarea { border-color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; position: sticky; bottom: 0; padding: .9rem 0; background: linear-gradient(transparent, var(--bg) 30%); }
.current-file { display: flex; align-items: center; gap: .75rem; font-size: .88rem; color: var(--text-muted); }
.current-file img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tom Select (autocomplete) restyled to match */
.ts-wrapper .ts-control { min-height: 42px; padding: .35rem .6rem; border: 1px solid var(--border-strong) !important; border-radius: var(--radius-sm) !important; background: var(--surface) !important; color: var(--text); box-shadow: none !important; font-size: .97rem; }
.ts-wrapper.focus .ts-control { border-color: var(--accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent) !important; }
.ts-wrapper .ts-control input { color: var(--text) !important; font-size: .97rem !important; }
.ts-wrapper.multi .ts-control > .item { background: var(--accent-soft) !important; color: var(--text) !important; border: 0 !important; border-radius: 999px !important; padding: .1rem .65rem !important; font-weight: 550; }
.ts-wrapper.multi .ts-control > .item .remove { border-left: 0 !important; color: var(--text-muted) !important; }
.ts-dropdown { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border-strong) !important; border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-lg) !important; }
.ts-dropdown .option, .ts-dropdown .no-results, .ts-dropdown .create { padding: .5rem .75rem !important; }
.ts-dropdown .active { background: var(--accent-soft) !important; color: var(--text) !important; }

/* ------------------------------------------------------------------ tables (admin) */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }
.table .actions-cell { text-align: right; white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ home */

.hero {
    position: relative; overflow: hidden; isolation: isolate; color: #fff8ee;
    background: radial-gradient(ellipse at 80% 20%, #4a2a12 0, transparent 55%), linear-gradient(160deg, #1d1915 0%, #0f0d0b 100%);
}
.hero .container { display: grid; gap: 2rem; align-items: center; padding-top: clamp(40px, 7vw, 90px); padding-bottom: clamp(40px, 7vw, 90px); }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.2fr 1fr; } }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 3.5vw, 4rem); margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { color: #d9cfc2; font-size: 1.12rem; max-width: 56ch; }
.hero .btn:not(.btn-primary) { --btn-bg: rgb(255 255 255 / .08); --btn-fg: #fff; --btn-border: rgb(255 255 255 / .25); }
.hero .btn:not(.btn-primary):hover { --btn-bg: rgb(255 255 255 / .16); }
.hero-disc {
    width: min(420px, 80vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; position: relative;
    background:
        radial-gradient(circle, #0f0d0b 0 3%, var(--gold) 3.5% 17%, #e0620d 17.5% 18.5%, transparent 19%),
        repeating-radial-gradient(circle, #1f1c19 0 1px, #0b0a09 1px 4px);
    box-shadow: 0 30px 80px rgb(0 0 0 / .6), inset 0 0 0 1px rgb(255 255 255 / .05);
    animation: spin 14s linear infinite;
}
.hero-disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 10%, rgb(255 255 255 / .09) 14%, transparent 20% 60%, rgb(255 255 255 / .06) 64%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-disc { animation: none; } * { transition: none !important; } }

.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(140px, 45%), 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text); text-decoration: none; display: block; transition: border-color .15s, transform .15s; }
a.stat:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
/* Rows with a fixed number of columns, so they are always full (no orphan tile on a second line) */
.stats-block { display: grid; gap: .75rem; margin-bottom: var(--gap); }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-5 .stat-value { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); }
.stat-main .stat-value { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
@media (max-width: 760px) {
    .stats-4, .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Odd count on two columns: the last tile takes the whole row */
    .stats-5 .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.stat-value { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.1; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: .88rem; margin-top: .2rem; }

.bars { display: grid; gap: .45rem; }
.bar { display: grid; grid-template-columns: 9rem 1fr 3.5rem; gap: .75rem; align-items: center; font-size: .9rem; }
.bar-track { height: 10px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.bar .num { text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.book { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 800px) { .book { grid-template-columns: 280px 1fr; } }
.book img { border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); transform: rotate(-2deg); }

.cover-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(110px, 30vw), 1fr)); gap: 6px; }
.cover-wall a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--surface-2); }
.cover-wall img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.cover-wall a:hover img { transform: scale(1.06); }

/* ------------------------------------------------------------------ comments */

.comments { display: grid; gap: .9rem; }
.comment { display: grid; grid-template-columns: 40px 1fr; gap: .75rem; }
.comment .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); font-size: .9rem; }
.comment-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; }
.comment-head { font-size: .85rem; color: var(--text-muted); margin-bottom: .2rem; }
.comment-head strong { color: var(--text); }

/* ------------------------------------------------------------------ auth pages */

.auth { max-width: 420px; margin: clamp(24px, 6vw, 64px) auto; }
.auth .card { padding: clamp(20px, 4vw, 32px); }
.auth h1 { font-size: 1.8rem; text-align: center; }

/* ------------------------------------------------------------------ misc */

.kbd { font: 600 .75rem var(--font-body); padding: .1rem .4rem; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-muted); }
.notice { padding: .9rem 1rem; border-radius: var(--radius); background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.notice-warning { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.notice-success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
/* Menu on the left, content on the right; one column on phones */
.sidebar-layout { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { .sidebar-layout { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .93rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current='page'] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { font-weight: 500; color: var(--text-muted); margin-left: .3rem; }
.pending-banner { display: flex; gap: .6rem; align-items: center; padding: .7rem 1rem; border-radius: var(--radius); background: var(--gold-soft); margin-bottom: 1rem; font-size: .93rem; }
/* Collaboration network (network_controller.js) */
.network { position: relative; width: 100%; height: clamp(360px, 55vh, 560px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; cursor: grab; }
.network:active { cursor: grabbing; }
.network .page-loader { position: absolute; inset: 0; }
.network svg { width: 100%; height: 100%; display: block; }
.network-links line { stroke: var(--border-strong); stroke-opacity: .45; transition: stroke-opacity .15s; }
.network-links line.dimmed { stroke-opacity: .12; }
.network-node { cursor: pointer; transition: opacity .15s; }
.network-node.dimmed { opacity: .25; }
.network-node circle { fill: var(--c, var(--accent)); stroke: var(--surface); stroke-width: 2px; }
.network-node:hover circle, .network-node:focus-visible circle { stroke: var(--text); }
.network-node:focus { outline: none; }
.network-node text { font: 600 11px var(--font-body); fill: var(--text); text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.network-node text.always, .network-node:hover text, .network-node:focus-visible text { opacity: 1; }
.network-node.kind-center text { font-size: 13px; }
.network-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; font-size: .82rem; color: var(--text-muted); }
.network-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: .3rem; vertical-align: -1px; }
/* One colour per role (centre: accent) */
.kind-center { --c: var(--accent); }
.kind-musician, .role-musician { --c: #2f7dd1; }
.kind-composer, .role-composer { --c: #8a4fd1; }
.kind-producer, .role-producer { --c: #1f9a6a; }
.kind-engineer, .role-engineer { --c: #c9a000; }
.kind-photographer, .role-photographer { --c: #d1477a; }

/* Record page tinted with the colour of its cover (Discovery::coverTint) */
.detail-tint { background: linear-gradient(180deg, rgb(var(--tint, 224 98 13) / .2) 0, rgb(var(--tint, 224 98 13) / .06) 380px, transparent 640px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .detail-tint { background: linear-gradient(180deg, rgb(var(--tint, 224 98 13) / .28) 0, rgb(var(--tint, 224 98 13) / .08) 380px, transparent 640px); } }
:root[data-theme='dark'] .detail-tint { background: linear-gradient(180deg, rgb(var(--tint, 224 98 13) / .28) 0, rgb(var(--tint, 224 98 13) / .08) 380px, transparent 640px); }
.record-reason { margin-top: .25rem; font-size: .78rem; color: var(--accent-strong); font-weight: 600; }
