/* proj7k catalog: laid out after osu!'s beatmap listing and beatmapset pages. */
:root {
  --hue: 333;
  --bg: hsl(var(--hue), 10%, 10%);
  --bg-1: hsl(var(--hue), 10%, 15%);
  --bg-2: hsl(var(--hue), 10%, 20%);
  --bg-3: hsl(var(--hue), 10%, 25%);
  --bg-4: hsl(var(--hue), 10%, 30%);
  --text: #fff;
  --text-2: hsl(var(--hue), 10%, 75%);
  --text-3: hsl(var(--hue), 10%, 55%);
  --accent: hsl(var(--hue), 100%, 70%);
  --engine: #6ee7ff;
  --official: #ffd966;
  --font: "Torus", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans", Roboto, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.4; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---- top bar ---- */
.nav { background: hsl(var(--hue), 10%, 8%); padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 24px; position: sticky; top: 0; z-index: 10; }
.nav .logo { white-space: nowrap; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.nav .logo b { color: var(--accent); }
.nav .links { white-space: nowrap; display: flex; gap: 18px; color: var(--text-2); font-weight: 600; }
.nav .links a.active, .nav .links a:hover { color: var(--text); }
.nav .meta { margin-left: auto; color: var(--text-3); font-size: 12px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px 48px; }
.header-band { background: linear-gradient(180deg, hsl(var(--hue), 30%, 18%), var(--bg-1)); padding: 22px 0 0; }
.header-band h1 { font-size: 22px; font-weight: 300; padding: 0 0 14px; }
.header-band h1 b { font-weight: 700; }

/* ---- search panel ---- */
.search { background: var(--bg-2); border-radius: 10px 10px 0 0; padding: 20px 24px 14px; }
.search-box { display: flex; align-items: center; gap: 10px; background: var(--bg-1); border-radius: 8px; padding: 0 14px; }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 18px; padding: 12px 0; }
.search-box .icon { color: var(--text-3); font-size: 18px; }
.search-box .help-btn { white-space: nowrap; color: var(--text-3); font-size: 12px; border: 1px solid var(--bg-4); border-radius: 999px; padding: 2px 10px; }
.search-box .help-btn:hover { color: var(--text); }
.syntax { display: none; margin-top: 10px; background: var(--bg-1); border-radius: 8px; padding: 12px 16px; color: var(--text-2); font-size: 12px; columns: 2 320px; }
.syntax.open { display: block; }
.syntax code { font-family: var(--mono); color: var(--accent); }
.syntax div { break-inside: avoid; margin-bottom: 4px; }
.filters { margin-top: 14px; display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: baseline; }
.filters .label { color: var(--text-3); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pills { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.pill { padding: 2px 10px; border-radius: 999px; color: var(--text-2); font-size: 13px; }
.pill:hover { color: var(--text); background: var(--bg-3); }
.pill.active { color: var(--accent); font-weight: 700; }
.pill .dir { font-size: 10px; margin-left: 3px; }
.chips { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 12px; background: var(--bg-1); color: var(--accent); border-radius: 4px; padding: 1px 8px; }

.results-head { background: var(--bg-1); padding: 10px 24px; display: flex; justify-content: space-between; color: var(--text-3); font-size: 12px; }
.results-head .legend { display: flex; gap: 14px; }
.legend .o { color: var(--official); } .legend .e { color: var(--engine); }
.results { background: var(--bg-1); padding: 4px 16px 24px; border-radius: 0 0 10px 10px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 540px), 1fr)); }
.empty { color: var(--text-3); text-align: center; padding: 60px 0; font-size: 16px; }

/* ---- beatmapset card ---- */
.card { display: flex; background: var(--bg-3); border-radius: 10px; overflow: hidden; min-height: 150px; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.card .cover { flex: 0 0 120px; background: var(--bg-4) center / cover no-repeat; position: relative; }
.card .cover.none { background: linear-gradient(135deg, hsl(var(--h, 200), 50%, 35%), hsl(var(--h, 200), 50%, 18%)); }
.card .cover .keys { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.55); border-radius: 4px; padding: 1px 6px; }
.card .body { flex: 1; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.card .title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .artist { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .mapper { color: var(--text-3); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.card .mapper b { color: var(--text-2); font-weight: 600; }
.status { font-size: 10px; font-weight: 800; text-transform: uppercase; border-radius: 999px; padding: 1px 8px; background: #000; color: var(--text-2); }
.status.ranked, .status.approved { background: #b3ff66; color: #222; }
.status.qualified { background: #66ccff; color: #222; }
.status.loved { background: #ff66aa; color: #222; }
.status.pending, .status.wip { background: #ffd966; color: #222; }
.status.graveyard { background: #000; color: #5c5c5c; }
.diffs { margin-top: 6px; display: grid; grid-template-columns: 1fr auto auto auto; gap: 3px 8px; align-items: center; font-size: 12px; }
.diffs .head { color: var(--text-3); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.diffs .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.diffs .name.match { color: var(--text); }
.diffs .name:not(.match) { opacity: .55; }
.diffs .dan { color: var(--text-3); font-size: 11px; text-align: right; min-width: 52px; }
.more { color: var(--text-3); font-size: 11px; margin-top: 2px; }

/* star pill: background from osu!'s difficulty spectrum (set inline) */
.star { display: inline-flex; align-items: center; gap: 3px; border-radius: 999px; padding: 0 7px; font-weight: 700; font-size: 12px; min-width: 58px; justify-content: center; font-variant-numeric: tabular-nums; }
.star .k { font-size: 9px; font-weight: 800; opacity: .75; }
.star.na { background: var(--bg-4); color: var(--text-3); }

.pager { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.pager button { min-width: 32px; padding: 4px 8px; border-radius: 6px; background: var(--bg-3); color: var(--text-2); }
.pager button.cur { background: var(--accent); color: #222; font-weight: 800; }
.pager button:disabled { opacity: .35; cursor: default; }

/* ---- beatmapset page ---- */
.set-header { position: relative; border-radius: 10px 10px 0 0; overflow: hidden; min-height: 280px; background: var(--bg-3) center / cover no-repeat; }
.set-header.none { background: linear-gradient(135deg, hsl(var(--h, 200), 45%, 30%), hsl(var(--h, 200), 45%, 14%)); }
.set-header::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.35)); }
.set-header .inner { position: relative; z-index: 1; padding: 20px 24px; display: flex; flex-direction: column; gap: 8px; min-height: 280px; }
.picker { display: flex; flex-wrap: wrap; gap: 4px; }
.picker button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: rgba(0,0,0,.4); border: 2px solid transparent; }
.picker button.cur { border-color: #fff; background: rgba(255,255,255,.12); }
.picker .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.diff-name { font-size: 15px; font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.diff-name small { color: var(--text-2); font-weight: 400; font-size: 12px; }
.set-header .t { margin-top: auto; font-size: 28px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.set-header .a { font-size: 18px; color: var(--text-2); }
.set-header .m { color: var(--text-2); display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.set-header .actions { display: flex; gap: 8px; margin-top: 10px; }
.btn { background: var(--bg-3); border-radius: 6px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.btn.primary { background: var(--accent); color: #222; }
.btn:hover { filter: brightness(1.15); }

.set-body { background: var(--bg-2); border-radius: 0 0 10px 10px; padding: 20px 24px; display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
@media (max-width: 860px) { .set-body { grid-template-columns: 1fr; } .card .cover { flex-basis: 84px; } .filters { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .nav { padding: 0 16px; gap: 14px; } .nav .meta { display: none; }
  .search { padding: 14px 12px 10px; } .results-head, .results { padding-left: 10px; padding-right: 10px; }
  .card .cover { flex-basis: 44px; } .card .cover .keys { display: none; }
  .diffs { grid-template-columns: 1fr auto auto; } .diffs .dan, .diffs .head:nth-child(4) { display: none; }
  .set-header .inner, .set-body { padding: 14px 12px; } .set-header .t { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
.panel { background: var(--bg-1); border-radius: 8px; padding: 14px 16px; }
.panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 10px; }
.sr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sr-box { border-radius: 8px; padding: 10px 12px; background: var(--bg-2); }
.sr-box .lbl { font-size: 11px; color: var(--text-3); font-weight: 700; }
.sr-box .num { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sr-box.o .num { color: var(--official); } .sr-box.e .num { color: var(--engine); }
.sr-box .sub { font-size: 12px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats div { background: var(--bg-2); border-radius: 6px; padding: 6px 10px; }
.stats span { display: block; color: var(--text-3); font-size: 11px; }
.stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.bars { display: grid; grid-template-columns: 70px 1fr 44px 40px; gap: 6px 8px; align-items: center; font-size: 12px; }
.bars .n { color: var(--text-2); }
.bars .n.dom { color: var(--accent); font-weight: 800; }
.bars .track { height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.bars .fill { height: 100%; border-radius: 4px; }
.bars .v { text-align: right; font-variant-numeric: tabular-nums; }
.bars .p { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }
.density svg { width: 100%; height: 70px; display: block; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--text-3); font-size: 11px; font-weight: 700; padding: 4px 6px; }
.table td:first-child { white-space: normal; }
.table td { white-space: nowrap; padding: 5px 6px; border-top: 1px solid var(--bg-3); }
.table tr.cur td { background: var(--bg-3); }
.table tr { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.delta.pos { color: #ff8a8a; } .delta.neg { color: #8affb0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; }
.kv span { color: var(--text-3); }
.kv b { font-weight: 400; color: var(--text-2); word-break: break-word; }
.side { display: flex; flex-direction: column; gap: 16px; }
.main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.note { color: var(--text-3); font-size: 11px; margin-top: 8px; }

/* ---- mappers ---- */
.avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--bg-4); display: inline-block; }
.avatar.none { background: linear-gradient(135deg, var(--bg-4), var(--bg-3)); }
.mlist { display: flex; flex-direction: column; gap: 6px; }
.mrow { display: grid; grid-template-columns: 40px minmax(140px, 1.4fr) 80px 70px 80px 70px 2fr; gap: 12px; align-items: center; background: var(--bg-3); border-radius: 8px; padding: 8px 12px; }
.mrow:hover { background: var(--bg-4); }
.mrow.small { grid-template-columns: 32px 1fr auto; padding: 6px 8px; margin-bottom: 6px; }
.mrow.small .avatar { width: 32px; height: 32px; }
.mname { display: flex; flex-direction: column; min-width: 0; }
.mname b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mname small, .mnum small { color: var(--text-3); font-size: 11px; }
.mnum { display: flex; flex-direction: column; text-align: right; font-variant-numeric: tabular-nums; }
.mskill { color: var(--accent); font-size: 12px; font-weight: 700; }
.mtags, .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11px; background: var(--bg-1); color: var(--text-2); border-radius: 999px; padding: 1px 9px; border: 1px solid var(--bg-4); cursor: help; }
.mapper-head { background: linear-gradient(135deg, hsl(var(--hue), 30%, 22%), var(--bg-2)); border-radius: 10px 10px 0 0; padding: 24px; display: flex; gap: 20px; align-items: flex-start; }
.mapper-head .avatar { width: 110px; height: 110px; border-radius: 18px; }
.mapper-head h1 { font-size: 28px; }
.mapper-head .sub { color: var(--text-2); margin: 2px 0 8px; }
.mapper-head .statuses { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.mapper-head .tags .tag { font-size: 13px; padding: 2px 12px; color: var(--text); }
.mapper-head .actions { margin-top: 12px; }
.why { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-2); }
.why b { color: var(--text); }
.feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.feat { background: var(--bg-2); border-radius: 6px; padding: 6px 10px; }
.feat span { display: block; color: var(--text-3); font-size: 11px; }
.feat b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ptrack { position: relative; height: 4px; background: var(--bg-4); border-radius: 2px; margin-top: 6px; }
.pfill { position: absolute; top: -3px; width: 3px; height: 10px; background: var(--accent); border-radius: 2px; transform: translateX(-1px); }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.hbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.hfill { width: 100%; background: var(--engine); border-radius: 3px 3px 0 0; min-height: 1px; }
.hbar span { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.hist.cols .hfill { background: var(--accent); }
.panel h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.more { display: block; margin-top: 12px; }
@media (max-width: 860px) {
  .mrow { grid-template-columns: 40px 1fr auto auto; }
  .mrow .mnum:nth-of-type(2), .mrow .mskill, .mrow .mtags { display: none; }
  .mapper-head { flex-direction: column; } .mapper-head .avatar { width: 72px; height: 72px; }
}

.site-foot { max-width: 1200px; margin: 32px auto 24px; padding: 0 16px; color: var(--text-3); font-size: 12px; }
.site-foot a { color: inherit; }

/* ---- home page ---- */
.home-hero { background: radial-gradient(120% 140% at 0% 0%, hsl(var(--hue), 45%, 24%), var(--bg) 70%); padding: 56px 0 40px; }
.home-hero .kicker { color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.home-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 300; line-height: 1.2; margin: 8px 0 14px; }
.home-hero h1 b { color: var(--accent); font-weight: 800; }
.home-hero .lede { max-width: 640px; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; background: var(--bg-3); color: var(--text); font-weight: 700; }
.btn:hover { background: var(--bg-4); }
.btn.primary { background: var(--accent); color: #1a0f15; }
.btn.primary:hover { filter: brightness(1.08); }
.home-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 32px; }
.home-stats dt { color: var(--text-3); font-size: 12px; }
.home-stats dd { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.home section { margin-top: 44px; }
.home h2 { font-size: 22px; font-weight: 700; }
.home .sub { color: var(--text-2); margin: 6px 0 16px; line-height: 1.7; }
.home .sub a, .steps a { color: var(--accent); }
.home code { font-family: var(--mono); color: var(--accent); background: var(--bg-1); border-radius: 4px; padding: 0 5px; }
.feature-grid, .tool-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.feature, .tool { background: var(--bg-2); border-radius: 10px; padding: 16px 18px; line-height: 1.65; }
.feature { transition: transform .12s, background .12s; }
.feature:hover { transform: translateY(-2px); background: var(--bg-3); }
.feature h3, .tool h3 { font-size: 15px; margin-bottom: 6px; }
.feature p, .tool p { color: var(--text-2); font-size: 13.5px; }
.tool .tag { display: inline-block; font-size: 11px; font-weight: 800; color: var(--engine); background: var(--bg-1); border-radius: 999px; padding: 1px 9px; margin-bottom: 8px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin-top: 12px; }
.steps li { counter-increment: s; background: var(--bg-2); border-radius: 10px; padding: 12px 16px 12px 52px; position: relative; line-height: 1.6; color: var(--text-2); }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #1a0f15; font-weight: 800; text-align: center; line-height: 24px; }
.steps li b { color: var(--text); margin-right: 6px; }
.home-links { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--text-2); font-weight: 600; }
.home-links a:hover { color: var(--accent); }
@media (max-width: 560px) { .home-hero { padding: 36px 0 28px; } .home-stats dd { font-size: 22px; } }
