:root {
  color-scheme: dark;
  --bg: #001226;
  --panel: #0d263a;
  --line: #29445a;
  --muted: #a7bbcf;
  --text: #eff6ff;
  --mint: #24d0ae;
}

.guided-public-page {
  background: radial-gradient(ellipse 850px 470px at 50% 55px, #0d3047, transparent), var(--bg);
  color: var(--text);
}

.guided-page { padding-block: clamp(24px, 4vw, 58px) clamp(56px, 6vw, 92px); }
.guided-library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px 24px;
  margin-bottom: 24px;
}
.guided-library-heading h1 { font-size: clamp(32px, 4vw, 58px); line-height: 1.1; }
.guided-library-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; }

.guided-status {
  margin: 14px 0;
  color: var(--muted);
}
.guided-status:empty { display: none; }
.guided-status[data-kind=error] { color: #ffc6cb; }
.guided-status a { text-decoration: underline; }

.guided-panel .guided-grid {
  --template-columns: 4;
  --guided-gap: clamp(10px, 1.5vw, 24px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--template-columns), minmax(0, 1fr));
  gap: var(--guided-gap);
}
.guided-panel .guided-grid[data-masonry] { display: block; }
.guided-panel .guided-grid[hidden] { display: none; }
#guidedMoreSkeleton { margin-top: var(--guided-gap); }
.guided-grid[data-masonry] .guided-library-entry {
  position: absolute;
  width: calc((100% - (var(--template-columns) - 1) * var(--guided-gap)) / var(--template-columns));
}
.guided-library-entry { display: flex; flex-direction: column; min-width: 0; }
.guided-card {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}
a.guided-card:hover, a.guided-card:focus-visible { border-color: var(--mint); }
.feature-card.guided-card {
  padding: 0;
  align-items: stretch;
  border-radius: 10px;
}
a.feature-card.guided-card:hover .guided-card__title { color: #48deaa; }
.feature-card.guided-card :is(.feature-card__author, .feature-card__rating) {
  top: 10px;
  background: #071b2ee0;
  letter-spacing: normal;
}
.feature-card.guided-card .feature-card__author { left: 10px; max-width: calc(100% - 65px); padding: 3px 8px; }
.feature-card.guided-card .feature-card__rating { right: 10px; }
.feature-card.guided-card .feature-card__rating.is-liked { background: #0b3b37e6; }
.feature-card.guided-card .feature-card__rating.is-interactive:is(:hover, :focus-visible) { background: #1d3a52f0; }
.guided-card__title {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, #001126ed);
  overflow-wrap: anywhere;
  font-size: clamp(14px, 1.2vw, 19px);
  line-height: 1.25;
}
.guided-card__cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto 4 / 3;
  background: #122e44;
}
.guided-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: clamp(10px, 1.3vw, 20px);
  overflow-wrap: anywhere;
}
.guided-muted { color: var(--muted); }
.guided-card--skeleton .guided-card__content { padding-bottom: 24px; }
.guided-sentinel { height: 1px; }
.guided-catalog-return, .guided-load-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.guided-load-more { cursor: pointer; margin: 20px auto 0; }
.guided-load-more[hidden] { display: none; }

.guided-wizard-frame {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(18px, 3vw, 42px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.guided-wizard { margin-top: 18px; }
.guided-wizard h2 { font-size: 26px; }
.guided-question { padding: 18px 0; border: 0; border-top: 1px solid var(--line); }
.guided-question label { display: block; font-weight: 650; margin-bottom: 8px; }
.guided-question p { color: var(--muted); margin: 4px 0 12px; }
.guided-question input:not([type=radio], [type=checkbox]),
.guided-question textarea, .guided-question select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #06192b;
  color: var(--text);
}
.guided-question .guided-choice { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.guided-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.guided-actions :is(button, a) {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px;
  background: #102d43;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.guided-actions .primary { background: var(--mint); border-color: var(--mint); color: #00251f; font-weight: 750; }
.guided-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #06192b;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 18px 0;
}
.guided-progress { color: var(--mint); font-size: 14px; }

@media (max-width: 1100px) {
  .guided-panel .guided-grid { --template-columns: 3; }
}
@media (max-width: 700px) {
  .guided-panel .guided-grid { --template-columns: 2; }
  .guided-library-heading { gap: 16px; margin-bottom: 16px; }
}

.home-image-lightbox--template .home-image-lightbox__empty,
.home-image-lightbox--template .home-image-lightbox__rating[hidden] { display: none; }
/* Like the «Воссоздать» row of a work: one action per row, the complaint under it. */
.guided-preview-actions { display: grid; gap: 8px; }
.guided-preview-actions .guided-preview-actions__use { width: 100%; box-sizing: border-box; text-decoration: none; }
.guided-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  justify-self: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.guided-report-link svg { width: 16px; height: 16px; flex: 0 0 16px; }
.guided-report-link:hover, .guided-report-link:focus-visible { color: var(--text); background: #a8b3c21f; outline: none; }
.guided-report-link:focus-visible { box-shadow: 0 0 0 2px #ffffff59; }

.guided-section-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.guided-section-filter[hidden] {
  display: none;
}

.guided-section-filter select,
.work-template-drafts__form select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.guided-section-filter select:focus-visible,
.work-template-drafts__form select:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.work-template-drafts-page {
  background: radial-gradient(circle at 72% 18%, rgba(26, 111, 102, 0.2), transparent 34%), #001126;
  font-family: Mulish, system-ui, sans-serif;
}

.work-template-drafts {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.work-template-drafts__hero {
  max-width: 760px;
  margin-bottom: 22px;
}

.work-template-drafts h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.work-template-drafts h2 { margin: 0 0 14px; font-size: 20px; }
.work-template-drafts h3 { margin-bottom: 8px; font-size: 15px; }
.work-template-drafts__lead { margin: 12px 0 0; font-size: 16px; overflow-wrap: anywhere; }

.work-template-drafts__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.work-template-drafts__nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid #355773;
  border-radius: 12px;
  background: #112d43;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  color: #eef7fb;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.work-template-drafts__nav-button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.work-template-drafts__nav-button:hover {
  border-color: var(--mint);
  background: #173a52;
}

.work-template-drafts__layout--editing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: 28px;
  align-items: start;
}

.work-template-drafts__form {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #355773;
  border-radius: 18px;
  background: #112d43;
}

.work-template-drafts__item-icon,
.work-template-drafts__empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(72, 222, 170, 0.13) url("/static/front-home/assets/img/collections_bookmark.webp") center / 24px no-repeat;
}

.work-template-drafts__form :is(select, textarea, input:not([type="checkbox"])) {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-color: #42637d;
  border-radius: 12px;
  background: #071c2f;
  color: var(--text);
  border: 1px solid #42637d;
}

.work-template-drafts__privacy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.work-template-drafts__publication-fields { display: grid; gap: 8px; padding: 12px 0; }

.work-template-drafts__submit {
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
}

.work-template-drafts__details {
  overflow: hidden;
  border: 1px solid #355773;
  border-radius: 14px;
  background: #071c2f;
}

.work-template-drafts__details summary {
  padding: 14px 16px;
  background: #102d43;
  font-weight: 700;
  cursor: pointer;
}

.work-template-drafts__details summary::marker { color: var(--mint); }
.work-template-drafts__details summary:hover { background: #173a52; }
.work-template-drafts__details > :not(summary) { margin-inline: 16px; }
.work-template-drafts__details .guided-preview { margin-top: 0; }

.work-template-drafts__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-template-drafts__list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid #355773;
  border-radius: 18px;
  background: linear-gradient(145deg, #12334b, #0a263b);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  color: var(--text);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.work-template-drafts__list a:hover {
  border-color: var(--mint);
  transform: translateY(-1px);
}

.work-template-drafts__item-copy { min-width: 0; }
.work-template-drafts__item-copy strong { display: block; line-height: 1.35; }
.work-template-drafts__list small { display: block; margin-top: 5px; color: var(--muted); }
.work-template-drafts__open {
  flex-shrink: 0;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--mint);
  color: #00251f;
  font-size: 14px;
  font-weight: 800;
}

.work-template-drafts__empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 240px;
  padding: 42px 20px;
  border-radius: 18px;
  background: #0a263b;
  place-content: center;
  text-align: center;
}

.work-template-drafts__empty :is(h2, p) { margin: 0; }
.work-template-drafts__empty p { max-width: 580px; }
.work-template-drafts__empty-icon { width: 64px; height: 64px; border-radius: 18px; background-size: 30px; }

.work-template-drafts :is(a, summary, button, select):focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.work-template-draft-settings {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: 6px 18px;
  overflow-wrap: anywhere;
}

.work-template-draft-settings dt { color: var(--muted); }
.work-template-draft-settings dd { margin: 0; }

.work-template-draft-results {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  margin: 0 0 18px;
}

.work-template-draft-results img,
.work-template-draft-results video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 16px;
  background: #03182a;
}

@media (max-width: 1056px) {
  .work-template-drafts-page .header__actions { gap: 8px; }
  .work-template-drafts-page .site-support-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #112d43;
  }
  .work-template-drafts-page .site-support-nav span,
  .work-template-drafts-page .site-support-float { display: none; }
}

@media (max-width: 720px) {
  .work-template-drafts { width: min(100% - 28px, 1160px); padding: 24px 0 42px; }
  .work-template-drafts__hero { margin-bottom: 18px; }
  .work-template-drafts__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .work-template-drafts__nav-button { padding-inline: 12px; }
  .work-template-drafts__layout--editing { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .work-template-drafts__form { position: static; padding: 16px; }
  .work-template-drafts__list { grid-template-columns: 1fr; }
  .work-template-drafts__list a { grid-template-columns: auto minmax(0, 1fr); }
  .work-template-drafts__open { grid-column: 1 / -1; text-align: center; }
  .work-template-draft-settings { grid-template-columns: 1fr; }
  .work-template-draft-settings dd { margin-bottom: 6px; }
}
