:root {
  --bg: #050505;
  --card: #121212;
  --line: #262626;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --hot: #ff2e88;
  --orange: #ff5500;
  --ok: #2bd576;
  --grad: linear-gradient(100deg, var(--hot), var(--orange));
  --r: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(255, 46, 136, .22), transparent 70%),
    radial-gradient(800px 400px at 100% 10%, rgba(255, 85, 0, .10), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--hot); }
a:hover { color: #ff6aa8; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.btn {
  appearance: none; border: 1px solid var(--line); background: #1c1c1c; color: var(--text);
  font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 999px; cursor: pointer;
}
.btn.primary { background: var(--grad); border: 0; color: #fff; }
.btn.primary:disabled { opacity: .4; cursor: default; }
.btn.big { width: 100%; padding: 15px; font-size: 18px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.ok { background: var(--ok); color: #031; border: 0; }
.btn.danger { background: #ff3b3b; color: #fff; border: 0; }
input {
  font: inherit; color: var(--text); background: #0b0b0b; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
input:focus { outline: 2px solid var(--hot); outline-offset: 1px; }

/* ---------------------------------------------------------------- home */
.hero { text-align: center; padding: 36px 16px 8px; }
.logo { width: min(560px, 86vw); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 0 30px rgba(255, 46, 136, .35)); }
.tag {
  margin: 10px 0 0; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 12px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
main { max-width: 1400px; margin: 0 auto; padding: 16px; }
.music { display: grid; gap: 16px; max-width: 1100px; margin: 0 auto 28px; }
@media (min-width: 960px) { .music { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.player { padding: 10px; overflow: hidden; }
.player iframe { width: 100%; max-width: 560px; aspect-ratio: 1 / 1; height: auto; margin: 0 auto; border: 0; border-radius: 10px; display: block; background: #000; }
.sc-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 10px 6px 4px; font-size: 14px; }
.sc-links a { text-decoration: none; font-weight: 600; }
.sc-links a:last-child { color: var(--muted); }
.lyrics summary {
  list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 18px;
}
.lyrics summary::-webkit-details-marker { display: none; }
.lyrics .chev { transition: transform .2s; color: var(--muted); }
.lyrics[open] .chev { transform: rotate(180deg); }
.verses { padding: 0 18px 18px; max-height: 380px; overflow: auto; overscroll-behavior: contain; }
@media (max-width: 959px) { .verses { max-height: none; } }
/* Desktop: lyrics card matches the player card's height; verses scroll inside it. */
@media (min-width: 960px) {
  .music { align-items: stretch; }
  .lyrics { position: relative; min-height: 0; }
  .lyrics:not([open]) { align-self: start; }
  .lyrics summary { box-sizing: border-box; height: 56px; padding-top: 0; padding-bottom: 0; }
  .lyrics[open] .verses { position: absolute; top: 56px; left: 0; right: 0; bottom: 0; max-height: none; }
}
.verse h3 { margin: 16px 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--hot); }
.verse:first-child h3 { margin-top: 0; }
.verse p { margin: 0; color: #ddd; }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 2px 12px; }
.gallery-head h2 { margin: 0; font-size: clamp(26px, 6vw, 40px); font-weight: 900; letter-spacing: -.02em; }
.count { color: var(--muted); font-size: 14px; }
.cta { margin: -4px 2px 14px; color: var(--muted); }
.grid { columns: 2 160px; column-gap: 8px; }
.grid.masonry { columns: auto; display: flex; gap: 8px; align-items: flex-start; }
.grid.masonry .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tile {
  display: block; margin: 0 0 8px; break-inside: avoid; border-radius: 10px; overflow: hidden; background: #161616;
  aspect-ratio: var(--ar); position: relative; transition: transform .15s;
}
.grid.masonry .tile { margin: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:hover { transform: scale(1.015); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 40px; }
.foot a { color: var(--muted); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .94); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; max-width: 100vw; max-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.lb-fig img { max-width: 100vw; max-height: calc(100vh - 56px); object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.lb-fig figcaption { color: var(--muted); font-size: 14px; padding: 10px; min-height: 40px; }
.lb button { position: absolute; background: rgba(30, 30, 30, .7); color: #fff; border: 0; border-radius: 999px; cursor: pointer; font-size: 26px; line-height: 1; }
.lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; font-size: 20px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 64px; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
@media (hover: none) { .lb-nav { display: none; } }

/* ---------------------------------------------------------------- add / login */
.narrow { max-width: 480px; padding: 24px 16px 40px; }
.mini-logo img { width: 220px; height: auto; display: block; margin: 8px auto 20px; }
.login, .add { padding: 22px; display: grid; gap: 14px; }
.login h1, .add h1 { margin: 0; font-size: 26px; }
.login p, .add p { margin: 0; }
.err { color: #ff6b6b; font-weight: 600; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.picker {
  border: 2px dashed #3a3a3a; border-radius: var(--r); padding: 26px 16px; text-align: center; display: grid; gap: 4px; cursor: pointer;
  background: rgba(255, 46, 136, .04);
}
.picker:hover, .picker:focus-within { border-color: var(--hot); }
.picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.picker-icon { font-size: 40px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; }
.picker-text { font-weight: 800; font-size: 18px; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.previews:empty { display: none; }
.pv { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #1a1a1a; }
.pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv .st { position: absolute; inset: auto 0 0 0; font-size: 11px; font-weight: 700; padding: 3px 6px; background: rgba(0, 0, 0, .7); text-align: center; }
.pv.done .st { background: rgba(43, 213, 118, .85); color: #031; }
.pv.wait .st { background: rgba(255, 200, 0, .85); color: #210; }
.pv.fail .st { background: rgba(255, 59, 59, .9); }
.pv .rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 99px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.status { min-height: 1.5em; text-align: center; font-weight: 600; }

/* ---------------------------------------------------------------- admin */
.admin-bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: rgba(5, 5, 5, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.admin-logo img { height: 28px; width: auto; display: block; }
.admin-bar form { margin-left: auto; }
.tabs { display: flex; gap: 4px; order: 3; width: 100%; }
@media (min-width: 700px) { .tabs { order: 0; width: auto; } }
.tab { flex: 1; appearance: none; background: transparent; color: var(--muted); border: 0; font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tab b { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: #222; color: var(--text); font-size: 12px; }
.tab.active { background: #1e1e1e; color: var(--text); }
.tab.active b { background: var(--grad); color: #fff; }
.admin { padding: 14px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 900px) { .agrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.at { position: relative; border-radius: 12px; overflow: hidden; background: #161616; border: 1px solid var(--line); }
.at .ph { aspect-ratio: 1; display: block; width: 100%; object-fit: cover; }
.at .del {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 99px; border: 0; font-size: 18px;
  background: rgba(0, 0, 0, .65); cursor: pointer; backdrop-filter: blur(4px);
}
.at .del:hover { background: #ff3b3b; }
.at .meta { padding: 8px 10px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.at .meta b { color: var(--text); font-size: 13px; }
.at .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 8px 8px; }
.at .acts .btn { padding: 8px 6px; font-size: 13px; }
.at .acts .wide { grid-column: span 2; }
.at.gone { opacity: .2; pointer-events: none; }
.at .cap { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px; padding: 8px 8px 0; }
.at .cap textarea { grid-column: 1 / -1; min-width: 0; width: 100%; resize: vertical; font: inherit; font-size: 13px; line-height: 1.3; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); background: #0d0d0d; color: var(--text); }
.at .cap textarea:focus { outline: 2px solid #ff2e88; outline-offset: 0; }
.at .cap-n { font-size: 11px; color: var(--muted); }
.at .cap .btn { padding: 6px 12px; font-size: 12px; }
.at .cap-st { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.at .cap-st:empty { display: none; }
.allow-form { padding: 18px; max-width: 720px; }
.allow-form h2 { margin: 0 0 4px; }
.allow-form .row { display: grid; gap: 8px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 600px) { .allow-form .row { grid-template-columns: 1.2fr 1fr auto; } }
.allow-list { list-style: none; padding: 0; margin: 14px 0; max-width: 720px; }
.allow-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.allow-list li span { flex: 1; }
.allow-list code { color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 14px; background: #fff; color: #000; padding: 10px 10px 10px 18px; border-radius: 999px;
  font-weight: 600; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.toast[hidden] { display: none; }
.toast .btn { background: #000; color: #fff; border: 0; }
