/* Secret Progress files. Site brand on the top bar; each section sets its own --s-* colors. */
:root {
  --bg: #121214;
  --panel: #1b1b1f;
  --panel-2: #232328;
  --line: #2f2f36;
  --ink: #ece8df;
  --muted: #9a968e;
  --accent: #e8b04a;
  --accent-ink: #17140c;
  --warn: #e0624f;
  --ok: #7fb37a;
  --radius: 8px;
  --font: ui-sans-serif, -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --s-bg: #15151a;
  --s-ink: #f3efe6;
  --s-accent: #e8b04a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* top bar: white, black text and logo */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff; color: #111; border-bottom: 1px solid #e2e2e2; color-scheme: light; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #111; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; white-space: nowrap; }
.wordmark .mark { width: 28px; height: 28px; display: block; }
.search { flex: 1; max-width: 420px; margin-left: auto; }
.topbar .search input { width: 100%; padding: 7px 12px; border-radius: 20px; border: 1px solid #d4d4d4; background: #f4f4f4; color: #111; outline: none; }
.topbar .search input::placeholder { color: #777; }
.topbar .search input:focus { border-color: #111; background: #fff; }
.usernav { display: flex; gap: 6px; align-items: center; }
.usernav a, .usernav button { font-size: 13px; color: #111; text-decoration: none; background: none; border: 0; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.usernav a:hover, .usernav button:hover { color: #111; background: #efefef; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 120px; outline: none; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #4a4a54; }
.btn.primary { background: var(--s-accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], textarea, select {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--s-accent); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.err { color: var(--warn); font-size: 14px; min-height: 1.2em; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }

/* sign in */
.auth { max-width: 360px; margin: 10vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
/* sign-in background: the whole image, centered, on a page color matched to its edges */
html.signin { background: var(--signin-color); }
html.signin body { background: transparent; min-height: 100vh; }
html.signin body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--signin-img) center / contain no-repeat; }
html.signin .auth { background: rgba(27, 27, 31, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 900px) { html.signin .auth { margin: 14vh 2vw 0 auto; } }
/* sign-in page only: a taller top bar carrying the original stamp */
html.signin .topbar { padding: 5px 24px; }
html.signin .wordmark { gap: 16px; font-size: 22px; letter-spacing: .12em; align-items: flex-start; }
html.signin .wordmark span { line-height: 1; margin-top: 11px; } /* level with the tops of the smokestacks */
html.signin .wordmark .mark { width: auto; height: 72px; }
@media (max-width: 899px) {
  html.signin .topbar { padding: 4px 16px; }
  html.signin .wordmark { gap: 10px; font-size: 13px; letter-spacing: .1em; }
  html.signin .wordmark .mark { height: 48px; }
  html.signin .wordmark span { margin-top: 10px; }
}
@media (max-width: 899px) and (orientation: portrait) {
  html.signin body::before { top: 57px; background-position: center top; }
  html.signin .auth { margin-top: calc(66.7vw + 24px); }
}
html.signin .auth .btn.primary { background: #e3e6e1; color: #17171a; border-color: #e3e6e1; }
html.signin .auth .btn.primary:hover { background: #f2f4f0; border-color: #f2f4f0; }
.auth h1 { font-size: 20px; margin-bottom: 4px; }
.auth .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 10px; }

/* home */
.home-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: block; text-decoration: none; border-radius: 12px; padding: 18px 18px 44px; min-height: 160px; position: relative; overflow: hidden;
  background: var(--c-bg); color: var(--c-ink); border: 1px solid rgba(255,255,255,.06); transition: transform .12s; }
.card:hover { transform: translateY(-2px); }
.card .logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; margin-bottom: 14px; display: block; }
.card .logo-fallback { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--c-accent); color: var(--c-bg); font-weight: 800; margin-bottom: 14px; }
.card h2 { color: var(--c-ink); }
.card .tag { opacity: .7; font-size: 13px; margin-top: 2px; }
.card .stats { position: absolute; bottom: 14px; left: 18px; right: 18px; font-size: 12px; opacity: .65; }
.card .bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c-accent); }
.feed { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feed h3 { margin-bottom: 8px; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.feed ul { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li a { text-decoration: none; }
.feed li a:hover { color: var(--accent); }
@media (max-width: 720px) { .feed { grid-template-columns: 1fr; } }

/* section header */
.shead { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 12px; background: var(--s-bg); color: var(--s-ink); margin-bottom: 14px; border: 1px solid rgba(255,255,255,.06); position: relative; overflow: hidden; }
.shead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--s-accent); }
.shead img, .shead .logo-fallback { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; }
.shead .logo-fallback { display: grid; place-items: center; background: var(--s-accent); color: var(--s-bg); font-weight: 800; font-size: 20px; }
.shead h1 a { text-decoration: none; }
.shead .tag { opacity: .7; font-size: 14px; }
.shead nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.shead nav a { color: var(--s-ink); opacity: .75; text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.shead nav a:hover, .shead nav a.on { opacity: 1; background: rgba(255,255,255,.08); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin: 6px 0 12px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.crumbs .here { color: var(--ink); font-weight: 600; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.selbar { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* folder note */
.note { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.note-body { font-size: 14px; }
.note-body.clamped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.note-body ul { margin: 4px 0; padding-left: 20px; }
.note-body .md-h { font-weight: 650; margin-top: 6px; }
.note-body .md-gap { height: 6px; }
.note-body a { color: var(--s-accent); }
.note-body:empty::before { content: "No note yet. Lyrics, tempo, key, what you want from the others."; color: var(--muted); }
.note textarea { min-height: 180px; font-family: var(--font); }
.note-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.note-head h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* listing */
.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.list th.sortable { cursor: pointer; }
.list th.sortable:hover { color: var(--ink); }
.list td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:hover td { background: rgba(255,255,255,.02); }
.list tr.sel td { background: rgba(232,176,74,.08); }
.list .name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list .name a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .name a:hover { color: var(--s-accent); }
.list .ico { width: 18px; height: 18px; flex: none; color: var(--muted); }
.list .ico.folder { color: var(--s-accent); }
.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.list .who { white-space: nowrap; color: var(--muted); }
.list .chk { width: 28px; }
.list .acts { width: 36px; text-align: right; }
.list .playbtn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.list .playbtn:hover { border-color: var(--s-accent); color: var(--s-accent); }
.list .playbtn svg { width: 12px; height: 12px; }
.list .playing .playbtn { background: var(--s-accent); color: var(--accent-ink); border-color: transparent; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.badge.c { color: var(--s-accent); border-color: rgba(232,176,74,.35); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
@media (max-width: 760px) { .list .hide-sm { display: none; } }

.menu { position: absolute; z-index: 50; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; min-width: 160px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: 14px; }
.menu button:hover { background: rgba(255,255,255,.06); }
.menu button.danger { color: var(--warn); }
.kebab { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px 6px; border-radius: 4px; }
.kebab:hover { color: var(--ink); background: var(--panel-2); }

/* dialogs */
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 22px; width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { margin-bottom: 8px; }
dialog .row.end { justify-content: flex-end; margin-top: 18px; }
.picker { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; margin-top: 8px; }
.picker button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 5px; cursor: pointer; }
.picker button:hover { background: var(--panel-2); }
.picker button.on { background: rgba(232,176,74,.15); color: var(--accent); }

/* file page */
.filehead { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.filehead h1 { font-size: 22px; word-break: break-word; }
.filehead .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.player { background: var(--s-bg); color: var(--s-ink); border-radius: 12px; padding: 18px; border: 1px solid rgba(255,255,255,.06); }
.player .controls { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.player .big { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--s-accent); color: var(--s-bg); cursor: pointer; display: grid; place-items: center; flex: none; }
.player .big svg { width: 22px; height: 22px; }
.player .time { font-family: var(--mono); font-size: 13px; opacity: .85; }
.player .status { font-size: 13px; opacity: .7; }
.wave { position: relative; min-height: 110px; }
.markers { position: absolute; left: 0; right: 0; top: -6px; height: 0; pointer-events: none; }
.marker { position: absolute; transform: translateX(-50%); pointer-events: auto; cursor: pointer; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--s-accent); border: 2px solid var(--s-bg); }
.marker:hover { filter: brightness(1.2); }
.marker.resolved { opacity: .35; }
.preview img, .preview video, .preview iframe { max-width: 100%; border-radius: 8px; }
.preview iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.preview pre { background: var(--panel); padding: 14px; border-radius: 8px; overflow: auto; max-height: 70vh; white-space: pre-wrap; }

.comments { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cform { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.cform textarea { min-height: 64px; resize: vertical; }
.cform .row { margin-top: 8px; }
.c { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.c.resolved { opacity: .55; }
.c.flash { border-color: var(--s-accent); }
.c .h { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--muted); }
.c .h b { color: var(--ink); }
.c .at { font-family: var(--mono); color: var(--s-accent); background: none; border: 0; cursor: pointer; padding: 0; font-size: 13px; }
.c .body { margin-top: 4px; white-space: pre-wrap; }
.c .acts { margin-top: 6px; display: flex; gap: 10px; }
.c .acts button { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; }
.c .acts button:hover { color: var(--ink); }
.c .replies { margin: 8px 0 0 14px; border-left: 2px solid var(--line); padding-left: 12px; display: grid; gap: 8px; }

/* uploads panel */
.uploads { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(380px, calc(100vw - 32px)); max-height: 50vh; overflow: auto; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.uploads .uh { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; position: sticky; top: 0; background: var(--panel-2); }
.uploads .ui { padding: 8px 14px; font-size: 13px; border-bottom: 1px solid var(--line); }
.uploads .ui .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uploads .prog { height: 4px; background: var(--line); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.uploads .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.uploads .ui.done .prog i { background: var(--ok); }
.uploads .ui.error .n { color: var(--warn); }

.dropzone { position: fixed; inset: 0; z-index: 60; background: rgba(18,18,20,.75); display: grid; place-items: center; pointer-events: none; }
.dropzone div { border: 2px dashed var(--accent); color: var(--accent); padding: 40px 60px; border-radius: 16px; font-size: 20px; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; opacity: 0; transition: .2s; pointer-events: none; z-index: 70; font-size: 14px; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.toast.bad { border-color: var(--warn); }

/* settings pages */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.panel h2 { margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.swatch { display: flex; gap: 8px; align-items: center; }
.swatch input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.pill-ok { color: var(--ok); } .pill-warn { color: var(--warn); }

/* mini player bar (plays from the list without leaving the folder) */
.minibar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(27,27,31,.97); border-top: 1px solid var(--line); padding: 8px 20px; display: flex; gap: 14px; align-items: center; }
.minibar .t { flex: 1; min-width: 0; }
.minibar .t a { text-decoration: none; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.minibar input[type=range] { width: 100%; accent-color: var(--accent); }
.minibar .time { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
body.has-minibar main { padding-bottom: 160px; }
body.has-minibar .uploads { bottom: 76px; }

/* phones */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 8px 16px; gap: 8px 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .usernav { margin-left: auto; }
  main { padding: 16px 16px 120px; }
  .shead { flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
  .shead img, .shead .logo-fallback { width: 42px; height: 42px; }
  .shead h1 { font-size: 22px; }
  .shead nav { margin-left: 0; width: 100%; }
  .shead nav a { padding: 5px 8px; }
  .hide-sm { display: none !important; }
  .filehead .row { width: 100%; }
  .minibar { padding: 8px 12px; gap: 8px; }
  .minibar .btn { padding: 6px 8px; }
  .list td { padding: 9px 6px; }
}

.badge.new { background: var(--s-accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.recent ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.recent li { padding: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent a { text-decoration: none; }
.recent a:hover { color: var(--s-accent); }

/* logo spot that takes an image (section owners) */
.logo-edit { position: relative; display: inline-block; flex: none; cursor: pointer; border-radius: 9px; line-height: 0; }
.logo-edit .logo-hint { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; opacity: 0; transition: opacity .15s; pointer-events: none; }
.logo-edit:hover .logo-hint, .logo-edit:focus-visible .logo-hint, .logo-edit.over .logo-hint { opacity: 1; }
.logo-edit.over { outline: 2px dashed var(--s-accent, var(--accent)); outline-offset: 3px; }
.card .logo-edit { margin-bottom: 14px; border-radius: 8px; }
.card .logo-edit > .logo, .card .logo-edit > .logo-fallback { margin-bottom: 0; }

/* other bands' cards: visible, not openable here */
.card.other { opacity: .78; }
.card.other:hover { opacity: 1; }
div.card.other:hover { transform: none; opacity: .78; }
