:root {
  color-scheme: light;
  --primary: #c8102e;
  --secondary: #000000;
  --tertiary: #d4af37;
  --background: #f9f9f9;
  --surface: #ffffff;
  --surface-low: #f5f5f5;
  --outline: rgba(200, 16, 46, 0.28);
  --outline-strong: #c8102e;
  --ink: #1a1a1a;
  --muted: rgba(26, 26, 26, 0.62);
  --serif: "Playfair Display", "Noto Serif SC", "Songti SC", serif;
  --cn-serif: "LXGW WenKai", "霞鹜文楷", "落霞孤鹜", "STSong", "Songti SC", "SimSun", serif;
  --sans: "Montserrat", "PingFang SC", "Microsoft YaHei", sans-serif;
  --margin: 22px;
  --stack-lg: 58px;
  --stack-xl: 160px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
  font-family: var(--sans);
  line-height: 1.55;
  touch-action: pan-y;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(200, 16, 46, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(200, 16, 46, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

body::after {
  position: fixed;
  right: -2rem;
  bottom: 7vh;
  z-index: -1;
  color: rgba(200, 16, 46, 0.045);
  content: "COUTURE";
  font-family: var(--serif);
  font-size: clamp(5rem, 25vw, 14rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  transform: rotate(-90deg);
  transform-origin: right bottom;
  pointer-events: none;
}

::selection {
  color: #fff;
  background: var(--primary);
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

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

button {
  font: inherit;
}

.sound-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.sound-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  padding: 0;
  color: rgba(26, 26, 26, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sound-toggle.is-playing {
  color: var(--primary);
}

.magazine {
  width: min(100%, 780px);
  margin: 0 auto;
  background: var(--background);
}

.cover {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
}

.cover-photo {
  position: absolute;
  inset: var(--margin) var(--margin) 0;
  border: 1px solid rgba(200, 16, 46, 0.36);
  padding: 4px;
  background: var(--surface);
}

.cover-photo img,
.photo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  display: grid;
  min-height: 680px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  font-family: var(--serif);
  font-size: 2.7rem;
}

.cover-copy {
  position: relative;
  z-index: 2;
  padding: 34px var(--margin) 0;
  pointer-events: none;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
}

h1 {
  color: var(--secondary);
  font-size: clamp(4.1rem, 22vw, 8.8rem);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.06em;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.52);
}

h2 {
  color: var(--secondary);
  font-size: clamp(2.4rem, 12vw, 5rem);
  font-weight: 600;
  line-height: 1;
}

.cover-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
}

.cover-meta p {
  margin: 0;
}

.cover-meta div:last-child {
  text-align: right;
}

.section-label,
.rule-row,
.masonry-figure figcaption,
.venue-list dt {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-label {
  margin: 0 0 8px;
  color: var(--primary);
}

.cover-meta p:not(.section-label) {
  color: rgba(26, 26, 26, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vertical-note {
  position: absolute;
  z-index: 2;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.vertical-note.right {
  top: 48%;
  right: var(--margin);
  transform: translateY(-50%);
}

.vertical-note.left {
  bottom: var(--stack-lg);
  left: var(--margin);
}

.editor-note,
.gallery-section,
.venue {
  padding: var(--stack-lg) var(--margin);
}

.rule-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(200, 16, 46, 0.68);
  color: var(--primary);
}

.rule-row span:last-child {
  color: rgba(26, 26, 26, 0.46);
}

.feature-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.feature-pair img {
  height: 192px;
  border: 1px solid rgba(200, 16, 46, 0.16);
  padding: 4px;
  object-fit: cover;
}

.editor-note p:not(.section-label),
.chapter-head p:not(.section-label),
.venue,
.closing-line {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
}

.gallery-section {
  position: relative;
  border-top: 1px solid rgba(200, 16, 46, 0.2);
}

.gallery-section::before {
  position: absolute;
  top: 8px;
  right: var(--margin);
  color: rgba(200, 16, 46, 0.055);
  font-family: var(--serif);
  font-size: clamp(4rem, 20vw, 9rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.07em;
  pointer-events: none;
}

.red-section::before {
  content: "RED";
}

.pink-section::before {
  color: rgba(212, 175, 55, 0.16);
  content: "PINK";
}

.chapter-head {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.chapter-head h2 {
  color: var(--secondary);
}

.red-section .chapter-head,
.red-section .chapter-head h2,
.red-section .chapter-head p:not(.section-label),
.red-section .masonry-figure figcaption,
.red-copy {
  font-family: var(--cn-serif);
}

.red-section .chapter-head h2 {
  font-weight: 600;
  letter-spacing: 0;
}

.red-section .chapter-head p:not(.section-label) {
  font-size: 1.02rem;
  line-height: 1.9;
}

.pink-section .chapter-head p:not(.section-label) {
  font-family: var(--cn-serif);
  font-size: 1rem;
  line-height: 1.85;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.masonry-figure {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  cursor: zoom-in;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  transition: transform 80ms linear;
  will-change: transform;
}

.masonry-figure.layout-hero {
  grid-column: 1 / -1;
  margin: 16px 0 8px;
}

.masonry-figure.layout-wide {
  grid-column: span 4;
}

.masonry-figure.layout-tall {
  grid-column: span 3;
  margin-top: 26px;
}

.masonry-figure.layout-small {
  grid-column: span 2;
}

.masonry-figure.layout-offset {
  grid-column: 2 / span 4;
  margin-top: 10px;
}

.masonry-figure.layout-narrow {
  grid-column: span 3;
  width: 88%;
}

.masonry-figure img {
  width: 100%;
  border: 1px solid rgba(200, 16, 46, 0.18);
  padding: 4px;
  background: var(--surface);
  object-fit: cover;
}

.masonry-figure.layout-hero img {
  aspect-ratio: 4 / 5;
}

.masonry-figure.layout-wide img {
  aspect-ratio: 1 / 1.32;
}

.masonry-figure.layout-tall img {
  aspect-ratio: 3 / 4.6;
}

.masonry-figure.layout-small img {
  aspect-ratio: 1 / 1.42;
}

.masonry-figure.layout-offset img {
  aspect-ratio: 4 / 3;
}

.masonry-figure.layout-narrow img {
  aspect-ratio: 3 / 4;
}

.masonry-figure figcaption {
  margin-top: 6px;
  color: rgba(26, 26, 26, 0.48);
}

.editorial-copy {
  display: grid;
  min-height: 150px;
  align-content: center;
  padding: 16px 0;
  border-top: 1px solid rgba(26, 26, 26, 0.78);
  border-bottom: 1px solid rgba(200, 16, 46, 0.45);
}

.editorial-copy.layout-copy-wide {
  grid-column: 1 / -1;
}

.editorial-copy.layout-copy-side {
  grid-column: span 3;
  margin-top: 22px;
}

.editorial-copy.layout-copy-offset {
  grid-column: 2 / span 5;
}

.editorial-copy .copy-index {
  margin: 0 0 10px;
  color: var(--primary);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.editorial-copy h3 {
  margin: 0;
  color: var(--secondary);
  font-size: clamp(1.85rem, 8vw, 3.4rem);
  font-weight: 500;
  line-height: 0.98;
}

.editorial-copy p:not(.copy-index) {
  margin: 12px 0 0;
  color: rgba(26, 26, 26, 0.68);
  font-size: 0.98rem;
  line-height: 1.85;
}

.red-copy h3,
.red-copy p:not(.copy-index) {
  font-family: var(--cn-serif);
}

.pink-copy h3 {
  font-family: var(--cn-serif);
  letter-spacing: 0;
}

.pink-copy p:not(.copy-index) {
  font-family: var(--cn-serif);
  font-weight: 300;
  line-height: 1.85;
}

.pink-section .section-label {
  color: var(--tertiary);
}

.pink-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(212, 175, 55, 0.06)),
    linear-gradient(90deg, transparent 0 58%, rgba(200, 16, 46, 0.045) 58% 100%);
}

.red-section {
  background:
    linear-gradient(90deg, rgba(200, 16, 46, 0.045) 0 34%, transparent 34% 100%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.025));
}

.venue {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: var(--surface-low);
}

.ghost-word {
  position: absolute;
  top: -20px;
  left: -14px;
  color: rgba(200, 16, 46, 0.06);
  font-family: var(--serif);
  font-size: 6.5rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.venue-list {
  display: grid;
  gap: 0;
  margin: 42px 0 0;
  padding: 0;
}

.venue-list div {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(26, 26, 26, 0.2);
}

.venue-list dt {
  color: var(--primary);
}

.venue-list dd {
  margin: 0;
}

.closing-line {
  margin: 48px 0 0;
  font-family: var(--serif);
  font-size: 1.4rem;
}

.viewer {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.94);
  overflow: hidden;
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.viewer[open] {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
}

.viewer-stage {
  position: relative;
  width: 100%;
  height: calc(100svh - 78px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.viewer.is-dragging .viewer-stage {
  cursor: grabbing;
}

.viewer-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform: translate3d(var(--viewer-x, 0%), 0, 0);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.viewer.is-dragging .viewer-slide {
  transition: none;
}

.viewer-slide-prev {
  --viewer-x: -100%;
}

.viewer-slide-current {
  --viewer-x: 0%;
}

.viewer-slide-next {
  --viewer-x: 100%;
}

.viewer p {
  min-height: 48px;
  margin: 0;
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--serif);
  text-align: center;
}

.viewer button {
  position: fixed;
  z-index: 2;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.viewer-close {
  top: calc(18px + env(safe-area-inset-top));
  right: 18px;
}

.viewer-nav {
  top: 50%;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 16px;
}

.viewer-next {
  right: 16px;
}

:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 4px;
}

@media (min-width: 760px) {
  :root {
    --margin: 80px;
  }

  .magazine {
    max-width: 980px;
  }

  .cover {
    min-height: 820px;
  }

  .cover-copy {
    padding-top: 70px;
  }
}

@media (max-width: 520px) {
  .viewer-nav {
    display: none;
  }
}

@media (max-width: 380px) {
  :root {
    --margin: 18px;
  }

  .masonry {
    gap: 12px;
  }

  .masonry-figure.layout-wide,
  .masonry-figure.layout-tall,
  .masonry-figure.layout-small,
  .masonry-figure.layout-narrow {
    grid-column: span 3;
  }

  .masonry-figure.layout-offset {
    grid-column: 1 / -1;
  }

  .masonry-figure.layout-hero {
    grid-column: 1 / -1;
  }

  .editorial-copy.layout-copy-wide,
  .editorial-copy.layout-copy-side,
  .editorial-copy.layout-copy-offset {
    grid-column: 1 / -1;
  }
}

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

  .masonry-figure {
    transform: none !important;
  }
}
