:root {
  --starch: #f3eee4;
  --cloud: #fcfaf5;
  --flax: #cbb89a;
  --soap: #5e87a0;
  --soap-deep: #3d5d72;
  --soot: #6a5748;
  --denim: #24364c;
  --ink: #1c2226;
  --mute: #6b6258;
  --warn: #9a4e2a;
  --ok: #3d6e52;
  --hem: #d8cfc0;
  --line: rgba(36, 54, 76, 0.16);
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(203, 184, 154, 0.18) 46px 47px),
    var(--starch);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  padding-left: 28px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.app-link { color: var(--soap-deep); text-decoration: underline; text-underline-offset: 3px; }
button { font-family: inherit; cursor: pointer; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(94, 135, 160, 0.12);
  padding: 0.05em 0.35em;
}

.weave {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.16;
  background-image: url("images/texture.webp");
  background-size: 280px auto;
  mix-blend-mode: multiply;
}

.spine {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 45;
  background: var(--denim);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}
.punch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--starch);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 40px;
  top: 12px;
  z-index: 80;
  background: var(--denim);
  color: var(--cloud);
  padding: 8px 12px;
}

.hem-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px 10px 16px;
  background: rgba(252, 250, 245, 0.94);
  border-bottom: 2px dashed var(--flax);
  box-shadow: 0 1px 0 var(--hem);
}
.wash-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.wash-tag small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mute);
  font-weight: 400;
}
.care {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--denim);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  font-size: 14px;
  font-weight: 900;
  color: var(--denim);
}
.nav-toggle {
  display: none;
  background: var(--denim);
  color: var(--cloud);
  border: 0;
  padding: 8px 14px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.hem-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14px;
}
.hem-links a { color: var(--mute); }
.hem-links a.is-active,
.hem-links a:hover { color: var(--denim); }
.hem-links .live {
  background: var(--denim);
  color: var(--cloud);
  padding: 7px 12px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.fold-hero {
  position: relative;
  min-height: 94vh;
  overflow: hidden;
  display: grid;
  align-items: end;
}
.fold-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pleat-row {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.9fr 1.2fr 0.85fr;
  z-index: 1;
  pointer-events: none;
}
.pleat {
  background: linear-gradient(
    90deg,
    rgba(28, 34, 38, 0.28) 0%,
    rgba(28, 34, 38, 0.02) 18%,
    rgba(252, 250, 245, 0.08) 52%,
    rgba(28, 34, 38, 0.22) 100%
  );
}
.pleat:nth-child(even) {
  background: linear-gradient(
    90deg,
    rgba(28, 34, 38, 0.34) 0%,
    rgba(94, 135, 160, 0.08) 40%,
    rgba(28, 34, 38, 0.18) 100%
  );
}
.ticket-overlay {
  position: relative;
  z-index: 2;
  margin: 0 6vw 8vh;
  max-width: 720px;
  padding: 28px 28px 28px 36px;
  background: rgba(252, 250, 245, 0.92);
  border: 1px solid var(--line);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  box-shadow:
    inset 10px 0 0 var(--denim),
    0 24px 48px rgba(36, 54, 76, 0.18);
}
.kicker,
.vlabel,
.num,
.clock-label {
  font-family: var(--mono);
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--soap-deep);
  margin: 0 0 10px;
  text-transform: uppercase;
}
h1, h2, h3 {
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
}
h1 { font-size: clamp(32px, 6.4vw, 84px); }
h1 .break { display: block; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }
.lead { margin: 0 0 16px; max-width: 42em; color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
}
.chip.soot { background: #e6ddd2; color: var(--soot); }
.chip.soap { background: #d7e4ec; color: var(--soap-deep); }
.chip.cloud { background: var(--cloud); color: var(--ink); }
.chip.denim { background: var(--denim); color: var(--cloud); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--denim);
  font-size: 14px;
  font-weight: 700;
}
.btn.fill { background: var(--denim); color: var(--cloud); }
.btn.line { background: transparent; color: var(--denim); }

.sheet {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 84px 0;
}
.crease-block {
  position: relative;
  border-top: 12px solid transparent;
  border-image: repeating-linear-gradient(
    90deg,
    var(--flax) 0 10px,
    transparent 10px 18px
  ) 12;
  box-shadow: inset 0 18px 28px rgba(36, 54, 76, 0.06);
}
.crease-block.alt { background: linear-gradient(180deg, #e8e0d2 0%, var(--starch) 28%); }
.crease-head {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  margin-bottom: 36px;
}
.crease-head p:last-child { margin: 0; color: var(--mute); }

.ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ticket {
  background: var(--cloud);
  border: 1px solid var(--line);
  padding: 22px 20px 20px 26px;
  min-height: 240px;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: inset 8px 0 0 var(--soap);
  background-image:
    radial-gradient(circle at 14px 28px, var(--starch) 5px, transparent 6px),
    radial-gradient(circle at 14px 56px, var(--starch) 5px, transparent 6px);
}
.stamp-mark {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--soap-deep);
  border: 1px dashed var(--soap);
  padding: 2px 8px;
  margin-bottom: 10px;
}
.ticket ul { margin: 0; padding-left: 1.1em; }
.ticket li { margin: 0.35em 0; }

.fold-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 64px;
  padding-bottom: 28px;
  border-bottom: 1px dashed var(--flax);
}
.fold-row.flip { direction: rtl; }
.fold-row.flip > * { direction: ltr; }
.num { display: block; }
figure { margin: 0; }
figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  box-shadow: 16px 18px 0 rgba(36, 54, 76, 0.12);
}
figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--mute);
  font-style: italic;
}

.stamp-well {
  margin-top: 18px;
  padding: 16px;
  background: rgba(94, 135, 160, 0.08);
  border: 1px dashed var(--soap);
}
.slider {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 10px;
}
.slider input { width: 100%; accent-color: var(--denim); }
.slider span { font-family: var(--mono); color: var(--denim); }
.tri-state { margin: 8px 0 0; font-family: var(--mono); font-size: 13px; }
.tri-state.warn { color: var(--warn); }
.tri-state.ok { color: var(--ok); }
.tri-state.denim-state { color: var(--denim); }

.hanger-box { margin-top: 16px; }
.hanger-rail { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hanger-rail button {
  background: transparent;
  border: 1px solid var(--flax);
  color: var(--ink);
  padding: 6px 12px;
  font-family: var(--mono);
}
.hanger-rail button.on {
  background: var(--denim);
  color: var(--cloud);
  border-color: var(--denim);
}
.hanger-track {
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--flax) 0 2px, transparent 2px 10px);
  border-bottom: 2px solid var(--soot);
  position: relative;
}
.hanger-fill {
  display: block;
  height: 10px;
  width: 56%;
  background: var(--soap);
  margin-top: 2px;
}
#hanger-note { margin: 8px 0 0; font-size: 13px; color: var(--mute); }

.gate-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}
.gate-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}
.stamp-btn {
  margin-top: 12px;
  background: var(--denim);
  color: var(--cloud);
  border: 0;
  padding: 10px 16px;
  font-weight: 700;
}
.stamp-btn:disabled {
  background: var(--hem);
  color: var(--mute);
  cursor: not-allowed;
}
.stamp-btn.stamped { background: var(--ok); }
.muted { color: var(--mute); font-size: 13px; }

.funnel {
  margin-top: 40px;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.funnel-step {
  background: var(--denim);
  color: var(--cloud);
  text-align: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}
.funnel-step.wide { width: 100%; background: var(--soot); }
.funnel-step:nth-child(2) { width: 84%; background: var(--soap-deep); }
.funnel-step:nth-child(3) { width: 68%; background: var(--soap); color: var(--ink); }
.funnel-step.narrow { width: 48%; background: var(--denim); }

.rule-list { font-size: 17px; max-width: 46em; }
.rule-list li { margin: 0.5em 0; }
.foot-live { margin-top: 28px; }

.hem-foot {
  padding: 22px 22px 22px 16px;
  border-top: 2px dashed var(--flax);
  color: var(--mute);
  font-size: 13px;
  background: var(--cloud);
}

@media (max-width: 880px) {
  body { padding-left: 22px; }
  .spine { width: 22px; }
  .nav-toggle { display: inline-flex; }
  .hem-bar { position: relative; }
  .hem-links {
    display: none;
    position: absolute;
    right: 12px;
    top: 56px;
    flex-direction: column;
    align-items: stretch;
    background: var(--cloud);
    border: 1px solid var(--line);
    padding: 12px;
    min-width: 200px;
    z-index: 60;
    box-shadow: 8px 12px 0 rgba(36, 54, 76, 0.12);
  }
  .hem-links.open { display: flex; }
  .crease-head,
  .fold-row,
  .fold-row.flip,
  .ticket-grid,
  .gate-layout {
    display: block;
  }
  .fold-row figure { margin-top: 16px; }
  .ticket { margin-bottom: 12px; }
  .gate-photo { margin-bottom: 16px; }
  h1 { font-size: 30px; letter-spacing: -0.02em; }
  .ticket-overlay { margin: 0 4vw 6vh; padding: 20px 16px 20px 24px; }
  .lead { font-size: 15px; }
}

