/* Shared footer, gallery and API documentation. App palette lives in style.css. */
footer[data-site-footer] {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(145px, 1fr));
  gap: 28px;
  margin-top: auto;
  padding: 32px 0 48px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
footer[data-site-footer] .links { grid-column: 1 / -1 }
footer[data-site-footer] .links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted) }
.footer-identity p { max-width: 26ch; margin: 12px 0 0; color: var(--text-muted) }
.footer-group { display: flex; flex-direction: column; gap: 8px; align-items: flex-start }
.footer-group strong { font-size: 13px; color: var(--text); margin-bottom: 4px }
.footer-group a { color: var(--text-muted); text-decoration: none; min-height: 28px }
.footer-group a:hover { color: var(--primary); text-decoration: underline }
.record-cta { width: min(1080px, calc(100% - 2 * var(--pad))); margin: 0 auto 44px }
.record-cta a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600 }

.shots { width: min(1080px, calc(100% - 2 * var(--pad))); margin-inline: auto; padding: 0 0 64px }
.shotlist { list-style: none; margin: 24px 0 0; padding: 0 2px 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px }
.shotlist li { min-width: 0 }
.shotlist button { display: block; width: 100%; padding: 0; border: 0; border-radius: 18px; background: transparent; cursor: zoom-in }
.shotlist button:hover { transform: translateY(-4px) }
.shotlist img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow) }
.gallery-dialog { max-width: min(95vw, 520px); max-height: min(94vh, 1080px); padding: 14px; border: 1px solid var(--hairline); border-radius: 18px; color: var(--text); background: var(--surface); box-shadow: var(--shadow) }
.gallery-dialog::backdrop { background: rgba(1, 7, 16, .88) }
.gallery-dialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(94vh - 140px); margin: 0 auto; border-radius: 10px; object-fit: contain }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600 }
.gallery-controls button { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; color: var(--text); background: var(--surface-low); font: inherit; font-size: 25px; cursor: pointer }
.gallery-controls button:hover { color: var(--primary) }
.gallery-navigation { justify-content: center; padding-top: 12px }

.api-docs { width: min(850px, calc(100% - 2 * var(--pad))); max-width: 850px }
.api-docs .lead { max-width: 65ch }
.api-docs pre { overflow-x: auto; padding: 16px; border-radius: 12px; background: var(--surface); line-height: 1.6 }
.api-docs pre code { padding: 0; border: 0; background: transparent; overflow-wrap: normal }
.api-table { overflow-x: auto; margin: 16px 0 32px }
.api-table table { width: 100%; border-collapse: collapse; text-align: left; min-width: 570px }
.api-table th, .api-table td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top }
.api-table th { font-weight: 600 }
.api-table td { color: var(--text-muted) }
.api-table thead { color: var(--primary) }

@media (max-width: 560px) {
  .nav a.lang { order: 1 }
  .nav a:not(.brand):not(.lang) { order: 2 }
}
@media (max-width: 700px) {
  .api-table table { display: block; min-width: 0 }
  .api-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
  .api-table tbody, .api-table tr, .api-table th, .api-table td { display: block }
  .api-table tr { padding: 12px 0; border-bottom: 1px solid var(--hairline) }
  .api-table th, .api-table td { border: 0; padding: 0 }
  .api-table td { margin-top: 4px }
  footer[data-site-footer] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px }
  .footer-identity { grid-column: 1 / -1 }
  .shotlist { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(170px, 62vw); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain }
  .shotlist li { scroll-snap-align: start }
}
@media (max-width: 400px) {
  footer[data-site-footer] { grid-template-columns: 1fr }
  .footer-identity { grid-column: auto }
}
@media (prefers-reduced-motion: reduce) { .shotlist button:hover { transform: none } }
