body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
}

body.is-drawer-open {
  overflow: hidden;
}

body.is-modal-open {
  overflow: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 19, 0.92);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c9c5d4;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
}

.section {
  padding: 46px 0;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section__head h2 {
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.25;
}

.section__link,
.text-button,
.reset-link {
  color: var(--color-accent-hover);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--color-cta), var(--color-cta-hover));
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  color: var(--color-text-primary);
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  background: var(--color-surface);
  cursor: pointer;
}

.muted {
  color: #c9c5d4;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
}

.age-gate[hidden] {
  display: none;
}

.age-gate__box {
  width: min(100%, 440px);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 34px;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.age-gate__box h2 {
  margin-bottom: 12px;
  font-size: 1.6rem;
}

.age-gate__box p {
  color: #d2cfde;
}

.age-gate__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 24px;
}

.sale-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid rgba(255, 107, 53, 0.4);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  color: #fff;
  background: var(--color-sale);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
}

.stars {
  color: var(--color-star);
  font-family: var(--font-display);
  font-weight: 800;
  white-space: nowrap;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
}

.tier-badge--large {
  min-width: 74px;
  min-height: 42px;
  padding-inline: 16px;
  font-size: 1.08rem;
}

.tier-badge--god {
  color: #1a1204;
  border-color: rgba(255, 221, 119, 0.72);
  background: linear-gradient(135deg, #fff2a6, #ffb743 48%, #ff6d3f);
  text-shadow: none;
}

.tier-badge--ss {
  border-color: rgba(255, 103, 166, 0.7);
  background: linear-gradient(135deg, #ff4f8a, #d4306b 55%, #8f5bff);
}

.tier-badge--s {
  color: #041c1a;
  border-color: rgba(105, 255, 221, 0.72);
  background: linear-gradient(135deg, #77ffe1, #2ac7d3 52%, #4f8fff);
  text-shadow: none;
}

.tier-badge--a {
  border-color: rgba(157, 190, 255, 0.65);
  background: linear-gradient(135deg, #5f8cff, #4962cf 54%, #26377c);
}

.tier-badge--b {
  border-color: rgba(206, 212, 230, 0.36);
  background: linear-gradient(135deg, #697184, #383e50 54%, #222631);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 62, 109, 0.55);
  box-shadow: var(--shadow-card);
}

.work-card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #262633;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.work-card:hover .work-card__media img {
  transform: scale(1.04);
}

.work-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 34px 12px 12px;
  color: #fff;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
  transition: opacity 0.2s ease;
}

.work-card:hover .work-card__overlay {
  opacity: 1;
}

.work-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.work-card__sale {
  position: static;
}

.work-card__body {
  display: grid;
  gap: 7px;
  padding: 12px;
}

.work-card__title {
  min-height: 3.1em;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.work-card__meta,
.work-card__volume {
  color: #c9c5d4;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d0ccdb;
  font-family: var(--font-display);
  font-size: 0.8rem;
  line-height: 1.3;
}

.work-card__image-error {
  opacity: 0;
}

.image-placeholder {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #c9c5d4;
  background: linear-gradient(135deg, #252532, #181820);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  background: var(--color-surface);
  cursor: pointer;
}

.page-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.empty-state,
.error-state {
  grid-column: 1 / -1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  color: #d0ccdb;
  background: var(--color-surface);
}

.error-state {
  color: #ffd0db;
  border-color: rgba(230, 62, 109, 0.45);
}

.skeleton-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #20202a 25%, #2d2d3b 50%, #20202a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-media {
  aspect-ratio: 3 / 4;
}

.skeleton-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
  color: #bbb7c8;
  background: #0b0b0e;
  font-size: 0.82rem;
}

.site-footer .container {
  display: grid;
  gap: 4px;
}

.not-found {
  display: grid;
  place-items: start;
  gap: 16px;
  min-height: 70vh;
  padding-top: 80px;
}

@media (max-width: 1024px) {
  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .container,
  .site-header__inner {
    width: min(100% - 24px, 1180px);
  }

  .site-header__inner {
    min-height: 58px;
    gap: 10px;
  }

  .site-logo {
    font-size: 0.95rem;
  }

  .site-nav {
    gap: 2px;
    font-size: 0.8rem;
  }

  .site-nav a {
    padding: 7px 8px;
  }

  .section {
    padding: 34px 0;
  }

  .section__head {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

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

  .work-card__body {
    padding: 10px;
  }

  .work-card__badges {
    top: 6px;
    left: 6px;
    gap: 4px;
  }

  .tier-badge {
    min-width: 42px;
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  .work-card__title {
    font-size: 0.82rem;
  }

  .work-card__meta,
  .work-card__volume,
  .work-card__rating {
    font-size: 0.72rem;
  }

  .age-gate__box {
    padding: 24px;
  }
}
