/* The Ria Collection — /art/collection/ */

.cx {
  --cx-bg: #f5f0e6;
  --cx-paper: #fbf8f1;
  --cx-ink: #14110e;
  --cx-soft: #24201c;
  --cx-muted: #46403a;
  --cx-line: #dcd2c2;
  --cx-wine: #6f2b31;
  --cx-gold: #634c1f;
  --cx-mat: #ebe4d6;
  --cx-serif: "Cormorant Garamond", "EB Garamond", Garamond, "Times New Roman", serif;
  --cx-sans: "Inter", system-ui, -apple-system, sans-serif;
  /* the site's nav and footer read these */
  --bg: var(--cx-bg);
  --text: var(--cx-ink);
  --muted: var(--cx-muted);
  --line: var(--cx-line);
  --accent: var(--cx-ink);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cx {
    --cx-bg: #141210; --cx-paper: #1b1815; --cx-ink: #f8f3ea; --cx-soft: #ede6da; --cx-muted: #d3cabd;
    --cx-line: #352f29; --cx-wine: #d08a8e; --cx-gold: #d6b97e; --cx-mat: #211d19;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] .cx {
  --cx-bg: #141210; --cx-paper: #1b1815; --cx-ink: #f8f3ea; --cx-soft: #ede6da; --cx-muted: #d3cabd;
  --cx-line: #352f29; --cx-wine: #d08a8e; --cx-gold: #d6b97e; --cx-mat: #211d19;
  color-scheme: dark;
}

@view-transition { navigation: auto; }

/* Cormorant is thin at its regular weight; read it at 500. */
.cx-prose, .cx-hero-text, .cx-lede, .cx-observation, .cx-room-desc, .cx-meta dd, .cx-work-by, .cx-ex-note, .cx-card-title, .cx-tl-title, .cx-next-title, .cx-unwritten, .cx-empty, .cx-margin p, .cx-margin blockquote, .cx-behind-hint, .cx-count, .cx-sec-note { font-weight: 500; }
body.cx { background: var(--cx-bg); color: var(--cx-ink); transition: background-color 0.6s ease, color 0.6s ease; }
.cx ::selection { background: color-mix(in srgb, var(--cx-wine) 22%, transparent); }
.cx-page { padding-top: 0; }
.cx-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px 72px; animation: cx-in 0.7s ease both; }
@keyframes cx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cx-wrap { animation: none; } @view-transition { navigation: none; } }

.cx a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.cx :focus-visible { outline: 2px solid var(--cx-wine); outline-offset: 3px; }

.cx-label {
  margin: 0;
  font-family: var(--cx-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cx-muted);
}

.cx-textbtn {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--cx-line);
  background: none;
  color: var(--cx-muted);
  font: 500 0.7rem/1.4 var(--cx-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.cx-textbtn:hover, .cx-textbtn[aria-pressed="true"] { color: var(--cx-wine); border-color: var(--cx-wine); }

/* Dim the lights: a little flashlight whose beam switches on in the dark */
.cx-lightbtn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; overflow: hidden;
  padding: 9px 15px 9px 19px; border: 1.5px solid var(--cx-ink); border-radius: 999px;
  background: var(--cx-paper); color: var(--cx-ink); cursor: pointer;
  font: 700 0.74rem/1.4 var(--cx-sans); letter-spacing: 0.14em; text-transform: uppercase;
  transition: background-color 0.5s, color 0.5s, box-shadow 0.5s;
}
.cx-lightbtn:hover { box-shadow: 0 0 0 1px var(--cx-gold); }
.cx-torch { position: relative; z-index: 1; width: 28px; height: 14px; color: var(--cx-ink); }
.cx-torch-lens { fill: #d8cfbf; transition: fill 0.4s; }
.cx-theme-label { position: relative; z-index: 1; }
.cx-beam {
  position: absolute; top: 0; bottom: 0; right: 36px; width: 100%; pointer-events: none;
  clip-path: polygon(100% 42%, 100% 58%, 0 0, 0 100%);
  background: linear-gradient(to left, rgba(255, 240, 205, 0.55), rgba(255, 236, 190, 0.18) 60%, rgba(255, 236, 190, 0));
  opacity: 0; transition: opacity 0.5s ease;
}
.cx-lightbtn:hover .cx-beam { opacity: 0.35; }
.cx-lightbtn[aria-pressed="true"] { background: #0f0d0c; color: #fbefd2; border-color: #c9a96b; box-shadow: 0 0 18px rgba(255, 226, 160, 0.25); text-shadow: 0 0 6px rgba(255, 230, 170, 0.55), 0 1px 1px #000; }
.cx-lightbtn[aria-pressed="true"] .cx-beam { opacity: 1; }
.cx-lightbtn[aria-pressed="true"] .cx-torch { color: #8a8378; }
.cx-lightbtn[aria-pressed="true"] .cx-torch-lens { fill: #fff6dc; filter: drop-shadow(0 0 4px #fff2c8); }
@media (prefers-reduced-motion: reduce) { .cx-beam, .cx-lightbtn { transition: none; } }

/* The floating pair: Curator's Choice and the flashlight, always within reach */
.cx-dock { position: fixed; right: 22px; bottom: 22px; z-index: 50; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cx-fab {
  position: relative; display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--cx-ink); background: var(--cx-paper); color: var(--cx-ink); cursor: pointer;
  box-shadow: 0 8px 20px rgba(40, 24, 10, 0.2); transition: transform 0.3s, box-shadow 0.3s, background-color 0.4s;
}
.cx-fab:hover, .cx-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(40, 24, 10, 0.26); }
.cx-fab-label {
  position: absolute; z-index: 2; right: 70px; top: 50%; padding: 7px 13px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: var(--cx-ink); color: var(--cx-bg); font: 700 0.68rem/1.2 var(--cx-sans); letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0; transform: translate(8px, -50%); transition: opacity 0.3s, transform 0.3s;
}
.cx-fab:hover .cx-fab-label, .cx-fab:focus-visible .cx-fab-label { opacity: 1; transform: translate(0, -50%); }
.cx-pouch-fab { width: 40px; height: auto; transform: rotate(-6deg); transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cx-fab-choice:hover .cx-pouch-fab { transform: rotate(5deg); }
.cx-fab-choice { background: #f7eedf; border-color: #9e4a3c; }
.cx-fab-choice[aria-pressed="true"] { background: #9e4a3c; box-shadow: 0 0 0 4px rgba(158, 74, 60, 0.22), 0 8px 20px rgba(40, 24, 10, 0.2); }
.cx-fab-light { background: #1b1815; border-color: #c9a96b; color: #d8cfbf; }
.cx-fab-light .cx-torch { position: relative; z-index: 1; width: 30px; height: 15px; color: #d8cfbf; transform: translateX(4px); }
.cx-fab-beam {
  position: absolute; right: 40px; top: 50%; width: 170px; height: 84px; transform: translateY(-50%); pointer-events: none;
  clip-path: polygon(100% 44%, 100% 56%, 0 0, 0 100%);
  background: linear-gradient(to left, rgba(255, 240, 205, 0.7), rgba(255, 236, 190, 0.2) 60%, rgba(255, 236, 190, 0));
  opacity: 0; transition: opacity 0.5s;
}
.cx-fab-light:hover .cx-fab-beam { opacity: 0.35; }
.cx-fab-light[aria-pressed="true"] .cx-fab-beam { opacity: 0.9; }
.cx-fab-light[aria-pressed="true"] { box-shadow: 0 0 22px rgba(255, 226, 160, 0.35), 0 8px 20px rgba(0, 0, 0, 0.4); }
.cx-fab-light[aria-pressed="true"] .cx-torch-lens { fill: #fff6dc; filter: drop-shadow(0 0 4px #fff2c8); }
.cx-fab-intro .cx-fab-beam { animation: cx-sweep 2.6s ease 0.8s 1; }
@keyframes cx-sweep { 0% { opacity: 0; } 25% { opacity: 0.85; } 45% { opacity: 0.25; } 70% { opacity: 0.8; } 100% { opacity: 0; } }

/* One-time invitation under the Dim the lights button */
.cx-bar { position: relative; }
.cx-bar-hint {
  position: absolute; z-index: 60; right: 0; top: calc(100% + 18px); display: flex; flex-direction: column; gap: 6px; max-width: min(92vw, 420px);
  padding: 22px 28px; border: 1px solid #c9a96b; background: #1b1815; color: #fbefd2; box-shadow: 0 18px 40px rgba(20, 12, 4, 0.35);
  opacity: 0; transform: translateY(-10px); transition: opacity 0.5s, transform 0.5s; pointer-events: none;
}
.cx-bar-hint::before { content: ""; position: absolute; top: -9px; right: 64px; width: 16px; height: 16px; background: inherit; border: inherit; border-width: 1px 0 0 1px; transform: rotate(45deg); }
.cx-bar-hint.is-shown { opacity: 1; transform: none; }
.cx-bar-hint-big { font-family: var(--cx-serif); font-style: italic; font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.05; }
.cx-bar-hint-small { font-family: var(--cx-sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #d9c9a6; }
@media (max-width: 600px) { .cx-bar-hint { left: 0; right: 0; max-width: none; } .cx-bar-hint::before { right: 90px; } }
@media (max-width: 600px) { .cx-dock { right: 14px; bottom: 14px; gap: 10px; } .cx-fab { width: 50px; height: 50px; } .cx-pouch-fab { width: 34px; } .cx-fab-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .cx-fab-intro .cx-fab-beam { animation: none; } }

/* ---------- Collection bar ---------- */

.cx-bar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 0;
  border-top: 1px solid var(--cx-line);
  border-bottom: 1px solid var(--cx-line);
}
.cx-mark { font-family: var(--cx-serif); font-size: 1.25rem; font-style: italic; text-decoration: none; }
.cx-bar-links { display: flex; flex-wrap: wrap; gap: 22px; margin: 0 auto 0 0; padding: 0; list-style: none; }
.cx-bar-links a { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-muted); text-decoration: none; }
.cx-bar-links a:hover { color: var(--cx-ink); }

/* ---------- Hero ---------- */

.cx-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 18px 64px;
  padding: 88px 0 72px;
}
/* Title block sized to the word "Collection", so the label can end exactly where it ends */
.cx-hero-title { grid-column: 1; justify-self: start; align-self: start; display: flex; flex-direction: column; width: max-content; max-width: 100%; }
.cx-hero .cx-label { align-self: flex-end; margin-top: 12px; font-size: 0.8rem; color: var(--cx-wine); }
.cx-hero-text { grid-column: 2; }
.cx-title {
  margin: 0;
  font-family: var(--cx-serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
}
.cx-title-sm { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.cx-hero-text { align-self: end; font-family: var(--cx-serif); font-size: 1.18rem; line-height: 1.5; color: var(--cx-soft); }
/* The opening sentence always fits on one line: it scales down only as far as its column needs. */
.cx-hero-text { container-type: inline-size; }
.cx-hero-text > p:first-child { font-size: min(1.18rem, 4.75cqi); white-space: nowrap; }
.cx-hero-text p { margin: 0 0 0.7em; }
.cx-hero-note { font-style: italic; color: var(--cx-muted); }
.cx-flash-link { color: var(--cx-wine); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--cx-wine) 45%, transparent); text-underline-offset: 4px; }
.cx-flash-link:hover { text-decoration-color: var(--cx-wine); }
.cx-row-item.cx-flash .cx-plate { animation: cx-flash 1.6s ease-out 1; }
@keyframes cx-flash {
  0% { box-shadow: 0 0 0 0 rgba(214, 178, 106, 0); filter: brightness(1); }
  25% { box-shadow: 0 0 0 6px rgba(214, 178, 106, 0.95), 0 0 46px 14px rgba(255, 214, 140, 0.75); filter: brightness(1.18); }
  100% { box-shadow: 0 0 0 0 rgba(214, 178, 106, 0), 0 0 0 0 rgba(255, 214, 140, 0); filter: brightness(1); }
}
@media (prefers-reduced-motion: reduce) { .cx-row-item.cx-flash .cx-plate { animation-duration: 0.8s; } }

.cx-loading { padding: 80px 0; text-align: center; font-family: var(--cx-serif); font-style: italic; font-size: 1.2rem; color: var(--cx-muted); animation: cx-breathe 2.4s ease-in-out infinite; }
@keyframes cx-breathe { 50% { opacity: 0.45; } }
.cx-empty { padding: 48px 0; font-family: var(--cx-serif); font-style: italic; font-size: 1.2rem; color: var(--cx-muted); }
.cx-empty-page { max-width: 36em; padding: 96px 0; }
.cx-empty-page .cx-work-title { margin: 12px 0 16px; }

/* ---------- Plates (artwork images at their own proportions) ---------- */

.cx-plate { display: block; }
.cx-plate img { display: block; width: 100%; height: auto; background: var(--cx-mat); }
.cx-frame-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8%;
  background: var(--cx-mat);
  box-shadow: inset 0 0 0 1px var(--cx-line), inset 0 0 0 10px var(--cx-paper), inset 0 0 0 11px var(--cx-line);
  font-family: var(--cx-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.3;
  text-align: center;
  color: var(--cx-muted);
  text-decoration: none;
}
.cx-ex-plate, .cx-tl a { text-decoration: none; }
.cx-frame-empty small { font: 500 0.6rem/1 var(--cx-sans); font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; }

.cx-work-by { margin: 0; font-family: var(--cx-serif); font-size: 1.2rem; font-style: italic; color: var(--cx-muted); }
.cx-enter {
  display: inline-block;
  margin-top: 28px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--cx-wine);
  color: var(--cx-wine);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.cx-enter::after { content: " \2192"; display: inline-block; transition: transform 0.25s; }
.cx-enter:hover::after { transform: translateX(4px); }

/* ---------- Section heads ---------- */

.cx-sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 28px; padding-top: 18px; border-top: 1px solid var(--cx-ink); }
.cx-sec-head h2 { margin: 0; font-family: var(--cx-serif); font-weight: 400; font-size: 2rem; }
.cx-count, .cx-sec-note { margin: 0; font-family: var(--cx-serif); font-style: italic; color: var(--cx-muted); }
.cx-count { margin-left: auto; }
.cx-collection, .cx-strip-sec, .cx-rooms, .cx-exhibitions { padding: 24px 0 72px; }

/* ---------- Controls ---------- */

.cx-controls { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 36px; }
.cx-field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
.cx-field > span { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); }
.cx-field input, .cx-field select, .cx-field textarea {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--cx-line);
  border-radius: 0;
  background: transparent;
  color: var(--cx-ink);
  font: 1.05rem/1.4 var(--cx-serif);
}
.cx-field select { cursor: pointer; }
.cx-field select option { background: var(--cx-paper); color: var(--cx-ink); }
.cx-field input:focus, .cx-field select:focus, .cx-field textarea:focus { outline: none; border-color: var(--cx-wine); }
.cx-search { flex: 1 1 240px; }

/* ---------- Masonry & cards ---------- */

.cx-masonry { columns: 3 300px; column-gap: 40px; }
.cx-masonry > .cx-card { margin-bottom: 44px; }
.cx-masonry > .cx-empty { column-span: all; }

/* Curator's Choice: a simple button under the intro that lights the favorites and dims the rest */
.cx-choice {
  display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; margin-top: 18px;
  padding: 14px 20px; border: 2px solid var(--cx-muted); background: transparent; color: var(--cx-ink);
  font: inherit; text-align: center; cursor: pointer; transition: border-color 0.3s, background-color 0.4s, color 0.4s;
}
.cx-choice:hover { border-color: var(--cx-wine); }
.cx-pouch { flex: none; width: 40px; height: auto; transform: rotate(-6deg); transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.cx-choice:hover .cx-pouch { transform: rotate(5deg); }
.cx-choice-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cx-choice-title { font-family: var(--cx-serif); font-size: 1.35rem; font-style: italic; line-height: 1.1; }
.cx-choice-sub { font-family: var(--cx-sans); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-muted); }
.cx-choice[aria-pressed="true"] { border-color: var(--cx-wine); color: var(--cx-wine); }
.cx-choice[aria-pressed="true"] .cx-choice-sub { color: var(--cx-wine); }
.cx-row-item { transition: opacity 0.7s ease, filter 0.7s ease; }
.cx-spotlight .cx-row-item:not(.cx-fav) { opacity: 0.18; filter: grayscale(1); }
.cx-spotlight .cx-row-item.cx-fav .cx-plate { box-shadow: 0 0 0 1px rgba(156, 124, 67, 0.55), 0 18px 40px rgba(156, 110, 40, 0.3); }
.cx-fav { position: relative; }
.cx-fav::before { content: ""; position: absolute; inset: -60px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.9s ease;
  background: radial-gradient(closest-side, rgba(255, 224, 160, 0.32), rgba(255, 224, 160, 0)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cx-spotlight .cx-row-item:not(.cx-fav) { opacity: 0.07; }
  :root:not([data-theme="light"]) .cx-spotlight .cx-fav::before { opacity: 1; }
}
:root[data-theme="dark"] .cx-spotlight .cx-row-item:not(.cx-fav) { opacity: 0.07; }
:root[data-theme="dark"] .cx-spotlight .cx-fav::before { opacity: 1; }
.cx-choice-door .cx-room-name { color: var(--cx-wine); }
.cx-fav-label { color: var(--cx-gold); }

/* The epigraph above the collection */
.cx-quotes { padding: 24px 0 56px; }
.cx-epigraph { container-type: inline-size; margin: 0; padding: 28px 0 32px; text-align: center; }
.cx-epigraph + .cx-epigraph { border-top: 1px solid var(--cx-line); }
/* Quote Collection: each quote its own card */
.cx-quote-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
.cx-quote-cards .cx-epigraph { display: flex; flex-direction: column; justify-content: center; padding: 36px 32px; border: 1px solid var(--cx-line); background: var(--cx-paper); }
.cx-quote-cards .cx-epigraph + .cx-epigraph { border-top: 1px solid var(--cx-line); }
.cx-quote-cards .cx-epigraph blockquote p:first-child { white-space: normal; font-size: 1.3rem; text-wrap: balance; }
.cx-quote-cards .cx-epigraph blockquote p:first-child::before { content: "\201C"; display: block; margin-bottom: 4px; font-size: 3rem; line-height: 0.6; font-style: normal; color: var(--cx-wine); }
.cx-quote-cards .cx-epigraph figcaption { text-wrap: balance; }
.cx-epigraph blockquote { max-width: none; margin: 0 auto; }
.cx-epigraph blockquote p { margin: 0; font-family: var(--cx-serif); font-style: italic; font-weight: 500; font-size: min(1.25rem, 1.95cqi); line-height: 1.5; white-space: nowrap; color: var(--cx-ink); }
.cx-epigraph .cx-epigraph-orig { margin-top: 16px; font-family: "Noto Serif KR", "Nanum Myeongjo", serif; font-style: normal; font-size: 0.8rem; letter-spacing: 0.16em; word-break: keep-all; color: var(--cx-muted); }
.cx-epigraph figcaption { margin-top: 12px; font-family: var(--cx-sans); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-muted); }
.cx-epigraph figcaption::before { content: "\2014  "; }
.cx-epigraph cite { font-style: italic; text-transform: none; letter-spacing: 0.02em; font-size: 0.75rem; }

@media (max-width: 600px) { .cx-epigraph blockquote p { white-space: normal; font-size: 1rem; text-wrap: balance; } }

/* Goal Collection: a two-column checklist */
.cx-goals { padding: 24px 0 64px; }
.cx-goal-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 48px; align-items: start; }
.cx-goal-list { margin: 0; padding: 0; list-style: none; }
.cx-goal { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 14px; break-inside: avoid; padding: 16px 0; border-bottom: 1px solid var(--cx-line); }
.cx-goal-box { width: 18px; height: 18px; margin-top: 5px; border: 1.5px solid var(--cx-ink); background: var(--cx-paper); }
.cx-goal.is-done .cx-goal-box { background: var(--cx-wine); border-color: var(--cx-wine); box-shadow: inset 0 0 0 3px var(--cx-paper); }
.cx-goal.is-done .cx-goal-body { color: var(--cx-muted); text-decoration: line-through; }
.cx-goal-body { font-family: var(--cx-serif); font-weight: 500; font-size: 1.15rem; line-height: 1.45; }
.cx-goal-body strong { font-weight: 600; }
.cx-goal-body a:not(.cx-goal-link) { color: var(--cx-wine); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--cx-wine) 45%, transparent); text-underline-offset: 3px; }
.cx-goal-link { margin-left: 4px; font-family: var(--cx-sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-wine); }
.cx-goal-places { margin: 8px 0 0; }
.cx-goal-places div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 3px 0; }
.cx-goal-places dt { padding-top: 4px; font-family: var(--cx-sans); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-muted); }
.cx-goal-places dd { margin: 0; font-size: 1.02rem; color: var(--cx-soft); }
.cx-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* View: by year created — a simple timeline */
.cx-years { position: relative; margin: 0; padding: 0 0 0 34px; list-style: none; }
.cx-years::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--cx-line); }
.cx-year { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; align-items: start; padding: 0 0 40px; }
.cx-year-stop { position: relative; padding-top: 2px; }
.cx-year-stop::before { content: ""; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--cx-bg); border: 2px solid var(--cx-wine); }
.cx-year-label { font-family: var(--cx-serif); font-size: 1.6rem; line-height: 1; color: var(--cx-wine); }
.cx-year .cx-rows { --row: 190px; justify-content: flex-start; flex-direction: column; }
.cx-year .cx-row-item { flex: none; flex-direction: row; align-items: center; gap: 24px; width: auto; max-width: 100%; }
.cx-year .cx-row-item .cx-plate { flex: none; width: calc(var(--r) * var(--row)); max-width: 60%; }
.cx-year .cx-row-item .cx-row-cap { position: static; padding: 0; background: none; color: var(--cx-ink); opacity: 1; transform: none; }
.cx-year .cx-row-item .cx-card-by { color: var(--cx-muted); }
.cx-year .cx-row-cap .cx-card-title { font-size: 1.3rem; -webkit-line-clamp: 3; }

/* View: by artist — sections side by side */
.cx-artists { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 48px 56px; }
.cx-artist { flex: 0 1 auto; max-width: 100%; }
.cx-artist-name { margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--cx-line); font-family: var(--cx-serif); font-weight: 500; font-size: 1.3rem; }
.cx-artist .cx-rows { --row: 200px; justify-content: flex-start; }

/* Collection: grouped by visit, in even rows (--r = width / height of each image) */
.cx-visit + .cx-visit { margin-top: 56px; }
.cx-visit-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; margin: 0 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--cx-line); font-family: var(--cx-serif); font-weight: 400; font-size: 1.35rem; }
.cx-visit-head time { font-family: var(--cx-sans); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-muted); }
.cx-rows { --row: 230px; display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 32px; }
.cx-row-item { flex: 0 1 calc(var(--r) * var(--row)); max-width: 100%; min-width: 0; display: flex; flex-direction: column; text-decoration: none; }
.cx-row-item .cx-plate { overflow: hidden; }
.cx-row-item img { transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1); }
.cx-row-item:hover img, .cx-row-item:focus-visible img { transform: scale(1.025); }
.cx-row-cap { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; min-width: 0; }
.cx-row-cap .cx-card-title { font-size: 1.1rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  .cx-row-item { position: relative; }
  .cx-row-cap {
    position: absolute; inset: auto 0 0 0; z-index: 1;
    padding: 40px 14px 12px;
    background: linear-gradient(to top, rgba(20, 17, 14, 0.78), rgba(20, 17, 14, 0));
    color: #f5efe4; opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s;
  }
  .cx-row-cap .cx-card-by { color: rgba(245, 239, 228, 0.82); }
  .cx-row-item:hover .cx-row-cap, .cx-row-item:focus-visible .cx-row-cap { opacity: 1; transform: none; }
  .cx-rows { row-gap: 28px; }
}

.cx-card { position: relative; display: block; break-inside: avoid; text-decoration: none; }
.cx-card .cx-plate { overflow: hidden; }
.cx-card img { transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.6s; }
.cx-card:hover img, .cx-card:focus-visible img { transform: scale(1.025); }
.cx-card-cap { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
.cx-card-title { font-family: var(--cx-serif); font-size: 1.2rem; line-height: 1.2; }
.cx-card-by { font-size: 0.74rem; letter-spacing: 0.04em; color: var(--cx-muted); }
.cx-card-thread { margin-top: 4px; font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-gold); }
@media (hover: hover) {
  .cx-card-m .cx-card-cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: 40px 16px 14px;
    background: linear-gradient(to top, rgba(20, 17, 14, 0.72), rgba(20, 17, 14, 0));
    color: #f5efe4;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s, transform 0.4s;
  }
  .cx-card-m .cx-card-by { color: rgba(245, 239, 228, 0.8); }
  .cx-card-m:hover .cx-card-cap, .cx-card-m:focus-visible .cx-card-cap { opacity: 1; transform: none; }
}

.cx-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px; align-items: start; }

/* ---------- Connections, rooms, exhibitions ---------- */

.cx-exhibitions ul { margin: 0; padding: 0; list-style: none; }
.cx-exhibitions a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.cx-room-name { font-family: var(--cx-serif); font-size: 1.5rem; line-height: 1.15; }
.cx-room-desc { font-family: var(--cx-serif); font-size: 1.05rem; color: var(--cx-soft); }

/* Rooms: a row of doors */
.cx-doors { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 40px; margin: 0; padding: 0; list-style: none; }
.cx-doors > li { flex: 0 1 calc((100% - 80px) / 3); }
.cx-door-link { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; }
.cx-door { display: block; width: min(100%, 190px); height: auto; margin-bottom: 14px; filter: drop-shadow(0 10px 14px rgba(40, 24, 10, 0.18)); }
.cx-door-leaf { transform-box: fill-box; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.cx-door-l { transform-origin: left center; }
.cx-door-r { transform-origin: right center; }
.cx-door-motif { fill: #5f3920; stroke: #c99a6c; stroke-width: 0.8; }
a.cx-door-link:hover .cx-door-l, a.cx-door-link:focus-visible .cx-door-l { transform: scaleX(0.62) skewY(3deg); }
a.cx-door-link:hover .cx-door-r, a.cx-door-link:focus-visible .cx-door-r { transform: scaleX(0.62) skewY(-3deg); }
a.cx-door-link:hover .cx-room-name { color: var(--cx-wine); }
.cx-door-link.is-closed .cx-door { filter: saturate(0.55) drop-shadow(0 10px 14px rgba(40, 24, 10, 0.12)); opacity: 0.8; }
.cx-door-link .cx-room-desc { max-width: 18em; font-size: 1rem; }
.cx-door-link .cx-card-by { margin-top: 2px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.62rem; }
.cx-room-head { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 40px; align-items: end; }
.cx-room-head .cx-door { margin: 0; }
@media (prefers-reduced-motion: reduce) { .cx-door-leaf { transition: none; } }
.cx-exhibitions li { padding: 20px 0; border-bottom: 1px solid var(--cx-line); }

.cx-page-head { padding: 72px 0 48px; }
.cx-page-head .cx-label { margin-bottom: 12px; color: var(--cx-wine); }
.cx-lede { max-width: 38em; margin: 22px 0 0; font-family: var(--cx-serif); font-size: 1.3rem; line-height: 1.5; color: var(--cx-soft); }
.cx-other-rooms { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--cx-line); }
.cx-other-rooms a { font-family: var(--cx-serif); font-size: 1.2rem; font-style: italic; }

.cx-ex-list { margin: 0; padding: 0; list-style: none; }
.cx-ex-item { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px; align-items: end; padding: 48px 0; border-top: 1px solid var(--cx-line); }
.cx-ex-item:nth-child(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.cx-ex-item:nth-child(even) .cx-ex-plate { order: 2; }
.cx-ex-text h2 { margin: 10px 0 4px; font-family: var(--cx-serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.cx-ex-text h2 a { text-decoration: none; }
.cx-ex-note { margin: 18px 0 0; font-family: var(--cx-serif); font-size: 1.2rem; line-height: 1.55; color: var(--cx-soft); }

/* ---------- Timeline ---------- */

.cx-tl-year { margin: 40px 0 0; padding-top: 14px; border-top: 1px solid var(--cx-ink); font-family: var(--cx-serif); font-weight: 400; font-size: 2.6rem; }
.cx-tl { margin: 0; padding: 0; list-style: none; }
.cx-tl > li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--cx-line); }
.cx-tl-when { display: flex; flex-direction: column; gap: 4px; }
.cx-tl time { font-family: var(--cx-serif); font-style: italic; font-size: 1.2rem; color: var(--cx-soft); }
.cx-tl-place { font-size: 0.78rem; line-height: 1.4; color: var(--cx-muted); }
.cx-tl-works { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.cx-tl a { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; text-decoration: none; }
.cx-tl a > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.cx-tl-title { font-family: var(--cx-serif); font-size: 1.4rem; line-height: 1.2; }

/* ---------- Artwork page ---------- */

.cx-work { padding-top: 40px; }
.cx-work-plate { margin: 0 auto; max-width: 1100px; padding: 0; }
.cx-work-plate .cx-plate { display: flex; justify-content: center; }
.cx-work-plate img { width: auto; max-width: 100%; max-height: 84vh; cursor: zoom-in; }
.cx-work-plate .cx-frame-empty { max-width: 100%; }
.cx-work-plate figcaption { margin-top: 14px; font-size: 0.72rem; color: var(--cx-muted); text-align: center; }

.cx-work-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 8px 56px; padding: 56px 0 40px; border-bottom: 1px solid var(--cx-line); }
.cx-work-head > .cx-label, .cx-work-title, .cx-work-head > .cx-work-by { grid-column: 1; }
.cx-work-title { margin: 10px 0 4px; font-family: var(--cx-serif); font-weight: 400; font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1; letter-spacing: -0.01em; }
.cx-work-head > .cx-work-by { font-size: 1.45rem; }
.cx-meta { grid-column: 2; grid-row: 1 / span 4; align-self: end; margin: 0; }
.cx-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--cx-line); }
.cx-meta dt { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); padding-top: 3px; }
.cx-meta dd { margin: 0; font-family: var(--cx-serif); font-size: 1.1rem; }
.cx-observation { grid-column: 1; max-width: 32em; margin: 24px 0 0; font-family: var(--cx-serif); font-style: italic; font-size: 1.35rem; line-height: 1.5; color: var(--cx-soft); }
.cx-threads { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; }
.cx-threads a, .cx-threads span { font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-gold); text-decoration: none; }
.cx-threads a:hover { color: var(--cx-wine); }
.cx-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; }

.cx-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 56px; }
.cx-toc { position: sticky; top: 24px; align-self: start; }
.cx-toc ol { margin: 0; padding: 0; list-style: none; }
.cx-toc a { display: grid; grid-template-columns: 34px 1fr; padding: 6px 0; font-size: 0.78rem; line-height: 1.4; color: var(--cx-muted); text-decoration: none; }
.cx-toc a span { font-family: var(--cx-serif); font-style: italic; font-size: 0.95rem; }
.cx-toc a:hover { color: var(--cx-wine); }
.cx-body:not(:has(.cx-toc)) { grid-template-columns: minmax(0, 1fr); }

.cx-sections { max-width: 720px; }
.cx-sec { padding-bottom: 64px; scroll-margin-top: 24px; }
.cx-sec h2 { margin: 0 0 24px; font-family: var(--cx-serif); font-weight: 400; font-size: 2.1rem; line-height: 1.1; }
.cx-num { font-style: italic; color: var(--cx-wine); margin-right: 6px; }

.cx-prose { font-family: var(--cx-serif); font-size: 1.28rem; line-height: 1.62; color: var(--cx-ink); hanging-punctuation: first; }
.cx-prose p { margin: 0 0 1.05em; }
.cx-prose h2 { margin: 1.6em 0 0.5em; font-size: 1.6rem; font-weight: 700; }
.cx-prose h3 { margin: 1.4em 0 0.4em; font-family: var(--cx-sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-soft); }
.cx-prose blockquote { margin: 1.6em 0; padding: 0 0 0 1.2em; border-left: 1px solid var(--cx-wine); font-style: italic; color: var(--cx-soft); }
.cx-prose hr { width: 60px; margin: 2.4em auto; border: 0; border-top: 1px solid var(--cx-gold); }
.cx-prose a { color: var(--cx-wine); }
.cx-prose ul, .cx-prose ol { padding-left: 1.2em; }
.cx-prose sup.cx-ref { font-family: var(--cx-sans); font-size: 0.62em; line-height: 0; }
.cx-prose sup.cx-ref a { text-decoration: none; padding: 0 1px; }
.cx-prose figure { margin: 2em 0; }
.cx-prose figure img { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
.cx-prose figcaption { margin-top: 10px; font-family: var(--cx-sans); font-size: 0.74rem; line-height: 1.5; color: var(--cx-muted); }
.cx-sec-what-i-see .cx-fig-inline img { max-width: 420px; margin: 0 auto; }
.cx-sec-what-i-see .cx-fig-inline figcaption { text-align: center; }
.cx-fig-detail { padding: 20px; background: var(--cx-paper); box-shadow: 0 0 0 1px var(--cx-line); }
.cx-fig-detail img { width: 100%; }
.cx-fig-detail figcaption::before { content: "Detail \2014  "; letter-spacing: 0.1em; text-transform: uppercase; }
@media (min-width: 1100px) { .cx-fig-wide { margin-left: -120px; margin-right: -120px; } }
.cx-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin: 2em 0; align-items: start; }
.cx-gallery figure { margin: 0; }

.cx-sec-what-i-see { padding: 56px 0 72px; border-top: 1px solid var(--cx-line); border-bottom: 1px solid var(--cx-line); margin-bottom: 64px; }

.cx-behind > summary { display: grid; grid-template-columns: max-content max-content; justify-content: start; align-items: center; gap: 6px 16px; list-style: none; cursor: pointer; }
.cx-behind > summary::-webkit-details-marker { display: none; }
.cx-behind > summary h2 { margin: 0; }
.cx-behind > summary::after {
  content: "+"; grid-column: 2; grid-row: 1; display: grid; place-items: center; width: auto; height: auto;
  font-family: var(--cx-sans); font-size: 2.6rem; font-weight: 300; line-height: 1; padding: 0; color: var(--cx-ink); transition: transform 0.3s, border-color 0.3s, color 0.3s;
}
.cx-behind[open] > summary::after { transform: rotate(45deg); }
.cx-behind-hint { grid-column: 1 / -1; font-family: var(--cx-serif); font-style: italic; font-size: 1.05rem; color: var(--cx-muted); }
.cx-behind > summary:hover h2, .cx-behind > summary:hover::after { color: var(--cx-wine); }
.cx-behind[open] > summary { margin-bottom: 24px; }
.cx-facts, .cx-interp { margin-bottom: 28px; }
.cx-facts > .cx-label, .cx-interp > .cx-label { margin-bottom: 12px; }
.cx-interp { padding-left: 20px; border-left: 2px solid color-mix(in srgb, var(--cx-wine) 45%, transparent); }
.cx-interp .cx-prose { font-style: italic; color: var(--cx-soft); }

.cx-sec-conversations .cx-related { margin-top: 12px; }

.cx-margins { columns: 2 260px; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.cx-margin { break-inside: avoid; margin-bottom: 24px; padding: 18px 20px; background: var(--cx-paper); box-shadow: 0 0 0 1px var(--cx-line); }
.cx-margin:nth-child(3n + 2) { transform: rotate(-0.4deg); }
.cx-margin:nth-child(3n) { transform: rotate(0.35deg); }
.cx-margin p, .cx-margin blockquote { margin: 8px 0 0; font-family: var(--cx-serif); font-size: 1.12rem; line-height: 1.5; }
.cx-margin blockquote { font-style: italic; }
.cx-margin-question p { font-style: italic; color: var(--cx-wine); }
.cx-margin figure { margin: 10px 0 0; }
.cx-margin img { display: block; width: 100%; height: auto; cursor: zoom-in; }

.cx-journal { margin: 0; padding: 0 0 0 26px; list-style: none; border-left: 1px solid var(--cx-line); }
.cx-journal li { position: relative; padding-bottom: 32px; }
.cx-journal li::before { content: ""; position: absolute; left: -31px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--cx-bg); box-shadow: 0 0 0 1px var(--cx-gold); }
.cx-journal time { display: block; margin-bottom: 8px; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-gold); }
.cx-journal figure { margin: 6px 0 16px; }
.cx-journal figure img { display: block; width: 100%; max-width: 320px; height: auto; cursor: zoom-in; }
.cx-journal figcaption { margin-top: 8px; font-family: var(--cx-sans); font-size: 0.72rem; color: var(--cx-muted); }
.cx-private-tag { display: inline-block; margin: -4px 0 8px; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-wine); }

.cx-unwritten { margin: 0 0 56px; font-family: var(--cx-serif); font-style: italic; font-size: 1.2rem; color: var(--cx-muted); }
.cx-private { padding: 24px; background: color-mix(in srgb, var(--cx-wine) 6%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cx-wine) 25%, transparent); margin-bottom: 56px; }
.cx-private h2 { margin-bottom: 4px; }
.cx-private .cx-label { margin-bottom: 18px; color: var(--cx-wine); }
.cx-sources { padding-top: 18px; border-top: 1px solid var(--cx-line); }
.cx-sources h2 { margin-bottom: 12px; }
.cx-sources ol { margin: 0; padding-left: 1.4em; font-size: 0.82rem; line-height: 1.6; color: var(--cx-soft); }
.cx-sources li { padding: 3px 0; scroll-margin-top: 24px; }
.cx-sources li:target { color: var(--cx-wine); }

.cx-sample, .cx-preview-banner { margin: 24px 0 0; padding: 10px 14px; border: 1px dashed var(--cx-gold); font-size: 0.78rem; color: var(--cx-soft); text-align: center; }
.cx-preview-banner a { color: var(--cx-wine); }

.cx-work-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--cx-ink); }
.cx-foot-more .cx-label { margin-bottom: 18px; }
.cx-next { display: flex; flex-direction: column; gap: 6px; align-self: start; padding: 24px; background: var(--cx-paper); box-shadow: 0 0 0 1px var(--cx-line); text-decoration: none; transition: box-shadow 0.3s; }
.cx-next:hover { box-shadow: 0 0 0 1px var(--cx-wine); }
.cx-next-title { font-family: var(--cx-serif); font-size: 1.5rem; line-height: 1.15; }
.cx-nextentry { text-align: right; align-items: flex-end; }
.cx-nextentry .cx-next-title::after { content: " \2192"; color: var(--cx-wine); }
.cx-prev .cx-next-title::before { content: "\2190  "; color: var(--cx-wine); }
.cx-back { grid-column: 1 / -1; justify-self: center; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); }

/* Zoomed plate */
.cx-zoom { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 10, 8, 0.94); }
.cx-zoom::backdrop { background: rgba(12, 10, 8, 0.94); }
.cx-zoom[open] { display: flex; align-items: center; justify-content: center; }
.cx-zoom img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
.cx-zoom-x { position: absolute; top: 16px; right: 20px; padding: 6px 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.4); background: none; color: #eee6da; font: 500 0.7rem var(--cx-sans); letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .cx-hero, .cx-work-head, .cx-ex-item, .cx-ex-item:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .cx-ex-item:nth-child(even) .cx-ex-plate { order: 0; }
  .cx-hero { padding: 56px 0 48px; }
  .cx-hero-title, .cx-hero-text { grid-column: 1; }
  .cx-meta { grid-column: 1; grid-row: auto; margin-top: 24px; }
  .cx-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .cx-toc { position: static; margin-bottom: 40px; padding-bottom: 16px; border-bottom: 1px solid var(--cx-line); }
  .cx-toc ol { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .cx-toc a { display: inline; }
  .cx-toc a span { margin-right: 6px; }
}
@media (max-width: 600px) {
  .cx-wrap { padding: 0 16px 56px; }
  .cx-bar-links { order: 3; width: 100%; }
  .cx-hero-text { font-size: 1.18rem; }
  .cx-prose { font-size: 1.18rem; }
  .cx-doors { gap: 36px 20px; }
  .cx-doors > li { flex-basis: calc((100% - 20px) / 2); }
  .cx-room-head { grid-template-columns: 96px minmax(0, 1fr); gap: 20px; }
  .cx-tl > li { grid-template-columns: 1fr; gap: 10px; }
  .cx-tl a { grid-template-columns: 80px 1fr; }
  .cx-work-plate { padding: 12px; }
  .cx-masonry { columns: 2 150px; column-gap: 18px; }
  .cx-rows { --row: 130px; gap: 24px 14px; }
  .cx-year { grid-template-columns: 1fr; gap: 10px; }
  .cx-year .cx-rows, .cx-artist .cx-rows { --row: 120px; }
  .cx-year .cx-row-item { gap: 14px; }
  .cx-year .cx-row-cap .cx-card-title { font-size: 1.05rem; }
  .cx-masonry > .cx-card { margin-bottom: 28px; }
  .cx-related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .cx-work-foot { gap: 14px; }
  .cx-next { padding: 14px; }
  .cx-next-title { font-size: 1.1rem; }
}

/* ============ Dashboard ============ */

.cx-admin { padding: 32px 0; font-family: var(--cx-sans); }
.ad-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 28px; padding-bottom: 16px; border-bottom: 1px solid var(--cx-ink); }
.ad-top h1 { margin: 0 auto 0 0; font-family: var(--cx-serif); font-weight: 400; font-size: 2rem; }
.ad-tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 14px 0; list-style: none; border-bottom: 1px solid var(--cx-line); }
.ad-tabs a { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cx-muted); text-decoration: none; }
.ad-tabs a[aria-current="page"] { color: var(--cx-wine); }
.ad-main { padding-top: 28px; }
.ad-h2 { margin: 0 0 18px; font-family: var(--cx-serif); font-weight: 400; font-size: 1.8rem; }
.ad-note { margin: 0 0 16px; font-size: 0.85rem; line-height: 1.55; color: var(--cx-muted); max-width: 46em; }
.ad-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--cx-ink); border-radius: 0;
  background: var(--cx-ink); color: var(--cx-bg);
  font: 500 0.74rem/1.3 var(--cx-sans); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.ad-btn:hover { background: var(--cx-wine); border-color: var(--cx-wine); }
.ad-btn.ghost { background: transparent; color: var(--cx-ink); }
.ad-btn.ghost:hover { color: var(--cx-wine); border-color: var(--cx-wine); background: transparent; }
.ad-btn.danger { background: transparent; color: var(--cx-wine); border-color: var(--cx-wine); }
.ad-btn:disabled { opacity: 0.5; cursor: default; }
.ad-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ad-login { max-width: 380px; padding: 56px 0; }
.ad-login form { display: grid; gap: 18px; margin-top: 24px; }
.ad-msg { min-height: 1.4em; font-size: 0.85rem; color: var(--cx-wine); }

.ad-list { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--cx-line); }
.ad-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--cx-line); }
.ad-item .cx-plate { width: 64px; }
.ad-item .cx-frame-empty { padding: 4px; font-size: 0.6rem; box-shadow: inset 0 0 0 1px var(--cx-line); }
.ad-item-title { font-family: var(--cx-serif); font-size: 1.2rem; line-height: 1.2; }
.ad-item-sub { font-size: 0.75rem; color: var(--cx-muted); }
.ad-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ad-badge { padding: 1px 7px; border: 1px solid var(--cx-line); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cx-muted); }
.ad-badge.public { border-color: var(--cx-wine); color: var(--cx-wine); }
.ad-badge.unlisted { border-color: var(--cx-gold); color: var(--cx-gold); }
.ad-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.ad-actions button, .ad-link { padding: 2px 0; border: 0; background: none; color: var(--cx-soft); font: 0.75rem var(--cx-sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cx-line); }
.ad-actions button:hover, .ad-link:hover { color: var(--cx-wine); }
.ad-filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; }

.ad-form { display: grid; gap: 40px; }
.ad-fieldset { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 28px; }
.ad-fieldset legend { grid-column: 1 / -1; margin-bottom: 14px; padding-bottom: 8px; width: 100%; border-bottom: 1px solid var(--cx-ink); font-family: var(--cx-serif); font-size: 1.5rem; }
.ad-wide { grid-column: 1 / -1; }
.cx-admin .cx-field textarea { min-height: 70px; resize: vertical; font-size: 1rem; }
.ad-check { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; }
.ad-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; max-height: 220px; overflow: auto; padding: 4px 0; }
.ad-sec { display: grid; gap: 8px; }
.ad-sec-title { font-family: var(--cx-serif); font-size: 1.3rem; }
.ad-sec-title span { font-style: italic; color: var(--cx-wine); }
.ad-imgprev { max-width: 260px; }
.ad-sticky { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 0; background: var(--cx-bg); border-top: 1px solid var(--cx-line); }
.ad-status { margin-left: auto; font-size: 0.75rem; color: var(--cx-muted); }
.ad-share { padding: 14px; border: 1px dashed var(--cx-gold); font-size: 0.82rem; line-height: 1.5; }
.ad-share code { word-break: break-all; }
.ad-rep { display: grid; gap: 10px; }
.ad-rep-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--cx-line); }
.ad-rep-row.src { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.ad-rep-row select, .ad-rep-row input, .ad-rep-row textarea { width: 100%; }
.ad-refl { padding: 14px 0; border-bottom: 1px solid var(--cx-line); }
.ad-refl-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin-bottom: 6px; font-size: 0.75rem; color: var(--cx-muted); }
.ad-refl .cx-prose { font-size: 1.05rem; }
.ad-order { display: flex; gap: 4px; }
.ad-order button { width: 28px; height: 28px; border: 1px solid var(--cx-line); background: none; color: var(--cx-ink); cursor: pointer; }
.ad-order button:hover { border-color: var(--cx-wine); color: var(--cx-wine); }
.ad-card { padding: 20px 0; border-bottom: 1px solid var(--cx-line); display: grid; gap: 14px; }

/* Editor */
.ed { border: 1px solid var(--cx-line); background: var(--cx-paper); }
.ed:focus-within { border-color: var(--cx-muted); }
.ed-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--cx-line); background: var(--cx-paper); }
.ed-bar button { min-width: 32px; padding: 5px 8px; border: 0; background: none; color: var(--cx-soft); font: 500 0.72rem var(--cx-sans); cursor: pointer; }
.ed-bar button:hover { background: var(--cx-mat); color: var(--cx-ink); }
.ed-area .ProseMirror { min-height: 160px; padding: 18px 22px; font-family: var(--cx-serif); font-size: 1.2rem; line-height: 1.6; outline: none; }
.ed-area .ProseMirror p { margin: 0 0 0.9em; }
.ed-area .ProseMirror blockquote { margin: 1em 0; padding-left: 1em; border-left: 1px solid var(--cx-wine); font-style: italic; }
.ed-area .ProseMirror h2 { font-weight: 400; font-size: 1.6rem; margin: 1em 0 0.4em; }
.ed-area .ProseMirror h3 { font: 500 0.72rem var(--cx-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cx-muted); }
.ed-area .ProseMirror img { max-width: 100%; height: auto; display: block; }
.ed-area .ProseMirror figure { margin: 1em 0; }
.ed-area .ProseMirror figcaption { font: 0.75rem var(--cx-sans); color: var(--cx-muted); }
.ed-area .ProseMirror .cx-gallery { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ed-area .ProseMirror .ProseMirror-selectednode { outline: 2px solid var(--cx-wine); }
.ed-area .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: var(--cx-muted); font-style: italic; pointer-events: none; }
.ed-tall .ProseMirror { min-height: 360px; }

.ad-dialog { width: min(460px, 92vw); padding: 24px; border: 1px solid var(--cx-line); background: var(--cx-bg); color: var(--cx-ink); }
.ad-dialog::backdrop { background: rgba(20, 17, 14, 0.5); }
.ad-dialog form { display: grid; gap: 16px; }
.ad-dialog h3 { margin: 0; font-family: var(--cx-serif); font-weight: 400; font-size: 1.5rem; }

@media (max-width: 600px) {
  .ad-item { grid-template-columns: 48px minmax(0, 1fr); }
  .ad-item .cx-plate { width: 48px; }
  .ad-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ad-rep-row, .ad-rep-row.src { grid-template-columns: 1fr; }
}
