/* AIGame50 — Magazine + editorial detail */

:root {
  --hx-page: #e4e9f2;
  --hx-page-mid: #d8dee9;
  --hx-surface: #f8fafc;
  --hx-surface-2: #f1f5f9;
  --hx-ink: #0f172a;
  --hx-muted: #64748b;
  --hx-line: #cbd5e1;
  --hx-line-strong: #94a3b8;
  --hx-accent: #7c3aed;
  --hx-accent-hot: #6d28d9;
  --hx-accent-2: #0d9488;
  --hx-rail: rgba(248, 250, 252, 0.94);
  --hx-rail-ink: #0f172a;
  --hx-rail-muted: #64748b;
  --hx-brand: #0f172a;
  --hx-brand-deep: #020617;
  --hx-on-accent: #ffffff;
  --hx-radius: 12px;
  --hx-radius-sm: 10px;
  --hx-font: 'Outfit', system-ui, sans-serif;
  --hx-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --hx-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  --hx-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
  --hx-media-bg: #e2e8f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

img,
video {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  color: var(--hx-ink);
  font: 500 16px/1.55 var(--hx-font);
  background: var(--hx-page);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: max(var(--hx-cookie-pad, 0px), env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.hx-no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hx-site {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.hx-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Top bar */
.hx-rail {
  flex: none;
  width: 100%;
  padding: 10px max(14px, env(safe-area-inset-left)) 12px max(14px, env(safe-area-inset-right));
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--hx-rail);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--hx-rail-ink);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  border-bottom: 1px solid var(--hx-line-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.hx-rail__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--hx-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.hx-rail__brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  object-fit: cover;
  background: var(--hx-surface-2);
  box-shadow: none;
}

.hx-rail__nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hx-rail__nav::-webkit-scrollbar {
  display: none;
}

.hx-rail__nav a {
  padding: 8px 12px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hx-rail-muted);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  flex-shrink: 0;
}

.hx-rail__nav a:hover {
  color: var(--hx-rail-ink);
  background: rgba(0, 0, 0, 0.04);
  transform: none;
  box-shadow: none;
}

.hx-rail__nav a.is-active {
  color: var(--hx-accent);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--hx-accent);
  box-shadow: none;
}

.hx-rail__search {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
  max-width: min(100%, 380px);
}

.hx-rail__search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.hx-rail__search form {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-width: 0;
  gap: 8px;
}

.hx-rail__search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--hx-line-strong);
  border-radius: var(--hx-radius-sm);
  padding: 8px 14px;
  font: inherit;
  font-weight: 500;
  background: var(--hx-surface-2);
  color: var(--hx-ink);
}

.hx-rail__search input::placeholder {
  color: rgba(92, 88, 82, 0.55);
}

.hx-rail__search button {
  border: 1px solid var(--hx-line-strong);
  border-radius: var(--hx-radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: var(--hx-ink);
  color: #fff;
  box-shadow: none;
}

.hx-rail__search button:hover {
  transform: none;
  filter: brightness(1.05);
  box-shadow: none;
}

.hx-rail__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.hx-rail__meta {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hx-rail-muted);
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  padding: 6px 12px;
  background: var(--hx-surface-2);
  box-shadow: none;
}

.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--hx-radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid var(--hx-line-strong);
  background: var(--hx-surface);
  color: var(--hx-ink);
  box-shadow: none;
}

.hx-btn:hover {
  background: var(--hx-surface-2);
  transform: translateY(-1px);
  border-color: var(--hx-muted);
  box-shadow: var(--hx-shadow-sm);
}

.hx-btn--fill {
  background: var(--hx-accent);
  color: var(--hx-on-accent);
  border-color: var(--hx-accent);
}

.hx-btn--fill:hover {
  filter: brightness(1.05);
  color: var(--hx-on-accent);
  box-shadow: var(--hx-shadow-sm);
}

/* Main */
.hx-main {
  flex: 1;
  min-width: 0;
  color: var(--hx-ink);
  background: transparent;
  padding-top: max(clamp(16px, 3vw, 28px), env(safe-area-inset-top));
  padding-bottom: max(clamp(16px, 3vw, 28px), env(safe-area-inset-bottom));
  padding-left: max(clamp(16px, 3vw, 28px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 3vw, 28px), env(safe-area-inset-right));
  overflow-x: hidden;
}

.hx-hero h1,
.hx-catalog-head h2,
.hx-related h2,
.hx-sheet h1,
.hx-panel h1 {
  font-family: var(--hx-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
}

.hx-ad,
.hx-ad--row {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  overflow: hidden;
}

.hx-ad--top {
  margin-top: 0;
  margin-bottom: 20px;
}

.hx-ad--mid {
  margin: 22px 0 26px;
}

.hx-ad__inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px;
  text-align: center;
  border-radius: var(--hx-radius-sm);
  border: 1px dashed var(--hx-line);
  background: var(--hx-surface-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hx-ad__label {
  width: 100%;
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--hx-muted);
}

.hx-ad__slot {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hx-ad__slot > *,
.hx-ad__inner > *,
.hx-ad__inner iframe,
.hx-ad__inner ins,
.hx-ad__inner img {
  max-width: 100%;
}

.hx-ad__slot iframe,
.hx-ad__inner iframe {
  display: block;
  margin: 0 auto;
}

.hx-hero {
  margin-bottom: 22px;
  padding: 22px 20px 20px;
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  border: 1px solid var(--hx-line);
  box-shadow: var(--hx-shadow);
}

.hx-hero__kicker {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--hx-accent-2);
}

.hx-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.08;
}

.hx-hero p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--hx-muted);
  max-width: 62ch;
}

.hx-hero p kbd,
.hx-main kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.82em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: rgba(28, 40, 52, 0.08);
  color: var(--hx-ink);
  box-shadow: none;
}

.hx-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.hx-strip__card {
  flex: 0 0 min(240px, 72vw);
  scroll-snap-align: start;
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-strip__card a {
  display: block;
  color: inherit;
}

.hx-strip__card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.hx-strip__body {
  padding: 10px 12px 12px;
}

.hx-strip__body h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 800;
}

.hx-strip__body span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hx-muted);
}

.hx-copy {
  margin-bottom: 22px;
  padding: 16px 18px;
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  border: 1px solid var(--hx-line);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--hx-muted);
  box-shadow: var(--hx-shadow-sm);
}

.hx-copy strong {
  color: var(--hx-ink);
}

.hx-catalog-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.hx-catalog-head__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
}

.hx-catalog-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  align-items: flex-end;
}

.hx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(100%, 200px);
}

.hx-field label {
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hx-muted);
}

.hx-catalog-tools select {
  font: inherit;
  font-weight: 700;
  padding: 8px 10px;
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface);
  color: var(--hx-ink);
  box-shadow: none;
}

.hx-field--tools {
  flex: 1 1 100%;
  min-width: min(100%, 280px);
}

.hx-tool-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hx-tool-cluster .hx-btn {
  flex: 0 0 auto;
}

.hx-rail__meta [data-hx-session] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.hx-bento--tight {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}

.hx-catalog-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
}

.hx-count {
  font-size: 0.82rem;
  color: var(--hx-muted);
}

.hx-count strong {
  color: var(--hx-accent);
  font-variant-numeric: tabular-nums;
}

.hx-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.hx-pill {
  padding: 8px 14px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hx-muted);
  box-shadow: none;
  cursor: pointer;
}

.hx-pill:hover {
  border-color: rgba(139, 116, 255, 0.45);
  color: var(--hx-ink);
  background: var(--hx-surface-2);
}

.hx-pill.is-active {
  background: linear-gradient(135deg, rgba(139, 116, 255, 0.22), rgba(46, 228, 199, 0.1));
  border-color: rgba(139, 116, 255, 0.55);
  color: var(--hx-ink);
  box-shadow: 0 0 0 1px rgba(139, 116, 255, 0.25);
}

.hx-bento {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.hx-cell {
  position: relative;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--hx-shadow-sm);
}

.hx-cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--hx-shadow);
}

.hx-cell__link {
  display: block;
  color: inherit;
}

.hx-cell__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--hx-media-bg);
}

.hx-cell__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hx-cell__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  background: repeating-linear-gradient(
    -45deg,
    rgba(6, 7, 11, 0.88),
    rgba(6, 7, 11, 0.88) 8px,
    rgba(139, 116, 255, 0.28) 8px,
    rgba(139, 116, 255, 0.28) 16px
  );
  opacity: 0;
  transition: opacity 0.15s ease;
}

.hx-cell:hover .hx-cell__play {
  opacity: 1;
}

.hx-cell__body {
  padding: 10px 12px 12px;
}

.hx-cell__body h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

.hx-cell__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.72rem;
  color: var(--hx-muted);
}

.hx-cell__meta span {
  font-weight: 700;
}

.hx-cell__desc {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--hx-muted);
}

.hx-cell.hx-io-tile {
  opacity: 0;
  transform: translateY(8px);
}

.hx-cell.hx-io-tile.hx-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: calc(var(--hx-i, 0) * 16ms);
}

article[data-game-card].hx-io-tile {
  opacity: 0;
  transform: translateY(8px);
}

article[data-game-card].hx-io-tile.hx-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: calc(var(--hx-i, 0) * 16ms);
}

@media (prefers-reduced-motion: reduce) {
  .hx-cell.hx-io-tile,
  article[data-game-card].hx-io-tile {
    opacity: 1;
    transform: none;
  }

  .hx-cell.hx-io-tile.hx-reveal,
  article[data-game-card].hx-io-tile.hx-reveal {
    transition: none;
  }
}

html.hx-negative {
  filter: invert(1) hue-rotate(180deg);
}

html.hx-negative img,
html.hx-negative video,
html.hx-negative .hx-rail__brand img {
  filter: invert(1) hue-rotate(180deg);
}

.hx-hint {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--hx-muted);
}

.hx-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--hx-line);
  text-align: center;
  font-size: 0.8rem;
  color: var(--hx-muted);
}

.hx-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.hx-foot a {
  font-weight: 600;
  text-transform: none;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--hx-accent);
}

.hx-foot__tag {
  max-width: 40rem;
  margin: 8px auto 0;
  line-height: 1.45;
}

/* Toast */
.hx-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 400;
  transform: translateX(-50%) translateY(10px);
  padding: 12px 18px;
  border-radius: var(--hx-radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--hx-rail);
  color: var(--hx-rail-ink);
  border: 1px solid var(--hx-line);
  box-shadow: var(--hx-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hx-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hx-toast.is-leaving {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

/* Cookie */
.hx-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  padding: 12px clamp(12px, 3vw, 20px) max(12px, env(safe-area-inset-bottom)) clamp(12px, 3vw, 20px);
  background: var(--hx-surface);
  border-top: 2px solid var(--hx-line);
}

.hx-cookie__inner {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--hx-muted);
}

.hx-cookie__inner p {
  margin: 0;
  flex: 1 1 260px;
}

.hx-cookie a {
  color: var(--hx-accent);
  font-weight: 800;
  text-decoration: underline;
}

/* Detail player */
.hx-player {
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
  background: var(--hx-surface);
  margin-bottom: 20px;
  box-shadow: var(--hx-shadow);
}

.hx-player.hx-runtime-live {
  box-shadow: 0 0 0 4px var(--hx-accent), var(--hx-shadow);
}

.hx-player.is-mobile-theater {
  position: fixed;
  inset: 0;
  z-index: 200;
  border-radius: var(--hx-radius-sm);
  margin: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.hx-player__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--hx-rail);
  color: var(--hx-rail-ink);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--hx-line);
}

.hx-player__grow {
  flex: 1;
}

.hx-btn--sm {
  padding: 6px 10px;
  font-size: 0.72rem;
}

.hx-player__bar .hx-btn--sm {
  border: 1px solid rgba(244, 239, 230, 0.25);
  color: var(--hx-rail-ink);
  background: rgba(0, 0, 0, 0.2);
  box-shadow: none;
}

.hx-player__bar .hx-btn--sm:hover {
  background: var(--hx-accent-2);
  color: var(--hx-ink);
}

.hx-player__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #1a1714;
}

.hx-player__poster,
.hx-player__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hx-player__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hx-player__iframe {
  border: 0;
}

.hx-player__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--hx-line);
  background: var(--hx-page);
}

.hx-player__tip {
  margin: 0;
  flex: 1 1 200px;
  font-size: 0.82rem;
  color: var(--hx-muted);
}

.hx-detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .hx-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hx-panel {
  padding: 16px 18px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-title-sm {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hx-accent);
}

.hx-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
}

.hx-lede {
  margin: 0;
  font-size: 0.88rem;
  color: var(--hx-muted);
}

.hx-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hx-accent);
}

.hx-prose {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--hx-muted);
}

.hx-prose a {
  color: var(--hx-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hx-related h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 400;
}

.hx-rows {
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
  box-shadow: var(--hx-shadow-sm);
}

a.hx-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hx-line);
  background: var(--hx-surface);
  color: inherit;
}

a.hx-row:last-child {
  border-bottom: none;
}

a.hx-row:hover {
  background: rgba(0, 224, 255, 0.12);
}

.hx-row img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
}

.hx-row h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
}

.hx-row .g {
  font-size: 0.65rem;
  color: var(--hx-muted);
  text-transform: uppercase;
}

/* Doc pages */
.hx-doc .hx-main {
  max-width: 52rem;
  margin: 0 auto;
}

.hx-sheet {
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-sheet h1 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 400;
}

.hx-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin-top: 12px;
}

.hx-form input,
.hx-form textarea {
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  padding: 10px 12px;
  font: inherit;
  background: var(--hx-surface);
  box-shadow: none;
  min-height: 120px;
  resize: vertical;
}

.hx-tag-rail {
  margin-bottom: 16px;
}

.hx-tag-rail .hx-pills {
  margin-bottom: 0;
}

.hx-tag-rail a.hx-pill {
  display: inline-flex;
  align-items: center;
}

.hx-list {
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
  box-shadow: var(--hx-shadow-sm);
}

a.hx-list-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hx-line);
  background: var(--hx-surface);
  color: inherit;
}

a.hx-list-row:last-child {
  border-bottom: none;
}

a.hx-list-row:hover {
  background: rgba(0, 224, 255, 0.12);
}

.hx-list-row img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
}

.hx-list-row h3 {
  margin: 0 0 4px;
  font-size: 0.92rem;
}

.hx-list-meta {
  font-size: 0.68rem;
  color: var(--hx-muted);
  text-transform: uppercase;
}

.hx-list-arrow {
  color: var(--hx-accent);
  font-weight: 800;
}

.hx-btn:focus-visible,
.hx-pill:focus-visible,
.hx-rail__nav a:focus-visible,
.hx-rail__search input:focus-visible {
  outline: 3px solid var(--hx-accent);
  outline-offset: 2px;
}

@keyframes hx-pop {
  0% { transform: scale(0.98); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes hx-leave {
  to { opacity: 0; transform: translateY(6px); }
}

@keyframes hx-chip-flash {
  0%, 100% { filter: brightness(1); }
  40% { filter: brightness(0.94); }
}

.hx-cell.hx-filter-pop {
  animation: hx-pop 0.32s ease both;
}

.hx-cell.hx-filter-leave {
  animation: hx-leave 0.28s ease forwards;
}

.hx-pill.hx-chip-flash {
  animation: hx-chip-flash 0.45s ease;
}

.hx-main .hx-rail__search label {
  color: var(--hx-muted);
}

.hx-main .hx-rail__search input {
  background: var(--hx-surface);
  border-color: var(--hx-line);
  color: var(--hx-ink);
}

.hx-main .hx-rail__search input::placeholder {
  color: rgba(92, 88, 82, 0.5);
}

.hx-main .hx-btn:not(.hx-btn--fill):not(.hx-btn--sm) {
  border-color: var(--hx-line-strong);
  background: var(--hx-surface);
  color: var(--hx-ink);
}

.hx-main .hx-btn:not(.hx-btn--fill):not(.hx-btn--sm):hover {
  background: var(--hx-surface-2);
  border-color: var(--hx-muted);
}

.hx-main .hx-rail__search button {
  background: var(--hx-ink);
  color: #fff;
  box-shadow: none;
}

@media (max-width: 880px) {
  .hx-rail {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .hx-rail__brand span {
    max-width: min(42vw, 9rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hx-ad--top {
    margin-bottom: 16px;
  }

  .hx-ad--mid {
    margin: 18px 0 20px;
  }

  .hx-ad__inner {
    padding: 10px 8px;
  }

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

  .hx-search-hero__stat {
    text-align: left;
    justify-self: start;
  }

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

  .hx-cat-hero__badge {
    justify-self: start;
  }

  .hx-tags-band,
  .hx-tags-band--alt,
  .hx-tags-band .hx-bento,
  .hx-tags-band--alt .hx-bento {
    transform: none;
  }

  .hx-cat-tile,
  .hx-cat-tile:nth-child(3n + 2),
  .hx-cat-tile:nth-child(5n) {
    transform: none;
  }

  .hx-search-tile,
  .hx-search-tile:nth-child(4n + 2),
  .hx-search-tile:nth-child(4n + 3) {
    transform: none;
  }

  .hx-cat-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hx-search-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hx-d-flow > .hx-d-section:nth-child(odd),
  .hx-d-flow > .hx-d-section:nth-child(even) {
    transform: none;
  }

  .hx-detail-editorial .hx-main.hx-detail-stack {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .hx-detail-editorial .hx-detail-stack {
    padding-left: 0;
    padding-right: 0;
  }

  .hx-d-sheet {
    padding: 14px 14px 16px;
  }

  .hx-d-playblock {
    padding: 14px 12px 16px;
  }

  .hx-d-hero h1 {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  .hx-player__bar {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.72rem;
  }

  .hx-player__bar strong {
    flex: 1 1 100%;
    font-size: 0.68rem;
  }

  .hx-player__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .hx-player__foot .hx-btn {
    width: 100%;
    justify-content: center;
  }

  .hx-d-relstrip {
    margin-left: calc(-1 * max(12px, env(safe-area-inset-left)));
    margin-right: calc(-1 * max(12px, env(safe-area-inset-right)));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .hx-rail__search {
    flex: 1 1 100%;
    max-width: none;
  }

  .hx-rail__actions {
    flex: 1 1 100%;
  }

  .hx-rail__actions .hx-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }

  .hx-tag-rail .hx-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-bottom: 8px;
  }

  .hx-tag-rail .hx-pills::-webkit-scrollbar {
    display: none;
  }

  .hx-tag-rail .hx-pill {
    flex-shrink: 0;
  }

  .hx-strip {
    margin-left: calc(-1 * max(clamp(16px, 3vw, 28px), env(safe-area-inset-left)));
    margin-right: calc(-1 * max(clamp(16px, 3vw, 28px), env(safe-area-inset-right)));
    padding-left: max(clamp(16px, 3vw, 28px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 3vw, 28px), env(safe-area-inset-right));
  }

  .hx-bento {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .hx-list-row h3,
  .hx-row h3 {
    word-break: break-word;
  }

  a.hx-list-row,
  a.hx-row {
    grid-template-columns: 56px 1fr auto;
    gap: 8px;
    padding: 10px;
    min-width: 0;
  }

  .hx-list-row img,
  .hx-row img {
    width: 56px;
    height: 42px;
  }

  .hx-detail-grid {
    gap: 12px;
  }
}

/* —— Home: Magazine (hero + 3 picks + essay + cats + recent + FAQ) —— */

.hx-home-magazine .hx-main,
.hx-home-minimal .hx-main {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 2rem;
}

.hx-home-minimal .hx-main {
  padding-top: clamp(24px, 5vw, 48px);
}

.hx-mz-hero {
  margin-bottom: 2.5rem;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-line);
  background: linear-gradient(145deg, var(--hx-surface) 0%, var(--hx-surface-2) 100%);
  box-shadow: var(--hx-shadow-sm);
}

.hx-mz-hero--compact {
  margin-bottom: 1.75rem;
  padding: clamp(18px, 3vw, 26px);
}

.hx-mz-eyebrow {
  margin: 0 0 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hx-accent);
}

.hx-mz-hero__h {
  margin: 0 0 10px;
  font-family: var(--hx-display);
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.12;
  color: var(--hx-ink);
}

.hx-mz-hero__sub {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--hx-muted);
  line-height: 1.45;
}

.hx-mz-hero__edit {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--hx-ink);
}

.hx-mz-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hx-mz-search input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line-strong);
  background: var(--hx-surface);
  font: inherit;
}

.hx-mz-block {
  margin-bottom: 2.5rem;
}

.hx-mz-h2 {
  margin: 0 0 6px;
  font-family: var(--hx-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--hx-ink);
}

.hx-mz-dek {
  margin: 0 0 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--hx-muted);
}

.hx-mz-picks {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hx-mz-pick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: var(--hx-radius);
  overflow: hidden;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

@media (min-width: 640px) {
  .hx-mz-pick {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  }
}

.hx-mz-pick__media {
  display: block;
  background: var(--hx-media-bg);
}

.hx-mz-pick__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.hx-mz-pick__body {
  padding: 18px 20px 22px;
}

.hx-mz-pick__tag {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hx-accent-2);
}

.hx-mz-pick__title {
  margin: 0 0 12px;
  font-family: var(--hx-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
}

.hx-mz-pick__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.hx-mz-pick__title a:hover {
  border-bottom-color: var(--hx-accent);
}

.hx-mz-pick__desc {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--hx-muted);
}

.hx-mz-pick__more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hx-accent-2);
}

.hx-mz-pick__more:hover {
  color: var(--hx-ink);
}

.hx-mz-long {
  margin-bottom: 2.75rem;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-line-strong);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-mz-long__head h2 {
  margin: 0 0 6px;
  font-family: var(--hx-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 400;
}

.hx-mz-long__byline {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: var(--hx-muted);
}

.hx-mz-prose {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--hx-ink);
}

.hx-mz-prose p {
  margin: 0 0 1rem;
}

.hx-mz-prose p:last-child {
  margin-bottom: 0;
}

.hx-mz-prose a {
  color: var(--hx-accent-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hx-mz-cats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hx-mz-cat {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--hx-ink);
}

.hx-mz-cat:hover {
  border-color: var(--hx-accent);
  color: var(--hx-accent);
}

.hx-mz-recent {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius-sm);
  overflow: hidden;
  background: var(--hx-surface);
}

.hx-mz-recent li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hx-line);
}

.hx-mz-recent li:last-child {
  border-bottom: none;
}

.hx-mz-recent a {
  font-weight: 600;
  color: var(--hx-ink);
}

.hx-mz-recent a:hover {
  color: var(--hx-accent-2);
}

.hx-mz-recent span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-muted);
}

.hx-mz-faq {
  margin-bottom: 2.5rem;
  padding: 20px 22px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface-2);
}

.hx-mz-faq details {
  border-bottom: 1px solid var(--hx-line);
  padding: 12px 0;
}

.hx-mz-faq details:last-child {
  border-bottom: none;
}

.hx-mz-faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--hx-ink);
}

.hx-mz-faq details p {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--hx-muted);
}

.hx-mz-faq a {
  color: var(--hx-accent-2);
  font-weight: 600;
}

/* Footer — wide */
.hx-foot--wide {
  max-width: 44rem;
  margin: 0 auto;
  padding-top: 8px;
}

.hx-foot--wide nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 10px;
}

.hx-foot--wide nav a {
  font-weight: 600;
  color: var(--hx-accent-2);
}

.hx-foot--wide nav a:hover {
  color: var(--hx-ink);
}

.hx-foot__mail {
  margin: 0 0 8px;
  font-size: 0.88rem;
}

.hx-foot__mail a {
  color: var(--hx-accent);
  font-weight: 600;
}

/* —— Detail: editorial stack (hero → prose → play → tips → FAQ → related) —— */

.hx-detail-stack {
  max-width: 48rem;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 2rem;
  overflow-x: hidden;
}

.hx-d-body,
.hx-d-flow {
  min-width: 0;
  max-width: 100%;
}

.hx-d-hero {
  margin-bottom: 1.75rem;
}

.hx-d-hero__fig {
  margin: 0 0 16px;
  border-radius: var(--hx-radius);
  overflow: hidden;
  border: 1px solid var(--hx-line-strong);
  background: var(--hx-media-bg);
}

.hx-d-hero__fig img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.hx-d-hero__k {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hx-accent);
}

.hx-d-hero h1 {
  margin: 0 0 12px;
  font-family: var(--hx-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.15;
}

.hx-d-hero__lede {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--hx-muted);
}

.hx-d-section {
  margin-bottom: 1.5rem;
}

.hx-d-sheet {
  padding: 18px 20px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-d-sheet .hx-prose {
  color: var(--hx-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hx-d-sheet .hx-prose img,
.hx-d-sheet .hx-prose iframe,
.hx-d-sheet .hx-prose video,
.hx-d-sheet .hx-prose embed,
.hx-d-sheet .hx-prose table {
  max-width: 100%;
  height: auto;
}

.hx-d-sheet .hx-prose table {
  display: block;
  overflow-x: auto;
}

.hx-d-sheet .hx-prose pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}

.hx-d-sheet h2 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hx-d-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--hx-muted);
}

.hx-d-list li + li {
  margin-top: 8px;
}

.hx-d-playblock {
  margin-bottom: 2rem;
  padding: 18px 18px 20px;
  border-radius: var(--hx-radius);
  border: 2px dashed rgba(124, 58, 237, 0.35);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, var(--hx-surface) 45%);
}

.hx-d-playblock__warn {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--hx-muted);
}

.hx-d-playblock__cta {
  margin-bottom: 14px;
  padding: 14px 22px;
  font-size: 1rem;
}

.hx-d-faq__item {
  border-bottom: 1px solid var(--hx-line);
  padding: 10px 0;
}

.hx-d-faq__item:last-child {
  border-bottom: none;
}

.hx-d-faq__item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.hx-d-faq__item p {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--hx-muted);
}

.hx-d-related {
  margin-top: 0.5rem;
}

/* Detail — playful layout (TOC rail + slant hero + rel strip) */
.hx-detail-editorial .hx-detail-stack {
  max-width: min(58rem, 100%);
}

.hx-detail-editorial .hx-foot--wide {
  max-width: min(58rem, 100%);
}

.hx-d-hero--slant .hx-d-hero__fig {
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

@media (min-width: 720px) {
  .hx-d-hero--slant {
    margin-bottom: 2.25rem;
  }

  .hx-d-hero--slant .hx-d-hero__text {
    margin-top: -2.75rem;
    margin-left: min(5%, 2.5rem);
    margin-right: auto;
    max-width: min(34rem, 94%);
    padding: 1.2rem 1.35rem 1.35rem;
    background: var(--hx-surface);
    border-radius: var(--hx-radius);
    border: 1px solid var(--hx-line-strong);
    box-shadow: var(--hx-shadow);
    position: relative;
    z-index: 2;
  }
}

.hx-d-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.75rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hx-d-body {
    grid-template-columns: 11.5rem minmax(0, 1fr);
  }
}

.hx-d-toc {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  z-index: 4;
  padding: 14px 14px 16px;
  border-radius: var(--hx-radius-sm);
  background: linear-gradient(160deg, var(--hx-surface-2) 0%, var(--hx-surface) 55%);
  border: 1px solid var(--hx-line);
  box-shadow: var(--hx-shadow-sm);
}

.hx-d-toc__label {
  margin: 0 0 10px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hx-accent);
}

.hx-d-toc__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 899px) {
  .hx-d-toc__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.hx-d-toc__nav a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hx-ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid transparent;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.hx-d-toc__nav a:hover {
  border-color: var(--hx-accent-2);
  transform: translateX(2px);
}

@media (max-width: 899px) {
  .hx-d-toc__nav a:hover {
    transform: translateY(-1px);
  }
}

.hx-d-flow > .hx-d-section,
.hx-d-flow > .hx-d-playblock,
.hx-d-flow > .hx-related {
  scroll-margin-top: 6rem;
}

@media (min-width: 900px) {
  .hx-d-flow > .hx-d-section,
  .hx-d-flow > .hx-d-playblock,
  .hx-d-flow > .hx-related {
    scroll-margin-top: 1.25rem;
  }
}

.hx-d-flow > .hx-d-section:nth-child(odd) {
  transform: rotate(-0.12deg);
}

.hx-d-flow > .hx-d-section:nth-child(even) {
  transform: rotate(0.1deg);
}

.hx-d-flow > .hx-d-section {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hx-d-flow > .hx-d-section:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: var(--hx-shadow);
}

.hx-d-related h2 {
  margin: 0 0 14px;
  font-family: var(--hx-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.hx-d-relstrip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.hx-d-relcard {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 148px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--hx-shadow-sm);
  transform: rotate(-1deg);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.hx-d-relcard:nth-child(even) {
  transform: rotate(0.8deg);
}

.hx-d-relcard:hover {
  transform: rotate(0deg) scale(1.03);
  border-color: var(--hx-accent);
}

.hx-d-relcard__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--hx-media-bg);
}

.hx-d-relcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hx-d-relcard__body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hx-d-relcard__t {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hx-d-relcard__g {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-muted);
}

/* Tags / categories — mosaic + atlas bands */
.tags-page.hx-tags-play .hx-main {
  max-width: min(72rem, 100%);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.hx-tag-rail--deck {
  position: relative;
  margin-bottom: 1.75rem;
  padding: 16px 18px 18px;
  border-radius: var(--hx-radius);
  background: var(--hx-surface);
  border: 1px solid var(--hx-line);
  box-shadow: var(--hx-shadow-sm);
}

.hx-tag-rail__hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--hx-muted);
  max-width: 36rem;
}

.hx-pills--float {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hx-pills--float .hx-pill {
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hx-pills--float .hx-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.hx-pills--float .hx-pill.is-active {
  box-shadow: 0 0 0 2px var(--hx-accent), 0 8px 22px rgba(124, 58, 237, 0.2);
}

.hx-cat-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  align-items: end;
  margin-bottom: 1.75rem;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--hx-radius);
  overflow: hidden;
  border: 1px solid var(--hx-line-strong);
  background: linear-gradient(125deg, var(--hx-ink) 0%, #312e81 42%, var(--hx-accent-2) 100%);
  color: #f8fafc;
}

.hx-cat-hero__blob {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  top: -40px;
  right: -30px;
  pointer-events: none;
}

.hx-cat-hero__back {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.85);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.hx-cat-hero__back:hover {
  color: #fff;
  text-decoration: underline;
}

.hx-cat-hero__inner {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hx-cat-hero__eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hx-cat-hero__title {
  margin: 0 0 8px;
  font-family: var(--hx-display);
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.05;
}

.hx-cat-hero__sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.9;
  max-width: 36rem;
}

.hx-cat-hero__badge {
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 3.5rem;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--hx-display);
  font-size: 1.75rem;
  font-weight: 400;
  text-align: center;
  line-height: 1;
}

.hx-cat-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}

.hx-cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #f8fafc;
  background: var(--hx-ink);
  border: 1px solid var(--hx-line-strong);
  box-shadow: var(--hx-shadow-sm);
  transform: rotate(-0.35deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, z-index 0s linear 0.18s;
}

.hx-cat-tile:nth-child(3n + 2) {
  transform: rotate(0.45deg);
}

.hx-cat-tile:nth-child(5n) {
  transform: rotate(-0.2deg) translateY(4px);
}

.hx-cat-tile:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 3;
  box-shadow: var(--hx-shadow);
}

.hx-cat-tile__media {
  display: block;
  aspect-ratio: 4 / 3;
}

.hx-cat-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
  transition: opacity 0.15s ease;
}

.hx-cat-tile:hover .hx-cat-tile__media img {
  opacity: 1;
}

.hx-cat-tile__cap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.92) 28%);
  margin-top: -3.2rem;
  position: relative;
}

.hx-cat-tile__t {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hx-cat-tile__g {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.hx-tags-atlas {
  margin-bottom: 1.75rem;
  padding: 22px 22px 26px;
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-line);
  background: linear-gradient(180deg, var(--hx-surface) 0%, var(--hx-surface-2) 100%);
  box-shadow: var(--hx-shadow-sm);
}

.hx-tags-atlas__eyebrow {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hx-accent-2);
}

.hx-tags-atlas__h {
  margin: 0 0 10px;
  font-family: var(--hx-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 400;
}

.hx-tags-atlas__sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--hx-muted);
  max-width: 40rem;
}

.hx-tags-band {
  margin-bottom: 1.75rem;
  padding: 18px 18px 20px;
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
  transform: skewY(-0.25deg);
}

.hx-tags-band--alt {
  background: linear-gradient(135deg, var(--hx-surface) 60%, rgba(13, 148, 136, 0.08));
  border-color: rgba(13, 148, 136, 0.25);
  transform: skewY(0.2deg);
}

.hx-tags-band .hx-bento {
  transform: skewY(0.25deg);
}

.hx-tags-band--alt .hx-bento {
  transform: skewY(-0.2deg);
}

.hx-tags-band__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.hx-tags-band__idx {
  font-family: var(--hx-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--hx-line-strong);
  line-height: 1;
}

.hx-tags-band__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
}

.hx-tags-band__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.hx-tags-band__title a:hover {
  border-bottom-color: var(--hx-accent);
}

.hx-tags-band__count {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hx-muted);
}

/* —— Search hub —— */
.hx-search-hub .hx-main {
  max-width: min(70rem, 100%);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 2rem;
}

.hx-search-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 20px;
  align-items: end;
  margin-bottom: 1.5rem;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--hx-radius);
  overflow: hidden;
  border: 1px solid var(--hx-line-strong);
  background: linear-gradient(118deg, #0f172a 0%, #3730a3 48%, var(--hx-accent-2) 100%);
  color: #f8fafc;
}

.hx-search-hero__spark {
  position: absolute;
  inset: -20% 40% auto -10%;
  height: 140%;
  background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}

.hx-search-hero__inner {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hx-search-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hx-search-hero__h {
  margin: 0 0 10px;
  font-family: var(--hx-display);
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 400;
  line-height: 1.05;
}

.hx-search-hero__sub {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.9;
  max-width: 36rem;
}

.hx-search-hero__stat {
  position: relative;
  z-index: 1;
  text-align: right;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hx-search-hero__stat strong {
  display: block;
  font-family: var(--hx-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.hx-search-hero__stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hx-search-bolt {
  margin-bottom: 1.5rem;
  padding: 18px 18px 16px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-search-bolt__form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.hx-search-bolt__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--hx-line-strong);
  font: inherit;
  font-size: 1rem;
  background: var(--hx-surface-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hx-search-bolt__input:focus {
  outline: none;
  border-color: var(--hx-accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.hx-search-bolt__go {
  padding: 14px 22px;
}

.hx-search-chips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hx-search-chips a {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--hx-surface-2);
  border: 1px solid var(--hx-line);
  color: var(--hx-ink);
  text-decoration: none;
}

.hx-search-chips a:hover {
  border-color: var(--hx-accent-2);
  color: var(--hx-accent-2);
}

.hx-search-stage__hint {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--hx-muted);
}

.hx-search-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.hx-search-tile {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
  transform: rotate(-0.25deg);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.hx-search-tile:nth-child(4n + 2) {
  transform: rotate(0.35deg);
}

.hx-search-tile:nth-child(4n + 3) {
  transform: rotate(-0.15deg) translateY(3px);
}

.hx-search-tile:hover {
  transform: rotate(0deg) scale(1.02);
  z-index: 2;
  box-shadow: var(--hx-shadow);
}

.hx-search-tile__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.hx-search-tile__media {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--hx-media-bg);
}

.hx-search-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hx-search-tile__body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hx-search-tile__t {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hx-search-tile__g {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-muted);
}

.hx-search-empty {
  margin-top: 1.25rem;
  padding: 16px 18px;
  border-radius: var(--hx-radius-sm);
  border: 1px dashed var(--hx-line-strong);
  background: var(--hx-surface-2);
  font-size: 0.9rem;
  color: var(--hx-muted);
}

.hx-search-empty a {
  color: var(--hx-accent-2);
  font-weight: 700;
}

/* —— Info / doc pages —— */
.hx-doc .hx-main.hx-info {
  max-width: min(46rem, 100%);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 2rem;
}

.hx-info-hero {
  position: relative;
  margin-bottom: 1.5rem;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--hx-radius);
  overflow: hidden;
  border: 1px solid var(--hx-line-strong);
  color: #f8fafc;
}

.hx-info-hero--mint {
  background: linear-gradient(135deg, #134e4a 0%, #0f766e 42%, #312e81 100%);
}

.hx-info-hero--violet {
  background: linear-gradient(125deg, #1e1b4b 0%, #5b21b6 50%, #c026d3 100%);
}

.hx-info-hero--slate {
  background: linear-gradient(120deg, #0f172a 0%, #334155 55%, #0d9488 100%);
}

.hx-info-hero--amber {
  background: linear-gradient(130deg, #431407 0%, #9a3412 45%, #ca8a04 100%);
}

.hx-info-hero--ink {
  background: linear-gradient(115deg, #020617 0%, #1e293b 40%, #4338ca 100%);
}

.hx-info-hero__eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.88;
}

.hx-info-hero__h {
  margin: 0 0 10px;
  font-family: var(--hx-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 400;
  line-height: 1.08;
}

.hx-info-hero__sub {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 38rem;
}

.hx-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 2rem;
}

@media (min-width: 560px) {
  .hx-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hx-info-tilt {
  padding: 20px 20px 22px;
  border-radius: var(--hx-radius-sm);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
  transform: rotate(-0.4deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hx-info-tilt--violet {
  transform: rotate(0.35deg);
  border-color: rgba(124, 58, 237, 0.35);
  background: linear-gradient(160deg, #faf5ff 0%, var(--hx-surface) 70%);
}

.hx-info-tilt:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: var(--hx-shadow);
}

.hx-info-tilt__k {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hx-accent);
}

.hx-info-tilt__p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--hx-muted);
}

.hx-info-card {
  margin-bottom: 2rem;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-line);
  background: var(--hx-surface);
  box-shadow: var(--hx-shadow-sm);
}

.hx-info-card--flat {
  transform: none;
}

.hx-info-card--prose {
  transform: none;
  border-left: 4px solid var(--hx-accent-2);
}

.hx-prose--legal {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--hx-ink);
}

.hx-prose--legal p {
  margin: 0 0 1rem;
}

.hx-form--spark {
  gap: 12px;
}

.hx-form--spark input,
.hx-form--spark textarea {
  border-left: 3px solid var(--hx-accent);
  border-radius: 10px;
  padding: 12px 14px;
}

.hx-form--spark textarea {
  min-height: 140px;
}

.hx-form--spark .hx-btn {
  align-self: flex-start;
  margin-top: 4px;
}
