/* KungFuCompile - Layout.css - Version 5.2 */

:root {
  --page-bg: #fff8f2;
  --panel-bg: #ffffff;
  --ink: #2f261f;
  --muted: #75665a;
  --accent: #c97f58;
  --accent-dark: #8c4c31;
  --border: #ead8cc;
  --shadow: 0 14px 34px rgba(55, 35, 22, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 224, 198, 0.85), transparent 34rem),
    linear-gradient(180deg, #fff8f2 0%, #fffdfb 100%);
}

.page {
  width: min(1600px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.hero {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-logo-stage {
  position: relative;
  width: 100%;
  container-type: inline-size;
}

.hero-main-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #302d2a;
  box-shadow: 0 16px 38px rgba(55, 35, 22, 0.16);
}

.hero .hero-logo-overlay {
  position: absolute;
  left: 3.8%;
  bottom: 2.5%;
  width: 41.5%;
  max-width: 600px;
  margin: 0;
  padding: 14px 18px;
  color: #7cff43;
  background: transparent;
  border-radius: 0;
  font-size: clamp(12px, 1.45vw, 21px);
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: wrap;
  -webkit-text-stroke: 0.45px rgba(0, 0, 0, 0.92);
  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.95), 1px -1px 2px rgba(0, 0, 0, 0.95), -1px 1px 2px rgba(0, 0, 0, 0.95), 1px 1px 2px rgba(0, 0, 0, 0.95), 0 0 5px rgba(0, 0, 0, 0.88);
  z-index: 2;
  isolation: isolate;
}

.hero-logo-worm-canvas {
  position: absolute;
  top: calc(-15% - 12px);
  left: calc(-18.3% - 12px);
  z-index: 3;
  display: block;
  width: calc(140.6% + 24px);
  height: calc(130% + 24px);
  pointer-events: none;
}

.hero .hero-logo-overlay::before {
  display: none;
  content: none;
}

@supports (font-size: 1cqw) {
  .hero .hero-logo-overlay {
    font-size: clamp(8px, 1.45cqw, 21px);
  }
}

.hero p {
  max-width: 1324px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.6;
}

.home-counter-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0;
}

.home-counter-stack .hit-counter {
  margin: 0 auto;
}

.site-image-counter {
  box-shadow: 0 7px 18px rgba(55, 35, 22, 0.08);
}

.hit-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px auto 0;
  padding: 11px 18px;
  border: 1px solid rgba(201, 127, 88, 0.45);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 248, 242, 0.94);
  box-shadow: 0 10px 24px rgba(55, 35, 22, 0.1);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.2;
}

.hit-counter-label {
  color: var(--muted);
  font-weight: 700;
}

.hit-counter-value {
  min-width: 6ch;
  padding: 4px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent-dark);
  text-align: center;
}

.site-menu-shell {
  position: relative;
  z-index: 1200;
}

body.site-menu-open {
  overflow: hidden;
}

.site-menu-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 1252;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 94px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(140, 76, 49, 0.35);
  border-radius: 13px;
  color: var(--accent-dark);
  background: rgba(255, 253, 251, 0.96);
  box-shadow: 0 10px 26px rgba(55, 35, 22, 0.2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  color: #ffffff;
  background: var(--accent-dark);
  outline: none;
  transform: translateY(-1px);
}

body.site-menu-open .site-menu-toggle {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
}

.site-menu-toggle-icon {
  display: grid;
  gap: 4px;
  width: 19px;
}

.site-menu-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1240;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(30, 23, 18, 0.5);
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}

body.site-menu-open .site-menu-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.site-menu-drawer {
  position: fixed;
  top: 0;
  bottom: auto;
  left: 0;
  z-index: 1250;
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 44px));
  max-width: 100%;
  height: 400px;
  max-height: 100vh;
  visibility: hidden;
  overflow: hidden;
  border-right: 1px solid rgba(52, 52, 52, 0.46);
  color: var(--ink);
  background: linear-gradient(90deg, #5f5f5f 0%, #929292 42%, #dedede 100%);
  box-shadow: 18px 0 44px rgba(32, 32, 32, 0.34);
  transform: translateX(-104%);
  transition: transform 260ms ease, visibility 0s linear 260ms;
}

body.site-menu-open .site-menu-drawer {
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.site-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(18px + env(safe-area-inset-top)) 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
}

.site-menu-heading {
  min-width: 0;
}

.site-menu-kicker {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.3px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.34);
  text-transform: uppercase;
}

.site-menu-title {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
}


.site-menu-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(140, 76, 49, 0.3);
  border-radius: 12px;
  color: var(--accent-dark);
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.site-menu-close:hover,
.site-menu-close:focus-visible {
  color: #ffffff;
  background: var(--accent-dark);
  outline: none;
}

.site-menu-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
}

.site-menu-section {
  margin-top: 18px;
}

.site-menu-section-title {
  margin: 0 8px 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-menu-links {
  display: grid;
  gap: 5px;
}

.site-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #2f2f2f;
  background: rgba(255, 255, 255, 0.52);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.site-menu-link:hover,
.site-menu-link:focus-visible {
  border-color: rgba(201, 127, 88, 0.35);
  color: var(--accent-dark);
  background: rgba(255, 248, 242, 0.94);
  outline: none;
}

.site-menu-link.is-current {
  border-color: rgba(140, 76, 49, 0.42);
  color: #ffffff;
  background: var(--accent-dark);
  box-shadow: 0 7px 16px rgba(55, 35, 22, 0.14);
  cursor: default;
}

.site-menu-guest-book {
  padding: 12px 7px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.30);
}

.guest-book-worm-display {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  isolation: isolate;
  white-space: nowrap;
}

.guest-book-worm-display.is-reduced-motion {
  transition: none;
}

.guest-book-worm-canvas {
  position: relative;
  z-index: 1;
  display: block;
  flex: 1 1 72px;
  width: 72px;
  min-width: 44px;
  max-width: 84px;
  height: 28px;
  pointer-events: none;
}

.guest-book-worm-canvas-left {
  margin-right: -14px;
}

.guest-book-worm-canvas-right {
  margin-left: -14px;
}

@media (prefers-reduced-motion: reduce) {
  .site-menu-toggle,
  .site-menu-backdrop,
  .site-menu-drawer,
  .guest-book-worm-display {
    transition: none;
  }
}

.guest-book-button {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  min-height: 42px;
  padding: 7px 24px;
  overflow: hidden;
  border: 1px solid rgba(88, 47, 120, 0.72);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #422052 0%, #8c3f75 48%, #c97f58 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(73, 31, 78, 0.28);
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(25, 8, 28, 0.78);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.site-menu-guest-book .guest-book-button {
  min-width: 126px;
  min-height: 40px;
  padding: 7px 18px;
  font-size: 14px;
}

.guest-book-button::before,
.guest-book-button::after {
  position: absolute;
  top: 50%;
  color: rgba(255, 243, 196, 0.96);
  font-size: 13px;
  line-height: 1;
  transform: translateY(-50%);
  content: "*";
}

.guest-book-button::before {
  left: 10px;
}

.guest-book-button::after {
  right: 10px;
}

.guest-book-button:hover,
.guest-book-button:focus-visible {
  filter: brightness(1.12) saturate(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 12px 26px rgba(73, 31, 78, 0.38), 0 0 18px rgba(201, 127, 88, 0.36);
  outline: none;
  transform: translateY(-2px) scale(1.025);
}

.guest-book-button.is-current {
  cursor: default;
  filter: saturate(0.75);
  box-shadow: inset 0 2px 5px rgba(20, 8, 24, 0.35), 0 5px 12px rgba(73, 31, 78, 0.22);
  transform: none;
}

.guest-book-page {
  max-width: 920px;
  margin: 28px auto 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.guest-book-page h1 {
  margin: 0;
  color: var(--accent-dark);
  font-size: clamp(31px, 5vw, 54px);
  line-height: 1.1;
  text-align: center;
}

.guest-book-intro {
  max-width: 720px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.55;
  text-align: center;
}

.guest-book-private-note {
  max-width: 720px;
  margin: 14px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(88, 47, 120, 0.25);
  border-radius: 16px;
  color: #4f2b5d;
  background: rgba(245, 237, 249, 0.88);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.guest-book-form {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 24px auto 0;
}

.guest-book-field {
  display: grid;
  gap: 7px;
}

.guest-book-field-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.guest-book-field label {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.guest-book-counter {
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  font-weight: 700;
}

.guest-book-field input,
.guest-book-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(201, 127, 88, 0.48);
  border-radius: 14px;
  color: var(--ink);
  background: #fffdfb;
  box-shadow: inset 0 2px 6px rgba(55, 35, 22, 0.06);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.4;
}

.guest-book-field textarea {
  min-height: 132px;
  resize: vertical;
}

.guest-book-field input:focus,
.guest-book-field textarea:focus {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(201, 127, 88, 0.18);
  outline: none;
}

.guest-book-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.guest-book-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.guest-book-submit-button,
.guest-book-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid rgba(201, 127, 88, 0.55);
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent-dark);
  box-shadow: 0 9px 20px rgba(55, 35, 22, 0.16);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.guest-book-home-button {
  color: var(--accent-dark);
  background: #fff8f2;
}

.guest-book-submit-button:hover,
.guest-book-submit-button:focus-visible,
.guest-book-home-button:hover,
.guest-book-home-button:focus-visible {
  color: #ffffff;
  background: var(--accent);
  outline: none;
  transform: translateY(-1px);
}

.guest-book-submit-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.guest-book-status {
  display: none;
  max-width: 720px;
  margin: 18px auto 0;
  padding: 13px 16px;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.guest-book-status.is-success {
  display: block;
  border: 1px solid rgba(56, 127, 70, 0.38);
  color: #285d32;
  background: rgba(231, 248, 233, 0.96);
}

.guest-book-status.is-error {
  display: block;
  border: 1px solid rgba(151, 53, 45, 0.38);
  color: #7a2d28;
  background: rgba(255, 236, 234, 0.96);
}


.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
  align-items: start;
}

@media (max-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}

.painting-tile {
  display: block;
  min-width: 0;
}

.painting-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: inherit;
  background: #f7eee8;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.painting-frame:hover,
.painting-frame:focus {
  border-color: rgba(201, 127, 88, 0.75);
  box-shadow: 0 18px 40px rgba(55, 35, 22, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.painting-frame:focus {
  outline: 3px solid rgba(201, 127, 88, 0.42);
  outline-offset: 4px;
}

.painting-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.painting-frame.is-image-missing::after {
  position: absolute;
  inset: auto 10px 10px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(140, 76, 49, 0.92);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  content: "Image file missing";
}

.poster-printing {
  max-width: 1324px;
  margin: 34px auto 0;
  padding: 26px 28px;
  border: 1px solid rgba(201, 127, 88, 0.38);
  border-radius: 26px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  text-align: center;
}

.poster-printing h2 {
  margin: 0;
  color: var(--accent-dark);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.2;
}

.poster-printing p {
  max-width: 1100px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.6;
}

#galleryPages,
#paintingGallery {
  scroll-margin-top: 24px;
}

.page-selector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 1324px;
  margin: 28px auto 0;
  padding: 16px 18px;
  border: 1px solid rgba(201, 127, 88, 0.38);
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.page-selector-bottom {
  margin-top: 34px;
}

.page-selector-label {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.2;
}

.page-selector-items {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-selector-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(201, 127, 88, 0.45);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff8f2;
  box-shadow: 0 8px 18px rgba(55, 35, 22, 0.09);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.page-selector-link:hover,
.page-selector-link:focus {
  color: #ffffff;
  background: var(--accent);
  outline: none;
}

.page-selector-link.is-current {
  color: #ffffff;
  background: var(--accent-dark);
  cursor: default;
}

/* StoryBook ribbon displayed at the bottom of generated gallery pages.
   The wording is rendered directly into StoryBookRibbonFrame.png. */
.storybook-ribbon {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 104px;
  align-items: center;
  width: 600px;
  height: 200px;
  max-width: calc(100% - 28px);
  margin: 42px auto 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: inherit;
  background-image: url("StoryBookRibbonFrame.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  isolation: isolate;
  text-decoration: none;
  cursor: pointer;
  perspective: 1050px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
  transition: filter 160ms ease, transform 160ms ease;
}

.storybook-ribbon:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.storybook-ribbon:focus-visible {
  outline: 4px solid rgba(201, 127, 88, 0.52);
  outline-offset: 5px;
}

.storybook-ribbon::before,
.storybook-ribbon::after {
  display: none;
  content: none;
}

/* Empty grid spacer only. All visible wording is part of the PNG graphic. */
.storybook-ribbon-center {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.storybook-ribbon-flight {
  position: relative;
  z-index: 2;
  display: block;
  justify-self: center;
  width: 104px;
  height: 200px;
  overflow: visible;
  pointer-events: none;
  transform-style: preserve-3d;
}

.storybook-ribbon-flight-left {
  grid-column: 1;
}

.storybook-ribbon-flight-right {
  grid-column: 3;
}

.storybook-ribbon-tail {
  position: absolute;
  top: -26px;
  left: -170px;
  z-index: 0;
  display: block;
  width: 440px;
  height: 252px;
  overflow: visible;
  pointer-events: none;
}

/* The cinematic ribbon stars are canvas-rendered only.
   They reverse outward, bounce three times like tennis balls, and exit as one star with one attached tail. */
@media (max-width: 680px) {
  .storybook-ribbon {
    grid-template-columns: 74px minmax(0, 1fr) 74px;
    width: min(600px, calc(100% - 30px));
    height: auto;
    aspect-ratio: 3 / 1;
    margin-top: 30px;
    background-size: contain;
  }

  .storybook-ribbon-flight {
    width: 74px;
    height: 100%;
  }

  .storybook-ribbon-tail {
    top: 50%;
    transform: translateY(-50%);
  }
}


/* Compact image-page navigation and continuous slideshow launcher. */
.image-detail-nav {
  width: min(100%, 720px);
  max-width: 720px;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 20px;
}

.image-detail-nav .page-selector-label {
  font-size: 13px;
}

.image-detail-nav .page-selector-items {
  gap: 6px;
}

.image-detail-nav .page-selector-link {
  width: 36px;
  min-width: 36px;
  height: 34px;
  padding: 0;
  border-radius: 11px;
  font-size: 0;
  cursor: pointer;
}

.image-detail-nav .page-selector-link[data-nav-icon]::before {
  display: block;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  content: "";
  -webkit-mask-image: var(--image-nav-icon);
  mask-image: var(--image-nav-icon);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.image-detail-nav .page-selector-link[data-nav-icon="back"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.2%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27M9%207%204%2012l5%205%27/%3E%3Cpath%20d=%27M4%2012h9a6%206%200%200%201%206%206%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="home"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.2%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27m3%2011%209-8%209%208%27/%3E%3Cpath%20d=%27M5%2010v10h14V10%27/%3E%3Cpath%20d=%27M9%2020v-6h6v6%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="category"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27black%27%3E%3Crect%20x=%273%27%20y=%273%27%20width=%277%27%20height=%277%27%20rx=%271.2%27/%3E%3Crect%20x=%2714%27%20y=%273%27%20width=%277%27%20height=%277%27%20rx=%271.2%27/%3E%3Crect%20x=%273%27%20y=%2714%27%20width=%277%27%20height=%277%27%20rx=%271.2%27/%3E%3Crect%20x=%2714%27%20y=%2714%27%20width=%277%27%20height=%277%27%20rx=%271.2%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="gallery"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.1%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Crect%20x=%273%27%20y=%274%27%20width=%2718%27%20height=%2716%27%20rx=%272%27/%3E%3Ccircle%20cx=%278%27%20cy=%279%27%20r=%271.5%27%20fill=%27black%27%20stroke=%27none%27/%3E%3Cpath%20d=%27m5%2018%205-5%203%203%202-2%204%204%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="previous"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27M6%205v14%27/%3E%3Cpath%20d=%27m18%206-7%206%207%206%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="next"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272.4%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27M18%205v14%27/%3E%3Cpath%20d=%27m6%206%207%206-7%206%27/%3E%3C/svg%3E");
}
.image-detail-nav .page-selector-link[data-nav-icon="actual"] {
  --image-nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2024%2024%27%20fill=%27none%27%20stroke=%27black%27%20stroke-width=%272%27%20stroke-linecap=%27round%27%20stroke-linejoin=%27round%27%3E%3Cpath%20d=%27M4%209V4h5%27/%3E%3Cpath%20d=%27M15%204h5v5%27/%3E%3Cpath%20d=%27M20%2015v5h-5%27/%3E%3Cpath%20d=%27M9%2020H4v-5%27/%3E%3Crect%20x=%279%27%20y=%279%27%20width=%276%27%20height=%276%27%20rx=%271%27/%3E%3C/svg%3E");
}

.image-detail-nav .page-selector-link:focus-visible {
  outline: 3px solid rgba(201, 127, 88, 0.42);
  outline-offset: 2px;
}


/* Continuous original-image slideshow. Seven FIFO slots remain buffered,
   but exactly one native-size artwork is displayed at a time. The display is
   sized to the selected group's maximum source width and maximum source height. */
body.image-slideshow-open {
  overflow: hidden;
}

.image-slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  color: #ffffff;
  background: #050505;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.image-slideshow-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.image-slideshow-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  background: #050505;
}

/* Controls float over the artwork so no heading/caption/footer consumes viewing height. */
.image-slideshow-header {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
  transition: opacity 720ms ease, transform 720ms ease;
}

/* Full-screen presentation mode fades the controls away after brief pointer/keyboard activity.
   Functions.js adds is-fullscreen-controls-visible while the controls should be available. */
.image-slideshow-overlay.is-fullscreen-active .image-slideshow-header {
  opacity: 0;
  transform: translateY(-8px);
}

.image-slideshow-overlay.is-fullscreen-active.is-fullscreen-controls-visible .image-slideshow-header {
  opacity: 1;
  transform: translateY(0);
}

.image-slideshow-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(10, 10, 10, 0.62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(5px);
  pointer-events: auto;
  transition: opacity 720ms ease;
}

.image-slideshow-overlay.is-fullscreen-active:not(.is-fullscreen-controls-visible) .image-slideshow-actions {
  pointer-events: none;
}

.image-slideshow-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(36, 36, 36, 0.9);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.image-slideshow-control:hover,
.image-slideshow-control:focus-visible,
.image-slideshow-control[aria-pressed="true"] {
  color: #111111;
  background: #ffffff;
  outline: none;
}

.image-slideshow-control:disabled {
  cursor: default;
  opacity: 0.45;
}

.image-slideshow-control:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.58);
  outline-offset: 3px;
}

.image-slideshow-viewport {
  position: relative;
  flex: 0 0 auto;
  width: 1px;
  height: 1px;
  min-width: 1px;
  min-height: 1px;
  overflow: hidden;
  background: #050505;
}

.image-slideshow-track {
  display: flex;
  gap: 10px;
  width: auto;
  height: 100%;
  min-height: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.image-slideshow-slot {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: stretch;
  height: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #050505;
}

.image-slideshow-image-stage {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: inherit;
  background: #050505;
  text-decoration: none;
  cursor: pointer;
}

.image-slideshow-image-stage:focus-visible {
  outline: 4px solid rgba(255, 255, 255, 0.72);
  outline-offset: -6px;
}

/* Slideshow artwork is rendered at intrinsic 1:1 size inside one display whose
   dimensions equal the group's maximum image width and maximum image height.
   Smaller originals are centered without enlargement. Browser zoom is the only
   presentation scaling control. */
.image-slideshow-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  object-fit: none;
  background: #ffffff;
}

@media (max-width: 759px) {
  .image-slideshow-header {
    top: max(7px, env(safe-area-inset-top));
    right: max(7px, env(safe-area-inset-right));
    left: max(7px, env(safe-area-inset-left));
  }

  .image-slideshow-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 5px;
    padding: 4px;
    background: rgba(10, 10, 10, 0.52);
  }

  .image-slideshow-control {
    min-width: 0;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 13px;
  }
}

.image-detail-nav button.page-selector-link {
  font-family: inherit;
}

.image-detail-layout {
  width: min(1800px, calc(100% - 32px));
}

.image-detail-page {
  max-width: 1720px;
  margin: 28px auto 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.image-detail-page h1 {
  margin: 0;
  color: var(--accent-dark);
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.15;
}

.image-detail-song-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.35;
}

.image-detail-song-group {
  color: #4f2b12;
  font-weight: 800;
}

.image-detail-song-year {
  font-weight: 700;
}

.image-detail-figure {
  margin: 24px 0 0;
}

.image-detail-image-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  padding: 12px;
  border: 1px solid rgba(90, 55, 25, 0.18);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 242, 0.8);
  text-align: center;
}

.image-detail-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 48px);
  max-height: calc(100svh - 48px);
  margin: 0 auto;
  object-fit: contain;
  background: #ffffff;
}

.image-detail-caption {
  max-width: 1324px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.55;
}

.image-detail-open-original {
  margin: 24px 0 0;
}

.site-contact-footer {
  color: var(--muted);
}


/* Desktop image page: details left, artwork center, description right. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .image-detail-layout {
    width: min(1880px, calc(100% - 28px));
    padding-top: 20px;
  }

  .image-detail-page {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    column-gap: 22px;
    row-gap: 15px;
    max-width: 1840px;
    margin-top: 12px;
    padding: 22px;
    align-items: start;
    text-align: left;
  }

  .image-detail-page > h1 {
    grid-column: 1;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: clamp(25px, 2.15vw, 39px);
    line-height: 1.12;
  }

  .image-detail-page > .image-detail-song-meta {
    grid-column: 1;
    align-items: flex-start;
    margin: 0;
    font-size: clamp(15px, 1.25vw, 18px);
    line-height: 1.4;
    text-align: left;
  }

  .image-detail-page > .image-detail-nav {
    grid-column: 1;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
  }

  /* Desktop uses one image-page navigation group only. */
  .image-detail-page > .image-detail-figure + .image-detail-nav,
  .image-detail-page > .image-detail-nav-bottom {
    display: none;
  }

  .image-detail-page > .image-detail-nav .page-selector-label {
    width: 100%;
    line-height: 1.3;
    text-align: left;
  }

  .image-detail-page > .image-detail-nav .page-selector-items {
    display: grid;
    grid-template-columns: repeat(4, 36px);
    gap: 7px;
    width: 100%;
    justify-content: start;
  }

  .image-detail-page > .image-detail-figure {
    grid-column: 2;
    grid-row: 1 / span 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 22px;
    min-width: 0;
    margin: 0;
    align-items: start;
  }

  .image-detail-page .image-detail-image-stage {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    align-self: start;
  }

  .image-detail-page .image-detail-image {
    max-height: calc(100vh - 92px);
    max-height: calc(100svh - 92px);
  }

  .image-detail-page .image-detail-caption {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 19px 20px;
    border: 1px solid rgba(201, 127, 88, 0.32);
    border-radius: 18px;
    color: var(--muted);
    background: rgba(255, 253, 251, 0.9);
    box-shadow: 0 10px 24px rgba(55, 35, 22, 0.09);
    font-size: clamp(16px, 1.25vw, 20px);
    line-height: 1.62;
    text-align: left;
  }

  .image-detail-page > .image-detail-open-original {
    grid-column: 1;
    margin: 0;
    text-align: left;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 1366px) {
  .image-detail-image-stage.image-detail-swipe-enabled {
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
  }

  .image-detail-image-stage.image-detail-swipe-enabled .image-detail-image {
    transition: transform 170ms ease, opacity 170ms ease;
    will-change: transform, opacity;
  }

  .image-detail-image-stage.image-detail-swipe-enabled.is-swipe-left .image-detail-image {
    opacity: 0.45;
    transform: translateX(-36%);
  }

  .image-detail-image-stage.image-detail-swipe-enabled.is-swipe-right .image-detail-image {
    opacity: 0.45;
    transform: translateX(36%);
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 22px, 1600px);
    padding-top: 18px;
  }

  .hero,
  .image-detail-page {
    padding: 14px;
  }

  .hero-main-image {
    border-radius: 18px;
  }

  .gallery {
    gap: 14px;
  }

  .page-selector {
    border-radius: 22px;
  }

  .site-menu-toggle {
    min-width: 44px;
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .site-menu-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .site-menu-drawer {
    width: min(324px, calc(100vw - 26px));
  }

  .site-menu-header {
    padding-right: 14px;
    padding-left: 14px;
  }

  .site-menu-content {
    padding-right: 10px;
    padding-left: 10px;
  }

  .guest-book-worm-canvas {
    flex-basis: 56px;
    min-width: 36px;
    max-width: 66px;
    height: 22px;
  }

  .guest-book-worm-canvas-left {
    margin-right: -11px;
  }

  .guest-book-worm-canvas-right {
    margin-left: -11px;
  }

  .guest-book-button {
    min-width: 132px;
    min-height: 40px;
    padding: 7px 21px;
    font-size: 14px;
  }

  .guest-book-page {
    margin-top: 18px;
    padding: 18px 14px;
  }

  .guest-book-field-header {
    align-items: flex-start;
  }

  .image-detail-nav {
    width: 100%;
    padding: 8px 9px;
  }

  .image-detail-nav .page-selector-link {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .image-detail-image-stage {
    padding: 8px;
  }

  .image-detail-image {
    max-height: calc(100vh - 32px);
    max-height: calc(100svh - 32px);
  }
}

/* Musical Impressions A-Z navigation. Format Pages keeps exactly one A-Z bar above the gallery content. */
.gallery-alpha-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(1448px, 100%);
  margin: 10px auto 18px;
  padding: 10px 14px 12px;
  border: 1px solid rgba(201, 127, 88, 0.34);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 242, 0.82));
  box-shadow: 0 9px 22px rgba(55, 35, 22, 0.08);
}

.gallery-alpha-home-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(140, 76, 49, 0.52);
  border-radius: 48% 52% 45% 55% / 55% 46% 54% 45%;
  color: #5d311f;
  background: linear-gradient(145deg, #fffefc 0%, #fff1e7 52%, #f3d4c2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 5px 10px rgba(55, 35, 22, 0.11);
  text-decoration: none;
  transform: rotate(-0.7deg);
  transition: transform 140ms ease, box-shadow 140ms ease, color 140ms ease, background 140ms ease;
}

.gallery-alpha-home-icon {
  display: block;
  width: 23px;
  height: 23px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2011%209-8%209%208'/%3E%3Cpath%20d='M5%2010v10h14V10'/%3E%3Cpath%20d='M9%2020v-6h6v6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2011%209-8%209%208'/%3E%3Cpath%20d='M5%2010v10h14V10'/%3E%3Cpath%20d='M9%2020v-6h6v6'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.gallery-alpha-home-button:hover,
.gallery-alpha-home-button:focus-visible {
  color: #ffffff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 8px 16px rgba(55, 35, 22, 0.18);
  outline: 3px solid rgba(201, 127, 88, 0.28);
  outline-offset: 2px;
  transform: translateY(-2px) rotate(0deg) scale(1.06);
}

.gallery-alpha-items {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gallery-alpha-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(140, 76, 49, 0.44);
  border-radius: 56% 44% 52% 48% / 46% 55% 45% 54%;
  color: #5d311f;
  background: linear-gradient(145deg, #fffefc 0%, #fff1e7 52%, #f3d4c2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 5px 10px rgba(55, 35, 22, 0.11);
  font-family: "Segoe Print", "Segoe Script", "Bradley Hand ITC", cursive;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: rotate(-0.7deg);
  transition: transform 140ms ease, box-shadow 140ms ease, color 140ms ease, background 140ms ease;
}

.gallery-alpha-button:nth-child(even) {
  border-radius: 45% 55% 48% 52% / 55% 45% 56% 44%;
  transform: rotate(0.7deg);
}

.gallery-alpha-button:hover,
.gallery-alpha-button:focus-visible {
  color: #ffffff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 8px 16px rgba(55, 35, 22, 0.18);
  outline: 3px solid rgba(201, 127, 88, 0.28);
  outline-offset: 2px;
  transform: translateY(-2px) rotate(0deg) scale(1.06);
  text-shadow: none;
}

.gallery-alpha-button.is-current {
  border-color: rgba(79, 43, 18, 0.72);
  color: #ffffff;
  background: linear-gradient(145deg, #b66b48 0%, #6f3a24 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 7px 14px rgba(55, 35, 22, 0.18);
  text-shadow: none;
  transform: rotate(0deg);
}


@media (max-width: 760px) {
  .gallery-alpha-bar {
    gap: 7px;
    margin-bottom: 14px;
    padding: 9px 8px 11px;
    border-radius: 18px;
  }

  .gallery-alpha-home-button {
    width: 36px;
    min-width: 36px;
    height: 33px;
  }

  .gallery-alpha-home-icon {
    width: 20px;
    height: 20px;
  }

  .gallery-alpha-items {
    gap: 5px;
  }

  .gallery-alpha-button {
    width: 34px;
    min-width: 34px;
    height: 33px;
    font-size: 0.92rem;
  }

}

/* Invisible landing target placed immediately before the A-Z/gallery content navigation.
   Internal gallery links use #galleryContent so the large hero is bypassed after
   its first normal view in the current browser-tab visit. */
.gallery-content-anchor {
  display: block;
  width: 0;
  height: 0;
  overflow: hidden;
  scroll-margin-top: 14px;
  pointer-events: none;
}

/* Gallery navigation hierarchy: index.htm Home > Impressions > SingleImageView > SlideShow. */
.hero-logo-home-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero-logo-home-link:focus-visible {
  outline: 4px solid rgba(201, 127, 88, 0.52);
  outline-offset: 5px;
  border-radius: 24px;
}

.gallery-home-title {
  margin: 9px 4px 0;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.3;
}

.gallery-home-title a {
  color: #4f2b12;
  font-weight: 800;
  text-decoration: none;
}

.gallery-home-title a:hover,
.gallery-home-title a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  outline: none;
}

.image-slideshow-standalone {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.site-menu-primary-pages {
  margin-top: 0;
}

/* SlideShow.htm graphical control surface, position map, and centered Guest Book ribbon. */
.image-slideshow-interface {
  opacity: 0;
  transition: opacity 720ms ease;
}

.image-slideshow-overlay.is-controls-visible .image-slideshow-interface {
  opacity: 1;
}

.image-slideshow-header.image-slideshow-interface {
  pointer-events: none;
}

/* The common visibility class owns the toolbar opacity in every window mode.
   This deliberately overrides the older fullscreen-only header rule above. */
.image-slideshow-overlay .image-slideshow-header.image-slideshow-interface {
  opacity: 0;
  transform: translateY(0);
}

.image-slideshow-overlay.is-controls-visible .image-slideshow-header.image-slideshow-interface,
.image-slideshow-overlay.is-fullscreen-active.is-controls-visible .image-slideshow-header.image-slideshow-interface {
  opacity: 1;
  transform: translateY(0);
}

.image-slideshow-actions {
  width: auto;
  max-width: calc(100vw - 20px);
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: auto;
}

.image-slideshow-overlay:not(.is-controls-visible) .image-slideshow-actions {
  pointer-events: none;
}

.image-slideshow-control {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 0;
}

.image-slideshow-control::before {
  display: block;
  width: 23px;
  height: 23px;
  background-color: currentColor;
  content: "";
  -webkit-mask-image: var(--slideshow-control-icon);
  mask-image: var(--slideshow-control-icon);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.image-slideshow-control[data-control-icon="home"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2011%209-8%209%208'/%3E%3Cpath%20d='M5%2010v10h14V10'/%3E%3Cpath%20d='M9%2020v-6h6v6'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="back"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%207%204%2012l5%205'/%3E%3Cpath%20d='M4%2012h9a6%206%200%200%201%206%206'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="previous"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%205v14'/%3E%3Cpath%20d='m18%206-7%206%207%206'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="next"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.4'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M18%205v14'/%3E%3Cpath%20d='m6%206%207%206-7%206'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="pause"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='black'%3E%3Crect%20x='6'%20y='4'%20width='4'%20height='16'%20rx='1'/%3E%3Crect%20x='14'%20y='4'%20width='4'%20height='16'%20rx='1'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="play"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='black'%3E%3Cpath%20d='M7%204.8v14.4c0%20.9%201%201.45%201.75.96l10.9-7.2a1.15%201.15%200%200%200%200-1.92l-10.9-7.2A1.15%201.15%200%200%200%207%204.8Z'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="fullscreen"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%209V4h5'/%3E%3Cpath%20d='M15%204h5v5'/%3E%3Cpath%20d='M20%2015v5h-5'/%3E%3Cpath%20d='M9%2020H4v-5'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="fullscreen-exit"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%204v5H4'/%3E%3Cpath%20d='M15%204v5h5'/%3E%3Cpath%20d='M15%2020v-5h5'/%3E%3Cpath%20d='M9%2020v-5H4'/%3E%3C/svg%3E");
}

.image-slideshow-control[data-control-icon="close"] {
  --slideshow-control-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2.6'%20stroke-linecap='round'%3E%3Cpath%20d='M5%205l14%2014'/%3E%3Cpath%20d='M19%205%205%2019'/%3E%3C/svg%3E");
}

.image-slideshow-position {
  --indicator-block-size: clamp(12px, 1.65vw, 24px);
  --indicator-gap: 2px;
  position: absolute;
  top: max(50px, env(safe-area-inset-top));
  left: max(50px, env(safe-area-inset-left));
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(var(--indicator-columns, 1), var(--indicator-block-size));
  gap: var(--indicator-gap);
  max-width: calc(100vw - 60px);
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  background: rgba(8, 8, 8, 0.58);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.image-slideshow-position-block {
  display: block;
  width: var(--indicator-block-size);
  height: var(--indicator-block-size);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.20);
  box-shadow: none;
}

.image-slideshow-position-block.is-current {
  border-color: #ffffff;
  background: #ffd45d;
  box-shadow: 0 0 0 1px rgba(255, 212, 93, 0.45), 0 0 8px rgba(255, 212, 93, 0.88);
}

.image-slideshow-ribbon-interface {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(600px, calc(100vw - 32px));
  height: 200px;
  max-height: calc(100vh - 24px);
  max-height: calc(100svh - 24px);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.image-slideshow-ribbon-interface .storybook-ribbon {
  width: 100%;
  height: 200px;
  max-width: 100%;
  margin: 0;
  pointer-events: none;
}

.image-slideshow-overlay.is-controls-visible .image-slideshow-ribbon-interface .storybook-ribbon {
  pointer-events: auto;
}

.image-slideshow-overlay:not(.is-controls-visible) .image-slideshow-ribbon-interface .storybook-ribbon {
  pointer-events: none;
}

@media (max-width: 759px) {
  .image-slideshow-header {
    right: max(7px, env(safe-area-inset-right));
    left: auto;
    max-width: calc(100% - 14px);
  }

  .image-slideshow-actions {
    width: auto;
    max-width: calc(100vw - 14px);
    justify-content: flex-end;
    gap: 4px;
    padding: 4px;
  }

  .image-slideshow-control {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .image-slideshow-control::before {
    width: 21px;
    height: 21px;
  }

  .image-slideshow-position {
    --indicator-block-size: 12px;
    --indicator-gap: 2px;
    top: max(50px, env(safe-area-inset-top));
    left: max(50px, env(safe-area-inset-left));
    max-width: calc(100vw - 60px);
    padding: 6px;
  }

  .image-slideshow-ribbon-interface {
    width: min(600px, calc(100vw - 24px));
    height: auto;
    aspect-ratio: 3 / 1;
  }

  .image-slideshow-ribbon-interface .storybook-ribbon {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    margin: 0;
  }
}

