/* ==============================
   ОБЩИЙ ВИД
   ============================== */

:root {
  --ink: #272727;
  --soft-ink: #666;
  --faint: #aaa;
  --paper: #fff;
  --line: rgba(40, 40, 40, .22);
  --sidebar-width: 285px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

/* На десктопе всегда резервируем место под вертикальный скроллбар.
   Иначе фон, привязанный к правому краю viewport, прыгает при переходе
   между короткими и длинными разделами. */
@media (min-width: 821px) {
  html {
    overflow-y: scroll;
  }
}

body {
  --page-background-image: url("img/tower.png");
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,1) 0%,
      rgba(255,255,255,.98) 40%,
      rgba(255,255,255,.70) 58%,
      rgba(255,255,255,.08) 78%
    ),
    var(--page-background-image) right top / auto 100vh no-repeat fixed,
    #fff;
  font-family: Georgia, "Times New Roman", serif;
}

/* Фоны отдельных разделов */
body:has(#checklist.active .checklist-panel[data-panel="games"].active) {
  --page-background-image: url("img/stalker.png");
}

body:has(#collections.active .collection-panel[data-collection-panel="boardgames"].active),
body:has(#wishlist.active .wishlist-panel[data-wishlist-panel="boardgames"].active) {
  --page-background-image: url("img/board.png");
}

body:has(#checklist.active .checklist-panel[data-panel="books"].active),
body:has(#wishlist.active .wishlist-panel[data-wishlist-panel="books"].active) {
  --page-background-image: url("img/books.png");
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .11;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,.035) 0,
      rgba(0,0,0,.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 52px 34px 34px 46px;
  background: rgba(255,255,255,.74);
  border-right: 1px solid rgba(30,30,30,.09);
  backdrop-filter: blur(2px);
}

.content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - var(--sidebar-width) - 70px));
  margin-left: calc(var(--sidebar-width) + 62px);
  padding: 62px 0 100px;
}

/* ==============================
   МЕНЮ
   ============================== */

.site-title {
  display: inline-block;
  margin-bottom: 42px;
  color: #202020;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: .08em;
  text-decoration: none;
  transform: rotate(-1deg);
}

.site-title::after {
  content: "";
  display: block;
  width: 104%;
  height: 1px;
  margin-top: 10px;
  background: #555;
  opacity: .5;
  transform: rotate(.6deg);
}

.menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.menu a {
  position: relative;
  display: inline-block;
  padding: 7px 5px 5px 1px;
  color: #383838;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 16px;
  letter-spacing: .055em;
  text-decoration: none;
  transition: transform .15s ease, color .15s ease;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 5px;
  bottom: 2px;
  height: 1px;
  background: #555;
  opacity: 0;
  transform: scaleX(.6) rotate(-.5deg);
  transform-origin: left;
  transition: opacity .15s ease, transform .15s ease;
}

.menu a:hover,
.menu a.active {
  color: #000;
  transform: translateX(3px) rotate(-.25deg);
}

.menu a:hover::after,
.menu a.active::after {
  opacity: .65;
  transform: scaleX(1) rotate(-.5deg);
}

.sidebar-note {
  position: absolute;
  left: 46px;
  bottom: 34px;
  color: #8b8b8b;
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==============================
   РАЗДЕЛЫ
   ============================== */

.section {
  display: none;
  max-width: 760px;
  animation: appear .22s ease;
}

.section.active {
  display: block;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft-ink);
  font-size: 11px;
  letter-spacing: .22em;
}

h1 {
  width: fit-content;
  margin: 0 0 28px;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  transform: rotate(-.4deg);
}

h1::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 9px;
  background: rgba(30,30,30,.46);
  transform: rotate(.4deg);
}

h2 {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: normal;
}

p {
  line-height: 1.65;
}

.entry {
  max-width: 610px;
  padding: 22px 24px;
  background: rgba(255,255,255,.79);
  border: 1px solid var(--line);
  box-shadow: 4px 5px 0 rgba(0,0,0,.025);
}

.entry-date {
  margin-bottom: 8px;
  color: #777;
  font-size: 12px;
  letter-spacing: .08em;
}

.placeholder {
  max-width: 570px;
  padding: 18px 20px;
  background: rgba(255,255,255,.72);
  border-left: 2px solid rgba(40,40,40,.25);
}

#events-posts .entry + .entry {
  margin-top: 24px;
}

/* ==============================
   БЛОГ
   ============================== */

.blog-panel,
.wishlist-panel {
  display: none;
}

.blog-panel.active,
.wishlist-panel.active {
  display: block;
}

.article-index {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.article-card {
  display: block;
  padding: 17px 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.20);
  box-shadow: 3px 4px 0 rgba(0,0,0,.025);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

.article-card:hover {
  transform: translateY(-1px);
  border-color: rgba(35,35,35,.40);
}

.article-card-date {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 11px;
  letter-spacing: .08em;
}

.article-card-title {
  display: block;
  font-size: 20px;
  line-height: 1.35;
}

#article-view {
  max-width: 680px;
}

.back-to-articles {
  display: inline-block;
  margin-bottom: 18px;
  color: #555;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid rgba(35,35,35,.32);
}

.long-article {
  padding: 22px 24px 28px;
  background: rgba(255,255,255,.79);
  border: 1px solid var(--line);
  box-shadow: 4px 5px 0 rgba(0,0,0,.025);
}

.long-article h2 {
  margin-bottom: 18px;
}

.long-article p {
  margin: 0;
  text-align: justify;
}

.long-article p + p {
  margin-top: 18px;
}

.article-photo {
  margin: 22px 0;
}

.article-photo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(35,35,35,.16);
}

.article-photo figcaption {
  margin-top: 7px;
  color: #777;
  font-size: 11px;
  line-height: 1.45;
}

.article-views {
  margin: 0 0 18px;
  padding-bottom: 9px;
  border-bottom: 1px dashed rgba(35,35,35,.22);
  color: #777;
  font: 12px/1.4 Georgia, "Times New Roman", serif;
}

.article-like-box {
  margin-top: 26px;
  padding-top: 13px;
  border-top: 1px dashed rgba(35,35,35,.22);
}

.article-like-button {
  margin: 0;
  padding: 4px 7px;
  border: 1px solid rgba(35,35,35,.28);
  background: #fff;
  color: #444;
  font: 12px/1.35 Georgia, "Times New Roman", serif;
  cursor: pointer;
}

.article-like-button:hover:not(:disabled) {
  border-color: rgba(35,35,35,.55);
  color: #111;
}

.article-like-heart {
  margin-right: 3px;
}

.article-like-count-wrap {
  color: #777;
}

.article-like-button.is-liked,
.article-like-button:disabled {
  background: #eee;
  color: #666;
  cursor: default;
}

/* ==============================
   ЧЕК-ЛИСТ
   ============================== */

.checklist-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -7px 0 25px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(35,35,35,.18);
}

.checklist-tabs a {
  position: relative;
  color: #666;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 14px;
  text-decoration: none;
}

.checklist-tabs a:hover,
.checklist-tabs a.active {
  color: #111;
}

.checklist-tabs a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: #555;
  transform: rotate(-.7deg);
}

.checklist-panel {
  display: none;
}

.checklist-panel.active {
  display: block;
}

.list-wrap {
  width: min(812px, calc(100vw - var(--sidebar-width) - 70px));
  overflow: hidden;
  background: rgba(255,255,255,.82);
  border-top: 1px solid rgba(35,35,35,.32);
  border-bottom: 1px solid rgba(35,35,35,.20);
}

.media-row,
.media-head {
  display: grid;
  grid-template-columns:
    minmax(0, 1.86fr)
    minmax(42px, .42fr)
    minmax(70px, .72fr)
    minmax(72px, .70fr)
    minmax(80px, .78fr);
  gap: 10px;
  align-items: baseline;
  width: 100%;
  min-width: 0;
  padding: 11px 10px;
}

.checklist-panel[data-panel="books"] .list-wrap {
  width: min(1020px, calc(100vw - var(--sidebar-width) - 70px));
}

.media-row-books,
.media-head-books {
  grid-template-columns:
    minmax(260px, 1.35fr)
    minmax(360px, 1.65fr)
    84px
    102px
    74px
    78px;
  column-gap: 18px;
  row-gap: 0;
  width: 100%;
  min-width: 0;
}

@media (min-width: 821px) {
  .media-row-books .media-status {
    white-space: nowrap;
  }
}

.media-head {
  padding-top: 9px;
  padding-bottom: 8px;
  color: #777;
  font-size: 10px;
  letter-spacing: .10em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(35,35,35,.18);
}

.media-row {
  border-bottom: 1px dashed rgba(35,35,35,.16);
}

.media-row:last-child {
  border-bottom: 0;
}

.media-title {
  font-size: 15px;
  line-height: 1.35;
}

.media-title-game {
  display: flex;
  align-items: center;
  gap: 9px;
}

.media-row-has-addons .media-title-game {
  gap: 16px;
}

.checklist-panel[data-panel="games"] .media-row {
  align-items: center;
}

.game-cover-wrap {
  flex: 0 0 44px;
  width: 44px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(35,35,35,.18);
  cursor: zoom-in;
}

.game-cover-wrap[hidden] {
  display: none;
}

.game-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.game-title-text,
.media-title-game .addon-group-toggle {
  min-width: 0;
}

.media-author {
  color: #444;
  font-size: 12px;
  line-height: 1.25;
}

.media-book-kind {
  color: #575757;
  font-size: 12px;
  line-height: 1.3;
}

.media-year,
.media-status,
.media-date {
  color: #575757;
  font-size: 12px;
  line-height: 1.3;
}

.media-rating {
  font-size: 13px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.checklist-panel[data-panel="games"],
.checklist-panel[data-panel="films"],
.checklist-panel[data-panel="books"] {
  position: relative;
}

.games-note {
  position: absolute;
  top: -19.5px;
  left: 2px;
  margin: 0;
  color: #777;
  font-size: 11px;
  line-height: 14px;
  font-style: italic;
  white-space: nowrap;
}

.book-type-filters {
  display: inline-flex;
  gap: 12px;
  margin-left: 12px;
  font-style: normal;
}

.book-type-filters label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.book-type-filters input {
  margin: 0;
  vertical-align: middle;
}

.media-row-addon .media-title {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
}

.media-row-addon .media-title::before {
  content: "↳";
  position: absolute;
  left: 7px;
  color: #999;
}

/* Сворачиваемые группы дополнений */
.addon-group-toggle {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.addon-toggle-marker {
  position: absolute;
  left: -10px;
  top: .08em;
  display: inline-block;
  width: 10px;
  color: #888;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform .15s ease;
}

.addon-group-toggle[aria-expanded="true"] .addon-toggle-marker {
  transform: rotate(90deg);
}

.addon-group-toggle:hover .addon-toggle-marker {
  color: #333;
}

.loading,
.list-error,
.empty-list {
  padding: 18px 10px;
  color: #777;
  font-size: 13px;
}

.list-error {
  color: #5a2d2d;
}

/* ==============================
   ВИШЛИСТ
   ============================== */

.wishlist-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 10px;
  border-bottom: 1px dashed rgba(35,35,35,.16);
}

.wishlist-row:last-child {
  border-bottom: 0;
}

.wishlist-title {
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
}

.wishlist-note {
  flex: 0 1 42%;
  color: #777;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.wishlist-row-addon .wishlist-title {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
}

.wishlist-row-addon .wishlist-title::before {
  content: "↳";
  position: absolute;
  left: 7px;
  color: #999;
}

.wishlist-row-addon[hidden] {
  display: none !important;
}

/* ==============================
   ГАЛЕРЕЯ
   ============================== */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  max-width: 680px;
}

.album-card {
  min-height: 120px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.22);
  box-shadow: 3px 4px 0 rgba(0,0,0,.025);
  cursor: pointer;
  font: inherit;
  transition: transform .15s ease, border-color .15s ease;
}

.album-card:hover {
  transform: translateY(-2px) rotate(-.2deg);
  border-color: rgba(35,35,35,.42);
}

.album-title {
  display: block;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 20px;
  line-height: 1.25;
}

.album-date {
  display: block;
  margin-top: 11px;
  color: #777;
  font-size: 11px;
  letter-spacing: .07em;
}

.album-toolbar {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.album-toolbar h2 {
  margin: 0;
}

.back-to-albums {
  padding: 0;
  color: #555;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(35,35,35,.32);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.album-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  width: 100%;
  margin: 0 0 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(35,35,35,.2);
  box-shadow: 4px 5px 0 rgba(0,0,0,.025);
}

.album-carousel-stage {
  position: relative;
  display: block;
  width: 100%;
  height: 430px;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background: rgba(245,245,245,.7);
  border: 0;
  cursor: zoom-in;
}

.album-carousel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.album-carousel-caption {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 4px 7px;
  color: #333;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.12);
  font-size: 11px;
  letter-spacing: .04em;
}

.album-carousel-nav,
.photo-lightbox-nav {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.album-carousel-nav span,
.photo-lightbox-nav span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 46px;
  background: rgba(35,35,35,.58);
  transform: translate(-50%, -50%);
  transition: height .15s ease, background .15s ease;
}

.album-carousel-nav:hover span {
  height: 64px;
  background: rgba(35,35,35,.9);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  width: 100%;
}

.photo-item {
  margin: 0;
  padding: 6px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(35,35,35,.18);
}

.photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
}

.photo-item img {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  filter: saturate(.88);
  transition: filter .15s ease, transform .15s ease;
}

.photo-thumb:hover img {
  filter: saturate(1);
  transform: scale(1.015);
}

.photo-item figcaption {
  padding: 7px 2px 2px;
  color: #666;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: .06em;
}

.photo-lightbox {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(38px, 1fr) auto minmax(38px, 1fr);
  align-items: center;
  justify-items: center;
  padding: 24px;
  background: rgba(20,20,20,.82);
  backdrop-filter: blur(2px);
}

.photo-lightbox.photo-lightbox-single {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 24px;
}

.photo-lightbox-single .photo-lightbox-frame {
  margin: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
}

.photo-lightbox-single .photo-lightbox-image {
  max-width: calc(100vw - 70px);
  max-height: calc(100vh - 104px);
}

.photo-lightbox-frame {
  position: relative;
  max-width: calc(100vw - 120px);
  max-height: calc(100vh - 48px);
  padding: 10px 10px 34px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 8px 36px rgba(0,0,0,.42);
}

.photo-lightbox-image {
  display: block;
  max-width: calc(100vw - 142px);
  max-height: calc(100vh - 104px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-lightbox-caption {
  position: absolute;
  left: 10px;
  right: 42px;
  bottom: 8px;
  overflow: hidden;
  color: #555;
  font-size: 11px;
  letter-spacing: .05em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.photo-lightbox-close {
  position: absolute;
  right: 7px;
  bottom: 3px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #444;
  background: none;
  border: 0;
  cursor: pointer;
  font: 24px/28px Georgia, serif;
}

.photo-lightbox-nav {
  width: 100%;
  height: min(70vh, 560px);
}

.photo-lightbox-nav span {
  height: 74px;
  background: rgba(255,255,255,.75);
}

.photo-lightbox-nav:hover span {
  height: 100px;
  background: #fff;
}

/* ==============================
   АЧИВКИ
   ============================== */

.achievement-grid {
  display: grid;
  gap: 14px;
  max-width: 860px;
}

.achievement-card {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 178px;
  padding: 16px 18px;
  background: rgba(255,255,255,.83);
  border: 1px solid rgba(35,35,35,.22);
  box-shadow: 4px 5px 0 rgba(0,0,0,.025);
  box-sizing: border-box;
}

.achievement-icon {
  width: 146px;
  height: 146px;
  padding: 8px;
  border: 1px solid rgba(35,35,35,.22);
  box-sizing: border-box;
  overflow: hidden;
}

.achievement-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.achievement-title {
  margin-bottom: 4px;
  font-weight: 700;
  line-height: 1.25;
}

.achievement-info p {
  margin: 0;
  color: #666;
  line-height: 1.45;
}

/* ==============================
   ССЫЛКИ
   ============================== */

.links-list {
  display: grid;
  gap: 14px;
  max-width: 680px;
}

.link-card {
  display: block;
  padding: 18px 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.22);
  box-shadow: 3px 4px 0 rgba(0,0,0,.025);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(35,35,35,.42);
}

.link-label {
  display: block;
  margin-bottom: 7px;
  color: #777;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.link-title {
  display: block;
  margin-bottom: 7px;
  font-size: 20px;
  line-height: 1.35;
}

.link-note {
  display: block;
  color: #666;
  font-size: 13px;
}

/* ==============================
   МОБИЛЬНАЯ ВЕРСИЯ
   ============================== */

@media (max-width: 820px) {
  body {
    background:
      linear-gradient(rgba(255,255,255,.86), rgba(255,255,255,.96)),
      var(--page-background-image) right top / auto 70vh no-repeat,
      #fff;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 26px 22px 18px;
    background: rgba(255,255,255,.88);
    border-right: 0;
    border-bottom: 1px solid rgba(30,30,30,.12);
  }

  .site-title {
    margin-bottom: 18px;
    font-size: 23px;
  }

  .menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 10px;
  }

  .menu a {
    font-size: 13px;
  }

  .sidebar-note {
    display: none;
  }

  .content {
    width: auto;
    margin-left: 0;
    padding: 34px 22px 80px;
  }

  .checklist-tabs {
    gap: 8px 15px;
  }

  .list-wrap {
    width: 100%;
    overflow: visible;
  }

  .media-head,
  .media-head-books {
    display: none;
  }

  .media-row,
  .media-row-books {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 14px;
    width: 100%;
    min-width: 0;
    padding: 14px 8px;
  }

  .media-row .media-title,
  .media-row-books .media-title {
    grid-column: 1 / -1;
    font-size: 16px;
  }

  .media-row-books .media-author,
  .media-row-books .media-book-kind {
    grid-column: 1 / -1;
  }

  .media-status {
    grid-column: 1;
  }

  .media-year,
  .media-rating,
  .media-date {
    text-align: right;
  }

  .wishlist-row {
    display: block;
    padding: 13px 8px;
  }

  .wishlist-note {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .long-article {
    padding: 18px 16px 22px;
  }

  .album-grid {
    grid-template-columns: 1fr 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .album-carousel-stage {
    height: 56vw;
    min-height: 250px;
    max-height: 430px;
  }

  .photo-item img {
    height: 150px;
  }

  .photo-lightbox {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    padding: 12px 6px;
  }

  .photo-lightbox.photo-lightbox-single {
    padding: 12px;
  }

  .photo-lightbox-single .photo-lightbox-frame {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .photo-lightbox-single .photo-lightbox-image {
    max-width: calc(100vw - 46px);
    max-height: calc(100vh - 80px);
  }

  .photo-lightbox-frame {
    max-width: calc(100vw - 76px);
    max-height: calc(100vh - 24px);
  }

  .photo-lightbox-image {
    max-width: calc(100vw - 98px);
    max-height: calc(100vh - 80px);
  }

  .achievement-card {
    grid-template-columns: 146px minmax(0, 1fr);
    gap: 14px;
    min-height: 174px;
    padding: 14px;
  }

  .achievement-icon {
    width: 146px;
    height: 146px;
    padding: 8px;
  }
}

@media (max-width: 520px) {
  .achievement-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-height: 140px;
    padding: 12px;
  }

  .achievement-icon {
    width: 112px;
    height: 112px;
    padding: 7px;
  }

  .album-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .photo-item img {
    height: 34vw;
    min-height: 120px;
    max-height: 170px;
  }

  .album-carousel {
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  .album-carousel-stage {
    min-height: 220px;
  }
}


/* Числовая оценка и сортировка игр */
.media-rating {
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}



/* Сортировка чек-листов прямо из заголовков таблицы */
.sort-head {
  padding: 0;
  margin: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-head:hover,
.sort-head.active {
  color: #222;
}

.sort-head.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}


/* Больше воздуха между годом и статусом у сериалов */
@media (min-width: 821px) {
  .checklist-panel[data-panel="series"] .media-row,
  .checklist-panel[data-panel="series"] .media-head {
    grid-template-columns:
      minmax(0, 1.66fr)
      minmax(86px, .62fr)
      minmax(104px, .82fr)
      minmax(74px, .62fr)
      minmax(80px, .72fr);
    gap: 14px;
  }
}


/* Название сайта: не даём первой строке ломаться и ужимаем её в сайдбар */
.site-title {
  max-width: 100%;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: .04em;
  white-space: nowrap;
}


/* ==============================
   КОЛЛЕКЦИИ
   ============================== */

.collection-panel {
  display: none;
}

.collection-panel.active {
  display: block;
}

.collection-panel[data-collection-panel="boardgames"] {
  position: relative;
}

@media (min-width: 821px) {
  .collection-panel[data-collection-panel="boardgames"] .list-wrap {
    width: min(802px, calc(100vw - var(--sidebar-width) - 70px));
  }
}


.media-title-boardgame {
  display: flex;
  align-items: center;
  gap: 9px;
}

.media-row-has-addons .media-title-boardgame {
  gap: 16px;
}

.boardgame-cover-wrap {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(35,35,35,.18);
  cursor: zoom-in;
}

.boardgame-cover-wrap[hidden] {
  display: none;
}

.boardgame-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.media-title-boardgame .addon-group-toggle {
  min-width: 0;
}

.collection-boardgames-row {
  align-items: center;
}

.collection-boardgames-head,
.collection-boardgames-row {
  grid-template-columns:
    minmax(0, 1fr)
    90px
    115px
    105px;
}

.collection-boardgames-head .sort-head {
  white-space: nowrap;
}

.collection-type,
.collection-publisher {
  color: #575757;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 820px) {
  .collection-boardgames-row .collection-type {
    grid-column: 1;
  }

  .collection-boardgames-row .collection-publisher {
    grid-column: 2;
    text-align: right;
  }

  .collection-boardgames-row .media-date {
    grid-column: 2;
  }

  .game-cover-wrap {
    flex-basis: 38px;
    width: 38px;
    height: 52px;
  }

  .boardgame-cover-wrap {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .addon-toggle-marker {
    left: -8px;
  }
}




/* ==============================
   ВИШЛИСТ — НАСТОЛКИ
   ============================== */

.wishlist-panel {
  position: relative;
}

@media (min-width: 821px) {
  .wishlist-panel[data-wishlist-panel="boardgames"] .list-wrap {
    width: min(690px, calc(100vw - var(--sidebar-width) - 70px));
  }
}

.wishlist-boardgames-row {
  align-items: center;
}

.wishlist-boardgames-head,
.wishlist-boardgames-row {
  grid-template-columns:
    minmax(0, 1fr)
    90px
    115px;
}

.wishlist-boardgames-head .sort-head {
  white-space: nowrap;
}

@media (max-width: 820px) {
  .wishlist-boardgames-row .collection-type {
    grid-column: 1;
  }

  .wishlist-boardgames-row .collection-publisher {
    grid-column: 2;
    text-align: right;
  }
}

/* Скрываем свёрнутые строки дополнений */
.media-row-addon[hidden] {
  display: none !important;
}


/* Творчество и Архив используют ту же карточную подачу, что и Статьи */
#poem-view,
#archive-text-view {
  max-width: 680px;
}


/* ==============================
   ПОЭЗИЯ
   ============================== */

.poetry-card-description {
  display: block;
  margin-top: 5px;
  color: #777;
  font-size: 12px;
  line-height: 1.45;
}

.poetry-page {
  padding: 28px 34px 38px;
}

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

.poetry-page .poetry-header h2 {
  margin-bottom: 5px;
}

.poetry-page .poetry-intro {
  margin: 0;
  color: #777;
  font-size: 13px;
  font-style: italic;
  text-align: left;
}

.poem-piece {
  max-width: 100%;
}

.poem-title {
  margin: 0 0 16px;
  color: #3a3a3a;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-align: center;
}

.poem-text {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.62;
  text-align: center;
  white-space: pre-line;
}

.poem-divider {
  margin: 30px 0;
  color: #aaa;
  font-size: 10px;
  letter-spacing: .28em;
  text-align: center;
}

@media (max-width: 620px) {
  .poetry-page {
    padding: 22px 18px 28px;
  }

  .poetry-header {
    margin-bottom: 30px;
  }

  .poem-text {
    width: 100%;
    font-size: 15px;
    overflow-wrap: anywhere;
  }
}

/* ==============================
   ОБЛОЖКИ АЛЬБОМОВ КАК МИНИАТЮРЫ
   ============================== */

.album-grid {
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 760px;
}

.album-card {
  display: block;
  min-height: 0;
  padding: 6px;
  overflow: hidden;
  text-align: center;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(35,35,35,.18);
  box-shadow: none;
}

.album-card:hover {
  transform: none;
  border-color: rgba(35,35,35,.36);
}

.album-folder-card {
  position: relative;
  isolation: isolate;
  min-height: 145px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: rgba(245,245,245,.9);
}

.album-folder-background {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.album-folder-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.10);
}

.album-folder-background img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(.95) brightness(.92);
  transform: scale(1.03);
}

.album-folder-title {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: .03em;
  overflow-wrap: anywhere;
}

.album-folder-card > .album-date {
  position: relative;
  z-index: 1;
}

.album-folder-photo-card .album-folder-title,
.album-folder-photo-card .album-date {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.85);
}

.album-cover {
  display: block;
  width: 100%;
  height: 145px;
  overflow: hidden;
  background: rgba(245,245,245,.85);
}

.album-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88);
  transition: filter .15s ease, transform .15s ease;
}

.album-card:hover .album-cover img {
  filter: saturate(1);
  transform: scale(1.015);
}

.album-cover-empty::after {
  content: "нет фото";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #999;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.album-caption {
  display: block;
  padding: 7px 2px 2px;
}

.album-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: .04em;
}

.album-date {
  margin-top: 4px;
}

@media (max-width: 820px) {
  .album-cover {
    height: 150px;
  }
}

@media (max-width: 520px) {
  .album-cover {
    height: auto;
    min-height: 190px;
  }

  .album-cover img {
    min-height: 190px;
  }
}

/* ==============================
   ПОИСК ПО САЙТУ
   ============================== */

.site-search-link {
  position: fixed;
  z-index: 4;
  top: 26px;
  right: 34px;
  display: inline-block;
  padding: 5px 2px 3px;
  color: #444;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 12px;
  letter-spacing: .10em;
  text-decoration: none;
  border-bottom: 1px solid rgba(35,35,35,.28);
  transition: color .15s ease, transform .15s ease, border-color .15s ease;
}

.site-search-link:hover {
  color: #000;
  border-color: rgba(35,35,35,.58);
  transform: rotate(-.5deg);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 680px;
  margin-bottom: 18px;
}

.search-input {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  color: var(--ink);
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(35,35,35,.28);
  outline: none;
  font: 16px/1.35 Georgia, "Times New Roman", serif;
}

.search-input:focus {
  border-color: rgba(35,35,35,.58);
  box-shadow: 0 0 0 1px rgba(35,35,35,.08);
}

.search-button {
  padding: 11px 18px 9px;
  color: #333;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.28);
  cursor: pointer;
  font-family: "Segoe Print", "Bradley Hand", cursive;
  font-size: 12px;
  letter-spacing: .06em;
}

.search-button:hover {
  border-color: rgba(35,35,35,.50);
}

.search-status {
  min-height: 22px;
  margin: 0 0 16px;
  color: #777;
  font-size: 12px;
  line-height: 1.5;
}

.search-results {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

.search-result {
  display: block;
  padding: 16px 19px 17px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.20);
  box-shadow: 3px 4px 0 rgba(0,0,0,.025);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

.search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(35,35,35,.40);
}

.search-result-section {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 10px;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.search-result-title {
  display: block;
  margin-bottom: 7px;
  font-size: 19px;
  line-height: 1.35;
}

.search-result-snippet {
  display: block;
  color: #5f5f5f;
  font-size: 13px;
  line-height: 1.55;
}

.search-result mark {
  padding: 0;
  color: #111;
  background: rgba(215,205,150,.46);
}

.search-empty {
  max-width: 680px;
  padding: 17px 19px;
  color: #666;
  background: rgba(255,255,255,.72);
  border-left: 2px solid rgba(40,40,40,.25);
}

@media (max-width: 820px) {
  .site-search-link {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .search-form {
    grid-template-columns: 1fr;
  }

  .search-button {
    justify-self: start;
  }
}


/* ==============================
   ГОСТЕВАЯ
   ============================== */

.guestbook-frame-wrap {
  position: relative;
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(35,35,35,.20);
  box-shadow: 3px 4px 0 rgba(0,0,0,.025);
}


.guestbook-label {
  position: absolute;
  left: 27px;
  z-index: 2;
  padding: 0 5px 0 0;
  background: #eeeeee;
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
}

.guestbook-label-name {
  top: 39px;
}

.guestbook-label-message {
  top: 90px;
}

.guestbook-frame {
  display: block;
  width: 100%;
  height: 945px;
  margin-top: -125px;
  border: 0;
  background: #fff;
}

.guestbook-external {
  max-width: 680px;
  margin: 12px 0 0;
  color: #777;
  font-size: 12px;
}

.guestbook-external a {
  text-underline-offset: 3px;
}

@media (max-width: 820px) {
  .guestbook-frame {
    height: 885px;
  }
}

/* Статистика отдельных фотографий */
.album-photo-viewer .article-views {
  margin-bottom: 10px;
}

.album-photo-viewer .album-carousel {
  margin-bottom: 0;
}

.album-photo-viewer .article-like-box {
  margin-top: 10px;
  margin-bottom: 22px;
}

/* Фильмы: больше места режиссёру, компактнее дата */
@media (min-width: 821px) {
  .checklist-panel[data-panel="films"] .media-head,
  .checklist-panel[data-panel="films"] .media-row {
    grid-template-columns:
      minmax(0, 1.72fr)
      54px
      minmax(205px, 1.18fr)
      72px
      78px;
    column-gap: 14px;
  }
}
