/* ==========================================================================
   Forma — "the poster wall" (risograph print-shop world)
   ========================================================================== */

:root {
  --paper: #f1ece2;
  --paper-deep: #e9e2d4;
  --ink: #262219;
  --ink-soft: #57513f;
  --hairline: #c9c0ac;
  --ceramics: #2b47b0;
  --ceramics-bright: #3556d4;
  --baking: #a85b10;
  --baking-bright: #c96f16;
  --floristry: #3f7032;
  --floristry-bright: #4e8a3e;
  --painting: #be3a22;
  --painting-bright: #d94a30;

  --font-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Karla", "Avenir Next", "Segoe UI", sans-serif;

  --shadow-print: 0 2px 5px rgba(38, 34, 25, 0.16), 0 14px 34px rgba(38, 34, 25, 0.14);
  --shadow-lift: 0 3px 7px rgba(38, 34, 25, 0.18), 0 22px 48px rgba(38, 34, 25, 0.2);

  --space-unit: 8px;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1240px;
}

/* --- reset & ground ------------------------------------------------------ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55 0 0 0 0 0.51 0 0 0 0 0.42 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header.masthead, footer.footer { position: relative; z-index: 1; }

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

::selection { background: var(--ceramics-bright); color: var(--paper); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top 0.15s ease-out;
}
.skip-link:focus-visible { top: 0; }

/* --- masthead ------------------------------------------------------------ */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter) 18px;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  width: 100%;
}

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

.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-mark circle { mix-blend-mode: multiply; }
.ink-ceramics { fill: var(--ceramics-bright); }
.ink-painting { fill: var(--painting-bright); }
.ink-floristry { fill: var(--floristry-bright); }
.ink-baking { fill: var(--baking-bright); }

.brand-word {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.masthead-note {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

/* --- hero ------------------------------------------------------------------ */

.hero {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(24px, 4vh, 48px) var(--gutter) clamp(40px, 6vh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 5.6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  max-width: 12ch;
  text-wrap: balance;
}

.hero-lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  max-width: 44ch;
  margin: 0 0 14px;
  color: var(--ink);
}

.hero-facts {
  margin: 0 0 28px;
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

.hero-cta { font-size: 15px; padding: 14px 26px; }

.hero-posters {
  position: relative;
  min-height: clamp(320px, 42vw, 470px);
}

.poster {
  position: absolute;
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-print);
  background: var(--ink);
}
.poster img { width: 100%; height: 100%; object-fit: cover; }

.poster-a {
  width: 62%;
  aspect-ratio: 7 / 8;
  top: 0;
  left: 4%;
  rotate: -2.4deg;
  z-index: 1;
}

.poster-b {
  width: 52%;
  aspect-ratio: 4 / 3;
  bottom: 0;
  right: 2%;
  rotate: 1.8deg;
  z-index: 2;
  box-shadow: var(--shadow-lift);
}

/* duotone treatment: ink veil recolors the print; hover pulls it back */
.duotone { position: relative; }
.duotone img { filter: contrast(1.06) brightness(1.02); }
.duotone .duo-veil {
  position: absolute;
  inset: 0;
  background: var(--duo-ink, var(--ceramics));
  mix-blend-mode: color;
  opacity: 0.85;
  transition: opacity 0.45s ease-out;
}
.duotone::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--duo-ink, var(--ceramics));
  mix-blend-mode: multiply;
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 0.45s ease-out;
}
.duotone[data-ink="ceramics"]  { --duo-ink: var(--ceramics-bright); }
.duotone[data-ink="baking"]    { --duo-ink: var(--baking-bright); }
.duotone[data-ink="floristry"] { --duo-ink: var(--floristry-bright); }
.duotone[data-ink="painting"]  { --duo-ink: var(--painting-bright); }

@media (hover: hover) {
  .duotone:hover img, .duotone:focus-within img { filter: none; }
  .duotone:hover .duo-veil, .duotone:focus-within .duo-veil,
  .duotone:hover::after, .duotone:focus-within::after { opacity: 0; }
}

/* rotating print stamp */
.hero-stamp {
  position: absolute;
  z-index: 3;
  width: clamp(96px, 10vw, 132px);
  height: auto;
  top: -26px;
  right: 6%;
  filter: drop-shadow(0 2px 4px rgba(38, 34, 25, 0.25));
}
.stamp-ring-outer { fill: var(--painting); }
.stamp-ring-inner { fill: var(--paper); }
.stamp-text {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  fill: var(--paper);
}
.stamp-spin { transform-origin: 60px 60px; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stamp-core {
  font-family: var(--font-display);
  font-size: 24px;
  fill: var(--painting);
}

/* --- buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 13px;
  line-height: 1;
  padding: 13px 20px;
  border-radius: 3px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out,
              background-color 0.15s ease-out, color 0.15s ease-out;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { box-shadow: 0 8px 18px rgba(38, 34, 25, 0.28); }

.btn-toggle { padding: 10px 14px; }
.btn-toggle .icon { width: 17px; height: 17px; }
.btn-toggle[aria-pressed="true"] {
  background: var(--painting);
  border-color: var(--painting);
  color: var(--paper);
}
.count-pill {
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.btn-toggle[aria-pressed="true"] .count-pill { background: var(--paper); color: var(--painting); }

.icon { flex: none; }

/* --- program toolbar -------------------------------------------------------- */

.toolbar-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 10px 24px -18px rgba(38, 34, 25, 0.5);
}

.toolbar {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "title controls count";
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}

.program-title {
  grid-area: title;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

.toolbar-controls {
  grid-area: controls;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #faf7f0;
  padding: 0 12px;
  transition: box-shadow 0.15s ease-out;
}
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(53, 86, 212, 0.3); }
.search-box .icon { width: 17px; height: 17px; color: var(--ink-soft); }
.search-box input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 10px 0;
  width: clamp(160px, 20vw, 260px);
}
.search-box input:focus { outline: none; }
.search-box input::placeholder { color: #6d6650; opacity: 1; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }

select#category {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #faf7f0;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 10px 38px 10px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23262219' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
select#category:focus-visible { outline-offset: 2px; }

.result-count {
  grid-area: count;
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- program list: the printed program -------------------------------------- */

.program {
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 7vh, 88px);
}

.program-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(180px, 216px);
  grid-template-areas: "media body meta";
  gap: clamp(20px, 2.6vw, 40px);
  align-items: center;
  padding: clamp(22px, 3vh, 34px) 0;
  border-bottom: 1.5px solid var(--hairline);
}
.item:first-child { border-top: 0; }

.item-media { grid-area: media; position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-print); }
.item-body { grid-area: body; min-width: 0; }
.item-meta { grid-area: meta; }

/* even rows mirror the program, like a printed spread */
.item:nth-child(even) {
  grid-template-columns: minmax(180px, 216px) minmax(0, 1fr) minmax(220px, 300px);
  grid-template-areas: "meta body media";
}

.chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--paper);
  padding: 5px 10px 4px;
  border-radius: 2px;
  margin: 0 0 12px;
}
.chip[data-ink="Ceramics"]  { background: var(--ceramics); }
.chip[data-ink="Baking"]    { background: var(--baking); }
.chip[data-ink="Floristry"] { background: var(--floristry); }
.chip[data-ink="Painting"]  { background: var(--painting); }

.item-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.item-desc {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 52ch;
}

.item-teacher {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.item-date {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.date-day {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.date-rest {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  line-height: 1.35;
}

.item-facts {
  font-size: 13.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.item-price-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
  row-gap: 10px;
}
.item-price {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.item-price small {
  display: block;
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 5px;
}

.item-open { padding: 11px 16px; font-size: 12px; }
.item-open .icon { width: 14px; height: 14px; transition: transform 0.2s ease-out; }
.item-open:hover .icon { transform: translateX(3px); }

/* shortlist stamp on a saved poster */
.stamp {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  rotate: 8deg;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: var(--painting);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--painting);
  padding: 6px 9px 5px;
  border-radius: 2px;
  transform: scale(1.4);
  opacity: 0;
  pointer-events: none;
}
.stamp.is-on { animation: stamp-in 0.32s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
@keyframes stamp-in {
  0%   { transform: scale(1.5) rotate(-6deg); opacity: 0; }
  60%  { transform: scale(0.94) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* saved heart toggle on each card */
.item-save {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
  border-radius: 3px;
  background: rgba(38, 34, 25, 0.55);
  color: var(--paper);
  cursor: pointer;
  transition: background-color 0.15s ease-out, transform 0.15s ease-out;
}
.item-save:hover { transform: translateY(-1px); background: rgba(38, 34, 25, 0.75); }
.item-save .icon { width: 18px; height: 18px; }
.item-save[aria-pressed="true"] { background: var(--painting); }

/* --- empty state ------------------------------------------------------------- */

.empty-state {
  text-align: center;
  padding: clamp(56px, 10vh, 110px) 20px;
  max-width: 520px;
  margin: 0 auto;
}
.empty-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  margin: 0 0 14px;
}
.empty-body { color: var(--ink-soft); margin: 0 0 26px; }

/* --- studio strip -------------------------------------------------------------- */

.studio {
  border-top: 2px solid var(--ink);
  background: var(--paper-deep);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 72px);
  padding: clamp(40px, 6vh, 72px) var(--gutter);
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
}
.studio-photo {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-print);
  rotate: -1.2deg;
}
.studio-copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 24ch;
}
.studio-copy p { max-width: 52ch; margin: 0 0 14px; color: var(--ink); }
.studio-note {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft) !important;
}

/* --- footer ------------------------------------------------------------------------ */

.footer {
  border-top: 2px solid var(--ink);
  padding: 36px var(--gutter) 44px;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-brand .brand-word { font-size: 24px; }
.footer-line { margin: 0 0 10px; font-weight: 700; }
.footer-fine {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  max-width: 70ch;
}
.footer-fine code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  background: var(--paper-deep);
  padding: 1px 5px;
  border-radius: 3px;
}

/* --- detail dialog ------------------------------------------------------------------- */

.detail {
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0;
  width: min(960px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(38, 34, 25, 0.4);
  overscroll-behavior: contain;
}
.detail::backdrop {
  background: rgba(24, 20, 12, 0.55);
  backdrop-filter: blur(2px);
}
.detail[open] { animation: detail-in 0.28s ease-out; }
@keyframes detail-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.detail-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  max-height: inherit;
}

.detail-media {
  position: relative;
  min-height: 320px;
}
.detail-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-media .stamp { font-size: 12px; }

.detail-content {
  padding: clamp(22px, 3vw, 36px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.detail-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}
.detail-topline .chip { margin: 0; }

.detail-close {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.detail-close:hover { background: var(--ink); color: var(--paper); }
.detail-close .icon { width: 16px; height: 16px; }

#detail-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

.detail-teacher {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}

#detail-body { margin: 0; font-size: 16.5px; line-height: 1.6; max-width: 56ch; }

.detail-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1.5px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.fact { background: var(--paper); padding: 12px 14px; }
.fact dt {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 4px;
}
.fact dd { margin: 0; font-weight: 700; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.fact dd .fact-note { font-weight: 400; color: var(--ink-soft); font-size: 13px; }

.detail-actions {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.save-btn {
  justify-content: center;
  padding: 15px 20px;
  font-size: 13.5px;
}
.save-btn .icon { width: 18px; height: 18px; }
.save-btn[aria-pressed="false"] { background: var(--ink); color: var(--paper); }
.save-btn[aria-pressed="false"]:hover { box-shadow: 0 8px 18px rgba(38, 34, 25, 0.28); }
.save-btn[aria-pressed="true"] {
  background: var(--paper);
  color: var(--painting);
  border-color: var(--painting);
}
.save-btn[aria-pressed="true"]:hover { background: #f8e4de; }
.detail-hint { margin: 0; font-size: 12.5px; color: var(--ink-soft); text-align: center; }

/* --- toast ---------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(8px);
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(38, 34, 25, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- entrance choreography -------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}

/* --- responsive --------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-posters { min-height: 0; height: clamp(280px, 52vw, 420px); margin-top: 8px; }
  .hero-copy h1 { max-width: none; }

  .toolbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title count"
      "controls controls";
    row-gap: 12px;
  }
  .toolbar-controls { justify-content: flex-start; }
  .field-search { flex: 1 1 220px; }
  .search-box input { width: 100%; }

  .item,
  .item:nth-child(even) {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "body" "meta";
    gap: 16px;
    align-items: start;
  }
  .item-media { aspect-ratio: 16 / 9; }
  .item-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
    border-top: 1.5px solid var(--hairline);
    padding-top: 14px;
  }
  .item-price-row { width: auto; }

  .studio { grid-template-columns: 1fr; }
  .studio-photo { rotate: 0deg; }

  .detail-inner { grid-template-columns: 1fr; overflow-y: auto; }
  .detail-media { min-height: 220px; height: 34vh; }
  .detail-content { overflow-y: visible; }
}

@media (max-width: 480px) {
  .masthead { padding-top: 16px; }
  .brand-word { font-size: 25px; }
  .masthead-note { font-size: 11px; }
  .hero-cta { width: 100%; }
  .toolbar-controls { width: 100%; }
  .btn-toggle { margin-left: auto; }
}

/* --- reduced motion ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp-spin { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal.is-in { transition: none; }
  .stamp { animation: none; transform: none; opacity: 0; }
  .stamp.is-on { animation: none; transform: none; opacity: 1; }
  .detail[open] { animation: none; }
  .btn, .item-save, .duotone .duo-veil, .duotone::after, .duotone img { transition: none; }
  .toast { transition: none; }
}
