/* Visual language modelled on «Риса за Творчество»: near-black monochrome, soft cards with hairline borders,
   white pills for active state, cover art everywhere, blue + red as the only accents. */
:root {
  --bg: #0a0a0b;
  --bg2: #101012;
  --card: #141416;
  --card2: #1c1c1f;
  --card3: #242428;
  --line: #232326;
  --line2: #333338;
  --text: #f5f5f7;
  --muted: #8e8e93;
  --dim: #5c5c62;
  --blue: #3b78ff;
  --red: #ff3b47;
  --accent: var(--blue);
  --bad: #ff3b47;
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-logo: "Marck Script", "Inter", cursive;
  --side: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; letter-spacing: -.005em; }
a { color: var(--text); text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
h2.sec { font-size: 26px; font-weight: 800; margin: 40px 0 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h2.sec small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
h2.sec:first-child { margin-top: 18px; }
h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.grad-text { color: var(--text); }
.bg-blobs, .bg-noise { display: none; }

/* ---------- Sidebar (icon rail like the reference) ---------- */
.side { position: fixed; left: 8px; top: 8px; bottom: 8px; width: var(--side); z-index: 30; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; }
.side button { position: relative; width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: .15s; }
.side button svg { width: 21px; height: 21px; }
.side button:hover { color: var(--text); background: var(--card2); }
.side button.active { color: var(--text); background: var(--card3); }
.side button.active::before { content: ''; position: absolute; left: -10px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--text); }
.side button .lbl { position: absolute; left: 54px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--card3); color: var(--text); font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 8px; pointer-events: none; opacity: 0; transition: .12s; border: 1px solid var(--line2); }
.side button:hover .lbl { opacity: 1; }
.side hr { width: 28px; border: 0; border-top: 1px solid var(--line2); margin: 6px 0; }
body.has-side .wrap { margin-left: calc(var(--side) + 16px); }

/* ---------- Header ---------- */
header.top { position: sticky; top: 0; z-index: 20; padding: 8px 8px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.top-inner { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 9px 14px 9px 20px; display: flex; gap: 16px; align-items: center; }
.logo { font-family: var(--font-logo); font-size: 27px; line-height: 1; white-space: nowrap; cursor: pointer; letter-spacing: 0; }
.search { position: relative; flex: 1; max-width: 460px; margin: 0 auto; }
.search input[type=search] { width: 100%; background: var(--card2); border: 1px solid var(--line2); border-radius: 999px; padding: 8px 14px 8px 38px; outline: none; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line2); border-radius: 16px; padding: 6px; max-height: 70vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.6); z-index: 40; }
.search-results .sg { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding: 8px 10px 4px; }
.search-results .sr { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.search-results .sr:hover, .search-results .sr.sel { background: var(--card2); }
.search-results .sr .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .sr .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results .sr .v { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.top-right { display: flex; gap: 10px; align-items: center; }

.filters { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin-top: 18px; }
.filters label { color: var(--muted); font-size: 12px; display: flex; gap: 8px; align-items: center; font-weight: 500; }
select, input[type=date], input[type=search], input[type=text] { background: var(--card2); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 10px; outline: none; transition: .15s; color: var(--text); }
select:hover, input:hover { border-color: #45454c; }
select:focus, input:focus { border-color: #6a6a72; }
input[type=date] { color-scheme: dark; }
input[type=checkbox] { accent-color: var(--blue); }
.btn { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 8px 15px; cursor: pointer; font-weight: 600; transition: .15s; }
.btn:hover { background: var(--card3); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn.primary { background: #ececee; color: #0a0a0b; border-color: #ececee; }
.btn.primary:hover { background: #fff; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; font-weight: 500; white-space: nowrap; }
.switch input { display: none; }
.switch span { width: 32px; height: 19px; border-radius: 99px; background: var(--card3); position: relative; transition: .2s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { left: 15px; background: #fff; }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { background: none; border: 0; padding: 5px 12px; cursor: pointer; color: var(--muted); border-radius: 9px; font-weight: 600; font-size: 12px; }
.seg button.active { background: var(--card3); color: var(--text); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--card); border: 1px solid var(--line2); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); }
.pill.active { background: #f5f5f7; color: #0a0a0b; border-color: #f5f5f7; }

.wrap { padding: 0 8px; }
main { max-width: 1380px; margin: 0 auto; padding: 4px 24px 60px; }
.crumbs { color: var(--muted); font-size: 13px; margin-top: 22px; }
.crumbs b { color: var(--text); font-weight: 600; }
footer { max-width: 1380px; margin: 0 auto; padding: 20px 24px 40px; color: var(--dim); font-size: 12px; text-align: right; }

/* ---------- Upload ---------- */
.upload-wrap { min-height: calc(100vh - 80px); display: grid; place-items: center; padding: 40px 20px; }
.upload { max-width: 720px; width: 100%; text-align: center; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line2); padding: 5px 13px; border-radius: 99px; margin-bottom: 18px; }
.upload h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; margin-bottom: 16px; }
.upload h1 .grad-text { color: var(--muted); }
.upload p.lead { color: var(--muted); font-size: 16px; margin: 0 0 28px; }
.drop { border: 1.5px dashed var(--line2); border-radius: 22px; padding: 40px 24px; background: var(--card); cursor: pointer; transition: .2s; }
.drop:hover, .drop.over { border-color: #6a6a72; background: var(--card2); }
.drop .big { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.vinyl { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%; position: relative; background: repeating-radial-gradient(circle, #1d1d20 0 2px, #0e0e10 2px 4px); box-shadow: 0 10px 30px rgba(0,0,0,.6); animation: spin 6s linear infinite; }
.vinyl i { position: absolute; inset: 33%; border-radius: 50%; background: var(--red); }
.vinyl i::after { content: ''; position: absolute; inset: 40%; border-radius: 50%; background: var(--bg); }
.drop:hover .vinyl { animation-duration: 1.6s; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.upload .hint { margin-top: 26px; text-align: left; background: var(--card); border: 1px dashed var(--line2); border-radius: 16px; padding: 16px 20px; color: var(--muted); font-size: 13px; }
.upload .hint b { color: var(--text); }
.progress { margin-top: 18px; color: var(--muted); }
.bar { height: 5px; background: var(--card2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--text); width: 0; transition: width .2s; }
.error { color: var(--bad); margin-top: 14px; }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mt { margin-top: 14px; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
@media (max-width: 1100px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card.flat { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-head .right { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; transition: .15s; }
.kpi:hover { border-color: var(--line2); }
.kpi .v { font-size: 25px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .l { color: var(--text); font-size: 13px; margin-top: 3px; font-weight: 600; }
.kpi .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.kpi.accent { background: linear-gradient(140deg, #16223f, #0f1730 60%, #121214); border-color: #26386a; }
.kpi.accent .s { color: #9fb2e0; }
.chart-box { position: relative; height: 270px; }
.chart-box.tall { height: 340px; }
.chart-box.short { height: 210px; }
.note { color: var(--dim); font-size: 12px; margin-top: 8px; }
.empty { padding: 26px; text-align: center; color: var(--muted); background: linear-gradient(var(--card2), transparent); border-radius: 12px; font-size: 13px; }

/* ---------- Covers ---------- */
.cv { --h: 220; width: 42px; height: 42px; flex: none; border-radius: 10px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h) 22% 26%), hsl(calc(var(--h) + 40) 18% 12%)) center/cover no-repeat;
  color: rgba(255,255,255,.75); font-weight: 800; font-size: 16px; overflow: hidden; }
.cv.has { color: transparent; background-color: #1a1a1d; background-size: cover; background-position: center; }
.cv.round { border-radius: 50%; }
.cv.sm { width: 36px; height: 36px; font-size: 13px; border-radius: 8px; }
.cv.lg { width: 84px; height: 84px; font-size: 30px; border-radius: 14px; }
.cv.xl { width: 200px; height: 200px; font-size: 64px; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.cv.fill { width: 100%; height: auto; aspect-ratio: 1; font-size: 40px; border-radius: 12px; }
.cv.round.sm, .cv.round.lg, .cv.round.xl, .cv.round.fill { border-radius: 50%; }

/* ---------- Hero ---------- */
.hero { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); margin-top: 18px; padding: 30px 34px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; background: var(--card); }
.hero .hbg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(60px) saturate(1.2) brightness(.5); opacity: .9; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,11,.92) 0%, rgba(10,10,11,.65) 55%, rgba(10,10,11,.3)); }
.hero > *:not(.hbg) { position: relative; z-index: 1; }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; padding: 22px; } }
.hero h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 900; letter-spacing: -.05em; line-height: .95; }
.hero h1 small { display: block; font-size: .32em; letter-spacing: -.02em; margin-top: 8px; color: var(--muted); font-weight: 700; }
.hero p { color: var(--muted); font-size: 15px; margin: 16px 0 0; max-width: 560px; }
.hero p b { color: var(--text); font-weight: 600; }
.collage { display: grid; grid-template-columns: repeat(4, 112px); gap: 10px; }
@media (max-width: 1100px) { .collage { grid-template-columns: repeat(4, 1fr); } }
.collage .cv { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; font-size: 28px; transition: .2s; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.collage .cv:hover { transform: translateY(-4px); }

.spot { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.spot .who { font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; word-break: break-word; }
.spot .lab { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.spot .meta { color: var(--muted); margin-top: 4px; font-size: 13px; }

/* ---------- Lists / tables ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 22px auto 1fr auto; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank-list li.nocv { grid-template-columns: 22px 1fr auto; }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .r { color: var(--dim); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; }
.rank-list .t { min-width: 0; }
.rank-list .t .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rank-list .t .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 12px; }
.rank-list .v { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.rank-list .meter { height: 3px; background: var(--card2); border-radius: 2px; margin-top: 5px; }
.rank-list .meter i { display: block; height: 100%; background: #d9d9de; border-radius: 2px; opacity: .55; }
.link { cursor: pointer; transition: color .12s; }
.link:hover { color: #9fb8ff; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data td.cvc { width: 46px; padding-right: 0; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; position: sticky; top: 0; background: var(--card); cursor: pointer; user-select: none; z-index: 1; }
table.data th.sorted { color: var(--text); }
table.data td.n, table.data th.n { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.name { max-width: 330px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
table.data tr:hover td { background: var(--card2); }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 14px; color: var(--muted); }

/* ---------- Heatmaps ---------- */
.cal-year { margin-bottom: 16px; }
.cal-year .yl { font-weight: 800; margin-bottom: 6px; display: flex; gap: 12px; align-items: baseline; }
.cal-year .yl span { color: var(--muted); font-weight: 500; font-size: 12px; }
.cal-svg { width: 100%; height: auto; display: block; max-height: 190px; }
.hw-grid { display: grid; grid-template-columns: 30px repeat(24, minmax(0,1fr)); gap: 3px; font-size: 10px; color: var(--muted); }
.hw-grid .c { aspect-ratio: 1.25; border-radius: 4px; background: var(--card2); }
.hw-grid .lab { display: flex; align-items: center; justify-content: center; }

/* ---------- Year cards ---------- */
.year-card { position: relative; overflow: hidden; }
.year-card .yh { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; position: relative; }
.year-card .yh h3 { font-size: 30px; margin: 0; font-weight: 900; letter-spacing: -.04em; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-kpis div { background: var(--card2); border-radius: 12px; padding: 8px 10px; }
.mini-kpis b { display: block; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-kpis span { color: var(--muted); font-size: 11px; }
.rank-cell { display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 8px; text-align: center; font-weight: 700; }

/* ---------- Facts ---------- */
.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.fact .fl { color: var(--muted); font-size: 12px; font-weight: 600; }
.fact .fv { font-size: 19px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }
.fact .fs { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Awards (like «Премия») ---------- */
.awards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.award { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: .2s; }
.award:hover { border-color: var(--line2); transform: translateY(-3px); }
.award .glow { position: absolute; left: -30%; right: -30%; bottom: -40%; height: 75%; background-size: cover; background-position: center; filter: blur(40px) saturate(1.4); opacity: .35; pointer-events: none; }
.award > *:not(.glow) { position: relative; }
.award .art { position: relative; }
.award .art .cv { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.award .art .tag { position: absolute; left: 10px; bottom: 10px; right: 10px; font-size: 12px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.award .wn { text-align: center; font-size: 19px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 12px; word-break: break-word; }
.award .ws { text-align: center; color: var(--text); opacity: .8; font-size: 13px; font-weight: 500; margin-top: 2px; }
.award .wv { text-align: center; color: var(--muted); font-size: 12px; margin-top: 4px; }
.award .at { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line2); text-align: center; color: var(--text); opacity: .75; font-weight: 600; font-size: 15px; }
.award .sp { flex: 1; min-height: 12px; }
.award-hint { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }

.months-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mtile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; transition: .2s; cursor: pointer; }
.mtile:hover { border-color: var(--line2); transform: translateY(-3px); }
.mtile .ml { font-size: 11px; color: var(--muted); font-weight: 600; margin: 8px 4px 0; }
.mtile .mn { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 4px; }
.mtile .ms { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 4px 4px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); z-index: 50; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 40px 16px; }
.modal { background: var(--bg2); border: 1px solid var(--line2); border-radius: 24px; width: min(1140px, 100%); padding: 0 0 24px; position: relative; overflow: hidden; }
.modal-body { padding: 0 24px; }
.modal-hero { position: relative; padding: 34px 26px 24px; display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: end; margin-bottom: 14px; overflow: hidden; }
@media (max-width: 700px) { .modal-hero { grid-template-columns: 1fr; } }
.modal-hero .hbg { position: absolute; inset: -60px; background: linear-gradient(135deg, #1b2440, #121214) center/cover; filter: blur(60px) saturate(1.3) brightness(.6); }
.modal-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,16,18,.2) 0%, var(--bg2) 100%); }
.modal-hero > *:not(.hbg) { position: relative; z-index: 1; }
.modal .close { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(0,0,0,.5); border: 1px solid var(--line2); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 19px; color: var(--text); }
.modal .close:hover { background: var(--card3); }
.modal .kind { color: var(--muted); font-size: 13px; font-weight: 600; }
.modal h2 { margin: 4px 0 6px; font-size: clamp(26px, 4vw, 48px); font-weight: 900; letter-spacing: -.04em; line-height: 1.02; word-break: break-word; }
.modal .subtitle { color: var(--text); opacity: .85; font-weight: 500; }
.embed { border: 0; width: 100%; max-width: 560px; height: 152px; border-radius: 12px; margin-top: 14px; display: block; }

.tooltip { position: fixed; pointer-events: none; background: #19191c; border: 1px solid var(--line2); border-radius: 10px; padding: 7px 10px; font-size: 12px; z-index: 100; white-space: nowrap; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 99px; background: var(--card3); color: var(--muted); margin-left: 6px; font-weight: 600; vertical-align: middle; }
.badge.blue { background: var(--blue); color: #fff; }
.badge.red { background: var(--red); color: #fff; }
a.badge:hover { background: #f5f5f7; color: #0a0a0b; }

[data-panel] > * { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Mobile: rail becomes a bottom bar ---------- */
@media (max-width: 760px) {
  .side { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 58px; flex-direction: row; justify-content: space-around; padding: 0 6px; overflow-x: auto; }
  .side hr { display: none; }
  .side button .lbl, .side button.active::before { display: none; }
  body.has-side .wrap { margin-left: 0; padding-bottom: 70px; }
  main { padding: 4px 12px 60px; }
  .top-inner { flex-wrap: wrap; padding: 9px 12px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .mini-kpis { grid-template-columns: repeat(2, 1fr); }
  .cv.xl { width: 140px; height: 140px; }
  .collage { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Share cards ---------- */
.share-row { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; background: #f5f5f7; color: #0a0a0b; border-color: #f5f5f7; border-radius: 999px; }
.share-btn:hover { background: #fff; }
.share-btn svg { width: 16px; height: 16px; }
.share-bg { z-index: 60; align-items: center; }
.share-modal { width: min(980px, 100%); padding: 26px; }
.share-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: center; }
@media (max-width: 800px) { .share-wrap { grid-template-columns: 1fr; } }
.share-preview { display: grid; place-items: center; min-height: 300px; }
.share-canvas { display: block; max-width: 100%; max-height: 74vh; width: auto; height: auto; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6); border: 1px solid var(--line2); }
.share-actions { display: grid; gap: 8px; margin-top: 18px; }

.award .award-share { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(10,10,11,.6); color: #fff; backdrop-filter: blur(6px); opacity: 0; transition: .15s; }
.award .award-share svg { width: 16px; height: 16px; }
.award:hover .award-share, .award .award-share:focus-visible { opacity: 1; }
.award .award-share:hover { background: #f5f5f7; color: #0a0a0b; }
@media (hover: none) { .award .award-share { opacity: 1; } }
.awards.podium { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .awards.podium { grid-template-columns: 1fr; } }
.award.gold { border-color: #5b5b62; }
.award.gold .art .tag { color: #ffd23f; }

/* ---------- Upload guide ---------- */
.guide { margin-top: 26px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; }
.guide-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.guide-head h3 { margin: 0 0 2px; font-size: 18px; }
.guide-head .btn { text-decoration: none; }
.guide a:not(.btn) { color: #9fb8ff; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 10px 14px 10px 52px; background: var(--card2); border-radius: 14px; color: var(--muted); font-size: 14px; }
.steps li b { color: var(--text); }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card3); color: var(--text); font-weight: 800; font-size: 13px; }
.steps li.key { background: linear-gradient(140deg, #16223f, #111a33 60%, var(--card2)); border: 1px solid #26386a; }
.steps li.key::before { background: var(--blue); color: #fff; }
.steps .why { display: block; margin-top: 4px; font-size: 13px; color: #b6c4e6; }
.steps .mock { margin-top: 10px; background: rgba(0,0,0,.35); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 13px; line-height: 2; }
.steps .box { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--muted); margin-right: 8px; vertical-align: -3px; font-size: 12px; font-weight: 900; }
.steps .box.on { background: var(--blue); border-color: var(--blue); color: #fff; }

.privacy { margin-top: 22px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; color: var(--muted); font-size: 13px; }
.privacy b { color: var(--text); }
