:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f7f7;
  --surface-raised: #ffffff;
  --text: #0a0a0a;
  --text-soft: #3c3c3c;
  --muted: #777777;
  --muted-light: #a6a6a6;
  --line: #e9e9e9;
  --line-strong: #d7d7d7;
  --type-accent: #111111;
  --content: 1480px;
  --font-ui: Inter, "SF Pro Display", "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --ease: cubic-bezier(.22, .8, .22, 1);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: #fff;
  scroll-behavior: smooth;
}

@media (min-width: 821px) {
  html { scrollbar-gutter: stable; }

  @supports not (scrollbar-gutter: stable) {
    html { overflow-y: scroll; }
  }
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #111; color: #fff; }

button,
input { font: inherit; }

button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

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

/* Shared brand */

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: #0a0a0a;
}

.site-brand-logo {
  width: 34px;
  height: 34px;
  flex: none;
}

.site-brand > span:last-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.site-brand small {
  color: #777;
  font-size: 13px;
  font-weight: 430;
  letter-spacing: -.01em;
}

/* Home — Cosmos-inspired scroll narrative */

.home-page {
  --hero-opacity: 1;
  --field-opacity: 1;
  --reel-opacity: 0;
  --reel-y: 88svh;
  --reel-scale: .76;
  --scroll-shift: 0px;
  min-height: 100svh;
  overflow-x: hidden;
  background: #fff;
}

.home-page main { overflow: clip; }

.home-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 78px;
  padding: 0 clamp(24px, 2.7vw, 44px);
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0);
  transition: background .35s ease, border-color .35s ease;
  pointer-events: none;
}

.home-page.is-scrolled .home-header {
  border-color: rgba(0, 0, 0, .055);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(140%);
}

.home-header > * { pointer-events: auto; }

.home-nav {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.4vw, 52px);
}

.home-nav a {
  position: relative;
  color: #3f3f3f;
  font-size: 13px;
  font-weight: 520;
  transition: color .2s ease;
}

.home-nav a::after {
  position: absolute;
  right: 50%;
  bottom: -8px;
  left: 50%;
  height: 1px;
  background: #111;
  transition: right .25s var(--ease), left .25s var(--ease);
  content: "";
}

.home-nav a:hover { color: #000; }
.home-nav a:hover::after { right: 0; left: 0; }

.home-stage {
  position: relative;
  height: 220svh;
  isolation: isolate;
}

.home-stage-sticky {
  position: sticky;
  top: 0;
  display: grid;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  place-items: center;
}

.floating-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: var(--field-opacity);
  transform: translate3d(0, var(--scroll-shift), 0);
  transition: opacity .12s linear;
  pointer-events: none;
}

.float-slot {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  opacity: 0;
  transform: translate3d(var(--shift-x, 0), calc(var(--shift-y, 0px) + 12px), 0);
  transition: opacity 1.2s var(--ease), transform 1.4s var(--ease), filter .6s ease;
  will-change: transform;
}

.home-page.is-ready .float-slot {
  opacity: var(--alpha);
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
}

.float-slot:nth-child(3n + 2) { transition-delay: .12s; }
.float-slot:nth-child(3n) { transition-delay: .23s; }

.float-tile {
  --drift-x: 22px;
  --drift-y: -20px;
  --drift-rotate: 2.4deg;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .045);
  border-radius: 14px;
  background: #f7f7f7;
  box-shadow: 0 9px 24px rgba(0, 0, 0, .075), 0 2px 7px rgba(0, 0, 0, .035);
  transform: translate3d(-8px, -9px, 0) rotate(calc(var(--r) - 1.8deg)) scale(.985);
  transform-origin: center;
  animation: tile-drift var(--duration) cubic-bezier(.45, .05, .55, .95) var(--delay) infinite alternate;
  transition: box-shadow .55s var(--ease), filter .55s ease;
  will-change: transform;
}

.float-slot:nth-child(3n + 2) .float-tile {
  --drift-x: -24px;
  --drift-y: 18px;
  --drift-rotate: -2.8deg;
}

.float-slot:nth-child(3n) .float-tile {
  --drift-x: 17px;
  --drift-y: 25px;
  --drift-rotate: 3.2deg;
}

.float-tile.is-wide { aspect-ratio: 1.35 / 1; }

.float-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.is-faint .float-tile {
  filter: blur(1px) saturate(.75);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .025);
}

.dialogue-fragment .float-tile {
  display: grid;
  min-height: 84px;
  aspect-ratio: auto;
  padding: 14px;
  place-items: center;
  color: #777;
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.quote-fragment .float-tile {
  display: grid;
  color: #aaa;
  font-size: 25px;
  place-items: center;
}

.home-center {
  position: relative;
  z-index: 10;
  width: min(760px, calc(100% - 48px));
  opacity: 0;
  text-align: center;
  transform: translateY(12px);
  transition: opacity .9s .18s var(--ease), transform 1s .18s var(--ease);
}

.home-page.is-ready .home-center { opacity: var(--hero-opacity); transform: translateY(0); }

.home-wordmark,
.home-section-head > p,
.method-heading > p,
.academic-intro > p,
.closing-center > p {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.home-wordmark { margin-bottom: 32px; }

.home-center h1 {
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(38px, 3.45vw, 52px);
  line-height: 1.13;
  font-weight: 470;
  letter-spacing: 0;
}

.home-entries {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 42px;
}

.home-entry {
  display: inline-flex;
  min-width: 146px;
  height: 54px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid #d4d4d4;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .035);
  color: #111;
  font-size: 13px;
  font-weight: 520;
  transition: color .32s var(--ease), background .32s var(--ease), border-color .32s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}

.home-entry small {
  color: #8b8b8b;
  font-size: 11px;
  font-weight: 500;
  transition: color .32s ease;
}

.home-entry svg { width: 17px; height: 17px; }

.home-entry:hover,
.home-entry:focus-visible {
  border-color: #0b0b0b;
  background: #0b0b0b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
  color: #fff;
  transform: translateY(-3px);
}

.home-entry:hover small,
.home-entry:focus-visible small { color: #bbb; }

.feature-reel {
  position: absolute;
  display: block;
  left: 50%;
  bottom: clamp(28px, 5vh, 58px);
  z-index: 30;
  width: min(1180px, calc(100% - 64px));
  height: min(72svh, 720px);
  overflow: hidden;
  border-radius: 8px;
  background: #111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .12);
  opacity: var(--reel-opacity);
  transform: translate3d(-50%, var(--reel-y), 0) scale(var(--reel-scale));
  transform-origin: bottom center;
  transition: box-shadow .35s ease;
  pointer-events: none;
  will-change: transform, opacity;
}

.home-page.is-scrolled .feature-reel { pointer-events: auto; }
.feature-reel:hover { box-shadow: 0 30px 96px rgba(0, 0, 0, .18); }

.feature-reel-media,
.feature-reel-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.feature-reel-media {
  background: #111 url("./assets/prompt-gallery/video/video-prompt-001.jpg") center / cover no-repeat;
}
.feature-reel-media::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18), transparent 38%, rgba(0, 0, 0, .14));
  content: "";
  pointer-events: none;
}
.feature-reel-media img {
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .8s ease, transform 1.6s var(--ease);
  will-change: opacity, transform;
}
.feature-reel-media img.is-active { opacity: 1; transform: scale(1.015); }

.feature-reel-label {
  position: absolute;
  top: 30px;
  left: 32px;
  z-index: 2;
  color: #fff;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 520;
}

.feature-reel-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  min-height: 76px;
  padding: 0 32px;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, .82);
  color: #fff;
}

.feature-reel-meta strong { font-size: 15px; font-weight: 560; }
.feature-reel-meta small { color: #c8c8c8; font-size: 12px; }

.home-section { padding: clamp(110px, 12vw, 190px) clamp(28px, 4.8vw, 76px); }

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s var(--ease), transform 1s var(--ease);
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.search-world { background: #fff; }

.home-section-head {
  width: min(1120px, 100%);
  margin: 0 auto 72px;
  text-align: center;
}

.home-section-head h2,
.method-heading h2,
.academic-intro h2,
.closing-center h2 {
  margin: 22px 0 0;
  font-size: clamp(52px, 7vw, 104px);
  line-height: 1.02;
  font-weight: 430;
  letter-spacing: 0;
}

.search-scene {
  position: relative;
  width: min(1320px, 100%);
  height: min(62vw, 680px);
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #dfdfd4;
}

.search-scene-image {
  position: absolute;
  overflow: hidden;
  border-radius: 3px;
  transition: transform .7s var(--ease), filter .35s ease;
}

.search-scene-image:hover { filter: brightness(.92); transform: translateY(-8px); }
.search-scene-image img { width: 100%; height: 100%; object-fit: cover; }
.search-scene-image-a { top: 7%; left: 6%; width: 27%; height: 77%; }
.search-scene-image-b { top: 14%; left: 41%; width: 22%; height: 61%; }
.search-scene-image-c { top: 8%; right: 6%; width: 27%; height: 78%; }

.search-prompt {
  position: absolute;
  top: 42%;
  left: 50%;
  z-index: 3;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  width: min(520px, 56%);
  min-height: 66px;
  padding: 0 24px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 999px;
  background: rgba(123, 123, 107, .93);
  color: #fff;
  transform: translate(-50%, -50%);
  transition: background .3s ease, transform .35s var(--ease);
  backdrop-filter: blur(12px);
}

.search-prompt:hover { background: #111; transform: translate(-50%, calc(-50% - 4px)); }
.search-prompt svg { width: 20px; height: 20px; }
.search-prompt span { font-size: 15px; transition: opacity .2s ease, transform .2s ease; }
.search-prompt span.is-changing { opacity: 0; transform: translateY(6px); }
.search-prompt small { color: rgba(255, 255, 255, .68); font-size: 10px; }

.search-world-note {
  max-width: 760px;
  margin: 76px auto 0;
  color: #575757;
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.35;
  text-align: center;
}

.method-section {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.2fr) minmax(250px, .7fr);
  width: min(1440px, 100%);
  min-height: 920px;
  margin: 0 auto;
  align-items: center;
  gap: clamp(42px, 5vw, 86px);
}

.method-heading h2 { font-size: clamp(52px, 5.6vw, 86px); }

.method-index { border-top: 1px solid #d9d9d9; }

.method-index a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  min-height: 94px;
  padding: 0 6px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #d9d9d9;
  transition: padding .35s var(--ease), background .25s ease;
}

.method-index a:hover { padding-right: 14px; padding-left: 14px; background: #f5f5f3; }
.method-index span { color: #9b9b9b; font-size: 12px; }
.method-index strong { font-size: clamp(21px, 2vw, 30px); font-weight: 470; }
.method-index small { color: #777; font-size: 11px; }

.method-copy { align-self: end; padding-bottom: 72px; }
.method-copy p { margin: 0 0 28px; color: #545454; font-size: 18px; line-height: 1.65; }
.method-copy a,
.academic-action { display: inline-flex; align-items: center; gap: 10px; border-bottom: 1px solid #111; padding-bottom: 5px; font-size: 13px; font-weight: 560; }

.academic-section {
  background: #f3f3ef;
}

.academic-intro {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(320px, 1.15fr) minmax(280px, .8fr);
  width: min(1320px, 100%);
  margin: 0 auto 90px;
  align-items: end;
  gap: 40px;
}

.academic-intro h2 { margin: 0; font-size: clamp(58px, 7vw, 108px); }
.academic-intro > span { color: #626262; font-size: 18px; line-height: 1.6; }

.academic-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1320px, 100%);
  margin: 0 auto;
  border-top: 1px solid #cfcfca;
  border-bottom: 1px solid #cfcfca;
}

.academic-steps a {
  display: flex;
  min-height: 290px;
  padding: 30px clamp(18px, 2.2vw, 34px);
  flex-direction: column;
  border-right: 1px solid #cfcfca;
  transition: background .3s ease, transform .4s var(--ease);
}

.academic-steps a:last-child { border-right: 0; }
.academic-steps a:hover { background: #fff; transform: translateY(-8px); }
.academic-steps span { color: #949494; font-size: 12px; }
.academic-steps small { margin-top: 58px; color: #707070; font-size: 11px; }
.academic-steps strong { margin-top: 15px; font-size: clamp(21px, 2vw, 30px); line-height: 1.25; font-weight: 480; }
.academic-steps em { margin-top: auto; color: #656565; font-size: 13px; line-height: 1.6; font-style: normal; }

.academic-action { margin: 54px 0 0 calc((100% - min(1320px, 100%)) / 2); }

.closing-field {
  position: relative;
  display: grid;
  min-height: 920px;
  overflow: hidden;
  place-items: center;
  background: #fff;
}

.closing-center { position: relative; z-index: 4; text-align: center; }
.closing-center h2 { font-size: clamp(50px, 6.2vw, 92px); }
.closing-center > div { display: flex; justify-content: center; gap: 10px; margin-top: 42px; }

.closing-center a {
  display: inline-flex;
  min-width: 112px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  font-size: 12px;
  transition: color .3s ease, background .3s ease, transform .3s var(--ease);
}

.closing-center a:hover { background: #111; color: #fff; transform: translateY(-3px); }

.closing-orbit { position: absolute; inset: 0; pointer-events: none; }
.closing-orbit img {
  position: absolute;
  width: clamp(54px, 6vw, 92px);
  aspect-ratio: 1;
  border-radius: 13px;
  object-fit: cover;
  opacity: .7;
  animation: closing-drift 9s ease-in-out infinite alternate;
}

.closing-orbit img:nth-child(1) { top: 14%; left: 5%; transform: rotate(-8deg); }
.closing-orbit img:nth-child(2) { top: 10%; left: 28%; animation-delay: -3s; }
.closing-orbit img:nth-child(3) { top: 15%; right: 19%; animation-delay: -6s; transform: rotate(7deg); }
.closing-orbit img:nth-child(4) { top: 8%; right: 4%; animation-delay: -2s; }
.closing-orbit img:nth-child(5) { top: 48%; left: 9%; animation-delay: -5s; }
.closing-orbit img:nth-child(6) { bottom: 10%; left: 23%; animation-delay: -7s; transform: rotate(6deg); }
.closing-orbit img:nth-child(7) { bottom: 7%; left: 48%; animation-delay: -1s; }
.closing-orbit img:nth-child(8) { right: 26%; bottom: 12%; animation-delay: -4s; transform: rotate(-7deg); }
.closing-orbit img:nth-child(9) { right: 7%; bottom: 22%; animation-delay: -8s; }
.closing-orbit img:nth-child(10) { top: 44%; right: 10%; animation-delay: -2.5s; }

.home-page.is-leaving .home-center {
  opacity: 0;
  transform: scale(.98);
  transition-delay: 0s;
  transition-duration: .3s;
}

.home-page.is-leaving .float-slot {
  opacity: 0;
  filter: blur(4px);
  transition-delay: 0s;
  transition-duration: .36s;
}

@keyframes tile-drift {
  from { transform: translate3d(-8px, -9px, 0) rotate(calc(var(--r) - 1.8deg)) scale(.985); }
  to { transform: translate3d(var(--drift-x), var(--drift-y), 0) rotate(calc(var(--r) + var(--drift-rotate))) scale(1.02); }
}

@keyframes closing-drift {
  from { translate: -10px -12px; }
  to { translate: 15px 18px; }
}

/* Library shell */

.library-page {
  --type-accent: #111;
  background: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 0 clamp(22px, 2.6vw, 42px);
  border-bottom: 1px solid rgba(0, 0, 0, .075);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px) saturate(150%);
}

.primary-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 46px;
}

.primary-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #555;
  font-size: 13px;
  font-weight: 510;
  transition: color .2s ease;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.primary-nav a:hover,
.primary-nav a.is-active { color: #000; }
.primary-nav a.is-active::after { background: #111; }

.header-home-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  color: #333;
  font-size: 12px;
  transition: border-color .2s ease, background .2s ease, transform .25s var(--ease);
}

.header-home-link svg { width: 15px; height: 15px; }

.header-home-link:hover {
  border-color: #bbb;
  background: #fafafa;
  transform: translateX(-2px);
}

/* Library hero */

.category-hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 290px;
  overflow: hidden;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.category-hero-copy {
  position: relative;
  z-index: 3;
  width: min(720px, calc(100% - 40px));
  padding: 54px 20px 44px;
  text-align: center;
}

.category-hero h1 {
  margin: 0;
  font-size: clamp(46px, 3.8vw, 58px);
  line-height: 1.06;
  font-weight: 560;
  letter-spacing: -.06em;
}

.category-hero-copy > p {
  max-width: 570px;
  margin: 17px auto 0;
  color: #6f6f6f;
  font-size: 14px;
  line-height: 1.7;
}

.category-stat {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 7px;
  margin-top: 26px;
}

.category-stat strong {
  font-size: 16px;
  font-weight: 560;
}

.category-stat span {
  color: #858585;
  font-size: 11px;
}

.category-hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-shot {
  position: absolute;
  width: 82px;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, .04);
  border-radius: 13px;
  background: #f7f7f7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

.hero-shot img { width: 100%; height: 100%; object-fit: cover; }

.hero-shot-1 {
  top: 31px;
  right: 7%;
  transform: rotate(7deg);
}

.hero-shot-2 {
  top: 148px;
  right: 14%;
  width: 68px;
  opacity: .74;
  transform: rotate(-6deg);
}

.hero-shot-3 {
  top: 54px;
  left: 7%;
  width: 74px;
  opacity: .82;
  transform: rotate(-8deg);
}

.hero-shot-4 {
  top: 166px;
  left: 15%;
  width: 58px;
  opacity: .45;
  transform: rotate(7deg);
}

.hero-shot-5 {
  top: 30px;
  left: 25%;
  width: 48px;
  opacity: .16;
  transform: rotate(5deg);
}

.hero-shot-6 {
  top: 105px;
  right: 26%;
  width: 52px;
  opacity: .18;
  transform: rotate(-7deg);
}

.hero-shot-7 {
  top: 174px;
  right: 5%;
  width: 62px;
  opacity: .58;
  transform: rotate(8deg);
}

.type-video .hero-shot { aspect-ratio: 1.35 / 1; }

.type-workflow .dialogue-hero-symbol {
  opacity: 1;
  background: none;
}

.type-workflow .category-hero { min-height: 250px; }

.type-workflow .dialogue-hero-symbol::before,
.type-workflow .dialogue-hero-symbol::after {
  position: absolute;
  top: 50%;
  width: 34%;
  height: 125px;
  border: 1px solid #efefef;
  border-radius: 50%;
  opacity: .8;
  transform: translateY(-50%) rotate(8deg);
  content: "";
}

.type-workflow .dialogue-hero-symbol::before { left: 4%; }
.type-workflow .dialogue-hero-symbol::after { right: 3%; transform: translateY(-50%) rotate(-8deg); }

.type-workflow .category-hero::before,
.type-workflow .category-hero::after {
  position: absolute;
  z-index: 2;
  color: #f1f1f1;
  font-size: 88px;
  line-height: 1;
  content: "“";
}

.type-workflow .category-hero::before { top: 37px; left: 6%; }
.type-workflow .category-hero::after { right: 7%; bottom: 28px; content: "”"; }

/* Integrated catalog controls */

.catalog {
  width: min(var(--content), calc(100% - 64px));
  margin: 0 auto;
  padding-bottom: 96px;
}

.catalog-controls {
  position: sticky;
  top: 72px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(22px, 3vw, 46px);
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px) saturate(150%);
}

.search-field {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-field:focus-within {
  border-color: #bcbcbc;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.search-field svg { flex: 0 0 auto; width: 17px; height: 17px; color: #9a9a9a; }

.search-field input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font-size: 11px;
}

.search-field input::placeholder { color: #9a9a9a; }

.search-field kbd {
  min-width: 20px;
  padding: 2px 5px;
  border: 1px solid #e6e6e6;
  border-radius: 4px;
  color: #aaa;
  background: #fafafa;
  font-family: var(--font-ui);
  font-size: 9px;
  text-align: center;
}

.category-filter-row { min-width: 0; }
.filter-label { display: none; }

.category-tabs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(20px, 2.5vw, 38px);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 11px;
  white-space: nowrap;
}

.category-tabs button::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 2px;
  background: #111;
  transition: right .25s var(--ease), left .25s var(--ease);
  content: "";
}

.category-tabs button:hover,
.category-tabs button.is-active { color: #111; }

.category-tabs button.is-active { font-weight: 620; }
.category-tabs button.is-active::after { right: 0; left: 0; }
.category-tabs small { display: none; }

.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.result-count { display: none; }

.sort-button {
  min-width: 68px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 10px;
  transition: border-color .2s ease, background .2s ease;
}

.sort-button:hover { border-color: #bbb; background: #fafafa; }

/* Visual prompt gallery */

.prompt-grid {
  padding-top: 18px;
  columns: 4 280px;
  column-gap: 18px;
}

.prompt-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
  break-inside: avoid;
}

.prompt-card[data-card-open-id] { cursor: pointer; }

.card-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f5f5f5;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .035);
}

.prompt-card:nth-child(4n + 2) .card-media { aspect-ratio: 4 / 3; }
.prompt-card:nth-child(4n + 3) .card-media { aspect-ratio: 1; }
.prompt-card:nth-child(7n + 4) .card-media { aspect-ratio: 3 / 4; }
.type-video .prompt-grid { columns: 3 360px; }
.type-video .card-media,
.type-video .prompt-card:nth-child(n) .card-media { aspect-ratio: 16 / 10; }

.card-media::after {
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72));
  opacity: .78;
  transition: opacity .4s ease;
  content: "";
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease), filter .45s ease;
}

.prompt-card:hover .card-media img { transform: scale(1.035); }
.prompt-card:hover .card-media::after { opacity: .92; }

.card-media > span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  background: rgba(255, 255, 255, .72);
  color: #222;
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 560;
}

.card-media > small { display: none; }

.card-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  padding: 18px 16px 14px;
  color: #fff;
  pointer-events: none;
}

.card-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }

.card-title-trigger {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  pointer-events: auto;
}

.card-title-trigger h3 { transition: opacity .25s ease, transform .3s var(--ease); }
.card-title-trigger:hover h3,
.card-title-trigger:focus-visible h3 { opacity: .78; transform: translateX(2px); }

.card-title-row .card-title-trigger h3 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 590;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.card-model {
  flex: 0 0 auto;
  max-width: 42%;
  overflow: hidden;
  color: rgba(255, 255, 255, .7);
  font-size: 8px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-summary,
.prompt-snippet,
.card-tags { display: none; }

.card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(8px);
  transition: max-height .4s var(--ease), margin .4s var(--ease), opacity .3s ease, transform .4s var(--ease);
}

.prompt-card:hover .card-actions,
.prompt-card:focus-within .card-actions {
  max-height: 30px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.copy-card-button,
.detail-card-button {
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font-size: 9px;
  font-weight: 560;
}

.copy-card-button:hover,
.detail-card-button:hover { color: #fff; }
.detail-card-button span { display: inline; margin-left: 3px; }

/* Dialogue editorial index */

.type-workflow .prompt-grid { display: block; padding-top: 0; columns: auto; }
.type-workflow .prompt-card { display: grid; width: 100%; margin: 0; overflow: visible; }

.chat-prompt-card {
  grid-template-columns: 64px minmax(260px, 1.65fr) minmax(130px, .7fr) minmax(120px, .6fr) minmax(190px, .9fr) 42px;
  position: relative;
  align-items: center;
  gap: 24px;
  min-height: 112px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
  transition: background-color .22s ease;
}

.chat-prompt-card:hover,
.chat-prompt-card:focus-within { background: #fbfbfb; }

.chat-index {
  align-self: center;
  color: #4f4f4f;
  font-size: 40px;
  line-height: 1;
  font-weight: 280;
  letter-spacing: -.06em;
  transition: color .22s ease;
}

.chat-prompt-card:hover .chat-index,
.chat-prompt-card:focus-within .chat-index { color: #000; }
.chat-card-copy { min-width: 0; }

.chat-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.chat-card-head > span { color: #688276; font-size: 9px; font-weight: 600; }
.chat-card-head > small { color: #aaa; font-size: 8px; }

.chat-card-copy .card-title-trigger h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 620; }

.chat-card-summary {
  display: -webkit-box;
  max-width: 590px;
  margin: 6px 0 0;
  overflow: hidden;
  color: #777;
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-fact { min-width: 0; }
.chat-fact small,
.chat-card-result small { display: block; margin-bottom: 7px; color: #aaa; font-size: 8px; }

.chat-fact strong {
  display: block;
  overflow: hidden;
  color: #333;
  font-size: 10px;
  line-height: 1.45;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-card-result { min-width: 0; }

.chat-card-result p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #333;
  font-size: 10px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-open-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #fff;
  color: #555;
  transition: border-color .22s ease, background-color .22s ease, color .22s ease;
}

.chat-open-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .28s var(--ease);
}

.chat-open-button:hover,
.chat-open-button:focus-visible,
.chat-prompt-card:hover .chat-open-button {
  border-color: #111;
  background: #111;
  color: #fff;
}

.chat-open-button:hover svg,
.chat-open-button:focus-visible svg,
.chat-prompt-card:hover .chat-open-button svg { transform: translateX(2px); }

/* Empty state and footer */

.empty-state {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  color: #888;
  text-align: center;
}

.empty-state strong { color: #111; font-size: 24px; font-weight: 560; }
.empty-state span { font-size: 11px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px clamp(24px, 3vw, 48px);
  border-top: 1px solid var(--line);
  color: #888;
  font-size: 11px;
  line-height: 1.5;
}

.site-footer span:first-child { color: #333; font-weight: 620; }

/* Detail dialog */

.detail-dialog {
  width: min(1180px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100svh - 48px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 18px;
  background: #fff;
  color: #111;
  box-shadow: 0 38px 100px rgba(0, 0, 0, .22);
}

.detail-dialog[open] { animation: dialog-in .38s var(--ease) both; }
.detail-dialog::backdrop { background: rgba(20, 20, 20, .26); backdrop-filter: blur(10px); }

.detail-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
  max-height: calc(100svh - 50px);
}

.detail-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #e1e1e1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  color: #333;
  backdrop-filter: blur(12px);
}

.detail-close svg { width: 16px; height: 16px; }
.detail-close:hover { border-color: #bbb; background: #f7f7f7; }

.detail-visual {
  display: grid;
  min-height: 620px;
  place-items: center;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f6f6f6;
}

.detail-visual figure { position: relative; width: 100%; height: 100%; margin: 0; }
.detail-visual img { width: 100%; height: 100%; object-fit: contain; }

.detail-visual figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, .88);
  color: #555;
  font-size: 12px;
  line-height: 1.5;
  backdrop-filter: blur(12px);
}

.detail-visual[hidden] { display: none; }

.detail-content { max-height: calc(100svh - 50px); padding: 48px 48px 58px; overflow: auto; }
.detail-meta { margin: 0 0 14px; color: #777; font-size: 11px; font-weight: 650; letter-spacing: .12em; }

.detail-content h2 {
  max-width: calc(100% - 46px);
  margin: 0;
  font-size: 36px;
  line-height: 1.16;
  font-weight: 570;
  letter-spacing: -.045em;
}

.detail-summary { margin: 16px 0 0; color: #606060; font-size: 15px; line-height: 1.75; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }

.detail-tags span,
.workflow-variables span {
  padding: 5px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  color: #777;
  background: #fafafa;
  font-size: 12px;
}

.detail-dialog.is-chat-detail { width: min(1120px, calc(100% - 48px)); }
.detail-dialog.is-chat-detail .detail-shell { grid-template-columns: 1fr; }
.detail-dialog.is-chat-detail .detail-content { padding: 54px 72px 72px; }

.workflow-guide { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line); }
.workflow-guide[hidden] { display: none; }
.workflow-guide-head p { margin: 0 0 8px; color: #999; font-size: 11px; letter-spacing: .12em; }
.workflow-guide-head h3 { margin: 0; font-size: 28px; font-weight: 590; }

.workflow-guide-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.workflow-guide-meta > span { display: grid; gap: 6px; min-width: 0; padding: 14px; background: #fff; }
.workflow-guide small,
.workflow-guide-section h4,
.workflow-guide-result b { color: #888; font-size: 12px; font-weight: 580; }
.workflow-guide-meta strong { color: #333; font-size: 10px; font-weight: 560; }
.workflow-guide-section { margin-top: 21px; }
.workflow-guide-section h4 { margin: 0 0 9px; }

.workflow-guide-meta strong { font-size: 14px; }
.workflow-guide-section p,
.workflow-guide-section ol { margin: 0; color: #505050; font-size: 15px; line-height: 1.85; }
.workflow-guide-section ol { padding-left: 19px; }
.workflow-guide-section li + li { margin-top: 5px; }
.workflow-variables { display: flex; flex-wrap: wrap; gap: 7px; }

.workflow-guide-result {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 16px;
  border-left: 2px solid #111;
  border-radius: 0 8px 8px 0;
  background: #fafafa;
}

.workflow-guide-result > span { display: grid; gap: 6px; }
.workflow-guide-result strong { color: #292929; font-size: 15px; line-height: 1.7; font-weight: 570; }
.workflow-guide-result p { margin: 0; color: #666; font-size: 14px; line-height: 1.75; }
.workflow-guide-result b { display: block; margin-bottom: 4px; }

.prompt-block {
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.prompt-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: #777;
  font-size: 13px;
  font-weight: 560;
}

.prompt-block-head button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 12px;
}

.prompt-block-head button:hover { border-color: #aaa; color: #000; }

.prompt-block pre {
  margin: 0;
  padding: 17px;
  overflow: auto;
  color: #444;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-facts {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 9px 14px;
  margin: 26px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.detail-facts dt { color: #aaa; }
.detail-facts dd { margin: 0; color: #444; }
.detail-facts a { color: #111; text-decoration: underline; text-underline-offset: 3px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 80;
  min-width: 190px;
  padding: 12px 16px;
  border: 1px solid #222;
  border-radius: 999px;
  background: rgba(15, 15, 15, .94);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .3s var(--ease);
  backdrop-filter: blur(16px);
  font-size: 9px;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive */

@media (max-width: 1180px) {
  .catalog-controls {
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
    gap: 12px 28px;
    padding: 12px 0;
  }

  .toolbar-actions { grid-column: 2; justify-self: end; }
  .category-filter-row { grid-column: 2; grid-row: 1; padding-right: 170px; }
  .search-field { grid-row: 1; }

  .chat-prompt-card {
    grid-template-columns: 56px minmax(250px, 1.4fr) minmax(120px, .7fr) minmax(170px, .8fr) 42px;
    gap: 18px;
  }

  .chat-time { display: none; }
}

@media (max-width: 820px) {
  .home-header {
    height: 68px;
    padding: 0 18px;
    border-bottom-color: rgba(0, 0, 0, .055);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px) saturate(140%);
  }

  .home-header .site-brand > span:last-child { display: none; }
  .home-nav { gap: 24px; }
  .home-nav a { font-size: 11px; }
  .home-stage { height: auto; }
  .home-stage-sticky { position: relative; display: block; height: auto; min-height: 0; overflow: visible; }
  .floating-field { display: none; }
  .home-center { width: min(620px, calc(100% - 34px)); min-height: 650px; margin: 0 auto; padding: 190px 0 88px; }
  .home-page.is-ready .home-center { opacity: 1; transform: none; }
  .home-wordmark { margin-bottom: 24px; font-size: 11px; }
  .home-center h1 { font-size: clamp(37px, 8vw, 52px); }
  .home-entries { margin-top: 34px; }
  .home-entry { min-width: 128px; height: 50px; padding: 0 15px; }
  .feature-reel {
    position: relative;
    bottom: auto;
    left: auto;
    width: calc(100% - 32px);
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0 auto 82px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .feature-reel-label { top: 18px; left: 18px; font-size: 17px; }
  .feature-reel-meta { min-height: 60px; padding: 0 18px; }
  .feature-reel-meta strong { font-size: 13px; }
  .feature-reel-meta small { font-size: 10px; }

  .home-section { padding: 94px 16px; }
  .home-section-head { margin-bottom: 52px; text-align: left; }
  .home-section-head h2,
  .method-heading h2,
  .academic-intro h2,
  .closing-center h2 { font-size: clamp(43px, 12vw, 66px); line-height: 1.06; }
  .search-scene { height: 620px; min-height: 0; }
  .search-scene-image-a { top: 4%; left: 5%; width: 55%; height: 42%; }
  .search-scene-image-b { top: 18%; right: 5%; left: auto; width: 44%; height: 37%; }
  .search-scene-image-c { top: auto; right: 8%; bottom: 5%; width: 60%; height: 39%; }
  .search-prompt { top: 55%; width: calc(100% - 34px); min-height: 58px; padding: 0 18px; grid-template-columns: 20px 1fr; }
  .search-prompt small { display: none; }
  .search-world-note { margin-top: 48px; font-size: 23px; text-align: left; }

  .method-section { grid-template-columns: 1fr; min-height: 0; gap: 58px; }
  .method-heading h2 { font-size: clamp(43px, 12vw, 66px); }
  .method-index a { min-height: 82px; grid-template-columns: 42px 1fr auto; }
  .method-index strong { font-size: 21px; }
  .method-copy { max-width: 520px; padding-bottom: 0; }
  .method-copy p { font-size: 16px; }

  .academic-intro { grid-template-columns: 1fr; margin-bottom: 58px; gap: 18px; }
  .academic-intro h2 { grid-row: 2; }
  .academic-intro > span { font-size: 15px; }
  .academic-steps { grid-template-columns: 1fr; }
  .academic-steps a { min-height: 210px; border-right: 0; border-bottom: 1px solid #cfcfca; }
  .academic-steps a:last-child { border-bottom: 0; }
  .academic-steps small { margin-top: 36px; }
  .academic-steps em { margin-top: 28px; }
  .academic-action { margin: 42px 0 0; }

  .closing-field { min-height: 760px; padding: 90px 18px; }
  .closing-center { width: 100%; }
  .closing-center > div { display: grid; grid-template-columns: repeat(3, 1fr); }
  .closing-center a { min-width: 0; }
  .closing-orbit img { width: 54px; opacity: .45; }
  .closing-orbit img:nth-child(2),
  .closing-orbit img:nth-child(3),
  .closing-orbit img:nth-child(5),
  .closing-orbit img:nth-child(6),
  .closing-orbit img:nth-child(8),
  .closing-orbit img:nth-child(9),
  .closing-orbit img:nth-child(10) { display: none; }

  .site-header { grid-template-columns: 1fr auto auto; min-height: 64px; padding: 0 16px; }
  .site-header .site-brand > span:last-child { display: none; }
  .primary-nav { gap: 22px; }

  .header-home-link {
    width: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .header-home-link span { display: none; }

  .category-hero { min-height: 270px; }
  .category-hero-copy { padding: 50px 6px 42px; }
  .category-hero h1 { font-size: clamp(44px, 10vw, 60px); }
  .category-hero-copy > p { max-width: 84%; font-size: 12px; }
  .hero-shot { width: 56px; opacity: .38; }
  .hero-shot-1 { top: 18px; right: -18px; }
  .hero-shot-2 { top: 168px; right: 4px; width: 46px; opacity: .22; }
  .hero-shot-3 { top: 37px; left: -13px; width: 54px; opacity: .34; }
  .hero-shot:nth-child(n + 4) { display: none; }

  .catalog { width: calc(100% - 28px); }

  .catalog-controls {
    top: 64px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    min-height: 0;
    padding: 13px 0 11px;
  }

  .search-field { grid-column: 1; grid-row: 1; }
  .toolbar-actions { display: none; }
  .category-filter-row { grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .category-tabs { gap: 24px; }
  .sort-button { display: none; }

  .prompt-grid,
  .type-video .prompt-grid { columns: 2 220px; column-gap: 12px; }

  .prompt-card { margin-bottom: 12px; }
  .card-actions { max-height: 30px; margin-top: 7px; opacity: 1; transform: none; }

  .chat-prompt-card {
    grid-template-columns: 46px 1fr 42px;
    gap: 14px;
    min-height: 112px;
    padding: 17px 4px;
  }

  .chat-index { font-size: 32px; }
  .chat-mode,
  .chat-time,
  .chat-card-result { display: none; }

  .detail-dialog,
  .detail-dialog.is-chat-detail { width: 100%; height: 100svh; max-height: 100svh; border: 0; border-radius: 0; }
  .detail-shell { grid-template-columns: 1fr; max-height: 100svh; overflow: auto; }
  .detail-visual { min-height: 42svh; max-height: 48svh; border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-content,
  .detail-dialog.is-chat-detail .detail-content { max-height: none; padding: 36px 20px 54px; overflow: visible; }
  .detail-content h2 { font-size: 32px; }
  .site-footer { display: grid; gap: 6px; padding: 26px 16px; }
}

@media (max-width: 540px) {
  .site-brand-logo { width: 30px; height: 30px; }
  .home-header { grid-template-columns: 1fr auto; }
  .home-nav { grid-column: 2; gap: 16px; }

  .home-center { min-height: 620px; margin-top: 0; padding-top: 178px; }
  .home-center h1 { max-width: 330px; font-size: 40px; line-height: 1.18; }
  .home-entries { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 6px; }
  .home-entry { min-width: 0; height: 48px; padding: 0 10px; gap: 8px; font-size: 11px; }
  .home-entry svg { display: none; }
  .feature-reel { margin-bottom: 58px; }
  .feature-reel-meta small { display: none; }
  .search-scene { height: 560px; }
  .method-index a { grid-template-columns: 34px 1fr; }
  .method-index small { display: none; }
  .academic-steps strong { font-size: 23px; }
  .closing-field { min-height: 700px; }

  .primary-nav { gap: 17px; }
  .primary-nav a { font-size: 11px; }
  .category-hero { min-height: 238px; }
  .category-hero-copy { padding-top: 42px; }
  .category-hero-copy > p { max-width: 92%; }

  .catalog-controls { grid-template-columns: 1fr; }
  .search-field { grid-column: 1; margin-right: 0; }
  .category-filter-row { margin-top: 3px; }

  .prompt-grid,
  .type-video .prompt-grid { columns: 1; }

  .prompt-card:nth-child(n) .card-media,
  .type-video .prompt-card:nth-child(n) .card-media { aspect-ratio: 4 / 3; }

  .chat-prompt-card { grid-template-columns: 38px 1fr 38px; padding: 17px 2px; }
  .chat-index { font-size: 29px; }
  .chat-open-button { width: 34px; height: 34px; }

  .workflow-guide-meta { grid-template-columns: 1fr; }
}

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

  .float-slot,
  .prompt-card,
  .home-center,
  [data-reveal],
  .feature-reel { opacity: 1 !important; transform: none !important; }

  .feature-reel { pointer-events: auto !important; }
}
