:root {
  color-scheme: light only;
  --paper: #f3f0ea;
  --surface: #fbfaf7;
  --ink: #25221f;
  --muted: #77716a;
  --line: rgba(37, 34, 31, 0.16);
  --accent: #9b7138;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
button { font-family: inherit; }

.artwork-page {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 26px 0 54px;
}

.artwork-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.artwork-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.artwork-logo { width: 52px; height: 52px; object-fit: cover; }
.artwork-brand-copy strong,.artwork-brand-copy span { display: block; }
.artwork-brand-copy strong { font-size: .92rem; font-weight: 650; }
.artwork-brand-copy span { margin-top: 2px; color: var(--muted); font-size: .76rem; }
.artwork-type { color: var(--muted); font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; }

.artwork-intro { padding: 42px 0 26px; text-align: center; }
.artwork-kicker { margin: 0 0 10px; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia,"Times New Roman",serif; font-size: clamp(2.4rem,8vw,5.2rem); font-weight: 400; line-height: .98; letter-spacing: -.03em; }
.artwork-meta-line { margin: 18px 0 0; color: var(--muted); font-size: .94rem; }

.artwork-figure { margin: 14px auto 30px; text-align: center; }
.artwork-image-button { display: inline-block; width: auto; max-width: min(76vw,460px); margin: 0 auto; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.artwork-image-button img { display: block; width: auto; max-width: 100%; max-height: 560px; height: auto; margin: 0 auto; border: 1px solid rgba(37,34,31,.08); box-shadow: 0 18px 45px rgba(37,34,31,.14); }
.artwork-image-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.artwork-figure figcaption { margin-top: 12px; color: var(--muted); font-size: .78rem; }

.artwork-actions { width: min(100%,640px); margin: 0 auto 38px; }
.primary-action,.text-action,.modal-btn { cursor: pointer; }
.primary-action {
  width: 100%; min-height: 72px; padding: 14px 18px; border: 0; border-radius: 3px;
  --audio-progress: 0%; isolation: isolate;
  background: linear-gradient(90deg,#e9ddca 0,#e9ddca var(--audio-progress),var(--ink) var(--audio-progress),var(--ink) 100%);
  color: #fff; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 14px; text-align: left;
}
.primary-action svg,.text-action svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.primary-action > * { position: relative; z-index: 1; color: #fff; mix-blend-mode: difference; }
.action-copy { display: flex; flex-direction: column; gap: 3px; }
.action-copy strong { font-size: .98rem; }
.action-copy small { color: #fff; font-size: .72rem; font-weight: 500; }
.action-arrow { font-size: 1.15rem; font-weight: 600; }
#audio-action-icon { font-size: 1.05rem; }
.secondary-actions { margin-top: 12px; border-bottom: 1px solid var(--line); }
.text-action {
  width: 100%; min-height: 54px; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--ink); display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 14px;
  font-size: .88rem; font-weight: 700; text-align: left;
}
.text-action svg { color: var(--accent); }
.primary-action:hover { filter: brightness(.96); }
.text-action:hover { background: rgba(255,255,255,.45); }
.primary-action:active,.text-action:active { transform: translateY(1px); }
.primary-action:focus-visible,.text-action:focus-visible,.modal-btn:focus-visible { outline: 3px solid rgba(155,113,56,.28); outline-offset: 2px; }

.artwork-content { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(240px,.8fr); gap: 42px; padding: 34px 0; border-top: 1px solid var(--line); }
.artwork-section h2 { margin: 0 0 14px; font-family: Georgia,"Times New Roman",serif; font-size: 1.55rem; font-weight: 400; }
.artwork-description { margin: 0; max-width: 42rem; font-size: 1.02rem; }
.artwork-data { margin: 0; }
.artwork-data div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(37,34,31,.09); }
.artwork-data dt { color: var(--muted); font-size: .8rem; }
.artwork-data dd { margin: 0; font-size: .9rem; }

.artwork-footer { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.artwork-footer a { text-underline-offset: 3px; }

.artwork-lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 28px; border: 0; background: rgba(20,18,16,.9); }
.artwork-lightbox::backdrop { background: rgba(20,18,16,.64); }
.artwork-lightbox[open] { display: grid; place-items: center; }
.artwork-lightbox-inner { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.artwork-lightbox img { display: block; max-width: 92vw; max-height: 88vh; width: auto; height: auto; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.artwork-lightbox-close { position: fixed; top: max(18px,env(safe-area-inset-top)); right: max(18px,env(safe-area-inset-right)); width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.46); border-radius: 50%; background: rgba(20,18,16,.56); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }

.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }

.modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 10px; background: rgba(23,22,20,.76); }
.modal.open { display: flex; }
.dialog { width: min(900px,96vw); height: min(86svh,860px); display: flex; flex-direction: column; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.dialog-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.dialog-ttl { font-weight: 750; }
.dialog-actions { display: flex; gap: 8px; }
.modal-btn { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 700; }
.dialog-body { flex: 1; min-height: 0; overflow: auto; background: #f7f7f7; -webkit-overflow-scrolling: touch; }
.video-frame { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.pdf-document { min-height: 100%; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #d8d6d1; }
.pdf-document canvas { display: block; max-width: 100%; height: auto; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.13); }
.pdf-loading,.pdf-error { width: min(100%,560px); margin: auto; padding: 24px; color: #625d55; background: #fff; font-size: .85rem; line-height: 1.45; text-align: center; }

@media (max-width: 680px) {
  .artwork-page { width: min(100% - 24px,920px); padding-top: 12px; }
  .artwork-type { display: none; }
  .artwork-header { padding-bottom: 14px; }
  .artwork-logo { width: 46px; height: 46px; }
  .artwork-brand-copy strong { font-size: .84rem; }
  .artwork-brand-copy span { font-size: .69rem; }
  .artwork-intro { padding: 22px 0 16px; }
  .artwork-kicker { margin-bottom: 6px; font-size: .64rem; }
  h1 { font-size: clamp(2.15rem,10.5vw,3rem); }
  .artwork-meta-line { margin-top: 10px; font-size: .82rem; }
  .artwork-figure { margin: 4px auto 10px; }
  .artwork-image-button { max-width: min(58vw,240px); }
  .artwork-image-button img { max-height: min(42svh,340px); }
  .artwork-figure figcaption { margin-top: 7px; font-size: .7rem; }
  .artwork-actions { margin-top: 8px; margin-bottom: 26px; }
  .primary-action { min-height: 60px; padding: 11px 14px; }
  .action-copy strong { font-size: .9rem; }
  .secondary-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 10px; border: 0; }
  .text-action { min-height: 70px; padding: 9px 5px; border: 1px solid var(--line); border-right: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; font-size: .7rem; line-height: 1.15; text-align: center; }
  .text-action:last-child { border-right: 1px solid var(--line); }
  .text-action svg { width: 18px; height: 18px; }
  .text-action .action-arrow { display: none; }
  .artwork-content { grid-template-columns: 1fr; gap: 28px; }
  .artwork-footer { flex-direction: column; gap: 6px; }
  .artwork-lightbox { padding: 12px; }
  .artwork-lightbox img { max-width: 94vw; max-height: 84vh; }
}
