[data-char][data-slug] {
  cursor: pointer;
}
    cursor: pointer;

.gang-card.gang-link .painting-video,
.gang-card.gang-link video.painting-video {
  cursor: pointer;
}
#entrance-cta, #entrance-beta-note { animation:none !important; }
#entrance-cta { display: contents; }
/* Early duplicate #fixed-ui-container overflow rule removed (consolidated later) */
/* Disable page scrollbars by default (page-level only) */
html, body {
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none;
}

/* Ensure all interactive controls show the hand cursor */
button,
[role="button"],
a[href],
[data-section],
[data-action],
[data-modal],
[data-sfx],
[data-lock],
[data-avatar],
[data-clickable],
.clickable,
.gang-card.gang-link,
.button-neonblue,
.button-simple,
.button-ghost,
.button-red,
#audio-toggle,
#skip-story-global {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"],
button[disabled] {
  cursor: not-allowed;
}

/* Enable vertical scroll ONLY for #app-root in gallery or privacy sections */
body.section-gallery #app-root,
body.section-privacy #app-root {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}
body.section-gallery #app-root::-webkit-scrollbar,
body.section-privacy #app-root::-webkit-scrollbar {
  display: block;
  width: 8px;
  background: rgba(0,0,0,0.2);
}

/* Prevent inner content boxes from scrolling; leave scrolling to #app-root only */
.content-box, .content, .box, .inner, .section-content { overflow: visible; }
/* Gang page formatting */
.gang-table {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 32px auto;
  border-collapse: separate;
  border-spacing: 24px 18px;
}
.gang-table td {
  vertical-align: top;
  padding: 0;
}
.gang-card {
  width: 320px;
  max-width: 320px;
  min-width: 180px;
  background: rgba(30,0,60,0.45);
  border-radius: 18px;
  box-shadow: 0 2px 18px #9B4DFF44;
  padding: 18px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.gang-card .h1 {
  font-size: 20px;
  margin-bottom: 8px;
  text-align: center;
}
.gang-card figcaption {
  font-size: 15px;
  color: #e0e0ff;
  text-align: center;
  margin-top: 8px;
}
.gang-card video.painting-video, .gang-card .painting-video {
  width: 250px; /* fixed portrait window width */
  height: 500px; /* fixed portrait window height */
  border: 2px solid var(--bright-blue);
  border-radius: 16px;
  box-shadow: 0 0 12px #9B4DFF88;
  background: #000;
  margin: 0 auto;
  display: block;
  object-fit: cover; /* ensure video fills the window */
  object-position: center center;
}
.gang-card img {
  width: auto;
  max-width: 100%;
  height: auto;
  border: 2px solid #ffffff;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
}
.gang-card .video-aspect-1-2 {
  width: 250px !important;
  height: 500px !important; /* maintain roughly 1:2 appearance */
  display: block;
  margin: 0 auto;
}
/* Center CTA buttons in content box for home, shop, gallery */
.content-box .center-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 0; /* absolute pinned; margin-bottom not needed */
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 20px; /* pin 20px from bottom of content box */
}
/* Section-specific: Home and Shop are not pinned; restore inline flow */
section#home .content-box .center-buttons {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 45px;
  margin-bottom: 45px;
}

section#shop .content-box .center-buttons {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 20px;
}
/* Gallery: center-buttons should be inline (not pinned) */
section#gallery .content-box .center-buttons {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 20px;
}
/* Gang: center-buttons should be inline (not pinned); sits under images and scrolls with content */
section#gang .content-box .center-buttons {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 20px;
}
/* Gang: no extra bottom padding needed when CTA is inline */
section#gang .content-box {
  padding-bottom: 20px;
}
/* Canonical content box style for all sections */
.content-box {
  width: 1040px;
  max-width: 1040px;
    height: 735px;
  padding: 10px 40px;
  background: rgba(0,0,0,0.5);
  border-radius: 14px;
  border: 2px dotted #ff48da;
  box-shadow: 0 0 20px rgb(149, 11, 255);
  box-sizing: border-box;
  position: absolute;
  top: 20px;
  left: 215px;
  transform: none;
  z-index: 9500;
}
/* Enable scrolling for sections that opt in with .scrollable */
.content-box.scrollable {
  overflow-y: auto;
  overflow-x: hidden;
}

/* Gallery content box uses default padding; no extra bottom padding needed when CTA is inline */
/* --- SCROLLING STORY HEADLINE STYLE --- */
/* === Neon Button Color Variables === */
:root {
  --bright-magenta: #FF00CC;
  --bright-purple: #9B4DFF;
  --bright-blue: #00aaff;
  --hover-aqua: #00FFFF;
  --white: #fff;
  --heading-pink: #d283ff;
  /* Site-wide body text color (editable via fixed UI color picker) */
  --body-text-color: #cbdbff;
  /* Default text color for neon blue buttons */
  --button-text-color: #00FFFF;
}
/* === Canonical Text Styles === */
body {
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 16px;
  color: var(--body-text-color);
  line-height: 1.6;
  text-align: justify;
  background: transparent;
  text-shadow: 0 2px 4px rgba(0,0,0,0.7), 0 4px 12px rgba(0,0,0,0.5);
}
.h1 {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--heading-pink);
  border-bottom: 2px solid var(--heading-pink);
  padding-bottom: 0px; /* was 12px: tighter gap between text and underline */
  padding-top: 0px;
  margin: 0 0 20px; /* add controlled space below underline (smaller than default) */
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  text-align: center;
}
.h2 {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 42px;
  color: var(--white);
  padding-bottom: 18px;
  padding-top: 0px;
  line-height: 1;
  margin: 0 0 0px; 
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  text-align: center;
}
.h3 {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 17px;
  color: var(--white);
  padding: 5px 0px 12px 0px;
  margin: 0 0 0px; 
  text-align: center;
}
.h4 {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 22px;
  text-transform: uppercase;
  color: var(--heading-pink);
  border-bottom: 2px solid var(--heading-pink);
  padding-bottom: 0px; /* was 12px: tighter gap between text and underline */
  padding-top: 0px;
  margin: 0 0 20px; /* add controlled space below underline (smaller than default) */
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  text-align: center;
}

.body-text-large {
  font-size: 26px;
  color: var(--body-text-color); /* match canonical body text color */
  margin: 0 0 40px 0;
}
.body-text-small {
  font-size: 16px;
  color: var(--body-text-color); /* match canonical body text color */
  margin: 0 0 0px 0;
}
/* Larger body text variant: inherits body-text styles; only font-size changes */
.body-text-huge {
  font-size: 40px;
  text-align: center;
}
/* Canonical body copy style */
.body-text {
  /* Corrected font size (was erroneous 2px) per Batch 1 spec */
  font-size: 21px;
  color: var(--body-text-color);
  text-align: justify;
  margin: 0 0 14px 0;
  text-indent: 0; /* remove first-line indent */
}

.body-text-painting {
  font-size: 20px;
  color: var(--body-text-color);
  text-align: justify;
  margin: 0 0 14px 0;
  text-indent: 0;
}

/* Text links: standard underline with neon hover flex */
.content-box p a,
.body-text a,
.body-text-painting a,
#painting .painting-shell__description a,
.content-link,
.d66-flyby-teleport {
  display: inline-block;
  color: var(--bright-blue);
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-color: var(--bright-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  text-decoration-skip-ink: auto;
  transition: color 0.18s ease, text-decoration-color 0.18s ease, text-decoration-thickness 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
  transform-origin: left bottom;
  outline: none;
}
.content-box p a:hover,
.content-box p a:focus-visible,
.body-text a:hover,
.body-text a:focus-visible,
.body-text-painting a:hover,
.body-text-painting a:focus-visible,
#painting .painting-shell__description a:hover,
#painting .painting-shell__description a:focus-visible,
.content-link:hover,
.content-link:focus-visible,
.d66-flyby-teleport:hover,
.d66-flyby-teleport:focus-visible {
  color: var(--hover-aqua);
  text-decoration-color: var(--hover-aqua);
  text-decoration-thickness: 3px;
  transform: scale(1.035);
  text-shadow: 0 0 6px rgba(0,229,255,0.7), 0 0 16px rgba(0,229,255,0.35);
}
section#gallery .gallery-credit {
  font-size: 20px;
}
/* Clickable/hot media affordance: bright blue 3px border + glow on hover/focus */
.is-hot,
img.is-hot,
.is-hot img {
  border: 3px solid #00A8FF !important; /* bright blue */
  border-radius: 12px; /* keep consistent rounding with site */
  box-shadow: 0 0 0 rgba(0,168,255,0);
  transition: box-shadow 160ms ease, transform 160ms ease, border-color 160ms ease;
  cursor: pointer;
}
.is-hot:hover,
.is-hot:focus,
.is-hot:focus-visible {
  box-shadow: 0 0 14px rgba(0,168,255,0.6);
}
.quote {
  font-style: italic;
  font-size: 22px;
  color: #fff;
  text-align: center;
}
/* Star award icons: align right so surrounding text wraps on the left */
.content-box img.star-award.d66-star-float {
  float: right;
  /* Add left margin so text doesn’t touch the icon; small bottom gap for paragraph spacing */
  margin: 0 0 8px 14px;
}
.hr-custom {
  display: block;
  margin: 30px auto;
  width: 40%;
  height: 0;
  background: none;
  border: none;
  border-top: 2px dotted var(--bright-magenta);
}
/* === Entrance Section Styles === */
/* --- Simplified Entrance Layout (fixed positions) --- */
#entrance-inner { position: relative; width:100%; height:100%; }
#story-box {
  position: absolute;
  left: 230px;
  top: 20px;
  width: 980px;
  height: 735px;
  background: transparent;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 1000;
  overflow: hidden;
  /* Isolate paints for faster first render */
  contain: paint;
}

/* App root/frame */
#app-root {
  width: 1430px;
  height: 775px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9500; /* match .content-box for stacking/clickability */
  overflow: hidden; /* no scroll by default; enabled per-section below */
}

/* Painting detail: fix the bottom nav row 20px from bottom of the content box */
body.section-painting #painting .content-box { position: absolute; }
body.section-painting #painting #painting-nav {
  position: absolute;
  left: 40px; /* match content-box horizontal padding */
  right: 40px; /* match content-box horizontal padding */
  bottom: 20px;
  z-index: 2;
  padding: 0 !important; /* override inline padding to avoid double inset */
}
/* Reserve space inside SPA painting content so text doesn’t sit under nav */
body.section-painting #painting #painting-content {
  padding-bottom: 80px; /* nav height + spacing safety */
}
/* Server-side painting page variant: if used with global CSS */
body[data-page="painting"] #painting-nav {
  position: sticky;
  bottom: 20px;
}

body.section-painting #painting #painting-nav,
body[data-page="painting"] #painting-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

body.section-painting #painting #painting-nav .painting-nav-prev,
body[data-page="painting"] #painting-nav .painting-nav-prev {
  justify-self: start;
}

body.section-painting #painting #painting-nav .painting-nav-return,
body[data-page="painting"] #painting-nav .painting-nav-return {
  justify-self: center;
}

body.section-painting #painting #painting-nav .painting-nav-next,
body[data-page="painting"] #painting-nav .painting-nav-next {
  justify-self: end;
}

/* Painting fixed layout: pin every primary element to a fixed spot and size */
body.section-painting section#painting #painting-content,
body[data-page="painting"] main.content-box {
  position: relative;
}
/* Painting content fade transitions (SPA + server variant if classes present) */
/* Reusable fade helpers */
.d66-fade { transition: opacity 380ms ease; will-change: opacity; }
.d66-fade.d66-hide { opacity: 0; }

.d66-fade-in { opacity: 0; transition: opacity 460ms ease; will-change: opacity; }
.d66-fade-in.d66-show { opacity: 1; }
body.section-painting .painting-transition-group,
body[data-page="painting"] .painting-transition-group {
  opacity: 0;
  transition: opacity 240ms ease;
  will-change: opacity;
}
body.section-painting .painting-transition-group.pt-in,
body[data-page="painting"] .painting-transition-group.pt-in {
  opacity: 1;
  transition-duration: 380ms;
}

/* New painting shell layout */
#painting .painting-shell {
  position: relative;
  padding: 20px 40px;
  padding-right: 40px;
  box-sizing: border-box;
  padding-bottom: 80px;
  margin-bottom: 20px;
}

#painting .painting-shell.painting-shell--no-portrait {
  padding-right: 40px;
}

#painting .painting-shell__grid {
  display: grid;
  grid-template-columns: 650px 280px;
  grid-auto-rows: minmax(0, auto);
  column-gap: 32px;
  row-gap: 20px;
  align-items: flex-start;
}

#painting .painting-shell--no-portrait .painting-shell__grid {
  grid-template-columns: 650px;
}

#painting .painting-shell__media {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 650px;
  max-width: none;
  grid-column: 1;
  grid-row: 1;
  align-self: flex-start;
}

#painting .painting-shell--media-expanded .painting-shell__media {
  gap: 12px;
}

#painting .painting-shell__media-frame {
  width: 650px;
  max-width: none;
  height: 284px;
  min-height: 284px;
  max-height: 560px;
  border: 3px solid var(--bright-blue);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, height 0.28s ease;
  cursor: pointer;
  position: relative;
}

#painting .painting-shell__media-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05) 10%, rgba(255, 255, 255, 0.18) 40%, rgba(255, 255, 255, 0.05) 70%);
  transform: translateX(-120%);
  animation: painting-shell-sheen 1.6s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

#painting .painting-shell[data-media-loading="1"] .painting-shell__media-frame::before {
  opacity: 1;
}

#painting .painting-shell__media-frame img,
#painting .painting-shell__media-frame video,
#painting .painting-shell__media-frame iframe {
  display: block;
  width: 100%;
  max-width: none;
  background: transparent;
}

#painting .painting-shell__media-frame img {
  height: 100%;
  object-fit: cover;
}

#painting .painting-shell__media-frame video {
  height: 100%;
  object-fit: cover;
}

#painting .painting-shell__media-frame iframe {
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
  aspect-ratio: 16 / 9;
}

#painting .painting-shell__media-frame:hover,
#painting .painting-shell__media-frame:focus-within {
  transform: scale(1.02);
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.45), 0 0 12px rgba(0, 168, 255, 0.6);
}

#painting .painting-shell__media-frame img[hidden],
#painting .painting-shell__media-frame video[hidden],
#painting .painting-shell__media-frame iframe[hidden] {
  display: none !important;
}

#painting .painting-shell__media-frame img[data-media-toggle="true"],
#painting .painting-shell__media-frame video[data-media-toggle="true"],
#painting .painting-shell__media-frame iframe[data-media-toggle="true"] {
  cursor: pointer;
}

#painting .painting-shell__media-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#painting .painting-shell__media-controls .button-simple {
  min-width: 140px;
}

#painting .painting-shell__portrait {
  position: relative;
  top: auto;
  right: auto;
  width: 280px;
  height: 560px;
  min-height: 560px;
  max-height: 560px;
  display: none;
  border: 3px solid var(--bright-blue);
  border-radius: 18px;
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.25);
  padding: 0;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: flex-start;
  justify-self: start;
}

#painting .painting-shell--has-portrait .painting-shell__portrait {
  display: block;
}

#painting .painting-shell__character-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

#painting .painting-shell__character-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: transparent;
}

#painting .painting-shell__character-video[hidden] {
  display: none !important;
}

#painting .painting-shell__portrait:hover,
#painting .painting-shell__portrait:focus-within {
  transform: scale(1.02);
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.45), 0 0 12px rgba(0, 168, 255, 0.6);
}

#painting .painting-shell__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 650px;
  max-width: 650px;
  min-height: 284px;
  grid-column: 1;
  grid-row: 2;
  justify-content: flex-start;
}

#painting .painting-shell--media-expanded .painting-shell__media-frame {
  display: block;
  min-height: 284px;
  height: auto;
  max-height: 560px;
}

#painting .painting-shell--media-expanded .painting-shell__media-frame img,
#painting .painting-shell--media-expanded .painting-shell__media-frame video,
#painting .painting-shell--media-expanded .painting-shell__media-frame iframe {
  width: 100%;
}

#painting .painting-shell--media-expanded .painting-shell__media-frame video,
#painting .painting-shell--media-expanded .painting-shell__media-frame iframe {
  height: auto;
  object-fit: contain;
}

#painting .painting-shell--media-expanded .painting-shell__content {
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: 12px auto 0;
}

#painting .painting-shell--media-expanded .painting-shell__factline,
#painting .painting-shell--media-expanded .painting-shell__description {
  display: none;
}

#painting .painting-shell__nav {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  grid-column: 1 / span 2;
}

#painting .painting-shell__nav-btn {
  min-width: 180px;
  text-align: center;
  white-space: nowrap;
}

#painting .painting-shell__nav-btn--disabled {
  opacity: 0.65;
  pointer-events: none;
}

#painting .painting-shell__title {
  margin: 0;
}

#painting .painting-shell--media-expanded .painting-shell__title {
  display: none;
}

#painting .painting-shell__factline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1rem;
  font-family: 'Audiowide', Arial, sans-serif;
  font-style: italic;
  letter-spacing: 0.02em;
  color: #ffffff;
}

#painting .painting-shell__fact {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: inherit;
  font-style: inherit;
}

#painting .painting-shell__fact-separator {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
}

#painting .painting-shell__description {
  line-height: 1.6;
}

@media (max-width: 1180px) {
  #painting .painting-shell {
    padding-right: 40px;
  }

  #painting .painting-shell__grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
  }

  #painting .painting-shell__media {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }

  #painting .painting-shell__content {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
    min-height: 0;
  }

  #painting .painting-shell--has-portrait .painting-shell__portrait {
    grid-column: 1;
    grid-row: auto;
    margin: 0 auto;
    width: 220px;
    height: auto;
  }

  #painting .painting-shell--has-portrait .painting-shell__character-img {
    height: auto;
  }

  #painting .painting-shell__nav {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 720px) {
  #painting .painting-shell {
    padding: 20px;
  }

  #painting .painting-shell__nav {
    flex-direction: column;
    align-items: stretch;
  }

  #painting .painting-shell__nav-btn {
    min-width: 0;
    width: 100%;
  }
}

/* Keep bottom nav visible; do not fade it */
body.section-painting #painting-shell .painting-shell__nav,
body[data-page="painting"] #painting-shell .painting-shell__nav {
  opacity: 1 !important;
  transition: none !important;
}
body.section-painting section#painting .painting-main-image:hover,
body.section-painting section#painting .painting-main-image:focus-visible,
body[data-page="painting"] .painting-main-image:hover,
body[data-page="painting"] .painting-main-image:focus-visible {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.55), 0 0 8px rgba(0, 168, 255, 0.4);
  transform: scale(1.02);
}
/* Painting title (use H4 font styling but fixed geometry) */
body.section-painting section#painting .painting-left .painting-title,
body[data-page="painting"] .painting-left .painting-title {
  position: absolute !important;
  left: 40px !important;
  /* 20(top) + 284(height) + ~12 gap */
  top: 316px !important;
  width: 640px !important;
  height: auto !important; /* auto height so underline sits close to text */
  margin: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  /* Painting-specific title typography */
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 22px;
  line-height: 1.2; /* tighten line box to reduce gap above underline */
  text-transform: uppercase;
  color: var(--heading-pink);
  border-bottom: 2px solid var(--heading-pink);
  padding-bottom: 0;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
}
/* Meta row (size/medium + status) */
body.section-painting section#painting .painting-meta-row,
body[data-page="painting"] .painting-meta-row {
  position: absolute !important;
  left: 40px !important; /* align with left column */
  transform: none;
  top: 363px !important; /* create a bit more space below title */
  width: 640px !important;
  height: auto !important;
  overflow: visible !important;
  justify-content: center; /* center inline contents inside the 640px cell */
  text-align: center;
}
/* Painting-specific subtitle style (size/medium) */
body.section-painting section#painting .painting-meta-row .painting-subtitle,
body[data-page="painting"] .painting-meta-row .painting-subtitle,
/* Back-compat for older markup */
body.section-painting section#painting .painting-meta-row .size-medium-span,
body[data-page="painting"] .painting-meta-row .size-medium-span {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.2;
  color: #dfe8ff;
  font-style: italic;
  font-weight: 700;
}
/* Compact status chips styled like miniature CTA buttons */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 9px 3px;
  border: 2px solid var(--bright-blue);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--bright-magenta);
  white-space: nowrap;
  cursor: default;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  box-shadow: 0 0 0 rgba(0, 229, 255, 0);
}
.status-badge + .status-badge { margin-left: 10px; }

body.section-painting section#painting .painting-meta-row .status-badge,
body[data-page="painting"] .painting-meta-row .status-badge {
  margin-left: 8px; /* gap from preceding size text */
  margin-top: 4px;
  align-self: flex-start;
}

a.status-badge,
.status-badge.painting-status-link {
  cursor: pointer;
  text-decoration: none;
}
a.status-badge:link,
a.status-badge:visited {
  color: currentColor;
}

a.status-badge:hover,
.status-badge.painting-status-link:hover {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  transform: translateY(-1px);
}

a.status-badge:focus-visible,
.status-badge.painting-status-link:focus-visible {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.4), 0 0 8px rgba(0, 229, 255, 0.6);
  transform: translateY(-1px);
  outline: none;
}

/* Badge color variants */
.status-available,
.status-available-on-etsy,
.status-availableonetsy,
[class*="status-available"] {
  color: #4cbb17;
}
.status-sold { color: #ff6b6b; }
.status-reserved { color: #ffd166; }
.status-commissioned { color: #a78bfa; }
.status-nfs,
.status-notforsale { color: #9aa0a6; }
.status-prints,
.status-printsavailable { color: #64d2ff; }
.status-comingsoon { color: #ffa94d; }
.status-inprogress { color: #00e5ff; }
.status-custom { color: #dfe8ff; }
/* Media type in meta row: use H3 typography without extra spacing */
body.section-painting section#painting .painting-meta-row .size-medium-span,
body[data-page="painting"] .painting-meta-row .size-medium-span {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 22px;
  line-height: 1.1;
  color: var(--white);
  font-weight: normal;
  font-style: normal;
}
/* Description block */
body.section-painting section#painting .painting-body-row,
body[data-page="painting"] .painting-left + .painting-body-row,
body[data-page="painting"] .painting-body-row {
  position: absolute !important;
  left: 40px !important;
  top: 410px !important; /* tightened: ~30px gap below meta row */
  width: 640px !important; /* align with title width; remove extra right gap */
  bottom: 80px !important; /* extend down to just above the bottom nav area */
  overflow: hidden !important;
}

/* Painting transition fade mask: covers content area above nav to create a true fade-to-black */
body.section-painting #painting-content #painting-fade-mask,
body[data-page="painting"] .content-box #painting-fade-mask {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 80px; /* leave nav row visible */
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
  z-index: 40; /* keep fade mask on top of elevated media */
}
/* Server page: description is a direct sibling paragraph */
body[data-page="painting"] .painting-left + p {
  position: absolute !important;
  left: 40px !important;
  top: 410px !important; /* tightened: ~30px gap below meta row */
  width: 640px !important; /* match painting-body-row width and title */
  bottom: 80px !important; /* extend down to above nav */
  overflow: hidden !important;
}
/* Painting body copy */
body.section-painting section#painting .painting-body-row .painting-desc,
body[data-page="painting"] .painting-body-row p,
body[data-page="painting"] .painting-left + p,
body[data-page="painting"] .painting-desc {
  margin: 0 !important;
}
/* Painting body text style: match site body copy */
body.section-painting #painting .content-box p.painting-desc,
body[data-page="painting"] .painting-body-row p,
body[data-page="painting"] .painting-left + p,
body[data-page="painting"] .painting-desc {
  font-size: 21px; /* painting-only body copy size (matches .body-text) */
  color: var(--body-text-color);
  text-align: justify;
  text-indent: 0; /* remove first-line indent to match current site spec */
}
/* Safety: don't show focus outline on painting title if it receives focus */
body.section-painting .painting-left .painting-title:focus,
body[data-page="painting"] .painting-left .painting-title:focus {
  outline: none !important;
}

/* Background video should be fixed and always behind the app */
#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000; /* explicit black backdrop before first frame */
  z-index: 0;
  pointer-events: none;
}

/* Gallery background carousel sits above the base video and below starfield */
#gallery-bg-carousel {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
  background: #000;
}
#gallery-bg-carousel.gallery-bg-carousel--active {
  opacity: 1;
  visibility: visible;
}
#gallery-bg-carousel .gallery-bg-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  width: 2200px;
  will-change: transform;
}
#gallery-bg-carousel .gallery-bg-tile {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.12);
}
#gallery-bg-carousel .gallery-bg-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.7) 68%, rgba(0,0,0,0.85) 100%);
}

body.section-gallery #bg-video {
  opacity: 1 !important;
}

/* Eliminate any accidental fades on entrance/story to prevent the background flash */
body.section-entrance #bg-video,
body.section-story #bg-video {
  opacity: 1 !important;
  transition: none !important;
}

/* Hide overlays (floating avatar + stars HUD) during entrance & story */
body.section-entrance #floating-icon,
body.section-story #floating-icon { display: none !important; }
body.section-entrance #stars-root,
body.section-story #stars-root { display: none !important; }

/* Entrance/story: subtle gradient fallback under the poster/video to avoid black flash */
body.section-entrance,
body.section-story {
  /* Use solid black at boot to avoid any visible banding/charcoal tint on first paint */
  background: #000 !important;
}

body.section-entrance #stars-root,
body.section-story #stars-root {
  display: none !important;
}

/* Hide Star Hunt UI during shop exit video */
body.d66-exit-playing #stars-root { display: none !important; }
body.d66-exit-playing .star-award,
body.d66-exit-playing .star-inline,
body.d66-exit-playing .inline-star-pulse { visibility: hidden !important; }

/* Story scroll visuals */
#story-scroll {
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 34px;
  text-align: justify;
  line-height: 1.8;
  color: var(--body-text-color);
  text-shadow: #000 0px 2px 8px, #000 0px 1px 2px;
  width: 100%;
  padding: 0 40px;
  padding-bottom: 200px;
  box-sizing: border-box;
  overflow: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
  /* Rendering hints: prep compositing and reduce initial jank */
  will-change: transform, opacity;
}                       
/* About: Meet the Team heading */
.meet-team-title {
  text-align: center;
  font-family: 'Audiowide', sans-serif;
  font-size: 28px;
  text-transform: none;
  color: var(--white);
  display: block;
  margin: 30px auto 6px;
  position: relative;
}
#story-scroll .story-headline {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 40px; /* exact size in points as requested */
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--heading-pink);
  text-align: center; /* center just this headline */
  display: block;
  width: 100%;
  margin: 16px 0 18px 0;
  text-shadow: 0 2px 8px #000, 0 1px 2px #000;
  border-bottom: 3px solid var(--heading-pink); /* underline across full width */
  padding-bottom: 8px;
}
#story-scroll p {
  margin: 0 0 50px 0; /* more space under each paragraph */
}
#story-scroll::-webkit-scrollbar { display: none; }

/* Starfield layer stays fixed above the video but below UI */
#starfield-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}
/* Make starfield visible in entrance/story even before background video fades in */
body.section-entrance #starfield-layer,
body.section-story #starfield-layer { opacity: 1; }

/* Flyby animation layer should span the entire viewport so animations start at true screen edges */
#flyby-layer {
  position: fixed; /* span full screen instead of #app-root only */
  inset: 0;
  /* Above content (.content-box 9500) and base fixed container (11990), below audio and modals */
  z-index: 12000;
  pointer-events: none; /* children enable pointer events individually */
}

/* Make flyby images show a hand cursor to signal clickability */
#flyby-layer img {
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, scale 0.18s ease;
  transform-origin: center;
  scale: 1;
}
#flyby-layer img:hover,
#flyby-layer img:focus-visible {
  scale: 1.16;
  filter: drop-shadow(0 0 34px rgba(0, 229, 255, 0.82)) drop-shadow(0 0 18px rgba(0, 168, 255, 0.68)) brightness(1.25);
  outline: none;
}

/* Skip story button */
#skip-story-global {
  position: fixed;
  right: 70px;
  bottom: 20px;
  /* Above flybys and fixed UI */
  z-index: 12010;
  min-width: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  opacity: 1;
  transition: opacity 0.2s;
}
#skip-story-global[hidden] { opacity: 0; pointer-events: none; }

/* duplicate entrance block removed — earlier definition kept */

/* Floating avatar defaults */
#app-root #floating-icon .floating-avatar {
  width:160px;
  height:160px;
  border-radius:50%;
  object-fit:cover;
  display:none;
  position:absolute;
  left:20px;
  bottom:20px;
  opacity:0;
  pointer-events:none;
  transition:none;
  z-index:12000;
  will-change: transform, opacity;
  transform: translate(-56px, -240px) scale(0.66);
}
#app-root #floating-icon .floating-avatar img {
  width:160px;
  height:160px;
  border-radius:50%;
  object-fit:cover;
}
#app-root #floating-icon .floating-avatar--active {
  display:block;
  visibility:visible;
  pointer-events:auto;
}
#app-root #floating-icon .floating-avatar--dropping {
  animation: d66-simple-drop 1280ms cubic-bezier(.24,.86,.26,1) forwards;
}
#app-root #floating-icon .floating-avatar--landed {
  opacity:1;
  transform: translate(0,0) scale(1);
  animation: d66-simple-idle 9s ease-in-out infinite 2.2s;
}

@keyframes d66-simple-drop {
  0% { transform: translate(-72px, -380px) scale(0.6); opacity: 0; }
  50% { transform: translate(0, 0) scale(1.08); opacity: 1; }
  63% { transform: translate(0, -42px) scale(0.94); }
  74% { transform: translate(0, 0) scale(1.05); }
  84% { transform: translate(0, -26px) scale(0.98); }
  100% { transform: translate(0, 0) scale(1); opacity: 1; }
}

@keyframes d66-simple-idle {
  0%, 64%, 100% { transform: translate(0,0) scale(1); }
  70% { transform: translate(0,-12px) scale(1.04); }
  74% { transform: translate(0,2px) scale(0.99); }
  80% { transform: translate(0,-8px) scale(1.02); }
  86% { transform: translate(0,0) scale(1.01); }
  92% { transform: translate(0,-4px) scale(1.015); }
}

/* Reduced motion optional handling removed per avatar animation requirements */
/* --- SPECIAL CONTENT BOX FOR GALLERY, GANG, PRIVACY --- */
.section-gallery .content-box,
.section-gang .content-box,
.section-privacy .content-box {
  width: 1040px;
  max-width: 1040px;
  height: 735px;
  z-index: 9500;
  position: absolute;
  left: 230px;
  top: 20px;
  overflow-y: auto;
  box-sizing: border-box;
  background: rgba(0,0,0,0.3);
  border-radius: 14px;
  scrollbar-width: thin;
  scrollbar-color: #9B4DFF #222;
}

/* Privacy: pin the Return button to the bottom of the content box */
/* Privacy: place Return below the text, not overlaying content */
body.section-privacy #privacy .content-box { display: flex; flex-direction: column; padding-bottom: 20px; }
body.section-privacy #privacy .content-box .center-buttons {
  position: static; /* reset any absolute */
  margin-top: auto; /* push to bottom of content box below text */
  padding-top: 20px;
  display: flex;
  justify-content: center;
}
.section-gallery .content-box::-webkit-scrollbar,
.section-gang .content-box::-webkit-scrollbar,
.section-privacy .content-box::-webkit-scrollbar {
  width: 8px;
  background: #222;
}
.section-gallery .content-box::-webkit-scrollbar-thumb,
.section-gang .content-box::-webkit-scrollbar-thumb,
.section-privacy .content-box::-webkit-scrollbar-thumb {
  background: #9B4DFF;
  border-radius: 8px;
}

/* Gallery cards: rounded corners with neon border */
.gallery-card {
  border: 3px solid var(--bright-blue);
  border-radius: 14px;
  overflow: hidden; /* ensure image/title clip to rounded corners */
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  transform-origin: center;
}
.gallery-card-title {
  position: absolute;
  left: 0;
  right: 0;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-card-title-bottom {
  bottom: 0;
}
.gallery-card-title-top {
  top: 0;
  opacity: 0;
  transform: translateY(-12px);
}
.gallery-card:hover .gallery-card-title-top,
.gallery-card:focus-visible .gallery-card-title-top,
.gallery-card:focus-within .gallery-card-title-top {
  opacity: 1;
  transform: translateY(0);
}
.gallery-card-title-top::first-letter {
  text-transform: capitalize;
}
.gallery-card-title-top[hidden] {
  display: none;
}
/* Hover/focus glow similar to .img-button */
.gallery-card:hover,
.gallery-card:focus-visible,
.gallery-card:focus-within {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px var(--hover-aqua), 0 0 8px var(--bright-blue);
  transform: scale(1.05);
}


/* Entrance box and button */
#entrance-inner {
  position: fixed;
  width: 800px;
  left: calc(50% - 40px); /* offset center left by 40px */
  top: 270px; /* moved down ~70px */
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: transparent;
  box-shadow: none;
  z-index: 5000;
}
#entrance-beta-note {
  position: fixed;
  left: calc(50%); /* nudged 8px right from previous (50% - 10px) */
  bottom: 370px; /* raised further up (was 120px) */
  transform: translateX(-50%);
  width: 700px;
  font-family:'Trebuchet MS', Arial, sans-serif;
  font-size:16px;
  color:#d1eaff;
  text-align:center;
  line-height:1.6;
  z-index: 5001;
}
#entrance-beta-note .entrance-beta-note__version {
  font-size:16px;
  font-weight:700;
  letter-spacing:0.05em;
  margin-bottom:8px;
}
#entrance-beta-note .entrance-beta-note__body {
  font-size:14px;
  line-height:1.45;
  margin-bottom:6px;
}
#entrance-beta-note .entrance-beta-note__body:last-child {
  margin-bottom:0;
}
.entrance-btn {
  font-family: 'Audiowide', Arial, sans-serif;
  font-size: 30px;
  font-weight: bold;
  padding: 22px 60px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(155, 77, 255, 0.5) 0%, rgba(0, 168, 255, 0.5) 100%);
  color: #000000;
  border: 3px solid var(--bright-blue);
  box-shadow: 0 0 32px #9B4DFF;
  text-shadow: 0 2px 8px #ffffff, 0 1px 2px #ff29ea;
  cursor: pointer;
  margin-bottom: 0px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.entrance-btn:hover, .entrance-btn:focus { box-shadow: 0 0 48px #00E5FF, 0 0 16px #9B4DFF; transform: scale(1.04); }
#entrance-tagline { font-family:'Trebuchet MS', Arial, sans-serif; font-size:20px; color:#fff; font-style:italic; margin-top:8px; margin-bottom:18px; text-align:center; }
/* Legacy entrance animation & duplicate beta note styling removed (simplified fixed layout in use) */

/* (duplicate removed above) */

/* Social icons */
/* Button: Neon Blue */
.button-neonblue {
  font-family:'Trebuchet MS', Arial, sans-serif;
  font-size:16px;
  text-transform:uppercase;
  color:var(--button-text-color);
  border:3px solid var(--bright-blue);
  background:rgba(0,0,0,0.5);
  padding:10px; /* uniform padding for nav buttons */
  border-radius:8px;
  cursor:pointer;
  transition:box-shadow .15s, border-color .15s, color .15s, transform .2s;
  display:inline-block;
  text-align:center;
  text-decoration: none; /* prevent default anchor underline */
  transform-origin:center;
}
.button-neonblue.button-neonblue--mini {
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 10px;
  padding: 2px 8px;
  border-width: 2px;
  border-radius: 4px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button-neonblue.button-neonblue--skip {
  font-size: 13px;
  padding: 6px 20px;
  border-width: 3px;
  border-radius: 10px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}
.button-neonblue:hover, .button-neonblue:focus {
  box-shadow:0 0 8px var(--hover-aqua);
  border-color:var(--hover-aqua);
  text-decoration: none;
  transform: scale(1.05);
}
.button-neonblue.button-neonblue--mini:hover,
.button-neonblue.button-neonblue--mini:focus {
  transform: scale(1.03);
}
.button-neonblue:visited { color:var(--button-text-color); }

/* Ensure anchors styled as .button-neonblue never underline in any state */
a.button-neonblue,
a.button-neonblue:link,
a.button-neonblue:visited,
a.button-neonblue:hover,
a.button-neonblue:focus,
a.button-neonblue:active {
  text-decoration: none;
}


/* Button: Simple */
.button-simple {
  font-family: 'Trebuchet MS', Arial, sans-serif;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid #888;
  text-align: center;
  background: transparent;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}
.button-simple:focus {
  outline:2px solid var(--bright-blue);
  outline-offset:2px;
}

/* Button: Image */
.img-button {
  width: 150px;
  height: 150px;
  margin: 0;
  border: 3px solid var(--bright-blue);
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  outline: none;
  border-radius: 24px;
  object-fit: cover;
  display: block;
  transform-origin: center;
}
.img-button:hover, .img-button:focus {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px var(--hover-aqua), 0 0 8px var(--bright-blue);
  transform: scale(1.05);
}

.saber-modal-video {
  display: block;
  width: 220px;
  height: 450px;
  border: 3px solid var(--bright-blue);
  border-radius: 24px;
  background: #000;
  object-fit: cover;
  box-shadow: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  transform-origin: center;
  cursor: pointer;
}

.saber-modal-video:hover,
.saber-modal-video:focus-visible {
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px var(--hover-aqua), 0 0 8px var(--bright-blue);
  transform: scale(1.05);
}

.saber-modal-video:focus-visible {
  outline: 3px solid var(--hover-aqua);
  outline-offset: 4px;
}

/* Floating avatars: apply same visual treatment as .img-button */
#app-root #floating-icon .floating-avatar {
  cursor: pointer;
}
#app-root #floating-icon .floating-avatar img {
  /* keep existing size and circular shape from earlier rules */
  border: 3px solid var(--bright-blue);
  box-shadow: none;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  transform-origin: center;
}
#app-root #floating-icon .floating-avatar:hover,
#app-root #floating-icon .floating-avatar:focus-visible {
  animation: floatingAvatarHoverBounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
#app-root #floating-icon .floating-avatar:hover img,
#app-root #floating-icon .floating-avatar:focus-visible img {
  animation-play-state: paused;
  border-color: var(--hover-aqua);
  box-shadow: 0 0 32px var(--hover-aqua), 0 0 8px var(--bright-blue);
  transform: scale(1.05);
}

@keyframes floatingAvatarHoverBounce {
  0% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-18px) scale(1.08); }
  60% { transform: translateY(6px) scale(0.98); }
  78% { transform: translateY(-7px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}

/* Background/video layering uses fixed positioning earlier in this file to keep them behind the UI. Duplicate absolute-position rules removed. */
#peter .peter-img,
#kerry .peter-img,
#zak .peter-img { /* Float-right behavior for biography images */
  float: right;
  display: block;
  margin: 10px 0px 10px 40px; /* space to the left and below */
  border: 3px solid var(--bright-blue) !important;
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(0,168,255,0.45);
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  transform-origin: center;
}
#peter .peter-img,
#kerry .peter-img {
  cursor: pointer;
}
#peter .peter-img:hover,
#peter .peter-img:focus-visible,
#kerry .peter-img:hover,
#kerry .peter-img:focus-visible {
  border-color: var(--hover-aqua) !important;
  box-shadow: 0 0 32px var(--hover-aqua), 0 0 12px var(--bright-blue);
  transform: scale(1.08);
}
/* Ensure Zak about video covers its box while keeping layout */
#zak #zak-about-video {
  width: 250px; /* matches updated width attribute */
  height: auto; /* let height auto; object-fit will crop within intrinsic box if constrained elsewhere */
  object-fit: cover;
  object-position: center;
  background: rgba(255,255,255,0.06);
}
/* Unified section copy class (applied via .section-copy on section or container) */
.section-copy p {
  font-size: 20px;
  line-height: 1.6;
  color: #dce7ff;
  text-align: justify;
  margin: 0 0 30px 0;
}

/* Inline highlight utility for emphasis within copy */
.highlight-color {
  color: #d9b9ff; /* neon blue accent to match site buttons */
  font-weight: inherit;
}
/* Inline tiny text */
.highlight-tiny {
  font-size: 0.9em;
}
/* Body text styling for Contact section paragraphs */
#contact .content-box p {
  /* Removed unused first color declaration (var(--hover-aqua)) */
  line-height: 1.6;
  color: #dce7ff;
  text-align: justify;
  margin: 0 0 30px 0;
}
/* Contact section: apply text link style to email link */
#contact .content-box a {
  color: var(--bright-blue);
}
#contact .content-box a:hover,
#contact .content-box a:focus-visible {
  color: var(--hover-aqua);
}
/* Gallery body text size */
#gallery .content-box p {
  font-size: 20px;
   line-height: 1.6;
  color: #ceddfd;  
}
#peter .center-buttons { /* Keep buttons below the floated image; still pinned */
  clear: both;
  padding-top: 0px;
}
#kerry .center-buttons,
#zak .center-buttons { /* Keep buttons below the floated image */
  clear: both;
  padding-top: 0px;
}

/* Gallery grid: add breathing room above and below */
#gallery-grid { padding-top: 25px; padding-bottom: 25px; }

/* --- Star Shower effect (reusable) --- */
.d66-star-shower-layer { contain: layout style; }
.d66-star-label {
  color: #1eff7a;
  font-weight: 900;
  font-size: 28px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px rgba(0,255,133,0.85), 0 0 2px rgba(0,0,0,0.75);
  pointer-events: none;
  user-select: none;
}
@keyframes d66StarPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  30% { opacity: 1; transform: translate(-50%, -95%) scale(1.12); }
  100% { opacity: 0; transform: translate(-50%, -140%) scale(1.0); }
}
@keyframes d66StarFly {
  0% { opacity: 0; transform: translate(0,0) rotate(0deg) scale(0.8); filter: drop-shadow(0 0 0 rgba(0,255,133,0)); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.0); filter: drop-shadow(0 0 20px rgba(0,255,133,0.65)); }
}
@keyframes d66StarSpin {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.05) rotate(15deg); }
}

/* Star burst container for overshoot */
.d66-star-burst { position: fixed; will-change: transform, opacity; }

/* Slot-machine style counter */
.d66-star-counter {
  position: fixed;
  /* Above audio toggle (20010) and fixed UI (12000), but below modal overlays (20060+) */
  z-index: 20020;
  min-width: 64px;
  height: 72px;
  padding: 8px 12px 10px;
  border-radius: 12px;
  border: 3px solid rgba(0,255,133,0.85);
  background: rgba(0,0,0,0.65);
  box-shadow: 0 0 18px rgba(0,255,133,0.45), inset 0 0 12px rgba(0,255,133,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #1eff7a;
  font: 900 36px/1 'Trebuchet MS', system-ui, Arial, sans-serif;
  text-shadow: 0 0 14px rgba(0,255,133,0.85), 0 0 3px rgba(0,0,0,0.85);
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transition: transform .12s ease;
}
.d66-star-counter.tick { transform: translateY(-12px) scale(1.02); }
#peter .content-box::after { /* contain float within section box */
  content: '';
  display: block;
  clear: both;
}
#kerry .content-box::after,
#zak .content-box::after { /* contain float within section box */
  content: '';
  display: block;
  clear: both;
}
#about .about-text { margin-top: 8px; }
#about .about-text p { margin: 0 0 20px 0; }
#about .about-grid {
  display: grid;
  /* Auto-fit ensures remaining cards center and expand evenly if one is removed */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-content: center; /* center tracks when fewer items */
  justify-items: center;   /* center card contents within each track */
  gap: 15px;
  margin-top: 15px;
  margin-bottom: 15px; /* space between cards and center buttons */
}
#about .about-card { text-decoration: none; display: flex; flex-direction: column; align-items: center; }
#about .about-card .img-button { width: 180px; height: 180px; }
#about .about-card-title {
  text-align: center;
  margin-top: 4px;
  font-weight: bold;
  color: #fff;
  font-size: 18px;
}
#about .about-card-sub {
  text-align: center;
  font-size: 14px;
  color: #bbb;
  margin-top: 0px;
}
#logo-wrap {
  position: absolute;
  width: 200px;
  height: 200px;
  z-index: 9600;
}
#logo-link, #logo {
  display: block;
  margin: 0;
  padding: 0;
}
#logo {
  transition: transform 0.24s ease, filter 0.24s ease;
  transform-origin: center;
}
#logo-link:hover #logo,
#logo-link:focus-visible #logo {
  transform: scale(1.08);
  filter: drop-shadow(0 0 22px rgba(0, 229, 255, 0.55));
}
#main-nav {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 9600;
}
#social-links {
  position: fixed;
  right: 20px;
  bottom: calc(20px + 40px + 2px);
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  z-index: 9600;
}
#social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--bright-blue);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 10px rgba(0, 168, 255, 0.4);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#social-links img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

#social-links a:hover,
#social-links a:focus-visible {
  transform: scale(1.05);
  border-color: var(--hover-aqua);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.65);
}
#audio-toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  z-index: 20010;
}
/* Audio controls layout */
#audio-control-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20010;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
}
/* audio-control-wrap visible by default; router/body classes govern entrance/story layout */
/* Hide audio toggle on the entrance screen only */
body.section-entrance #audio-control-wrap { display: none !important; }
#audio-control-wrap #audio-toggle { order: 2; }
#audio-control-wrap #audio-toggle {
  position: static;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--bright-blue);
  background: transparent no-repeat center center / contain;
  display: block;
  padding: 0;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
/* Use image assets for states */
#audio-control-wrap #audio-toggle[data-state="off"] {
  background-image: url('../images/audio-toggle-off.png');
}
#audio-control-wrap #audio-toggle[data-state="on"] {
  background-image: url('../images/audio-toggle-on.png');
}
/* SFX-only state */
#audio-control-wrap #audio-toggle[data-state="sfx"] {
  background-image: url('../images/audio-toggle-sfx.png');
}
/* Hover/focus: add glow + slight scale without swapping images */
#audio-control-wrap #audio-toggle[data-state="off"]:hover,
#audio-control-wrap #audio-toggle[data-state="off"]:focus-visible,
#audio-control-wrap #audio-toggle[data-state="on"]:hover,
#audio-control-wrap #audio-toggle[data-state="on"]:focus-visible,
#audio-control-wrap #audio-toggle[data-state="sfx"]:hover,
#audio-control-wrap #audio-toggle[data-state="sfx"]:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(0,229,255,0.9), 0 0 24px rgba(0,229,255,0.45);
}
/* Keyboard focus ring for accessibility (non-intrusive) */
#audio-control-wrap #audio-toggle:focus-visible {
  outline: 2px solid #00E5FF;
  outline-offset: 2px;
}

/* Remove previous SVG icon variables (no longer used) */

/* (volume slider removed) */
/* --- END FIXED LAYOUT --- */
/* --- FIXED UI VISIBILITY --- */
/* Hide fixed UI container by default to prevent flash */
#modal-root { position: fixed; inset: 0; z-index: 20050; pointer-events: none; }
#modal-root[hidden] { display: none !important; pointer-events: none !important; }
.d66-modal-overlay { pointer-events: auto; }
/* Ensure overlay is above flybys (12000) + audio toggle (12001) + any content (<= 9600) */
.d66-modal-overlay { position: fixed; inset: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; z-index: 20060; }
.d66-modal-overlay.d66-overlay-blur { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); background: rgba(4, 8, 21, 0.55); }
.d66-modal-active #modal-root, .d66-modal-active .d66-modal-overlay { z-index: 30000 !important; }
/* Nuclear option utility if some nested stacking context still eclipses modal */
.d66-modal-overlay.d66-force-top { z-index: 50000 !important; }
/* Deterministic escalation tier (applied only after verification passes fail) */
.d66-modal-overlay.d66-escalate, .d66-modal-active.d66-modal-escalate #modal-root { z-index: 42000 !important; }
.d66-modal-overlay.no-dim { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.d66-modal { width: fit-content; display: inline-block; max-width: min(95vw, 900px); max-height: 90vh; overflow: auto; background: #000000; border: 3px solid #ffffff; border-radius: 14px; box-shadow: 0 0 24px #9B4DFF; position: relative; }
.d66-modal-close { position: absolute; right: 12px; top: 8px; border: 1px solid #888; border-radius: 8px; font-size: 18px; padding: 4px 10px; cursor: pointer; background: transparent; color: #fff; }
.d66-modal-content { padding: 20px 40px; display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; min-width: 280px; }
.d66-modal.painting-exclusive-modal { width: 950px !important; height: 600px !important; max-width: none; max-height: none; overflow: hidden; }
.d66-modal.painting-exclusive-modal .d66-modal-content { padding: 0; width: 100%; height: 100%; display: flex; flex-direction: column; gap: 0; }
.d66-modal.painting-exclusive-modal .d66-modal-body { flex: 1 1 auto; width: 100%; height: 100%; padding: 0; margin: 0; display: flex; align-items: stretch; justify-content: stretch; }
.d66-modal.painting-exclusive-modal .painting-modal-video {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.d66-modal.painting-exclusive-modal .painting-exclusive-modal__video {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  border: none;
  background: #000;
}
.d66-modal-media { display: flex; align-items: center; justify-content: center; }
.d66-modal-media img, .d66-modal-media video { border: 3px solid #ffffff; border-radius: 16px; background: #000; }
.d66-modal-media .d66-media-circle { border-radius: 50% !important; }
.d66-modal-media .d66-media-noborder { border: none !important; }
.d66-modal-actions { display: flex; gap: 12px; justify-content: center; }
.d66-modal-body { font-size: 18px; line-height: 1.6; color: #dce7ff; text-align: center; }

/* Secret code gate */
.d66-secret-code { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.d66-secret-code-row { display: flex; gap: 6px; }
.d66-secret-code .secret-char { width: 28px; height: 36px; text-align: center; font-size: 18px; font-weight: bold; text-transform: uppercase; background: #000; color: #00e5ff; border: 2px solid #0078b3; border-radius: 5px; outline: none; box-shadow: 0 0 5px #001d2b inset; }
.d66-secret-code.secret-error .secret-char { border-color: #b33939 !important; box-shadow: 0 0 6px 2px rgba(255,0,0,0.35), 0 0 6px #001d2b inset !important; }
.d66-secret-code.secret-checking .secret-char { border-color: #00e5ff !important; box-shadow: 0 0 6px 2px rgba(0,229,255,0.45), 0 0 6px #001d2b inset !important; }
.d66-secret-code.secret-success .secret-char { border-color: #25ff7a !important; box-shadow: 0 0 6px 2px rgba(0,255,133,0.55), 0 0 6px #001d2b inset !important; }
.d66-secret-status { min-height: 20px; opacity: .9; }

/* Ensure Peter section lock stays on top and clickable above floats and nearby UI */

#fixed-ui-container {
  display: block;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Place base container just below flybys to avoid covering them when equal z-index ties occur. */
  /* Flybys: 12000, Fixed UI content: 12001 (see z-index-levels.md) */
  z-index: 11990;
  overflow: visible !important;
}

body.intro-phase #fixed-ui-container,
body.section-entrance #fixed-ui-container,
body.section-story #fixed-ui-container {
  display: none !important;
}
#fixed-ui {
  display: block;
  pointer-events: auto;
  position: relative;
  z-index: 12001;
}

/* Note: section-specific content-box behavior is handled by the centered .section-*.content-box rules above. */

/* --- UNIFIED MODAL LAYOUT --- */
/* Applies to any overlay using the common modal classes */
.site-modal {
  position: fixed;
  inset: 0;
  /* Align to active modal tier (30000) */
  z-index: 30000; /* above audio toggle (20010)/fixed UI (12000), matches JS modals */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.d66-modal-card {
  background: #000000;
  border: 3px solid #ffffff;
  border-radius: 22px;
  box-shadow: 0 0 34px rgba(0,229,255,0.35), 0 0 12px #000;
  padding: 20px 40px;
  width: min(500px, 90%);
  max-width: 500px;
  color: #fff;
  text-align: center;
}
.d66-modal-image {
  max-width: 150px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 18px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.d66-modal-title.h4 {
  margin: 0 0 14px;
  font-size: 22px;
  border-bottom: none;
  padding-bottom: 0;
  position: relative;
  width: 100%;
  align-self: stretch;
}
.d66-modal-title.h4::after {
  content: '';
  display: block;
  width: 50%;
  height: 2px;
  margin: 10px auto 0;
  background: currentColor;
  box-shadow: 0 0 8px rgba(210, 131, 255, 0.45), 0 0 16px rgba(210, 131, 255, 0.25);
  border-radius: 999px;
}
.d66-modal-body {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 24px;
}
.d66-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

/* Contact form styling (moved from styles.css) */
#contact-form {
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:12px;
}

/* Contact: prepared transitions for a graceful fade on submit */
#contact .content-box > h2,
#contact .content-box > p,
#contact .content-box > div,
#contact .content-box > form {
  transition: opacity 0.55s ease, transform 0.55s ease;
}
/* On submit, fade out the second heading, body text, helper divs, and the entire form */
body.fade-contact #contact .content-box > h2,
body.fade-contact #contact .content-box > p,
body.fade-contact #contact .content-box > div,
body.fade-contact #contact .content-box > form {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width:100%;
  box-sizing:border-box;
  background:linear-gradient(145deg, rgba(40,0,70,0.55), rgba(0,0,20,0.55));
  border:2px dotted rgba(255,72,218,0.6);
  color:var(--white);
  padding:12px 16px;
  font-size:16px;
  font-family:'Trebuchet MS', Arial, sans-serif;
  border-radius:14px;
  outline:none;
  /* Removed backdrop blur to keep background clear */
  box-shadow:0 0 0 1px rgba(255,255,255,0.05), 0 0 12px -2px rgba(149,77,255,0.35);
  transition: box-shadow .28s ease, border-color .28s ease, background .28s ease;
}
#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
  border-color:var(--hover-aqua);
  box-shadow:0 0 0 1px rgba(255,255,255,0.15), 0 0 18px -2px rgba(0,229,255,0.65), 0 0 42px -6px rgba(0,168,255,0.45);
  background:linear-gradient(145deg, rgba(60,10,110,0.65), rgba(0,0,35,0.7));
}
#contact-form textarea { min-height:130px; resize:vertical; line-height:1.55; }
#contact-form ::placeholder { color:#bbb; opacity:1; }
#contact-form label {
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:13px;
  line-height:1.35;
  background:linear-gradient(135deg, rgba(40,0,70,0.45), rgba(0,0,25,0.45));
  padding:10px 12px;
  border:2px dotted rgba(255,72,218,0.6);
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 0 0 1px rgba(255,255,255,0.04), 0 0 10px -2px rgba(149,77,255,0.25);
  transition:border-color .25s, box-shadow .25s, background .25s;
}
#contact-form label:hover, #contact-form label:focus-within {
  border-color: var(--hover-aqua);
  box-shadow:0 0 0 1px rgba(255,255,255,0.1), 0 0 16px -2px rgba(0,229,255,0.55), 0 0 32px -6px rgba(0,168,255,0.35);
  background:linear-gradient(135deg, rgba(60,10,110,0.55), rgba(0,0,40,0.55));
}
#contact-form input[type="checkbox"] { margin-top:3px; }
#contact-form .button-neonblue { align-self:center; margin-top:4px; }
/* Contact: pin the submit button 20px from the bottom of the content box */
#contact .content-box #contact-form .button-neonblue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px; /* requested offset */
  margin-top: 0; /* override inline flow spacing */
}
@media (max-width:700px){
  #contact-form input[type="text"],
  #contact-form input[type="email"],
  #contact-form textarea { font-size:15px; }
  #contact-form label { font-size:13px; }
}
/* Two-column row for name/email */
#contact-form .form-row.two-cols { display:flex; gap:14px; }
#contact-form .form-row.two-cols > input { flex:1 1 0; }
@media (max-width:700px){
  #contact-form .form-row.two-cols { flex-direction:column; }
}
/* =================== */
/* Star inline visuals */
/* Centralized from previous inline styles in index.php for reuse */
@keyframes starPulse { 0%,100% { transform:scale(1); filter:drop-shadow(0 0 5px rgba(0,229,255,0.65)); } 50% { transform:scale(1.18); filter:drop-shadow(0 0 12px rgba(0,229,255,0.95)); } }
/* Base inline star image (30x30 to match other UI assets) */
.star-inline, .inline-star-pulse {
  width:30px;
  height:30px;
  vertical-align:middle;
  margin:-4px 8px 0 8px; /* slight raise to sit optically centered with text */
  display:inline-block;
  object-fit:contain;
}
/* Pulsing / attention variant */
.star-pulse, .inline-star-pulse {
  animation: starPulse 2.6s ease-in-out infinite;
  filter:drop-shadow(0 0 6px rgba(0,229,255,0.85));
}
/* Award variants & sizing */
.star-award { cursor:pointer; width:80px; height:80px; border-radius:50%; border:none; box-shadow:none; filter:drop-shadow(0 0 10px rgba(0,229,255,0.95)); transition:transform .25s, box-shadow .25s, filter .25s; }
.star-award:hover, .star-award:focus-visible { transform:scale(1.08); box-shadow:0 0 16px rgba(0,229,255,0.85); outline:none; }
.star-award.star-earned { opacity:.7; filter:grayscale(70%) brightness(.9); box-shadow:0 0 4px rgba(255,255,255,0.25); cursor:default; }
/* Size variants deprecated: unified 55px star-award */

/* Standardized placement/size for all inline, floated star buttons */
.d66-star-float {
  width:100px !important;
  height:100px !important;
  float:right;
  margin:40px !important; /* 40px on all sides to create breathing room */
  margin-left:40px !important;
  margin-right:40px !important;
  margin-top:40px !important;
  margin-bottom:40px !important;
}

/* Peter cookie modal: float star-earn button right with text wrapping */
.peter-cookie-body { position:relative; }
.peter-cookie-body::after { content:""; display:block; clear:both; }
.peter-cookie-earn { float:right; width:80px; height:80px; margin:0 0 10px 14px; }
.peter-cookie-text { /* ensure readable measure next to the floated button */ min-height: 1px; }
@media (max-width: 540px){
  .peter-cookie-earn { float:none; display:block; margin:0 auto 10px auto; }
}

@keyframes painting-shell-sheen {
  0% {
    transform: translateX(-120%);
  }
  60% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}