* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.65; }
.gallery-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.gallery-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 26px 0; border-bottom: 1px solid #53452e; }
.gallery-nav a { font-size: .9rem; }
.gallery-nav-links { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.gallery-hero { padding: 54px 0 28px; max-width: 850px; }
.gallery-eyebrow { margin: 0 0 12px; color: #e6c179; font-size: .77rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(2.5rem, 6vw, 4.8rem); line-height: 1.1; margin: 0 0 20px; }
.gallery-lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #d0c5b2; max-width: 760px; }
.gallery-hero-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 22px; }
.gallery-hero-links a { display: inline-block; padding: 7px 0; font-weight: 700; }
.reader-route { padding: 22px 0 28px; }
.reader-route h2, .gallery-section-heading { font-family: Georgia, serif; font-size: 1.6rem; font-weight: 400; margin: 0 0 12px; }
.reader-route ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.reader-route li { min-width: 0; position: relative; }
.reader-route li + li::before { content: '›'; position: absolute; top: 11px; left: -11px; color: #a98b52; }
.reader-route a { display: block; height: 100%; border-top: 1px solid #8d7040; padding: 14px 10px 8px 0; text-decoration: none; }
.reader-route strong { display: block; font-family: Georgia, serif; font-size: 1.12rem; }
.reader-route span { display: block; font-size: .83rem; color: #c7bcaa; margin-top: 3px; }
.gallery-section { padding: 20px 0 35px; }
.gallery-section-intro { max-width: 780px; color: #c7bcaa; margin: 0 0 24px; }
.artwork-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.artwork { margin: 0; padding: 0 0 24px; border-bottom: 1px solid #51432d; min-width: 0; scroll-margin-top: 24px; }
.artwork-image { display: block; overflow: hidden; background: #030408; border: 1px solid #6e5833; border-radius: 5px; aspect-ratio: 1; }
.artwork-image img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .2s ease; }
.artwork-image:hover img { transform: scale(1.015); }
.artwork figcaption { padding-top: 18px; }
.artwork-number { color: #c6a66b; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 5px; }
.artwork h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.artwork-description { color: #c7bcaa; margin: 0 0 12px; max-width: 520px; }
.artwork-full-link { display: inline-block; padding: 6px 0; font-size: .9rem; }
.gallery-reading-note { margin: 24px 0 50px; padding: 24px; background: #0c1220; border: 1px solid #53452e; border-radius: 8px; }
.gallery-reading-note h2 { margin-top: 0; font-family: Georgia, serif; font-weight: 400; }
.gallery-reading-note p { max-width: 820px; color: #c7bcaa; }
.connection-key { display: flex; flex-wrap: wrap; gap: 14px 24px; padding: 0; margin: 16px 0; list-style: none; font-size: .9rem; }
.connection-key li { display: flex; gap: 9px; align-items: center; }
.connection-key i { display: inline-block; width: 26px; height: 2px; background: #e5bd64; }
.connection-key .sapphire { background: #70a9f6; }
.connection-key .crimson { background: #ef7482; }
.gallery-footer { margin-top: 15px; padding: 28px 0 36px; border-top: 1px solid #53452e; color: #b9ad99; font-size: .9rem; }
.gallery-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.gallery-footer p { margin-bottom: 0; }
.skip-gallery { position: absolute; left: 15px; top: -100px; background: #f1d18b; color: #07101b !important; padding: 10px; z-index: 20; }
.skip-gallery:focus { top: 10px; }
a:focus-visible, button:focus-visible { outline: 2px solid #f1d18b; outline-offset: 5px; }
.artwork-viewer { width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px; border: 1px solid #a98b52; border-radius: 8px; background: #080c14; color: #efe8dc; overflow: auto; }
.artwork-viewer::backdrop { background: rgb(0 0 0 / 90%); }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.viewer-toolbar h2 { font-family: Georgia, serif; font-size: clamp(1.15rem, 3vw, 1.6rem); margin: 0; font-weight: 400; }
.viewer-toolbar button, .viewer-controls button { padding: 9px 14px; min-height: 42px; border: 1px solid #8d7040; border-radius: 4px; background: #e3c17a; color: #0a0f18; font: inherit; font-weight: 650; cursor: pointer; }
.viewer-image { display: block; width: 100%; height: min(70dvh, 850px); object-fit: contain; background: #030407; }
.viewer-description { margin: 12px 0; color: #d0c5b2; font-size: .9rem; }
.viewer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.viewer-controls a { padding: 8px 0; font-size: .9rem; }
@media (max-width: 650px) {
  .gallery-shell { width: calc(100% - 30px); }
  .gallery-hero { padding-top: 35px; }
  .artwork-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .reader-route ol { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .reader-route li + li::before { display: none; }
  .reader-route a { padding: 10px 0; }
  .reader-route span { display: inline; margin-left: 10px; }
  .reader-route strong { display: inline; }
  .viewer-image { height: 55dvh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .artwork-image img { transition: none; }
}
