:root {
  --paper: #f3eadb;
  --paper-light: #fffaf1;
  --ink: #1d1b19;
  --blue: #1956d1;
  --yellow: #f4b83f;
  --red: #e64a2e;
  --green: #32705a;
  --line: rgba(29, 27, 25, 0.22);
  --page: min(1360px, calc(100vw - 48px));
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(29, 27, 25, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 27, 25, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  width: var(--page);
  min-height: 92px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  border-bottom: 2px solid var(--ink);
}

.wordmark {
  width: max-content;
  display: flex;
  align-items: baseline;
  color: var(--ink);
  font-size: 33px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.12em;
  text-decoration: none;
}
.wordmark span:nth-child(2) { color: var(--blue); transform: translateY(5px) rotate(-9deg); }
.wordmark span:nth-child(4) { color: var(--red); transform: translateY(-2px) rotate(7deg); }

.mast-note, .mast-place {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}
.mast-place { text-align: right; }

.intro {
  position: relative;
  width: var(--page);
  min-height: 590px;
  margin: 0 auto;
  padding: 68px 0 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.7fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
  overflow: hidden;
}

.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 40%;
  bottom: 47px;
  width: 26%;
  border-bottom: 3px dashed var(--blue);
  transform: rotate(5deg);
}

.intro-copy { padding-left: clamp(0px, 3vw, 46px); }
.intro-kicker {
  margin: 0 0 28px;
  font-size: 15px;
  font-weight: 700;
}
.intro-kicker span { color: var(--red); font-size: 22px; }

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(58px, 7.7vw, 116px);
  font-weight: 900;
  line-height: 0.83;
  letter-spacing: -0.075em;
}

.intro-text {
  max-width: 520px;
  margin: 34px 0 0;
  font-size: 19px;
  line-height: 1.45;
}

.browse-link {
  display: inline-block;
  margin-top: 28px;
  padding-bottom: 5px;
  color: var(--ink);
  border-bottom: 3px solid var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.studio-window {
  position: relative;
  margin: 0;
  transform: rotate(2.5deg);
}
.studio-window::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -14px;
  left: 43%;
  width: 76px;
  height: 32px;
  background: rgba(244, 184, 63, 0.85);
  transform: rotate(-6deg);
}
.studio-window img {
  display: block;
  width: 100%;
  aspect-ratio: 0.88;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.05);
  clip-path: polygon(5% 0, 100% 3%, 96% 96%, 3% 100%, 0 43%);
}
.studio-window figcaption {
  position: absolute;
  right: -18px;
  bottom: 30px;
  padding: 10px 18px;
  background: var(--yellow);
  font-family: Georgia, serif;
  font-size: 20px;
  font-style: italic;
  transform: rotate(-4deg);
}

.browse {
  padding: 72px max(24px, calc((100vw - 1360px) / 2)) 110px;
  background: var(--blue);
  color: white;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 2px solid white;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.055em;
}
.section-heading p { margin: 0; font-size: 14px; }

.tool-rail {
  position: sticky;
  z-index: 4;
  top: 12px;
  margin: 28px 0 56px;
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(220px, 0.8fr) 190px;
  color: var(--ink);
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

.search-tool, .filter-tool {
  padding: 13px 18px 12px;
  border-right: 2px solid var(--ink);
}
.tool-rail label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
}
.input-wrap { display: flex; gap: 8px; align-items: center; }
.input-wrap > span { color: var(--blue); font-size: 24px; line-height: 1; }
input, select {
  width: 100%;
  min-height: 34px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 18px;
  font-weight: 700;
}
select { cursor: pointer; }
input::placeholder { color: #777168; opacity: 1; }

.saved-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  background: var(--paper-light);
  border: 0;
  cursor: pointer;
  text-align: left;
}
.punch {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--paper-light);
}
.saved-toggle[aria-pressed="true"] .punch { background: var(--red); }
.saved-copy span, .saved-copy small { display: block; }
.saved-copy span { font-weight: 800; }
.saved-copy small { margin-top: 2px; font-size: 11px; }

.workshop-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 62px;
  align-items: start;
}

.workshop-sheet {
  --accent: var(--yellow);
  position: relative;
  grid-column: span 4;
  min-width: 0;
  color: var(--ink);
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 7px 8px 0 rgba(29, 27, 25, 0.6);
  transform: rotate(var(--tilt, 0deg));
}
.workshop-sheet[data-category="Ceramics"] { --accent: #d7b08c; }
.workshop-sheet[data-category="Painting"] { --accent: var(--yellow); }
.workshop-sheet[data-category="Floristry"] { --accent: #7fb497; }
.workshop-sheet[data-category="Baking"] { --accent: #e28d67; }
.workshop-sheet[data-slot="0"] { --tilt: -1.2deg; }
.workshop-sheet[data-slot="1"] { --tilt: 1.5deg; margin-top: 34px; }
.workshop-sheet[data-slot="2"] { --tilt: -0.5deg; }
.workshop-sheet[data-slot="3"] { --tilt: 1deg; }
.workshop-sheet[data-slot="4"] { --tilt: -1.6deg; margin-top: 32px; }
.workshop-sheet[data-slot="5"] { --tilt: 0.8deg; }

.sheet-photo { position: relative; padding: 10px 10px 0; }
.sheet-photo img {
  display: block;
  width: 100%;
  height: 225px;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04);
}
.category-flag {
  position: absolute;
  top: 23px;
  left: -13px;
  padding: 7px 13px 7px 16px;
  background: var(--accent);
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 800;
  transform: rotate(-2deg);
}
.saved-stamp {
  position: absolute;
  right: 25px;
  bottom: -15px;
  display: none;
  width: 62px;
  height: 62px;
  place-items: center;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  transform: rotate(10deg);
}
.workshop-sheet.is-saved .saved-stamp { display: grid; }

.sheet-copy {
  min-height: 204px;
  display: grid;
  grid-template-columns: 68px 1fr;
  border-bottom: 2px solid var(--ink);
}
.date-block {
  padding-top: 21px;
  text-align: center;
  border-right: 2px dashed var(--line);
}
.date-month { display: block; font-size: 11px; font-weight: 800; }
.date-day {
  display: block;
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.1;
}
.sheet-main { display: flex; flex-direction: column; padding: 20px 19px 16px; }
.sheet-main h3 {
  margin: 0;
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.sheet-description {
  display: -webkit-box;
  margin: 14px 0 18px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.sheet-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
}
.open-item {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  font-weight: 800;
}
.open-item i { font-family: Georgia, serif; font-size: 25px; font-style: normal; }
.open-item:hover span { text-decoration: underline; text-decoration-thickness: 2px; }

.empty-state {
  min-height: 390px;
  padding-top: 60px;
  text-align: center;
}
.empty-state[hidden] { display: none; }
.empty-mark {
  display: grid;
  width: 70px;
  height: 70px;
  margin: auto;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 54px;
}
.empty-state h3 { margin: 20px 0 8px; font-size: 36px; }
.empty-state p { margin: 0 0 22px; }
.empty-state button {
  padding: 12px 18px;
  background: white;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  font-weight: 800;
}

footer {
  min-height: 160px;
  padding: 50px max(24px, calc((100vw - 1360px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: start;
  color: white;
  background: var(--ink);
}
footer p { margin: 0; font-size: 22px; font-weight: 800; }
footer a { color: white; }

.detail-sheet {
  width: min(1160px, calc(100vw - 64px));
  max-width: none;
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper-light);
  border: 3px solid var(--ink);
  box-shadow: 14px 14px 0 var(--yellow);
  overflow: auto;
}
.detail-sheet::backdrop { background: rgba(25, 86, 209, 0.78); }
.detail-sheet[open] { animation: unfold 250ms cubic-bezier(.2,.8,.2,1) both; }
.detail-inner { min-height: 620px; position: relative; }
.close-detail {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border: 0;
  cursor: pointer;
  font-weight: 800;
}
.close-detail span { margin-right: 5px; font-family: Georgia, serif; font-size: 21px; }

.detail-layout { display: grid; grid-template-columns: 0.9fr 1.1fr; min-height: 620px; }
.detail-visual { position: relative; min-height: 620px; background: var(--accent); overflow: hidden; }
.detail-visual img { width: 100%; height: 100%; min-height: 620px; display: block; object-fit: cover; filter: saturate(.88); }
.detail-date {
  position: absolute;
  top: 28px;
  left: 24px;
  width: 112px;
  padding: 10px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  text-align: center;
  transform: rotate(-3deg);
}
.detail-date span { display: block; font-size: 12px; font-weight: 800; }
.detail-date strong { font-family: Georgia, serif; font-size: 56px; font-weight: 400; line-height: .95; }
.detail-copy { padding: 76px clamp(36px, 5vw, 76px) 52px; display: flex; flex-direction: column; }
.detail-category { margin: 0 0 18px; font-weight: 800; color: var(--blue); }
.detail-copy h2 { max-width: 570px; margin: 0; font-size: clamp(48px, 5.4vw, 76px); line-height: .86; letter-spacing: -.065em; }
.detail-body { max-width: 580px; margin: 30px 0 32px; font-family: Georgia, serif; font-size: 23px; line-height: 1.42; }
.facts { margin: auto 0 28px; display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--ink); }
.fact { padding: 15px 12px 13px 0; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { border-right: 1px solid var(--line); }
.fact:nth-child(even) { padding-left: 18px; }
.fact span, .fact strong { display: block; }
.fact span { margin-bottom: 3px; font-size: 11px; }
.fact strong { font-size: 16px; }
.save-item {
  width: 100%;
  min-height: 62px;
  padding: 10px 20px;
  color: white;
  background: var(--blue);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
}
.save-item[aria-pressed="true"] { color: var(--ink); background: var(--yellow); }

@keyframes unfold {
  from { opacity: 0; transform: translateY(32px) rotate(.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@media (max-width: 900px) {
  :root { --page: calc(100vw - 32px); }
  .intro { grid-template-columns: 1fr 310px; min-height: 510px; gap: 24px; }
  h1 { font-size: clamp(58px, 8.5vw, 80px); }
  .workshop-sheet { grid-column: span 6; }
  .tool-rail { grid-template-columns: 1fr 1fr 170px; }
  .detail-sheet { width: calc(100vw - 32px); }
}

@media (max-width: 620px) {
  :root { --page: calc(100vw - 28px); }
  .masthead { min-height: 72px; grid-template-columns: 1fr auto; gap: 16px; }
  .mast-note { display: none; }
  .mast-place { font-size: 11px; }
  .wordmark { font-size: 28px; }

  .intro { min-height: auto; padding: 42px 0 54px; display: block; overflow: visible; }
  .intro::after { display: none; }
  .intro-copy { padding: 0; }
  .intro-kicker { margin-bottom: 20px; font-size: 13px; }
  h1 { font-size: clamp(54px, 16.2vw, 68px); line-height: .86; }
  .intro-text { margin-top: 24px; font-size: 16px; }
  .browse-link { margin-top: 22px; }
  .studio-window { width: 68%; margin: 46px 0 0 auto; }
  .studio-window img { aspect-ratio: 1.15; }
  .studio-window figcaption { right: auto; left: -66px; bottom: 19px; font-size: 16px; }

  .browse { padding: 50px 14px 72px; }
  .section-heading { align-items: start; }
  .section-heading h2 { max-width: 240px; font-size: 46px; }
  .section-heading p { max-width: 72px; text-align: right; line-height: 1.25; }
  .tool-rail {
    top: 7px;
    margin: 22px 0 42px;
    grid-template-columns: 1fr auto;
    box-shadow: 5px 5px 0 var(--ink);
  }
  .search-tool { grid-column: 1 / -1; border-right: 0; border-bottom: 2px solid var(--ink); }
  .filter-tool { padding: 10px 12px; }
  .filter-tool label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .filter-tool select { min-height: 40px; font-size: 15px; }
  .saved-toggle { padding: 9px 12px; border-left: 2px solid var(--ink); }
  .saved-copy span { font-size: 13px; }
  .punch { width: 19px; height: 19px; }

  .workshop-grid { display: block; }
  .workshop-sheet { margin: 0 3px 38px !important; transform: rotate(var(--tilt)); }
  .sheet-photo img { height: 210px; }
  .sheet-copy { min-height: 195px; }
  .sheet-main h3 { font-size: 28px; }
  .empty-state { min-height: 330px; }

  footer { min-height: 180px; padding: 40px 20px; display: block; }
  footer p { max-width: 270px; margin-bottom: 34px; }

  .detail-sheet {
    width: 100vw;
    max-height: calc(100dvh - 18px);
    margin: auto 0 0;
    border-width: 3px 0 0;
    box-shadow: none;
  }
  .detail-layout { display: block; }
  .detail-visual { min-height: 245px; height: 31vh; }
  .detail-visual img { min-height: 0; height: 100%; }
  .detail-date { top: 18px; left: 16px; width: 86px; padding: 8px; }
  .detail-date strong { font-size: 40px; }
  .close-detail { position: fixed; top: 12px; right: 12px; bottom: auto; }
  .detail-copy { padding: 34px 20px 36px; }
  .detail-category { margin-bottom: 12px; font-size: 13px; }
  .detail-copy h2 { font-size: 51px; }
  .detail-body { margin: 22px 0 27px; font-size: 19px; }
  .facts { width: 100%; margin-bottom: 24px; }
  .fact strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
