:root {
  --black: #0a0a0a;
  --white: #f4f4f0;
  --line-dark: rgba(10, 10, 10, 0.24);
  --line-light: rgba(244, 244, 240, 0.28);
  --mono: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--black);
  background: var(--white);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

body:has(dialog[open]) {
  overflow: hidden;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

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

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

img {
  display: block;
  max-width: 100%;
}

.skipLink {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  min-height: 44px;
  padding: 12px 16px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
  font-family: var(--mono);
  font-size: 10px;
  transform: translateY(-80px);
}

.skipLink:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.siteHeader {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  color: var(--white);
  background: var(--black);
  border-bottom: 1px solid var(--line-light);
}

.headerPrimary {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brandLogo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brandLogo img {
  display: block;
  width: 110px;
  height: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
}

.headerActions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sellLink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-light);
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sellLink:hover,
.sellLink:focus-visible {
  color: var(--black);
  background: var(--white);
}

.contactMenu {
  position: relative;
}

.contactMenu summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: rgba(244, 244, 240, 0.72);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  list-style: none;
  cursor: pointer;
}

.contactMenu summary::-webkit-details-marker {
  display: none;
}

.contactToggle {
  font-size: 12px;
  transition: transform 180ms ease;
}

.contactMenu[open] summary {
  color: var(--white);
}

.contactMenu[open] .contactToggle {
  transform: rotate(45deg);
}

.contactPanel {
  position: fixed;
  z-index: 30;
  top: 64px;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 0.7fr 1.15fr 1.15fr;
  width: 100%;
  max-height: calc(100dvh - 64px);
  overflow: auto;
  color: var(--white);
  background: var(--black);
  border-bottom: 1px solid var(--white);
}

.contactGroup {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid var(--line-light);
}

.contactGroup:last-child {
  border-right: 0;
}

.contactGroup > p {
  min-height: 28px;
  color: rgba(244, 244, 240, 0.56);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.contactGroup a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 24px 8px 0;
  border-top: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.09em;
}

.contactGroup a::after {
  position: absolute;
  top: 50%;
  right: 2px;
  content: "↗";
  transform: translateY(-50%);
}

.contactGroup a:hover {
  color: var(--black);
  background: var(--white);
}

.contactGroup a:hover::after {
  right: 8px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  min-height: calc(100svh - 64px);
  overflow: hidden;
  color: var(--white);
  background: var(--black);
  border-bottom: 1px solid var(--line-light);
}

.hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  width: 1px;
  background: var(--line-light);
  content: "";
  pointer-events: none;
}

.heroCopy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 88px 48px 112px;
}

.heroCoordinates {
  position: absolute;
  top: 24px;
  left: 48px;
  display: flex;
  gap: 24px;
  color: rgba(244, 244, 240, 0.66);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.systemLabel {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 620px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: 0.03em;
}

.heroStatement {
  max-width: 440px;
  margin-top: 32px;
  color: rgba(244, 244, 240, 0.72);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.enterLink {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin-top: 48px;
  padding: 0 18px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--white);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.enterLink:hover {
  color: var(--white);
  background: var(--black);
}

.heroVisual {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(70vw, 720px);
  aspect-ratio: 1;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit::before,
.orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.orbit::before {
  width: 72%;
  height: 1px;
  background: var(--line-light);
}

.orbit::after {
  width: 1px;
  height: 72%;
  background: var(--line-light);
}

.orbit span {
  position: absolute;
  top: 14%;
  right: 12%;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.heroCluster {
  position: absolute;
  inset: 4% 3%;
}

.heroCard {
  position: absolute;
  z-index: var(--z, 1);
  top: var(--y, 12%);
  left: var(--x, 10%);
  width: var(--size, 66%);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--white);
  background: var(--white);
  transform: rotate(var(--rotation, 0deg));
  transition:
    top 760ms cubic-bezier(0.22, 1, 0.36, 1),
    left 760ms cubic-bezier(0.22, 1, 0.36, 1),
    width 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.heroCard:nth-child(1) {
  --x: 18%;
  --y: 8%;
  --size: 66%;
  --rotation: -1.2deg;
  --z: 1;
}

.heroImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 220ms linear,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.heroScramble {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  pointer-events: none;
}

.scrambleTile {
  opacity: 0;
  background-repeat: no-repeat;
  background-size: 600% 600%;
  transform:
    translate3d(var(--shift-x, 0), var(--shift-y, 0), 0)
    rotate(var(--tile-rotation, 0deg))
    scale(0.84);
  transition:
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
    opacity 140ms linear var(--delay, 0ms);
}

.heroCard.isScrambling .heroImage {
  opacity: 0.16;
  transform: scale(1.035);
}

.heroCard.isScrambling .scrambleTile {
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0) scale(1);
}

.heroCard figcaption {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 8px;
  padding: 4px 6px;
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.scrollSignal {
  position: absolute;
  bottom: 20px;
  left: 24px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.collection {
  padding: 88px 24px 120px;
  background: var(--white);
}

.collectionHeader,
.promptTemplate,
.filters,
.grid,
.emptyState,
.noscript {
  width: min(100%, 1500px);
  margin-right: auto;
  margin-left: auto;
}

.collectionHeader {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
}

.collectionHeader h2 {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
}

.collectionCount {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.collectionCount strong {
  font-size: 16px;
  font-weight: 400;
}

.promptTemplate {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 32px;
  margin-left: 0;
  border: 1px solid var(--black);
}

.templateHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-left: 20px;
  color: var(--white);
  background: var(--black);
}

.templateHeader h3 {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.templateHeader button {
  align-self: stretch;
  min-width: 152px;
  padding: 0 16px;
  border: 0;
  border-left: 1px solid var(--white);
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.templateHeader button:hover {
  color: var(--black);
  background: var(--white);
}

.promptTemplate pre {
  margin: 0;
  padding: 24px 20px;
  overflow: auto;
  color: var(--black);
  background: var(--white);
  border-bottom: 1px solid var(--black);
  white-space: pre-wrap;
  word-break: normal;
}

.promptTemplate code {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

.templateStatus {
  padding: 8px 20px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(132px, 1fr)) 88px;
  gap: 1px;
  padding: 1px;
  background: var(--black);
}

.filters label {
  position: relative;
  display: grid;
  min-width: 0;
  background: var(--white);
}

.filters label > span {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 12px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 64px;
  padding: 24px 12px 7px;
  border: 0;
  border-radius: 0;
  color: var(--black);
  background: var(--white);
  font-family: var(--mono);
  font-size: 10px;
}

.filters input::placeholder {
  color: rgba(10, 10, 10, 0.52);
}

.resetButton,
.emptyState button {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.resetButton:hover,
.emptyState button:hover {
  color: var(--black);
  background: var(--white);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 48px;
  padding: 1px;
  background: var(--black);
}

.productCard {
  min-width: 0;
  background: var(--white);
}

.productImage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--black);
}

.productImage::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(10, 10, 10, 0.16);
  content: "";
  pointer-events: none;
}

.productImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.productCard:hover .productImage img {
  transform: scale(1.018);
}

.productBody {
  padding: 16px;
}

.cardMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.cardMeta span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.productBody h3 {
  min-height: 42px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  word-break: keep-all;
}

.viewButton {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid var(--black);
  border-radius: 0;
  color: var(--black);
  background: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.viewButton:hover {
  color: var(--white);
  background: var(--black);
}

.emptyState,
.noscript {
  margin-top: 48px;
  padding: 80px 24px;
  border: 1px solid var(--black);
  font-family: var(--mono);
  text-align: center;
}

.emptyState button {
  margin-top: 24px;
  padding: 0 20px;
}

.promptDialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--white);
  border-radius: 0;
}

.promptDialog::backdrop {
  background: rgba(10, 10, 10, 0.88);
}

.dialogTop {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding-left: 16px;
  color: var(--white);
  background: var(--black);
  border-bottom: 1px solid var(--white);
  font-family: var(--mono);
  font-size: 9px;
}

.dialogClose {
  align-self: stretch;
  min-width: 96px;
  border: 0;
  border-left: 1px solid var(--white);
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 9px;
  cursor: pointer;
}

.dialogClose:hover {
  color: var(--black);
  background: var(--white);
}

.dialogGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
}

.dialogImage {
  min-width: 0;
  border-right: 1px solid var(--black);
  background: var(--white);
}

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

.dialogContent {
  min-width: 0;
  padding: 40px 32px;
}

.dialogCategory,
.promptLabel,
.copyStatus {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.dialogContent h2 {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  word-break: keep-all;
}

.dialogDescription {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
}

.dialogTags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.dialogTags span {
  padding: 5px 8px;
  border: 1px solid var(--black);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.promptLabel {
  margin-top: 40px;
}

.dialogContent pre {
  max-height: 280px;
  margin: 12px 0 0;
  padding: 20px;
  overflow: auto;
  color: var(--white);
  background: var(--black);
  white-space: pre-wrap;
  word-break: normal;
}

.dialogContent code {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
}

.dialogCopy {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid var(--black);
  border-radius: 0;
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.dialogCopy:hover {
  color: var(--black);
  background: var(--white);
}

.copyStatus {
  margin-top: 12px;
}

.siteFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 24px;
  color: var(--white);
  background: var(--black);
  border-top: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.clipboardFallback {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(300px, 0.9fr) minmax(440px, 1.1fr);
  }

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

  .searchField {
    grid-column: span 2;
  }

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

@media (max-width: 900px) {
  .orbit span {
    display: none;
  }

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

  .contactGroup:nth-child(2) {
    border-right: 0;
  }

  .contactGroup:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-light);
  }
}

@media (max-width: 767px) {
  .siteHeader {
    min-height: 56px;
    padding: 0 16px;
  }

  .headerPrimary {
    gap: 8px;
  }

  .brandLogo img {
    width: 72px;
  }

  .wordmark {
    white-space: nowrap;
    font-size: 8px;
    letter-spacing: 0.04em;
  }

  .headerActions {
    gap: 8px;
  }

  .sellLink {
    padding: 0 6px;
    font-size: 8px;
    letter-spacing: 0.04em;
  }

  .contactMenu summary {
    gap: 6px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .contactPanel {
    top: 56px;
    grid-template-columns: 1fr;
    max-height: calc(100dvh - 56px);
  }

  .contactGroup,
  .contactGroup:nth-child(2) {
    padding: 20px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-light);
  }

  .contactGroup:last-child {
    border-bottom: 0;
  }

  .hero {
    display: block;
    min-height: auto;
  }

  .hero::before {
    display: none;
  }

  .heroCopy {
    min-height: 500px;
    padding: 80px 16px 104px;
  }

  .heroCoordinates {
    top: 16px;
    left: 16px;
  }

  .hero h1 {
    max-width: 340px;
    font-size: 40px;
  }

  .heroVisual {
    min-height: 500px;
    border-top: 1px solid var(--line-light);
  }

  .heroCluster {
    inset: 5% 3%;
  }

  .scrollSignal {
    display: none;
  }

  .collection {
    padding: 72px 16px 88px;
  }

  .collectionHeader {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .promptTemplate {
    margin-bottom: 24px;
  }

  .templateHeader {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding-left: 16px;
  }

  .templateHeader > div {
    padding: 16px 0;
  }

  .templateHeader button {
    align-self: auto;
    min-height: 48px;
    border-top: 1px solid var(--white);
    border-left: 0;
  }

  .promptTemplate pre {
    padding: 20px 16px;
  }

  .promptTemplate code {
    font-size: 11px;
    line-height: 1.85;
  }

  .templateStatus {
    padding: 8px 16px;
  }

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

  .searchField {
    grid-column: 1 / -1;
  }

  .resetButton {
    min-height: 64px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 32px;
  }

  .productBody {
    padding: 12px;
  }

  .cardMeta span:last-child {
    display: none;
  }

  .productBody h3 {
    min-height: 40px;
    margin-top: 12px;
    font-size: 12px;
  }

  .viewButton {
    margin-top: 12px;
    font-size: 8px;
  }

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

  .dialogImage {
    border-right: 0;
    border-bottom: 1px solid var(--black);
  }

  .dialogContent {
    padding: 32px 20px;
  }

  .siteFooter {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
  }
}

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