/* ============================================================
   FORMA — The Workshop Recipe Box
   Every workshop is a recipe card. Save = pin it to the menu.
   ============================================================ */

/* ---------- Fonts (all local, no runtime CDN) ---------- */
@font-face {
  font-family: "Special Elite";
  src: url("/artifacts/forma-frontend--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-48-01-915Z/assets/specialelite-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/artifacts/forma-frontend--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-48-01-915Z/assets/courierprime-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/artifacts/forma-frontend--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-48-01-915Z/assets/courierprime-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/artifacts/forma-frontend--v1--s4-whacky--glm-5.3--ui-ux-pro-max--2026-09-19T02-48-01-915Z/assets/caveat-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f2ecdc;        /* page */
  --card: #fbf7ec;         /* index card */
  --kraft: #ddc9a3;        /* recipe box / clipboard */
  --ink: #241d12;          /* near-black brown */
  --ink-soft: #5d5240;     /* muted brown */
  --stamp: #a62d1a;        /* rubber-stamp red */
  --stamp-deep: #7e1f10;
  --paper-2: #e9e0c9;      /* studio strip */
  --tab-ceramics: #a64e2e;
  --tab-painting: #2f5b80;
  --tab-floristry: #55702f;
  --tab-baking: #8a5f14;
  --tab-text: #fbf7ec;
  --shadow: rgba(36, 29, 18, 0.14);
  --font-type: "Special Elite", "Courier Prime", monospace;
  --font-mono: "Courier Prime", ui-monospace, monospace;
  --font-hand: "Caveat", cursive;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.14 0 0 0 0 0.11 0 0 0 0 0.07 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  background-image: var(--noise);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, select, input { font: inherit; color: inherit; }
button, select, label { cursor: pointer; }
button { background: none; border: none; padding: 0; }
h1, h2, h3 { font-family: var(--font-type); font-weight: 400; margin: 0; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
dl, dt, dd { margin: 0; }
a { color: var(--stamp-deep); }

:focus-visible {
  outline: 3px dashed var(--stamp);
  outline-offset: 3px;
  border-radius: 2px;
}
.hidden { display: none !important; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.skip-link:focus { left: 8px; }

/* ---------- Masthead ---------- */
.masthead {
  position: relative;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  padding: clamp(18px, 3.5vw, 44px) clamp(16px, 4vw, 56px) 0;
  overflow: hidden;
}
.mast-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
}
.brand { position: relative; }
.brand h1 {
  font-size: clamp(58px, 11vw, 140px);
  line-height: 0.9;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand .tagline {
  font-family: var(--font-hand);
  font-size: clamp(22px, 3vw, 34px);
  color: var(--ink-soft);
  transform: rotate(-2deg);
  display: inline-block;
  margin: 2px 0 6px 6px;
}
.mast-side {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 14px;
  max-width: 330px;
}
.mast-side strong { color: var(--ink); font-weight: 700; }

/* rubber stamp */
.stamp {
  display: inline-block;
  font-family: var(--font-type);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stamp);
  border: 3px double var(--stamp);
  padding: 0.35em 0.8em 0.28em;
  transform: rotate(-7deg);
  font-size: clamp(15px, 2vw, 22px);
  opacity: 0.92;
  white-space: nowrap;
}
.stamp.mast-stamp {
  position: absolute;
  right: clamp(4px, 3vw, 40px);
  bottom: clamp(40px, 6vw, 92px);
  pointer-events: none;
}
@media (max-width: 900px) {
  .stamp.mast-stamp { position: static; display: inline-block; margin: 10px 0 4px; }
  .mast-side { text-align: left; }
  .mast-row { align-items: flex-start; flex-direction: column; }
}

/* ticker tape */
.ticker {
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  margin-top: 8px;
}
.ticker-inner {
  display: inline-block;
  padding: 7px 0;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: 13px;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker-inner { animation-play-state: paused; }
@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Controls (the lookup counter) ---------- */
.controls {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  background-image: var(--noise);
  border-bottom: 3px solid var(--ink);
  padding: 10px clamp(16px, 4vw, 56px) 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 18px;
}
.control { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; max-width: 340px; }
.control-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.input, .select {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  min-height: 44px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.input { width: 100%; }
.select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23241d12' stroke-width='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

/* saved-filter toggle */
.saved-filter {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 10px 16px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}
.saved-filter .box {
  width: 15px;
  height: 15px;
  border: 2px solid var(--ink);
  display: inline-block;
  background: var(--paper);
  flex: none;
}
.saved-filter[aria-pressed="true"] {
  background: var(--stamp);
  color: var(--card);
  border-color: var(--stamp-deep);
  transform: rotate(-1.5deg);
}
.saved-filter[aria-pressed="true"] .box {
  background: var(--card);
  border-color: var(--card);
  position: relative;
}
.saved-filter[aria-pressed="true"] .box::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--stamp);
}
.count-wrap {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.count {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--ink-soft);
  transform: rotate(-2deg);
}
.count b { color: var(--stamp); font-weight: 700; }

/* ---------- Board (the box on the table) ---------- */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  grid-template-areas: "grid menu";
  gap: 30px;
  align-items: start;
  padding: 34px clamp(16px, 4vw, 56px) 40px;
  max-width: 1440px;
  margin: 0 auto;
}
@media (max-width: 980px) {
  .board { grid-template-columns: 1fr; grid-template-areas: "grid" "menu"; }
}
.grid-wrap { grid-area: grid; min-width: 0; }

.box-frame {
  position: relative;
  background: var(--kraft);
  background-image: var(--noise);
  border: 3px solid var(--ink);
  box-shadow: inset 0 14px 22px -14px rgba(36, 29, 18, 0.55);
  padding: 30px clamp(14px, 2.5vw, 34px) 34px;
}
.box-label {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translate(-50%, -100%) rotate(-1deg);
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 3px 18px 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Recipe cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px 26px;
  padding-top: 16px;
}
[hidden] { display: none !important; }
.card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 6px 8px 0 var(--shadow);
  padding: 18px 16px 16px;
  transform: rotate(var(--rot, 0deg));
  transition: transform 150ms ease, box-shadow 150ms ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 8px 12px 0 var(--shadow); z-index: 2; }
.card:focus-within { transform: rotate(0deg); z-index: 2; }

.card .tab {
  position: absolute;
  top: -13px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tab-text);
  padding: 3px 12px 2px;
  border: 2px solid var(--ink);
  border-bottom: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(50% + 14px) 100%, calc(50% - 14px) calc(100% - 6px), 0 calc(100% - 6px));
  padding-bottom: 10px;
}
.tab-ceramics { background: var(--tab-ceramics); }
.tab-painting { background: var(--tab-painting); }
.tab-floristry { background: var(--tab-floristry); }
.tab-baking { background: var(--tab-baking); }

.card-no {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card-title {
  font-size: 25px;
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.rules {
  height: 8px;
  border-top: 2px solid var(--stamp);
  border-bottom: 1px solid var(--stamp);
  opacity: 0.75;
  margin: 0 2px;
}
.card-photo {
  position: relative;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 6px;
}
.card-photo img {
  width: 100%;
  aspect-ratio: 5 / 3.4;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.98);
}
.card-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  font-size: 13.5px;
}
.card-meta dt {
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 2px;
  white-space: nowrap;
}
.card-meta dd { font-weight: 400; }
.flavor {
  font-family: var(--font-hand);
  font-size: 19px;
  line-height: 1.1;
  color: var(--stamp);
  transform: rotate(-1.4deg);
  margin-top: -2px;
}
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: stretch;
  padding-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
}
.btn:active { transform: translate(2px, 2px); box-shadow: none !important; }
.btn-open {
  flex: 1;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
}
.btn-open:hover { background: var(--stamp); }
.btn-pin {
  background: var(--card);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 10px 13px;
}
.btn-pin:hover { background: var(--paper); }
.btn-pin[aria-pressed="true"] {
  background: var(--stamp);
  color: var(--card);
  border-color: var(--stamp-deep);
}
.btn svg { flex: none; }

.stamp-pinned {
  position: absolute;
  top: 9px;
  right: 10px;
  font-family: var(--font-type);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stamp);
  border: 3px double var(--stamp);
  padding: 2px 7px 1px;
  transform: rotate(7deg);
  opacity: 0.9;
  pointer-events: none;
}

/* ---------- Empty state ---------- */
.empty-state {
  max-width: 480px;
  margin: 26px auto 10px;
  background: var(--card);
  border: 2px solid var(--ink);
  box-shadow: 6px 8px 0 var(--shadow);
  padding: 26px 24px 34px;
  text-align: center;
  transform: rotate(-1deg);
  clip-path: polygon(1% 0, 99% 2%, 100% 12%, 98% 26%, 100% 44%, 99% 62%, 100% 80%, 98% 92%, 100% 100%, 3% 98%, 0 88%, 2% 74%, 0 58%, 1% 40%, 0 22%, 2% 8%);
}
.empty-state h2 {
  font-size: 30px;
  letter-spacing: 0.1em;
  color: var(--stamp);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.empty-state p { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 10px; }
.empty-state .hint {
  font-family: var(--font-hand);
  font-size: 21px;
  color: var(--stamp);
  transform: rotate(-1deg);
}
.empty-state .btn {
  background: var(--stamp);
  color: var(--card);
  border-color: var(--stamp-deep);
  box-shadow: 4px 4px 0 var(--shadow);
  margin-top: 8px;
}
.empty-state .btn:hover { background: var(--stamp-deep); }

/* ---------- Menu clipboard (shortlist) ---------- */
.menu {
  grid-area: menu;
  position: sticky;
  top: 130px;
  background: var(--card);
  background-image: var(--noise);
  border: 3px solid var(--ink);
  box-shadow: 8px 10px 0 var(--shadow);
  padding: 40px 18px 20px;
  transform: rotate(0.6deg);
  max-width: 340px;
}
@media (max-width: 980px) {
  .menu { position: static; margin: 0 auto; width: min(100%, 480px); }
}
.clip {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 30px;
  background: var(--ink);
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 -6px 0 rgba(255, 255, 255, 0.12);
}
.clip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  width: 34px;
  height: 18px;
  background: #8f887a;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.menu h2 {
  font-size: 21px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 3px double var(--stamp);
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.menu-note {
  text-align: center;
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--ink-soft);
  padding: 10px 4px 16px;
}
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px dashed var(--ink-soft);
  padding: 8px 10px;
  background: var(--paper);
}
.menu-item .m-no { font-family: var(--font-type); font-size: 13px; color: var(--stamp); }
.menu-item form { flex: 1; min-width: 0; }
.menu-item .m-title {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-type);
  font-size: 15.5px;
  line-height: 1.2;
  padding: 2px 0;
  cursor: pointer;
}
.menu-item .m-title:hover { color: var(--stamp); }
.menu-item .m-price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}
.menu-item .m-remove {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: var(--card);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.menu-item .m-remove:hover { background: var(--stamp); color: var(--card); }
.menu-total {
  margin-top: 14px;
  border-top: 2px solid var(--ink);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.menu-fineprint {
  margin-top: 10px;
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--ink-soft);
  text-align: center;
  transform: rotate(-1deg);
}

/* ---------- Detail dialog (a card pulled from the box) ---------- */
dialog.detail {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: visible;
  color: var(--ink);
}
dialog.detail::backdrop {
  background: rgba(36, 29, 18, 0.62);
  backdrop-filter: grayscale(0.4);
}
.detail-card {
  position: relative;
  background: var(--card);
  background-image: var(--noise);
  border: 3px solid var(--ink);
  box-shadow: 12px 14px 0 rgba(20, 15, 8, 0.4);
  padding: 0;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  animation: pull 220ms ease-out;
}
@keyframes pull {
  from { transform: translateY(18px) rotate(-0.6deg) scale(0.97); opacity: 0; }
}
.detail-top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.detail-head {
  position: relative;
  padding: 22px clamp(18px, 4vw, 40px) 14px;
}
.detail-tab {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tab-text);
  padding: 4px 12px;
  border: 2px solid var(--ink);
}
.detail-close-x {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  background: var(--stamp);
  color: var(--card);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
}
.detail-close-x:hover { transform: rotate(90deg); }
.detail-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.detail-title {
  font-size: clamp(30px, 5.5vw, 46px);
  line-height: 1.05;
  max-width: 15ch;
}
.detail-rules {
  height: 8px;
  border-top: 2px solid var(--stamp);
  border-bottom: 1px solid var(--stamp);
  opacity: 0.75;
  margin: 12px clamp(18px, 4vw, 40px) 0;
}
.detail-body {
  padding: 20px clamp(18px, 4vw, 40px) 26px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 24px;
}
@media (max-width: 720px) {
  .detail-body { grid-template-columns: 1fr; }
}
.polaroid {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  padding: 10px 10px 14px;
  transform: rotate(1.2deg);
  box-shadow: 6px 8px 0 var(--shadow);
  align-self: start;
}
.polaroid img {
  width: 100%;
  aspect-ratio: 5 / 3.4;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.98);
}
.polaroid figcaption {
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 8px;
}
.tape {
  position: absolute;
  width: 92px;
  height: 26px;
  background: rgba(214, 198, 148, 0.82);
  border: 1px solid rgba(120, 102, 55, 0.35);
}
.tape.tl { top: -13px; left: -16px; transform: rotate(-38deg); }
.tape.br { bottom: -10px; right: -16px; transform: rotate(-36deg); }

.recipe-text { display: flex; flex-direction: column; gap: 18px; }
.recipe-note {
  font-family: var(--font-type);
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.5;
}
.detail-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 15px;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}
.detail-facts dt {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 3px;
  white-space: nowrap;
}
.detail-flavor {
  font-family: var(--font-hand);
  font-size: 23px;
  color: var(--stamp);
  transform: rotate(-1.2deg);
  align-self: flex-start;
}
.detail-actions {
  border-top: 2px dashed var(--ink-soft);
  margin: 0 clamp(18px, 4vw, 40px);
  padding: 20px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.save-toggle {
  position: relative;
  background: var(--stamp);
  color: var(--card);
  border: 2px solid var(--stamp-deep);
  box-shadow: 4px 4px 0 rgba(36, 29, 18, 0.35);
  min-height: 52px;
  padding: 12px 22px;
  font-size: 15px;
}
.save-toggle:hover { background: var(--stamp-deep); }
.save-toggle[aria-pressed="false"] {
  background: var(--card);
  color: var(--stamp);
  border-color: var(--stamp);
}
.save-toggle[aria-pressed="false"]:hover { background: var(--paper); }
.save-hint {
  font-family: var(--font-hand);
  font-size: 19px;
  color: var(--ink-soft);
}
.btn-back {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
  min-height: 48px;
}
.btn-back:hover { background: var(--stamp); }

/* ---------- Studio strip ---------- */
.studio-strip {
  border-top: 3px solid var(--ink);
  background: var(--paper-2, #e9e0c9);
  background-image: var(--noise);
  padding: 40px clamp(16px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  justify-content: center;
  max-width: 1440px;
  margin: 0 auto;
}
.studio-polaroid {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 10px 10px 12px;
  transform: rotate(-2deg);
  box-shadow: 6px 8px 0 var(--shadow);
  flex: 0 1 380px;
}
.studio-polaroid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.studio-polaroid figcaption {
  font-family: var(--font-hand);
  font-size: 18px;
  color: var(--ink-soft);
  padding-top: 6px;
  text-align: center;
}
.studio-copy { flex: 0 1 430px; }
.studio-copy h2 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  margin-bottom: 10px;
}
.studio-copy p { color: var(--ink-soft); max-width: 44ch; }
.studio-copy p + p { margin-top: 10px; }
.studio-copy .hand {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--stamp);
  transform: rotate(-1.6deg);
  display: inline-block;
  margin-top: 12px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 30px clamp(16px, 4vw, 56px) 36px;
  font-size: 13px;
  line-height: 1.7;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: flex-start;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
}
.foot-brand { font-family: var(--font-type); font-size: 22px; letter-spacing: 0.2em; text-transform: uppercase; }
footer .fine { color: #cfc4ab; max-width: 62ch; }
footer .stamp { color: #e46a52; border-color: #e46a52; font-size: 14px; transform: rotate(-4deg); }
footer a { color: inherit; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticker-inner { animation: none; }
  .card, .card:hover, .btn, .saved-filter, .detail-close-x, .save-toggle, .btn-back {
    transition: none;
  }
  .card:hover { transform: rotate(var(--rot, 0deg)); }
  .detail-card { animation: none; }
  * { scroll-behavior: auto; }
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; gap: 34px 18px; }
  .box-frame { padding: 24px 12px 26px; }
  .controls { position: static; gap: 10px 14px; }
  .control { flex: 1 1 100%; max-width: none; }
  .saved-filter { flex: 1 1 100%; justify-content: center; }
  .count-wrap { margin-left: 0; }
  .card-title { font-size: 22px; }
  .detail-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .save-toggle { width: 100%; }
}
