/* manga.haru.by — вёрстка по макету Figma vsJCJPsjMmOgIssv3YXlKu */
@import url("fonts.css");

:root {
  --bg: #14131B;
  --panel: #1F1D2A;
  --line: #2E2B3D;
  --accent: #7DD3C0;
  --text: #EDEAF5;
  --muted: #9A96AC;
  --signal: #E0A458;
  --danger: #E07A6A;

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 16px;

  --pad: 40px;
  --gap: 36px;

  --f-head: "Manrope", "Inter", system-ui, sans-serif;
  --f-text: "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.45 var(--f-text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- шапка ---------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
  padding: 0 var(--pad);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.logo {
  font: 800 20px/1.2 var(--f-head);
  color: var(--accent);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  white-space: nowrap;
}

.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.search {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 795px;
  height: 40px;
}

.search input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); }

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}

.avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font: 700 14px var(--f-head);
}

/* ---------- каркас ---------- */

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px var(--pad) 40px;
}

.wrap--tight { padding-bottom: 24px; }

.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack--sm { gap: 24px; }

.row { display: flex; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }

.h-page {
  margin: 0;
  font: 800 30px/1.2 var(--f-head);
  letter-spacing: -0.01em;
}

.h-sec {
  margin: 0;
  font: 700 22px/1.35 var(--f-head);
}

.h-card {
  margin: 0;
  font: 700 18px/1.3 var(--f-head);
}

.sub { margin: 0; color: var(--muted); font-size: 14px; }
.small { font-size: 12px; color: var(--muted); }
.accent { color: var(--accent); }
.signal { color: var(--signal); }

.panel {
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.link-more { color: var(--accent); font: 500 13px var(--f-text); }
.link-more:hover { text-decoration: underline; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--panel);
  color: var(--text);
  font: 600 14px var(--f-text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}

.btn:hover { border-color: var(--line); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--primary:hover { background: #8fdbc9; border-color: #8fdbc9; }

.btn--ghost {
  background: var(--panel);
  border-color: var(--line);
}

.btn--dark {
  background: var(--bg);
  border-color: var(--line);
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--r-sm);
}

.btn--xs {
  height: 30px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.btn--block { width: 100%; }

.btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ---------- чипы, теги, бейджи ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--text);
  font: 400 12px var(--f-text);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.chip:hover { border-color: var(--accent); }

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.chip--plain {
  background: var(--panel);
  border-color: transparent;
  height: 28px;
  color: var(--text);
  cursor: default;
}
.chip--plain:hover { border-color: transparent; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  background: var(--panel);
  font-size: 12px;
}

.tag--age { color: var(--signal); }

.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--signal);
  color: var(--bg);
  font: 600 11px var(--f-text);
  white-space: nowrap;
}

.badge--soft {
  background: rgba(125, 211, 192, .14);
  color: var(--accent);
}

.badge--warn {
  background: rgba(224, 164, 88, .14);
  color: var(--signal);
}

.badge--muted {
  background: rgba(154, 150, 172, .14);
  color: var(--muted);
}

/* ---------- карточка тайтла ---------- */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.grid-cards--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.grid-cards--8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }

.tcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tcard__cover {
  position: relative;
  aspect-ratio: 196 / 272;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  align-items: flex-end;
  padding: 10px;
}

.tcard__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
  transition: transform .35s ease, opacity .2s;
}

.tcard:hover .tcard__cover img { transform: scale(1.03); opacity: .9; }

.tcard__title {
  font: 700 15px/1.35 var(--f-head);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcard__meta {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcard__badge { position: relative; z-index: 1; }

/* ---------- прогресс ---------- */

.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar__value {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.bar--dark { background: var(--bg); }

/* ---------- «продолжить чтение» ---------- */

.continue {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--panel);
}

.continue__cover {
  flex: none;
  width: 104px;
  height: 144px;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg);
}

.continue__cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }

.continue__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.continue__label { color: var(--accent); font: 500 13px var(--f-text); }
.continue__title { margin: 0; font: 800 28px/1.25 var(--f-head); }
.continue__meta { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- сетки страниц ---------- */

.split {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.split--account { grid-template-columns: 300px minmax(0, 1fr); }

/* ---------- фильтры ---------- */

.filters { display: flex; flex-direction: column; gap: 22px; padding: 20px 20px 22px; }

.filters__group { display: flex; flex-direction: column; gap: 10px; }

.filters__title {
  font: 600 13px var(--f-text);
  color: var(--text);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.check input { position: absolute; opacity: 0; pointer-events: none; }

.check__box {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: background .15s, border-color .15s;
}

.check__box::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--bg);
  border-bottom: 2px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .12s;
}

.check input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.check input:checked + .check__box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }

.check input:focus-visible + .check__box { outline: 2px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- таблица глав ---------- */

.chapters {
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}

.chapter {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) auto 140px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  transition: background .12s;
}

.chapter:first-child { border-top: 0; }
.chapter:hover { background: #24222f; }

.chapter__num { font: 700 15px var(--f-head); }
.chapter__name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter__date { color: var(--muted); font-size: 12px; text-align: right; }
.chapter__state { justify-self: end; font-size: 12px; color: var(--accent); }

.chapter--read .chapter__num,
.chapter--read .chapter__name { color: var(--muted); }

/* ---------- комментарии ---------- */

.comment { display: flex; gap: 12px; }

.comment__ava {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  display: grid;
  place-items: center;
  font: 700 12px var(--f-head);
  color: var(--text);
}

.comment__body {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment__head { display: flex; align-items: baseline; gap: 8px; }
.comment__name { font: 700 13px var(--f-head); }
.comment__time { color: var(--muted); font-size: 11px; }
.comment__text { margin: 0; font-size: 13px; }

.comment__actions { display: flex; gap: 16px; color: var(--muted); font-size: 12px; }
.comment__actions a:hover { color: var(--text); }

/* ---------- формы ---------- */

.field { display: flex; flex-direction: column; gap: 6px; }

.field__label { font: 500 12px var(--f-text); color: var(--muted); }

.input,
.select,
.textarea {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text);
  font: 400 14px var(--f-text);
}

.textarea { height: auto; min-height: 96px; padding: 12px 13px; resize: vertical; }

.input::placeholder,
.textarea::placeholder { color: var(--muted); }

.input:focus,
.select:focus,
.textarea:focus { outline: none; border-color: var(--accent); }

.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%239A96AC' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

/* ---------- табы ---------- */

.tabs { display: flex; gap: 10px; flex-wrap: wrap; }

.tab {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

/* ---------- уведомления ---------- */

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--signal);
  border-radius: 12px;
  background: var(--panel);
  font-size: 13px;
}

.notice::before {
  content: "";
  flex: none;
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--signal);
}

.notice--accent { border-color: var(--accent); }
.notice--accent::before { background: var(--accent); }

/* ---------- таблица модерации ---------- */

.table { border-radius: 12px; overflow: hidden; background: var(--panel); }

.table__head,
.table__row {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) 180px 150px 300px;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
}

.table__head {
  background: var(--bg);
  color: var(--muted);
  font: 500 12px var(--f-text);
}

.table__row { border-top: 1px solid var(--line); }
.table__row:first-child { border-top: 0; }

.table__obj { font: 500 13px var(--f-text); }
.table__reason { color: var(--muted); font-size: 12px; }
.table__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- футер ---------- */

.ftr {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px var(--pad) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.ftr nav { display: flex; gap: 20px; flex-wrap: wrap; }
.ftr a:hover { color: var(--text); }

/* ---------- вспомогательное ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.empty {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

/* ---------- страница тайтла ---------- */

.hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.hero__cover {
  width: 260px;
  aspect-ratio: 260 / 372;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--panel);
}

.hero__cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }

.hero__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.hero__title {
  margin: 0;
  font: 800 34px/1.2 var(--f-head);
  letter-spacing: -0.01em;
}

.hero__orig { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--panel);
}

.fact { display: flex; flex-direction: column; gap: 3px; }
.fact__label { color: var(--muted); font-size: 12px; }
.fact__value { font: 700 16px/1.3 var(--f-head); }
.fact b { font: 700 16px/1.3 var(--f-head); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ветки перевода */

.branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.branch {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}

.branch:hover { border-color: var(--muted); }

.branch--current { border: 2px solid var(--accent); }

.branch__row { display: flex; align-items: center; gap: 8px; }
.branch__name { font: 700 16px var(--f-head); }
.branch__meta { color: var(--muted); font-size: 12px; }

.branch__mark { position: absolute; top: 14px; right: 16px; background: var(--accent); color: var(--bg); }

/* рецензии */

.reviews { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }

.review-summary { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }

.review-summary__score { display: flex; align-items: center; gap: 10px; }
.review-summary__value { font: 800 34px/1 var(--f-head); color: var(--accent); }

.dist { display: flex; flex-direction: column; gap: 12px; }

.dist__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.dist__track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.dist__track i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

.review-list { display: flex; flex-direction: column; gap: 14px; }

.review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--panel);
}

.review__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review__score { margin-left: auto; font: 700 13px var(--f-head); }
.review__text { margin: 0; font-size: 13px; line-height: 1.55; }

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.link-btn:hover { color: var(--text); }

/* комментарии */

.comment-form {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  margin-bottom: 14px;
}

.comment-form .input { background: transparent; border: 0; height: 36px; padding-left: 4px; }
.comment-form .input:focus { outline: none; }

.comment-list { display: flex; flex-direction: column; gap: 14px; }

/* ---------- читалка ---------- */

.reader-body { display: flex; flex-direction: column; min-height: 100vh; }

.reader__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.reader__back { font-size: 18px; color: var(--text); }

.reader__head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reader__title { font: 700 16px/1.3 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader__sub { color: var(--accent); font-size: 12px; }

.reader__tools { margin-left: auto; display: flex; gap: 12px; }

.reader__settings {
  position: absolute;
  top: 64px;
  right: 28px;
  z-index: 40;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}

.reader__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px 20px;
  overflow: auto;
}

.reader__page {
  position: relative;
  width: min(700px, 100%);
  aspect-ratio: 700 / 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  overflow: hidden;
}

.reader__sheets { position: absolute; inset: 24px; display: grid; grid-template-rows: repeat(4, 1fr); gap: 10px; opacity: .5; }

.sheet {
  border-radius: 6px;
  background: repeating-linear-gradient(135deg, rgba(237, 234, 245, .05) 0 10px, rgba(237, 234, 245, .02) 10px 20px);
  border: 1px solid rgba(154, 150, 172, .18);
}

.sheet--1 { grid-row: span 2; }
.sheet--2 { grid-row: span 1; }
.sheet--3 { grid-row: span 3; }
.sheet--4 { grid-row: span 1; }

.reader__pageinfo { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.reader__pagenum { font: 800 22px var(--f-head); color: var(--muted); }

.reader__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.reader__zone--prev { left: 0; }
.reader__zone--next { right: 0; }
.reader__zone:hover { background: rgba(125, 211, 192, .06); }

.reader__nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  padding: 0 28px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.reader__progress { flex: 1; }

.reader__page[data-mode="scroll"] { width: min(760px, 100%); aspect-ratio: 760 / 1100; }

/* ---------- авторизация ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }

.auth__card {
  width: 440px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border-radius: var(--r-xl);
  background: var(--panel);
}

.auth__logo { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }

.auth__form { display: flex; flex-direction: column; gap: 20px; }

/* ---------- кабинет ---------- */

.profile { display: flex; flex-direction: column; gap: 18px; padding: 22px; }

.profile__who { display: flex; align-items: center; gap: 14px; }

.profile__ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font: 800 20px var(--f-head);
}

.profile__name { margin: 0; font: 700 20px var(--f-head); }

.profile__plan {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--bg);
}

.profile__stats { display: flex; flex-direction: column; gap: 10px; }
.profile__stats b { font: 700 13px var(--f-head); }

.profile__nav { display: flex; flex-direction: column; gap: 4px; }

.profile__nav a {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--muted);
}

.profile__nav a:hover { background: var(--bg); color: var(--text); }
.profile__nav a[aria-current="page"] { background: var(--bg); color: var(--text); font-weight: 600; }

.list-rows { display: flex; flex-direction: column; gap: 12px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel);
}

.list-row__cover {
  flex: none;
  width: 56px;
  height: 76px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
}
.list-row__cover img { width: 100%; height: 100%; object-fit: cover; opacity: .8; }

.list-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.list-row__name { font: 700 16px var(--f-head); }
.list-row__info .bar { margin-top: 6px; }

.list-row__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ---------- рекомендации ---------- */

.metrics {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: 12px;
  background: var(--panel);
}

.metric { display: flex; flex-direction: column; gap: 2px; }
.metric b { font: 800 22px/1.2 var(--f-head); }

/* ---------- поддержка ---------- */

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
}

.plan--featured { border: 2px solid var(--accent); }

.plan__head { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.plan__name { font: 700 15px var(--f-head); }

.plan__price { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.plan__price b { font: 800 30px/1.1 var(--f-head); }

.plan__features { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan__features li { display: flex; gap: 8px; font-size: 13px; }
.plan__features li::before { content: "·"; color: var(--accent); font-weight: 700; }
.plan .btn { margin-top: 4px; }

.spend__items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.spend__item { display: flex; flex-direction: column; gap: 2px; }
.spend__item b { font: 700 18px var(--f-head); }

/* ---------- панель публикации ---------- */

.publish { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }

.publish__form { display: flex; flex-direction: column; gap: 18px; padding: 22px 24px 24px; }
.publish__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.dropzone {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.dropzone__pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }

.thumb {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: grab;
}

.thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.thumb figcaption { font-size: 11px; color: var(--muted); text-align: center; }

.thumb--drag { opacity: .45; }

.thumb__x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 19, 27, .8);
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.publish__actions { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.publish__actions .field { flex: 1; }

.publish__recent { display: flex; flex-direction: column; gap: 14px; padding: 20px; }

.posts { display: flex; flex-direction: column; gap: 12px; }
.posts li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }

/* выбор жанров в форме публикации */

.genre-pick { display: flex; flex-wrap: wrap; gap: 8px; }

.genre-pick__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s;
}

.genre-pick__item:hover { border-color: var(--muted); }
.genre-pick__item input { position: absolute; opacity: 0; pointer-events: none; }
.genre-pick__item input:checked + .check__box { background: var(--accent); border-color: var(--accent); }
.genre-pick__item input:checked + .check__box::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.genre-pick__item:has(input:checked) { border-color: var(--accent); }

/* ---------- команда ---------- */

.team-head {
  display: flex;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--panel);
}

.team-head__logo {
  flex: none;
  width: 120px;
  height: 120px;
  border-radius: var(--r-xl);
  background: var(--bg);
  display: grid;
  place-items: center;
  font: 800 44px var(--f-head);
  color: var(--accent);
}

.team-head__info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.team-stats { display: flex; gap: 34px; flex-wrap: wrap; }

.members { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--panel);
}

.member div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.member b { font: 700 14px var(--f-head); }

/* ---------- адаптив страниц ---------- */

@media (max-width: 1180px) {
  .publish { grid-template-columns: minmax(0, 1fr); }
  .reviews { grid-template-columns: 260px minmax(0, 1fr); }
  .branches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spend__items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 160px minmax(0, 1fr); gap: 18px; }
  .hero__cover { width: 160px; }
  .hero__title { font-size: 26px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .branches { grid-template-columns: minmax(0, 1fr); }
  .publish__row { grid-template-columns: minmax(0, 1fr); }
  .team-head { flex-direction: column; }
  .reader__title { white-space: normal; }
  .reader__tools .btn:first-child { display: none; }
  .reader__nav { padding: 0 16px; gap: 10px; }
}

@media (max-width: 620px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__cover { width: 200px; }
  .members { grid-template-columns: minmax(0, 1fr); }
  .comment-form { flex-wrap: wrap; }
  .list-row { flex-wrap: wrap; }
  .list-row__aside { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .metrics { gap: 20px; }
  .reader__bar { height: auto; padding: 10px 16px; flex-wrap: wrap; }
}


@media (max-width: 1180px) {
  .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-cards--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split { grid-template-columns: 240px minmax(0, 1fr); gap: 20px; }
  .table__head, .table__row { grid-template-columns: minmax(0, 2fr) 140px 120px 240px; }
}

@media (max-width: 900px) {
  :root { --pad: 20px; --gap: 24px; }
  .hdr { gap: 14px; height: 60px; }
  .nav { display: none; }
  .grid-cards,
  .grid-cards--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split,
  .split--account { grid-template-columns: minmax(0, 1fr); }
  .continue { flex-wrap: wrap; }
  .continue__text { flex-basis: 100%; }
  .chapter { grid-template-columns: 110px minmax(0, 1fr) auto; }
  .chapter__date { display: none; }
  .table__head { display: none; }
  .table__row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .table__actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .hdr { gap: 10px; padding: 0 14px; }
  .logo { font-size: 17px; }
  .search { min-width: 0; }
  .search input { padding-left: 34px; font-size: 13px; }
  .avatar { width: 32px; height: 32px; font-size: 13px; }
  .grid-cards,
  .grid-cards--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-page { font-size: 24px; }
  .continue__title { font-size: 22px; }
  .chapter { grid-template-columns: 92px minmax(0, 1fr); }
  .chapter__state { grid-column: 2; justify-self: start; }
}
