/* Icon details share the homepage brand without changing homepage styles. */
:root {
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #252a29;
  background: #f8f7f4;
  font-synthesis: none;
  --accent: #d9532c;
  --muted: #5d655f;
  --border: #e4e5df;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a, summary, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
a:hover { color: var(--accent); }
h1, h2, p, figure { margin: 0; }
p { line-height: 1.8; }
img { object-fit: contain; max-width: 100%; }
.skip-link { position: absolute; left: 24px; top: -100px; padding: 12px; background: #fff; z-index: 2; }
.skip-link:focus { top: 12px; }
.topbar { max-width: 1440px; margin: auto; padding: 25px 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 750; letter-spacing: -.8px; }
.brand img { flex-shrink: 0; }
.brand-light { font-weight: 400; color: #676d69; }
.brand small { display: block; margin-top: 1px; font-size: 10px; letter-spacing: 1.2px; color: #747976; font-weight: 500; }
.topbar nav { display: flex; gap: 28px; font-size: 13px; color: #646b66; }
.language { padding: 9px 12px; font-size: 12px; border-radius: 6px; }
.language:hover { background: #e9ede2; }
.detail-main { max-width: 1280px; padding: 0 64px 56px; margin: auto; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 28px 0 32px; font-size: 12px; color: var(--muted); }
.breadcrumbs [aria-current] { color: #252a29; }
.icon-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; align-items: start; padding: 0 0 36px; }
.icon-intro { min-width: 0; }
.detail-category { margin-bottom: 16px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.detail-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.icon-intro h1 { font-size: 44px; font-weight: 650; letter-spacing: -1.4px; line-height: 1.16; overflow-wrap: anywhere; }
.detail-type { font-size: 12px; color: var(--muted); }
.intro { margin: 20px 0 22px; font-size: 14px; color: var(--muted); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 1px solid #dedfd9; border-radius: 6px; font-size: 13px; font-weight: 550; background: #fff; }
.action svg { flex-shrink: 0; }
.action:hover { background: #f0f1ec; color: #252a29; }
.action-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.action-primary:hover { background: #bc4320; border-color: #bc4320; color: #fff; }
.secondary-action { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 16px; font-size: 12px; color: var(--muted); }
.secondary-action .action { min-height: 32px; padding: 4px 0; border: 0; background: transparent; font-size: 12px; color: #252a29; }
.secondary-action .action:hover { color: var(--accent); }
.provenance { margin-top: 20px; border-top: 1px solid var(--border); min-width: 0; }
dl { margin: 0; font-size: 13px; }
.provenance > dl, details dl { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.3fr); gap: 12px 20px; padding: 20px 0; }
dt { color: var(--muted); line-height: 1.65; }
dd { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
dd a { text-underline-offset: 3px; }
dd a:hover { text-decoration: underline; }
.rights-note { border-top: 1px solid var(--border); padding-top: 16px; color: var(--muted); font-size: 12px; }
.commercial-note { margin-top: 12px; border: 0; padding: 0; }
.rights-note a { text-decoration: underline; text-underline-offset: 3px; }
details { margin-top: 16px; }
summary { cursor: pointer; font-size: 12px; line-height: 1.8; }
code { font: 11px/1.8 ui-monospace, Consolas, monospace; }
.related { padding-top: 30px; border-top: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
h2 { font-size: 23px; font-weight: 600; letter-spacing: -.6px; line-height: 1.5; }
.section-heading > a { font-size: 12px; color: var(--muted); }
.related-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.related-card { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; padding: 16px 8px; text-align: center; border-radius: 6px; }
.related-card:hover { background: #f0f1ec; }
.related-art { display: grid; place-items: center; width: 80px; height: 80px; }
.related-art img { width: 64px; height: 64px; }
.related-card strong { font-size: 13px; line-height: 1.6; font-weight: 500; overflow-wrap: anywhere; }
.detail-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; max-width: 1440px; margin: auto; padding: 28px 64px; border-top: 1px solid var(--border); font-size: 13px; }
.detail-footer small { margin-left: 8px; color: var(--muted); font-size: 10px; }
.detail-footer > div { display: flex; flex-wrap: wrap; gap: 20px; font-size: 11px; color: var(--muted); }
@media (max-width: 1000px) {
  .topbar, .detail-footer { padding-left: 32px; padding-right: 32px; }
  .detail-main { padding-left: 32px; padding-right: 32px; }
  .topbar nav { gap: 16px; }
  .icon-hero { gap: 32px; }
}
@media (max-width: 760px) {
  .topbar { padding: 20px; gap: 12px; }
  .topbar nav { display: none; }
  .brand { font-size: 19px; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .language { padding: 10px 4px; }
  .detail-main { padding: 0 20px 36px; }
  .breadcrumbs { padding: 22px 0; gap: 9px; }
  .icon-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: 30px; }
  .icon-intro h1 { font-size: 34px; }
  .detail-category { margin-bottom: 12px; }
  .provenance > dl, details dl { grid-template-columns: minmax(88px, .7fr) minmax(0, 1.3fr); gap: 12px 16px; }
  .section-heading { align-items: flex-start; gap: 16px; }
  h2 { font-size: 21px; }
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .detail-footer { padding: 24px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .action, .related-card { transition: background .15s, color .15s; }
}

/* Native radios keep both React and server-rendered previews usable without JS. */
.artwork-preview { margin: 0; min-width: 0; overflow: hidden; border: 1px solid #e1e2de; border-radius: 6px; background: #fff; color: #5d655f; }
.artwork-stage { display: grid; place-items: center; min-height: 326px; padding: 40px; background: #fff; }
.artwork-stage img { display: block; width: 208px; height: 208px; max-width: 100%; object-fit: contain; }
.preview-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 54px; padding: 7px 14px; border-top: 1px solid #e6e6e1; background: #fafaf8; font-size: 12px; line-height: 1.5; }
.preview-backgrounds { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.preview-backgrounds > span { margin-right: 8px; }
.preview-choice { position: relative; display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer; }
.preview-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.preview-swatch { display: block; width: 24px; height: 24px; border: 1px solid #d5d7d2; border-radius: 4px; background: #fff; pointer-events: none; }
.swatch-dark { background: #252a29; }
.swatch-transparent { background: repeating-conic-gradient(#e4e5e1 0% 25%, #fff 0% 50%) 0 0 / 10px 10px; }
.preview-choice input:checked + .preview-swatch { outline: 2px solid #d9532c; outline-offset: 2px; }
.preview-choice input:focus-visible + .preview-swatch { outline: 3px solid #252a29; outline-offset: 4px; }
.preview-format { white-space: nowrap; font-variant-numeric: tabular-nums; }
.artwork-preview:has(input[value="dark"]:checked) .artwork-stage { background: #252a29; }
.artwork-preview:has(input[value="transparent"]:checked) .artwork-stage { background: repeating-conic-gradient(#eeefec 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }
@media (max-width: 760px) {
  .artwork-stage { min-height: 260px; padding: 28px; }
  .artwork-stage img { width: 152px; height: 152px; }
  .preview-choice { width: 44px; height: 44px; }
  .preview-controls { padding: 4px 12px; }
}
