:root {
  --deep: #02131f;
  --ocean: #06344a;
  --reef: #0a6f86;
  --cyan: #22d3ee;
  --mint: #34d399;
  --sand: #f8d98f;
  --coral: #fb7185;
  --paper: #f6fbfd;
  --ink: #ecfeff;
  --muted: rgba(236, 254, 255, .72);
  --line: rgba(255, 255, 255, .14);
  --shadow: 0 22px 70px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overscroll-behavior-y: none; font-size: 16px; }
body {
  min-height: 100vh;
  font-family: "Sora", system-ui, sans-serif;
  color: var(--ink);
  background: var(--deep);
  line-height: 1.55;
  overflow-x: clip;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; -webkit-user-drag: none; }

.ocean-bg { position: fixed; inset: 0; z-index: -2; background: var(--deep); overflow: hidden; }
.ocean-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .58; filter: saturate(1.08) contrast(1.04); }
.ocean-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 19, 31, .68), rgba(2, 19, 31, .52) 40%, rgba(2, 19, 31, .86)),
    radial-gradient(circle at 18% 12%, rgba(34, 211, 238, .22), transparent 36%),
    radial-gradient(circle at 84% 20%, rgba(52, 211, 153, .18), transparent 32%);
}

.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 12, 20, .74);
  backdrop-filter: blur(14px);
  transition: opacity .24s, visibility .24s;
}
.lang-gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-panel {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(5, 28, 48, .94);
  box-shadow: var(--shadow);
}
.gate-video { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }
.gate-copy { padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.gate-copy img { width: 88px; height: 88px; border-radius: 24px; background: white; padding: 6px; box-shadow: 0 14px 32px rgba(0,0,0,.24); }
.eyebrow { color: var(--sand); font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.gate-copy h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; }
.gate-actions { display: flex; gap: 10px; margin-top: 4px; }
.gate-actions button,
.lang-tabs button {
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  min-width: 58px;
  height: 42px;
  font-weight: 900;
}
.gate-actions button:hover,
.lang-tabs button.active,
.lang-tabs button:hover { background: var(--cyan); color: #042332; border-color: transparent; }
.gate-audio {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
  font-weight: 900;
}
.gate-audio.is-playing {
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032332;
  border-color: transparent;
}
.skip-gate { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }

.page-shell { width: min(460px, calc(100vw - 16px)); margin: 0 auto; padding: 10px 0 120px; }
.hero { min-height: auto; display: flex; flex-direction: column; gap: 14px; }
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px;
  border: 1px solid rgba(248, 217, 143, .24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(251, 113, 133, .1)),
    rgba(2, 19, 31, .66);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0,0,0,.2), inset 0 0 0 1px rgba(248, 217, 143, .08);
}
.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  padding: 9px 14px 9px 9px;
  border-radius: 24px 18px 26px 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.1), rgba(42, 21, 8, .35)),
    url("assets/wood-button-organic.webp") center/cover;
  border: 1px solid rgba(248, 217, 143, .28);
  box-shadow: 0 12px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.22);
  clip-path: polygon(5% 8%, 88% 0, 100% 18%, 96% 82%, 85% 98%, 9% 94%, 0 76%, 3% 18%);
}
.brand::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -8px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(42,21,8,.2), rgba(248,217,143,.7), rgba(42,21,8,.2));
  opacity: .72;
  z-index: -1;
}
.brand img { width: 50px; height: 50px; border-radius: 16px; background: white; padding: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.24); }
.lang-tabs { display: flex; gap: 6px; }
.lang-tabs button { min-width: 44px; height: 36px; font-size: .78rem; }

.hero-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0 4px;
}
.hero-copy h1 {
  max-width: 100%;
  margin-top: 10px;
  font-size: clamp(2.15rem, 10.5vw, 3.45rem);
  line-height: .98;
  letter-spacing: 0;
}
.hero-copy p:not(.eyebrow) { max-width: 650px; margin-top: 22px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.hero-copy p:not(.eyebrow) { margin-top: 16px; font-size: .98rem; }
.hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
.primary-action,
.secondary-action,
.music-action,
.links-band a,
.links-band button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  border: 1px solid transparent;
}
.primary-action { background: linear-gradient(135deg, var(--cyan), var(--mint)); color: #032332; border: none; box-shadow: 0 12px 34px rgba(34, 211, 238, .24); }
.music-action {
  background: rgba(255, 255, 255, .09);
  color: var(--ink);
  border-color: rgba(34, 211, 238, .24);
  gap: 8px;
}
.music-action #musicIcon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032332;
  font-weight: 900;
}
.primary-action .chat-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  font-size: .95rem;
}
.secondary-action { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); }

.hero-media { min-width: 0; }
.media-stage {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 11;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, .06);
}
.media-stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity .22s; }
.media-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.media-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: var(--ink);
  font-size: 1.6rem;
}
.slide-dots { display: flex; gap: 7px; }
.slide-dots button {
  width: 9px;
  height: 9px;
  min-width: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, .3);
}
.slide-dots button.active { width: 28px; background: var(--cyan); }

.impact-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.impact-strip div,
.sand-grid div,
.species-grid article {
  border: 1px solid rgba(255, 255, 255, .16);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .12), rgba(248, 217, 143, .12)),
    rgba(255, 255, 255, .07);
  backdrop-filter: blur(14px);
}
.impact-strip div { padding: 16px; border-radius: 18px; }
.impact-strip div:nth-child(1) { border-color: rgba(34, 211, 238, .34); }
.impact-strip div:nth-child(2) { border-color: rgba(52, 211, 153, .34); }
.impact-strip div:nth-child(3) { border-color: rgba(251, 113, 133, .32); }
.impact-strip strong { display: block; font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--cyan); line-height: 1; }
.impact-strip span { color: var(--muted); font-size: .86rem; font-weight: 700; }

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 10px;
  margin: 18px 0;
  padding: 2px 4px;
}
.quick-actions button {
  position: relative;
  isolation: isolate;
  min-height: 112px;
  border: 0;
  border-radius: 34px 24px 30px 22px;
  background:
    linear-gradient(135deg, rgba(255, 245, 205, .08), rgba(18, 74, 76, .2) 42%, rgba(42, 21, 8, .46)),
    url("assets/wood-button-organic.webp") center/cover,
    url("assets/wood-button.webp") center/cover;
  color: white;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 16px 16px;
  text-align: left;
  box-shadow: 0 16px 26px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.2);
  clip-path: polygon(7% 4%, 89% 0, 98% 14%, 94% 88%, 83% 100%, 10% 94%, 0 78%, 3% 18%);
  overflow: hidden;
  transform: rotate(-1.2deg);
  transition: transform .18s ease, filter .18s ease;
}
.quick-actions button:nth-child(2) {
  border-radius: 24px 36px 22px 30px;
  clip-path: polygon(10% 0, 92% 5%, 100% 22%, 96% 82%, 86% 96%, 12% 100%, 1% 84%, 4% 12%);
  transform: rotate(1.1deg);
}
.quick-actions button:nth-child(3) {
  border-radius: 30px 22px 38px 24px;
  clip-path: polygon(5% 8%, 84% 0, 99% 10%, 95% 78%, 78% 98%, 8% 100%, 0 86%, 2% 20%);
  transform: rotate(.9deg);
}
.quick-actions button:nth-child(4) {
  border-radius: 22px 32px 26px 38px;
  clip-path: polygon(12% 2%, 88% 0, 100% 18%, 93% 92%, 78% 100%, 7% 94%, 0 72%, 5% 12%);
  transform: rotate(-.8deg);
}
.quick-actions button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 15%, rgba(255,255,255,.22), transparent 24%),
    linear-gradient(180deg, rgba(2, 19, 31, .05), rgba(2, 19, 31, .38));
  mix-blend-mode: soft-light;
}
.quick-actions button::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid rgba(255, 235, 190, .22);
  border-radius: inherit;
  clip-path: inherit;
  pointer-events: none;
}
.quick-actions .action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}
.quick-actions .action-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  object-fit: cover;
  transform: scale(1.22);
}
.quick-actions button span:last-child {
  max-width: 100%;
  line-height: 1.12;
  text-shadow: 0 2px 9px rgba(0,0,0,.46);
}
.quick-actions button:hover { transform: translateY(-3px) rotate(0deg); filter: brightness(1.08) saturate(1.06); }

.story-band,
.species-section,
.links-band {
  margin-top: 26px;
  border-radius: 28px;
  border: 1px solid rgba(248, 217, 143, .22);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .1), rgba(251, 113, 133, .08) 45%, rgba(248, 217, 143, .1)),
    rgba(2, 19, 31, .58);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 38px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.04);
}
.story-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(2, 19, 31, .7), rgba(10, 111, 134, .32)),
    url("assets/sand-real.webp") center/cover;
  border-color: rgba(248, 217, 143, .38);
}
.story-copy h2,
.section-head h2 { margin-top: 8px; font-size: clamp(1.9rem, 4vw, 3.25rem); line-height: 1.05; }
.story-copy p:not(.eyebrow) { margin-top: 16px; max-width: 680px; color: var(--muted); }
.sand-grid { display: grid; gap: 10px; }
.sand-grid div { border-radius: 18px; padding: 16px; }
.sand-grid strong { display: block; color: var(--sand); font-size: 2rem; line-height: 1; }
.sand-grid span { color: var(--muted); font-weight: 700; font-size: .88rem; }

.species-section {
  padding: clamp(22px, 5vw, 42px);
  cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s;
}
.species-section:hover,
.species-section:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, .45);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, .14), rgba(34, 211, 238, .12)),
    rgba(2, 19, 31, .68);
  outline: none;
}
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.species-photo-show {
  position: relative;
  overflow: hidden;
  height: 190px;
  margin-bottom: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
.species-photo-show img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 4s ease;
}
.species-photo-show img.active {
  opacity: 1;
  transform: scale(1);
}
.species-photo-show::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 19, 31, .5));
  pointer-events: none;
}
.species-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.species-grid article {
  border-radius: 18px;
  min-height: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.species-grid img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  object-fit: cover;
  background: rgba(255, 255, 255, .12);
}
.species-grid h3 { margin-top: 12px; font-size: .94rem; line-height: 1.16; }
.species-grid p { color: var(--muted); font-size: .78rem; }
.species-grid .scientific { font-style: italic; color: var(--sand); }
.species-grid span {
  width: fit-content;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(34, 211, 238, .14);
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 900;
}

.links-band {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.links-band a,
.links-band button { background: rgba(255, 255, 255, .07); color: var(--ink); border-color: rgba(255, 255, 255, .13); }
.links-band a:hover,
.links-band button:hover { background: rgba(34, 211, 238, .16); border-color: rgba(34, 211, 238, .36); }
.links-band .social-link {
  justify-content: flex-start;
  gap: 12px;
  padding-left: 12px;
}
.social-link img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
}

.site-footer {
  margin: 34px auto 0;
  text-align: center;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 12px;
}
.souvenir {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  font-size: .78rem;
  font-weight: 800;
}
.souvenir img { height: 30px; width: auto; border-radius: 999px; }

.back-top {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(2, 19, 31, .8);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.back-top.visible { opacity: 1; pointer-events: auto; }

.mini-player {
  position: fixed;
  left: 14px;
  bottom: 18px;
  z-index: 998;
  width: 64px;
  height: 64px;
  display: none;
  pointer-events: none;
  overflow: visible;
}
.mini-player.is-visible { display: block; pointer-events: auto; }
.mini-btn, .mini-close { pointer-events: auto; }
.mini-btn {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--cyan), var(--mint));
  color: #032332;
  box-shadow: 0 16px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.22);
  font-weight: 900;
}
.mini-player.is-playing .mini-btn { box-shadow: 0 18px 34px rgba(34,211,238,.35), 0 0 0 8px rgba(34,211,238,.12); }
.mini-icon { font-size: 20px; font-weight: 900; }
.mini-close {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 30px;
  height: 30px;
  border: 2px solid #eaffff;
  border-radius: 50%;
  background: #052033;
  color: white;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}

#chat-root { position: fixed; right: 14px; bottom: 14px; z-index: 999; font-family: "Sora", sans-serif; }
#chat-launcher-wrap { display: flex; align-items: flex-end; gap: 10px; }
#chat-hint {
  max-width: 210px;
  padding: 10px 13px;
  border-radius: 18px 18px 6px 18px;
  background: var(--paper);
  color: #073044;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  font-weight: 900;
  font-size: .78rem;
  animation: hintBob 4s ease-in-out infinite;
}
#chat-hint.hidden { display: none; }
@keyframes hintBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
#chat-launcher {
  position: relative;
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--mint), var(--cyan), var(--reef), var(--mint));
  display: grid;
  place-items: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34), 0 0 0 8px rgba(34, 211, 238, .08);
}
.launcher-icon { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: white; border: 2px solid white; }
.launcher-icon img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.55); object-position: center 38%; }
.launcher-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  border: 2px solid white;
  font-size: .72rem;
  font-weight: 900;
}
#chat-popup {
  position: fixed;
  right: 14px;
  bottom: 90px;
  width: 420px;
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 110px);
  transition: opacity .2s, transform .2s;
}
#chat-popup.closed { opacity: 0; transform: translateY(10px) scale(.98); pointer-events: none; }
#chat-popup.open { opacity: 1; transform: none; pointer-events: auto; }
#chat-panel {
  overflow: hidden;
  border-radius: 24px;
  background: #e9f5f5;
  color: #082838;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .36);
}
#chat-popup.dark #chat-panel { background: #071722; color: var(--ink); }
.chat-head {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, #0ea5b7, #0b6d86);
  color: white;
}
.chat-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid white; flex-shrink: 0; background: #0a4a64; }
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
}
.chat-identity strong,
.chat-identity small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-identity strong { font-size: .92rem; line-height: 1.05; }
.chat-identity small { opacity: .9; font-weight: 700; font-size: .76rem; }
.chat-tools { display: flex; gap: 6px; }
.chat-tools button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .18);
  color: white;
  font-weight: 900;
}
.messages {
  position: relative;
  height: min(390px, calc(100dvh - 230px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
#chat-popup.dark .messages { background: linear-gradient(180deg, #071722, #041019); }
.msg { display: flex; width: 100%; align-items: flex-end; gap: 7px; }
.msg.user { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }
.bot-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  object-fit: cover;
  flex: 0 0 auto;
  background: #0a4a64;
}
.bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 15px;
  font-size: .88rem;
  line-height: 1.42;
  word-break: break-word;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.user .bubble { color: #022331; background: linear-gradient(135deg, #7dd3fc, #34d399); border-bottom-right-radius: 5px; }
.bot .bubble { background: white; border-bottom-left-radius: 5px; }
#chat-popup.dark .bot .bubble { background: #123043; color: var(--ink); }
#chat-popup.dark .user .bubble { color: #022331; }
.text { white-space: pre-wrap; }
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.suggestion-chips button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(10, 111, 134, .12);
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: #e8f7f9;
  color: #073044;
  font-size: .76rem;
  font-weight: 900;
}
#chat-popup.dark .suggestion-chips button {
  background: rgba(34, 211, 238, .14);
  border-color: rgba(255, 255, 255, .12);
  color: var(--ink);
}
.suggestion-chips img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  clip-path: circle(42% at 50% 50%);
  object-fit: cover;
}
.typing { min-width: 68px; }
.dots { display: flex; gap: 5px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #7c9aa7; animation: typing 1s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: .16s; }
.dots span:nth-child(3) { animation-delay: .32s; }
@keyframes typing { 0%,80%,100%{transform:scale(.75);opacity:.55} 40%{transform:scale(1);opacity:1} }
.scroll-down {
  position: absolute;
  right: 22px;
  bottom: 76px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: white;
  color: #073044;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  display: none;
}
.scroll-down.visible { display: block; }
.pending-image {
  padding: 8px 12px 0;
  background: rgba(255, 255, 255, .5);
  position: relative;
}
.pending-image.hidden { display: none; }
.pending-image img { width: 74px; height: 74px; object-fit: cover; border-radius: 14px; }
.pending-image button { position: absolute; left: 68px; top: 2px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--coral); color: white; }
.input-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  background: white;
  border-top: 1px solid rgba(0, 0, 0, .06);
}
#chat-popup.dark .input-row { background: #071722; border-color: rgba(255, 255, 255, .08); }
.quick-wrap { position: relative; flex: 0 0 auto; }
.quick-toggle,
#cameraButton {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #dff7fb;
  color: #064152;
  font-weight: 900;
}
.quick-toggle.active { background: var(--cyan); }
.quick-menu {
  position: absolute;
  left: 0;
  bottom: 52px;
  width: 185px;
  padding: 8px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
  display: grid;
  gap: 6px;
}
.quick-menu.hidden { display: none; }
.quick-menu::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: inherit;
  transform: rotate(45deg);
}
#chat-popup.dark .quick-menu { background: #123043; }
.quick-menu button {
  border: 0;
  background: transparent;
  color: #073044;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 12px;
  font-weight: 900;
  text-align: left;
}
#chat-popup.dark .quick-menu button { color: var(--ink); }
.quick-menu button:hover { background: rgba(34, 211, 238, .14); }
.quick-menu img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  clip-path: circle(42% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  object-fit: cover;
}
.input-wrap { flex: 1; position: relative; min-width: 0; }
.input-wrap input {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(8, 40, 56, .14);
  outline: none;
  padding: 0 46px 0 15px;
  color: #082838;
  background: #f5fbfc;
  font-size: 16px;
}
#chat-popup.dark .input-wrap input { background: #123043; color: var(--ink); border-color: rgba(255,255,255,.12); }
#cameraButton { position: absolute; right: 0; top: 0; background: transparent; }
#sendChat {
  height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032332;
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s, visibility .2s;
}
.modal.open { opacity: 1; visibility: visible; pointer-events: auto; }
.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border-radius: 24px;
  padding: clamp(20px, 4vw, 34px);
  background: #f7fbfd;
  color: #073044;
  box-shadow: var(--shadow);
}
.modal-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e8f3f6; font-size: 1.4rem; }
.modal-card h2 { padding-right: 38px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.08; }
.modal-card p { margin-top: 12px; color: #486271; }
.modal-list { display: grid; gap: 10px; margin-top: 18px; }
.modal-list li {
  list-style: none;
  min-height: 58px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(248, 217, 143, .18)),
    #eaf6f8;
  border: 1px solid rgba(10, 111, 134, .1);
  font-weight: 800;
}
.modal-list li:nth-child(2n) { background: linear-gradient(135deg, rgba(52, 211, 153, .16), rgba(251, 113, 133, .12)), #eef8f4; }
.modal-list li img,
.store-state h3 img,
.store-card-title img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 7px 16px rgba(7, 48, 68, .16);
  background: white;
}
.modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #032332;
  font-weight: 900;
  text-align: center;
}
.store-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}
.store-state {
  display: grid;
  gap: 10px;
}
.store-state h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #0a6f86;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.store-state h3 img { width: 30px; height: 30px; }
.store-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(248, 217, 143, .24), rgba(34, 211, 238, .12)),
    #eaf6f8;
  border: 1px solid rgba(10, 111, 134, .12);
}
.store-card:nth-of-type(2n) { background: linear-gradient(135deg, rgba(52, 211, 153, .16), rgba(251, 113, 133, .12)), #edf8f7; }
.store-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.store-card-title img { width: 36px; height: 36px; flex: 0 0 auto; }
.store-card strong { font-size: 1rem; color: #073044; }
.store-card p {
  margin: 0;
  color: #486271;
  font-size: .86rem;
  line-height: 1.42;
}
.store-card span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(34, 211, 238, .16);
  color: #07506a;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.35;
}
.history-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.history-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: #dcecef;
}
.history-timeline {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.history-timeline li {
  list-style: none;
  position: relative;
  padding: 12px 14px 12px 34px;
  border-radius: 14px;
  background: #eaf6f8;
  color: #294b5a;
  font-weight: 800;
}
.history-timeline li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0a6f86;
}
.species-modal-grid { display: grid; gap: 12px; margin-top: 20px; }
.species-modal-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #eaf6f8;
  border: 1px solid rgba(10, 111, 134, .12);
}
.species-modal-card img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  -webkit-mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  mask-image: radial-gradient(circle, #000 68%, transparent 70%);
  object-fit: cover;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(10, 111, 134, .15);
}
.species-modal-card h3 { font-size: 1.05rem; line-height: 1.12; }
.species-modal-card .scientific { margin-top: 2px; color: #486271; font-style: italic; font-size: .84rem; }
.species-modal-card dl { display: grid; gap: 8px; margin-top: 12px; }
.species-modal-card dl div { display: grid; gap: 2px; }
.species-modal-card dt {
  color: #0a6f86;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.species-modal-card dd { color: #294b5a; font-size: .88rem; line-height: 1.42; }

@media (max-width: 900px) {
  .gate-panel,
  .hero-layout,
  .story-band { grid-template-columns: 1fr; }
  .gate-video { min-height: 240px; }
  .hero { min-height: auto; }
  .hero-media { order: -1; }
  .media-stage { aspect-ratio: 16 / 10; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .links-band { grid-template-columns: 1fr; }
  .species-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100vw - 16px, 460px); padding-bottom: 112px; }
  .brand { padding: 5px; }
  .brand img { width: 50px; height: 50px; }
  .brand span { display: none; }
  .hero-copy h1 { font-size: clamp(2.05rem, 10vw, 3.35rem); }
  .hero-copy p:not(.eyebrow) { font-size: .96rem; }
  .impact-strip { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr 1fr; gap: 12px 8px; padding: 1px 2px; }
  .quick-actions button { min-height: 102px; padding: 13px 12px; font-size: .78rem; }
  .quick-actions .action-icon { width: 38px; height: 38px; }
  .story-band,
  .species-section,
  .links-band { border-radius: 22px; }
  .species-photo-show { height: 170px; }
  .species-grid { grid-template-columns: 1fr; }
  .species-grid article { min-height: auto; }
  .species-modal-card { grid-template-columns: 48px minmax(0, 1fr); padding: 13px; }
  .species-modal-card img { width: 48px; height: 48px; }
  .history-photos { grid-template-columns: 1fr; }
  .links-band { grid-template-columns: 1fr; }
  #chat-root { right: 10px; bottom: 10px; }
  .mini-player { left: 12px; bottom: 14px; }
  #chat-hint { max-width: 178px; font-size: .72rem; }
  #chat-popup {
    right: 8px;
    bottom: 84px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 96px);
  }
  .messages { height: min(430px, calc(100dvh - 230px)); }
  .bubble { max-width: 84%; }
  #sendChat { padding: 0 12px; font-size: .82rem; }
  .quick-menu { width: 176px; }
}
