:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --ink: #292725;
  --muted: #665f59;
  --accent: #743c3e;
  --line: #d9d0c3;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible, .panel:focus-visible {
  outline: 3px solid #c85d48;
  outline-offset: 3px;
}
.site-shell { max-width: 900px; margin: 0 auto; padding: 0 15px; }
.site-header { max-width: 620px; padding: 32px 0 22px; margin: 0 auto; text-align: center; }
.eyebrow {
  color: var(--accent); text-transform: uppercase; font-size: .73rem;
  font-weight: 700; letter-spacing: .18em; margin: 0 0 12px;
}
h1 { margin: 0; font: 400 clamp(2.55rem, 8vw, 4.3rem)/1.05 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
h1 span { font-style: italic; }
.intro { max-width: 31rem; margin: 15px auto 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.artwork { width: min(100%, 480px); margin: 0 auto; background: #f6f0e6; box-shadow: 0 9px 40px #37271817; }
.panel {
  display: block; position: relative; width: 100%; aspect-ratio: 297 / 420;
  overflow: hidden; margin: 0; padding: 0; background: #f6f0e6;
  touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none;
}
.panel-image { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.panel-arrow {
  position: absolute; z-index: 2; top: 0; bottom: 0; width: clamp(42px, 16%, 72px);
  border: 0; color: #302b26; cursor: pointer;
  background: transparent; display: flex; align-items: center;
  justify-content: center; padding: 0; touch-action: manipulation;
}
.panel-arrow span {
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; width: 36px; height: 48px;
  background: #f4f0e8cd; border: 1px solid #48382a40;
  font: 300 2.35rem/1 Georgia, serif;
  box-shadow: 0 1px 10px #00000014;
}
.panel-prev { left: 0; }
.panel-next { right: 0; }
.panel-arrow:hover span { background: #fffaf1; }
.panel-arrow:disabled { opacity: .35; cursor: default; }
.panel-counter {
  position: absolute; top: 8px; right: 8px;
  padding: 5px 10px; font-size: .72rem; letter-spacing: .03em;
  color: #342e29; background: #f4f0e8db; border-radius: 50px;
  font-variant-numeric: tabular-nums;
}
.image-error { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); }
[hidden] { display: none !important; }
.controls { padding: 24px 0 29px; text-align: center; }
.random-button {
  background: var(--accent); color: white; padding: 13px 20px;
  border: 1px solid var(--accent); border-radius: 999px;
  font-weight: 600; cursor: pointer; min-height: 44px;
}
.random-button:hover:not(:disabled) { background: #5b2d2f; }
.random-button:disabled { opacity: .5; cursor: default; }
.hint { font-size: .78rem; color: var(--muted); margin: 10px auto 0; line-height: 1.45; }
.app-alert { color: #9c2331; max-width: 35rem; margin: 15px auto; }
.site-footer {
  border-top: 1px solid var(--line); padding: 28px 0 35px;
  text-align: center; max-width: 620px; margin: 0 auto;
}
.site-footer .eyebrow { margin-bottom: 9px; }
.site-footer h2 { font: 400 1.65rem Georgia, serif; margin: 0 0 9px; }
.site-footer .performance p:not(.eyebrow) { margin: 0 0 12px; line-height: 1.55; }
.booking-link { display: inline-block; color: var(--accent); margin-bottom: 12px; }
.return-link { display: inline-block; margin-top: 30px; padding: 10px 0; color: var(--accent); font-weight: 600; }
.development-note { color: var(--muted); font-size: .73rem; margin: 28px 0 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 410px) {
  .site-shell { padding: 0 8px; }
  .site-header { padding: 22px 6px 17px; }
  .intro { font-size: .87rem; }
  .panel-arrow { width: 46px; }
  .panel-arrow span { width: 31px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }


.view-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
}
.view-mode-label {
  font-size: .88rem;
  color: var(--muted);
  font-weight: 600;
}
.view-button {
  border: 1px solid var(--line);
  background: #fffaf3;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  min-height: 40px;
  cursor: pointer;
}
.view-button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
/* In Fit mode the complete three-part figure has the height of one
   Full-size panel. The image is still shown at its correct 297:420 ratio. */
.artwork.view-fit { width: min(33.333%, 160px); }
.artwork.view-fit .panel { overflow: visible; }

/* Touch-sized arrow targets sit outside the left and right image edges.
   Overflow remains visible so they can be tapped normally on iOS Safari. */
.artwork.view-fit .panel-arrow {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 44px;
  height: 54px;
  min-height: 44px;
  touch-action: manipulation;
}
.artwork.view-fit .panel-prev { left: -52px; }
.artwork.view-fit .panel-next { right: -52px; }
.artwork.view-fit .panel-arrow span {
  width: 34px;
  height: 44px;
  font-size: 1.7rem;
}
.artwork.view-fit .panel-counter {
  top: 5px;
  right: 5px;
  padding: 3px 6px;
  font-size: .58rem;
}
@media (max-width: 410px) {
  .artwork.view-fit { width: min(33.333%, 145px); }
  .view-button { padding: 8px 12px; font-size: .92rem; }
}
