:root {
  --bg: #000000;
  --fg: #f6f6f7;
  --muted: #b7b7c2;
  --card: #16161a;
  --accent: #d34b1f; /* inferno ember */
  
  /* Confess button variables */
  --confess-text-color: #f4f1e6;
  --confess-opacity-idle: 0.82;
  --confess-opacity-hover: 1;
  --confess-glow-color: rgba(244, 241, 230, 0.4);
  --confess-glow-spread: 8px;
  --confess-shadow-dark: rgba(0, 0, 0, 0.8);
  --confess-shadow-hairline: rgba(0, 0, 0, 0.95);
  --confess-transition-speed: 0.3s;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  height: 100%;
  background: #000; /* unify background tone */
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: #000; /* unify background tone */
  color: var(--fg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Improve touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
}

/* Medieval/mystical fonts */
.header-title {
  font-family: 'IM Fell English SC', serif;
  font-weight: 400;
}

.header-subtitle {
  font-family: 'Cinzel', 'IM Fell DW Pica', serif;
  font-weight: 400;
  font-style: normal;
}

/* Site header - only on landing page, positioned bottom left */
.site-header {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 30px 40px;
  pointer-events: none;
  max-width: 90%;
  transition: opacity 0.5s ease;
}

.header-content {
  text-align: left;
}

.header-title {
  margin: 0 0 6px;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #f4f1e6;
  text-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.8), 
    0 0 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(211, 75, 31, 0.3),
    0 0 40px rgba(139, 69, 19, 0.2);
  line-height: 1.1;
  word-wrap: break-word;
  text-transform: uppercase;
}

.header-title .title-break-mobile {
  display: none; /* Hide break on desktop */
}

.header-subtitle {
  margin: 0;
  font-size: 16px;
  color: #f4f1e6;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.8), 
    0 0 3px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(211, 75, 31, 0.2);
  word-wrap: break-word;
  font-style: italic;
}

.header-subtitle .subtitle-break {
  display: none; /* Hide break on desktop */
}

.header-subtitle .subtitle-break br {
  display: none; /* Hide break on desktop */
}

/* Full-screen scrolling gallery */
.fullscreen-gallery {
  width: 100%;
  position: relative;
}

.fullscreen-image {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000; /* unify background tone */
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: opacity 0.3s ease;
  overflow: hidden;
  padding: 0;
}

.fullscreen-image:first-child {
  position: relative;
  z-index: 1;
}

.image-container {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.fullscreen-image:first-child .image-container {
  overflow: hidden;
}

/* Fullscreen toggle button */
.fullscreen-toggle {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 25;
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  opacity: 0.85;
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}
.fullscreen-toggle:hover { 
  background: transparent; 
  border: none; 
  opacity: 1; 
}
.fullscreen-toggle:active { 
  transform: none; 
  opacity: 0.7; 
}
.fullscreen-toggle .fs-icon { 
  display: block; 
  width: 22px;
  height: 22px;
}

/* Info toggle button */
.info-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 200;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  padding: 8px;
  cursor: help;
  opacity: 0.85;
  font-style: italic;
  font-weight: 400;
  font-family: Georgia, "Times New Roman", serif;
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}
.info-toggle:hover { 
  opacity: 1; 
}

.home-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 200;
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 8px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}

.home-toggle:hover {
  opacity: 1;
}

.home-toggle:active {
  opacity: 0.7;
}

.home-toggle .home-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Custom tooltip for info icon */
.info-toggle[data-tooltip] {
  position: absolute;
}
.info-toggle[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 28px;
  left: 0;
  max-width: 280px;
  white-space: pre-line;
  background: rgba(0,0,0,0.9);
  color: #eee;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  font-size: 13px;
  line-height: 1.35;
  font-style: italic;
  pointer-events: none;
  z-index: 300;
}
@media (max-width: 768px) {
  .info-toggle[data-tooltip]:hover::after { max-width: 220px; font-size: 12px; }
}

/* When the page goes fullscreen, keep background pure black and allow scrolling */
body.is-fullscreen, body.is-fullscreen .fullscreen-image { background: #000 !important; }

body.is-fullscreen #content {
  overflow-y: auto;
  height: 100vh;
  width: 100vw;
}

body.is-fullscreen .fullscreen-gallery {
  overflow-y: auto;
  height: 100%;
}

.image-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.image-container::-webkit-scrollbar-track {
  background: transparent;
}

.image-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.image-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.zoomable-image {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  filter: contrast(1.05) saturate(1.1) brightness(0.98);
}

/* Landing page (first image) - can be cropped to fill screen */
.fullscreen-image:first-child {
  position: relative;
}

.fullscreen-image:first-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

.fullscreen-image:first-child .zoomable-image {
  object-fit: contain;
  cursor: default;
  transform: scale(1) !important;
  pointer-events: none;
  filter: contrast(1.15) saturate(1.2) brightness(1.0) sepia(0.15) opacity(0.95);
  transition: filter 0.3s ease;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
}

.landing-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  filter: none;
  z-index: 0;
  transition: filter 0.3s ease;
}

/* Mobile video styles */
@media screen and (max-width: 768px), screen and (max-device-width: 768px) {
  .landing-video {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    object-fit: cover !important; /* Fill screen initially */
    object-position: center center !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    pointer-events: auto !important;
    touch-action: pan-x pan-y pinch-zoom !important;
    cursor: grab !important;
    transform-origin: center center !important;
  }
  
  .fullscreen-image:first-child .image-container {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow: auto !important; /* Allow scrolling to see full image when zoomed */
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 0 !important;
    position: relative !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .fullscreen-image:first-child {
    min-height: 100vh !important;
    height: 100vh !important;
    overflow: hidden !important;
    position: relative !important;
  }
  
  /* Make video element larger than viewport so full image is accessible when scrolling/zooming */
  /* Video is sized to show full image in contain mode, but initially displays in cover mode */
  .fullscreen-image:first-child .landing-video {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important; /* Fill screen initially */
    /* The actual video element will be larger to allow seeing full image */
    min-width: 100vw !important;
    min-height: 100vh !important;
  }
  
  /* When container is scrolled or zoomed, show full image */
  .fullscreen-image:first-child .image-container.scrolled .landing-video,
  .fullscreen-image:first-child .image-container:active .landing-video {
    object-fit: contain !important;
    width: 100vw !important;
    height: auto !important;
    min-height: 100vh !important;
  }
}

.fullscreen-image:first-child .image-container {
  position: relative;
}

/* All other images - preserve aspect ratio with minimal padding */
.fullscreen-image:not(:first-child) .image-container {
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.fullscreen-image:not(:first-child) .zoomable-image {
  object-fit: contain;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  width: auto;
  height: auto;
  margin: auto;
}

/* Circle indicator pages */
.circle-indicator {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Text pages */
.text-page {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 24px;
  visibility: visible;
  opacity: 1;
}

.text-content {
  max-width: 600px;
  text-align: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: auto;
}

.text-quote {
  font-size: 24px;
  line-height: 1.5em;
  color: #f5f0e6;
  font-style: italic;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: pre-line; /* honor single line breaks, collapse multiple */
  margin: 0 0 16px 0;
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  text-transform: none;
  font-variant: normal;
  /* Indent secondary lines - add padding and pull first line back */
  padding-left: 1.2em;
  display: block;
  /* Subtle engraving animation */
  animation: engrave 8s ease-in-out infinite;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  min-height: 1em; /* Ensure it takes up space even if empty */
  visibility: visible;
  opacity: 1;
}

/* Pull first line back to align with left edge */
.text-quote::first-line {
  text-indent: -1.2em;
}

/* Subtle engraving animation effect */
@keyframes engrave {
  0%, 100% {
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.8),
      0 1px 2px rgba(0, 0, 0, 0.3),
      1px 1px 1px rgba(0, 0, 0, 0.2);
    filter: brightness(1);
    opacity: 1;
  }
  50% {
    text-shadow: 
      0 2px 8px rgba(0, 0, 0, 0.85),
      0 1px 3px rgba(0, 0, 0, 0.4),
      1px 1px 2px rgba(0, 0, 0, 0.25);
    filter: brightness(0.98);
    opacity: 0.98;
  }
}

.text-attribution {
  font-size: 15px;
  line-height: 1.5em;
  color: #f5f0e6;
  letter-spacing: 0.1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  margin: 6px 0 0 0;
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-style: normal;
  text-transform: none;
  font-variant: normal;
  min-height: 1em; /* Ensure it takes up space even if empty */
  visibility: visible;
  opacity: 1;
}

@media screen and (max-width: 768px), screen and (max-device-width: 768px) {
  .text-page {
    padding: 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    height: 100vh !important;
  }
  
  .text-content {
    max-width: calc(100vw - 40px) !important; /* Account for page padding */
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    max-height: calc(100vh - 40px) !important; /* Account for page padding */
    overflow: visible !important; /* Don't cut off text */
  }
  
  .text-quote {
    font-size: clamp(24px, 6vw, 48px) !important; /* Larger font size, use vw for width-based sizing */
    line-height: 1.4 !important;
    margin-bottom: clamp(8px, 2vh, 16px) !important;
    text-align: center !important;
    white-space: pre !important; /* Preserve line breaks exactly, NO wrapping */
    word-wrap: normal !important; /* Don't break words */
    overflow-wrap: normal !important;
    hyphens: none !important; /* No automatic hyphens */
    max-width: calc(100vw - 80px) !important; /* Account for padding on both sides */
    overflow-x: auto !important; /* Allow horizontal scroll if text is too wide */
    overflow-y: visible !important;
    width: fit-content !important; /* Fit to content width */
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .text-attribution {
    font-size: clamp(12px, 2.5vh, 22px) !important; /* Scale with viewport height */
    text-align: center !important;
    white-space: nowrap !important; /* Keep attribution on one line */
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    margin-top: clamp(4px, 1vh, 10px) !important;
  }
}

.circle-content {
  text-align: center;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.circle-video {
  max-width: 150px;
  width: 100%;
  height: auto;
  margin: 0 auto 15px;
  display: block;
  opacity: 0.9;
}

.circle-video[src=""],
.circle-video:not([src]) {
  display: none;
}

.circle-name {
  margin: 0 0 15px 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  color: #E8E0C4;
  letter-spacing: -0.02em;
  text-shadow: 0 0 8px rgba(232, 224, 196, 0.15);
  line-height: 1;
  font-family: 'IM Fell English SC', serif;
}

.circle-number {
  margin: 0 0 10vh 0;
  font-size: clamp(0.9rem, 1.5vw, 1.25rem);
  color: #A79F8A;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: none;
  font-family: 'Cinzel', 'IM Fell DW Pica', serif;
}

.circle-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin: 30px auto 0;
  display: block;
  opacity: 0.9;
  filter: brightness(0.95);
  object-fit: contain;
}

.circle-image[src=""],
.circle-image:not([src]) {
  display: none;
}

@media (max-width: 768px) {
  .circle-content {
    padding: 20px;
  }
  
  .circle-name {
    margin-top: 0;
    margin-bottom: 10px;
  }
  
  .circle-number {
    margin-bottom: 8vh;
  }
  
  .circle-video {
    max-width: 33.75%;
    margin-bottom: 10px;
  }
  
  .circle-image {
    max-width: 50%;
  }
}

.scroll-hint {
  position: absolute;
  bottom: 30px;
  right: 30px;
  font-family: 'Cinzel', serif;
  font-size: clamp(12px, 1.8vw, 16px);
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 3px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
  z-index: 20;
  pointer-events: none;
  text-align: center;
  backdrop-filter: blur(0.8px);
  -webkit-backdrop-filter: blur(0.8px);
  padding: 8px 12px;
  border-radius: 4px;
}

.scroll-hint::after {
  content: '↓';
  display: block;
  font-size: 24px;
  margin-top: 8px;
  animation: bounce 2s infinite;
}

.fullscreen-image:not(:first-child) .scroll-hint {
  display: none;
}

@media (max-width: 768px) {
  .scroll-hint {
    bottom: clamp(16px, 3vw, 24px);
    right: clamp(16px, 3vw, 24px);
    font-size: clamp(11px, 1.6vw, 14px);
    padding: 6px 10px;
  }
  
  .scroll-hint::after {
    font-size: clamp(16px, 2.5vw, 20px);
    margin-top: 4px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.zoomable-image:active {
  cursor: grabbing;
}

/* Image info pill (legacy) */
.image-info {
  display: none;
}

.image-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.image-plate {
  color: var(--muted);
  font-size: 13px;
}

.image-reference {
  display: inline;
}

.meta-separator {
  color: var(--muted);
  opacity: 0.5;
}

.reference-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0.8;
}

.reference-link:hover {
  color: var(--fg);
  opacity: 1;
}

/* remove figure-specific styles (restored original layout) */

@media (max-width: 768px) {
  .fullscreen-image:not(:first-child) .image-container {
    padding: 20px;
  }
  
  .fullscreen-toggle { bottom: 12px; right: 12px; }
  .fullscreen-toggle .fs-icon { width: 20px; height: 20px; }
  .info-toggle { top: 12px; left: 12px; font-size: 16px; }
  .home-toggle { top: 12px; right: 12px; }
  .home-toggle .home-icon { width: 18px; height: 18px; }
  
  .fullscreen-image:not(:first-child) .image-container {
    padding: 8px;
  }
  
  .fullscreen-image:not(:first-child) .zoomable-image {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  
  .fullscreen-image:first-child .zoomable-image {
    max-width: 100vw;
    max-height: 100vh;
  }
  
  .zoom-controls {
    bottom: 20px;
    left: 20px;
    gap: 12px;
  }
  
  .zoom-btn {
    font-size: 20px;
  }
 
  .image-info {
    bottom: 20px;
    right: 20px;
    padding: 10px 12px;
  }
 
  .image-title {
    font-size: 14px;
  }
  
  .image-meta {
    font-size: 12px;
    margin-top: 4px;
  }
  
  .image-plate,
  .reference-link {
    font-size: 12px;
  }
}

.image-title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--fg);
  opacity: 0.9;
  line-height: 1.3;
}

.image-plate {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.zoom-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  z-index: 25;
  background: transparent;
  padding: 0;
  border: none;
  backdrop-filter: none;
}

@media (max-width: 768px) {
  .zoom-controls {
    bottom: 12px;
    left: 12px;
    gap: 6px;
  }
}

.zoom-btn {
  background: transparent;
  color: #ffffff;
  border: none;
  border-radius: 0;
  padding: 8px;
  font-size: 24px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-weight: 100;
  min-width: auto;
  width: auto;
  line-height: 1;
  opacity: 0.85;
  display: block;
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
  touch-action: manipulation;
}

.zoom-btn:hover {
  background: transparent;
  border: none;
  opacity: 1;
}

.zoom-btn:active {
  transform: none;
  opacity: 0.7;
}

.status {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Mobile styles - using very permissive media queries */
@media screen and (max-width: 768px), 
       screen and (max-device-width: 768px),
       screen and (max-width: 1024px) and (orientation: portrait),
       screen and (max-device-width: 1024px) and (orientation: portrait),
       (pointer: coarse) {
  .site-header {
    padding: 20px !important;
    max-width: 100% !important;
    width: calc(100% - 40px) !important;
    box-sizing: border-box !important;
    bottom: 40px !important; /* Shift up from default bottom: 0 */
    overflow: visible !important; /* Allow subtitle to extend if needed */
  }
  
  .header-content {
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important; /* Allow subtitle to extend if needed */
  }
  
  .header-title {
    font-size: clamp(44.8px, 11.2vw, 84px) !important; /* 1.4x larger: was clamp(32px, 8vw, 60px) */
    line-height: 1.15 !important;
    width: 100% !important;
    max-height: calc(1.15em * 2) !important; /* Exactly 2 lines */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
  }
  
  .header-title .title-break-mobile {
    display: inline !important; /* Show break on mobile */
  }
  
  .header-title .title-line-1,
  .header-title .title-line-2 {
    display: inline !important;
  }
  
  .header-subtitle {
    font-size: clamp(16px, 4vw, 36px) !important; /* Larger size - as big as possible */
    width: 100% !important;
    overflow: visible !important; /* Don't cut off text */
    white-space: normal !important; /* Allow wrapping */
    text-overflow: clip !important;
    line-height: 1.3 !important;
    word-spacing: normal !important;
    letter-spacing: 0.5px !important;
  }
  
  .header-subtitle .subtitle-break {
    display: inline !important; /* Show break on mobile */
  }
  
  .header-subtitle .subtitle-break br {
    display: block !important; /* Show break on mobile */
  }
}

/* Hide header when not on landing page */
body:not(:has(.fullscreen-image:first-child)) .site-header,
body.scrolled .site-header {
  opacity: 0;
  pointer-events: none;
}


@media (min-width: 900px) {
  .site-header {
    padding: 40px 50px;
  }
  
  .header-title {
    font-size: 52px;
  }
  
  .header-subtitle {
    font-size: 20px;
  }
}

/* Confess a Sin button and dropdown */
.confess-button-container {
  position: fixed;
  top: clamp(16px, 2.5vw, 24px);
  right: clamp(16px, 2.5vw, 24px);
  z-index: 1000;
}

.confess-button {
  background: transparent;
  border: none;
  color: var(--confess-text-color);
  padding: clamp(10px, 1.5vw, 14px) clamp(16px, 2.5vw, 24px);
  font-family: 'Cinzel', serif;
  font-size: clamp(12px, 1.8vw, 16px);
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  opacity: var(--confess-opacity-idle);
  transition: opacity var(--confess-transition-speed) ease, 
              text-shadow var(--confess-transition-speed) ease;
  text-shadow: 
    0 0 var(--confess-glow-spread) var(--confess-glow-color),
    0 0 calc(var(--confess-glow-spread) * 1.5) var(--confess-glow-color),
    0 2px 4px var(--confess-shadow-dark),
    0 0 1px var(--confess-shadow-hairline),
    0 0 2px var(--confess-shadow-hairline);
  animation: breathe 3s ease-in-out infinite;
  outline: none;
  backdrop-filter: blur(1.35px);
  -webkit-backdrop-filter: blur(1.35px);
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(244, 241, 230, 0.1);
  touch-action: manipulation;
}

@keyframes breathe {
  0%, 100% {
    opacity: var(--confess-opacity-idle);
  }
  50% {
    opacity: var(--confess-opacity-hover);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.confess-button:hover,
.confess-button:focus-visible {
  opacity: var(--confess-opacity-hover);
  text-shadow: 
    0 0 calc(var(--confess-glow-spread) * 1.2) var(--confess-glow-color),
    0 0 calc(var(--confess-glow-spread) * 2) var(--confess-glow-color),
    0 3px 6px var(--confess-shadow-dark),
    0 0 1px var(--confess-shadow-hairline),
    0 0 3px var(--confess-shadow-hairline);
  outline: none;
  border: none;
}

.confess-button:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(244, 241, 230, 0.08) 30%,
    rgba(244, 241, 230, 0.12) 50%,
    rgba(244, 241, 230, 0.08) 70%,
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.confess-button:focus-visible {
  outline: none;
  border: none;
}

.confess-button:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .confess-button {
    animation: none;
    opacity: var(--confess-opacity-hover);
  }
  
  .confess-button:hover,
  .confess-button:focus-visible {
    animation: none;
  }
}

.confess-button-text {
  position: relative;
  z-index: 1;
}

.confess-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: transparent;
  border: none;
  min-width: 250px;
  max-height: 70vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  box-shadow: none;
  z-index: 1001;
}

.confess-button-container:hover .confess-dropdown,
.confess-button-container:focus-within .confess-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Blur landing page background when hovering over confess button */
body:has(.confess-button-container:hover) .fullscreen-image:first-child {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

body:has(.confess-button-container:hover) .fullscreen-image:first-child .landing-video,
body:has(.confess-button-container:hover) .fullscreen-image:first-child .zoomable-image {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

body:has(.confess-button-container:hover) .fullscreen-image:first-child .image-container {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

/* Blur landing page background when about modal is open */
body.about-modal-open .fullscreen-image:first-child {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

body.about-modal-open .fullscreen-image:first-child .landing-video,
body.about-modal-open .fullscreen-image:first-child .zoomable-image {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

body.about-modal-open .fullscreen-image:first-child .image-container {
  filter: blur(8px);
  transition: filter 0.3s ease;
}

.circle-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.circle-menu-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #f4f1e6;
  padding: 10px 0;
  text-align: right;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  display: block;
  text-shadow: 
    0 0 8px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(0, 0, 0, 0.6),
    0 2px 4px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(244, 241, 230, 0.1);
  touch-action: manipulation;
}

.circle-menu-item:hover {
  color: #f4f1e6;
  padding-right: 10px;
  font-weight: 500;
  text-shadow: 
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 15px rgba(0, 0, 0, 0.7),
    0 2px 5px rgba(0, 0, 0, 0.5);
}

.circle-menu-divider {
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.circle-menu-divider hr {
  border: none;
  border-top: 1px solid rgba(244, 241, 230, 0.3);
  margin: 0;
  width: 15%;
  margin-left: auto;
}

/* About Modal */
.about-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Semi-transparent dark overlay */
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.about-modal-content {
  background: rgba(30, 40, 60, 0.75); /* Hazy dark blue for content box */
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 8px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(100, 120, 150, 0.3);
}

.about-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: #f4f1e6;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  /* Improve touch interactions */
  -webkit-tap-highlight-color: rgba(244, 241, 230, 0.1);
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
}

.about-modal-close:hover {
  opacity: 1;
}

.about-modal-text {
  color: #f5f0e6;
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.5em;
  margin: 0;
}

.about-modal-text a {
  color: #A79F8A;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.about-modal-text a:hover {
  color: #E8E0C4;
}

@media (max-width: 768px) {
  .about-modal-content {
    padding: 30px 25px;
    max-width: 90%;
  }
  
  .about-modal-text {
    font-size: 14px;
  }
  
  .about-modal-close {
    top: 10px;
    right: 10px;
    font-size: 28px;
  }
}

@media screen and (max-width: 768px), screen and (max-device-width: 768px) {
  .confess-button-container {
    top: clamp(12px, 2vw, 16px);
    right: clamp(12px, 2vw, 16px);
  }
  
  .confess-button {
    padding: clamp(20.8px, 3.12vw, 31.2px) clamp(31.2px, 5.2vw, 46.8px) !important; /* 30% larger */
    font-size: clamp(28.6px, 4.16vw, 36.4px) !important; /* 30% larger */
    min-height: 114.4px !important; /* 30% larger than 88px */
    min-width: 114.4px !important; /* 30% larger than 88px */
  }
  
  .confess-button:focus-visible {
    outline-offset: 3px;
  }
  
  .confess-dropdown {
    min-width: 180px;
    max-width: calc(100vw - 40px);
    max-height: 60vh;
    margin-top: 6px;
  }
  
  .circle-menu-item {
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    min-height: 44px; /* Ensure touch target is at least 44px */
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  
  .circle-menu-divider hr {
    margin: 6px 0;
  }
}

@media screen and (max-width: 480px), screen and (max-device-width: 480px) {
  .confess-button-container {
    top: clamp(10px, 1.5vw, 14px);
    right: clamp(10px, 1.5vw, 14px);
  }
  
  .confess-button {
    padding: clamp(10.14px, 1.69vw, 16.9px) clamp(16.9px, 2.535vw, 27.04px) !important; /* 30% larger than previous mobile size */
    font-size: clamp(16.9px, 2.366vw, 20.28px) !important; /* 30% larger than previous mobile size */
    min-height: 74.36px !important; /* 30% larger than previous mobile size */
    min-width: 74.36px !important; /* 30% larger than previous mobile size */
  }
  
  .confess-dropdown {
    min-width: 160px;
    max-width: calc(100vw - 30px);
  }
  
  .circle-menu-item {
    padding: 14px 0;
    font-size: 13px;
  }
  
  .about-modal-content {
    padding: 25px 20px;
    max-width: 95%;
  }
  
  .about-modal-text {
    font-size: 13px;
    line-height: 1.4em;
  }
  
  .about-modal-close {
    top: 8px;
    right: 8px;
    font-size: 24px;
    width: 28px;
    height: 28px;
  }
  
  .site-header {
    padding: 12px;
    max-width: 100%;
    width: calc(100% - 24px);
    box-sizing: border-box;
    bottom: 30px !important; /* Shift up from default bottom: 0 */
    overflow: visible !important; /* Allow subtitle to extend if needed */
  }
  
  .header-content {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow: visible !important; /* Allow subtitle to extend if needed */
  }
  
  .header-title {
    font-size: clamp(39.2px, 9.8vw, 72.8px) !important; /* 1.4x larger: was clamp(28px, 7vw, 52px) */
    line-height: 1.15 !important;
    margin-bottom: 3px !important;
    width: 100% !important;
    max-height: calc(1.15em * 2) !important; /* Exactly 2 lines */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
  }
  
  .header-title .title-break-mobile {
    display: inline !important; /* Show break on mobile */
  }
  
  .header-title .title-line-1,
  .header-title .title-line-2 {
    display: inline !important;
  }
  
  .header-subtitle {
    font-size: clamp(14px, 3.5vw, 32px) !important; /* Larger size - as big as possible */
    width: 100% !important;
    overflow: visible !important; /* Don't cut off text */
    white-space: normal !important; /* Allow wrapping */
    text-overflow: clip !important;
    line-height: 1.3 !important;
    word-spacing: normal !important;
    letter-spacing: 0.5px !important;
  }
  
  .header-subtitle .subtitle-break {
    display: inline !important; /* Show break on mobile */
  }
  
  .header-subtitle .subtitle-break br {
    display: block !important; /* Show break on mobile */
  }
  
  .text-page {
    padding: 15px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    height: 100vh !important;
  }
  
  .text-content {
    max-width: calc(100vw - 30px) !important; /* Account for page padding */
    width: 100% !important;
    text-align: center !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    max-height: calc(100vh - 30px) !important; /* Account for page padding */
    overflow: visible !important; /* Don't cut off text */
  }
  
  .text-quote {
    font-size: clamp(20px, 5vw, 40px) !important; /* Larger font size, use vw for width-based sizing */
    line-height: 1.4 !important;
    margin-bottom: clamp(6px, 1.5vh, 12px) !important;
    text-align: center !important;
    white-space: pre !important; /* Preserve line breaks exactly, NO wrapping */
    word-wrap: normal !important; /* Don't break words */
    overflow-wrap: normal !important;
    hyphens: none !important; /* No automatic hyphens */
    max-width: calc(100vw - 60px) !important; /* Account for padding on both sides */
    overflow-x: auto !important; /* Allow horizontal scroll if text is too wide */
    overflow-y: visible !important;
    width: fit-content !important; /* Fit to content width */
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .text-attribution {
    font-size: clamp(11px, 2.2vh, 20px) !important; /* Scale with viewport height */
    text-align: center !important;
    white-space: nowrap !important; /* Keep attribution on one line */
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    margin-top: clamp(3px, 0.8vh, 8px) !important;
  }
  
  .circle-name {
    font-size: clamp(2rem, 5vw, 4rem);
  }
  
  .circle-number {
    font-size: clamp(0.8rem, 1.3vw, 1.1rem);
  }
  
  .circle-video {
    max-width: 30%;
  }
  
  .circle-image {
    max-width: 45%;
  }
  
  .fullscreen-toggle,
  .info-toggle,
  .home-toggle {
    padding: 6px;
  }
  
  .fullscreen-toggle .fs-icon,
  .home-toggle .home-icon {
    width: 16px;
    height: 16px;
  }
  
  .info-toggle {
    font-size: 14px;
  }
  
  .zoom-btn {
    font-size: 18px;
    padding: 6px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .zoom-controls {
    bottom: 10px;
    left: 10px;
    gap: 4px;
  }
}





