/* BestManga — dark reading theme */

:root {
  --bg: #0d0f16;
  --bg-2: #12151f;
  --panel: #161a26;
  --panel-2: #1c2130;
  --line: #242a3a;
  --line-2: #2f374b;
  --txt: #e8ecf6;
  --txt-2: #a2abc2;
  --txt-3: #6f7994;
  --accent: #ff6b2c;
  --accent-2: #ff9a3c;
  --violet: #7c5cff;
  --green: #2fd48f;
  --red: #ff4d6d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --wrap: 1240px;
  --head-h: 62px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(255, 107, 44, .13), transparent 60%),
    radial-gradient(900px 460px at 92% -4%, rgba(124, 92, 255, .13), transparent 62%);
}

ul, ol { list-style: none; }

a { color: var(--txt); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Outfit", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

h1 { font-size: 1.95rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5 { font-size: .95rem; }

strong { font-weight: 700; }

.muted { color: var(--txt-3); }
.dim { color: var(--txt-2); }
.hide { display: none !important; }
.txt-xs { font-size: .8rem; }
.clamp-1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

/* ---------------- header ---------------- */

.bm-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 15, 22, .88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.bm-head__bar {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.bm-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.bm-brand img { width: 32px; height: 32px; border-radius: 9px; }
.bm-brand__txt {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--accent-2), var(--accent) 45%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.bm-search { flex: 1; max-width: 460px; position: relative; }
.bm-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--txt);
  padding: 0 44px 0 18px;
  font-size: .9rem;
  outline: none;
  font-family: inherit;
}
.bm-search input::placeholder { color: var(--txt-3); }
.bm-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 44, .16); }
.bm-search button {
  position: absolute;
  right: 4px; top: 4px;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #12141c;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

.bm-head__nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.bm-head__nav a {
  font-size: .85rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--txt-2);
  white-space: nowrap;
}
.bm-head__nav a:hover { background: var(--panel-2); color: var(--txt); }
.bm-head__nav a.is-cta {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  color: #12141c;
}
.bm-head__nav a.is-cta:hover { filter: brightness(1.08); color: #12141c; }

.bm-burger {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line-2);
  color: var(--txt);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  align-items: center; justify-content: center;
}

.bm-user { display: flex; align-items: center; gap: 8px; position: relative; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.bm-user:hover { background: var(--panel-2); }
.bm-user img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); object-fit: cover; }
.bm-user span { font-size: .85rem; font-weight: 600; max-width: 100px; }

.bm-drop {
  position: absolute;
  top: calc(100% + 6px); right: 0;
  min-width: 180px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 70;
}
.bm-drop a { display: block; padding: 8px 12px; border-radius: 7px; font-size: .85rem; color: var(--txt-2); }
.bm-drop a:hover { background: var(--panel-2); color: var(--txt); }
.has-drop.is-open .bm-drop { display: block; }

/* sub navigation strip */
.bm-subnav { border-top: 1px solid var(--line); background: rgba(18, 21, 31, .6); }
.bm-subnav__inner { display: flex; align-items: center; gap: 8px; height: 46px; overflow-x: auto; scrollbar-width: none; }
.bm-subnav__inner::-webkit-scrollbar { display: none; }
.bm-chip {
  flex: none;
  font-size: .82rem;
  font-weight: 600;
  color: var(--txt-2);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  white-space: nowrap;
}
.bm-chip:hover { color: var(--txt); border-color: var(--accent); }
.bm-chip.is-active { background: linear-gradient(100deg, var(--accent-2), var(--accent)); color: #12141c; border-color: transparent; }

.bm-genres-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 16px 0 20px;
}
.bm-genres-panel.is-open { display: block; }
.bm-genres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.bm-genres-grid a {
  font-size: .84rem;
  color: var(--txt-2);
  padding: 7px 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.bm-genres-grid a:hover { background: var(--panel-2); color: var(--txt); }
.bm-genres-grid a.is-active { background: var(--panel-2); color: var(--accent-2); }

/* ---------------- section headings ---------------- */

.bm-sec { padding: 34px 0 6px; position: relative; z-index: 1; }
.bm-sec--tight { padding-top: 18px; }

.bm-sechead { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.bm-sechead__bar { width: 4px; align-self: stretch; min-height: 34px; border-radius: 3px; background: linear-gradient(var(--accent-2), var(--violet)); flex: none; }
.bm-sechead h2, .bm-sechead h1 { font-size: 1.4rem; }
.bm-sechead p { color: var(--txt-3); font-size: .85rem; margin-top: 2px; }
.bm-sechead__more { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--txt-2); white-space: nowrap; }
.bm-sechead__more:hover { color: var(--accent-2); }

/* ---------------- hero spotlight ---------------- */

.bm-hero { padding: 26px 0 4px; position: relative; z-index: 1; }
.bm-hero__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }

.bm-spot {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
}
.bm-spot__bg { position: absolute; inset: 0; }
.bm-spot__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(18px) saturate(130%); transform: scale(1.15); opacity: .5; }
.bm-spot__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 13, 19, .97) 8%, rgba(11, 13, 19, .55) 55%, rgba(11, 13, 19, .3)); }
.bm-spot__body { position: relative; display: flex; gap: 20px; padding: 24px; width: 100%; }
.bm-spot__poster { width: 150px; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.bm-spot__poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.bm-spot__info { min-width: 0; }
.bm-spot__rank {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #12141c;
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.bm-spot__info h2 { font-size: 1.65rem; margin-bottom: 8px; }
.bm-spot__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bm-spot__desc { color: var(--txt-2); font-size: .87rem; margin-bottom: 14px; }
.bm-spot__cta { display: flex; gap: 8px; flex-wrap: wrap; }

.bm-spotlist { display: flex; flex-direction: column; gap: 8px; }
.bm-spotlist__item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .15s ease, transform .15s ease;
}
.bm-spotlist__item:hover { border-color: var(--line-2); transform: translateX(2px); }
.bm-spotlist__num { font-family: "Outfit", sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--txt-3); width: 26px; text-align: center; flex: none; }
.bm-spotlist__item:nth-child(1) .bm-spotlist__num { color: var(--accent); }
.bm-spotlist__item:nth-child(2) .bm-spotlist__num { color: var(--accent-2); }
.bm-spotlist__item:nth-child(3) .bm-spotlist__num { color: var(--violet); }
.bm-spotlist__img { width: 44px; height: 58px; flex: none; border-radius: 7px; overflow: hidden; border: 1px solid var(--line-2); }
.bm-spotlist__img img { width: 100%; height: 100%; object-fit: cover; }
.bm-spotlist__info { min-width: 0; }
.bm-spotlist__info h4 { font-size: .9rem; }
.bm-spotlist__info span { font-size: .76rem; color: var(--txt-3); }

/* ---------------- pills / tags / buttons ---------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--txt-2);
  border: 1px solid var(--line-2);
}
.pill--accent { background: rgba(255, 107, 44, .14); border-color: rgba(255, 107, 44, .35); color: var(--accent-2); }
.pill--violet { background: rgba(124, 92, 255, .14); border-color: rgba(124, 92, 255, .35); color: #b3a1ff; }
.pill--green { background: rgba(47, 212, 143, .13); border-color: rgba(47, 212, 143, .3); color: var(--green); }
.pill--red { background: rgba(255, 77, 109, .13); border-color: rgba(255, 77, 109, .3); color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--txt);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease, background .15s ease;
}
.btn:hover { background: var(--line); color: var(--txt); }
.btn--primary {
  background: linear-gradient(100deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #12141c;
}
.btn--primary:hover { filter: brightness(1.08); color: #12141c; }
.btn--ghost { background: transparent; }
.btn--sm { height: 32px; padding: 0 12px; font-size: .8rem; border-radius: 8px; }
.btn--block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: .4; pointer-events: none; }

/* ---------------- poster grid + rails ---------------- */

.bm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 20px 16px;
}
.bm-grid--dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.bm-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.bm-rail::-webkit-scrollbar { height: 6px; }
.bm-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.bm-rail > * { scroll-snap-align: start; }

.card { position: relative; }
.card__thumb {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  aspect-ratio: 3 / 4;
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .card__thumb img { transform: scale(1.07); }
.card__thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(9, 11, 16, .92), transparent);
  opacity: .9;
}
.card__badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(9, 11, 16, .8);
  color: var(--accent-2);
  border: 1px solid rgba(255, 154, 60, .35);
  backdrop-filter: blur(4px);
}
.card__badge--rank { background: linear-gradient(100deg, var(--accent-2), var(--accent)); color: #12141c; border-color: transparent; }
.card__stat {
  position: absolute;
  left: 8px; bottom: 8px;
  z-index: 2;
  font-size: .7rem;
  font-weight: 700;
  color: var(--txt-2);
}
.card__fav {
  position: absolute;
  right: 6px; top: 6px;
  z-index: 3;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(9, 11, 16, .78);
  color: var(--txt-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.card:hover .card__fav { opacity: 1; }
.card__fav:hover, .card__fav.is-on { color: var(--red); border-color: var(--red); }
.card__fav svg { width: 100%; height: 100%; }
.card__body { padding-top: 9px; }
.card__title { font-size: .88rem; line-height: 1.3; margin-bottom: 5px; }
.card__title a:hover { color: var(--accent-2); }
.card__chap { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .76rem; }
.card__chap a { color: var(--accent-2); font-weight: 600; }
.card__chap span { color: var(--txt-3); white-space: nowrap; }

/* ---------------- update rows (latest list) ---------------- */

.bm-updates { display: flex; flex-direction: column; gap: 8px; }
.bm-row {
  display: flex;
  gap: 13px;
  padding: 11px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color .15s ease, background .15s ease;
}
.bm-row:hover { border-color: var(--line-2); background: var(--panel-2); }
.bm-row__img { width: 58px; height: 78px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); }
.bm-row__img img { width: 100%; height: 100%; object-fit: cover; }
.bm-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bm-row__title { font-size: .95rem; }
.bm-row__title a:hover { color: var(--accent-2); }
.bm-row__genres { display: flex; flex-wrap: wrap; gap: 5px; }
.bm-row__genres a { font-size: .72rem; color: var(--txt-3); }
.bm-row__genres a:hover { color: var(--accent-2); }
.bm-row__chaps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.bm-chapchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--txt-2);
}
.bm-chapchip:hover { border-color: var(--accent); color: var(--accent-2); }
.bm-chapchip em { font-style: normal; color: var(--txt-3); font-size: .7rem; font-weight: 500; }
.bm-row__side { flex: none; text-align: right; font-size: .74rem; color: var(--txt-3); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ---------------- two column shell ---------------- */

.bm-shell { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 26px; align-items: start; }
.bm-side { position: sticky; top: calc(var(--head-h) + 14px); display: flex; flex-direction: column; gap: 18px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.panel__head h3 { font-size: .95rem; }
.panel__head .pill { margin-left: auto; }
.panel__body { padding: 12px 15px 15px; }

.bm-rank { display: flex; flex-direction: column; }
.bm-rank__item { display: flex; align-items: center; gap: 11px; padding: 9px 15px; border-bottom: 1px solid var(--line); }
.bm-rank__item:last-child { border-bottom: none; }
.bm-rank__item:hover { background: var(--panel-2); }
.bm-rank__n {
  width: 24px; height: 24px;
  flex: none;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Outfit", sans-serif;
  font-size: .78rem;
  font-weight: 800;
  background: var(--bg-2);
  color: var(--txt-3);
  border: 1px solid var(--line-2);
}
.bm-rank__item:nth-child(1) .bm-rank__n { background: linear-gradient(100deg, var(--accent-2), var(--accent)); color: #12141c; border-color: transparent; }
.bm-rank__item:nth-child(2) .bm-rank__n { background: rgba(124, 92, 255, .25); color: #b3a1ff; border-color: rgba(124, 92, 255, .4); }
.bm-rank__item:nth-child(3) .bm-rank__n { background: rgba(47, 212, 143, .18); color: var(--green); border-color: rgba(47, 212, 143, .35); }
.bm-rank__img { width: 34px; height: 46px; flex: none; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); }
.bm-rank__img img { width: 100%; height: 100%; object-fit: cover; }
.bm-rank__info { min-width: 0; flex: 1; }
.bm-rank__info h4 { font-size: .84rem; font-weight: 600; }
.bm-rank__info span { font-size: .73rem; color: var(--txt-3); }

.bm-tagcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-tagcloud a {
  font-size: .78rem;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--txt-2);
}
.bm-tagcloud a:hover { border-color: var(--accent); color: var(--accent-2); }
.bm-tagcloud a.is-active { background: linear-gradient(100deg, var(--accent-2), var(--accent)); color: #12141c; border-color: transparent; }

.bm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bm-stats div { text-align: center; padding: 10px 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; }
.bm-stats strong { display: block; font-family: "Outfit", sans-serif; font-size: 1.15rem; color: var(--accent-2); }
.bm-stats span { font-size: .72rem; color: var(--txt-3); }

/* ---------------- serie page ---------------- */

.bm-serie {
  position: relative;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 4px;
}
.bm-serie__bg { position: absolute; inset: 0; }
.bm-serie__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(120%); transform: scale(1.2); opacity: .35; }
.bm-serie__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 6%, rgba(13, 15, 22, .82) 60%, rgba(13, 15, 22, .7)); }
.bm-serie__inner { position: relative; display: flex; gap: 26px; padding: 30px 0 32px; }
.bm-serie__poster { width: 208px; flex: none; }
.bm-serie__poster img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.bm-serie__info { min-width: 0; flex: 1; }
.bm-serie__info h1 { margin-bottom: 6px; }
.bm-serie__alt { color: var(--txt-3); font-size: .84rem; margin-bottom: 12px; }
.bm-serie__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.bm-serie__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bm-serie__facts div { background: rgba(22, 26, 38, .7); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.bm-serie__facts dt { font-size: .72rem; color: var(--txt-3); text-transform: uppercase; letter-spacing: .05em; }
.bm-serie__facts dd { font-size: .88rem; font-weight: 600; }
.bm-serie__cta { display: flex; flex-wrap: wrap; gap: 9px; }

.bm-chaplist { display: flex; flex-direction: column; gap: 6px; }
.bm-chapitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: .88rem;
}
.bm-chapitem:hover { border-color: var(--accent); background: var(--panel-2); }
.bm-chapitem.is-read { opacity: .55; }
.bm-chapitem__name { flex: 1; min-width: 0; font-weight: 600; }
.bm-chapitem__meta { font-size: .76rem; color: var(--txt-3); white-space: nowrap; }
.bm-chaplist.is-desc { flex-direction: column-reverse; }

.bm-prose { color: var(--txt-2); font-size: .92rem; line-height: 1.75; }
.bm-prose p { margin-bottom: .8rem; }
.bm-prose h2, .bm-prose h3 { color: var(--txt); margin: 1.4rem 0 .6rem; }
.bm-prose a { color: var(--accent-2); text-decoration: underline; }
.bm-prose ul, .bm-prose ol { margin: 0 0 .9rem 1.2rem; }
.bm-prose li { list-style: disc; margin-bottom: .3rem; }

.bm-note {
  background: rgba(124, 92, 255, .1);
  border: 1px solid rgba(124, 92, 255, .28);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .84rem;
  color: var(--txt-2);
  margin-bottom: 14px;
}

/* ---------------- comments ---------------- */

.bm-comments { display: flex; flex-direction: column; gap: 12px; }
.bm-comment {
  display: flex;
  gap: 12px;
  padding: 13px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.bm-comment__av { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-2); }
.bm-comment__av img { width: 100%; height: 100%; object-fit: cover; }
.bm-comment__body { min-width: 0; flex: 1; }
.bm-comment__top { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.bm-comment__name { font-size: .9rem; font-weight: 700; }
.bm-comment__time { font-size: .74rem; color: var(--txt-3); }
.bm-comment__txt { font-size: .88rem; color: var(--txt-2); word-break: break-word; }

.lvl-wolf-disaster, .lvl-tiger-disaster, .lvl-demon-disaster, .lvl-dragon-disaster, .lvl-god-disaster {
  background: linear-gradient(100deg, var(--accent-2), var(--red) 50%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------------- forms ---------------- */

.bm-form { max-width: 420px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--txt-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--txt);
  padding: 11px 14px;
  font-family: inherit;
  font-size: .9rem;
  outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 44, .14); }
.field .error { display: block; color: var(--red); font-size: .78rem; margin-bottom: 5px; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: .86rem; margin-bottom: 16px; }
.alert--ok { background: rgba(47, 212, 143, .12); border: 1px solid rgba(47, 212, 143, .3); color: var(--green); }
.alert--err { background: rgba(255, 77, 109, .12); border: 1px solid rgba(255, 77, 109, .3); color: var(--red); }

.bm-auth {
  max-width: 430px;
  margin: 46px auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.bm-auth h1 { font-size: 1.5rem; margin-bottom: 6px; }
.bm-auth > p { color: var(--txt-3); font-size: .86rem; margin-bottom: 20px; }
.bm-auth__foot { margin-top: 16px; font-size: .84rem; color: var(--txt-3); text-align: center; }
.bm-auth__foot a { color: var(--accent-2); font-weight: 600; }

/* ---------------- pagination ---------------- */

.bm-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 0 6px; }
.bm-pager__info { font-size: .82rem; color: var(--txt-3); }

/* ---------------- empty state ---------------- */

.bm-empty { text-align: center; padding: 50px 20px; color: var(--txt-3); }
.bm-empty h3 { color: var(--txt); margin-bottom: 8px; }

/* ---------------- footer ---------------- */

.bm-foot { margin-top: 50px; border-top: 1px solid var(--line); background: var(--bg-2); position: relative; z-index: 1; }
.bm-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 26px; padding: 36px 0 28px; }
.bm-foot__about p { font-size: .84rem; color: var(--txt-3); margin-top: 12px; max-width: 320px; }
.bm-foot h5 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--txt-2); margin-bottom: 12px; }
.bm-foot li { margin-bottom: 7px; }
.bm-foot li a { font-size: .84rem; color: var(--txt-3); }
.bm-foot li a:hover { color: var(--accent-2); }
.bm-foot__bar {
  border-top: 1px solid var(--line);
  padding: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--txt-3);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1080px) {
  .bm-shell { grid-template-columns: 1fr; }
  .bm-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .bm-side > * { flex: 1 1 300px; }
  .bm-hero__grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  html { font-size: 14.5px; }
  .bm-burger { display: flex; }
  .bm-head__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px; gap: 2px; }
  .bm-head__nav.is-open { display: flex; }
  .bm-head__nav a { padding: 11px 14px; border-radius: 10px; }
  .bm-serie__inner { flex-direction: column; align-items: center; text-align: center; padding-top: 22px; }
  .bm-serie__poster { width: 168px; }
  .bm-serie__tags, .bm-serie__cta { justify-content: center; }
  .bm-foot__grid { grid-template-columns: repeat(2, 1fr); }
  .bm-spot { min-height: auto; }
  .bm-spot__body { flex-direction: column; }
  .bm-spot__poster { width: 128px; }
}

@media (max-width: 567px) {
  .wrap { padding: 0 13px; }
  .bm-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 11px; }
  .bm-rail { grid-auto-columns: 132px; }
  .bm-brand__txt { font-size: 1.1rem; }
  .bm-row__side { display: none; }
  .bm-foot__grid { grid-template-columns: 1fr; gap: 20px; }
  .bm-serie__facts { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.55rem; }
}

@media (max-width: 420px) {
  .bm-search { max-width: none; }
  .bm-brand__txt { display: none; }
}
