/* ============================================================
   FORMA — the studio job wall
   Paper, tape, pins, ink. One accent (highlighter yellow),
   red reserved for stamps. Sora / Karla / Caveat.
   ============================================================ */

/* ---------- fonts (local, variable) ---------- */
@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("assets/fonts/karla-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("assets/fonts/karla-var-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/caveat-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --paper: #f1ebdd;
  --paper-deep: #e9e1cf;
  --surface: #faf6ea;
  --ink: #292318;
  --muted: #635a4c;
  --hand: #5b4a33;
  --line: #d3c9b2;
  --accent: #f7d64e;
  --accent-ink: #292318;
  --red: #b03a24;
  --dark: #26211a;
  --dark-paper: #f1ebdd;
  --dark-muted: #bdb29e;

  --font-display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Karla", Georgia, sans-serif;
  --font-hand: "Caveat", "Segoe Script", cursive;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-ticket: 0 1px 2px rgba(41, 35, 24, 0.14), 0 10px 24px rgba(41, 35, 24, 0.1);
}

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

html { scroll-behavior: smooth; }

#board, #rules { scroll-margin-top: 76px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22240%22%20height%3D%22240%22%3E%3Cfilter%20id%3D%22n%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.9%22%20numOctaves%3D%222%22%2F%3E%3CfeColorMatrix%20type%3D%22saturate%22%20values%3D%220%22%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D%22linear%22%20slope%3D%220.05%22%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D%22240%22%20height%3D%22240%22%20filter%3D%22url(%23n)%22%2F%3E%3C%2Fsvg%3E');
  -webkit-font-smoothing: antialiased;
}

body.locked { overflow: hidden; }

[hidden] { display: none !important; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.caps {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hand {
  font-family: var(--font-hand);
  font-weight: 600;
  color: var(--hand);
  letter-spacing: 0;
}

/* skip link */
.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 3px;
  text-decoration: none;
  transition: top 180ms var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 235, 221, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding-block: 8px;
}
.wordmark .dot { color: var(--red); }

.topnav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline-end: 10px;
}
.topnav::-webkit-scrollbar { display: none; }

.topnav > a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: border-color 180ms var(--ease);
}

.pocket-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 16px !important;
  min-height: 44px;
  border-radius: 999px;
  border-bottom: 2px solid transparent !important;
}
.pocket-chip b {
  font-weight: 700;
  min-width: 1.4em;
  text-align: center;
}
.pocket-chip.bump b { animation: bump 300ms var(--ease); }

@keyframes bump {
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 7vw, 110px) clamp(56px, 7vw, 104px);
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-overline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.hero-overline::before {
  content: "";
  width: 44px;
  height: 2px;
  background: var(--red);
  flex: none;
}

.display {
  font-size: clamp(3rem, 8.6vw, 8.25rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display .shift {
  display: inline-block;
  margin-left: clamp(0px, 4vw, 72px);
  -webkit-text-stroke: 2.5px var(--ink);
  color: transparent;
}
@supports not (-webkit-text-stroke: 1px black) {
  .display .shift { color: var(--muted); -webkit-text-stroke: 0; }
}

.hero-note {
  font-size: 26px;
  transform: rotate(-2deg);
  margin-top: 10px;
  display: inline-block;
}

.hero-lede {
  max-width: 46ch;
  font-size: 18px;
  margin-top: 28px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 22px;
  min-height: 48px;
  border-radius: 4px;
  text-decoration: none;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.text-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding-block: 12px;
  border-bottom: 2px solid var(--ink);
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.hero-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-index b { color: var(--ink); font-weight: 700; }

/* taped photo, hero side */
.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 460px);
}

.taped {
  position: relative;
  background: var(--surface);
  padding: 12px 12px 16px;
  box-shadow: var(--shadow-ticket);
  transform: rotate(1.6deg);
  transition: transform 220ms var(--ease);
}

.taped img { width: 100%; height: auto; }

.tape {
  position: absolute;
  width: 92px;
  height: 26px;
  background: rgba(236, 226, 199, 0.82);
  box-shadow: 0 1px 3px rgba(41, 35, 24, 0.18);
  border-inline: 1px dashed rgba(41, 35, 24, 0.18);
}
.tape.tl { top: -12px; left: 24px; transform: rotate(-5deg); }
.tape.tr { top: -12px; right: 24px; transform: rotate(4deg); }

.taped figcaption {
  font-family: var(--font-hand);
  font-size: 21px;
  color: var(--hand);
  padding-top: 10px;
  text-align: center;
}

.sticker {
  position: absolute;
  right: -18px;
  top: -30px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--red);
  color: var(--dark-paper);
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(8deg);
  box-shadow: 0 6px 16px rgba(41, 35, 24, 0.25);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
  padding: 12px;
}
.sticker b { display: block; font-size: 30px; letter-spacing: 0; }

.hero-margin {
  position: absolute;
  left: -14px;
  bottom: -30px;
  font-size: 24px;
  transform: rotate(-3deg);
  max-width: 220px;
  text-align: right;
}

/* entrance */
.rise {
  animation: rise 640ms var(--ease) both;
}
.rise.d1 { animation-delay: 70ms; }
.rise.d2 { animation-delay: 150ms; }
.rise.d3 { animation-delay: 230ms; }
.rise.d4 { animation-delay: 310ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- the board ---------- */
.board {
  padding-block: clamp(72px, 8vw, 120px);
  background-image: radial-gradient(rgba(41, 35, 24, 0.07) 1px, transparent 1.4px);
  background-size: 24px 24px;
  border-top: 1px solid var(--line);
}

.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.board-head h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 800;
}

.board-head .hand { font-size: 24px; display: block; margin-top: 8px; }

.big-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 2.5px var(--red);
  color: transparent;
  flex: none;
  transform: translateY(6px);
}
@supports not (-webkit-text-stroke: 1px black) {
  .big-num { color: var(--red); -webkit-text-stroke: 0; }
}
.big-num small {
  font-size: 0.22em;
  letter-spacing: 0.14em;
  -webkit-text-stroke: 0;
  color: var(--muted);
  display: block;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 10px;
}
@supports not (-webkit-text-stroke: 1px black) {
  .big-num small { color: var(--muted); }
}

/* controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ticket);
  margin-bottom: 40px;
}

.field { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.field label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 2px dashed var(--muted);
  border-radius: 3px;
  padding: 11px 14px;
  min-height: 48px;
  width: 100%;
}
.field input { width: min(340px, 78vw); }

.field select {
  appearance: none;
  padding-right: 40px;
  background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%228%22%3E%3Cpath%20d%3D%22M1%201l5%205%205-5%22%20fill%3D%22none%22%20stroke%3D%22%23292318%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.clip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 12px 18px;
  min-height: 48px;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.clip-toggle .clip-knob {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
  display: inline-grid;
  place-content: center;
  flex: none;
}
.clip-toggle .clip-knob::after {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
  transform: scale(0);
  transition: transform 160ms var(--ease);
}
.clip-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.clip-toggle[aria-pressed="true"] .clip-knob::after { transform: scale(1); }
.clip-toggle .clip-n { color: var(--red); font-weight: 800; }
.clip-toggle[aria-pressed="true"] .clip-n { color: var(--accent); }

.count {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: -16px 0 28px;
}

/* ---------- ticket wall ---------- */
.wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(24px, 3vw, 36px);
  grid-auto-flow: dense;
  align-items: start;
}

.ticket {
  grid-column: span 3;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-ticket);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ticket::before { /* the pin */
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #d96b4f, var(--red) 62%);
  box-shadow: 0 3px 4px rgba(41, 35, 24, 0.35);
  z-index: 2;
}

.ticket:nth-child(1) { --tilt: -0.7deg; grid-column: span 4; }
.ticket:nth-child(2) { --tilt: 1.1deg; grid-column: span 2; }
.ticket:nth-child(3) { --tilt: -1.2deg; grid-column: span 2; }
.ticket:nth-child(4) { --tilt: 0.8deg; grid-column: span 2; }
.ticket:nth-child(5) { --tilt: -0.9deg; grid-column: span 2; }
.ticket:nth-child(6) { --tilt: 1.3deg; grid-column: span 3; }
.pocket-note { grid-column: span 3; }

.wall.is-filtered .ticket:nth-child(n) { grid-column: span 3; }
.wall.is-filtered .pocket-note { display: none; }

.t-photo {
  position: relative;
  margin: 10px 10px 0;
}
.t-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.92);
  transition: filter 300ms var(--ease);
}

.t-num {
  position: absolute;
  left: 10px;
  bottom: -14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--surface);
  -webkit-text-stroke: 2px var(--ink);
  pointer-events: none;
}
@supports not (-webkit-text-stroke: 1px black) {
  .t-num { color: var(--ink); -webkit-text-stroke: 0; }
}

.t-body { padding: 26px 20px 14px; flex: 1; }

.t-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.craft {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  color: var(--red);
  background:
    linear-gradient(transparent 58%, rgba(247, 214, 78, 0.75) 58%, rgba(247, 214, 78, 0.75) 92%, transparent 92%);
  padding-inline: 4px;
}

.t-when {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticket h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.t-desc { color: var(--muted); font-size: 15.5px; max-width: 52ch; }

.t-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14.5px;
  color: var(--muted);
}
.t-meta b { color: var(--ink); font-weight: 700; }

/* perforated stub = the opener */
.t-stub {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--paper-deep);
  border: 0;
  border-top: 2px dashed var(--muted);
  padding: 16px 20px;
  min-height: 64px;
  text-align: left;
  transition: background 180ms var(--ease);
}
.t-stub .price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.t-stub .price small {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.t-stub .stub-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.t-stub .stub-arrow { font-size: 20px; transition: transform 200ms var(--ease); }

/* shortlist stamp on cards */
.t-stamp {
  position: absolute;
  top: 16px;
  right: 12px;
  z-index: 3;
}

/* generic ink stamp */
.stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  border: 2.5px solid var(--red);
  border-radius: 4px;
  padding: 6px 10px;
  background: rgba(250, 246, 234, 0.92);
  transform: rotate(-7deg);
  box-shadow: 0 2px 6px rgba(41, 35, 24, 0.18);
}

/* the pocket note tile */
.pocket-note {
  background: var(--ink);
  color: var(--dark-paper);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  position: relative;
}
.pocket-note .caps { color: var(--accent); }
.pocket-note p { font-size: 16.5px; color: var(--dark-muted); max-width: 38ch; }
.pocket-note .hand { color: var(--dark-paper); font-size: 24px; transform: rotate(-2deg); }

/* empty state */
.empty {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 20px;
  border: 2px dashed var(--muted);
  background: rgba(250, 246, 234, 0.6);
}
.empty .hand { font-size: clamp(2rem, 5vw, 3rem); display: block; margin-bottom: 10px; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 24px; }

/* ---------- house rules (dark band) ---------- */
.rules {
  background: var(--dark);
  color: var(--dark-paper);
  padding-block: clamp(88px, 10vw, 144px);
}

.rules-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}

.rules .kicker { color: var(--accent); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.rules .kicker::before { content: ""; width: 44px; height: 2px; background: var(--red); }
.rules h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 800; margin-bottom: 36px; }

.ledger {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(241, 235, 221, 0.25);
}
.ledger li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 26px 4px;
  border-bottom: 1px solid rgba(241, 235, 221, 0.25);
  transition: background 180ms var(--ease);
}
.ledger .no {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.ledger h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.ledger p { color: var(--dark-muted); font-size: 16px; max-width: 56ch; }

.rules-aside { position: relative; }
.rules-aside .taped { transform: rotate(-1.8deg); margin-bottom: 28px; }
.rules-aside .taped img { aspect-ratio: 4 / 3; object-fit: cover; }

.address {
  border: 1px solid rgba(241, 235, 221, 0.25);
  padding: 24px;
  display: grid;
  gap: 10px;
}
.address .caps { color: var(--accent); }
.address p { font-size: 16px; color: var(--dark-muted); }
.address b { color: var(--dark-paper); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 48px;
  background: var(--paper);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}
.footer p { font-size: 14px; color: var(--muted); }
.footer .wordmark { font-size: 20px; }

/* ---------- overlay + drawer (detail) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(38, 33, 26, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}

.drawer {
  background: var(--surface);
  width: min(880px, 100%);
  max-height: min(92vh, 920px);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(20, 16, 10, 0.5);
  position: relative;
  transform: rotate(-0.4deg);
}

.d-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 4px;
  padding: 12px 16px;
  min-height: 44px;
  box-shadow: 0 4px 10px rgba(20, 16, 10, 0.3);
}
.d-close span { font-size: 16px; line-height: 1; }

.d-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
}

.d-photo {
  position: relative;
  background: var(--paper-deep);
  min-height: 320px;
}
.d-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.d-photo .stamp {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 15px;
  padding: 10px 14px;
  opacity: 0;
}
.d-photo .stamp.on { opacity: 1; }
.d-photo .stamp.slam { animation: slam 300ms var(--ease) both; }

@keyframes slam {
  0% { opacity: 0; transform: scale(2.6) rotate(10deg); }
  62% { opacity: 1; transform: scale(0.94) rotate(-9deg); }
  100% { opacity: 1; transform: scale(1) rotate(-7deg); }
}

.d-body { padding: clamp(28px, 4vw, 44px); }

.d-tag {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.d-tag .craft { font-size: 20px; text-transform: none; letter-spacing: 0; }

.drawer h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.d-copy { color: var(--muted); font-size: 17px; max-width: 52ch; }

.d-specs {
  margin: 26px 0 0;
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.d-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px dashed var(--line);
}
.d-specs dt {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.d-specs dd { margin: 0; font-weight: 700; font-size: 15.5px; text-align: right; }

.d-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
}

.save-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 22px;
  min-height: 52px;
  border-radius: 4px;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.save-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 1px 1px 0 var(--ink);
}
.save-btn .clip-knob {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
  display: inline-grid;
  place-content: center;
  flex: none;
}
.save-btn .clip-knob::after {
  content: "";
  width: 8px; height: 8px;
  background: currentColor;
  transform: scale(0);
  transition: transform 160ms var(--ease);
}
.save-btn[aria-pressed="true"] .clip-knob::after { transform: scale(1); }

.d-note { font-size: 13.5px; color: var(--muted); max-width: 30ch; }
.d-note b { color: var(--ink); }

/* ---------- hover & active states (pointer only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .ticket:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 2px 3px rgba(41, 35, 24, 0.14), 0 18px 34px rgba(41, 35, 24, 0.16);
  }
  .ticket:hover .t-photo img { filter: saturate(1.12) contrast(1.02); }
  .taped:hover { transform: rotate(0.4deg); }
  .t-stub:hover { background: var(--accent); }
  .t-stub:hover .price small { color: var(--ink); }
  .t-stub:hover .stub-arrow { transform: translateX(5px); }
  .chip:hover, .save-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
  .text-link:hover { border-color: var(--red); color: var(--red); }
  .topnav > a:hover { border-color: var(--ink); }
  .pocket-chip:hover { background: var(--red); }
  .clip-toggle:hover { background: rgba(41, 35, 24, 0.08); }
  .clip-toggle[aria-pressed="true"]:hover { background: #3d362a; }
  .ledger li:hover { background: rgba(241, 235, 221, 0.05); }
  .d-close:hover { background: var(--red); }
  .empty .chip:hover { transform: translate(-2px, -2px); }
}

button:active { transform: scale(0.97); }
a:active { opacity: 0.65; }
.ticket .t-stub:active { transform: scale(0.985); }
.chip:active, .save-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* focus per context */
.chip:focus-visible,
.save-btn:focus-visible { outline-offset: 3px; }
.rules :focus-visible,
.d-close:focus-visible { outline-color: var(--dark-paper); }
.pocket-note :focus-visible { outline-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { justify-self: start; margin-top: 12px; }
  .rules-grid { grid-template-columns: 1fr; }
  .wall { grid-template-columns: repeat(2, 1fr); }
  .wall .ticket:nth-child(n) { grid-column: span 1; }
  .wall.is-filtered .ticket:nth-child(n) { grid-column: span 1; }
  .pocket-note { grid-column: span 2; }
  .d-grid { grid-template-columns: 1fr; }
  .d-photo { min-height: 240px; }
  .d-photo img { position: relative; aspect-ratio: 16 / 9; height: auto; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wall { grid-template-columns: 1fr; }
  .wall .ticket:nth-child(n) { grid-column: auto; }
  .wall.is-filtered .ticket:nth-child(n) { grid-column: auto; }
  .pocket-note { grid-column: 1 / -1; }
  .board-head { flex-direction: column; align-items: flex-start; }
  .big-num { order: -1; }
  .controls { padding: 16px; }
  .field { min-width: 100%; }
  .field input { width: 100%; }
  .sticker { right: -8px; top: -22px; width: 108px; height: 108px; font-size: 10.5px; }
  .sticker b { font-size: 24px; }
  .hero-margin { position: static; margin-top: 14px; text-align: left; transform: rotate(-2deg); }
  .taped:hover { transform: rotate(1.6deg); }
  .d-specs { grid-template-columns: 1fr; }
  .hero-index { gap: 8px 18px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .pocket-chip.bump b { animation: none; }
  .d-photo .stamp.slam { animation: none; opacity: 1; transform: rotate(-7deg); }
  .ticket, .taped, .t-photo img, .t-stub .stub-arrow {
    transition: none;
  }
  .ticket:hover, .taped:hover { transform: none; }
  .ticket:hover .t-photo img { filter: saturate(0.92); }
  button:active { transform: none; }
}
