        /* ---- Preset library list ---- */
        .lib-list { margin: 8px 0; max-height: 220px; overflow-y: auto; }
        .lib-item {
            background: var(--bg-secondary); padding: 10px; border-radius: 8px; margin-bottom: 6px;
            display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; transition: all 0.2s ease; gap: 8px;
        }
        .lib-item:hover { border-color: var(--accent-primary); }
        .lib-item.selected { border-color: var(--accent-primary); }
        .lib-item .lib-name { font-weight: 600; flex: 1; cursor: pointer; }
        .lib-item .lib-actions { display: flex; gap: 6px; }
        /* The trainer's and metro's lists have no scroll of their own: they expand and ride the
           column's scroll (.panel, css/shell.css). Folding a group is what keeps them short. */
        #sessionList, #metroPresetList { max-height: none; overflow-y: visible; }
        /* preset lists are grouped by who made them — the user-name heading over each group */
        .lib-author { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; color: var(--text-secondary); margin: 12px 0 6px; padding-left: 2px; }
        .lib-author:first-child { margin-top: 0; }
        /* .fold — the heading doubles as the accordion handle. The Saved-sounds list uses the
           plain .lib-author, so it stays a heading and nothing else. */
        .lib-author.fold { display: flex; align-items: center; gap: 8px; cursor: pointer; }
        .lib-author.fold .lib-gname { flex: 1; }
        .lib-author.fold .lib-caret { display: inline-block; transition: transform 0.15s ease; }
        .lib-author.fold.open .lib-caret { transform: rotate(90deg); }
        .lib-author.fold .icon-btn { text-transform: none; letter-spacing: 0; padding: 3px 8px; font-size: 0.7rem; }
        .lib-gadd { width: 100%; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
        .icon-btn {
            background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-primary);
            padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s ease;
        }
        .icon-btn:hover { background: var(--accent-primary); color: var(--bg-primary); }
        .empty-note { color: var(--text-secondary); font-style: italic; font-size: 0.82rem; padding: 8px; text-align: center; }

        /* ---- Theme (colour scheme) picker ---- */
        .theme-control { position: relative; }
        .theme-trigger-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .theme-trigger-row .btn-ghost { flex: none; }
        .theme-adjust { display: flex; flex: 1; min-width: 150px; gap: 12px; align-items: center; }
        .theme-adjust .adj { flex: 1; min-width: 0; }
        .theme-adjust .adj label { display: block; font-size: 0.66rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
        .theme-adjust .adj label .v { color: var(--accent-yellow); font-weight: 700; }
        .theme-adjust input[type="range"] { width: 100%; height: 5px; border-radius: 3px; background: var(--bg-secondary); outline: none; -webkit-appearance: none; }
        .theme-adjust input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-primary); cursor: pointer; }
        .theme-adjust input[type="range"]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: var(--accent-primary); cursor: pointer; border: none; }
        .theme-adjust .adj-reset { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1rem; padding: 4px; align-self: flex-end; }
        .theme-adjust .adj-reset:hover { color: var(--accent-primary); }
        .theme-menu {
            position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 60; display: none;
            background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; padding: 8px;
            box-shadow: 0 8px 26px rgba(0,0,0,0.55); max-height: 52vh; overflow-y: auto;
        }
        .theme-menu.open { display: block; }
        .theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
        .theme-swatch {
            display: flex; align-items: center; gap: 9px; padding: 9px 10px; cursor: pointer; text-align: left;
            background: var(--bg-secondary); border: 2px solid var(--border-color); border-radius: 9px;
            color: var(--text-primary); font-family: inherit; font-size: 0.82rem; transition: border-color 0.2s ease, transform 0.1s ease;
        }
        .theme-swatch:hover { border-color: var(--accent-primary); }
        .theme-swatch:focus-visible { outline: 3px solid var(--accent-primary); outline-offset: 2px; }
        .theme-swatch[aria-pressed="true"] { border-color: var(--accent-primary); }
        .theme-swatch[aria-pressed="true"] .theme-name::after { content: " ✓"; color: var(--accent-green); }
        .theme-swatch .theme-dots { display: flex; flex: none; }
        .theme-swatch .theme-dots span { width: 13px; height: 13px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset; }
        .theme-swatch .theme-dots span + span { margin-left: -4px; }
        .theme-swatch .theme-name { font-weight: 600; line-height: 1.1; }

        /* ---- account / join — reuses .modal / .np-input / .btn-ghost ---- */
        /* The bar is empty in local dev, where there is no API to ask (js/ui/75-account.js). */
        .account-bar:empty { display: none; }
        .account-bar { align-items: center; }
        .account-bar .acc-who { flex: 1; font-size: 0.78rem; color: var(--text-secondary); }
        .account-bar .acc-out { flex: none; width: auto; padding: 6px 12px; }
        .np-note { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45; margin: 0 0 10px; }
        .acc-msg:empty { display: none; }
        .acc-msg { margin: 10px 0 0; color: var(--accent-yellow); }
        .acc-code { text-transform: uppercase; letter-spacing: 1px; }

