:root {
  --ink: #241f1a;
  --muted: #776b5e;
  --paper: #f4eee2;
  --panel: #fffaf1;
  --line: #d9cbbb;
  --accent: #8e2435;
  --dark: #171310;
}

html[dir="rtl"],
html[lang="ar"] {
  direction: rtl;
}

html[dir="rtl"] body,
html[lang="ar"] body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  text-align: right;
}

html[dir="rtl"] .actions,
html[dir="rtl"] .card-actions,
html[dir="rtl"] .row-actions,
html[dir="rtl"] .tag-strip {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

html[dir="rtl"] input,
html[dir="rtl"] select {
  direction: rtl;
  text-align: right;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--dark);
}

a {
  color: inherit;
}

.home-shell {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 44px);
}

.book-hero {
  max-width: 1320px;
  margin: 0 auto 30px;
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(340px, 1fr);
  border: 1px solid #6f6254;
  background: var(--paper);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.index-hero {
  min-height: auto;
  display: block;
}

.index-hero .intro {
  min-height: 68vh;
}

.artdaci-logo {
  display: block;
  object-fit: contain;
}

.index-logo {
  width: clamp(110px, 15vw, 180px);
  max-height: 100px;
  margin-bottom: 18px;
}

.plate {
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 52px);
  background: #15120f;
}

.plate img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.44);
}

.intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 70px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.intro h1 {
  box-shadow: 10px 10px 23px -1px rgba(187, 116, 17, 0.48);

  font-size: clamp(54px, 9vw, 104px);
  line-height: 0.9;
}

.dek {
  max-width: 640px;
  margin: 24px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.42;
  color: #352d26;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 14px;
  background: transparent;
}

.button.primary {
  background: var(--ink);
  color: #fffaf1;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.facts div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.facts dt {
  color: var(--muted);
  font-size: 12px;
}

.facts dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.painting-index {
  max-width: 1320px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid #6f6254;
}

.atlas-callout {
  max-width: 1320px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: clamp(22px, 4vw, 42px);
  padding: clamp(26px, 4vw, 52px);
  color: #fffaf1;
  background: #2d261f;
  border: 1px solid #6f6254;
}

.atlas-callout h2 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 0.98;
}

.atlas-callout p {
  max-width: 760px;
  margin: 20px 0 0;
  color: #e6d8c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.48;
}

.atlas-pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.atlas-pillars article {
  min-height: 154px;
  padding: 18px;
  border: 1px solid rgba(255, 250, 241, 0.24);
  background: rgba(255, 250, 241, 0.06);
}

.atlas-pillars strong {
  display: block;
  margin-bottom: 10px;
  color: #d2ad61;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
}

.atlas-pillars span {
  color: #eadfce;
  font-size: 15px;
  line-height: 1.46;
}

.section-heading {
  padding: clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
}

.section-dek {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.45;
}

.catalogue-app[data-ready="true"] {
  padding: clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.catalogue-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 280px) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.search-field,
.filter-field {
  display: grid;
  gap: 6px;
}

.search-field span,
.filter-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
  color: var(--ink);
  background: #fffaf1;
  font: inherit;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #fffaf1;
}

.collection-stats div {
  padding: 14px;
  border-right: 1px solid var(--line);
}

.collection-stats div:last-child {
  border-right: 0;
}

.collection-stats strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
}

.collection-stats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalogue-layout {
  margin-top: 18px;
}

.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 14px;
  align-content: start;
}

.artwork-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.43fr) minmax(0, 0.57fr);
  min-height: 410px;
  border: 1px solid var(--line);
  background: #fffaf1;
}

.artwork-image {
  min-height: 100%;
  background: #15120f;
}

.artwork-image img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  display: block;
}

.artwork-content {
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.artwork-content h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1;
}

.artwork-content p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
}

.artwork-content .card-meta {
  color: var(--muted);
  font-size: 14px;
}

.mini-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.mini-facts div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.mini-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-facts dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-strip span {
  border: 1px solid var(--line);
  padding: 5px 7px;
  color: #352d26;
  background: rgba(244, 238, 226, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
}

.card-actions .button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

.empty-results,
.catalogue-error {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: #fffaf1;
  color: var(--muted);
}

.painting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 4vw, 42px) clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}

.painting-row:last-child {
  border-bottom: 0;
}

.painting-row h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 54px);
  font-weight: 500;
}

.painting-row p:not(.eyebrow) {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.spread-preview {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: var(--paper);
  border: 1px solid #6f6254;
}

.page {
  padding: clamp(24px, 4vw, 52px);
}

.page + .page {
  border-left: 1px solid var(--line);
}

.image-page figure {
  margin: 0;
}

.image-page img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #15120f;
  padding: 18px;
}

figcaption {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

figcaption strong {
  color: var(--ink);
  font-size: 18px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.meta span {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
}

.text-page h2 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.95;
}

.artist {
  margin: 8px 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.essay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.essay-grid h3 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.essay-grid p {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.55;
}

.target-body {
  background: #ece5d8;
}

.target-sheet {
  width: min(920px, calc(100vw - 28px));
  margin: 20px auto;
  padding: clamp(18px, 4vw, 42px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.target-sheet header {
  text-align: center;
  margin-bottom: 22px;
}

.target-sheet h1 {
  font-size: clamp(42px, 8vw, 78px);
}

.target-sheet p {
  margin: 10px auto 0;
  max-width: 620px;
  color: var(--muted);
}

.target-art {
  margin: 0;
  display: grid;
  place-items: center;
}

.target-art img {
  width: min(620px, 100%);
  height: auto;
  border: 1px solid #312820;
}

.target-sheet footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.catalogue-spread {
  width: min(1320px, calc(100vw - 28px));
  margin: 20px auto;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  background: var(--paper);
  border: 1px solid var(--line);
}

.catalogue-spread.stacked-spread {
  max-width: 980px;
  grid-template-columns: 1fr;
}

.stacked-spread .catalogue-plate {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.stacked-spread .target-art img {
  width: min(520px, 100%);
  margin: 0 auto;
}

.stacked-spread figcaption {
  max-width: 720px;
  margin: 16px auto 0;
}

.catalogue-plate,
.catalogue-text {
  padding: clamp(22px, 4vw, 46px);
}

.catalogue-plate {
  border-right: 1px solid var(--line);
}

.catalogue-text h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 78px);
  font-weight: 500;
  line-height: 0.95;
}

.catalogue-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 28px;
}

.catalogue-meta div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.catalogue-meta dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.catalogue-meta dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.expanded-grid {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.close-look {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.close-look-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 0.66fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}

.close-look-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 500;
  line-height: 0.98;
}

.close-look-header p {
  margin: 0;
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.5;
}

.close-look-stage {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: #15120f;
  border: 1px solid #312820;
}

.close-look-stage img {
  display: block;
  width: 100%;
  height: auto;
}

.close-look-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid #fffaf1;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.close-look-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.close-look-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: start;
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.45;
  break-inside: avoid;
}

.close-look-list .number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.close-look-list strong {
  color: var(--ink);
}

.chapter-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 0.64fr);
  gap: 22px;
  margin: 28px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fffaf1;
}

.chapter-band h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  line-height: 1;
}

.catalogue-grid h2,
.timeline-strip h2,
.ar-note h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalogue-grid p,
.catalogue-grid li,
.timeline-strip li,
.ar-note p,
.chapter-band p {
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.48;
}

.catalogue-grid p,
.ar-note p,
.chapter-band p {
  margin: 0;
}

.catalogue-grid ul,
.timeline-strip ol {
  margin: 0;
  padding-left: 20px;
}

.timeline-strip {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline-strip ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}

.interpretive-gallery {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.museum-index-section { margin-top: 64px; padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: linear-gradient(135deg, #102b38, #244c54); color: #fff8e9; }
.museum-index-section > header { max-width: 760px; margin-bottom: 28px; }
.museum-index-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.museum-index-card { overflow: hidden; border: 1px solid rgba(230,190,105,.55); border-radius: 20px; background: rgba(7,20,27,.72); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.museum-index-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #d8cbb5; }
.museum-index-card > div { padding: 20px; }
.museum-index-card h3 { margin: 0 0 10px; color: #f4cd7a; }
.painting-museum-section { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(280px, 1.2fr); gap: clamp(22px, 4vw, 48px); align-items: center; margin: 46px 0; padding: clamp(22px, 4vw, 42px); border: 2px solid #b88a43; border-radius: 24px; background: linear-gradient(135deg, #f4ead8, #dfcda9); box-shadow: 0 20px 55px rgba(54,35,15,.15); }
.painting-museum-section img { width: 100%; max-height: 390px; object-fit: contain; border-radius: 14px; box-shadow: 0 12px 30px rgba(38,24,9,.22); }
.painting-museum-section h2 { margin-top: 4px; }
@media (max-width: 760px) { .painting-museum-section { grid-template-columns: 1fr; } }

.patron-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
  padding: 2rem;
  border: 1px solid rgba(126, 82, 45, .35);
  background: linear-gradient(135deg, rgba(251, 245, 229, .96), rgba(224, 204, 171, .72));
}

.patron-profile h2 {
  margin-top: .35rem;
}

.patron-profile figure {
  margin: 0;
}

.patron-profile img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #d7c3a2;
}

.patron-profile figcaption {
  display: grid;
  gap: .3rem;
  padding-top: .75rem;
}

.patron-profile .scan-caption {
  border-left: 4px solid #8a303c;
  padding-left: 1rem;
}

.supporter-qr {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1.25rem 0;
}

.supporter-qr img {
  width: 112px;
  height: 112px;
  max-height: none;
  background: #fff;
}

.supporter-qr div {
  display: grid;
  gap: .25rem;
}

.interpretive-gallery > h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.interpretive-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.interpretive-gallery figure {
  min-width: 0;
  margin: 0;
}

.interpretive-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #15120f;
  border: 1px solid var(--line);
}

.interpretive-gallery figcaption {
  margin-top: 10px;
}

.ar-note {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.56);
}

.ar-note .button {
  margin: 14px 8px 0 0;
}

.ar-note .qr-heading {
  margin-top: 18px;
}

.qr-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.qr-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fffaf1;
  padding: 9px;
}

.qr-card img {
  width: 82px;
  height: 82px;
  image-rendering: crisp-edges;
}

.qr-card strong {
  display: block;
  font-size: 13px;
}

.qr-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.index-qr {
  max-width: 1320px;
  margin: 30px auto 0;
  padding: clamp(22px, 4vw, 42px) clamp(24px, 4vw, 52px);
  border: 1px solid #6f6254;
  background: var(--paper);
}

.index-qr .qr-strip {
  max-width: 620px;
}

.concept-page {
  max-width: 1320px;
  margin: 0 auto;
  border: 1px solid #6f6254;
  background: var(--paper);
}

.concept-hero,
.concept-band,
.concept-grid {
  padding: clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}

.concept-hero h1,
.concept-band h2,
.concept-grid h2,
.index-qr h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

.qr-directory-body {
  margin: 0;
  background: #e9e2d7;
}

.qr-directory {
  box-sizing: border-box;
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 48px 34px;
  color: #241b14;
  background:
    linear-gradient(90deg, rgba(117,78,42,.08), transparent 8%, transparent 92%, rgba(117,78,42,.08)),
    #fffaf0;
}

.qr-directory-header {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  column-gap: 34px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 2px solid #b59154;
}

.qr-directory-logo {
  position: absolute;
  top: 24px;
  right: 48px;
  width: 88px;
  max-height: 72px;
}

.qr-directory-header .eyebrow {
  grid-column: 1 / -1;
}

.qr-directory-header h1 {
  margin: 4px 0 0;
  font: 500 clamp(38px, 5vw, 64px)/.98 Georgia, serif;
}

.qr-directory-header > p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}

.qr-directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.qr-directory-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 13px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid #cdbd9e;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  break-inside: avoid;
}

.qr-directory-card img {
  width: 92px;
  height: 92px;
  border: 5px solid #fff;
  box-shadow: 0 2px 9px rgba(38,25,14,.15);
}

.qr-directory-card span {
  color: #8a6430;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.qr-directory-card h2 {
  margin: 3px 0 5px;
  font: 600 20px/1.05 Georgia, serif;
}

.qr-directory-card p {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.35;
}

.qr-directory-card code {
  color: #fffaf0;
  background: #253c4d;
  border-radius: 999px;
  padding: 3px 7px;
  font: 800 9px/1 Arial, sans-serif;
  text-transform: uppercase;
}

.qr-directory-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #cdbd9e;
}

.qr-directory-footer p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.qr-directory-footer .button {
  white-space: nowrap;
}

@media (max-width: 900px) {
  .qr-directory-header,
  .qr-directory-footer {
    grid-template-columns: 1fr;
  }

  .qr-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.concept-hero h1 {
  max-width: 900px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.92;
}

.concept-band h2,
.concept-grid h2,
.index-qr h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.concept-band p,
.concept-grid p,
.concept-grid li,
.roadmap li {
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.5;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.mode-grid div,
.mode-strip span {
  border: 1px solid var(--line);
  background: #fffaf1;
}

.mode-grid div {
  padding: 14px;
}

.mode-grid strong {
  display: block;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode-grid span {
  display: block;
  margin-top: 7px;
  color: #352d26;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.4;
}

.mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
}

.mode-strip span {
  padding: 6px 8px;
  color: #352d26;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 860px) {
  .book-hero,
  .spread-preview,
  .atlas-callout,
  .catalogue-spread {
    grid-template-columns: 1fr;
  }

  .patron-profile {
    grid-template-columns: 1fr;
  }

  .page + .page {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .essay-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .painting-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .catalogue-plate {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .catalogue-grid,
  .catalogue-meta,
  .atlas-pillars,
  .chapter-band,
  .close-look-header,
  .close-look-list,
  .catalogue-toolbar,
  .catalogue-layout,
  .artwork-grid,
  .concept-grid,
  .mode-grid,
  .qr-strip,
  .interpretive-gallery-grid,
  .timeline-strip ol {
    grid-template-columns: 1fr;
  }

  .collection-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-stats div:nth-child(2) {
    border-right: 0;
  }

  .collection-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .artwork-card {
    grid-template-columns: 1fr;
  }

  .artwork-image img {
    height: auto;
    min-height: 0;
    max-height: 420px;
    object-fit: contain;
  }

  .mini-facts,
  .collection-stats {
    grid-template-columns: 1fr;
  }

  .collection-stats div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .collection-stats div:last-child {
    border-bottom: 0;
  }
}

.leonardo-introduction {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  margin: 0 auto 44px;
  padding: clamp(28px, 5vw, 72px);
  color: #f8edda;
  background:
    radial-gradient(circle at 88% 16%, rgba(210, 169, 96, .2), transparent 34%),
    linear-gradient(135deg, #241414, #5e272c 58%, #231719);
  border: 1px solid rgba(214, 180, 116, .38);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(30, 17, 15, .22);
}

.leonardo-introduction h2 {
  max-width: 850px;
  margin: 8px 0 22px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.02;
}

.leonardo-introduction p {
  max-width: 780px;
  line-height: 1.72;
}

.leonardo-introduction blockquote {
  margin: 24px 0;
  padding-inline-start: 22px;
  color: #efd39d;
  border-inline-start: 3px solid #d5a95e;
  font: italic 700 clamp(1.2rem, 2vw, 1.8rem) Georgia, serif;
}

.leonardo-introduction figure {
  margin: 0;
}

.leonardo-introduction img {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border: 1px solid rgba(239, 211, 157, .5);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .38);
}

.leonardo-introduction figcaption {
  margin-top: 14px;
  color: #dfc9a6;
  font: italic 1rem/1.55 Georgia, serif;
}

html[dir="rtl"] .leonardo-introduction {
  text-align: right;
}

.tribute-print-body {
  margin: 0;
  color: #291f19;
  background: #c8b9a4;
}

.tribute-print-toolbar {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 18px;
}

.tribute-toolbar-logo {
  width: 62px;
  height: 42px;
}

.tribute-print {
  width: min(100%, 210mm);
  margin: 0 auto 40px;
}

.tribute-print-page {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 12mm;
  width: 210mm;
  min-height: 297mm;
  padding: 20mm 18mm 17mm;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 10%, rgba(169, 119, 54, .15), transparent 30%),
    linear-gradient(135deg, #fffaf0, #ecdfc8);
  box-shadow: 0 16px 45px rgba(36, 24, 17, .24);
  break-after: page;
  page-break-after: always;
  page: tribute-page;
}

.tribute-page-logo {
  position: absolute;
  z-index: 2;
  top: 8mm;
  inset-inline-end: 14mm;
  width: 28mm;
  height: 16mm;
}

.tribute-print-page-3 {
  display: block;
  padding-inline: 28mm;
  color: #fff4df;
  background:
    radial-gradient(circle at 50% 18%, rgba(213, 169, 91, .24), transparent 32%),
    linear-gradient(145deg, #6a2d32, #281719 68%);
}

.tribute-print-copy {
  align-self: center;
}

.tribute-print-page h1 {
  margin: 4mm 0 5mm;
  font: 700 28pt/1.05 Georgia, serif;
}

.tribute-print-page p {
  font: 11.3pt/1.62 Georgia, serif;
}

.tribute-print-page .eyebrow {
  color: #8a303c;
  font: 800 9pt/1.2 Arial, sans-serif;
  letter-spacing: .16em;
}

.tribute-print-page-3 .eyebrow {
  color: #e4bd75;
}

.tribute-print-lead {
  color: #795c45;
  font-style: italic !important;
  font-weight: 700 !important;
}

.tribute-print-page-3 .tribute-print-lead {
  color: #e3cda7;
}

.tribute-print-page figure {
  align-self: center;
  margin: 0;
}

.tribute-print-page img {
  display: block;
  width: 100%;
  max-height: 205mm;
  object-fit: cover;
  border: 2mm solid #efe0c6;
  box-shadow: 0 8mm 15mm rgba(44, 28, 17, .24);
}

.tribute-print-page figcaption {
  margin-top: 4mm;
  color: #765b47;
  font: 8pt Arial, sans-serif;
  letter-spacing: .08em;
}

.tribute-print-closing {
  display: grid;
  gap: 4mm;
  margin-top: 15mm;
  color: #e9c982;
  font: 700 18pt/1.2 Georgia, serif;
}

.tribute-print-page footer {
  position: absolute;
  inset-inline: 18mm;
  bottom: 8mm;
  color: #8c745c;
  font: 8pt Arial, sans-serif;
  letter-spacing: .14em;
}

.tribute-print-page-3 footer {
  color: #cbb48d;
}

html[dir="rtl"] .tribute-print-page {
  text-align: right;
}

@media (max-width: 820px) {
  .leonardo-introduction {
    grid-template-columns: 1fr;
  }

  .tribute-print {
    width: 100%;
  }

  .tribute-print-page {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: auto;
    padding: 32px 24px 54px;
  }
}

@media print {
  body,
  .target-body {
    background: white;
  }

  .home-shell,
  .catalogue-spread,
  .target-sheet {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .button {
    display: none;
  }

  .tribute-print-toolbar {
    display: none;
  }

  .tribute-print,
  .tribute-print-page {
    width: 100%;
    margin: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .close-look {
    break-before: page;
  }

  .close-look-stage,
  .close-look-list,
  .close-look-list li {
    break-inside: avoid;
  }

  .close-look-marker,
  .close-look-list .number {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .qr-directory {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 30px 34px 24px;
    box-shadow: none;
    page: qr-directory-page;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .qr-directory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .qr-directory-header {
    display: block;
    padding-bottom: 12px;
    padding-right: 120px;
  }

  .qr-directory-header h1 {
    margin-top: 3px;
    font-size: 38px;
  }

  .qr-directory-header > p:last-child {
    margin-top: 5px;
  }

  .qr-directory-card {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 9px;
    min-height: 108px;
    padding: 9px;
    overflow: hidden;
  }

  .qr-directory-card img {
    width: 62px;
    height: 62px;
    border-width: 3px;
  }

  .qr-directory-card > div {
    min-width: 0;
  }

  .qr-directory-card h2 {
    overflow-wrap: anywhere;
    font-size: 15px;
  }

  .qr-directory-card p {
    margin-bottom: 5px;
    font-size: 9.5px;
    line-height: 1.25;
  }

  .qr-directory-footer {
    margin-top: 10px;
    padding-top: 8px;
  }

  .qr-directory-footer {
    grid-template-columns: 1fr 1fr;
  }
}

@page qr-directory-page {
  size: A4 landscape;
  margin: 0;
}

@page tribute-page {
  size: A4 portrait;
  margin: 0;
}
/* Install control shared by the collection and immersive PWA entry points. */
.artdaci-install-button {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 1000;
  border: 2px solid #d4aa5c;
  border-radius: 999px;
  padding: 10px 15px;
  color: #fff6e4;
  background: rgba(30, 23, 17, .94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  font: 700 12px/1.1 Inter, "Segoe UI", sans-serif;
  letter-spacing: .05em;
  cursor: pointer;
}

.artdaci-install-button[hidden] { display: none; }
