:root {
  --page: 1280px;
  --content: 1040px;
  --ink: #333333;
  --muted: #666666;
  --link: #0088cc;
  --header: #efefef;
  --soft: #eeeeee;
  --border: #d3d3d3;
  --input-border: #cccccc;
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

#wrapper {
  width: min(100%, var(--page));
  margin: 0 auto;
  background: #ffffff;
}

main {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
}

header.site {
  position: relative;
  width: 100vw;
  height: 112px;
  margin: 0 0 40px calc((100% - 100vw) / 2);
  background: var(--header);
  border-bottom: 1px solid var(--border);
}

.brand {
  position: absolute;
  left: max(16px, calc((100% - var(--content)) / 2));
  top: 35px;
  display: block;
  width: 300px;
  height: 48px;
}

.brand img,
.family,
.random-btn img,
.collection-link img,
.season-grid img,
.season-strip img {
  display: block;
}

.family {
  position: absolute;
  left: calc(50% - 120px);
  top: -10px;
  width: 220px;
  height: 148px;
  max-width: none;
  z-index: 1;
}

.header-tools {
  position: absolute;
  right: max(16px, calc((100% - var(--content)) / 2));
  top: 36px;
  width: 300px;
  z-index: 2;
}

.site-search {
  display: flex;
  width: 300px;
  height: 28px;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--input-border);
}

.site-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  border: 0;
  padding: 0 8px;
  color: #222222;
  background: #ffffff;
  font: 14px Arial, Helvetica, sans-serif;
  outline: none;
}

.site-search button {
  flex: 0 0 28px;
  height: 26px;
  border: 0;
  border-left: 1px solid var(--input-border);
  padding: 0;
  color: var(--link);
  background: #eeeeee;
  font: 12px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.random-wrap {
  display: grid;
  grid-template-columns: 158px 100px;
  align-items: center;
  gap: 12px;
  width: 300px;
  margin-top: 9px;
  font-size: 18px;
  line-height: 1.15;
  color: #222222;
}

.random-wrap span {
  width: auto;
  white-space: nowrap;
}

.random-btn {
  display: inline-block;
  color: var(--link);
}

.mobile-random {
  display: none;
}

nav.crumbs {
  width: min(100% - 32px, var(--content));
  margin: -22px auto 14px;
  color: var(--muted);
  font-size: 12px;
}

nav.crumbs a {
  color: var(--muted);
}

.page-title {
  margin: 0 0 18px;
  color: #222222;
  font-size: 24px;
  font-weight: normal;
  line-height: 1.25;
}

h2 {
  margin: 0 0 14px;
  color: #222222;
  font-size: 18px;
  font-weight: normal;
  line-height: 1.25;
}

p {
  margin: 0 0 14px;
}

.home-top {
  display: grid;
  grid-template-columns: 526px 450px;
  gap: 44px;
  align-items: start;
}

.home-seasons {
  text-align: center;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(7, 58px);
  gap: 18px 18px;
  justify-content: center;
}

.season-grid a {
  display: block;
  width: 58px;
  height: 64px;
  background: #f1f1f1;
}

.home-intro {
  padding-top: 28px;
  color: #555555;
  font-size: 12px;
}

.collections {
  display: flex;
  justify-content: center;
  gap: 62px;
  margin-top: 24px;
}

.collection-link {
  display: flex;
  width: 132px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #444444;
  text-align: center;
  font-size: 14px;
}

.collection-link:hover {
  text-decoration: none;
}

.home-news {
  width: 100vw;
  margin: 30px 0 0 calc((100% - 100vw) / 2);
  padding: 24px 0 32px;
  background: var(--soft);
  border-top: 1px solid var(--border);
}

.home-news h2,
.news-list,
.news-more {
  width: min(100% - 32px, var(--content));
  margin-left: auto;
  margin-right: auto;
}

.home-news h2 {
  margin-bottom: 18px;
  text-align: left;
}

.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  max-width: 650px;
  margin: 0 0 18px;
}

.news-list a {
  display: block;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.news-list p {
  margin: 5px 0 0;
  color: #555555;
  font-size: 12px;
}

.news-list .comments-link {
  text-align: center;
  font-weight: bold;
}

.news-list .comments-link a {
  font-size: 12px;
}

.news-more {
  max-width: 650px;
  font-weight: bold;
  text-align: center;
}

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

.card {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 12px;
  min-height: 82px;
  padding: 8px;
  color: #555555;
  background: transparent;
  border: 0;
}

.card .thumb-link {
  display: block;
  width: 102px;
  height: 52px;
  margin-top: 2px;
  overflow: hidden;
  background: #eeeeee;
}

.card .thumb {
  display: block;
  width: 102px;
  height: 52px;
  object-fit: cover;
}

.card .thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888888;
  font-size: 11px;
}

.card .meta {
  min-width: 0;
}

.card .meta h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.2;
}

.card .meta h3 a {
  display: block;
  overflow-wrap: anywhere;
}

.card .meta p {
  margin: 0;
  color: #666666;
  font-size: 12px;
}

.card .meta .episode-card-desc {
  margin-top: 5px;
  line-height: 1.3;
}

.season-card {
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 8px;
  width: 295px;
  height: 60px;
  overflow: hidden;
  padding: 0;
  color: #565050;
}

.season-card .thumb-link,
.season-card .thumb {
  width: 102px;
  height: 52px;
}

.season-card .meta h3 {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.1;
}

.season-card .episode-card-kicker,
.season-card .episode-card-desc {
  color: #555555;
  font-size: 12px;
  line-height: 1.2;
}

.season-card .episode-card-kicker {
  display: none;
}

.season-card .episode-card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.panel {
  padding: 0;
  background: transparent;
  border: 0;
}

.episode-layout {
  display: grid;
  grid-template-columns: 120px 600px 300px;
  gap: 10px;
  width: min(100% - 32px, 1040px);
  max-width: 1040px;
  margin: 0 auto;
  transform: none;
  align-items: start;
}

.episode-controls {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  margin: 0 0 16px;
  color: #444444;
}

.episode-left-panel {
  width: 120px;
  margin-top: -20px;
  padding-top: 0;
}

.episode-left-panel h2,
.episode-rating-panel h2 {
  margin: 20px 0 14px;
  color: #333333;
  font-size: 15px;
  font-weight: normal;
  line-height: 1.2;
}

.vk-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 86px;
  height: 24px;
  margin: 0 0 30px 30px;
  padding: 0;
  color: transparent;
  background: transparent;
  border-radius: 0;
  font-size: 0;
  font-weight: bold;
  text-transform: uppercase;
}

.vk-button::before {
  content: "vk";
  display: inline-block;
  width: 32px;
  height: 24px;
  color: #ffffff;
  background: #4e7db6;
  border-radius: 3px;
  text-align: center;
  font-size: 12px;
  line-height: 24px;
}

.vk-button:hover {
  text-decoration: none;
}

.vk-button span {
  display: inline-block;
  min-width: 32px;
  height: 22px;
  padding: 0 6px;
  color: #506070;
  background: #ffffff;
  border: 1px solid #aab6c2;
  border-radius: 3px;
  text-align: center;
  font-size: 12px;
  line-height: 22px;
  text-transform: none;
}

.episode-rating-panel {
  margin-bottom: 22px;
}

.episode-left-panel .rating-large {
  display: block;
  width: 90px;
  margin-left: 30px;
  text-align: center;
}

.episode-left-panel .rating-large .stars {
  display: block;
  width: 90px;
  height: 16px;
  background: #d4d4d4;
}

.episode-left-panel .rating-large .rating-num {
  display: block;
  margin-top: 4px;
  color: #333333;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.best-link-side {
  display: block;
  width: 90px;
  margin: 8px 0 0 30px;
  color: var(--link);
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.15;
}

.season-compact b,
.episode-switch span {
  display: block;
  margin-bottom: 10px;
  color: #222222;
  font-size: 16px;
  font-weight: normal;
}

.season-compact div {
  display: grid;
  grid-template-columns: repeat(12, 14px);
  gap: 5px 4px;
  margin-bottom: 18px;
}

.season-compact a {
  display: block;
  width: 14px;
  height: 14px;
  color: var(--link);
  text-align: center;
  font-size: 12px;
  line-height: 14px;
}

.season-compact a.active {
  color: #222222;
  font-weight: bold;
}

.episode-switch {
  margin: 0;
}

.episode-switch label {
  display: block;
}

.episode-switch select {
  width: 100%;
  max-width: 390px;
  height: 24px;
  border: 1px solid var(--input-border);
  background: #ffffff;
  color: #222222;
  font: 12px Arial, Helvetica, sans-serif;
}

.episode-prevnext {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.episode-prevnext a,
.episode-prevnext .disabled {
  color: var(--link);
  font-size: 12px;
}

.episode-prevnext .disabled {
  color: #999999;
}

.episode-main {
  min-width: 0;
}

.video-box {
  width: 100%;
  background: #000000;
  border-top: 6px solid #000000;
}

.video-box video {
  display: block;
  width: 100%;
  height: auto;
  min-height: 338px;
  background: #000000;
}

.video-note {
  margin: 8px 0 0;
  color: #777777;
  font-size: 12px;
}

.episode-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 14px 0 22px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating .stars {
  position: relative;
  display: inline-block;
  width: 90px;
  height: 16px;
  background: #d4d4d4;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px);
  mask: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px);
}

.rating .stars-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: #f5b301;
}

.rating-num {
  color: #666666;
}

.vk-share {
  color: var(--link);
}

.episode-text {
  max-width: 100%;
}

.episode-facts {
  display: grid;
  gap: 8px;
  margin: 28px 0 0;
  padding-top: 12px;
  color: #999999;
  border-top: 1px solid #cccccc;
  font-size: 11px;
}

.article-body {
  color: #444444;
  font-size: 14px;
  line-height: 1.4;
}

.article-body p {
  margin-bottom: 12px;
}

.episode-right-panel {
  min-width: 0;
}

.episode-season-select select {
  width: 100%;
  height: 35px;
  border: 1px solid #d2d2d2;
  border-radius: 6px;
  color: #222222;
  background: #eeeeee;
  font: 15px Arial, Helvetica, sans-serif;
}

.episode-side-list {
  height: 270px;
  margin-top: 10px;
  overflow: hidden;
}

.episode-side-track {
  transition: transform 260ms ease;
}

.episode-side-group {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 270px;
}

.episode-side-card {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 8px;
  height: 60px;
  overflow: hidden;
  color: #555555;
}

.episode-side-card:hover {
  text-decoration: none;
}

.episode-side-card img {
  width: 102px;
  height: 52px;
  object-fit: cover;
  background: #eeeeee;
  border: 1px solid #d3d3d3;
}

.episode-side-card b,
.episode-side-card em {
  display: block;
  font-style: normal;
}

.episode-side-card b {
  color: var(--link);
  font-size: 14px;
  font-weight: normal;
  line-height: 1.1;
}

.episode-side-card em {
  margin-top: 2px;
  color: #555555;
  font-size: 12px;
  line-height: 1.2;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.episode-more-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  border: 1px solid #d0d0d0;
  border-radius: 5px;
  overflow: hidden;
  background: #eeeeee;
}

.episode-more-nav button {
  min-height: 36px;
  border: 0;
  color: var(--link);
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: bold;
  line-height: 36px;
  cursor: pointer;
}

.episode-more-nav button + button {
  border-left: 1px solid #d0d0d0;
}

.episode-more-nav button:hover {
  text-decoration: underline;
}

.episode-info-band {
  width: 100vw;
  margin: 34px 0 0 calc((100% - 100vw) / 2);
  padding: 32px 0 42px;
  background: var(--soft);
  border-top: 1px solid var(--border);
}

.episode-info-inner {
  width: min(100% - 32px, 1040px);
  margin: 0 auto;
}

.episode-info-inner h2 {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: normal;
}

.episode-picker {
  width: min(100%, 900px);
  margin: 34px auto 0;
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 30px;
}

.episode-mini {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 12px;
  min-height: 82px;
  color: #555555;
}

.episode-mini:hover {
  text-decoration: none;
}

.episode-mini img {
  width: 102px;
  height: 52px;
  object-fit: cover;
  background: #eeeeee;
}

.episode-mini b,
.episode-mini em {
  display: block;
  font-style: normal;
}

.episode-mini b {
  margin-bottom: 8px;
  color: var(--link);
  font-size: 13px;
}

.episode-mini em {
  color: #555555;
  font-size: 12px;
}

.episode-mini.active b {
  color: #222222;
}

.season-strip {
  display: grid;
  grid-template-columns: repeat(24, 36px);
  gap: 4px;
  margin: 0 auto 28px;
  justify-content: center;
}

.season-page-title {
  margin-bottom: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: normal;
}

.season-strip a {
  display: block;
  width: 36px;
  height: 40px;
  background: #f2f2f2;
}

.season-strip a.active {
  outline: 1px solid #bdbdbd;
}

.season-episodes {
  display: grid;
  grid-template-columns: repeat(3, 295px);
  gap: 10px 30px;
  width: min(100% - 32px, 1010px);
  max-width: 1010px;
  margin: 0 auto;
  transform: none;
  justify-content: center;
}

.comments {
  width: min(100% - 32px, var(--content));
  margin: 42px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.comments h2 {
  margin-bottom: 6px;
}

.comments .readonly-note {
  color: #777777;
}

.comment-list,
.comment-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list ul {
  margin: 8px 0 0 20px;
}

.comment {
  padding: 10px 0;
  border-bottom: 1px solid #dddddd;
}

.comment .head {
  margin-bottom: 4px;
  color: #777777;
}

.comment .head b {
  color: #333333;
}

.comment .text {
  white-space: pre-wrap;
}

footer.site {
  margin-top: 0;
  padding: 26px 16px 74px;
  color: #777777;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer.site p {
  margin: 0;
}

.search-page-form {
  display: flex;
  max-width: 430px;
  height: 30px;
  margin-bottom: 12px;
  border: 1px solid var(--input-border);
  background: #ffffff;
}

.search-page-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 8px;
  font: 13px Arial, Helvetica, sans-serif;
}

.search-page-form button {
  flex: 0 0 52px;
  border: 0;
  border-left: 1px solid var(--input-border);
  color: var(--link);
  background: #eeeeee;
  font: 12px Arial, Helvetica, sans-serif;
}

.search-status {
  color: #777777;
}

ol.best-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

ol.best-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #dddddd;
}

ol.best-list .rank {
  width: 28px;
  color: #777777;
  text-align: center;
  font-weight: bold;
}

ol.best-list .best-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
}

ol.best-list .best-link img {
  width: 64px;
  height: 48px;
  object-fit: cover;
}

ol.best-list .best-title {
  color: #333333;
}

ol.best-list .best-rating {
  color: #777777;
}

@media (max-width: 900px) {
  :root {
    --content: 688px;
  }

  main {
    width: min(100% - 80px, var(--content));
  }

  header.site {
    margin-bottom: 38px;
  }

  .brand {
    top: 34px;
    width: 220px;
    height: 35px;
  }

  .family {
    left: calc(50% - 110px);
  }

  .header-tools {
    right: max(26px, calc((100% - var(--content)) / 2));
    width: 220px;
  }

  .site-search {
    width: 190px;
    height: 24px;
  }

  .site-search input {
    height: 22px;
    font-size: 12px;
  }

  .site-search button {
    flex-basis: 28px;
    height: 22px;
  }

  .random-wrap {
    grid-template-columns: 120px 88px;
    gap: 8px;
    width: 220px;
    font-size: 12px;
  }

  .random-wrap span {
    width: 120px;
  }

  .random-wrap img {
    width: 88px;
    height: auto;
  }

  .home-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-intro {
    padding-top: 0;
    text-align: center;
  }

  .collections {
    margin-top: 16px;
    gap: 58px;
  }

  .home-news {
    margin-top: 28px;
  }

  .episode-layout {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0;
    transform: none;
  }

  .episode-left-panel {
    display: none;
  }

  .episode-right-panel {
    margin-top: 22px;
  }

  .episode-info-band {
    margin-top: 28px;
  }

  .episode-info-inner {
    width: min(100% - 80px, var(--content));
  }

  .season-episodes {
    width: auto;
    max-width: none;
    margin-left: 0;
    transform: none;
  }

  .season-compact div {
    grid-template-columns: repeat(12, 14px);
  }

  .episode-switch select {
    width: 100%;
  }

  .episode-prevnext {
    grid-template-columns: 1fr 1fr;
  }

  .episode-picker {
    margin-left: 0;
  }

  .episode-list,
  .season-episodes {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 14px;
  }

  .season-strip {
    grid-template-columns: repeat(16, 36px);
  }
}

@media (max-width: 600px) {
  :root {
    --content: 342px;
  }

  main {
    width: min(100% - 32px, var(--content));
  }

  header.site {
    height: 122px;
    margin-bottom: 46px;
  }

  .brand,
  .header-tools {
    display: none;
  }

  .family {
    left: calc(50% - 110px);
    top: 0;
  }

  nav.crumbs {
    margin-top: -28px;
  }

  .page-title {
    text-align: center;
    font-size: 24px;
  }

  .season-grid {
    grid-template-columns: repeat(3, 58px);
    gap: 20px 24px;
  }

  .home-intro {
    display: block;
    padding-top: 0;
  }

  .home-intro p {
    display: none;
  }

  .collections {
    display: grid;
    grid-template-columns: repeat(2, 132px);
    gap: 14px 18px;
    justify-content: center;
    margin-top: 28px;
  }

  .collections::before {
    content: "";
    display: block;
    grid-column: 1 / -1;
    width: 100px;
    height: 30px;
    margin: 0 auto 8px;
    background: url("/media/random2.png") center / 100px 30px no-repeat;
  }

  .home-news {
    margin-top: 48px;
    padding-bottom: 180px;
  }

  .home-news h2,
  .news-list,
  .news-more {
    width: min(100% - 32px, var(--content));
  }

  .news-list li {
    max-width: none;
    margin-bottom: 56px;
  }

  .news-list a {
    font-size: 20px;
    line-height: 1.25;
  }

  .news-list p {
    font-size: 14px;
  }

  .episode-right-panel {
    margin-top: 18px;
  }

  .episode-side-card {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .episode-side-card img {
    width: 102px;
    height: 52px;
  }

  .episode-side-card b {
    font-size: 14px;
  }

  .episode-side-card em {
    display: none;
  }

  .episode-info-inner {
    width: min(100% - 32px, var(--content));
  }

  .episode-info-inner h2 {
    font-size: 24px;
  }

  .article-body {
    font-size: 14px;
  }

  .season-card {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .season-card .thumb-link,
  .season-card .thumb {
    width: 102px;
    height: 52px;
  }

  .season-card .meta h3 {
    font-size: 14px;
  }

  .season-card .episode-card-kicker,
  .season-card .episode-card-desc {
    font-size: 12px;
  }

  .season-compact div {
    grid-template-columns: repeat(8, 14px);
  }

  .video-box video {
    min-height: 194px;
  }

  .episode-tools {
    gap: 10px;
  }

  .episode-list,
  .season-episodes {
    grid-template-columns: 1fr;
    gap: 8px;
    max-width: 100%;
  }

  .episode-mini,
  .card {
    grid-template-columns: 102px minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-height: 60px;
  }

  .episode-mini span,
  .card .meta {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .episode-mini b,
  .card .meta h3 a {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .episode-mini em,
  .season-episodes .card .meta p {
    display: none;
  }

  .season-episodes .card .meta h3 {
    margin-top: 0;
  }

  .episode-picker h2 {
    text-align: center;
  }

  .mobile-random {
    display: block;
    margin: 18px 0 0;
    text-align: center;
  }

  .season-strip {
    grid-template-columns: repeat(7, 36px);
    gap: 5px;
  }

  .comments {
    width: min(100% - 48px, var(--content));
  }

  ol.best-list .best-rating {
    display: none;
  }
}
