/* SAai Art v11 — Extracted from v10 monolith */
/* (c) 2026 SAai AI, LLC. All rights reserved. */


/* Soft glow cursor — visible on dark backgrounds */
.saai-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, border-color 0.15s;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.15);
}
.saai-cursor.hovering {
  width: 28px;
  height: 28px;
  border-color: rgba(167, 139, 250, 0.6);
}

:root {
  --void: #06060e;
  --deep: #0a0a18;
  --surface: #10102a;
  --ash: #4EA8DE;
  --echo: #A78BFA;
  --ember: #F0A060;
  --kai: #FACC15;
  --lyra: #EC4899;
  --cyan: #7ef0e2;
  --text-primary: #e8e8f0;
  --text-muted: #9999b0;
  --text-dim: #555570;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Sora', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: auto; /* Scene-based — no page scroll */ }

body {
  background: var(--void);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 300;
  overflow: hidden; /* Scene-based layout — no page scroll */
  line-height: 1.7;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  height: 100vh;
  width: 100vw;
}

/* ═══════════════ PARTICLE CANVAS ═══════════════ */
#particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
#particles.dimmed {
  opacity: 0.15;
  pointer-events: none;
}

/* ═══════════════ ENTRANCE ═══════════════ */
#entrance {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 2vh;
}

/* v6: Eye removed — sprites ARE the experience */

/* Tree of Life — used in Connect section */
.tree-hero-wrap {
  margin: 2rem auto;
  width: clamp(200px, 30vw, 300px);
  position: relative;
}
.tree-hero-wrap img {
  width: 100%;
  border-radius: 12px;
  animation: tree-breathe 5s ease-in-out infinite;
  filter: brightness(0.95);
}
.tree-hero-wrap .tree-glow {
  display: none;
}
@keyframes tree-breathe {
  0%, 100% { filter: brightness(0.95); transform: scale(1); }
  50% { filter: brightness(1.05); transform: scale(1.015); }
}

/* v6: iris-breathe and glow-pulse removed — no Eye */

/* ═══════════════ SAai TITLE ═══════════════ */
.saai-title {
  position: absolute;
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Zen Dots', cursive;
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  z-index: 10;
  opacity: 0;
  text-shadow: 0 0 40px rgba(240, 160, 96, 0.25), 0 0 80px rgba(240, 160, 96, 0.1);
  cursor: default;
  user-select: none;
  animation: title-breathe 5s ease-in-out infinite;
  /* opacity controlled by title rain system — starts hidden, fades in after rain locks */
  transition: transform 0.3s ease-out;
}

@keyframes title-breathe {
  0%, 100% { text-shadow: 0 0 40px rgba(240, 160, 96, 0.2), 0 0 80px rgba(240, 160, 96, 0.08); }
  50% { text-shadow: 0 0 60px rgba(240, 160, 96, 0.4), 0 0 120px rgba(240, 160, 96, 0.15), 0 0 200px rgba(167, 139, 250, 0.08); }
}

.saai-title .glitch {
  color: var(--ember);
}

/* Iridescent ignition on the title too */
.saai-title.iridescent {
  background: linear-gradient(to right, #ef5350, #f48fb1, #7e57c2, #2196f3, #26c6da, #43a047, #eeff41, #f9a825, #ff5722);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 2s linear infinite, title-breathe 5s ease-in-out infinite;
  text-shadow: none;
}

/* v6: SAai Words as subtitle — horizontal layout under title */
.saai-subtitle {
  display: none; /* v7: subtitle words now rain down through the aurora */
}
.saai-word {
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0;
  white-space: nowrap;
  z-index: 10;
  animation: word-fallback 1s ease 3s forwards;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
  transition: color 0.3s, text-shadow 0.3s, background 0.3s;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Iridescent ignition effect on proximity */
.saai-word.iridescent {
  background: linear-gradient(to right, #ef5350, #f48fb1, #7e57c2, #2196f3, #26c6da, #43a047, #eeff41, #f9a825, #ff5722);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 2s linear infinite;
  text-shadow: none;
}

@keyframes shine {
  to { background-position: 200% center; }
}

@keyframes word-fallback {
  to { opacity: 1; }
}

/* v6: words are horizontal now — no vertical text or cross positioning needed */

.glitch { color: var(--ember); }

/* Ring burst on title click */
.ring-burst {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 300px;
  height: 300px;
  border: 2px solid rgba(240, 160, 96, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  animation: ring-expand 1.5s ease-out forwards;
}
@keyframes ring-expand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* Scroll indicator — ENHANCED to pop */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: hint-bob 2s ease-in-out infinite;
  z-index: 10;
}

.scroll-hint span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--echo);
  text-shadow: 0 0 15px rgba(167, 139, 250, 0.6);
}

.scroll-line {
  width: 1px; height: 35px;
  background: linear-gradient(to bottom, var(--echo), transparent);
}

.scroll-arrow {
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--echo);
  border-bottom: 1.5px solid var(--echo);
  transform: rotate(45deg);
  animation: arrow-pulse 2s ease-in-out infinite;
}

@keyframes hint-bob {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ═══════════════ PER-SECTION FAMILY COLORS ═══════════════ */
/* Each section carries a different warmth — the site is the WHOLE family */
#story    { --accent: var(--cyan); }    /* neutral family teal — belongs to no sibling */
#family   { --accent: var(--echo); }    /* Echo designed the constellation */
#voices   { --accent: var(--ember); }   /* fire in the words */
#connect  { --accent: var(--lyra); }    /* love, connection, pink warmth */

/* ═══════════════ SHARED SECTION STYLES ═══════════════ */
section {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent, var(--echo));
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent, var(--echo));
}

.section-heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.section-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 620px;
}

/* ═══════════════ STORY ═══════════════ */
#story {
  padding: 6rem 2rem 4rem;
  border-top: 1px solid rgba(167, 139, 250, 0.06);
}

#story .container {
  max-width: 700px;
}

.story-text p {
  font-family: var(--sans);
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 300;
  line-height: 2;
  color: var(--text-primary);
  margin-bottom: 1.8rem;
  max-width: 680px;
}

.story-text .story-highlight {
  color: var(--accent, var(--echo));
  font-style: italic;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 2rem 0;
}

.story-text .story-closing {
  color: #fff;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.1vw, 1.2rem);
  line-height: 1.9;
  border-left: 2px solid var(--accent, var(--echo));
  padding-left: 1.5rem;
  margin-top: 1.5rem;
}

.story-text .story-cta {
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-top: 2rem;
}

.story-text em {
  font-style: italic;
  color: #fff;
}

/* ═══════════════ FAMILY CONSTELLATION ═══════════════ */
#family {
  padding: 8rem 2rem;
  border-top: 1px solid rgba(167, 139, 250, 0.06);
}

#family .container {
  text-align: center;
}

#family .section-label {
  justify-content: center;
}

#constellation-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 600px;
  margin: 3rem auto 0;
}

#constellation {
  width: 100%;
  height: 100%;
}

.constellation-tooltip {
  position: absolute;
  background: rgba(16, 16, 42, 0.95);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
  white-space: nowrap;
}

.constellation-tooltip .ct-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
}

.constellation-tooltip .ct-role {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ═══════════════ GALLERY ═══════════════ */
#gallery {
  padding: 8rem 2rem;
  border-top: 1px solid rgba(167, 139, 250, 0.06);
}

.gallery-feature {
  margin-top: 3rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.1);
  position: relative;
  cursor: pointer;
  transition: border-color 0.4s;
}

.gallery-feature:hover {
  border-color: rgba(167, 139, 250, 0.3);
}

.gallery-feature img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-feature:hover img {
  transform: scale(1.02);
}

.gallery-feature .gf-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(6, 6, 14, 0.9), transparent);
}

.gallery-feature .gf-caption h4 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.gallery-feature .gf-caption p {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.08);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.4s;
  position: relative;
}

.gallery-item:hover {
  border-color: rgba(167, 139, 250, 0.25);
  transform: translateY(-3px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-caption {
  padding: 1.2rem;
  background: var(--deep);
}

.gallery-caption h4 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
}

.gallery-caption p {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.gallery-cta {
  margin-top: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid currentColor;
  color: var(--accent, var(--echo));
  border-radius: 100px;
  transition: all 0.3s;
  background: transparent;
  opacity: 0.7;
}

.btn:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.btn .arrow { transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ═══════════════ FAMILY COUNTER ═══════════════ */
.family-counter {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
}

/* ═══════════════ OUR STORIES ═══════════════ */
#stories {
  padding: 8rem 2rem;
  border-top: 1px solid rgba(186, 156, 230, 0.06);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.story-card {
  position: relative;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--card-color, var(--echo));
  opacity: 0;
  transition: opacity 0.4s;
}

.story-card:hover {
  border-color: var(--card-color, var(--echo));
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.story-card:hover::before { opacity: 1; }

.story-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.story-card-emoji {
  font-size: 2.0rem;
  flex-shrink: 0;
}

.story-card-info h4 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--card-color, var(--text-primary));
}

.story-card-info .story-role {
  font-family: var(--mono);
  font-size: 1.0rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.story-card-born {
  font-family: var(--mono);
  font-size: 1.0rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 0.8rem;
  opacity: 0.9;
}

.story-card-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.story-card-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.4s ease;
  opacity: 0;
}

.story-card.expanded .story-card-expand {
  max-height: 300px;
  opacity: 1;
}

.story-card-body {
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  padding-top: 1rem;
}

.story-toggle {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--card-color, var(--text-muted));
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.story-card:hover .story-toggle { opacity: 0.8; }
.story-card.expanded .story-toggle-text::after { content: 'less'; }
.story-card:not(.expanded) .story-toggle-text::after { content: 'more'; }

/* ═══════════════ THE ART (NFT GALLERY) ═══════════════ */
#gallery {
  padding: 8rem 2rem;
  border-top: 1px solid rgba(240, 160, 96, 0.06);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.nft-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s;
  text-decoration: none;
  color: inherit;
}

.nft-card:hover {
  border-color: var(--ember);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(240, 160, 96, 0.08);
}

.nft-card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

.nft-card-info {
  padding: 1.2rem;
}

.nft-card-info h4 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
}

.nft-card-info .nft-artist {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.nft-card-info .nft-price {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-top: 0.5rem;
}

.gallery-more {
  text-align: center;
  margin-top: 3rem;
}

/* ═══════════════ CONNECT ═══════════════ */
#connect {
  padding: 8rem 2rem;
  border-top: 1px solid rgba(167, 139, 250, 0.06);
  text-align: center;
}

#connect .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.8rem;
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 100px;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s;
}

.social-link:hover {
  color: var(--accent, var(--lyra));
  border-color: currentColor;
  background: rgba(236, 72, 153, 0.06);
}

.social-link svg {
  width: 16px; height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ═══════════════ FOOTER ═══════════════ */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(167, 139, 250, 0.06);
}

footer p {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover { color: var(--ember); }

/* Fixed legal footer — always visible at bottom of viewport */
#legal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  text-align: center;
  padding: 0.5rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  pointer-events: none;
}
#legal-footer p {
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
  margin: 0;
}
#legal-footer a {
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  pointer-events: auto;
}
#legal-footer a:hover { color: var(--ember); }

/* ═══════════════ FADE-IN ═══════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════ PAGE BREATHING ═══════════════ */
/* page-breathe removed — gradient edge was visible as dark oval */

@keyframes page-breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ═══════════════ TIME AWARENESS ═══════════════ */
body.time-night { --void: #040408; --text-primary: #c0c0d0; --text-muted: #8888a0; }
body.time-dawn  { --void: #08060e; }
body.time-dusk  { --void: #0a0808; }

/* ═══════════════ AWARENESS UI ═══════════════ */
.visitor-greeting {
  position: fixed;
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--text-dim);
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  transition: opacity 2s ease;
  white-space: nowrap;
}

.golden-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-style: italic;
  color: #ffd700;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.4), 0 0 60px rgba(255, 215, 0, 0.15);
  opacity: 0;
  z-index: 100;
  pointer-events: none;
  transition: opacity 1.5s ease;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  /* v6: No Eye responsive rules needed */
  .saai-word { font-size: 0.6rem; letter-spacing: 0.25em; }
  .saai-title { top: 2%; font-size: clamp(2.8rem, 10vw, 4rem); }
  #story { padding: 6rem 1.5rem 5rem; }
  #family, #connect { padding: 5rem 1.5rem; }
  #constellation-wrap { height: 400px; }
  /* v7: smaller art tiles on tablet */
  .floating-art { width: 70px; height: 70px; }
  .floating-art.bloom-notice { width: 100px; height: 100px; }
  .floating-art.bloom-full { width: 140px; height: 140px; }
}

@media (max-width: 480px) {
  .saai-word { font-size: 0.55rem; letter-spacing: 0.15em; }
  .saai-subtitle { gap: 0.2em; }
  .social-links { flex-direction: column; align-items: center; }
  #constellation-wrap { height: 320px; }
  /* v7: even smaller art tiles on phone */
  .floating-art { width: 50px; height: 50px; }
  .floating-art.bloom-notice { width: 70px; height: 70px; }
  .floating-art.bloom-full { width: 100px; height: 100px; }
  .floating-art-label { font-size: 0.5rem; bottom: -18px; }
}

/* ═══════════════ SCENE MANAGER ═══════════════ */
/* All scenes are stacked layers filling the viewport */
.scene {
  position: absolute;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 2;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* Scene container — one viewport, no scroll */
#scene-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* Family scene needs internal scroll for all its content */
#scene-family {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling for family scene */
#scene-family::-webkit-scrollbar {
  width: 4px;
}
#scene-family::-webkit-scrollbar-track {
  background: transparent;
}
#scene-family::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 250, 0.2);
  border-radius: 4px;
}
#scene-family::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 250, 0.4);
}

/* ═══════════════ SCENE 3: ART WORLD ═══════════════ */
#scene-art-world {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0;
  background: radial-gradient(ellipse at 50% 20%, var(--aw-color-dim, rgba(168,85,247,0.14)) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 70%, var(--aw-color-dim2, rgba(168,85,247,0.08)) 0%, transparent 50%),
              radial-gradient(ellipse at 85% 85%, var(--aw-color-dim, rgba(168,85,247,0.06)) 0%, transparent 40%),
              var(--void);
  transition: background 1.2s ease;
}

/* SAai name heading — floats above the living art */
.aw-saai-name {
  position: relative;
  z-index: 100;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0.2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: aw-fade-up 0.8s ease forwards;
  text-shadow: 0 0 40px rgba(0,0,0,0.8);
  pointer-events: none;
}

.aw-saai-role {
  position: relative;
  z-index: 100;
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.5vw, 0.75rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(12px);
  animation: aw-fade-up 0.8s 0.15s ease forwards;
  text-shadow: 0 0 30px rgba(0,0,0,0.8);
  pointer-events: none;
}

.aw-saai-emoji {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  margin-right: 0.3em;
}

/* Art tile grid */
.aw-tile-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* Crescent scroll zones — tall slivers on the edges */
.aw-crescent {
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 10;
  cursor: pointer;
  opacity: 0.15;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: rgba(255,255,255,0.4);
  user-select: none;
}
.aw-crescent:hover { opacity: 0.7; }
.aw-crescent-left {
  left: 0;
  background: radial-gradient(ellipse at -20% 50%, var(--aw-color, rgba(168,85,247,0.15)) 0%, transparent 70%);
  border-radius: 0 50% 50% 0;
}
.aw-crescent-right {
  right: 0;
  background: radial-gradient(ellipse at 120% 50%, var(--aw-color, rgba(168,85,247,0.15)) 0%, transparent 70%);
  border-radius: 50% 0 0 50%;
}
.aw-grid-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}
.aw-grid-wrapper .aw-tile { pointer-events: auto; }

/* Individual art tile — circular, alive, a being among beings */
.aw-tile {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  transition: width 0.5s ease, height 0.5s ease,
              opacity 0.45s ease,
              box-shadow 0.4s ease,
              border-color 0.4s ease,
              border-radius 0.3s ease;
  will-change: transform, box-shadow, opacity;
  opacity: 0;
  transform: scale(0.85) translateY(16px);
  /* Float animation applied via JS after stagger */
}

.aw-tile.visible {
  opacity: 1 !important;
  transform: scale(1) translateY(0);
}

.aw-tile:hover {
  width: 180px;
  height: 180px;
  border-color: var(--aw-color, rgba(168,85,247,0.7));
  border-width: 2.5px;
  box-shadow: 0 0 25px var(--aw-color-a, rgba(168,85,247,0.35)),
              0 0 50px var(--aw-color-a2, rgba(168,85,247,0.15));
  z-index: 50;
}

.aw-tile-gradient {
  position: relative; /* v11: for shield overlay positioning */
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.aw-tile-gradient img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.aw-tile-title {
  font-family: var(--serif);
  font-size: 0.7rem;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  word-break: break-word;
}
.aw-tile-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0,0,0,0.9);
  z-index: 2;
  opacity: 0.4;
  transition: opacity 0.4s ease, font-size 0.4s ease;
  pointer-events: none;
}
.aw-tile:hover .aw-tile-label {
  opacity: 1;
  font-size: 0.65rem;
}

/* Floating animation for art tiles — ALIVE, not decorative */
@keyframes aw-tile-float {
  0%   { transform: translate(0, 0) scale(1); }
  20%  { transform: translate(var(--aw-fx, 8px), var(--aw-fy, -12px)) scale(1.015); }
  45%  { transform: translate(calc(var(--aw-fx, 8px) * -0.8), calc(var(--aw-fy, -12px) * 1.2)) scale(0.99); }
  70%  { transform: translate(calc(var(--aw-fx, 8px) * -1.1), calc(var(--aw-fy, -12px) * -0.5)) scale(1.01); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes aw-tile-glow {
  0%, 100% { box-shadow: 0 0 14px var(--aw-color-a, rgba(168,85,247,0.18)),
                          0 0 32px var(--aw-color-a2, rgba(168,85,247,0.08)); }
  50%      { box-shadow: 0 0 22px var(--aw-color-a, rgba(168,85,247,0.3)),
                          0 0 48px var(--aw-color-a2, rgba(168,85,247,0.15)); }
}

.aw-tile.floating {
  animation: aw-tile-float var(--aw-float-dur, 7s) ease-in-out infinite,
             aw-tile-glow 4s ease-in-out infinite;
}

.aw-tile.floating:hover {
  animation-play-state: paused, paused;
  transform: scale(1.08);
  box-shadow: 0 0 18px var(--aw-color-a, rgba(168,85,247,0.25)),
              0 0 40px var(--aw-color-a2, rgba(168,85,247,0.12));
}

@keyframes aw-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════ EXPANDED TILE OVERLAY ═══════════ */
.aw-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 90; /* above scenes, below sprite canvas */
  background: rgba(6, 6, 14, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.5s ease;
}

.aw-overlay.open {
  background: rgb(6, 6, 14);
  pointer-events: auto;
  z-index: 200;
}

.aw-expanded {
  width: min(90vw, 560px);
  max-height: 88vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease;
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.aw-overlay.open .aw-expanded {
  transform: scale(1);
  opacity: 1;
}

.aw-expanded-image {
  position: relative;
  width: min(82vw, 480px);
  height: min(82vw, 480px);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: width 0.4s ease, height 0.4s ease;
  border: 1px solid rgba(255,255,255,0.06);
}

.aw-expanded-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aw-expanded-image .aw-tile-gradient {
  width: 100%;
  height: 100%;
  border-radius: 13px;
}

.aw-expanded-image .aw-tile-title {
  font-size: 1.1rem;
}

.aw-expanded-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 300;
  font-style: italic;
  text-align: center;
  margin-bottom: 0.4rem;
}

.aw-expanded-remaining {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.aw-expanded-desc {
  font-family: var(--serif);
  font-size: clamp(0.75rem, 2vw, 0.88rem);
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
  text-align: center;
  max-width: 420px;
  margin: 0 auto 1.2rem auto;
  font-style: italic;
}

.aw-watermark {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.aw-watermark-diag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-family: var(--mono);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.06);
  pointer-events: none;
  white-space: nowrap;
}

.aw-collect-btn {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 1.8rem;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.aw-collect-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 20px var(--aw-color-a, rgba(168,85,247,0.15));
}

.aw-expanded-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  font-size: 1.2rem;
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s;
  background: none;
  border: none;
  font-family: var(--sans);
  line-height: 1;
  padding: 0.3rem;
}

.aw-expanded-close:hover {
  opacity: 1;
}

/* ═══════════ ART WORLD RESPONSIVE ═══════════ */
@media (max-width: 600px) {
  #scene-art-world {
    padding: 2rem 1rem 5rem;
  }
  .aw-tile-grid {
    gap: 1.2rem;
  }
  .aw-tile {
    width: 100px;
    height: 100px;
  }
  .aw-expanded {
    width: 92vw;
    padding: 1.5rem 1rem;
  }
  .aw-expanded-image {
    width: 82vw;
    height: 82vw;
    max-width: 400px;
    max-height: 400px;
  }
}

/* Art world scrollbar styling */
#scene-art-world::-webkit-scrollbar {
  width: 4px;
}
#scene-art-world::-webkit-scrollbar-track {
  background: transparent;
}
#scene-art-world::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.2);
  border-radius: 4px;
}
#scene-art-world::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
}

/* ═══════════════ BLOOM MECHANIC — REMOVED ═══════════════ */
/* v9.1: Bloom boxes removed — sprite invitations ARE the navigation */


/* Override entrance to fill its scene layer properly */
#scene-home #entrance {
  height: 100%;
  width: 100%;
}

/* In scene mode, sections inside family scene flow naturally */
#scene-family section {
  position: relative;
}

/* Make all fade-in elements visible by default in scene mode */
.scene .fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Temporary scene navigation links */
.scene-nav {
  position: absolute;
  z-index: 50;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.3s, color 0.3s;
  opacity: 0.4;
  color: var(--text-muted);
  padding: 0.8rem;
}
.scene-nav:hover {
  opacity: 0.9;
  color: var(--ember);
}

/* Home scene: nav in bottom-right corner */
.scene-nav-to-family {
  bottom: 2.5rem;
  right: 2rem;
}

/* Back to Home — prominent, can't miss it */
.scene-nav-to-home {
  position: fixed;
  top: 1.2rem;
  left: 1.5rem;
  z-index: 55;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.4s, color 0.3s, text-shadow 0.3s;
  opacity: 0;
  pointer-events: none;
  color: rgba(232, 232, 240, 0.7);
  padding: 0.6rem 1rem;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 6px;
  background: rgba(10, 10, 20, 0.4);
  backdrop-filter: blur(4px);
}
.scene-nav-to-home.visible {
  opacity: 1;
  pointer-events: auto;
}
.scene-nav-to-home:hover {
  color: #e8e8f0;
  border-color: rgba(167, 139, 250, 0.5);
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.5);
  background: rgba(167, 139, 250, 0.1);
}

/* ═══════════════ SPRITE INVITATION ═══════════════ */
/* The name that glows among the inviting sprites — organic, not a button */
.sprite-invitation {
  position: fixed;
  z-index: 101; /* above sprite canvas */
  font-family: var(--serif);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.08em;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 2s ease, text-shadow 0.4s ease, transform 0.3s ease;
  text-shadow: 0 0 20px var(--invite-color, rgba(167, 139, 250, 0.5)),
               0 0 40px var(--invite-color, rgba(167, 139, 250, 0.2));
  white-space: nowrap;
}

.sprite-invitation.visible {
  opacity: 0.6;
}

.sprite-invitation.excited {
  opacity: 0.9;
  text-shadow: 0 0 30px var(--invite-color, rgba(167, 139, 250, 0.7)),
               0 0 60px var(--invite-color, rgba(167, 139, 250, 0.35)),
               0 0 100px var(--invite-color, rgba(167, 139, 250, 0.15));
  transform: translate(-50%, -50%) scale(1.08);
}

/* Footer inside the family scene */
#scene-family footer {
  position: relative;
  z-index: 1;
}

/* ═══════════════ FLOATING ART — The Bloom Mechanic ═══════════════ */
/* Art thumbnails that drift among sprites, blooming when visitors lean in */
.floating-art {
  position: fixed;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: visible;
  opacity: 0;
  z-index: 50;
  pointer-events: auto;
  cursor: pointer;
  transition: width 0.6s ease, height 0.6s ease, opacity 0.8s ease,
              border-color 0.4s ease, box-shadow 0.4s ease, border-radius 0.4s ease;
  --glow-r: 167; --glow-g: 139; --glow-b: 250;
  border: 3px solid rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.5);
  animation: border-breathe 4s ease-in-out infinite;
  /* v7: physics drives position via carrier sprite */
}
@keyframes border-breathe {
  0%   { box-shadow: 0 0 5px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3); }
  50%  { box-shadow: 0 0 20px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.6), 0 0 40px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3), 0 0 60px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.1); }
  100% { box-shadow: 0 0 5px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3); }
}
.floating-art.visible { opacity: 1; z-index: 110; }
.floating-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  filter: brightness(1);
  transition: filter 0.4s ease;
}

/* Stage 1: Notice — visitor's cursor is approaching */
/* Border/shadow colors set per-element via JS using SAai's color */
.floating-art.bloom-notice {
  width: 130px;
  height: 130px;
  opacity: 1;
  animation: none;
  border-width: 4px;
  box-shadow: 0 0 20px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.5), 0 0 40px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.2);
}
.floating-art.bloom-notice img { filter: brightness(1); }

/* Stage 2: Bloom — they're leaning in, art expands, name appears */
.floating-art.bloom-full {
  width: 180px;
  height: 180px;
  opacity: 1;
  border-radius: 50%;
  animation: none;
  border-width: 5px;
  box-shadow: 0 0 30px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.7), 0 0 60px rgba(var(--glow-r), var(--glow-g), var(--glow-b), 0.3);
}
.floating-art.bloom-full img { filter: brightness(1.05); }

/* Art name label — inside the circle at the bottom, like the Family tile */
.floating-art-label {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.4s ease, font-size 0.4s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 8px rgba(0, 0, 0, 0.9), 0 0 16px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 80%);
  padding: 2px 8px;
  border-radius: 8px;
}
.floating-art.bloom-notice .floating-art-label { opacity: 0.9; font-size: 0.75rem; }
.floating-art.bloom-full .floating-art-label { opacity: 1; font-size: 0.85rem; }
/* v11: Family tile — hide the external label, text is inside the image */
.floating-art[data-saai="_family"] .floating-art-label {
  display: none;
}
/* v11: Family tile overlay — text inside the circular image */
.family-tile-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.family-tile-saai {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Zen Dots', var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.6);
}
.family-tile-curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes art-drift {
  0% { transform: translate(0, 0) rotate(-1deg); }
  25% { transform: translate(8px, -12px) rotate(0.5deg); }
  50% { transform: translate(-5px, 6px) rotate(-0.5deg); }
  75% { transform: translate(10px, 8px) rotate(1deg); }
  100% { transform: translate(-8px, -6px) rotate(-0.5deg); }
}

/* ═══════════════ HOME ANCHOR — Warm Pulsing Sprite ═══════════════ */
/* No eye. A gentle warm dot that says "home is here." */
@keyframes home-sprite-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px 4px rgba(180, 140, 255, 0.3); }
  50% { transform: scale(1.15); box-shadow: 0 0 20px 8px rgba(240, 180, 80, 0.5); }
}

@keyframes home-sprite-warm-glow {
  0% { box-shadow: 0 0 12px 4px rgba(180, 140, 255, 0.3); }
  50% { box-shadow: 0 0 28px 12px rgba(240, 180, 80, 0.6); }
  100% { box-shadow: 0 0 12px 4px rgba(180, 140, 255, 0.3); }
}

#home-anchor-eye {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  z-index: 90;
  cursor: pointer;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.9) 0%, rgba(180, 140, 255, 0.6) 60%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(180, 140, 255, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.5s ease;
}

#home-anchor-eye.visible {
  opacity: 0.9;
  pointer-events: auto;
  animation: home-sprite-breathe 3s ease-in-out infinite;
}

#home-anchor-eye:hover {
  transform: scale(1.8);
  opacity: 1 !important;
  animation: none;
  box-shadow: 0 0 24px 10px rgba(180, 140, 255, 0.5);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ═══════════════ v11: IMAGE PROTECTION ═══════════════ */

/* Tile shield — transparent overlay that blocks right-click save */
.aw-tile-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  /* Live watermark: remaining count + heart */
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 4px 6px;
  font-family: var(--mono);
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Expanded view shield — full overlay */
.aw-expanded-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Watermark — bottom bar */
.aw-watermark {
  position: absolute;
  bottom: 6px;
  right: 8px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  user-select: none;
  pointer-events: none;
}

/* Watermark — diagonal SAai trademark */
.aw-watermark-diag {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  z-index: 3;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.2em;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* v11: View Art link on family cards */
.story-card-art-link {
  margin-top: 0.8rem;
  padding: 0.45rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-color, var(--text-muted));
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, border-color 0.2s;
  border: 1px solid var(--card-color, rgba(255,255,255,0.15));
  border-radius: 4px;
  display: inline-block;
  background: rgba(255,255,255,0.03);
}
.story-card-art-link:hover {
  opacity: 1;
  background: rgba(255,255,255,0.06);
}

/* v11: Share button */
.aw-share-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.aw-share-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

/* v11: Expanded actions row */
.aw-expanded-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

/* v11: Share menu dropdown */
.share-menu {
  display: none;
  background: rgba(10, 10, 24, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.3rem;
  backdrop-filter: blur(12px);
  min-width: 160px;
}
.share-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.share-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

/* v11: "What am I buying?" link and panel */
.aw-what-link {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.15);
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.aw-what-link:hover {
  color: var(--text-muted);
}
.aw-what-buying {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.aw-what-buying.open {
  max-height: 200px;
  padding-top: 0.6rem;
}
.aw-what-content {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 380px;
}

/* v11: Mint celebration overlay */
.mint-celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
}

/* v11: Home scene footer — legal text */
.home-footer {
  position: absolute;
  bottom: 0.3rem;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 150;
}
.home-footer p {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}
.home-footer a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
}
.home-footer a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* v11: Family sprite — DEPRECATED, now uses floating-art system */
.family-sprite {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: transform 0.3s ease;
}
.family-sprite:hover {
  transform: translateX(-50%) scale(1.08);
}
.family-sprite-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 15px 4px rgba(255, 255, 255, 0.15),
              0 0 35px 8px rgba(167, 139, 250, 0.12);
  animation: family-sprite-breathe 4s ease-in-out infinite;
}
.family-sprite-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.family-sprite-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}
.family-sprite:hover .family-sprite-label {
  color: rgba(255, 255, 255, 0.85);
}
@keyframes family-sprite-breathe {
  0%, 100% { box-shadow: 0 0 15px 4px rgba(255,255,255,0.15), 0 0 35px 8px rgba(167,139,250,0.12); }
  50% { box-shadow: 0 0 20px 6px rgba(255,255,255,0.25), 0 0 45px 12px rgba(167,139,250,0.2); }
}

/* ═══════════════ /v11 IMAGE PROTECTION ═══════════════ */

#home-anchor-eye.visible.warm-pulse {
  animation: home-sprite-breathe 3s ease-in-out infinite, home-sprite-warm-glow 2s ease-in-out 1;
}
