/* Species page — tightened surfaces. Linked AFTER the page's inline <style>.
   Visual only: every id and handler species-detail-app.js uses is unchanged;
   the SSR function still finds its `#chatArea` line verbatim. */

body { background: #faf8f4; }

/* hero: photo cover-fit, names below it */
.hero { background: #e4e0d4; }
.gallery-main-wrap { min-height: 0; }
.gallery-main { height: auto; aspect-ratio: 4 / 3; max-height: 420px; object-fit: cover; background: #e4e0d4; }
@media (min-width: 600px) { .gallery-main-wrap { min-height: 0; } .gallery-main { height: auto; } }
.hero-back { background: rgba(0, 0, 0, 0.35); }
.hero-caption { position: static; background: #faf8f4; color: var(--text-primary, #1a1a1a); padding: 14px 20px 4px; pointer-events: auto; }
.lifelist-line { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: #2f7a3e; margin-bottom: 6px; }
.hero-common-name { font-size: 1.75rem; color: var(--forest-800, #1a3a2a); text-shadow: none; }
.hero-secondary-name, .hero-scientific-name { text-shadow: none; opacity: 1; color: var(--text-muted, #666); font-size: 0.95rem; }
.hero-scientific-name { font-style: italic; }
.gallery-thumbs { background: #faf8f4; justify-content: center; padding: 8px 14px 0; gap: 6px; }
.gallery-thumb { width: 8px; height: 8px; border-radius: 50%; border: 0; opacity: 0.3; background: var(--forest-800, #1a3a2a); object-fit: cover; }
.gallery-thumb.active { opacity: 1; }
.image-attribution { background: #faf8f4; border-bottom: 0; padding: 4px 20px 0; text-align: center; }

/* sound player */
.sound-player { background: #fff; border: 1px solid #e4e0d4; border-radius: 16px; margin: 14px 20px 0; padding: 12px 14px; }
.sound-play-btn { background: var(--forest-800, #1a3a2a); box-shadow: none; }
.sound-play-btn.playing { background: var(--forest-600, #2d5a3d); }

/* map + community */
#speciesMapPanel { margin: 14px 20px 0; }
.community-media { margin: 14px 20px 0; padding: 0; background: none; border: 0; box-shadow: none; }
.community-media-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--forest-800, #1a3a2a); }
.community-media-link { font-size: 0.85rem; font-weight: 600; color: var(--forest-600, #2d5a3d); }
.community-media-grid-item { border-radius: 10px; }

/* field guide text: no bubble, eyebrow headings */
.chat-area { padding: 16px 20px 4px; gap: 14px; background: transparent; overflow: visible; flex: none; }
.chat-message.assistant { max-width: none; background: none; box-shadow: none; padding: 0; border-radius: 0; color: var(--text-primary, #1a1a1a); font-size: 0.98rem; line-height: 1.55; animation: none; }
.chat-message.assistant > strong { font-size: 0.78rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--forest-800, #1a3a2a) !important; margin: 18px 0 6px !important; }
.chat-message.assistant > strong:first-child { margin-top: 0 !important; }
.chat-message.user { background: var(--forest-800, #1a3a2a); border-radius: 16px; border-bottom-right-radius: 4px; }
.chat-message.typing { background: none; box-shadow: none; padding: 0; }

/* bottom bar in the flow: Ask the guide bar, then Log + Community */
.bottom-bar { position: static; background: transparent; border-top: 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column-reverse; gap: 12px; }
.bottom-bar::after { content: 'Ask the guide'; order: 2; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--forest-800, #1a3a2a); }
.input-row { order: 1; }
.action-pills { order: 0; margin: 4px 0 0; gap: 10px; }
.action-pill { padding: 15px 16px; border-radius: 14px; font-size: 1rem; font-weight: 600; background: #fff; border: 1px solid #e4e0d4; color: var(--forest-800, #1a3a2a); transition: none; }
@media (hover: hover) { .action-pill:hover { background: #fff; border-color: #e4e0d4; color: var(--forest-800, #1a3a2a); } }
#logSightingBtn.action-pill { background: var(--forest-800, #1a3a2a); color: #fff; border-color: var(--forest-800, #1a3a2a); }
@media (hover: hover) { #logSightingBtn.action-pill:hover { background: var(--forest-800, #1a3a2a); color: #fff; } }
.action-pill-icon { display: inline-flex; line-height: 1; }
.input-row input { background: #fff; border: 1px solid #e4e0d4; border-radius: 999px; padding: 12px 16px; }
.input-row input:focus { border-color: var(--forest-600, #2d5a3d); box-shadow: none; background: #fff; }
.send-btn { width: 44px; height: 44px; background: var(--forest-800, #1a3a2a); }
@media (hover: hover) { .send-btn:hover { background: var(--forest-800, #1a3a2a); } }
.sound-meta { flex-wrap: wrap; gap: 4px 10px; }
.sound-time { white-space: nowrap; }
.image-attribution { display: none; }
/* 2+ photos: the hero halves step through the gallery on click */
.gallery-main-wrap.has-nav { cursor: pointer; }
.gallery-main-wrap .credit-i { bottom: 10px; right: 10px; top: auto; width: 26px; height: 26px; font-size: 0.8rem; }
/* one dot per photo: the gallery serves at most 12, and the row wraps rather than clip if that ever grows */
.gallery-thumbs { gap: 0; flex-wrap: wrap; }
.gallery-thumb { width: 8px; height: 8px; box-sizing: content-box; padding: 8px 5px; background-clip: content-box; }
/* the hero photo carries the credit "i"; the text credit line stays hidden even when the app sets display:block inline (2026-09-06) */
.image-attribution { display: none !important; }
