.tier-home-block {
  padding: 0 max(20px, calc((100vw - var(--max-width)) / 2)) 34px;
  background: #010307;
}

.tier-strip {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(215, 234, 223, 0.12);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  animation: tier-enter-right 1s ease-out both;
}

.tier-strip-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tier-strip-head h2,
.tier-page-head h1 {
  margin: 0;
  color: #f7fff9;
  letter-spacing: 0;
}

.tier-strip-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.tier-strip-head p,
.tier-page-head p {
  margin: 8px 0 0;
  color: #b9d1c4;
  line-height: 1.6;
}

.tier-see-all {
  color: var(--accent);
  font-weight: 900;
}

.tier-see-all-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.tier-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
}

.tier-slider-wrap {
  position: relative;
}

.tier-scroll-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(31, 156, 139, 0.62);
  background: rgba(13, 27, 29, 0.34);
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2c9f94;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tier-scroll-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.tier-scroll-hint.left {
  left: 8px;
}

.tier-scroll-hint.right {
  right: 8px;
}

.tier-scroll-hint svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tier-card {
  position: relative;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-rows: auto 170px calc(1.5rem * 1.25) calc(1rem * 1.55 * 4) auto;
  row-gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(215, 234, 223, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.25);
  scroll-snap-align: start;
  animation: tier-enter-right 1s ease-out both;
}

.tier-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.tier-price {
  min-height: 30px;
  min-width: 96px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #f8ffe3;
  font-size: 0.85rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.tier-fav {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(215, 234, 223, 0.24);
  border-radius: var(--radius);
  color: #e7f5ec;
}

.tier-fav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tier-card img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
}

.tier-card h3 {
  margin: 0;
  color: #f7fff9;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(1.5rem * 1.25);
}

.tier-card p {
  margin: 0;
  color: #b9d1c4;
  line-height: 1.55;
  font-size: 1rem;
  height: calc(1rem * 1.55 * 4);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1rem * 1.55 * 4);
}

.tier-card .button {
  margin-top: 0;
  align-self: center;
}
.tier-page-screen {
  position: relative;
  min-height: calc(100svh - 74px);
  overflow: hidden;
  background: #010307;
  padding: 60px max(20px, calc((100vw - var(--max-width)) / 2));
}

@keyframes tier-enter-right {
  0% {
    opacity: 0;
    transform: translate3d(70px, 0, 0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.tier-page-wrap {
  position: relative;
  z-index: 1;
}

.tier-page-head {
  margin-bottom: 16px;
}

.tier-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.test-detail-screen {
  position: relative;
  min-height: calc(100svh - 74px);
  overflow: hidden;
  background: #010307;
  padding: 60px max(20px, calc((100vw - var(--max-width)) / 2));
}

.test-detail-wrap {
  position: relative;
  z-index: 1;
}

.test-shortcode-card {
  max-width: 760px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(215, 234, 223, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

.test-shortcode-card h1 {
  margin: 0;
  color: #f7fff9;
  letter-spacing: 0;
}

.test-shortcode-card p {
  margin: 10px 0 0;
  color: #b9d1c4;
  line-height: 1.6;
}

.shortcode-placeholder {
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius);
  color: #173025;
  font-weight: 900;
}
@media (max-width: 900px) {
  .tier-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tier-home-block {
    padding-inline: 20px;
  }

  .tier-slider {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 12px;
  }

  .tier-slider::-webkit-scrollbar {
    height: 0;
  }

  .tier-card {
    flex: 0 0 100%;
    min-width: 100%;
    min-height: 0;
    display: grid;
    scroll-snap-align: start;
  }
}
@media (min-width: 761px) {
  .tier-scroll-hint {
    display: none !important;
  }

  .tier-slider .tier-card,
  .tier-page-grid .tier-card {
    min-height: 0 !important;
    height: auto !important;
    align-self: start !important;
    justify-self: stretch !important;
  }
}

/* Force CTA pinning for homepage slider + tier listing cards */
.tier-slider .tier-card,
.tier-page-grid .tier-card {
  display: grid !important;
  grid-template-rows: auto 170px calc(1.5rem * 1.25) calc(1rem * 1.55 * 4) auto !important;
  row-gap: 8px !important;
}

.tier-slider .tier-card .button,
.tier-page-grid .tier-card .button {
  margin-top: 0 !important;
  align-self: center !important;
}
