/* PoseLine Flagship A+ v2 — Restrained Swiss Editorial × Protected Canvas × Mobile-First */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  /* Paper Theme (Default) */
  --bg: #F4EFE5;
  --surface: #FBF8F1;
  --stock: #EBE4D2;
  --ink: #0A0A0A;
  --muted: #6B6357;
  --rule: #0A0A0A;
  --hairline: rgba(10, 10, 10, 0.16);
  --dot: rgba(10, 10, 10, 0.075);

  /* Darkroom Obsidian (Constant for Beat 02 + Dark Mode) */
  --obs: #0A0A0C;
  --obs-panel: #131316;
  --obs-bone: #F4EFE5;
  --obs-muted: #9A958E;
  --obs-hairline: rgba(244, 239, 229, 0.18);

  /* Signals */
  --vermilion: #FF2D1A;
  --leica-red: #E83324;
  --volt: #CCFF00;
  --green: #1E9E5A;
  --yellow: #F5C518;

  --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap-max: 1240px;
}

@supports (color: color(display-p3 1 0 0)) {
  :root {
    --vermilion: color(display-p3 0.98 0.20 0.12);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0C;
    --surface: #131316;
    --stock: #1C1C21;
    --ink: #F4EFE5;
    --muted: #9A958E;
    --rule: rgba(244, 239, 229, 0.34);
    --hairline: rgba(244, 239, 229, 0.14);
    --dot: rgba(244, 239, 229, 0.065);
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 0.85px, transparent 0.85px);
  background-size: 9px 9px;
  color: var(--ink);
  overflow-x: clip;
  transition: background-color 220ms ease, color 220ms ease;
}

button {
  font: inherit;
  color: inherit;
  border-radius: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.protected-canvas {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* Lock every framed image canvas strictly to its container aspect-ratio from byte 0 (zero loading ratio flash!) */
.stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 220ms ease;
}

.stage-canvas.is-ready {
  opacity: 1;
}

.top-vermilion-rule {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--vermilion);
  z-index: 900;
  pointer-events: none;
}

.wrap {
  max-width: var(--wrap-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
}

/* ==================== MASTHEAD ==================== */
.masthead {
  position: sticky;
  top: 3px;
  z-index: 800;
  background: var(--bg);
  border-bottom: 1.5px solid var(--rule);
}

.masthead-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.p-monogram {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  box-shadow: 2px 2px 0 var(--rule);
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-p-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-wordmark-nav {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transform: translateY(1px);
}

.masthead-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-signal-sm {
  height: 34px;
  padding: 0 14px;
  background: var(--vermilion);
  color: #FBF8F1;
  border: 1.5px solid var(--rule);
  box-shadow: 2px 2px 0 var(--rule);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease;
}

.btn-signal-sm:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 3.5px 3.5px 0 var(--rule);
}

/* ==================== BEAT 01 · HERO ==================== */
.beat {
  scroll-margin-top: 60px;
}

.beat-hero {
  padding: 36px 0 64px;
}

.hero-plate {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  box-shadow: 4px 4px 0 var(--rule);
  padding: 44px;
}

.tick {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.tick-tl { top: -8px; left: -8px; border-top: 2px solid var(--vermilion); border-left: 2px solid var(--vermilion); }
.tick-tr { top: -8px; right: -8px; border-top: 2px solid var(--vermilion); border-right: 2px solid var(--vermilion); }
.tick-bl { bottom: -8px; left: -8px; border-bottom: 2px solid var(--vermilion); border-left: 2px solid var(--vermilion); }
.tick-br { bottom: -8px; right: -8px; border-bottom: 2px solid var(--vermilion); border-right: 2px solid var(--vermilion); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 18px;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  background: var(--vermilion);
  display: inline-block;
}

.hero-wordmark {
  margin: 0 0 22px;
  max-width: 100%;
}

.hero-sub {
  margin: 0 0 38px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--muted);
  max-width: 420px;
}

.hero-cta-row {
  width: 100%;
  max-width: 390px;
}

.lens-cta-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  box-shadow: 3px 3px 0 var(--rule);
  cursor: pointer;
  text-align: left;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 100ms ease;
}

.lens-cta-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--vermilion);
}

.lens-canvas {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
}

.lens-cta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.lens-cta-text strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.lens-cta-text small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

.lens-cta-arrow {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vermilion);
  color: #FBF8F1;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--rule);
  flex: 0 0 30px;
}

/* Hero Editorial Cover Frame (calm, iconic cover visual leading into 01 · Pose) */
.hero-cover-col {
  min-width: 0;
}

.cover-frame {
  display: block;
  background: var(--obs);
  border: 1.5px solid var(--rule);
  box-shadow: 4px 4px 0 var(--rule);
  padding: 10px;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.cover-frame:hover {
  transform: translate(-2px, -2px);
  border-color: var(--vermilion);
  box-shadow: 6px 6px 0 var(--vermilion);
}

.cover-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 520px;
  overflow: hidden;
  background: #060608;
}

.cover-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.cover-corner.cc-tl { top: 12px; left: 12px; }
.cover-corner.cc-tr { top: 12px; right: 12px; }
.cover-corner.cc-bl { bottom: 12px; left: 12px; }
.cover-corner.cc-br { bottom: 12px; right: 12px; }

/* ==================== BEAT 01 · POSE STUDIO ==================== */
.beat-pose {
  padding: 72px 0;
  border-top: 2px solid var(--rule);
}

.pose-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 40px;
  align-items: center;
}

.pose-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.pose-panel-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.pose-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pose-tab {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 140ms ease;
}

.pose-tab:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--rule);
}

.pose-tab.is-active {
  border-color: var(--vermilion);
  box-shadow: 4px 4px 0 var(--vermilion);
}

.pose-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--vermilion);
}

.pose-tab-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pose-tab-main strong {
  font-size: 15px;
  font-weight: 800;
}

.pose-tab-main small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.pose-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  transition: transform 120ms ease, color 120ms ease;
}

.pose-tab.is-active .pose-arrow {
  color: var(--vermilion);
  transform: translateX(2px);
}

.pose-cue-card {
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-left: 4px solid var(--vermilion);
}

.pose-cue-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--vermilion);
  margin-bottom: 6px;
}

.pose-cue-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
}

.pose-footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

/* Viewfinder Shell */
.vf-shell {
  background: var(--obs);
  border: 1.5px solid var(--rule);
  box-shadow: 4px 4px 0 var(--rule);
  color: var(--obs-bone);
}

.vf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--obs-hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.vf-bar-id {
  color: var(--obs-muted);
}

.vf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.vf-dot {
  width: 7px;
  height: 7px;
  background: var(--yellow);
  display: inline-block;
  transition: background-color 180ms;
}

.vf-status.is-locked .vf-dot {
  background: var(--green);
}

.vf-status.is-locked {
  color: #5CE094;
}

.vf-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 540px;
  margin: 0 auto;
  overflow: hidden;
  background: #070709;
  cursor: crosshair;
  touch-action: none;
  perspective: 900px;
}

/* Mobile Gravity / Gyroscope 3D Camera Trigger Pill */
.vf-gyro-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  background: rgba(10, 10, 12, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 239, 229, 0.34);
  color: #F4EFE5;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 160ms, background-color 160ms;
}

.vf-gyro-pill[hidden] {
  display: none;
}

.vf-gyro-pill.is-live {
  border-color: rgba(30, 158, 90, 0.75);
  background: rgba(10, 10, 12, 0.72);
}

.vf-gyro-dot {
  width: 6px;
  height: 6px;
  background: var(--vermilion);
  display: inline-block;
  flex-shrink: 0;
}

.vf-gyro-pill.is-live .vf-gyro-dot {
  background: var(--green);
}

.vf-overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Smooth Aspect Ratio Crop Mask */
.vf-crop-mask {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92%;
  height: 92%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 999px rgba(10, 10, 12, 0.54);
  pointer-events: none;
  transition: width 280ms cubic-bezier(0.22, 1, 0.36, 1), height 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vf-crop-mask[data-ratio="3:4"] { width: 92%; height: 92%; }
.vf-crop-mask[data-ratio="1:1"] { width: 90%; height: 67.5%; }
.vf-crop-mask[data-ratio="16:9"] { width: 92%; height: 39%; }

.crop-corner {
  position: absolute;
  width: 12px;
  height: 12px;
}
.cc-tl { top: 0; left: 0; border-top: 1.5px solid rgba(251,248,241,0.9); border-left: 1.5px solid rgba(251,248,241,0.9); }
.cc-tr { top: 0; right: 0; border-top: 1.5px solid rgba(251,248,241,0.9); border-right: 1.5px solid rgba(251,248,241,0.9); }
.cc-bl { bottom: 0; left: 0; border-bottom: 1.5px solid rgba(251,248,241,0.9); border-left: 1.5px solid rgba(251,248,241,0.9); }
.cc-br { bottom: 0; right: 0; border-bottom: 1.5px solid rgba(251,248,241,0.9); border-right: 1.5px solid rgba(251,248,241,0.9); }

.vf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--obs-hairline);
  gap: 10px;
}

.ratio-group {
  display: flex;
  gap: 4px;
}

.ratio-btn {
  height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--obs-muted);
  border: 1px solid var(--obs-hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms, color 120ms;
}

.ratio-btn.is-active {
  background: var(--leica-red);
  color: #FBF8F1;
  border-color: var(--leica-red);
}

.vf-foot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vf-ghost-btn {
  height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--obs-bone);
  border: 1px solid var(--obs-hairline);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms, color 120ms, border-color 120ms;
}

.vf-ghost-btn.is-active {
  background: var(--leica-red);
  border-color: var(--leica-red);
  color: #FBF8F1;
}

.vf-snap-btn {
  height: 30px;
  padding: 0 12px;
  background: var(--obs-bone);
  color: #0A0A0A;
  border: 1px solid var(--obs-bone);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* ==================== SHARED SECTION HEAD ==================== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--rule);
  margin-bottom: 36px;
}

.section-head-dark {
  border-bottom-color: var(--obs-hairline);
}

.sec-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--vermilion);
  margin-bottom: 8px;
}

.sec-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.sec-lead {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 400px;
  line-height: 1.6;
}

/* ==================== BEAT 02 · DARKROOM ==================== */
.beat-darkroom {
  background-color: var(--obs);
  background-image: radial-gradient(rgba(244, 239, 229, 0.06) 0.85px, transparent 0.85px);
  background-size: 9px 9px;
  color: var(--obs-bone);
  padding: 76px 0;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}

.beat-darkroom .sec-lead {
  color: var(--obs-muted);
}

.darkroom-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 40px;
  align-items: center;
}

.darkroom-frame-box {
  background: var(--obs-panel);
  border: 1px solid var(--obs-hairline);
  padding: 14px;
}

.darkroom-proof-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 580px;
  margin: 0 auto;
  overflow: hidden;
  background: #060608;
}

.proof-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid var(--obs-hairline);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--obs-bone);
  pointer-events: none;
}

.proof-raw-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  background: var(--leica-red);
  color: #FBF8F1;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.darkroom-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--obs-muted);
}

.film-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.film-tab {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--obs-panel);
  border: 1px solid var(--obs-hairline);
  color: var(--obs-bone);
  cursor: pointer;
  text-align: left;
  transition: border-color 140ms, background-color 140ms;
}

.film-tab:hover {
  border-color: rgba(244, 239, 229, 0.45);
}

.film-tab.is-active {
  background: #1B1B20;
  border: 1.5px solid var(--leica-red);
}

.film-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.swatch-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
}

.film-name {
  font-size: 14px;
  font-weight: 700;
}

.film-paper {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--obs-muted);
}

.hold-raw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 18px;
  background: transparent;
  color: var(--obs-bone);
  border: 1.5px solid rgba(244, 239, 229, 0.42);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 100ms, color 100ms, border-color 100ms;
}

.hold-raw-btn small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--obs-muted);
  letter-spacing: 0.1em;
}

.hold-ring {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--leica-red);
  display: inline-block;
}

.hold-raw-btn.is-holding {
  background: var(--obs-bone);
  color: #0A0A0A;
  border-color: var(--obs-bone);
}

.hold-raw-btn.is-holding small {
  color: #555;
}

.hold-raw-btn.is-holding .hold-ring {
  background: var(--leica-red);
}

.darkroom-footnote p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--obs-muted);
  border-top: 1px solid var(--obs-hairline);
  padding-top: 16px;
}

/* ==================== BEAT 03 · INSPIRATION ==================== */
.beat-paper {
  padding: 64px 0;
}

.paper-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 28px;
  align-items: stretch;
}

.punch-specimen {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  box-shadow: 4px 4px 0 var(--rule);
}

.specimen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1.5px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.specimen-hint {
  color: var(--vermilion);
  font-weight: 700;
}

.punch-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 440px;
  cursor: crosshair;
  overflow: hidden;
  background: var(--stock);
}

.specimen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1.5px solid var(--rule);
  background: var(--bg);
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cotton-chip {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--rule);
  cursor: pointer;
  padding: 0;
  transition: transform 90ms ease;
}

.cotton-chip.is-active {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

.specimen-actions {
  display: flex;
  gap: 6px;
}

.mini-btn {
  height: 30px;
  padding: 0 10px;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.mini-btn.is-active {
  background: var(--ink);
  color: var(--bg);
}

/* 2x2 Small-Square Grid — Compact Squares -> Hover Pop-Zoom -> Click/Tap Full Enlarged View */
.editions-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.square-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  height: 100%;
}

.square-tile {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  box-shadow: 3px 3px 0 var(--rule);
  cursor: zoom-in;
  text-align: left;
  overflow: hidden;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease,
    border-color 180ms ease,
    opacity 200ms ease;
}

@media (hover: hover) {
  .square-grid:has(.square-tile:hover) .square-tile:not(:hover) {
    opacity: 0.72;
  }

  .square-tile:hover {
    z-index: 15;
    transform: scale(1.06);
    border-color: var(--vermilion);
    box-shadow: 6px 6px 0 var(--vermilion);
  }

  .square-tile:hover .square-zoom-badge {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.square-tile:focus-visible {
  z-index: 15;
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

.square-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--stock);
}

.square-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.square-zoom-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--vermilion);
  color: #FBF8F1;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  transition: opacity 180ms ease, transform 180ms ease;
}

.square-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-top: 1.5px solid var(--rule);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.ed-idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--vermilion);
  flex-shrink: 0;
}

.ed-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Enlarged Square-to-Full Gallery Loupe Viewer */
@keyframes loupePopIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loupe-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(10, 10, 12, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loupe-backdrop[hidden] {
  display: none;
}

.loupe-sheet {
  width: min(92vw, 456px);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--rule);
  box-shadow: 6px 6px 0 var(--vermilion);
  color: var(--ink);
  animation: loupePopIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.loupe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-bottom: 1.5px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.loupe-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loupe-counter {
  font-size: 10.5px;
  opacity: 0.72;
}

.loupe-close {
  width: 30px;
  height: 30px;
  background: var(--vermilion);
  color: #FBF8F1;
  border: 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.loupe-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 70dvh;
  background: var(--stock);
  overflow: hidden;
  cursor: zoom-out;
}

.loupe-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.loupe-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1.5px solid var(--rule);
  background: var(--bg);
}

.loupe-nav-btn {
  width: 38px;
  height: 32px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.loupe-nav-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.loupe-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loupe-dot {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--rule);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.loupe-dot.is-active {
  background: var(--vermilion);
  border-color: var(--vermilion);
}

/* ==================== MINIMAL PRINT FOOTER ==================== */
.beat-colophon {
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  border-top: 2px solid var(--rule);
  background: var(--surface);
}

.colophon-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.colo-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.colo-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.colo-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.colo-link {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.colo-link:hover {
  color: var(--ink);
  border-bottom-color: var(--vermilion);
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 2px solid var(--rule);
  box-shadow: 5px 5px 0 var(--vermilion);
  color: var(--ink);
}

.modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--vermilion);
  color: #FBF8F1;
  border-bottom: 2px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.modal-close {
  width: 30px;
  height: 30px;
  background: #0A0A0A;
  color: #FBF8F1;
  border: 0;
  cursor: pointer;
  font-size: 13px;
}

.modal-body {
  padding: 22px 20px;
  font-size: 13.5px;
  line-height: 1.75;
}

.modal-body h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
}

.modal-body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.modal-qr-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  margin: 14px 0;
}

/* ==================== MOBILE-FIRST PERFECTION (<= 860px) ==================== */
@media (max-width: 860px) {
  .wrap {
    padding: 0 16px;
  }

  .masthead-inner {
    padding: 0 16px;
    height: 50px;
  }

  .p-monogram {
    width: 30px;
    height: 30px;
  }

  .btn-signal-sm {
    height: 32px;
    padding: 0 11px;
    font-size: 11.5px;
  }

  /* FIRST-FOLD MOBILE HERO: Wordmark + 1-line title + LIVE VIEWFINDER + CTA all inside 844px! */
  .beat-hero {
    padding: 14px 0 36px;
  }

  .hero-plate {
    padding: 16px;
    box-shadow: 3px 3px 0 var(--rule);
  }

  .tick { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-copy {
    display: contents; /* Lets us order copy cleanly above and CTA below the live viewfinder! */
  }

  .hero-kicker { display: none; }

  .hero-wordmark {
    order: 1;
    margin: 0 0 2px;
    transform-origin: left center;
  }

  .hero-sub {
    order: 2;
    margin: 0 0 2px;
    font-size: 13px;
    line-height: 1.5;
  }

  .hero-cover-col {
    order: 3;
  }

  .cover-frame {
    padding: 7px;
    box-shadow: 3px 3px 0 var(--rule);
  }

  .cover-stage {
    aspect-ratio: 4 / 4.35;
    max-height: 390px;
  }

  .hero-cta-row {
    order: 4;
    max-width: none;
  }

  .lens-cta-card {
    padding: 10px 12px;
    gap: 12px;
  }

  .lens-canvas {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  /* Section heads */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 22px;
  }

  .beat-pose, .beat-darkroom, .beat-paper {
    padding: 48px 0;
  }

  .pose-studio-grid, .darkroom-stage-grid, .paper-gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vf-stage {
    aspect-ratio: 3 / 4;
    max-height: 440px;
  }

  .pose-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pose-tab {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 11px 10px;
  }

  .pose-tab-main strong {
    font-size: 12.5px;
  }

  .pose-tab-main small,
  .pose-arrow {
    display: none;
  }

  .darkroom-frame-box {
    padding: 10px;
  }

  .darkroom-proof-wrap {
    max-height: 430px;
  }

  /* Compact 3-up horizontal film selector on mobile for thumb ergonomics */
  .film-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .film-tab {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 10px;
  }

  .film-paper {
    display: none;
  }

  .film-name {
    font-size: 12.5px;
  }

  .hold-raw-btn {
    height: 46px;
  }

  /* Mobile: Clean 2x2 Small Squares — Tap Any Square to Expand Full Crystal-Clear 3:4 Loupe */
  .punch-stage {
    flex: none;
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .square-grid {
    gap: 10px;
  }

  .square-caption {
    padding: 8px 9px;
    font-size: 11.5px;
  }

  .square-zoom-badge {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .loupe-backdrop {
    padding: 12px;
  }

  .loupe-stage {
    max-height: 68dvh;
  }

  .beat-colophon {
    padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  }
}

/* Preview switcher subtle dock */
.pl-preview-switcher {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(10, 10, 12, 0.92);
  border: 1.5px solid rgba(244, 239, 229, 0.25);
  font-family: var(--font-mono);
  font-size: 10px;
}
.pl-preview-switcher a {
  color: #A8A29A;
  text-decoration: none;
  padding: 5px 8px;
  font-weight: 600;
}
.pl-preview-switcher a.active {
  background: var(--vermilion);
  color: #FBF8F1;
}

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