/* 3D photo tours (one dark, full-screen look: the photos are the light). Colours
   are the site's brand/ink/sun tokens from web/tailwind.config.js. */
:root {
  color-scheme: dark;
  --ink: #072430;
  --ink-2: #0f3b49;
  --line: rgba(211, 238, 243, 0.18);
  --fg: #eef8fa;
  --muted: #a9dde7;
  --accent: #efa07e;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Literata", Georgia, Cambria, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  background: var(--ink);
  color: var(--fg);
  font: 15px/1.45 var(--font);
  overflow: hidden;
}
header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  border-bottom: 1px solid var(--line);
}
#back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 8px 12px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
}
#back:hover, #back:focus-visible { background: var(--ink-2); }
h1 {
  margin: 0;
  min-width: 0;
  font: 600 18px/1.25 var(--display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
main { position: relative; min-height: 0; }
#view { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#view:active { cursor: grabbing; }
.nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 36, 48, 0.72);
  color: var(--fg);
  cursor: pointer;
}
.nav:hover, .nav:focus-visible { background: var(--ink-2); }
#prev { left: 16px; }
#next { right: 16px; }
#hint, #loading {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  margin: 0;
  padding: 8px 14px;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  background: rgba(7, 36, 48, 0.78);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}
#hint { bottom: 16px; transition: opacity 0.6s; }
#hint.gone { opacity: 0; }
#loading { top: 16px; color: var(--muted); }
footer {
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
#strip {
  display: flex;
  gap: 10px;
  padding: 0 16px 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}
#strip button {
  display: grid;
  gap: 4px;
  flex: none;
  width: 120px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 12px/1.3 var(--font);
  text-align: left;
  cursor: pointer;
}
#strip img {
  display: block;
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  outline: 2px solid transparent;
  outline-offset: 1px;
}
#strip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#strip button[aria-current="true"] { color: var(--fg); }
#strip button[aria-current="true"] img { outline-color: var(--accent); }
#note { margin: 4px 16px 0; color: var(--muted); font-size: 12px; }
#fallback { height: 100%; overflow-y: auto; padding: 16px; }
#fallback figure { margin: 0 auto 20px; max-width: 900px; }
#fallback img { width: 100%; border-radius: 8px; }
#fallback figcaption { margin-top: 6px; color: var(--muted); }
@media (max-width: 600px) {
  .nav { width: 40px; height: 40px; }
  #prev { left: 8px; }
  #next { right: 8px; }
  #strip button, #strip img { width: 96px; }
  #strip img { height: 64px; }
  h1 { font-size: 16px; }
  #back span { display: none; }
  #back { padding: 8px; }
}
