:root {
    --bg: #07081A; --card: #111330; --line: #262A55; --text: #EEF0FF; --muted: #9DA3C9;
    --accent: #AE97FF; --ok: #5FD6A0; --bad: #FF7A8A;
    --grad: linear-gradient(90deg, #2F8CFF, #6B3DF0 55%, #A04DFF);
    color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 8px 0 18px; }
h1 span, .brand span { color: var(--accent); }
h2 { font-size: 18px; margin: 26px 0 10px; }
.muted { color: var(--muted); }
h2 .muted { font-weight: 400; margin-left: 6px; }

.top { display: flex; align-items: center; gap: 28px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.top nav { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.top nav a, .nav-group > button { color: var(--muted); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.top nav a.active, .nav-group:has(a.active) > button { color: var(--text); background: var(--card); }
/* A group of pages under one word: its list opens under it on hover (or on Tab from the keyboard). */
.nav-group { position: relative; }
.nav-group > button { background: none; border: 0; font: inherit; cursor: default; }
.nav-group > button::after { content: "▾"; margin-left: 6px; font-size: 11px; opacity: .7; }
.nav-menu { position: absolute; left: 0; top: 100%; z-index: 30; min-width: 100%; display: none; flex-direction: column; gap: 2px; padding: 6px; background: #1B1E48; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.nav-group:hover > .nav-menu, .nav-group:focus-within > .nav-menu { display: flex; }
.top nav .nav-menu a { border-radius: 10px; }
.top nav .nav-menu a:hover { color: var(--text); background: rgba(174, 151, 255, .12); text-decoration: none; }
.top nav .nav-menu a.active { background: rgba(174, 151, 255, .2); }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 0; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; overflow-x: auto; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.line input:not([type=time]):not([type=checkbox]):not([type=date]) { flex: 1; min-width: 180px; }
.line input[type=date] { flex: none; width: auto; min-width: 0; }
.grow { flex: 1; }
.actions { margin-top: 14px; }
.crumbs { color: var(--muted); margin: 0; font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover { background: rgba(174, 151, 255, .07); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

img.logo { height: 22px; width: 44px; object-fit: contain; vertical-align: middle; margin-right: 8px; background: #fff; border-radius: 4px; padding: 2px; }
img.logo.big { height: 40px; width: 80px; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.badge.on { color: var(--ok); border-color: rgba(95, 214, 160, .4); }
.badge.off { color: var(--muted); }
.badge.warn { color: #FFC46B; border-color: rgba(255, 196, 107, .45); }
.nowrap { white-space: nowrap; }
.transcript { white-space: pre-wrap; margin: 0; }
td audio { height: 32px; width: 170px; }
.sub { color: var(--muted); font-size: 13px; }
ul.columns { columns: 3 220px; margin: 10px 0 0; padding-left: 20px; }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
label, .label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13px; }
.label { margin-bottom: 6px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
.cols { display: flex; gap: 14px; flex-wrap: wrap; }
.cols label { flex: 1; min-width: 160px; }
.cols label.wide { flex: 2; }
input, textarea, select {
    background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 12px; font: inherit; width: 100%;
}
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=time] { width: auto; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input:disabled, textarea:disabled { opacity: .65; }

button, .button {
    background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 999px;
    padding: 8px 18px; font: inherit; cursor: pointer; white-space: nowrap; display: inline-block;
}
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
.primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.small { padding: 4px 12px; font-size: 13px; }
.danger { color: var(--bad); border-color: rgba(255, 122, 138, .4); }
.error { color: var(--bad); margin: 8px 0; }
.ok { color: var(--ok); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { flex-direction: row; border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; color: var(--muted); font-size: 14px; }
.chip.on { background: rgba(174, 151, 255, .18); border-color: var(--accent); color: var(--text); }
.chip input { display: none; }
.chip.locked { opacity: .55; cursor: default; }
.narrow { max-width: 460px; }
button.chip { background: transparent; }
input.short { width: 84px; flex: none !important; min-width: 0 !important; }
.gap { width: 18px; }
.plan-grid { width: auto; align-self: flex-start; border-collapse: separate; border-spacing: 3px; }
.plan-grid th, .plan-grid td { padding: 0; border: 0; text-align: center; }
.plan-grid tbody th { padding-right: 8px; font-variant-numeric: tabular-nums; }
.plan-grid .head { border: 0; padding: 2px 6px; color: var(--muted); font-size: 13px; border-radius: 6px; }
.plan-grid .cell { width: 46px; height: 26px; padding: 0; border-radius: 6px; font-size: 11px; color: #fff; }
.plan-grid .cell.on { background: var(--grad); border-color: transparent; }
/* ---- media plan as it sounds (player style) ---- */
.pv { display: flex; flex-direction: column; gap: 14px; }
.pv.faded { opacity: .55; filter: saturate(.4); }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pv-big { font-size: 22px; font-weight: 700; }
.pv-days { display: flex; gap: 6px; }
.pv-day { padding: 4px 10px; border-radius: 999px; font-size: 13px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.pv-day.small { padding: 1px 7px; font-size: 11px; }
.pv-day.on { color: #fff; background: var(--grad); border-color: transparent; font-weight: 600; }
.pv-group { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pv-strip { position: relative; height: 46px; border-radius: 12px; background: rgba(255,255,255,.03); margin-bottom: 4px; }
.pv-open { position: absolute; top: 0; height: 30px; background: rgba(140,110,255,.14); border-radius: 10px; }
.pv-tick { position: absolute; top: 5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 8px rgba(160,77,255,.6); }
.pv-tick.silent { background: #FFB454; box-shadow: none; opacity: .8; }
.pv-hour { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pv-times { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-time { font-weight: 700; font-variant-numeric: tabular-nums; padding: 5px 11px; border-radius: 10px; background: rgba(140,110,255,.12); border: 1px solid rgba(174,151,255,.25); }
.pv-time.silent { color: #FFB454; border-color: rgba(255,180,84,.45); background: transparent; text-decoration: line-through; }
/* ---- distributing a recording over the ad blocks ---- */
.bk { border-color: rgba(174,151,255,.45); background: linear-gradient(180deg, rgba(107,61,240,.10), transparent 70%), var(--card); display: flex; flex-direction: column; gap: 12px; }
.bk-result { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.bk-tiles .tile { min-width: 150px; margin: 0; padding: 12px 16px; }
.bk-tiles .tile b { font-size: 26px; }
.tile.warn { border-color: rgba(255,180,84,.55); }
.tile.warn b, .warn-text { color: #FFB454; }
.bk-problems { width: auto; min-width: 520px; }
.bk p.badge { white-space: normal; align-self: flex-start; padding: 6px 14px; margin: 0; }
.blocks-preview { display: flex; flex-wrap: wrap; gap: 4px; }
.blocks-preview span { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--muted); padding: 2px 6px; border-radius: 6px; background: rgba(140,110,255,.10); }
/* ---- extending recordings in the list ---- */
.ex-bulk { position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-color: var(--accent); box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.ex-bulk input[type=date], .ex-form input[type=date] { width: auto; }
.ex-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
button.on-chip { border-color: var(--accent); background: rgba(174,151,255,.18); }
/* ---- the recordings list: grouped by advertiser, one line per recording, its text under its name ---- */
.cr-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cr-cols, .cr-row { display: grid; grid-template-columns: 22px minmax(0, 1.5fr) 170px 180px minmax(0, 1.1fr) 236px; column-gap: 16px; align-items: start; }
.cr-cols { padding: 0 16px; color: var(--muted); font-size: 13px; align-items: center; }
.cr-right { text-align: right; }
.cr-group { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.cr-group-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; padding: 9px 16px; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; background: rgba(174,151,255,.07); }
.cr-group-head a { font-weight: 600; color: var(--text); }
.cr-row { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cr-row:last-child { border-bottom: 0; border-radius: 0 0 16px 16px; }
.cr-row.picked { background: rgba(174,151,255,.08); }
.cr-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cr-title > a:first-child { font-weight: 600; overflow-wrap: anywhere; }
.cr-text { position: relative; outline: none; }
.cr-clip { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-clip.none { font-style: italic; opacity: .6; }
.cr-text .cr-clip { cursor: help; }
.cr-full { position: absolute; left: -14px; top: 100%; z-index: 20; width: min(540px, 86vw); max-height: 50vh; overflow-y: auto; padding: 12px 14px; background: #1B1E48; border: 1px solid var(--accent); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.6); white-space: pre-wrap; font-size: 14px; visibility: hidden; opacity: 0; transition: opacity .12s, visibility 0s .12s; }
.cr-full span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.cr-text:hover .cr-full, .cr-text:focus .cr-full { visibility: visible; opacity: 1; transition: opacity .12s .3s, visibility 0s .3s; }
.cr-row audio { height: 32px; width: 170px; display: block; }
.cr-nets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cr-net { display: inline-flex; gap: 6px; max-width: 100%; font-size: 12px; padding: 1px 9px; border-radius: 999px; background: rgba(140,110,255,.12); color: var(--muted); }
.cr-net span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-net b { color: var(--text); font-variant-numeric: tabular-nums; }
.cr-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cr-buttons { display: flex; gap: 6px; justify-content: flex-end; }
.cr-extend { grid-column: 1 / -1; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(174,151,255,.08); }
@media (max-width: 1000px) {
    .cr-cols { grid-template-columns: 22px 1fr; }
    .cr-cols span:nth-child(n+3) { display: none; }
    .cr-row { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 10px; }
    .cr-audio, .cr-when, .cr-where { grid-column: 2 / -1; }
    .cr-act { grid-column: 3; grid-row: 1; }
}

/* ---- an address's ad blocks on a day ---- */
.bb-day { position: relative; height: 92px; border-radius: 12px; background: rgba(255,255,255,.03); }
.bb-day-bar { position: absolute; bottom: 20px; width: 3px; margin-left: -1px; max-height: 64px; border-radius: 2px 2px 0 0; background: var(--grad); box-shadow: 0 0 6px rgba(160,77,255,.45); transform-origin: bottom; }
.bb-day-bar.over { background: linear-gradient(180deg, #FF7A8A, #A04DFF); box-shadow: 0 0 8px rgba(255,122,138,.6); }
.bb-day-bar.silent { background: #FFB454; box-shadow: none; opacity: .7; }
.bb-day-bar.idle { background: var(--line); box-shadow: none; }
.bb-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.bb-legend i { display: inline-block; width: 16px; height: 8px; border-radius: 3px; margin-left: 8px; }
.bb-legend i.st-airs { background: var(--grad); }
.bb-legend i.st-ended { background: repeating-linear-gradient(135deg, #3a3e66 0 3px, transparent 3px 6px); border: 1px solid #4a4f80; }
.bb-legend i.st-off { background: #2a2d50; border: 1px solid var(--line); }
.bb-legend i.st-planned { border: 1px dashed var(--accent); }
.bb-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bb-row { display: grid; grid-template-columns: 92px 1fr 190px; gap: 16px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.bb-row.over { border-color: rgba(255,122,138,.45); }
.bb-row.silent { opacity: .6; }
.bb-row.empty { padding: 6px 16px; background: transparent; border-style: dashed; }
.bb-row.empty .bb-time { font-size: 15px; color: var(--muted); }
.bb-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; line-height: 1.2; }
.bb-time small { font-size: 11px; font-weight: 500; }
.bb-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bb-bar { position: relative; display: flex; gap: 2px; height: 22px; border-radius: 8px; background: rgba(255,255,255,.04); overflow: visible; }
.bb-row.empty .bb-bar { height: 8px; margin-top: 6px; }
.bb-seg { display: block; height: 100%; border-radius: 6px; background: hsl(var(--hue) 70% 62%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.bb-seg:hover { filter: brightness(1.2); text-decoration: none; }
.bb-seg.st-ended { background: repeating-linear-gradient(135deg, hsl(var(--hue) 20% 38%) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px hsl(var(--hue) 20% 45%); }
.bb-seg.st-off { background: #2a2d50; box-shadow: inset 0 0 0 1px var(--line); }
.bb-seg.st-planned { background: transparent; box-shadow: inset 0 0 0 1px hsl(var(--hue) 70% 62%); border: 1px dashed hsl(var(--hue) 70% 62%); }
.bb-limit { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #FFB454; border-radius: 1px; opacity: .8; }
.bb-ads { display: flex; flex-wrap: wrap; gap: 6px; }
.bb-ad { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 13px; max-width: 100%; }
.bb-ad:hover { border-color: var(--accent); text-decoration: none; }
.bb-ad i { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--hue) 70% 62%); flex: none; }
.bb-ad span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-ad small { color: var(--muted); font-variant-numeric: tabular-nums; }
.bb-ad em { font-style: normal; font-size: 12px; color: var(--muted); }
.bb-ad.st-ended span, .bb-ad.st-off span { text-decoration: line-through; color: var(--muted); }
.bb-ad.st-planned { border-style: dashed; }
.bb-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.bb-sum b { font-size: 20px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
    .bb-row { grid-template-columns: 1fr; gap: 8px; }
    .bb-sum { align-items: flex-start; text-align: left; }
}
/* ---- the client's media plan: a white sheet on screen, the page itself on paper ---- */
.mp-note { display: inline-block; white-space: normal; padding: 6px 14px; }
.mp-sheet { background: #fff; color: #1b1d33; max-width: 820px; margin: 18px auto 0; padding: 40px 48px; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.45); font-size: 14px; line-height: 1.45; }
.mp-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid; border-image: linear-gradient(90deg, #2F8CFF, #6B3DF0 55%, #A04DFF) 1; padding-bottom: 14px; margin-bottom: 18px; }
.mp-brand { font-size: 22px; font-weight: 800; }
.mp-brand span { color: #6B3DF0; }
.mp-title { font-size: 24px; font-weight: 800; letter-spacing: .08em; color: #6B3DF0; }
.mp-right { text-align: right; }
.mp-small { font-size: 12px; color: #5d6285; }
.mp-facts { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.mp-facts th { width: 130px; color: #5d6285; font-weight: 500; font-size: 13px; padding: 5px 0; border: 0; vertical-align: top; }
.mp-facts td { padding: 5px 0; border: 0; }
.mp-text { background: #f4f2ff; border-left: 3px solid #6B3DF0; border-radius: 4px; padding: 10px 14px; margin-bottom: 14px; white-space: pre-wrap; }
.mp-text span { display: block; font-size: 11px; color: #5d6285; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.mp-totals { display: flex; gap: 12px; margin-bottom: 18px; }
.mp-totals div { flex: 1; border: 1px solid #e2e0f3; border-radius: 8px; padding: 10px 14px; color: #5d6285; font-size: 12px; }
.mp-totals b { display: block; font-size: 22px; color: #1b1d33; font-variant-numeric: tabular-nums; }
.mp-group { border: 1px solid #e2e0f3; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; break-inside: avoid; }
.mp-group-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.mp-addresses { font-size: 12px; color: #5d6285; margin-top: 2px; }
.mp-times { display: flex; flex-wrap: wrap; gap: 5px; }
.mp-times span { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; padding: 3px 8px; border-radius: 5px; background: #efeafe; color: #3b2a8f; }
.mp-sum { margin-top: 8px; text-align: right; }
.mp-foot { margin-top: 16px; }
.mp-sign { display: flex; gap: 40px; margin-top: 40px; }
.mp-sign div { flex: 1; font-size: 13px; color: #5d6285; }
.mp-sign i { display: block; border-bottom: 1px solid #1b1d33; height: 36px; }
.mp-h { font-size: 15px; font-weight: 700; color: #3b2a8f; margin: 20px 0 8px; }
.mp-day { width: 100%; border-collapse: collapse; font-size: 13px; }
.mp-day tr { break-inside: avoid; }
.mp-day th { width: 64px; text-align: left; vertical-align: top; font-weight: 700; font-variant-numeric: tabular-nums; color: #3b2a8f; padding: 5px 8px 5px 0; border: 0; border-bottom: 1px solid #e2e0f3; }
.mp-day td { padding: 5px 0; border: 0; border-bottom: 1px solid #e2e0f3; color: #1b1d33; }
.mp-day tr:last-child th, .mp-day tr:last-child td { border-bottom: 0; }
@media print {
    @page { size: A4; margin: 14mm; }
    body { background: #fff !important; }
    .top, .no-print, #blazor-error-ui { display: none !important; }
    main { max-width: none; padding: 0; margin: 0; }
    .mp-sheet { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
    .mp-times span, .mp-text { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 640px) {
    .mp-sheet { padding: 22px 18px; }
    .mp-totals, .mp-sign { flex-direction: column; }
}
.subcard { border: 1px solid var(--accent); border-radius: 12px; padding: 14px; margin: 10px 0; }
.who a { color: var(--muted); }

.tiles { display: flex; gap: 14px; flex-wrap: wrap; }
.tile { display: flex; flex-direction: column; min-width: 170px; color: var(--muted); }
.tile b { font-size: 34px; color: var(--text); }
.tile:hover { text-decoration: none; border-color: var(--accent); }
button.tile { text-align: left; font: inherit; cursor: pointer; white-space: normal; }
button.tile.on { border-color: var(--accent); }
select.narrow-select { width: auto; max-width: 220px; }

.login { max-width: 380px; margin: 12vh auto 0; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #40141c; padding: 10px 18px; }

/* Silence rules: the addresses to choose from, in columns */
.silence-places { columns: 3 240px; margin: 4px 0 10px 160px; }
.silence-places label { break-inside: avoid; margin: 0 0 8px; }
select.silence-where { flex: 1; width: auto; min-width: 220px; }

/* ---- song rights on a user's page ---- */
.rights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.right-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text); font-size: 15px; }
.right-card.on { border-color: var(--accent); background: rgba(174,151,255,.1); }
.right-card .line { margin: 0; }

/* ---- songs: listening, approving, arranging (SongBoard) ---- */
.badge.bad { color: var(--bad); border-color: rgba(255,122,138,.45); }
kbd { font: 12px/1 "Segoe UI", system-ui, sans-serif; padding: 2px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; color: var(--text); background: rgba(255,255,255,.04); }
.sb.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.sb-main { min-width: 0; }
.sb-filters .line { margin: 0; }
.sb-bulk { position: sticky; top: 8px; z-index: 6; border-color: var(--accent); box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.sb-bulk .line { margin: 0; }
.sb-rate { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.sb-table td { padding: 8px 10px; vertical-align: middle; }
.sb-table tr.now { background: rgba(174,151,255,.12); }
.sb-table tr.picked { background: rgba(174,151,255,.07); }
.sb-table tr[draggable=true] { cursor: grab; }
.sb-song { display: flex; flex-direction: column; min-width: 180px; }
.sb-name { font-weight: 600; overflow-wrap: anywhere; }
.sb-lists { max-width: 320px; }
.added { display: flex; flex-direction: column; white-space: nowrap; }
.added .fresh { color: var(--ok); font-weight: 600; }
.upl { display: flex; flex-direction: column; gap: 6px; }
.upl .line { margin: 0; }
.upl-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.upl-bar > div { height: 100%; background: var(--accent); border-radius: inherit; transition: width .3s ease; }
.upl-bar.done > div { background: var(--ok); }
.upl-name { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; text-align: center; }
.play-btn.on { background: var(--grad); border-color: transparent; color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 999px; background: rgba(140,110,255,.14); color: var(--text); white-space: nowrap; }
.tag button { border: 0; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--muted); background: none; }
.tag button:hover { color: var(--bad); }
.stars { display: inline-flex; align-items: center; gap: 1px; white-space: nowrap; }
.stars .star { color: #3a3f6e; font-size: 16px; line-height: 1; }
.stars .star.lit { color: #8f86c9; }
.stars .star.lit.mine { color: #FFC46B; }
.stars button.star { border: 0; background: none; padding: 0 1px; cursor: pointer; }
.stars.editable:hover .star { color: #FFC46B; }
.stars.editable .star:hover ~ .star { color: #3a3f6e; }
.stars small { margin-left: 6px; color: var(--muted); font-size: 12px; }
.stars.big .star { font-size: 24px; }
/* the song being listened to */
.np { display: flex; flex-direction: column; gap: 10px; border-color: rgba(174,151,255,.5); background: linear-gradient(180deg, rgba(107,61,240,.14), transparent 80%), var(--card); box-shadow: 0 10px 34px rgba(0,0,0,.5); }
.np-head { display: flex; justify-content: space-between; gap: 12px; }
.np-head > button { align-self: flex-start; }
/* arranging: the player stays at the bottom of the window, small, while the list scrolls */
.np.bar { position: fixed; z-index: 20; left: 50%; bottom: 12px; transform: translateX(-50%); width: min(980px, calc(100vw - 24px)); margin: 0; padding: 10px 14px; gap: 6px; }
.np.bar .np-title { font-size: 16px; }
.np.bar .np-keys, .np.bar .np-tags, .np.bar .sub, .np.bar .np-jumps { display: none; }
.np.bar audio { height: 32px; }
.np.bar .np-controls > button { min-width: 0; padding: 4px 10px; }
.np.bar .np-actions > button { padding: 5px 14px; font-size: 14px; }
.sb.has-bar { padding-bottom: 230px; }
.np-what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.np-title { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.np-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.np audio { width: 100%; height: 40px; }
.np-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.np-controls > button { min-width: 54px; padding: 6px 12px; }
.np-play { background: var(--grad); border-color: transparent; color: #fff; }
.np-jumps { display: inline-flex; gap: 4px; margin-left: auto; }
.np-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.np-actions > button { padding: 10px 22px; font-size: 16px; }
.np-rate { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); }
.np-keys { color: var(--muted); font-size: 12px; line-height: 2; }
.reject-box { border-color: var(--bad); margin: 0; }
/* playlists beside the songs: drop targets */
.sb-side { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.sb-side-head { display: flex; justify-content: space-between; align-items: center; }
.sb-side p { margin: 0; }
.sb-kind { margin-top: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pl-drop { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px dashed transparent; border-radius: 12px; transition: background .1s, border-color .1s; }
.pl-drop:hover { background: rgba(174,151,255,.06); }
.pl-drop.scoped { border-color: var(--line); background: rgba(174,151,255,.08); }
.pl-drop.over { border-color: var(--accent); background: rgba(174,151,255,.22); }
.pl-drop-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; padding: 0; background: none; text-align: left; white-space: normal; }
.pl-drop-name span { font-weight: 600; font-size: 14px; }
.pl-drop-name small { font-size: 12px; }
/* playlist pictures and cards */
.cover { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; font-weight: 800; font-size: 34px; color: #fff; background: linear-gradient(135deg, hsl(var(--hue, 260) 70% 55%), hsl(calc(var(--hue, 260) + 50) 70% 35%)); }
.cover.small { width: 42px; height: 42px; font-size: 14px; border-radius: 9px; }
.cover.big { width: 220px; height: 220px; font-size: 64px; border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pl-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: var(--text); transition: transform .12s, border-color .12s; }
.pl-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.pl-card .cover { border-radius: 0; }
.pl-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.pl-desc { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.pl-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; background: linear-gradient(135deg, rgba(107,61,240,.18), transparent 60%), var(--card); }
.pl-hero-cover { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pl-hero-body { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 8px; }
.pl-title { margin: 0; font-size: 34px; }
.pl-description { margin: 0; white-space: pre-wrap; opacity: .9; }
.pl-facts { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); }
.pl-facts b { color: var(--text); font-size: 18px; }
.pl-upload { position: relative; overflow: hidden; }
.pl-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pl-where { display: flex; flex-direction: column; gap: 6px; }
.pl-attach { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.pl-attach-row { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
@media (max-width: 1000px) {
    .sb.with-side { grid-template-columns: 1fr; }
    .sb-side { position: static; max-height: none; }
    .np-rate, .np-jumps { margin-left: 0; }
}
@media (max-width: 640px) {
    .cover.big { width: 160px; height: 160px; }
    .sb-table th:nth-child(4), .sb-table td:nth-child(4) { display: none; }
}
.sb.has-bar .sb-side { max-height: calc(100vh - 250px); }
@media (max-width: 640px) {
    .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cover { font-size: 26px; }
}
