
.seg { display: flex; background: var(--card); border-radius: 12px; padding: 3px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.seg button {
  flex: 1; border: 0; border-radius: 9px; padding: 7px 0; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--hint); cursor: pointer;
}
.seg button.on { background: var(--accent); color: var(--accent-text); }

/* Период — компактные чипы, чтобы не путать с сегментом сортировки */
.period { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.period button {
  flex: none; border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: var(--card); color: var(--hint); cursor: pointer;
}
.period button.on { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }

/* Чипы-переключатель (ui/chips.js): на всю ширину; мало — тянутся, много — листаются, края гаснут */
.chips { position: relative; display: flex; justify-content: space-between; gap: 6px; margin-bottom: 10px;
  overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 1 0 auto; border: 0; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: var(--hint-soft); color: var(--hint); cursor: pointer;
}
.chips button.on { background: var(--accent); color: var(--accent-text); }
.chips.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.chips.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.chips.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.chart-card .chips { margin-bottom: 12px; }

.chart-card { margin-bottom: 10px; }
.seg.inner { background: var(--bg); box-shadow: none; margin-bottom: 12px; }
.seg.inner button { font-size: 13px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 8px; }
.chart-title { font-size: 12px; color: var(--hint); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.readout { font-size: 12px; color: var(--text); font-weight: 600; text-align: right; }
.chartwrap { position: relative; padding-right: 32px; margin-top: 14px; }
.gridline { position: absolute; left: 0; right: 32px; border-top: 1px dashed var(--sep); }
.gridline span { position: absolute; right: -32px; top: -7px; width: 28px; text-align: right; font-size: 10px; color: var(--hint); }
.bars { display: flex; justify-content: space-between; align-items: flex-end; gap: 3px; height: 72px; }
.slot { flex: 1; max-width: 40px; position: relative; height: 100%; border: 0; padding: 0; background: none; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.bar { position: relative; width: 78%; border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .8; min-height: 2px; }
.bar.today { background: repeating-linear-gradient(135deg, var(--accent) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1.5px var(--accent); }
.slot.active .bar { opacity: 1; }
.bar-sub { position: absolute; left: -1px; right: -1px; bottom: 0; border-radius: 4px 4px 2px 2px; background: var(--hint); opacity: .3; }
.slot.active .bar-sub { opacity: .45; }
.peak { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; font-size: 10px; font-weight: 600; color: var(--text); white-space: nowrap; }
.chart-empty { font-size: 13px; color: var(--hint); padding: 6px 0 2px; }
.axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--hint); margin-top: 6px; padding-right: 32px; }

.section { font-size: 12px; color: var(--hint); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin: 18px 4px 8px; }
.section.headrow { display: flex; align-items: center; justify-content: space-between; }
.section.headrow .btn { padding: 6px 10px; font-size: 12px; text-transform: none; letter-spacing: normal; }
.editor { margin-bottom: 8px; cursor: pointer; }
.editor.archived { opacity: .62; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: var(--hint); background: var(--bg); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.ghostinv { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 10px 12px; border: 1px dashed var(--sep); box-shadow: none; }
.ghostinv .ico { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--hint); }
.ghostinv .who { flex: 1; min-width: 0; }
.ghostinv .who .name { font-weight: 600; font-size: 14px; }
.ghostinv .who .meta { font-size: 12px; color: var(--hint); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xbtn { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--hint); font-size: 15px; cursor: pointer; }
.row { display: flex; align-items: center; gap: 12px; }
.ava {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.ava.big { width: 56px; height: 56px; font-size: 22px; }
.who { flex: 1; min-width: 0; }
.who .name { font-weight: 600; font-size: 15px; }
.who .meta { font-size: 12.5px; color: var(--hint); margin-top: 2px; }
.yt { text-align: right; }
.yt .v { font-weight: 700; font-size: 15px; }
.yt .l { font-size: 11px; color: var(--hint); }
.chev { color: var(--hint); font-size: 12px; }

.dhead { display: flex; align-items: center; gap: 14px; padding: 4px 2px 14px; }
.dhead .dname { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.dhead .dmeta { font-size: 13px; color: var(--hint); margin-top: 3px; }
.tapid { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; cursor: pointer; }
.linkvar + .linkvar { margin-top: 10px; }
.linkvar .lvt { font-size: 12.5px; color: var(--hint); margin-bottom: 4px; }

.linkbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-radius: 10px; padding: 8px 10px;
}
.linkbox code { flex: 1; font-size: 11.5px; color: var(--hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Доп. варианты ссылки — свёрнуты под основной */
.renamefield { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: 14px; outline: none; }
.btn {
  border: 0; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600;
  background: var(--accent); color: var(--accent-text); cursor: pointer; flex-shrink: 0;
}
.btn.ghost { background: var(--bg); color: var(--accent); }
.btnrow { display: flex; gap: 8px; margin-top: 10px; }
.btnrow .btn { flex: 1; }

.clip { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; border-top: 1px solid var(--sep); }
.clip:first-child { border-top: 0; padding-top: 2px; }
.clip .ico { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--hint); }
.clip.youtube .ico { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.clip.instagram .ico { background: color-mix(in srgb, #d6409f 14%, transparent); color: #d6409f; }
.clip.tiktok .ico { color: var(--text); }
.clip.warn .ico { background: color-mix(in srgb, #f5a524 18%, transparent); color: var(--warn-text); }
.clip .body { flex: 1; min-width: 0; }
.clip a { display: block; color: var(--text); font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip .note { font-size: 12.5px; color: var(--hint); margin-top: 2px; }
.clip.warn .note { color: var(--warn-text); }
.clip .views { color: var(--hint); flex-shrink: 0; }
.clip.gone { opacity: .55; }
.clip.gone a { color: var(--hint); text-decoration: line-through; }
.clip-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; border: 0; border-top: 1px solid var(--sep);
  background: none; color: var(--link); font: inherit; font-size: 14px; font-weight: 600; padding: 12px 0 2px; cursor: pointer; }
.clip-more .i { width: 14px; height: 14px; }
.clipfilter { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 8px; scrollbar-width: none; }
.clipfilter::-webkit-scrollbar { display: none; }
.clipfilter button { flex-shrink: 0; border: 0; border-radius: 16px; padding: 6px 12px; background: var(--card); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.clipfilter button .num { color: var(--hint); font-weight: 500; }
.clipfilter button.on { background: var(--accent); color: var(--accent-text); }
.clipfilter button.on .num { color: var(--accent-text); opacity: .8; }
.empty { font-size: 13px; color: var(--hint); }
.person { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; }
.person .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .tag { color: var(--hint); }
.person .st { flex-shrink: 0; font-size: 12px; color: var(--hint); }

.mylink .hint { font-size: 12px; color: var(--hint); margin-top: 8px; }
.mylink .hint + .hint { margin-top: 4px; }

/* «Первые шаги» — онбординг новичка */
.steps { margin-bottom: 10px; }
.onb-head { display: flex; justify-content: space-between; align-items: baseline; }
.onb-title { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.onb-cnt { font-size: 14px; font-weight: 600; color: var(--accent); }
.pbar { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; margin: 10px 0 4px; }
.pbar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sep); }
.pbar + .step { border-top: 0; }
.step .box { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--sep); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--hint); }
.step.cur .box { border-color: var(--accent); color: var(--accent); }
.step.done .box { background: #34c759; border-color: #34c759; color: #fff; }
.step .body { flex: 1; min-width: 0; }
.step .lbl { font-size: 15px; font-weight: 600; padding-top: 3px; }
.step.done .lbl { color: var(--hint); text-decoration: line-through; }
.step .desc { font-size: 13px; color: var(--hint); margin-top: 3px; }
.step .linkbox, .step > .body > .btn { margin-top: 8px; }
.step .btn.ghost { background: var(--accent-soft); }

/* Лидерборд — одна карточка, свой ряд подсвечен */
.lb { padding: 6px 14px 14px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 15px; border-top: 1px solid var(--sep); }
.lb-row:first-child { border-top: 0; }
.lb-row .rk { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--hint); }
.lb-row .rk.m1 { background: var(--gold); color: #fff; }
.lb-row .rk.m2 { background: #9aa0a8; color: #fff; }
.lb-row .rk.m3 { background: #b87a4b; color: #fff; }
.lb-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .v { font-weight: 700; }
.lb-row.me { background: var(--accent-soft); border-radius: 10px; border-top-color: transparent; margin: 2px -8px; padding: 10px 8px; }
.badge.you { background: var(--accent); color: var(--accent-text); }
.lb-ch { font-size: 11px; font-weight: 600; }
.lb-ch.up { color: var(--ok); }
.lb-ch.down { color: var(--red); }
.lb-gap { text-align: center; color: var(--hint); font-size: 13px; line-height: 1; padding-bottom: 6px; }
.lb-goal { margin-top: 10px; padding: 11px; border-radius: 10px; text-align: center; font-size: 14px;
  background: var(--accent-soft); }

.linkbtn { border: 0; background: none; color: var(--link); font: inherit; font-size: 13px; font-weight: 600;
  text-transform: none; letter-spacing: normal; cursor: pointer; padding: 0; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; padding: 12px 14px; border-radius: 12px;
  background: rgba(28,28,30,.92); color: #fff; font-size: 14px; font-weight: 500; text-align: center;
  transform: translateY(calc(100% + 24px)); transition: transform .3s ease; pointer-events: none; }
.toast.on { transform: none; }

/* Календарь клипов */
.cal-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.cal-grid { flex: 1 1 160px; max-width: 230px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid span { font-size: 10.5px; color: var(--hint); text-align: center; }
.cal-grid i, .cal-legend i { display: block; aspect-ratio: 1; border-radius: 6px; }
.l0 { background: var(--bg); }
.l1 { background: color-mix(in srgb, #30a14e 35%, transparent); }
.l2 { background: color-mix(in srgb, #30a14e 65%, transparent); }
.l3 { background: #30a14e; }
.cal-grid i.f { box-shadow: inset 0 0 0 1px var(--sep); }
.cal-grid i.today { box-shadow: 0 0 0 2px var(--text); }
.cal-stats { flex: 1 0 96px; display: flex; flex-direction: column; gap: 10px; }
.cs .v { display: flex; align-items: center; gap: 4px; font-size: 19px; font-weight: 700; }
.cs .v .i { width: 18px; height: 18px; color: #f76808; }
.cs .l { font-size: 12px; color: var(--hint); }
.cal-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--hint); }
.cal-legend i { width: 11px; border-radius: 3px; }
.cal-legend i:first-child { margin-left: 2px; }
.cal-legend i:last-child { margin-right: 2px; }

#e-charts-empty { margin-bottom: 10px; }

.skeleton { border-radius: 16px; height: 84px; margin-bottom: 8px;
  background: linear-gradient(90deg, var(--card) 25%, rgba(128,128,128,.12) 50%, var(--card) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton.sk-card { height: 72px; margin: 0; }
.skeleton.sk-chart { height: 150px; margin: 0; }
.skeleton.sk-line { height: 32px; width: 100%; margin: 0; }
.skeleton.sk-head { height: 56px; margin: 0; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.state { text-align: center; padding: 48px 24px; color: var(--hint); }
.state .emoji { font-size: 44px; margin-bottom: 12px; line-height: 1; }
.state .title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.hidden { display: none !important; }

/* --- бывшие инлайн-стили --- */
.gridline.top { top: 0; }
.gridline.mid { top: 50%; }
.editor.static { cursor: default; }
.btn.small { padding: 4px 8px; font-size: 12px; }
.btn.ghost.danger { color: var(--danger); }
.mark-err { color: #dc3545; }
.who.chan { font-size: 14px; }
.who.chan.off { color: var(--hint); }
.flag { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.flag + .flag { margin-top: 12px; }
.hint-note { font-size: 12px; color: var(--hint); margin-top: 8px; }
.spacer { height: 16px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }

.extlink { cursor: pointer; }
