/* ==========================================================================
   HIVE 2026: the homepage redesign (docs/design/README.md, by Gemini Neon; built 2026-12-02).
   Loaded after styles.css and wins by order: wet tarmac, hardware decks, a Xeroxed zine and one
   vandalised council sign. Council yellow belongs to Fly Tipping only; FLY green to live things only.
   ========================================================================== */

:root {
    --bg-tarmac: #141311;
    --bg-deck: #1d1c19;
    --bg-well: #272521;
    --bg-pit: #0e0d0b;
    --border-rivet: #35322c;
    --ink-chalk: #f3efe6;
    --ink-ash: #a6a095;
    --ink-soot: #6e695f;
    --paper-cream: #eae3d2;
    --ink-black: #11100e;
    --sign-yellow: #ffd500;
    --sign-red: #d9231a;
    --fly-green: #39ff14;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --sans: "Space Grotesk", system-ui, sans-serif;
    --sign: "Bungee", "Space Grotesk", sans-serif;

    /* The old tokens, re-pointed so the rest of styles.css (modals, pages) follows the new palette. */
    --bg-dark: var(--bg-tarmac);
    --bg-card: var(--bg-deck);
    --bg-card-hover: var(--bg-well);
    --text-primary: var(--ink-chalk);
    --text-secondary: var(--ink-ash);
    --text-muted: var(--ink-soot);
    --border-subtle: var(--border-rivet);
}

body {
    background: var(--bg-tarmac);
    color: var(--ink-chalk);
    font-family: var(--sans);
}

/* Tarmac tooth instead of neon orbs and a grid wash. */
.bg-effects {
    display: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.03;
    background-image: radial-gradient(#f3efe6 0.6px, transparent 0.6px);
    background-size: 16px 16px;
    z-index: 0;
}

/* Orbitron is gone: signage keeps Bungee, numbers go mono, everything else is Space Grotesk. */
.logo-text,
.footer-brand {
    font-family: var(--sign);
    letter-spacing: 0.04em;
}

.stat-value,
.time,
.queue-num,
.queue-dur,
.video-duration,
.room-code strong,
.join-input-group input,
.tip-summary .summary-row strong,
.now-playing-tag {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.card-label,
.track-title,
.cta-content h3,
.creator-error h2,
.creator-info h1,
.modal-header h2,
.nft-modal-header h2,
.shortcuts-header h2,
.tip-instructions h3,
.tip-section h3,
.tracks-header h3,
.wallet-modal-content h2 {
    font-family: var(--sans);
}

/* ---------- Top nav ---------- */
.top-nav {
    height: 56px;
    background: rgba(20, 19, 17, 0.94);
    border-bottom: 2px solid var(--border-rivet);
    box-shadow: none;
}

.logo {
    gap: 9px;
}

.logo-fly {
    display: inline-flex;
    width: 24px;
    height: 24px;
    animation: none;
}

.logo-fly svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 19px;
    color: var(--ink-chalk);
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
}

.logo-tag {
    display: none;
}

.nav-link {
    color: var(--ink-ash);
    border-radius: 3px;
    font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink-chalk);
    background: var(--bg-well);
    box-shadow: none;
}

.nav-link.active {
    border-bottom: 2px solid var(--fly-green);
    border-radius: 3px 3px 0 0;
}

.nav-icon {
    display: none;
}

.icon-btn,
.share-btn {
    border-radius: 3px;
    border: 1.5px solid var(--border-rivet);
    background: var(--bg-deck);
    box-shadow: none;
}

.tip-btn {
    background: var(--sign-yellow);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    border-radius: 3px;
    box-shadow: 2px 2px 0 var(--bg-pit);
    font-weight: 700;
}

.tip-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--bg-pit);
}

.wallet-btn {
    background: var(--bg-deck);
    color: var(--ink-chalk);
    border: 1.5px solid var(--border-rivet);
    border-radius: 3px;
    box-shadow: none;
    font-family: var(--mono);
    font-size: 12px;
}

/* ---------- The grid: in page order, no dense packing ---------- */
.bento-container {
    max-width: 1380px;
    padding: 72px 30px 48px;
    gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
    grid-auto-flow: row;
}

.bento-card {
    grid-row: auto;
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
    backdrop-filter: none;
}

.bento-card:hover {
    border-color: var(--border-rivet);
    transform: none;
}

.card-label {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-chalk);
    margin-bottom: 12px;
}

/* ---------- 1. Flylets strip, above the player ---------- */
.flylets-spotlight {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 8px 14px;
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-left: 5px solid var(--sign-red);
    box-shadow: 3px 3px 0 var(--bg-pit);
}

.fs-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fs-badge {
    font-family: var(--sign);
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--ink-chalk);
}

.fs-new {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    margin: 0;
    background: var(--sign-red);
    color: var(--ink-chalk);
    border-radius: 2px;
    transform: rotate(-2deg);
}

.fs-latest {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-right: 14px;
    border-right: 1px solid var(--border-rivet);
}

.fs-latest-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.fs-latest-meta {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soot);
    white-space: nowrap;
}

.fs-play {
    height: 30px;
    padding: 0 12px;
    background: var(--paper-cream);
    color: var(--ink-black);
    border: 1.5px solid var(--ink-black);
    border-radius: 3px;
    box-shadow: none;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.fs-play:hover {
    background: var(--ink-chalk);
    transform: none;
}

.fs-list {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
}

.fs-list::-webkit-scrollbar {
    display: none;
}

.fs-song {
    padding: 5px 10px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    border-radius: 3px;
    color: var(--ink-ash);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}

.fs-song:hover,
.fs-song:focus-visible {
    color: var(--ink-chalk);
    border-color: var(--ink-ash);
    background: var(--bg-well);
}

.fs-link {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-ash);
}

/* ---------- 2. The player: a hardware deck, first on every screen ---------- */
.player-hero {
    grid-column: 1 / span 8;
    display: grid;
    grid-template-columns: 164px minmax(0, 1fr);
    gap: 16px 22px;
    align-items: center;
    padding: 20px 22px 18px;
    background: var(--bg-deck);
    text-align: left;
}

.player-visual {
    width: 164px;
    height: 164px;
    display: grid;
    place-items: center;
    background: var(--bg-pit);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
}

.vinyl-container {
    width: 142px;
    height: 142px;
}

.vinyl {
    width: 142px;
    height: 142px;
    box-shadow: none;
}

.vinyl-glow {
    display: none;
}

.player-info {
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.now-playing-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--fly-green);
    background: none;
    border: 0;
    padding: 0;
}

.track-title {
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ink-chalk);
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: none;
    margin: 0;
}

.track-artist {
    font-size: 15px;
    color: var(--ink-ash);
    margin: -4px 0 0;
}

.player-controls {
    justify-content: flex-start;
    gap: 8px;
    margin: 2px 0 0;
}

.ctrl-btn {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    background: var(--bg-well);
    border: 1.5px solid var(--border-rivet);
    color: var(--ink-chalk);
    box-shadow: none;
}

.ctrl-btn:hover {
    border-color: var(--ink-ash);
    background: var(--bg-well);
    transform: none;
}

.ctrl-play {
    width: 52px;
    height: 40px;
    background: var(--fly-green);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    box-shadow: 2px 2px 0 var(--bg-pit);
}

.ctrl-play:hover {
    background: var(--fly-green);
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--bg-pit);
}

.progress-section,
.volume-section {
    width: 100%;
    max-width: none;
}

.progress-track,
.volume-track {
    height: 8px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    border-radius: 2px;
}

.progress-fill {
    background: var(--fly-green);
    box-shadow: none;
    border-radius: 0;
}

.volume-track {
    height: 6px;
}

.volume-fill {
    background: var(--ink-chalk);
    box-shadow: none;
}

.time {
    font-size: 12px;
    color: var(--ink-ash);
}

.player-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.player-action-btn {
    width: auto;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border-radius: 3px;
    background: transparent;
    border: 1px solid var(--border-rivet);
    color: var(--ink-ash);
    box-shadow: none;
}

.player-action-btn:hover {
    color: var(--ink-chalk);
    border-color: var(--ink-ash);
    background: transparent;
    transform: none;
}

.waveform-wrapper {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px;
    background: var(--bg-well);
    border: 1.5px solid var(--border-rivet);
    border-radius: 3px;
}

/* ---------- 3. Up next, beside the player ---------- */
.queue-card {
    grid-column: 9 / span 4;
    padding: 16px;
    max-height: none;
}

.queue-header .card-label {
    margin-bottom: 10px;
}

.playlist-switcher {
    background: var(--bg-pit);
    border: 1.5px solid var(--border-rivet);
    border-radius: 3px;
    padding: 3px;
}

.playlist-tab {
    border-radius: 2px;
    color: var(--ink-ash);
    background: transparent;
    font-weight: 600;
}

.playlist-tab.active {
    background: var(--bg-well);
    color: var(--ink-chalk);
    box-shadow: none;
}

.tab-icon {
    display: none;
}

.playlist-tab.has-new::after {
    background: var(--sign-red);
    box-shadow: none;
}

.queue-list {
    max-height: 300px;
}

.queue-item {
    border-radius: 3px;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
}

.queue-item:hover {
    background: var(--bg-well);
    transform: none;
}

.queue-item.active {
    background: var(--bg-well);
    border-left-color: var(--fly-green);
    box-shadow: none;
}

.queue-num,
.queue-dur {
    color: var(--ink-soot);
}

.queue-item.active .queue-num {
    color: var(--fly-green);
}

.queue-artist {
    color: var(--ink-ash);
}

/* ---------- 4. Hive stats: one telemetry line ---------- */
.stats-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    box-shadow: 3px 3px 0 var(--bg-pit);
}

.stats-card .card-label {
    margin: 0;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--ink-soot);
}

.stats-grid {
    display: flex;
    gap: 28px;
    text-align: left;
}

.stat {
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-chalk);
    text-shadow: none;
}

.stat-label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-ash);
}

/* ---------- 5. Fly Tipping: refinements to the sign and the ledger ---------- */
.fly-tipping {
    background: var(--bg-deck);
    padding: 28px;
}

.ft-sign {
    transform: rotate(-1.2deg);
    border-radius: 6px;
    box-shadow: inset 0 0 0 8px var(--sign-yellow), inset 0 0 0 12px var(--ink-black), 6px 6px 0 var(--bg-pit);
}

/* Four rivets: the two pseudo-elements carry the top pair, the fine print's own carry the bottom. */
.ft-sign::before,
.ft-sign::after {
    background: radial-gradient(circle at 35% 35%, #fff 0 18%, #8a8a8a 19% 100%);
}

.ft-fine {
    position: static;
}

.ft-no {
    position: relative;
    display: inline-block;
}

.ft-no-word {
    position: relative;
    display: inline-block;
}

.ft-slash {
    position: absolute;
    left: -14%;
    top: 8%;
    width: 128%;
    height: 90%;
    overflow: visible;
    pointer-events: none;
}

.ft-slash path {
    fill: none;
    stroke: var(--sign-red);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 140;
    stroke-dashoffset: 140;
    animation: ft-slash-draw 280ms cubic-bezier(0.22, 1, 0.36, 1) 300ms forwards;
}

@keyframes ft-slash-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.ft-small {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 2px solid var(--ink-black);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ft-fine {
    font-family: var(--mono);
    font-size: 12px;
}

.ft-tally-line {
    position: relative;
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(22px, 2.2vw, 30px);
    letter-spacing: -0.01em;
}

.ft-nudge {
    margin-left: auto;
    font-family: "Permanent Marker", cursive;
    font-size: 17px;
    color: var(--sign-yellow);
    transform: rotate(-4deg);
    white-space: nowrap;
}

.ft-nudge[hidden] {
    display: none;
}

.ft-row {
    border-radius: 4px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
}

.ft-got {
    font-family: var(--mono);
    font-size: 11.5px;
}

.ft-tip {
    border-radius: 3px;
    box-shadow: 2px 2px 0 var(--ink-black);
    font-family: var(--mono);
}

.ft-tip:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--ink-black);
}

.ft-tip:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--ink-black);
}

.ft-source {
    font-family: var(--mono);
    font-size: 11.5px;
}

/* ---------- 6. Browse tracks ---------- */
.collection-card {
    grid-column: 1 / span 8;
    padding: 20px;
}

.sort-controls {
    gap: 6px;
}

.sort-btn {
    width: auto;
    height: 28px;
    padding: 0 10px;
    border-radius: 3px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    color: var(--ink-ash);
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

.sort-btn.active {
    background: var(--paper-cream);
    color: var(--ink-black);
    border-color: var(--ink-black);
}

.see-all {
    color: var(--ink-ash);
}

.nft-item {
    border-radius: 4px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    box-shadow: none;
}

.nft-item:hover {
    transform: none;
    border-color: var(--ink-ash);
    box-shadow: none;
}

.nft-item img,
.nft-image {
    border-radius: 2px;
}

/* Four tracks fill one row; the card ends there instead of stretching to the column beside it. */
.collection-card {
    align-self: start;
}

/* The scroll-away mini player (js/mini-player.js), in the deck's colours. */
.mini-player-content {
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
    backdrop-filter: none;
}

.mini-player-art {
    border-radius: 3px;
}

.mini-player-progress {
    background: var(--bg-well);
}

.mini-player-progress-fill {
    background: var(--fly-green);
}

.mini-ctrl,
.mini-player-expand {
    border-radius: 3px;
}

.mini-play {
    background: var(--fly-green);
    color: var(--ink-black);
}

/* ---------- 7. Visuals and top creators, beside Browse tracks ---------- */
.right-column-stack {
    grid-column: 9 / span 4;
    grid-row: auto;
}

.video-thumb-compact {
    border: 2px solid var(--border-rivet);
    border-radius: 3px;
}

/* ---------- 8. Comments: the liner-notes slip ---------- */
.comments-card {
    grid-column: 1 / span 7;
    position: relative;
    background: var(--paper-cream);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
}

.comments-card::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    width: 68px;
    height: 16px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 213, 0, 0.55);
    border: 1px solid rgba(17, 16, 14, 0.15);
}

.comments-card .card-label,
.comments-card .comments-track-title,
.comments-card .no-track-selected,
.comments-card .no-track-selected p {
    color: var(--ink-black);
}

.comments-card .comments-track-title {
    font-family: var(--mono);
    font-size: 11.5px;
    color: #5a554b;
}

.comments-card .card-header {
    border-bottom: 1px dashed #b5ad99;
    padding-bottom: 8px;
}

.inline-comment-input textarea {
    background: #fff9ea;
    color: var(--ink-black);
    border: 1.5px solid var(--ink-black);
    border-radius: 3px;
}

.inline-comment-submit {
    background: var(--ink-black);
    color: var(--paper-cream);
    border-radius: 3px;
}

/* ---------- 9. hive.log ---------- */
.activity-card {
    grid-column: 8 / span 5;
    background: var(--bg-pit);
    padding: 0;
    overflow: hidden;
}

.terminal-dots {
    display: none;
}

.terminal-header {
    background: var(--bg-deck);
    border-bottom: 1.5px solid var(--border-rivet);
    padding: 10px 14px;
}

.terminal-title {
    font-family: var(--mono);
    color: var(--ink-chalk);
}

.terminal-body {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-chalk);
}

.log-time {
    color: var(--fly-green);
}

/* ---------- 10. Upload: a punk flyer band ---------- */
.upload-card {
    grid-column: 1 / -1;
    background: var(--bg-deck);
    border: 2px dashed var(--ink-soot);
    box-shadow: none;
}

.upload-card .cta-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
}

.upload-card .cta-icon {
    display: none;
}

.upload-card h3 {
    font-size: 20px;
    margin: 0;
}

.upload-card p {
    color: var(--ink-ash);
    margin: 0;
}

.cta-btn {
    background: var(--paper-cream);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    border-radius: 3px;
    box-shadow: 2px 2px 0 var(--bg-pit);
}

.cta-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--bg-pit);
}

/* ---------- Tablet: 6 columns ---------- */
@media (max-width: 1200px) {
    .bento-container {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .player-hero {
        grid-column: 1 / -1;
        grid-template-columns: 136px minmax(0, 1fr);
        text-align: left;
    }

    .player-visual {
        width: 136px;
        height: 136px;
    }

    .vinyl-container,
    .vinyl {
        width: 118px;
        height: 118px;
    }

    .player-info,
    .player-controls {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .queue-card {
        grid-column: 1 / span 4;
    }

    .stats-card {
        grid-column: 5 / span 2;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .stats-grid {
        flex-direction: column;
        gap: 8px;
    }

    .collection-card,
    .upload-card {
        grid-column: 1 / -1;
    }

    .comments-card,
    .right-column-stack {
        grid-column: 1 / span 3;
    }

    .activity-card {
        grid-column: 4 / span 3;
    }
}

/* ---------- Phone: one column, the player in the first screen ---------- */
@media (max-width: 768px) {
    .top-nav {
        height: 52px;
    }

    .bento-container {
        padding: 64px 12px 32px;
        gap: 12px;
        grid-template-columns: minmax(0, 1fr);
    }

    .flylets-spotlight {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding: 8px 10px;
    }

    .fs-latest {
        flex: 1;
        min-width: 0;
        border-right: 0;
        padding-right: 0;
    }

    .fs-latest-title {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fs-latest-meta,
    .fs-link {
        display: none;
    }

    .fs-list {
        flex-basis: 100%;
    }

    .player-hero {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px 14px;
        padding: 14px;
    }

    .player-visual {
        width: 72px;
        height: 72px;
        align-self: start;
        grid-row: span 3;
    }

    .vinyl-container,
    .vinyl {
        width: 62px;
        height: 62px;
    }

    /* Under the art and title, the controls and the rest take the deck's full width. */
    .player-info {
        display: contents;
    }

    .now-playing-tag,
    .track-title,
    .track-artist {
        grid-column: 2;
    }

    .player-controls,
    .progress-section,
    .volume-section,
    .player-actions {
        grid-column: 1 / -1;
    }

    .player-controls {
        justify-content: space-between;
    }

    .ctrl-play {
        flex: 1;
        max-width: 150px;
    }

    .stats-card {
        padding: 8px 14px;
    }

    .stats-card .card-label {
        display: none;
    }

    .stats-grid {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }

    .upload-card .cta-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ft-slash path {
        animation: none;
        stroke-dashoffset: 0;
    }

    .vinyl {
        animation: none !important;
    }

    .tip-btn:hover,
    .cta-btn:hover,
    .ft-tip:hover,
    .ft-tip:active,
    .ctrl-play:hover {
        transform: none;
    }
}

/* ==========================================================================
   Fixes after going live (2026-12-02 audit + docs/design/pages-strategy.md)
   ========================================================================== */

/* "FLY / TIPPING" on two lines at every width: on one line the scrawl underneath lies over it. */
.ft-headline {
    width: min-content;
}

/* Rows and log lines stay inside their cards: long titles end in an ellipsis instead of spilling. */
.queue-list,
.terminal-body {
    overflow-x: hidden;
}

.queue-item,
.queue-info {
    min-width: 0;
}

.queue-title,
.queue-artist {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.log-line {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-loading {
    padding: 14px 10px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink-soot);
}

/* Playlists store "[object Object]" instead of track ids (upstream), so adding to one can't work yet. */
.player-action-btn[onclick="addCurrentToPlaylist()"] {
    display: none;
}

@media (max-width: 1200px) {
    /* Up next and the stats line each take the full width, so neither stretches into an empty box. */
    .queue-card,
    .stats-card {
        grid-column: 1 / -1;
    }

    .stats-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .stats-grid {
        flex-direction: row;
        gap: 24px;
    }

    /* Visuals and Top creators side by side across the row instead of half of it. */
    .right-column-stack {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .right-column-stack {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==========================================================================
   Hub views (docs/design/pages.md): Discover and Collection beside a docked deck
   ========================================================================== */

/* #view-home only groups the home sections; its children stay items of the main grid. */
.hub-view {
    display: contents;
}

.hub-view[hidden],
.hub-subview[hidden] {
    display: none !important;
}

.hub-subview {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.view-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-rivet);
}

.view-head h1 {
    margin: 0;
    font-family: var(--sans);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink-chalk);
}

.view-head p {
    margin: 4px 0 0;
    font-size: 15px;
    color: var(--ink-ash);
}

.view-aside,
.dv-mono {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-soot);
}

.view-panel {
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
    padding: 20px;
}

.view-empty {
    text-align: center;
    padding: 18px;
    color: var(--ink-ash);
}

.view-empty h2,
.view-empty p {
    margin: 0 0 12px;
    font-size: 16px;
}

.view-loading {
    margin: 0;
}

.btn-cream,
.btn-well {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 3px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-cream {
    background: var(--paper-cream);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    box-shadow: 2px 2px 0 var(--bg-pit);
}

.btn-well {
    background: var(--bg-well);
    color: var(--ink-chalk);
    border: 1.5px solid var(--border-rivet);
}

.btn-well:hover {
    border-color: var(--ink-ash);
}

.btn-cream:focus-visible,
.btn-well:focus-visible,
.dv-cover:focus-visible,
.dv-row:focus-visible,
.cl-play:focus-visible,
.dock-queue-btn:focus-visible {
    outline: 3px solid var(--ink-chalk);
    outline-offset: 2px;
}

.dv-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---------- The docked deck ---------- */
.dock-queue-btn {
    display: none;
}

.bento-container:not([data-view="home"]) .flylets-spotlight {
    display: none;
}

.bento-container:not([data-view="home"]) .player-hero {
    position: sticky;
    top: 58px;
    z-index: 40;
    grid-column: 1 / -1;
    grid-template-columns: 44px minmax(0, 1fr) auto minmax(140px, 1.3fr) auto;
    grid-template-rows: auto auto auto;
    gap: 0 16px;
    align-items: center;
    padding: 8px 16px;
    box-shadow: 4px 4px 0 var(--bg-pit);
}

.bento-container:not([data-view="home"]) .player-visual {
    grid-row: 1 / span 3;
    width: 44px;
    height: 44px;
    border-width: 1.5px;
}

.bento-container:not([data-view="home"]) .vinyl-container,
.bento-container:not([data-view="home"]) .vinyl {
    width: 40px;
    height: 40px;
}

.bento-container:not([data-view="home"]) .player-info {
    display: contents;
}

.bento-container:not([data-view="home"]) .now-playing-tag {
    grid-column: 2;
    grid-row: 1;
    font-size: 10px;
}

.bento-container:not([data-view="home"]) .track-title {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-container:not([data-view="home"]) .track-artist {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    font-size: 12px;
}

.bento-container:not([data-view="home"]) .player-controls {
    grid-column: 3;
    grid-row: 1 / span 3;
    margin: 0;
    gap: 6px;
}

.bento-container:not([data-view="home"]) #shuffle-btn,
.bento-container:not([data-view="home"]) #repeat-btn,
.bento-container:not([data-view="home"]) .volume-section,
.bento-container:not([data-view="home"]) .player-actions,
.bento-container:not([data-view="home"]) .waveform-wrapper {
    display: none;
}

.bento-container:not([data-view="home"]) .ctrl-btn {
    width: 34px;
    height: 34px;
}

.bento-container:not([data-view="home"]) .ctrl-play {
    width: 44px;
    height: 36px;
}

.bento-container:not([data-view="home"]) .progress-section {
    grid-column: 4;
    grid-row: 1 / span 3;
}

.bento-container:not([data-view="home"]) .dock-queue-btn {
    grid-column: 5;
    grid-row: 1 / span 3;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    background: var(--bg-well);
    color: var(--ink-chalk);
    border: 1.5px solid var(--border-rivet);
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
}

.bento-container:not([data-view="home"]) .dock-queue-btn[aria-expanded="true"] {
    border-color: var(--fly-green);
}

/* Up next folds away under the docked deck until its Queue button opens it. */
.bento-container:not([data-view="home"]) .queue-card {
    display: none;
}

.bento-container.queue-open:not([data-view="home"]) .queue-card {
    display: flex;
    grid-column: 1 / -1;
    max-height: 420px;
}

/* ---------- Discover ---------- */
.dv-flylets {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-left: 5px solid var(--sign-red);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
}

.dv-flylets-art {
    width: 56px;
    height: 56px;
    border-radius: 3px;
    object-fit: cover;
    border: 1.5px solid var(--border-rivet);
}

.dv-flylets-text {
    flex: 1;
    min-width: 0;
}

.dv-flylets-text p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dv-flylets-text h2 {
    margin: 2px 0;
    font-size: 19px;
}

.dv-meta {
    color: var(--ink-ash);
    font-size: 13px;
}

.dv-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dv-section[hidden] {
    display: none;
}

.dv-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dv-section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.dv-creators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.dv-creator {
    padding: 16px;
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
}

.dv-creator.active {
    border-color: var(--fly-green);
}

.dv-creator-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.dv-creator-head h3 {
    margin: 0 0 2px;
    font-size: 16px;
}

.dv-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 3px;
    background: var(--bg-pit);
    border: 1.5px solid var(--border-rivet);
    font-family: var(--sign);
    font-size: 13px;
}

.dv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dv-tick {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    background: var(--fly-green);
    color: var(--ink-black);
    font-size: 11px;
}

.dv-creator-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dv-creator-actions [aria-pressed="true"] {
    border-color: var(--fly-green);
}

.dv-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 10px;
    background: var(--bg-well);
    border: 1px solid var(--fly-green);
    border-radius: 3px;
    font-size: 12.5px;
}

.dv-chip button {
    background: transparent;
    border: 1px solid var(--border-rivet);
    border-radius: 2px;
    color: var(--ink-ash);
    font-size: 12px;
    padding: 2px 8px;
    cursor: pointer;
}

.dv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dv-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-deck);
    border: 2px solid var(--border-rivet);
    border-radius: 4px;
    box-shadow: 4px 4px 0 var(--bg-pit);
    min-width: 0;
}

.dv-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 1.5px solid var(--border-rivet);
    border-radius: 2px;
    background: var(--bg-pit);
    overflow: hidden;
    cursor: pointer;
}

.dv-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dv-cover .fs-new {
    position: absolute;
    top: 8px;
    left: 8px;
}

.dv-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dv-card .dv-meta {
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.dv-date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soot);
    white-space: nowrap;
}

.dv-play {
    margin-top: auto;
    height: 32px;
    background: var(--bg-well);
    color: var(--ink-chalk);
    border: 1px solid var(--border-rivet);
    border-radius: 3px;
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.dv-play:hover {
    border-color: var(--fly-green);
}

.dv-more {
    display: flex;
    justify-content: center;
}

.dv-rows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.dv-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    border-radius: 3px;
    color: var(--ink-chalk);
    text-align: left;
    cursor: pointer;
    min-width: 0;
}

.dv-row img {
    width: 40px;
    height: 40px;
    border-radius: 2px;
    object-fit: cover;
}

.dv-row span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dv-row strong,
.dv-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dv-row small {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-soot);
}

/* ---------- Collection ---------- */
.cl-signed-out {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cl-signed-out h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.cl-signed-out p {
    margin: 0;
    color: var(--ink-ash);
}

.cl-split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 16px;
    align-items: start;
}

.cl-rows {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cl-row {
    display: grid;
    grid-template-columns: 32px 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--bg-well);
    border: 1px solid var(--border-rivet);
    border-radius: 3px;
}

.cl-row img {
    width: 44px;
    height: 44px;
    border-radius: 2px;
    object-fit: cover;
}

.cl-play {
    width: 32px;
    height: 32px;
    background: var(--bg-deck);
    color: var(--ink-chalk);
    border: 1.5px solid var(--border-rivet);
    border-radius: 3px;
    cursor: pointer;
}

.cl-play:hover {
    background: var(--fly-green);
    color: var(--ink-black);
}

.cl-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cl-text strong,
.cl-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cl-text small {
    color: var(--ink-ash);
    font-size: 12px;
}

.cl-tip {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-ash);
    border: 1px solid var(--border-rivet);
    border-radius: 3px;
    padding: 4px 8px;
    text-decoration: none;
    white-space: nowrap;
}

.cl-tip:hover {
    color: var(--ink-chalk);
    border-color: var(--sign-yellow);
}

.cl-empty {
    margin: 12px 0 0;
    color: var(--ink-ash);
}

.cl-editions {
    padding: 16px 20px;
    background: var(--paper-cream);
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    border-radius: 4px;
}

.cl-editions h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

.cl-edition {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cl-edition .dv-mono {
    color: #5a554b;
}

.cl-edition a {
    margin-left: auto;
    padding: 8px 12px;
    background: var(--ink-black);
    color: var(--paper-cream);
    border-radius: 3px;
    font-weight: 700;
    text-decoration: none;
}

.cl-uploads {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border: 2px dashed var(--ink-soot);
    border-radius: 4px;
}

@media (max-width: 1200px) {
    .dv-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cl-split {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-container:not([data-view="home"]) .player-hero {
        top: 54px;
        grid-template-columns: 38px minmax(0, 1fr) auto auto;
        gap: 0 10px;
        padding: 8px 10px;
    }

    .bento-container:not([data-view="home"]) .player-visual {
        width: 38px;
        height: 38px;
    }

    .bento-container:not([data-view="home"]) .vinyl-container,
    .bento-container:not([data-view="home"]) .vinyl {
        width: 34px;
        height: 34px;
    }

    .bento-container:not([data-view="home"]) .now-playing-tag,
    .bento-container:not([data-view="home"]) .progress-section,
    .bento-container:not([data-view="home"]) #prev-btn,
    .bento-container:not([data-view="home"]) #next-btn {
        display: none;
    }

    .bento-container:not([data-view="home"]) .track-title {
        grid-row: 1;
    }

    .bento-container:not([data-view="home"]) .track-artist {
        grid-row: 2;
    }

    .bento-container:not([data-view="home"]) .player-controls {
        grid-column: 3;
    }

    .bento-container:not([data-view="home"]) .ctrl-play {
        flex: none;
    }

    .bento-container:not([data-view="home"]) .dock-queue-btn {
        grid-column: 4;
    }

    .dv-flylets {
        flex-wrap: wrap;
    }

    .dv-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dv-card {
        padding: 8px;
    }

    .cl-row {
        grid-template-columns: 32px 40px minmax(0, 1fr);
    }

    .cl-tip {
        grid-column: 3;
        justify-self: start;
    }
}

/* Docked deck: the record becomes a square cover crop that fits its 44px bay. */
.bento-container:not([data-view="home"]) .player-visual {
    overflow: hidden;
    border-radius: 3px;
}

.bento-container:not([data-view="home"]) .vinyl {
    animation: none;
    border: 0;
    background: none;
}

.bento-container:not([data-view="home"]) .vinyl-label {
    width: 100%;
    height: 100%;
    border-radius: 2px;
}

/* ==========================================================================
   Review fixes (docs/design/review.md)
   ========================================================================== */

/* Small text on dark panels at 4.5:1 or better: soot (#6e695f) only for larger or decorative text. */
.dv-date,
.dv-mono,
.view-aside,
.dv-row small {
    color: var(--ink-ash);
}

/* The cream edition slip keeps its own dark ink. */
.cl-edition .dv-mono {
    color: #5a554b;
}

/* Phones: the Hub, Market, Collection and Discover links as a bottom bar (styles.css hides them at 768px and
   nothing replaced them). Switching views there keeps the music playing like the desktop links. */
@media (max-width: 768px) {
    .top-nav {
        backdrop-filter: none;
    }

    .nav-center {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        justify-content: space-around;
        gap: 0;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
        background: rgba(20, 19, 17, 0.97);
        border-top: 2px solid var(--border-rivet);
    }

    .nav-center .nav-link {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 9px 4px;
        font-size: 13px;
    }

    .nav-center .nav-link.active {
        border-bottom: 0;
        border-top: 2px solid var(--fly-green);
        border-radius: 0 0 3px 3px;
    }

    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .mini-player.visible {
        bottom: calc(68px + env(safe-area-inset-bottom));
    }
}
