/* boypersia — the vault. Builds on home.css tokens and type. */

.vault {
    max-width: 1240px;
    margin: 0 auto;
    padding: 120px var(--pad) 140px;
}

/* ── head ───────────────────────────── */
.v-head { margin-bottom: clamp(40px, 6vw, 72px); }
.v-title.ep { font-size: clamp(3.6rem, 11vw, 10rem); line-height: .9; }
.v-sub {
    margin-top: 18px;
    font-family: var(--fell-i);
    font-style: italic;
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    color: var(--ash);
}

/* ── sold ticker ────────────────────── */
#sold-ticker {
    display: none;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 32px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}
.sold-ticker-label { font-family: var(--fell-i); font-style: italic; color: var(--hot); flex: none; }
.sold-ticker-track { overflow: hidden; flex: 1; }
#sold-ticker-inner { display: inline-flex; white-space: nowrap; animation: ticker 20s linear infinite; }
.sold-ticker-item { display: inline-flex; gap: 12px; align-items: baseline; }
.sold-badge { display: none; }
.sold-name { font-family: var(--fell); text-transform: lowercase; letter-spacing: .04em; }
.sold-price { font-style: italic; color: var(--ash); text-decoration: line-through; }
.sold-ticker-sep { color: var(--hot); margin: 0 24px; font-size: 10px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ── filter bar ─────────────────────── */
#vault-filter-bar {
    display: flex;
    align-items: baseline;
    gap: 24px;
    border-bottom: 1px solid #3a3a3a;
    margin-bottom: 8px;
}
#vault-filter-bar:focus-within { border-bottom-color: var(--white); }
#vf-search {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    color: var(--white);
    font-family: var(--fell);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    letter-spacing: .04em;
    padding: 12px 0;
    outline: none;
}
#vf-search::placeholder { color: #4a4a4a; }
#vf-search::-webkit-search-cancel-button { filter: invert(1) grayscale(1); }
#vf-sort {
    background: transparent;
    color: var(--white);
    border: 0;
    font-family: var(--times);
    font-style: italic;
    font-size: 15px;
    cursor: pointer;
    padding: 4px 0;
}
#vf-sort option { background: #000; font-style: normal; }
#vf-count { font-style: italic; color: var(--ash); font-size: 15px; white-space: nowrap; }

/* ── beat list ──────────────────────── */
#beats-header, .beat-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 60px 64px 64px 112px 128px 232px;
    gap: 16px;
    align-items: center;
}
#beats-header {
    padding: 14px 0 10px;
    font-style: italic;
    font-size: 13px;
    color: var(--ash);
}
.beat-row {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}

.b-num { font-style: italic; color: var(--ash); font-size: 14px; }
.b-title-row { display: flex; align-items: baseline; gap: 10px; }
.b-title {
    font-family: var(--fell);
    font-size: clamp(1.3rem, 1.9vw, 1.7rem);
    line-height: 1.1;
    letter-spacing: .04em;
    text-transform: lowercase;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: color .15s;
}
.b-title:hover { color: var(--hot); }
.b-info-btn { display: none; }
.b-tags { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.b-tag { font-style: italic; font-size: 14px; color: var(--ash); text-transform: lowercase; }
.b-tag.license { display: none; }
.b-vault-badge { display: inline-block; margin-top: 4px; font-family: var(--fell-i); font-style: italic; color: var(--hot); font-size: 14px; }
.b-format-badge { display: none; }

.b-meta { display: none; }
.b-col-bpm, .b-col-key, .b-col-dur { font-size: 15px; font-feature-settings: "tnum"; }

.b-bid-amount { font-family: var(--fell); font-size: 1.35rem; letter-spacing: .02em; }
.b-bid-count { font-style: italic; font-size: 13px; color: var(--ash); }

.b-progress-bar { height: 1px; background: #333; margin-bottom: 8px; }
.b-progress-fill { height: 1px; background: var(--white); transition: width 1s linear; }
.b-progress-fill.urgent { background: var(--hot); }
.b-progress-time { font-size: 14px; font-feature-settings: "tnum"; color: var(--ash); }
.b-progress-time.urgent { color: var(--hot); }

.b-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.b-play-btn {
    width: 38px; height: 38px;
    flex: none;
    border-radius: 50%;
    border: 1px solid #555;
    background: transparent;
    color: var(--white);
    font-size: 11px;
    cursor: pointer;
    transition: border-color .15s, color .15s;
}
.b-play-btn:hover { border-color: var(--white); }
.b-play-btn.play-err { border-color: var(--hot); color: var(--hot); }
.bid-btn, .buynow-btn, .v-btn {
    font-family: var(--fell);
    font-size: 1.05rem;
    letter-spacing: .1em;
    padding: .5em 1.3em .55em;
    border: 1px solid var(--hot);
    background: var(--hot);
    color: var(--white);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s, border-color .15s;
}
.bid-btn:hover, .v-btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.buynow-btn, .v-btn-ghost { background: transparent; border-color: #555; }
.buynow-btn:hover, .v-btn-ghost:hover { background: transparent; border-color: var(--white); color: var(--white); }
.bid-acquired { font-style: italic; color: var(--ash); }

#beats-empty { display: none; padding: 64px 0; text-align: center; }
#beats-empty.show { display: block; }
.beats-empty-title { font-family: var(--fell-i); font-style: italic; font-size: 1.6rem; color: var(--hot); }
.beats-empty-sub { margin-top: 6px; font-style: italic; color: var(--ash); }

/* ── footer ─────────────────────────── */
.v-foot {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin-top: clamp(72px, 10vw, 120px);
    text-align: center;
    font-size: 14px;
    color: var(--ash);
}
.v-foot a, .v-admin { color: var(--white); transition: color .15s; }
.v-foot a:hover, .v-admin:hover { color: var(--hot); }
.v-foot .foot-star { width: 28px; height: 28px; color: var(--hot); }
.v-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; }
.v-admin { background: none; border: 0; font: inherit; color: #555; cursor: pointer; }

/* ── player ─────────────────────────── */
#console-tray {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    background: var(--black);
    border-top: 1px solid var(--rule);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.2, .7, .1, 1);
}
#console-tray.open { transform: none; }
.console-body {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px var(--pad);
    padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.console-info { display: grid; min-width: 0; flex: 0 1 260px; }
#console-beat-name { font-family: var(--fell); color: var(--hot); text-transform: lowercase; letter-spacing: .04em; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console-status { font-style: italic; font-size: 13px; color: var(--ash); text-transform: lowercase; }
.console-led { display: none; }
.console-visualizers { display: none; }
.console-progress-wrap { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.console-time { font-size: 13px; font-feature-settings: "tnum"; color: var(--ash); }
.console-seek-track { flex: 1; height: 15px; display: flex; align-items: center; cursor: pointer; position: relative; }
.console-seek-track::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: #333; }
.console-seek-fill { position: relative; height: 1px; background: var(--white); width: 0; }
#console-vol { width: 84px; accent-color: var(--hot); }
.console-close { background: none; border: 0; color: var(--ash); font: inherit; font-style: italic; cursor: pointer; }
.console-close:hover { color: var(--white); }

/* ── dialogs ────────────────────────── */
#modal-overlay, #beat-detail-overlay, #admin-auth-box {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, .86);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#modal-overlay, #beat-detail-overlay { display: none; }
#modal-overlay.open, #beat-detail-overlay.open { display: flex; }

.v-dialog {
    position: relative;
    width: min(500px, 100%);
    max-height: calc(100svh - 32px);
    overflow: auto;
    background: #050505;
    border: 1px solid #2b2b2b;
    padding: clamp(28px, 5vw, 44px);
    animation: dialog-in .25s ease both;
}
.v-dialog-sm { width: min(380px, 100%); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.v-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: 0;
    color: var(--ash);
    font: inherit;
    font-style: italic;
    cursor: pointer;
}
.v-close:hover { color: var(--white); }

.v-dialog-k { font-family: var(--fell-i); font-style: italic; color: var(--hot); font-size: 1.15rem; }
.v-dialog-title {
    font-family: var(--fell);
    font-weight: 400;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: .04em;
    text-transform: lowercase;
    overflow-wrap: anywhere;
    margin: 4px 0 10px;
}
.v-dialog-info { font-style: italic; color: var(--ash); line-height: 1.6; margin-bottom: 18px; }
.v-dialog-info strong { font-style: normal; color: var(--white); font-weight: 400; }
.v-dialog-price { font-family: var(--fell); font-size: 1.8rem; margin-bottom: 6px; }
.v-fine { font-size: 13px; line-height: 1.6; color: #777; margin: 14px 0 18px; }
.v-fine a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

.v-field { display: block; margin-bottom: 14px; }
.v-field > span { display: block; font-style: italic; font-size: 14px; color: var(--ash); }
.v-field input, .admin-form-input {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #3a3a3a;
    color: var(--white);
    font-family: var(--times);
    font-size: 17px;
    padding: 8px 0;
    outline: none;
    border-radius: 0;
}
.v-field input:focus, .admin-form-input:focus { border-bottom-color: var(--white); }
.v-field input.err, input.err { border-bottom-color: var(--hot) !important; }
.v-field input::placeholder { color: #4a4a4a; }

.v-captcha { display: flex; align-items: baseline; gap: 14px; }
.v-captcha #captcha-question { font-family: var(--fell); font-size: 1.3rem; color: var(--white); font-style: normal; white-space: nowrap; }
.v-captcha input { flex: 1; min-width: 0; width: auto; }
.captcha-refresh { background: none; border: 0; color: var(--ash); font: inherit; font-style: italic; font-size: 14px; cursor: pointer; white-space: nowrap; }
.captcha-refresh:hover { color: var(--white); }

.v-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.v-dialog-actions .v-btn { flex: 1 1 auto; }

#modal-success .v-dialog-title { color: var(--hot); }

/* detail */
.bd-tags { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 18px; }
.bd-tags > * { font-style: italic; font-size: 14px; color: var(--ash); text-transform: lowercase; background: none; border: 0; padding: 0; }
.bd-waveform { display: flex; align-items: center; gap: 3px; height: 54px; margin-bottom: 22px; }
.bd-wave-bar { flex: 1; background: #444; animation: wave var(--dur, .6s) ease-in-out infinite alternate; transform-origin: center; }
#beat-detail-overlay.playing .bd-wave-bar, .bd-wave-bar:nth-child(7n) { background: var(--hot); }
@keyframes wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.bd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.bd-stat-label { font-style: italic; font-size: 13px; color: var(--ash); }
.bd-stat-value { font-family: var(--fell); font-size: 1.3rem; }
.bd-license-section { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; }
.bd-license-name { font-family: var(--fell); text-transform: lowercase; letter-spacing: .04em; font-size: 1.15rem; }
.bd-license-desc { font-style: italic; font-size: 14px; color: var(--ash); max-width: 26ch; }
.bd-price-block { text-align: right; }
.bd-price-label { font-style: italic; font-size: 13px; color: var(--ash); }
.bd-price-value { font-family: var(--fell); font-size: 1.6rem; }
.bd-price-current { font-style: italic; font-size: 13px; color: var(--ash); }
.bd-timer-bar { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: baseline; }
.bd-timer-label { font-style: italic; font-size: 13px; color: var(--ash); }
.bd-timer-value { font-feature-settings: "tnum"; }
.bd-timer-track { grid-column: 1 / -1; height: 1px; background: #333; }
.bd-timer-fill { height: 1px; background: var(--hot); }
.bd-btn-play { flex: 0 0 auto !important; }

/* admin */
.pw-err { margin-top: 12px; font-style: italic; font-size: 14px; color: var(--hot); min-height: 1.2em; }
.admin-login-btn { width: 100%; margin-top: 6px; }

#admin-panel {
    display: none;
    max-width: 1240px;
    margin: 0 auto 160px;
    padding: 40px var(--pad);
    border-top: 1px solid var(--hot);
}
#admin-panel.open { display: block; }
.admin-panel-titlebar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.admin-panel-title { font-family: var(--fell-i); font-style: italic; color: var(--hot); font-size: 1.6rem; }
.admin-panel-actions { display: flex; gap: 16px; align-items: baseline; }
.admin-fb-badge { font-style: italic; font-size: 13px; color: var(--ash); }
.admin-fb-ok { color: var(--white); }
.admin-logout-btn { background: none; border: 0; color: var(--white); font: inherit; font-style: italic; cursor: pointer; }
.admin-logout-btn:hover { color: var(--hot); }
.admin-panel-session-info { font-style: italic; font-size: 13px; color: var(--ash); margin-top: 4px; }
.admin-session-dot { display: none; }
.admin-section { margin-top: 44px; }
#admin-edit-panel { display: none; }
#admin-edit-panel.open { display: block; }
.admin-title { font-family: var(--fell); font-weight: 400; letter-spacing: .06em; font-size: 1.3rem; text-transform: lowercase; margin-bottom: 16px; }
.admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 28px; align-items: end; }
.admin-form-label { display: block; font-style: italic; font-size: 13px; color: var(--ash); }
.admin-form-select { background: #000; }
.admin-btn {
    font-family: var(--fell);
    letter-spacing: .1em;
    font-size: 1rem;
    padding: .55em 1.4em;
    background: var(--hot);
    border: 1px solid var(--hot);
    color: var(--white);
    cursor: pointer;
    justify-self: start;
    text-transform: lowercase;
}
.admin-btn-ghost { background: transparent; border-color: #555; }
.admin-beat-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.admin-beat-name { font-family: var(--fell); text-transform: lowercase; letter-spacing: .04em; }
.admin-beat-id { font-style: italic; font-size: 13px; color: var(--ash); }
.admin-remove-btn { background: none; border: 1px solid #555; color: var(--white); font: inherit; font-size: 13px; padding: 4px 12px; cursor: pointer; text-transform: lowercase; }
.admin-remove-btn:hover { border-color: var(--hot); color: var(--hot); }

/* toasts */
#toast-stack {
    position: fixed;
    right: var(--pad);
    bottom: 90px;
    z-index: 60;
    display: grid;
    gap: 8px;
    justify-items: end;
}
.toast {
    display: flex;
    gap: 10px;
    align-items: baseline;
    background: #050505;
    border: 1px solid #2b2b2b;
    border-left: 2px solid var(--white);
    padding: 12px 16px;
    font-style: italic;
    font-size: 15px;
    max-width: min(360px, calc(100vw - 32px));
    animation: toast-in .25s ease both;
}
.toast-error { border-left-color: var(--hot); }
.toast-icon { font-style: normal; color: var(--hot); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ── small screens ──────────────────── */
@media (max-width: 960px) {
    #beats-header { display: none; }
    .beat-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "name bid"
            "meta prog"
            "act  act";
        gap: 10px 16px;
        align-items: start;
    }
    .b-num, .b-col-bpm, .b-col-key, .b-col-dur { display: none; }
    .b-name { grid-area: name; }
    .b-meta { grid-area: meta; display: flex; gap: 8px; font-size: 14px; color: var(--ash); font-style: italic; }
    .b-meta-sep { color: #444; }
    .b-bid { grid-area: bid; text-align: right; }
    .b-progress { grid-area: prog; text-align: right; min-width: 96px; }
    .b-actions { grid-area: act; justify-content: flex-start; margin-top: 6px; }
    .bid-btn { flex: 1; }
}
@media (max-width: 760px) {
    .vault { padding-top: 96px; }
    #vault-filter-bar { flex-wrap: wrap; gap: 6px 18px; }
    #vf-search { flex-basis: 100%; }
    .console-body { flex-wrap: wrap; gap: 8px 16px; }
    .console-info { flex: 1 1 60%; }
    .console-progress-wrap { flex-basis: 100%; order: 3; }
    #console-vol { display: none; }
    .bd-stats { grid-template-columns: repeat(2, 1fr); }
    .bd-license-section { flex-direction: column; }
    .bd-price-block { text-align: left; }
}
