.udg-shell {
  --udg-bg: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  --udg-card-bg: rgba(255, 255, 255, 0.94);
  --udg-border: rgba(15, 23, 42, 0.08);
  --udg-text: #0f172a;
  --udg-muted: #475569;
  --udg-accent: #0f766e;
  --udg-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
  background: var(--udg-bg);
  color: var(--udg-text);
  padding: 40px 0 72px;
}

.udg-comics-shell {
  --udg-bg: #0c0f13;
  --udg-text: #fff;
  --udg-muted: rgba(255, 255, 255, 0.72);
  --udg-accent: #fff;
  background: #0c0f13;
  color: #fff;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 0 72px;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.udg-comics-shell ._cvb-container {
  width: min(1480px, calc(100% - 80px));
  max-width: none;
  margin: 0 auto;
}

.udg-comics-shell ._qsd-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.udg-comics-shell .cvb-page {
  padding: 32px 0 28px;
}

.udg-comics-shell .cvb-section-top {
  display: flex;
  justify-content: space-between;
  column-gap: 48px;
  max-width: 1480px;
  margin: 0 auto;
  align-items: stretch;
}

.udg-comics-shell .cvb__left {
  flex-shrink: 0;
  width: 100%;
  max-width: 760px;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #11161d;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  display: grid;
  place-items: center;
}

.udg-comics-shell .cvb__left img,
.udg-comics-shell .cvb__left .udg-cover-placeholder {
  width: 100%;
  height: auto;
  object-fit: initial;
  display: block;
}

.udg-comics-shell .cvb__right {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

.udg-comics-shell .cvb-info {
  width: 100%;
  margin: 0 45px;
  position: relative;
}

.udg-comics-shell .cvb-info__name {
  max-width: 44rem;
}

.udg-comics-shell .cvb__title {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.udg-comics-shell .cvb__date {
  margin-top: 14px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.58);
}

.udg-comics-shell .cvb-info__description {
  margin-top: 32px;
  max-width: 42rem;
  font-size: 18px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.78);
}

.udg-comics-shell .cvb-info__description p {
  margin: 0;
}

.udg-comics-shell .cvb-buttons,
.udg-comics-shell .mpx-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.udg-comics-shell .cvb-buttons {
  margin-top: 36px;
}

.udg-comics-shell .mpx-controls {
  margin-top: 24px;
  position: relative;
  justify-content: center;
}

.udg-comics-shell .mpx-btn,
.udg-comics-shell .mpx-btn-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 185px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: #0c0f13;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.udg-comics-shell .mpx-btn:hover,
.udg-comics-shell .mpx-btn-tab:hover,
.udg-comics-shell .mpx-btn-tab.is-active {
  background: #151b23;
  border-color: rgba(255, 255, 255, 0.56);
  transform: translateY(-1px);
}

.udg-comics-shell .mpx-btn_short {
  min-width: 64px;
  padding: 0 14px;
}

.udg-comics-shell .mpx-btn_ghost {
  min-width: 108px;
}

.udg-comics-shell .comics-backbutton {
  position: absolute;
  top: 12px;
  left: -52px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: #0c0f13;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.udg-comics-shell .comics-backbutton::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-35%, -50%) rotate(45deg);
}

.udg-comics-shell .comics-backbutton:hover {
  background: #151b23;
  border-color: rgba(255, 255, 255, 0.56);
  transform: translateY(-1px);
}

.udg-comics-shell .qsd-page {
  padding: 20px 0 0;
}

.udg-comics-shell .qsd-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 24px;
}

.udg-comics-shell .comics-item {
  width: 340px;
  flex: 0 0 340px;
  max-width: 340px;
}

.udg-comics-shell .comics-item a,
.udg-comics-shell .comics-item .udg-card-placeholder {
  display: block;
  width: 100%;
}

.udg-comics-shell .comics-item a {
  background: #161d26;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.udg-comics-shell .comics-item img,
.udg-comics-shell .comics-item .udg-card-placeholder {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.udg-comics-shell .comics-item img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto !important;
  vertical-align: top;
  object-fit: initial !important;
  border-radius: 0;
  background: transparent;
}

.udg-comics-shell .comics-item .udg-card-placeholder {
  border-radius: 0;
  background: #161d26;
}

.udg-comics-shell .comics-item a:hover img,
.udg-comics-shell .comics-item a:hover .udg-card-placeholder {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.udg-comics-shell .comics-item.is-current img,
.udg-comics-shell .comics-item.is-current .udg-card-placeholder {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), 0 20px 48px rgba(0, 0, 0, 0.34);
}

.udg-comics-shell .comics-item[hidden] {
  display: none !important;
}

.udg-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.udg-header,
.udg-section-header {
  margin-bottom: 24px;
}

.udg-listing-title,
.udg-section-header h2,
.udg-document-title {
  margin: 0;
  line-height: 1.08;
}

.udg-intro,
.udg-section-header p,
.udg-document-content,
.udg-card-excerpt,
.udg-card-date,
.udg-document-date {
  color: var(--udg-muted);
}

.udg-section-group + .udg-section-group,
.udg-related-documents {
  margin-top: 48px;
}

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

.udg-card,
.udg-hero-card {
  background: var(--udg-card-bg);
  border: 1px solid var(--udg-border);
  border-radius: 24px;
  box-shadow: var(--udg-shadow);
  overflow: hidden;
}

.udg-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.udg-card:hover {
  transform: translateY(-4px);
}

.udg-card-cover {
  aspect-ratio: 4 / 5;
  display: block;
  background: #e2e8f0;
}

.udg-card-image,
.udg-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.udg-card-body {
  padding: 20px;
}

.udg-card-tax,
.udg-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--udg-accent);
}

.udg-card-title {
  margin: 6px 0 10px;
  font-size: 22px;
  line-height: 1.18;
}

.udg-card-title a,
.udg-card-cover,
.udg-version-button,
.udg-chip {
  text-decoration: none;
}

.udg-card-versions,
.udg-version-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.udg-chip,
.udg-version-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  color: var(--udg-accent);
  background: rgba(15, 118, 110, 0.08);
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.udg-chip:hover,
.udg-version-button:hover {
  background: rgba(15, 118, 110, 0.14);
  transform: translateY(-1px);
}

.udg-version-button span {
  color: var(--udg-muted);
  font-weight: 500;
}

.udg-modal-open {
  overflow: hidden;
}

.udg-pdf-modal[hidden] {
  display: none !important;
}

.udg-pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.udg-pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.udg-pdf-modal__dialog {
  position: relative;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.udg-pdf-modal__header {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 72px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 0;
}

.udg-pdf-modal__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--udg-accent);
}

.udg-pdf-modal__title {
  margin: 0;
  font-size: 22px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(15, 23, 42, 0.35);
}

.udg-pdf-modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.udg-pdf-modal__counter {
  min-width: 180px;
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #fff;
}

.udg-pdf-modal__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.udg-pdf-modal__nav--prev {
  left: 16px;
}

.udg-pdf-modal__nav--next {
  right: 16px;
}

.udg-pdf-modal__nav[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.udg-pdf-modal__nav:not([disabled]):hover {
  background: #111827;
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.42);
}

.udg-pdf-modal__download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}

.udg-pdf-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.udg-pdf-modal__viewport {
  height: 100%;
  background: transparent;
  padding: 0;
}

.udg-pdf-modal__stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #dbe4ef;
}

.udg-pageflip-host {
  width: 100%;
  height: 100%;
  padding: 88px 20px 0;
  background: transparent;
  box-sizing: border-box;
  display: grid;
  place-items: center;
}

.udg-pageflip {
  width: var(--udg-flip-width, 100%);
  height: var(--udg-flip-height, 100%);
  max-width: 100%;
  max-height: 100%;
  background: transparent;
}

.udg-pdf-modal__stage.is-book-mode .stf__parent {
  filter: drop-shadow(0 24px 40px rgba(15, 23, 42, 0.24));
}

.udg-pdf-modal__stage .stf__parent,
.udg-pdf-modal__stage .stf__wrapper,
.udg-pdf-modal__stage .stf__block,
.udg-pdf-modal__stage .stf__item,
.udg-pdf-modal__stage .stf__item-inner,
.udg-pdf-modal__stage .stf__page {
  background: transparent !important;
}

.udg-pdf-modal__stage .stf__parent canvas {
  border-radius: 2px;
}

.udg-pdf-modal__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  font-weight: 700;
  text-align: center;
  background: rgba(15, 23, 42, 0.14);
}

.udg-hero-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 32px;
  padding: 32px;
}

.udg-cover-frame {
  border-radius: 20px;
  overflow: hidden;
  background: #dbe4ef;
  aspect-ratio: 4 / 5;
}

.udg-cover-placeholder,
.udg-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 280px;
  color: var(--udg-muted);
  font-weight: 600;
}

.udg-document-content > *:first-child {
  margin-top: 0;
}

.udg-document-content > *:last-child {
  margin-bottom: 0;
}

.is-animation-fade {
  animation: udgFadeIn 0.45s ease both;
}

.is-animation-lift:hover {
  transform: translateY(-8px);
}

.udg-pdf-modal__dialog.is-animation-lift {
  animation: udgLiftIn 0.28s ease both;
}

.is-animation-flip .udg-card-cover,
.is-animation-flip .udg-cover-frame {
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.is-animation-flip:hover .udg-card-cover,
.is-animation-flip:hover .udg-cover-frame {
  transform: perspective(1200px) rotateY(-10deg);
}

.udg-pdf-modal__dialog.is-animation-flip {
  animation: udgFlipIn 0.32s ease both;
  transform-origin: center center;
}

@keyframes udgFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes udgLiftIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes udgFlipIn {
  from {
    opacity: 0;
    transform: perspective(1200px) rotateX(-10deg) scale(0.98);
  }

  to {
    opacity: 1;
    transform: perspective(1200px) rotateX(0) scale(1);
  }
}

@media (max-width: 991px) {
  .udg-comics-shell .cvb-section-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: none;
  }

  .udg-comics-shell .cvb__left {
    aspect-ratio: 4 / 5;
    max-width: none;
  }

  .udg-comics-shell .cvb-info {
    margin: 0;
  }

  .udg-comics-shell .comics-backbutton {
    left: 0;
    top: -56px;
  }

  .udg-comics-shell .qsd-grid {
    justify-content: center;
  }

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

  .udg-hero-grid {
    grid-template-columns: 1fr;
  }

  .udg-pdf-modal__dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .udg-pdf-modal__header {
    top: 12px;
    left: 12px;
    right: 64px;
  }
}

@media (max-width: 640px) {
  .udg-comics-shell {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: 48px;
  }

  .udg-comics-shell ._cvb-container {
    width: calc(100% - 24px);
  }

  .udg-comics-shell ._qsd-container {
    width: 100%;
  }

  .udg-comics-shell .cvb-page {
    padding: 20px 0 20px;
  }

  .udg-comics-shell .cvb-info__description {
    margin-top: 24px;
  }

  .udg-comics-shell .cvb__title {
    font-size: 32px;
  }

  .udg-comics-shell .cvb__date,
  .udg-comics-shell .cvb-info__description {
    font-size: 16px;
  }

  .udg-comics-shell .mpx-btn,
  .udg-comics-shell .mpx-btn-tab {
    width: 100%;
    min-width: 0;
  }

  .udg-comics-shell .mpx-btn_short {
    width: auto;
    min-width: 64px;
  }

  .udg-comics-shell .comics-backbutton {
    top: -52px;
  }

  .udg-comics-shell .qsd-grid {
    gap: 14px;
    justify-content: center;
  }

  .udg-comics-shell .comics-item {
    width: calc(50% - 7px);
    flex-basis: calc(50% - 7px);
    max-width: none;
  }

  .udg-shell {
    padding: 24px 0 48px;
  }

  .udg-container {
    width: min(100%, calc(100% - 16px));
  }

  .udg-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .udg-card-body,
  .udg-hero-grid {
    padding: 16px;
  }

  .udg-card-title {
    font-size: 20px;
  }

  .udg-pdf-modal__header {
    grid-template-columns: 1fr;
  }

  .udg-pdf-modal__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .udg-pdf-modal__nav--prev {
    left: 10px;
  }

  .udg-pdf-modal__nav--next {
    right: 10px;
  }

  .udg-pdf-modal__nav {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .udg-pdf-modal__title {
    font-size: 18px;
  }

  .udg-pageflip-host {
    padding: 124px 10px 0;
  }
}

.udg-comics-shell .comics-item img,
.udg-comics-shell .comics-item .udg-card-placeholder {
  aspect-ratio: auto !important;
}
