/* Fatmas Global Connect
   Dark, heavy, a bit of rust on it. Mobile first, widens on desktop. */

:root {
    --bg:        #0c0a09;
    --bg-2:      #151110;
    --bg-3:      #1e1917;
    --line:      #2c2422;
    --ink:       #ece5e0;
    --ink-dim:   #9a8d86;
    --ink-faint: #6b5f59;
    --ember:     #c9622b;
    --ember-hi:  #e8823f;
    --ember-dim: #7a3a19;
    --danger:    #c04a3c;

    --tabbar-h: 58px;
    --mini-h:   62px;
    --safe-b:   env(safe-area-inset-bottom, 0px);
    --safe-t:   env(safe-area-inset-top, 0px);

    --font: 'Helvetica Neue', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.dim { color: var(--ink-dim); }

svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Buttons ──────────────────────────────────────────────────── */

.btn-primary {
    background: var(--ember);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    padding: 13px 18px;
    letter-spacing: 0.01em;
    transition: background .15s;
}
.btn-primary:hover { background: var(--ember-hi); }
.btn-primary:disabled { opacity: .5; cursor: default; }

.btn-ghost {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--ink);
    background: var(--bg-2);
    text-align: center;
}
.btn-ghost:hover { border-color: var(--ember-dim); }
.btn-ghost.danger { color: var(--danger); }

.btn-primary.sm, .btn-ghost.sm { padding: 8px 16px; font-size: 14px; border-radius: 8px; }

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    color: var(--ink);
    flex: none;
}
.icon-btn:hover { background: var(--bg-3); }
.icon-btn.lg { width: 48px; height: 48px; }
.icon-btn.lg svg { width: 26px; height: 26px; }
.icon-btn.is-on { color: var(--ember-hi); }

/* ── Sign in gate ─────────────────────────────────────────────── */

.gate {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    padding: 24px;
    background:
        radial-gradient(90% 60% at 50% 0%, #241a15 0%, transparent 70%),
        var(--bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}
/* min-width:0 matters: a grid item refuses to shrink below its min-content
   width by default, so one long unbreakable string in the error box used to
   push the whole panel off the side of a phone screen. */
.gate-inner { width: 100%; max-width: 360px; min-width: 0; }
.gate-form { min-width: 0; }

.brand { text-align: center; margin-bottom: 32px; }
.brand-mark {
    font-size: clamp(38px, 13vw, 54px);
    font-weight: 900;
    letter-spacing: 0.14em;
    text-indent: 0.14em;
    color: var(--ink);
    text-shadow: 0 2px 30px rgba(201, 98, 43, .35);
}
.brand-sub {
    margin-top: 4px;
    font-size: 12px;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    text-transform: uppercase;
    color: var(--ember);
}

.gate-form { display: grid; gap: 14px; }

.tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 4px;
}
.tab { padding: 9px; border-radius: 7px; color: var(--ink-dim); font-weight: 600; font-size: 14px; }
.tab.is-on { background: var(--bg-3); color: var(--ink); }

.field { display: grid; gap: 6px; }
.field-label {
    font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
    color: var(--ink-faint);
}
.field-wrap { position: relative; display: grid; }
/* Room for the eye, so a long password never runs underneath it. */
.field-wrap input { padding-right: 46px; }
.peek {
    position: absolute; top: 0; right: 0;
    width: 44px; height: 100%;
    display: grid; place-items: center;
    color: var(--ink-faint);
    border-radius: 0 10px 10px 0;
}
.peek:hover { color: var(--ink); }
.peek.is-on { color: var(--ember-hi); }
.peek svg { width: 19px; height: 19px; }
.peek:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; }

.field input {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px 14px;
    color: var(--ink);
    font: inherit;
    width: 100%;
}
.field input:focus { outline: none; border-color: var(--ember); }

.gate-error {
    margin: 0;
    color: var(--danger);
    font-size: 14px;
    background: rgba(192, 74, 60, .1);
    border: 1px solid rgba(192, 74, 60, .3);
    border-radius: 8px;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    max-height: 40vh;
    overflow-y: auto;
}
.gate-note { margin: 6px 0 0; text-align: center; font-size: 12px; color: var(--ink-faint); }

/* ── App frame ────────────────────────────────────────────────── */

.app {
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    height: 100%;
    max-width: 720px;
    margin: 0 auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}
@media (max-width: 740px) { .app { border: 0; } }

.topbar {
    display: flex; align-items: center; gap: 10px;
    padding: calc(var(--safe-t) + 10px) 12px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(12, 10, 9, .9);
    backdrop-filter: blur(12px);
}
.topbar-title { font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.online { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.online i { width: 7px; height: 7px; border-radius: 50%; background: #58a05a; box-shadow: 0 0 8px #58a05a; }

.avatar-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--ember-dim);
    color: #fff; font-weight: 800; font-size: 13px;
    display: grid; place-items: center;
    flex: none;
}

.channel-btn {
    display: flex; align-items: center; gap: 5px;
    flex: 1; min-width: 0;
    font-size: 17px; font-weight: 800; letter-spacing: -0.02em;
    padding: 4px 6px; margin-left: -6px;
    border-radius: 8px;
}
.channel-btn:hover { background: var(--bg-3); }
.channel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-btn .chev { width: 17px; height: 17px; color: var(--ink-faint); flex: none; }

.chan-group { display: grid; gap: 4px; }
.chan-label {
    font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ember); font-weight: 700;
    padding-left: 2px;
}
.chan {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--bg-3);
    text-align: left; width: 100%;
}
.chan:hover { border-color: var(--ember-dim); }
.chan.is-on { border-color: var(--ember); background: rgba(201, 98, 43, .09); }
.chan-icon {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    border-radius: 8px;
    background: var(--bg); color: var(--ember-hi);
    font-size: 17px; font-weight: 800;
}
.chan-text { min-width: 0; }
.chan-text strong { display: block; font-size: 14px; }
.chan-text span { display: block; font-size: 12px; color: var(--ink-dim); }

.main { min-height: 0; position: relative; }
.view { height: 100%; display: flex; flex-direction: column; min-height: 0; }
#view-music, #view-album { overflow-y: auto; -webkit-overflow-scrolling: touch; display: block; }

.empty { padding: 48px 24px; text-align: center; color: var(--ink-dim); }
.empty p { margin: 4px 0; }

/* ── Chat ─────────────────────────────────────────────────────── */

.chat-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 4px; }
.chat-list { display: flex; flex-direction: column; gap: 2px; }

.day-mark {
    align-self: center;
    margin: 16px 0 10px;
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-faint);
}

.msg { display: flex; gap: 10px; padding: 3px 0; }
.msg-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg-3); color: var(--ink-dim);
    display: grid; place-items: center;
    font-weight: 800; font-size: 12px;
    flex: none; margin-top: 2px;
}
.msg.is-run .msg-avatar { visibility: hidden; height: 0; margin: 0; }
.msg.is-run { padding-top: 0; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1px; }
.msg-author { font-weight: 700; font-size: 14px; }
.msg-author.is-admin { color: var(--ember-hi); }
.msg-author.is-admin::after {
    content: 'BAND';
    margin-left: 6px;
    font-size: 9px; letter-spacing: .1em;
    background: var(--ember-dim); color: #fff;
    padding: 1px 5px; border-radius: 3px;
    vertical-align: 1px;
}
.msg-time { font-size: 11px; color: var(--ink-faint); }
.msg-act { font-size: 11px; color: var(--ink-faint); opacity: 0; padding: 0 2px; }
.msg-head button.msg-act:first-of-type { margin-left: auto; }
.msg:hover .msg-act, .msg.is-editing .msg-act { opacity: 1; }
.msg-act:hover { color: var(--ink); }
/* Nothing hovers on a phone, so hiding these until hover hid them completely. */
@media (hover: none) {
    .msg-act { opacity: .75; }
}

.msg-edited { color: var(--ink-faint); font-size: 12px; }

/* ── Replies ──────────────────────────────────────────────────── */

.quote {
    display: flex; align-items: baseline; gap: 8px;
    width: 100%; max-width: 420px;
    margin: 2px 0 5px;
    padding: 5px 10px;
    border-left: 2px solid var(--ember);
    border-radius: 0 6px 6px 0;
    background: var(--bg-2);
    text-align: left;
    font-size: 13px;
    line-height: 1.35;
}
.quote:hover { background: var(--bg-3); }
.quote-author { color: var(--ember-hi); font-weight: 700; flex: none; }
.quote-body {
    color: var(--ink-dim);
    min-width: 0; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.quote-tag { color: var(--ink-faint); flex: none; }
.quote.is-gone { border-left-color: var(--line); cursor: default; }
.quote.is-gone .quote-body { font-style: italic; color: var(--ink-faint); }

/* The message you jumped to, flashed so it is obvious which one it was. */
.msg.is-found { animation: found 1.6s ease-out; border-radius: 8px; }
@keyframes found {
    0%   { background: rgba(201, 98, 43, .28); }
    100% { background: transparent; }
}

.attach.is-reply { border-left-color: var(--ember-hi); }
.attach.is-reply .attach-text strong { color: var(--ember-hi); font-size: 12px; }

.msg-edit { margin: 4px 0 2px; display: grid; gap: 7px; }
.msg-edit-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--ember-dim);
    border-radius: 10px;
    padding: 9px 12px;
    color: var(--ink);
    font: inherit;
    resize: none;
    line-height: 1.4;
}
.msg-edit-input:focus { outline: none; border-color: var(--ember); }
.msg-edit-actions { display: flex; align-items: center; gap: 8px; }
.msg-edit-hint { font-size: 11px; color: var(--ink-faint); }
@media (hover: none) { .msg-edit-hint { display: none; } }
.msg-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-text a { color: var(--ember-hi); }
.msg.is-pending { opacity: .5; }

.track-card {
    display: flex; align-items: center; gap: 10px;
    margin: 6px 0 2px;
    padding: 8px;
    max-width: 340px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--ember);
    border-radius: 10px;
    text-align: left;
    width: 100%;
}
.track-card:hover { background: var(--bg-3); }
.track-card img { width: 44px; height: 44px; border-radius: 5px; object-fit: cover; background: var(--bg-3); flex: none; }
.track-card-text { min-width: 0; flex: 1; }
.track-card-text strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-card-text span { display: block; font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-card .play-dot {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--ember); color: #fff;
    display: grid; place-items: center; flex: none;
}
.track-card .play-dot svg { width: 15px; height: 15px; }

.chat-jump {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    background: var(--ember); color: #fff;
    font-size: 13px; font-weight: 600;
    padding: 7px 14px; border-radius: 20px;
    cursor: pointer; z-index: 5;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* ── Cuzborg channel ──────────────────────────────────────────── */

.cz-head {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
}
.cz-avatar {
    width: 54px; height: 54px; flex: none;
    border-radius: 50%; overflow: hidden;
    background: var(--bg-3);
    border: 1px solid var(--line);
}
.cz-avatar video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cz-head-text { flex: 1; min-width: 0; }
.cz-head-text strong { display: block; font-size: 15px; }
.cz-head-text span { display: block; font-size: 12px; color: var(--ink-dim); }

.cz-intro {
    font-size: 13px; line-height: 1.5;
    color: var(--ink-dim);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.msg-avatar.is-cuzborg { background: var(--ember-dim); color: #fff; font-size: 15px; }
.msg-author.is-cuzborg { color: var(--ember-hi); }
.msg-text.is-error { color: var(--danger); }

.cz-actions { display: flex; gap: 8px; margin-top: 7px; }
.cz-act {
    font-size: 11px; color: var(--ink-faint);
    border: 1px solid var(--line); border-radius: 14px;
    padding: 3px 10px;
}
.cz-act:hover { color: var(--ink); border-color: var(--ember-dim); }
.cz-act.is-on { color: var(--ember-hi); border-color: var(--ember); }

.cz-prompts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cz-chip {
    font-size: 13px;
    border: 1px solid var(--line); border-radius: 16px;
    padding: 7px 13px;
    background: var(--bg-2);
    color: var(--ink-dim);
    text-align: left;
}
.cz-chip:hover { color: var(--ink); border-color: var(--ember-dim); }

.cz-typing { display: flex; gap: 5px; padding: 8px 2px; }
.cz-typing i {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ink-faint);
    animation: cz-blink 1.3s infinite;
}
.cz-typing i:nth-child(2) { animation-delay: .18s; }
.cz-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes cz-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* Citations: a link means the work was recognised and the section resolves.
   Anything else is deliberately not clickable - see js/cuzborg-citations.js. */
a.cite {
    color: var(--ember-hi);
    text-decoration: none;
    border-bottom: 1px solid var(--ember-dim);
    white-space: nowrap;
}
a.cite:hover { border-bottom-color: var(--ember-hi); }
.cite-unverified {
    color: var(--ink-faint);
    border-bottom: 1px dotted var(--ink-faint);
    white-space: nowrap;
    cursor: help;
}
.cite-unverified::after { content: ' ⚠'; }

.composer { border-top: 1px solid var(--line); padding: 8px 10px; background: var(--bg-2); }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
#composer-input {
    flex: 1;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 10px 14px;
    color: var(--ink);
    font: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
}
#composer-input:focus { outline: none; border-color: var(--ember-dim); }
.send-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--ember); color: #fff;
    display: grid; place-items: center; flex: none;
}
.send-btn:disabled { background: var(--bg-3); color: var(--ink-faint); }

.attach {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px; padding: 6px 8px;
    background: var(--bg-3);
    border-left: 3px solid var(--ember);
    border-radius: 8px;
}
.attach img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; }
.attach-text { min-width: 0; flex: 1; font-size: 13px; }
.attach-text strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-text span { color: var(--ink-dim); font-size: 12px; }

/* ── Music ────────────────────────────────────────────────────── */

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    padding: 16px 14px 24px;
}
.album-tile { text-align: left; }
.album-tile img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 8px; background: var(--bg-3);
    box-shadow: 0 6px 20px rgba(0,0,0,.5);
    transition: transform .18s;
}
.album-tile:hover img { transform: translateY(-3px); }
.album-tile strong { display: block; margin-top: 9px; font-size: 14px; line-height: 1.25; }
.album-tile span { font-size: 12px; color: var(--ink-dim); }

.album-head { display: flex; gap: 16px; padding: 18px 14px 14px; }
.album-art {
    width: 132px; height: 132px; flex: none;
    border-radius: 8px; object-fit: cover; background: var(--bg-3);
    box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.album-meta { min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.album-meta h2 { font-size: 22px; line-height: 1.1; }
.album-meta p { margin: 0; font-size: 13px; }
.album-actions { display: flex; gap: 8px; margin-top: 6px; }

.track-list { list-style: none; margin: 0; padding: 0 8px 8px; }
.track-row {
    display: flex; align-items: center; gap: 4px;
    width: 100%; padding: 4px 8px;
    border-radius: 8px;
}
.track-main {
    display: flex; align-items: center; gap: 12px;
    flex: 1; min-width: 0; padding: 8px 4px;
    text-align: left;
}
.track-row:hover { background: var(--bg-2); }
.track-row.is-playing { background: var(--bg-2); }
.track-row.is-playing .track-name { color: var(--ember-hi); }
.track-num { width: 20px; text-align: right; color: var(--ink-faint); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.track-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-dur { color: var(--ink-faint); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.track-share { color: var(--ink-faint); width: 32px; height: 32px; flex: none; }
.track-share:hover { color: var(--ember-hi); }
.track-share svg { width: 17px; height: 17px; }

.bc-link {
    display: block; text-align: center;
    padding: 14px; margin: 0 14px 24px;
    color: var(--ember-hi); text-decoration: none;
    border: 1px solid var(--line); border-radius: 10px;
    font-size: 14px;
}
.bc-link:hover { border-color: var(--ember-dim); }

/* ── Mini player ──────────────────────────────────────────────── */

.mini {
    display: flex; align-items: center; gap: 6px;
    height: var(--mini-h);
    padding: 0 8px 0 0;
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    position: relative;
}
.mini-progress { position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--line); }
.mini-progress i { display: block; height: 100%; width: 0; background: var(--ember); }
.mini-open { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0 0 0 8px; text-align: left; }
.mini-art { width: 46px; height: 46px; border-radius: 5px; object-fit: cover; background: var(--bg-3); flex: none; }
.mini-text { min-width: 0; }
.mini-text strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text span { display: block; font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Tab bar ──────────────────────────────────────────────────── */

.tabbar {
    display: grid; grid-template-columns: 1fr 1fr;
    height: calc(var(--tabbar-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: var(--bg-2);
    border-top: 1px solid var(--line);
}
.tabbar-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-faint);
    font-size: 10px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
}
.tabbar-btn.is-on { color: var(--ember-hi); }
.tabbar-btn svg { width: 21px; height: 21px; }

/* ── Now playing ──────────────────────────────────────────────── */

.now {
    position: fixed; inset: 0; z-index: 80;
    background: var(--bg);
    overflow: hidden;
    animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(100%); } to { transform: translateY(0); } }

.now-bg {
    position: absolute; inset: -60px;
    background-size: cover; background-position: center;
    filter: blur(60px) saturate(.7) brightness(.4);
    opacity: .8;
}
.now-inner {
    position: relative;
    height: 100%;
    max-width: 460px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center;
    gap: 14px;
    padding: calc(var(--safe-t) + 10px) 24px calc(var(--safe-b) + 22px);
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(12,10,9,.35) 0%, rgba(12,10,9,.92) 55%);
}
.now-close { align-self: flex-start; margin-bottom: 2px; }
.now-art {
    width: min(78vw, 320px); aspect-ratio: 1;
    border-radius: 10px; object-fit: cover; background: var(--bg-3);
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    flex: none;
}
.now-meta { text-align: center; width: 100%; margin-top: 6px; }
.now-meta h2 { font-size: 21px; line-height: 1.2; }
.now-meta p { margin: 4px 0 0; font-size: 14px; }

.scrub { width: 100%; }
.scrub input {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 20px; background: none; cursor: pointer;
}
.scrub input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line); }
.scrub input::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 13px; height: 13px; margin-top: -4.5px;
    border-radius: 50%; background: var(--ember-hi);
}
.scrub input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.scrub input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--ember-hi); }
.scrub-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

.now-controls { display: flex; align-items: center; gap: 14px; }
.play-btn {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--ember); color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 6px 24px rgba(201, 98, 43, .4);
}
.play-btn svg { width: 30px; height: 30px; }

.now-foot { display: flex; gap: 10px; }

.queue-list { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; }
.queue-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 10px; border-radius: 8px; text-align: left;
    font-size: 14px;
}
.queue-row:hover { background: var(--bg-2); }
.queue-row.is-playing { color: var(--ember-hi); }
.queue-row .q-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-row .q-dur { color: var(--ink-faint); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ── Sheets and toast ─────────────────────────────────────────── */

.sheet {
    position: fixed; inset: 0; z-index: 90;
    background: rgba(0,0,0,.6);
    display: grid; align-items: end; justify-items: center;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-b));
}
.sheet-card {
    width: 100%; max-width: 380px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    display: grid; gap: 10px;
}
.sheet-card h3 { font-size: 18px; }
.sheet-card p { margin: 0 0 6px; font-size: 13px; }
.sheet-note {
    margin: -6px 0 4px !important;
    font-size: 12px !important;
    color: var(--ink-faint);
    line-height: 1.4;
}
.btn-ghost.is-on { border-color: var(--ember); color: var(--ember-hi); }
.btn-ghost:disabled { opacity: .5; cursor: default; }

.toast {
    position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 74px);
    transform: translateX(-50%);
    background: var(--bg-3);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    padding: 10px 16px; border-radius: 22px;
    z-index: 200;
    box-shadow: 0 6px 24px rgba(0,0,0,.6);
    animation: rise-fade .2s ease-out;
}
@keyframes rise-fade { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
