.project-deck {
  position: relative;
  outline-offset: 8px;
}
.deck-stage {
  position: relative;
  min-height: 550px;
  perspective: 1500px;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.series-card {
  border: 1px solid #3d526f;
  border-radius: 14px;
  overflow: hidden;
  background: #09111d;
  min-width: 0;
}
.deck-card {
  position: absolute;
  top: 12px;
  left: 6%;
  width: 88%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(0) scale(0.84);
  transform-origin: 50% 50%;
  transition:
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease,
    visibility 0.65s;
  backface-visibility: hidden;
}
.deck-card.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1) rotateY(0);
  pointer-events: auto;
  z-index: 3;
  border-color: #52779c;
}
.deck-card.is-prev {
  opacity: 0.35;
  visibility: visible;
  transform: translateX(-94%) scale(0.88) rotateY(13deg);
  z-index: 1;
}
.deck-card.is-next {
  opacity: 0.35;
  visibility: visible;
  transform: translateX(94%) scale(0.88) rotateY(-13deg);
  z-index: 1;
}
.series-poster {
  min-height: 328px;
  background: linear-gradient(
    145deg,
    #1b2a40 0%,
    #0d1727 39%,
    #08111e 64%,
    #142940 100%
  );
  position: relative;
  padding: 24px 32px 19px;
  isolation: isolate;
  overflow: hidden;
}
.series-poster:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    transparent 55%,
    #8eb1d109 55.1%,
    #c1dbf312 55.2%,
    transparent 72%
  );
}
.series-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: #b6c8e0;
  font-size: 11px;
  letter-spacing: 0.025em;
}
.series-brand {
  color: #f3f7ff;
  font-size: 15px;
  letter-spacing: -0.035em;
  font-weight: 650;
}
.series-brand > span {
  color: #7bb7ff;
}
.series-top > span:last-child {
  font-variant-numeric: tabular-nums;
  color: #b3c6df;
}
.series-main {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 20px;
  min-height: 227px;
}
.series-title {
  min-width: 0;
}
.series-title > p {
  color: #a9c6eb;
  font-size: 12px;
  margin: 0 0 14px;
}
.series-title h2,
.series-title h3 {
  font-size: clamp(32px, 4vw, 57px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 550;
  color: #f4f8ff;
  margin: 0;
  overflow-wrap: anywhere;
}
.series-title > span {
  display: block;
  margin-top: 15px;
  font-size: 13px;
  color: #b6c9df;
}
.series-visual {
  position: relative;
  height: 222px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.series-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 145px;
  height: 145px;
  background: linear-gradient(145deg, #253e5d, #081525 73%);
  border: 1px solid #6289b4;
  border-radius: 25px;
  transform: rotate(-6deg);
  color: #9dcfff;
  box-shadow: 9px 14px 25px #0005;
}
.series-icon svg {
  width: 103px;
  height: 103px;
  transform: rotate(6deg);
}
.series-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid #426489;
  border-radius: 50%;
  width: 210px;
  height: 210px;
  transform: translate(-50%, -50%);
  z-index: -1;
}
.orbit-two {
  width: 248px;
  height: 116px;
  border-color: #6b9ac34f;
  transform: translate(-50%, -50%) rotate(-28deg);
}
.node {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #79baff;
  border: 1px solid #b9dfff;
  border-radius: 50%;
}
.node-a {
  top: 20px;
  left: 50%;
}
.node-b {
  bottom: 26px;
  left: 25%;
}
.node-c {
  right: 13%;
  top: 50%;
}
.series-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid #91abc333;
  padding-top: 15px;
  color: #aabed7;
  font-size: 11px;
}
.series-bottom > span:last-child {
  color: #b3d5fc;
}
.series-details {
  padding: 22px 32px 23px;
}
.series-details > p {
  color: #b7c6db;
  font-size: 14px;
  line-height: 1.85;
  max-width: 76ch;
  margin: 0;
}
.series-detail-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
}
.series-detail-bottom .tags {
  margin: 0;
}
.series-detail-bottom > a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  white-space: nowrap;
  min-height: 44px;
  color: #e1edff;
}
.series-detail-bottom > a svg {
  width: 17px;
  height: 17px;
}
.deck-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  padding-inline: 6%;
}
.deck-hint {
  font-size: 13px;
  color: #aabed7;
  margin: 0;
}
.deck-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}
.deck-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid #4a6586;
  border-radius: 50%;
  color: #e0edff;
  background: #0b1524;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deck-controls button:hover {
  background: #182d46;
  border-color: #81b9f5;
}
.deck-controls button:active {
  background: #254365;
}
.deck-count {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.deck-count > span {
  color: #9aacc4;
  font-size: 12px;
  margin-left: 3px;
}
.deck-switches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 6% 0;
}
.deck-switches button {
  min-height: 44px;
  background: #080e17;
  border: 1px solid #30435e;
  color: #b3c4db;
  border-radius: 6px;
  font-size: 12px;
  padding: 9px 13px;
}
.deck-switches button[aria-pressed="true"] {
  border-color: #589bdf;
  background: #142b46;
  color: #e5f2ff;
}
.deck-switches button:hover {
  border-color: #70a9e0;
}
.series-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.gallery-card .series-poster {
  padding: 22px;
  min-height: 286px;
}
.gallery-card .series-main {
  grid-template-columns: 1.2fr 1fr;
  min-height: 192px;
  gap: 10px;
}
.gallery-card .series-title h2 {
  font-size: 34px;
}
.gallery-card .series-title > p {
  font-size: 11px;
}
.gallery-card .series-title > span {
  font-size: 12px;
}
.gallery-card .series-visual {
  height: 190px;
  transform: scale(0.82);
}
.gallery-card .series-details {
  padding: 21px 22px;
}
.gallery-card .series-details > p {
  font-size: 13px;
}
.gallery-card .series-detail-bottom {
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}
.gallery-card .series-detail-bottom .tags {
  gap: 6px;
}
.gallery-card .tags li {
  font-size: 11px;
}
.deck-card.is-active .series-title {
  animation: case-enter 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.deck-card.is-active .series-icon {
  animation: icon-enter 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes case-enter {
  from {
    opacity: 0.4;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes icon-enter {
  from {
    opacity: 0.5;
    transform: rotate(-10deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
  }
}
@media (max-width: 1100px) {
  .deck-stage {
    min-height: 560px;
  }
  .series-poster {
    padding-inline: 25px;
  }
  .series-title h3 {
    font-size: 44px;
  }
  .series-main {
    grid-template-columns: 1.2fr 1fr;
  }
  .series-details {
    padding-inline: 25px;
  }
  .series-visual {
    transform: scale(0.9);
  }
  .gallery-card .series-main {
    grid-template-columns: 1fr;
  }
  .gallery-card .series-visual {
    display: none;
  }
  .gallery-card .series-title h2 {
    font-size: 36px;
  }
  .gallery-card .series-poster {
    min-height: 280px;
  }
  .gallery-card .series-main {
    min-height: 190px;
  }
  .series-top {
    font-size: 11px;
  }
  .series-detail-bottom {
    gap: 12px;
  }
  .series-detail-bottom .tags {
    gap: 5px;
  }
  .series-detail-bottom .tags li {
    padding: 4px 7px;
  }
}
@media (max-width: 800px) {
  .deck-stage {
    min-height: 590px;
  }
  .deck-card {
    left: 4%;
    width: 92%;
  }
  .series-main {
    grid-template-columns: 1.1fr 1fr;
  }
  .series-title h3 {
    font-size: 38px;
  }
  .series-visual {
    transform: scale(0.75);
    margin-inline: -20px;
  }
  .series-details > p {
    font-size: 13px;
  }
  .series-detail-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .series-gallery {
    gap: 20px;
  }
  .gallery-card .series-poster {
    padding: 19px;
    min-height: 285px;
  }
  .gallery-card .series-title h2 {
    font-size: 31px;
  }
  .gallery-card .series-title > span {
    font-size: 12px;
  }
  .gallery-card .series-details {
    padding: 19px;
  }
  .deck-toolbar {
    padding-inline: 4%;
  }
  .deck-hint {
    max-width: 23ch;
    font-size: 12px;
  }
  .deck-switches {
    margin-inline: 4%;
  }
}
@media (max-width: 600px) {
  .deck-stage {
    min-height: 650px;
    margin-inline: -12px;
  }
  .deck-card {
    left: 17px;
    width: calc(100% - 34px);
    top: 4px;
  }
  .deck-card.is-prev {
    transform: translateX(-96%) scale(0.92) rotateY(8deg);
  }
  .deck-card.is-next {
    transform: translateX(96%) scale(0.92) rotateY(-8deg);
  }
  .series-poster {
    padding: 18px 20px 16px;
    min-height: 345px;
  }
  .series-top {
    font-size: 10px;
    gap: 10px;
  }
  .series-brand {
    font-size: 13px;
  }
  .series-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 270px;
    gap: 10px;
    position: relative;
    padding-top: 28px;
  }
  .series-title {
    position: relative;
    z-index: 1;
    max-width: 100%;
  }
  .series-title > p {
    font-size: 11px;
    margin-bottom: 10px;
  }
  .series-title h3 {
    font-size: 35px;
    line-height: 1.1;
  }
  .series-title > span {
    font-size: 12px;
    margin-top: 10px;
    max-width: 29ch;
  }
  .series-visual {
    height: 125px;
    align-self: flex-end;
    width: 155px;
    transform: scale(0.61);
    transform-origin: 100% 50%;
    margin: 0 0 -5px;
    position: relative;
  }
  .series-orbit {
    width: 180px;
    height: 180px;
  }
  .orbit-two {
    width: 215px;
    height: 107px;
  }
  .series-icon {
    width: 135px;
    height: 135px;
  }
  .series-bottom {
    font-size: 10px;
    padding-top: 13px;
  }
  .series-bottom > span:first-child {
    max-width: 24ch;
  }
  .series-details {
    padding: 20px;
  }
  .series-details > p {
    font-size: 13px;
    line-height: 1.85;
  }
  .series-detail-bottom {
    margin-top: 15px;
    gap: 12px;
  }
  .series-detail-bottom .tags {
    gap: 5px;
  }
  .series-detail-bottom .tags li {
    font-size: 11px;
    padding: 3px 6px;
  }
  .series-detail-bottom > a {
    font-size: 12px;
    min-height: 34px;
  }
  .deck-toolbar {
    margin-top: 2px;
    padding-inline: 5px;
    gap: 14px;
    align-items: center;
  }
  .deck-hint {
    font-size: 11px;
    max-width: 17ch;
    line-height: 1.8;
  }
  .deck-controls {
    gap: 12px;
  }
  .deck-count {
    font-size: 14px;
  }
  .deck-count > span {
    font-size: 11px;
  }
  .deck-controls button {
    width: 44px;
    height: 44px;
  }
  .deck-switches {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    margin: 22px 0 0;
    padding-bottom: 9px;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }
  .deck-switches button {
    flex: none;
    font-size: 11px;
    padding-inline: 12px;
  }
  .series-gallery {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .gallery-card .series-poster {
    padding: 19px 20px;
    min-height: 340px;
  }
  .gallery-card .series-main {
    display: flex;
    min-height: 260px;
    padding-top: 25px;
  }
  .gallery-card .series-title h2 {
    font-size: 34px;
  }
  .gallery-card .series-visual {
    display: flex;
    height: 125px;
    transform: scale(0.61);
  }
  .gallery-card .series-details {
    padding: 20px;
  }
  .gallery-card .series-detail-bottom {
    gap: 8px;
  }
  .series-top,
  .series-bottom {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .deck-card {
    transition: none !important;
  }
  .deck-card.is-active .series-title,
  .deck-card.is-active .series-icon {
    animation: none !important;
  }
}

.deck-stage {
  min-height: 0;
}
