:root {
  color-scheme: dark;
  font-family:
    Inter,
    "Hiragino Sans",
    "Yu Gothic UI",
    "Yu Gothic",
    Meiryo,
    sans-serif;
  background: #090a0d;
  color: #f4f5f7;
  --surface: rgba(18, 20, 26, 0.9);
  --surface-strong: #15171d;
  --border: #292c36;
  --muted: #8c909d;
  --accent: #8469ff;
  --accent-soft: rgba(132, 105, 255, 0.16);
  --success: #8de2b5;
  --danger: #ff9ca8;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(
      circle at 12% 0%,
      rgba(111, 71, 255, 0.18),
      transparent 34rem
    ),
    #090a0d;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(42, 45, 55, 0.88);
  background: rgba(9, 10, 13, 0.84);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1500px, 100%);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f4f5f7;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-content: center;
  border-radius: 11px;
  background:
    linear-gradient(
      145deg,
      #9b86ff,
      #6848f5
    );
  color: white;
  font-weight: 900;
  box-shadow:
    0 8px 24px rgba(92, 63, 225, 0.34);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.91rem;
  letter-spacing: 0.09em;
}

.brand small {
  margin-top: 2px;
  color: #777b88;
  font-size: 0.68rem;
}

.site-nav {
  display: flex;
  gap: 5px;
}

.site-nav a {
  padding: 9px 13px;
  border-radius: 9px;
  color: #aeb1bb;
  font-size: 0.86rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--accent-soft);
  color: #d8ceff;
}

.page-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 42px 24px 80px;
}

.catalog-hero {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #a88cff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero-copy {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.hero-copy > div > p {
  max-width: 44rem;
  margin: 13px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(92px, 1fr));
  min-width: min(540px, 48vw);
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.summary-grid div {
  padding: 15px 16px;
}

.summary-grid div + div {
  border-left: 1px solid var(--border);
}

.summary-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.summary-grid dd {
  margin: 5px 0 0;
  font-size: 1.25rem;
  font-weight: 760;
}

.search-panel {
  position: relative;
  z-index: 3;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.22);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid #353944;
  border-radius: 11px;
  outline: none;
  background: #0f1116;
  color: #f4f5f7;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(132, 105, 255, 0.15);
}

.search-box button,
.load-more-button,
.error-state button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  background: var(--accent);
  color: white;
  font-weight: 760;
}

.filter-grid {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(135px, 1fr))
    auto;
  gap: 12px;
  align-items: end;
  margin-top: 15px;
}

.filter-grid label:not(.check-filter) {
  display: grid;
  gap: 7px;
}

.filter-grid label > span {
  color: #979ba7;
  font-size: 0.74rem;
}

.filter-grid select {
  width: 100%;
  min-height: 40px;
  padding: 0 30px 0 11px;
  border: 1px solid #343844;
  border-radius: 9px;
  background: #13151b;
  color: #ededf1;
}

.check-filter {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 8px;
  white-space: nowrap;
}

.check-filter input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #aaa1d7;
  font-size: 0.78rem;
}

.results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 14px;
}

.result-count {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 720;
}

.active-filter-text {
  min-height: 1.2em;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.loading-indicator {
  color: #aaa0d7;
  font-size: 0.79rem;
}

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

.catalog-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.catalog-card:hover {
  transform: translateY(-3px);
  border-color: #49435f;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.34);
}

.card-image-link {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #111319;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.catalog-card:hover .card-image {
  transform: scale(1.025);
}

.card-image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  color: #555966;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.card-badges {
  position: absolute;
  top: 9px;
  left: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  pointer-events: none;
}

.badge {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.78);
  color: #e7e8ec;
  font-size: 0.65rem;
  backdrop-filter: blur(8px);
}

.badge.is-unseen {
  color: #bbacf9;
}

.badge.is-progress {
  color: #8de2b5;
}

.badge.is-completed {
  color: #9da1ab;
}

.favorite-toggle {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 9, 12, 0.76);
  color: #e6e7eb;
  font-size: 1rem;
  backdrop-filter: blur(8px);
}

.favorite-toggle.is-active {
  color: #ffd36c;
}

.card-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.card-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.card-body {
  padding: 13px;
}

.card-release {
  margin: 0 0 6px;
  color: #858995;
  font-size: 0.7rem;
}

.card-title {
  display: -webkit-box;
  min-height: 3.15em;
  margin: 0;
  overflow: hidden;
  color: #f2f3f6;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.55;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover {
  color: #c9bfff;
}

.card-meta {
  display: grid;
  gap: 5px;
  margin-top: 11px;
  color: #9296a1;
  font-size: 0.72rem;
  line-height: 1.45;
}

.card-meta p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 13px;
}

.duration {
  color: #8c909c;
  font-size: 0.7rem;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: #d7ceff;
  font-size: 0.75rem;
  font-weight: 760;
  text-decoration: none;
}

.empty-state,
.error-state {
  padding: 58px 20px;
  border: 1px dashed #343843;
  border-radius: 15px;
  color: #a6a9b2;
  text-align: center;
}

.empty-state p,
.error-state p {
  margin: 9px 0 0;
  color: #777b87;
}

.error-state button {
  margin-top: 18px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 26px;
}

.load-more-button {
  min-width: 170px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 1280px) {
  .catalog-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns:
      repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 940px) {
  .hero-copy {
    display: block;
  }

  .summary-grid {
    width: 100%;
    min-width: 0;
    margin-top: 22px;
  }

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

@media (max-width: 680px) {
  .site-header-inner {
    min-height: 60px;
    padding: 0 14px;
  }

  .brand small {
    display: none;
  }

  .page-shell {
    padding: 28px 14px 60px;
  }

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

  .summary-grid div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .summary-grid div:nth-child(4) {
    border-top: 1px solid var(--border);
  }

  .search-panel {
    padding: 13px;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

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

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

  .card-body {
    padding: 10px;
  }

  .card-title {
    font-size: 0.82rem;
  }

  .card-meta {
    display: none;
  }
}

@media (max-width: 430px) {
  .site-nav a {
    padding: 8px 9px;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .card-meta {
    display: grid;
  }
}


/* ==================================================================
   Phase 4A — editorial catalog design system
   ================================================================== */

:root {
  --page-bg: #07080b;
  --surface-1: rgba(17, 19, 25, 0.88);
  --surface-2: rgba(25, 27, 35, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #f7f7fa;
  --text-soft: #c7c9d1;
  --text-muted: #858996;
  --accent: #a87cff;
  --accent-2: #ff5da8;
  --accent-3: #7d6cff;
  --accent-soft:
    linear-gradient(
      135deg,
      rgba(168, 124, 255, 0.2),
      rgba(255, 93, 168, 0.08)
    );
  --success: #7ce0af;
  --danger: #ff8a99;
  --shadow-xl:
    0 38px 110px rgba(0, 0, 0, 0.52);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  background: var(--page-bg);
}

body.catalog-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 10% -8%,
      rgba(146, 93, 255, 0.22),
      transparent 37rem
    ),
    radial-gradient(
      circle at 88% 7%,
      rgba(255, 74, 155, 0.12),
      transparent 28rem
    ),
    linear-gradient(180deg, #0b0c11, #07080b 60%);
  color: var(--text);
}

.site-header {
  border-bottom-color: var(--line);
  background: rgba(7, 8, 11, 0.7);
  backdrop-filter: blur(22px) saturate(1.25);
}

.site-header-inner {
  min-height: 72px;
  width: min(1560px, 100%);
  padding: 0 30px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background:
    linear-gradient(
      145deg,
      var(--accent-2),
      var(--accent-3) 68%
    );
  box-shadow:
    0 10px 30px rgba(119, 76, 255, 0.35),
    inset 0 1px rgba(255, 255, 255, 0.35);
}

.brand-mark::after {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
  transform: translate(14px, 14px);
}

.brand-mark span {
  position: relative;
  z-index: 1;
}

.brand-copy strong {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.brand-copy small {
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.site-nav {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(18, 20, 27, 0.72);
}

.site-nav a {
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--text-muted);
  text-align: center;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.page-shell {
  width: min(1560px, 100%);
  padding: 54px 30px 90px;
}

.catalog-hero {
  margin-bottom: 34px;
}

.hero-copy {
  align-items: center;
  gap: 44px;
}

.hero-message {
  max-width: 720px;
}

.eyebrow {
  color: #bd9cff;
  letter-spacing: 0.2em;
}

h1 {
  max-width: 740px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-copy > div > p {
  max-width: 39rem;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.hero-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      var(--accent-2),
      var(--accent-3)
    );
  color: white;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow:
    0 12px 30px rgba(114, 76, 238, 0.28);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.hero-primary-action:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px rgba(114, 76, 238, 0.4);
}

.hero-note {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.summary-grid {
  min-width: min(560px, 48vw);
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(29, 31, 40, 0.82),
      rgba(15, 17, 23, 0.86)
    );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.summary-grid div {
  padding: 18px;
}

.summary-grid div + div {
  border-left-color: var(--line);
}

.summary-grid dt {
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.summary-grid dd {
  color: var(--text);
  font-size: 1.45rem;
}

.search-panel {
  position: sticky;
  z-index: 12;
  top: 88px;
  margin-bottom: 34px;
  padding: 16px;
  border-color: var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      180deg,
      rgba(28, 30, 39, 0.9),
      rgba(14, 16, 22, 0.92)
    );
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px) saturate(1.2);
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.filter-panel-header > div {
  display: grid;
  gap: 3px;
}

.filter-kicker {
  color: #b996ff;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.filter-panel-header strong {
  color: var(--text-soft);
  font-size: 0.84rem;
}

.filter-help {
  color: var(--text-muted);
  font-size: 0.67rem;
}

.search-box input {
  min-height: 50px;
  border-color: var(--line);
  border-radius: 12px;
  background: rgba(7, 8, 12, 0.72);
  color: var(--text);
}

.search-box input::placeholder {
  color: #696d78;
}

.search-box input:focus {
  border-color: rgba(168, 124, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(168, 124, 255, 0.12);
}

.search-box button,
.load-more-button,
.error-state button {
  border-color: transparent;
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      var(--accent-2),
      var(--accent-3)
    );
  box-shadow:
    0 10px 26px rgba(114, 76, 238, 0.22);
}

.filter-grid select {
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(7, 8, 12, 0.7);
  color: var(--text-soft);
}

.filter-grid label > span {
  color: var(--text-muted);
}

.text-button {
  color: #bea8ff;
}

.results-header {
  margin-bottom: 18px;
}

.results-kicker {
  margin: 0 0 5px;
  color: #b996ff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.result-count {
  color: var(--text);
  font-size: 1.15rem;
}

.active-filter-text,
.loading-indicator {
  color: var(--text-muted);
}

.catalog-grid {
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.catalog-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      180deg,
      rgba(25, 27, 35, 0.82),
      rgba(13, 15, 20, 0.9)
    );
  box-shadow:
    0 14px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.04);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.catalog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 124, 255, 0.34);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(168, 124, 255, 0.05);
}

.card-image-link {
  aspect-ratio: 16 / 10;
  background: #0d0f14;
}

.card-image-link::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent 58%,
      rgba(7, 8, 11, 0.5)
    );
  content: "";
  pointer-events: none;
}

.card-image {
  filter: saturate(0.94);
}

.catalog-card:hover .card-image {
  transform: scale(1.04);
  filter: saturate(1.08);
}

.badge {
  z-index: 1;
  border-color: var(--line-strong);
  background: rgba(6, 7, 10, 0.68);
  color: var(--text-soft);
  backdrop-filter: blur(14px);
}

.badge.is-unseen {
  color: #c8b6ff;
}

.badge.is-progress {
  color: var(--success);
}

.favorite-toggle {
  width: 36px;
  height: 36px;
  border-color: var(--line-strong);
  background: rgba(6, 7, 10, 0.68);
  backdrop-filter: blur(14px);
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.favorite-toggle:hover {
  transform: scale(1.06);
  background: rgba(35, 36, 45, 0.86);
}

.card-progress {
  z-index: 2;
  height: 4px;
}

.card-progress span {
  background:
    linear-gradient(
      90deg,
      var(--accent-2),
      var(--accent-3)
    );
  box-shadow: 0 0 14px var(--accent-glow);
}

.card-body {
  padding: 15px;
}

.card-release {
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.card-title {
  color: var(--text);
  font-size: 0.91rem;
}

.card-title:hover {
  color: #d7c9ff;
}

.card-meta {
  color: var(--text-muted);
}

.play-button {
  gap: 6px;
  min-height: 36px;
  padding-inline: 14px;
  border: 1px solid rgba(168, 124, 255, 0.2);
  border-radius: 9px;
  background: var(--accent-soft);
  color: #dfd5ff;
}

.play-button::after {
  content: "→";
}

.empty-state,
.error-state {
  border-color: var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(17, 19, 25, 0.6);
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-image,
.skeleton-body span,
.skeleton-body strong,
.skeleton-body small {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.035) 20%,
      rgba(255, 255, 255, 0.09) 38%,
      rgba(255, 255, 255, 0.035) 56%
    );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.25s linear infinite;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.skeleton-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.skeleton-body span {
  width: 36%;
  height: 8px;
}

.skeleton-body strong {
  width: 94%;
  height: 13px;
}

.skeleton-body strong:nth-child(3) {
  width: 72%;
}

.skeleton-body small {
  width: 52%;
  height: 9px;
  margin-top: 5px;
}

@keyframes skeleton-shimmer {
  to {
    background-position-x: -200%;
  }
}

:where(
  button,
  input,
  select,
  a
):focus-visible {
  outline: 2px solid rgba(191, 160, 255, 0.92);
  outline-offset: 3px;
}

@media (max-width: 1280px) {
  .catalog-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .page-shell {
    padding-inline: 22px;
  }
}

@media (max-width: 940px) {
  .hero-copy {
    display: block;
  }

  .summary-grid {
    margin-top: 28px;
  }

  .search-panel {
    position: static;
  }

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

@media (max-width: 680px) {
  .site-header-inner {
    min-height: 60px;
    padding-inline: 14px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .page-shell {
    padding: 34px 14px 70px;
  }

  h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid {
    border-radius: 16px;
  }

  .search-panel {
    padding: 13px;
    border-radius: 16px;
  }

  .filter-panel-header {
    align-items: flex-start;
  }

  .filter-help {
    display: none;
  }

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

  .catalog-card {
    border-radius: 14px;
  }

  .card-body {
    padding: 11px;
  }

  .card-title {
    font-size: 0.82rem;
  }
}

@media (max-width: 430px) {
  .brand-copy small {
    display: none;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .card-image-link {
    aspect-ratio: 16 / 9;
  }

  .card-meta {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==================================================================
   Phase 4C — discovery shelves
   ================================================================== */

.discovery-area {
  margin: 0 0 38px;
}

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

.discovery-header h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.discovery-header > div > p:last-child {
  max-width: 44rem;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.discovery-status {
  color: var(--text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.discovery-shelves {
  display: grid;
  gap: 30px;
}

.discovery-shelf {
  min-width: 0;
}

.discovery-shelf-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.discovery-shelf-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.discovery-shelf-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.discovery-track {
  display: grid;
  grid-auto-columns:
    minmax(190px, 15.5vw);
  grid-auto-flow: column;
  gap: 13px;
  overflow-x: auto;
  padding: 2px 2px 13px;
  scroll-snap-type: x proximity;
  scrollbar-color:
    rgba(168, 124, 255, 0.35)
    transparent;
}

.discovery-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(
      180deg,
      rgba(25, 27, 35, 0.84),
      rgba(12, 14, 19, 0.94)
    );
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.24);
  scroll-snap-align: start;
  transition:
    transform 160ms ease,
    border-color 160ms ease;
}

.discovery-card:hover {
  transform: translateY(-4px);
  border-color:
    rgba(168, 124, 255, 0.38);
}

.discovery-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.discovery-card-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0d0f14;
}

.discovery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.discovery-card:hover
.discovery-card-image img {
  transform: scale(1.035);
}

.discovery-rank {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  min-width: 29px;
  height: 29px;
  padding: 0 7px;
  place-content: center;
  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(5, 6, 9, 0.72);
  color: white;
  font-size: 0.7rem;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.discovery-personal-badge {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(5, 6, 9, 0.74);
  color: #cdbfff;
  font-size: 0.62rem;
  backdrop-filter: blur(12px);
}

.discovery-card-body {
  padding: 12px;
}

.discovery-card-reason {
  margin: 0 0 6px;
  color: #b99fff;
  font-size: 0.64rem;
  font-weight: 760;
}

.discovery-card-title {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.discovery-card-meta {
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-inline-error {
  padding: 14px;
  border: 1px solid
    rgba(255, 138, 153, 0.25);
  border-radius: 12px;
  background: rgba(83, 25, 35, 0.3);
  color: #ffb4bd;
  font-size: 0.76rem;
}

.discovery-skeleton {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.025) 20%,
      rgba(255, 255, 255, 0.075) 38%,
      rgba(255, 255, 255, 0.025) 56%
    );
  background-size: 200% 100%;
  animation:
    skeleton-shimmer 1.25s linear infinite;
}

@media (max-width: 940px) {
  .discovery-track {
    grid-auto-columns:
      minmax(180px, 27vw);
  }
}

@media (max-width: 680px) {
  .discovery-area {
    margin-bottom: 28px;
  }

  .discovery-header {
    align-items: flex-start;
  }

  .discovery-status {
    display: none;
  }

  .discovery-track {
    grid-auto-columns:
      minmax(165px, 70vw);
    margin-right: -14px;
    padding-right: 14px;
  }
}
